@shohojdhara/atomix 0.3.5 → 0.3.6
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.
- package/README.md +101 -199
- package/atomix.config.ts +241 -0
- package/dist/atomix.css +260 -179
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +250 -179
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.js +61 -66
- package/dist/charts.js.map +1 -1
- package/dist/core.js +47 -31
- package/dist/core.js.map +1 -1
- package/dist/forms.js +47 -31
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +47 -31
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +1841 -1633
- package/dist/index.esm.js +4975 -4113
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5151 -4290
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/theme.d.ts +1572 -1442
- package/dist/theme.js +4816 -4080
- package/dist/theme.js.map +1 -1
- package/package.json +6 -20
- package/src/components/Accordion/Accordion.stories.tsx +50 -17
- package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
- package/src/components/Avatar/Avatar.stories.tsx +7 -0
- package/src/components/Badge/Badge.stories.tsx +91 -13
- package/src/components/Block/Block.stories.tsx +7 -23
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
- package/src/components/Button/Button.stories.tsx +141 -22
- package/src/components/Button/ButtonGroup.stories.tsx +315 -0
- package/src/components/Button/ButtonGroup.tsx +67 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Callout/Callout.stories.tsx +8 -6
- package/src/components/Card/Card.stories.tsx +82 -28
- package/src/components/Chart/AnimatedChart.tsx +0 -1
- package/src/components/Chart/AreaChart.tsx +0 -1
- package/src/components/Chart/BarChart.tsx +0 -1
- package/src/components/Chart/BubbleChart.tsx +0 -1
- package/src/components/Chart/CandlestickChart.tsx +0 -1
- package/src/components/Chart/Chart.stories.tsx +5 -7
- package/src/components/Chart/Chart.tsx +0 -16
- package/src/components/Chart/ChartRenderer.tsx +1 -1
- package/src/components/Chart/DonutChart.tsx +0 -1
- package/src/components/Chart/FunnelChart.tsx +0 -1
- package/src/components/Chart/GaugeChart.tsx +0 -1
- package/src/components/Chart/HeatmapChart.tsx +0 -1
- package/src/components/Chart/LineChart.tsx +0 -1
- package/src/components/Chart/MultiAxisChart.tsx +0 -1
- package/src/components/Chart/PieChart.tsx +0 -1
- package/src/components/Chart/RadarChart.tsx +0 -1
- package/src/components/Chart/ScatterChart.tsx +0 -1
- package/src/components/Chart/WaterfallChart.tsx +0 -1
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
- package/src/components/DataTable/DataTable.stories.tsx +23 -16
- package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
- package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
- package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
- package/src/components/Footer/Footer.stories.tsx +8 -6
- package/src/components/Footer/FooterLink.tsx +9 -2
- package/src/components/Form/Checkbox.stories.tsx +7 -0
- package/src/components/Form/Form.stories.tsx +7 -0
- package/src/components/Form/FormGroup.stories.tsx +9 -1
- package/src/components/Form/Input.stories.tsx +69 -16
- package/src/components/Form/Radio.stories.tsx +9 -1
- package/src/components/Form/Select.stories.tsx +9 -1
- package/src/components/Form/Textarea.stories.tsx +10 -2
- package/src/components/Hero/Hero.stories.tsx +7 -0
- package/src/components/List/List.stories.tsx +7 -0
- package/src/components/Messages/Messages.stories.tsx +8 -7
- package/src/components/Modal/Modal.stories.tsx +17 -6
- package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
- package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
- package/src/components/Pagination/Pagination.stories.tsx +188 -111
- package/src/components/Pagination/Pagination.tsx +83 -3
- package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
- package/src/components/Popover/Popover.stories.tsx +191 -115
- package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
- package/src/components/Progress/Progress.stories.tsx +79 -49
- package/src/components/Rating/Rating.stories.tsx +109 -84
- package/src/components/River/River.stories.tsx +194 -114
- package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
- package/src/components/Slider/Slider.stories.tsx +7 -0
- package/src/components/Spinner/Spinner.stories.tsx +15 -11
- package/src/components/Steps/Steps.stories.tsx +132 -98
- package/src/components/Tabs/Tabs.stories.tsx +163 -112
- package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
- package/src/components/Todo/Todo.stories.tsx +38 -12
- package/src/components/Toggle/Toggle.stories.tsx +61 -28
- package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
- package/src/components/Upload/Upload.stories.tsx +122 -84
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
- package/src/components/index.ts +1 -0
- package/src/lib/composables/useAtomixGlass.ts +2 -3
- package/src/lib/composables/useNavbar.ts +0 -10
- package/src/lib/config/loader.ts +2 -1
- package/src/lib/constants/components.ts +10 -0
- package/src/lib/hooks/useComponentCustomization.ts +1 -1
- package/src/lib/theme/README.md +174 -0
- package/src/lib/theme/adapters/index.ts +31 -0
- package/src/lib/theme/adapters/themeAdapter.ts +287 -0
- package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
- package/src/lib/theme/config/configLoader.ts +254 -0
- package/src/lib/theme/config/loader.ts +37 -48
- package/src/lib/theme/config/types.ts +2 -2
- package/src/lib/theme/config/validator.ts +15 -91
- package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
- package/src/lib/theme/constants/index.ts +8 -0
- package/src/lib/theme/core/ThemeRegistry.ts +19 -6
- package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
- package/src/lib/theme/core/composeTheme.ts +155 -0
- package/src/lib/theme/core/createTheme.ts +94 -0
- package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
- package/src/lib/theme/core/index.ts +5 -19
- package/src/lib/theme/devtools/Comparator.tsx +346 -22
- package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
- package/src/lib/theme/devtools/Inspector.tsx +335 -51
- package/src/lib/theme/devtools/LiveEditor.tsx +478 -107
- package/src/lib/theme/devtools/Preview.tsx +471 -221
- package/src/lib/theme/{core → devtools}/ThemeValidator.ts +1 -1
- package/src/lib/theme/devtools/index.ts +14 -4
- package/src/lib/theme/devtools/useHistory.ts +130 -0
- package/src/lib/theme/errors/index.ts +12 -0
- package/src/lib/theme/generators/cssFile.ts +79 -0
- package/src/lib/theme/generators/generateCSS.ts +89 -0
- package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +3 -13
- package/src/lib/theme/generators/index.ts +19 -0
- package/src/lib/theme/i18n/rtl.ts +5 -6
- package/src/lib/theme/index.ts +120 -15
- package/src/lib/theme/runtime/ThemeApplicator.ts +52 -111
- package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +1 -1
- package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
- package/src/lib/theme/runtime/index.ts +1 -2
- package/src/lib/theme/runtime/useTheme.ts +1 -2
- package/src/lib/theme/test/testTheme.ts +385 -0
- package/src/lib/theme/tokens/index.ts +12 -0
- package/src/lib/theme/tokens/tokens.ts +721 -0
- package/src/lib/theme/types.ts +6 -42
- package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
- package/src/lib/theme/utils/index.ts +11 -0
- package/src/lib/theme/utils/injectCSS.ts +90 -0
- package/src/lib/theme/utils/themeHelpers.ts +78 -0
- package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
- package/src/lib/theme-tools.ts +7 -8
- package/src/lib/types/components.ts +40 -130
- package/src/lib/utils/componentUtils.ts +1 -1
- package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
- package/src/styles/02-tools/_tools.button.scss +66 -79
- package/src/styles/06-components/_components.atomix-glass.scss +13 -3
- package/src/styles/06-components/_components.pagination.scss +88 -0
- package/scripts/sync-theme-config.js +0 -309
- package/src/lib/theme/composeTheme.ts +0 -370
- package/src/lib/theme/core/ThemeCache.ts +0 -283
- package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
- package/src/lib/theme/core/ThemeEngine.ts +0 -665
- package/src/lib/theme/createThemeFromConfig.ts +0 -132
- package/src/lib/theme/devtools/CLI.ts +0 -364
- package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
- package/src/lib/theme/runtime/ThemeManager.ts +0 -446
- package/src/styles/03-generic/_generated-root.css +0 -26
- package/src/themes/README.md +0 -442
- package/src/themes/themes.config.js +0 -68
- /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
- /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1627,6 +1627,31 @@ interface ButtonProps extends BaseComponentProps {
|
|
|
1627
1627
|
*/
|
|
1628
1628
|
style?: React.CSSProperties;
|
|
1629
1629
|
}
|
|
1630
|
+
/**
|
|
1631
|
+
* ButtonGroup component properties
|
|
1632
|
+
*/
|
|
1633
|
+
interface ButtonGroupProps extends BaseComponentProps {
|
|
1634
|
+
/**
|
|
1635
|
+
* ButtonGroup children (should be Button components)
|
|
1636
|
+
*/
|
|
1637
|
+
children?: ReactNode;
|
|
1638
|
+
/**
|
|
1639
|
+
* Additional CSS class names
|
|
1640
|
+
*/
|
|
1641
|
+
className?: string;
|
|
1642
|
+
/**
|
|
1643
|
+
* Inline style for the component root element
|
|
1644
|
+
*/
|
|
1645
|
+
style?: React.CSSProperties;
|
|
1646
|
+
/**
|
|
1647
|
+
* ARIA label for accessibility
|
|
1648
|
+
*/
|
|
1649
|
+
'aria-label'?: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* ARIA role for the button group
|
|
1652
|
+
*/
|
|
1653
|
+
role?: string;
|
|
1654
|
+
}
|
|
1630
1655
|
/**
|
|
1631
1656
|
* Badge component properties
|
|
1632
1657
|
*/
|
|
@@ -1689,52 +1714,6 @@ interface BadgeProps extends BaseComponentProps {
|
|
|
1689
1714
|
label?: SlotProps<BadgeLabelSlotProps>;
|
|
1690
1715
|
};
|
|
1691
1716
|
}
|
|
1692
|
-
/**
|
|
1693
|
-
* Block component properties (legacy - use BlockProps from component instead)
|
|
1694
|
-
* @deprecated Use BlockProps from '@atomix/components/Block' instead
|
|
1695
|
-
*/
|
|
1696
|
-
interface LegacyBlockProps extends BaseComponentProps {
|
|
1697
|
-
/**
|
|
1698
|
-
* The content to be rendered within the block
|
|
1699
|
-
*/
|
|
1700
|
-
children: ReactNode;
|
|
1701
|
-
/**
|
|
1702
|
-
* The HTML element to render as
|
|
1703
|
-
* @default 'section'
|
|
1704
|
-
*/
|
|
1705
|
-
as?: 'section' | 'div' | 'article' | 'aside' | 'main';
|
|
1706
|
-
/**
|
|
1707
|
-
* Spacing size for vertical padding
|
|
1708
|
-
* @default 'md'
|
|
1709
|
-
*/
|
|
1710
|
-
spacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
1711
|
-
/**
|
|
1712
|
-
* Container configuration
|
|
1713
|
-
*/
|
|
1714
|
-
container?: {
|
|
1715
|
-
/**
|
|
1716
|
-
* Container type for content width
|
|
1717
|
-
*/
|
|
1718
|
-
type?: 'sm' | 'md' | 'lg' | 'xl' | 'fluid';
|
|
1719
|
-
/**
|
|
1720
|
-
* Additional container classes
|
|
1721
|
-
*/
|
|
1722
|
-
className?: string;
|
|
1723
|
-
};
|
|
1724
|
-
/**
|
|
1725
|
-
* Whether to enable full-width content
|
|
1726
|
-
* @default false
|
|
1727
|
-
*/
|
|
1728
|
-
fullWidth?: boolean;
|
|
1729
|
-
/**
|
|
1730
|
-
* Background color variant
|
|
1731
|
-
*/
|
|
1732
|
-
background?: 'primary' | 'secondary' | 'tertiary' | 'invert' | 'brand' | 'error' | 'success' | 'warning' | 'info' | 'light';
|
|
1733
|
-
/**
|
|
1734
|
-
* Custom style for the block
|
|
1735
|
-
*/
|
|
1736
|
-
style?: React.CSSProperties;
|
|
1737
|
-
}
|
|
1738
1717
|
/**
|
|
1739
1718
|
* Callout component properties
|
|
1740
1719
|
*/
|
|
@@ -2068,36 +2047,6 @@ type IconWeight$1 = 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
|
2068
2047
|
* Phosphor icon type - excludes internal Phosphor exports
|
|
2069
2048
|
*/
|
|
2070
2049
|
type PhosphorIconsType$1 = Exclude<keyof typeof _phosphor_icons_react, 'IconContext' | 'IconBase' | 'createIcon' | 'default' | 'SSR'>;
|
|
2071
|
-
/**
|
|
2072
|
-
* Icon component properties (legacy - use IconProps from component instead)
|
|
2073
|
-
* @deprecated Use IconProps from '@atomix/components/Icon' instead
|
|
2074
|
-
*/
|
|
2075
|
-
interface LegacyIconProps extends BaseComponentProps {
|
|
2076
|
-
/**
|
|
2077
|
-
* Icon name from Phosphor Icons
|
|
2078
|
-
*/
|
|
2079
|
-
name: PhosphorIconsType$1;
|
|
2080
|
-
/**
|
|
2081
|
-
* Icon size
|
|
2082
|
-
*/
|
|
2083
|
-
size?: IconSize$1 | number;
|
|
2084
|
-
/**
|
|
2085
|
-
* Icon weight/style
|
|
2086
|
-
*/
|
|
2087
|
-
weight?: IconWeight$1;
|
|
2088
|
-
/**
|
|
2089
|
-
* Icon color
|
|
2090
|
-
*/
|
|
2091
|
-
color?: string;
|
|
2092
|
-
/**
|
|
2093
|
-
* Alt text for accessibility
|
|
2094
|
-
*/
|
|
2095
|
-
alt?: string;
|
|
2096
|
-
/**
|
|
2097
|
-
* Custom style
|
|
2098
|
-
*/
|
|
2099
|
-
style?: React.CSSProperties;
|
|
2100
|
-
}
|
|
2101
2050
|
/**
|
|
2102
2051
|
* Navbar position options
|
|
2103
2052
|
*/
|
|
@@ -2694,6 +2643,14 @@ interface PaginationProps extends BaseComponentProps {
|
|
|
2694
2643
|
* Whether to show previous/next page buttons
|
|
2695
2644
|
*/
|
|
2696
2645
|
showPrevNextButtons?: boolean;
|
|
2646
|
+
/**
|
|
2647
|
+
* Whether to show search input for jumping to a specific page
|
|
2648
|
+
*/
|
|
2649
|
+
showSearch?: boolean;
|
|
2650
|
+
/**
|
|
2651
|
+
* Placeholder text for the search input
|
|
2652
|
+
*/
|
|
2653
|
+
searchPlaceholder?: string;
|
|
2697
2654
|
/**
|
|
2698
2655
|
* Custom class for the pagination container
|
|
2699
2656
|
*/
|
|
@@ -3555,32 +3512,6 @@ interface BreadcrumbItem$1 {
|
|
|
3555
3512
|
*/
|
|
3556
3513
|
className?: string;
|
|
3557
3514
|
}
|
|
3558
|
-
/**
|
|
3559
|
-
* Breadcrumb component properties (legacy - use BreadcrumbProps from component instead)
|
|
3560
|
-
* @deprecated Use BreadcrumbProps from '@atomix/components/Breadcrumb' instead
|
|
3561
|
-
*/
|
|
3562
|
-
interface LegacyBreadcrumbProps extends BaseComponentProps {
|
|
3563
|
-
/**
|
|
3564
|
-
* Array of breadcrumb items
|
|
3565
|
-
*/
|
|
3566
|
-
items: BreadcrumbItem$1[];
|
|
3567
|
-
/**
|
|
3568
|
-
* Custom divider character or element
|
|
3569
|
-
*/
|
|
3570
|
-
divider?: ReactNode;
|
|
3571
|
-
/**
|
|
3572
|
-
* Aria label for the navigation
|
|
3573
|
-
*/
|
|
3574
|
-
ariaLabel?: string;
|
|
3575
|
-
/**
|
|
3576
|
-
* Optional custom link component
|
|
3577
|
-
*/
|
|
3578
|
-
LinkComponent?: React.ElementType;
|
|
3579
|
-
/**
|
|
3580
|
-
* Custom style for the breadcrumb
|
|
3581
|
-
*/
|
|
3582
|
-
style?: React.CSSProperties;
|
|
3583
|
-
}
|
|
3584
3515
|
/**
|
|
3585
3516
|
* Breadcrumb options interface (for vanilla JS)
|
|
3586
3517
|
*/
|
|
@@ -8275,6 +8206,7 @@ type __lib_types_AvatarSize = AvatarSize;
|
|
|
8275
8206
|
type __lib_types_BadgeProps = BadgeProps;
|
|
8276
8207
|
type __lib_types_BaseComponentProps = BaseComponentProps;
|
|
8277
8208
|
type __lib_types_BreadcrumbInstance = BreadcrumbInstance;
|
|
8209
|
+
type __lib_types_ButtonGroupProps = ButtonGroupProps;
|
|
8278
8210
|
type __lib_types_ButtonProps = ButtonProps;
|
|
8279
8211
|
type __lib_types_CalloutProps = CalloutProps;
|
|
8280
8212
|
type __lib_types_CardProps = CardProps;
|
|
@@ -8311,9 +8243,6 @@ type __lib_types_HeroProps = HeroProps;
|
|
|
8311
8243
|
type __lib_types_IconPosition = IconPosition;
|
|
8312
8244
|
type __lib_types_ImageType = ImageType;
|
|
8313
8245
|
type __lib_types_InputProps = InputProps;
|
|
8314
|
-
type __lib_types_LegacyBlockProps = LegacyBlockProps;
|
|
8315
|
-
type __lib_types_LegacyBreadcrumbProps = LegacyBreadcrumbProps;
|
|
8316
|
-
type __lib_types_LegacyIconProps = LegacyIconProps;
|
|
8317
8246
|
type __lib_types_ListProps = ListProps;
|
|
8318
8247
|
type __lib_types_MegaMenuColumnProps = MegaMenuColumnProps;
|
|
8319
8248
|
type __lib_types_MegaMenuLinkProps = MegaMenuLinkProps;
|
|
@@ -8379,7 +8308,7 @@ type __lib_types_VideoQuality = VideoQuality;
|
|
|
8379
8308
|
type __lib_types_VideoSubtitle = VideoSubtitle;
|
|
8380
8309
|
type __lib_types_listvariant = listvariant;
|
|
8381
8310
|
declare namespace __lib_types {
|
|
8382
|
-
export type { AccordionProps$1 as AccordionProps, __lib_types_AccordionState as AccordionState, __lib_types_AtomixGlassProps as AtomixGlassProps, __lib_types_AvatarGroupProps as AvatarGroupProps, __lib_types_AvatarProps as AvatarProps, __lib_types_AvatarSize as AvatarSize, __lib_types_BadgeProps as BadgeProps, __lib_types_BaseComponentProps as BaseComponentProps, __lib_types_BreadcrumbInstance as BreadcrumbInstance, BreadcrumbItem$1 as BreadcrumbItem, BreadcrumbOptions$1 as BreadcrumbOptions, __lib_types_ButtonProps as ButtonProps, __lib_types_CalloutProps as CalloutProps, __lib_types_CardProps as CardProps, ChartAxis$1 as ChartAxis, ChartConfig$1 as ChartConfig, ChartDataPoint$1 as ChartDataPoint, ChartDataset$1 as ChartDataset, ChartProps$1 as ChartProps, ChartSize$1 as ChartSize, ChartType$1 as ChartType, __lib_types_CheckboxProps as CheckboxProps, __lib_types_CodeBlockProps as CodeBlockProps, __lib_types_DataTableColumn as DataTableColumn, __lib_types_DataTableProps as DataTableProps, __lib_types_DisplacementMode as DisplacementMode, __lib_types_DropdownDividerProps as DropdownDividerProps, __lib_types_DropdownHeaderProps as DropdownHeaderProps, __lib_types_DropdownItemProps as DropdownItemProps, __lib_types_DropdownPlacement as DropdownPlacement, __lib_types_DropdownProps as DropdownProps, __lib_types_DropdownTrigger as DropdownTrigger, __lib_types_EdgePanelMode as EdgePanelMode, __lib_types_EdgePanelPosition as EdgePanelPosition, __lib_types_EdgePanelProps as EdgePanelProps, __lib_types_ElementRefs as ElementRefs, __lib_types_ElevationCardProps as ElevationCardProps, __lib_types_FooterLayout as FooterLayout, __lib_types_FooterLinkProps as FooterLinkProps, __lib_types_FooterProps as FooterProps, __lib_types_FooterSectionProps as FooterSectionProps, __lib_types_FooterSocialLinkProps as FooterSocialLinkProps, __lib_types_FormGroupProps as FormGroupProps, __lib_types_FormProps as FormProps, __lib_types_GlassContainerProps as GlassContainerProps, __lib_types_GlassMode as GlassMode, __lib_types_GlassSize as GlassSize, __lib_types_HeroAlignment as HeroAlignment, __lib_types_HeroBackgroundSlide as HeroBackgroundSlide, __lib_types_HeroBackgroundSliderConfig as HeroBackgroundSliderConfig, __lib_types_HeroProps as HeroProps, __lib_types_IconPosition as IconPosition, IconSize$1 as IconSize, IconWeight$1 as IconWeight, __lib_types_ImageType as ImageType, __lib_types_InputProps as InputProps,
|
|
8311
|
+
export type { AccordionProps$1 as AccordionProps, __lib_types_AccordionState as AccordionState, __lib_types_AtomixGlassProps as AtomixGlassProps, __lib_types_AvatarGroupProps as AvatarGroupProps, __lib_types_AvatarProps as AvatarProps, __lib_types_AvatarSize as AvatarSize, __lib_types_BadgeProps as BadgeProps, __lib_types_BaseComponentProps as BaseComponentProps, __lib_types_BreadcrumbInstance as BreadcrumbInstance, BreadcrumbItem$1 as BreadcrumbItem, BreadcrumbOptions$1 as BreadcrumbOptions, __lib_types_ButtonGroupProps as ButtonGroupProps, __lib_types_ButtonProps as ButtonProps, __lib_types_CalloutProps as CalloutProps, __lib_types_CardProps as CardProps, ChartAxis$1 as ChartAxis, ChartConfig$1 as ChartConfig, ChartDataPoint$1 as ChartDataPoint, ChartDataset$1 as ChartDataset, ChartProps$1 as ChartProps, ChartSize$1 as ChartSize, ChartType$1 as ChartType, __lib_types_CheckboxProps as CheckboxProps, __lib_types_CodeBlockProps as CodeBlockProps, __lib_types_DataTableColumn as DataTableColumn, __lib_types_DataTableProps as DataTableProps, __lib_types_DisplacementMode as DisplacementMode, __lib_types_DropdownDividerProps as DropdownDividerProps, __lib_types_DropdownHeaderProps as DropdownHeaderProps, __lib_types_DropdownItemProps as DropdownItemProps, __lib_types_DropdownPlacement as DropdownPlacement, __lib_types_DropdownProps as DropdownProps, __lib_types_DropdownTrigger as DropdownTrigger, __lib_types_EdgePanelMode as EdgePanelMode, __lib_types_EdgePanelPosition as EdgePanelPosition, __lib_types_EdgePanelProps as EdgePanelProps, __lib_types_ElementRefs as ElementRefs, __lib_types_ElevationCardProps as ElevationCardProps, __lib_types_FooterLayout as FooterLayout, __lib_types_FooterLinkProps as FooterLinkProps, __lib_types_FooterProps as FooterProps, __lib_types_FooterSectionProps as FooterSectionProps, __lib_types_FooterSocialLinkProps as FooterSocialLinkProps, __lib_types_FormGroupProps as FormGroupProps, __lib_types_FormProps as FormProps, __lib_types_GlassContainerProps as GlassContainerProps, __lib_types_GlassMode as GlassMode, __lib_types_GlassSize as GlassSize, __lib_types_HeroAlignment as HeroAlignment, __lib_types_HeroBackgroundSlide as HeroBackgroundSlide, __lib_types_HeroBackgroundSliderConfig as HeroBackgroundSliderConfig, __lib_types_HeroProps as HeroProps, __lib_types_IconPosition as IconPosition, IconSize$1 as IconSize, IconWeight$1 as IconWeight, __lib_types_ImageType as ImageType, __lib_types_InputProps as InputProps, ListGroupProps$1 as ListGroupProps, __lib_types_ListProps as ListProps, __lib_types_MegaMenuColumnProps as MegaMenuColumnProps, __lib_types_MegaMenuLinkProps as MegaMenuLinkProps, __lib_types_MegaMenuProps as MegaMenuProps, __lib_types_MenuItemProps as MenuItemProps, __lib_types_MenuProps as MenuProps, __lib_types_MessageItem as MessageItem, __lib_types_MessagesProps as MessagesProps, __lib_types_ModalProps as ModalProps, __lib_types_MousePosition as MousePosition, __lib_types_NavAlignment as NavAlignment, __lib_types_NavDropdownProps as NavDropdownProps, __lib_types_NavItemProps as NavItemProps, __lib_types_NavProps as NavProps, __lib_types_NavVariant as NavVariant, __lib_types_NavbarPosition as NavbarPosition, __lib_types_NavbarProps as NavbarProps, __lib_types_OverLightConfig as OverLightConfig, __lib_types_OverLightObjectConfig as OverLightObjectConfig, __lib_types_PaginationProps as PaginationProps, PhosphorIconsType$1 as PhosphorIconsType, __lib_types_PhotoViewerProps as PhotoViewerProps, __lib_types_PopoverProps as PopoverProps, __lib_types_PopoverTriggerProps as PopoverTriggerProps, __lib_types_ProgressProps as ProgressProps, __lib_types_RadioProps as RadioProps, __lib_types_RatingProps as RatingProps, __lib_types_SelectOption as SelectOption, __lib_types_SelectProps as SelectProps, __lib_types_SideMenuItemProps as SideMenuItemProps, __lib_types_SideMenuListProps as SideMenuListProps, __lib_types_SideMenuProps as SideMenuProps, __lib_types_Size as Size, __lib_types_SliderAutoplay as SliderAutoplay, __lib_types_SliderBreakpoint as SliderBreakpoint, __lib_types_SliderEffect as SliderEffect, __lib_types_SliderLazy as SliderLazy, __lib_types_SliderNavigation as SliderNavigation, __lib_types_SliderPagination as SliderPagination, __lib_types_SliderProps as SliderProps, __lib_types_SliderRefs as SliderRefs, __lib_types_SliderScrollbar as SliderScrollbar, __lib_types_SliderSlide as SliderSlide, __lib_types_SliderState as SliderState, __lib_types_SliderThumbs as SliderThumbs, __lib_types_SliderVirtual as SliderVirtual, __lib_types_SliderZoom as SliderZoom, __lib_types_SocialLink as SocialLink, __lib_types_SocialPlatform as SocialPlatform, __lib_types_SortConfig as SortConfig, __lib_types_SpinnerProps as SpinnerProps, __lib_types_StateModifier as StateModifier, __lib_types_TextareaProps as TextareaProps, __lib_types_ThemeColor as ThemeColor, __lib_types_ThemeName as ThemeName, __lib_types_TodoItem as TodoItem, __lib_types_TodoProps as TodoProps, __lib_types_UseCardOptions as UseCardOptions, __lib_types_UseCardReturn as UseCardReturn, __lib_types_Variant as Variant, __lib_types_VideoChapter as VideoChapter, __lib_types_VideoPlayerProps as VideoPlayerProps, __lib_types_VideoQuality as VideoQuality, __lib_types_VideoSubtitle as VideoSubtitle, __lib_types_listvariant as listvariant };
|
|
8383
8312
|
}
|
|
8384
8313
|
|
|
8385
8314
|
/**
|
|
@@ -8417,6 +8346,15 @@ declare const BUTTON: {
|
|
|
8417
8346
|
SELECTED: string;
|
|
8418
8347
|
};
|
|
8419
8348
|
};
|
|
8349
|
+
/**
|
|
8350
|
+
* ButtonGroup-specific constants
|
|
8351
|
+
*/
|
|
8352
|
+
declare const BUTTON_GROUP: {
|
|
8353
|
+
BASE_CLASS: string;
|
|
8354
|
+
CLASSES: {
|
|
8355
|
+
BASE: string;
|
|
8356
|
+
};
|
|
8357
|
+
};
|
|
8420
8358
|
/**
|
|
8421
8359
|
* Callout-specific constants
|
|
8422
8360
|
*/
|
|
@@ -10121,6 +10059,7 @@ declare const __lib_constants_BADGE: typeof BADGE;
|
|
|
10121
10059
|
declare const __lib_constants_BLOCK: typeof BLOCK;
|
|
10122
10060
|
declare const __lib_constants_BREADCRUMB: typeof BREADCRUMB;
|
|
10123
10061
|
declare const __lib_constants_BUTTON: typeof BUTTON;
|
|
10062
|
+
declare const __lib_constants_BUTTON_GROUP: typeof BUTTON_GROUP;
|
|
10124
10063
|
declare const __lib_constants_CALLOUT: typeof CALLOUT;
|
|
10125
10064
|
declare const __lib_constants_CARD: typeof CARD;
|
|
10126
10065
|
declare const __lib_constants_CHART: typeof CHART;
|
|
@@ -10178,6 +10117,7 @@ declare namespace __lib_constants {
|
|
|
10178
10117
|
__lib_constants_BLOCK as BLOCK,
|
|
10179
10118
|
__lib_constants_BREADCRUMB as BREADCRUMB,
|
|
10180
10119
|
__lib_constants_BUTTON as BUTTON,
|
|
10120
|
+
__lib_constants_BUTTON_GROUP as BUTTON_GROUP,
|
|
10181
10121
|
__lib_constants_CALLOUT as CALLOUT,
|
|
10182
10122
|
__lib_constants_CARD as CARD,
|
|
10183
10123
|
__lib_constants_CHART as CHART,
|
|
@@ -10729,7 +10669,6 @@ declare function useNavDropdown(initialProps?: Partial<NavDropdownProps>): {
|
|
|
10729
10669
|
defaultProps: Partial<NavDropdownProps>;
|
|
10730
10670
|
generateDropdownMenuClass: (props: Partial<NavDropdownProps>) => string;
|
|
10731
10671
|
isInFixedBottomNavbar: () => boolean;
|
|
10732
|
-
getIconClass: (isMegaMenu?: boolean) => string;
|
|
10733
10672
|
getIconName: (isMegaMenu?: boolean) => string;
|
|
10734
10673
|
};
|
|
10735
10674
|
|
|
@@ -11491,6 +11430,23 @@ interface BlockProps extends HTMLAttributes<HTMLElement> {
|
|
|
11491
11430
|
*/
|
|
11492
11431
|
declare const Block: React__default.ForwardRefExoticComponent<BlockProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
11493
11432
|
|
|
11433
|
+
/**
|
|
11434
|
+
* ButtonGroup - A component for grouping buttons together
|
|
11435
|
+
*
|
|
11436
|
+
* Groups buttons together with proper border radius handling and spacing.
|
|
11437
|
+
* The buttons will be visually connected with shared borders.
|
|
11438
|
+
*
|
|
11439
|
+
* @example
|
|
11440
|
+
* ```tsx
|
|
11441
|
+
* <ButtonGroup>
|
|
11442
|
+
* <Button label="Left" />
|
|
11443
|
+
* <Button label="Middle" />
|
|
11444
|
+
* <Button label="Right" />
|
|
11445
|
+
* </ButtonGroup>
|
|
11446
|
+
* ```
|
|
11447
|
+
*/
|
|
11448
|
+
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
11449
|
+
|
|
11494
11450
|
/**
|
|
11495
11451
|
* Callout component for displaying important messages, notifications, or alerts
|
|
11496
11452
|
*/
|
|
@@ -12349,1519 +12305,1543 @@ declare const Upload: React__default.FC<UploadProps>;
|
|
|
12349
12305
|
declare const VideoPlayer: React__default.ForwardRefExoticComponent<VideoPlayerProps & React__default.RefAttributes<HTMLVideoElement>>;
|
|
12350
12306
|
|
|
12351
12307
|
/**
|
|
12352
|
-
*
|
|
12353
|
-
*
|
|
12354
|
-
*
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12308
|
+
* Design Tokens
|
|
12309
|
+
*
|
|
12310
|
+
* Simple flat structure for design tokens.
|
|
12311
|
+
* All tokens match the actual CSS variables used in Atomix.
|
|
12312
|
+
* Based on docs/tokes-list.md
|
|
12313
|
+
*/
|
|
12314
|
+
/**
|
|
12315
|
+
* Design tokens interface
|
|
12316
|
+
*
|
|
12317
|
+
* Flat structure - no nesting complexity.
|
|
12318
|
+
* Keys use kebab-case format matching CSS variable names (without --atomix- prefix).
|
|
12319
|
+
*/
|
|
12320
|
+
interface DesignTokens {
|
|
12321
|
+
'primary': string;
|
|
12322
|
+
'secondary': string;
|
|
12323
|
+
'success': string;
|
|
12324
|
+
'info': string;
|
|
12325
|
+
'warning': string;
|
|
12326
|
+
'error': string;
|
|
12327
|
+
'light': string;
|
|
12328
|
+
'dark': string;
|
|
12329
|
+
'primary-rgb': string;
|
|
12330
|
+
'secondary-rgb': string;
|
|
12331
|
+
'success-rgb': string;
|
|
12332
|
+
'info-rgb': string;
|
|
12333
|
+
'warning-rgb': string;
|
|
12334
|
+
'error-rgb': string;
|
|
12335
|
+
'light-rgb': string;
|
|
12336
|
+
'dark-rgb': string;
|
|
12337
|
+
'gray-1': string;
|
|
12338
|
+
'gray-2': string;
|
|
12339
|
+
'gray-3': string;
|
|
12340
|
+
'gray-4': string;
|
|
12341
|
+
'gray-5': string;
|
|
12342
|
+
'gray-6': string;
|
|
12343
|
+
'gray-7': string;
|
|
12344
|
+
'gray-8': string;
|
|
12345
|
+
'gray-9': string;
|
|
12346
|
+
'gray-10': string;
|
|
12347
|
+
'primary-1': string;
|
|
12348
|
+
'primary-2': string;
|
|
12349
|
+
'primary-3': string;
|
|
12350
|
+
'primary-4': string;
|
|
12351
|
+
'primary-5': string;
|
|
12352
|
+
'primary-6': string;
|
|
12353
|
+
'primary-7': string;
|
|
12354
|
+
'primary-8': string;
|
|
12355
|
+
'primary-9': string;
|
|
12356
|
+
'primary-10': string;
|
|
12357
|
+
'red-1': string;
|
|
12358
|
+
'red-2': string;
|
|
12359
|
+
'red-3': string;
|
|
12360
|
+
'red-4': string;
|
|
12361
|
+
'red-5': string;
|
|
12362
|
+
'red-6': string;
|
|
12363
|
+
'red-7': string;
|
|
12364
|
+
'red-8': string;
|
|
12365
|
+
'red-9': string;
|
|
12366
|
+
'red-10': string;
|
|
12367
|
+
'green-1': string;
|
|
12368
|
+
'green-2': string;
|
|
12369
|
+
'green-3': string;
|
|
12370
|
+
'green-4': string;
|
|
12371
|
+
'green-5': string;
|
|
12372
|
+
'green-6': string;
|
|
12373
|
+
'green-7': string;
|
|
12374
|
+
'green-8': string;
|
|
12375
|
+
'green-9': string;
|
|
12376
|
+
'green-10': string;
|
|
12377
|
+
'blue-1': string;
|
|
12378
|
+
'blue-2': string;
|
|
12379
|
+
'blue-3': string;
|
|
12380
|
+
'blue-4': string;
|
|
12381
|
+
'blue-5': string;
|
|
12382
|
+
'blue-6': string;
|
|
12383
|
+
'blue-7': string;
|
|
12384
|
+
'blue-8': string;
|
|
12385
|
+
'blue-9': string;
|
|
12386
|
+
'blue-10': string;
|
|
12387
|
+
'yellow-1': string;
|
|
12388
|
+
'yellow-2': string;
|
|
12389
|
+
'yellow-3': string;
|
|
12390
|
+
'yellow-4': string;
|
|
12391
|
+
'yellow-5': string;
|
|
12392
|
+
'yellow-6': string;
|
|
12393
|
+
'yellow-7': string;
|
|
12394
|
+
'yellow-8': string;
|
|
12395
|
+
'yellow-9': string;
|
|
12396
|
+
'yellow-10': string;
|
|
12397
|
+
'primary-text-emphasis': string;
|
|
12398
|
+
'secondary-text-emphasis': string;
|
|
12399
|
+
'tertiary-text-emphasis': string;
|
|
12400
|
+
'disabled-text-emphasis': string;
|
|
12401
|
+
'invert-text-emphasis': string;
|
|
12402
|
+
'brand-text-emphasis': string;
|
|
12403
|
+
'error-text-emphasis': string;
|
|
12404
|
+
'success-text-emphasis': string;
|
|
12405
|
+
'warning-text-emphasis': string;
|
|
12406
|
+
'info-text-emphasis': string;
|
|
12407
|
+
'light-text-emphasis': string;
|
|
12408
|
+
'dark-text-emphasis': string;
|
|
12409
|
+
'primary-bg-subtle': string;
|
|
12410
|
+
'secondary-bg-subtle': string;
|
|
12411
|
+
'tertiary-bg-subtle': string;
|
|
12412
|
+
'invert-bg-subtle': string;
|
|
12413
|
+
'brand-bg-subtle': string;
|
|
12414
|
+
'error-bg-subtle': string;
|
|
12415
|
+
'success-bg-subtle': string;
|
|
12416
|
+
'warning-bg-subtle': string;
|
|
12417
|
+
'info-bg-subtle': string;
|
|
12418
|
+
'light-bg-subtle': string;
|
|
12419
|
+
'dark-bg-subtle': string;
|
|
12420
|
+
'primary-border-subtle': string;
|
|
12421
|
+
'secondary-border-subtle': string;
|
|
12422
|
+
'success-border-subtle': string;
|
|
12423
|
+
'error-border-subtle': string;
|
|
12424
|
+
'warning-border-subtle': string;
|
|
12425
|
+
'info-border-subtle': string;
|
|
12426
|
+
'brand-border-subtle': string;
|
|
12427
|
+
'light-border-subtle': string;
|
|
12428
|
+
'dark-border-subtle': string;
|
|
12429
|
+
'primary-hover': string;
|
|
12430
|
+
'secondary-hover': string;
|
|
12431
|
+
'light-hover': string;
|
|
12432
|
+
'dark-hover': string;
|
|
12433
|
+
'error-hover': string;
|
|
12434
|
+
'success-hover': string;
|
|
12435
|
+
'warning-hover': string;
|
|
12436
|
+
'info-hover': string;
|
|
12437
|
+
'primary-gradient': string;
|
|
12438
|
+
'secondary-gradient': string;
|
|
12439
|
+
'light-gradient': string;
|
|
12440
|
+
'dark-gradient': string;
|
|
12441
|
+
'success-gradient': string;
|
|
12442
|
+
'info-gradient': string;
|
|
12443
|
+
'warning-gradient': string;
|
|
12444
|
+
'error-gradient': string;
|
|
12445
|
+
'gradient': string;
|
|
12446
|
+
'font-sans-serif': string;
|
|
12447
|
+
'font-monospace': string;
|
|
12448
|
+
'body-font-family': string;
|
|
12449
|
+
'body-font-size': string;
|
|
12450
|
+
'body-font-weight': string;
|
|
12451
|
+
'body-line-height': string;
|
|
12452
|
+
'body-color': string;
|
|
12453
|
+
'body-bg': string;
|
|
12454
|
+
'heading-color': string;
|
|
12455
|
+
'font-size-xl': string;
|
|
12456
|
+
'font-size-2xl': string;
|
|
12457
|
+
'display-1': string;
|
|
12458
|
+
'font-weight-light': string;
|
|
12459
|
+
'font-weight-normal': string;
|
|
12460
|
+
'font-weight-medium': string;
|
|
12461
|
+
'font-weight-semibold': string;
|
|
12462
|
+
'font-weight-bold': string;
|
|
12463
|
+
'font-weight-heavy': string;
|
|
12464
|
+
'font-weight-black': string;
|
|
12465
|
+
'line-height-base': string;
|
|
12466
|
+
'line-height-sm': string;
|
|
12467
|
+
'line-height-lg': string;
|
|
12468
|
+
'letter-spacing-h1': string;
|
|
12469
|
+
'letter-spacing-h2': string;
|
|
12470
|
+
'letter-spacing-h3': string;
|
|
12471
|
+
'letter-spacing-h4': string;
|
|
12472
|
+
'letter-spacing-h5': string;
|
|
12473
|
+
'letter-spacing-h6': string;
|
|
12474
|
+
'link-color': string;
|
|
12475
|
+
'link-color-rgb': string;
|
|
12476
|
+
'link-decoration': string;
|
|
12477
|
+
'link-hover-color': string;
|
|
12478
|
+
'link-hover-color-rgb': string;
|
|
12479
|
+
'highlight-bg': string;
|
|
12480
|
+
'code-color': string;
|
|
12481
|
+
'border-width': string;
|
|
12482
|
+
'border-style': string;
|
|
12483
|
+
'border-color': string;
|
|
12484
|
+
'border-color-translucent': string;
|
|
12485
|
+
'border-radius': string;
|
|
12486
|
+
'border-radius-sm': string;
|
|
12487
|
+
'border-radius-lg': string;
|
|
12488
|
+
'border-radius-xl': string;
|
|
12489
|
+
'border-radius-xxl': string;
|
|
12490
|
+
'border-radius-2xl': string;
|
|
12491
|
+
'border-radius-3xl': string;
|
|
12492
|
+
'border-radius-4xl': string;
|
|
12493
|
+
'border-radius-pill': string;
|
|
12494
|
+
'box-shadow': string;
|
|
12495
|
+
'box-shadow-xs': string;
|
|
12496
|
+
'box-shadow-sm': string;
|
|
12497
|
+
'box-shadow-lg': string;
|
|
12498
|
+
'box-shadow-xl': string;
|
|
12499
|
+
'box-shadow-inset': string;
|
|
12500
|
+
'focus-border-color': string;
|
|
12501
|
+
'focus-ring-width': string;
|
|
12502
|
+
'focus-ring-offset': string;
|
|
12503
|
+
'focus-ring-opacity': string;
|
|
12504
|
+
'form-valid-color': string;
|
|
12505
|
+
'form-valid-border-color': string;
|
|
12506
|
+
'form-invalid-color': string;
|
|
12507
|
+
'form-invalid-border-color': string;
|
|
12508
|
+
'spacing-0': string;
|
|
12509
|
+
'spacing-1': string;
|
|
12510
|
+
'spacing-px-6': string;
|
|
12511
|
+
'spacing-2': string;
|
|
12512
|
+
'spacing-px-10': string;
|
|
12513
|
+
'spacing-3': string;
|
|
12514
|
+
'spacing-px-14': string;
|
|
12515
|
+
'spacing-4': string;
|
|
12516
|
+
'spacing-5': string;
|
|
12517
|
+
'spacing-px-22': string;
|
|
12518
|
+
'spacing-6': string;
|
|
12519
|
+
'spacing-7': string;
|
|
12520
|
+
'spacing-px-30': string;
|
|
12521
|
+
'spacing-8': string;
|
|
12522
|
+
'spacing-9': string;
|
|
12523
|
+
'spacing-10': string;
|
|
12524
|
+
'spacing-11': string;
|
|
12525
|
+
'spacing-12': string;
|
|
12526
|
+
'spacing-14': string;
|
|
12527
|
+
'spacing-16': string;
|
|
12528
|
+
'spacing-20': string;
|
|
12529
|
+
'spacing-24': string;
|
|
12530
|
+
'spacing-28': string;
|
|
12531
|
+
'spacing-32': string;
|
|
12532
|
+
'spacing-36': string;
|
|
12533
|
+
'spacing-40': string;
|
|
12534
|
+
'spacing-44': string;
|
|
12535
|
+
'spacing-48': string;
|
|
12536
|
+
'spacing-52': string;
|
|
12537
|
+
'spacing-56': string;
|
|
12538
|
+
'spacing-60': string;
|
|
12539
|
+
'spacing-64': string;
|
|
12540
|
+
'spacing-72': string;
|
|
12541
|
+
'spacing-80': string;
|
|
12542
|
+
'spacing-90': string;
|
|
12543
|
+
'spacing-200': string;
|
|
12544
|
+
'transition-duration-fast': string;
|
|
12545
|
+
'transition-duration-base': string;
|
|
12546
|
+
'transition-duration-slow': string;
|
|
12547
|
+
'transition-duration-slower': string;
|
|
12548
|
+
'easing-base': string;
|
|
12549
|
+
'easing-ease-in-out': string;
|
|
12550
|
+
'easing-ease-out': string;
|
|
12551
|
+
'easing-ease-in': string;
|
|
12552
|
+
'easing-ease-linear': string;
|
|
12553
|
+
'transition-fast': string;
|
|
12554
|
+
'transition-base': string;
|
|
12555
|
+
'transition-slow': string;
|
|
12556
|
+
'z-n1': string;
|
|
12557
|
+
'z-0': string;
|
|
12558
|
+
'z-1': string;
|
|
12559
|
+
'z-2': string;
|
|
12560
|
+
'z-3': string;
|
|
12561
|
+
'z-4': string;
|
|
12562
|
+
'z-5': string;
|
|
12563
|
+
'z-dropdown': string;
|
|
12564
|
+
'z-sticky': string;
|
|
12565
|
+
'z-fixed': string;
|
|
12566
|
+
'z-modal': string;
|
|
12567
|
+
'z-popover': string;
|
|
12568
|
+
'z-tooltip': string;
|
|
12569
|
+
'z-drawer': string;
|
|
12570
|
+
'breakpoint-xs': string;
|
|
12571
|
+
'breakpoint-sm': string;
|
|
12572
|
+
'breakpoint-md': string;
|
|
12573
|
+
'breakpoint-lg': string;
|
|
12574
|
+
'breakpoint-xl': string;
|
|
12575
|
+
'breakpoint-xxl': string;
|
|
12576
|
+
[key: string]: string | undefined;
|
|
12448
12577
|
}
|
|
12449
|
-
|
|
12450
12578
|
/**
|
|
12451
|
-
*
|
|
12579
|
+
* Default design tokens
|
|
12452
12580
|
*
|
|
12453
|
-
*
|
|
12454
|
-
* Similar to how Tailwind loads tailwind.config.js
|
|
12581
|
+
* Based on Atomix default theme values from docs/tokes-list.md (light mode)
|
|
12455
12582
|
*/
|
|
12456
|
-
|
|
12583
|
+
declare const defaultTokens: DesignTokens;
|
|
12457
12584
|
/**
|
|
12458
|
-
*
|
|
12459
|
-
*
|
|
12460
|
-
* Attempts to load atomix.config.ts from the current working directory.
|
|
12461
|
-
* Falls back to default config if file doesn't exist.
|
|
12585
|
+
* Create tokens from defaults and overrides
|
|
12462
12586
|
*
|
|
12463
|
-
* @param
|
|
12464
|
-
* @returns
|
|
12587
|
+
* @param overrides - Partial tokens to override defaults
|
|
12588
|
+
* @returns Complete DesignTokens object
|
|
12465
12589
|
*
|
|
12466
12590
|
* @example
|
|
12467
12591
|
* ```typescript
|
|
12468
|
-
*
|
|
12469
|
-
*
|
|
12470
|
-
*
|
|
12471
|
-
*
|
|
12592
|
+
* const tokens = createTokens({
|
|
12593
|
+
* 'primary': '#7c3aed',
|
|
12594
|
+
* 'spacing-4': '1rem',
|
|
12595
|
+
* });
|
|
12472
12596
|
* ```
|
|
12473
12597
|
*/
|
|
12474
|
-
declare function
|
|
12475
|
-
|
|
12476
|
-
configPath?: string;
|
|
12477
|
-
/** Whether to throw error if config not found (default: false) */
|
|
12478
|
-
required?: boolean;
|
|
12479
|
-
}): AtomixConfig;
|
|
12598
|
+
declare function createTokens(overrides?: Partial<DesignTokens>): DesignTokens;
|
|
12599
|
+
|
|
12480
12600
|
/**
|
|
12481
|
-
*
|
|
12482
|
-
*
|
|
12483
|
-
* Finds atomix.config.ts in the project, checking common locations.
|
|
12484
|
-
* Returns null in browser environments where file system access is not available.
|
|
12485
|
-
*
|
|
12486
|
-
* This function is designed to work in Node.js environments only.
|
|
12487
|
-
* In browser builds, it will always return null without attempting to access Node.js modules.
|
|
12601
|
+
* Theme Manager Type Definitions
|
|
12488
12602
|
*
|
|
12489
|
-
*
|
|
12603
|
+
* TypeScript types and interfaces for the Atomix Design System theme management system.
|
|
12490
12604
|
*/
|
|
12491
|
-
declare function resolveConfigPath(): string | null;
|
|
12492
|
-
|
|
12493
12605
|
/**
|
|
12494
|
-
*
|
|
12495
|
-
*
|
|
12496
|
-
* Tailwind-like configuration for customizing the Atomix Design System.
|
|
12497
|
-
*
|
|
12498
|
-
* External developers can create `atomix.config.ts` in their project root
|
|
12499
|
-
* to customize design tokens, similar to Tailwind's tailwind.config.js
|
|
12500
|
-
*
|
|
12501
|
-
* @example
|
|
12502
|
-
* ```typescript
|
|
12503
|
-
* // atomix.config.ts (in your project)
|
|
12504
|
-
* import { defineConfig } from '@shohojdhara/atomix/config';
|
|
12505
|
-
*
|
|
12506
|
-
* export default defineConfig({
|
|
12507
|
-
* theme: {
|
|
12508
|
-
* extend: {
|
|
12509
|
-
* colors: {
|
|
12510
|
-
* primary: { main: '#7AFFD7' },
|
|
12511
|
-
* },
|
|
12512
|
-
* },
|
|
12513
|
-
* },
|
|
12514
|
-
* });
|
|
12515
|
-
* ```
|
|
12516
|
-
*/
|
|
12517
|
-
|
|
12518
|
-
/**
|
|
12519
|
-
* Color Scale (1-10)
|
|
12520
|
-
*/
|
|
12521
|
-
interface ColorScale {
|
|
12522
|
-
1?: string;
|
|
12523
|
-
2?: string;
|
|
12524
|
-
3?: string;
|
|
12525
|
-
4?: string;
|
|
12526
|
-
5?: string;
|
|
12527
|
-
6?: string;
|
|
12528
|
-
7?: string;
|
|
12529
|
-
8?: string;
|
|
12530
|
-
9?: string;
|
|
12531
|
-
10?: string;
|
|
12532
|
-
[key: string]: string | undefined;
|
|
12533
|
-
}
|
|
12534
|
-
/**
|
|
12535
|
-
* Palette Color Options
|
|
12536
|
-
*/
|
|
12537
|
-
interface PaletteColorOptions {
|
|
12538
|
-
main: string;
|
|
12539
|
-
light?: string;
|
|
12540
|
-
dark?: string;
|
|
12541
|
-
contrastText?: string;
|
|
12542
|
-
}
|
|
12543
|
-
/**
|
|
12544
|
-
* Design Tokens Schema (Tailwind-like)
|
|
12545
|
-
*/
|
|
12546
|
-
interface ThemeTokens {
|
|
12547
|
-
/** Color palette */
|
|
12548
|
-
colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
|
|
12549
|
-
/** Spacing scale */
|
|
12550
|
-
spacing?: Record<string, string>;
|
|
12551
|
-
/** Border radius scale */
|
|
12552
|
-
borderRadius?: Record<string, string>;
|
|
12553
|
-
/** Typography scale and settings */
|
|
12554
|
-
typography?: {
|
|
12555
|
-
fontFamilies?: Record<string, string>;
|
|
12556
|
-
fontSizes?: Record<string, string>;
|
|
12557
|
-
fontWeights?: Record<string, string | number>;
|
|
12558
|
-
lineHeights?: Record<string, string | number>;
|
|
12559
|
-
letterSpacings?: Record<string, string>;
|
|
12560
|
-
};
|
|
12561
|
-
/** Shadow scale */
|
|
12562
|
-
shadows?: Record<string, string>;
|
|
12563
|
-
/** Z-index scale */
|
|
12564
|
-
zIndex?: Record<string, string | number>;
|
|
12565
|
-
/** Breakpoints scale */
|
|
12566
|
-
breakpoints?: Record<string, string | number>;
|
|
12567
|
-
/** Transitions settings */
|
|
12568
|
-
transitions?: {
|
|
12569
|
-
durations?: Record<string, string>;
|
|
12570
|
-
easings?: Record<string, string>;
|
|
12571
|
-
};
|
|
12572
|
-
}
|
|
12573
|
-
/**
|
|
12574
|
-
* CSS Theme Definition
|
|
12606
|
+
* Theme metadata interface matching themes.config.js structure
|
|
12575
12607
|
*/
|
|
12576
|
-
interface
|
|
12577
|
-
|
|
12608
|
+
interface ThemeMetadata {
|
|
12609
|
+
/** Display name of the theme */
|
|
12578
12610
|
name: string;
|
|
12611
|
+
/** Unique identifier/class name for the theme */
|
|
12579
12612
|
class?: string;
|
|
12613
|
+
/** Theme description */
|
|
12580
12614
|
description?: string;
|
|
12615
|
+
/** Theme author */
|
|
12581
12616
|
author?: string;
|
|
12617
|
+
/** Theme version (semver) */
|
|
12582
12618
|
version?: string;
|
|
12619
|
+
/** Theme tags for categorization */
|
|
12583
12620
|
tags?: string[];
|
|
12621
|
+
/** Whether the theme supports dark mode */
|
|
12584
12622
|
supportsDarkMode?: boolean;
|
|
12623
|
+
/** Theme status: stable, beta, experimental, deprecated */
|
|
12585
12624
|
status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
|
|
12625
|
+
/** Accessibility information */
|
|
12586
12626
|
a11y?: {
|
|
12627
|
+
/** Target contrast ratio */
|
|
12587
12628
|
contrastTarget?: number;
|
|
12629
|
+
/** Supported color modes */
|
|
12588
12630
|
modes?: string[];
|
|
12589
12631
|
};
|
|
12632
|
+
/** Primary theme color (for UI display) */
|
|
12590
12633
|
color?: string;
|
|
12634
|
+
/** Theme features list */
|
|
12591
12635
|
features?: string[];
|
|
12636
|
+
/** Theme dependencies (other themes required) */
|
|
12592
12637
|
dependencies?: string[];
|
|
12593
|
-
cssPath?: string;
|
|
12594
12638
|
}
|
|
12595
12639
|
/**
|
|
12596
|
-
*
|
|
12640
|
+
* Theme change event payload
|
|
12597
12641
|
*/
|
|
12598
|
-
interface
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
contrastTarget?: number;
|
|
12610
|
-
modes?: string[];
|
|
12611
|
-
};
|
|
12612
|
-
color?: string;
|
|
12613
|
-
features?: string[];
|
|
12614
|
-
dependencies?: string[];
|
|
12615
|
-
createTheme: () => Theme;
|
|
12642
|
+
interface ThemeChangeEvent {
|
|
12643
|
+
/** Previous theme name */
|
|
12644
|
+
previousTheme: string | null;
|
|
12645
|
+
/** New theme name */
|
|
12646
|
+
currentTheme: string;
|
|
12647
|
+
/** Theme object (for JS themes) */
|
|
12648
|
+
themeObject?: Theme | null;
|
|
12649
|
+
/** Timestamp of the change */
|
|
12650
|
+
timestamp: number;
|
|
12651
|
+
/** Whether the change was from user action or system */
|
|
12652
|
+
source: 'user' | 'system' | 'storage';
|
|
12616
12653
|
}
|
|
12617
12654
|
/**
|
|
12618
|
-
* Theme
|
|
12655
|
+
* Theme load options
|
|
12619
12656
|
*/
|
|
12620
|
-
|
|
12657
|
+
interface ThemeLoadOptions {
|
|
12658
|
+
/** Force reload even if already loaded */
|
|
12659
|
+
force?: boolean;
|
|
12660
|
+
/** Preload without applying */
|
|
12661
|
+
preload?: boolean;
|
|
12662
|
+
/** Remove previous theme CSS */
|
|
12663
|
+
removePrevious?: boolean;
|
|
12664
|
+
/** Custom CSS path override */
|
|
12665
|
+
customPath?: string;
|
|
12666
|
+
/** Fallback to default theme on error */
|
|
12667
|
+
fallbackOnError?: boolean;
|
|
12668
|
+
}
|
|
12621
12669
|
/**
|
|
12622
|
-
*
|
|
12670
|
+
* Theme validation result
|
|
12623
12671
|
*/
|
|
12624
|
-
interface
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
};
|
|
12632
|
-
sass?: {
|
|
12633
|
-
style?: 'expanded' | 'compressed';
|
|
12634
|
-
sourceMap?: boolean;
|
|
12635
|
-
loadPaths?: string[];
|
|
12636
|
-
};
|
|
12672
|
+
interface ThemeValidationResult {
|
|
12673
|
+
/** Whether the theme is valid */
|
|
12674
|
+
valid: boolean;
|
|
12675
|
+
/** Validation errors */
|
|
12676
|
+
errors: string[];
|
|
12677
|
+
/** Validation warnings */
|
|
12678
|
+
warnings: string[];
|
|
12637
12679
|
}
|
|
12638
12680
|
/**
|
|
12639
|
-
*
|
|
12681
|
+
* React hook return type for useTheme
|
|
12640
12682
|
*/
|
|
12641
|
-
interface
|
|
12683
|
+
interface UseThemeReturn {
|
|
12684
|
+
/** Current theme name */
|
|
12685
|
+
theme: string;
|
|
12686
|
+
/** Current active theme object (for JS themes) */
|
|
12687
|
+
activeTheme: Theme | null;
|
|
12688
|
+
/** Function to change theme (supports string, Theme, or DesignTokens) */
|
|
12689
|
+
setTheme: (theme: string | Theme | DesignTokens | Partial<DesignTokens>, options?: ThemeLoadOptions) => Promise<void>;
|
|
12690
|
+
/** Available themes */
|
|
12691
|
+
availableThemes: ThemeMetadata[];
|
|
12692
|
+
/** Whether a theme is currently loading */
|
|
12693
|
+
isLoading: boolean;
|
|
12694
|
+
/** Current error, if any */
|
|
12695
|
+
error: Error | null;
|
|
12696
|
+
/** Whether a specific theme is loaded */
|
|
12697
|
+
isThemeLoaded: (themeName: string) => boolean;
|
|
12698
|
+
/** Preload a theme */
|
|
12699
|
+
preloadTheme: (themeName: string) => Promise<void>;
|
|
12700
|
+
}
|
|
12701
|
+
/**
|
|
12702
|
+
* Component-level theme override configuration
|
|
12703
|
+
*/
|
|
12704
|
+
interface ComponentThemeOverride {
|
|
12705
|
+
/** CSS variable overrides for the component */
|
|
12706
|
+
cssVars?: Record<string, string | number>;
|
|
12707
|
+
/** Default prop overrides */
|
|
12708
|
+
defaultProps?: Record<string, any>;
|
|
12709
|
+
/** Part-specific overrides */
|
|
12710
|
+
parts?: Record<string, {
|
|
12711
|
+
cssVars?: Record<string, string | number>;
|
|
12712
|
+
className?: string;
|
|
12713
|
+
}>;
|
|
12714
|
+
/** Variant overrides */
|
|
12715
|
+
variants?: Record<string, {
|
|
12716
|
+
cssVars?: Record<string, string | number>;
|
|
12717
|
+
className?: string;
|
|
12718
|
+
}>;
|
|
12719
|
+
/** Additional className for the component */
|
|
12720
|
+
className?: string;
|
|
12721
|
+
}
|
|
12722
|
+
/**
|
|
12723
|
+
* Theme component overrides for all components
|
|
12724
|
+
*/
|
|
12725
|
+
interface ThemeComponentOverrides {
|
|
12726
|
+
Button?: ComponentThemeOverride;
|
|
12727
|
+
Card?: ComponentThemeOverride;
|
|
12728
|
+
Input?: ComponentThemeOverride;
|
|
12729
|
+
Modal?: ComponentThemeOverride;
|
|
12730
|
+
Dropdown?: ComponentThemeOverride;
|
|
12731
|
+
Badge?: ComponentThemeOverride;
|
|
12732
|
+
Tabs?: ComponentThemeOverride;
|
|
12733
|
+
Progress?: ComponentThemeOverride;
|
|
12734
|
+
Tooltip?: ComponentThemeOverride;
|
|
12735
|
+
Select?: ComponentThemeOverride;
|
|
12736
|
+
Checkbox?: ComponentThemeOverride;
|
|
12737
|
+
Radio?: ComponentThemeOverride;
|
|
12738
|
+
Textarea?: ComponentThemeOverride;
|
|
12739
|
+
FormGroup?: ComponentThemeOverride;
|
|
12740
|
+
Navbar?: ComponentThemeOverride;
|
|
12741
|
+
Accordion?: ComponentThemeOverride;
|
|
12742
|
+
DataTable?: ComponentThemeOverride;
|
|
12743
|
+
Avatar?: ComponentThemeOverride;
|
|
12744
|
+
List?: ComponentThemeOverride;
|
|
12745
|
+
Popover?: ComponentThemeOverride;
|
|
12746
|
+
Messages?: ComponentThemeOverride;
|
|
12747
|
+
Callout?: ComponentThemeOverride;
|
|
12748
|
+
Spinner?: ComponentThemeOverride;
|
|
12749
|
+
[key: string]: ComponentThemeOverride | undefined;
|
|
12750
|
+
}
|
|
12751
|
+
/**
|
|
12752
|
+
* Theme provider props
|
|
12753
|
+
*/
|
|
12754
|
+
interface ThemeProviderProps {
|
|
12755
|
+
/** Child components */
|
|
12756
|
+
children: React.ReactNode;
|
|
12757
|
+
/** Default theme */
|
|
12758
|
+
defaultTheme?: string | Theme;
|
|
12759
|
+
/** Available themes */
|
|
12760
|
+
themes?: Record<string, ThemeMetadata>;
|
|
12761
|
+
/** Base path for theme CSS */
|
|
12642
12762
|
basePath?: string;
|
|
12763
|
+
/** CDN path for theme CSS */
|
|
12643
12764
|
cdnPath?: string | null;
|
|
12765
|
+
/** Themes to preload */
|
|
12644
12766
|
preload?: string[];
|
|
12767
|
+
/** Enable lazy loading */
|
|
12645
12768
|
lazy?: boolean;
|
|
12646
|
-
|
|
12769
|
+
/** localStorage key */
|
|
12647
12770
|
storageKey?: string;
|
|
12771
|
+
/** Data attribute name */
|
|
12648
12772
|
dataAttribute?: string;
|
|
12773
|
+
/** Enable persistence */
|
|
12649
12774
|
enablePersistence?: boolean;
|
|
12775
|
+
/** Use minified CSS */
|
|
12650
12776
|
useMinified?: boolean;
|
|
12651
|
-
|
|
12777
|
+
/** Callback when theme changes */
|
|
12778
|
+
onThemeChange?: (theme: string | Theme | DesignTokens) => void;
|
|
12779
|
+
/** Callback on error */
|
|
12780
|
+
onError?: (error: Error, themeName: string) => void;
|
|
12781
|
+
}
|
|
12652
12782
|
/**
|
|
12653
|
-
*
|
|
12783
|
+
* Theme context value
|
|
12654
12784
|
*/
|
|
12655
|
-
interface
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12785
|
+
interface ThemeContextValue {
|
|
12786
|
+
/** Current theme name */
|
|
12787
|
+
theme: string;
|
|
12788
|
+
/** Current active theme object (for JS themes) */
|
|
12789
|
+
activeTheme: Theme | null;
|
|
12790
|
+
/** Set theme function (supports string, Theme, or DesignTokens) */
|
|
12791
|
+
setTheme: (theme: string | Theme | DesignTokens | Partial<DesignTokens>, options?: ThemeLoadOptions) => Promise<void>;
|
|
12792
|
+
/** Available themes */
|
|
12793
|
+
availableThemes: ThemeMetadata[];
|
|
12794
|
+
/** Loading state */
|
|
12795
|
+
isLoading: boolean;
|
|
12796
|
+
/** Error state */
|
|
12797
|
+
error: Error | null;
|
|
12798
|
+
/** Check if theme is loaded */
|
|
12799
|
+
isThemeLoaded: (themeName: string) => boolean;
|
|
12800
|
+
/** Preload theme */
|
|
12801
|
+
preloadTheme: (themeName: string) => Promise<void>;
|
|
12661
12802
|
}
|
|
12662
12803
|
/**
|
|
12663
|
-
*
|
|
12664
|
-
*
|
|
12665
|
-
* Tailwind-like configuration for external developers.
|
|
12666
|
-
* Focus on theme customization - build/runtime configs are internal only.
|
|
12804
|
+
* Color palette configuration for a single color
|
|
12667
12805
|
*/
|
|
12668
|
-
interface
|
|
12669
|
-
/**
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
* Register custom themes (optional)
|
|
12699
|
-
*
|
|
12700
|
-
* Define CSS or JavaScript themes that can be loaded dynamically.
|
|
12701
|
-
*/
|
|
12702
|
-
themes?: Record<string, ThemeDefinition>;
|
|
12806
|
+
interface PaletteColor {
|
|
12807
|
+
/** Main color value */
|
|
12808
|
+
main: string;
|
|
12809
|
+
/** Light variant (auto-generated if not provided) */
|
|
12810
|
+
light?: string;
|
|
12811
|
+
/** Dark variant (auto-generated if not provided) */
|
|
12812
|
+
dark?: string;
|
|
12813
|
+
/** Contrast text color (auto-generated if not provided) */
|
|
12814
|
+
contrastText?: string;
|
|
12815
|
+
}
|
|
12816
|
+
/**
|
|
12817
|
+
* Palette configuration options for createTheme
|
|
12818
|
+
*/
|
|
12819
|
+
interface PaletteOptions {
|
|
12820
|
+
/** Primary color configuration */
|
|
12821
|
+
primary?: Partial<PaletteColor> | string;
|
|
12822
|
+
/** Secondary color configuration */
|
|
12823
|
+
secondary?: Partial<PaletteColor> | string;
|
|
12824
|
+
/** Error color configuration */
|
|
12825
|
+
error?: Partial<PaletteColor> | string;
|
|
12826
|
+
/** Warning color configuration */
|
|
12827
|
+
warning?: Partial<PaletteColor> | string;
|
|
12828
|
+
/** Info color configuration */
|
|
12829
|
+
info?: Partial<PaletteColor> | string;
|
|
12830
|
+
/** Success color configuration */
|
|
12831
|
+
success?: Partial<PaletteColor> | string;
|
|
12832
|
+
/** Background colors */
|
|
12833
|
+
background?: {
|
|
12834
|
+
default?: string;
|
|
12835
|
+
subtle?: string;
|
|
12703
12836
|
};
|
|
12704
|
-
/**
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
/**
|
|
12711
|
-
|
|
12837
|
+
/** Text colors */
|
|
12838
|
+
text?: {
|
|
12839
|
+
primary?: string;
|
|
12840
|
+
secondary?: string;
|
|
12841
|
+
disabled?: string;
|
|
12842
|
+
};
|
|
12843
|
+
/** Additional custom colors */
|
|
12844
|
+
[key: string]: any;
|
|
12712
12845
|
}
|
|
12713
12846
|
/**
|
|
12714
|
-
*
|
|
12715
|
-
*
|
|
12716
|
-
* @param config - Atomix configuration object
|
|
12717
|
-
* @returns The configuration object
|
|
12847
|
+
* Typography configuration options for createTheme
|
|
12718
12848
|
*/
|
|
12849
|
+
interface TypographyOptions {
|
|
12850
|
+
/** Font family */
|
|
12851
|
+
fontFamily?: string;
|
|
12852
|
+
/** Base font size in pixels */
|
|
12853
|
+
fontSize?: number;
|
|
12854
|
+
/** Font weight scale */
|
|
12855
|
+
fontWeightLight?: number;
|
|
12856
|
+
fontWeightRegular?: number;
|
|
12857
|
+
fontWeightMedium?: number;
|
|
12858
|
+
fontWeightSemiBold?: number;
|
|
12859
|
+
fontWeightBold?: number;
|
|
12860
|
+
/** Heading configurations */
|
|
12861
|
+
h1?: {
|
|
12862
|
+
fontSize?: string | number;
|
|
12863
|
+
fontWeight?: number;
|
|
12864
|
+
lineHeight?: number | string;
|
|
12865
|
+
letterSpacing?: string;
|
|
12866
|
+
};
|
|
12867
|
+
h2?: {
|
|
12868
|
+
fontSize?: string | number;
|
|
12869
|
+
fontWeight?: number;
|
|
12870
|
+
lineHeight?: number | string;
|
|
12871
|
+
letterSpacing?: string;
|
|
12872
|
+
};
|
|
12873
|
+
h3?: {
|
|
12874
|
+
fontSize?: string | number;
|
|
12875
|
+
fontWeight?: number;
|
|
12876
|
+
lineHeight?: number | string;
|
|
12877
|
+
letterSpacing?: string;
|
|
12878
|
+
};
|
|
12879
|
+
h4?: {
|
|
12880
|
+
fontSize?: string | number;
|
|
12881
|
+
fontWeight?: number;
|
|
12882
|
+
lineHeight?: number | string;
|
|
12883
|
+
letterSpacing?: string;
|
|
12884
|
+
};
|
|
12885
|
+
h5?: {
|
|
12886
|
+
fontSize?: string | number;
|
|
12887
|
+
fontWeight?: number;
|
|
12888
|
+
lineHeight?: number | string;
|
|
12889
|
+
letterSpacing?: string;
|
|
12890
|
+
};
|
|
12891
|
+
h6?: {
|
|
12892
|
+
fontSize?: string | number;
|
|
12893
|
+
fontWeight?: number;
|
|
12894
|
+
lineHeight?: number | string;
|
|
12895
|
+
letterSpacing?: string;
|
|
12896
|
+
};
|
|
12897
|
+
/** Body text configurations */
|
|
12898
|
+
body1?: {
|
|
12899
|
+
fontSize?: string | number;
|
|
12900
|
+
fontWeight?: number;
|
|
12901
|
+
lineHeight?: number | string;
|
|
12902
|
+
};
|
|
12903
|
+
body2?: {
|
|
12904
|
+
fontSize?: string | number;
|
|
12905
|
+
fontWeight?: number;
|
|
12906
|
+
lineHeight?: number | string;
|
|
12907
|
+
};
|
|
12908
|
+
/** Additional custom typography */
|
|
12909
|
+
[key: string]: any;
|
|
12910
|
+
}
|
|
12719
12911
|
/**
|
|
12720
|
-
*
|
|
12721
|
-
*
|
|
12722
|
-
* Similar to Tailwind's defineConfig, provides autocomplete and type checking.
|
|
12723
|
-
*
|
|
12724
|
-
* @param config - Atomix configuration object
|
|
12725
|
-
* @returns The configuration object
|
|
12726
|
-
*
|
|
12727
|
-
* @example
|
|
12728
|
-
* ```typescript
|
|
12729
|
-
* import { defineConfig } from '@shohojdhara/atomix/config';
|
|
12730
|
-
*
|
|
12731
|
-
* export default defineConfig({
|
|
12732
|
-
* theme: {
|
|
12733
|
-
* extend: {
|
|
12734
|
-
* colors: {
|
|
12735
|
-
* primary: { main: '#7AFFD7' },
|
|
12736
|
-
* },
|
|
12737
|
-
* },
|
|
12738
|
-
* },
|
|
12739
|
-
* });
|
|
12740
|
-
* ```
|
|
12912
|
+
* Spacing function type
|
|
12741
12913
|
*/
|
|
12742
|
-
|
|
12743
|
-
|
|
12914
|
+
type SpacingFunction = (...values: number[]) => string;
|
|
12744
12915
|
/**
|
|
12745
|
-
*
|
|
12746
|
-
*
|
|
12747
|
-
* Type definitions for the theme configuration system
|
|
12916
|
+
* Spacing configuration options for createTheme
|
|
12748
12917
|
*/
|
|
12749
|
-
|
|
12918
|
+
type SpacingOptions = number | number[] | SpacingFunction;
|
|
12750
12919
|
/**
|
|
12751
|
-
*
|
|
12920
|
+
* Breakpoint values configuration
|
|
12752
12921
|
*/
|
|
12753
|
-
interface
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
/** Integration settings */
|
|
12761
|
-
integration: IntegrationConfig;
|
|
12762
|
-
/** Theme dependencies mapping */
|
|
12763
|
-
dependencies: Record<string, string[]>;
|
|
12764
|
-
/** Whether config was validated */
|
|
12765
|
-
validated: boolean;
|
|
12766
|
-
/** Validation errors (if any) */
|
|
12767
|
-
errors?: string[];
|
|
12768
|
-
/** Validation warnings (if any) */
|
|
12769
|
-
warnings?: string[];
|
|
12770
|
-
/** Internal tokens (for generator) */
|
|
12771
|
-
__tokens?: any;
|
|
12772
|
-
/** Internal extensions (for generator) */
|
|
12773
|
-
__extend?: any;
|
|
12922
|
+
interface BreakpointValues {
|
|
12923
|
+
xs?: number;
|
|
12924
|
+
sm?: number;
|
|
12925
|
+
md?: number;
|
|
12926
|
+
lg?: number;
|
|
12927
|
+
xl?: number;
|
|
12928
|
+
[key: string]: number | undefined;
|
|
12774
12929
|
}
|
|
12775
|
-
|
|
12776
12930
|
/**
|
|
12777
|
-
*
|
|
12778
|
-
*
|
|
12779
|
-
* Central registry for all themes with discovery and dependency management
|
|
12931
|
+
* Breakpoints configuration options for createTheme
|
|
12780
12932
|
*/
|
|
12781
|
-
|
|
12933
|
+
interface BreakpointsOptions {
|
|
12934
|
+
/** Breakpoint values in pixels */
|
|
12935
|
+
values?: BreakpointValues;
|
|
12936
|
+
/** Unit for breakpoints (default: 'px') */
|
|
12937
|
+
unit?: string;
|
|
12938
|
+
}
|
|
12782
12939
|
/**
|
|
12783
|
-
*
|
|
12940
|
+
* Shadow configuration
|
|
12784
12941
|
*/
|
|
12785
|
-
interface
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
/** Whether theme is loaded */
|
|
12793
|
-
loaded: boolean;
|
|
12794
|
-
/** Loading promise (if currently loading) */
|
|
12795
|
-
loading?: Promise<Theme | void>;
|
|
12796
|
-
/** Dependencies */
|
|
12797
|
-
dependencies: string[];
|
|
12798
|
-
/** Dependent themes (themes that depend on this one) */
|
|
12799
|
-
dependents: string[];
|
|
12942
|
+
interface ShadowOptions {
|
|
12943
|
+
xs?: string;
|
|
12944
|
+
sm?: string;
|
|
12945
|
+
md?: string;
|
|
12946
|
+
lg?: string;
|
|
12947
|
+
xl?: string;
|
|
12948
|
+
[key: string]: string | undefined;
|
|
12800
12949
|
}
|
|
12801
12950
|
/**
|
|
12802
|
-
*
|
|
12803
|
-
*
|
|
12804
|
-
* Manages theme registration, discovery, and dependency resolution
|
|
12951
|
+
* Transition configuration
|
|
12805
12952
|
*/
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
*/
|
|
12817
|
-
register(themeId: string, definition: ThemeDefinition): void;
|
|
12818
|
-
/**
|
|
12819
|
-
* Get theme entry
|
|
12820
|
-
*/
|
|
12821
|
-
get(themeId: string): RegistryEntry | undefined;
|
|
12822
|
-
/**
|
|
12823
|
-
* Check if theme exists
|
|
12824
|
-
*/
|
|
12825
|
-
has(themeId: string): boolean;
|
|
12826
|
-
/**
|
|
12827
|
-
* Get all theme IDs
|
|
12828
|
-
*/
|
|
12829
|
-
getAllIds(): string[];
|
|
12830
|
-
/**
|
|
12831
|
-
* Get all theme metadata
|
|
12832
|
-
*/
|
|
12833
|
-
getAllMetadata(): ThemeMetadata[];
|
|
12834
|
-
/**
|
|
12835
|
-
* Get theme definition
|
|
12836
|
-
*/
|
|
12837
|
-
getDefinition(themeId: string): ThemeDefinition | undefined;
|
|
12838
|
-
/**
|
|
12839
|
-
* Get theme object (for JS themes)
|
|
12840
|
-
*/
|
|
12841
|
-
getTheme(themeId: string): Theme | undefined;
|
|
12842
|
-
/**
|
|
12843
|
-
* Set theme object (for JS themes)
|
|
12844
|
-
*/
|
|
12845
|
-
setTheme(themeId: string, theme: Theme): void;
|
|
12846
|
-
/**
|
|
12847
|
-
* Get dependencies for a theme
|
|
12848
|
-
*/
|
|
12849
|
-
getDependencies(themeId: string): string[];
|
|
12850
|
-
/**
|
|
12851
|
-
* Get dependents for a theme (themes that depend on this one)
|
|
12852
|
-
*/
|
|
12853
|
-
getDependents(themeId: string): string[];
|
|
12854
|
-
/**
|
|
12855
|
-
* Resolve all dependencies in correct order
|
|
12856
|
-
*/
|
|
12857
|
-
resolveDependencyOrder(themeId: string): string[];
|
|
12858
|
-
/**
|
|
12859
|
-
* Resolve dependencies and build dependency graph
|
|
12860
|
-
*/
|
|
12861
|
-
private resolveDependencies;
|
|
12862
|
-
/**
|
|
12863
|
-
* Validate all themes
|
|
12864
|
-
*/
|
|
12865
|
-
validate(): {
|
|
12866
|
-
valid: boolean;
|
|
12867
|
-
errors: string[];
|
|
12953
|
+
interface TransitionOptions {
|
|
12954
|
+
/** Transition duration values */
|
|
12955
|
+
duration?: {
|
|
12956
|
+
shortest?: number;
|
|
12957
|
+
shorter?: number;
|
|
12958
|
+
short?: number;
|
|
12959
|
+
standard?: number;
|
|
12960
|
+
complex?: number;
|
|
12961
|
+
enteringScreen?: number;
|
|
12962
|
+
leavingScreen?: number;
|
|
12868
12963
|
};
|
|
12869
|
-
/**
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
/**
|
|
12876
|
-
* Theme Cache
|
|
12877
|
-
*
|
|
12878
|
-
* Performance caching layer for loaded themes (CSS and JS)
|
|
12879
|
-
*/
|
|
12880
|
-
|
|
12881
|
-
/**
|
|
12882
|
-
* Cache entry for CSS theme
|
|
12883
|
-
*/
|
|
12884
|
-
interface CSSCacheEntry {
|
|
12885
|
-
type: 'css' | 'js';
|
|
12886
|
-
themeId: string;
|
|
12887
|
-
cssContent?: string;
|
|
12888
|
-
loaded: boolean;
|
|
12889
|
-
loading: Promise<void> | null;
|
|
12890
|
-
timestamp: number;
|
|
12891
|
-
}
|
|
12892
|
-
/**
|
|
12893
|
-
* Cache entry for JS theme
|
|
12894
|
-
*/
|
|
12895
|
-
interface JSCacheEntry {
|
|
12896
|
-
type: 'js';
|
|
12897
|
-
themeId: string;
|
|
12898
|
-
theme: Theme;
|
|
12899
|
-
loaded: boolean;
|
|
12900
|
-
timestamp: number;
|
|
12901
|
-
}
|
|
12902
|
-
/**
|
|
12903
|
-
* Theme cache configuration
|
|
12904
|
-
*/
|
|
12905
|
-
interface CacheConfig {
|
|
12906
|
-
/** Maximum cache size (number of themes) */
|
|
12907
|
-
maxSize?: number;
|
|
12908
|
-
/** Cache TTL in milliseconds (0 = no expiration) */
|
|
12909
|
-
ttl?: number;
|
|
12910
|
-
/** Enable cache */
|
|
12911
|
-
enabled?: boolean;
|
|
12912
|
-
}
|
|
12913
|
-
/**
|
|
12914
|
-
* Theme Cache
|
|
12915
|
-
*
|
|
12916
|
-
* Manages caching of loaded themes for performance optimization
|
|
12917
|
-
*/
|
|
12918
|
-
declare class ThemeCache {
|
|
12919
|
-
private cache;
|
|
12920
|
-
private config;
|
|
12921
|
-
private accessOrder;
|
|
12922
|
-
constructor(config?: CacheConfig);
|
|
12923
|
-
/**
|
|
12924
|
-
* Get cached CSS theme
|
|
12925
|
-
*/
|
|
12926
|
-
getCSS(themeId: string): CSSCacheEntry | null;
|
|
12927
|
-
/**
|
|
12928
|
-
* Get cached JS theme
|
|
12929
|
-
*/
|
|
12930
|
-
getJS(themeId: string): JSCacheEntry | null;
|
|
12931
|
-
/**
|
|
12932
|
-
* Set CSS theme cache entry
|
|
12933
|
-
*/
|
|
12934
|
-
setCSS(themeId: string, entry: Partial<CSSCacheEntry>): void;
|
|
12935
|
-
/**
|
|
12936
|
-
* Set JS theme cache entry
|
|
12937
|
-
*/
|
|
12938
|
-
setJS(themeId: string, theme: Theme): void;
|
|
12939
|
-
/**
|
|
12940
|
-
* Check if theme is cached
|
|
12941
|
-
*/
|
|
12942
|
-
has(themeId: string): boolean;
|
|
12943
|
-
/**
|
|
12944
|
-
* Remove theme from cache
|
|
12945
|
-
*/
|
|
12946
|
-
delete(themeId: string): boolean;
|
|
12947
|
-
/**
|
|
12948
|
-
* Clear all cache
|
|
12949
|
-
*/
|
|
12950
|
-
clear(): void;
|
|
12951
|
-
/**
|
|
12952
|
-
* Get cache statistics
|
|
12953
|
-
*/
|
|
12954
|
-
getStats(): {
|
|
12955
|
-
size: number;
|
|
12956
|
-
maxSize: number;
|
|
12957
|
-
cssThemes: number;
|
|
12958
|
-
jsThemes: number;
|
|
12964
|
+
/** Easing functions */
|
|
12965
|
+
easing?: {
|
|
12966
|
+
easeInOut?: string;
|
|
12967
|
+
easeOut?: string;
|
|
12968
|
+
easeIn?: string;
|
|
12969
|
+
sharp?: string;
|
|
12959
12970
|
};
|
|
12960
|
-
/**
|
|
12961
|
-
* Update access order for LRU
|
|
12962
|
-
*/
|
|
12963
|
-
private updateAccessOrder;
|
|
12964
|
-
/**
|
|
12965
|
-
* Remove from access order
|
|
12966
|
-
*/
|
|
12967
|
-
private removeFromAccessOrder;
|
|
12968
|
-
/**
|
|
12969
|
-
* Evict least recently used entries if cache is full
|
|
12970
|
-
*/
|
|
12971
|
-
private evictIfNeeded;
|
|
12972
12971
|
}
|
|
12973
|
-
|
|
12974
|
-
/**
|
|
12975
|
-
* Theme Engine
|
|
12976
|
-
*
|
|
12977
|
-
* Core engine for unified CSS and JS theme support
|
|
12978
|
-
*/
|
|
12979
|
-
|
|
12980
12972
|
/**
|
|
12981
|
-
*
|
|
12973
|
+
* Z-index configuration
|
|
12982
12974
|
*/
|
|
12983
|
-
interface
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
/** Source of change */
|
|
12993
|
-
source: 'user' | 'system' | 'storage';
|
|
12975
|
+
interface ZIndexOptions {
|
|
12976
|
+
mobileStepper?: number;
|
|
12977
|
+
speedDial?: number;
|
|
12978
|
+
appBar?: number;
|
|
12979
|
+
drawer?: number;
|
|
12980
|
+
modal?: number;
|
|
12981
|
+
snackbar?: number;
|
|
12982
|
+
tooltip?: number;
|
|
12983
|
+
[key: string]: number | undefined;
|
|
12994
12984
|
}
|
|
12995
12985
|
/**
|
|
12996
|
-
*
|
|
12986
|
+
* Border radius configuration
|
|
12997
12987
|
*/
|
|
12998
|
-
interface
|
|
12999
|
-
/**
|
|
13000
|
-
|
|
13001
|
-
/**
|
|
13002
|
-
|
|
13003
|
-
/**
|
|
13004
|
-
|
|
13005
|
-
/**
|
|
13006
|
-
|
|
13007
|
-
/**
|
|
13008
|
-
|
|
12988
|
+
interface BorderRadiusOptions {
|
|
12989
|
+
/** Base border radius */
|
|
12990
|
+
base?: string | number;
|
|
12991
|
+
/** Small border radius */
|
|
12992
|
+
sm?: string | number;
|
|
12993
|
+
/** Medium border radius */
|
|
12994
|
+
md?: string | number;
|
|
12995
|
+
/** Large border radius */
|
|
12996
|
+
lg?: string | number;
|
|
12997
|
+
/** Extra large border radius */
|
|
12998
|
+
xl?: string | number;
|
|
12999
|
+
/** 2X large border radius */
|
|
13000
|
+
xxl?: string | number;
|
|
13001
|
+
/** 3X large border radius */
|
|
13002
|
+
'3xl'?: string | number;
|
|
13003
|
+
/** 4X large border radius */
|
|
13004
|
+
'4xl'?: string | number;
|
|
13005
|
+
/** Pill shape (fully rounded) */
|
|
13006
|
+
pill?: string | number;
|
|
13007
|
+
[key: string]: string | number | undefined;
|
|
13009
13008
|
}
|
|
13010
13009
|
/**
|
|
13011
|
-
*
|
|
13010
|
+
* Custom theme properties for extension
|
|
13011
|
+
* Users can augment this interface via module augmentation
|
|
13012
13012
|
*/
|
|
13013
|
-
interface
|
|
13014
|
-
|
|
13015
|
-
attemptedTheme: string;
|
|
13016
|
-
/** Theme ID that was reverted to (null if no previous theme) */
|
|
13017
|
-
revertedToTheme: string | null;
|
|
13018
|
-
/** Error that caused the revert */
|
|
13019
|
-
error: Error;
|
|
13020
|
-
/** Timestamp */
|
|
13021
|
-
timestamp: number;
|
|
13013
|
+
interface ThemeCustomProperties {
|
|
13014
|
+
[key: string]: any;
|
|
13022
13015
|
}
|
|
13023
13016
|
/**
|
|
13024
|
-
*
|
|
13025
|
-
|
|
13026
|
-
type ThemeChangeListener = (event: ThemeChangeEvent$1) => void;
|
|
13027
|
-
type ThemeLoadListener = (themeId: string) => void;
|
|
13028
|
-
type ThemeErrorListener = (error: Error, themeId: string) => void;
|
|
13029
|
-
type ThemeRevertListener = (event: ThemeRevertEvent) => void;
|
|
13030
|
-
/**
|
|
13031
|
-
* Theme Engine Configuration
|
|
13017
|
+
* Theme configuration options for createTheme
|
|
13018
|
+
* Extends ThemeMetadata to support both CSS and JS theme properties
|
|
13032
13019
|
*/
|
|
13033
|
-
interface
|
|
13034
|
-
/**
|
|
13035
|
-
|
|
13036
|
-
/**
|
|
13037
|
-
|
|
13038
|
-
/**
|
|
13039
|
-
|
|
13040
|
-
/**
|
|
13041
|
-
|
|
13042
|
-
/**
|
|
13043
|
-
|
|
13044
|
-
/**
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13020
|
+
interface ThemeOptions extends Partial<ThemeMetadata> {
|
|
13021
|
+
/** Color palette configuration */
|
|
13022
|
+
palette?: PaletteOptions;
|
|
13023
|
+
/** Typography configuration */
|
|
13024
|
+
typography?: TypographyOptions;
|
|
13025
|
+
/** Spacing configuration */
|
|
13026
|
+
spacing?: SpacingOptions;
|
|
13027
|
+
/** Breakpoints configuration */
|
|
13028
|
+
breakpoints?: BreakpointsOptions;
|
|
13029
|
+
/** Shadow configuration */
|
|
13030
|
+
shadows?: ShadowOptions;
|
|
13031
|
+
/** Transition configuration */
|
|
13032
|
+
transitions?: TransitionOptions;
|
|
13033
|
+
/** Z-index configuration */
|
|
13034
|
+
zIndex?: ZIndexOptions;
|
|
13035
|
+
/** Border radius configuration */
|
|
13036
|
+
borderRadius?: BorderRadiusOptions;
|
|
13037
|
+
/** Custom properties */
|
|
13038
|
+
custom?: ThemeCustomProperties;
|
|
13051
13039
|
}
|
|
13052
13040
|
/**
|
|
13053
|
-
*
|
|
13054
|
-
*
|
|
13055
|
-
* Unified engine for managing CSS and JS themes
|
|
13041
|
+
* Complete theme object with computed values
|
|
13042
|
+
* Generated by createTheme function
|
|
13056
13043
|
*/
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
/**
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
/**
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
/**
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
/**
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
/**
|
|
13122
|
-
* Preload theme
|
|
13123
|
-
*/
|
|
13124
|
-
preloadTheme(themeId: string): Promise<void>;
|
|
13125
|
-
/**
|
|
13126
|
-
* Get registry
|
|
13127
|
-
*/
|
|
13128
|
-
getRegistry(): ThemeRegistry;
|
|
13129
|
-
/**
|
|
13130
|
-
* Get cache
|
|
13131
|
-
*/
|
|
13132
|
-
getCache(): ThemeCache;
|
|
13133
|
-
/**
|
|
13134
|
-
* Clear failed theme tracking (allows retry of previously failed themes)
|
|
13135
|
-
*/
|
|
13136
|
-
clearFailedThemes(): void;
|
|
13137
|
-
/**
|
|
13138
|
-
* Clear specific failed theme (allows retry of a specific theme)
|
|
13139
|
-
*/
|
|
13140
|
-
clearFailedTheme(themeId: string): void;
|
|
13141
|
-
/**
|
|
13142
|
-
* Check if theme has failed to load
|
|
13143
|
-
*/
|
|
13144
|
-
hasFailedTheme(themeId: string): boolean;
|
|
13145
|
-
/**
|
|
13146
|
-
* Add change listener
|
|
13147
|
-
*/
|
|
13148
|
-
on(event: 'change', listener: ThemeChangeListener): void;
|
|
13149
|
-
on(event: 'load', listener: ThemeLoadListener): void;
|
|
13150
|
-
on(event: 'error', listener: ThemeErrorListener): void;
|
|
13151
|
-
on(event: 'revert', listener: ThemeRevertListener): void;
|
|
13152
|
-
/**
|
|
13153
|
-
* Remove listener
|
|
13154
|
-
*/
|
|
13155
|
-
off(event: 'change', listener: ThemeChangeListener): void;
|
|
13156
|
-
off(event: 'load', listener: ThemeLoadListener): void;
|
|
13157
|
-
off(event: 'error', listener: ThemeErrorListener): void;
|
|
13158
|
-
off(event: 'revert', listener: ThemeRevertListener): void;
|
|
13159
|
-
/**
|
|
13160
|
-
* Emit change event
|
|
13161
|
-
*/
|
|
13162
|
-
private emitChange;
|
|
13163
|
-
/**
|
|
13164
|
-
* Emit load event
|
|
13165
|
-
*/
|
|
13166
|
-
private emitLoad;
|
|
13167
|
-
/**
|
|
13168
|
-
* Emit error event
|
|
13169
|
-
* Emits error to listeners (error emission is controlled at call site)
|
|
13170
|
-
*/
|
|
13171
|
-
private emitError;
|
|
13172
|
-
/**
|
|
13173
|
-
* Emit revert event
|
|
13174
|
-
*/
|
|
13175
|
-
private emitRevert;
|
|
13044
|
+
interface Theme extends ThemeMetadata {
|
|
13045
|
+
/** Color palette with computed values */
|
|
13046
|
+
palette: {
|
|
13047
|
+
primary: PaletteColor;
|
|
13048
|
+
secondary: PaletteColor;
|
|
13049
|
+
error: PaletteColor;
|
|
13050
|
+
warning: PaletteColor;
|
|
13051
|
+
info: PaletteColor;
|
|
13052
|
+
success: PaletteColor;
|
|
13053
|
+
background: {
|
|
13054
|
+
default: string;
|
|
13055
|
+
paper: string;
|
|
13056
|
+
subtle: string;
|
|
13057
|
+
};
|
|
13058
|
+
text: {
|
|
13059
|
+
primary: string;
|
|
13060
|
+
secondary: string;
|
|
13061
|
+
disabled: string;
|
|
13062
|
+
};
|
|
13063
|
+
[key: string]: any;
|
|
13064
|
+
};
|
|
13065
|
+
/** Typography with computed values */
|
|
13066
|
+
typography: {
|
|
13067
|
+
fontFamily: string;
|
|
13068
|
+
fontSize: number;
|
|
13069
|
+
fontWeightLight: number;
|
|
13070
|
+
fontWeightRegular: number;
|
|
13071
|
+
fontWeightMedium: number;
|
|
13072
|
+
fontWeightSemiBold: number;
|
|
13073
|
+
fontWeightBold: number;
|
|
13074
|
+
h1: Required<NonNullable<TypographyOptions['h1']>>;
|
|
13075
|
+
h2: Required<NonNullable<TypographyOptions['h2']>>;
|
|
13076
|
+
h3: Required<NonNullable<TypographyOptions['h3']>>;
|
|
13077
|
+
h4: Required<NonNullable<TypographyOptions['h4']>>;
|
|
13078
|
+
h5: Required<NonNullable<TypographyOptions['h5']>>;
|
|
13079
|
+
h6: Required<NonNullable<TypographyOptions['h6']>>;
|
|
13080
|
+
body1: Required<NonNullable<TypographyOptions['body1']>>;
|
|
13081
|
+
body2: Required<NonNullable<TypographyOptions['body2']>>;
|
|
13082
|
+
[key: string]: any;
|
|
13083
|
+
};
|
|
13084
|
+
/** Spacing function */
|
|
13085
|
+
spacing: SpacingFunction;
|
|
13086
|
+
/** Breakpoints with computed values */
|
|
13087
|
+
breakpoints: {
|
|
13088
|
+
values: Required<BreakpointValues>;
|
|
13089
|
+
unit: string;
|
|
13090
|
+
up: (key: keyof BreakpointValues | number) => string;
|
|
13091
|
+
down: (key: keyof BreakpointValues | number) => string;
|
|
13092
|
+
between: (start: keyof BreakpointValues | number, end: keyof BreakpointValues | number) => string;
|
|
13093
|
+
};
|
|
13094
|
+
/** Shadows */
|
|
13095
|
+
shadows: Required<ShadowOptions>;
|
|
13096
|
+
/** Transitions */
|
|
13097
|
+
transitions: Required<TransitionOptions>;
|
|
13098
|
+
/** Z-index values */
|
|
13099
|
+
zIndex: Required<ZIndexOptions>;
|
|
13100
|
+
/** Border radius values */
|
|
13101
|
+
borderRadius: Required<BorderRadiusOptions>;
|
|
13102
|
+
/** Custom properties */
|
|
13103
|
+
custom: ThemeCustomProperties;
|
|
13104
|
+
/** Global CSS variables to apply */
|
|
13105
|
+
cssVars?: Record<string, string | number>;
|
|
13106
|
+
/** Indicates this is a JS theme (not CSS-only) */
|
|
13107
|
+
__isJSTheme: true;
|
|
13176
13108
|
}
|
|
13177
13109
|
|
|
13178
13110
|
/**
|
|
13179
|
-
*
|
|
13111
|
+
* CSS Variable Generator
|
|
13180
13112
|
*
|
|
13181
|
-
*
|
|
13182
|
-
* Rewritten to use the new ThemeEngine architecture.
|
|
13183
|
-
* Handles theme loading, switching, persistence, and events.
|
|
13184
|
-
* Supports both CSS-based themes and JavaScript-based themes.
|
|
13113
|
+
* Generates CSS custom properties from design tokens.
|
|
13185
13114
|
*/
|
|
13186
13115
|
|
|
13187
13116
|
/**
|
|
13188
|
-
*
|
|
13117
|
+
* Options for CSS variable generation
|
|
13118
|
+
*/
|
|
13119
|
+
interface GenerateCSSVariablesOptions {
|
|
13120
|
+
/** CSS selector for the variables (default: ':root') */
|
|
13121
|
+
selector?: string;
|
|
13122
|
+
/** Prefix for CSS variables (default: 'atomix') */
|
|
13123
|
+
prefix?: string;
|
|
13124
|
+
}
|
|
13125
|
+
/**
|
|
13126
|
+
* Generate CSS variables from tokens
|
|
13127
|
+
*
|
|
13128
|
+
* Converts flat token object to CSS custom properties.
|
|
13189
13129
|
*
|
|
13190
|
-
*
|
|
13191
|
-
*
|
|
13130
|
+
* @param tokens - Design tokens object
|
|
13131
|
+
* @param options - Generation options
|
|
13132
|
+
* @returns CSS string with custom properties
|
|
13192
13133
|
*
|
|
13193
13134
|
* @example
|
|
13194
13135
|
* ```typescript
|
|
13195
|
-
* const
|
|
13196
|
-
*
|
|
13197
|
-
*
|
|
13136
|
+
* const tokens = {
|
|
13137
|
+
* 'primary': '#7c3aed',
|
|
13138
|
+
* 'spacing-4': '1rem',
|
|
13139
|
+
* };
|
|
13198
13140
|
*
|
|
13199
|
-
*
|
|
13141
|
+
* const css = generateCSSVariables(tokens);
|
|
13142
|
+
* // Returns: ":root {\n --atomix-primary: #7c3aed;\n --atomix-spacing-4: 1rem;\n}"
|
|
13200
13143
|
* ```
|
|
13201
13144
|
*/
|
|
13202
|
-
declare
|
|
13203
|
-
private engine;
|
|
13204
|
-
private config;
|
|
13205
|
-
private currentTheme;
|
|
13206
|
-
private activeTheme;
|
|
13207
|
-
private eventListeners;
|
|
13208
|
-
private storageAdapter;
|
|
13209
|
-
private initialized;
|
|
13210
|
-
private rtlManager?;
|
|
13211
|
-
private logger;
|
|
13212
|
-
/**
|
|
13213
|
-
* Create a new ThemeManager instance
|
|
13214
|
-
*
|
|
13215
|
-
* @param config - Theme manager configuration
|
|
13216
|
-
*/
|
|
13217
|
-
constructor(config: ThemeManagerConfig);
|
|
13218
|
-
/**
|
|
13219
|
-
* Initialize the theme manager
|
|
13220
|
-
*/
|
|
13221
|
-
private initialize;
|
|
13222
|
-
/**
|
|
13223
|
-
* Get default theme
|
|
13224
|
-
*/
|
|
13225
|
-
private getDefaultTheme;
|
|
13226
|
-
/**
|
|
13227
|
-
* Set theme
|
|
13228
|
-
*/
|
|
13229
|
-
setTheme(theme: string | Theme, options?: ThemeLoadOptions): Promise<void>;
|
|
13230
|
-
/**
|
|
13231
|
-
* Get current theme
|
|
13232
|
-
*/
|
|
13233
|
-
getTheme(): string;
|
|
13234
|
-
/**
|
|
13235
|
-
* Get active theme object (for JS themes)
|
|
13236
|
-
*/
|
|
13237
|
-
getActiveTheme(): Theme | null;
|
|
13238
|
-
/**
|
|
13239
|
-
* Get available themes
|
|
13240
|
-
*/
|
|
13241
|
-
getAvailableThemes(): ThemeMetadata[];
|
|
13242
|
-
/**
|
|
13243
|
-
* Check if theme is loaded
|
|
13244
|
-
*/
|
|
13245
|
-
isThemeLoaded(themeName: string): boolean;
|
|
13246
|
-
/**
|
|
13247
|
-
* Preload theme
|
|
13248
|
-
*/
|
|
13249
|
-
preloadTheme(themeName: string): Promise<void>;
|
|
13250
|
-
/**
|
|
13251
|
-
* Add event listener
|
|
13252
|
-
*/
|
|
13253
|
-
on(event: 'themeChange', callback: ThemeChangeCallback): void;
|
|
13254
|
-
on(event: 'themeLoad', callback: ThemeLoadCallback): void;
|
|
13255
|
-
on(event: 'themeError', callback: ThemeErrorCallback): void;
|
|
13256
|
-
/**
|
|
13257
|
-
* Remove event listener
|
|
13258
|
-
*/
|
|
13259
|
-
off(event: 'themeChange', callback: ThemeChangeCallback): void;
|
|
13260
|
-
off(event: 'themeLoad', callback: ThemeLoadCallback): void;
|
|
13261
|
-
off(event: 'themeError', callback: ThemeErrorCallback): void;
|
|
13262
|
-
/**
|
|
13263
|
-
* Emit theme change event
|
|
13264
|
-
*/
|
|
13265
|
-
private emitThemeChange;
|
|
13266
|
-
/**
|
|
13267
|
-
* Emit theme load event
|
|
13268
|
-
*/
|
|
13269
|
-
private emitThemeLoad;
|
|
13270
|
-
/**
|
|
13271
|
-
* Emit theme error event
|
|
13272
|
-
*/
|
|
13273
|
-
private emitThemeError;
|
|
13274
|
-
/**
|
|
13275
|
-
* Get engine instance (for advanced usage)
|
|
13276
|
-
*/
|
|
13277
|
-
getEngine(): ThemeEngine;
|
|
13278
|
-
/**
|
|
13279
|
-
* Get RTL manager
|
|
13280
|
-
*/
|
|
13281
|
-
getRTLManager(): RTLManager | undefined;
|
|
13282
|
-
/**
|
|
13283
|
-
* Set RTL direction
|
|
13284
|
-
*/
|
|
13285
|
-
setDirection(direction: 'ltr' | 'rtl'): void;
|
|
13286
|
-
/**
|
|
13287
|
-
* Get current direction
|
|
13288
|
-
*/
|
|
13289
|
-
getDirection(): 'ltr' | 'rtl';
|
|
13290
|
-
/**
|
|
13291
|
-
* Destroy theme manager
|
|
13292
|
-
*/
|
|
13293
|
-
destroy(): void;
|
|
13294
|
-
}
|
|
13295
|
-
|
|
13145
|
+
declare function generateCSSVariables(tokens: DesignTokens, options?: GenerateCSSVariablesOptions): string;
|
|
13296
13146
|
/**
|
|
13297
|
-
*
|
|
13147
|
+
* Generate CSS variables with custom selector
|
|
13148
|
+
*
|
|
13149
|
+
* Useful for theme-specific selectors like `[data-theme="dark"]`
|
|
13150
|
+
*
|
|
13151
|
+
* @param tokens - Design tokens object
|
|
13152
|
+
* @param selector - CSS selector (e.g., '[data-theme="dark"]')
|
|
13153
|
+
* @param prefix - CSS variable prefix
|
|
13154
|
+
* @returns CSS string
|
|
13155
|
+
*
|
|
13156
|
+
* @example
|
|
13157
|
+
* ```typescript
|
|
13158
|
+
* const css = generateCSSVariablesForSelector(
|
|
13159
|
+
* tokens,
|
|
13160
|
+
* '[data-theme="dark"]',
|
|
13161
|
+
* 'atomix'
|
|
13162
|
+
* );
|
|
13163
|
+
* ```
|
|
13298
13164
|
*/
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
name: string;
|
|
13302
|
-
/** Unique identifier/class name for the theme */
|
|
13303
|
-
class?: string;
|
|
13304
|
-
/** Theme description */
|
|
13305
|
-
description?: string;
|
|
13306
|
-
/** Theme author */
|
|
13307
|
-
author?: string;
|
|
13308
|
-
/** Theme version (semver) */
|
|
13309
|
-
version?: string;
|
|
13310
|
-
/** Theme tags for categorization */
|
|
13311
|
-
tags?: string[];
|
|
13312
|
-
/** Whether the theme supports dark mode */
|
|
13313
|
-
supportsDarkMode?: boolean;
|
|
13314
|
-
/** Theme status: stable, beta, experimental, deprecated */
|
|
13315
|
-
status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
|
|
13316
|
-
/** Accessibility information */
|
|
13317
|
-
a11y?: {
|
|
13318
|
-
/** Target contrast ratio */
|
|
13319
|
-
contrastTarget?: number;
|
|
13320
|
-
/** Supported color modes */
|
|
13321
|
-
modes?: string[];
|
|
13322
|
-
};
|
|
13323
|
-
/** Primary theme color (for UI display) */
|
|
13324
|
-
color?: string;
|
|
13325
|
-
/** Theme features list */
|
|
13326
|
-
features?: string[];
|
|
13327
|
-
/** Theme dependencies (other themes required) */
|
|
13328
|
-
dependencies?: string[];
|
|
13329
|
-
}
|
|
13165
|
+
declare function generateCSSVariablesForSelector(tokens: DesignTokens, selector: string, prefix?: string): string;
|
|
13166
|
+
|
|
13330
13167
|
/**
|
|
13331
|
-
* Theme
|
|
13168
|
+
* Core Theme Functions
|
|
13169
|
+
*
|
|
13170
|
+
* Unified theme system that handles both DesignTokens and Theme objects.
|
|
13171
|
+
* Config-first approach: loads from atomix.config.ts when no input is provided.
|
|
13172
|
+
* Config file is required for automatic loading.
|
|
13332
13173
|
*/
|
|
13333
|
-
|
|
13334
|
-
/** Available themes metadata */
|
|
13335
|
-
themes: Record<string, ThemeMetadata>;
|
|
13336
|
-
/** Default theme to use */
|
|
13337
|
-
defaultTheme?: string | Theme;
|
|
13338
|
-
/** Base path for theme CSS files */
|
|
13339
|
-
basePath?: string;
|
|
13340
|
-
/** CDN path for theme CSS files (optional) */
|
|
13341
|
-
cdnPath?: string | null;
|
|
13342
|
-
/** Themes to preload on initialization */
|
|
13343
|
-
preload?: string[];
|
|
13344
|
-
/** Enable lazy loading of themes */
|
|
13345
|
-
lazy?: boolean;
|
|
13346
|
-
/** localStorage key for persistence */
|
|
13347
|
-
storageKey?: string;
|
|
13348
|
-
/** Data attribute name for theme */
|
|
13349
|
-
dataAttribute?: string;
|
|
13350
|
-
/** Enable persistence */
|
|
13351
|
-
enablePersistence?: boolean;
|
|
13352
|
-
/** Custom CSS file extension */
|
|
13353
|
-
cssExtension?: string;
|
|
13354
|
-
/** Use minified CSS files */
|
|
13355
|
-
useMinified?: boolean;
|
|
13356
|
-
/** Callback when theme changes */
|
|
13357
|
-
onThemeChange?: (theme: string | Theme) => void;
|
|
13358
|
-
/** Callback when theme load fails */
|
|
13359
|
-
onError?: (error: Error, themeName: string) => void;
|
|
13360
|
-
/** RTL configuration */
|
|
13361
|
-
rtl?: RTLConfig;
|
|
13362
|
-
}
|
|
13174
|
+
|
|
13363
13175
|
/**
|
|
13364
|
-
*
|
|
13176
|
+
* Create theme CSS from tokens or Theme object
|
|
13177
|
+
*
|
|
13178
|
+
* **Config-First Approach**: If no input is provided, loads from `atomix.config.ts`.
|
|
13179
|
+
* Config file is required for automatic loading.
|
|
13180
|
+
*
|
|
13181
|
+
* @param input - DesignTokens (partial), Theme object, or undefined (loads from config)
|
|
13182
|
+
* @param options - CSS generation options (prefix is automatically read from config if not provided)
|
|
13183
|
+
* @returns CSS string with custom properties
|
|
13184
|
+
* @throws Error if config loading fails when no input is provided
|
|
13185
|
+
*
|
|
13186
|
+
* @example
|
|
13187
|
+
* ```typescript
|
|
13188
|
+
* // Loads from atomix.config.ts (config file required)
|
|
13189
|
+
* const css = createTheme();
|
|
13190
|
+
*
|
|
13191
|
+
* // Using DesignTokens
|
|
13192
|
+
* const css = createTheme({
|
|
13193
|
+
* 'primary': '#7c3aed',
|
|
13194
|
+
* 'spacing-4': '1rem',
|
|
13195
|
+
* });
|
|
13196
|
+
*
|
|
13197
|
+
* // Using Theme object
|
|
13198
|
+
* const theme = createThemeObject({ palette: { primary: { main: '#7c3aed' } } });
|
|
13199
|
+
* const css = createTheme(theme);
|
|
13200
|
+
*
|
|
13201
|
+
* // With custom options
|
|
13202
|
+
* const css = createTheme(undefined, { prefix: 'myapp', selector: ':root' });
|
|
13203
|
+
* ```
|
|
13365
13204
|
*/
|
|
13366
|
-
|
|
13367
|
-
|
|
13368
|
-
previousTheme: string | null;
|
|
13369
|
-
/** New theme name */
|
|
13370
|
-
currentTheme: string;
|
|
13371
|
-
/** Theme object (for JS themes) */
|
|
13372
|
-
themeObject?: Theme | null;
|
|
13373
|
-
/** Timestamp of the change */
|
|
13374
|
-
timestamp: number;
|
|
13375
|
-
/** Whether the change was from user action or system */
|
|
13376
|
-
source: 'user' | 'system' | 'storage';
|
|
13377
|
-
}
|
|
13205
|
+
declare function createTheme(input?: Partial<DesignTokens> | Theme, options?: GenerateCSSVariablesOptions): string;
|
|
13206
|
+
|
|
13378
13207
|
/**
|
|
13379
|
-
*
|
|
13208
|
+
* createThemeObject - Create a theme object with computed values
|
|
13209
|
+
*
|
|
13210
|
+
* Similar to Material-UI's createTheme, this function accepts theme configuration
|
|
13211
|
+
* options and returns a complete theme object with computed values.
|
|
13212
|
+
*
|
|
13213
|
+
* NOTE: For most use cases, use the simple theme system's `createTheme` instead,
|
|
13214
|
+
* which generates CSS from DesignTokens. This function is for advanced use cases
|
|
13215
|
+
* that need the full Theme object structure.
|
|
13216
|
+
*
|
|
13217
|
+
* @example
|
|
13218
|
+
* ```typescript
|
|
13219
|
+
* const theme = createThemeObject({
|
|
13220
|
+
* palette: {
|
|
13221
|
+
* primary: { main: '#7AFFD7' },
|
|
13222
|
+
* secondary: { main: '#FF5733' },
|
|
13223
|
+
* },
|
|
13224
|
+
* typography: {
|
|
13225
|
+
* fontFamily: 'Inter, sans-serif',
|
|
13226
|
+
* },
|
|
13227
|
+
* });
|
|
13228
|
+
* ```
|
|
13380
13229
|
*/
|
|
13381
|
-
|
|
13382
|
-
/** Force reload even if already loaded */
|
|
13383
|
-
force?: boolean;
|
|
13384
|
-
/** Preload without applying */
|
|
13385
|
-
preload?: boolean;
|
|
13386
|
-
/** Remove previous theme CSS */
|
|
13387
|
-
removePrevious?: boolean;
|
|
13388
|
-
/** Custom CSS path override */
|
|
13389
|
-
customPath?: string;
|
|
13390
|
-
/** Fallback to default theme on error */
|
|
13391
|
-
fallbackOnError?: boolean;
|
|
13392
|
-
}
|
|
13230
|
+
|
|
13393
13231
|
/**
|
|
13394
|
-
*
|
|
13232
|
+
* Create a theme object with computed values
|
|
13233
|
+
*
|
|
13234
|
+
* @param options - Theme configuration options
|
|
13235
|
+
* @returns Complete theme object
|
|
13395
13236
|
*/
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
valid: boolean;
|
|
13399
|
-
/** Validation errors */
|
|
13400
|
-
errors: string[];
|
|
13401
|
-
/** Validation warnings */
|
|
13402
|
-
warnings: string[];
|
|
13403
|
-
}
|
|
13237
|
+
declare function createThemeObject(...options: ThemeOptions[]): Theme;
|
|
13238
|
+
|
|
13404
13239
|
/**
|
|
13405
|
-
* Theme
|
|
13240
|
+
* Theme Composition Utilities
|
|
13241
|
+
*
|
|
13242
|
+
* Utilities for composing, merging, and extending themes.
|
|
13406
13243
|
*/
|
|
13407
|
-
|
|
13244
|
+
|
|
13408
13245
|
/**
|
|
13409
|
-
*
|
|
13246
|
+
* Deep merge multiple objects
|
|
13247
|
+
* Later objects override earlier ones
|
|
13410
13248
|
*/
|
|
13411
|
-
|
|
13249
|
+
declare function deepMerge<T extends Record<string, any>>(...objects: Partial<T>[]): T;
|
|
13412
13250
|
/**
|
|
13413
|
-
*
|
|
13251
|
+
* Merge multiple theme options into a single theme options object
|
|
13252
|
+
*
|
|
13253
|
+
* @param themes - Theme options to merge
|
|
13254
|
+
* @returns Merged theme options
|
|
13255
|
+
*
|
|
13256
|
+
* @example
|
|
13257
|
+
* ```typescript
|
|
13258
|
+
* const baseTheme = { palette: { primary: { main: '#000' } } };
|
|
13259
|
+
* const customTheme = { palette: { secondary: { main: '#fff' } } };
|
|
13260
|
+
* const merged = mergeTheme(baseTheme, customTheme);
|
|
13261
|
+
* ```
|
|
13414
13262
|
*/
|
|
13415
|
-
|
|
13263
|
+
declare function mergeTheme(...themes: ThemeOptions[]): ThemeOptions;
|
|
13416
13264
|
/**
|
|
13417
|
-
*
|
|
13265
|
+
* Extend an existing theme with new options
|
|
13266
|
+
*
|
|
13267
|
+
* @param baseTheme - Base theme to extend (can be Theme or ThemeOptions)
|
|
13268
|
+
* @param extension - Theme options to extend with
|
|
13269
|
+
* @returns New theme with extended options
|
|
13270
|
+
*
|
|
13271
|
+
* @example
|
|
13272
|
+
* ```typescript
|
|
13273
|
+
* const base = createTheme({ palette: { primary: { main: '#000' } } });
|
|
13274
|
+
* const extended = extendTheme(base, {
|
|
13275
|
+
* palette: { secondary: { main: '#fff' } }
|
|
13276
|
+
* });
|
|
13277
|
+
* ```
|
|
13418
13278
|
*/
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
theme: string;
|
|
13422
|
-
/** Current active theme object (for JS themes) */
|
|
13423
|
-
activeTheme: Theme | null;
|
|
13424
|
-
/** Function to change theme */
|
|
13425
|
-
setTheme: (theme: string | Theme, options?: ThemeLoadOptions) => Promise<void>;
|
|
13426
|
-
/** Available themes */
|
|
13427
|
-
availableThemes: ThemeMetadata[];
|
|
13428
|
-
/** Whether a theme is currently loading */
|
|
13429
|
-
isLoading: boolean;
|
|
13430
|
-
/** Current error, if any */
|
|
13431
|
-
error: Error | null;
|
|
13432
|
-
/** Whether a specific theme is loaded */
|
|
13433
|
-
isThemeLoaded: (themeName: string) => boolean;
|
|
13434
|
-
/** Preload a theme */
|
|
13435
|
-
preloadTheme: (themeName: string) => Promise<void>;
|
|
13436
|
-
}
|
|
13279
|
+
declare function extendTheme(baseTheme: Theme | ThemeOptions, extension: ThemeOptions): Theme;
|
|
13280
|
+
|
|
13437
13281
|
/**
|
|
13438
|
-
*
|
|
13282
|
+
* Atomix Config Loader
|
|
13283
|
+
*
|
|
13284
|
+
* Helper functions to load atomix.config.ts from external projects.
|
|
13285
|
+
* Similar to how Tailwind loads tailwind.config.js
|
|
13439
13286
|
*/
|
|
13440
|
-
|
|
13441
|
-
/** CSS variable overrides for the component */
|
|
13442
|
-
cssVars?: Record<string, string | number>;
|
|
13443
|
-
/** Default prop overrides */
|
|
13444
|
-
defaultProps?: Record<string, any>;
|
|
13445
|
-
/** Part-specific overrides */
|
|
13446
|
-
parts?: Record<string, {
|
|
13447
|
-
cssVars?: Record<string, string | number>;
|
|
13448
|
-
className?: string;
|
|
13449
|
-
}>;
|
|
13450
|
-
/** Variant overrides */
|
|
13451
|
-
variants?: Record<string, {
|
|
13452
|
-
cssVars?: Record<string, string | number>;
|
|
13453
|
-
className?: string;
|
|
13454
|
-
}>;
|
|
13455
|
-
/** Additional className for the component */
|
|
13456
|
-
className?: string;
|
|
13457
|
-
}
|
|
13287
|
+
|
|
13458
13288
|
/**
|
|
13459
|
-
*
|
|
13289
|
+
* Load Atomix configuration from project root
|
|
13290
|
+
*
|
|
13291
|
+
* Attempts to load atomix.config.ts from the current working directory.
|
|
13292
|
+
* Falls back to default config if file doesn't exist.
|
|
13293
|
+
*
|
|
13294
|
+
* @param options - Loader options
|
|
13295
|
+
* @returns Loaded configuration or default
|
|
13296
|
+
*
|
|
13297
|
+
* @example
|
|
13298
|
+
* ```typescript
|
|
13299
|
+
* import { loadAtomixConfig } from '@shohojdhara/atomix/config';
|
|
13300
|
+
* import { createTheme } from '@shohojdhara/atomix/theme';
|
|
13301
|
+
*
|
|
13302
|
+
* const config = loadAtomixConfig();
|
|
13303
|
+
* const theme = createTheme(config.theme?.tokens || {});
|
|
13304
|
+
* ```
|
|
13460
13305
|
*/
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
Badge?: ComponentThemeOverride;
|
|
13468
|
-
Tabs?: ComponentThemeOverride;
|
|
13469
|
-
Progress?: ComponentThemeOverride;
|
|
13470
|
-
Tooltip?: ComponentThemeOverride;
|
|
13471
|
-
Select?: ComponentThemeOverride;
|
|
13472
|
-
Checkbox?: ComponentThemeOverride;
|
|
13473
|
-
Radio?: ComponentThemeOverride;
|
|
13474
|
-
Textarea?: ComponentThemeOverride;
|
|
13475
|
-
FormGroup?: ComponentThemeOverride;
|
|
13476
|
-
Navbar?: ComponentThemeOverride;
|
|
13477
|
-
Accordion?: ComponentThemeOverride;
|
|
13478
|
-
DataTable?: ComponentThemeOverride;
|
|
13479
|
-
Avatar?: ComponentThemeOverride;
|
|
13480
|
-
List?: ComponentThemeOverride;
|
|
13481
|
-
Popover?: ComponentThemeOverride;
|
|
13482
|
-
Messages?: ComponentThemeOverride;
|
|
13483
|
-
Callout?: ComponentThemeOverride;
|
|
13484
|
-
Spinner?: ComponentThemeOverride;
|
|
13485
|
-
[key: string]: ComponentThemeOverride | undefined;
|
|
13486
|
-
}
|
|
13306
|
+
declare function loadAtomixConfig(options?: {
|
|
13307
|
+
/** Custom config path (default: 'atomix.config.ts') */
|
|
13308
|
+
configPath?: string;
|
|
13309
|
+
/** Whether to throw error if config not found (default: false) */
|
|
13310
|
+
required?: boolean;
|
|
13311
|
+
}): AtomixConfig;
|
|
13487
13312
|
/**
|
|
13488
|
-
*
|
|
13313
|
+
* Resolve config path
|
|
13314
|
+
*
|
|
13315
|
+
* Finds atomix.config.ts in the project, checking common locations.
|
|
13316
|
+
* Returns null in browser environments where file system access is not available.
|
|
13317
|
+
*
|
|
13318
|
+
* This function is designed to work in Node.js environments only.
|
|
13319
|
+
* In browser builds, it will always return null without attempting to access Node.js modules.
|
|
13320
|
+
*
|
|
13321
|
+
* @internal This function uses Node.js modules and should not be called in browser environments.
|
|
13489
13322
|
*/
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
children: React.ReactNode;
|
|
13493
|
-
/** Default theme */
|
|
13494
|
-
defaultTheme?: string | Theme;
|
|
13495
|
-
/** Available themes */
|
|
13496
|
-
themes?: Record<string, ThemeMetadata>;
|
|
13497
|
-
/** Base path for theme CSS */
|
|
13498
|
-
basePath?: string;
|
|
13499
|
-
/** CDN path for theme CSS */
|
|
13500
|
-
cdnPath?: string | null;
|
|
13501
|
-
/** Themes to preload */
|
|
13502
|
-
preload?: string[];
|
|
13503
|
-
/** Enable lazy loading */
|
|
13504
|
-
lazy?: boolean;
|
|
13505
|
-
/** localStorage key */
|
|
13506
|
-
storageKey?: string;
|
|
13507
|
-
/** Data attribute name */
|
|
13508
|
-
dataAttribute?: string;
|
|
13509
|
-
/** Enable persistence */
|
|
13510
|
-
enablePersistence?: boolean;
|
|
13511
|
-
/** Use minified CSS */
|
|
13512
|
-
useMinified?: boolean;
|
|
13513
|
-
/** Callback when theme changes */
|
|
13514
|
-
onThemeChange?: (theme: string | Theme) => void;
|
|
13515
|
-
/** Callback on error */
|
|
13516
|
-
onError?: (error: Error, themeName: string) => void;
|
|
13517
|
-
}
|
|
13323
|
+
declare function resolveConfigPath(): string | null;
|
|
13324
|
+
|
|
13518
13325
|
/**
|
|
13519
|
-
*
|
|
13326
|
+
* Atomix Configuration System
|
|
13327
|
+
*
|
|
13328
|
+
* Tailwind-like configuration for customizing the Atomix Design System.
|
|
13329
|
+
*
|
|
13330
|
+
* External developers can create `atomix.config.ts` in their project root
|
|
13331
|
+
* to customize design tokens, similar to Tailwind's tailwind.config.js
|
|
13332
|
+
*
|
|
13333
|
+
* @example
|
|
13334
|
+
* ```typescript
|
|
13335
|
+
* // atomix.config.ts (in your project)
|
|
13336
|
+
* import { defineConfig } from '@shohojdhara/atomix/config';
|
|
13337
|
+
*
|
|
13338
|
+
* export default defineConfig({
|
|
13339
|
+
* theme: {
|
|
13340
|
+
* extend: {
|
|
13341
|
+
* colors: {
|
|
13342
|
+
* primary: { main: '#7AFFD7' },
|
|
13343
|
+
* },
|
|
13344
|
+
* },
|
|
13345
|
+
* },
|
|
13346
|
+
* });
|
|
13347
|
+
* ```
|
|
13520
13348
|
*/
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
preloadTheme: (themeName: string) => Promise<void>;
|
|
13538
|
-
/** Theme manager instance */
|
|
13539
|
-
themeManager: ThemeManager;
|
|
13349
|
+
|
|
13350
|
+
/**
|
|
13351
|
+
* Color Scale (1-10)
|
|
13352
|
+
*/
|
|
13353
|
+
interface ColorScale {
|
|
13354
|
+
1?: string;
|
|
13355
|
+
2?: string;
|
|
13356
|
+
3?: string;
|
|
13357
|
+
4?: string;
|
|
13358
|
+
5?: string;
|
|
13359
|
+
6?: string;
|
|
13360
|
+
7?: string;
|
|
13361
|
+
8?: string;
|
|
13362
|
+
9?: string;
|
|
13363
|
+
10?: string;
|
|
13364
|
+
[key: string]: string | undefined;
|
|
13540
13365
|
}
|
|
13541
13366
|
/**
|
|
13542
|
-
* Color
|
|
13367
|
+
* Palette Color Options
|
|
13543
13368
|
*/
|
|
13544
|
-
interface
|
|
13545
|
-
/** Main color value */
|
|
13369
|
+
interface PaletteColorOptions {
|
|
13546
13370
|
main: string;
|
|
13547
|
-
/** Light variant (auto-generated if not provided) */
|
|
13548
13371
|
light?: string;
|
|
13549
|
-
/** Dark variant (auto-generated if not provided) */
|
|
13550
13372
|
dark?: string;
|
|
13551
|
-
/** Contrast text color (auto-generated if not provided) */
|
|
13552
13373
|
contrastText?: string;
|
|
13553
13374
|
}
|
|
13554
13375
|
/**
|
|
13555
|
-
*
|
|
13376
|
+
* Design Tokens Schema (Tailwind-like)
|
|
13556
13377
|
*/
|
|
13557
|
-
interface
|
|
13558
|
-
/**
|
|
13559
|
-
|
|
13560
|
-
/**
|
|
13561
|
-
|
|
13562
|
-
/**
|
|
13563
|
-
|
|
13564
|
-
/**
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13378
|
+
interface ThemeTokens {
|
|
13379
|
+
/** Color palette */
|
|
13380
|
+
colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
|
|
13381
|
+
/** Spacing scale */
|
|
13382
|
+
spacing?: Record<string, string>;
|
|
13383
|
+
/** Border radius scale */
|
|
13384
|
+
borderRadius?: Record<string, string>;
|
|
13385
|
+
/** Typography scale and settings */
|
|
13386
|
+
typography?: {
|
|
13387
|
+
fontFamilies?: Record<string, string>;
|
|
13388
|
+
fontSizes?: Record<string, string>;
|
|
13389
|
+
fontWeights?: Record<string, string | number>;
|
|
13390
|
+
lineHeights?: Record<string, string | number>;
|
|
13391
|
+
letterSpacings?: Record<string, string>;
|
|
13392
|
+
};
|
|
13393
|
+
/** Shadow scale */
|
|
13394
|
+
shadows?: Record<string, string>;
|
|
13395
|
+
/** Z-index scale */
|
|
13396
|
+
zIndex?: Record<string, string | number>;
|
|
13397
|
+
/** Breakpoints scale */
|
|
13398
|
+
breakpoints?: Record<string, string | number>;
|
|
13399
|
+
/** Transitions settings */
|
|
13400
|
+
transitions?: {
|
|
13401
|
+
durations?: Record<string, string>;
|
|
13402
|
+
easings?: Record<string, string>;
|
|
13403
|
+
};
|
|
13583
13404
|
}
|
|
13584
13405
|
/**
|
|
13585
|
-
*
|
|
13406
|
+
* CSS Theme Definition
|
|
13586
13407
|
*/
|
|
13587
|
-
interface
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
fontSize?: string | number;
|
|
13601
|
-
fontWeight?: number;
|
|
13602
|
-
lineHeight?: number | string;
|
|
13603
|
-
letterSpacing?: string;
|
|
13604
|
-
};
|
|
13605
|
-
h2?: {
|
|
13606
|
-
fontSize?: string | number;
|
|
13607
|
-
fontWeight?: number;
|
|
13608
|
-
lineHeight?: number | string;
|
|
13609
|
-
letterSpacing?: string;
|
|
13610
|
-
};
|
|
13611
|
-
h3?: {
|
|
13612
|
-
fontSize?: string | number;
|
|
13613
|
-
fontWeight?: number;
|
|
13614
|
-
lineHeight?: number | string;
|
|
13615
|
-
letterSpacing?: string;
|
|
13408
|
+
interface CSSThemeDefinition {
|
|
13409
|
+
type: 'css';
|
|
13410
|
+
name: string;
|
|
13411
|
+
class?: string;
|
|
13412
|
+
description?: string;
|
|
13413
|
+
author?: string;
|
|
13414
|
+
version?: string;
|
|
13415
|
+
tags?: string[];
|
|
13416
|
+
supportsDarkMode?: boolean;
|
|
13417
|
+
status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
|
|
13418
|
+
a11y?: {
|
|
13419
|
+
contrastTarget?: number;
|
|
13420
|
+
modes?: string[];
|
|
13616
13421
|
};
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13422
|
+
color?: string;
|
|
13423
|
+
features?: string[];
|
|
13424
|
+
dependencies?: string[];
|
|
13425
|
+
cssPath?: string;
|
|
13426
|
+
}
|
|
13427
|
+
/**
|
|
13428
|
+
* JavaScript Theme Definition
|
|
13429
|
+
*/
|
|
13430
|
+
interface JSThemeDefinition {
|
|
13431
|
+
type: 'js';
|
|
13432
|
+
name: string;
|
|
13433
|
+
class?: string;
|
|
13434
|
+
description?: string;
|
|
13435
|
+
author?: string;
|
|
13436
|
+
version?: string;
|
|
13437
|
+
tags?: string[];
|
|
13438
|
+
supportsDarkMode?: boolean;
|
|
13439
|
+
status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
|
|
13440
|
+
a11y?: {
|
|
13441
|
+
contrastTarget?: number;
|
|
13442
|
+
modes?: string[];
|
|
13622
13443
|
};
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13444
|
+
color?: string;
|
|
13445
|
+
features?: string[];
|
|
13446
|
+
dependencies?: string[];
|
|
13447
|
+
createTheme: () => Theme;
|
|
13448
|
+
}
|
|
13449
|
+
/**
|
|
13450
|
+
* Theme Definition (CSS or JS)
|
|
13451
|
+
*/
|
|
13452
|
+
type ThemeDefinition = CSSThemeDefinition | JSThemeDefinition;
|
|
13453
|
+
/**
|
|
13454
|
+
* Build configuration (migrated from theme.config.ts)
|
|
13455
|
+
*/
|
|
13456
|
+
interface BuildConfig {
|
|
13457
|
+
output?: {
|
|
13458
|
+
directory?: string;
|
|
13459
|
+
formats?: {
|
|
13460
|
+
expanded?: string;
|
|
13461
|
+
compressed?: string;
|
|
13462
|
+
};
|
|
13628
13463
|
};
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
letterSpacing?: string;
|
|
13464
|
+
sass?: {
|
|
13465
|
+
style?: 'expanded' | 'compressed';
|
|
13466
|
+
sourceMap?: boolean;
|
|
13467
|
+
loadPaths?: string[];
|
|
13634
13468
|
};
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13469
|
+
}
|
|
13470
|
+
/**
|
|
13471
|
+
* Runtime configuration (migrated from theme.config.ts)
|
|
13472
|
+
*/
|
|
13473
|
+
interface RuntimeConfig {
|
|
13474
|
+
basePath?: string;
|
|
13475
|
+
cdnPath?: string | null;
|
|
13476
|
+
preload?: string[];
|
|
13477
|
+
lazy?: boolean;
|
|
13478
|
+
defaultTheme?: string;
|
|
13479
|
+
storageKey?: string;
|
|
13480
|
+
dataAttribute?: string;
|
|
13481
|
+
enablePersistence?: boolean;
|
|
13482
|
+
useMinified?: boolean;
|
|
13483
|
+
}
|
|
13484
|
+
/**
|
|
13485
|
+
* Integration settings (migrated from theme.config.ts)
|
|
13486
|
+
*/
|
|
13487
|
+
interface IntegrationConfig {
|
|
13488
|
+
cssVariables?: Record<string, string>;
|
|
13489
|
+
classNames?: {
|
|
13490
|
+
theme?: string;
|
|
13491
|
+
colorMode?: string;
|
|
13640
13492
|
};
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13493
|
+
}
|
|
13494
|
+
/**
|
|
13495
|
+
* Atomix Configuration Interface
|
|
13496
|
+
*
|
|
13497
|
+
* Tailwind-like configuration for external developers.
|
|
13498
|
+
* Focus on theme customization - build/runtime configs are internal only.
|
|
13499
|
+
*/
|
|
13500
|
+
interface AtomixConfig {
|
|
13501
|
+
/**
|
|
13502
|
+
* CSS variable prefix (default: 'atomix')
|
|
13503
|
+
*
|
|
13504
|
+
* Change this to customize all CSS variable names.
|
|
13505
|
+
* Example: prefix: 'myapp' → --myapp-primary instead of --atomix-primary
|
|
13506
|
+
*/
|
|
13507
|
+
prefix?: string;
|
|
13508
|
+
/**
|
|
13509
|
+
* Theme customization (Tailwind-like)
|
|
13510
|
+
*
|
|
13511
|
+
* Use `extend` to add or override design tokens.
|
|
13512
|
+
* Use `tokens` to completely replace the default token system (advanced).
|
|
13513
|
+
*/
|
|
13514
|
+
theme?: {
|
|
13515
|
+
/**
|
|
13516
|
+
* Extend the default design tokens
|
|
13517
|
+
*
|
|
13518
|
+
* This is the recommended way to customize Atomix.
|
|
13519
|
+
* Your values will override or extend the base tokens.
|
|
13520
|
+
*/
|
|
13521
|
+
extend?: ThemeTokens;
|
|
13522
|
+
/**
|
|
13523
|
+
* Override the default tokens entirely (advanced)
|
|
13524
|
+
*
|
|
13525
|
+
* Use with caution - this replaces the entire token system.
|
|
13526
|
+
* Most users should use `extend` instead.
|
|
13527
|
+
*/
|
|
13528
|
+
tokens?: ThemeTokens;
|
|
13529
|
+
/**
|
|
13530
|
+
* Register custom themes (optional)
|
|
13531
|
+
*
|
|
13532
|
+
* Define CSS or JavaScript themes that can be loaded dynamically.
|
|
13533
|
+
*/
|
|
13534
|
+
themes?: Record<string, ThemeDefinition>;
|
|
13645
13535
|
};
|
|
13646
|
-
/**
|
|
13647
|
-
|
|
13536
|
+
/** @internal Build configuration (internal use only) */
|
|
13537
|
+
build?: BuildConfig;
|
|
13538
|
+
/** @internal Runtime configuration (internal use only) */
|
|
13539
|
+
runtime?: RuntimeConfig;
|
|
13540
|
+
/** @internal Integration settings (internal use only) */
|
|
13541
|
+
integration?: IntegrationConfig;
|
|
13542
|
+
/** @internal Theme dependencies mapping (internal use only) */
|
|
13543
|
+
dependencies?: Record<string, string[]>;
|
|
13648
13544
|
}
|
|
13649
13545
|
/**
|
|
13650
|
-
*
|
|
13546
|
+
* Helper function to define Atomix configuration with type safety
|
|
13547
|
+
*
|
|
13548
|
+
* @param config - Atomix configuration object
|
|
13549
|
+
* @returns The configuration object
|
|
13651
13550
|
*/
|
|
13652
|
-
type SpacingFunction = (...values: number[]) => string;
|
|
13653
13551
|
/**
|
|
13654
|
-
*
|
|
13552
|
+
* Helper function to define Atomix configuration with type safety
|
|
13553
|
+
*
|
|
13554
|
+
* Similar to Tailwind's defineConfig, provides autocomplete and type checking.
|
|
13555
|
+
*
|
|
13556
|
+
* @param config - Atomix configuration object
|
|
13557
|
+
* @returns The configuration object
|
|
13558
|
+
*
|
|
13559
|
+
* @example
|
|
13560
|
+
* ```typescript
|
|
13561
|
+
* import { defineConfig } from '@shohojdhara/atomix/config';
|
|
13562
|
+
*
|
|
13563
|
+
* export default defineConfig({
|
|
13564
|
+
* theme: {
|
|
13565
|
+
* extend: {
|
|
13566
|
+
* colors: {
|
|
13567
|
+
* primary: { main: '#7AFFD7' },
|
|
13568
|
+
* },
|
|
13569
|
+
* },
|
|
13570
|
+
* },
|
|
13571
|
+
* });
|
|
13572
|
+
* ```
|
|
13655
13573
|
*/
|
|
13656
|
-
|
|
13574
|
+
declare function defineConfig(config: AtomixConfig): AtomixConfig;
|
|
13575
|
+
|
|
13657
13576
|
/**
|
|
13658
|
-
*
|
|
13577
|
+
* Theme Configuration Types
|
|
13578
|
+
*
|
|
13579
|
+
* Type definitions for the theme configuration system
|
|
13659
13580
|
*/
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13581
|
+
|
|
13582
|
+
/**
|
|
13583
|
+
* Loaded and validated theme configuration
|
|
13584
|
+
*/
|
|
13585
|
+
interface LoadedThemeConfig {
|
|
13586
|
+
/** Registered themes */
|
|
13587
|
+
themes: Record<string, ThemeDefinition>;
|
|
13588
|
+
/** Build configuration */
|
|
13589
|
+
build: BuildConfig;
|
|
13590
|
+
/** Runtime configuration */
|
|
13591
|
+
runtime: RuntimeConfig;
|
|
13592
|
+
/** Integration settings */
|
|
13593
|
+
integration: IntegrationConfig;
|
|
13594
|
+
/** Theme dependencies mapping */
|
|
13595
|
+
dependencies: Record<string, string[]>;
|
|
13596
|
+
/** Whether config was validated */
|
|
13597
|
+
validated: boolean;
|
|
13598
|
+
/** Validation errors (if any) */
|
|
13599
|
+
errors?: string[];
|
|
13600
|
+
/** Validation warnings (if any) */
|
|
13601
|
+
warnings?: string[];
|
|
13602
|
+
/** Internal tokens (for generator) */
|
|
13603
|
+
__tokens?: any;
|
|
13604
|
+
/** Internal extensions (for generator) */
|
|
13605
|
+
__extend?: any;
|
|
13667
13606
|
}
|
|
13607
|
+
|
|
13668
13608
|
/**
|
|
13669
|
-
*
|
|
13609
|
+
* Theme Registry
|
|
13610
|
+
*
|
|
13611
|
+
* Central registry for all themes with discovery and dependency management
|
|
13670
13612
|
*/
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13613
|
+
|
|
13614
|
+
/**
|
|
13615
|
+
* Registry entry
|
|
13616
|
+
*/
|
|
13617
|
+
interface RegistryEntry {
|
|
13618
|
+
/** Theme ID */
|
|
13619
|
+
id: string;
|
|
13620
|
+
/** Theme definition from config */
|
|
13621
|
+
definition: ThemeDefinition;
|
|
13622
|
+
/** Resolved theme object (for JS themes) */
|
|
13623
|
+
theme?: Theme;
|
|
13624
|
+
/** Whether theme is loaded */
|
|
13625
|
+
loaded: boolean;
|
|
13626
|
+
/** Loading promise (if currently loading) */
|
|
13627
|
+
loading?: Promise<Theme | void>;
|
|
13628
|
+
/** Dependencies */
|
|
13629
|
+
dependencies: string[];
|
|
13630
|
+
/** Dependent themes (themes that depend on this one) */
|
|
13631
|
+
dependents: string[];
|
|
13676
13632
|
}
|
|
13677
13633
|
/**
|
|
13678
|
-
*
|
|
13634
|
+
* Theme Registry
|
|
13635
|
+
*
|
|
13636
|
+
* Manages theme registration, discovery, and dependency resolution
|
|
13679
13637
|
*/
|
|
13680
|
-
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
|
|
13638
|
+
declare class ThemeRegistry {
|
|
13639
|
+
private entries;
|
|
13640
|
+
private config;
|
|
13641
|
+
private initialized;
|
|
13642
|
+
/**
|
|
13643
|
+
* Initialize registry from config
|
|
13644
|
+
*/
|
|
13645
|
+
initialize(config?: LoadedThemeConfig): Promise<void>;
|
|
13646
|
+
/**
|
|
13647
|
+
* Register a theme
|
|
13648
|
+
*/
|
|
13649
|
+
register(themeId: string, definition: ThemeDefinition): void;
|
|
13650
|
+
/**
|
|
13651
|
+
* Get theme entry
|
|
13652
|
+
*/
|
|
13653
|
+
get(themeId: string): RegistryEntry | undefined;
|
|
13654
|
+
/**
|
|
13655
|
+
* Check if theme exists
|
|
13656
|
+
*/
|
|
13657
|
+
has(themeId: string): boolean;
|
|
13658
|
+
/**
|
|
13659
|
+
* Get all theme IDs
|
|
13660
|
+
*/
|
|
13661
|
+
getAllIds(): string[];
|
|
13662
|
+
/**
|
|
13663
|
+
* Get all theme metadata
|
|
13664
|
+
*/
|
|
13665
|
+
getAllMetadata(): ThemeMetadata[];
|
|
13666
|
+
/**
|
|
13667
|
+
* Get theme definition
|
|
13668
|
+
*/
|
|
13669
|
+
getDefinition(themeId: string): ThemeDefinition | undefined;
|
|
13670
|
+
/**
|
|
13671
|
+
* Check if a theme is loaded
|
|
13672
|
+
*/
|
|
13673
|
+
isThemeLoaded(themeId: string): boolean;
|
|
13674
|
+
/**
|
|
13675
|
+
* Mark a theme as loaded
|
|
13676
|
+
*/
|
|
13677
|
+
markLoaded(themeId: string, theme?: Theme): void;
|
|
13678
|
+
/**
|
|
13679
|
+
* Get theme object (for JS themes)
|
|
13680
|
+
*/
|
|
13681
|
+
getTheme(themeId: string): Theme | undefined;
|
|
13682
|
+
/**
|
|
13683
|
+
* Get dependencies for a theme
|
|
13684
|
+
*/
|
|
13685
|
+
getDependencies(themeId: string): string[];
|
|
13686
|
+
/**
|
|
13687
|
+
* Get dependents for a theme (themes that depend on this one)
|
|
13688
|
+
*/
|
|
13689
|
+
getDependents(themeId: string): string[];
|
|
13690
|
+
/**
|
|
13691
|
+
* Resolve all dependencies in correct order
|
|
13692
|
+
*/
|
|
13693
|
+
resolveDependencyOrder(themeId: string): string[];
|
|
13694
|
+
/**
|
|
13695
|
+
* Resolve dependencies and build dependency graph
|
|
13696
|
+
*/
|
|
13697
|
+
private resolveDependencies;
|
|
13698
|
+
/**
|
|
13699
|
+
* Validate all themes
|
|
13700
|
+
*/
|
|
13701
|
+
validate(): {
|
|
13702
|
+
valid: boolean;
|
|
13703
|
+
errors: string[];
|
|
13704
|
+
};
|
|
13705
|
+
/**
|
|
13706
|
+
* Clear registry
|
|
13707
|
+
*/
|
|
13708
|
+
clear(): void;
|
|
13687
13709
|
}
|
|
13710
|
+
|
|
13688
13711
|
/**
|
|
13689
|
-
*
|
|
13712
|
+
* CSS File Utilities
|
|
13713
|
+
*
|
|
13714
|
+
* Save CSS to file system (Node.js only).
|
|
13715
|
+
*/
|
|
13716
|
+
/**
|
|
13717
|
+
* Save CSS to file
|
|
13718
|
+
*
|
|
13719
|
+
* Writes CSS string to a file. Only works in Node.js environment.
|
|
13720
|
+
*
|
|
13721
|
+
* @param css - CSS string to save
|
|
13722
|
+
* @param filePath - Output file path
|
|
13723
|
+
* @throws Error if called in browser environment
|
|
13724
|
+
*
|
|
13725
|
+
* @example
|
|
13726
|
+
* ```typescript
|
|
13727
|
+
* const css = ':root { --atomix-color-primary: #7AFFD7; }';
|
|
13728
|
+
* await saveCSSFile(css, './themes/custom.css');
|
|
13729
|
+
* ```
|
|
13730
|
+
*/
|
|
13731
|
+
declare function saveCSSFile(css: string, filePath: string): Promise<void>;
|
|
13732
|
+
/**
|
|
13733
|
+
* Save CSS to file (synchronous version)
|
|
13734
|
+
*
|
|
13735
|
+
* Synchronous version of saveCSSFile. Only works in Node.js environment.
|
|
13736
|
+
*
|
|
13737
|
+
* @param css - CSS string to save
|
|
13738
|
+
* @param filePath - Output file path
|
|
13739
|
+
* @throws Error if called in browser environment
|
|
13740
|
+
*/
|
|
13741
|
+
declare function saveCSSFileSync(css: string, filePath: string): void;
|
|
13742
|
+
|
|
13743
|
+
/**
|
|
13744
|
+
* CSS Injection Utilities
|
|
13745
|
+
*
|
|
13746
|
+
* Inject CSS into HTML head via <style> element.
|
|
13747
|
+
*/
|
|
13748
|
+
/**
|
|
13749
|
+
* Inject CSS into HTML head via <style> element
|
|
13750
|
+
*
|
|
13751
|
+
* Creates or updates a style element in the document head.
|
|
13752
|
+
* If an element with the same ID exists, it will be updated.
|
|
13753
|
+
*
|
|
13754
|
+
* @param css - CSS string to inject
|
|
13755
|
+
* @param id - Style element ID (default: 'atomix-theme')
|
|
13756
|
+
*
|
|
13757
|
+
* @example
|
|
13758
|
+
* ```typescript
|
|
13759
|
+
* const css = ':root { --atomix-color-primary: #7AFFD7; }';
|
|
13760
|
+
* injectCSS(css);
|
|
13761
|
+
*
|
|
13762
|
+
* // With custom ID
|
|
13763
|
+
* injectCSS(css, 'my-custom-theme');
|
|
13764
|
+
* ```
|
|
13690
13765
|
*/
|
|
13691
|
-
|
|
13692
|
-
/** Transition duration values */
|
|
13693
|
-
duration?: {
|
|
13694
|
-
shortest?: number;
|
|
13695
|
-
shorter?: number;
|
|
13696
|
-
short?: number;
|
|
13697
|
-
standard?: number;
|
|
13698
|
-
complex?: number;
|
|
13699
|
-
enteringScreen?: number;
|
|
13700
|
-
leavingScreen?: number;
|
|
13701
|
-
};
|
|
13702
|
-
/** Easing functions */
|
|
13703
|
-
easing?: {
|
|
13704
|
-
easeInOut?: string;
|
|
13705
|
-
easeOut?: string;
|
|
13706
|
-
easeIn?: string;
|
|
13707
|
-
sharp?: string;
|
|
13708
|
-
};
|
|
13709
|
-
}
|
|
13766
|
+
declare function injectCSS(css: string, id?: string): void;
|
|
13710
13767
|
/**
|
|
13711
|
-
*
|
|
13768
|
+
* Remove injected CSS from DOM
|
|
13769
|
+
*
|
|
13770
|
+
* Removes the style element with the given ID from the document head.
|
|
13771
|
+
*
|
|
13772
|
+
* @param id - Style element ID to remove (default: 'atomix-theme')
|
|
13773
|
+
*
|
|
13774
|
+
* @example
|
|
13775
|
+
* ```typescript
|
|
13776
|
+
* removeCSS(); // Removes default 'atomix-theme'
|
|
13777
|
+
* removeCSS('my-custom-theme'); // Removes custom ID
|
|
13778
|
+
* ```
|
|
13712
13779
|
*/
|
|
13713
|
-
|
|
13714
|
-
mobileStepper?: number;
|
|
13715
|
-
speedDial?: number;
|
|
13716
|
-
appBar?: number;
|
|
13717
|
-
drawer?: number;
|
|
13718
|
-
modal?: number;
|
|
13719
|
-
snackbar?: number;
|
|
13720
|
-
tooltip?: number;
|
|
13721
|
-
[key: string]: number | undefined;
|
|
13722
|
-
}
|
|
13780
|
+
declare function removeCSS(id?: string): void;
|
|
13723
13781
|
/**
|
|
13724
|
-
*
|
|
13782
|
+
* Check if CSS is already injected
|
|
13783
|
+
*
|
|
13784
|
+
* @param id - Style element ID to check (default: 'atomix-theme')
|
|
13785
|
+
* @returns True if style element exists
|
|
13725
13786
|
*/
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
base?: string | number;
|
|
13729
|
-
/** Small border radius */
|
|
13730
|
-
sm?: string | number;
|
|
13731
|
-
/** Medium border radius */
|
|
13732
|
-
md?: string | number;
|
|
13733
|
-
/** Large border radius */
|
|
13734
|
-
lg?: string | number;
|
|
13735
|
-
/** Extra large border radius */
|
|
13736
|
-
xl?: string | number;
|
|
13737
|
-
/** 2X large border radius */
|
|
13738
|
-
xxl?: string | number;
|
|
13739
|
-
/** 3X large border radius */
|
|
13740
|
-
'3xl'?: string | number;
|
|
13741
|
-
/** 4X large border radius */
|
|
13742
|
-
'4xl'?: string | number;
|
|
13743
|
-
/** Pill shape (fully rounded) */
|
|
13744
|
-
pill?: string | number;
|
|
13745
|
-
[key: string]: string | number | undefined;
|
|
13746
|
-
}
|
|
13787
|
+
declare function isCSSInjected(id?: string): boolean;
|
|
13788
|
+
|
|
13747
13789
|
/**
|
|
13748
|
-
*
|
|
13749
|
-
*
|
|
13790
|
+
* Config Loader
|
|
13791
|
+
*
|
|
13792
|
+
* Load design tokens from atomix.config.ts and convert to flat token format.
|
|
13750
13793
|
*/
|
|
13751
|
-
|
|
13752
|
-
[key: string]: any;
|
|
13753
|
-
}
|
|
13794
|
+
|
|
13754
13795
|
/**
|
|
13755
|
-
*
|
|
13756
|
-
*
|
|
13796
|
+
* Load theme tokens from atomix.config.ts
|
|
13797
|
+
*
|
|
13798
|
+
* Loads atomix.config.ts and extracts theme tokens.
|
|
13799
|
+
* Config file is required - throws error if not found.
|
|
13800
|
+
*
|
|
13801
|
+
* @param configPath - Optional custom config path (default: 'atomix.config.ts')
|
|
13802
|
+
* @returns Partial DesignTokens from config
|
|
13803
|
+
* @throws Error if config file is not found or cannot be loaded
|
|
13804
|
+
*
|
|
13805
|
+
* @example
|
|
13806
|
+
* ```typescript
|
|
13807
|
+
* const tokens = await loadThemeFromConfig();
|
|
13808
|
+
* const css = createTheme(tokens);
|
|
13809
|
+
* injectTheme(css);
|
|
13810
|
+
* ```
|
|
13757
13811
|
*/
|
|
13758
|
-
|
|
13759
|
-
/** Color palette configuration */
|
|
13760
|
-
palette?: PaletteOptions;
|
|
13761
|
-
/** Typography configuration */
|
|
13762
|
-
typography?: TypographyOptions;
|
|
13763
|
-
/** Spacing configuration */
|
|
13764
|
-
spacing?: SpacingOptions;
|
|
13765
|
-
/** Breakpoints configuration */
|
|
13766
|
-
breakpoints?: BreakpointsOptions;
|
|
13767
|
-
/** Shadow configuration */
|
|
13768
|
-
shadows?: ShadowOptions;
|
|
13769
|
-
/** Transition configuration */
|
|
13770
|
-
transitions?: TransitionOptions;
|
|
13771
|
-
/** Z-index configuration */
|
|
13772
|
-
zIndex?: ZIndexOptions;
|
|
13773
|
-
/** Border radius configuration */
|
|
13774
|
-
borderRadius?: BorderRadiusOptions;
|
|
13775
|
-
/** Custom properties */
|
|
13776
|
-
custom?: ThemeCustomProperties;
|
|
13777
|
-
}
|
|
13812
|
+
declare function loadThemeFromConfig(configPath?: string): Promise<Partial<DesignTokens>>;
|
|
13778
13813
|
/**
|
|
13779
|
-
*
|
|
13780
|
-
*
|
|
13814
|
+
* Load theme tokens from atomix.config.ts (synchronous version)
|
|
13815
|
+
*
|
|
13816
|
+
* Synchronous version that uses require() instead of dynamic import.
|
|
13817
|
+
* Only works in Node.js environment.
|
|
13818
|
+
* Config file is required - throws error if not found.
|
|
13819
|
+
*
|
|
13820
|
+
* @param configPath - Optional custom config path
|
|
13821
|
+
* @returns Partial DesignTokens from config
|
|
13822
|
+
* @throws Error if config file is not found or cannot be loaded
|
|
13781
13823
|
*/
|
|
13782
|
-
|
|
13783
|
-
/** Color palette with computed values */
|
|
13784
|
-
palette: {
|
|
13785
|
-
primary: PaletteColor;
|
|
13786
|
-
secondary: PaletteColor;
|
|
13787
|
-
error: PaletteColor;
|
|
13788
|
-
warning: PaletteColor;
|
|
13789
|
-
info: PaletteColor;
|
|
13790
|
-
success: PaletteColor;
|
|
13791
|
-
background: {
|
|
13792
|
-
default: string;
|
|
13793
|
-
paper: string;
|
|
13794
|
-
subtle: string;
|
|
13795
|
-
};
|
|
13796
|
-
text: {
|
|
13797
|
-
primary: string;
|
|
13798
|
-
secondary: string;
|
|
13799
|
-
disabled: string;
|
|
13800
|
-
};
|
|
13801
|
-
[key: string]: any;
|
|
13802
|
-
};
|
|
13803
|
-
/** Typography with computed values */
|
|
13804
|
-
typography: {
|
|
13805
|
-
fontFamily: string;
|
|
13806
|
-
fontSize: number;
|
|
13807
|
-
fontWeightLight: number;
|
|
13808
|
-
fontWeightRegular: number;
|
|
13809
|
-
fontWeightMedium: number;
|
|
13810
|
-
fontWeightSemiBold: number;
|
|
13811
|
-
fontWeightBold: number;
|
|
13812
|
-
h1: Required<NonNullable<TypographyOptions['h1']>>;
|
|
13813
|
-
h2: Required<NonNullable<TypographyOptions['h2']>>;
|
|
13814
|
-
h3: Required<NonNullable<TypographyOptions['h3']>>;
|
|
13815
|
-
h4: Required<NonNullable<TypographyOptions['h4']>>;
|
|
13816
|
-
h5: Required<NonNullable<TypographyOptions['h5']>>;
|
|
13817
|
-
h6: Required<NonNullable<TypographyOptions['h6']>>;
|
|
13818
|
-
body1: Required<NonNullable<TypographyOptions['body1']>>;
|
|
13819
|
-
body2: Required<NonNullable<TypographyOptions['body2']>>;
|
|
13820
|
-
[key: string]: any;
|
|
13821
|
-
};
|
|
13822
|
-
/** Spacing function */
|
|
13823
|
-
spacing: SpacingFunction;
|
|
13824
|
-
/** Breakpoints with computed values */
|
|
13825
|
-
breakpoints: {
|
|
13826
|
-
values: Required<BreakpointValues>;
|
|
13827
|
-
unit: string;
|
|
13828
|
-
up: (key: keyof BreakpointValues | number) => string;
|
|
13829
|
-
down: (key: keyof BreakpointValues | number) => string;
|
|
13830
|
-
between: (start: keyof BreakpointValues | number, end: keyof BreakpointValues | number) => string;
|
|
13831
|
-
};
|
|
13832
|
-
/** Shadows */
|
|
13833
|
-
shadows: Required<ShadowOptions>;
|
|
13834
|
-
/** Transitions */
|
|
13835
|
-
transitions: Required<TransitionOptions>;
|
|
13836
|
-
/** Z-index values */
|
|
13837
|
-
zIndex: Required<ZIndexOptions>;
|
|
13838
|
-
/** Border radius values */
|
|
13839
|
-
borderRadius: Required<BorderRadiusOptions>;
|
|
13840
|
-
/** Custom properties */
|
|
13841
|
-
custom: ThemeCustomProperties;
|
|
13842
|
-
/** Global CSS variables to apply */
|
|
13843
|
-
cssVars?: Record<string, string | number>;
|
|
13844
|
-
/** Indicates this is a JS theme (not CSS-only) */
|
|
13845
|
-
__isJSTheme: true;
|
|
13846
|
-
}
|
|
13824
|
+
declare function loadThemeFromConfigSync(configPath?: string): Partial<DesignTokens>;
|
|
13847
13825
|
|
|
13848
13826
|
/**
|
|
13849
13827
|
* Theme Provider
|
|
13850
13828
|
*
|
|
13851
13829
|
* React context provider for theme management
|
|
13852
|
-
* Updated to use the new ThemeEngine architecture
|
|
13853
13830
|
*/
|
|
13854
13831
|
|
|
13855
13832
|
/**
|
|
13856
13833
|
* ThemeProvider component
|
|
13857
13834
|
*
|
|
13858
13835
|
* Provides theme context to child components and manages theme state.
|
|
13859
|
-
*
|
|
13836
|
+
*
|
|
13837
|
+
* **Config-First Approach**: If `defaultTheme` is not provided, loads from `atomix.config.ts`.
|
|
13838
|
+
* Config file is required when `defaultTheme` is not provided.
|
|
13860
13839
|
*
|
|
13861
13840
|
* @example
|
|
13862
13841
|
* ```tsx
|
|
13863
13842
|
* import { ThemeProvider } from '@shohojdhara/atomix/theme';
|
|
13864
13843
|
*
|
|
13844
|
+
* // Loads from atomix.config.ts (config file required)
|
|
13865
13845
|
* function App() {
|
|
13866
13846
|
* return (
|
|
13867
13847
|
* <ThemeProvider>
|
|
@@ -13869,6 +13849,15 @@ interface Theme extends ThemeMetadata {
|
|
|
13869
13849
|
* </ThemeProvider>
|
|
13870
13850
|
* );
|
|
13871
13851
|
* }
|
|
13852
|
+
*
|
|
13853
|
+
* // Provide explicit theme (bypasses config)
|
|
13854
|
+
* function App() {
|
|
13855
|
+
* return (
|
|
13856
|
+
* <ThemeProvider defaultTheme="dark">
|
|
13857
|
+
* <YourApp />
|
|
13858
|
+
* </ThemeProvider>
|
|
13859
|
+
* );
|
|
13860
|
+
* }
|
|
13872
13861
|
* ```
|
|
13873
13862
|
*/
|
|
13874
13863
|
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
@@ -13877,7 +13866,6 @@ declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
|
13877
13866
|
* useTheme Hook
|
|
13878
13867
|
*
|
|
13879
13868
|
* React hook for accessing theme context
|
|
13880
|
-
* Updated to work with new ThemeEngine architecture
|
|
13881
13869
|
*/
|
|
13882
13870
|
|
|
13883
13871
|
/**
|
|
@@ -13929,190 +13917,108 @@ interface ThemeErrorBoundaryState {
|
|
|
13929
13917
|
/**
|
|
13930
13918
|
* Error boundary props
|
|
13931
13919
|
*/
|
|
13932
|
-
interface ThemeErrorBoundaryProps {
|
|
13933
|
-
/** Child components */
|
|
13934
|
-
children: ReactNode;
|
|
13935
|
-
/** Fallback UI to render when error occurs */
|
|
13936
|
-
fallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;
|
|
13937
|
-
/** Callback when error occurs */
|
|
13938
|
-
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
13939
|
-
/** Whether to reset error on children change */
|
|
13940
|
-
resetOnPropsChange?: boolean;
|
|
13941
|
-
/** Custom error message */
|
|
13942
|
-
errorMessage?: string;
|
|
13943
|
-
}
|
|
13944
|
-
/**
|
|
13945
|
-
* Theme Error Boundary Component
|
|
13946
|
-
*
|
|
13947
|
-
* Catches errors in the theme system and displays a fallback UI
|
|
13948
|
-
* instead of crashing the entire application.
|
|
13949
|
-
*/
|
|
13950
|
-
declare class ThemeErrorBoundary extends Component<ThemeErrorBoundaryProps, ThemeErrorBoundaryState> {
|
|
13951
|
-
private logger;
|
|
13952
|
-
constructor(props: ThemeErrorBoundaryProps);
|
|
13953
|
-
static getDerivedStateFromError(error: Error): Partial<ThemeErrorBoundaryState>;
|
|
13954
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13955
|
-
componentDidUpdate(prevProps: ThemeErrorBoundaryProps): void;
|
|
13956
|
-
render(): ReactNode;
|
|
13957
|
-
}
|
|
13958
|
-
|
|
13959
|
-
/**
|
|
13960
|
-
* createTheme - Create a theme object with computed values
|
|
13961
|
-
*
|
|
13962
|
-
* Similar to Material-UI's createTheme, this function accepts theme configuration
|
|
13963
|
-
* options and returns a complete theme object with computed values.
|
|
13964
|
-
*
|
|
13965
|
-
* @example
|
|
13966
|
-
* ```typescript
|
|
13967
|
-
* const theme = createTheme({
|
|
13968
|
-
* palette: {
|
|
13969
|
-
* primary: { main: '#7AFFD7' },
|
|
13970
|
-
* secondary: { main: '#FF5733' },
|
|
13971
|
-
* },
|
|
13972
|
-
* typography: {
|
|
13973
|
-
* fontFamily: 'Inter, sans-serif',
|
|
13974
|
-
* },
|
|
13975
|
-
* });
|
|
13976
|
-
* ```
|
|
13977
|
-
*/
|
|
13978
|
-
|
|
13979
|
-
/**
|
|
13980
|
-
* Create a theme object with computed values
|
|
13981
|
-
*
|
|
13982
|
-
* @param options - Theme configuration options
|
|
13983
|
-
* @returns Complete theme object
|
|
13984
|
-
*/
|
|
13985
|
-
declare function createTheme(...options: ThemeOptions[]): Theme;
|
|
13986
|
-
|
|
13987
|
-
/**
|
|
13988
|
-
* Create a theme from Atomix configuration
|
|
13989
|
-
*
|
|
13990
|
-
* This function converts atomix.config.ts format to a theme object
|
|
13991
|
-
* that can be used with ThemeProvider.
|
|
13992
|
-
*
|
|
13993
|
-
* @param config - Atomix configuration object
|
|
13994
|
-
* @returns Theme object ready for use
|
|
13995
|
-
*
|
|
13996
|
-
* @example
|
|
13997
|
-
* ```typescript
|
|
13998
|
-
* import { createThemeFromConfig } from '@shohojdhara/atomix/theme';
|
|
13999
|
-
* import config from './atomix.config';
|
|
14000
|
-
*
|
|
14001
|
-
* const theme = createThemeFromConfig(config);
|
|
14002
|
-
* ```
|
|
14003
|
-
*/
|
|
14004
|
-
declare function createThemeFromConfig(config: AtomixConfig): Theme;
|
|
14005
|
-
|
|
14006
|
-
/**
|
|
14007
|
-
* Theme Tools for Library Users
|
|
14008
|
-
*
|
|
14009
|
-
* Developer-friendly utilities for working with Atomix themes
|
|
14010
|
-
*/
|
|
14011
|
-
|
|
14012
|
-
/**
|
|
14013
|
-
* Quick theme creator with sensible defaults
|
|
14014
|
-
*/
|
|
14015
|
-
declare function quickTheme(name: string, primaryColor: string, secondaryColor?: string): Theme;
|
|
14016
|
-
/**
|
|
14017
|
-
* Create a dark theme variant from a light theme
|
|
14018
|
-
*/
|
|
14019
|
-
declare function createDarkVariant(lightTheme: Theme): Theme;
|
|
14020
|
-
/**
|
|
14021
|
-
* Validate theme structure
|
|
14022
|
-
*/
|
|
14023
|
-
declare function validateTheme(theme: Theme): {
|
|
14024
|
-
valid: boolean;
|
|
14025
|
-
errors: string[];
|
|
14026
|
-
};
|
|
14027
|
-
/**
|
|
14028
|
-
* Generate CSS string from theme
|
|
14029
|
-
*/
|
|
14030
|
-
declare function themeToCSS(theme: Theme, selector?: string): string;
|
|
14031
|
-
/**
|
|
14032
|
-
* Export theme as JSON
|
|
14033
|
-
*/
|
|
14034
|
-
declare function exportTheme(theme: Theme): string;
|
|
13920
|
+
interface ThemeErrorBoundaryProps {
|
|
13921
|
+
/** Child components */
|
|
13922
|
+
children: ReactNode;
|
|
13923
|
+
/** Fallback UI to render when error occurs */
|
|
13924
|
+
fallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;
|
|
13925
|
+
/** Callback when error occurs */
|
|
13926
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
13927
|
+
/** Whether to reset error on children change */
|
|
13928
|
+
resetOnPropsChange?: boolean;
|
|
13929
|
+
/** Custom error message */
|
|
13930
|
+
errorMessage?: string;
|
|
13931
|
+
}
|
|
14035
13932
|
/**
|
|
14036
|
-
*
|
|
13933
|
+
* Theme Error Boundary Component
|
|
13934
|
+
*
|
|
13935
|
+
* Catches errors in the theme system and displays a fallback UI
|
|
13936
|
+
* instead of crashing the entire application.
|
|
14037
13937
|
*/
|
|
14038
|
-
declare
|
|
13938
|
+
declare class ThemeErrorBoundary extends Component<ThemeErrorBoundaryProps, ThemeErrorBoundaryState> {
|
|
13939
|
+
private logger;
|
|
13940
|
+
constructor(props: ThemeErrorBoundaryProps);
|
|
13941
|
+
static getDerivedStateFromError(error: Error): Partial<ThemeErrorBoundaryState>;
|
|
13942
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13943
|
+
componentDidUpdate(prevProps: ThemeErrorBoundaryProps): void;
|
|
13944
|
+
render(): ReactNode;
|
|
13945
|
+
}
|
|
14039
13946
|
|
|
14040
13947
|
/**
|
|
14041
|
-
* Theme
|
|
13948
|
+
* Theme Applicator
|
|
14042
13949
|
*
|
|
14043
|
-
*
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
*
|
|
13950
|
+
* Applies theme configurations to the DOM, including CSS variables,
|
|
13951
|
+
* component overrides, typography, spacing, and color palettes.
|
|
13952
|
+
*
|
|
13953
|
+
* Uses the unified theme system for CSS generation and injection.
|
|
14047
13954
|
*/
|
|
14048
|
-
|
|
14049
|
-
name: string;
|
|
14050
|
-
description: string;
|
|
14051
|
-
options?: Record<string, string>;
|
|
14052
|
-
handler: (args: string[], options: Record<string, any>) => Promise<void> | void;
|
|
14053
|
-
}
|
|
13955
|
+
|
|
14054
13956
|
/**
|
|
14055
|
-
* Theme
|
|
13957
|
+
* Theme applicator class for runtime theme application
|
|
14056
13958
|
*
|
|
14057
|
-
*
|
|
13959
|
+
* Uses the unified theme system for efficient CSS variable generation and injection.
|
|
14058
13960
|
*/
|
|
14059
|
-
declare class
|
|
14060
|
-
private
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
* Register default commands
|
|
14064
|
-
*/
|
|
14065
|
-
private registerDefaultCommands;
|
|
13961
|
+
declare class ThemeApplicator {
|
|
13962
|
+
private root;
|
|
13963
|
+
private styleId;
|
|
13964
|
+
constructor(root?: HTMLElement);
|
|
14066
13965
|
/**
|
|
14067
|
-
*
|
|
13966
|
+
* Apply a complete theme configuration
|
|
13967
|
+
*
|
|
13968
|
+
* Uses the unified theme system to convert Theme to DesignTokens and inject CSS.
|
|
13969
|
+
* Automatically respects atomix.config.ts when using DesignTokens.
|
|
14068
13970
|
*/
|
|
14069
|
-
|
|
13971
|
+
applyTheme(theme: Theme | DesignTokens): void;
|
|
14070
13972
|
/**
|
|
14071
|
-
*
|
|
13973
|
+
* Apply DesignTokens using unified theme system
|
|
13974
|
+
*
|
|
13975
|
+
* Uses createTheme() which automatically loads from atomix.config.ts
|
|
13976
|
+
* if no tokens are provided, ensuring config is always respected.
|
|
14072
13977
|
*/
|
|
14073
|
-
|
|
13978
|
+
private applyDesignTokens;
|
|
14074
13979
|
/**
|
|
14075
|
-
*
|
|
13980
|
+
* Check if object is DesignTokens
|
|
14076
13981
|
*/
|
|
14077
|
-
private
|
|
13982
|
+
private isDesignTokens;
|
|
14078
13983
|
/**
|
|
14079
|
-
*
|
|
13984
|
+
* Apply global CSS variables (for component overrides)
|
|
14080
13985
|
*/
|
|
14081
|
-
private
|
|
13986
|
+
private applyGlobalCSSVars;
|
|
14082
13987
|
/**
|
|
14083
|
-
*
|
|
13988
|
+
* Apply component-level overrides
|
|
14084
13989
|
*/
|
|
14085
|
-
private
|
|
13990
|
+
private applyComponentOverrides;
|
|
14086
13991
|
/**
|
|
14087
|
-
*
|
|
13992
|
+
* Apply override for a specific component
|
|
14088
13993
|
*/
|
|
14089
|
-
private
|
|
13994
|
+
private applyComponentOverride;
|
|
14090
13995
|
/**
|
|
14091
|
-
*
|
|
13996
|
+
* Clear all applied CSS variables
|
|
14092
13997
|
*/
|
|
14093
|
-
private
|
|
13998
|
+
private clearAppliedVars;
|
|
14094
13999
|
/**
|
|
14095
|
-
*
|
|
14000
|
+
* Remove theme application
|
|
14096
14001
|
*/
|
|
14097
|
-
|
|
14002
|
+
removeTheme(): void;
|
|
14098
14003
|
/**
|
|
14099
|
-
*
|
|
14004
|
+
* Update specific CSS variables without clearing all
|
|
14100
14005
|
*/
|
|
14101
|
-
|
|
14006
|
+
updateCSSVars(vars: Record<string, string | number>): void;
|
|
14102
14007
|
}
|
|
14103
14008
|
/**
|
|
14104
|
-
*
|
|
14009
|
+
* Get or create global theme applicator
|
|
14105
14010
|
*/
|
|
14106
|
-
declare function
|
|
14011
|
+
declare function getThemeApplicator(): ThemeApplicator;
|
|
14107
14012
|
/**
|
|
14108
|
-
*
|
|
14013
|
+
* Apply theme using global applicator
|
|
14109
14014
|
*/
|
|
14110
|
-
declare function
|
|
14015
|
+
declare function applyTheme(theme: Theme): void;
|
|
14111
14016
|
|
|
14112
14017
|
/**
|
|
14113
14018
|
* Theme Preview Component
|
|
14114
14019
|
*
|
|
14115
14020
|
* React component for previewing themes in development
|
|
14021
|
+
* Enhanced with interactive components, viewport controls, and dark mode toggle
|
|
14116
14022
|
*/
|
|
14117
14023
|
|
|
14118
14024
|
/**
|
|
@@ -14147,6 +14053,7 @@ declare const ThemePreview: React__default.FC<ThemePreviewProps>;
|
|
|
14147
14053
|
* Theme Inspector Component
|
|
14148
14054
|
*
|
|
14149
14055
|
* React component for inspecting and debugging themes
|
|
14056
|
+
* Enhanced with search/filter and copy path functionality
|
|
14150
14057
|
*/
|
|
14151
14058
|
|
|
14152
14059
|
/**
|
|
@@ -14177,6 +14084,7 @@ declare const ThemeInspector: React__default.FC<ThemeInspectorProps>;
|
|
|
14177
14084
|
* Theme Comparator Component
|
|
14178
14085
|
*
|
|
14179
14086
|
* React component for comparing two themes side-by-side
|
|
14087
|
+
* Enhanced with search/filter and improved visual diff styling
|
|
14180
14088
|
*/
|
|
14181
14089
|
|
|
14182
14090
|
/**
|
|
@@ -14205,6 +14113,7 @@ declare const ThemeComparator: React__default.FC<ThemeComparatorProps>;
|
|
|
14205
14113
|
* Theme Live Editor Component
|
|
14206
14114
|
*
|
|
14207
14115
|
* React component for live editing themes in development
|
|
14116
|
+
* Enhanced with undo/redo, keyboard shortcuts, resizable layout, and better color pickers
|
|
14208
14117
|
*/
|
|
14209
14118
|
|
|
14210
14119
|
/**
|
|
@@ -14228,76 +14137,185 @@ interface ThemeLiveEditorProps {
|
|
|
14228
14137
|
declare const ThemeLiveEditor: React__default.FC<ThemeLiveEditorProps>;
|
|
14229
14138
|
|
|
14230
14139
|
/**
|
|
14231
|
-
* Theme
|
|
14140
|
+
* Theme Validator
|
|
14232
14141
|
*
|
|
14233
|
-
*
|
|
14234
|
-
* component overrides, typography, spacing, and color palettes.
|
|
14142
|
+
* Runtime theme validation including color contrast and accessibility checks
|
|
14235
14143
|
*/
|
|
14236
14144
|
|
|
14237
14145
|
/**
|
|
14238
|
-
*
|
|
14146
|
+
* Validation result
|
|
14239
14147
|
*/
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14148
|
+
interface ValidationResult {
|
|
14149
|
+
/** Whether theme is valid */
|
|
14150
|
+
valid: boolean;
|
|
14151
|
+
/** Validation errors */
|
|
14152
|
+
errors: string[];
|
|
14153
|
+
/** Validation warnings */
|
|
14154
|
+
warnings: string[];
|
|
14155
|
+
/** Accessibility issues */
|
|
14156
|
+
a11yIssues: A11yIssue[];
|
|
14157
|
+
}
|
|
14158
|
+
/**
|
|
14159
|
+
* Accessibility issue
|
|
14160
|
+
*/
|
|
14161
|
+
interface A11yIssue {
|
|
14162
|
+
/** Issue type */
|
|
14163
|
+
type: 'contrast' | 'color' | 'missing';
|
|
14164
|
+
/** Severity */
|
|
14165
|
+
severity: 'error' | 'warning';
|
|
14166
|
+
/** Issue message */
|
|
14167
|
+
message: string;
|
|
14168
|
+
/** Affected property */
|
|
14169
|
+
property?: string;
|
|
14170
|
+
/** Current value */
|
|
14171
|
+
value?: string;
|
|
14172
|
+
/** Recommended value */
|
|
14173
|
+
recommended?: string;
|
|
14174
|
+
}
|
|
14175
|
+
/**
|
|
14176
|
+
* Theme Validator
|
|
14177
|
+
*
|
|
14178
|
+
* Validates themes for correctness and accessibility
|
|
14179
|
+
*/
|
|
14180
|
+
declare class ThemeValidator {
|
|
14244
14181
|
/**
|
|
14245
|
-
*
|
|
14182
|
+
* Validate theme
|
|
14246
14183
|
*/
|
|
14247
|
-
|
|
14184
|
+
validate(theme: Theme, metadata?: ThemeMetadata): ValidationResult;
|
|
14248
14185
|
/**
|
|
14249
|
-
*
|
|
14186
|
+
* Validate palette
|
|
14250
14187
|
*/
|
|
14251
|
-
private
|
|
14188
|
+
private validatePalette;
|
|
14252
14189
|
/**
|
|
14253
|
-
*
|
|
14190
|
+
* Validate typography
|
|
14254
14191
|
*/
|
|
14255
|
-
private
|
|
14192
|
+
private validateTypography;
|
|
14256
14193
|
/**
|
|
14257
|
-
*
|
|
14194
|
+
* Validate spacing
|
|
14258
14195
|
*/
|
|
14259
|
-
private
|
|
14196
|
+
private validateSpacing;
|
|
14260
14197
|
/**
|
|
14261
|
-
*
|
|
14198
|
+
* Validate breakpoints
|
|
14262
14199
|
*/
|
|
14263
|
-
private
|
|
14200
|
+
private validateBreakpoints;
|
|
14264
14201
|
/**
|
|
14265
|
-
*
|
|
14202
|
+
* Check color contrast ratio
|
|
14266
14203
|
*/
|
|
14267
|
-
private
|
|
14204
|
+
private checkContrast;
|
|
14268
14205
|
/**
|
|
14269
|
-
*
|
|
14206
|
+
* Check if color is valid
|
|
14270
14207
|
*/
|
|
14271
|
-
private
|
|
14208
|
+
private isValidColor;
|
|
14272
14209
|
/**
|
|
14273
|
-
*
|
|
14210
|
+
* Validate transitions
|
|
14274
14211
|
*/
|
|
14275
|
-
private
|
|
14212
|
+
private validateTransitions;
|
|
14276
14213
|
/**
|
|
14277
|
-
*
|
|
14214
|
+
* Validate z-index
|
|
14278
14215
|
*/
|
|
14279
|
-
|
|
14216
|
+
private validateZIndex;
|
|
14280
14217
|
/**
|
|
14281
|
-
*
|
|
14218
|
+
* Validate border radius
|
|
14282
14219
|
*/
|
|
14283
|
-
|
|
14220
|
+
private validateBorderRadius;
|
|
14284
14221
|
/**
|
|
14285
|
-
*
|
|
14222
|
+
* Validate custom properties
|
|
14286
14223
|
*/
|
|
14287
|
-
|
|
14224
|
+
private validateCustom;
|
|
14288
14225
|
}
|
|
14226
|
+
|
|
14289
14227
|
/**
|
|
14290
|
-
*
|
|
14228
|
+
* useHistory Hook
|
|
14229
|
+
*
|
|
14230
|
+
* React hook for managing undo/redo history
|
|
14291
14231
|
*/
|
|
14292
|
-
|
|
14232
|
+
interface UseHistoryOptions {
|
|
14233
|
+
/** Maximum number of history entries (default: 50) */
|
|
14234
|
+
maxHistorySize?: number;
|
|
14235
|
+
/** Initial state */
|
|
14236
|
+
initialState?: any;
|
|
14237
|
+
}
|
|
14238
|
+
interface UseHistoryReturn<T> {
|
|
14239
|
+
/** Current state */
|
|
14240
|
+
state: T;
|
|
14241
|
+
/** Update state and add to history */
|
|
14242
|
+
setState: (newState: T) => void;
|
|
14243
|
+
/** Undo last change */
|
|
14244
|
+
undo: () => void;
|
|
14245
|
+
/** Redo last undone change */
|
|
14246
|
+
redo: () => void;
|
|
14247
|
+
/** Check if undo is available */
|
|
14248
|
+
canUndo: boolean;
|
|
14249
|
+
/** Check if redo is available */
|
|
14250
|
+
canRedo: boolean;
|
|
14251
|
+
/** Clear history */
|
|
14252
|
+
clearHistory: () => void;
|
|
14253
|
+
/** Get history statistics */
|
|
14254
|
+
getHistoryStats: () => {
|
|
14255
|
+
currentIndex: number;
|
|
14256
|
+
totalEntries: number;
|
|
14257
|
+
};
|
|
14258
|
+
}
|
|
14293
14259
|
/**
|
|
14294
|
-
*
|
|
14260
|
+
* useHistory hook
|
|
14261
|
+
*
|
|
14262
|
+
* Provides undo/redo functionality for state management
|
|
14263
|
+
*
|
|
14264
|
+
* @example
|
|
14265
|
+
* ```tsx
|
|
14266
|
+
* const { state, setState, undo, redo, canUndo, canRedo } = useHistory({
|
|
14267
|
+
* initialState: theme,
|
|
14268
|
+
* maxHistorySize: 50
|
|
14269
|
+
* });
|
|
14270
|
+
* ```
|
|
14295
14271
|
*/
|
|
14296
|
-
declare function
|
|
14272
|
+
declare function useHistory<T>(options?: UseHistoryOptions): UseHistoryReturn<T>;
|
|
14273
|
+
|
|
14274
|
+
/**
|
|
14275
|
+
* Theme Adapter
|
|
14276
|
+
*
|
|
14277
|
+
* Converts between Theme objects and DesignTokens.
|
|
14278
|
+
*/
|
|
14279
|
+
|
|
14280
|
+
/**
|
|
14281
|
+
* Convert Theme object to DesignTokens
|
|
14282
|
+
*
|
|
14283
|
+
* Extracts values from a Theme object and converts them to flat DesignTokens format.
|
|
14284
|
+
*
|
|
14285
|
+
* @param theme - Theme object to convert
|
|
14286
|
+
* @returns Partial DesignTokens object
|
|
14287
|
+
*
|
|
14288
|
+
* @example
|
|
14289
|
+
* ```typescript
|
|
14290
|
+
* const theme = createTheme({ palette: { primary: { main: '#7c3aed' } } });
|
|
14291
|
+
* const tokens = themeToDesignTokens(theme);
|
|
14292
|
+
* // Returns: { 'primary': '#7c3aed', ... }
|
|
14293
|
+
* ```
|
|
14294
|
+
*/
|
|
14295
|
+
declare function themeToDesignTokens(theme: Theme): Partial<DesignTokens>;
|
|
14296
|
+
/**
|
|
14297
|
+
* Convert DesignTokens to Theme-compatible CSS variables
|
|
14298
|
+
*
|
|
14299
|
+
* @param tokens - DesignTokens object
|
|
14300
|
+
* @returns CSS variables object compatible with Theme.cssVars
|
|
14301
|
+
*/
|
|
14302
|
+
declare function designTokensToCSSVars(tokens: Partial<DesignTokens>): Record<string, string>;
|
|
14303
|
+
/**
|
|
14304
|
+
* Create DesignTokens from Theme with defaults
|
|
14305
|
+
*
|
|
14306
|
+
* Converts a Theme to DesignTokens and merges with default tokens.
|
|
14307
|
+
*
|
|
14308
|
+
* @param theme - Theme object to convert
|
|
14309
|
+
* @returns Complete DesignTokens object
|
|
14310
|
+
*/
|
|
14311
|
+
declare function createDesignTokensFromTheme(theme: Theme): DesignTokens;
|
|
14297
14312
|
/**
|
|
14298
|
-
*
|
|
14313
|
+
* Create a minimal Theme object from DesignTokens
|
|
14314
|
+
*
|
|
14315
|
+
* @param tokens - DesignTokens to convert
|
|
14316
|
+
* @returns Minimal Theme object with cssVars populated
|
|
14299
14317
|
*/
|
|
14300
|
-
declare function
|
|
14318
|
+
declare function designTokensToTheme(tokens: Partial<DesignTokens>): Partial<Theme>;
|
|
14301
14319
|
|
|
14302
14320
|
/**
|
|
14303
14321
|
* CSS Variable Mapper
|
|
@@ -14408,24 +14426,193 @@ declare function isValidCSSVariableName(name: string): boolean;
|
|
|
14408
14426
|
*/
|
|
14409
14427
|
declare function extractComponentName(varName: string, prefix?: string): string | null;
|
|
14410
14428
|
|
|
14429
|
+
/**
|
|
14430
|
+
* Theme Helper Functions
|
|
14431
|
+
*
|
|
14432
|
+
* Utility functions for working with themes and DesignTokens
|
|
14433
|
+
*/
|
|
14434
|
+
|
|
14435
|
+
/**
|
|
14436
|
+
* Get DesignTokens from current theme
|
|
14437
|
+
*
|
|
14438
|
+
* Converts a Theme object to DesignTokens. Useful when you need to
|
|
14439
|
+
* work with DesignTokens but have a Theme object.
|
|
14440
|
+
*
|
|
14441
|
+
* @param theme - Theme object to convert
|
|
14442
|
+
* @returns DesignTokens object
|
|
14443
|
+
*
|
|
14444
|
+
* @example
|
|
14445
|
+
* ```typescript
|
|
14446
|
+
* // If you have a Theme object, convert it to DesignTokens
|
|
14447
|
+
* const tokens = getDesignTokensFromTheme(theme);
|
|
14448
|
+
* // Now you can use tokens with unified theme system
|
|
14449
|
+
* const css = createTheme(tokens);
|
|
14450
|
+
* ```
|
|
14451
|
+
*/
|
|
14452
|
+
declare function getDesignTokensFromTheme(theme: Theme | null): DesignTokens | null;
|
|
14453
|
+
/**
|
|
14454
|
+
* Check if a value is DesignTokens
|
|
14455
|
+
*
|
|
14456
|
+
* Type guard to check if an object is DesignTokens format.
|
|
14457
|
+
*
|
|
14458
|
+
* @param value - Value to check
|
|
14459
|
+
* @returns True if value is DesignTokens
|
|
14460
|
+
*/
|
|
14461
|
+
declare function isDesignTokens(value: unknown): value is DesignTokens;
|
|
14462
|
+
/**
|
|
14463
|
+
* Check if a value is a Theme object
|
|
14464
|
+
*
|
|
14465
|
+
* Type guard to check if an object is a Theme.
|
|
14466
|
+
*
|
|
14467
|
+
* @param value - Value to check
|
|
14468
|
+
* @returns True if value is Theme
|
|
14469
|
+
*/
|
|
14470
|
+
declare function isThemeObject(value: unknown): value is Theme;
|
|
14471
|
+
|
|
14472
|
+
/**
|
|
14473
|
+
* RTL (Right-to-Left) Support Utilities
|
|
14474
|
+
*
|
|
14475
|
+
* Provides utilities for managing RTL text direction in themes
|
|
14476
|
+
*/
|
|
14477
|
+
/**
|
|
14478
|
+
* RTL configuration options
|
|
14479
|
+
*/
|
|
14480
|
+
interface RTLConfig {
|
|
14481
|
+
/** Enable RTL mode */
|
|
14482
|
+
enabled: boolean;
|
|
14483
|
+
/** Current direction ('ltr' | 'rtl') */
|
|
14484
|
+
direction: 'ltr' | 'rtl';
|
|
14485
|
+
/** Data attribute name for direction */
|
|
14486
|
+
dataAttribute?: string;
|
|
14487
|
+
/** Auto-detect from locale */
|
|
14488
|
+
autoDetect?: boolean;
|
|
14489
|
+
/** Locale code (e.g., 'ar', 'he', 'fa') */
|
|
14490
|
+
locale?: string;
|
|
14491
|
+
}
|
|
14492
|
+
/**
|
|
14493
|
+
* RTL Manager
|
|
14494
|
+
*
|
|
14495
|
+
* Manages RTL text direction for the theme system
|
|
14496
|
+
*/
|
|
14497
|
+
declare class RTLManager {
|
|
14498
|
+
private config;
|
|
14499
|
+
private listeners;
|
|
14500
|
+
constructor(config?: Partial<RTLConfig>);
|
|
14501
|
+
/**
|
|
14502
|
+
* Detect locale from browser
|
|
14503
|
+
*/
|
|
14504
|
+
private detectLocale;
|
|
14505
|
+
/**
|
|
14506
|
+
* Check if locale is RTL
|
|
14507
|
+
*/
|
|
14508
|
+
isRTLLocale(locale: string): boolean;
|
|
14509
|
+
/**
|
|
14510
|
+
* Get current direction
|
|
14511
|
+
*/
|
|
14512
|
+
getDirection(): 'ltr' | 'rtl';
|
|
14513
|
+
/**
|
|
14514
|
+
* Check if RTL is enabled
|
|
14515
|
+
*/
|
|
14516
|
+
isEnabled(): boolean;
|
|
14517
|
+
/**
|
|
14518
|
+
* Set direction
|
|
14519
|
+
*/
|
|
14520
|
+
setDirection(direction: 'ltr' | 'rtl'): void;
|
|
14521
|
+
/**
|
|
14522
|
+
* Toggle direction
|
|
14523
|
+
*/
|
|
14524
|
+
toggleDirection(): 'ltr' | 'rtl';
|
|
14525
|
+
/**
|
|
14526
|
+
* Enable RTL
|
|
14527
|
+
*/
|
|
14528
|
+
enable(): void;
|
|
14529
|
+
/**
|
|
14530
|
+
* Disable RTL
|
|
14531
|
+
*/
|
|
14532
|
+
disable(): void;
|
|
14533
|
+
/**
|
|
14534
|
+
* Set locale and auto-adjust direction
|
|
14535
|
+
*/
|
|
14536
|
+
setLocale(locale: string): void;
|
|
14537
|
+
/**
|
|
14538
|
+
* Get current locale
|
|
14539
|
+
*/
|
|
14540
|
+
getLocale(): string | undefined;
|
|
14541
|
+
/**
|
|
14542
|
+
* Apply direction to DOM
|
|
14543
|
+
*/
|
|
14544
|
+
private applyDirection;
|
|
14545
|
+
/**
|
|
14546
|
+
* Add direction change listener
|
|
14547
|
+
*/
|
|
14548
|
+
onDirectionChange(callback: (direction: 'ltr' | 'rtl') => void): () => void;
|
|
14549
|
+
/**
|
|
14550
|
+
* Notify listeners of direction change
|
|
14551
|
+
*/
|
|
14552
|
+
private notifyListeners;
|
|
14553
|
+
/**
|
|
14554
|
+
* Get RTL-aware value
|
|
14555
|
+
*
|
|
14556
|
+
* Returns different values based on direction
|
|
14557
|
+
*/
|
|
14558
|
+
getValue<T>(ltrValue: T, rtlValue: T): T;
|
|
14559
|
+
/**
|
|
14560
|
+
* Get RTL-aware CSS property
|
|
14561
|
+
*
|
|
14562
|
+
* Returns appropriate CSS property based on direction
|
|
14563
|
+
*/
|
|
14564
|
+
getCSSProperty(property: string): string;
|
|
14565
|
+
/**
|
|
14566
|
+
* Destroy RTL manager
|
|
14567
|
+
*/
|
|
14568
|
+
destroy(): void;
|
|
14569
|
+
}
|
|
14570
|
+
|
|
14411
14571
|
/**
|
|
14412
14572
|
* Theme System Exports
|
|
14413
14573
|
*
|
|
14414
|
-
*
|
|
14574
|
+
* Unified theme system - handles both DesignTokens and Theme objects.
|
|
14575
|
+
*
|
|
14576
|
+
* @example
|
|
14577
|
+
* ```typescript
|
|
14578
|
+
* import { createTheme, injectTheme } from '@shohojdhara/atomix/theme';
|
|
14579
|
+
*
|
|
14580
|
+
* // Using DesignTokens (recommended - flat structure)
|
|
14581
|
+
* const css = createTheme({ 'primary': '#7AFFD7', 'spacing-4': '1rem' });
|
|
14582
|
+
* injectTheme(css);
|
|
14583
|
+
*
|
|
14584
|
+
* // Or use with ThemeProvider
|
|
14585
|
+
* import { ThemeProvider } from '@shohojdhara/atomix/theme';
|
|
14586
|
+
* const tokens = { 'primary': '#7c3aed' };
|
|
14587
|
+
* <ThemeProvider defaultTheme={tokens}>...</ThemeProvider>
|
|
14588
|
+
* ```
|
|
14589
|
+
*/
|
|
14590
|
+
|
|
14591
|
+
/**
|
|
14592
|
+
* Inject theme CSS into DOM
|
|
14593
|
+
*/
|
|
14594
|
+
declare function injectTheme(css: string, id?: string): void;
|
|
14595
|
+
/**
|
|
14596
|
+
* Remove theme from DOM
|
|
14597
|
+
*/
|
|
14598
|
+
declare function removeTheme(id?: string): void;
|
|
14599
|
+
/**
|
|
14600
|
+
* Save theme to CSS file
|
|
14415
14601
|
*/
|
|
14602
|
+
declare function saveTheme(css: string, filePath: string): Promise<void>;
|
|
14416
14603
|
|
|
14417
|
-
type
|
|
14604
|
+
type themeImport_A11yIssue = A11yIssue;
|
|
14418
14605
|
type themeImport_CSSVariableConfig = CSSVariableConfig;
|
|
14419
14606
|
type themeImport_CSSVariableNamingOptions = CSSVariableNamingOptions;
|
|
14420
14607
|
type themeImport_ComponentThemeOverride = ComponentThemeOverride;
|
|
14608
|
+
type themeImport_DesignTokens = DesignTokens;
|
|
14609
|
+
type themeImport_GenerateCSSVariablesOptions = GenerateCSSVariablesOptions;
|
|
14421
14610
|
type themeImport_RTLConfig = RTLConfig;
|
|
14422
14611
|
type themeImport_RTLManager = RTLManager;
|
|
14423
14612
|
declare const themeImport_RTLManager: typeof RTLManager;
|
|
14424
14613
|
type themeImport_Theme = Theme;
|
|
14425
14614
|
type themeImport_ThemeApplicator = ThemeApplicator;
|
|
14426
14615
|
declare const themeImport_ThemeApplicator: typeof ThemeApplicator;
|
|
14427
|
-
type themeImport_ThemeCLI = ThemeCLI;
|
|
14428
|
-
declare const themeImport_ThemeCLI: typeof ThemeCLI;
|
|
14429
14616
|
type themeImport_ThemeChangeEvent = ThemeChangeEvent;
|
|
14430
14617
|
declare const themeImport_ThemeComparator: typeof ThemeComparator;
|
|
14431
14618
|
type themeImport_ThemeComparatorProps = ThemeComparatorProps;
|
|
@@ -14440,43 +14627,63 @@ type themeImport_ThemeInspectorProps = ThemeInspectorProps;
|
|
|
14440
14627
|
declare const themeImport_ThemeLiveEditor: typeof ThemeLiveEditor;
|
|
14441
14628
|
type themeImport_ThemeLiveEditorProps = ThemeLiveEditorProps;
|
|
14442
14629
|
type themeImport_ThemeLoadOptions = ThemeLoadOptions;
|
|
14443
|
-
type themeImport_ThemeManager = ThemeManager;
|
|
14444
|
-
declare const themeImport_ThemeManager: typeof ThemeManager;
|
|
14445
|
-
type themeImport_ThemeManagerConfig = ThemeManagerConfig;
|
|
14446
14630
|
type themeImport_ThemeMetadata = ThemeMetadata;
|
|
14447
14631
|
declare const themeImport_ThemePreview: typeof ThemePreview;
|
|
14448
14632
|
type themeImport_ThemePreviewProps = ThemePreviewProps;
|
|
14449
14633
|
declare const themeImport_ThemeProvider: typeof ThemeProvider;
|
|
14450
14634
|
type themeImport_ThemeProviderProps = ThemeProviderProps;
|
|
14635
|
+
type themeImport_ThemeRegistry = ThemeRegistry;
|
|
14636
|
+
declare const themeImport_ThemeRegistry: typeof ThemeRegistry;
|
|
14451
14637
|
type themeImport_ThemeValidationResult = ThemeValidationResult;
|
|
14638
|
+
type themeImport_ThemeValidator = ThemeValidator;
|
|
14639
|
+
declare const themeImport_ThemeValidator: typeof ThemeValidator;
|
|
14640
|
+
type themeImport_UseHistoryOptions = UseHistoryOptions;
|
|
14641
|
+
type themeImport_UseHistoryReturn<T> = UseHistoryReturn<T>;
|
|
14452
14642
|
type themeImport_UseThemeReturn = UseThemeReturn;
|
|
14643
|
+
type themeImport_ValidationResult = ValidationResult;
|
|
14453
14644
|
declare const themeImport_applyCSSVariables: typeof applyCSSVariables;
|
|
14454
14645
|
declare const themeImport_applyTheme: typeof applyTheme;
|
|
14455
|
-
declare const
|
|
14456
|
-
declare const themeImport_createDarkVariant: typeof createDarkVariant;
|
|
14646
|
+
declare const themeImport_createDesignTokensFromTheme: typeof createDesignTokensFromTheme;
|
|
14457
14647
|
declare const themeImport_createTheme: typeof createTheme;
|
|
14458
|
-
declare const
|
|
14648
|
+
declare const themeImport_createThemeObject: typeof createThemeObject;
|
|
14649
|
+
declare const themeImport_createTokens: typeof createTokens;
|
|
14459
14650
|
declare const themeImport_cssVarsToStyle: typeof cssVarsToStyle;
|
|
14460
|
-
declare const
|
|
14651
|
+
declare const themeImport_deepMerge: typeof deepMerge;
|
|
14652
|
+
declare const themeImport_defaultTokens: typeof defaultTokens;
|
|
14653
|
+
declare const themeImport_designTokensToCSSVars: typeof designTokensToCSSVars;
|
|
14654
|
+
declare const themeImport_designTokensToTheme: typeof designTokensToTheme;
|
|
14655
|
+
declare const themeImport_extendTheme: typeof extendTheme;
|
|
14461
14656
|
declare const themeImport_extractComponentName: typeof extractComponentName;
|
|
14462
14657
|
declare const themeImport_generateCSSVariableName: typeof generateCSSVariableName;
|
|
14658
|
+
declare const themeImport_generateCSSVariables: typeof generateCSSVariables;
|
|
14659
|
+
declare const themeImport_generateCSSVariablesForSelector: typeof generateCSSVariablesForSelector;
|
|
14463
14660
|
declare const themeImport_generateComponentCSSVars: typeof generateComponentCSSVars;
|
|
14464
14661
|
declare const themeImport_getCSSVariable: typeof getCSSVariable;
|
|
14662
|
+
declare const themeImport_getDesignTokensFromTheme: typeof getDesignTokensFromTheme;
|
|
14465
14663
|
declare const themeImport_getThemeApplicator: typeof getThemeApplicator;
|
|
14466
|
-
declare const
|
|
14664
|
+
declare const themeImport_injectCSS: typeof injectCSS;
|
|
14665
|
+
declare const themeImport_injectTheme: typeof injectTheme;
|
|
14666
|
+
declare const themeImport_isCSSInjected: typeof isCSSInjected;
|
|
14667
|
+
declare const themeImport_isDesignTokens: typeof isDesignTokens;
|
|
14668
|
+
declare const themeImport_isThemeObject: typeof isThemeObject;
|
|
14467
14669
|
declare const themeImport_isValidCSSVariableName: typeof isValidCSSVariableName;
|
|
14670
|
+
declare const themeImport_loadThemeFromConfig: typeof loadThemeFromConfig;
|
|
14671
|
+
declare const themeImport_loadThemeFromConfigSync: typeof loadThemeFromConfigSync;
|
|
14468
14672
|
declare const themeImport_mapSCSSTokensToCSSVars: typeof mapSCSSTokensToCSSVars;
|
|
14469
14673
|
declare const themeImport_mergeCSSVars: typeof mergeCSSVars;
|
|
14470
|
-
declare const
|
|
14674
|
+
declare const themeImport_mergeTheme: typeof mergeTheme;
|
|
14675
|
+
declare const themeImport_removeCSS: typeof removeCSS;
|
|
14471
14676
|
declare const themeImport_removeCSSVariables: typeof removeCSSVariables;
|
|
14472
14677
|
declare const themeImport_removeTheme: typeof removeTheme;
|
|
14473
|
-
declare const
|
|
14474
|
-
declare const
|
|
14678
|
+
declare const themeImport_saveCSSFile: typeof saveCSSFile;
|
|
14679
|
+
declare const themeImport_saveCSSFileSync: typeof saveCSSFileSync;
|
|
14680
|
+
declare const themeImport_saveTheme: typeof saveTheme;
|
|
14681
|
+
declare const themeImport_themeToDesignTokens: typeof themeToDesignTokens;
|
|
14682
|
+
declare const themeImport_useHistory: typeof useHistory;
|
|
14475
14683
|
declare const themeImport_useTheme: typeof useTheme;
|
|
14476
|
-
declare const themeImport_validateTheme: typeof validateTheme;
|
|
14477
14684
|
declare namespace themeImport {
|
|
14478
|
-
export { themeImport_RTLManager as RTLManager, themeImport_ThemeApplicator as ThemeApplicator,
|
|
14479
|
-
export type {
|
|
14685
|
+
export { themeImport_RTLManager as RTLManager, themeImport_ThemeApplicator as ThemeApplicator, themeImport_ThemeComparator as ThemeComparator, themeImport_ThemeContext as ThemeContext, themeImport_ThemeErrorBoundary as ThemeErrorBoundary, themeImport_ThemeInspector as ThemeInspector, themeImport_ThemeLiveEditor as ThemeLiveEditor, themeImport_ThemePreview as ThemePreview, themeImport_ThemeProvider as ThemeProvider, themeImport_ThemeRegistry as ThemeRegistry, themeImport_ThemeValidator as ThemeValidator, themeImport_applyCSSVariables as applyCSSVariables, themeImport_applyTheme as applyTheme, themeImport_createDesignTokensFromTheme as createDesignTokensFromTheme, themeImport_createTheme as createTheme, themeImport_createThemeObject as createThemeObject, themeImport_createTokens as createTokens, themeImport_cssVarsToStyle as cssVarsToStyle, themeImport_deepMerge as deepMerge, themeImport_defaultTokens as defaultTokens, themeImport_designTokensToCSSVars as designTokensToCSSVars, themeImport_designTokensToTheme as designTokensToTheme, themeImport_extendTheme as extendTheme, themeImport_extractComponentName as extractComponentName, themeImport_generateCSSVariableName as generateCSSVariableName, themeImport_generateCSSVariables as generateCSSVariables, themeImport_generateCSSVariablesForSelector as generateCSSVariablesForSelector, themeImport_generateComponentCSSVars as generateComponentCSSVars, themeImport_getCSSVariable as getCSSVariable, themeImport_getDesignTokensFromTheme as getDesignTokensFromTheme, themeImport_getThemeApplicator as getThemeApplicator, themeImport_injectCSS as injectCSS, themeImport_injectTheme as injectTheme, themeImport_isCSSInjected as isCSSInjected, themeImport_isDesignTokens as isDesignTokens, themeImport_isThemeObject as isThemeObject, themeImport_isValidCSSVariableName as isValidCSSVariableName, themeImport_loadThemeFromConfig as loadThemeFromConfig, themeImport_loadThemeFromConfigSync as loadThemeFromConfigSync, themeImport_mapSCSSTokensToCSSVars as mapSCSSTokensToCSSVars, themeImport_mergeCSSVars as mergeCSSVars, themeImport_mergeTheme as mergeTheme, themeImport_removeCSS as removeCSS, themeImport_removeCSSVariables as removeCSSVariables, themeImport_removeTheme as removeTheme, themeImport_saveCSSFile as saveCSSFile, themeImport_saveCSSFileSync as saveCSSFileSync, themeImport_saveTheme as saveTheme, themeImport_themeToDesignTokens as themeToDesignTokens, themeImport_useHistory as useHistory, themeImport_useTheme as useTheme };
|
|
14686
|
+
export type { themeImport_A11yIssue as A11yIssue, themeImport_CSSVariableConfig as CSSVariableConfig, themeImport_CSSVariableNamingOptions as CSSVariableNamingOptions, themeImport_ComponentThemeOverride as ComponentThemeOverride, themeImport_DesignTokens as DesignTokens, themeImport_GenerateCSSVariablesOptions as GenerateCSSVariablesOptions, themeImport_RTLConfig as RTLConfig, themeImport_Theme as Theme, themeImport_ThemeChangeEvent as ThemeChangeEvent, themeImport_ThemeComparatorProps as ThemeComparatorProps, themeImport_ThemeComponentOverrides as ThemeComponentOverrides, themeImport_ThemeContextValue as ThemeContextValue, themeImport_ThemeErrorBoundaryProps as ThemeErrorBoundaryProps, themeImport_ThemeInspectorProps as ThemeInspectorProps, themeImport_ThemeLiveEditorProps as ThemeLiveEditorProps, themeImport_ThemeLoadOptions as ThemeLoadOptions, themeImport_ThemeMetadata as ThemeMetadata, themeImport_ThemePreviewProps as ThemePreviewProps, themeImport_ThemeProviderProps as ThemeProviderProps, themeImport_ThemeValidationResult as ThemeValidationResult, themeImport_UseHistoryOptions as UseHistoryOptions, themeImport_UseHistoryReturn as UseHistoryReturn, themeImport_UseThemeReturn as UseThemeReturn, themeImport_ValidationResult as ValidationResult };
|
|
14480
14687
|
}
|
|
14481
14688
|
|
|
14482
14689
|
/**
|
|
@@ -14845,6 +15052,7 @@ declare const atomix: {
|
|
|
14845
15052
|
Block: React$1.ForwardRefExoticComponent<BlockProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
14846
15053
|
Breadcrumb: React$1.FC<BreadcrumbProps>;
|
|
14847
15054
|
Button: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<Omit<ButtonProps & ButtonAsProp, "ref"> & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>>;
|
|
15055
|
+
ButtonGroup: React$1.FC<ButtonGroupProps>;
|
|
14848
15056
|
Callout: React$1.FC<CalloutProps>;
|
|
14849
15057
|
Card: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement | HTMLAnchorElement>>>;
|
|
14850
15058
|
ElevationCard: React$1.FC<ElevationCardProps>;
|
|
@@ -14935,5 +15143,5 @@ declare const atomix: {
|
|
|
14935
15143
|
VideoPlayer: React$1.ForwardRefExoticComponent<VideoPlayerProps & React$1.RefAttributes<HTMLVideoElement>>;
|
|
14936
15144
|
};
|
|
14937
15145
|
|
|
14938
|
-
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GLASS_CONTAINER, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator,
|
|
14939
|
-
export type { AccordionParts, AccordionProps$1 as AccordionProps, AccordionState, AnimatedChartProps, AreaChartProps, AtomixConfig, AtomixGlassProps, AtomixLogoProps, AvatarGroupProps, AvatarParts, AvatarProps, AvatarSize, BadgeCSSVariable, BadgeParts, BadgeProps, BarChartOptions, BarChartProps, BarDimensions, BaseComponentProps, BlockProps, BreadcrumbInstance, BreadcrumbItem$1 as BreadcrumbItem, BreadcrumbOptions$1 as BreadcrumbOptions, BreadcrumbProps, BubbleChartProps, BubbleDataPoint, BuildConfig, ButtonCSSVariable, ButtonIconSlotProps, ButtonLabelSlotProps, ButtonParts, ButtonProps, ButtonRootSlotProps, ButtonSpinnerSlotProps,
|
|
15146
|
+
export { ACCORDION, ATOMIX_GLASS, AVATAR, AVATAR_GROUP, Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, BADGE, BADGE_CSS_VARS, BLOCK, BREADCRUMB, BUTTON, BUTTON_CSS_VARS, BUTTON_GROUP, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, ButtonGroup, CALLOUT, CARD, CARD_CSS_VARS, CHART, CHECKBOX_CSS_VARS, CLASS_PREFIX, CODE_SNIPPET, COMPONENT_CSS_VARS, COUNTDOWN, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DATA_TABLE_CLASSES, DATA_TABLE_SELECTORS, DATEPICKER, DEFAULT_ATOMIX_FONTS, DOTS, DROPDOWN, DROPDOWN_CSS_VARS, DataTable, DatePicker, DonutChart, Dropdown, EDGE_PANEL, EdgePanel, ElevationCard, FOOTER, FORM, FORM_GROUP, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GLASS_CONTAINER, GaugeChart, Grid, GridCol, HERO, HeatmapChart, Hero, INPUT, INPUT_CSS_VARS, Icon, Input, LIST, LIST_GROUP, LineChart, List, ListGroup, MESSAGES, MODAL, MODAL_CSS_VARS, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, NAV, NAVBAR, Nav, NavDropdown, NavItem, Navbar, PAGINATION_DEFAULTS, PHOTOVIEWER, POPOVER, PROGRESS, PROGRESS_CSS_VARS, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RADIO, RADIO_CSS_VARS, RATING, RIVER, RTLManager, RadarChart, Radio, Rating, River, Row, SECTION_INTRO, SELECT, SIDE_MENU, SIZES, SLIDER, SPINNER, STEPS, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, TAB, TABS_CSS_VARS, TESTIMONIAL, TEXTAREA, THEME_COLORS, TODO, TOGGLE, TOOLTIP, TOOLTIP_CSS_VARS, Tabs, Testimonial, Textarea, ThemeApplicator, ThemeComparator, ThemeContext, ThemeErrorBoundary, ThemeInspector, ThemeLiveEditor, ThemePreview, ThemeProvider, ThemeRegistry, ThemeValidator, Todo, Toggle, Tooltip, TreemapChart, UPLOAD, Upload, VIDEO_PLAYER, VideoPlayer, WaterfallChart, applyCSSVariables, applyCSSVarsToStyle, applyPartStyles, applyTheme, composables, constants, createCSSVarStyle, createDebugAttrs, createDesignTokensFromTheme, createFontPreloadLink, createPartProps, createSlotComponent, createSlotProps, createTheme, createThemeObject, createTokens, cssVarsToStyle, deepMerge, atomix as default, defaultTokens, defineConfig, designTokensToCSSVars, designTokensToTheme, extendTheme, extractComponentName, extractYouTubeId, generateCSSVariableName, generateCSSVariables, generateCSSVariablesForSelector, generateComponentCSSVars, generateFontPreloadTags, generateUUID, getCSSVariable, getComponentCSSVars, getDesignTokensFromTheme, getPartStyles, getThemeApplicator, hasCustomization, injectCSS, injectTheme, isCSSInjected, isDesignTokens, isSlot, isThemeObject, isValidCSSVariableName, isYouTubeUrl, loadAtomixConfig, loadThemeFromConfig, loadThemeFromConfigSync, mapSCSSTokensToCSSVars, mergeCSSVars, mergeClassNames, mergeComponentProps, mergePartStyles, mergeSlots, mergeTheme, preloadFonts, removeCSS, removeCSSVariables, removeTheme, renderSlot, resolveConfigPath, saveCSSFile, saveCSSFileSync, saveTheme, sliderConstants, theme, themeToDesignTokens, types, useAccordion, useAtomixGlass, useBadge, useBarChart, useBlock, useBreadcrumb, useButton, useCard, useChartData, useChartInteraction, useChartScale, useCheckbox, useComponentCustomization, useComponentDefaultProps, useDataTable, useEdgePanel, useForm, useFormGroup, useGlassContainer, useHero, useHistory, useInput, useLineChart, useMergedProps, useModal, useNav, useNavDropdown, useNavItem, useNavbar, usePagination, usePieChart, useRadio, useRiver, useSelect, useSideMenu, useSideMenuItem, useSlider, useSlot, useSpinner, useTextarea, useTheme, useTodo, utils };
|
|
15147
|
+
export type { A11yIssue, AccordionParts, AccordionProps$1 as AccordionProps, AccordionState, AnimatedChartProps, AreaChartProps, AtomixConfig, AtomixGlassProps, AtomixLogoProps, AvatarGroupProps, AvatarParts, AvatarProps, AvatarSize, BadgeCSSVariable, BadgeParts, BadgeProps, BarChartOptions, BarChartProps, BarDimensions, BaseComponentProps, BlockProps, BreadcrumbInstance, BreadcrumbItem$1 as BreadcrumbItem, BreadcrumbOptions$1 as BreadcrumbOptions, BreadcrumbProps, BubbleChartProps, BubbleDataPoint, BuildConfig, ButtonCSSVariable, ButtonGroupProps, ButtonIconSlotProps, ButtonLabelSlotProps, ButtonParts, ButtonProps, ButtonRootSlotProps, ButtonSpinnerSlotProps, CSSThemeDefinition, CSSVariableConfig, CSSVariableNamingOptions, CalloutProps, CandlestickChartProps, CandlestickDataPoint, CardBodySlotProps, CardCSSVariable, CardFooterSlotProps, CardHeaderSlotProps, CardParts, CardProps, CardRootSlotProps, ChartAxis$1 as ChartAxis, ChartConfig$1 as ChartConfig, ChartDataPoint$1 as ChartDataPoint, ChartDataset$1 as ChartDataset, ChartProps$1 as ChartProps, ChartSize$1 as ChartSize, ChartType$1 as ChartType, CheckboxCSSVariable, CheckboxParts, CheckboxProps, CodeBlockProps, ColorModeToggleProps, ColorScale, ComponentCSSVariables, ComponentCustomization, ComponentName, ComponentParts, ComponentPartsMap, ComponentThemeOverride, ContainerProps, CountdownProps, CustomizableComponentProps, DataTableColumn, DataTableParts, DataTableProps, DatePickerProps, DesignTokens, DisplacementMode, DonutChartProps, DropdownCSSVariable, DropdownDividerProps, DropdownHeaderProps, DropdownItemProps, DropdownMenuSlotProps, DropdownParts, DropdownPlacement, DropdownProps, DropdownRootSlotProps, DropdownToggleSlotProps, DropdownTrigger, EdgePanelMode, EdgePanelPosition, EdgePanelProps, ElementRefs, ElevationCardProps, FontPreloadConfig, FooterLayout, FooterLinkProps, FooterProps, FooterSectionProps, FooterSocialLinkProps, FormGroupParts, FormGroupProps, FormProps, FunnelChartProps, FunnelDataPoint, GaugeChartProps, GenerateCSSVariablesOptions, GlassContainerProps, GlassMode, GlassSize, GridColProps, GridProps, HeatmapChartProps, HeatmapDataPoint, HeroAlignment, HeroBackgroundSlide, HeroBackgroundSliderConfig, HeroProps, IconPosition, IconProps, IconSize$1 as IconSize, IconWeight$1 as IconWeight, ImageType, InputCSSVariable, InputElementSlotProps, InputParts, InputProps, InputRootSlotProps, IntegrationConfig, JSThemeDefinition, LineChartOptions, LineChartProps, ListGroupProps$1 as ListGroupProps, ListParts, ListProps, MasonryGridItemProps, MasonryGridProps, MegaMenuColumnProps, MegaMenuLinkProps, MegaMenuProps, MenuDividerProps, MenuItemProps, MenuProps, MergePropsOptions, MessageItem, MessagesProps, ModalBackdropSlotProps, ModalCSSVariable, ModalContentSlotProps, ModalDialogSlotProps, ModalParts, ModalProps, ModalRootSlotProps, MousePosition, MultiAxisChartProps, NavAlignment, NavDropdownProps, NavItemProps, NavProps, NavVariant, NavbarParts, NavbarPosition, NavbarProps, OverLightConfig, OverLightObjectConfig, PaginationProps, PaletteColorOptions, PartStyleProps, PhosphorIconsType$1 as PhosphorIconsType, PhotoViewerProps, PieChartOptions, PieChartProps, PieSlice, PopoverProps, PopoverTriggerProps, ProductReviewProps, ProgressCSSVariable, ProgressParts, ProgressProps, RTLConfig, RadarChartProps, RadioCSSVariable, RadioParts, RadioProps, RatingProps, RiverContentColumn, RiverProps, RowProps, RuntimeConfig, ScatterChartProps, ScatterDataPoint, SectionIntroProps, SelectOption, SelectParts, SelectProps, SideMenuItemProps, SideMenuListProps, SideMenuProps, Size, SliderAutoplay, SliderBreakpoint, SliderEffect, SliderLazy, SliderNavigation, SliderPagination, SliderProps, SliderRefs, SliderScrollbar, SliderSlide, SliderState, SliderThumbs, SliderVirtual, SliderZoom, SlotProps, SocialLink, SocialPlatform, SortConfig, SpinnerProps, StateModifier, StepsProps, TabsCSSVariable, TabsParts, TabsProps, TestimonialProps, TextareaParts, TextareaProps, Theme, ThemeChangeEvent, ThemeColor, ThemeComparatorProps, ThemeComponentOverrides, ThemeContextValue, ThemeDefinition, ThemeErrorBoundaryProps, ThemeInspectorProps, ThemeLiveEditorProps, ThemeLoadOptions, ThemeMetadata, ThemeName, ThemePreviewProps, ThemeProviderProps, ThemeTokens, ThemeValidationResult, TodoItem, TodoProps, ToggleProps, TooltipCSSVariable, TooltipParts, TooltipProps, TreemapChartProps, TreemapDataPoint, TreemapNode, UploadProps, UseBlockOptions, UseBlockReturn, UseCardOptions, UseCardReturn, UseDataTableProps, UseDataTableReturn, UseHistoryOptions, UseHistoryReturn, UseModalProps, UseModalReturn, UseSliderOptions, UseSliderReturn, UseThemeReturn, ValidationResult, Variant, VideoChapter, VideoPlayerProps, VideoQuality, VideoSubtitle, WaterfallChartProps, WaterfallDataPoint, listvariant };
|