@askrjs/themes 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/components/_internal/box-layout.js.map +1 -1
  2. package/dist/components/_internal/classes.js.map +1 -1
  3. package/dist/components/_internal/jsx.js.map +1 -1
  4. package/dist/components/_internal/layout.js.map +1 -1
  5. package/dist/components/_internal/merge-props.js.map +1 -1
  6. package/dist/components/_internal/pathname.js.map +1 -1
  7. package/dist/components/_internal/style.js.map +1 -1
  8. package/dist/components/alert/alert.js.map +1 -1
  9. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
  10. package/dist/components/badge/badge.js.map +1 -1
  11. package/dist/components/block/block.js.map +1 -1
  12. package/dist/components/box/box.js.map +1 -1
  13. package/dist/components/breadcrumb/breadcrumb.a11y.js.map +1 -1
  14. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  15. package/dist/components/button-group/button-group.js.map +1 -1
  16. package/dist/components/card/card.js.map +1 -1
  17. package/dist/components/close/close.js.map +1 -1
  18. package/dist/components/container/container.js.map +1 -1
  19. package/dist/components/empty-state/empty-state.js.map +1 -1
  20. package/dist/components/field/field.js.map +1 -1
  21. package/dist/components/flex/flex.js.map +1 -1
  22. package/dist/components/header/header.a11y.js.map +1 -1
  23. package/dist/components/header/header.js.map +1 -1
  24. package/dist/components/inline/index.js.map +1 -1
  25. package/dist/components/input-group/input-group.js.map +1 -1
  26. package/dist/components/list-group/list-group.js.map +1 -1
  27. package/dist/components/nav/nav.js.map +1 -1
  28. package/dist/components/navbar/navbar-panel.js.map +1 -1
  29. package/dist/components/navbar/navbar.context.js.map +1 -1
  30. package/dist/components/navbar/navbar.js.map +1 -1
  31. package/dist/components/navbar/navbar.render.js.map +1 -1
  32. package/dist/components/navbar/navbar.shared.js.map +1 -1
  33. package/dist/components/overlays/dropdown-content.js.map +1 -1
  34. package/dist/components/pagination/pagination.js.map +1 -1
  35. package/dist/components/section/section.js.map +1 -1
  36. package/dist/components/separator/separator.a11y.js.map +1 -1
  37. package/dist/components/separator/separator.js.map +1 -1
  38. package/dist/components/shell/shell-panel.js.map +1 -1
  39. package/dist/components/shell/shell-responsive.js.map +1 -1
  40. package/dist/components/shell/shell.a11y.js.map +1 -1
  41. package/dist/components/shell/shell.js.map +1 -1
  42. package/dist/components/sidebar/sidebar-panel.js.map +1 -1
  43. package/dist/components/sidebar/sidebar-toggle.js.map +1 -1
  44. package/dist/components/sidebar/sidebar.context.js.map +1 -1
  45. package/dist/components/sidebar/sidebar.js.map +1 -1
  46. package/dist/components/sidebar/sidebar.shared.js.map +1 -1
  47. package/dist/components/skeleton/skeleton.js.map +1 -1
  48. package/dist/components/spacer/spacer.js.map +1 -1
  49. package/dist/components/spinner/spinner.js.map +1 -1
  50. package/dist/components/stack/stack.js.map +1 -1
  51. package/dist/components/theme/theme.js +13 -3
  52. package/dist/components/theme/theme.js.map +1 -1
  53. package/dist/controls.d.ts +1 -1
  54. package/dist/feedback.d.ts +1 -1
  55. package/dist/layouts.d.ts +1 -1
  56. package/dist/navs.d.ts +1 -1
  57. package/dist/shells.d.ts +1 -1
  58. package/dist/surfaces.d.ts +1 -1
  59. package/dist/themes/default/index.css +136 -136
  60. package/package.json +11 -10
  61. package/src/components/theme/theme.tsx +22 -1
  62. package/src/themes/default/index.css +1 -1
  63. package/src/themes/default/styles/base/utilities.css +34 -5
  64. package/templates/theme/index.css +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import { defineContext, readContext, state } from \"@askrjs/askr\";\nimport { resource } from \"@askrjs/askr/resources\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeContextValue = {\n theme: () => ThemeName;\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeProviderProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\n\nconst ThemeContext = defineContext<ThemeContextValue>({\n theme: () => \"system\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n});\n\nexport function useTheme(): ThemeContextValue {\n return readContext(ThemeContext);\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const themeState = state<ThemeName>(readStoredTheme(storageKey) ?? defaultTheme);\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n syncThemeRoot(nextTheme);\n };\n\n const value: ThemeContextValue = {\n theme: themeState,\n setTheme,\n themes,\n storageKey,\n };\n\n const currentTheme = themeState();\n\n return (\n <ThemeContext.Scope value={value}>\n <ThemeRootSync theme={currentTheme} />\n <div data-slot=\"theme-provider\">{children}</div>\n </ThemeContext.Scope>\n );\n}\n\nfunction ThemeRootSync(props: { theme: ThemeName }): JSX.Element | null {\n const { theme } = props;\n\n resource(\n ({ signal }: { signal: AbortSignal }) => {\n if (typeof window === \"undefined\") {\n syncThemeRoot(theme);\n return null;\n }\n\n const timeoutId = window.setTimeout(() => {\n if (!signal.aborted) {\n syncThemeRoot(theme);\n }\n }, 0);\n\n signal.addEventListener(\n \"abort\",\n () => {\n window.clearTimeout(timeoutId);\n },\n { once: true },\n );\n\n return null;\n },\n [theme],\n );\n\n return null;\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const theme = useTheme();\n const { themes = theme.themes, label = \"Theme\", ...rest } = props;\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={theme.theme()}\n onChange={(event: Event) => {\n const target = event.currentTarget as HTMLSelectElement;\n theme.setTheme(target.value as ThemeName);\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const theme = useTheme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = theme.theme();\n const nextTheme = getNextTheme(currentTheme, themes);\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? themedIcon);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented) theme.setTheme(nextTheme);\n }}\n >\n {content}\n </Button>\n );\n}\n\nfunction getNextTheme(currentTheme: ThemeName, themes: readonly ThemeName[]): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction syncThemeRoot(themeChoice: ThemeName | null | undefined): void {\n if (typeof document === \"undefined\") {\n return;\n }\n\n const html = document.documentElement;\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n return (window.localStorage.getItem(storageKey) as ThemeName | null) ?? undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import { defineContext, readContext, state } from \"@askrjs/askr\";\nimport type { JSXElement } from \"@askrjs/askr/foundations/structures\";\nimport { resource } from \"@askrjs/askr/resources\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeContextValue = {\n theme: () => ThemeName;\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeProviderProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\n\nconst ThemeContext = defineContext<ThemeContextValue>({\n theme: () => \"system\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n});\n\nexport function useTheme(): ThemeContextValue {\n return readContext(ThemeContext);\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const themeState = state<ThemeName>(readStoredTheme(storageKey) ?? defaultTheme);\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n syncThemeRoot(nextTheme);\n };\n\n const value: ThemeContextValue = {\n theme: themeState,\n setTheme,\n themes,\n storageKey,\n };\n\n const currentTheme = themeState();\n\n return (\n <ThemeContext.Scope value={value}>\n <ThemeRootSync theme={currentTheme} />\n <div data-slot=\"theme-provider\">{children}</div>\n </ThemeContext.Scope>\n );\n}\n\nfunction ThemeRootSync(props: { theme: ThemeName }): JSX.Element | null {\n const { theme } = props;\n\n resource(\n ({ signal }: { signal: AbortSignal }) => {\n if (typeof window === \"undefined\") {\n syncThemeRoot(theme);\n return null;\n }\n\n const timeoutId = window.setTimeout(() => {\n if (!signal.aborted) {\n syncThemeRoot(theme);\n }\n }, 0);\n\n signal.addEventListener(\n \"abort\",\n () => {\n window.clearTimeout(timeoutId);\n },\n { once: true },\n );\n\n return null;\n },\n [theme],\n );\n\n return null;\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const theme = useTheme();\n const { themes = theme.themes, label = \"Theme\", ...rest } = props;\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={theme.theme()}\n onChange={(event: Event) => {\n const target = event.currentTarget as HTMLSelectElement;\n theme.setTheme(target.value as ThemeName);\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const theme = useTheme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = theme.theme();\n const nextTheme = getNextTheme(currentTheme, themes);\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const renderedIcon = cloneThemeToggleIcon(themedIcon);\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? renderedIcon);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented) theme.setTheme(nextTheme);\n }}\n >\n {content}\n </Button>\n );\n}\n\nfunction getNextTheme(currentTheme: ThemeName, themes: readonly ThemeName[]): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction isJSXElement(value: unknown): value is JSXElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$typeof\" in value &&\n \"type\" in value &&\n \"props\" in value\n );\n}\n\nfunction cloneThemeToggleIcon(icon: unknown): unknown {\n if (!isJSXElement(icon)) return icon;\n\n return {\n ...icon,\n props: { ...(icon.props as Record<string, unknown> | undefined) },\n };\n}\n\nfunction syncThemeRoot(themeChoice: ThemeName | null | undefined): void {\n if (typeof document === \"undefined\") {\n return;\n }\n\n const html = document.documentElement;\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n return (window.localStorage.getItem(storageKey) as ThemeName | null) ?? undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":"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"}
