This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src
Ken Sternberg f179d6572e
web: Storybook css import fix (#5964)
* web: fix storybook `build` css import issue

This is an incredibly frustrating issue, because Storybook works
in `dev` mode but not in `build` mode, and that's not at all what
you'd expecte from a mature piece of software.  Lit uses the native
CSS adoptedStylesheets field, which takes only a constructedStylesheet.
Lit provides a way of generating those, but the imports from
Patternfly (or any `.css` file) are text, and converting those to
stylesheets required a bit of magic.

What this means going forward is that any Storied components will
have to have their CSS wrapped in a way that ensures it is managed
correctly by Lit (well, to be pedantic, by the
shadowDOM.adoptedStylesheets).  That wrapper is provided and the
components that need it have been wrapped.

This problem deserves further investigation, but for the time
being this actually does solve it with a minimum amount of surgical
pain.

* web: fix storybook build issue

This commit further fixes the typing issues around strings, CSSResults,
and CSSStyleSheets by providing overloaded functions that assist
consumers in knowing that if they send an array to expect an array
in return, and if they send a scalar expect a scalar in return.

* replace any with unknown

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2023-06-16 13:36:04 +02:00
..
admin web/admin: theme adjustments (#5944) 2023-06-13 15:41:48 +02:00
assets/images web/flows: update default flow background (#5905) 2023-06-08 15:16:25 +02:00
common web: Storybook css import fix (#5964) 2023-06-16 13:36:04 +02:00
elements web: Storybook css import fix (#5964) 2023-06-16 13:36:04 +02:00
flow web/flows: update default flow background (#5905) 2023-06-08 15:16:25 +02:00
locales web: Replace lingui.js with lit-localize (#5761) 2023-06-02 08:08:36 -07:00
polyfill web: bump @formatjs/intl-listformat from 7.2.2 to 7.3.0 in /web (#5866) 2023-06-08 13:28:15 +02:00
standalone web: Replace lingui.js with lit-localize (#5761) 2023-06-02 08:08:36 -07:00
stories web: Add storybook (#5865) 2023-06-07 13:05:33 +02:00
user web: Storybook css import fix (#5964) 2023-06-16 13:36:04 +02:00
custom.css *: add placeholder custom.css to easily allow user customisation 2022-02-14 20:05:00 +01:00
global.d.ts web/elements: pass full Markdown object to ak-markdown, get title from metadata 2021-12-16 12:18:43 +01:00
locale-codes.ts website: update translation docs (#5875) 2023-06-06 12:32:32 +02:00