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,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Select — a trigger styled like an Input box (same size/border/focus-ring conventions) that opens
|
|
5
|
+
* an option list in React Native's OWN `Modal`. Imported directly from `"react-native"` here on
|
|
6
|
+
* purpose: this module must never depend on the library's own `Modal` COMPONENT (its rendered
|
|
7
|
+
* output/behaviour) — Select still owns its option list's markup outright.
|
|
8
|
+
*
|
|
9
|
+
* The one deliberate exception is the web portal mechanism: `ModalPortalContext`/`renderWebPortal`
|
|
10
|
+
* are a plain context + a stateless helper with no React-tree footprint of their own (not the
|
|
11
|
+
* `Modal` component), so Select reads the same ones `Modal.tsx` reads to stay consistent once a
|
|
12
|
+
* consumer opts in via `ModalPortalProvider` — see `../modal/ModalPortalContext.ts`.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { memo, useContext, useState } from "react";
|
|
16
|
+
import { Modal, Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
17
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
18
|
+
import { Icon } from "../../core/icon/index.js";
|
|
19
|
+
import { useTheme } from "../../theme/index.js";
|
|
20
|
+
import { ModalPortalContext } from "../modal/ModalPortalContext.js";
|
|
21
|
+
import { renderWebPortal } from "../modal/renderWebPortal";
|
|
22
|
+
import { resolveSelectAccessibility, resolveSelectRowColors, resolveSelectTriggerColors, SELECT_ROW_ICON_SIZE, SELECT_SIZES, selectOverlayStructure, selectRowStructure, selectSheetStructure, selectTriggerStructure } from "./Select.variants.js";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
const ICON_STROKE = 2;
|
|
25
|
+
// Decorative dismiss scrim behind the sheet — a design constant, not a role token: it is neither
|
|
26
|
+
// text nor an interactive boundary, so WCAG's contrast minimums don't apply to it.
|
|
27
|
+
const BACKDROP_SCRIM = "#00000099";
|
|
28
|
+
export const Select = /*#__PURE__*/memo(function Select({
|
|
29
|
+
options,
|
|
30
|
+
value,
|
|
31
|
+
onValueChange,
|
|
32
|
+
placeholder,
|
|
33
|
+
label,
|
|
34
|
+
disabled = false,
|
|
35
|
+
size = "md",
|
|
36
|
+
containerStyle,
|
|
37
|
+
testID
|
|
38
|
+
}) {
|
|
39
|
+
const theme = useTheme();
|
|
40
|
+
const reducedMotion = useReducedMotion();
|
|
41
|
+
const portalContainer = useContext(ModalPortalContext);
|
|
42
|
+
const [open, setOpen] = useState(false);
|
|
43
|
+
const [focused, setFocused] = useState(false);
|
|
44
|
+
const spec = SELECT_SIZES[size];
|
|
45
|
+
const selectedOption = options.find(option => option.value === value);
|
|
46
|
+
const isPlaceholder = selectedOption === undefined;
|
|
47
|
+
const displayText = selectedOption?.label ?? placeholder ?? "";
|
|
48
|
+
const triggerColors = resolveSelectTriggerColors(theme.colors, focused || open);
|
|
49
|
+
const rowColors = resolveSelectRowColors(theme.colors);
|
|
50
|
+
const a11y = resolveSelectAccessibility({
|
|
51
|
+
disabled,
|
|
52
|
+
open
|
|
53
|
+
});
|
|
54
|
+
const accessibleName = label !== undefined ? displayText ? `${label}, ${displayText}` : label : undefined;
|
|
55
|
+
const openMenu = () => {
|
|
56
|
+
if (disabled) return;
|
|
57
|
+
setOpen(true);
|
|
58
|
+
};
|
|
59
|
+
const closeMenu = () => setOpen(false);
|
|
60
|
+
const selectOption = option => {
|
|
61
|
+
onValueChange(option.value);
|
|
62
|
+
closeMenu();
|
|
63
|
+
};
|
|
64
|
+
const sheet = /*#__PURE__*/_jsxs(_Fragment, {
|
|
65
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
66
|
+
testID: testID ? `${testID}-backdrop` : undefined,
|
|
67
|
+
accessible: false,
|
|
68
|
+
style: [StyleSheet.absoluteFill, {
|
|
69
|
+
backgroundColor: BACKDROP_SCRIM
|
|
70
|
+
}],
|
|
71
|
+
onPress: closeMenu
|
|
72
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
73
|
+
style: selectOverlayStructure(theme),
|
|
74
|
+
pointerEvents: "box-none",
|
|
75
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
76
|
+
style: [selectSheetStructure(theme), {
|
|
77
|
+
backgroundColor: theme.colors.bg.surface
|
|
78
|
+
}],
|
|
79
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
80
|
+
bounces: false,
|
|
81
|
+
children: options.map(option => {
|
|
82
|
+
const selected = option.value === value;
|
|
83
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
84
|
+
testID: testID ? `${testID}-option-${option.value}` : undefined,
|
|
85
|
+
accessibilityRole: "menuitem",
|
|
86
|
+
accessibilityState: {
|
|
87
|
+
selected
|
|
88
|
+
},
|
|
89
|
+
onPress: () => selectOption(option),
|
|
90
|
+
style: [selectRowStructure(theme), {
|
|
91
|
+
backgroundColor: rowColors.background
|
|
92
|
+
}],
|
|
93
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
94
|
+
numberOfLines: 1,
|
|
95
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
96
|
+
flex: 1,
|
|
97
|
+
fontSize: theme.fontSizes.md,
|
|
98
|
+
color: rowColors.text
|
|
99
|
+
}],
|
|
100
|
+
children: option.label
|
|
101
|
+
}), selected && /*#__PURE__*/_jsx(Icon, {
|
|
102
|
+
name: "check",
|
|
103
|
+
size: SELECT_ROW_ICON_SIZE,
|
|
104
|
+
color: rowColors.icon,
|
|
105
|
+
strokeWidth: ICON_STROKE
|
|
106
|
+
})]
|
|
107
|
+
}, option.value);
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
})]
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Web portal opt-in — see Modal.tsx's identical branch + ModalPortalContext.ts. Every other case
|
|
115
|
+
// (native, or web with no ModalPortalProvider) renders through RN's own <Modal> below, unchanged.
|
|
116
|
+
const menu = Platform.OS === "web" && portalContainer != null ? open ? renderWebPortal(/*#__PURE__*/_jsx(View, {
|
|
117
|
+
style: StyleSheet.absoluteFill,
|
|
118
|
+
pointerEvents: "box-none",
|
|
119
|
+
children: sheet
|
|
120
|
+
}), portalContainer) : null : /*#__PURE__*/_jsx(Modal, {
|
|
121
|
+
visible: open,
|
|
122
|
+
transparent: true,
|
|
123
|
+
animationType: reducedMotion ? "none" : "fade",
|
|
124
|
+
onRequestClose: closeMenu,
|
|
125
|
+
children: sheet
|
|
126
|
+
});
|
|
127
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
128
|
+
style: [styles.container, containerStyle],
|
|
129
|
+
children: [label !== undefined && /*#__PURE__*/_jsx(Text, {
|
|
130
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.medium), {
|
|
131
|
+
fontSize: theme.fontSizes.sm,
|
|
132
|
+
color: theme.colors.fg.muted,
|
|
133
|
+
marginBottom: theme.space[1]
|
|
134
|
+
}],
|
|
135
|
+
children: label
|
|
136
|
+
}), /*#__PURE__*/_jsxs(Pressable, {
|
|
137
|
+
testID: testID,
|
|
138
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
139
|
+
accessibilityLabel: accessibleName,
|
|
140
|
+
accessibilityState: a11y.accessibilityState,
|
|
141
|
+
disabled: a11y.disabled,
|
|
142
|
+
onPress: openMenu,
|
|
143
|
+
onFocus: () => setFocused(true),
|
|
144
|
+
onBlur: () => setFocused(false),
|
|
145
|
+
hitSlop: spec.hitSlop,
|
|
146
|
+
style: [selectTriggerStructure(theme, {
|
|
147
|
+
size
|
|
148
|
+
}), {
|
|
149
|
+
backgroundColor: triggerColors.background,
|
|
150
|
+
borderColor: triggerColors.border
|
|
151
|
+
}, disabled && styles.dimmed],
|
|
152
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
153
|
+
numberOfLines: 1,
|
|
154
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
155
|
+
flexShrink: 1,
|
|
156
|
+
fontSize: spec.fontSize,
|
|
157
|
+
color: isPlaceholder ? triggerColors.placeholder : triggerColors.text
|
|
158
|
+
}],
|
|
159
|
+
children: displayText
|
|
160
|
+
}), /*#__PURE__*/_jsx(Icon, {
|
|
161
|
+
name: "chevron-down",
|
|
162
|
+
size: spec.iconSize,
|
|
163
|
+
color: triggerColors.icon,
|
|
164
|
+
strokeWidth: ICON_STROKE
|
|
165
|
+
})]
|
|
166
|
+
}), menu]
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
const styles = StyleSheet.create({
|
|
170
|
+
container: {
|
|
171
|
+
alignSelf: "stretch"
|
|
172
|
+
},
|
|
173
|
+
// A disabled control is exempt from the contrast minimum (WCAG 1.4.3), so a uniform dim is correct.
|
|
174
|
+
dimmed: {
|
|
175
|
+
opacity: 0.5
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useContext","useState","Modal","Platform","Pressable","ScrollView","StyleSheet","Text","View","useReducedMotion","Icon","useTheme","ModalPortalContext","renderWebPortal","resolveSelectAccessibility","resolveSelectRowColors","resolveSelectTriggerColors","SELECT_ROW_ICON_SIZE","SELECT_SIZES","selectOverlayStructure","selectRowStructure","selectSheetStructure","selectTriggerStructure","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ICON_STROKE","BACKDROP_SCRIM","Select","options","value","onValueChange","placeholder","label","disabled","size","containerStyle","testID","theme","reducedMotion","portalContainer","open","setOpen","focused","setFocused","spec","selectedOption","find","option","isPlaceholder","undefined","displayText","triggerColors","colors","rowColors","a11y","accessibleName","openMenu","closeMenu","selectOption","sheet","children","accessible","style","absoluteFill","backgroundColor","onPress","pointerEvents","bg","surface","bounces","map","selected","accessibilityRole","accessibilityState","background","numberOfLines","fontStyleForWeight","fontWeights","regular","flex","fontSize","fontSizes","md","color","text","name","icon","strokeWidth","menu","OS","visible","transparent","animationType","onRequestClose","styles","container","medium","sm","fg","muted","marginBottom","space","accessibilityLabel","onFocus","onBlur","hitSlop","borderColor","border","dimmed","flexShrink","iconSize","create","alignSelf","opacity"],"sourceRoot":"../../../../src","sources":["modules/select/Select.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE7F,SAASC,gBAAgB,QAAQ,0BAAiB;AAClD,SAASC,IAAI,QAAQ,0BAAiB;AAEtC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,kBAAkB,QAAQ,gCAA6B;AAChE,SAASC,eAAe,QAAQ,0BAA0B;AAE1D,SACEC,0BAA0B,EAC1BC,sBAAsB,EACtBC,0BAA0B,EAC1BC,oBAAoB,EACpBC,YAAY,EACZC,sBAAsB,EACtBC,kBAAkB,EAClBC,oBAAoB,EACpBC,sBAAsB,QACjB,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAqB3B,MAAMC,WAAW,GAAG,CAAC;AACrB;AACA;AACA,MAAMC,cAAc,GAAG,WAAW;AAElC,OAAO,MAAMC,MAAM,gBAAGhC,IAAI,CAAC,SAASgC,MAAMA,CAAC;EACzCC,OAAO;EACPC,KAAK;EACLC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,QAAQ,GAAG,KAAK;EAChBC,IAAI,GAAG,IAAI;EACXC,cAAc;EACdC;AACW,CAAC,EAAE;EACd,MAAMC,KAAK,GAAG9B,QAAQ,CAAC,CAAC;EACxB,MAAM+B,aAAa,GAAGjC,gBAAgB,CAAC,CAAC;EACxC,MAAMkC,eAAe,GAAG3C,UAAU,CAACY,kBAAkB,CAAC;EACtD,MAAM,CAACgC,IAAI,EAAEC,OAAO,CAAC,GAAG5C,QAAQ,CAAC,K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;QAAC3B,KAAK,EAAEhC,aAAa,CAACmC,IAAK;QAACC,WAAW,EAAE9D;MAAY,CAAE,CAAC;IAAA,CAC7F,CAAC,EAEX+D,IAAI;EAAA,CACD,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMM,MAAM,GAAG5F,UAAU,CAAC6G,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IAAEiB,SAAS,EAAE;EAAU,CAAC;EACnC;EACAJ,MAAM,EAAE;IAAEK,OAAO,EAAE;EAAI;AACzB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Select's style + behaviour resolution — mirrors `Button.variants.ts`'s split:
|
|
5
|
+
* - STRUCTURE (sizing/spacing off the theme scale) lives in the `createThemedVariants` resolvers
|
|
6
|
+
* below — static per (brand, mode), registered once.
|
|
7
|
+
* - COLOUR is resolved from the theme's ROLE colours (never a raw ramp, never a hardcoded hex) by
|
|
8
|
+
* `resolveSelectTriggerColors` / `resolveSelectRowColors`.
|
|
9
|
+
* - ACCESSIBILITY prop derivation is `resolveSelectAccessibility`, kept pure so the "disabled blocks
|
|
10
|
+
* opening / expanded tracks the menu" contract is unit-testable without rendering React Native.
|
|
11
|
+
*
|
|
12
|
+
* Free of React and of any `Modal`/`Pressable` import, so the WCAG + behaviour tests import it
|
|
13
|
+
* directly (mocking only `react-native`'s `StyleSheet`, as `core/style` does).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
17
|
+
/** Same touch-target floor as Button (44dp — Apple HIG minimum, WCAG 2.5.5 AAA). */
|
|
18
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
19
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
20
|
+
export const SELECT_SIZES = {
|
|
21
|
+
sm: {
|
|
22
|
+
height: 32,
|
|
23
|
+
fontSize: 14,
|
|
24
|
+
iconSize: 16,
|
|
25
|
+
hitSlop: slopFor(32)
|
|
26
|
+
},
|
|
27
|
+
md: {
|
|
28
|
+
height: 40,
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
iconSize: 18,
|
|
31
|
+
hitSlop: slopFor(40)
|
|
32
|
+
},
|
|
33
|
+
lg: {
|
|
34
|
+
height: 48,
|
|
35
|
+
fontSize: 18,
|
|
36
|
+
iconSize: 20,
|
|
37
|
+
hitSlop: slopFor(48)
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Minimum height for an option row — a list item is still an interactive target (WCAG 2.5.8). */
|
|
42
|
+
export const SELECT_ROW_MIN_HEIGHT = 44;
|
|
43
|
+
|
|
44
|
+
/** The "check" glyph beside the active row. Fixed — independent of the trigger's own `size`. */
|
|
45
|
+
export const SELECT_ROW_ICON_SIZE = 18;
|
|
46
|
+
/**
|
|
47
|
+
* Maps trigger state onto role colours — the reason `size`/no free-form colour prop keeps this
|
|
48
|
+
* closed. `focused` covers both keyboard/AT focus and the menu being open (visually the same cue).
|
|
49
|
+
* Disabled is NOT a separate colour branch: like Button, a disabled control is exempt from the
|
|
50
|
+
* contrast minimum (WCAG 1.4.3) and is signalled by a uniform opacity dim instead.
|
|
51
|
+
*/
|
|
52
|
+
export function resolveSelectTriggerColors(colors, focused) {
|
|
53
|
+
return {
|
|
54
|
+
background: colors.bg.surface,
|
|
55
|
+
border: focused ? colors.border.focus : colors.border.interactive,
|
|
56
|
+
text: colors.fg.default,
|
|
57
|
+
placeholder: colors.fg.muted,
|
|
58
|
+
icon: colors.fg.muted
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function resolveSelectRowColors(colors) {
|
|
62
|
+
return {
|
|
63
|
+
background: colors.bg.surface,
|
|
64
|
+
text: colors.fg.default,
|
|
65
|
+
icon: colors.fg.default
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Derives the trigger's accessibility surface once, purely: `expanded` tracks whether the option
|
|
70
|
+
* list is showing (WCAG 4.1.2 — a collapsible control must expose its expanded/collapsed state),
|
|
71
|
+
* and `disabled` blocks the menu from opening at all.
|
|
72
|
+
*/
|
|
73
|
+
export function resolveSelectAccessibility(input) {
|
|
74
|
+
const disabled = input.disabled === true;
|
|
75
|
+
return {
|
|
76
|
+
accessibilityRole: "button",
|
|
77
|
+
accessibilityState: {
|
|
78
|
+
disabled,
|
|
79
|
+
expanded: input.open
|
|
80
|
+
},
|
|
81
|
+
disabled
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Structural styles only — layout, height, padding, radius, border WIDTH. No colours (tone-driven,
|
|
87
|
+
* applied inline over this), so this compiles once per theme identity via the themed resolver.
|
|
88
|
+
*/
|
|
89
|
+
export const selectTriggerStructure = createThemedVariants(theme => ({
|
|
90
|
+
base: {
|
|
91
|
+
flexDirection: "row",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
justifyContent: "space-between",
|
|
94
|
+
columnGap: theme.space[2],
|
|
95
|
+
borderRadius: theme.radii.base,
|
|
96
|
+
borderWidth: theme.borderWidths.thin
|
|
97
|
+
},
|
|
98
|
+
variants: {
|
|
99
|
+
size: {
|
|
100
|
+
sm: {
|
|
101
|
+
height: SELECT_SIZES.sm.height,
|
|
102
|
+
paddingHorizontal: theme.space[3]
|
|
103
|
+
},
|
|
104
|
+
md: {
|
|
105
|
+
height: SELECT_SIZES.md.height,
|
|
106
|
+
paddingHorizontal: theme.space[4]
|
|
107
|
+
},
|
|
108
|
+
lg: {
|
|
109
|
+
height: SELECT_SIZES.lg.height,
|
|
110
|
+
paddingHorizontal: theme.space[6]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
size: "md"
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
|
|
119
|
+
/** The full-screen overlay the sheet centers in. `box-none` (applied by the component) lets a tap
|
|
120
|
+
* on its empty padding fall through to the backdrop press underneath. */
|
|
121
|
+
export const selectOverlayStructure = createThemedVariants(theme => ({
|
|
122
|
+
base: {
|
|
123
|
+
flex: 1,
|
|
124
|
+
justifyContent: "center",
|
|
125
|
+
paddingHorizontal: theme.space[6]
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
export const selectSheetStructure = createThemedVariants(theme => ({
|
|
129
|
+
base: {
|
|
130
|
+
borderRadius: theme.radii.base,
|
|
131
|
+
paddingVertical: theme.space[2],
|
|
132
|
+
maxHeight: 320,
|
|
133
|
+
...theme.elevation.lg
|
|
134
|
+
}
|
|
135
|
+
}));
|
|
136
|
+
export const selectRowStructure = createThemedVariants(theme => ({
|
|
137
|
+
base: {
|
|
138
|
+
flexDirection: "row",
|
|
139
|
+
alignItems: "center",
|
|
140
|
+
justifyContent: "space-between",
|
|
141
|
+
minHeight: SELECT_ROW_MIN_HEIGHT,
|
|
142
|
+
columnGap: theme.space[2],
|
|
143
|
+
paddingHorizontal: theme.space[4]
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
//# sourceMappingURL=Select.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","SELECT_SIZES","sm","fontSize","iconSize","hitSlop","md","lg","SELECT_ROW_MIN_HEIGHT","SELECT_ROW_ICON_SIZE","resolveSelectTriggerColors","colors","focused","background","bg","surface","border","focus","interactive","text","fg","default","placeholder","muted","icon","resolveSelectRowColors","resolveSelectAccessibility","input","disabled","accessibilityRole","accessibilityState","expanded","open","selectTriggerStructure","theme","base","flexDirection","alignItems","justifyContent","columnGap","space","borderRadius","radii","borderWidth","borderWidths","thin","variants","size","paddingHorizontal","defaultVariants","selectOverlayStructure","flex","selectSheetStructure","paddingVertical","maxHeight","elevation","selectRowStructure","minHeight"],"sourceRoot":"../../../../src","sources":["modules/select/Select.variants.ts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EAAE,EAAE;QAAEV,MAAM,EAAEI,YAAY,CAACM,EAAE,CAACV,MAAM;QAAEmD,iBAAiB,EAAEd,KAAK,CAACM,KAAK,CAAC,CAAC;MAAE;IAC1E;EACF,CAAC;EACDS,eAAe,EAAE;IAAEF,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,OAAO,MAAMG,sBAAsB,GAAGxD,oBAAoB,CAAEwC,KAAY,KAAM;EAC5EC,IAAI,EAAE;IACJgB,IAAI,EAAE,CAAC;IACPb,cAAc,EAAE,QAAQ;IACxBU,iBAAiB,EAAEd,KAAK,CAACM,KAAK,CAAC,CAAC;EAClC;AACF,CAAC,CAAC,CAAC;AAEH,OAAO,MAAMY,oBAAoB,GAAG1D,oBAAoB,CAAEwC,KAAY,KAAM;EAC1EC,IAAI,EAAE;IACJM,YAAY,EAAEP,KAAK,CAACQ,KAAK,CAACP,IAAI;IAC9BkB,eAAe,EAAEnB,KAAK,CAACM,KAAK,CAAC,CAAC,CAAC;IAC/Bc,SAAS,EAAE,GAAG;IACd,GAAGpB,KAAK,CAACqB,SAAS,CAAChD;EACrB;AACF,CAAC,CAAC,CAAC;AAEH,OAAO,MAAMiD,kBAAkB,GAAG9D,oBAAoB,CAAEwC,KAAY,KAAM;EACxEC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BmB,SAAS,EAAEjD,qBAAqB;IAChC+B,SAAS,EAAEL,KAAK,CAACM,KAAK,CAAC,CAAC,CAAC;IACzBQ,iBAAiB,EAAEd,KAAK,CAACM,KAAK,CAAC,CAAC;EAClC;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/select`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveSelectTriggerColors`, `SELECT_SIZES`, …) stay
|
|
6
|
+
* internal — a consumer configures a Select through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Select } from "./Select.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Select"],"sourceRoot":"../../../../src","sources":["modules/select/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,aAAU","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# skeleton/ — a shimmering loading placeholder box
|
|
2
|
+
|
|
3
|
+
`Skeleton` stands in for content that hasn't rendered yet — a box that shimmers between two
|
|
4
|
+
neutral fills. It takes no children and no interaction; it IS its own size, which is why
|
|
5
|
+
`width`/`height` are dedicated props rather than something a consumer reaches for through `style`.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
| File | Role |
|
|
10
|
+
|------|------|
|
|
11
|
+
| `Skeleton.tsx` | The component. Resolves size/colour/a11y, drives the `Animated` shimmer loop, `style` last. |
|
|
12
|
+
| `Skeleton.variants.ts` | Pure resolvers (`resolveSkeletonSize`, `resolveSkeletonColors`, `resolveSkeletonAccessibility`) + the themed structural variant resolver `skeletonStructure`. No React. |
|
|
13
|
+
| `index.ts` | Public surface: `Skeleton`, `SkeletonProps`, `SkeletonShape`. |
|
|
14
|
+
| `__tests__/Skeleton.test.ts` | Pure: colour-role mapping + shimmer-visibility guard (all brands × modes), the size resolver, the a11y contract. |
|
|
15
|
+
| `__tests__/Skeleton.render.test.tsx` | Render: shape scale, sizing, shimmer mounts/skips under reduced motion, decorative-vs-labelled a11y, consumer `style` applies last. |
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Notes |
|
|
20
|
+
|------|------|---------|-------|
|
|
21
|
+
| `shape` | `rect \| circle \| text` | `rect` | Closed union — drives the corner radius only. |
|
|
22
|
+
| `width` | `number` | per-shape fallback | dp. Component-owned sizing, **not** `LayoutStyle` — sizing is the point of this component. |
|
|
23
|
+
| `height` | `number` | per-shape fallback | dp. `circle` mirrors whichever of `width`/`height` is given onto both axes (an unequal pair would render an ellipse). |
|
|
24
|
+
| `accessibilityLabel` | `string` | — | **Optional** — see Accessibility contract below. |
|
|
25
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
26
|
+
| `testID` | `string` | — | The shimmer overlay (when mounted) also gets `${testID}-pulse`. |
|
|
27
|
+
|
|
28
|
+
No `tone`/`color` prop: a skeleton has exactly one neutral appearance (`resolveSkeletonColors`),
|
|
29
|
+
the same reasoning as `Avatar`'s and `Divider`'s colour resolvers — there is nothing for an app to
|
|
30
|
+
widen.
|
|
31
|
+
|
|
32
|
+
## Accessibility contract (WCAG)
|
|
33
|
+
|
|
34
|
+
- **Decorative by default, same "decorative unless labelled" shape as `Avatar`.** A skeleton
|
|
35
|
+
carries no meaning of its own — it is a stand-in, not content — so when `accessibilityLabel` is
|
|
36
|
+
absent it is hidden from assistive tech via `accessibilityElementsHidden` (iOS) +
|
|
37
|
+
`importantForAccessibility="no-hide-descendants"` (Android). `resolveSkeletonAccessibility`
|
|
38
|
+
derives this purely, so the contract is unit-tested without a renderer.
|
|
39
|
+
- When `accessibilityLabel` **is** given (e.g. `"Loading"`), the placeholder is exposed as one
|
|
40
|
+
`accessibilityRole="progressbar"` element carrying it, with `accessibilityState={{ busy: true }}`
|
|
41
|
+
(WCAG 1.4.1 — the loading state is announced, not left to be inferred from a box appearing on
|
|
42
|
+
screen).
|
|
43
|
+
- **1.4.3 / 1.4.11** — N/A. A skeleton renders no text and draws no interactive boundary (same
|
|
44
|
+
conclusion `Divider.test.ts` documents for its own decorative colour). What IS measured: `base`
|
|
45
|
+
and `pulse` must resolve to two genuinely different colours on every brand × mode, or the shimmer
|
|
46
|
+
would be a silent no-op — asserted directly in `Skeleton.test.ts`.
|
|
47
|
+
- **2.3.3 (reduced motion)** — `useReducedMotion()` gates the shimmer loop entirely. When true, the
|
|
48
|
+
`Animated` overlay is never mounted and the box renders as a static `bg.sunken` fill — never a
|
|
49
|
+
frame frozen mid-pulse.
|
|
50
|
+
- **Touch target (2.5.x)** — N/A. `Skeleton` has no `onPress`.
|
|
51
|
+
|
|
52
|
+
## Patterns copied from `Button`/`Avatar`
|
|
53
|
+
|
|
54
|
+
1. **Structure vs colour split.** The shape's corner radius → `createThemedVariants`
|
|
55
|
+
(`skeletonStructure`, registered once per theme, plus `overflow: "hidden"` so the shimmer
|
|
56
|
+
overlay clips to it without recomputing the radius on that overlay too — safe here because,
|
|
57
|
+
unlike `Button`, nothing needs to be drawn outside this box). Colour → resolved from role tokens
|
|
58
|
+
(`resolveSkeletonColors`), applied inline.
|
|
59
|
+
2. **Shimmer is one `Animated` opacity pulse over a static base fill** — the same "state layer over
|
|
60
|
+
a base" technique as `Button`'s press overlay: a `bg.sunken` box with an absolutely-positioned
|
|
61
|
+
overlay sibling whose opacity loops 0 → 1 → 0. The overlay colour is `base` composited with a
|
|
62
|
+
fixed-alpha `fg.default` (via `compositeOver`, same precedent as `Button`'s `PRESS_SCRIM_DARK`/
|
|
63
|
+
`LIGHT`) — **not** a second role lookup like `bg.raised`. Two arbitrary role rungs are not
|
|
64
|
+
guaranteed to differ enough to read as a shimmer: an earlier version used `bg.raised`, and a
|
|
65
|
+
contrast-ratio floor added to `Skeleton.test.ts` (`MIN_PULSE_CONTRAST`) caught that pair
|
|
66
|
+
collapsing to visually-indistinguishable on every brand × mode. Compositing a fixed-alpha overlay
|
|
67
|
+
makes the luminance delta a controlled constant instead of an incidental one.
|
|
68
|
+
3. **Pure, testable resolvers** in `Skeleton.variants.ts` (no React) so the colour, sizing, and a11y
|
|
69
|
+
contracts are unit-tested against real palettes — never eyeballed.
|
|
70
|
+
4. **Closed union only** (`shape`), `style: LayoutStyle` last and once, no `{...rest}`.
|
|
71
|
+
|
|
72
|
+
## Why `width`/`height` are component-owned props, not `LayoutStyle`
|
|
73
|
+
|
|
74
|
+
Every other module treats sizing as the theme's job (`size="sm" | "md" | "lg"`) and leaves `style`
|
|
75
|
+
for placement only. A skeleton is different: it stands in for a specific, arbitrary piece of
|
|
76
|
+
content (a 200×40 image, a 16pt text line, a 40dp avatar), so its size has no closed set of values
|
|
77
|
+
to register as a themed variant. `width`/`height` are declared, component-owned props for exactly
|
|
78
|
+
that reason — the same reasoning `Avatar`'s `AvatarSize` scale does NOT apply here — while `style`
|
|
79
|
+
still stays layout-only, outermost, and last, for placement (margin, `alignSelf`, …).
|
|
80
|
+
|
|
81
|
+
## Known gaps
|
|
82
|
+
|
|
83
|
+
None — no icon, no new theme token, no new core helper needed for this component.
|
|
84
|
+
|
|
85
|
+
## Performance
|
|
86
|
+
|
|
87
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). No library child components or lists — nothing to memoize.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton — a loading placeholder box that shimmers while the real content it stands in for is
|
|
5
|
+
* still on its way. It is its own size (`width`/`height` are component-owned props, not
|
|
6
|
+
* `LayoutStyle` — sizing IS the point of this component) and has exactly one neutral appearance:
|
|
7
|
+
* a resting `bg.sunken` fill cross-faded with a fixed-alpha `fg.default` overlay composited over it
|
|
8
|
+
* (see `resolveSkeletonColors`), pulsing on an `Animated` opacity loop. Purely decorative by default
|
|
9
|
+
* (see `Skeleton.variants.ts` →
|
|
10
|
+
* `resolveSkeletonAccessibility`, the same "decorative unless labelled" contract as `Avatar`).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo, useEffect, useRef } from "react";
|
|
14
|
+
import { Animated, StyleSheet } from "react-native";
|
|
15
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
16
|
+
import { useTheme } from "../../theme/index.js";
|
|
17
|
+
import { resolveSkeletonAccessibility, resolveSkeletonColors, resolveSkeletonSize, skeletonStructure } from "./Skeleton.variants.js";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
const PULSE_MS = 700;
|
|
20
|
+
export const Skeleton = /*#__PURE__*/memo(function Skeleton({
|
|
21
|
+
shape = "rect",
|
|
22
|
+
width,
|
|
23
|
+
height,
|
|
24
|
+
accessibilityLabel,
|
|
25
|
+
style,
|
|
26
|
+
testID
|
|
27
|
+
}) {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const reducedMotion = useReducedMotion();
|
|
30
|
+
const pulse = useRef(new Animated.Value(0)).current;
|
|
31
|
+
const size = resolveSkeletonSize(shape, width, height);
|
|
32
|
+
const colors = resolveSkeletonColors(theme.colors);
|
|
33
|
+
const a11y = resolveSkeletonAccessibility({
|
|
34
|
+
accessibilityLabel
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// WCAG 2.3.3 — reduced motion skips the loop entirely; the static `base` fill below is the
|
|
38
|
+
// whole placeholder in that case, never a paused-mid-pulse frame.
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (reducedMotion) return undefined;
|
|
41
|
+
const loop = Animated.loop(Animated.sequence([Animated.timing(pulse, {
|
|
42
|
+
toValue: 1,
|
|
43
|
+
duration: PULSE_MS,
|
|
44
|
+
useNativeDriver: true
|
|
45
|
+
}), Animated.timing(pulse, {
|
|
46
|
+
toValue: 0,
|
|
47
|
+
duration: PULSE_MS,
|
|
48
|
+
useNativeDriver: true
|
|
49
|
+
})]));
|
|
50
|
+
loop.start();
|
|
51
|
+
return () => loop.stop();
|
|
52
|
+
}, [reducedMotion, pulse]);
|
|
53
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
54
|
+
testID: testID,
|
|
55
|
+
accessible: a11y.accessible,
|
|
56
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
57
|
+
accessibilityLabel: a11y.accessibilityLabel,
|
|
58
|
+
accessibilityState: a11y.accessibilityState,
|
|
59
|
+
accessibilityElementsHidden: a11y.accessibilityElementsHidden,
|
|
60
|
+
importantForAccessibility: a11y.importantForAccessibility,
|
|
61
|
+
style: [skeletonStructure(theme, {
|
|
62
|
+
shape
|
|
63
|
+
}), {
|
|
64
|
+
width: size.width,
|
|
65
|
+
height: size.height,
|
|
66
|
+
backgroundColor: colors.base
|
|
67
|
+
}, style],
|
|
68
|
+
children: !reducedMotion && /*#__PURE__*/_jsx(Animated.View, {
|
|
69
|
+
testID: testID === undefined ? undefined : `${testID}-pulse`,
|
|
70
|
+
pointerEvents: "none",
|
|
71
|
+
style: [StyleSheet.absoluteFill, {
|
|
72
|
+
backgroundColor: colors.pulse,
|
|
73
|
+
opacity: pulse
|
|
74
|
+
}]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useEffect","useRef","Animated","StyleSheet","useReducedMotion","useTheme","resolveSkeletonAccessibility","resolveSkeletonColors","resolveSkeletonSize","skeletonStructure","jsx","_jsx","PULSE_MS","Skeleton","shape","width","height","accessibilityLabel","style","testID","theme","reducedMotion","pulse","Value","current","size","colors","a11y","undefined","loop","sequence","timing","toValue","duration","useNativeDriver","start","stop","View","accessible","accessibilityRole","accessibilityState","accessibilityElementsHidden","importantForAccessibility","backgroundColor","base","children","pointerEvents","absoluteFill","opacity"],"sourceRoot":"../../../../src","sources":["modules/skeleton/Skeleton.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC/C,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAEnD,SAASC,gBAAgB,QAAQ,0BAAiB;AAElD,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SACEC,4BAA4B,EAC5BC,qBAAqB,EACrB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