@@ -7,4 +7,4 @@ import { Field, FieldError, FieldHint } from "./components/field/field.js";
7
7
  import { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "./components/input-group/input-group.types.js";
8
8
  import { InputGroup, InputGroupText } from "./components/input-group/input-group.js";
9
9
  import { Button, ButtonAsChildProps, ButtonNativeProps, ButtonOwnProps, ButtonProps } from "@askrjs/ui";
10
- export { Button, type ButtonAsChildProps, ButtonGroup, ButtonGroupOrientation, ButtonGroupProps, type ButtonNativeProps, type ButtonOwnProps, type ButtonProps, Close, CloseNativeProps, CloseOwnProps, Field, FieldError, FieldErrorProps, FieldHint, FieldHintProps, FieldProps, InputGroup, InputGroupOrientation, InputGroupProps, InputGroupText, InputGroupTextAsChildProps, InputGroupTextProps };
10
+ export { Button, type ButtonAsChildProps, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonNativeProps, type ButtonOwnProps, type ButtonProps, Close, type CloseNativeProps, type CloseOwnProps, Field, FieldError, type FieldErrorProps, FieldHint, type FieldHintProps, type FieldProps, InputGroup, type InputGroupOrientation, type InputGroupProps, InputGroupText, type InputGroupTextAsChildProps, type InputGroupTextProps };
@@ -2,4 +2,4 @@ import { EmptyStateHeadingTag, EmptyStateProps } from "./components/empty-state/
2
2
  import { EmptyState } from "./components/empty-state/empty-state.js";
3
3
  import { SpinnerOwnProps, SpinnerProps } from "./components/spinner/spinner.types.js";
4
4
  import { Spinner } from "./components/spinner/spinner.js";
5
- export { EmptyState, EmptyStateHeadingTag, EmptyStateProps, Spinner, SpinnerOwnProps, SpinnerProps };
5
+ export { EmptyState, type EmptyStateHeadingTag, type EmptyStateProps, Spinner, type SpinnerOwnProps, type SpinnerProps };
package/dist/layouts.d.ts CHANGED
@@ -22,4 +22,4 @@ import { SPACER_A11Y_CONTRACT, SpacerA11yContract } from "./components/spacer/sp
22
22
  import { StackAsChildProps, StackDivProps, StackOwnProps, StackProps } from "./components/stack/stack.types.js";
23
23
  import { Stack } from "./components/stack/stack.js";
24
24
  import { STACK_A11Y_CONTRACT, StackA11yContract } from "./components/stack/stack.a11y.js";
25
- export { AspectRatio, AspectRatioAsChildProps, AspectRatioProps, BLOCK_A11Y_CONTRACT, BOX_A11Y_CONTRACT, Block, BlockA11yContract, BlockAsChildProps, BlockDivProps, BlockNativeProps, BlockOwnProps, BlockProps, BlockSize, BlockSpanProps, Box, BoxA11yContract, BoxAsChildProps, BoxDivProps, BoxLayoutOwnProps, BoxOwnProps, BoxProps, BoxSpanProps, CONTAINER_A11Y_CONTRACT, Container, ContainerA11yContract, ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant, FLEX_A11Y_CONTRACT, Flex, FlexA11yContract, FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT, Inline, FlexA11yContract as InlineA11yContract, FlexAsChildProps as InlineAsChildProps, FlexDivProps as InlineDivProps, FlexNativeProps as InlineNativeProps, FlexOwnProps as InlineOwnProps, FlexProps as InlineProps, FlexSpanProps as InlineSpanProps, LayoutResponsive, SECTION_A11Y_CONTRACT, SPACER_A11Y_CONTRACT, STACK_A11Y_CONTRACT, Section, SectionA11yContract, SectionAsChildProps, SectionElementProps, SectionOwnProps, SectionProps, Spacer, SpacerA11yContract, SpacerAsChildProps, SpacerAxis, SpacerNativeProps, SpacerOwnProps, SpacerProps, Stack, StackA11yContract, StackAsChildProps, StackDivProps, StackOwnProps, StackProps };
25
+ export { AspectRatio, type AspectRatioAsChildProps, type AspectRatioProps, type BLOCK_A11Y_CONTRACT, type BOX_A11Y_CONTRACT, Block, type BlockA11yContract, type BlockAsChildProps, type BlockDivProps, type BlockNativeProps, type BlockOwnProps, type BlockProps, type BlockSize, type BlockSpanProps, Box, type BoxA11yContract, type BoxAsChildProps, type BoxDivProps, type BoxLayoutOwnProps, type BoxOwnProps, type BoxProps, type BoxSpanProps, type CONTAINER_A11Y_CONTRACT, Container, type ContainerA11yContract, type ContainerAsChildProps, type ContainerNativeProps, type ContainerOwnProps, type ContainerProps, type ContainerVariant, type FLEX_A11Y_CONTRACT, Flex, type FlexA11yContract, type FlexAsChildProps, type FlexDivProps, type FlexNativeProps, type FlexOwnProps, type FlexProps, type FlexSpanProps, type FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT, Inline, type FlexA11yContract as InlineA11yContract, type FlexAsChildProps as InlineAsChildProps, type FlexDivProps as InlineDivProps, type FlexNativeProps as InlineNativeProps, type FlexOwnProps as InlineOwnProps, type FlexProps as InlineProps, type FlexSpanProps as InlineSpanProps, type LayoutResponsive, type SECTION_A11Y_CONTRACT, type SPACER_A11Y_CONTRACT, type STACK_A11Y_CONTRACT, Section, type SectionA11yContract, type SectionAsChildProps, type SectionElementProps, type SectionOwnProps, type SectionProps, Spacer, type SpacerA11yContract, type SpacerAsChildProps, type SpacerAxis, type SpacerNativeProps, type SpacerOwnProps, type SpacerProps, Stack, type StackA11yContract, type StackAsChildProps, type StackDivProps, type StackOwnProps, type StackProps };
package/dist/navs.d.ts CHANGED
@@ -12,4 +12,4 @@ import { SidebarPanel } from "./components/sidebar/sidebar-panel.js";
12
12
  import { SidebarToggle } from "./components/sidebar/sidebar-toggle.js";
13
13
  import { PaginationEllipsisProps, PaginationItemAsChildProps, PaginationItemProps, PaginationLinkProps, PaginationProps } from "./components/pagination/pagination.types.js";
14
14
  import { Pagination, PaginationEllipsis, PaginationItem, PaginationLink } from "./components/pagination/pagination.js";
15
- export { BREADCRUMB_A11Y_CONTRACT, Breadcrumb, BreadcrumbA11yContract, BreadcrumbAsChildProps, BreadcrumbCurrent, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItem, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps, CollapseBreakpoint, CollapseIconPlacement, Collapsible, Nav, NavAsChildProps, NavBrand, NavBrandProps, NavDivProps, NavGroup, NavGroupProps, NavItem, NavItemAsChildProps, NavItemProps, NavItemVariant, NavLink, NavLinkProps, NavListProps, NavNavProps, NavOrientation, NavProps, NavToggle, NavToggleProps, NavVariant, Navbar, NavbarProps, Pagination, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemAsChildProps, PaginationItemProps, PaginationLink, PaginationLinkProps, PaginationProps, Sidebar, SidebarPanel, SidebarPanelProps, SidebarProps, SidebarToggle, SidebarToggleProps };
15
+ export { BREADCRUMB_A11Y_CONTRACT, Breadcrumb, type BreadcrumbA11yContract, type BreadcrumbAsChildProps, BreadcrumbCurrent, type BreadcrumbCurrentAsChildProps, type BreadcrumbCurrentProps, BreadcrumbItem, type BreadcrumbItemAsChildProps, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkAsChildProps, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListAsChildProps, type BreadcrumbListProps, type BreadcrumbOwnProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorAsChildProps, type BreadcrumbSeparatorProps, type CollapseBreakpoint, type CollapseIconPlacement, type Collapsible, Nav, type NavAsChildProps, NavBrand, type NavBrandProps, type NavDivProps, NavGroup, type NavGroupProps, NavItem, type NavItemAsChildProps, type NavItemProps, type NavItemVariant, NavLink, type NavLinkProps, type NavListProps, type NavNavProps, type NavOrientation, type NavProps, NavToggle, type NavToggleProps, type NavVariant, Navbar, type NavbarProps, Pagination, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemAsChildProps, type PaginationItemProps, PaginationLink, type PaginationLinkProps, type PaginationProps, Sidebar, SidebarPanel, type SidebarPanelProps, type SidebarProps, type SidebarToggle, type SidebarToggleProps };
package/dist/shells.d.ts CHANGED
@@ -13,4 +13,4 @@ import { HEADER_A11Y_CONTRACT, HeaderA11yContract } from "./components/header/he
13
13
  import { ShellAsChildProps, ShellDivProps, ShellMainAsChildProps, ShellMainDivProps, ShellMainMainProps, ShellMainProps, ShellNavAsChildProps, ShellNavDivProps, ShellNavProps, ShellOwnProps, ShellProps, ShellVariant } from "./components/shell/shell.types.js";
14
14
  import { Shell, ShellMain, ShellNav } from "./components/shell/shell.js";
15
15
  import { SHELL_A11Y_CONTRACT, ShellA11yContract } from "./components/shell/shell.a11y.js";
16
- export { CollapseBreakpoint, CollapseIconPlacement, Collapsible, HEADER_A11Y_CONTRACT, Header, HeaderA11yContract, HeaderPosition, HeaderProps, NavBrand, NavBrandProps, NavGroup, NavGroupProps, NavItem, NavItemAsChildProps, NavItemProps, NavItemVariant, NavLink, NavLinkProps, NavToggle, NavToggleProps, Navbar, NavbarProps, SHELL_A11Y_CONTRACT, Shell, ShellA11yContract, ShellAsChildProps, ShellDivProps, ShellMain, ShellMainAsChildProps, ShellMainDivProps, ShellMainMainProps, ShellMainProps, ShellNav, ShellNavAsChildProps, ShellNavDivProps, ShellNavProps, ShellOwnProps, ShellProps, ShellVariant, Sidebar, SidebarPanel, SidebarPanelProps, SidebarProps, SidebarToggle, SidebarToggleProps };
16
+ export { type CollapseBreakpoint, type CollapseIconPlacement, type Collapsible, HEADER_A11Y_CONTRACT, Header, type HeaderA11yContract, type HeaderPosition, type HeaderProps, NavBrand, type NavBrandProps, NavGroup, type NavGroupProps, NavItem, type NavItemAsChildProps, type NavItemProps, type NavItemVariant, NavLink, type NavLinkProps, NavToggle, type NavToggleProps, Navbar, type NavbarProps, SHELL_A11Y_CONTRACT, Shell, type ShellA11yContract, type ShellAsChildProps, type ShellDivProps, ShellMain, type ShellMainAsChildProps, type ShellMainDivProps, type ShellMainMainProps, type ShellMainProps, ShellNav, type ShellNavAsChildProps, type ShellNavDivProps, type ShellNavProps, type ShellOwnProps, type ShellProps, type ShellVariant, Sidebar, SidebarPanel, type SidebarPanelProps, type SidebarProps, SidebarToggle, type SidebarToggleProps };
@@ -13,4 +13,4 @@ import { SEPARATOR_A11Y_CONTRACT, SeparatorA11yContract } from "./components/sep
13
13
  import { SkeletonAsChildProps, SkeletonOwnProps, SkeletonProps } from "./components/skeleton/skeleton.types.js";
14
14
  import { Skeleton } from "./components/skeleton/skeleton.js";
15
15
  import { SKELETON_A11Y_CONTRACT, SkeletonA11yContract } from "./components/skeleton/skeleton.a11y.js";
16
- export { Alert, AlertHeadingTag, AlertProps, AlertVariant, BADGE_A11Y_CONTRACT, Badge, BadgeA11yContract, BadgeAsChildProps, BadgeOwnProps, BadgeProps, Card, CardActions, CardActionsProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardPadding, CardProps, CardTitle, CardTitleProps, CardVariant, Separator as Divider, SeparatorAsChildProps as DividerAsChildProps, SeparatorNativeProps as DividerNativeProps, SeparatorOwnProps as DividerOwnProps, SeparatorProps as DividerProps, ListGroup, ListGroupItem, ListGroupItemAsChildProps, ListGroupItemProps, ListGroupOrientation, ListGroupProps, SEPARATOR_A11Y_CONTRACT, SKELETON_A11Y_CONTRACT, Separator, SeparatorA11yContract, SeparatorAsChildProps, SeparatorNativeProps, SeparatorOwnProps, SeparatorProps, Skeleton, SkeletonA11yContract, SkeletonAsChildProps, SkeletonOwnProps, SkeletonProps };
16
+ export { Alert, type AlertHeadingTag, type AlertProps, type AlertVariant, type BADGE_A11Y_CONTRACT, Badge, type BadgeA11yContract, type BadgeAsChildProps, type BadgeOwnProps, type BadgeProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, CardTitle, type CardTitleProps, type CardVariant, Separator as Divider, type SeparatorAsChildProps as DividerAsChildProps, type SeparatorNativeProps as DividerNativeProps, type SeparatorOwnProps as DividerOwnProps, type SeparatorProps as DividerProps, ListGroup, ListGroupItem, type ListGroupItemAsChildProps, type ListGroupItemProps, type ListGroupOrientation, type ListGroupProps, SEPARATOR_A11Y_CONTRACT, type SKELETON_A11Y_CONTRACT, Separator, type SeparatorA11yContract, type SeparatorAsChildProps, type SeparatorNativeProps, type SeparatorOwnProps, type SeparatorProps, Skeleton, type SkeletonA11yContract, type SkeletonAsChildProps, type SkeletonOwnProps, type SkeletonProps };
@@ -595,142 +595,6 @@
595
595
  speak: none;
596
596
  }
