@shohojdhara/atomix 0.3.14 → 0.4.0
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/CHANGELOG.md +20 -0
- package/build-tools/EXAMPLES.md +372 -0
- package/build-tools/README.md +242 -0
- package/build-tools/__tests__/error-handler.test.js +230 -0
- package/build-tools/__tests__/index.test.js +141 -0
- package/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/build-tools/__tests__/utils.test.js +161 -0
- package/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/build-tools/error-handler.js +308 -0
- package/build-tools/index.d.ts +44 -0
- package/build-tools/index.js +88 -0
- package/build-tools/package.json +50 -0
- package/build-tools/rollup-plugin.js +236 -0
- package/build-tools/types.d.ts +163 -0
- package/build-tools/utils.js +203 -0
- package/build-tools/vite-plugin.js +161 -0
- package/build-tools/webpack-loader.js +123 -0
- package/dist/atomix.css +21044 -2618
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +77 -3
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/EXAMPLES.md +372 -0
- package/dist/build-tools/README.md +242 -0
- package/dist/build-tools/__tests__/error-handler.test.js +230 -0
- package/dist/build-tools/__tests__/index.test.js +141 -0
- package/dist/build-tools/__tests__/rollup-plugin.test.js +194 -0
- package/dist/build-tools/__tests__/utils.test.js +161 -0
- package/dist/build-tools/__tests__/vite-plugin.test.js +129 -0
- package/dist/build-tools/__tests__/webpack-loader.test.js +190 -0
- package/dist/build-tools/error-handler.js +308 -0
- package/dist/build-tools/index.d.ts +44 -0
- package/dist/build-tools/index.js +88 -0
- package/dist/build-tools/package.json +50 -0
- package/dist/build-tools/rollup-plugin.js +236 -0
- package/dist/build-tools/types.d.ts +163 -0
- package/dist/build-tools/utils.js +203 -0
- package/dist/build-tools/vite-plugin.js +161 -0
- package/dist/build-tools/webpack-loader.js +123 -0
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +86 -57
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +136 -112
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +2 -5
- package/dist/forms.js +140 -128
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +1 -1
- package/dist/heavy.js +136 -112
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +152 -78
- package/dist/index.esm.js +346 -340
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +359 -353
- 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 +23 -8
- package/scripts/atomix-cli.js +170 -73
- package/scripts/cli/__tests__/README.md +81 -0
- package/scripts/cli/__tests__/basic.test.js +115 -0
- package/scripts/cli/__tests__/component-generator.test.js +332 -0
- package/scripts/cli/__tests__/integration.test.js +327 -0
- package/scripts/cli/__tests__/test-setup.js +133 -0
- package/scripts/cli/__tests__/token-manager.test.js +251 -0
- package/scripts/cli/__tests__/utils.test.js +161 -0
- package/scripts/cli/component-generator.js +253 -299
- package/scripts/cli/dependency-checker.js +355 -0
- package/scripts/cli/interactive-init.js +46 -5
- package/scripts/cli/template-manager.js +0 -2
- package/scripts/cli/templates/common-templates.js +636 -0
- package/scripts/cli/templates/composable-templates.js +148 -126
- package/scripts/cli/templates/index.js +23 -16
- package/scripts/cli/templates/project-templates.js +151 -23
- package/scripts/cli/templates/react-templates.js +280 -210
- package/scripts/cli/templates/scss-templates.js +90 -91
- package/scripts/cli/templates/testing-templates.js +206 -27
- package/scripts/cli/templates/testing-utils.js +278 -0
- package/scripts/cli/templates/types-templates.js +70 -56
- package/scripts/cli/theme-bridge.js +8 -2
- package/scripts/cli/token-manager.js +318 -206
- package/scripts/cli/utils.js +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +358 -850
- package/src/components/Accordion/Accordion.test.tsx +70 -50
- package/src/components/Accordion/Accordion.tsx +99 -94
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +1 -1
- package/src/components/AtomixGlass/AtomixGlass.tsx +80 -39
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +103 -81
- package/src/components/AtomixGlass/GlassFilter.tsx +9 -16
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +8 -7
- package/src/components/AtomixGlass/glass-utils.ts +6 -5
- package/src/components/AtomixGlass/shader-utils.ts +133 -52
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +131 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +2957 -2853
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -1
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +348 -0
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +103 -0
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +51 -36
- package/src/components/AtomixGlass/stories/{ShaderVariants.stories.tsx → Shaders.stories.tsx} +2 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +90 -190
- package/src/components/Avatar/Avatar.stories.tsx +195 -0
- package/src/components/Avatar/Avatar.tsx +58 -56
- package/src/components/Badge/Badge.stories.tsx +122 -352
- package/src/components/Badge/Badge.test.tsx +41 -41
- package/src/components/Badge/Badge.tsx +64 -62
- package/src/components/Block/Block.stories.tsx +30 -11
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +142 -23
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -60
- package/src/components/Button/Button.stories.tsx +454 -1126
- package/src/components/Button/Button.test.tsx +123 -0
- package/src/components/Button/Button.tsx +88 -60
- package/src/components/Button/ButtonGroup.stories.tsx +376 -215
- package/src/components/Button/ButtonGroup.tsx +4 -15
- package/src/components/Callout/Callout.stories.tsx +316 -568
- package/src/components/Card/Card.stories.tsx +292 -81
- 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 +153 -16
- 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 +152 -66
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +15 -3
- package/src/components/Countdown/Countdown.stories.tsx +114 -7
- package/src/components/DataTable/DataTable.stories.tsx +349 -144
- package/src/components/DataTable/DataTable.test.tsx +26 -148
- package/src/components/DataTable/DataTable.tsx +485 -456
- package/src/components/DatePicker/DatePicker.stories.tsx +310 -1066
- package/src/components/DatePicker/DatePicker.tsx +31 -26
- package/src/components/Dropdown/Dropdown.stories.tsx +153 -36
- package/src/components/Dropdown/Dropdown.tsx +313 -299
- package/src/components/EdgePanel/EdgePanel.stories.tsx +221 -25
- package/src/components/EdgePanel/EdgePanel.tsx +1 -3
- package/src/components/Footer/Footer.stories.tsx +396 -327
- package/src/components/Footer/Footer.tsx +130 -128
- package/src/components/Footer/FooterLink.tsx +2 -2
- package/src/components/Form/Checkbox.stories.tsx +140 -6
- package/src/components/Form/Checkbox.test.tsx +63 -0
- package/src/components/Form/Checkbox.tsx +122 -78
- package/src/components/Form/Form.stories.tsx +110 -19
- package/src/components/Form/FormGroup.stories.tsx +127 -4
- 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 +146 -17
- package/src/components/Form/Radio.tsx +68 -66
- package/src/components/Form/Select.stories.tsx +140 -8
- package/src/components/Form/Select.tsx +184 -182
- package/src/components/Form/Textarea.stories.tsx +149 -6
- package/src/components/Form/Textarea.test.tsx +27 -32
- package/src/components/Hero/Hero.stories.tsx +372 -38
- package/src/components/Hero/Hero.tsx +201 -55
- package/src/components/Icon/index.ts +7 -1
- package/src/components/List/List.stories.tsx +141 -3
- package/src/components/List/List.tsx +19 -23
- package/src/components/Modal/Modal.stories.tsx +183 -43
- package/src/components/Modal/Modal.tsx +130 -127
- 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 +354 -97
- package/src/components/Popover/Popover.tsx +41 -37
- package/src/components/Progress/Progress.stories.tsx +160 -7
- package/src/components/River/River.stories.tsx +3 -2
- package/src/components/SectionIntro/SectionIntro.stories.tsx +239 -47
- package/src/components/Slider/Slider.stories.tsx +12 -4
- package/src/components/Spinner/Spinner.stories.tsx +104 -8
- package/src/components/Spinner/Spinner.test.tsx +23 -23
- package/src/components/Spinner/Spinner.tsx +43 -46
- package/src/components/Steps/Steps.stories.tsx +173 -42
- package/src/components/Tabs/Tabs.stories.tsx +141 -12
- package/src/components/Tabs/Tabs.tsx +74 -72
- package/src/components/Testimonial/Testimonial.stories.tsx +120 -3
- package/src/components/Todo/Todo.stories.tsx +198 -9
- package/src/components/Toggle/Toggle.stories.tsx +137 -36
- package/src/components/Toggle/Toggle.test.tsx +65 -70
- package/src/components/Toggle/Toggle.tsx +4 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +194 -100
- package/src/components/Tooltip/Tooltip.tsx +104 -106
- package/src/components/Upload/Upload.stories.tsx +241 -150
- 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/README.md +2 -2
- package/src/lib/__tests__/theme-tools.test.ts +219 -0
- package/src/lib/composables/index.ts +2 -2
- package/src/lib/composables/shared-mouse-tracker.ts +13 -14
- package/src/lib/composables/useAtomixGlass.ts +126 -97
- package/src/lib/composables/useChartExport.ts +3 -8
- package/src/lib/composables/useDataTable.ts +72 -43
- 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/components.ts +9 -32
- 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 +107 -105
- 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 +172 -71
- package/src/lib/types/partProps.ts +1 -1
- package/src/lib/utils/__tests__/csv.test.ts +45 -0
- package/src/lib/utils/componentUtils.ts +8 -12
- package/src/lib/utils/csv.ts +19 -0
- package/src/lib/utils/dataTableExport.ts +2 -15
- 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 +2 -2
- package/src/styles/01-settings/_index.scss +1 -1
- package/src/styles/01-settings/_settings.accordion.scss +28 -7
- package/src/styles/01-settings/_settings.colors.scss +11 -11
- 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 +4 -4
- package/src/styles/02-tools/_tools.button.scss +51 -21
- package/src/styles/02-tools/_tools.utility-api.scss +38 -12
- package/src/styles/03-generic/_generic.root.scss +4 -3
- package/src/styles/06-components/_components.accordion.scss +56 -14
- 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 +25 -17
- 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/_index.scss +2 -0
- 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 +2 -0
- 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 +45 -0
- package/src/styles/99-utilities/_utilities.text.scss +67 -46
- package/themes/dark-complementary/README.md +98 -0
- package/themes/dark-complementary/index.scss +158 -0
- package/themes/default-light/README.md +81 -0
- package/themes/default-light/index.scss +154 -0
- package/themes/high-contrast/README.md +105 -0
- package/themes/high-contrast/index.scss +172 -0
- package/themes/test-theme/README.md +38 -0
- package/themes/test-theme/index.scss +47 -0
- package/scripts/cli/templates-original-backup.js +0 -1655
- package/scripts/cli/templates_backup.js +0 -684
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +0 -1438
- package/src/lib/composables/useButton.ts +0 -93
- package/src/lib/composables/useCheckbox.ts +0 -70
|
@@ -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
|
*/
|
|
@@ -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
|
/**
|
|
@@ -3,30 +3,51 @@
|
|
|
3
3
|
@use './settings.config' as config;
|
|
4
4
|
@use './settings.spacing' as *;
|
|
5
5
|
@use './settings.colors' as *;
|
|
6
|
+
@use './settings.typography' as *;
|
|
6
7
|
|
|
8
|
+
// Accordion dimensions
|
|
7
9
|
$accordion-width: 100% !default;
|
|
8
|
-
$accordion-padding-x: map.get($spacing-sizes, 5) !default;
|
|
9
|
-
$accordion-padding-y: map.get($spacing-sizes, 4) !default;
|
|
10
|
+
$accordion-padding-x: map.get($spacing-sizes, 5) !default; //20px
|
|
11
|
+
$accordion-padding-y: map.get($spacing-sizes, 4) !default; //16px
|
|
10
12
|
|
|
13
|
+
// Accordion borders
|
|
11
14
|
$accordion-border-width: calc(var(--#{config.$prefix}border-width) * 2) !default;
|
|
12
|
-
$accordion-border-color:
|
|
15
|
+
$accordion-border-color: var(--#{config.$prefix}primary-border-subtle) !default;
|
|
13
16
|
$accordion-border-radius: radius.$border-radius-sm !default;
|
|
14
17
|
|
|
18
|
+
// Accordion body
|
|
15
19
|
$accordion-body-padding-x: $accordion-padding-x !default;
|
|
16
|
-
$accordion-body-padding-y: map.get($spacing-sizes, 2) !default;
|
|
20
|
+
$accordion-body-padding-y: map.get($spacing-sizes, 2) !default; //8px
|
|
17
21
|
$accordion-body-color: var(--#{config.$prefix}body-color) !default;
|
|
18
22
|
$accordion-body-bg: var(--#{config.$prefix}body-bg) !default;
|
|
19
23
|
|
|
24
|
+
// Accordion header
|
|
20
25
|
$accordion-header-padding-x: $accordion-padding-x !default;
|
|
21
26
|
$accordion-header-padding-y: $accordion-padding-y !default;
|
|
22
27
|
$accordion-header-color: var(--#{config.$prefix}body-color) !default;
|
|
23
28
|
$accordion-header-bg: var(--#{config.$prefix}body-bg) !default;
|
|
24
|
-
|
|
25
29
|
$accordion-header-bg-hover: var(--#{config.$prefix}body-bg) !default;
|
|
30
|
+
$accordion-header-font-size: $font-size-base !default;
|
|
31
|
+
$accordion-header-font-weight: $font-weight-normal !default;
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
// Accordion icon
|
|
34
|
+
$accordion-icon-size: map.get($spacing-sizes, 5) !default; //20px
|
|
28
35
|
$accordion-icon-color: var(--#{config.$prefix}body-color) !default;
|
|
29
|
-
|
|
30
36
|
$accordion-icon-transform: 180deg !default;
|
|
31
37
|
|
|
38
|
+
// Accordion states
|
|
32
39
|
$accordion-disable-color: var(--#{config.$prefix}tertiary-text-emphasis) !default;
|
|
40
|
+
$accordion-focus-border-color: var(--#{config.$prefix}focus-border-color) !default;
|
|
41
|
+
|
|
42
|
+
// Accordion transitions
|
|
43
|
+
$accordion-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !default;
|
|
44
|
+
$accordion-panel-transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !default;
|
|
45
|
+
|
|
46
|
+
// Accordion spacing
|
|
47
|
+
$accordion-item-gap: 0px !default;
|
|
48
|
+
$accordion-header-inner-gap: map.get($spacing-sizes, 2) !default; //8px
|
|
49
|
+
|
|
50
|
+
// Enable features
|
|
51
|
+
$accordion-enable-glass: true !default;
|
|
52
|
+
$accordion-enable-smooth-scroll: true !default;
|
|
53
|
+
$accordion-enable-focus-ring: true !default;
|
|
@@ -11,17 +11,17 @@ $black: #000000 !default;
|
|
|
11
11
|
$color-contrast-dark: #000000 !default;
|
|
12
12
|
$color-contrast-light: #ffffff !default;
|
|
13
13
|
|
|
14
|
-
// Primitives Primary Colors
|
|
15
|
-
$primary-1: #
|
|
16
|
-
$primary-2: #
|
|
17
|
-
$primary-3: #
|
|
18
|
-
$primary-4: #
|
|
19
|
-
$primary-5: #
|
|
20
|
-
$primary-6: #
|
|
21
|
-
$primary-7: #
|
|
22
|
-
$primary-8: #
|
|
23
|
-
$primary-9: #
|
|
24
|
-
$primary-10: #
|
|
14
|
+
// Primitives Primary Colors (Purple Scale)
|
|
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;
|
|
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;
|
|
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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Font, line-height, and color for body text, headings, and more.
|
|
4
4
|
|
|
5
5
|
// Font stacks with appropriate fallbacks
|
|
6
|
-
$
|
|
6
|
+
$roboto: 'Roboto', sans-serif !default;
|
|
7
7
|
|
|
8
8
|
$helvetica-neue:
|
|
9
9
|
'Helvetica Neue',
|
|
@@ -26,11 +26,11 @@ $system-font-stack:
|
|
|
26
26
|
Arial,
|
|
27
27
|
sans-serif !default;
|
|
28
28
|
|
|
29
|
-
$font-family-base: $
|
|
30
|
-
$font-family-sans-serif: $
|
|
29
|
+
$font-family-base: $roboto !default;
|
|
30
|
+
$font-family-sans-serif: $roboto !default;
|
|
31
31
|
$font-family-monospace:
|
|
32
32
|
SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !default;
|
|
33
|
-
$headings-font-family: $
|
|
33
|
+
$headings-font-family: $roboto !default;
|
|
34
34
|
|
|
35
35
|
$font-weight-light: 300 !default;
|
|
36
36
|
$font-weight-normal: 400 !default;
|
|
@@ -33,11 +33,23 @@
|
|
|
33
33
|
--#{config.$prefix}btn-bg: var(--#{config.$prefix}#{$color}, #{$background});
|
|
34
34
|
--#{config.$prefix}btn-border-color: var(--#{config.$prefix}#{$color}, #{$border});
|
|
35
35
|
--#{config.$prefix}btn-hover-color: #{$btn-text-hover-color};
|
|
36
|
-
--#{config.$prefix}btn-hover-bg: var(
|
|
37
|
-
|
|
36
|
+
--#{config.$prefix}btn-hover-bg: var(
|
|
37
|
+
--#{config.$prefix}#{$color}-hover,
|
|
38
|
+
#{color.scale($background, $lightness: -15%)}
|
|
39
|
+
);
|
|
40
|
+
--#{config.$prefix}btn-hover-border-color: var(
|
|
41
|
+
--#{config.$prefix}#{$color}-hover,
|
|
42
|
+
#{color.scale($border, $lightness: -10%)}
|
|
43
|
+
);
|
|
38
44
|
--#{config.$prefix}btn-active-color: var(--#{config.$prefix}white, #{colors.$white});
|
|
39
|
-
--#{config.$prefix}btn-active-bg: var(
|
|
40
|
-
|
|
45
|
+
--#{config.$prefix}btn-active-bg: var(
|
|
46
|
+
--#{config.$prefix}#{$color}-hover,
|
|
47
|
+
#{color.scale($background, $lightness: -20%)}
|
|
48
|
+
);
|
|
49
|
+
--#{config.$prefix}btn-active-border-color: var(
|
|
50
|
+
--#{config.$prefix}#{$color}-hover,
|
|
51
|
+
#{color.scale($border, $lightness: -25%)}
|
|
52
|
+
);
|
|
41
53
|
--#{config.$prefix}btn-disabled-color: var(--#{config.$prefix}white, #{colors.$white});
|
|
42
54
|
--#{config.$prefix}btn-disabled-bg: var(--#{config.$prefix}#{$color}, #{$background});
|
|
43
55
|
--#{config.$prefix}btn-disabled-border-color: var(--#{config.$prefix}#{$color}, #{$border});
|
|
@@ -54,34 +66,52 @@
|
|
|
54
66
|
) {
|
|
55
67
|
$btn-color: var(--#{config.$prefix}#{$color}, #{map.get(tokens.$theme-colors, $color)});
|
|
56
68
|
$btn-hover-color: if(
|
|
57
|
-
$color-hover,
|
|
58
|
-
var(--#{config.$prefix}#{$color-hover}, #{map.get(tokens.$theme-colors, $color-hover)}),
|
|
69
|
+
$color-hover,
|
|
70
|
+
var(--#{config.$prefix}#{$color-hover}, #{map.get(tokens.$theme-colors, $color-hover)}),
|
|
59
71
|
var(--#{config.$prefix}white, #{colors.$white})
|
|
60
72
|
);
|
|
61
73
|
$btn-hover-bg: if(
|
|
62
|
-
$hover-background,
|
|
63
|
-
var(
|
|
64
|
-
|
|
74
|
+
$hover-background,
|
|
75
|
+
var(
|
|
76
|
+
--#{config.$prefix}#{$hover-background},
|
|
77
|
+
#{map.get(tokens.$theme-colors, $hover-background)}
|
|
78
|
+
),
|
|
79
|
+
var(
|
|
80
|
+
--#{config.$prefix}#{$color}-hover,
|
|
81
|
+
#{color.scale(map.get(tokens.$theme-colors, $color), $lightness: -15%)}
|
|
82
|
+
)
|
|
65
83
|
);
|
|
66
84
|
$btn-hover-border: if(
|
|
67
|
-
$hover-border,
|
|
68
|
-
var(--#{config.$prefix}#{$hover-border}, #{map.get(tokens.$theme-colors, $hover-border)}),
|
|
69
|
-
var(
|
|
85
|
+
$hover-border,
|
|
86
|
+
var(--#{config.$prefix}#{$hover-border}, #{map.get(tokens.$theme-colors, $hover-border)}),
|
|
87
|
+
var(
|
|
88
|
+
--#{config.$prefix}#{$color}-hover,
|
|
89
|
+
#{color.scale(map.get(tokens.$theme-colors, $color), $lightness: -10%)}
|
|
90
|
+
)
|
|
70
91
|
);
|
|
71
92
|
$btn-active-color: if(
|
|
72
|
-
$color-hover,
|
|
73
|
-
var(--#{config.$prefix}#{$color-hover}, #{map.get(tokens.$theme-colors, $color-hover)}),
|
|
93
|
+
$color-hover,
|
|
94
|
+
var(--#{config.$prefix}#{$color-hover}, #{map.get(tokens.$theme-colors, $color-hover)}),
|
|
74
95
|
var(--#{config.$prefix}white, #{colors.$white})
|
|
75
96
|
);
|
|
76
97
|
$btn-active-bg: if(
|
|
77
|
-
$active-background,
|
|
78
|
-
var(
|
|
79
|
-
|
|
98
|
+
$active-background,
|
|
99
|
+
var(
|
|
100
|
+
--#{config.$prefix}#{$active-background},
|
|
101
|
+
#{map.get(tokens.$theme-colors, $active-background)}
|
|
102
|
+
),
|
|
103
|
+
var(
|
|
104
|
+
--#{config.$prefix}#{$color}-hover,
|
|
105
|
+
#{color.scale(map.get(tokens.$theme-colors, $color), $lightness: -20%)}
|
|
106
|
+
)
|
|
80
107
|
);
|
|
81
108
|
$btn-active-border: if(
|
|
82
|
-
$active-border,
|
|
83
|
-
var(--#{config.$prefix}#{$active-border}, #{map.get(tokens.$theme-colors, $active-border)}),
|
|
84
|
-
var(
|
|
109
|
+
$active-border,
|
|
110
|
+
var(--#{config.$prefix}#{$active-border}, #{map.get(tokens.$theme-colors, $active-border)}),
|
|
111
|
+
var(
|
|
112
|
+
--#{config.$prefix}#{$color}-hover,
|
|
113
|
+
#{color.scale(map.get(tokens.$theme-colors, $color), $lightness: -25%)}
|
|
114
|
+
)
|
|
85
115
|
);
|
|
86
116
|
|
|
87
117
|
--#{config.$prefix}btn-color: #{$btn-color};
|
|
@@ -104,4 +134,4 @@
|
|
|
104
134
|
--#{config.$prefix}btn-padding-x: #{$padding-x};
|
|
105
135
|
--#{config.$prefix}btn-font-size: #{$font-size};
|
|
106
136
|
--#{config.$prefix}btn-border-radius: #{$border-radius};
|
|
107
|
-
}
|
|
137
|
+
}
|