pixelize-native-library 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/lib/module/core/MODULE.md +94 -0
- package/lib/module/core/a11y/MODULE.md +22 -0
- package/lib/module/core/a11y/index.js +26 -0
- package/lib/module/core/a11y/index.js.map +1 -0
- package/lib/module/core/icon/MODULE.md +35 -0
- package/lib/module/core/icon/index.js +92 -0
- package/lib/module/core/icon/index.js.map +1 -0
- package/lib/module/core/style/index.js +4 -0
- package/lib/module/core/style/index.js.map +1 -0
- package/lib/module/core/style/layoutStyle.js +4 -0
- package/lib/module/core/style/layoutStyle.js.map +1 -0
- package/lib/module/core/style/variants.js +115 -0
- package/lib/module/core/style/variants.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/accordion/Accordion.js +194 -0
- package/lib/module/modules/accordion/Accordion.js.map +1 -0
- package/lib/module/modules/accordion/Accordion.variants.js +143 -0
- package/lib/module/modules/accordion/Accordion.variants.js.map +1 -0
- package/lib/module/modules/accordion/MODULE.md +97 -0
- package/lib/module/modules/accordion/index.js +10 -0
- package/lib/module/modules/accordion/index.js.map +1 -0
- package/lib/module/modules/alert-dialog/AlertDialog.js +62 -0
- package/lib/module/modules/alert-dialog/AlertDialog.js.map +1 -0
- package/lib/module/modules/alert-dialog/AlertDialog.variants.js +44 -0
- package/lib/module/modules/alert-dialog/AlertDialog.variants.js.map +1 -0
- package/lib/module/modules/alert-dialog/MODULE.md +81 -0
- package/lib/module/modules/alert-dialog/index.js +10 -0
- package/lib/module/modules/alert-dialog/index.js.map +1 -0
- package/lib/module/modules/avatar/Avatar.js +57 -0
- package/lib/module/modules/avatar/Avatar.js.map +1 -0
- package/lib/module/modules/avatar/Avatar.variants.js +127 -0
- package/lib/module/modules/avatar/Avatar.variants.js.map +1 -0
- package/lib/module/modules/avatar/MODULE.md +76 -0
- package/lib/module/modules/avatar/index.js +12 -0
- package/lib/module/modules/avatar/index.js.map +1 -0
- package/lib/module/modules/badge/Badge.js +56 -0
- package/lib/module/modules/badge/Badge.js.map +1 -0
- package/lib/module/modules/badge/Badge.variants.js +124 -0
- package/lib/module/modules/badge/Badge.variants.js.map +1 -0
- package/lib/module/modules/badge/MODULE.md +82 -0
- package/lib/module/modules/badge/index.js +12 -0
- package/lib/module/modules/badge/index.js.map +1 -0
- package/lib/module/modules/bottom-nav/BottomNav.js +257 -0
- package/lib/module/modules/bottom-nav/BottomNav.js.map +1 -0
- package/lib/module/modules/bottom-nav/BottomNav.search.js +153 -0
- package/lib/module/modules/bottom-nav/BottomNav.search.js.map +1 -0
- package/lib/module/modules/bottom-nav/BottomNav.variants.js +164 -0
- package/lib/module/modules/bottom-nav/BottomNav.variants.js.map +1 -0
- package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js +297 -0
- package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js.map +1 -0
- package/lib/module/modules/bottom-nav/MODULE.md +198 -0
- package/lib/module/modules/bottom-nav/index.js +16 -0
- package/lib/module/modules/bottom-nav/index.js.map +1 -0
- package/lib/module/modules/button/Button.js +173 -0
- package/lib/module/modules/button/Button.js.map +1 -0
- package/lib/module/modules/button/Button.variants.js +173 -0
- package/lib/module/modules/button/Button.variants.js.map +1 -0
- package/lib/module/modules/button/MODULE.md +87 -0
- package/lib/module/modules/button/index.js +12 -0
- package/lib/module/modules/button/index.js.map +1 -0
- package/lib/module/modules/button-group/ButtonGroup.js +106 -0
- package/lib/module/modules/button-group/ButtonGroup.js.map +1 -0
- package/lib/module/modules/button-group/ButtonGroup.variants.js +220 -0
- package/lib/module/modules/button-group/ButtonGroup.variants.js.map +1 -0
- package/lib/module/modules/button-group/MODULE.md +129 -0
- package/lib/module/modules/button-group/index.js +11 -0
- package/lib/module/modules/button-group/index.js.map +1 -0
- package/lib/module/modules/card/Card.js +39 -0
- package/lib/module/modules/card/Card.js.map +1 -0
- package/lib/module/modules/card/Card.variants.js +75 -0
- package/lib/module/modules/card/Card.variants.js.map +1 -0
- package/lib/module/modules/card/MODULE.md +81 -0
- package/lib/module/modules/card/index.js +10 -0
- package/lib/module/modules/card/index.js.map +1 -0
- package/lib/module/modules/checkbox/Checkbox.js +115 -0
- package/lib/module/modules/checkbox/Checkbox.js.map +1 -0
- package/lib/module/modules/checkbox/Checkbox.variants.js +122 -0
- package/lib/module/modules/checkbox/Checkbox.variants.js.map +1 -0
- package/lib/module/modules/checkbox/MODULE.md +76 -0
- package/lib/module/modules/checkbox/index.js +11 -0
- package/lib/module/modules/checkbox/index.js.map +1 -0
- package/lib/module/modules/divider/Divider.js +35 -0
- package/lib/module/modules/divider/Divider.js.map +1 -0
- package/lib/module/modules/divider/Divider.variants.js +51 -0
- package/lib/module/modules/divider/Divider.variants.js.map +1 -0
- package/lib/module/modules/divider/MODULE.md +61 -0
- package/lib/module/modules/divider/index.js +10 -0
- package/lib/module/modules/divider/index.js.map +1 -0
- package/lib/module/modules/drawer/Drawer.js +171 -0
- package/lib/module/modules/drawer/Drawer.js.map +1 -0
- package/lib/module/modules/drawer/Drawer.variants.js +118 -0
- package/lib/module/modules/drawer/Drawer.variants.js.map +1 -0
- package/lib/module/modules/drawer/MODULE.md +161 -0
- package/lib/module/modules/drawer/index.js +10 -0
- package/lib/module/modules/drawer/index.js.map +1 -0
- package/lib/module/modules/empty-state/EmptyState.js +79 -0
- package/lib/module/modules/empty-state/EmptyState.js.map +1 -0
- package/lib/module/modules/empty-state/EmptyState.variants.js +54 -0
- package/lib/module/modules/empty-state/EmptyState.variants.js.map +1 -0
- package/lib/module/modules/empty-state/MODULE.md +78 -0
- package/lib/module/modules/empty-state/index.js +13 -0
- package/lib/module/modules/empty-state/index.js.map +1 -0
- package/lib/module/modules/file-upload/FileUpload.js +132 -0
- package/lib/module/modules/file-upload/FileUpload.js.map +1 -0
- package/lib/module/modules/file-upload/FileUpload.variants.js +179 -0
- package/lib/module/modules/file-upload/FileUpload.variants.js.map +1 -0
- package/lib/module/modules/file-upload/MODULE.md +130 -0
- package/lib/module/modules/file-upload/index.js +10 -0
- package/lib/module/modules/file-upload/index.js.map +1 -0
- package/lib/module/modules/filter-sheet/FilterChip.js +79 -0
- package/lib/module/modules/filter-sheet/FilterChip.js.map +1 -0
- package/lib/module/modules/filter-sheet/FilterSheet.js +98 -0
- package/lib/module/modules/filter-sheet/FilterSheet.js.map +1 -0
- package/lib/module/modules/filter-sheet/FilterSheet.variants.js +156 -0
- package/lib/module/modules/filter-sheet/FilterSheet.variants.js.map +1 -0
- package/lib/module/modules/filter-sheet/FilterSheetBody.js +175 -0
- package/lib/module/modules/filter-sheet/FilterSheetBody.js.map +1 -0
- package/lib/module/modules/filter-sheet/MODULE.md +115 -0
- package/lib/module/modules/filter-sheet/filterSheet.helpers.js +90 -0
- package/lib/module/modules/filter-sheet/filterSheet.helpers.js.map +1 -0
- package/lib/module/modules/filter-sheet/index.js +14 -0
- package/lib/module/modules/filter-sheet/index.js.map +1 -0
- package/lib/module/modules/input/Input.js +132 -0
- package/lib/module/modules/input/Input.js.map +1 -0
- package/lib/module/modules/input/Input.variants.js +122 -0
- package/lib/module/modules/input/Input.variants.js.map +1 -0
- package/lib/module/modules/input/MODULE.md +97 -0
- package/lib/module/modules/input/index.js +13 -0
- package/lib/module/modules/input/index.js.map +1 -0
- package/lib/module/modules/menu/MODULE.md +103 -0
- package/lib/module/modules/menu/Menu.js +128 -0
- package/lib/module/modules/menu/Menu.js.map +1 -0
- package/lib/module/modules/menu/Menu.variants.js +75 -0
- package/lib/module/modules/menu/Menu.variants.js.map +1 -0
- package/lib/module/modules/menu/index.js +12 -0
- package/lib/module/modules/menu/index.js.map +1 -0
- package/lib/module/modules/modal/MODULE.md +138 -0
- package/lib/module/modules/modal/Modal.js +101 -0
- package/lib/module/modules/modal/Modal.js.map +1 -0
- package/lib/module/modules/modal/Modal.variants.js +92 -0
- package/lib/module/modules/modal/Modal.variants.js.map +1 -0
- package/lib/module/modules/modal/ModalPortalContext.js +25 -0
- package/lib/module/modules/modal/ModalPortalContext.js.map +1 -0
- package/lib/module/modules/modal/ModalPortalProvider.js +22 -0
- package/lib/module/modules/modal/ModalPortalProvider.js.map +1 -0
- package/lib/module/modules/modal/index.js +16 -0
- package/lib/module/modules/modal/index.js.map +1 -0
- package/lib/module/modules/modal/renderWebPortal.js +18 -0
- package/lib/module/modules/modal/renderWebPortal.js.map +1 -0
- package/lib/module/modules/modal/renderWebPortal.web.js +24 -0
- package/lib/module/modules/modal/renderWebPortal.web.js.map +1 -0
- package/lib/module/modules/multi-select/MODULE.md +100 -0
- package/lib/module/modules/multi-select/MultiSelect.js +204 -0
- package/lib/module/modules/multi-select/MultiSelect.js.map +1 -0
- package/lib/module/modules/multi-select/MultiSelect.variants.js +195 -0
- package/lib/module/modules/multi-select/MultiSelect.variants.js.map +1 -0
- package/lib/module/modules/multi-select/index.js +11 -0
- package/lib/module/modules/multi-select/index.js.map +1 -0
- package/lib/module/modules/number-input/MODULE.md +108 -0
- package/lib/module/modules/number-input/NumberInput.js +253 -0
- package/lib/module/modules/number-input/NumberInput.js.map +1 -0
- package/lib/module/modules/number-input/NumberInput.variants.js +200 -0
- package/lib/module/modules/number-input/NumberInput.variants.js.map +1 -0
- package/lib/module/modules/number-input/index.js +12 -0
- package/lib/module/modules/number-input/index.js.map +1 -0
- package/lib/module/modules/pin-input/MODULE.md +134 -0
- package/lib/module/modules/pin-input/PinInput.js +158 -0
- package/lib/module/modules/pin-input/PinInput.js.map +1 -0
- package/lib/module/modules/pin-input/PinInput.variants.js +183 -0
- package/lib/module/modules/pin-input/PinInput.variants.js.map +1 -0
- package/lib/module/modules/pin-input/index.js +11 -0
- package/lib/module/modules/pin-input/index.js.map +1 -0
- package/lib/module/modules/progress-bar/MODULE.md +101 -0
- package/lib/module/modules/progress-bar/ProgressBar.js +102 -0
- package/lib/module/modules/progress-bar/ProgressBar.js.map +1 -0
- package/lib/module/modules/progress-bar/ProgressBar.variants.js +151 -0
- package/lib/module/modules/progress-bar/ProgressBar.variants.js.map +1 -0
- package/lib/module/modules/progress-bar/index.js +12 -0
- package/lib/module/modules/progress-bar/index.js.map +1 -0
- package/lib/module/modules/radio-group/MODULE.md +75 -0
- package/lib/module/modules/radio-group/RadioGroup.js +87 -0
- package/lib/module/modules/radio-group/RadioGroup.js.map +1 -0
- package/lib/module/modules/radio-group/RadioGroup.variants.js +163 -0
- package/lib/module/modules/radio-group/RadioGroup.variants.js.map +1 -0
- package/lib/module/modules/radio-group/index.js +11 -0
- package/lib/module/modules/radio-group/index.js.map +1 -0
- package/lib/module/modules/reorder/MODULE.md +131 -0
- package/lib/module/modules/reorder/Reorder.js +291 -0
- package/lib/module/modules/reorder/Reorder.js.map +1 -0
- package/lib/module/modules/reorder/Reorder.variants.js +172 -0
- package/lib/module/modules/reorder/Reorder.variants.js.map +1 -0
- package/lib/module/modules/reorder/index.js +11 -0
- package/lib/module/modules/reorder/index.js.map +1 -0
- package/lib/module/modules/select/MODULE.md +91 -0
- package/lib/module/modules/select/Select.js +178 -0
- package/lib/module/modules/select/Select.js.map +1 -0
- package/lib/module/modules/select/Select.variants.js +146 -0
- package/lib/module/modules/select/Select.variants.js.map +1 -0
- package/lib/module/modules/select/index.js +10 -0
- package/lib/module/modules/select/index.js.map +1 -0
- package/lib/module/modules/skeleton/MODULE.md +87 -0
- package/lib/module/modules/skeleton/Skeleton.js +78 -0
- package/lib/module/modules/skeleton/Skeleton.js.map +1 -0
- package/lib/module/modules/skeleton/Skeleton.variants.js +145 -0
- package/lib/module/modules/skeleton/Skeleton.variants.js.map +1 -0
- package/lib/module/modules/skeleton/index.js +10 -0
- package/lib/module/modules/skeleton/index.js.map +1 -0
- package/lib/module/modules/slider/MODULE.md +95 -0
- package/lib/module/modules/slider/Slider.js +183 -0
- package/lib/module/modules/slider/Slider.js.map +1 -0
- package/lib/module/modules/slider/Slider.variants.js +258 -0
- package/lib/module/modules/slider/Slider.variants.js.map +1 -0
- package/lib/module/modules/slider/index.js +10 -0
- package/lib/module/modules/slider/index.js.map +1 -0
- package/lib/module/modules/spinner/MODULE.md +97 -0
- package/lib/module/modules/spinner/Spinner.js +58 -0
- package/lib/module/modules/spinner/Spinner.js.map +1 -0
- package/lib/module/modules/spinner/Spinner.variants.js +131 -0
- package/lib/module/modules/spinner/Spinner.variants.js.map +1 -0
- package/lib/module/modules/spinner/index.js +11 -0
- package/lib/module/modules/spinner/index.js.map +1 -0
- package/lib/module/modules/stepper/MODULE.md +88 -0
- package/lib/module/modules/stepper/Stepper.js +100 -0
- package/lib/module/modules/stepper/Stepper.js.map +1 -0
- package/lib/module/modules/stepper/Stepper.variants.js +146 -0
- package/lib/module/modules/stepper/Stepper.variants.js.map +1 -0
- package/lib/module/modules/stepper/index.js +10 -0
- package/lib/module/modules/stepper/index.js.map +1 -0
- package/lib/module/modules/switch/MODULE.md +65 -0
- package/lib/module/modules/switch/Switch.js +53 -0
- package/lib/module/modules/switch/Switch.js.map +1 -0
- package/lib/module/modules/switch/Switch.variants.js +61 -0
- package/lib/module/modules/switch/Switch.variants.js.map +1 -0
- package/lib/module/modules/switch/index.js +10 -0
- package/lib/module/modules/switch/index.js.map +1 -0
- package/lib/module/modules/tabs/MODULE.md +80 -0
- package/lib/module/modules/tabs/Tabs.js +127 -0
- package/lib/module/modules/tabs/Tabs.js.map +1 -0
- package/lib/module/modules/tabs/Tabs.variants.js +135 -0
- package/lib/module/modules/tabs/Tabs.variants.js.map +1 -0
- package/lib/module/modules/tabs/index.js +12 -0
- package/lib/module/modules/tabs/index.js.map +1 -0
- package/lib/module/modules/textarea/MODULE.md +91 -0
- package/lib/module/modules/textarea/Textarea.js +136 -0
- package/lib/module/modules/textarea/Textarea.js.map +1 -0
- package/lib/module/modules/textarea/Textarea.variants.js +113 -0
- package/lib/module/modules/textarea/Textarea.variants.js.map +1 -0
- package/lib/module/modules/textarea/index.js +10 -0
- package/lib/module/modules/textarea/index.js.map +1 -0
- package/lib/module/modules/timeline/MODULE.md +95 -0
- package/lib/module/modules/timeline/Timeline.js +92 -0
- package/lib/module/modules/timeline/Timeline.js.map +1 -0
- package/lib/module/modules/timeline/Timeline.variants.js +146 -0
- package/lib/module/modules/timeline/Timeline.variants.js.map +1 -0
- package/lib/module/modules/timeline/index.js +12 -0
- package/lib/module/modules/timeline/index.js.map +1 -0
- package/lib/module/modules/toast/MODULE.md +104 -0
- package/lib/module/modules/toast/Toast.js +178 -0
- package/lib/module/modules/toast/Toast.js.map +1 -0
- package/lib/module/modules/toast/Toast.variants.js +120 -0
- package/lib/module/modules/toast/Toast.variants.js.map +1 -0
- package/lib/module/modules/toast/index.js +13 -0
- package/lib/module/modules/toast/index.js.map +1 -0
- package/lib/module/modules/tooltip/MODULE.md +86 -0
- package/lib/module/modules/tooltip/Tooltip.js +115 -0
- package/lib/module/modules/tooltip/Tooltip.js.map +1 -0
- package/lib/module/modules/tooltip/Tooltip.variants.js +75 -0
- package/lib/module/modules/tooltip/Tooltip.variants.js.map +1 -0
- package/lib/module/modules/tooltip/index.js +10 -0
- package/lib/module/modules/tooltip/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/MODULE.md +87 -0
- package/lib/module/theme/index.js +15 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/platform/MODULE.md +102 -0
- package/lib/module/theme/platform/colorScheme.native.js +24 -0
- package/lib/module/theme/platform/colorScheme.native.js.map +1 -0
- package/lib/module/theme/platform/elevation.native.js +75 -0
- package/lib/module/theme/platform/elevation.native.js.map +1 -0
- package/lib/module/theme/platform/fonts.native.js +58 -0
- package/lib/module/theme/platform/fonts.native.js.map +1 -0
- package/lib/module/theme/platform/index.js +14 -0
- package/lib/module/theme/platform/index.js.map +1 -0
- package/lib/module/theme/platform/units.native.js +18 -0
- package/lib/module/theme/platform/units.native.js.map +1 -0
- package/lib/module/theme/provider/PixelizeProvider.js +149 -0
- package/lib/module/theme/provider/PixelizeProvider.js.map +1 -0
- package/lib/module/theme/provider/colorModeStorage.js +63 -0
- package/lib/module/theme/provider/colorModeStorage.js.map +1 -0
- package/lib/module/theme/provider/index.js +8 -0
- package/lib/module/theme/provider/index.js.map +1 -0
- package/lib/module/theme/provider/useTheme.js +13 -0
- package/lib/module/theme/provider/useTheme.js.map +1 -0
- package/lib/module/theme/provider/useThemeColors.js +13 -0
- package/lib/module/theme/provider/useThemeColors.js.map +1 -0
- package/lib/module/theme/provider/useThemeMode.js +13 -0
- package/lib/module/theme/provider/useThemeMode.js.map +1 -0
- package/lib/module/theme/tokens/MODULE.md +102 -0
- package/lib/module/theme/tokens/brands/emerald/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/emerald/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/emerald/palette.light.js +125 -0
- package/lib/module/theme/tokens/brands/emerald/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/index.js +91 -0
- package/lib/module/theme/tokens/brands/index.js.map +1 -0
- package/lib/module/theme/tokens/brands/lavender/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/lavender/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/lavender/palette.light.js +376 -0
- package/lib/module/theme/tokens/brands/lavender/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/meadow/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/meadow/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/meadow/palette.light.js +126 -0
- package/lib/module/theme/tokens/brands/meadow/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/radiant/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/radiant/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/radiant/palette.light.js +125 -0
- package/lib/module/theme/tokens/brands/radiant/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/rosewood/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/rosewood/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/rosewood/palette.light.js +125 -0
- package/lib/module/theme/tokens/brands/rosewood/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/skyline/palette.dark.js +9 -0
- package/lib/module/theme/tokens/brands/skyline/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/skyline/palette.light.js +126 -0
- package/lib/module/theme/tokens/brands/skyline/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/slate/palette.dark.js +11 -0
- package/lib/module/theme/tokens/brands/slate/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/slate/palette.light.js +129 -0
- package/lib/module/theme/tokens/brands/slate/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/storefront/palette.dark.js +7 -0
- package/lib/module/theme/tokens/brands/storefront/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/storefront/palette.light.js +127 -0
- package/lib/module/theme/tokens/brands/storefront/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/brands/zinc/palette.dark.js +222 -0
- package/lib/module/theme/tokens/brands/zinc/palette.dark.js.map +1 -0
- package/lib/module/theme/tokens/brands/zinc/palette.light.js +393 -0
- package/lib/module/theme/tokens/brands/zinc/palette.light.js.map +1 -0
- package/lib/module/theme/tokens/builders/accentText.js +66 -0
- package/lib/module/theme/tokens/builders/accentText.js.map +1 -0
- package/lib/module/theme/tokens/builders/buildBrandTokens.js +38 -0
- package/lib/module/theme/tokens/builders/buildBrandTokens.js.map +1 -0
- package/lib/module/theme/tokens/builders/buildDarkPalette.js +300 -0
- package/lib/module/theme/tokens/builders/buildDarkPalette.js.map +1 -0
- package/lib/module/theme/tokens/builders/color.js +187 -0
- package/lib/module/theme/tokens/builders/color.js.map +1 -0
- package/lib/module/theme/tokens/index.js +27 -0
- package/lib/module/theme/tokens/index.js.map +1 -0
- package/lib/module/theme/tokens/primitives/borderWidths.js +16 -0
- package/lib/module/theme/tokens/primitives/borderWidths.js.map +1 -0
- package/lib/module/theme/tokens/primitives/breakpoints.js +18 -0
- package/lib/module/theme/tokens/primitives/breakpoints.js.map +1 -0
- package/lib/module/theme/tokens/primitives/elevation.js +95 -0
- package/lib/module/theme/tokens/primitives/elevation.js.map +1 -0
- package/lib/module/theme/tokens/primitives/fontSizes.js +22 -0
- package/lib/module/theme/tokens/primitives/fontSizes.js.map +1 -0
- package/lib/module/theme/tokens/primitives/fontWeights.js +23 -0
- package/lib/module/theme/tokens/primitives/fontWeights.js.map +1 -0
- package/lib/module/theme/tokens/primitives/index.js +14 -0
- package/lib/module/theme/tokens/primitives/index.js.map +1 -0
- package/lib/module/theme/tokens/primitives/letterSpacings.js +18 -0
- package/lib/module/theme/tokens/primitives/letterSpacings.js.map +1 -0
- package/lib/module/theme/tokens/primitives/lineHeights.js +21 -0
- package/lib/module/theme/tokens/primitives/lineHeights.js.map +1 -0
- package/lib/module/theme/tokens/primitives/radii.js +21 -0
- package/lib/module/theme/tokens/primitives/radii.js.map +1 -0
- package/lib/module/theme/tokens/primitives/sizes.js +34 -0
- package/lib/module/theme/tokens/primitives/sizes.js.map +1 -0
- package/lib/module/theme/tokens/primitives/space.js +30 -0
- package/lib/module/theme/tokens/primitives/space.js.map +1 -0
- package/lib/module/theme/tokens/primitives/zIndices.js +23 -0
- package/lib/module/theme/tokens/primitives/zIndices.js.map +1 -0
- package/lib/module/theme/tokens/roles/index.js +126 -0
- package/lib/module/theme/tokens/roles/index.js.map +1 -0
- package/lib/module/theme/tokens/types.js +2 -0
- package/lib/module/theme/tokens/types.js.map +1 -0
- package/lib/typescript/core/a11y/index.d.ts +7 -0
- package/lib/typescript/core/a11y/index.d.ts.map +1 -0
- package/lib/typescript/core/icon/index.d.ts +60 -0
- package/lib/typescript/core/icon/index.d.ts.map +1 -0
- package/lib/typescript/core/style/index.d.ts +4 -0
- package/lib/typescript/core/style/index.d.ts.map +1 -0
- package/lib/typescript/core/style/layoutStyle.d.ts +19 -0
- package/lib/typescript/core/style/layoutStyle.d.ts.map +1 -0
- package/lib/typescript/core/style/variants.d.ts +55 -0
- package/lib/typescript/core/style/variants.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +11 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/modules/accordion/Accordion.d.ts +57 -0
- package/lib/typescript/modules/accordion/Accordion.d.ts.map +1 -0
- package/lib/typescript/modules/accordion/Accordion.variants.d.ts +131 -0
- package/lib/typescript/modules/accordion/Accordion.variants.d.ts.map +1 -0
- package/lib/typescript/modules/accordion/index.d.ts +9 -0
- package/lib/typescript/modules/accordion/index.d.ts.map +1 -0
- package/lib/typescript/modules/alert-dialog/AlertDialog.d.ts +24 -0
- package/lib/typescript/modules/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts +29 -0
- package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts.map +1 -0
- package/lib/typescript/modules/alert-dialog/index.d.ts +9 -0
- package/lib/typescript/modules/alert-dialog/index.d.ts.map +1 -0
- package/lib/typescript/modules/avatar/Avatar.d.ts +30 -0
- package/lib/typescript/modules/avatar/Avatar.d.ts.map +1 -0
- package/lib/typescript/modules/avatar/Avatar.variants.d.ts +123 -0
- package/lib/typescript/modules/avatar/Avatar.variants.d.ts.map +1 -0
- package/lib/typescript/modules/avatar/index.d.ts +11 -0
- package/lib/typescript/modules/avatar/index.d.ts.map +1 -0
- package/lib/typescript/modules/badge/Badge.d.ts +19 -0
- package/lib/typescript/modules/badge/Badge.d.ts.map +1 -0
- package/lib/typescript/modules/badge/Badge.variants.d.ts +102 -0
- package/lib/typescript/modules/badge/Badge.variants.d.ts.map +1 -0
- package/lib/typescript/modules/badge/index.d.ts +10 -0
- package/lib/typescript/modules/badge/index.d.ts.map +1 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.d.ts +106 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.d.ts.map +1 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.search.d.ts +61 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.search.d.ts.map +1 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts +122 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts.map +1 -0
- package/lib/typescript/modules/bottom-nav/BottomNavOverflowSheet.d.ts +39 -0
- package/lib/typescript/modules/bottom-nav/BottomNavOverflowSheet.d.ts.map +1 -0
- package/lib/typescript/modules/bottom-nav/index.d.ts +12 -0
- package/lib/typescript/modules/bottom-nav/index.d.ts.map +1 -0
- package/lib/typescript/modules/button/Button.d.ts +43 -0
- package/lib/typescript/modules/button/Button.d.ts.map +1 -0
- package/lib/typescript/modules/button/Button.variants.d.ts +156 -0
- package/lib/typescript/modules/button/Button.variants.d.ts.map +1 -0
- package/lib/typescript/modules/button/index.d.ts +10 -0
- package/lib/typescript/modules/button/index.d.ts.map +1 -0
- package/lib/typescript/modules/button-group/ButtonGroup.d.ts +37 -0
- package/lib/typescript/modules/button-group/ButtonGroup.d.ts.map +1 -0
- package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts +217 -0
- package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts.map +1 -0
- package/lib/typescript/modules/button-group/index.d.ts +10 -0
- package/lib/typescript/modules/button-group/index.d.ts.map +1 -0
- package/lib/typescript/modules/card/Card.d.ts +20 -0
- package/lib/typescript/modules/card/Card.d.ts.map +1 -0
- package/lib/typescript/modules/card/Card.variants.d.ts +51 -0
- package/lib/typescript/modules/card/Card.variants.d.ts.map +1 -0
- package/lib/typescript/modules/card/index.d.ts +9 -0
- package/lib/typescript/modules/card/index.d.ts.map +1 -0
- package/lib/typescript/modules/checkbox/Checkbox.d.ts +43 -0
- package/lib/typescript/modules/checkbox/Checkbox.d.ts.map +1 -0
- package/lib/typescript/modules/checkbox/Checkbox.variants.d.ts +120 -0
- package/lib/typescript/modules/checkbox/Checkbox.variants.d.ts.map +1 -0
- package/lib/typescript/modules/checkbox/index.d.ts +10 -0
- package/lib/typescript/modules/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/modules/divider/Divider.d.ts +18 -0
- package/lib/typescript/modules/divider/Divider.d.ts.map +1 -0
- package/lib/typescript/modules/divider/Divider.variants.d.ts +42 -0
- package/lib/typescript/modules/divider/Divider.variants.d.ts.map +1 -0
- package/lib/typescript/modules/divider/index.d.ts +9 -0
- package/lib/typescript/modules/divider/index.d.ts.map +1 -0
- package/lib/typescript/modules/drawer/Drawer.d.ts +44 -0
- package/lib/typescript/modules/drawer/Drawer.d.ts.map +1 -0
- package/lib/typescript/modules/drawer/Drawer.variants.d.ts +80 -0
- package/lib/typescript/modules/drawer/Drawer.variants.d.ts.map +1 -0
- package/lib/typescript/modules/drawer/index.d.ts +8 -0
- package/lib/typescript/modules/drawer/index.d.ts.map +1 -0
- package/lib/typescript/modules/empty-state/EmptyState.d.ts +29 -0
- package/lib/typescript/modules/empty-state/EmptyState.d.ts.map +1 -0
- package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts +43 -0
- package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts.map +1 -0
- package/lib/typescript/modules/empty-state/index.d.ts +10 -0
- package/lib/typescript/modules/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/modules/file-upload/FileUpload.d.ts +44 -0
- package/lib/typescript/modules/file-upload/FileUpload.d.ts.map +1 -0
- package/lib/typescript/modules/file-upload/FileUpload.variants.d.ts +114 -0
- package/lib/typescript/modules/file-upload/FileUpload.variants.d.ts.map +1 -0
- package/lib/typescript/modules/file-upload/index.d.ts +9 -0
- package/lib/typescript/modules/file-upload/index.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/FilterChip.d.ts +25 -0
- package/lib/typescript/modules/filter-sheet/FilterChip.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/FilterSheet.d.ts +54 -0
- package/lib/typescript/modules/filter-sheet/FilterSheet.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/FilterSheet.variants.d.ts +98 -0
- package/lib/typescript/modules/filter-sheet/FilterSheet.variants.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/FilterSheetBody.d.ts +28 -0
- package/lib/typescript/modules/filter-sheet/FilterSheetBody.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/filterSheet.helpers.d.ts +45 -0
- package/lib/typescript/modules/filter-sheet/filterSheet.helpers.d.ts.map +1 -0
- package/lib/typescript/modules/filter-sheet/index.d.ts +12 -0
- package/lib/typescript/modules/filter-sheet/index.d.ts.map +1 -0
- package/lib/typescript/modules/input/Input.d.ts +33 -0
- package/lib/typescript/modules/input/Input.d.ts.map +1 -0
- package/lib/typescript/modules/input/Input.variants.d.ts +116 -0
- package/lib/typescript/modules/input/Input.variants.d.ts.map +1 -0
- package/lib/typescript/modules/input/index.d.ts +10 -0
- package/lib/typescript/modules/input/index.d.ts.map +1 -0
- package/lib/typescript/modules/menu/Menu.d.ts +43 -0
- package/lib/typescript/modules/menu/Menu.d.ts.map +1 -0
- package/lib/typescript/modules/menu/Menu.variants.d.ts +41 -0
- package/lib/typescript/modules/menu/Menu.variants.d.ts.map +1 -0
- package/lib/typescript/modules/menu/index.d.ts +10 -0
- package/lib/typescript/modules/menu/index.d.ts.map +1 -0
- package/lib/typescript/modules/modal/Modal.d.ts +32 -0
- package/lib/typescript/modules/modal/Modal.d.ts.map +1 -0
- package/lib/typescript/modules/modal/Modal.variants.d.ts +72 -0
- package/lib/typescript/modules/modal/Modal.variants.d.ts.map +1 -0
- package/lib/typescript/modules/modal/ModalPortalContext.d.ts +2 -0
- package/lib/typescript/modules/modal/ModalPortalContext.d.ts.map +1 -0
- package/lib/typescript/modules/modal/ModalPortalProvider.d.ts +21 -0
- package/lib/typescript/modules/modal/ModalPortalProvider.d.ts.map +1 -0
- package/lib/typescript/modules/modal/index.d.ts +16 -0
- package/lib/typescript/modules/modal/index.d.ts.map +1 -0
- package/lib/typescript/modules/modal/renderWebPortal.d.ts +15 -0
- package/lib/typescript/modules/modal/renderWebPortal.d.ts.map +1 -0
- package/lib/typescript/modules/modal/renderWebPortal.web.d.ts +19 -0
- package/lib/typescript/modules/modal/renderWebPortal.web.d.ts.map +1 -0
- package/lib/typescript/modules/multi-select/MultiSelect.d.ts +33 -0
- package/lib/typescript/modules/multi-select/MultiSelect.d.ts.map +1 -0
- package/lib/typescript/modules/multi-select/MultiSelect.variants.d.ts +149 -0
- package/lib/typescript/modules/multi-select/MultiSelect.variants.d.ts.map +1 -0
- package/lib/typescript/modules/multi-select/index.d.ts +10 -0
- package/lib/typescript/modules/multi-select/index.d.ts.map +1 -0
- package/lib/typescript/modules/number-input/NumberInput.d.ts +34 -0
- package/lib/typescript/modules/number-input/NumberInput.d.ts.map +1 -0
- package/lib/typescript/modules/number-input/NumberInput.variants.d.ts +170 -0
- package/lib/typescript/modules/number-input/NumberInput.variants.d.ts.map +1 -0
- package/lib/typescript/modules/number-input/index.d.ts +11 -0
- package/lib/typescript/modules/number-input/index.d.ts.map +1 -0
- package/lib/typescript/modules/pin-input/PinInput.d.ts +40 -0
- package/lib/typescript/modules/pin-input/PinInput.d.ts.map +1 -0
- package/lib/typescript/modules/pin-input/PinInput.variants.d.ts +164 -0
- package/lib/typescript/modules/pin-input/PinInput.variants.d.ts.map +1 -0
- package/lib/typescript/modules/pin-input/index.d.ts +10 -0
- package/lib/typescript/modules/pin-input/index.d.ts.map +1 -0
- package/lib/typescript/modules/progress-bar/ProgressBar.d.ts +21 -0
- package/lib/typescript/modules/progress-bar/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/modules/progress-bar/ProgressBar.variants.d.ts +112 -0
- package/lib/typescript/modules/progress-bar/ProgressBar.variants.d.ts.map +1 -0
- package/lib/typescript/modules/progress-bar/index.d.ts +11 -0
- package/lib/typescript/modules/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/modules/radio-group/RadioGroup.d.ts +27 -0
- package/lib/typescript/modules/radio-group/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/modules/radio-group/RadioGroup.variants.d.ts +142 -0
- package/lib/typescript/modules/radio-group/RadioGroup.variants.d.ts.map +1 -0
- package/lib/typescript/modules/radio-group/index.d.ts +10 -0
- package/lib/typescript/modules/radio-group/index.d.ts.map +1 -0
- package/lib/typescript/modules/reorder/Reorder.d.ts +43 -0
- package/lib/typescript/modules/reorder/Reorder.d.ts.map +1 -0
- package/lib/typescript/modules/reorder/Reorder.variants.d.ts +116 -0
- package/lib/typescript/modules/reorder/Reorder.variants.d.ts.map +1 -0
- package/lib/typescript/modules/reorder/index.d.ts +9 -0
- package/lib/typescript/modules/reorder/index.d.ts.map +1 -0
- package/lib/typescript/modules/select/Select.d.ts +31 -0
- package/lib/typescript/modules/select/Select.d.ts.map +1 -0
- package/lib/typescript/modules/select/Select.variants.d.ts +127 -0
- package/lib/typescript/modules/select/Select.variants.d.ts.map +1 -0
- package/lib/typescript/modules/select/index.d.ts +9 -0
- package/lib/typescript/modules/select/index.d.ts.map +1 -0
- package/lib/typescript/modules/skeleton/Skeleton.d.ts +27 -0
- package/lib/typescript/modules/skeleton/Skeleton.d.ts.map +1 -0
- package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts +119 -0
- package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts.map +1 -0
- package/lib/typescript/modules/skeleton/index.d.ts +9 -0
- package/lib/typescript/modules/skeleton/index.d.ts.map +1 -0
- package/lib/typescript/modules/slider/Slider.d.ts +44 -0
- package/lib/typescript/modules/slider/Slider.d.ts.map +1 -0
- package/lib/typescript/modules/slider/Slider.variants.d.ts +211 -0
- package/lib/typescript/modules/slider/Slider.variants.d.ts.map +1 -0
- package/lib/typescript/modules/slider/index.d.ts +9 -0
- package/lib/typescript/modules/slider/index.d.ts.map +1 -0
- package/lib/typescript/modules/spinner/Spinner.d.ts +19 -0
- package/lib/typescript/modules/spinner/Spinner.d.ts.map +1 -0
- package/lib/typescript/modules/spinner/Spinner.variants.d.ts +113 -0
- package/lib/typescript/modules/spinner/Spinner.variants.d.ts.map +1 -0
- package/lib/typescript/modules/spinner/index.d.ts +10 -0
- package/lib/typescript/modules/spinner/index.d.ts.map +1 -0
- package/lib/typescript/modules/stepper/Stepper.d.ts +26 -0
- package/lib/typescript/modules/stepper/Stepper.d.ts.map +1 -0
- package/lib/typescript/modules/stepper/Stepper.variants.d.ts +107 -0
- package/lib/typescript/modules/stepper/Stepper.variants.d.ts.map +1 -0
- package/lib/typescript/modules/stepper/index.d.ts +8 -0
- package/lib/typescript/modules/stepper/index.d.ts.map +1 -0
- package/lib/typescript/modules/switch/Switch.d.ts +22 -0
- package/lib/typescript/modules/switch/Switch.d.ts.map +1 -0
- package/lib/typescript/modules/switch/Switch.variants.d.ts +60 -0
- package/lib/typescript/modules/switch/Switch.variants.d.ts.map +1 -0
- package/lib/typescript/modules/switch/index.d.ts +8 -0
- package/lib/typescript/modules/switch/index.d.ts.map +1 -0
- package/lib/typescript/modules/tabs/Tabs.d.ts +31 -0
- package/lib/typescript/modules/tabs/Tabs.d.ts.map +1 -0
- package/lib/typescript/modules/tabs/Tabs.variants.d.ts +114 -0
- package/lib/typescript/modules/tabs/Tabs.variants.d.ts.map +1 -0
- package/lib/typescript/modules/tabs/index.d.ts +10 -0
- package/lib/typescript/modules/tabs/index.d.ts.map +1 -0
- package/lib/typescript/modules/textarea/Textarea.d.ts +25 -0
- package/lib/typescript/modules/textarea/Textarea.d.ts.map +1 -0
- package/lib/typescript/modules/textarea/Textarea.variants.d.ts +99 -0
- package/lib/typescript/modules/textarea/Textarea.variants.d.ts.map +1 -0
- package/lib/typescript/modules/textarea/index.d.ts +9 -0
- package/lib/typescript/modules/textarea/index.d.ts.map +1 -0
- package/lib/typescript/modules/timeline/Timeline.d.ts +28 -0
- package/lib/typescript/modules/timeline/Timeline.d.ts.map +1 -0
- package/lib/typescript/modules/timeline/Timeline.variants.d.ts +103 -0
- package/lib/typescript/modules/timeline/Timeline.variants.d.ts.map +1 -0
- package/lib/typescript/modules/timeline/index.d.ts +9 -0
- package/lib/typescript/modules/timeline/index.d.ts.map +1 -0
- package/lib/typescript/modules/toast/Toast.d.ts +38 -0
- package/lib/typescript/modules/toast/Toast.d.ts.map +1 -0
- package/lib/typescript/modules/toast/Toast.variants.d.ts +80 -0
- package/lib/typescript/modules/toast/Toast.variants.d.ts.map +1 -0
- package/lib/typescript/modules/toast/index.d.ts +12 -0
- package/lib/typescript/modules/toast/index.d.ts.map +1 -0
- package/lib/typescript/modules/tooltip/Tooltip.d.ts +31 -0
- package/lib/typescript/modules/tooltip/Tooltip.d.ts.map +1 -0
- package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts +52 -0
- package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts.map +1 -0
- package/lib/typescript/modules/tooltip/index.d.ts +9 -0
- package/lib/typescript/modules/tooltip/index.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/theme/index.d.ts +11 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/platform/colorScheme.native.d.ts +12 -0
- package/lib/typescript/theme/platform/colorScheme.native.d.ts.map +1 -0
- package/lib/typescript/theme/platform/elevation.native.d.ts +35 -0
- package/lib/typescript/theme/platform/elevation.native.d.ts.map +1 -0
- package/lib/typescript/theme/platform/fonts.native.d.ts +41 -0
- package/lib/typescript/theme/platform/fonts.native.d.ts.map +1 -0
- package/lib/typescript/theme/platform/index.d.ts +15 -0
- package/lib/typescript/theme/platform/index.d.ts.map +1 -0
- package/lib/typescript/theme/platform/units.native.d.ts +13 -0
- package/lib/typescript/theme/platform/units.native.d.ts.map +1 -0
- package/lib/typescript/theme/provider/PixelizeProvider.d.ts +81 -0
- package/lib/typescript/theme/provider/PixelizeProvider.d.ts.map +1 -0
- package/lib/typescript/theme/provider/colorModeStorage.d.ts +43 -0
- package/lib/typescript/theme/provider/colorModeStorage.d.ts.map +1 -0
- package/lib/typescript/theme/provider/index.d.ts +8 -0
- package/lib/typescript/theme/provider/index.d.ts.map +1 -0
- package/lib/typescript/theme/provider/useTheme.d.ts +4 -0
- package/lib/typescript/theme/provider/useTheme.d.ts.map +1 -0
- package/lib/typescript/theme/provider/useThemeColors.d.ts +9 -0
- package/lib/typescript/theme/provider/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/theme/provider/useThemeMode.d.ts +4 -0
- package/lib/typescript/theme/provider/useThemeMode.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/emerald/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/emerald/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/index.d.ts +30 -0
- package/lib/typescript/theme/tokens/brands/index.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/lavender/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/lavender/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/meadow/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/meadow/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/radiant/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/radiant/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/rosewood/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/rosewood/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/skyline/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/skyline/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/slate/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/slate/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/storefront/palette.dark.d.ts +3 -0
- package/lib/typescript/theme/tokens/brands/storefront/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/zinc/palette.dark.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts +4 -0
- package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/builders/accentText.d.ts +42 -0
- package/lib/typescript/theme/tokens/builders/accentText.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/builders/buildBrandTokens.d.ts +21 -0
- package/lib/typescript/theme/tokens/builders/buildBrandTokens.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/builders/buildDarkPalette.d.ts +13 -0
- package/lib/typescript/theme/tokens/builders/buildDarkPalette.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/builders/color.d.ts +59 -0
- package/lib/typescript/theme/tokens/builders/color.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/index.d.ts +21 -0
- package/lib/typescript/theme/tokens/index.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/borderWidths.d.ts +15 -0
- package/lib/typescript/theme/tokens/primitives/borderWidths.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/breakpoints.d.ts +17 -0
- package/lib/typescript/theme/tokens/primitives/breakpoints.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/elevation.d.ts +109 -0
- package/lib/typescript/theme/tokens/primitives/elevation.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/fontSizes.d.ts +21 -0
- package/lib/typescript/theme/tokens/primitives/fontSizes.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/fontWeights.d.ts +21 -0
- package/lib/typescript/theme/tokens/primitives/fontWeights.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/index.d.ts +23 -0
- package/lib/typescript/theme/tokens/primitives/index.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/letterSpacings.d.ts +17 -0
- package/lib/typescript/theme/tokens/primitives/letterSpacings.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/lineHeights.d.ts +20 -0
- package/lib/typescript/theme/tokens/primitives/lineHeights.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/radii.d.ts +20 -0
- package/lib/typescript/theme/tokens/primitives/radii.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/sizes.d.ts +33 -0
- package/lib/typescript/theme/tokens/primitives/sizes.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/space.d.ts +29 -0
- package/lib/typescript/theme/tokens/primitives/space.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/primitives/zIndices.d.ts +22 -0
- package/lib/typescript/theme/tokens/primitives/zIndices.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/roles/index.d.ts +68 -0
- package/lib/typescript/theme/tokens/roles/index.d.ts.map +1 -0
- package/lib/typescript/theme/tokens/types.d.ts +103 -0
- package/lib/typescript/theme/tokens/types.d.ts.map +1 -0
- package/package.json +259 -0
- package/registry.json +175 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AA_TEXT","contrastRatio","ON_ACCENT_LIGHT","ON_ACCENT_DARK","FILLED_RUNGS","pickOnAccent","fill","resolveFilledAccent","ramp","rung","label","ratio","meetsAA","filledPrimaryRung","primary"],"sourceRoot":"../../../../../src","sources":["theme/tokens/builders/accentText.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,OAAO,EAAEC,aAAa,QAAQ,YAAS;;AAEhD;AACA,OAAO,MAAMC,eAAe,GAAG,SAAS;AACxC,OAAO,MAAMC,cAAc,GAAG,SAAS;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAapD;AACA,OAAO,SAASC,YAAYA,CAACC,IAAY,EAAU;EACjD,OAAOL,aAAa,CAACK,IAAI,EAAEJ,eAAe,CAAC,IAAID,aAAa,CAACK,IAAI,EAAEH,cAAc,CAAC,GAC9ED,eAAe,GACfC,cAAc;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,mBAAmBA,CAACC,IAAU,EAAgB;EAC5D,KAAK,MAAMC,IAAI,IAAIL,YAAY,EAAE;IAC/B,MAAME,IAAI,GAAGE,IAAI,CAACC,IAAI,CAAC;IACvB,MAAMC,KAAK,GAAGL,YAAY,CAACC,IAAI,CAAC;IAChC,MAAMK,KAAK,GAAGV,aAAa,CAACK,IAAI,EAAEI,KAAK,CAAC;IACxC,IAAIC,KAAK,IAAIX,OAAO,EAAE,OAAO;MAAES,IAAI;MAAEH,IAAI;MAAEI,KAAK;MAAEC,KAAK;MAAEC,OAAO,EAAE;IAAK,CAAC;EAC1E;EAEA,MAAMN,IAAI,GAAGE,IAAI,CAAC,GAAG,CAAC;EACtB,MAAME,KAAK,GAAGL,YAAY,CAACC,IAAI,CAAC;EAChC,OAAO;IAAEG,IAAI,EAAE,GAAG;IAAEH,IAAI;IAAEI,KAAK;IAAEC,KAAK,EAAEV,aAAa,CAACK,IAAI,EAAEI,KAAK,CAAC;IAAEE,OAAO,EAAE;EAAM,CAAC;AACtF;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAACC,OAAa,EAAc;EAC3D,OAAOP,mBAAmB,CAACO,OAAO,CAAC,CAACL,IAAI;AAC1C","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Builds 8-digit hex alpha tokens from a 6-digit brand color (primary.500).
|
|
5
|
+
*
|
|
6
|
+
* Expands 3-digit shorthand (`#fff` -> `#ffffff`) before the opacity check below, so a legitimate
|
|
7
|
+
* shorthand colour — every palette's `white`/`black` are stored as `#fff`/`#000` — isn't caught by
|
|
8
|
+
* a guard meant for a different case: rejecting 8-digit ALPHA hex, so a contrast ratio is never
|
|
9
|
+
* computed against a translucent colour without knowing what it composites over (see color.ts).
|
|
10
|
+
*/
|
|
11
|
+
export function normalizeHex(hex) {
|
|
12
|
+
const trimmed = hex.trim();
|
|
13
|
+
const withHash = trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
|
|
14
|
+
const expanded = /^#[0-9a-fA-F]{3}$/.test(withHash) ? `#${[...withHash.slice(1)].map(c => c + c).join("")}` : withHash;
|
|
15
|
+
if (!/^#[0-9a-fA-F]{6}$/.test(expanded)) {
|
|
16
|
+
throw new Error(`Invalid hex color (expected #RGB, #RRGGBB): ${hex}`);
|
|
17
|
+
}
|
|
18
|
+
return expanded.toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
export function buildPrimaryOpacity(primary500) {
|
|
21
|
+
const h = normalizeHex(primary500);
|
|
22
|
+
return {
|
|
23
|
+
4: `${h}0a`,
|
|
24
|
+
8: `${h}14`,
|
|
25
|
+
16: `${h}29`,
|
|
26
|
+
24: `${h}3d`,
|
|
27
|
+
32: `${h}52`,
|
|
28
|
+
40: `${h}66`,
|
|
29
|
+
48: `${h}7a`
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Tint used for focus rings / primary-tinted shadows (matches ~28% alpha pattern). */
|
|
34
|
+
export function buildPrimaryShadowTint(primary500) {
|
|
35
|
+
const h = normalizeHex(primary500);
|
|
36
|
+
return `${h}47`;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=buildBrandTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeHex","hex","trimmed","trim","withHash","startsWith","expanded","test","slice","map","c","join","Error","toLowerCase","buildPrimaryOpacity","primary500","h","buildPrimaryShadowTint"],"sourceRoot":"../../../../../src","sources":["theme/tokens/builders/buildBrandTokens.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAACC,GAAW,EAAU;EAChD,MAAMC,OAAO,GAAGD,GAAG,CAACE,IAAI,CAAC,CAAC;EAC1B,MAAMC,QAAQ,GAAGF,OAAO,CAACG,UAAU,CAAC,GAAG,CAAC,GAAGH,OAAO,GAAG,IAAIA,OAAO,EAAE;EAClE,MAAMI,QAAQ,GAAG,mBAAmB,CAACC,IAAI,CAACH,QAAQ,CAAC,GAC/C,IAAI,CAAC,GAAGA,QAAQ,CAACI,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,GAAG,CAAEC,CAAC,IAAKA,CAAC,GAAGA,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC,EAAE,GACvDP,QAAQ;EACZ,IAAI,CAAC,mBAAmB,CAACG,IAAI,CAACD,QAAQ,CAAC,EAAE;IACvC,MAAM,IAAIM,KAAK,CAAC,+CAA+CX,GAAG,EAAE,CAAC;EACvE;EACA,OAAOK,QAAQ,CAACO,WAAW,CAAC,CAAC;AAC/B;AAEA,OAAO,SAASC,mBAAmBA,CAACC,UAAkB,EAAE;EACtD,MAAMC,CAAC,GAAGhB,YAAY,CAACe,UAAU,CAAC;EAClC,OAAO;IACL,CAAC,EAAE,GAAGC,CAAC,IAAI;IACX,CAAC,EAAE,GAAGA,CAAC,IAAI;IACX,EAAE,EAAE,GAAGA,CAAC,IAAI;IACZ,EAAE,EAAE,GAAGA,CAAC,IAAI;IACZ,EAAE,EAAE,GAAGA,CAAC,IAAI;IACZ,EAAE,EAAE,GAAGA,CAAC,IAAI;IACZ,EAAE,EAAE,GAAGA,CAAC;EACV,CAAC;AACH;;AAEA;AACA,OAAO,SAASC,sBAAsBA,CAACF,UAAkB,EAAU;EACjE,MAAMC,CAAC,GAAGhB,YAAY,CAACe,UAAU,CAAC;EAClC,OAAO,GAAGC,CAAC,IAAI;AACjB","ignoreList":[]}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "./buildBrandTokens.js";
|
|
4
|
+
import { contrastRatio, hexToHsl, hslToHex, withLightness } from "./color.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Derives a brand's dark palette from its light palette. Every value is computed from the brand's
|
|
8
|
+
* OWN hue, so each brand keeps its identity in dark mode instead of collapsing onto one shared grey.
|
|
9
|
+
*
|
|
10
|
+
* Three strategies, because one rule gives wrong results:
|
|
11
|
+
* - **Structural ramps** (surfaces, text, borders) are rebuilt at explicit lightness targets — NOT
|
|
12
|
+
* reversed, since the light ramps bottom out near 35% lightness, nowhere near dark enough.
|
|
13
|
+
* - **Utility hue ramps** (red/green/…) are reversed, so index roles survive: `red.50` is a pale
|
|
14
|
+
* badge background in light and a deep one in dark.
|
|
15
|
+
* - **Brand + semantic ramps** are rebuilt around the accent lifted as far as a label allows.
|
|
16
|
+
*
|
|
17
|
+
* Mobile difference from web: web writes an `accentText` token here; mobile has no such field —
|
|
18
|
+
* the on-fill label is derived at consume time by `resolveFilledAccent`, so nothing is written.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const SCALE_KEYS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
22
|
+
const fromTargets = (hueSource, targets, saturation) => {
|
|
23
|
+
const {
|
|
24
|
+
h
|
|
25
|
+
} = hexToHsl(hueSource);
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const k of SCALE_KEYS) {
|
|
28
|
+
out[k] = hslToHex({
|
|
29
|
+
h,
|
|
30
|
+
s: saturation,
|
|
31
|
+
l: targets[k]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** Mirrors index roles: 50↔900, 100↔800, 200↔700, 300↔600, 400↔500. */
|
|
38
|
+
export const reverseScale = scale => ({
|
|
39
|
+
50: scale[900],
|
|
40
|
+
100: scale[800],
|
|
41
|
+
200: scale[700],
|
|
42
|
+
300: scale[600],
|
|
43
|
+
400: scale[500],
|
|
44
|
+
500: scale[400],
|
|
45
|
+
600: scale[300],
|
|
46
|
+
700: scale[200],
|
|
47
|
+
800: scale[100],
|
|
48
|
+
900: scale[50]
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/** WCAG AA for normal text — the bar for a solid button's label. */
|
|
52
|
+
const LABEL_TARGET = 4.5;
|
|
53
|
+
const MAX_ACCENT_LIGHTNESS = 85;
|
|
54
|
+
const LIGHTNESS_STEP = 0.5;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* How much lighter this accent can go in dark mode. Lighter reads better on a dark canvas but worse
|
|
58
|
+
* under a light label, so this maximises lightness subject to keeping the label legible. The floor
|
|
59
|
+
* is `min(AA, whatLightModeAlreadyShips)` — brands whose light label already dips below AA are held
|
|
60
|
+
* to "no worse than light", never stricter, so their brand hue is not forced to change.
|
|
61
|
+
*/
|
|
62
|
+
export const accentLightnessDelta = (accent500, label) => {
|
|
63
|
+
const originalL = hexToHsl(accent500).l;
|
|
64
|
+
const floor = Math.min(LABEL_TARGET, contrastRatio(label, accent500));
|
|
65
|
+
let best = originalL;
|
|
66
|
+
for (let l = originalL; l <= MAX_ACCENT_LIGHTNESS; l += LIGHTNESS_STEP) {
|
|
67
|
+
if (contrastRatio(label, withLightness(accent500, l)) < floor) break;
|
|
68
|
+
best = l;
|
|
69
|
+
}
|
|
70
|
+
return best - originalL;
|
|
71
|
+
};
|
|
72
|
+
const BRAND_DARK_MIN_L = 12;
|
|
73
|
+
const BRAND_DARK_MAX_L = 93;
|
|
74
|
+
const ACCENT_INDEX = SCALE_KEYS.indexOf(500);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Rebuild a scale as a proper DARK ramp: monotonically dark → light across 50 → 900, `[500]` pinned
|
|
78
|
+
* to the accent. On a dark canvas the tint rungs (`[50]`/`[100]`) must be dark and the strong rungs
|
|
79
|
+
* (`[800]`/`[900]`, read as text) must be light — both invert versus light mode. Interpolating around
|
|
80
|
+
* the pinned accent keeps the ramp monotonic whatever lightness that brand's accent lands on.
|
|
81
|
+
*/
|
|
82
|
+
const toDarkRamp = (scale, accentHex) => {
|
|
83
|
+
const {
|
|
84
|
+
h: hue,
|
|
85
|
+
l: accentL
|
|
86
|
+
} = hexToHsl(accentHex);
|
|
87
|
+
const out = {};
|
|
88
|
+
SCALE_KEYS.forEach((key, i) => {
|
|
89
|
+
let l;
|
|
90
|
+
if (i === ACCENT_INDEX) {
|
|
91
|
+
l = accentL;
|
|
92
|
+
} else if (i < ACCENT_INDEX) {
|
|
93
|
+
l = BRAND_DARK_MIN_L + (accentL - BRAND_DARK_MIN_L) * (i / ACCENT_INDEX);
|
|
94
|
+
} else {
|
|
95
|
+
l = accentL + (BRAND_DARK_MAX_L - accentL) * ((i - ACCENT_INDEX) / (SCALE_KEYS.length - 1 - ACCENT_INDEX));
|
|
96
|
+
}
|
|
97
|
+
const {
|
|
98
|
+
s
|
|
99
|
+
} = hexToHsl(scale[key]);
|
|
100
|
+
out[key] = hslToHex({
|
|
101
|
+
h: hue,
|
|
102
|
+
s,
|
|
103
|
+
l
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
return out;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** Dark accent scale: accent pinned as light as a label allows, ramp rebuilt around it. */
|
|
110
|
+
const liftAccent = (scale, label) => {
|
|
111
|
+
const accent = withLightness(scale[500], hexToHsl(scale[500]).l + accentLightnessDelta(scale[500], label));
|
|
112
|
+
return {
|
|
113
|
+
...toDarkRamp(scale, accent),
|
|
114
|
+
500: accent
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const liftBrand = (brand, label) => {
|
|
118
|
+
const lifted = liftAccent(brand, label);
|
|
119
|
+
return {
|
|
120
|
+
...lifted,
|
|
121
|
+
opacity: buildPrimaryOpacity(lifted[500])
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Lightness targets per structural ramp. Index roles match light mode; only lightness flips.
|
|
126
|
+
const SURFACE_TARGETS = {
|
|
127
|
+
50: 7,
|
|
128
|
+
100: 9,
|
|
129
|
+
200: 11,
|
|
130
|
+
300: 14,
|
|
131
|
+
400: 17,
|
|
132
|
+
500: 21,
|
|
133
|
+
600: 30,
|
|
134
|
+
700: 45,
|
|
135
|
+
800: 60,
|
|
136
|
+
900: 75
|
|
137
|
+
};
|
|
138
|
+
const TEXT_TARGETS = {
|
|
139
|
+
50: 30,
|
|
140
|
+
100: 38,
|
|
141
|
+
200: 45,
|
|
142
|
+
300: 55,
|
|
143
|
+
400: 62,
|
|
144
|
+
500: 70,
|
|
145
|
+
600: 76,
|
|
146
|
+
700: 82,
|
|
147
|
+
800: 88,
|
|
148
|
+
900: 95
|
|
149
|
+
};
|
|
150
|
+
const PLACEHOLDER_TARGETS = {
|
|
151
|
+
50: 25,
|
|
152
|
+
100: 30,
|
|
153
|
+
200: 35,
|
|
154
|
+
300: 42,
|
|
155
|
+
400: 48,
|
|
156
|
+
500: 54,
|
|
157
|
+
600: 60,
|
|
158
|
+
700: 66,
|
|
159
|
+
800: 72,
|
|
160
|
+
900: 80
|
|
161
|
+
};
|
|
162
|
+
const BORDER_TARGETS = {
|
|
163
|
+
50: 12,
|
|
164
|
+
100: 15,
|
|
165
|
+
200: 18,
|
|
166
|
+
300: 21,
|
|
167
|
+
400: 24,
|
|
168
|
+
500: 27,
|
|
169
|
+
600: 33,
|
|
170
|
+
700: 42,
|
|
171
|
+
800: 52,
|
|
172
|
+
900: 62
|
|
173
|
+
};
|
|
174
|
+
const DISABLED_TARGETS = {
|
|
175
|
+
50: 14,
|
|
176
|
+
100: 18,
|
|
177
|
+
200: 22,
|
|
178
|
+
300: 26,
|
|
179
|
+
400: 30,
|
|
180
|
+
500: 34,
|
|
181
|
+
600: 42,
|
|
182
|
+
700: 52,
|
|
183
|
+
800: 62,
|
|
184
|
+
900: 72
|
|
185
|
+
};
|
|
186
|
+
const TABLE_HOVER_TARGETS = {
|
|
187
|
+
50: 9,
|
|
188
|
+
100: 11,
|
|
189
|
+
200: 13,
|
|
190
|
+
300: 15,
|
|
191
|
+
400: 17,
|
|
192
|
+
500: 19,
|
|
193
|
+
600: 24,
|
|
194
|
+
700: 32,
|
|
195
|
+
800: 42,
|
|
196
|
+
900: 52
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* `gray[500]` is the de-facto muted-text token, so its rung is set by contrast, not an even ramp —
|
|
200
|
+
* it must clear AA against the LIGHTEST named surface it can land on, not merely the canvas. L64
|
|
201
|
+
* clears all of them; rungs at/below 400 stay decorative and are not held to text AA.
|
|
202
|
+
*/
|
|
203
|
+
const GRAY_TARGETS = {
|
|
204
|
+
50: 10,
|
|
205
|
+
100: 14,
|
|
206
|
+
200: 22,
|
|
207
|
+
300: 32,
|
|
208
|
+
400: 48,
|
|
209
|
+
500: 64,
|
|
210
|
+
600: 72,
|
|
211
|
+
700: 79,
|
|
212
|
+
800: 86,
|
|
213
|
+
900: 93
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Named surface lightness. Elevation INVERTS versus light mode: "stronger" means lighter than the
|
|
218
|
+
* canvas. The top is deliberately compressed — dark elevation reads through small steps plus borders,
|
|
219
|
+
* so a wide spread just looks washed out. `light`/`tertiary` share a rung by design (aliases).
|
|
220
|
+
*/
|
|
221
|
+
const NAMED_SURFACE_L = {
|
|
222
|
+
main: 7,
|
|
223
|
+
base: 8,
|
|
224
|
+
subtle: 10,
|
|
225
|
+
secondary: 11,
|
|
226
|
+
tableHeader: 12,
|
|
227
|
+
light: 13,
|
|
228
|
+
tertiary: 13,
|
|
229
|
+
medium: 14,
|
|
230
|
+
neutral: 15,
|
|
231
|
+
quaternary: 16,
|
|
232
|
+
accent: 17,
|
|
233
|
+
muted: 18
|
|
234
|
+
};
|
|
235
|
+
const SURFACE_SAT = 14;
|
|
236
|
+
const TEXT_SAT = 12;
|
|
237
|
+
const PLACEHOLDER_SAT = 10;
|
|
238
|
+
const BORDER_SAT = 12;
|
|
239
|
+
const DISABLED_SAT = 8;
|
|
240
|
+
const GRAY_SAT = 6;
|
|
241
|
+
export function buildDarkPalette(light) {
|
|
242
|
+
const hueSource = light.primary[500];
|
|
243
|
+
const {
|
|
244
|
+
h
|
|
245
|
+
} = hexToHsl(hueSource);
|
|
246
|
+
const label = light.white;
|
|
247
|
+
const namedSurfaces = Object.fromEntries(Object.entries(NAMED_SURFACE_L).map(([key, l]) => [key, hslToHex({
|
|
248
|
+
h,
|
|
249
|
+
s: SURFACE_SAT,
|
|
250
|
+
l
|
|
251
|
+
})]));
|
|
252
|
+
return {
|
|
253
|
+
...light,
|
|
254
|
+
// Brand identity: hue preserved, accent lifted as far as a light label allows.
|
|
255
|
+
primary: liftBrand(light.primary, label),
|
|
256
|
+
secondary: liftBrand(light.secondary, label),
|
|
257
|
+
tertiary: liftBrand(light.tertiary, label),
|
|
258
|
+
gradient: light.gradient,
|
|
259
|
+
semantic: {
|
|
260
|
+
success: liftAccent(light.semantic.success, label),
|
|
261
|
+
error: liftAccent(light.semantic.error, label),
|
|
262
|
+
warning: liftAccent(light.semantic.warning, label),
|
|
263
|
+
info: liftAccent(light.semantic.info, label)
|
|
264
|
+
},
|
|
265
|
+
transparent: light.transparent,
|
|
266
|
+
black: light.black,
|
|
267
|
+
white: light.white,
|
|
268
|
+
// Utility hues keep their meaning; only the light/dark role of each index flips.
|
|
269
|
+
gray: fromTargets(hueSource, GRAY_TARGETS, GRAY_SAT),
|
|
270
|
+
red: reverseScale(light.red),
|
|
271
|
+
orange: reverseScale(light.orange),
|
|
272
|
+
yellow: reverseScale(light.yellow),
|
|
273
|
+
green: reverseScale(light.green),
|
|
274
|
+
teal: reverseScale(light.teal),
|
|
275
|
+
blue: reverseScale(light.blue),
|
|
276
|
+
cyan: reverseScale(light.cyan),
|
|
277
|
+
purple: reverseScale(light.purple),
|
|
278
|
+
pink: reverseScale(light.pink),
|
|
279
|
+
backgroundColor: namedSurfaces,
|
|
280
|
+
background: fromTargets(hueSource, SURFACE_TARGETS, SURFACE_SAT),
|
|
281
|
+
text: fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT),
|
|
282
|
+
header: fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT + 2),
|
|
283
|
+
placeholder: fromTargets(hueSource, PLACEHOLDER_TARGETS, PLACEHOLDER_SAT),
|
|
284
|
+
border: fromTargets(hueSource, BORDER_TARGETS, BORDER_SAT),
|
|
285
|
+
boxborder: fromTargets(hueSource, BORDER_TARGETS, BORDER_SAT),
|
|
286
|
+
table: {
|
|
287
|
+
hover: fromTargets(hueSource, TABLE_HOVER_TARGETS, BORDER_SAT)
|
|
288
|
+
},
|
|
289
|
+
disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
|
|
290
|
+
// Sidebar is already near-black in light mode, so it needs no inversion.
|
|
291
|
+
sidebar: light.sidebar,
|
|
292
|
+
boxShadow: {
|
|
293
|
+
primary: buildPrimaryShadowTint(light.primary[500]),
|
|
294
|
+
error: light.boxShadow.error,
|
|
295
|
+
default: "#00000080"
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
export default buildDarkPalette;
|
|
300
|
+
//# sourceMappingURL=buildDarkPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["buildPrimaryOpacity","buildPrimaryShadowTint","contrastRatio","hexToHsl","hslToHex","withLightness","SCALE_KEYS","fromTargets","hueSource","targets","saturation","h","out","k","s","l","reverseScale","scale","LABEL_TARGET","MAX_ACCENT_LIGHTNESS","LIGHTNESS_STEP","accentLightnessDelta","accent500","label","originalL","floor","Math","min","best","BRAND_DARK_MIN_L","BRAND_DARK_MAX_L","ACCENT_INDEX","indexOf","toDarkRamp","accentHex","hue","accentL","forEach","key","i","length","liftAccent","accent","liftBrand","brand","lifted","opacity","SURFACE_TARGETS","TEXT_TARGETS","PLACEHOLDER_TARGETS","BORDER_TARGETS","DISABLED_TARGETS","TABLE_HOVER_TARGETS","GRAY_TARGETS","NAMED_SURFACE_L","main","base","subtle","secondary","tableHeader","light","tertiary","medium","neutral","quaternary","muted","SURFACE_SAT","TEXT_SAT","PLACEHOLDER_SAT","BORDER_SAT","DISABLED_SAT","GRAY_SAT","buildDarkPalette","primary","white","namedSurfaces","Object","fromEntries","entries","map","gradient","semantic","success","error","warning","info","transparent","black","gray","red","orange","yellow","green","teal","blue","cyan","purple","pink","backgroundColor","background","text","header","placeholder","border","boxborder","table","hover","disabled","sidebar","boxShadow","default"],"sourceRoot":"../../../../../src","sources":["theme/tokens/builders/buildDarkPalette.ts"],"mappings":";;AACA,SAASA,mBAAmB,EAAEC,sBAAsB,QAAQ,uBAAoB;AAChF,SAASC,aAAa,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,YAAS;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,UAAU,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAE7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,CAAC1B,KAAK;MAC5B2B,OAAO,EAAE;IACX;EACF,CAAC;AACH;AAEA,eAAetC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WCAG 2.x colour maths. Pure numbers — no unit, no CSS string, no platform import.
|
|
5
|
+
*
|
|
6
|
+
* This is what lets a label be *derived* from its fill instead of hardcoded, which is the whole
|
|
7
|
+
* reason three brands shipped a failing button label on web.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { normalizeHex } from "./buildBrandTokens.js";
|
|
11
|
+
/** WCAG AA for normal-size text. */
|
|
12
|
+
export const AA_TEXT = 4.5;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* WCAG 1.4.11 for non-text UI. A 1px input outline is a UI component, not decoration —
|
|
16
|
+
* it needs 3:1, which is why an interactive border can't reuse the decorative one.
|
|
17
|
+
*/
|
|
18
|
+
export const AA_NON_TEXT = 3;
|
|
19
|
+
export function hexToRgb(hex) {
|
|
20
|
+
const h = normalizeHex(hex).slice(1);
|
|
21
|
+
return {
|
|
22
|
+
r: parseInt(h.slice(0, 2), 16),
|
|
23
|
+
g: parseInt(h.slice(2, 4), 16),
|
|
24
|
+
b: parseInt(h.slice(4, 6), 16)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Like `hexToRgb`, but accepts an 8-digit `#rrggbbaa` and carries alpha as 0..1. */
|
|
28
|
+
export function hexToRgba(hex) {
|
|
29
|
+
const trimmed = hex.trim();
|
|
30
|
+
const withHash = trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
|
|
31
|
+
if (!/^#[0-9a-fA-F]{8}$/.test(withHash)) {
|
|
32
|
+
return {
|
|
33
|
+
...hexToRgb(hex),
|
|
34
|
+
a: 1
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const a = parseInt(withHash.slice(7, 9), 16) / 255;
|
|
38
|
+
return {
|
|
39
|
+
...hexToRgb(withHash.slice(0, 7)),
|
|
40
|
+
a
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Flattens a translucent `foreground` onto an opaque `backdrop`, returning the resulting opaque
|
|
46
|
+
* `#rrggbb`. This is the only correct way to measure contrast for an alpha tint: `contrastRatio`
|
|
47
|
+
* takes two opaque colours, so a ghost-hover/overlay tint must be composited first — never scored
|
|
48
|
+
* against its own un-composited hue, which silently discards the alpha and overstates the ratio.
|
|
49
|
+
*/
|
|
50
|
+
export function compositeOver(foreground, backdrop) {
|
|
51
|
+
const fg = hexToRgba(foreground);
|
|
52
|
+
const bg = hexToRgb(backdrop);
|
|
53
|
+
const blend = (f, b) => f * fg.a + b * (1 - fg.a);
|
|
54
|
+
return rgbToHex({
|
|
55
|
+
r: blend(fg.r, bg.r),
|
|
56
|
+
g: blend(fg.g, bg.g),
|
|
57
|
+
b: blend(fg.b, bg.b)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function channelLuminance(value8Bit) {
|
|
61
|
+
const s = value8Bit / 255;
|
|
62
|
+
return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** WCAG relative luminance. */
|
|
66
|
+
export function relativeLuminance(hex) {
|
|
67
|
+
const {
|
|
68
|
+
r,
|
|
69
|
+
g,
|
|
70
|
+
b
|
|
71
|
+
} = hexToRgb(hex);
|
|
72
|
+
return 0.2126 * channelLuminance(r) + 0.7152 * channelLuminance(g) + 0.0722 * channelLuminance(b);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* WCAG contrast ratio, 1..21. Both colours must be opaque: a ratio against a translucent
|
|
77
|
+
* colour is undefined without knowing what it composites over, so `normalizeHex` rejects
|
|
78
|
+
* the 8-digit tokens rather than quietly dropping their alpha.
|
|
79
|
+
*/
|
|
80
|
+
export function contrastRatio(a, b) {
|
|
81
|
+
const la = relativeLuminance(a);
|
|
82
|
+
const lb = relativeLuminance(b);
|
|
83
|
+
const lighter = Math.max(la, lb);
|
|
84
|
+
const darker = Math.min(la, lb);
|
|
85
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
86
|
+
}
|
|
87
|
+
export function meetsContrast(a, b, minimum) {
|
|
88
|
+
return contrastRatio(a, b) >= minimum;
|
|
89
|
+
}
|
|
90
|
+
const toHexPair = n => Math.max(0, Math.min(255, Math.round(n))).toString(16).padStart(2, "0");
|
|
91
|
+
export function rgbToHex({
|
|
92
|
+
r,
|
|
93
|
+
g,
|
|
94
|
+
b
|
|
95
|
+
}) {
|
|
96
|
+
return `#${toHexPair(r)}${toHexPair(g)}${toHexPair(b)}`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Channel-wise sRGB blend. `amount` is how much of `b` to mix into `a`, 0..1. */
|
|
100
|
+
export function mixHex(a, b, amount) {
|
|
101
|
+
const from = hexToRgb(a);
|
|
102
|
+
const to = hexToRgb(b);
|
|
103
|
+
const t = Math.max(0, Math.min(1, amount));
|
|
104
|
+
const lerp = (x, y) => toHexPair(x + (y - x) * t);
|
|
105
|
+
return `#${lerp(from.r, to.r)}${lerp(from.g, to.g)}${lerp(from.b, to.b)}`;
|
|
106
|
+
}
|
|
107
|
+
const clampUnit = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* HSL is the space the dark palette is derived in: dark mode keeps each brand's hue and
|
|
111
|
+
* re-lights it, so the derivation re-lights by lightness rather than blending toward a grey.
|
|
112
|
+
*/
|
|
113
|
+
export function rgbToHsl({
|
|
114
|
+
r,
|
|
115
|
+
g,
|
|
116
|
+
b
|
|
117
|
+
}) {
|
|
118
|
+
const rn = r / 255;
|
|
119
|
+
const gn = g / 255;
|
|
120
|
+
const bn = b / 255;
|
|
121
|
+
const max = Math.max(rn, gn, bn);
|
|
122
|
+
const min = Math.min(rn, gn, bn);
|
|
123
|
+
const l = (max + min) / 2;
|
|
124
|
+
const d = max - min;
|
|
125
|
+
if (d === 0) return {
|
|
126
|
+
h: 0,
|
|
127
|
+
s: 0,
|
|
128
|
+
l: l * 100
|
|
129
|
+
};
|
|
130
|
+
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
131
|
+
let h;
|
|
132
|
+
if (max === rn) h = ((gn - bn) / d + (gn < bn ? 6 : 0)) / 6;else if (max === gn) h = ((bn - rn) / d + 2) / 6;else h = ((rn - gn) / d + 4) / 6;
|
|
133
|
+
return {
|
|
134
|
+
h: h * 360,
|
|
135
|
+
s: s * 100,
|
|
136
|
+
l: l * 100
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export function hslToRgb({
|
|
140
|
+
h,
|
|
141
|
+
s,
|
|
142
|
+
l
|
|
143
|
+
}) {
|
|
144
|
+
const hn = (h % 360 + 360) % 360 / 360;
|
|
145
|
+
const sn = clampUnit(s, 0, 100) / 100;
|
|
146
|
+
const ln = clampUnit(l, 0, 100) / 100;
|
|
147
|
+
if (sn === 0) {
|
|
148
|
+
const v = ln * 255;
|
|
149
|
+
return {
|
|
150
|
+
r: v,
|
|
151
|
+
g: v,
|
|
152
|
+
b: v
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
const q = ln < 0.5 ? ln * (1 + sn) : ln + sn - ln * sn;
|
|
156
|
+
const p = 2 * ln - q;
|
|
157
|
+
const channel = t => {
|
|
158
|
+
let tn = t;
|
|
159
|
+
if (tn < 0) tn += 1;
|
|
160
|
+
if (tn > 1) tn -= 1;
|
|
161
|
+
if (tn < 1 / 6) return p + (q - p) * 6 * tn;
|
|
162
|
+
if (tn < 1 / 2) return q;
|
|
163
|
+
if (tn < 2 / 3) return p + (q - p) * (2 / 3 - tn) * 6;
|
|
164
|
+
return p;
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
r: channel(hn + 1 / 3) * 255,
|
|
168
|
+
g: channel(hn) * 255,
|
|
169
|
+
b: channel(hn - 1 / 3) * 255
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
export const hexToHsl = hex => rgbToHsl(hexToRgb(hex));
|
|
173
|
+
export const hslToHex = hsl => rgbToHex(hslToRgb(hsl));
|
|
174
|
+
|
|
175
|
+
/** Re-lights a colour while keeping its hue (and, unless overridden, its saturation). */
|
|
176
|
+
export function withLightness(hex, lightness, saturation) {
|
|
177
|
+
const {
|
|
178
|
+
h,
|
|
179
|
+
s
|
|
180
|
+
} = hexToHsl(hex);
|
|
181
|
+
return hslToHex({
|
|
182
|
+
h,
|
|
183
|
+
s: saturation ?? s,
|
|
184
|
+
l: clampUnit(lightness, 0, 100)
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeHex","AA_TEXT","AA_NON_TEXT","hexToRgb","hex","h","slice","r","parseInt","g","b","hexToRgba","trimmed","trim","withHash","startsWith","test","a","compositeOver","foreground","backdrop","fg","bg","blend","f","rgbToHex","channelLuminance","value8Bit","s","Math","pow","relativeLuminance","contrastRatio","la","lb","lighter","max","darker","min","meetsContrast","minimum","toHexPair","n","round","toString","padStart","mixHex","amount","from","to","t","lerp","x","y","clampUnit","rgbToHsl","rn","gn","bn","l","d","hslToRgb","hn","sn","ln","v","q","p","channel","tn","hexToHsl","hslToHex","hsl","withLightness","lightness","saturation"],"sourceRoot":"../../../../../src","sources":["theme/tokens/builders/color.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,uBAAoB;AAIjD;AACA,OAAO,MAAMC,OAAO,GAAG,GAAG;;AAE1B;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC;AAE5B,OAAO,SAASC,QAAQA,CAACC,GAAW,EAAO;EACzC,MAAMC,CAAC,GAAGL,YAAY,CAACI,GAAG,CAAC,CAACE,KA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AAEL,SAAS,CAACoB,SAAS,EAAE,CAAC,EAAE,GAAG;EAAE,CAAC,CAAC;AAC7E","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pixelize design tokens — the portable core, the copy-paste zone shared byte-for-byte with web's
|
|
5
|
+
* `src/Theme/tokens/` and hash-gated by `.tokens.sha256`.
|
|
6
|
+
*
|
|
7
|
+
* PURITY CONTRACT: nothing re-exported here carries a unit, a CSS string, or an import from
|
|
8
|
+
* `platform/`. Plain TypeScript data + pure functions only — numbers, not `"1rem"` — so this whole
|
|
9
|
+
* folder copies to web and back with no edits. `tokens/__tests__/purity.test.ts` enforces it.
|
|
10
|
+
*
|
|
11
|
+
* `roles/` is the supported colour API (`roleColors`) — pure indirection into the primitive palette,
|
|
12
|
+
* the layer that stops web and mobile drifting. `platform/` (never copied) is what turns these
|
|
13
|
+
* numbers into real RN styles (DP, `StyleSheet.hairlineWidth`, iOS/Android shadows).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export * from "./types.js";
|
|
17
|
+
export * from "./primitives/index.js";
|
|
18
|
+
export * from "./brands/index.js";
|
|
19
|
+
|
|
20
|
+
// Mobile has no `builders/` barrel; re-export the modules directly — the same surface web's
|
|
21
|
+
// `builders/index.ts` exposes, minus web-only `chartColorsFromTheme` (ApexCharts, not ported).
|
|
22
|
+
export * from "./builders/accentText.js";
|
|
23
|
+
export * from "./builders/buildBrandTokens.js";
|
|
24
|
+
export * from "./builders/buildDarkPalette.js";
|
|
25
|
+
export * from "./builders/color.js";
|
|
26
|
+
export * from "./roles/index.js";
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["theme/tokens/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,YAAS;AACvB,cAAc,uBAAc;AAC5B,cAAc,mBAAU;;AAExB;AACA;AACA,cAAc,0BAAuB;AACrC,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,qBAAkB;AAEhC,cAAc,kBAAS","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Border widths. Unitless DP.
|
|
5
|
+
*
|
|
6
|
+
* `hairline` is 1 here only because tokens may not import react-native: the true value is
|
|
7
|
+
* `StyleSheet.hairlineWidth`, resolved at runtime from screen density (~0.5 on 2x). The platform
|
|
8
|
+
* layer substitutes it. 1 is the correct fallback — it is the value on a 1x screen.
|
|
9
|
+
*/
|
|
10
|
+
const borderWidths = {
|
|
11
|
+
hairline: 1,
|
|
12
|
+
thin: 1,
|
|
13
|
+
thick: 2
|
|
14
|
+
};
|
|
15
|
+
export default borderWidths;
|
|
16
|
+
//# sourceMappingURL=borderWidths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["borderWidths","hairline","thin","thick"],"sourceRoot":"../../../../../src","sources":["theme/tokens/primitives/borderWidths.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,YAAY,GAAG;EACnBC,QAAQ,EAAE,CAAC;EACXC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE;AACT,CAA2C;AAI3C,eAAeH,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Breakpoints. Unitless DP, mirroring web's em ramp at a 16px root.
|
|
5
|
+
*
|
|
6
|
+
* On mobile these are compared against RN's `useWindowDimensions().width`, which is already DP —
|
|
7
|
+
* `sm` and `md` are the phone/tablet split that actually fires; the rest exist so a token copied
|
|
8
|
+
* from web resolves.
|
|
9
|
+
*/
|
|
10
|
+
const breakpoints = {
|
|
11
|
+
sm: 480,
|
|
12
|
+
md: 768,
|
|
13
|
+
lg: 992,
|
|
14
|
+
xl: 1280,
|
|
15
|
+
'2xl': 1536
|
|
16
|
+
};
|
|
17
|
+
export default breakpoints;
|
|
18
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["breakpoints","sm","md","lg","xl"],"sourceRoot":"../../../../../src","sources":["theme/tokens/primitives/breakpoints.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,WAAW,GAAG;EAClBC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,IAAI;EACR,KAAK,EAAE;AACT,CAA2C;AAI3C,eAAeJ,WAAW","ignoreList":[]}
|