597
597
 
598
- :where(.text-muted) {
599
- color: var(--ak-color-text-muted);
600
- }
601
-
602
- :where(.text-bold) {
603
- font-weight: var(--ak-font-weight-bold);
604
- }
605
-
606
- :where(.sr-only) {
607
- clip: rect(0, 0, 0, 0);
608
- white-space: nowrap;
609
- border: 0;
610
- width: 1px;
611
- height: 1px;
612
- margin: -1px;
613
- padding: 0;
614
- position: absolute;
615
- overflow: hidden;
616
- }
617
-
618
- :where(.gap-1, [data-slot="flex"][data-gap="initial:1"], [data-slot="block"][data-gap="initial:1"], [data-slot="shell"][data-gap="initial:1"]) {
619
- gap: var(--ak-space-1);
620
- }
621
-
622
- :where(.gap-2, [data-slot="flex"][data-gap="initial:2"], [data-slot="block"][data-gap="initial:2"], [data-slot="shell"][data-gap="initial:2"]) {
623
- gap: var(--ak-space-2);
624
- }
625
-
626
- :where(.gap-3, [data-slot="flex"][data-gap="initial:3"], [data-slot="block"][data-gap="initial:3"], [data-slot="shell"][data-gap="initial:3"]) {
627
- gap: var(--ak-space-3);
628
- }
629
-
630
- :where(.gap-4, [data-slot="flex"][data-gap="initial:4"], [data-slot="block"][data-gap="initial:4"], [data-slot="shell"][data-gap="initial:4"]) {
631
- gap: var(--ak-space-4);
632
- }
633
-
634
- :where(.gap-xs, [data-slot="flex"][data-gap="initial:xs"], [data-slot="block"][data-gap="initial:xs"], [data-slot="shell"][data-gap="initial:xs"]) {
635
- gap: var(--ak-space-xs);
636
- }
637
-
638
- :where(.gap-sm, [data-slot="flex"][data-gap="initial:sm"], [data-slot="block"][data-gap="initial:sm"], [data-slot="shell"][data-gap="initial:sm"]) {
639
- gap: var(--ak-space-sm);
640
- }
641
-
642
- :where(.gap-md, [data-slot="flex"][data-gap="initial:md"], [data-slot="block"][data-gap="initial:md"], [data-slot="shell"][data-gap="initial:md"]) {
643
- gap: var(--ak-space-md);
644
- }
645
-
646
- :where(.gap-lg, [data-slot="flex"][data-gap="initial:lg"], [data-slot="block"][data-gap="initial:lg"], [data-slot="shell"][data-gap="initial:lg"]) {
647
- gap: var(--ak-space-lg);
648
- }
649
-
650
- :where(.gap-xl, [data-slot="flex"][data-gap="initial:xl"], [data-slot="block"][data-gap="initial:xl"], [data-slot="shell"][data-gap="initial:xl"]) {
651
- gap: var(--ak-space-xl);
652
- }
653
-
654
- :where(.gap-x-sm, [data-slot="flex"][data-gap-x="initial:sm"], [data-slot="block"][data-gap-x="initial:sm"]) {
655
- column-gap: var(--ak-space-sm);
656
- }
657
-
658
- :where(.gap-x-md, [data-slot="flex"][data-gap-x="initial:md"], [data-slot="block"][data-gap-x="initial:md"]) {
659
- column-gap: var(--ak-space-md);
660
- }
661
-
662
- :where(.gap-x-lg, [data-slot="flex"][data-gap-x="initial:lg"], [data-slot="block"][data-gap-x="initial:lg"]) {
663
- column-gap: var(--ak-space-lg);
664
- }
665
-
666
- :where(.gap-y-sm, [data-slot="flex"][data-gap-y="initial:sm"], [data-slot="block"][data-gap-y="initial:sm"]) {
667
- row-gap: var(--ak-space-sm);
668
- }
669
-
670
- :where(.gap-y-md, [data-slot="flex"][data-gap-y="initial:md"], [data-slot="block"][data-gap-y="initial:md"]) {
671
- row-gap: var(--ak-space-md);
672
- }
673
-
674
- :where(.gap-y-lg, [data-slot="flex"][data-gap-y="initial:lg"], [data-slot="block"][data-gap-y="initial:lg"]) {
675
- row-gap: var(--ak-space-lg);
676
- }
677
-
678
- :where(.flex-col, [data-slot="flex"][data-direction="initial:column"]) {
679
- flex-direction: column;
680
- }
681
-
682
- :where(.flex-row-reverse, [data-slot="flex"][data-direction="initial:row-reverse"]) {
683
- flex-direction: row-reverse;
684
- }
685
-
686
- :where(.flex-col-reverse, [data-slot="flex"][data-direction="initial:column-reverse"]) {
687
- flex-direction: column-reverse;
688
- }
689
-
690
- :where(.items-start, [data-slot="flex"][data-align="initial:start"], [data-slot="block"][data-align="initial:start"]) {
691
- align-items: flex-start;
692
- }
693
-
694
- :where(.items-end, [data-slot="flex"][data-align="initial:end"], [data-slot="block"][data-align="initial:end"]) {
695
- align-items: flex-end;
696
- }
697
-
698
- :where(.items-center, [data-slot="flex"][data-align="initial:center"], [data-slot="block"][data-align="initial:center"]) {
699
- align-items: center;
700
- }
701
-
702
- :where(.items-stretch, [data-slot="flex"][data-align="initial:stretch"], [data-slot="block"][data-align="initial:stretch"]) {
703
- align-items: stretch;
704
- }
705
-
706
- :where(.items-baseline, [data-slot="flex"][data-align="initial:baseline"], [data-slot="block"][data-align="initial:baseline"]) {
707
- align-items: baseline;
708
- }
709
-
710
- :where(.justify-start, [data-slot="flex"][data-justify="initial:start"], [data-slot="block"][data-justify="initial:start"]) {
711
- justify-content: flex-start;
712
- }
713
-
714
- :where(.justify-end, [data-slot="flex"][data-justify="initial:end"], [data-slot="block"][data-justify="initial:end"]) {
715
- justify-content: flex-end;
716
- }
717
-
718
- :where(.justify-center, [data-slot="flex"][data-justify="initial:center"], [data-slot="block"][data-justify="initial:center"]) {
719
- justify-content: center;
720
- }
721
-
722
- :where(.justify-between, [data-slot="flex"][data-justify="initial:between"], [data-slot="block"][data-justify="initial:between"]) {
723
- justify-content: space-between;
724
- }
725
-
726
- :where(.flex-nowrap, [data-slot="flex"][data-wrap="initial:nowrap"]) {
727
- flex-wrap: nowrap;
728
- }
729
-
730
- :where(.flex-wrap-reverse, [data-slot="flex"][data-wrap="initial:wrap-reverse"]) {
731
- flex-wrap: wrap-reverse;
732
- }
733
-
734
598
  :where([data-ak-layout="true"]) {
735
599
  display: var(--ak-display-initial);
736
600
  margin: var(--ak-m-initial);
@@ -1321,6 +1185,142 @@
1321
1185
  }
