@shohojdhara/atomix 0.3.2 → 0.3.3
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 +39 -20
- package/dist/atomix.css +83 -115
- package/dist/atomix.min.css +3 -3
- package/dist/index.d.ts +7049 -7284
- package/dist/index.esm.js +3529 -4674
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3208 -4315
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/applemix.css +16576 -0
- package/dist/themes/applemix.css.map +1 -0
- package/dist/themes/applemix.min.css +73 -0
- package/dist/themes/boomdevs.css +16007 -0
- package/dist/themes/boomdevs.css.map +1 -0
- package/dist/themes/boomdevs.min.css +406 -0
- package/dist/themes/esrar.css +18424 -0
- package/dist/themes/esrar.css.map +1 -0
- package/dist/themes/esrar.min.css +221 -0
- package/dist/themes/flashtrade.css +17596 -0
- package/dist/themes/flashtrade.css.map +1 -0
- package/dist/themes/flashtrade.min.css +196 -0
- package/dist/themes/mashroom.css +31082 -0
- package/dist/themes/mashroom.css.map +1 -0
- package/dist/themes/mashroom.min.css +450 -0
- package/dist/themes/shaj-default.css +17200 -0
- package/dist/themes/shaj-default.css.map +1 -0
- package/dist/themes/shaj-default.min.css +502 -0
- package/package.json +96 -17
- package/scripts/atomix-cli.js +1428 -0
- package/scripts/build-themes.js +208 -0
- package/scripts/cli/interactive-init.js +528 -0
- package/scripts/cli/migration-tools.js +603 -0
- package/scripts/cli/token-manager.js +519 -0
- package/scripts/sync-theme-config.js +309 -0
- package/src/components/List/ListGroup.tsx +1 -2
- package/src/components/Popover/Popover.tsx +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +49 -12
- package/src/components/Tooltip/Tooltip.tsx +32 -58
- package/src/lib/composables/useTooltip.ts +285 -0
- package/src/lib/constants/cssVariables.ts +390 -0
- package/src/lib/hooks/__tests__/useComponentCustomization.test.ts +151 -0
- package/src/lib/hooks/index.ts +19 -0
- package/src/lib/hooks/useComponentCustomization.ts +175 -0
- package/src/lib/index.ts +13 -1
- package/src/lib/patterns/__tests__/slots.test.ts +108 -0
- package/src/lib/patterns/index.ts +35 -0
- package/src/lib/patterns/slots.tsx +421 -0
- package/src/lib/theme/__tests__/ThemeBuilder.test.ts +223 -0
- package/src/lib/theme/builders/ThemeBuilder.ts +372 -0
- package/src/lib/theme/createTheme.ts +2 -134
- package/src/lib/theme/cssVariableMapper.ts +261 -0
- package/src/lib/theme/index.ts +33 -250
- package/src/lib/theme/runtime/ThemeApplicator.ts +252 -0
- package/src/lib/theme/themeUtils.ts +27 -5
- package/src/lib/theme/types.ts +59 -0
- package/src/lib/theme-tools.ts +185 -0
- package/src/lib/types/components.ts +194 -0
- package/src/lib/types/partProps.ts +426 -0
- package/src/lib/utils/__tests__/componentUtils.test.ts +144 -0
- package/src/lib/utils/componentUtils.ts +163 -0
- package/src/lib/utils/index.ts +17 -57
- package/src/styles/01-settings/_settings.colors.scss +10 -10
- package/src/styles/01-settings/_settings.tooltip.scss +1 -1
- package/src/styles/06-components/_components.tooltip.scss +31 -81
- package/src/themes/README.md +443 -0
- package/src/themes/THEME_CHECKLIST.md +74 -0
- package/src/themes/applemix/01-settings/_index.scss +24 -0
- package/src/themes/applemix/01-settings/_settings.animations.scss +0 -0
- package/src/themes/applemix/01-settings/_settings.background.scss +6 -0
- package/src/themes/applemix/01-settings/_settings.colors.scss +75 -0
- package/src/themes/applemix/01-settings/_settings.config.scss +15 -0
- package/src/themes/applemix/01-settings/_settings.typography.scss +30 -0
- package/src/themes/applemix/02-tools/_index.scss +4 -0
- package/src/themes/applemix/03-generic/_index.scss +7 -0
- package/src/themes/applemix/04-elements/_index.scss +7 -0
- package/src/themes/applemix/05-objects/_index.scss +7 -0
- package/src/themes/applemix/06-components/_index.scss +15 -0
- package/src/themes/applemix/99-utilities/_index.scss +7 -0
- package/src/themes/applemix/README.md +378 -0
- package/src/themes/applemix/index.scss +33 -0
- package/src/themes/boomdevs/01-settings/_index.scss +38 -0
- package/src/themes/boomdevs/01-settings/_settings.accordion.scss +12 -0
- package/src/themes/boomdevs/01-settings/_settings.animations.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.avatar.scss +9 -0
- package/src/themes/boomdevs/01-settings/_settings.badge.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.border-radius.scss +16 -0
- package/src/themes/boomdevs/01-settings/_settings.border.scss +10 -0
- package/src/themes/boomdevs/01-settings/_settings.box-shadow.scss +14 -0
- package/src/themes/boomdevs/01-settings/_settings.breadcrumb.scss +13 -0
- package/src/themes/boomdevs/01-settings/_settings.breakpoints.scss +15 -0
- package/src/themes/boomdevs/01-settings/_settings.button.scss +9 -0
- package/src/themes/boomdevs/01-settings/_settings.callout.scss +9 -0
- package/src/themes/boomdevs/01-settings/_settings.card.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.checkbox.scss +9 -0
- package/src/themes/boomdevs/01-settings/_settings.colors.scss +145 -0
- package/src/themes/boomdevs/01-settings/_settings.dropdown.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.grid.scss +16 -0
- package/src/themes/boomdevs/01-settings/_settings.input.scss +14 -0
- package/src/themes/boomdevs/01-settings/_settings.link.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.list.scss +10 -0
- package/src/themes/boomdevs/01-settings/_settings.modal.scss +16 -0
- package/src/themes/boomdevs/01-settings/_settings.navbar.scss +16 -0
- package/src/themes/boomdevs/01-settings/_settings.pagination.scss +13 -0
- package/src/themes/boomdevs/01-settings/_settings.progress.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.rating.scss +10 -0
- package/src/themes/boomdevs/01-settings/_settings.spacing.scss +33 -0
- package/src/themes/boomdevs/01-settings/_settings.spinner.scss +11 -0
- package/src/themes/boomdevs/01-settings/_settings.steps.scss +12 -0
- package/src/themes/boomdevs/01-settings/_settings.tabs.scss +12 -0
- package/src/themes/boomdevs/01-settings/_settings.todo.scss +15 -0
- package/src/themes/boomdevs/01-settings/_settings.toggle.scss +14 -0
- package/src/themes/boomdevs/01-settings/_settings.tooltip.scss +13 -0
- package/src/themes/boomdevs/01-settings/_settings.typography.scss +58 -0
- package/src/themes/boomdevs/01-settings/_settings.video-player.scss +12 -0
- package/src/themes/boomdevs/02-tools/_index.scss +7 -0
- package/src/themes/boomdevs/03-generic/_index.scss +7 -0
- package/src/themes/boomdevs/04-elements/_index.scss +7 -0
- package/src/themes/boomdevs/05-objects/_index.scss +7 -0
- package/src/themes/boomdevs/06-components/_components.button.scss +11 -0
- package/src/themes/boomdevs/06-components/_index.scss +11 -0
- package/src/themes/boomdevs/99-utilities/_index.scss +7 -0
- package/src/themes/boomdevs/index.scss +26 -0
- package/src/themes/esrar/01-settings/_index.scss +15 -0
- package/src/themes/esrar/01-settings/_settings.colors.scss +91 -0
- package/src/themes/esrar/02-tools/_index.scss +8 -0
- package/src/themes/esrar/02-tools/_tools.animations.scss +342 -0
- package/src/themes/esrar/06-components/_components.accordion.scss +49 -0
- package/src/themes/esrar/06-components/_components.avatar-group.scss +14 -0
- package/src/themes/esrar/06-components/_components.avatar.scss +61 -0
- package/src/themes/esrar/06-components/_components.badge.scss +117 -0
- package/src/themes/esrar/06-components/_components.breadcrumb.scss +65 -0
- package/src/themes/esrar/06-components/_components.btn-group.scss +19 -0
- package/src/themes/esrar/06-components/_components.button.scss +224 -0
- package/src/themes/esrar/06-components/_components.callout.scss +51 -0
- package/src/themes/esrar/06-components/_components.card.scss +134 -0
- package/src/themes/esrar/06-components/_components.chart.scss +24 -0
- package/src/themes/esrar/06-components/_components.checkbox-group.scss +26 -0
- package/src/themes/esrar/06-components/_components.checkbox.scss +71 -0
- package/src/themes/esrar/06-components/_components.color-mode-toggle.scss +29 -0
- package/src/themes/esrar/06-components/_components.countdown.scss +67 -0
- package/src/themes/esrar/06-components/_components.data-table.scss +22 -0
- package/src/themes/esrar/06-components/_components.datepicker.scss +20 -0
- package/src/themes/esrar/06-components/_components.dropdown.scss +272 -0
- package/src/themes/esrar/06-components/_components.edge-panel.scss +10 -0
- package/src/themes/esrar/06-components/_components.form-group.scss +15 -0
- package/src/themes/esrar/06-components/_components.form.scss +66 -0
- package/src/themes/esrar/06-components/_components.hero.scss +251 -0
- package/src/themes/esrar/06-components/_components.icon.scss +33 -0
- package/src/themes/esrar/06-components/_components.image-gallery.scss +29 -0
- package/src/themes/esrar/06-components/_components.input.scss +91 -0
- package/src/themes/esrar/06-components/_components.list-group.scss +26 -0
- package/src/themes/esrar/06-components/_components.modal.scss +148 -0
- package/src/themes/esrar/06-components/_components.notification.scss +80 -0
- package/src/themes/esrar/06-components/_components.pagination.scss +84 -0
- package/src/themes/esrar/06-components/_components.popover.scss +10 -0
- package/src/themes/esrar/06-components/_components.progress.scss +64 -0
- package/src/themes/esrar/06-components/_components.rating.scss +26 -0
- package/src/themes/esrar/06-components/_components.skeleton.scss +15 -0
- package/src/themes/esrar/06-components/_components.slider.scss +90 -0
- package/src/themes/esrar/06-components/_components.spinner.scss +71 -0
- package/src/themes/esrar/06-components/_components.steps.scss +76 -0
- package/src/themes/esrar/06-components/_components.tab.scss +58 -0
- package/src/themes/esrar/06-components/_components.tag.scss +21 -0
- package/src/themes/esrar/06-components/_components.timeline.scss +19 -0
- package/src/themes/esrar/06-components/_components.toast.scss +91 -0
- package/src/themes/esrar/06-components/_components.toggle.scss +74 -0
- package/src/themes/esrar/06-components/_components.tooltip.scss +45 -0
- package/src/themes/esrar/06-components/_components.upload.scss +102 -0
- package/src/themes/esrar/06-components/_index.scss +42 -0
- package/src/themes/esrar/index.scss +30 -0
- package/src/themes/flashtrade/01-settings/_index.scss +19 -0
- package/src/themes/flashtrade/01-settings/_settings.animations.scss +11 -0
- package/src/themes/flashtrade/01-settings/_settings.background.scss +9 -0
- package/src/themes/flashtrade/01-settings/_settings.colors.scss +79 -0
- package/src/themes/flashtrade/01-settings/_settings.config.scss +16 -0
- package/src/themes/flashtrade/01-settings/_settings.typography.scss +35 -0
- package/src/themes/flashtrade/02-tools/_index.scss +8 -0
- package/src/themes/flashtrade/03-generic/_index.scss +8 -0
- package/src/themes/flashtrade/04-elements/_index.scss +12 -0
- package/src/themes/flashtrade/05-objects/_index.scss +8 -0
- package/src/themes/flashtrade/06-components/_components.badge.scss +156 -0
- package/src/themes/flashtrade/06-components/_components.button.scss +135 -0
- package/src/themes/flashtrade/06-components/_components.card.scss +214 -0
- package/src/themes/flashtrade/06-components/_components.navbar.scss +227 -0
- package/src/themes/flashtrade/06-components/_index.scss +13 -0
- package/src/themes/flashtrade/99-utilities/_index.scss +9 -0
- package/src/themes/flashtrade/99-utilities/_utilities.trading.scss +187 -0
- package/src/themes/flashtrade/README.md +386 -0
- package/src/themes/flashtrade/demo.html +272 -0
- package/src/themes/flashtrade/index.scss +36 -0
- package/src/themes/mashroom/01-settings/_index.scss +69 -0
- package/src/themes/mashroom/01-settings/_settings.accordion.scss +32 -0
- package/src/themes/mashroom/01-settings/_settings.animations.scss +26 -0
- package/src/themes/mashroom/01-settings/_settings.avatar-group.scss +22 -0
- package/src/themes/mashroom/01-settings/_settings.avatar.scss +57 -0
- package/src/themes/mashroom/01-settings/_settings.badge.scss +19 -0
- package/src/themes/mashroom/01-settings/_settings.border-radius.scss +24 -0
- package/src/themes/mashroom/01-settings/_settings.border.scss +14 -0
- package/src/themes/mashroom/01-settings/_settings.box-shadow.scss +40 -0
- package/src/themes/mashroom/01-settings/_settings.breadcrumb.scss +0 -0
- package/src/themes/mashroom/01-settings/_settings.breakpoints.scss +17 -0
- package/src/themes/mashroom/01-settings/_settings.btn-group.scss +5 -0
- package/src/themes/mashroom/01-settings/_settings.button.scss +50 -0
- package/src/themes/mashroom/01-settings/_settings.callout.scss +81 -0
- package/src/themes/mashroom/01-settings/_settings.card.scss +52 -0
- package/src/themes/mashroom/01-settings/_settings.checkbox-group.scss +5 -0
- package/src/themes/mashroom/01-settings/_settings.checkbox.scss +23 -0
- package/src/themes/mashroom/01-settings/_settings.color-mode.scss +7 -0
- package/src/themes/mashroom/01-settings/_settings.colors.scss +180 -0
- package/src/themes/mashroom/01-settings/_settings.config.scss +4 -0
- package/src/themes/mashroom/01-settings/_settings.countdown.scss +20 -0
- package/src/themes/mashroom/01-settings/_settings.data-table.scss +56 -0
- package/src/themes/mashroom/01-settings/_settings.datepicker.scss +45 -0
- package/src/themes/mashroom/01-settings/_settings.design-tokens.scss +3 -0
- package/src/themes/mashroom/01-settings/_settings.dropdown.scss +45 -0
- package/src/themes/mashroom/01-settings/_settings.edge-panel.scss +24 -0
- package/src/themes/mashroom/01-settings/_settings.fonts.scss +8 -0
- package/src/themes/mashroom/01-settings/_settings.form-group.scss +14 -0
- package/src/themes/mashroom/01-settings/_settings.form.scss +6 -0
- package/src/themes/mashroom/01-settings/_settings.grid.scss +23 -0
- package/src/themes/mashroom/01-settings/_settings.hero.scss +41 -0
- package/src/themes/mashroom/01-settings/_settings.input.scss +51 -0
- package/src/themes/mashroom/01-settings/_settings.link.scss +13 -0
- package/src/themes/mashroom/01-settings/_settings.list-group.scss +16 -0
- package/src/themes/mashroom/01-settings/_settings.list.scss +13 -0
- package/src/themes/mashroom/01-settings/_settings.masonry-grid.scss +23 -0
- package/src/themes/mashroom/01-settings/_settings.menu.scss +50 -0
- package/src/themes/mashroom/01-settings/_settings.messages.scss +98 -0
- package/src/themes/mashroom/01-settings/_settings.modal.scss +41 -0
- package/src/themes/mashroom/01-settings/_settings.nav.scss +20 -0
- package/src/themes/mashroom/01-settings/_settings.navbar.scss +54 -0
- package/src/themes/mashroom/01-settings/_settings.pagination.scss +30 -0
- package/src/themes/mashroom/01-settings/_settings.photoviewer.scss +45 -0
- package/src/themes/mashroom/01-settings/_settings.popover.scss +20 -0
- package/src/themes/mashroom/01-settings/_settings.position.scss +9 -0
- package/src/themes/mashroom/01-settings/_settings.progress.scss +17 -0
- package/src/themes/mashroom/01-settings/_settings.rating.scss +11 -0
- package/src/themes/mashroom/01-settings/_settings.river.scss +50 -0
- package/src/themes/mashroom/01-settings/_settings.sectionintro.scss +31 -0
- package/src/themes/mashroom/01-settings/_settings.select.scss +47 -0
- package/src/themes/mashroom/01-settings/_settings.side-menu.scss +79 -0
- package/src/themes/mashroom/01-settings/_settings.skeleton.scss +24 -0
- package/src/themes/mashroom/01-settings/_settings.spacing.scss +66 -0
- package/src/themes/mashroom/01-settings/_settings.spinner.scss +34 -0
- package/src/themes/mashroom/01-settings/_settings.steps.scss +33 -0
- package/src/themes/mashroom/01-settings/_settings.tabs.scss +33 -0
- package/src/themes/mashroom/01-settings/_settings.testimonials.scss +24 -0
- package/src/themes/mashroom/01-settings/_settings.todo.scss +52 -0
- package/src/themes/mashroom/01-settings/_settings.toggle.scss +49 -0
- package/src/themes/mashroom/01-settings/_settings.tooltip.scss +20 -0
- package/src/themes/mashroom/01-settings/_settings.typography.scss +95 -0
- package/src/themes/mashroom/01-settings/_settings.upload.scss +96 -0
- package/src/themes/mashroom/01-settings/_settings.z-layers.scss +19 -0
- package/src/themes/mashroom/02-tools/_index.scss +8 -0
- package/src/themes/mashroom/02-tools/_tools.psychedelic-gradients.scss +78 -0
- package/src/themes/mashroom/02-tools/_tools.trippy-effects.scss +114 -0
- package/src/themes/mashroom/03-generic/_index.scss +6 -0
- package/src/themes/mashroom/04-elements/_index.scss +6 -0
- package/src/themes/mashroom/05-objects/_index.scss +6 -0
- package/src/themes/mashroom/06-components/_components.accordion.scss +187 -0
- package/src/themes/mashroom/06-components/_components.avatar-group.scss +276 -0
- package/src/themes/mashroom/06-components/_components.avatar.scss +114 -0
- package/src/themes/mashroom/06-components/_components.badge.scss +152 -0
- package/src/themes/mashroom/06-components/_components.breadcrumb.scss +162 -0
- package/src/themes/mashroom/06-components/_components.btn-group.scss +404 -0
- package/src/themes/mashroom/06-components/_components.button.scss +160 -0
- package/src/themes/mashroom/06-components/_components.callout.scss +140 -0
- package/src/themes/mashroom/06-components/_components.card.scss +225 -0
- package/src/themes/mashroom/06-components/_components.checkbox.scss +186 -0
- package/src/themes/mashroom/06-components/_components.color-mode-toggle.scss +308 -0
- package/src/themes/mashroom/06-components/_components.countdown.scss +402 -0
- package/src/themes/mashroom/06-components/_components.data-table.scss +354 -0
- package/src/themes/mashroom/06-components/_components.datepicker.scss +349 -0
- package/src/themes/mashroom/06-components/_components.dropdown.scss +334 -0
- package/src/themes/mashroom/06-components/_components.edge-panel.scss +413 -0
- package/src/themes/mashroom/06-components/_components.form-group.scss +433 -0
- package/src/themes/mashroom/06-components/_components.form.scss +358 -0
- package/src/themes/mashroom/06-components/_components.hero.scss +151 -0
- package/src/themes/mashroom/06-components/_components.input.scss +147 -0
- package/src/themes/mashroom/06-components/_components.list-group.scss +456 -0
- package/src/themes/mashroom/06-components/_components.list.scss +145 -0
- package/src/themes/mashroom/06-components/_components.menu.scss +497 -0
- package/src/themes/mashroom/06-components/_components.messages.scss +277 -0
- package/src/themes/mashroom/06-components/_components.modal.scss +264 -0
- package/src/themes/mashroom/06-components/_components.nav.scss +181 -0
- package/src/themes/mashroom/06-components/_components.navbar.scss +538 -0
- package/src/themes/mashroom/06-components/_components.pagination.scss +400 -0
- package/src/themes/mashroom/06-components/_components.photoviewer.scss +498 -0
- package/src/themes/mashroom/06-components/_components.popover.scss +383 -0
- package/src/themes/mashroom/06-components/_components.product-review.scss +408 -0
- package/src/themes/mashroom/06-components/_components.progress.scss +249 -0
- package/src/themes/mashroom/06-components/_components.rating.scss +300 -0
- package/src/themes/mashroom/06-components/_components.river.scss +570 -0
- package/src/themes/mashroom/06-components/_components.sectionintro.scss +546 -0
- package/src/themes/mashroom/06-components/_components.select.scss +455 -0
- package/src/themes/mashroom/06-components/_components.side-menu.scss +635 -0
- package/src/themes/mashroom/06-components/_components.skeleton.scss +447 -0
- package/src/themes/mashroom/06-components/_components.slider.scss +414 -0
- package/src/themes/mashroom/06-components/_components.spinner.scss +198 -0
- package/src/themes/mashroom/06-components/_components.steps.scss +350 -0
- package/src/themes/mashroom/06-components/_components.tabs.scss +269 -0
- package/src/themes/mashroom/06-components/_components.testimonials.scss +561 -0
- package/src/themes/mashroom/06-components/_components.toggle.scss +231 -0
- package/src/themes/mashroom/06-components/_components.tooltip.scss +167 -0
- package/src/themes/mashroom/06-components/_components.upload.scss +537 -0
- package/src/themes/mashroom/06-components/_components.video-player.scss +560 -0
- package/src/themes/mashroom/06-components/_index.scss +55 -0
- package/src/themes/mashroom/99-utilities/_index.scss +6 -0
- package/src/themes/mashroom/index.scss +26 -0
- package/src/themes/shaj-default/01-settings/_index.scss +69 -0
- package/src/themes/shaj-default/01-settings/_settings.accordion.scss +38 -0
- package/src/themes/shaj-default/01-settings/_settings.animations.scss +32 -0
- package/src/themes/shaj-default/01-settings/_settings.avatar-group.scss +28 -0
- package/src/themes/shaj-default/01-settings/_settings.avatar.scss +63 -0
- package/src/themes/shaj-default/01-settings/_settings.badge.scss +25 -0
- package/src/themes/shaj-default/01-settings/_settings.border-radius.scss +24 -0
- package/src/themes/shaj-default/01-settings/_settings.border.scss +20 -0
- package/src/themes/shaj-default/01-settings/_settings.box-shadow.scss +46 -0
- package/src/themes/shaj-default/01-settings/_settings.breadcrumb.scss +0 -0
- package/src/themes/shaj-default/01-settings/_settings.breakpoints.scss +23 -0
- package/src/themes/shaj-default/01-settings/_settings.btn-group.scss +11 -0
- package/src/themes/shaj-default/01-settings/_settings.button.scss +56 -0
- package/src/themes/shaj-default/01-settings/_settings.callout.scss +87 -0
- package/src/themes/shaj-default/01-settings/_settings.card.scss +52 -0
- package/src/themes/shaj-default/01-settings/_settings.checkbox-group.scss +11 -0
- package/src/themes/shaj-default/01-settings/_settings.checkbox.scss +29 -0
- package/src/themes/shaj-default/01-settings/_settings.color-mode.scss +13 -0
- package/src/themes/shaj-default/01-settings/_settings.colors.scss +91 -0
- package/src/themes/shaj-default/01-settings/_settings.config.scss +4 -0
- package/src/themes/shaj-default/01-settings/_settings.countdown.scss +26 -0
- package/src/themes/shaj-default/01-settings/_settings.data-table.scss +62 -0
- package/src/themes/shaj-default/01-settings/_settings.datepicker.scss +51 -0
- package/src/themes/shaj-default/01-settings/_settings.design-tokens.scss +9 -0
- package/src/themes/shaj-default/01-settings/_settings.dropdown.scss +51 -0
- package/src/themes/shaj-default/01-settings/_settings.edge-panel.scss +30 -0
- package/src/themes/shaj-default/01-settings/_settings.fonts.scss +13 -0
- package/src/themes/shaj-default/01-settings/_settings.form-group.scss +20 -0
- package/src/themes/shaj-default/01-settings/_settings.form.scss +12 -0
- package/src/themes/shaj-default/01-settings/_settings.grid.scss +29 -0
- package/src/themes/shaj-default/01-settings/_settings.hero.scss +47 -0
- package/src/themes/shaj-default/01-settings/_settings.input.scss +57 -0
- package/src/themes/shaj-default/01-settings/_settings.link.scss +19 -0
- package/src/themes/shaj-default/01-settings/_settings.list-group.scss +22 -0
- package/src/themes/shaj-default/01-settings/_settings.list.scss +19 -0
- package/src/themes/shaj-default/01-settings/_settings.masonry-grid.scss +29 -0
- package/src/themes/shaj-default/01-settings/_settings.menu.scss +56 -0
- package/src/themes/shaj-default/01-settings/_settings.messages.scss +104 -0
- package/src/themes/shaj-default/01-settings/_settings.modal.scss +47 -0
- package/src/themes/shaj-default/01-settings/_settings.nav.scss +26 -0
- package/src/themes/shaj-default/01-settings/_settings.navbar.scss +60 -0
- package/src/themes/shaj-default/01-settings/_settings.pagination.scss +36 -0
- package/src/themes/shaj-default/01-settings/_settings.photoviewer.scss +51 -0
- package/src/themes/shaj-default/01-settings/_settings.popover.scss +26 -0
- package/src/themes/shaj-default/01-settings/_settings.position.scss +15 -0
- package/src/themes/shaj-default/01-settings/_settings.progress.scss +23 -0
- package/src/themes/shaj-default/01-settings/_settings.rating.scss +17 -0
- package/src/themes/shaj-default/01-settings/_settings.river.scss +56 -0
- package/src/themes/shaj-default/01-settings/_settings.sectionintro.scss +37 -0
- package/src/themes/shaj-default/01-settings/_settings.select.scss +53 -0
- package/src/themes/shaj-default/01-settings/_settings.side-menu.scss +85 -0
- package/src/themes/shaj-default/01-settings/_settings.skeleton.scss +30 -0
- package/src/themes/shaj-default/01-settings/_settings.spacing.scss +72 -0
- package/src/themes/shaj-default/01-settings/_settings.spinner.scss +24 -0
- package/src/themes/shaj-default/01-settings/_settings.steps.scss +39 -0
- package/src/themes/shaj-default/01-settings/_settings.tabs.scss +39 -0
- package/src/themes/shaj-default/01-settings/_settings.testimonials.scss +30 -0
- package/src/themes/shaj-default/01-settings/_settings.todo.scss +58 -0
- package/src/themes/shaj-default/01-settings/_settings.toggle.scss +55 -0
- package/src/themes/shaj-default/01-settings/_settings.tooltip.scss +26 -0
- package/src/themes/shaj-default/01-settings/_settings.typography.scss +101 -0
- package/src/themes/shaj-default/01-settings/_settings.upload.scss +102 -0
- package/src/themes/shaj-default/01-settings/_settings.z-layers.scss +25 -0
- package/src/themes/shaj-default/02-tools/_index.scss +0 -0
- package/src/themes/shaj-default/03-generic/_generic.root.scss +0 -0
- package/src/themes/shaj-default/03-generic/_index.scss +2 -0
- package/src/themes/shaj-default/04-elements/_index.scss +0 -0
- package/src/themes/shaj-default/05-objects/_index.scss +0 -0
- package/src/themes/shaj-default/06-components/_components.button.scss +55 -0
- package/src/themes/shaj-default/06-components/_components.card.scss +57 -0
- package/src/themes/shaj-default/06-components/_components.input.scss +58 -0
- package/src/themes/shaj-default/06-components/_components.navbar.scss +99 -0
- package/src/themes/shaj-default/06-components/_components.tooltip.scss +0 -0
- package/src/themes/shaj-default/06-components/_index.scss +13 -0
- package/src/themes/shaj-default/99-utilities/_index.scss +0 -0
- package/src/themes/shaj-default/index.scss +25 -0
- package/src/themes/themes.config.js +219 -0
- package/theme.config.ts +360 -0
- package/src/lib/theme/studio/ThemeStudio.tsx +0 -312
- package/src/lib/theme/studio/index.ts +0 -8
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { useState, useRef, useEffect, RefObject, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TooltipPosition =
|
|
4
|
+
| 'top'
|
|
5
|
+
| 'bottom'
|
|
6
|
+
| 'left'
|
|
7
|
+
| 'right'
|
|
8
|
+
| 'top-left'
|
|
9
|
+
| 'top-right'
|
|
10
|
+
| 'bottom-left'
|
|
11
|
+
| 'bottom-right';
|
|
12
|
+
|
|
13
|
+
export type TooltipTrigger = 'click' | 'hover';
|
|
14
|
+
|
|
15
|
+
interface UseTooltipProps {
|
|
16
|
+
position?: TooltipPosition;
|
|
17
|
+
trigger?: TooltipTrigger;
|
|
18
|
+
offset?: number;
|
|
19
|
+
delay?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface TooltipStyles {
|
|
23
|
+
tooltip: React.CSSProperties;
|
|
24
|
+
arrow: React.CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface UseTooltipResult {
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
isPositioned: boolean;
|
|
30
|
+
tooltipId: string;
|
|
31
|
+
triggerRef: RefObject<HTMLDivElement>;
|
|
32
|
+
tooltipRef: RefObject<HTMLDivElement>;
|
|
33
|
+
tooltipStyle: React.CSSProperties;
|
|
34
|
+
arrowStyle: React.CSSProperties;
|
|
35
|
+
showTooltip: () => void;
|
|
36
|
+
hideTooltip: () => void;
|
|
37
|
+
toggleTooltip: () => void;
|
|
38
|
+
triggerProps: React.HTMLAttributes<HTMLDivElement>;
|
|
39
|
+
wrapperProps: React.HTMLAttributes<HTMLDivElement>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Calculate tooltip and arrow positions based on trigger and tooltip dimensions
|
|
44
|
+
*/
|
|
45
|
+
const calculateTooltipPosition = (
|
|
46
|
+
position: TooltipPosition,
|
|
47
|
+
triggerRect: DOMRect,
|
|
48
|
+
tooltipRect: DOMRect,
|
|
49
|
+
wrapperRect: DOMRect,
|
|
50
|
+
offset: number,
|
|
51
|
+
arrowSize: number
|
|
52
|
+
): TooltipStyles => {
|
|
53
|
+
const tooltipWidth = tooltipRect.width || 0;
|
|
54
|
+
const tooltipHeight = tooltipRect.height || 0;
|
|
55
|
+
const triggerWidth = triggerRect.width;
|
|
56
|
+
const triggerHeight = triggerRect.height;
|
|
57
|
+
|
|
58
|
+
const tooltipStyle: React.CSSProperties = {
|
|
59
|
+
'--atomix-tooltip-offset': `${offset}px`,
|
|
60
|
+
} as React.CSSProperties;
|
|
61
|
+
|
|
62
|
+
const arrowStyle: React.CSSProperties = {};
|
|
63
|
+
|
|
64
|
+
switch (position) {
|
|
65
|
+
case 'top':
|
|
66
|
+
tooltipStyle.top = `${triggerRect.top - wrapperRect.top - tooltipHeight - offset}px`;
|
|
67
|
+
tooltipStyle.left = `${triggerRect.left - wrapperRect.left + triggerWidth / 2 - tooltipWidth / 2}px`;
|
|
68
|
+
arrowStyle.bottom = `${arrowSize / -2}px`;
|
|
69
|
+
arrowStyle.left = `${tooltipWidth / 2 - arrowSize / 2}px`;
|
|
70
|
+
break;
|
|
71
|
+
|
|
72
|
+
case 'bottom':
|
|
73
|
+
tooltipStyle.top = `${triggerRect.bottom - wrapperRect.top + offset}px`;
|
|
74
|
+
tooltipStyle.left = `${triggerRect.left - wrapperRect.left + triggerWidth / 2 - tooltipWidth / 2}px`;
|
|
75
|
+
arrowStyle.top = `${arrowSize / -2}px`;
|
|
76
|
+
arrowStyle.left = `${tooltipWidth / 2 - arrowSize / 2}px`;
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 'left':
|
|
80
|
+
tooltipStyle.right = `${wrapperRect.right - triggerRect.left + offset}px`;
|
|
81
|
+
tooltipStyle.top = `${triggerRect.top - wrapperRect.top + triggerHeight / 2 - tooltipHeight / 2}px`;
|
|
82
|
+
arrowStyle.right = `${arrowSize / -2}px`;
|
|
83
|
+
arrowStyle.top = `${tooltipHeight / 2 - arrowSize / 2}px`;
|
|
84
|
+
break;
|
|
85
|
+
|
|
86
|
+
case 'right':
|
|
87
|
+
tooltipStyle.left = `${triggerRect.right - wrapperRect.left + offset}px`;
|
|
88
|
+
tooltipStyle.top = `${triggerRect.top - wrapperRect.top + triggerHeight / 2 - tooltipHeight / 2}px`;
|
|
89
|
+
arrowStyle.left = `${arrowSize / -2}px`;
|
|
90
|
+
arrowStyle.top = `${tooltipHeight / 2 - arrowSize / 2}px`;
|
|
91
|
+
break;
|
|
92
|
+
|
|
93
|
+
case 'top-left':
|
|
94
|
+
tooltipStyle.bottom = `${wrapperRect.bottom - triggerRect.top + offset}px`;
|
|
95
|
+
tooltipStyle.left = `${triggerRect.left - wrapperRect.left}px`;
|
|
96
|
+
arrowStyle.bottom = `${arrowSize / -2}px`;
|
|
97
|
+
arrowStyle.left = `${arrowSize}px`;
|
|
98
|
+
break;
|
|
99
|
+
|
|
100
|
+
case 'top-right':
|
|
101
|
+
tooltipStyle.bottom = `${wrapperRect.bottom - triggerRect.top + offset}px`;
|
|
102
|
+
tooltipStyle.right = `${wrapperRect.right - triggerRect.right}px`;
|
|
103
|
+
arrowStyle.bottom = `${arrowSize / -2}px`;
|
|
104
|
+
arrowStyle.right = `${arrowSize}px`;
|
|
105
|
+
break;
|
|
106
|
+
|
|
107
|
+
case 'bottom-left':
|
|
108
|
+
tooltipStyle.top = `${triggerRect.bottom - wrapperRect.top + offset}px`;
|
|
109
|
+
tooltipStyle.left = `${triggerRect.left - wrapperRect.left}px`;
|
|
110
|
+
arrowStyle.top = `${arrowSize / -2}px`;
|
|
111
|
+
arrowStyle.left = `${arrowSize}px`;
|
|
112
|
+
break;
|
|
113
|
+
|
|
114
|
+
case 'bottom-right':
|
|
115
|
+
tooltipStyle.top = `${triggerRect.bottom - wrapperRect.top + offset}px`;
|
|
116
|
+
tooltipStyle.right = `${wrapperRect.right - triggerRect.right}px`;
|
|
117
|
+
arrowStyle.top = `${arrowSize / -2}px`;
|
|
118
|
+
arrowStyle.right = `${arrowSize}px`;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return { tooltip: tooltipStyle, arrow: arrowStyle };
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get arrow size from CSS custom property
|
|
127
|
+
*/
|
|
128
|
+
const getArrowSize = (element: HTMLElement): number => {
|
|
129
|
+
const arrowSizeValue = getComputedStyle(element)
|
|
130
|
+
.getPropertyValue('--atomix-tooltip-arrow-size')
|
|
131
|
+
.trim();
|
|
132
|
+
|
|
133
|
+
if (!arrowSizeValue) return 8; // Default fallback
|
|
134
|
+
|
|
135
|
+
// Try to parse as rem (e.g., "0.5rem")
|
|
136
|
+
const remMatch = arrowSizeValue.match(/([\d.]+)rem/);
|
|
137
|
+
if (remMatch?.[1]) {
|
|
138
|
+
return parseFloat(remMatch[1]) * 16; // Convert rem to px
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Try to parse as px (e.g., "8px")
|
|
142
|
+
const pxMatch = arrowSizeValue.match(/([\d.]+)px/);
|
|
143
|
+
if (pxMatch?.[1]) {
|
|
144
|
+
return parseFloat(pxMatch[1]);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return 8; // Default fallback
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Hook for managing tooltip state and positioning logic
|
|
152
|
+
*/
|
|
153
|
+
export const useTooltip = ({
|
|
154
|
+
position = 'top',
|
|
155
|
+
trigger = 'hover',
|
|
156
|
+
offset = 10,
|
|
157
|
+
delay = 200,
|
|
158
|
+
}: UseTooltipProps): UseTooltipResult => {
|
|
159
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
160
|
+
const [isPositioned, setIsPositioned] = useState(false);
|
|
161
|
+
const [tooltipStyle, setTooltipStyle] = useState<React.CSSProperties>({});
|
|
162
|
+
const [arrowStyle, setArrowStyle] = useState<React.CSSProperties>({});
|
|
163
|
+
|
|
164
|
+
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
165
|
+
const triggerRef = useRef<HTMLDivElement>(null);
|
|
166
|
+
const tooltipRef = useRef<HTMLDivElement>(null);
|
|
167
|
+
const tooltipId = `tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
168
|
+
|
|
169
|
+
const showTooltip = useCallback(() => {
|
|
170
|
+
if (timeoutRef.current) {
|
|
171
|
+
clearTimeout(timeoutRef.current);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (delay > 0) {
|
|
175
|
+
timeoutRef.current = setTimeout(() => {
|
|
176
|
+
setIsVisible(true);
|
|
177
|
+
}, delay);
|
|
178
|
+
} else {
|
|
179
|
+
setIsVisible(true);
|
|
180
|
+
}
|
|
181
|
+
}, [delay]);
|
|
182
|
+
|
|
183
|
+
const hideTooltip = useCallback(() => {
|
|
184
|
+
if (timeoutRef.current) {
|
|
185
|
+
clearTimeout(timeoutRef.current);
|
|
186
|
+
}
|
|
187
|
+
setIsVisible(false);
|
|
188
|
+
setIsPositioned(false);
|
|
189
|
+
}, []);
|
|
190
|
+
|
|
191
|
+
const toggleTooltip = useCallback(() => {
|
|
192
|
+
if (isVisible) {
|
|
193
|
+
hideTooltip();
|
|
194
|
+
} else {
|
|
195
|
+
showTooltip();
|
|
196
|
+
}
|
|
197
|
+
}, [isVisible, showTooltip, hideTooltip]);
|
|
198
|
+
|
|
199
|
+
// Calculate and update tooltip position
|
|
200
|
+
const updatePosition = useCallback(() => {
|
|
201
|
+
if (!triggerRef.current || !tooltipRef.current) return;
|
|
202
|
+
|
|
203
|
+
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
204
|
+
const tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
205
|
+
const wrapperElement = triggerRef.current.parentElement;
|
|
206
|
+
|
|
207
|
+
if (!wrapperElement) return;
|
|
208
|
+
|
|
209
|
+
const wrapperRect = wrapperElement.getBoundingClientRect();
|
|
210
|
+
const arrowSize = getArrowSize(tooltipRef.current);
|
|
211
|
+
|
|
212
|
+
const styles = calculateTooltipPosition(
|
|
213
|
+
position,
|
|
214
|
+
triggerRect,
|
|
215
|
+
tooltipRect,
|
|
216
|
+
wrapperRect,
|
|
217
|
+
offset,
|
|
218
|
+
arrowSize
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
setTooltipStyle(styles.tooltip);
|
|
222
|
+
setArrowStyle(styles.arrow);
|
|
223
|
+
setIsPositioned(true);
|
|
224
|
+
}, [position, offset]);
|
|
225
|
+
|
|
226
|
+
// Position tooltip when visible
|
|
227
|
+
useEffect(() => {
|
|
228
|
+
if (!isVisible || !triggerRef.current || !tooltipRef.current) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Use single RAF to ensure tooltip is rendered before calculating
|
|
233
|
+
const rafId = requestAnimationFrame(() => {
|
|
234
|
+
updatePosition();
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// Recalculate on window resize and scroll
|
|
238
|
+
const handleUpdate = () => {
|
|
239
|
+
updatePosition();
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
window.addEventListener('resize', handleUpdate);
|
|
243
|
+
window.addEventListener('scroll', handleUpdate, true);
|
|
244
|
+
|
|
245
|
+
return () => {
|
|
246
|
+
cancelAnimationFrame(rafId);
|
|
247
|
+
window.removeEventListener('resize', handleUpdate);
|
|
248
|
+
window.removeEventListener('scroll', handleUpdate, true);
|
|
249
|
+
};
|
|
250
|
+
}, [isVisible, updatePosition]);
|
|
251
|
+
|
|
252
|
+
// Setup trigger props
|
|
253
|
+
const triggerProps: React.HTMLAttributes<HTMLDivElement> = {
|
|
254
|
+
'aria-describedby': isVisible ? tooltipId : undefined,
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
const wrapperProps: React.HTMLAttributes<HTMLDivElement> = {};
|
|
258
|
+
|
|
259
|
+
if (trigger === 'hover') {
|
|
260
|
+
wrapperProps.onMouseEnter = showTooltip;
|
|
261
|
+
wrapperProps.onMouseLeave = hideTooltip;
|
|
262
|
+
triggerProps.onFocus = showTooltip;
|
|
263
|
+
triggerProps.onBlur = hideTooltip;
|
|
264
|
+
} else if (trigger === 'click') {
|
|
265
|
+
triggerProps.onClick = toggleTooltip;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return {
|
|
269
|
+
isVisible,
|
|
270
|
+
isPositioned,
|
|
271
|
+
tooltipId,
|
|
272
|
+
triggerRef,
|
|
273
|
+
tooltipRef,
|
|
274
|
+
tooltipStyle,
|
|
275
|
+
arrowStyle,
|
|
276
|
+
showTooltip,
|
|
277
|
+
hideTooltip,
|
|
278
|
+
toggleTooltip,
|
|
279
|
+
triggerProps,
|
|
280
|
+
wrapperProps,
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export default useTooltip;
|
|
285
|
+
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Variables Constants
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive CSS custom property definitions for all components.
|
|
5
|
+
* These provide type-safe access to component styling variables.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Button CSS Variables
|
|
10
|
+
*/
|
|
11
|
+
export const BUTTON_CSS_VARS = {
|
|
12
|
+
// Base properties
|
|
13
|
+
'--atomix-button-bg': 'background-color',
|
|
14
|
+
'--atomix-button-color': 'text color',
|
|
15
|
+
'--atomix-button-padding-x': 'horizontal padding',
|
|
16
|
+
'--atomix-button-padding-y': 'vertical padding',
|
|
17
|
+
'--atomix-button-border-radius': 'border radius',
|
|
18
|
+
'--atomix-button-border-width': 'border width',
|
|
19
|
+
'--atomix-button-border-color': 'border color',
|
|
20
|
+
'--atomix-button-font-size': 'font size',
|
|
21
|
+
'--atomix-button-font-weight': 'font weight',
|
|
22
|
+
'--atomix-button-font-family': 'font family',
|
|
23
|
+
'--atomix-button-line-height': 'line height',
|
|
24
|
+
'--atomix-button-min-width': 'minimum width',
|
|
25
|
+
'--atomix-button-min-height': 'minimum height',
|
|
26
|
+
'--atomix-button-transition': 'transition',
|
|
27
|
+
|
|
28
|
+
// State properties
|
|
29
|
+
'--atomix-button-hover-bg': 'hover background',
|
|
30
|
+
'--atomix-button-hover-color': 'hover text color',
|
|
31
|
+
'--atomix-button-hover-border-color': 'hover border color',
|
|
32
|
+
'--atomix-button-active-bg': 'active background',
|
|
33
|
+
'--atomix-button-active-color': 'active text color',
|
|
34
|
+
'--atomix-button-focus-ring-color': 'focus ring color',
|
|
35
|
+
'--atomix-button-focus-ring-width': 'focus ring width',
|
|
36
|
+
'--atomix-button-disabled-opacity': 'disabled opacity',
|
|
37
|
+
'--atomix-button-disabled-bg': 'disabled background',
|
|
38
|
+
|
|
39
|
+
// Part properties
|
|
40
|
+
'--atomix-button-icon-size': 'icon size',
|
|
41
|
+
'--atomix-button-icon-gap': 'icon spacing',
|
|
42
|
+
'--atomix-button-spinner-size': 'spinner size',
|
|
43
|
+
'--atomix-button-label-font-weight': 'label font weight',
|
|
44
|
+
} as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Card CSS Variables
|
|
48
|
+
*/
|
|
49
|
+
export const CARD_CSS_VARS = {
|
|
50
|
+
// Base properties
|
|
51
|
+
'--atomix-card-bg': 'background color',
|
|
52
|
+
'--atomix-card-color': 'text color',
|
|
53
|
+
'--atomix-card-padding': 'padding',
|
|
54
|
+
'--atomix-card-border-radius': 'border radius',
|
|
55
|
+
'--atomix-card-border-width': 'border width',
|
|
56
|
+
'--atomix-card-border-color': 'border color',
|
|
57
|
+
'--atomix-card-box-shadow': 'box shadow',
|
|
58
|
+
'--atomix-card-width': 'width',
|
|
59
|
+
'--atomix-card-max-width': 'maximum width',
|
|
60
|
+
|
|
61
|
+
// State properties
|
|
62
|
+
'--atomix-card-hover-bg': 'hover background',
|
|
63
|
+
'--atomix-card-hover-shadow': 'hover shadow',
|
|
64
|
+
'--atomix-card-hover-transform': 'hover transform',
|
|
65
|
+
|
|
66
|
+
// Part properties - Header
|
|
67
|
+
'--atomix-card-header-padding': 'header padding',
|
|
68
|
+
'--atomix-card-header-bg': 'header background',
|
|
69
|
+
'--atomix-card-header-border-bottom': 'header border bottom',
|
|
70
|
+
|
|
71
|
+
// Part properties - Body
|
|
72
|
+
'--atomix-card-body-padding': 'body padding',
|
|
73
|
+
'--atomix-card-body-font-size': 'body font size',
|
|
74
|
+
|
|
75
|
+
// Part properties - Footer
|
|
76
|
+
'--atomix-card-footer-padding': 'footer padding',
|
|
77
|
+
'--atomix-card-footer-bg': 'footer background',
|
|
78
|
+
'--atomix-card-footer-border-top': 'footer border top',
|
|
79
|
+
|
|
80
|
+
// Part properties - Title
|
|
81
|
+
'--atomix-card-title-font-size': 'title font size',
|
|
82
|
+
'--atomix-card-title-font-weight': 'title font weight',
|
|
83
|
+
'--atomix-card-title-color': 'title color',
|
|
84
|
+
'--atomix-card-title-margin-bottom': 'title margin bottom',
|
|
85
|
+
|
|
86
|
+
// Part properties - Image
|
|
87
|
+
'--atomix-card-image-border-radius': 'image border radius',
|
|
88
|
+
'--atomix-card-image-max-height': 'image max height',
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Input CSS Variables
|
|
93
|
+
*/
|
|
94
|
+
export const INPUT_CSS_VARS = {
|
|
95
|
+
// Base properties
|
|
96
|
+
'--atomix-input-bg': 'background color',
|
|
97
|
+
'--atomix-input-color': 'text color',
|
|
98
|
+
'--atomix-input-padding-x': 'horizontal padding',
|
|
99
|
+
'--atomix-input-padding-y': 'vertical padding',
|
|
100
|
+
'--atomix-input-border-radius': 'border radius',
|
|
101
|
+
'--atomix-input-border-width': 'border width',
|
|
102
|
+
'--atomix-input-border-color': 'border color',
|
|
103
|
+
'--atomix-input-font-size': 'font size',
|
|
104
|
+
'--atomix-input-font-family': 'font family',
|
|
105
|
+
'--atomix-input-line-height': 'line height',
|
|
106
|
+
'--atomix-input-height': 'height',
|
|
107
|
+
'--atomix-input-placeholder-color': 'placeholder color',
|
|
108
|
+
|
|
109
|
+
// State properties
|
|
110
|
+
'--atomix-input-hover-border-color': 'hover border color',
|
|
111
|
+
'--atomix-input-focus-border-color': 'focus border color',
|
|
112
|
+
'--atomix-input-focus-ring-color': 'focus ring color',
|
|
113
|
+
'--atomix-input-focus-ring-width': 'focus ring width',
|
|
114
|
+
'--atomix-input-disabled-bg': 'disabled background',
|
|
115
|
+
'--atomix-input-disabled-opacity': 'disabled opacity',
|
|
116
|
+
'--atomix-input-invalid-border-color': 'invalid border color',
|
|
117
|
+
'--atomix-input-valid-border-color': 'valid border color',
|
|
118
|
+
} as const;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Modal CSS Variables
|
|
122
|
+
*/
|
|
123
|
+
export const MODAL_CSS_VARS = {
|
|
124
|
+
// Base properties
|
|
125
|
+
'--atomix-modal-bg': 'background color',
|
|
126
|
+
'--atomix-modal-color': 'text color',
|
|
127
|
+
'--atomix-modal-padding': 'padding',
|
|
128
|
+
'--atomix-modal-border-radius': 'border radius',
|
|
129
|
+
'--atomix-modal-box-shadow': 'box shadow',
|
|
130
|
+
'--atomix-modal-width': 'width',
|
|
131
|
+
'--atomix-modal-max-width': 'maximum width',
|
|
132
|
+
'--atomix-modal-max-height': 'maximum height',
|
|
133
|
+
|
|
134
|
+
// Backdrop properties
|
|
135
|
+
'--atomix-modal-backdrop-bg': 'backdrop background',
|
|
136
|
+
'--atomix-modal-backdrop-opacity': 'backdrop opacity',
|
|
137
|
+
'--atomix-modal-backdrop-blur': 'backdrop blur',
|
|
138
|
+
|
|
139
|
+
// Part properties - Header
|
|
140
|
+
'--atomix-modal-header-padding': 'header padding',
|
|
141
|
+
'--atomix-modal-header-border-bottom': 'header border bottom',
|
|
142
|
+
'--atomix-modal-title-font-size': 'title font size',
|
|
143
|
+
'--atomix-modal-title-font-weight': 'title font weight',
|
|
144
|
+
|
|
145
|
+
// Part properties - Body
|
|
146
|
+
'--atomix-modal-body-padding': 'body padding',
|
|
147
|
+
'--atomix-modal-body-font-size': 'body font size',
|
|
148
|
+
|
|
149
|
+
// Part properties - Footer
|
|
150
|
+
'--atomix-modal-footer-padding': 'footer padding',
|
|
151
|
+
'--atomix-modal-footer-border-top': 'footer border top',
|
|
152
|
+
'--atomix-modal-footer-gap': 'footer button gap',
|
|
153
|
+
|
|
154
|
+
// Part properties - Close button
|
|
155
|
+
'--atomix-modal-close-size': 'close button size',
|
|
156
|
+
'--atomix-modal-close-color': 'close button color',
|
|
157
|
+
'--atomix-modal-close-hover-color': 'close button hover color',
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Dropdown CSS Variables
|
|
162
|
+
*/
|
|
163
|
+
export const DROPDOWN_CSS_VARS = {
|
|
164
|
+
// Base properties
|
|
165
|
+
'--atomix-dropdown-bg': 'background color',
|
|
166
|
+
'--atomix-dropdown-color': 'text color',
|
|
167
|
+
'--atomix-dropdown-border-radius': 'border radius',
|
|
168
|
+
'--atomix-dropdown-border-width': 'border width',
|
|
169
|
+
'--atomix-dropdown-border-color': 'border color',
|
|
170
|
+
'--atomix-dropdown-box-shadow': 'box shadow',
|
|
171
|
+
'--atomix-dropdown-min-width': 'minimum width',
|
|
172
|
+
'--atomix-dropdown-max-height': 'maximum height',
|
|
173
|
+
'--atomix-dropdown-padding': 'padding',
|
|
174
|
+
|
|
175
|
+
// Part properties - Item
|
|
176
|
+
'--atomix-dropdown-item-padding': 'item padding',
|
|
177
|
+
'--atomix-dropdown-item-font-size': 'item font size',
|
|
178
|
+
'--atomix-dropdown-item-hover-bg': 'item hover background',
|
|
179
|
+
'--atomix-dropdown-item-hover-color': 'item hover color',
|
|
180
|
+
'--atomix-dropdown-item-active-bg': 'item active background',
|
|
181
|
+
'--atomix-dropdown-item-active-color': 'item active color',
|
|
182
|
+
'--atomix-dropdown-item-disabled-opacity': 'item disabled opacity',
|
|
183
|
+
|
|
184
|
+
// Part properties - Divider
|
|
185
|
+
'--atomix-dropdown-divider-color': 'divider color',
|
|
186
|
+
'--atomix-dropdown-divider-margin': 'divider margin',
|
|
187
|
+
|
|
188
|
+
// Part properties - Header
|
|
189
|
+
'--atomix-dropdown-header-padding': 'header padding',
|
|
190
|
+
'--atomix-dropdown-header-font-size': 'header font size',
|
|
191
|
+
'--atomix-dropdown-header-font-weight': 'header font weight',
|
|
192
|
+
'--atomix-dropdown-header-color': 'header color',
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Badge CSS Variables
|
|
197
|
+
*/
|
|
198
|
+
export const BADGE_CSS_VARS = {
|
|
199
|
+
// Base properties
|
|
200
|
+
'--atomix-badge-bg': 'background color',
|
|
201
|
+
'--atomix-badge-color': 'text color',
|
|
202
|
+
'--atomix-badge-padding-x': 'horizontal padding',
|
|
203
|
+
'--atomix-badge-padding-y': 'vertical padding',
|
|
204
|
+
'--atomix-badge-border-radius': 'border radius',
|
|
205
|
+
'--atomix-badge-font-size': 'font size',
|
|
206
|
+
'--atomix-badge-font-weight': 'font weight',
|
|
207
|
+
'--atomix-badge-line-height': 'line height',
|
|
208
|
+
|
|
209
|
+
// Part properties
|
|
210
|
+
'--atomix-badge-icon-size': 'icon size',
|
|
211
|
+
'--atomix-badge-icon-gap': 'icon spacing',
|
|
212
|
+
} as const;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Tabs CSS Variables
|
|
216
|
+
*/
|
|
217
|
+
export const TABS_CSS_VARS = {
|
|
218
|
+
// Base properties
|
|
219
|
+
'--atomix-tabs-bg': 'background color',
|
|
220
|
+
'--atomix-tabs-border-color': 'border color',
|
|
221
|
+
'--atomix-tabs-border-width': 'border width',
|
|
222
|
+
|
|
223
|
+
// Part properties - Nav
|
|
224
|
+
'--atomix-tabs-nav-gap': 'nav gap',
|
|
225
|
+
'--atomix-tabs-nav-padding': 'nav padding',
|
|
226
|
+
|
|
227
|
+
// Part properties - Tab button
|
|
228
|
+
'--atomix-tabs-btn-padding-x': 'button horizontal padding',
|
|
229
|
+
'--atomix-tabs-btn-padding-y': 'button vertical padding',
|
|
230
|
+
'--atomix-tabs-btn-color': 'button color',
|
|
231
|
+
'--atomix-tabs-btn-font-size': 'button font size',
|
|
232
|
+
'--atomix-tabs-btn-font-weight': 'button font weight',
|
|
233
|
+
'--atomix-tabs-btn-hover-color': 'button hover color',
|
|
234
|
+
'--atomix-tabs-btn-active-color': 'button active color',
|
|
235
|
+
'--atomix-tabs-btn-active-border-color': 'button active border color',
|
|
236
|
+
'--atomix-tabs-btn-active-border-width': 'button active border width',
|
|
237
|
+
|
|
238
|
+
// Part properties - Panel
|
|
239
|
+
'--atomix-tabs-panel-padding': 'panel padding',
|
|
240
|
+
'--atomix-tabs-panel-bg': 'panel background',
|
|
241
|
+
} as const;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Progress CSS Variables
|
|
245
|
+
*/
|
|
246
|
+
export const PROGRESS_CSS_VARS = {
|
|
247
|
+
// Base properties
|
|
248
|
+
'--atomix-progress-bg': 'background color',
|
|
249
|
+
'--atomix-progress-height': 'height',
|
|
250
|
+
'--atomix-progress-border-radius': 'border radius',
|
|
251
|
+
|
|
252
|
+
// Part properties - Bar
|
|
253
|
+
'--atomix-progress-bar-bg': 'bar background',
|
|
254
|
+
'--atomix-progress-bar-transition': 'bar transition',
|
|
255
|
+
} as const;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Tooltip CSS Variables
|
|
259
|
+
*/
|
|
260
|
+
export const TOOLTIP_CSS_VARS = {
|
|
261
|
+
// Base properties
|
|
262
|
+
'--atomix-tooltip-bg': 'background color',
|
|
263
|
+
'--atomix-tooltip-color': 'text color',
|
|
264
|
+
'--atomix-tooltip-padding-x': 'horizontal padding',
|
|
265
|
+
'--atomix-tooltip-padding-y': 'vertical padding',
|
|
266
|
+
'--atomix-tooltip-border-radius': 'border radius',
|
|
267
|
+
'--atomix-tooltip-font-size': 'font size',
|
|
268
|
+
'--atomix-tooltip-max-width': 'maximum width',
|
|
269
|
+
'--atomix-tooltip-box-shadow': 'box shadow',
|
|
270
|
+
'--atomix-tooltip-z-index': 'z-index',
|
|
271
|
+
|
|
272
|
+
// Arrow properties
|
|
273
|
+
'--atomix-tooltip-arrow-size': 'arrow size',
|
|
274
|
+
'--atomix-tooltip-arrow-color': 'arrow color',
|
|
275
|
+
} as const;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Checkbox CSS Variables
|
|
279
|
+
*/
|
|
280
|
+
export const CHECKBOX_CSS_VARS = {
|
|
281
|
+
// Base properties
|
|
282
|
+
'--atomix-checkbox-size': 'checkbox size',
|
|
283
|
+
'--atomix-checkbox-bg': 'background color',
|
|
284
|
+
'--atomix-checkbox-border-color': 'border color',
|
|
285
|
+
'--atomix-checkbox-border-width': 'border width',
|
|
286
|
+
'--atomix-checkbox-border-radius': 'border radius',
|
|
287
|
+
'--atomix-checkbox-transition': 'transition',
|
|
288
|
+
|
|
289
|
+
// State properties
|
|
290
|
+
'--atomix-checkbox-checked-bg': 'checked background',
|
|
291
|
+
'--atomix-checkbox-checked-border-color': 'checked border color',
|
|
292
|
+
'--atomix-checkbox-hover-border-color': 'hover border color',
|
|
293
|
+
'--atomix-checkbox-focus-ring-color': 'focus ring color',
|
|
294
|
+
'--atomix-checkbox-focus-ring-width': 'focus ring width',
|
|
295
|
+
'--atomix-checkbox-disabled-opacity': 'disabled opacity',
|
|
296
|
+
'--atomix-checkbox-invalid-border-color': 'invalid border color',
|
|
297
|
+
|
|
298
|
+
// Part properties
|
|
299
|
+
'--atomix-checkbox-icon-size': 'icon size',
|
|
300
|
+
'--atomix-checkbox-icon-color': 'icon color',
|
|
301
|
+
'--atomix-checkbox-label-gap': 'label spacing',
|
|
302
|
+
'--atomix-checkbox-label-font-size': 'label font size',
|
|
303
|
+
'--atomix-checkbox-label-color': 'label color',
|
|
304
|
+
} as const;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Radio CSS Variables
|
|
308
|
+
*/
|
|
309
|
+
export const RADIO_CSS_VARS = {
|
|
310
|
+
// Base properties
|
|
311
|
+
'--atomix-radio-size': 'radio size',
|
|
312
|
+
'--atomix-radio-bg': 'background color',
|
|
313
|
+
'--atomix-radio-border-color': 'border color',
|
|
314
|
+
'--atomix-radio-border-width': 'border width',
|
|
315
|
+
'--atomix-radio-transition': 'transition',
|
|
316
|
+
|
|
317
|
+
// State properties
|
|
318
|
+
'--atomix-radio-checked-bg': 'checked background',
|
|
319
|
+
'--atomix-radio-checked-border-color': 'checked border color',
|
|
320
|
+
'--atomix-radio-hover-border-color': 'hover border color',
|
|
321
|
+
'--atomix-radio-focus-ring-color': 'focus ring color',
|
|
322
|
+
'--atomix-radio-focus-ring-width': 'focus ring width',
|
|
323
|
+
'--atomix-radio-disabled-opacity': 'disabled opacity',
|
|
324
|
+
'--atomix-radio-invalid-border-color': 'invalid border color',
|
|
325
|
+
|
|
326
|
+
// Part properties
|
|
327
|
+
'--atomix-radio-dot-size': 'dot size',
|
|
328
|
+
'--atomix-radio-dot-color': 'dot color',
|
|
329
|
+
'--atomix-radio-label-gap': 'label spacing',
|
|
330
|
+
'--atomix-radio-label-font-size': 'label font size',
|
|
331
|
+
'--atomix-radio-label-color': 'label color',
|
|
332
|
+
} as const;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* All component CSS variables
|
|
336
|
+
*/
|
|
337
|
+
export const COMPONENT_CSS_VARS = {
|
|
338
|
+
Button: BUTTON_CSS_VARS,
|
|
339
|
+
Card: CARD_CSS_VARS,
|
|
340
|
+
Input: INPUT_CSS_VARS,
|
|
341
|
+
Modal: MODAL_CSS_VARS,
|
|
342
|
+
Dropdown: DROPDOWN_CSS_VARS,
|
|
343
|
+
Badge: BADGE_CSS_VARS,
|
|
344
|
+
Tabs: TABS_CSS_VARS,
|
|
345
|
+
Progress: PROGRESS_CSS_VARS,
|
|
346
|
+
Tooltip: TOOLTIP_CSS_VARS,
|
|
347
|
+
Checkbox: CHECKBOX_CSS_VARS,
|
|
348
|
+
Radio: RADIO_CSS_VARS,
|
|
349
|
+
} as const;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Type-safe CSS variable keys by component
|
|
353
|
+
*/
|
|
354
|
+
export type ButtonCSSVariable = keyof typeof BUTTON_CSS_VARS;
|
|
355
|
+
export type CardCSSVariable = keyof typeof CARD_CSS_VARS;
|
|
356
|
+
export type InputCSSVariable = keyof typeof INPUT_CSS_VARS;
|
|
357
|
+
export type ModalCSSVariable = keyof typeof MODAL_CSS_VARS;
|
|
358
|
+
export type DropdownCSSVariable = keyof typeof DROPDOWN_CSS_VARS;
|
|
359
|
+
export type BadgeCSSVariable = keyof typeof BADGE_CSS_VARS;
|
|
360
|
+
export type TabsCSSVariable = keyof typeof TABS_CSS_VARS;
|
|
361
|
+
export type ProgressCSSVariable = keyof typeof PROGRESS_CSS_VARS;
|
|
362
|
+
export type TooltipCSSVariable = keyof typeof TOOLTIP_CSS_VARS;
|
|
363
|
+
export type CheckboxCSSVariable = keyof typeof CHECKBOX_CSS_VARS;
|
|
364
|
+
export type RadioCSSVariable = keyof typeof RADIO_CSS_VARS;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Component name to CSS variable type mapping
|
|
368
|
+
*/
|
|
369
|
+
export type ComponentCSSVariables = {
|
|
370
|
+
Button: ButtonCSSVariable;
|
|
371
|
+
Card: CardCSSVariable;
|
|
372
|
+
Input: InputCSSVariable;
|
|
373
|
+
Modal: ModalCSSVariable;
|
|
374
|
+
Dropdown: DropdownCSSVariable;
|
|
375
|
+
Badge: BadgeCSSVariable;
|
|
376
|
+
Tabs: TabsCSSVariable;
|
|
377
|
+
Progress: ProgressCSSVariable;
|
|
378
|
+
Tooltip: TooltipCSSVariable;
|
|
379
|
+
Checkbox: CheckboxCSSVariable;
|
|
380
|
+
Radio: RadioCSSVariable;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Get CSS variables for a component
|
|
385
|
+
*/
|
|
386
|
+
export function getComponentCSSVars<T extends keyof typeof COMPONENT_CSS_VARS>(
|
|
387
|
+
component: T
|
|
388
|
+
): typeof COMPONENT_CSS_VARS[T] {
|
|
389
|
+
return COMPONENT_CSS_VARS[component];
|
|
390
|
+
}
|