@shohojdhara/atomix 0.3.15 → 0.4.1
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/build-tools/index.d.ts +31 -30
- package/build-tools/package.json +4 -21
- package/dist/atomix.css +20234 -2027
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +76 -2
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/index.d.ts +31 -30
- package/dist/build-tools/package.json +4 -21
- package/dist/charts.js +4 -5
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +87 -10
- package/dist/core.js +673 -480
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +15 -3
- package/dist/forms.js +530 -97
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +5 -6
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +644 -277
- package/dist/index.esm.js +1948 -1347
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3333 -2728
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.js.map +1 -1
- package/dist/theme.d.ts +9 -9
- package/dist/theme.js.map +1 -1
- package/package.json +2 -2
- package/scripts/atomix-cli.js +10 -1
- package/scripts/cli/__tests__/utils.test.js +6 -2
- package/scripts/cli/migration-tools.js +2 -2
- package/scripts/cli/theme-bridge.js +7 -9
- package/scripts/cli/utils.js +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +72 -23
- package/src/components/Accordion/Accordion.test.tsx +70 -50
- package/src/components/Accordion/Accordion.tsx +219 -96
- package/src/components/Accordion/AccordionCompound.test.tsx +70 -0
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +1 -1
- package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
- package/src/components/AtomixGlass/glass-utils.ts +4 -3
- package/src/components/AtomixGlass/shader-utils.ts +128 -52
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +45 -62
- package/src/components/Avatar/Avatar.tsx +58 -56
- package/src/components/Badge/Badge.stories.tsx +20 -9
- package/src/components/Badge/Badge.test.tsx +41 -41
- package/src/components/Badge/Badge.tsx +64 -62
- package/src/components/Block/Block.stories.tsx +14 -4
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +9 -8
- package/src/components/Breadcrumb/Breadcrumb.tsx +173 -65
- package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +84 -0
- package/src/components/Button/Button.stories.tsx +13 -22
- package/src/components/Button/Button.test.tsx +97 -81
- package/src/components/Button/Button.tsx +46 -14
- package/src/components/Button/ButtonGroup.stories.tsx +37 -32
- package/src/components/Button/ButtonGroup.tsx +4 -15
- package/src/components/Callout/Callout.stories.tsx +166 -918
- package/src/components/Callout/Callout.tsx +196 -84
- package/src/components/Callout/CalloutCompound.test.tsx +72 -0
- package/src/components/Card/Card.stories.tsx +67 -36
- package/src/components/Card/Card.tsx +30 -14
- package/src/components/Chart/AreaChart.tsx +1 -1
- package/src/components/Chart/CandlestickChart.tsx +23 -16
- package/src/components/Chart/Chart.stories.tsx +4 -9
- package/src/components/Chart/Chart.tsx +40 -44
- package/src/components/Chart/ChartRenderer.tsx +39 -12
- package/src/components/Chart/ChartToolbar.tsx +21 -5
- package/src/components/Chart/DonutChart.tsx +1 -1
- package/src/components/Chart/FunnelChart.tsx +4 -1
- package/src/components/Chart/GaugeChart.tsx +3 -1
- package/src/components/Chart/HeatmapChart.tsx +50 -37
- package/src/components/Chart/LineChart.tsx +3 -2
- package/src/components/Chart/MultiAxisChart.tsx +24 -16
- package/src/components/Chart/RadarChart.tsx +19 -17
- package/src/components/Chart/ScatterChart.tsx +29 -21
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -2
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
- package/src/components/Countdown/Countdown.stories.tsx +7 -7
- package/src/components/DataTable/DataTable.stories.tsx +43 -38
- package/src/components/DataTable/DataTable.test.tsx +26 -148
- package/src/components/DataTable/DataTable.tsx +485 -456
- package/src/components/DatePicker/DatePicker.stories.tsx +32 -47
- package/src/components/DatePicker/DatePicker.tsx +31 -26
- package/src/components/Dropdown/Dropdown.stories.tsx +2 -5
- package/src/components/Dropdown/Dropdown.tsx +425 -298
- package/src/components/Dropdown/DropdownCompound.test.tsx +64 -0
- package/src/components/EdgePanel/EdgePanel.stories.tsx +6 -19
- package/src/components/EdgePanel/EdgePanel.tsx +163 -113
- package/src/components/EdgePanel/EdgePanelCompound.test.tsx +53 -0
- package/src/components/Footer/Footer.stories.tsx +21 -16
- package/src/components/Footer/Footer.tsx +130 -128
- package/src/components/Footer/FooterLink.tsx +2 -2
- package/src/components/Form/Checkbox.test.tsx +49 -49
- package/src/components/Form/Checkbox.tsx +108 -100
- package/src/components/Form/Form.stories.tsx +2 -10
- package/src/components/Form/Input.stories.tsx +22 -39
- package/src/components/Form/Input.test.tsx +38 -44
- package/src/components/Form/Radio.stories.tsx +6 -12
- package/src/components/Form/Radio.tsx +68 -66
- package/src/components/Form/Select.stories.tsx +23 -0
- package/src/components/Form/Select.test.tsx +99 -0
- package/src/components/Form/Select.tsx +239 -186
- package/src/components/Form/SelectOption.tsx +88 -0
- package/src/components/Form/Textarea.test.tsx +27 -32
- package/src/components/Hero/Hero.stories.tsx +93 -23
- package/src/components/Hero/Hero.test.tsx +142 -0
- package/src/components/Hero/Hero.tsx +343 -58
- package/src/components/Icon/index.ts +7 -1
- package/src/components/List/List.test.tsx +62 -0
- package/src/components/List/List.tsx +32 -25
- package/src/components/List/ListItem.tsx +20 -0
- package/src/components/Modal/Modal.stories.tsx +67 -2
- package/src/components/Modal/Modal.tsx +208 -125
- package/src/components/Modal/ModalCompound.test.tsx +94 -0
- package/src/components/Navigation/Menu/MegaMenu.tsx +70 -70
- package/src/components/Navigation/Nav/NavDropdown.tsx +1 -5
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +128 -28
- package/src/components/Navigation/SideMenu/SideMenu.tsx +5 -7
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -5
- package/src/components/Pagination/Pagination.stories.tsx +7 -4
- package/src/components/Pagination/Pagination.tsx +199 -202
- package/src/components/PhotoViewer/PhotoViewer.tsx +4 -1
- package/src/components/Popover/Popover.stories.tsx +99 -192
- package/src/components/Popover/Popover.tsx +41 -37
- package/src/components/Progress/Progress.stories.tsx +35 -44
- package/src/components/River/River.stories.tsx +2 -1
- package/src/components/SectionIntro/SectionIntro.stories.tsx +71 -71
- package/src/components/Slider/Slider.stories.tsx +12 -4
- package/src/components/Spinner/Spinner.stories.tsx +3 -1
- package/src/components/Spinner/Spinner.test.tsx +23 -23
- package/src/components/Spinner/Spinner.tsx +43 -46
- package/src/components/Steps/Steps.stories.tsx +8 -6
- package/src/components/Steps/Steps.tsx +124 -21
- package/src/components/Steps/StepsCompound.test.tsx +81 -0
- package/src/components/Tabs/Tabs.stories.tsx +12 -9
- package/src/components/Tabs/Tabs.tsx +230 -75
- package/src/components/Tabs/TabsCompound.test.tsx +64 -0
- package/src/components/Toggle/Toggle.stories.tsx +27 -13
- package/src/components/Toggle/Toggle.test.tsx +65 -70
- package/src/components/Toggle/Toggle.tsx +4 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +24 -20
- package/src/components/Tooltip/Tooltip.tsx +104 -106
- package/src/components/Upload/Upload.stories.tsx +129 -127
- package/src/components/Upload/Upload.tsx +287 -283
- package/src/components/VideoPlayer/VideoPlayer.tsx +6 -1
- package/src/components/index.ts +13 -2
- package/src/layouts/Grid/Grid.stories.tsx +9 -3
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +5 -1
- package/src/lib/__tests__/theme-tools.test.ts +32 -6
- package/src/lib/composables/index.ts +0 -4
- package/src/lib/composables/shared-mouse-tracker.ts +13 -14
- package/src/lib/composables/useAtomixGlass.ts +102 -60
- package/src/lib/composables/useChartExport.ts +1 -1
- package/src/lib/composables/useDataTable.ts +29 -17
- package/src/lib/composables/useHero.ts +58 -14
- package/src/lib/composables/useHeroBackgroundSlider.ts +2 -9
- package/src/lib/composables/useInput.ts +10 -8
- package/src/lib/composables/useSideMenu.ts +6 -5
- package/src/lib/composables/useTooltip.ts +1 -2
- package/src/lib/composables/useVideoPlayer.ts +44 -35
- package/src/lib/config/index.ts +154 -154
- package/src/lib/constants/cssVariables.ts +29 -29
- package/src/lib/hooks/__tests__/useComponentCustomization.test.ts +2 -6
- package/src/lib/hooks/index.ts +1 -1
- package/src/lib/hooks/useComponentCustomization.ts +11 -17
- package/src/lib/hooks/usePerformanceMonitor.ts +6 -7
- package/src/lib/patterns/__tests__/slots.test.ts +1 -1
- package/src/lib/patterns/index.ts +1 -1
- package/src/lib/patterns/slots.tsx +8 -13
- package/src/lib/storybook/InteractiveDemo.tsx +13 -18
- package/src/lib/storybook/PreviewContainer.tsx +1 -1
- package/src/lib/storybook/VariantsGrid.tsx +3 -7
- package/src/lib/storybook/index.ts +1 -1
- package/src/lib/theme/adapters/cssVariableMapper.ts +47 -74
- package/src/lib/theme/adapters/index.ts +3 -9
- package/src/lib/theme/adapters/themeAdapter.ts +41 -26
- package/src/lib/theme/config/index.ts +1 -1
- package/src/lib/theme/config/types.ts +2 -2
- package/src/lib/theme/config/validator.ts +10 -5
- package/src/lib/theme/constants/constants.ts +2 -2
- package/src/lib/theme/constants/index.ts +1 -2
- package/src/lib/theme/core/__tests__/createTheme.test.ts +20 -22
- package/src/lib/theme/core/composeTheme.ts +32 -26
- package/src/lib/theme/core/createTheme.ts +1 -1
- package/src/lib/theme/core/createThemeObject.ts +308 -301
- package/src/lib/theme/core/index.ts +3 -3
- package/src/lib/theme/devtools/CLI.ts +105 -111
- package/src/lib/theme/devtools/Comparator.tsx +50 -32
- package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +50 -48
- package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +257 -63
- package/src/lib/theme/devtools/Inspector.tsx +75 -60
- package/src/lib/theme/devtools/LiveEditor.tsx +97 -76
- package/src/lib/theme/devtools/Preview.tsx +150 -106
- package/src/lib/theme/devtools/ThemeValidator.ts +29 -21
- package/src/lib/theme/devtools/index.ts +3 -9
- package/src/lib/theme/devtools/useHistory.ts +23 -21
- package/src/lib/theme/errors/errors.ts +12 -11
- package/src/lib/theme/errors/index.ts +2 -7
- package/src/lib/theme/generators/generateCSS.ts +9 -13
- package/src/lib/theme/generators/generateCSSNested.ts +1 -6
- package/src/lib/theme/generators/generateCSSVariables.ts +673 -630
- package/src/lib/theme/generators/index.ts +1 -4
- package/src/lib/theme/i18n/index.ts +1 -1
- package/src/lib/theme/i18n/rtl.ts +13 -13
- package/src/lib/theme/index.ts +7 -16
- package/src/lib/theme/runtime/ThemeApplicator.ts +4 -4
- package/src/lib/theme/runtime/ThemeContext.tsx +1 -1
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +19 -23
- package/src/lib/theme/runtime/ThemeProvider.tsx +230 -239
- package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +1 -1
- package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +24 -29
- package/src/lib/theme/runtime/index.ts +2 -5
- package/src/lib/theme/runtime/useTheme.ts +18 -18
- package/src/lib/theme/runtime/useThemeTokens.ts +22 -22
- package/src/lib/theme/test/testTheme.ts +15 -16
- package/src/lib/theme/tokens/index.ts +2 -7
- package/src/lib/theme/tokens/tokens.ts +25 -24
- package/src/lib/theme/types.ts +428 -411
- package/src/lib/theme/utils/__tests__/themeValidation.test.ts +3 -3
- package/src/lib/theme/utils/componentTheming.ts +18 -18
- package/src/lib/theme/utils/domUtils.ts +277 -289
- package/src/lib/theme/utils/index.ts +1 -2
- package/src/lib/theme/utils/injectCSS.ts +10 -14
- package/src/lib/theme/utils/naming.ts +20 -16
- package/src/lib/theme/utils/themeHelpers.ts +10 -12
- package/src/lib/theme/utils/themeUtils.ts +85 -86
- package/src/lib/theme/utils/themeValidation.ts +82 -33
- package/src/lib/theme-tools.ts +8 -6
- package/src/lib/types/components.ts +180 -73
- package/src/lib/types/partProps.ts +1 -1
- package/src/lib/utils/__tests__/componentUtils.test.ts +57 -2
- package/src/lib/utils/__tests__/csv.test.ts +1 -1
- package/src/lib/utils/__tests__/themeNaming.test.ts +117 -0
- package/src/lib/utils/componentUtils.ts +8 -12
- package/src/lib/utils/csv.ts +3 -1
- package/src/lib/utils/dataTableExport.ts +1 -5
- package/src/lib/utils/fontPreloader.ts +10 -19
- package/src/lib/utils/icons.ts +4 -1
- package/src/lib/utils/index.ts +2 -6
- package/src/lib/utils/memoryMonitor.ts +10 -8
- package/src/lib/utils/themeNaming.ts +3 -3
- package/src/styles/01-settings/_index.scss +0 -1
- package/src/styles/01-settings/_settings.colors.scss +8 -8
- package/src/styles/01-settings/_settings.design-tokens.scss +61 -50
- package/src/styles/01-settings/_settings.navbar.scss +1 -1
- package/src/styles/01-settings/_settings.spacing.scss +3 -4
- package/src/styles/01-settings/_settings.tooltip.scss +1 -1
- package/src/styles/01-settings/_settings.typography.scss +1 -1
- package/src/styles/02-tools/_tools.breakpoints.scss +1 -1
- package/src/styles/02-tools/_tools.button.scss +51 -21
- package/src/styles/02-tools/_tools.utility-api.scss +36 -24
- package/src/styles/03-generic/_generic.root.scss +4 -3
- package/src/styles/06-components/_components.atomix-glass.scss +13 -9
- package/src/styles/06-components/_components.button.scss +16 -4
- package/src/styles/06-components/_components.callout.scss +27 -21
- package/src/styles/06-components/_components.card.scss +5 -14
- package/src/styles/06-components/_components.chart.scss +22 -19
- package/src/styles/06-components/_components.checkbox.scss +3 -1
- package/src/styles/06-components/_components.color-mode-toggle.scss +3 -1
- package/src/styles/06-components/_components.edge-panel.scss +9 -2
- package/src/styles/06-components/_components.footer.scss +1 -1
- package/src/styles/06-components/_components.side-menu.scss +5 -5
- package/src/styles/06-components/_components.toggle.scss +18 -0
- package/src/styles/06-components/_index.scss +1 -1
- package/src/styles/06-components/old.chart.styles.scss +0 -2
- package/src/styles/99-utilities/_utilities.border.scss +69 -27
- package/src/styles/99-utilities/_utilities.display.scss +1 -1
- package/src/styles/99-utilities/_utilities.opacity.scss +10 -0
- package/src/styles/99-utilities/_utilities.position.scss +16 -9
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/styles/99-utilities/_utilities.sizes.scss +47 -18
- package/src/styles/99-utilities/_utilities.spacing.scss +118 -66
- package/src/styles/99-utilities/_utilities.text-gradient.scss +30 -30
- package/src/styles/99-utilities/_utilities.text.scss +67 -47
package/src/lib/utils/csv.ts
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* to prevent formula injection.
|
|
11
11
|
*/
|
|
12
12
|
export function sanitizeCSVCell(cell: any): string {
|
|
13
|
-
const sanitized = String(cell ?? '')
|
|
13
|
+
const sanitized = String(cell ?? '')
|
|
14
|
+
.replace(/[\r\n\t]/g, ' ')
|
|
15
|
+
.replace(/"/g, '""');
|
|
14
16
|
// Prevent formula injection by prefixing dangerous characters
|
|
15
17
|
const dangerous = /^[=+\-@]/;
|
|
16
18
|
return dangerous.test(sanitized) ? `'${sanitized}` : sanitized;
|
|
@@ -46,10 +46,7 @@ export function exportToCSV(
|
|
|
46
46
|
/**
|
|
47
47
|
* Export data as JSON
|
|
48
48
|
*/
|
|
49
|
-
export function exportToJSON(
|
|
50
|
-
data: any[],
|
|
51
|
-
filename: string = 'data-table.json'
|
|
52
|
-
): void {
|
|
49
|
+
export function exportToJSON(data: any[], filename: string = 'data-table.json'): void {
|
|
53
50
|
if (!data.length) return;
|
|
54
51
|
|
|
55
52
|
const jsonContent = JSON.stringify(data, null, 2);
|
|
@@ -131,4 +128,3 @@ export function exportData(
|
|
|
131
128
|
console.warn(`Unsupported export format: ${format}`);
|
|
132
129
|
}
|
|
133
130
|
}
|
|
134
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Font Preloading Utilities
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Provides utilities for preloading fonts to improve performance
|
|
5
5
|
* and prevent Flash of Invisible Text (FOIT).
|
|
6
6
|
*/
|
|
@@ -34,10 +34,10 @@ export interface FontPreloadConfig {
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Creates a preload link element for a font
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* @param config - Font preload configuration
|
|
39
39
|
* @returns HTML link element for preloading
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* @example
|
|
42
42
|
* ```tsx
|
|
43
43
|
* const preloadLink = createFontPreloadLink({
|
|
@@ -49,11 +49,7 @@ export interface FontPreloadConfig {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export function createFontPreloadLink(config: FontPreloadConfig): HTMLLinkElement {
|
|
52
|
-
const {
|
|
53
|
-
path,
|
|
54
|
-
format = 'woff2',
|
|
55
|
-
crossorigin = 'anonymous',
|
|
56
|
-
} = config;
|
|
52
|
+
const { path, format = 'woff2', crossorigin = 'anonymous' } = config;
|
|
57
53
|
|
|
58
54
|
const link = document.createElement('link');
|
|
59
55
|
link.rel = 'preload';
|
|
@@ -67,10 +63,10 @@ export function createFontPreloadLink(config: FontPreloadConfig): HTMLLinkElemen
|
|
|
67
63
|
|
|
68
64
|
/**
|
|
69
65
|
* Preloads multiple fonts
|
|
70
|
-
*
|
|
66
|
+
*
|
|
71
67
|
* @param fonts - Array of font configurations to preload
|
|
72
68
|
* @returns Array of created link elements
|
|
73
|
-
*
|
|
69
|
+
*
|
|
74
70
|
* @example
|
|
75
71
|
* ```tsx
|
|
76
72
|
* const links = preloadFonts([
|
|
@@ -87,10 +83,10 @@ export function preloadFonts(fonts: FontPreloadConfig[]): HTMLLinkElement[] {
|
|
|
87
83
|
/**
|
|
88
84
|
* Generates preload link HTML tags as strings
|
|
89
85
|
* Useful for server-side rendering or static HTML generation
|
|
90
|
-
*
|
|
86
|
+
*
|
|
91
87
|
* @param fonts - Array of font configurations
|
|
92
88
|
* @returns Array of HTML string representations
|
|
93
|
-
*
|
|
89
|
+
*
|
|
94
90
|
* @example
|
|
95
91
|
* ```tsx
|
|
96
92
|
* const htmlTags = generateFontPreloadTags([
|
|
@@ -100,12 +96,8 @@ export function preloadFonts(fonts: FontPreloadConfig[]): HTMLLinkElement[] {
|
|
|
100
96
|
* ```
|
|
101
97
|
*/
|
|
102
98
|
export function generateFontPreloadTags(fonts: FontPreloadConfig[]): string[] {
|
|
103
|
-
return fonts.map(
|
|
104
|
-
const {
|
|
105
|
-
path,
|
|
106
|
-
format = 'woff2',
|
|
107
|
-
crossorigin = 'anonymous',
|
|
108
|
-
} = config;
|
|
99
|
+
return fonts.map(config => {
|
|
100
|
+
const { path, format = 'woff2', crossorigin = 'anonymous' } = config;
|
|
109
101
|
|
|
110
102
|
return `<link rel="preload" as="font" href="${path}" type="font/${format}" crossorigin="${crossorigin}">`;
|
|
111
103
|
});
|
|
@@ -145,4 +137,3 @@ export const DEFAULT_ATOMIX_FONTS: FontPreloadConfig[] = [
|
|
|
145
137
|
format: 'woff2',
|
|
146
138
|
},
|
|
147
139
|
];
|
|
148
|
-
|
package/src/lib/utils/icons.ts
CHANGED
|
@@ -35,7 +35,10 @@ export function createPhosphorIcon(name: string, size: number = 16): string {
|
|
|
35
35
|
const path = ICON_PATHS[name] || '';
|
|
36
36
|
|
|
37
37
|
if (!path) {
|
|
38
|
-
console.warn(
|
|
38
|
+
console.warn(
|
|
39
|
+
'Icon not found in icon library:',
|
|
40
|
+
typeof name === 'string' ? name.replace(/[^a-zA-Z0-9_-]/g, '_') : 'invalid_name'
|
|
41
|
+
);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="currentColor" viewBox="0 0 256 256">
|
package/src/lib/utils/index.ts
CHANGED
|
@@ -16,9 +16,7 @@ export {
|
|
|
16
16
|
extractYouTubeId,
|
|
17
17
|
} from './componentUtils';
|
|
18
18
|
|
|
19
|
-
export type {
|
|
20
|
-
MergePropsOptions,
|
|
21
|
-
} from './componentUtils';
|
|
19
|
+
export type { MergePropsOptions } from './componentUtils';
|
|
22
20
|
|
|
23
21
|
export {
|
|
24
22
|
createFontPreloadLink,
|
|
@@ -27,6 +25,4 @@ export {
|
|
|
27
25
|
DEFAULT_ATOMIX_FONTS,
|
|
28
26
|
} from './fontPreloader';
|
|
29
27
|
|
|
30
|
-
export type {
|
|
31
|
-
FontPreloadConfig,
|
|
32
|
-
} from './fontPreloader';
|
|
28
|
+
export type { FontPreloadConfig } from './fontPreloader';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Monitoring Utilities
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Detects memory leaks and tracks component lifecycle memory usage
|
|
5
5
|
* Only available in development mode
|
|
6
6
|
*/
|
|
@@ -40,7 +40,7 @@ export function isMemoryMonitoringAvailable(): boolean {
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Get current memory usage snapshot
|
|
43
|
-
*
|
|
43
|
+
*
|
|
44
44
|
* @returns Memory snapshot or null if not available
|
|
45
45
|
*/
|
|
46
46
|
export function getMemorySnapshot(): MemorySnapshot | null {
|
|
@@ -60,7 +60,7 @@ export function getMemorySnapshot(): MemorySnapshot | null {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Format bytes to human-readable string
|
|
63
|
-
*
|
|
63
|
+
*
|
|
64
64
|
* @param bytes - Number of bytes
|
|
65
65
|
* @returns Formatted string (e.g., "1.5 MB")
|
|
66
66
|
*/
|
|
@@ -76,7 +76,7 @@ export function formatBytes(bytes: number): string {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Compare two memory snapshots and detect potential leaks
|
|
79
|
-
*
|
|
79
|
+
*
|
|
80
80
|
* @param before - Snapshot before operation
|
|
81
81
|
* @param after - Snapshot after operation
|
|
82
82
|
* @param threshold - Threshold in bytes to consider a leak (default: 5MB)
|
|
@@ -114,7 +114,7 @@ export function detectMemoryLeak(
|
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Monitor memory usage over time
|
|
117
|
-
*
|
|
117
|
+
*
|
|
118
118
|
* @param interval - Interval in milliseconds to check memory
|
|
119
119
|
* @param callback - Callback function called with each snapshot
|
|
120
120
|
* @returns Function to stop monitoring
|
|
@@ -156,7 +156,7 @@ export function monitorMemoryUsage(
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Track component lifecycle memory usage
|
|
159
|
-
*
|
|
159
|
+
*
|
|
160
160
|
* @param componentName - Name of the component
|
|
161
161
|
* @returns Object with start and end tracking functions
|
|
162
162
|
*/
|
|
@@ -175,7 +175,10 @@ export function trackComponentMemory(componentName: string) {
|
|
|
175
175
|
const after = getMemorySnapshot();
|
|
176
176
|
if (before && after) {
|
|
177
177
|
const leakInfo = detectMemoryLeak(before, after);
|
|
178
|
-
if (
|
|
178
|
+
if (
|
|
179
|
+
leakInfo.hasLeak &&
|
|
180
|
+
(typeof process === 'undefined' || process.env?.NODE_ENV === 'development')
|
|
181
|
+
) {
|
|
179
182
|
console.warn(
|
|
180
183
|
`[Memory Monitor] Potential memory leak detected in ${componentName}:`,
|
|
181
184
|
leakInfo
|
|
@@ -186,4 +189,3 @@ export function trackComponentMemory(componentName: string) {
|
|
|
186
189
|
},
|
|
187
190
|
};
|
|
188
191
|
}
|
|
189
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Theme Naming Utility
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Provides consistent naming conventions for CSS classes, CSS variables,
|
|
5
5
|
* and JavaScript properties throughout the theme system.
|
|
6
6
|
*/
|
|
@@ -28,7 +28,7 @@ export class ThemeNaming {
|
|
|
28
28
|
* @param str - String to convert
|
|
29
29
|
*/
|
|
30
30
|
static camelToKebab(str: string): string {
|
|
31
|
-
return str.replace(/([a-z0-9]
|
|
31
|
+
return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -36,7 +36,7 @@ export class ThemeNaming {
|
|
|
36
36
|
* @param str - String to convert
|
|
37
37
|
*/
|
|
38
38
|
static kebabToCamel(str: string): string {
|
|
39
|
-
return str.replace(/-([a-z])/g,
|
|
39
|
+
return str.replace(/-([a-z])/g, g => g[1]?.toUpperCase() ?? '');
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -13,15 +13,15 @@ $color-contrast-light: #ffffff !default;
|
|
|
13
13
|
|
|
14
14
|
// Primitives Primary Colors (Purple Scale)
|
|
15
15
|
$primary-1: #f5f3ff !default;
|
|
16
|
-
$primary-2: #ede9fe !default;
|
|
17
|
-
$primary-3: #ddd6fe !default;
|
|
18
|
-
$primary-4: #c4b5fd !default;
|
|
19
|
-
$primary-5: #a78bfa !default;
|
|
16
|
+
$primary-2: #ede9fe !default;
|
|
17
|
+
$primary-3: #ddd6fe !default;
|
|
18
|
+
$primary-4: #c4b5fd !default;
|
|
19
|
+
$primary-5: #a78bfa !default;
|
|
20
20
|
$primary-6: #8b5cf6 !default; // Balanced primary - main brand color (WCAG AA compliant)
|
|
21
|
-
$primary-7: #7c3aed !default;
|
|
22
|
-
$primary-8: #6d28d9 !default;
|
|
23
|
-
$primary-9: #5b21b6 !default;
|
|
24
|
-
$primary-10: #4c1d95 !default;
|
|
21
|
+
$primary-7: #7c3aed !default;
|
|
22
|
+
$primary-8: #6d28d9 !default;
|
|
23
|
+
$primary-9: #5b21b6 !default;
|
|
24
|
+
$primary-10: #4c1d95 !default;
|
|
25
25
|
|
|
26
26
|
// Primitives Red Colors
|
|
27
27
|
$red-1: #fef2f2 !default;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
@use 'settings.breakpoints' as breakpoints;
|
|
8
8
|
@use 'settings.config' as config;
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
// Color maps
|
|
12
11
|
|
|
13
12
|
$theme-colors-text: (
|
|
@@ -23,7 +22,7 @@ $theme-colors-text: (
|
|
|
23
22
|
'info': $info-text,
|
|
24
23
|
'light': $light-text,
|
|
25
24
|
'dark': $dark-text,
|
|
26
|
-
|
|
25
|
+
) !default;
|
|
27
26
|
|
|
28
27
|
$theme-colors-text-dark: (
|
|
29
28
|
'primary': $primary-text-dark,
|
|
@@ -38,7 +37,7 @@ $theme-colors-text-dark: (
|
|
|
38
37
|
'info': $info-text-dark,
|
|
39
38
|
'light': $light-text-dark,
|
|
40
39
|
'dark': $dark-text-dark,
|
|
41
|
-
|
|
40
|
+
) !default;
|
|
42
41
|
|
|
43
42
|
$theme-colors-bg-subtle: (
|
|
44
43
|
'primary': $primary-bg,
|
|
@@ -52,7 +51,7 @@ $theme-colors-bg-subtle: (
|
|
|
52
51
|
'info': $info-bg,
|
|
53
52
|
'light': $light-bg,
|
|
54
53
|
'dark': $dark-bg,
|
|
55
|
-
|
|
54
|
+
) !default;
|
|
56
55
|
|
|
57
56
|
$theme-colors-bg-subtle-dark: (
|
|
58
57
|
'primary': $primary-bg-dark,
|
|
@@ -66,7 +65,7 @@ $theme-colors-bg-subtle-dark: (
|
|
|
66
65
|
'info': $info-bg-dark,
|
|
67
66
|
'light': $light-bg-dark,
|
|
68
67
|
'dark': $dark-bg-dark,
|
|
69
|
-
|
|
68
|
+
) !default;
|
|
70
69
|
|
|
71
70
|
$theme-colors-border-subtle: (
|
|
72
71
|
'primary': $primary-border,
|
|
@@ -78,7 +77,7 @@ $theme-colors-border-subtle: (
|
|
|
78
77
|
'brand': $brand-border,
|
|
79
78
|
'light': $light-border,
|
|
80
79
|
'dark': $dark-border,
|
|
81
|
-
|
|
80
|
+
) !default;
|
|
82
81
|
|
|
83
82
|
$theme-colors-border-subtle-dark: (
|
|
84
83
|
'primary': $primary-border-dark,
|
|
@@ -90,7 +89,7 @@ $theme-colors-border-subtle-dark: (
|
|
|
90
89
|
'brand': $brand-border-dark,
|
|
91
90
|
'light': $light-border-dark,
|
|
92
91
|
'dark': $dark-border-dark,
|
|
93
|
-
|
|
92
|
+
) !default;
|
|
94
93
|
|
|
95
94
|
// Main theme colors map
|
|
96
95
|
$theme-colors: (
|
|
@@ -102,7 +101,7 @@ $theme-colors: (
|
|
|
102
101
|
'error': $error,
|
|
103
102
|
'light': $light,
|
|
104
103
|
'dark': $dark,
|
|
105
|
-
|
|
104
|
+
) !default;
|
|
106
105
|
|
|
107
106
|
$theme-colors-dark: (
|
|
108
107
|
'primary': $primary-dark,
|
|
@@ -113,7 +112,7 @@ $theme-colors-dark: (
|
|
|
113
112
|
'success': $success-dark,
|
|
114
113
|
'warning': $warning-dark,
|
|
115
114
|
'info': $info-dark,
|
|
116
|
-
|
|
115
|
+
) !default;
|
|
117
116
|
|
|
118
117
|
$theme-colors-hover: (
|
|
119
118
|
'primary': $primary-hover,
|
|
@@ -124,7 +123,7 @@ $theme-colors-hover: (
|
|
|
124
123
|
'success': $success-hover,
|
|
125
124
|
'warning': $warning-hover,
|
|
126
125
|
'info': $info-hover,
|
|
127
|
-
|
|
126
|
+
) !default;
|
|
128
127
|
|
|
129
128
|
$theme-colors-hover-dark: (
|
|
130
129
|
'primary': $primary-hover-dark,
|
|
@@ -135,7 +134,7 @@ $theme-colors-hover-dark: (
|
|
|
135
134
|
'success': $success-hover-dark,
|
|
136
135
|
'warning': $warning-hover-dark,
|
|
137
136
|
'info': $info-hover-dark,
|
|
138
|
-
|
|
137
|
+
) !default;
|
|
139
138
|
|
|
140
139
|
$grays: (
|
|
141
140
|
'1': $gray-1,
|
|
@@ -148,7 +147,7 @@ $grays: (
|
|
|
148
147
|
'8': $gray-8,
|
|
149
148
|
'9': $gray-9,
|
|
150
149
|
'10': $gray-10,
|
|
151
|
-
|
|
150
|
+
) !default;
|
|
152
151
|
|
|
153
152
|
$primarys: (
|
|
154
153
|
'1': $primary-1,
|
|
@@ -161,7 +160,7 @@ $primarys: (
|
|
|
161
160
|
'8': $primary-8,
|
|
162
161
|
'9': $primary-9,
|
|
163
162
|
'10': $primary-10,
|
|
164
|
-
|
|
163
|
+
) !default;
|
|
165
164
|
|
|
166
165
|
// Typography Maps
|
|
167
166
|
|
|
@@ -177,7 +176,7 @@ $theme-font-size: (
|
|
|
177
176
|
'h4': $h4-font-size,
|
|
178
177
|
'h5': $h5-font-size,
|
|
179
178
|
'h6': $h6-font-size,
|
|
180
|
-
|
|
179
|
+
) !default;
|
|
181
180
|
|
|
182
181
|
$theme-font-weight: (
|
|
183
182
|
'light': $font-weight-light,
|
|
@@ -187,7 +186,7 @@ $theme-font-weight: (
|
|
|
187
186
|
'bold': $font-weight-bold,
|
|
188
187
|
'heavy': $font-weight-heavy,
|
|
189
188
|
'black': $font-weight-black,
|
|
190
|
-
|
|
189
|
+
) !default;
|
|
191
190
|
|
|
192
191
|
// Utilities maps
|
|
193
192
|
//
|
|
@@ -202,11 +201,14 @@ $theme-font-weight: (
|
|
|
202
201
|
|
|
203
202
|
$utilities-colors: $theme-colors !default;
|
|
204
203
|
|
|
205
|
-
$utilities-text-colors: map.merge(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
$utilities-text-colors: map.merge(
|
|
205
|
+
$utilities-colors,
|
|
206
|
+
(
|
|
207
|
+
'black': $black,
|
|
208
|
+
'white': $white,
|
|
209
|
+
'body': $body-color,
|
|
210
|
+
)
|
|
211
|
+
) !default;
|
|
210
212
|
|
|
211
213
|
$utilities-text-emphasis-colors: (
|
|
212
214
|
'primary-emphasis': var(--#{config.$prefix}primary-text-emphasis),
|
|
@@ -221,14 +223,17 @@ $utilities-text-emphasis-colors: (
|
|
|
221
223
|
'error-emphasis': var(--#{config.$prefix}error-text-emphasis),
|
|
222
224
|
'light-emphasis': var(--#{config.$prefix}light-text-emphasis),
|
|
223
225
|
'dark-emphasis': var(--#{config.$prefix}dark-text-emphasis),
|
|
224
|
-
|
|
226
|
+
) !default;
|
|
225
227
|
|
|
226
228
|
// scss-docs-start utilities-bg-colors
|
|
227
|
-
$utilities-bg-colors: map.merge(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
$utilities-bg-colors: map.merge(
|
|
230
|
+
$utilities-colors,
|
|
231
|
+
(
|
|
232
|
+
'black': $black,
|
|
233
|
+
'white': $white,
|
|
234
|
+
'body': var(--#{config.$prefix}body-bg),
|
|
235
|
+
)
|
|
236
|
+
) !default;
|
|
232
237
|
|
|
233
238
|
$utilities-bg-subtle: (
|
|
234
239
|
'primary-subtle': var(--#{config.$prefix}primary-bg-subtle),
|
|
@@ -242,13 +247,16 @@ $utilities-bg-subtle: (
|
|
|
242
247
|
'error-subtle': var(--#{config.$prefix}error-bg-subtle),
|
|
243
248
|
'light-subtle': var(--#{config.$prefix}light-bg-subtle),
|
|
244
249
|
'dark-subtle': var(--#{config.$prefix}dark-bg-subtle),
|
|
245
|
-
|
|
250
|
+
) !default;
|
|
246
251
|
|
|
247
252
|
// scss-docs-start utilities-border-colors
|
|
248
|
-
$utilities-border-colors: map.merge(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
253
|
+
$utilities-border-colors: map.merge(
|
|
254
|
+
$utilities-colors,
|
|
255
|
+
(
|
|
256
|
+
'black': $black,
|
|
257
|
+
'white': $white,
|
|
258
|
+
)
|
|
259
|
+
) !default;
|
|
252
260
|
|
|
253
261
|
$utilities-border-subtle: (
|
|
254
262
|
'primary-subtle': var(--#{config.$prefix}primary-border-subtle),
|
|
@@ -260,13 +268,16 @@ $utilities-border-subtle: (
|
|
|
260
268
|
'brand-subtle': var(--#{config.$prefix}brand-border-subtle),
|
|
261
269
|
'light-subtle': var(--#{config.$prefix}light-border-subtle),
|
|
262
270
|
'dark-subtle': var(--#{config.$prefix}dark-border-subtle),
|
|
263
|
-
|
|
271
|
+
) !default;
|
|
264
272
|
|
|
265
273
|
// scss-docs-start utilities-links-underline
|
|
266
|
-
$utilities-links-underline: map.merge(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
$utilities-links-underline: map.merge(
|
|
275
|
+
$utilities-colors,
|
|
276
|
+
(
|
|
277
|
+
'black': $black,
|
|
278
|
+
'white': $white,
|
|
279
|
+
)
|
|
280
|
+
) !default;
|
|
270
281
|
|
|
271
282
|
$shadows: (
|
|
272
283
|
'shadow': var(--#{config.$prefix}box-shadow),
|
|
@@ -275,7 +286,7 @@ $shadows: (
|
|
|
275
286
|
'shadow-lg': var(--#{config.$prefix}box-shadow-lg),
|
|
276
287
|
'shadow-xl': var(--#{config.$prefix}box-shadow-xl),
|
|
277
288
|
'shadow-inset': var(--#{config.$prefix}box-shadow-inset),
|
|
278
|
-
|
|
289
|
+
) !default;
|
|
279
290
|
|
|
280
291
|
$shadows-dark: (
|
|
281
292
|
'shadow': var(--#{config.$prefix}box-shadow-dark),
|
|
@@ -284,7 +295,7 @@ $shadows-dark: (
|
|
|
284
295
|
'shadow-lg': var(--#{config.$prefix}box-shadow-lg-dark),
|
|
285
296
|
'shadow-xl': var(--#{config.$prefix}box-shadow-xl-dark),
|
|
286
297
|
'shadow-inset': var(--#{config.$prefix}box-shadow-inset-dark),
|
|
287
|
-
|
|
298
|
+
) !default;
|
|
288
299
|
|
|
289
300
|
$gradient-colors: (
|
|
290
301
|
'primary': $gradient-primary,
|
|
@@ -321,7 +332,7 @@ $reds: (
|
|
|
321
332
|
'8': $red-8,
|
|
322
333
|
'9': $red-9,
|
|
323
334
|
'10': $red-10,
|
|
324
|
-
|
|
335
|
+
) !default;
|
|
325
336
|
|
|
326
337
|
// Green scale (1-10)
|
|
327
338
|
$greens: (
|
|
@@ -335,7 +346,7 @@ $greens: (
|
|
|
335
346
|
'8': $green-8,
|
|
336
347
|
'9': $green-9,
|
|
337
348
|
'10': $green-10,
|
|
338
|
-
|
|
349
|
+
) !default;
|
|
339
350
|
|
|
340
351
|
// Blue scale (1-10)
|
|
341
352
|
$blues: (
|
|
@@ -349,7 +360,7 @@ $blues: (
|
|
|
349
360
|
'8': $blue-8,
|
|
350
361
|
'9': $blue-9,
|
|
351
362
|
'10': $blue-10,
|
|
352
|
-
|
|
363
|
+
) !default;
|
|
353
364
|
|
|
354
365
|
// Yellow scale (1-10)
|
|
355
366
|
$yellows: (
|
|
@@ -363,14 +374,14 @@ $yellows: (
|
|
|
363
374
|
'8': $yellow-8,
|
|
364
375
|
'9': $yellow-9,
|
|
365
376
|
'10': $yellow-10,
|
|
366
|
-
|
|
377
|
+
) !default;
|
|
367
378
|
|
|
368
379
|
// Line Height Maps
|
|
369
380
|
$line-heights: (
|
|
370
381
|
'base': $line-height-base,
|
|
371
382
|
'sm': $line-height-sm,
|
|
372
383
|
'lg': $line-height-lg,
|
|
373
|
-
|
|
384
|
+
) !default;
|
|
374
385
|
|
|
375
386
|
// Extended Font Size Map
|
|
376
387
|
$font-sizes-extended: (
|
|
@@ -388,7 +399,7 @@ $font-sizes-extended: (
|
|
|
388
399
|
'h5': $h5-font-size,
|
|
389
400
|
'h6': $h6-font-size,
|
|
390
401
|
'display-1': $display-1,
|
|
391
|
-
|
|
402
|
+
) !default;
|
|
392
403
|
|
|
393
404
|
// Letter Spacing Map
|
|
394
405
|
$letter-spacings: (
|
|
@@ -398,33 +409,33 @@ $letter-spacings: (
|
|
|
398
409
|
'h4': $h4-letter-spaceing,
|
|
399
410
|
'h5': $h5-letter-spaceing,
|
|
400
411
|
'h6': $h6-letter-spaceing,
|
|
401
|
-
|
|
412
|
+
) !default;
|
|
402
413
|
|
|
403
414
|
// Transition & Animation Maps
|
|
404
415
|
$transitions: (
|
|
405
416
|
'fast': animations.$transition-fast,
|
|
406
417
|
'base': animations.$transition-base,
|
|
407
418
|
'slow': animations.$transition-slow,
|
|
408
|
-
|
|
419
|
+
) !default;
|
|
409
420
|
|
|
410
421
|
$transition-durations: (
|
|
411
422
|
'fast': 0.15s,
|
|
412
423
|
'base': 0.3s,
|
|
413
424
|
'slow': 0.5s,
|
|
414
425
|
'slower': 0.7s,
|
|
415
|
-
|
|
426
|
+
) !default;
|
|
416
427
|
|
|
417
428
|
$easings: (
|
|
418
429
|
'base': animations.$easing,
|
|
419
430
|
'ease-in-out': cubic-bezier(0.4, 0, 0.2, 1),
|
|
420
|
-
'ease-out': cubic-bezier(0
|
|
431
|
+
'ease-out': cubic-bezier(0, 0, 0.2, 1),
|
|
421
432
|
'ease-in': cubic-bezier(0.4, 0, 1, 1),
|
|
422
433
|
'ease-linear': linear,
|
|
423
|
-
|
|
434
|
+
) !default;
|
|
424
435
|
|
|
425
436
|
// Focus Ring Tokens
|
|
426
437
|
$focus-ring: (
|
|
427
438
|
'width': 3px,
|
|
428
439
|
'offset': 2px,
|
|
429
440
|
'opacity': 0.25,
|
|
430
|
-
|
|
441
|
+
) !default;
|
|
@@ -24,7 +24,7 @@ $navbar-brand-font-weight: $font-weight-bold !default;
|
|
|
24
24
|
$navbar-brand-color: var(--#{$prefix}body-color) !default;
|
|
25
25
|
|
|
26
26
|
// Mobile toggler
|
|
27
|
-
$navbar-toggler-size: 2rem !default;
|
|
27
|
+
$navbar-toggler-size: 2rem !default;
|
|
28
28
|
$navbar-toggler-color: var(--#{$prefix}body-color) !default;
|
|
29
29
|
$navbar-toggler-bg: transparent !default;
|
|
30
30
|
$navbar-toggler-border: 0 !default;
|
|
@@ -71,11 +71,10 @@ $spacing-sizes: (
|
|
|
71
71
|
//320px
|
|
72
72
|
90: 22.5rem,
|
|
73
73
|
//360px
|
|
74
|
-
200: 50rem,
|
|
75
|
-
|
|
76
|
-
) !default;
|
|
74
|
+
200: 50rem, //800px
|
|
75
|
+
) !default;
|
|
77
76
|
|
|
78
77
|
$spacing-important: false !default;
|
|
79
78
|
$enable-negative-margins: false !default;
|
|
80
79
|
|
|
81
|
-
$negative-spacers: if($enable-negative-margins, negativify-map($spacing-sizes), null) !default;
|
|
80
|
+
$negative-spacers: if($enable-negative-margins, negativify-map($spacing-sizes), null) !default;
|