mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
* Move inline styles into separate file. * Fix preferred order of captcha vendor discovery. * Clean up mutation and resize observer lifecycle. * Flesh out controllers. * Tidy refresh. * Fix incompatibilities with Storybook. * Flesh out captcha stories. * Bump package. * Flesh out stories. * Move inline styles into separate file. * Fix preferred order of captcha vendor discovery. * Clean up mutation and resize observer lifecycle. * Flesh out controllers. * Tidy refresh. * Remove unused. * Bump package.
55 lines
1.1 KiB
JavaScript
55 lines
1.1 KiB
JavaScript
/**
|
|
* @file Storybook manager configuration.
|
|
*
|
|
* @import { Preview } from "@storybook/web-components";
|
|
*/
|
|
|
|
import "#styles/authentik/interface.global.css";
|
|
import "#styles/authentik/static.global.css";
|
|
import "#styles/authentik/storybook.css";
|
|
|
|
import { ThemedDocsContainer } from "./DocsContainer.tsx";
|
|
import { extendStorybookTheme } from "./theme.js";
|
|
|
|
import {
|
|
applyDocumentTheme,
|
|
createUIThemeEffect,
|
|
resolveUITheme,
|
|
} from "@goauthentik/web/common/theme.ts";
|
|
|
|
const base = resolveUITheme();
|
|
const theme = extendStorybookTheme(base);
|
|
|
|
applyDocumentTheme(base);
|
|
|
|
createUIThemeEffect(applyDocumentTheme);
|
|
|
|
/**
|
|
* @satisfies {Preview}
|
|
*/
|
|
const preview = {
|
|
tags: ["autodocs"],
|
|
|
|
parameters: {
|
|
docs: {
|
|
theme,
|
|
container: ThemedDocsContainer,
|
|
},
|
|
options: {
|
|
storySort: {
|
|
method: "alphabetical",
|
|
},
|
|
},
|
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default preview;
|