1322
1186
  }
1323
1187
 
1188
+ :where(.text-muted) {
1189
+ color: var(--ak-color-text-muted);
1190
+ }
1191
+
1192
+ :where(.text-bold) {
1193
+ font-weight: var(--ak-font-weight-bold);
1194
+ }
1195
+
1196
+ :where(.sr-only) {
1197
+ clip: rect(0, 0, 0, 0);
1198
+ white-space: nowrap;
1199
+ border: 0;
1200
+ width: 1px;
1201
+ height: 1px;
1202
+ margin: -1px;
1203
+ padding: 0;
1204
+ position: absolute;
1205
+ overflow: hidden;
1206
+ }
1207
+
1208
+ :where(.gap-1, [data-slot="flex"][data-gap="initial:1"], [data-slot="block"][data-gap="initial:1"], [data-slot="shell"][data-gap="initial:1"]) {
1209
+ gap: var(--ak-space-1);
1210
+ }
1211
+
1212
+ :where(.gap-2, [data-slot="flex"][data-gap="initial:2"], [data-slot="block"][data-gap="initial:2"], [data-slot="shell"][data-gap="initial:2"]) {
1213
+ gap: var(--ak-space-2);
1214
+ }
1215
+
1216
+ :where(.gap-3, [data-slot="flex"][data-gap="initial:3"], [data-slot="block"][data-gap="initial:3"], [data-slot="shell"][data-gap="initial:3"]) {
1217
+ gap: var(--ak-space-3);
1218
+ }
1219
+
1220
+ :where(.gap-4, [data-slot="flex"][data-gap="initial:4"], [data-slot="block"][data-gap="initial:4"], [data-slot="shell"][data-gap="initial:4"]) {
1221
+ gap: var(--ak-space-4);
1222
+ }
1223
+
1224
+ :where(.gap-xs, [data-slot="flex"][data-gap="initial:xs"], [data-slot="block"][data-gap="initial:xs"], [data-slot="shell"][data-gap="initial:xs"]) {
1225
+ gap: var(--ak-space-xs);
1226
+ }
1227
+
1228
+ :where(.gap-sm, [data-slot="flex"][data-gap="initial:sm"], [data-slot="block"][data-gap="initial:sm"], [data-slot="shell"][data-gap="initial:sm"]) {
1229
+ gap: var(--ak-space-sm);
1230
+ }
1231
+
1232
+ :where(.gap-md, [data-slot="flex"][data-gap="initial:md"], [data-slot="block"][data-gap="initial:md"], [data-slot="shell"][data-gap="initial:md"]) {
1233
+ gap: var(--ak-space-md);
1234
+ }
1235
+
1236
+ :where(.gap-lg, [data-slot="flex"][data-gap="initial:lg"], [data-slot="block"][data-gap="initial:lg"], [data-slot="shell"][data-gap="initial:lg"]) {
1237
+ gap: var(--ak-space-lg);
1238
+ }
1239
+
1240
+ :where(.gap-xl, [data-slot="flex"][data-gap="initial:xl"], [data-slot="block"][data-gap="initial:xl"], [data-slot="shell"][data-gap="initial:xl"]) {
1241
+ gap: var(--ak-space-xl);
1242
+ }
1243
+
1244
+ :where(.gap-x-sm, [data-slot="flex"][data-gap-x="initial:sm"], [data-slot="block"][data-gap-x="initial:sm"]) {
1245
+ column-gap: var(--ak-space-sm);
1246
+ }
1247
+
1248
+ :where(.gap-x-md, [data-slot="flex"][data-gap-x="initial:md"], [data-slot="block"][data-gap-x="initial:md"]) {
1249
+ column-gap: var(--ak-space-md);
1250
+ }
1251
+
1252
+ :where(.gap-x-lg, [data-slot="flex"][data-gap-x="initial:lg"], [data-slot="block"][data-gap-x="initial:lg"]) {
1253
+ column-gap: var(--ak-space-lg);
1254
+ }
1255
+
1256
+ :where(.gap-y-sm, [data-slot="flex"][data-gap-y="initial:sm"], [data-slot="block"][data-gap-y="initial:sm"]) {
1257
+ row-gap: var(--ak-space-sm);
1258
+ }
1259
+
1260
+ :where(.gap-y-md, [data-slot="flex"][data-gap-y="initial:md"], [data-slot="block"][data-gap-y="initial:md"]) {
1261
+ row-gap: var(--ak-space-md);
1262
+ }
1263
+
1264
+ :where(.gap-y-lg, [data-slot="flex"][data-gap-y="initial:lg"], [data-slot="block"][data-gap-y="initial:lg"]) {
1265
+ row-gap: var(--ak-space-lg);
1266
+ }
1267
+
1268
+ :where(.flex-col, [data-slot="flex"][data-direction="initial:column"], [data-slot="inline"][data-direction="initial:column"]) {
1269
+ flex-direction: column;
1270
+ }
1271
+
1272
+ :where(.flex-row-reverse, [data-slot="flex"][data-direction="initial:row-reverse"], [data-slot="inline"][data-direction="initial:row-reverse"]) {
1273
+ flex-direction: row-reverse;
1274
+ }
1275
+
1276
+ :where(.flex-col-reverse, [data-slot="flex"][data-direction="initial:column-reverse"], [data-slot="inline"][data-direction="initial:column-reverse"]) {
1277
+ flex-direction: column-reverse;
1278
+ }
1279
+
1280
+ :where(.items-start, [data-slot="flex"][data-align="initial:start"], [data-slot="inline"][data-align="initial:start"], [data-slot="block"][data-align="initial:start"]) {
1281
+ align-items: flex-start;
1282
+ }
1283
+
1284
+ :where(.items-end, [data-slot="flex"][data-align="initial:end"], [data-slot="inline"][data-align="initial:end"], [data-slot="block"][data-align="initial:end"]) {
1285
+ align-items: flex-end;
1286
+ }
1287
+
1288
+ :where(.items-center, [data-slot="flex"][data-align="initial:center"], [data-slot="inline"][data-align="initial:center"], [data-slot="block"][data-align="initial:center"]) {
1289
+ align-items: center;
1290
+ }
1291
+
1292
+ :where(.items-stretch, [data-slot="flex"][data-align="initial:stretch"], [data-slot="inline"][data-align="initial:stretch"], [data-slot="block"][data-align="initial:stretch"]) {
1293
+ align-items: stretch;
1294
+ }
1295
+
1296
+ :where(.items-baseline, [data-slot="flex"][data-align="initial:baseline"], [data-slot="inline"][data-align="initial:baseline"], [data-slot="block"][data-align="initial:baseline"]) {
1297
+ align-items: baseline;
1298
+ }
1299
+
1300
+ :where(.justify-start, [data-slot="flex"][data-justify="initial:start"], [data-slot="inline"][data-justify="initial:start"], [data-slot="block"][data-justify="initial:start"]) {
1301
+ justify-content: flex-start;
1302
+ }
1303
+
1304
+ :where(.justify-end, [data-slot="flex"][data-justify="initial:end"], [data-slot="inline"][data-justify="initial:end"], [data-slot="block"][data-justify="initial:end"]) {
1305
+ justify-content: flex-end;
1306
+ }
1307
+
1308
+ :where(.justify-center, [data-slot="flex"][data-justify="initial:center"], [data-slot="inline"][data-justify="initial:center"], [data-slot="block"][data-justify="initial:center"]) {
1309
+ justify-content: center;
1310
+ }
1311
+
1312
+ :where(.justify-between, [data-slot="flex"][data-justify="initial:between"], [data-slot="inline"][data-justify="initial:between"], [data-slot="block"][data-justify="initial:between"]) {
1313
+ justify-content: space-between;
1314
+ }
1315
+
1316
+ :where(.flex-nowrap, [data-slot="flex"][data-wrap="initial:nowrap"], [data-slot="inline"][data-wrap="initial:nowrap"]) {
1317
+ flex-wrap: nowrap;
1318
+ }
1319
+
1320
+ :where(.flex-wrap-reverse, [data-slot="flex"][data-wrap="initial:wrap-reverse"], [data-slot="inline"][data-wrap="initial:wrap-reverse"]) {
1321
+ flex-wrap: wrap-reverse;
1322
+ }
1323
+
1324
1324
  :where([data-slot="block"]) {
1325
1325
  display: grid;
1326
1326
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askrjs/themes",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Default theme tokens, styles, and themed layout wrappers for Askr apps.",
5
5
  "keywords": [
6
6
  "askr",
@@ -129,26 +129,27 @@
129
129
  "bench:tier2": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier2.config.ts",
130
130
  "bench:tier3": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier3.config.ts",
131
131
  "bench:tier4": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier4.config.ts",
132
- "test": "npm run test:unit && npm run test:jsdom && npm run test:browser",
132
+ "test": "npm run test:unit && npm run test:checks && npm run test:jsdom && npm run test:browser",
133
133
  "test:unit": "vp test run -c vitest.test.unit.config.ts",
134
134
  "test:jsdom": "cross-env NODE_ENV=production vp test run -c vitest.test.jsdom.config.ts",
135
135
  "test:browser": "vp test run -c vitest.test.browser.config.ts --mode production",
136
136
  "fmt": "vp fmt .",
137
137
  "lint": "vp lint .",
138
138
  "build": "vp pack",
139
- "prepublishOnly": "npm run build"
139
+ "prepublishOnly": "npm run build",
140
+ "test:checks": "vp test run -c vitest.test.checks.config.ts"
140
141
  },
141
142
  "devDependencies": {
142
- "@askrjs/askr": "^0.0.39",
143
- "@askrjs/ui": "^0.0.7",
144
- "@askrjs/vite": "^0.0.2",
145
- "@tsdown/css": "0.22.0",
146
- "@types/node": "^25.9.1",
143
+ "@askrjs/askr": ">=0.0.1 <0.1.0",
144
+ "@askrjs/ui": ">=0.0.1 <0.1.0",
145
+ "@askrjs/vite": ">=0.0.2 <0.1.0",
146
+ "@tsdown/css": "0.22.2",
147
+ "@types/node": "^25.9.2",
147
148
  "cross-env": "^10.1.0",
148
149
  "jsdom": "^29.1.1",
149
150
  "playwright": "^1.60.0",
150
151
  "typescript": "^6.0.3",
151
- "vite-plus": "^0.1.22"
152
+ "vite-plus": "^0.1.24"
152
153
  },
153
154
  "peerDependencies": {
154
155
  "@askrjs/askr": ">=0.0.1 <0.1.0",
@@ -157,5 +158,5 @@
157
158
  "engines": {
158
159
  "node": ">=18"
159
160
  },
160
- "packageManager": "npm@11.15.0"
161
+ "packageManager": "npm@11.16.0"
161
162
  }
@@ -1,4 +1,5 @@
1
1
  import { defineContext, readContext, state } from "@askrjs/askr";
2
+ import type { JSXElement } from "@askrjs/askr/foundations/structures";
2
3
  import { resource } from "@askrjs/askr/resources";
3
4
  import { Button } from "@askrjs/ui";
4
5
  import type { ButtonNativeProps, PressEvent } from "@askrjs/ui";
@@ -186,8 +187,9 @@ export function ThemeToggle(props: ThemeToggleProps): JSX.Element {
186
187
  darkIcon,
187
188
  systemIcon,
188
189
  });
