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,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reorder — a drag-to-reorder list built on plain `PanResponder` + `Animated` (Wave 3: no new
|
|
5
|
+
* dependency). Each row's drag handle is a hand-built three-bar "grip" glyph (no `IconName` in the
|
|
6
|
+
* closed 22-name set represents a drag handle, and that set is never extended for one component) —
|
|
7
|
+
* the `PanResponder` lives on the grip ONLY, not the whole row, so the label text never fights the
|
|
8
|
+
* gesture.
|
|
9
|
+
*
|
|
10
|
+
* The list is FULLY CONTROLLED: `items`/`onReorder` are the only source of truth. While a drag is
|
|
11
|
+
* live, the component tracks purely EPHEMERAL state — which row grabbed the gesture (`startIndex`)
|
|
12
|
+
* and which slot it is over now (`targetIndex`), both cleared on release — and previews the reorder
|
|
13
|
+
* by shifting the OTHER rows out of the way with `resolveRowShift` (see `Reorder.variants.ts`); the
|
|
14
|
+
* underlying `items` array is never mutated mid-drag, only on release, via `onReorder`. Because the
|
|
15
|
+
* shift preview and the final `moveItem` commit share the exact same splice semantics, the row that
|
|
16
|
+
* was being dragged lands in the same visual slot its shifted neighbours already vacated — no jump.
|
|
17
|
+
*
|
|
18
|
+
* WCAG 2.5.7 (Dragging Movements) requires a non-dragging way to perform the same function: every
|
|
19
|
+
* row also renders two `Button` icon-only presses ("Move X up" / "Move X down", reusing the shipped
|
|
20
|
+
* `chevron-up`/`chevron-down` names), disabled at the list's own start/end via
|
|
21
|
+
* `resolveReorderMoveState`. This is the REQUIRED accessible path, not optional polish — it is a
|
|
22
|
+
* real `accessibilityRole="button"` each (Button's own contract), fully operable without any touch
|
|
23
|
+
* gesture, and it shares `moveItem` with the drag path so both always agree.
|
|
24
|
+
*
|
|
25
|
+
* The grip itself carries no accessible action of its own — `PanResponder` gestures are invisible to
|
|
26
|
+
* assistive tech, and exposing it as a fake, non-operable "button" would be misleading — so it is
|
|
27
|
+
* hidden from the accessibility tree (`accessibilityElementsHidden` + `no-hide-descendants`, the same
|
|
28
|
+
* pairing `Timeline`'s decorative connector uses), leaving the up/down `Button`s as the one real
|
|
29
|
+
* accessible affordance for reordering.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
33
|
+
import { Animated, PanResponder, Text, View } from "react-native";
|
|
34
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
35
|
+
import { useTheme } from "../../theme/index.js";
|
|
36
|
+
import { Button } from "../button/index.js";
|
|
37
|
+
import { GRIP_HIT_SLOP, moveItem, reorderGripBarStructure, reorderGripStructure, reorderListStructure, reorderRowStructure, resolveDragTargetIndex, resolveReorderColors, resolveReorderMoveState, resolveRowPitch, resolveRowShift } from "./Reorder.variants.js";
|
|
38
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
|
+
const SHIFT_DURATION_MS = 200;
|
|
40
|
+
export const Reorder = /*#__PURE__*/memo(function Reorder({
|
|
41
|
+
items,
|
|
42
|
+
onReorder,
|
|
43
|
+
disabled = false,
|
|
44
|
+
style,
|
|
45
|
+
testID
|
|
46
|
+
}) {
|
|
47
|
+
const theme = useTheme();
|
|
48
|
+
const reducedMotion = useReducedMotion();
|
|
49
|
+
// Memoized so every row (see `ReorderRow` below) gets the same `colors` reference across renders
|
|
50
|
+
// that don't change the theme — a fresh object here would defeat `ReorderRow`'s own `React.memo`.
|
|
51
|
+
const colors = useMemo(() => resolveReorderColors(theme.colors), [theme.colors]);
|
|
52
|
+
const [dragState, setDragState] = useState(null);
|
|
53
|
+
// Mirrors `dragState` for `handleDragEnd` to read without depending on it directly — depending on
|
|
54
|
+
// `dragState` there would recreate that callback (and its `onDragEnd` prop reference on every row)
|
|
55
|
+
// on each drag-target transition, defeating every `ReorderRow`'s memo mid-drag, the exact hot path
|
|
56
|
+
// this component's memoization is for.
|
|
57
|
+
const dragStateRef = useRef(dragState);
|
|
58
|
+
dragStateRef.current = dragState;
|
|
59
|
+
const dragY = useRef(new Animated.Value(0)).current;
|
|
60
|
+
const rowPitch = resolveRowPitch(theme.space[2]);
|
|
61
|
+
|
|
62
|
+
// Each row's own preview-shift `Animated.Value`, keyed by the item's stable id (not array index)
|
|
63
|
+
// so `handleDragEnd` below can reach every row and snap it back to 0 synchronously — see there for
|
|
64
|
+
// why that reset can't be left to each row's own effect.
|
|
65
|
+
const shiftValues = useRef(new Map()).current;
|
|
66
|
+
const getShiftValue = id => {
|
|
67
|
+
let value = shiftValues.get(id);
|
|
68
|
+
if (value === undefined) {
|
|
69
|
+
value = new Animated.Value(0);
|
|
70
|
+
shiftValues.set(id, value);
|
|
71
|
+
}
|
|
72
|
+
return value;
|
|
73
|
+
};
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const liveIds = new Set(items.map(item => item.id));
|
|
76
|
+
shiftValues.forEach((_value, id) => {
|
|
77
|
+
if (!liveIds.has(id)) shiftValues.delete(id);
|
|
78
|
+
});
|
|
79
|
+
}, [items, shiftValues]);
|
|
80
|
+
const handleDragStart = useCallback(index => {
|
|
81
|
+
dragY.setValue(0);
|
|
82
|
+
setDragState({
|
|
83
|
+
startIndex: index,
|
|
84
|
+
targetIndex: index
|
|
85
|
+
});
|
|
86
|
+
}, [dragY]);
|
|
87
|
+
const handleDragMove = useCallback((index, dy) => {
|
|
88
|
+
dragY.setValue(dy);
|
|
89
|
+
const targetIndex = resolveDragTargetIndex(index, dy, rowPitch, items.length);
|
|
90
|
+
setDragState(prev => prev !== null && prev.targetIndex === targetIndex ? prev : {
|
|
91
|
+
startIndex: index,
|
|
92
|
+
targetIndex
|
|
93
|
+
});
|
|
94
|
+
}, [dragY, rowPitch, items.length]);
|
|
95
|
+
const handleDragEnd = useCallback(() => {
|
|
96
|
+
// Every row's own `shift` must already read 0 in the SAME tick the array commits. React
|
|
97
|
+
// relocates a reordered row instantly via its stable `item.id` key, so a row that was previewed
|
|
98
|
+
// mid-drag would otherwise keep animating its stale offset toward 0 AFTER already landing in its
|
|
99
|
+
// new (correct) slot — a visible jump-then-slide. Resetting here, synchronously and before the
|
|
100
|
+
// `dragState` update below flips every row's `shiftTarget` prop to 0, means that prop-driven
|
|
101
|
+
// effect (in `ReorderRow`) only ever animates 0 → 0 — a no-op, not a stale-value correction.
|
|
102
|
+
shiftValues.forEach(value => value.setValue(0));
|
|
103
|
+
// `onReorder` (the consumer's own state setter, e.g. `setItems`) must NOT be called from inside
|
|
104
|
+
// a `setDragState` updater function — React requires updater functions to be pure, and may
|
|
105
|
+
// invoke them while processing `Reorder`'s own render, which is exactly what produced "Cannot
|
|
106
|
+
// update a component (…) while rendering a different component (Reorder)". Read via
|
|
107
|
+
// `dragStateRef` (kept in sync above on every render) rather than closing over `dragState`
|
|
108
|
+
// directly, so this callback's identity stays stable across a drag instead of churning on every
|
|
109
|
+
// target-row transition — see the ref's own comment for why that stability matters.
|
|
110
|
+
const currentDragState = dragStateRef.current;
|
|
111
|
+
if (currentDragState !== null && currentDragState.startIndex !== currentDragState.targetIndex) {
|
|
112
|
+
onReorder(moveItem(items, currentDragState.startIndex, currentDragState.targetIndex));
|
|
113
|
+
}
|
|
114
|
+
setDragState(null);
|
|
115
|
+
dragY.setValue(0);
|
|
116
|
+
}, [shiftValues, items, onReorder, dragY]);
|
|
117
|
+
const handleMove = useCallback((fromIndex, toIndex) => {
|
|
118
|
+
onReorder(moveItem(items, fromIndex, toIndex));
|
|
119
|
+
}, [items, onReorder]);
|
|
120
|
+
|
|
121
|
+
// `onMoveUp`/`onMoveDown` are handed to every row (see `ReorderRow` below); binding `index` here
|
|
122
|
+
// via one stable per-list callback (rather than a fresh `() => handleMove(index, index ± 1)`
|
|
123
|
+
// closure per row per render) keeps their identity stable across renders that don't touch
|
|
124
|
+
// `handleMove`, so a row's own `React.memo` isn't defeated by these two props alone.
|
|
125
|
+
const handleMoveUp = useCallback(index => handleMove(index, index - 1), [handleMove]);
|
|
126
|
+
const handleMoveDown = useCallback(index => handleMove(index, index + 1), [handleMove]);
|
|
127
|
+
return /*#__PURE__*/_jsx(View, {
|
|
128
|
+
testID: testID,
|
|
129
|
+
style: [reorderListStructure(theme), style],
|
|
130
|
+
children: items.map((item, index) => {
|
|
131
|
+
const rowTestID = testID === undefined ? undefined : `${testID}-item-${index}`;
|
|
132
|
+
const moveState = resolveReorderMoveState(index, items.length, disabled);
|
|
133
|
+
const isDragging = dragState !== null && dragState.startIndex === index;
|
|
134
|
+
const shiftTarget = dragState === null ? 0 : resolveRowShift(index, dragState.startIndex, dragState.targetIndex, rowPitch);
|
|
135
|
+
return /*#__PURE__*/_jsx(ReorderRow, {
|
|
136
|
+
item: item,
|
|
137
|
+
index: index,
|
|
138
|
+
disabled: disabled,
|
|
139
|
+
isDragging: isDragging,
|
|
140
|
+
shiftTarget: shiftTarget,
|
|
141
|
+
shift: getShiftValue(item.id),
|
|
142
|
+
dragY: dragY,
|
|
143
|
+
reducedMotion: reducedMotion,
|
|
144
|
+
colors: colors,
|
|
145
|
+
theme: theme,
|
|
146
|
+
upDisabled: moveState.upDisabled,
|
|
147
|
+
downDisabled: moveState.downDisabled,
|
|
148
|
+
onDragStart: handleDragStart,
|
|
149
|
+
onDragMove: handleDragMove,
|
|
150
|
+
onDragEnd: handleDragEnd,
|
|
151
|
+
onMoveUp: handleMoveUp,
|
|
152
|
+
onMoveDown: handleMoveDown,
|
|
153
|
+
testID: rowTestID
|
|
154
|
+
}, item.id);
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
/**
|
|
159
|
+
* One row. Split out as its own component (rather than inlined in `Reorder`'s `.map()`) because
|
|
160
|
+
* its shift-settle effect needs a per-row hook instance — Rules of Hooks forbid calling `useEffect`
|
|
161
|
+
* inside a loop body. `shift` itself is now passed in (owned by `Reorder`, keyed by `item.id`), not
|
|
162
|
+
* a locally-owned ref, so `handleDragEnd` can reset it synchronously on drop — see there for why.
|
|
163
|
+
* Wrapped in `React.memo`: `Reorder` re-renders every row on each drag-move tick, so only a row
|
|
164
|
+
* whose own props actually changed (its `shiftTarget`/`isDragging`, primarily) should re-render.
|
|
165
|
+
*/
|
|
166
|
+
const ReorderRow = /*#__PURE__*/memo(function ReorderRow({
|
|
167
|
+
item,
|
|
168
|
+
index,
|
|
169
|
+
disabled,
|
|
170
|
+
isDragging,
|
|
171
|
+
shiftTarget,
|
|
172
|
+
shift,
|
|
173
|
+
dragY,
|
|
174
|
+
reducedMotion,
|
|
175
|
+
colors,
|
|
176
|
+
theme,
|
|
177
|
+
upDisabled,
|
|
178
|
+
downDisabled,
|
|
179
|
+
onDragStart,
|
|
180
|
+
onDragMove,
|
|
181
|
+
onDragEnd,
|
|
182
|
+
onMoveUp,
|
|
183
|
+
onMoveDown,
|
|
184
|
+
testID
|
|
185
|
+
}) {
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
if (reducedMotion) {
|
|
188
|
+
shift.setValue(shiftTarget);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
Animated.timing(shift, {
|
|
192
|
+
toValue: shiftTarget,
|
|
193
|
+
duration: SHIFT_DURATION_MS,
|
|
194
|
+
useNativeDriver: true
|
|
195
|
+
}).start();
|
|
196
|
+
}, [shift, shiftTarget, reducedMotion]);
|
|
197
|
+
|
|
198
|
+
// Recreated every render — a fresh closure over this render's `disabled`/index means there is no
|
|
199
|
+
// stale-closure risk to manage via refs (the same trade Button/Select make for their own inline
|
|
200
|
+
// `onPress` closures).
|
|
201
|
+
const panResponder = PanResponder.create({
|
|
202
|
+
onStartShouldSetPanResponder: () => !disabled,
|
|
203
|
+
onMoveShouldSetPanResponder: () => !disabled,
|
|
204
|
+
onPanResponderGrant: () => onDragStart(index),
|
|
205
|
+
onPanResponderMove: (_event, gestureState) => onDragMove(index, gestureState.dy),
|
|
206
|
+
onPanResponderRelease: () => onDragEnd(index),
|
|
207
|
+
onPanResponderTerminate: () => onDragEnd(index)
|
|
208
|
+
});
|
|
209
|
+
const {
|
|
210
|
+
onStartShouldSetResponder,
|
|
211
|
+
onMoveShouldSetResponder,
|
|
212
|
+
onResponderGrant,
|
|
213
|
+
onResponderMove,
|
|
214
|
+
onResponderRelease,
|
|
215
|
+
onResponderTerminate,
|
|
216
|
+
onResponderTerminationRequest
|
|
217
|
+
} = panResponder.panHandlers;
|
|
218
|
+
const gripColor = disabled ? colors.gripDisabled : colors.grip;
|
|
219
|
+
const gripTestID = testID === undefined ? undefined : `${testID}-grip`;
|
|
220
|
+
|
|
221
|
+
// Bind this row's own `index` into `onMoveUp`/`onMoveDown` once per render, rather than handing
|
|
222
|
+
// `Button` (this library's own component) a fresh inline closure on every render regardless of
|
|
223
|
+
// whether `index` or the handler actually changed.
|
|
224
|
+
const handlePressUp = useCallback(() => onMoveUp(index), [onMoveUp, index]);
|
|
225
|
+
const handlePressDown = useCallback(() => onMoveDown(index), [onMoveDown, index]);
|
|
226
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
227
|
+
testID: testID,
|
|
228
|
+
style: [reorderRowStructure(theme), {
|
|
229
|
+
backgroundColor: isDragging ? colors.draggingRowBackground : colors.rowBackground
|
|
230
|
+
}, isDragging && theme.elevation.md, {
|
|
231
|
+
transform: [{
|
|
232
|
+
translateY: isDragging ? dragY : shift
|
|
233
|
+
}],
|
|
234
|
+
zIndex: isDragging ? 1 : 0
|
|
235
|
+
}],
|
|
236
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
237
|
+
testID: gripTestID,
|
|
238
|
+
accessibilityElementsHidden: true,
|
|
239
|
+
importantForAccessibility: "no-hide-descendants",
|
|
240
|
+
hitSlop: GRIP_HIT_SLOP,
|
|
241
|
+
onStartShouldSetResponder: onStartShouldSetResponder,
|
|
242
|
+
onMoveShouldSetResponder: onMoveShouldSetResponder,
|
|
243
|
+
onResponderGrant: onResponderGrant,
|
|
244
|
+
onResponderMove: onResponderMove,
|
|
245
|
+
onResponderRelease: onResponderRelease,
|
|
246
|
+
onResponderTerminate: onResponderTerminate,
|
|
247
|
+
onResponderTerminationRequest: onResponderTerminationRequest,
|
|
248
|
+
style: reorderGripStructure(),
|
|
249
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
250
|
+
style: [reorderGripBarStructure(theme), {
|
|
251
|
+
backgroundColor: gripColor
|
|
252
|
+
}]
|
|
253
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
254
|
+
style: [reorderGripBarStructure(theme), {
|
|
255
|
+
backgroundColor: gripColor
|
|
256
|
+
}]
|
|
257
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
258
|
+
style: [reorderGripBarStructure(theme), {
|
|
259
|
+
backgroundColor: gripColor
|
|
260
|
+
}]
|
|
261
|
+
})]
|
|
262
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
263
|
+
numberOfLines: 1,
|
|
264
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
265
|
+
flex: 1,
|
|
266
|
+
fontSize: theme.fontSizes.md,
|
|
267
|
+
color: colors.label
|
|
268
|
+
}],
|
|
269
|
+
children: item.label
|
|
270
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
271
|
+
icon: "chevron-up",
|
|
272
|
+
variant: "ghost",
|
|
273
|
+
tone: "neutral",
|
|
274
|
+
size: "sm",
|
|
275
|
+
disabled: upDisabled,
|
|
276
|
+
accessibilityLabel: `Move ${item.label} up`,
|
|
277
|
+
onPress: handlePressUp,
|
|
278
|
+
testID: testID === undefined ? undefined : `${testID}-move-up`
|
|
279
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
280
|
+
icon: "chevron-down",
|
|
281
|
+
variant: "ghost",
|
|
282
|
+
tone: "neutral",
|
|
283
|
+
size: "sm",
|
|
284
|
+
disabled: downDisabled,
|
|
285
|
+
accessibilityLabel: `Move ${item.label} down`,
|
|
286
|
+
onPress: handlePressDown,
|
|
287
|
+
testID: testID === undefined ? undefined : `${testID}-move-down`
|
|
288
|
+
})]
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
//# sourceMappingURL=Reorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useEffect","useMemo","useRef","useState","Animated","PanResponder","Text","View","useReducedMotion","useTheme","Button","GRIP_HIT_SLOP","moveItem","reorderGripBarStructure","reorderGripStructure","reorderListStructure","reorderRowStructure","resolveDragTargetIndex","resolveReorderColors","resolveReorderMoveState","resolveRowPitch","resolveRowShift","jsx","_jsx","jsxs","_jsxs","SHIFT_DURATION_MS","Reorder","items","onReorder","disabled","style","testID","theme","reducedMotion","colors","dragState","setDragState","dragStateRef","current","dragY","Value","rowPitch","space","shiftValues","Map","getShiftValue","id","value","get","undefined","set","liveIds","Set","map","item","forEach","_value","has","delete","handleDragStart","index","setValue","startIndex","targetIndex","handleDragMove","dy","length","prev","handleDragEnd","currentDragState","handleMove","fromIndex","toIndex","handleMoveUp","handleMoveDown","children","rowTestID","moveState","isDragging","shiftTarget","ReorderRow","shift","upDisabled","downDisabled","onDragStart","onDragMove","onDragEnd","onMoveUp","onMoveDown","timing","toValue","duration","useNativeDriver","start","panResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","onPanResponderMove","_event","gestureState","onPanResponderRelease","onPanResponderTerminate","onStartShouldSetResponder","onMoveShouldSetResponder","onResponderGrant","onResponderMove","onResponderRelease","onResponderTerminate","onResponderTerminationRequest","panHandlers","gripColor","gripDisabled","grip","gripTestID","handlePressUp","handlePressDown","backgroundColor","draggingRowBackground","rowBackground","elevation","md","transform","translateY","zIndex","accessibilityElementsHidden","importantForAccessibility","hitSlop","numberOfLines","fontStyleForWeight","fontWeights","regular","flex","fontSize","fontSizes","color","label","icon","variant","tone","size","accessibilityLabel","onPress"],"sourceRoot":"../../../../src","sources":["modules/reorder/Reorder.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EA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,eAEPnH,IAAA,CAACb,MAAM;MACLiI,IAAI,EAAC,YAAY;MACjBC,OAAO,EAAC,OAAO;MACfC,IAAI,EAAC,SAAS;MACdC,IAAI,EAAC,IAAI;MACThH,QAAQ,EAAEqD,UAAW;MACrB4D,kBAAkB,EAAE,QAAQxF,IAAI,CAACmF,KAAK,KAAM;MAC5CM,OAAO,EAAE3B,aAAc;MACvBrF,MAAM,EAAEA,MAAM,KAAKkB,SAAS,GAAGA,SAAS,GAAG,GAAGlB,MAAM;IAAW,CAChE,CAAC,eACFT,IAAA,CAACb,MAAM;MACLiI,IAAI,EAAC,cAAc;MACnBC,OAAO,EAAC,OAAO;MACfC,IAAI,EAAC,SAAS;MACdC,IAAI,EAAC,IAAI;MACThH,QAAQ,EAAEsD,YAAa;MACvB2D,kBAAkB,EAAE,QAAQxF,IAAI,CAACmF,KAAK,OAAQ;MAC9CM,OAAO,EAAE1B,eAAgB;MACzBtF,MAAM,EAAEA,MAAM,KAAKkB,SAAS,GAAGA,SAAS,GAAG,GAAGlB,MAAM;IAAa,CAClE,CAAC;EAAA,CACW,CAAC;AAEpB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reorder's style + behaviour resolution — the pure functions the component (and its tests) depend
|
|
5
|
+
* on, plus the themed structural variant resolvers. Same split as `Button.variants.ts`:
|
|
6
|
+
* - STRUCTURE (row height, grip bar size, radius, spacing) lives in the `createThemedVariants`
|
|
7
|
+
* resolvers below, registered once per theme identity.
|
|
8
|
+
* - COLOUR is resolved from the theme's ROLE colours (`resolveReorderColors`), never a raw ramp.
|
|
9
|
+
* - The drag MATH (`resolveDragTargetIndex`, `resolveRowShift`) and the array mutation
|
|
10
|
+
* (`moveItem`) are pure and shared by BOTH interaction paths — the live drag gesture and the
|
|
11
|
+
* WCAG 2.5.7 accessible up/down alternative — so the two paths are guaranteed to agree.
|
|
12
|
+
* - `resolveReorderMoveState` gates that alternative: the first row can't move up, the last can't
|
|
13
|
+
* move down, and the whole pair is gated by the list's own `disabled` prop.
|
|
14
|
+
*
|
|
15
|
+
* Free of React and of any lucide import, so the WCAG + behaviour tests import it directly (mocking
|
|
16
|
+
* only `react-native`'s `StyleSheet`, as `core/style` and every sibling module's tests do).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { createThemedVariants, createVariants } from "../../core/style/index.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Fixed row height, in dp. A fixed height — rather than per-row `onLayout` measurement — is what
|
|
23
|
+
* lets the drag math below be a closed-form `dy ÷ rowHeight`, never an async-measured guess (the
|
|
24
|
+
* build brief's own preference: "a fixed height is simpler and more robust here").
|
|
25
|
+
*/
|
|
26
|
+
export const REORDER_ROW_HEIGHT = 56;
|
|
27
|
+
|
|
28
|
+
/** The 44dp floor every touch target holds itself to (WCAG 2.5.5 AAA; comfortably clears 2.5.8). */
|
|
29
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
30
|
+
const slopFor = dimension => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - dimension) / 2));
|
|
31
|
+
|
|
32
|
+
/** Grip bar glyph — three of these stacked make the drag-handle affordance. No `IconName` in the
|
|
33
|
+
* closed 22-name set represents a drag handle, and that set is never extended for one component
|
|
34
|
+
* (per the build brief), so the grip is hand-built from plain themed bars instead. */
|
|
35
|
+
export const GRIP_BAR_WIDTH = 20;
|
|
36
|
+
export const GRIP_BAR_HEIGHT = 3;
|
|
37
|
+
export const GRIP_BAR_GAP = 4;
|
|
38
|
+
|
|
39
|
+
/** The grip's visual footprint: three bars plus the two gaps between them. */
|
|
40
|
+
export const GRIP_BOX = {
|
|
41
|
+
width: GRIP_BAR_WIDTH,
|
|
42
|
+
height: GRIP_BAR_HEIGHT * 3 + GRIP_BAR_GAP * 2
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** Symmetric touch expansion on both axes so the grip reaches 44dp without growing the glyph —
|
|
46
|
+
* same discipline as `Button`'s `hitSlop`, just computed on two axes instead of one. */
|
|
47
|
+
export const GRIP_HIT_SLOP = {
|
|
48
|
+
top: slopFor(GRIP_BOX.height),
|
|
49
|
+
bottom: slopFor(GRIP_BOX.height),
|
|
50
|
+
left: slopFor(GRIP_BOX.width),
|
|
51
|
+
right: slopFor(GRIP_BOX.width)
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Maps Reorder's fixed visual roles onto ROLE colours — never a hardcoded hex. There is no
|
|
55
|
+
* `tone`/`variant` prop to widen: every row reads identically, so every colour Reorder can show is
|
|
56
|
+
* one of these role lookups, guaranteed legible in both modes (same reasoning `resolveTimelineColors`
|
|
57
|
+
* documents for its own tone-less component).
|
|
58
|
+
*/
|
|
59
|
+
export function resolveReorderColors(colors) {
|
|
60
|
+
return {
|
|
61
|
+
rowBackground: colors.bg.surface,
|
|
62
|
+
draggingRowBackground: colors.bg.raised,
|
|
63
|
+
label: colors.fg.default,
|
|
64
|
+
grip: colors.fg.muted,
|
|
65
|
+
gripDisabled: colors.fg.disabled
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Gates the accessible up/down alternative (WCAG 2.5.7 — Dragging Movements REQUIRES a non-dragging
|
|
70
|
+
* way to perform the same function): the first row can't move up, the last can't move down, and the
|
|
71
|
+
* list's own `disabled` prop gates every row regardless of position.
|
|
72
|
+
*/
|
|
73
|
+
export function resolveReorderMoveState(index, count, disabled) {
|
|
74
|
+
return {
|
|
75
|
+
upDisabled: disabled || index <= 0,
|
|
76
|
+
downDisabled: disabled || index >= count - 1
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Pure array move: `fromIndex` → `toIndex` (clamped into range). Used by BOTH the drag gesture and
|
|
82
|
+
* the accessible up/down buttons, so both interaction paths are guaranteed to produce the same
|
|
83
|
+
* result for the same intent. Out-of-range `fromIndex` returns an unmodified shallow copy.
|
|
84
|
+
*/
|
|
85
|
+
export function moveItem(items, fromIndex, toIndex) {
|
|
86
|
+
if (fromIndex < 0 || fromIndex >= items.length) return [...items];
|
|
87
|
+
const target = Math.max(0, Math.min(items.length - 1, toIndex));
|
|
88
|
+
const next = [...items];
|
|
89
|
+
const [moved] = next.splice(fromIndex, 1);
|
|
90
|
+
next.splice(target, 0, moved);
|
|
91
|
+
return next;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The REAL on-screen distance between two rows' tops: the row's own height plus the `rowGap` the
|
|
96
|
+
* list container applies between rows (the same `theme.space[2]` `reorderListStructure` uses below)
|
|
97
|
+
* — NOT `REORDER_ROW_HEIGHT` alone, which is how tall a row is, not how far apart two rows sit.
|
|
98
|
+
* `resolveDragTargetIndex`/`resolveRowShift` must be given THIS distance (call with
|
|
99
|
+
* `theme.space[2]`, never a hardcoded gap), or the target-row flip fires one `rowGap` early and the
|
|
100
|
+
* preview shift undershoots the vacated slot by `rowGap` per row, compounding on multi-row shifts.
|
|
101
|
+
*/
|
|
102
|
+
export function resolveRowPitch(rowGap) {
|
|
103
|
+
return REORDER_ROW_HEIGHT + rowGap;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The row a drag gesture is over right now, from the accumulated `dy` since the gesture grabbed
|
|
108
|
+
* `startIndex` — a closed-form step count against the REAL row pitch (see `resolveRowPitch`),
|
|
109
|
+
* clamped into the list's bounds. Rounds to the nearest row, so a drag must cross half a row's
|
|
110
|
+
* PITCH to advance a step.
|
|
111
|
+
*/
|
|
112
|
+
export function resolveDragTargetIndex(startIndex, dy, rowPitch, itemCount) {
|
|
113
|
+
const steps = Math.round(dy / rowPitch);
|
|
114
|
+
return Math.max(0, Math.min(itemCount - 1, startIndex + steps));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The vertical offset a NON-dragged row animates to, to open the gap the dragged row is passing
|
|
119
|
+
* over — `-rowPitch` (slides up) for rows between `startIndex` (exclusive) and `targetIndex`
|
|
120
|
+
* (inclusive) when the drag is moving down, `+rowPitch` (slides down) for the mirrored case moving
|
|
121
|
+
* up, `0` otherwise. `rowPitch` must be the REAL on-screen distance between row tops (see
|
|
122
|
+
* `resolveRowPitch`) — row height alone undershoots by `rowGap` per row. Symmetric with `moveItem`'s
|
|
123
|
+
* splice semantics: on drop, the dragged row's array position becomes `targetIndex` and every
|
|
124
|
+
* shifted row's array position is unchanged — only its on-screen slot moved — so this is exactly the
|
|
125
|
+
* visual preview of what `moveItem` will commit.
|
|
126
|
+
*/
|
|
127
|
+
export function resolveRowShift(rowIndex, startIndex, targetIndex, rowPitch) {
|
|
128
|
+
if (startIndex === targetIndex) return 0;
|
|
129
|
+
if (startIndex < targetIndex && rowIndex > startIndex && rowIndex <= targetIndex) return -rowPitch;
|
|
130
|
+
if (startIndex > targetIndex && rowIndex < startIndex && rowIndex >= targetIndex) return rowPitch;
|
|
131
|
+
return 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** The list container: rows are laid out as plain flex children, spaced by `rowGap`. */
|
|
135
|
+
export const reorderListStructure = createThemedVariants(theme => ({
|
|
136
|
+
base: {
|
|
137
|
+
rowGap: theme.space[2]
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
|
|
141
|
+
/** The whole row: fixed height (see `REORDER_ROW_HEIGHT`), grip/label/buttons spaced by `columnGap`. */
|
|
142
|
+
export const reorderRowStructure = createThemedVariants(theme => ({
|
|
143
|
+
base: {
|
|
144
|
+
flexDirection: "row",
|
|
145
|
+
alignItems: "center",
|
|
146
|
+
height: REORDER_ROW_HEIGHT,
|
|
147
|
+
paddingHorizontal: theme.space[3],
|
|
148
|
+
borderRadius: theme.radii.base,
|
|
149
|
+
columnGap: theme.space[3]
|
|
150
|
+
}
|
|
151
|
+
}));
|
|
152
|
+
|
|
153
|
+
/** The grip's touch box — no theme dependency (a fixed design constant, same reasoning `BUTTON_SIZES`
|
|
154
|
+
* documents for its own plain-constant sizing), so this uses the untethered `createVariants`. */
|
|
155
|
+
export const reorderGripStructure = createVariants({
|
|
156
|
+
base: {
|
|
157
|
+
flexDirection: "column",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
justifyContent: "center",
|
|
160
|
+
rowGap: GRIP_BAR_GAP
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
/** One grip bar — pill-shaped via the theme's `radii.full`, so this needs the themed resolver. */
|
|
165
|
+
export const reorderGripBarStructure = createThemedVariants(theme => ({
|
|
166
|
+
base: {
|
|
167
|
+
width: GRIP_BAR_WIDTH,
|
|
168
|
+
height: GRIP_BAR_HEIGHT,
|
|
169
|
+
borderRadius: theme.radii.full
|
|
170
|
+
}
|
|
171
|
+
}));
|
|
172
|
+
//# sourceMappingURL=Reorder.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","createVariants","REORDER_ROW_HEIGHT","MIN_TOUCH_TARGET","slopFor","dimension","Math","max","ceil","GRIP_BAR_WIDTH","GRIP_BAR_HEIGHT","GRIP_BAR_GAP","GRIP_BOX","width","height","GRIP_HIT_SLOP","top","bottom","left","right","resolveReorderColors","colors","rowBackground","bg","surface","draggingRowBackground","raised","label","fg","default","grip","muted","gripDisabled","disabled","resolveReorderMoveState","index","count","upDisabled","downDisabled","moveItem","items","fromIndex","toIndex","length","target","min","next","moved","splice","resolveRowPitch","rowGap","resolveDragTargetIndex","startIndex","dy","rowPitch","itemCount","steps","round","resolveRowShift","rowIndex","targetIndex","reorderListStructure","theme","base","space","reorderRowStructure","flexDirection","alignItems","paddingHorizontal","borderRadius","radii","columnGap","reorderGripStructure","justifyContent","reorderGripBarStructure","full"],"sourceRoot":"../../../../src","sources":["modules/reorder/Reorder.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oB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BAAuB,GAAG1E,oBAAoB,CAAE8D,KAAY,KAAM;EAC7EC,IAAI,EAAE;IACJlD,KAAK,EAAEJ,cAAc;IACrBK,MAAM,EAAEJ,eAAe;IACvB2D,YAAY,EAAEP,KAAK,CAACQ,KAAK,CAACK;EAC5B;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/reorder`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The drag/shift math (`moveItem`, `resolveDragTargetIndex`, …) and the
|
|
6
|
+
* colour/structure resolvers stay internal — a consumer configures a Reorder through its props,
|
|
7
|
+
* never by importing its internals.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { Reorder } from "./Reorder.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Reorder"],"sourceRoot":"../../../../src","sources":["modules/reorder/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAW","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# select/ — a trigger + native-Modal option list, styled like an Input box
|
|
2
|
+
|
|
3
|
+
`Select` is a `Pressable` trigger (sized/bordered like an Input) that opens its options in React
|
|
4
|
+
Native's OWN `Modal` — imported directly from `"react-native"`, never the library's own `Modal`
|
|
5
|
+
COMPONENT (its rendered output/behaviour): Select still owns its option list's markup outright.
|
|
6
|
+
|
|
7
|
+
The one deliberate exception: on web, Select reads `../modal/ModalPortalContext` +
|
|
8
|
+
`../modal/renderWebPortal` — the same web-portal-containment mechanism `Modal` uses — so opening a
|
|
9
|
+
`ModalPortalProvider` containing an app also contains Select's option sheet. See
|
|
10
|
+
`../modal/MODULE.md`'s "Web portal mechanism" section for the full explanation; this is a plain
|
|
11
|
+
context + a stateless helper with no React-tree footprint of its own, not a dependency on the
|
|
12
|
+
`Modal` component.
|
|
13
|
+
|
|
14
|
+
## Files
|
|
15
|
+
|
|
16
|
+
| File | Role |
|
|
17
|
+
|------|------|
|
|
18
|
+
| `Select.tsx` | The component. Trigger + `Modal` composition, open/close state, focus handling. |
|
|
19
|
+
| `Select.variants.ts` | Pure resolvers (`SELECT_SIZES`, `resolveSelectTriggerColors`, `resolveSelectRowColors`, `resolveSelectAccessibility`) + the themed structural resolvers (`selectTriggerStructure`, `selectOverlayStructure`, `selectSheetStructure`, `selectRowStructure`). No React, no lucide. |
|
|
20
|
+
| `index.ts` | Public surface: `Select`, `SelectProps`, `SelectOption`, `SelectSize`. |
|
|
21
|
+
| `__tests__/Select.test.ts` | Pure: WCAG contrast (all brands × modes) + touch target + a11y contract. |
|
|
22
|
+
| `__tests__/Select.render.test.tsx` | Render: display, open/close, disabled gating, selection, backdrop dismiss, and the web-portal opt-in branch (mocking `renderWebPortal`). |
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Prop | Type | Default | Notes |
|
|
27
|
+
|------|------|---------|-------|
|
|
28
|
+
| `options` | `{ label: string; value: string }[]` | — | Required. |
|
|
29
|
+
| `value` | `string` | — | The currently selected option's `value`. |
|
|
30
|
+
| `onValueChange` | `(value: string) => void` | — | Required. Fired on row press; the menu closes right after. |
|
|
31
|
+
| `placeholder` | `string` | — | Shown when `value` matches no option. |
|
|
32
|
+
| `label` | `string` | — | Field label above the trigger; also folded into its accessible name. |
|
|
33
|
+
| `disabled` | `boolean` | `false` | Blocks opening the menu; dimmed like Button's disabled state. |
|
|
34
|
+
| `size` | `sm \| md \| lg` | `md` | 32 / 40 / 48 dp; short sizes reach 44 via `hitSlop`. |
|
|
35
|
+
| `containerStyle` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
36
|
+
| `testID` | `string` | — | Also seeds `${testID}-backdrop` and `${testID}-option-${value}`. |
|
|
37
|
+
|
|
38
|
+
No `icon` prop — the chevron/check glyphs are fixed to the component's own semantics, not
|
|
39
|
+
caller-configurable.
|
|
40
|
+
|
|
41
|
+
## Accessibility contract (WCAG)
|
|
42
|
+
|
|
43
|
+
- **2.5.x target size** — every trigger size reaches ≥ 44dp via `hitSlop`; option rows have a
|
|
44
|
+
44dp `minHeight` directly (they're list items, not a single control that can grow with slop).
|
|
45
|
+
- **4.1.2** — the trigger is `accessibilityRole="button"` with `accessibilityState.expanded`
|
|
46
|
+
tracking whether the option list is showing.
|
|
47
|
+
- **1.4.3** — trigger value/placeholder text, the field label, and option-row labels are measured
|
|
48
|
+
≥ 4.5:1 against their own fill (`bg.canvas` for the label, `bg.surface` for the trigger and every
|
|
49
|
+
row — row fill is constant across selection, see below).
|
|
50
|
+
- **1.4.11** — the trigger boundary (`border.interactive`, `border.focus` while focused/open) and
|
|
51
|
+
the active row's "check" glyph are measured ≥ 3:1.
|
|
52
|
+
- Selection is conveyed by the "check" glyph + `accessibilityState.selected`, never by a row
|
|
53
|
+
background swap: `bg.selected` isn't proven ≥ 4.5:1 against `fg.default` on every brand
|
|
54
|
+
(measured: fails on radiant/rosewood light), so `resolveSelectRowColors` keeps the row fill at
|
|
55
|
+
`bg.surface` for every row, selected or not.
|
|
56
|
+
- Each option row is `accessibilityRole="menuitem"` with `accessibilityState={{ selected }}`; the
|
|
57
|
+
"check" icon is the sighted echo of the same state, never the only signal.
|
|
58
|
+
- **2.3.3** — the menu's `animationType` is `"none"` instead of `"fade"` when
|
|
59
|
+
`useReducedMotion()` is true.
|
|
60
|
+
- Disabled is exempt from the contrast minimum (WCAG 1.4.3) — like Button, it's signalled by a
|
|
61
|
+
uniform `opacity: 0.5` dim rather than a separate, still-must-pass colour pair.
|
|
62
|
+
|
|
63
|
+
## Patterns copied from Button (the reference module)
|
|
64
|
+
|
|
65
|
+
1. **Structure vs colour split** — sizing/spacing/radius/border-width via `createThemedVariants`;
|
|
66
|
+
colour resolved from `RoleColors` per state, applied inline.
|
|
67
|
+
2. **Pure, testable resolvers** in `Select.variants.ts` — the WCAG + behaviour contract is
|
|
68
|
+
unit-tested against real palettes, never eyeballed.
|
|
69
|
+
3. **Closed-ish surface** — `size` is a closed union; `options`/`value`/`onValueChange` are the
|
|
70
|
+
data contract a select inherently needs, not a colour escape hatch.
|
|
71
|
+
4. `style` exception — Select exposes `containerStyle` (the documented exception for a component
|
|
72
|
+
wrapping a native primitive's outer box), not a second `style` prop.
|
|
73
|
+
|
|
74
|
+
## Known gaps
|
|
75
|
+
|
|
76
|
+
- No search/filter or multi-select — v1 is a single-select list, matching the spec this module
|
|
77
|
+
was built against. A future `Combobox`/`MultiSelect` would be a separate module, not a prop
|
|
78
|
+
added here (closed-prop-contract).
|
|
79
|
+
- The trigger's focus ring is a border-colour swap (`border.focus`), not Button's offset ring —
|
|
80
|
+
intentional: Select mimics Input-style focus conventions, which this library has not built an
|
|
81
|
+
`Input` module to confirm against yet (parallel build). Revisit if `Input` lands a different
|
|
82
|
+
convention and the two should be reconciled.
|
|
83
|
+
- No measured anchor position — the overlay always centers within its container, regardless of
|
|
84
|
+
where the trigger sits on screen, same as Menu's identical `justifyContent: "center"` overlay
|
|
85
|
+
(see `menu/MODULE.md`'s Known gaps). A real anchor would need `Button` to forward refs (it
|
|
86
|
+
doesn't today) plus per-platform measurement — a future `Popover`-style module, not a prop
|
|
87
|
+
added here.
|
|
88
|
+
|
|
89
|
+
## Performance
|
|
90
|
+
|
|
91
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). The option rows use host `Pressable`/`Text` plus this library's `Icon`, which only ever receives primitive props — nothing to memoize.
|