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,75 @@
|
|
|
1
|
+
# radio-group/ — a single-select group of radio rows
|
|
2
|
+
|
|
3
|
+
One component owns the whole group — there is no separate `Radio` export. Each option renders as
|
|
4
|
+
a row with a themed ring + dot (plain `View`s, no icon) and its own `accessibilityRole="radio"`;
|
|
5
|
+
the container carries `accessibilityRole="radiogroup"` so assistive tech announces the grouping
|
|
6
|
+
without collapsing the individually-focusable rows into one.
|
|
7
|
+
|
|
8
|
+
## Files
|
|
9
|
+
|
|
10
|
+
| File | Role |
|
|
11
|
+
|------|------|
|
|
12
|
+
| `RadioGroup.tsx` | The component. Row composition, press wiring, a11y wiring. |
|
|
13
|
+
| `RadioGroup.variants.ts` | Pure resolvers (`RADIO_GROUP_SIZES`, `resolveRadioGroupColors`, `resolveRadioRowAccessibility`) + the themed/untethemed structural resolvers (`radioGroupStructure`, `radioRowStructure`, `radioRingStructure`, `radioDotStructure`). No React, no lucide. |
|
|
14
|
+
| `index.ts` | Public surface: `RadioGroup`, `RadioGroupProps`, `RadioGroupOption`, `RadioGroupSize`. |
|
|
15
|
+
| `__tests__/RadioGroup.test.ts` | Pure: WCAG contrast (label-on-canvas, label-on-pressed-row, ring, dot — all brands × modes) + touch target + a11y contract. |
|
|
16
|
+
| `__tests__/RadioGroup.render.test.tsx` | Render: selection, press blocking when disabled, per-row a11y state. |
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Notes |
|
|
21
|
+
|------|------|---------|-------|
|
|
22
|
+
| `options` | `{ label: string; value: string }[]` | — | Rendered in order. |
|
|
23
|
+
| `value` | `string` | — | The selected option's `value`. |
|
|
24
|
+
| `onValueChange` | `(value: string) => void` | — | Fires with the pressed option's `value`; gated off while `disabled`. |
|
|
25
|
+
| `disabled` | `boolean` | `false` | Dims every row and blocks all presses. |
|
|
26
|
+
| `size` | `sm \| md` | `md` | 36 / 44 dp visual row height; `sm` reaches 44 via `hitSlop`. |
|
|
27
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost (the container `View`), applied exactly once, last. |
|
|
28
|
+
| `testID` | `string` | — | Container's testID; each row gets `` `${testID}-${option.value}` `` when set. |
|
|
29
|
+
|
|
30
|
+
No per-option `disabled` and no `tone` — this is a single-purpose, single-select control, not a
|
|
31
|
+
closed union of appearances. The ring is always `border.interactive`; the selected dot is always
|
|
32
|
+
`accent.solid`. That is the whole reason there is no `color`/`tone` prop to resolve.
|
|
33
|
+
|
|
34
|
+
## Accessibility contract (WCAG)
|
|
35
|
+
|
|
36
|
+
- **2.5.x target size** — every size reaches ≥ 44 dp: `sm`'s 36 dp row grows via `hitSlop`; `md` is
|
|
37
|
+
already 44 dp.
|
|
38
|
+
- **1.4.3** — the label uses `fg.default` on the canvas, measured ≥ 4.5:1 for every brand × mode.
|
|
39
|
+
- **1.4.11** — the ring boundary is `border.interactive` (≥ 3:1 on the canvas, every brand × mode);
|
|
40
|
+
the selected dot (`accent.solid`) is measured the same way as a non-text UI indicator.
|
|
41
|
+
- **4.1.2** — `accessibilityRole="radio"` per row, `accessibilityState={ checked, disabled }` (not
|
|
42
|
+
`selected` — that key is for `role="tab"`/`"option"`; Checkbox/Switch use the same `checked`
|
|
43
|
+
semantics for their own toggle roles);
|
|
44
|
+
`accessibilityRole="radiogroup"` on the container (a real, recognised RN role — no fallback
|
|
45
|
+
needed on this RN version). The container is intentionally left non-`accessible` so it groups
|
|
46
|
+
without swallowing the rows into one focus stop.
|
|
47
|
+
- **2.3.3** — n/a: nothing here animates. The dot appears/disappears by conditional render (not a
|
|
48
|
+
fade or a slide), so there is no transition for `useReducedMotion` to gate.
|
|
49
|
+
- Disabled rows are exempt from the contrast minimum (WCAG 1.4.3), so the uniform `opacity: 0.5`
|
|
50
|
+
dim is correct, same as Button.
|
|
51
|
+
|
|
52
|
+
## Patterns (copied from Button)
|
|
53
|
+
|
|
54
|
+
1. **Structure vs colour split.** Row height, ring/dot diameter, gaps, and border *width* are
|
|
55
|
+
`createThemedVariants`/`createVariants` (registered once per `(theme, size)`); the dot's size
|
|
56
|
+
alone has no theme dependency, so it uses the untethemed `createVariants`. Colour is resolved by
|
|
57
|
+
`resolveRadioGroupColors` from role tokens and applied inline over the structural style.
|
|
58
|
+
2. **Pure, testable resolvers** in `RadioGroup.variants.ts` (no React) so the WCAG + behaviour
|
|
59
|
+
contract is unit-tested against the real palettes — never eyeballed.
|
|
60
|
+
3. **No `{...rest}`, `style` once on the outermost node**, no icon (per spec — the ring/dot are
|
|
61
|
+
plain Views, not glyphs).
|
|
62
|
+
4. **Defence-in-depth press gating** — `onPress` is `undefined` while `disabled` (mirrors
|
|
63
|
+
`resolveButtonAccessibility`'s `blocked ? undefined : onPress`), on top of the `Pressable`
|
|
64
|
+
`disabled` prop.
|
|
65
|
+
|
|
66
|
+
## Known gaps
|
|
67
|
+
|
|
68
|
+
- No visible keyboard-focus ring (Button's `border.focus` ring pattern, WCAG 2.4.7) — left out of
|
|
69
|
+
v1 since touch is the primary input surface for this control; the same `onFocus`/`onBlur` +
|
|
70
|
+
`border.focus` pattern from `Button.tsx` would extend cleanly here if a future task needs it for
|
|
71
|
+
external-keyboard / RN Web use.
|
|
72
|
+
|
|
73
|
+
## Performance
|
|
74
|
+
|
|
75
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). The `options.map()` renders host `Pressable`/`View`/`Text`, not a library child component, so the inline per-row `onPress`/style closures were left as-is.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* RadioGroup — one component owns the whole group; there is no separate `Radio` export. Each
|
|
5
|
+
* option is a row (ring + dot drawn with plain Views, no icon) that carries its own
|
|
6
|
+
* `accessibilityRole="radio"`, wrapped in a container carrying `accessibilityRole="radiogroup"` so
|
|
7
|
+
* assistive tech announces the grouping without collapsing the individually-focusable rows into one.
|
|
8
|
+
*
|
|
9
|
+
* No animation anywhere (the dot appears/disappears by conditional render, not a fade or a move),
|
|
10
|
+
* so there is nothing for `useReducedMotion` (WCAG 2.3.3) to gate — unlike Button's press fade.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo } from "react";
|
|
14
|
+
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
15
|
+
import { useTheme } from "../../theme/index.js";
|
|
16
|
+
import { RADIO_GROUP_SIZES, radioDotStructure, radioGroupStructure, radioRingStructure, radioRowStructure, resolveRadioGroupColors, resolveRadioRowAccessibility } from "./RadioGroup.variants.js";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
export const RadioGroup = /*#__PURE__*/memo(function RadioGroup({
|
|
19
|
+
options,
|
|
20
|
+
value,
|
|
21
|
+
onValueChange,
|
|
22
|
+
disabled = false,
|
|
23
|
+
size = "md",
|
|
24
|
+
style,
|
|
25
|
+
testID
|
|
26
|
+
}) {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const spec = RADIO_GROUP_SIZES[size];
|
|
29
|
+
const colors = resolveRadioGroupColors(theme.colors);
|
|
30
|
+
return /*#__PURE__*/_jsx(View, {
|
|
31
|
+
testID: testID,
|
|
32
|
+
accessibilityRole: "radiogroup",
|
|
33
|
+
style: [radioGroupStructure(theme, {
|
|
34
|
+
size
|
|
35
|
+
}), style],
|
|
36
|
+
children: options.map(option => {
|
|
37
|
+
const selected = option.value === value;
|
|
38
|
+
const a11y = resolveRadioRowAccessibility({
|
|
39
|
+
selected,
|
|
40
|
+
disabled
|
|
41
|
+
});
|
|
42
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
43
|
+
testID: testID ? `${testID}-${option.value}` : undefined,
|
|
44
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
45
|
+
accessibilityState: a11y.accessibilityState,
|
|
46
|
+
accessibilityLabel: option.label,
|
|
47
|
+
disabled: a11y.disabled,
|
|
48
|
+
onPress: disabled ? undefined : () => onValueChange(option.value),
|
|
49
|
+
hitSlop: spec.hitSlop,
|
|
50
|
+
style: ({
|
|
51
|
+
pressed
|
|
52
|
+
}) => [radioRowStructure(theme, {
|
|
53
|
+
size
|
|
54
|
+
}), pressed && !disabled && {
|
|
55
|
+
backgroundColor: colors.pressedRow
|
|
56
|
+
}, disabled && styles.dimmed],
|
|
57
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
58
|
+
style: [radioRingStructure(theme, {
|
|
59
|
+
size
|
|
60
|
+
}), {
|
|
61
|
+
borderColor: colors.ring
|
|
62
|
+
}],
|
|
63
|
+
children: selected && /*#__PURE__*/_jsx(View, {
|
|
64
|
+
style: [radioDotStructure({
|
|
65
|
+
size
|
|
66
|
+
}), {
|
|
67
|
+
backgroundColor: colors.dot
|
|
68
|
+
}]
|
|
69
|
+
})
|
|
70
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
71
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
72
|
+
fontSize: spec.fontSize,
|
|
73
|
+
color: colors.label
|
|
74
|
+
}],
|
|
75
|
+
children: option.label
|
|
76
|
+
})]
|
|
77
|
+
}, option.value);
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
const styles = StyleSheet.create({
|
|
82
|
+
// A disabled row is exempt from the contrast minimum (WCAG 1.4.3), so a uniform dim is correct.
|
|
83
|
+
dimmed: {
|
|
84
|
+
opacity: 0.5
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","Pressable","StyleSheet","Text","View","useTheme","RADIO_GROUP_SIZES","radioDotStructure","radioGroupStructure","radioRingStructure","radioRowStructure","resolveRadioGroupColors","resolveRadioRowAccessibility","jsx","_jsx","jsxs","_jsxs","RadioGroup","options","value","onValueChange","disabled","size","style","testID","theme","spec","colors","accessibilityRole","children","map","option","selected","a11y","undefined","accessibilityState","accessibilityLabel","label","onPress","hitSlop","pressed","backgroundColor","pressedRow","styles","dimmed","borderColor","ring","dot","fontStyleForWeight","fontWeights","regular","fontSize","color","create","opacity"],"sourceRoot":"../../../../src","sources":["modules/radio-group/RadioGroup.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* RadioGroup's style + behaviour resolution — pure, React/lucide-free, same split as Button:
|
|
5
|
+
* - STRUCTURE (rowGap, row/ring/dot sizing, border WIDTH) lives in `createThemedVariants` /
|
|
6
|
+
* `createVariants` below, registered once per (theme, size) — never rebuilt per render.
|
|
7
|
+
* - COLOUR is resolved from the theme's ROLE colours (`resolveRadioGroupColors`), never a raw hex:
|
|
8
|
+
* the outer ring is always `border.interactive`, the selected dot is always `accent.solid`.
|
|
9
|
+
* - `resolveRadioRowAccessibility` derives the per-row a11y surface purely, so the
|
|
10
|
+
* "selected"/"disabled" contract is unit-testable without rendering React Native.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { createThemedVariants, createVariants } from "../../core/style/index.js";
|
|
14
|
+
/** Same floor as Button — Apple HIG minimum and WCAG 2.5.5 (AAA). */
|
|
15
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
16
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
17
|
+
/**
|
|
18
|
+
* RadioGroup-specific dimensions. Kept a plain constant — no theme dependency — so the hit-target
|
|
19
|
+
* test can assert `rowMinHeight + 2·hitSlop ≥ 44` without a provider, same as `BUTTON_SIZES`.
|
|
20
|
+
*/
|
|
21
|
+
export const RADIO_GROUP_SIZES = {
|
|
22
|
+
sm: {
|
|
23
|
+
rowMinHeight: 36,
|
|
24
|
+
ringSize: 18,
|
|
25
|
+
dotSize: 8,
|
|
26
|
+
fontSize: 14,
|
|
27
|
+
hitSlop: slopFor(36)
|
|
28
|
+
},
|
|
29
|
+
md: {
|
|
30
|
+
rowMinHeight: 44,
|
|
31
|
+
ringSize: 20,
|
|
32
|
+
dotSize: 10,
|
|
33
|
+
fontSize: 16,
|
|
34
|
+
hitSlop: slopFor(44)
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Maps the theme's role colours onto the group's fixed visual roles. There is no per-row tone —
|
|
39
|
+
* every ring is the same neutral interactive outline, and the selected dot is always the accent —
|
|
40
|
+
* so, unlike Button, this has no closed union to resolve; it is pure indirection into the roles.
|
|
41
|
+
*/
|
|
42
|
+
export function resolveRadioGroupColors(colors) {
|
|
43
|
+
return {
|
|
44
|
+
ring: colors.border.interactive,
|
|
45
|
+
dot: colors.accent.solid,
|
|
46
|
+
label: colors.fg.default,
|
|
47
|
+
// `bg.sunken` (a pale neutral tint), NOT `bg.hover`: measured, `bg.hover`'s saturated mid-tone
|
|
48
|
+
// drops the brand-tinted label below 4.5:1 on 4 of 8 brands in light mode — same class of bug
|
|
49
|
+
// Button's "neutral" tone documents fixing the same way.
|
|
50
|
+
pressedRow: colors.bg.sunken
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Derives one row's accessibility surface purely, mirroring `resolveButtonAccessibility`. Reports
|
|
55
|
+
* `accessibilityState.checked` — not `.selected` (that key is for role="tab"/"option"; a radio's
|
|
56
|
+
* checked state is `checked`, same as this repo's Checkbox/Switch) — so the rendered `disabled`
|
|
57
|
+
* prop and the announced `accessibilityState.disabled` always agree, so a screen reader never
|
|
58
|
+
* hears a state the touch handling contradicts.
|
|
59
|
+
*/
|
|
60
|
+
export function resolveRadioRowAccessibility(input) {
|
|
61
|
+
return {
|
|
62
|
+
accessibilityRole: "radio",
|
|
63
|
+
accessibilityState: {
|
|
64
|
+
checked: input.selected,
|
|
65
|
+
disabled: input.disabled
|
|
66
|
+
},
|
|
67
|
+
disabled: input.disabled
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Gap between rows. Structural, theme-scaled, registered once per (theme, size). */
|
|
72
|
+
export const radioGroupStructure = createThemedVariants(theme => ({
|
|
73
|
+
variants: {
|
|
74
|
+
size: {
|
|
75
|
+
sm: {
|
|
76
|
+
rowGap: theme.space[1]
|
|
77
|
+
},
|
|
78
|
+
md: {
|
|
79
|
+
rowGap: theme.space[2]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
defaultVariants: {
|
|
84
|
+
size: "md"
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* One row's layout — height, gap to the label, inset padding, and the corner radius the pressed
|
|
90
|
+
* background rounds to. Colour (the pressed fill) is resolved and applied inline over this.
|
|
91
|
+
*/
|
|
92
|
+
export const radioRowStructure = createThemedVariants(theme => ({
|
|
93
|
+
base: {
|
|
94
|
+
flexDirection: "row",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
borderRadius: theme.radii.base
|
|
97
|
+
},
|
|
98
|
+
variants: {
|
|
99
|
+
size: {
|
|
100
|
+
sm: {
|
|
101
|
+
minHeight: RADIO_GROUP_SIZES.sm.rowMinHeight,
|
|
102
|
+
columnGap: theme.space[2],
|
|
103
|
+
paddingHorizontal: theme.space[2]
|
|
104
|
+
},
|
|
105
|
+
md: {
|
|
106
|
+
minHeight: RADIO_GROUP_SIZES.md.rowMinHeight,
|
|
107
|
+
columnGap: theme.space[3],
|
|
108
|
+
paddingHorizontal: theme.space[2]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
defaultVariants: {
|
|
113
|
+
size: "md"
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
/** The outer ring. Border WIDTH is theme-scaled; the diameter is the component's own constant. */
|
|
118
|
+
export const radioRingStructure = createThemedVariants(theme => ({
|
|
119
|
+
base: {
|
|
120
|
+
alignItems: "center",
|
|
121
|
+
justifyContent: "center",
|
|
122
|
+
borderWidth: theme.borderWidths.thick
|
|
123
|
+
},
|
|
124
|
+
variants: {
|
|
125
|
+
size: {
|
|
126
|
+
sm: {
|
|
127
|
+
width: RADIO_GROUP_SIZES.sm.ringSize,
|
|
128
|
+
height: RADIO_GROUP_SIZES.sm.ringSize,
|
|
129
|
+
borderRadius: RADIO_GROUP_SIZES.sm.ringSize / 2
|
|
130
|
+
},
|
|
131
|
+
md: {
|
|
132
|
+
width: RADIO_GROUP_SIZES.md.ringSize,
|
|
133
|
+
height: RADIO_GROUP_SIZES.md.ringSize,
|
|
134
|
+
borderRadius: RADIO_GROUP_SIZES.md.ringSize / 2
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: {
|
|
139
|
+
size: "md"
|
|
140
|
+
}
|
|
141
|
+
}));
|
|
142
|
+
|
|
143
|
+
/** The inner selected dot. No theme dependency at all, so it uses the untethemed resolver. */
|
|
144
|
+
export const radioDotStructure = createVariants({
|
|
145
|
+
variants: {
|
|
146
|
+
size: {
|
|
147
|
+
sm: {
|
|
148
|
+
width: RADIO_GROUP_SIZES.sm.dotSize,
|
|
149
|
+
height: RADIO_GROUP_SIZES.sm.dotSize,
|
|
150
|
+
borderRadius: RADIO_GROUP_SIZES.sm.dotSize / 2
|
|
151
|
+
},
|
|
152
|
+
md: {
|
|
153
|
+
width: RADIO_GROUP_SIZES.md.dotSize,
|
|
154
|
+
height: RADIO_GROUP_SIZES.md.dotSize,
|
|
155
|
+
borderRadius: RADIO_GROUP_SIZES.md.dotSize / 2
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
defaultVariants: {
|
|
160
|
+
size: "md"
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
//# sourceMappingURL=RadioGroup.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","createVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","RADIO_GROUP_SIZES","sm","rowMinHeight","ringSize","dotSize","fontSize","hitSlop","md","resolveRadioGroupColors","colors","ring","border","interactive","dot","accent","solid","label","fg","default","pressedRow","bg","sunken","resolveRadioRowAccessibility","input","accessibilityRole","accessibilityState","checked","selected","disabled","radioGroupStructure","theme","variants","size","rowGap","space","defaultVariants","radioRowStructure","base","flexDirection","alignItems","borderRadius","radii","minHeight","columnGap","paddingHorizontal","radioRingStructure","justifyContent","borderWidth","borderWidths","thick","width","radioDotStructure"],"sourceRoot":"../../../../src","sources":["modules/radio-group/RadioGroup.variants.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/radio-group`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The visual/behaviour resolvers (`resolveRadioGroupColors`,
|
|
6
|
+
* `RADIO_GROUP_SIZES`, …) stay internal — a consumer configures a RadioGroup through its props,
|
|
7
|
+
* never by importing its internals.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { RadioGroup } from "./RadioGroup.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RadioGroup"],"sourceRoot":"../../../../src","sources":["modules/radio-group/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# reorder/ — a drag-to-reorder list with a required non-drag alternative
|
|
2
|
+
|
|
3
|
+
`Reorder` renders a vertical list of `{ id, label }` items, each with a drag "grip" glyph on the
|
|
4
|
+
left and a label. Dragging the grip reorders the list live, with the other rows sliding out of the
|
|
5
|
+
way to preview the drop position. Wave 3: hand-built on `PanResponder` + `Animated` only — no new
|
|
6
|
+
dependency.
|
|
7
|
+
|
|
8
|
+
## Files
|
|
9
|
+
|
|
10
|
+
| File | Role |
|
|
11
|
+
|------|------|
|
|
12
|
+
| `Reorder.tsx` | The component. `PanResponder` wiring on the grip only, the ephemeral drag-preview state, and the two `Button` up/down alternatives. `ReorderRow` is a private sub-component (its shift-settle effect needs a per-row hook instance, and Rules of Hooks forbid a hook inside the `.map()` body); each row's `shift` `Animated.Value` itself is owned by `Reorder`, keyed by `item.id` in a `Map`, so `handleDragEnd` can reset every row's `shift` to 0 synchronously on drop. |
|
|
13
|
+
| `Reorder.variants.ts` | Pure resolvers (`resolveReorderColors`, `resolveReorderMoveState`, `moveItem`, `resolveRowPitch`, `resolveDragTargetIndex`, `resolveRowShift`) + the themed/untethered structural resolvers. No React, no lucide. |
|
|
14
|
+
| `index.ts` | Public surface: `Reorder`, `ReorderProps`, `ReorderItem`. |
|
|
15
|
+
| `__tests__/Reorder.test.ts` | Pure: WCAG contrast (all brands × modes), grip touch target, and the drag/alternative-path arithmetic (`moveItem`, `resolveRowPitch`, `resolveDragTargetIndex`, `resolveRowShift`, `resolveReorderMoveState`). |
|
|
16
|
+
| `__tests__/Reorder.render.test.tsx` | Render: label rendering, grip hidden from a11y, grip start/move gating, the WCAG 2.5.7 alternative reordering the first/last/a middle item both directions, disabled gating, testID wiring, reduced-motion shift animation, and a real (fabricated-touch-history) grant/move/release regression test proving a previewed row's `shift` resets to 0 synchronously on drop. |
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Notes |
|
|
21
|
+
|------|------|---------|-------|
|
|
22
|
+
| `items` | `{ id: string; label: string }[]` | — | Required. Rendered top to bottom, in array order. Fully controlled — `Reorder` never mutates this array itself. |
|
|
23
|
+
| `onReorder` | `(next: { id: string; label: string }[]) => void` | — | Required. Fired on drag release (only if the position actually changed) AND on every up/down button press. |
|
|
24
|
+
| `disabled` | `boolean` | `false` | Blocks both interaction paths: gates a new drag from starting and disables every move button. |
|
|
25
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
26
|
+
| `testID` | `string` | — | Seeds `${testID}-item-<i>`, `-grip`, `-move-up`, `-move-down` per row. |
|
|
27
|
+
|
|
28
|
+
No `variant`/`size`/`tone` — every row reads identically (same reasoning `Timeline`'s minimal prop
|
|
29
|
+
set documents for its own tone-less component); the only per-row state is structural (dragging or
|
|
30
|
+
not), not a caller-facing appearance choice.
|
|
31
|
+
|
|
32
|
+
## Interaction model
|
|
33
|
+
|
|
34
|
+
- **Drag path**: `PanResponder` lives on the grip `View` only (not the row), so the label never
|
|
35
|
+
fights the gesture. While dragging, `Reorder` tracks only `{ startIndex, targetIndex }` — the
|
|
36
|
+
`items` array itself is NEVER mutated mid-drag. Every other row's on-screen offset is a pure
|
|
37
|
+
function of that pair (`resolveRowShift`); the dragged row's own offset follows the raw touch `dy`
|
|
38
|
+
via a shared `Animated.Value`. On release, `moveItem(items, startIndex, targetIndex)` is computed
|
|
39
|
+
once and handed to `onReorder` — a no-op if the position didn't change.
|
|
40
|
+
- **Row pitch**: the drag math (`resolveDragTargetIndex`, `resolveRowShift`) is driven by
|
|
41
|
+
`resolveRowPitch(theme.space[2])` — `REORDER_ROW_HEIGHT` (56dp) PLUS the list's `rowGap` (the same
|
|
42
|
+
`theme.space[2]` token `reorderListStructure` applies), never `REORDER_ROW_HEIGHT` alone. That gap
|
|
43
|
+
is real on-screen distance between row tops; a pitch that ignores it flips the target row early and
|
|
44
|
+
undershoots the preview shift by `rowGap` per row.
|
|
45
|
+
- **Shift reset on drop**: each row's `shift` `Animated.Value` is owned by `Reorder` (a `Map` keyed by
|
|
46
|
+
`item.id`), not by `ReorderRow` itself, so `handleDragEnd` can call `setValue(0)` on every row
|
|
47
|
+
synchronously, in the same tick the array reorder commits — BEFORE the `dragState → null` update
|
|
48
|
+
flips every row's `shiftTarget` prop to 0. Because React relocates a reordered row instantly via its
|
|
49
|
+
stable `item.id` key, a row still holding a stale mid-drag `shift` at that instant would visibly
|
|
50
|
+
jump to its new slot and then animate back — the synchronous reset is what prevents that.
|
|
51
|
+
- **`onReorder` is called as a plain statement in `handleDragEnd`, never inside a `setDragState`
|
|
52
|
+
updater function.** `useState` updaters must be pure; nesting the consumer's own state setter
|
|
53
|
+
(`onReorder`, e.g. `setItems`) inside `setDragState((prev) => …)` let React invoke it while
|
|
54
|
+
processing `Reorder`'s own render, surfacing as "Cannot update a component while rendering a
|
|
55
|
+
different component" (fixed — was a real bug, not a lint nit). `handleDragEnd` reads the current
|
|
56
|
+
value via a `dragStateRef` mirror (kept in sync every render) rather than closing over `dragState`
|
|
57
|
+
directly — see "Performance" below for why the callback itself must NOT depend on `dragState` —
|
|
58
|
+
calls `onReorder` first if the position changed, then `setDragState(null)` — same synchronous
|
|
59
|
+
ordering relative to the `shiftValues` reset above, so the shift-reset-on-drop fix is unaffected.
|
|
60
|
+
- **Accessible alternative (WCAG 2.5.7 — required, not optional)**: every row also renders two
|
|
61
|
+
`Button` icon-only presses, "Move `<label>` up" / "Move `<label>` down", reusing the shipped
|
|
62
|
+
`chevron-up`/`chevron-down` `IconName`s. Each is a real `Button` (`variant="ghost" size="sm"
|
|
63
|
+
tone="neutral"`) — a real `accessibilityRole="button"`, Button's own verified ≥44dp touch target,
|
|
64
|
+
and Button's own disabled/focus/press contract, all reused rather than reimplemented. Disabled at
|
|
65
|
+
the list's own start/end via `resolveReorderMoveState`, and by the list's `disabled` prop
|
|
66
|
+
everywhere. This path calls the exact same `moveItem` the drag path calls, so both are guaranteed
|
|
67
|
+
to agree on the result for the same intent.
|
|
68
|
+
- **Grip glyph**: no `IconName` in the closed 22-name set represents a drag handle, and that set is
|
|
69
|
+
never extended for one component (per the build brief) — the grip is three plain themed `View`
|
|
70
|
+
bars (`fg.muted`, `radii.full`), not an icon.
|
|
71
|
+
|
|
72
|
+
## Accessibility contract (WCAG)
|
|
73
|
+
|
|
74
|
+
- **2.5.7 (Dragging Movements)** — the up/down `Button`s ARE the required non-dragging alternative;
|
|
75
|
+
see "Interaction model" above. Verified end-to-end in `Reorder.render.test.tsx`: pressing "Move
|
|
76
|
+
Alpha down" (first item), "Move Gamma up" (last item), and "Move Beta up"/"Move Beta down" (a
|
|
77
|
+
middle item, both directions) each produce the exact expected resulting array — no drag involved.
|
|
78
|
+
- **Grip hidden from assistive tech** — `PanResponder` gestures are invisible to a screen reader;
|
|
79
|
+
exposing the grip as a focusable-but-non-operable element would be worse than not exposing it at
|
|
80
|
+
all. It carries `accessibilityElementsHidden` + `importantForAccessibility="no-hide-descendants"`
|
|
81
|
+
(the same pairing `Timeline`'s decorative connector uses) — the up/down `Button`s are the one real
|
|
82
|
+
accessible affordance for reordering.
|
|
83
|
+
- **2.5.5 / 2.5.8 (target size)** — the grip's visual footprint (three 20×3dp bars + gaps) reaches
|
|
84
|
+
44dp via `hitSlop` on BOTH axes (`GRIP_HIT_SLOP`), same discipline as `Button`'s own `hitSlop`
|
|
85
|
+
extended to two dimensions. The move buttons reuse `Button`'s own already-verified `sm` touch
|
|
86
|
+
target (32dp visual + 6dp slop each side = 44dp) — not re-tested here, since that contract lives
|
|
87
|
+
and is proven in `button/__tests__/Button.test.ts`.
|
|
88
|
+
- **1.4.3** — the row label (`fg.default`) is measured ≥ 4.5:1 against BOTH the resting row fill
|
|
89
|
+
(`bg.surface`) and the dragging row fill (`bg.raised`), for all 8 brands × both modes.
|
|
90
|
+
- **1.4.11** — the grip glyph (`fg.muted`) is measured ≥ 3:1 against both row fills as a graphical
|
|
91
|
+
UI affordance, same reasoning `Spinner.variants.ts` documents for its own "Graphical Objects"
|
|
92
|
+
clause. The grip's disabled colour (`fg.disabled`) is NOT contrast-gated — a disabled control is
|
|
93
|
+
exempt from the minimum, same reasoning `Button`'s `dimmed` state documents.
|
|
94
|
+
- **2.3.3 (reduced motion)** — the row-shift preview is skipped (`Animated.Value.setValue`, no
|
|
95
|
+
`Animated.timing`) when `useReducedMotion()` is true, the identical pattern
|
|
96
|
+
`Accordion`'s chevron rotation uses, verified the same way (`jest.spyOn(Animated, "timing")`).
|
|
97
|
+
|
|
98
|
+
## Why the drag never mutates `items` mid-gesture
|
|
99
|
+
|
|
100
|
+
`Reorder` is fully controlled — the consumer owns `items` via `onReorder`. Mutating a local copy
|
|
101
|
+
mid-drag would create a second source of truth that has to be reconciled with the next `items` prop
|
|
102
|
+
the consumer sends back, and — because the dragged row's `key` is stable (`item.id`) — reordering the
|
|
103
|
+
underlying array WOULD re-mount nothing, but WOULD instantly reset every row's `index` prop mid-
|
|
104
|
+
gesture, which is exactly what the shift-preview math is built to avoid needing. Instead, only the
|
|
105
|
+
ephemeral `{ startIndex, targetIndex }` pair changes during a drag, and `moveItem` is computed once,
|
|
106
|
+
on release. Because the preview's `resolveRowShift` and the commit's `moveItem` share the same splice
|
|
107
|
+
semantics, the row a shifted neighbour vacated is exactly where the dragged row lands — no jump when
|
|
108
|
+
the consumer's new `items` prop arrives.
|
|
109
|
+
|
|
110
|
+
## Known gaps
|
|
111
|
+
|
|
112
|
+
- The live drag gesture's EXACT arithmetic is not re-derived from a fabricated `gestureState` end to
|
|
113
|
+
end: `PanResponder`'s internal handlers reconstruct `gestureState.dy` from `event.touchHistory`'s
|
|
114
|
+
centroid bookkeeping, and asserting a specific `dy` from fabricated touch history would mostly test
|
|
115
|
+
that reconstruction, not `Reorder` — so the exact arithmetic (`resolveDragTargetIndex`,
|
|
116
|
+
`resolveRowShift`, `moveItem`) is exhaustively pure-tested instead. What IS verified on the real
|
|
117
|
+
rendered node: `onStartShouldSetResponder`/`onMoveShouldSetResponder` (the gating predicates, which
|
|
118
|
+
read no touch data) correctly return `false` when `disabled`; a real fabricated-touch-history
|
|
119
|
+
grant/move/release (using a saturating `dy`, so it never depends on an exact row boundary) proves
|
|
120
|
+
the shift-reset-on-drop fix; and every other consequence of a real drag beyond that is a manual/QA
|
|
121
|
+
pass on-device before release.
|
|
122
|
+
- No `variant`/`size` — a single fixed 56dp row height (`REORDER_ROW_HEIGHT`) and one visual style,
|
|
123
|
+
per the build brief's preference for a fixed height over per-row `onLayout` measurement.
|
|
124
|
+
- The dragged row is visually lifted via `elevation.md` + a raised fill + `zIndex`, not a scale
|
|
125
|
+
transform — the build brief left this as an implementation choice ("slightly scaled or just
|
|
126
|
+
elevated — your call"); scale was skipped to avoid a second `Animated.Value` per row for a purely
|
|
127
|
+
decorative flourish.
|
|
128
|
+
|
|
129
|
+
## Performance
|
|
130
|
+
|
|
131
|
+
`Reorder` (exported) and the internal `ReorderRow` are both wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`) — the literal "Reorder rows" case CLAUDE.md's Performance section calls out by name; without memoizing the row itself, memoizing its callbacks would have no effect, since `Reorder` re-renders every row on each drag-move tick. `colors` is `useMemo`'d; `handleDragStart`/`handleDragMove`/`handleMove`/`handleMoveUp`/`handleMoveDown` are `useCallback`'d with stable deps, so a row whose own props didn't change skips re-rendering during a drag. `handleDragEnd` needs the CURRENT `dragState` at drop time but must NOT be recreated on every drag-target transition (that would hand every row a changed `onDragEnd` reference and defeat their memo on the exact hot path this pass targets) — it reads `dragState` through a `dragStateRef` mirror instead of depending on `dragState` directly, so its own identity stays stable across a whole drag. `onMoveUp`/`onMoveDown` are now `(index: number) => void` (was `() => void`) so one stable per-list callback replaces the old per-row `() => handleMove(index, index ± 1)` closure; `ReorderRow` itself binds its own `index` via `handlePressUp`/`handlePressDown` so `Button` (a library child) also gets a stable `onPress`.
|