190
+ const renderedIcon = cloneThemeToggleIcon(themedIcon);
189
191
  const content =
190
- typeof children === "function" ? children(renderContext) : (children ?? themedIcon);
192
+ typeof children === "function" ? children(renderContext) : (children ?? renderedIcon);
191
193
 
192
194
  return (
193
195
  <Button
@@ -230,6 +232,25 @@ export function resolveThemeToggleIcon(
230
232
  return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);
231
233
  }
232
234
 
235
+ function isJSXElement(value: unknown): value is JSXElement {
236
+ return (
237
+ typeof value === "object" &&
238
+ value !== null &&
239
+ "$$typeof" in value &&
240
+ "type" in value &&
241
+ "props" in value
242
+ );
243
+ }
244
+
245
+ function cloneThemeToggleIcon(icon: unknown): unknown {
246
+ if (!isJSXElement(icon)) return icon;
247
+
248
+ return {
249
+ ...icon,
250
+ props: { ...(icon.props as Record<string, unknown> | undefined) },
251
+ };
252
+ }
253
+
233
254
  function syncThemeRoot(themeChoice: ThemeName | null | undefined): void {
234
255
  if (typeof document === "undefined") {
235
256
  return;
@@ -2,9 +2,9 @@
2
2
  @import "./styles/base/reset.css";
3
3
  @import "./styles/base/typography.css";
4
4
  @import "./styles/base/icon.css";
5
- @import "./styles/base/utilities.css";
6
5
  @import "./styles/layout/layout.css";
7
6
  @import "./styles/layout/responsive-layout.css";
7
+ @import "./styles/base/utilities.css";
8
8
  @import "./styles/layout/block.css";
9
9
  @import "./styles/layout/patterns.css";
10
10
  @import "./styles/layout/aspect-ratio.css";
@@ -147,21 +147,34 @@
147
147
  row-gap: var(--ak-space-lg);
148
148
  }
149
149
 
150
- :where(.flex-col, [data-slot="flex"][data-direction="initial:column"]) {
150
+ :where(
151
+ .flex-col,
152
+ [data-slot="flex"][data-direction="initial:column"],
153
+ [data-slot="inline"][data-direction="initial:column"]
154
+ ) {
151
155
  flex-direction: column;
152
156
  }
153
157
 
154
- :where(.flex-row-reverse, [data-slot="flex"][data-direction="initial:row-reverse"]) {
158
+ :where(
159
+ .flex-row-reverse,
160
+ [data-slot="flex"][data-direction="initial:row-reverse"],
161
+ [data-slot="inline"][data-direction="initial:row-reverse"]
162
+ ) {
155
163
  flex-direction: row-reverse;
156
164
  }
157
165
 
158
- :where(.flex-col-reverse, [data-slot="flex"][data-direction="initial:column-reverse"]) {
166
+ :where(
167
+ .flex-col-reverse,
168
+ [data-slot="flex"][data-direction="initial:column-reverse"],
169
+ [data-slot="inline"][data-direction="initial:column-reverse"]
170
+ ) {
159
171
  flex-direction: column-reverse;
160
172
  }
161
173
 
162
174
  :where(
163
175
  .items-start,
164
176
  [data-slot="flex"][data-align="initial:start"],
177
+ [data-slot="inline"][data-align="initial:start"],
165
178
  [data-slot="block"][data-align="initial:start"]
166
179
  ) {
167
180
  align-items: flex-start;
@@ -170,6 +183,7 @@
170
183
  :where(
171
184
  .items-end,
172
185
  [data-slot="flex"][data-align="initial:end"],
186
+ [data-slot="inline"][data-align="initial:end"],
173
187
  [data-slot="block"][data-align="initial:end"]
174
188
  ) {
175
189
  align-items: flex-end;
@@ -178,6 +192,7 @@
178
192
  :where(
179
193
  .items-center,
180
194
  [data-slot="flex"][data-align="initial:center"],
195
+ [data-slot="inline"][data-align="initial:center"],
181
196
  [data-slot="block"][data-align="initial:center"]
182
197
  ) {
183
198
  align-items: center;
@@ -186,6 +201,7 @@
186
201
  :where(
187
202
  .items-stretch,
188
203
  [data-slot="flex"][data-align="initial:stretch"],
204
+ [data-slot="inline"][data-align="initial:stretch"],
189
205
  [data-slot="block"][data-align="initial:stretch"]
190
206
  ) {
191
207
  align-items: stretch;
@@ -194,6 +210,7 @@
194
210
  :where(
195
211
  .items-baseline,
196
212
  [data-slot="flex"][data-align="initial:baseline"],
213
+ [data-slot="inline"][data-align="initial:baseline"],
197
214
  [data-slot="block"][data-align="initial:baseline"]
198
215
  ) {
199
216
  align-items: baseline;
@@ -202,6 +219,7 @@
202
219
  :where(
203
220
  .justify-start,
204
221
  [data-slot="flex"][data-justify="initial:start"],
222
+ [data-slot="inline"][data-justify="initial:start"],
205
223
  [data-slot="block"][data-justify="initial:start"]
206
224
  ) {
207
225
  justify-content: flex-start;
@@ -210,6 +228,7 @@
210
228
  :where(
211
229
  .justify-end,
212
230
  [data-slot="flex"][data-justify="initial:end"],
231
+ [data-slot="inline"][data-justify="initial:end"],
213
232
  [data-slot="block"][data-justify="initial:end"]
214
233
  ) {
215
234
  justify-content: flex-end;
@@ -218,6 +237,7 @@
218
237
  :where(
219
238
  .justify-center,
220
239
  [data-slot="flex"][data-justify="initial:center"],
240
+ [data-slot="inline"][data-justify="initial:center"],
221
241
  [data-slot="block"][data-justify="initial:center"]
222
242
  ) {
223
243
  justify-content: center;
@@ -226,15 +246,24 @@
226
246
  :where(
227
247
  .justify-between,
228
248
  [data-slot="flex"][data-justify="initial:between"],
249
+ [data-slot="inline"][data-justify="initial:between"],
229
250
  [data-slot="block"][data-justify="initial:between"]
230
251
  ) {
231
252
  justify-content: space-between;
232
253
  }
233
254
 
234
- :where(.flex-nowrap, [data-slot="flex"][data-wrap="initial:nowrap"]) {
255
+ :where(
256
+ .flex-nowrap,
257
+ [data-slot="flex"][data-wrap="initial:nowrap"],
258
+ [data-slot="inline"][data-wrap="initial:nowrap"]
259
+ ) {
235
260
  flex-wrap: nowrap;
236
261
  }
237
262
 
238
- :where(.flex-wrap-reverse, [data-slot="flex"][data-wrap="initial:wrap-reverse"]) {
263
+ :where(
264
+ .flex-wrap-reverse,
265
+ [data-slot="flex"][data-wrap="initial:wrap-reverse"],
266
+ [data-slot="inline"][data-wrap="initial:wrap-reverse"]
267
+ ) {
239
268
  flex-wrap: wrap-reverse;
240
269
  }
@@ -2,9 +2,9 @@
2
2
  @import "./styles/base/reset.css";
3
3
  @import "./styles/base/typography.css";
4
4
  @import "./styles/base/icon.css";
5
- @import "./styles/base/utilities.css";
6
5
  @import "./styles/layout/layout.css";
7
6
  @import "./styles/layout/responsive-layout.css";
7
+ @import "./styles/base/utilities.css";
8
8
  @import "./styles/layout/block.css";
9
9
  @import "./styles/layout/patterns.css";
10
10
  @import "./styles/layout/aspect-ratio.css";