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,88 @@
|
|
|
1
|
+
# stepper/ — horizontal multi-step progress display
|
|
2
|
+
|
|
3
|
+
`Stepper` renders a horizontal row of numbered circles connected by lines (checkout/onboarding:
|
|
4
|
+
"Step 2 of 4"), each with a label underneath. v1 is deliberately **display-only** — no `onPress`,
|
|
5
|
+
no `onStepPress` — a small surface per spec, not a step navigator.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
| File | Role |
|
|
10
|
+
|------|------|
|
|
11
|
+
| `Stepper.tsx` | The component. Composition + a11y wiring only — no press/focus/animation logic. |
|
|
12
|
+
| `Stepper.variants.ts` | Pure resolvers (`resolveStepState`, `resolveStepCircleColors`, `resolveStepLabelColor`, `resolveStepConnectorColor`, `resolveStepperAccessibility`) + the structural variant resolvers `stepCircleStructure`, `stepLabelStructure`, `stepConnectorLineStructure`. No React, no lucide. |
|
|
13
|
+
| `index.ts` | Public surface: `Stepper`, `StepperProps`, `StepperStep`. |
|
|
14
|
+
| `__tests__/Stepper.test.ts` | Pure: state arithmetic, WCAG contrast (all brands × modes), accessibility-summary contract. |
|
|
15
|
+
| `__tests__/Stepper.render.test.tsx` | Render: labels/numbers render, single collapsed `progressbar` node, per-state circle colour, consumer `style` applies last. |
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Notes |
|
|
20
|
+
|------|------|---------|-------|
|
|
21
|
+
| `steps` | `{ label: string }[]` | — | Required. Rendered left→right in array order. |
|
|
22
|
+
| `activeStep` | `number` | — | Required, 0-indexed. `0` is the first step. |
|
|
23
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
24
|
+
| `testID` | `string` | — | Forwarded to the outermost `View`; each circle gets `${testID}-circle-${index}` when set. |
|
|
25
|
+
|
|
26
|
+
No `onPress`/`onStepPress` — intentionally out of scope for v1 (see spec). No `color`/`tone` prop:
|
|
27
|
+
every colour a step can show is one of exactly three states, resolved from role tokens (below).
|
|
28
|
+
|
|
29
|
+
## Step states
|
|
30
|
+
|
|
31
|
+
A step is one of three states, derived by pure index arithmetic (`resolveStepState`):
|
|
32
|
+
|
|
33
|
+
| State | When | Circle | Label |
|
|
34
|
+
|-------|------|--------|-------|
|
|
35
|
+
| `completed` | `index < activeStep` | `accent.solid` fill, `accent.onSolid` number | `fg.default` |
|
|
36
|
+
| `active` | `index === activeStep` | same as `completed` (both are "reached", per spec) | `fg.default` |
|
|
37
|
+
| `upcoming` | `index > activeStep` | `bg.sunken` fill, `fg.muted` number | `fg.muted` |
|
|
38
|
+
|
|
39
|
+
The connector between step `index` and `index + 1` (`resolveStepConnectorColor`) is `accent.solid`
|
|
40
|
+
while `index < activeStep` (a reached segment), else the decorative `border.default` — matching the
|
|
41
|
+
spec's "accent.solid up to the active step, border.default beyond it". Each step column draws its
|
|
42
|
+
own leading + trailing connector half so a circle stays centered under its label regardless of
|
|
43
|
+
label length, rather than centered between two circles' worth of connector; `Stepper.tsx` colours
|
|
44
|
+
both halves from the same function so they always agree.
|
|
45
|
+
|
|
46
|
+
## Accessibility contract (WCAG)
|
|
47
|
+
|
|
48
|
+
- **4.1.2** — the whole row is ONE accessible node (`accessible` on the container), same collapsing
|
|
49
|
+
idiom `Badge` uses for its icon + label: a screen reader gets a single summary announcement
|
|
50
|
+
instead of reading every circle and label individually.
|
|
51
|
+
- `accessibilityRole="progressbar"`, `accessibilityValue={{ min: 0, max: steps.length - 1, now:
|
|
52
|
+
activeStep }}` — the raw 0-indexed progress triple (floors `max` at 0 for a single-step stepper).
|
|
53
|
+
- `accessibilityLabel` is a natural-language summary, e.g. `"Step 2 of 4: Shipping"` — the 1-based
|
|
54
|
+
ordinal plus the active step's label (omits the `: <label>` suffix, never a dangling colon, if
|
|
55
|
+
`activeStep` has no matching step).
|
|
56
|
+
- **1.4.3** — every step-number-on-circle and label-on-canvas pairing is measured ≥ 4.5:1 for all 3
|
|
57
|
+
states × 8 brands × both modes (`Stepper.test.ts`); `completed`/`active` are asserted to read
|
|
58
|
+
identically, per spec.
|
|
59
|
+
- **1.4.11** — the reached connector (`accent.solid`) is measured ≥ 3:1 against the canvas for all
|
|
60
|
+
8 brands × both modes. The not-yet-reached connector (`border.default`) has no 3:1 gate by design
|
|
61
|
+
— same reasoning `Divider.variants.ts` documents for its own decorative hairline: it conveys no
|
|
62
|
+
information the numbered circles don't already carry, so WCAG 1.4.11 (which binds only a "User
|
|
63
|
+
Interface Component" or a required "Graphical Object") does not apply to it.
|
|
64
|
+
- No touch target / `hitSlop`, no focus ring, no reduced-motion handling — Stepper is
|
|
65
|
+
non-interactive (no `Pressable`) and has no animation to suppress, same as `Badge`/`Divider`.
|
|
66
|
+
|
|
67
|
+
## Patterns copied from Button (the reference module) and Badge
|
|
68
|
+
|
|
69
|
+
1. **Structure vs colour split.** Circle diameter/radius and label spacing → `createThemedVariants`
|
|
70
|
+
/ `createThemedTextVariants` (registered once per theme). The connector's own fixed height has
|
|
71
|
+
no theme dependency, so it uses untethemed `createVariants` instead — same reasoning
|
|
72
|
+
`RadioGroup.variants.ts` documents for `radioDotStructure`. Colour is state-driven, resolved from
|
|
73
|
+
role tokens, applied inline.
|
|
74
|
+
2. **Pure, testable resolvers** in `Stepper.variants.ts` (no React/lucide) so the WCAG + state
|
|
75
|
+
contract is unit-tested against real palettes — never eyeballed.
|
|
76
|
+
3. **Closed state, not a closed union prop.** There is no `tone`/`variant` prop to widen; a step's
|
|
77
|
+
appearance is entirely derived from `activeStep` vs its own index.
|
|
78
|
+
4. `style: LayoutStyle` last and once, no `{...rest}`.
|
|
79
|
+
|
|
80
|
+
## Known gaps
|
|
81
|
+
|
|
82
|
+
- v1 is display-only by spec — no `onStepPress`/interactive step navigation. A future version
|
|
83
|
+
adding that would need its own accessibility pass (per-step `button` role, focus order) rather
|
|
84
|
+
than bolting `onPress` onto the current single-collapsed-node contract.
|
|
85
|
+
|
|
86
|
+
## Performance
|
|
87
|
+
|
|
88
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). The `steps.map()` renders host `View`/`Text` directly, no library child component — nothing to memoize.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stepper — a horizontal, multi-step progress DISPLAY (checkout/onboarding: "Step 2 of 4"). v1 is
|
|
5
|
+
* deliberately non-interactive: no `onPress`, no `onStepPress` — a small, display-only surface, per
|
|
6
|
+
* spec. The whole row collapses into ONE `progressbar`-role accessible node (`accessible` on the
|
|
7
|
+
* container) so a screen reader gets a single summary announcement instead of reading every circle
|
|
8
|
+
* and label individually, the same collapsing idiom `Badge` uses for its icon + label.
|
|
9
|
+
*
|
|
10
|
+
* Each step is its own `flex: 1` column so the circles stay evenly spaced regardless of label
|
|
11
|
+
* length; the connector to the NEXT step is drawn as two identically-coloured halves — the trailing
|
|
12
|
+
* half of this column, the leading half of the next — so a circle stays centered under its own
|
|
13
|
+
* label rather than centered between two circles' worth of connector.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { memo } from "react";
|
|
17
|
+
import { StyleSheet, Text, View } from "react-native";
|
|
18
|
+
import { useTheme } from "../../theme/index.js";
|
|
19
|
+
import { resolveStepCircleColors, resolveStepConnectorColor, resolveStepLabelColor, resolveStepState, resolveStepperAccessibility, stepCircleStructure, stepConnectorLineStructure, stepLabelStructure } from "./Stepper.variants.js";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
export const Stepper = /*#__PURE__*/memo(function Stepper({
|
|
22
|
+
steps,
|
|
23
|
+
activeStep,
|
|
24
|
+
style,
|
|
25
|
+
testID
|
|
26
|
+
}) {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const a11y = resolveStepperAccessibility({
|
|
29
|
+
steps,
|
|
30
|
+
activeStep
|
|
31
|
+
});
|
|
32
|
+
const lastIndex = steps.length - 1;
|
|
33
|
+
return /*#__PURE__*/_jsx(View, {
|
|
34
|
+
testID: testID,
|
|
35
|
+
accessible: true,
|
|
36
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
37
|
+
accessibilityValue: a11y.accessibilityValue,
|
|
38
|
+
accessibilityLabel: a11y.accessibilityLabel,
|
|
39
|
+
style: [styles.row, style],
|
|
40
|
+
children: steps.map((step, index) => {
|
|
41
|
+
const state = resolveStepState(index, activeStep);
|
|
42
|
+
const circleColors = resolveStepCircleColors(theme.colors, state);
|
|
43
|
+
const labelColor = resolveStepLabelColor(theme.colors, state);
|
|
44
|
+
// No segment exists before the first circle or after the last — a transparent spacer keeps
|
|
45
|
+
// every circle centered in its column via the same left/right flex split as every other one.
|
|
46
|
+
const leadingConnector = index === 0 ? "transparent" : resolveStepConnectorColor(theme.colors, index - 1, activeStep);
|
|
47
|
+
const trailingConnector = index === lastIndex ? "transparent" : resolveStepConnectorColor(theme.colors, index, activeStep);
|
|
48
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
49
|
+
style: styles.column,
|
|
50
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
51
|
+
style: styles.connectorRow,
|
|
52
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
53
|
+
style: [stepConnectorLineStructure(), {
|
|
54
|
+
backgroundColor: leadingConnector
|
|
55
|
+
}]
|
|
56
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
57
|
+
testID: testID === undefined ? undefined : `${testID}-circle-${index}`,
|
|
58
|
+
style: [stepCircleStructure(theme), {
|
|
59
|
+
backgroundColor: circleColors.fill
|
|
60
|
+
}],
|
|
61
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
62
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.semibold), {
|
|
63
|
+
fontSize: theme.fontSizes.sm,
|
|
64
|
+
color: circleColors.text
|
|
65
|
+
}],
|
|
66
|
+
children: index + 1
|
|
67
|
+
})
|
|
68
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
69
|
+
style: [stepConnectorLineStructure(), {
|
|
70
|
+
backgroundColor: trailingConnector
|
|
71
|
+
}]
|
|
72
|
+
})]
|
|
73
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
74
|
+
numberOfLines: 1,
|
|
75
|
+
style: [stepLabelStructure(theme), theme.fontStyleForWeight(theme.fontWeights.medium), {
|
|
76
|
+
fontSize: theme.fontSizes.xs,
|
|
77
|
+
color: labelColor
|
|
78
|
+
}],
|
|
79
|
+
children: step.label
|
|
80
|
+
})]
|
|
81
|
+
}, index);
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const styles = StyleSheet.create({
|
|
86
|
+
row: {
|
|
87
|
+
flexDirection: "row",
|
|
88
|
+
alignItems: "flex-start"
|
|
89
|
+
},
|
|
90
|
+
column: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
alignItems: "center"
|
|
93
|
+
},
|
|
94
|
+
connectorRow: {
|
|
95
|
+
flexDirection: "row",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
width: "100%"
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=Stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Text","View","useTheme","resolveStepCircleColors","resolveStepConnectorColor","resolveStepLabelColor","resolveStepState","resolveStepperAccessibility","stepCircleStructure","stepConnectorLineStructure","stepLabelStructure","jsx","_jsx","jsxs","_jsxs","Stepper","steps","activeStep","style","testID","theme","a11y","lastIndex","length","accessible","accessibilityRole","accessibilityValue","accessibilityLabel","styles","row","children","map","step","index","state","circleColors","colors","labelColor","leadingConnector","trailingConnector","column","connectorRow","backgroundColor","undefined","fill","fontStyleForWeight","fontWeights","semibold","fontSize","fontSizes","sm","color","text","numberOfLines","medium","xs","label","create","flexDirection","alignItems","flex","width"],"sourceRoot":"../../../../src","sources":["modules/stepper/Stepper.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stepper's pure resolvers + the themed/untethemed structural variant resolvers — the same split
|
|
5
|
+
* every sibling module follows (see `Button.variants.ts`):
|
|
6
|
+
* - STRUCTURE (circle diameter, connector height, the pill radius, label spacing) lives in the
|
|
7
|
+
* resolvers below — `createThemedVariants` where a value comes off the theme scale (the circle's
|
|
8
|
+
* `radii.full`, the label's `space[2]` gap), `createVariants` where it doesn't (the connector's
|
|
9
|
+
* own fixed height, same reasoning `RadioGroup.variants.ts` documents for `radioDotStructure`).
|
|
10
|
+
* Both are registered once per identity, never rebuilt per render.
|
|
11
|
+
* - COLOUR is state-driven, never a raw ramp and never a hardcoded hex. A step has no `tone`/
|
|
12
|
+
* `variant` prop to widen — it is one of exactly three states (`resolveStepState`), and every
|
|
13
|
+
* colour it can show is a role lookup off that state (`resolveStepCircleColors`,
|
|
14
|
+
* `resolveStepLabelColor`, `resolveStepConnectorColor`).
|
|
15
|
+
* - ACCESSIBILITY is `resolveStepperAccessibility`, kept pure so the single-summary-announcement
|
|
16
|
+
* contract ("Step 2 of 4: …") is unit-testable without rendering React Native.
|
|
17
|
+
*
|
|
18
|
+
* Free of React and of any lucide import, so the WCAG + behaviour tests import it directly (mocking
|
|
19
|
+
* only `react-native`'s `StyleSheet`, as `core/style` and `Button.variants.ts` do).
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { createThemedVariants, createThemedTextVariants, createVariants } from "../../core/style/index.js";
|
|
23
|
+
/**
|
|
24
|
+
* Visual diameter of a step's numbered circle, in dp. Not a touch target — Stepper is a v1
|
|
25
|
+
* DISPLAY-only component with no `onPress` (no `onStepPress` either — see `StepperProps`), so the
|
|
26
|
+
* 44dp floor other interactive modules hold themselves to (see `Button`'s `MIN_TOUCH_TARGET`) does
|
|
27
|
+
* not apply here, the same reasoning `Badge`/`Avatar` document for their own non-interactive boxes.
|
|
28
|
+
*/
|
|
29
|
+
export const STEP_CIRCLE_DIAMETER = 28;
|
|
30
|
+
|
|
31
|
+
/** The connector line's thickness, in dp. A fixed design constant, not on the theme's border scale. */
|
|
32
|
+
export const CONNECTOR_HEIGHT = 2;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A step is "completed" strictly before `activeStep`, "active" AT `activeStep`, or "upcoming"
|
|
36
|
+
* strictly after it. Pure index arithmetic — no theme dependency — so the render layer and the
|
|
37
|
+
* tests share one source of truth for which of the three states a given index resolves to.
|
|
38
|
+
*/
|
|
39
|
+
export function resolveStepState(index, activeStep) {
|
|
40
|
+
if (index < activeStep) return "completed";
|
|
41
|
+
if (index === activeStep) return "active";
|
|
42
|
+
return "upcoming";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Maps a step's state onto role colours for its circle. Completed and active read IDENTICALLY (per
|
|
46
|
+
* spec — both are "reached" steps): the accent-filled circle with its derived on-colour number.
|
|
47
|
+
* Upcoming reads as the quiet neutral `bg.sunken` fill with the `fg.muted` number. There is no
|
|
48
|
+
* `tone` prop to widen: every colour a step circle can show is one of these two role lookups,
|
|
49
|
+
* guaranteed legible in both modes and never an off-palette value an app invented.
|
|
50
|
+
*/
|
|
51
|
+
export function resolveStepCircleColors(colors, state) {
|
|
52
|
+
if (state === "upcoming") return {
|
|
53
|
+
fill: colors.bg.sunken,
|
|
54
|
+
text: colors.fg.muted
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
fill: colors.accent.solid,
|
|
58
|
+
text: colors.accent.onSolid
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The label below a reached step (completed/active) is the primary `fg.default`; an upcoming
|
|
64
|
+
* step's label is the quieter `fg.muted` — mirroring the same reached/upcoming split the circle
|
|
65
|
+
* uses, so the label's emphasis never contradicts its circle. Both rungs are already measured
|
|
66
|
+
* against `bg.canvas` elsewhere in this library (`Input`/`Select`/`Textarea` for `fg.muted`), and
|
|
67
|
+
* `Stepper.test.ts` measures them again here, for this component's own actual pairing.
|
|
68
|
+
*/
|
|
69
|
+
export function resolveStepLabelColor(colors, state) {
|
|
70
|
+
return state === "upcoming" ? colors.fg.muted : colors.fg.default;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The connector segment between step `index` and step `index + 1`: solid accent up to (and
|
|
75
|
+
* including the approach into) the active step, the neutral decorative `border.default` beyond it —
|
|
76
|
+
* matching the spec's "accent.solid up to the active step, border.default beyond it". Split into
|
|
77
|
+
* two identically-coloured halves by `Stepper.tsx` (the trailing half of column `index`, the
|
|
78
|
+
* leading half of column `index + 1`) so the circle stays centered under its label regardless of
|
|
79
|
+
* label length — this function only ever answers for ONE logical segment, so both halves agree.
|
|
80
|
+
*/
|
|
81
|
+
export function resolveStepConnectorColor(colors, index, activeStep) {
|
|
82
|
+
return index < activeStep ? colors.accent.solid : colors.border.default;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Derives ONE summary announcement for the whole stepper — "Step 2 of 4: <label>" — instead of
|
|
86
|
+
* letting a screen reader step through every circle and label individually (kept pure so the
|
|
87
|
+
* wording is unit-tested without a renderer; `Stepper.tsx` pairs this with `accessible` on the
|
|
88
|
+
* container, the same collapsing idiom `Badge` uses for its icon + label). `activeStep` is
|
|
89
|
+
* 0-indexed internally; the announcement surfaces the natural 1-based ordinal, and
|
|
90
|
+
* `accessibilityValue` surfaces the raw 0-indexed `min`/`max`/`now` progress triple.
|
|
91
|
+
*/
|
|
92
|
+
export function resolveStepperAccessibility(input) {
|
|
93
|
+
const {
|
|
94
|
+
steps,
|
|
95
|
+
activeStep
|
|
96
|
+
} = input;
|
|
97
|
+
const activeLabel = steps[activeStep]?.label;
|
|
98
|
+
const summary = `Step ${activeStep + 1} of ${steps.length}` + (activeLabel === undefined ? "" : `: ${activeLabel}`);
|
|
99
|
+
return {
|
|
100
|
+
accessibilityRole: "progressbar",
|
|
101
|
+
accessibilityValue: {
|
|
102
|
+
min: 0,
|
|
103
|
+
max: Math.max(steps.length - 1, 0),
|
|
104
|
+
now: activeStep
|
|
105
|
+
},
|
|
106
|
+
accessibilityLabel: summary
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The numbered circle's structure — diameter + full radius, the same `radii.full` idiom `Avatar`
|
|
112
|
+
* uses (a finite 9999, not `Infinity` — RN rejects non-finite style values) to clip a square box to
|
|
113
|
+
* a perfect circle. No colour (state-driven, applied inline over this), so this compiles once per
|
|
114
|
+
* theme identity via the `WeakMap`-cached themed resolver and never rebuilds per render.
|
|
115
|
+
*/
|
|
116
|
+
export const stepCircleStructure = createThemedVariants(theme => ({
|
|
117
|
+
base: {
|
|
118
|
+
width: STEP_CIRCLE_DIAMETER,
|
|
119
|
+
height: STEP_CIRCLE_DIAMETER,
|
|
120
|
+
borderRadius: theme.radii.full,
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
justifyContent: "center"
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
|
|
126
|
+
/** The label's gap under its circle — on the theme's spacing scale, so it's themed. */
|
|
127
|
+
export const stepLabelStructure = createThemedTextVariants(theme => ({
|
|
128
|
+
base: {
|
|
129
|
+
marginTop: theme.space[2],
|
|
130
|
+
textAlign: "center"
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* One connector half's structure — a flex-filled hairline. `CONNECTOR_HEIGHT` has no theme
|
|
136
|
+
* dependency (the component's own fixed design constant, not on the theme's border scale), so this
|
|
137
|
+
* uses the untethemed `createVariants` rather than `createThemedVariants` — same reasoning
|
|
138
|
+
* `RadioGroup.variants.ts` documents for `radioDotStructure`.
|
|
139
|
+
*/
|
|
140
|
+
export const stepConnectorLineStructure = createVariants({
|
|
141
|
+
base: {
|
|
142
|
+
flex: 1,
|
|
143
|
+
height: CONNECTOR_HEIGHT
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
//# sourceMappingURL=Stepper.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","createThemedTextVariants","createVariants","STEP_CIRCLE_DIAMETER","CONNECTOR_HEIGHT","resolveStepState","index","activeStep","resolveStepCircleColors","colors","state","fill","bg","sunken","text","fg","muted","accent","solid","onSolid","resolveStepLabelColor","default","resolveStepConnectorColor","border","resolveStepperAccessibility","input","steps","activeLabel","label","summary","length","undefined","accessibilityRole","accessibilityValue","min","max","Math","now","accessibilityLabel","stepCircleStructure","theme","base","width","height","borderRadius","radii","full","alignItems","justifyContent","stepLabelStructure","marginTop","space","textAlign","stepConnectorLineStructure","flex"],"sourceRoot":"../../../../src","sources":["modules/stepper/Stepper.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,EAAEC,wBAAwB,EAAEC,cAAc,QAAQ,2BAAkB;AAIjG;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAG,EAAE;;AAEtC;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,KAAa,EAAEC,UAAkB,EAAa;EAC7E,IAAID,KAAK,GAAGC,UAAU,EAAE,OAAO,WAAW;EAC1C,IAAID,KAAK,KAAKC,UAAU,EAAE,OAAO,QAAQ;EACzC,OAAO,UAAU;AACnB;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,MAAkB,EAAEC,KAAgB,EAAoB;EAC9F,IAAIA,KAAK,KAAK,UAAU,EAAE,OAAO;IAAEC,IAAI,EAAEF,MAAM,CAACG,EAAE,CAACC,MAAM;IAAEC,IAAI,EAAEL,MAAM,CAACM,EAAE,CAACC;EAAM,CAAC;EAClF,OAAO;IAAEL,IAAI,EAAEF,MAAM,CAACQ,MAAM,CAACC,KAAK;IAAEJ,IAAI,EAAEL,MAAM,CAACQ,MAAM,CAACE;EAAQ,CAAC;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACX,MAAkB,EAAEC,KAAgB,EAAU;EAClF,OAAOA,KAAK,KAAK,UAAU,GAAGD,MAAM,CAACM,EAAE,CAACC,KAAK,GAAGP,MAAM,CAACM,EAAE,CAACM,OAAO;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAACb,MAAkB,EAAEH,KAAa,EAAEC,UAAkB,EAAU;EACvG,OAAOD,KAAK,GAAGC,UAAU,GAAGE,MAAM,CAACQ,MAAM,CAACC,KAAK,GAAGT,MAAM,CAACc,MAAM,CAACF,OAAO;AACzE;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,2BAA2BA,CAACC,KAAgC,EAA6B;EACvG,MAAM;IAAEC,KAAK;IAAEnB;EAAW,CAAC,GAAGkB,KAAK;EACnC,MAAME,WAAW,GAAGD,KAAK,CAACnB,UAAU,CAAC,EAAEqB,KAAK;EAC5C,MAAMC,OAAO,GACX,QAAQtB,UAAU,GAAG,CAAC,OAAOmB,KAAK,CAACI,MAAM,EAAE,IAAIH,WAAW,KAAKI,SAAS,GAAG,EAAE,GAAG,KAAKJ,WAAW,EAAE,CAAC;EACrG,OAAO;IACLK,iBAAiB,EAAE,aAAa;IAChCC,kBAAkB,EAAE;MAAEC,GAAG,EAAE,CAAC;MAAEC,GAAG,EAAEC,IAAI,CAACD,GAAG,CAACT,KAAK,CAACI,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;MAAEO,GAAG,EAAE9B;IAAW,CAAC;IACnF+B,kBAAkB,EAAET;EACtB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,mBAAmB,GAAGvC,oBAAoB,CAAEwC,KAAY,KAAM;EACzEC,IAAI,EAAE;IACJC,KAAK,EAAEvC,oBAAoB;IAC3BwC,MAAM,EAAExC,oBAAoB;IAC5ByC,YAAY,EAAEJ,KAAK,CAACK,KAAK,CAACC,IAAI;IAC9BC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC,CAAC;;AAEH;AACA,OAAO,MAAMC,kBAAkB,GAAGhD,wBAAwB,CAAEuC,KAAY,KAAM;EAC5EC,IAAI,EAAE;IACJS,SAAS,EAAEV,KAAK,CAACW,KAAK,CAAC,CAAC,CAAC;IACzBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAGnD,cAAc,CAAC;EACvDuC,IAAI,EAAE;IAAEa,IAAI,EAAE,CAAC;IAAEX,MAAM,EAAEvC;EAAiB;AAC5C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/stepper`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveStepState`, `stepCircleStructure`, …) stay
|
|
6
|
+
* internal — a consumer configures a Stepper through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Stepper } from "./Stepper.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Stepper"],"sourceRoot":"../../../../src","sources":["modules/stepper/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAW","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# switch/ — a themed wrapper over React Native's native Switch
|
|
2
|
+
|
|
3
|
+
`Switch` re-themes React Native's own `<Switch>` rather than hand-building a track/thumb — the
|
|
4
|
+
native primitive already ships correct per-platform toggle semantics, so this module only maps its
|
|
5
|
+
two colours onto ROLE tokens and leaves sizing/animation to RN.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
| File | Role |
|
|
10
|
+
|------|------|
|
|
11
|
+
| `Switch.tsx` | The component. Wraps RN's `Switch`, wires theme colours + accessibility + `hitSlop`. |
|
|
12
|
+
| `Switch.variants.ts` | Pure resolvers (`resolveSwitchColors`, `resolveSwitchAccessibility`) + the `SWITCH_HIT_SLOP` touch-target constant. No React. |
|
|
13
|
+
| `index.ts` | Public surface: `Switch`, `SwitchProps`. |
|
|
14
|
+
| `__tests__/Switch.test.ts` | Pure: WCAG non-text contrast (all brands × modes) + touch target + a11y contract. |
|
|
15
|
+
| `__tests__/Switch.render.test.tsx` | Render: on/off → `accessibilityState.checked`, disabled wiring, toggle calls `onValueChange`. |
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Notes |
|
|
20
|
+
|------|------|---------|-------|
|
|
21
|
+
| `value` | `boolean` | — | Required. Controlled — RN's own controlled-component contract. |
|
|
22
|
+
| `onValueChange` | `(value: boolean) => void` | — | Required. |
|
|
23
|
+
| `disabled` | `boolean` | `false` | Blocks toggling; RN renders its own native disabled treatment. |
|
|
24
|
+
| `accessibilityLabel` | `string` | — | **Required** — a switch never renders visible text, so this is the only accessible name (mirrors `Button`'s icon-only contract). |
|
|
25
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once. |
|
|
26
|
+
| `testID` | `string` | — | |
|
|
27
|
+
|
|
28
|
+
No `size` prop — RN's `Switch` is a native primitive with an intrinsic size that doesn't scale
|
|
29
|
+
cleanly. No `variant`/`tone` either: a switch has exactly one on/off visual language, so there is
|
|
30
|
+
nothing to close a union over.
|
|
31
|
+
|
|
32
|
+
## Accessibility contract (WCAG)
|
|
33
|
+
|
|
34
|
+
- **1.4.11 (non-text contrast)** — both track colours clear ≥3:1 against the canvas, and the
|
|
35
|
+
single thumb colour clears ≥3:1 against BOTH track colours, measured for all 8 brands × both
|
|
36
|
+
modes (`__tests__/Switch.test.ts`). `thumbColor` is `bg.canvas` alone — not `fg.default`, which
|
|
37
|
+
measured as low as 1.16:1 against the off-track on several brands despite looking plausible
|
|
38
|
+
unmeasured; `bg.canvas` clears ≥3:1 against both tracks on every brand × mode.
|
|
39
|
+
- **2.5.x target size** — RN's `Switch` has an intrinsic height shorter than 44dp (51×31pt on iOS,
|
|
40
|
+
the smaller of the two platforms), so `SWITCH_HIT_SLOP` (7dp symmetric) expands it to the 44dp
|
|
41
|
+
floor — same `hitSlop` pattern as `Button`.
|
|
42
|
+
- `accessibilityRole="switch"`, `accessibilityState={{ checked: value, disabled }}` — RN's own
|
|
43
|
+
`Switch` defaults the role but never sets `checked` itself, so `resolveSwitchAccessibility` sets
|
|
44
|
+
both explicitly rather than relying on the native default.
|
|
45
|
+
- **2.3.3 (reduced motion)** — N/A. This module adds no JS-driven animation; the thumb slide is
|
|
46
|
+
native platform animation this wrapper doesn't control (unlike `Button`'s own press-fade).
|
|
47
|
+
|
|
48
|
+
## Patterns
|
|
49
|
+
|
|
50
|
+
1. **Colour, not structure.** There is no custom sizing/spacing to register via
|
|
51
|
+
`createThemedVariants` — RN's `Switch` has no configurable height/padding/radius/border-width of
|
|
52
|
+
its own, so nothing needs a structural variant here. Colour is the only themed surface
|
|
53
|
+
(`resolveSwitchColors`), resolved via `useThemeColors()` — the raw-string escape hatch, since
|
|
54
|
+
`trackColor`/`thumbColor` (like `placeholderTextColor`) accept no token object.
|
|
55
|
+
2. **Pure, testable resolvers** in `Switch.variants.ts`, mirroring `Button`'s split.
|
|
56
|
+
3. **No disabled dimming layered on top** — RN's native `Switch` already renders its own
|
|
57
|
+
per-platform disabled treatment; an extra opacity would double up rather than help.
|
|
58
|
+
|
|
59
|
+
## Known gaps
|
|
60
|
+
|
|
61
|
+
None.
|
|
62
|
+
|
|
63
|
+
## Performance
|
|
64
|
+
|
|
65
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Its only child is RN's own `<Switch>` (host-level primitive) — nothing to memoize.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Switch — a thin themed wrapper over React Native's own `<Switch>`. The native primitive already
|
|
5
|
+
* ships correct per-platform accessibility semantics (a real toggle control, not a hand-built
|
|
6
|
+
* track/thumb), so this module re-themes its two colours from ROLE tokens and leaves sizing/shape
|
|
7
|
+
* to RN — which is also why there is no `size` prop.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { memo } from "react";
|
|
11
|
+
import { Switch as RNSwitch } from "react-native";
|
|
12
|
+
import { useThemeColors } from "../../theme/index.js";
|
|
13
|
+
import { resolveSwitchAccessibility, resolveSwitchColors, SWITCH_HIT_SLOP } from "./Switch.variants.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
export const Switch = /*#__PURE__*/memo(function Switch({
|
|
16
|
+
value,
|
|
17
|
+
onValueChange,
|
|
18
|
+
disabled = false,
|
|
19
|
+
accessibilityLabel,
|
|
20
|
+
style,
|
|
21
|
+
testID
|
|
22
|
+
}) {
|
|
23
|
+
// `trackColor`/`thumbColor` accept no token object — the same raw-string escape hatch as
|
|
24
|
+
// `placeholderTextColor` — so colour is resolved via `useThemeColors()`, not `useTheme().colors`.
|
|
25
|
+
const colors = useThemeColors();
|
|
26
|
+
const {
|
|
27
|
+
trackOff,
|
|
28
|
+
trackOn,
|
|
29
|
+
thumbColor
|
|
30
|
+
} = resolveSwitchColors(colors);
|
|
31
|
+
const a11y = resolveSwitchAccessibility({
|
|
32
|
+
value,
|
|
33
|
+
disabled
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/_jsx(RNSwitch, {
|
|
36
|
+
testID: testID,
|
|
37
|
+
value: value,
|
|
38
|
+
onValueChange: onValueChange,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
41
|
+
accessibilityLabel: accessibilityLabel,
|
|
42
|
+
accessibilityState: a11y.accessibilityState,
|
|
43
|
+
trackColor: {
|
|
44
|
+
false: trackOff,
|
|
45
|
+
true: trackOn
|
|
46
|
+
},
|
|
47
|
+
thumbColor: thumbColor,
|
|
48
|
+
ios_backgroundColor: trackOff,
|
|
49
|
+
hitSlop: SWITCH_HIT_SLOP,
|
|
50
|
+
style: style
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","Switch","RNSwitch","useThemeColors","resolveSwitchAccessibility","resolveSwitchColors","SWITCH_HIT_SLOP","jsx","_jsx","value","onValueChange","disabled","accessibilityLabel","style","testID","colors","trackOff","trackOn","thumbColor","a11y","accessibilityRole","accessibilityState","trackColor","false","true","ios_backgroundColor","hitSlop"],"sourceRoot":"../../../../src","sources":["modules/switch/Switch.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,MAAM,IAAIC,QAAQ,QAAQ,cAAc;AAGjD,SAASC,cAAc,QAAQ,sBAAa;AAE5C,SAASC,0BAA0B,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBrG,OAAO,MAAMP,MAAM,gBAAGD,IAAI,CAAC,SAASC,MAAMA,CAAC;EACzCQ,KAAK;EACLC,aAAa;EACbC,QAAQ,GAAG,KAAK;EAChBC,kBAAkB;EAClBC,KAAK;EACLC;AACW,CAAC,EAAE;EACd;EACA;EACA,MAAMC,MAAM,GAAGZ,cAAc,CAAC,CAAC;EAC/B,MAAM;IAAEa,QAAQ;IAAEC,OAAO;IAAEC;EAAW,CAAC,GAAGb,mBAAmB,CAACU,MAAM,CAAC;EACrE,MAAMI,IAAI,GAAGf,0BAA0B,CAAC;IAAEK,KAAK;IAAEE;EAAS,CAAC,CAAC;EAE5D,oBACEH,IAAA,CAACN,QAAQ;IACPY,MAAM,EAAEA,MAAO;IACfL,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAC7BC,QAAQ,EAAEA,QAAS;IACnBS,iBAAiB,EAAED,IAAI,CAACC,iBAAkB;IAC1CR,kBAAkB,EAAEA,kBAAmB;IACvCS,kBAAkB,EAAEF,IAAI,CAACE,kBAAmB;IAC5CC,UAAU,EAAE;MAAEC,KAAK,EAAEP,QAAQ;MAAEQ,IAAI,EAAEP;IAAQ,CAAE;IAC/CC,UAAU,EAAEA,UAAW;IACvBO,mBAAmB,EAAET,QAAS;IAC9BU,OAAO,EAAEpB,eAAgB;IACzBO,KAAK,EAAEA;EAAM,CACd,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Switch's pure resolvers — colour + accessibility + the touch-target constant. No React, no
|
|
5
|
+
* lucide, same split as `Button.variants.ts`: the WCAG + behaviour tests import these directly,
|
|
6
|
+
* measuring real palettes instead of eyeballing a hex.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Maps the switch's track + thumb onto ROLE colours — never a hardcoded hex, so it's guaranteed
|
|
11
|
+
* legible in both modes and can never be an off-palette value an app invented.
|
|
12
|
+
*
|
|
13
|
+
* `trackOff` is `border.interactive`, the same proven ≥3:1-on-every-canvas neutral outline token
|
|
14
|
+
* `Button` uses for its outline boundary — not `border.default` (decorative, no contrast
|
|
15
|
+
* guarantee). `thumbColor` is `bg.canvas` alone, not `fg.default`: measured, `fg.default` falls as
|
|
16
|
+
* low as 1.16:1 against `trackOff` on several brands (it reads as a body-text colour, not a
|
|
17
|
+
* non-text UI surface), while `bg.canvas` clears ≥3:1 against BOTH `trackOff` and `trackOn` on
|
|
18
|
+
* every brand × mode — see `__tests__/Switch.test.ts`.
|
|
19
|
+
*/
|
|
20
|
+
export function resolveSwitchColors(colors) {
|
|
21
|
+
return {
|
|
22
|
+
trackOff: colors.border.interactive,
|
|
23
|
+
trackOn: colors.accent.solid,
|
|
24
|
+
thumbColor: colors.bg.canvas
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* RN's own `<Switch>` defaults `accessibilityRole` to `"switch"` but never sets
|
|
29
|
+
* `accessibilityState.checked` itself (only `disabled` is merged in, on Android) — so this module
|
|
30
|
+
* sets both explicitly, kept pure so the contract is testable without rendering React Native.
|
|
31
|
+
*/
|
|
32
|
+
export function resolveSwitchAccessibility(input) {
|
|
33
|
+
return {
|
|
34
|
+
accessibilityRole: "switch",
|
|
35
|
+
accessibilityState: {
|
|
36
|
+
checked: input.value,
|
|
37
|
+
disabled: input.disabled === true
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** WCAG 2.5.5 (AAA) / HIG floor every interactive control is held to — same constant as `Button`. */
|
|
43
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* RN's `Switch` has no `size` prop (a native intrinsic control doesn't scale cleanly), so its
|
|
47
|
+
* visual height is a platform constant rather than something this library chooses. 31 is iOS's
|
|
48
|
+
* exact intrinsic height (51×31pt) — the shorter of the two platforms' native defaults, so sizing
|
|
49
|
+
* the hit-slop off it keeps Android (whose default Material Switch is taller) covered too.
|
|
50
|
+
*/
|
|
51
|
+
export const SWITCH_HEIGHT = 31;
|
|
52
|
+
const slop = Math.max(0, Math.ceil((MIN_TOUCH_TARGET - SWITCH_HEIGHT) / 2));
|
|
53
|
+
|
|
54
|
+
/** Symmetric touch expansion so `SWITCH_HEIGHT + 2·slop ≥ 44`, same `hitSlop` pattern as `Button`. */
|
|
55
|
+
export const SWITCH_HIT_SLOP = {
|
|
56
|
+
top: slop,
|
|
57
|
+
bottom: slop,
|
|
58
|
+
left: slop,
|
|
59
|
+
right: slop
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=Switch.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveSwitchColors","colors","trackOff","border","interactive","trackOn","accent","solid","thumbColor","bg","canvas","resolveSwitchAccessibility","input","accessibilityRole","accessibilityState","checked","value","disabled","MIN_TOUCH_TARGET","SWITCH_HEIGHT","slop","Math","max","ceil","SWITCH_HIT_SLOP","top","bottom","left","right"],"sourceRoot":"../../../../src","sources":["modules/switch/Switch.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mBAAmBA,CAACC,MAAkB,EAAgB;EACpE,OAAO;IACLC,QAAQ,EAAED,MAAM,CAACE,MAAM,CAACC,WAAW;IACnCC,OAAO,EAAEJ,MAAM,CAACK,MAAM,CAACC,KAAK;IAC5BC,UAAU,EAAEP,MAAM,CAACQ,EAAE,CAACC;EACxB,CAAC;AACH;AAYA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAACC,KAA+B,EAA4B;EACpG,OAAO;IACLC,iBAAiB,EAAE,QAAQ;IAC3BC,kBAAkB,EAAE;MAAEC,OAAO,EAAEH,KAAK,CAACI,KAAK;MAAEC,QAAQ,EAAEL,KAAK,CAACK,QAAQ,KAAK;IAAK;EAChF,CAAC;AACH;;AAEA;AACA,OAAO,MAAMC,gBAAgB,GAAG,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,EAAE;AAE/B,MAAMC,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,IAAI,CAAC,CAACL,gBAAgB,GAAGC,aAAa,IAAI,CAAC,CAAC,CAAC;;AAE3E;AACA,OAAO,MAAMK,eAAe,GAAG;EAAEC,GAAG,EAAEL,IAAI;EAAEM,MAAM,EAAEN,IAAI;EAAEO,IAAI,EAAEP,IAAI;EAAEQ,KAAK,EAAER;AAAK,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/switch`. Value and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveSwitchColors`, `SWITCH_HIT_SLOP`, …) stay
|
|
6
|
+
* internal — a consumer configures a Switch through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Switch } from "./Switch.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Switch"],"sourceRoot":"../../../../src","sources":["modules/switch/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,aAAU","ignoreList":[]}
|