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,61 @@
|
|
|
1
|
+
# divider/ — a hairline separator between sections of content
|
|
2
|
+
|
|
3
|
+
`Divider` renders a single themed hairline, horizontal or vertical. It takes no children, no
|
|
4
|
+
interaction, and no text of its own.
|
|
5
|
+
|
|
6
|
+
## Files
|
|
7
|
+
|
|
8
|
+
| File | Role |
|
|
9
|
+
|------|------|
|
|
10
|
+
| `Divider.tsx` | The component. Resolves the orientation's structural style + the decorative colour, applies them inline, `style` last. |
|
|
11
|
+
| `Divider.variants.ts` | Pure resolver (`resolveDividerColor`) + the themed structural variant resolver `dividerStructure`. No React. |
|
|
12
|
+
| `index.ts` | Public surface: `Divider`, `DividerProps`, `DividerOrientation`. |
|
|
13
|
+
| `__tests__/Divider.test.ts` | Pure: colour-resolution mapping (all brands × modes) + a regression guard against silently upgrading to a guaranteed-3:1 border token. |
|
|
14
|
+
| `__tests__/Divider.render.test.tsx` | Render: `testID` forwards, each orientation resolves the theme-correct thickness/span, the colour matches the pure mapping, `accessibilityRole="none"`, consumer `style` applies last. |
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Notes |
|
|
19
|
+
|------|------|---------|-------|
|
|
20
|
+
| `orientation` | `horizontal \| vertical` | `horizontal` | Closed union. `horizontal` = full width, `borderWidths.thin` tall. `vertical` = `alignSelf: "stretch"`, `borderWidths.thin` wide. |
|
|
21
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
22
|
+
| `testID` | `string` | — | Forwarded to the outermost `View`. |
|
|
23
|
+
|
|
24
|
+
## Why the colour is `border.default`, not `border.interactive`
|
|
25
|
+
|
|
26
|
+
`Card`'s `outline` variant and `Button`'s `outline` variant both deliberately reach past
|
|
27
|
+
`colors.border.default` for `colors.border.interactive`, because those borders are real UI
|
|
28
|
+
boundaries that must clear WCAG 1.4.11's 3:1 floor. A `Divider` is the opposite case: it draws no
|
|
29
|
+
interactive boundary and conveys no information of its own (removing it changes spacing, not
|
|
30
|
+
meaning), so 1.4.11 — which binds a "User Interface Component" or a "Graphical Object … required to
|
|
31
|
+
understand the content" — does not apply to it. `border.default` is the intended decorative rung for
|
|
32
|
+
exactly this job; it measures ~1.0–1.4:1 against `bg.canvas` on every brand × mode (same figures
|
|
33
|
+
`Card.variants.ts` documents for its own un-bordered variants), which is the correct subtle
|
|
34
|
+
shadcn-style rule, not an oversight. `Divider.test.ts` asserts the mapping itself (never a raw ramp,
|
|
35
|
+
never accidentally the guaranteed-3:1 `interactive`/`focus` tokens) rather than gating it at 3:1.
|
|
36
|
+
|
|
37
|
+
## Accessibility contract (WCAG)
|
|
38
|
+
|
|
39
|
+
- **`accessibilityRole="none"`** — a divider carries no information and has no children to inherit
|
|
40
|
+
semantics from (unlike `Card`, which reaches the same "no role" conclusion for a different reason
|
|
41
|
+
— see `card/MODULE.md`), so it is explicitly excluded from the accessibility tree.
|
|
42
|
+
- **1.4.11** — N/A by design; see above. There is no boundary being asserted.
|
|
43
|
+
- **1.4.3** — N/A. Divider renders no text.
|
|
44
|
+
- **2.3.3 (reduced motion)** — N/A. Divider has no animation.
|
|
45
|
+
- **Touch target (2.5.x)** — N/A. Divider is not interactive.
|
|
46
|
+
|
|
47
|
+
## Patterns copied from `button/` (the reference module) and `card/`
|
|
48
|
+
|
|
49
|
+
1. **Structure vs colour split.** Static/theme-numeric structure (thickness) → `createThemedVariants`
|
|
50
|
+
(registered once per theme). Colour → resolved from role tokens, applied inline.
|
|
51
|
+
2. **Pure, testable resolver** in `Divider.variants.ts` (no React) so the colour-mapping contract is
|
|
52
|
+
unit-tested against real palettes — never eyeballed.
|
|
53
|
+
3. **Closed union only** (`orientation`), `style: LayoutStyle` last and once, no `{...rest}`.
|
|
54
|
+
|
|
55
|
+
## Known gaps
|
|
56
|
+
|
|
57
|
+
None — no icon, no new theme token, no new core helper needed for this component.
|
|
58
|
+
|
|
59
|
+
## Performance
|
|
60
|
+
|
|
61
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`) — renamed to `DividerImpl` internally, exported as `Divider = memo(DividerImpl)`. No children, no library child components — nothing else to memoize.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/divider`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveDividerColor`, `dividerStructure`) stay internal —
|
|
6
|
+
* a consumer configures a Divider through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Divider } from "./Divider.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Divider"],"sourceRoot":"../../../../src","sources":["modules/divider/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAW","ignoreList":[]}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Drawer — a bottom-sheet-style panel built directly on REACT NATIVE'S OWN `Modal`, the same
|
|
5
|
+
* "transient overlay, raw RN Modal" pattern Select already established for this library (never this
|
|
6
|
+
* library's own `../modal` COMPONENT, a persistent title/children dialog — a different shape). The one
|
|
7
|
+
* deliberate exception, same as Select's, is the web portal mechanism below — a plain context + a
|
|
8
|
+
* stateless helper, not the `Modal` component's rendered output.
|
|
9
|
+
*
|
|
10
|
+
* The panel slides up from the bottom and the backdrop fades in, both driven by ONE Animated
|
|
11
|
+
* `progress` value — never RN Modal's native `animationType`, which can only pick a single discrete
|
|
12
|
+
* transition for the whole native surface and can't keep a custom-Animated backdrop opacity in
|
|
13
|
+
* lockstep with a custom panel slide. `animationType` is therefore always `"none"` here; this module
|
|
14
|
+
* owns the whole transition, so it can collapse to an instant snap under reduced motion (WCAG 2.3.3)
|
|
15
|
+
* without ever showing a frozen half-animated frame.
|
|
16
|
+
*
|
|
17
|
+
* Because RN's `<Modal>` only hides its children once native dismissal completes (or the component
|
|
18
|
+
* unmounts) — the same fact Modal.tsx's own top comment documents — the sheet stays internally
|
|
19
|
+
* "mounted" for one more animation tick after `visible` goes false, so the exit slide/fade actually
|
|
20
|
+
* plays before the native Modal disappears. A plain `setTimeout` (not the `Animated.timing`
|
|
21
|
+
* completion callback, which rides `requestAnimationFrame`) unmounts it afterwards — the same
|
|
22
|
+
* determinism fix `Toast.tsx`'s `hide()` uses, for the same reason (a RAF callback doesn't resolve on
|
|
23
|
+
* a predictable jest-fake-timer tick).
|
|
24
|
+
*
|
|
25
|
+
* Fully controlled: the caller owns `visible` and reacts to `onRequestClose`, which fires from the
|
|
26
|
+
* backdrop press, the Android hardware back button (RN Modal's own `onRequestClose` — free), and, via
|
|
27
|
+
* `onAccessibilityEscape` on the panel, iOS VoiceOver's two-finger-Z escape gesture — identical wiring
|
|
28
|
+
* to this library's own `Modal`.
|
|
29
|
+
*
|
|
30
|
+
* Web portal opt-in: when an ancestor renders `ModalPortalProvider` (web only), this bypasses RN's
|
|
31
|
+
* `<Modal>` and portals the SAME backdrop+panel tree into the provided container via `renderWebPortal`
|
|
32
|
+
* instead — see `../modal/ModalPortalContext.ts` for why. `ModalPortalContext`/`renderWebPortal` are
|
|
33
|
+
* read directly from `../modal` (a plain context + a stateless helper, no footprint of this library's
|
|
34
|
+
* own `Modal` COMPONENT), the same one deliberate cross-module exception `Select.tsx`'s own top comment
|
|
35
|
+
* documents. Every other case (native, or web with no provider — the default `ModalPortalContext` value
|
|
36
|
+
* is `null`) renders through RN's own `<Modal>`, byte-identical to before this mechanism existed.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import { memo, useContext, useEffect, useRef, useState } from "react";
|
|
40
|
+
import { Animated, Modal as RNModal, Platform, Pressable, StyleSheet, useWindowDimensions, View } from "react-native";
|
|
41
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
42
|
+
import { useTheme } from "../../theme/index.js";
|
|
43
|
+
import { ModalPortalContext } from "../modal/ModalPortalContext.js";
|
|
44
|
+
import { renderWebPortal } from "../modal/renderWebPortal";
|
|
45
|
+
import { drawerGrabberStructure, drawerHandleStructure, drawerOverlayStructure, drawerPanelStructure, resolveDrawerAnimationDuration, resolveDrawerBottomInset, resolveDrawerPanelColors } from "./Drawer.variants.js";
|
|
46
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
47
|
+
// Decorative dismiss scrim behind the panel — a design constant, not a role token: it is neither
|
|
48
|
+
// text nor an interactive boundary, so WCAG's contrast minimums don't apply to it. Same
|
|
49
|
+
// justification as Modal's MODAL_BACKDROP / Select's BACKDROP_SCRIM.
|
|
50
|
+
const DRAWER_BACKDROP = "#00000080";
|
|
51
|
+
export const Drawer = /*#__PURE__*/memo(function Drawer({
|
|
52
|
+
visible,
|
|
53
|
+
onRequestClose,
|
|
54
|
+
children,
|
|
55
|
+
testID
|
|
56
|
+
}) {
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
const reducedMotion = useReducedMotion();
|
|
59
|
+
const {
|
|
60
|
+
height: windowHeight
|
|
61
|
+
} = useWindowDimensions();
|
|
62
|
+
const panelColors = resolveDrawerPanelColors(theme.colors);
|
|
63
|
+
const duration = resolveDrawerAnimationDuration(reducedMotion);
|
|
64
|
+
const bottomInset = resolveDrawerBottomInset(theme.space[5], Platform.OS);
|
|
65
|
+
const portalContainer = useContext(ModalPortalContext);
|
|
66
|
+
|
|
67
|
+
// Kept mounted through the exit animation — see the file-level comment on why RN Modal's own
|
|
68
|
+
// `visible` prop can't drive this directly.
|
|
69
|
+
const [mounted, setMounted] = useState(visible);
|
|
70
|
+
const mountedRef = useRef(mounted);
|
|
71
|
+
mountedRef.current = mounted;
|
|
72
|
+
const progress = useRef(new Animated.Value(visible ? 1 : 0)).current;
|
|
73
|
+
const unmountTimer = useRef(null);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (unmountTimer.current !== null) {
|
|
76
|
+
clearTimeout(unmountTimer.current);
|
|
77
|
+
unmountTimer.current = null;
|
|
78
|
+
}
|
|
79
|
+
if (visible) {
|
|
80
|
+
setMounted(true);
|
|
81
|
+
Animated.timing(progress, {
|
|
82
|
+
toValue: 1,
|
|
83
|
+
duration,
|
|
84
|
+
useNativeDriver: true
|
|
85
|
+
}).start();
|
|
86
|
+
} else if (mountedRef.current) {
|
|
87
|
+
Animated.timing(progress, {
|
|
88
|
+
toValue: 0,
|
|
89
|
+
duration,
|
|
90
|
+
useNativeDriver: true
|
|
91
|
+
}).start();
|
|
92
|
+
unmountTimer.current = setTimeout(() => setMounted(false), duration);
|
|
93
|
+
}
|
|
94
|
+
return () => {
|
|
95
|
+
if (unmountTimer.current !== null) clearTimeout(unmountTimer.current);
|
|
96
|
+
};
|
|
97
|
+
}, [visible, duration, progress]);
|
|
98
|
+
|
|
99
|
+
// Slides from fully off-screen (the window's own height, always ≥ the panel's own, since the
|
|
100
|
+
// panel is capped to 90% of it) to resting at the bottom edge.
|
|
101
|
+
const translateY = progress.interpolate({
|
|
102
|
+
inputRange: [0, 1],
|
|
103
|
+
outputRange: [windowHeight, 0]
|
|
104
|
+
});
|
|
105
|
+
const content = /*#__PURE__*/_jsxs(_Fragment, {
|
|
106
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
107
|
+
testID: testID ? `${testID}-backdrop` : undefined,
|
|
108
|
+
accessible: false,
|
|
109
|
+
style: StyleSheet.absoluteFill,
|
|
110
|
+
onPress: onRequestClose,
|
|
111
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
112
|
+
pointerEvents: "none",
|
|
113
|
+
style: [StyleSheet.absoluteFill, {
|
|
114
|
+
backgroundColor: DRAWER_BACKDROP,
|
|
115
|
+
opacity: progress
|
|
116
|
+
}]
|
|
117
|
+
})
|
|
118
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
119
|
+
style: drawerOverlayStructure(),
|
|
120
|
+
pointerEvents: "box-none",
|
|
121
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
122
|
+
testID: testID ? `${testID}-panel` : undefined,
|
|
123
|
+
accessibilityViewIsModal: true,
|
|
124
|
+
onAccessibilityEscape: onRequestClose,
|
|
125
|
+
style: [drawerPanelStructure(theme), {
|
|
126
|
+
backgroundColor: panelColors.background,
|
|
127
|
+
paddingBottom: bottomInset,
|
|
128
|
+
transform: [{
|
|
129
|
+
translateY
|
|
130
|
+
}]
|
|
131
|
+
}],
|
|
132
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
133
|
+
testID: testID ? `${testID}-handle` : undefined,
|
|
134
|
+
style: drawerHandleStructure(theme),
|
|
135
|
+
accessibilityElementsHidden: true,
|
|
136
|
+
importantForAccessibility: "no-hide-descendants",
|
|
137
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
138
|
+
style: [drawerGrabberStructure(), {
|
|
139
|
+
backgroundColor: panelColors.grabber
|
|
140
|
+
}]
|
|
141
|
+
})
|
|
142
|
+
}), children]
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
});
|
|
146
|
+
if (Platform.OS === "web" && portalContainer != null) {
|
|
147
|
+
if (!mounted) return null;
|
|
148
|
+
// Gated on `mounted`, not `visible` — reproduces RN Modal's own `visible={mounted}` below, so the
|
|
149
|
+
// portal path keeps rendering through the same mount-through-exit-animation lifecycle the file-level
|
|
150
|
+
// comment describes (the exit slide/fade still plays before unmount). Unlike Modal.tsx's portal
|
|
151
|
+
// branch, this loses NO animation fidelity: Drawer's slide+fade was already entirely self-driven by
|
|
152
|
+
// `progress` (RNModal's own `animationType` is always `"none"` either way), so the SAME Animated tree
|
|
153
|
+
// renders identically whether it's inside RN's `<Modal>` or portaled straight into `portalContainer`.
|
|
154
|
+
// Reproduces just the sizing RN's `<Modal>` otherwise supplies (see ModalPortalContext.ts) — never
|
|
155
|
+
// touching the shared `drawerOverlayStructure`/`drawerPanelStructure` resolvers the RNModal path
|
|
156
|
+
// below still uses untouched.
|
|
157
|
+
return renderWebPortal(/*#__PURE__*/_jsx(View, {
|
|
158
|
+
style: StyleSheet.absoluteFill,
|
|
159
|
+
pointerEvents: "box-none",
|
|
160
|
+
children: content
|
|
161
|
+
}), portalContainer);
|
|
162
|
+
}
|
|
163
|
+
return /*#__PURE__*/_jsx(RNModal, {
|
|
164
|
+
visible: mounted,
|
|
165
|
+
transparent: true,
|
|
166
|
+
animationType: "none",
|
|
167
|
+
onRequestClose: onRequestClose,
|
|
168
|
+
children: content
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useContext","useEffect","useRef","useState","Animated","Modal","RNModal","Platform","Pressable","StyleSheet","useWindowDimensions","View","useReducedMotion","useTheme","ModalPortalContext","renderWebPortal","drawerGrabberStructure","drawerHandleStructure","drawerOverlayStructure","drawerPanelStructure","resolveDrawerAnimationDuration","resolveDrawerBottomInset","resolveDrawerPanelColors","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DRAWER_BACKDROP","Drawer","visible","onRequestClose","children","testID","theme","reducedMotion","height","windowHeight","panelColors","colors","duration","bottomInset","space","OS","portalContainer","mounted","setMounted","mountedRef","current","progress","Value","unmountTimer","clearTimeout","timing","toValue","useNativeDriver","start","setTimeout","translateY","interpolate","inputRange","outputRange","content","undefined","accessible","style","absoluteFill","onPress","pointerEvents","backgroundColor","opacity","accessibilityViewIsModal","onAccessibilityEscape","background","paddingBottom","transform","accessibilityElementsHidden","importantForAccessibility","grabber","transparent","animationType"],"sourceRoot":"../../../../src","sources":["modules/drawer/Drawer.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Drawer's style + behaviour resolution — same split as Modal/Select:
|
|
5
|
+
* - STRUCTURE (padding, radius, the grabber's fixed dimensions) lives in the `createThemedVariants`
|
|
6
|
+
* resolvers below, static per (brand, mode), registered once via `StyleSheet.create`.
|
|
7
|
+
* - COLOUR is resolved from the theme's ROLE colours by `resolveDrawerPanelColors`, never a raw
|
|
8
|
+
* ramp and never a hardcoded hex.
|
|
9
|
+
* - The reduced-motion contract (WCAG 2.3.3) is `resolveDrawerAnimationDuration`, and the
|
|
10
|
+
* safe-area-less bottom-inset fallback is `resolveDrawerBottomInset` — both kept pure so they are
|
|
11
|
+
* unit-testable without rendering React Native.
|
|
12
|
+
*
|
|
13
|
+
* Free of React and of any `Modal`/`Pressable`/`Animated` import, so the tests import it directly
|
|
14
|
+
* (mocking only `react-native`'s `StyleSheet`, as `core/style` does).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createThemedVariants, createVariants } from "../../core/style/index.js";
|
|
18
|
+
|
|
19
|
+
/** The slide-up + backdrop-fade duration in ms. A component design constant — not on the theme's
|
|
20
|
+
* numeric scale — same status `PRESS_FADE_MS` (Button) / `ANIMATION_MS` (Toast) have. */
|
|
21
|
+
export const DRAWER_ANIMATION_MS = 260;
|
|
22
|
+
|
|
23
|
+
/** WCAG 2.3.3 — the slide/fade collapses to an instant snap (never a frozen frame) when the OS has
|
|
24
|
+
* reduced motion on. Mirrors Modal's `resolveModalAnimationType`, pulled into its own resolver
|
|
25
|
+
* because Drawer drives the transition with `Animated.timing` (a duration), not RN Modal's
|
|
26
|
+
* `animationType` (a discrete enum) — Modal's own native transition can't also fade a separately
|
|
27
|
+
* Animated backdrop in lockstep with a custom slide, which is why this module never sets
|
|
28
|
+
* `animationType` to anything but `"none"` and does the whole transition itself. */
|
|
29
|
+
export function resolveDrawerAnimationDuration(reducedMotion) {
|
|
30
|
+
return reducedMotion ? 0 : DRAWER_ANIMATION_MS;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Static bottom-inset fallback. `react-native-safe-area-context` is listed as an optional peer in
|
|
35
|
+
* `peerDependenciesMeta`, but — same finding `Toast`'s MODULE.md already recorded — it is not
|
|
36
|
+
* actually installed as a dependency of THIS package (only pulled in transitively by the `example`
|
|
37
|
+
* workspace), so importing `useSafeAreaInsets` here would work in this repo's dev sandbox and then
|
|
38
|
+
* fail to resolve in a consumer app that installs `pixelize-native-library` without also installing that
|
|
39
|
+
* package. This constant approximates the iOS home-indicator inset instead; see MODULE.md "Known
|
|
40
|
+
* gaps" for the real fix once the dependency is added for real.
|
|
41
|
+
*/
|
|
42
|
+
export const DRAWER_IOS_HOME_INDICATOR_INSET = 20;
|
|
43
|
+
|
|
44
|
+
/** Adds the static iOS home-indicator approximation to a base padding; Android's gesture/3-button
|
|
45
|
+
* nav already reserves its own space outside the app window, so it needs no extra padding here. */
|
|
46
|
+
export function resolveDrawerBottomInset(basePadding, platformOS) {
|
|
47
|
+
return platformOS === "ios" ? basePadding + DRAWER_IOS_HOME_INDICATOR_INSET : basePadding;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** The grabber's fixed pill dimensions — a design constant, not a `size` scale (Drawer takes no
|
|
51
|
+
* `size` prop; unlike Modal/Select it has exactly one shape). */
|
|
52
|
+
export const GRABBER_WIDTH = 36;
|
|
53
|
+
export const GRABBER_HEIGHT = 4;
|
|
54
|
+
/**
|
|
55
|
+
* Maps the panel onto role colours. Kept this small on purpose, same reasoning Modal's own
|
|
56
|
+
* `resolveModalPanelColors` documents: `children` is arbitrary consumer content this module has no
|
|
57
|
+
* colour opinion about, and Drawer owns no text of its own (no `title`, unlike Modal) — so there is
|
|
58
|
+
* no text/fill pairing here for a WCAG 1.4.3 test to measure. See `Drawer.test.ts` for the full
|
|
59
|
+
* accounting of what this module does and does not owe a contrast test.
|
|
60
|
+
*/
|
|
61
|
+
export function resolveDrawerPanelColors(colors) {
|
|
62
|
+
return {
|
|
63
|
+
background: colors.bg.surface,
|
|
64
|
+
grabber: colors.bg.sunken
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The full-screen overlay the panel bottom-aligns in. `box-none` (applied by the component) lets a
|
|
69
|
+
* tap on its empty area above the panel fall through to the backdrop press underneath — same shape
|
|
70
|
+
* as Modal's `modalOverlayStructure` / Select's `selectOverlayStructure`, bottom-aligned instead of
|
|
71
|
+
* centered. No theme dependency (no themed numbers used), so it uses the untethemed resolver, same
|
|
72
|
+
* idiom `drawerGrabberStructure` below does. */
|
|
73
|
+
export const drawerOverlayStructure = createVariants({
|
|
74
|
+
base: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
justifyContent: "flex-end"
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Structural styles only — layout, padding, top-corner radius. No colour (resolved by
|
|
82
|
+
* `resolveDrawerPanelColors`, applied inline over this) and no bottom padding (the safe-area-aware
|
|
83
|
+
* amount is themed but state-dependent on `Platform.OS`, so it's computed by
|
|
84
|
+
* `resolveDrawerBottomInset` and applied inline in `Drawer.tsx`), so this compiles once per theme
|
|
85
|
+
* identity via the `WeakMap`-cached themed resolver and never rebuilds per render.
|
|
86
|
+
*/
|
|
87
|
+
export const drawerPanelStructure = createThemedVariants(theme => ({
|
|
88
|
+
base: {
|
|
89
|
+
width: "100%",
|
|
90
|
+
maxHeight: "90%",
|
|
91
|
+
borderTopLeftRadius: theme.radii.lg,
|
|
92
|
+
borderTopRightRadius: theme.radii.lg,
|
|
93
|
+
paddingHorizontal: theme.space[5],
|
|
94
|
+
...theme.elevation.lg
|
|
95
|
+
}
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
/** The grabber's touch-friendly wrapper strip — its own row, above `children`, so a future pointer
|
|
99
|
+
* down on it can never land on scrollable content underneath (see MODULE.md on why swipe-to-dismiss
|
|
100
|
+
* isn't wired to it in v1). */
|
|
101
|
+
export const drawerHandleStructure = createThemedVariants(theme => ({
|
|
102
|
+
base: {
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
paddingVertical: theme.space[3]
|
|
106
|
+
}
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
/** No theme dependency at all (fixed design constants, not a themed scale), so it uses the
|
|
110
|
+
* untethemed resolver — same idiom as RadioGroup's `radioDotStructure`. */
|
|
111
|
+
export const drawerGrabberStructure = createVariants({
|
|
112
|
+
base: {
|
|
113
|
+
width: GRABBER_WIDTH,
|
|
114
|
+
height: GRABBER_HEIGHT,
|
|
115
|
+
borderRadius: GRABBER_HEIGHT / 2
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=Drawer.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","createVariants","DRAWER_ANIMATION_MS","resolveDrawerAnimationDuration","reducedMotion","DRAWER_IOS_HOME_INDICATOR_INSET","resolveDrawerBottomInset","basePadding","platformOS","GRABBER_WIDTH","GRABBER_HEIGHT","resolveDrawerPanelColors","colors","background","bg","surface","grabber","sunken","drawerOverlayStructure","base","flex","justifyContent","drawerPanelStructure","theme","width","maxHeight","borderTopLeftRadius","radii","lg","borderTopRightRadius","paddingHorizontal","space","elevation","drawerHandleStructure","alignItems","paddingVertical","drawerGrabberStructure","height","borderRadius"],"sourceRoot":"../../../../src","sources":["modules/drawer/Drawer.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,EAAEC,cAAc,QAAQ,2BAAkB;;AAEvE;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,GAAG;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,8BAA8BA,CAACC,aAAsB,EAAU;EAC7E,OAAOA,aAAa,GAAG,CAAC,GAAGF,mBAAmB;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,+BAA+B,GAAG,EAAE;;AAEjD;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,WAAmB,EAAEC,UAAkB,EAAU;EACxF,OAAOA,UAAU,KAAK,KAAK,GAAGD,WAAW,GAAGF,+BAA+B,GAAGE,WAAW;AAC3F;;AAEA;AACA;AACA,OAAO,MAAME,aAAa,GAAG,EAAE;AAC/B,OAAO,MAAMC,cAAc,GAAG,CAAC;AAY/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,MAAkB,EAAqB;EAC9E,OAAO;IACLC,UAAU,EAAED,MAAM,CAACE,EAAE,CAACC,OAAO;IAC7BC,OAAO,EAAEJ,MAAM,CAACE,EAAE,CAACG;EACrB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGjB,cAAc,CAAC;EACnDkB,IAAI,EAAE;IACJC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGtB,oBAAoB,CAAEuB,KAAY,KAAM;EAC1EJ,IAAI,EAAE;IACJK,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE,KAAK;IAChBC,mBAAmB,EAAEH,KAAK,CAACI,KAAK,CAACC,EAAE;IACnCC,oBAAoB,EAAEN,KAAK,CAACI,KAAK,CAACC,EAAE;IACpCE,iBAAiB,EAAEP,KAAK,CAACQ,KAAK,CAAC,CAAC,CAAC;IACjC,GAAGR,KAAK,CAACS,SAAS,CAACJ;EACrB;AACF,CAAC,CAAC,CAAC;;AAEH;AACA;AACA;AACA,OAAO,MAAMK,qBAAqB,GAAGjC,oBAAoB,CAAEuB,KAAY,KAAM;EAC3EJ,IAAI,EAAE;IACJe,UAAU,EAAE,QAAQ;IACpBb,cAAc,EAAE,QAAQ;IACxBc,eAAe,EAAEZ,KAAK,CAACQ,KAAK,CAAC,CAAC;EAChC;AACF,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,OAAO,MAAMK,sBAAsB,GAAGnC,cAAc,CAAC;EACnDkB,IAAI,EAAE;IACJK,KAAK,EAAEf,aAAa;IACpB4B,MAAM,EAAE3B,cAAc;IACtB4B,YAAY,EAAE5B,cAAc,GAAG;EACjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# drawer/ — a bottom-sheet panel built on React Native's own Modal
|
|
2
|
+
|
|
3
|
+
`Drawer` is a hand-rolled bottom-sheet: a panel that slides up from the bottom edge over a
|
|
4
|
+
translucent fading backdrop, presented in REACT NATIVE'S OWN `Modal` — the same "transient overlay,
|
|
5
|
+
raw RN Modal" pattern `Select` already established for this library. It is NOT this library's own
|
|
6
|
+
`../modal` (a persistent title/children dialog, centered, a different shape entirely) and it imports
|
|
7
|
+
nothing from it.
|
|
8
|
+
|
|
9
|
+
## Files
|
|
10
|
+
|
|
11
|
+
| File | Role |
|
|
12
|
+
|------|------|
|
|
13
|
+
| `Drawer.tsx` | The component. RN `Modal` composition, the mount-through-exit-animation state machine, the slide + backdrop-fade transition, dismiss wiring. Falls back to the web portal mechanism below when opted in. |
|
|
14
|
+
| `Drawer.variants.ts` | Pure resolvers (`resolveDrawerAnimationDuration`, `resolveDrawerBottomInset`, `resolveDrawerPanelColors`) + the themed/untethemed structural resolvers (`drawerOverlayStructure`, `drawerPanelStructure`, `drawerHandleStructure`, `drawerGrabberStructure`). No React, no lucide. Untouched by the web portal mechanism — see below. |
|
|
15
|
+
| `index.ts` | Public surface: `Drawer`, `DrawerProps`. |
|
|
16
|
+
| `__tests__/Drawer.test.ts` | Pure: reduced-motion contract, bottom-inset fallback, panel/grabber colour resolution (all brands × modes). |
|
|
17
|
+
| `__tests__/Drawer.render.test.tsx` | Render: visibility, mount-through-exit-animation, dismissal paths, modal semantics, grabber a11y, reduced motion, and the web-portal opt-in branch (mocking `renderWebPortal`). |
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Notes |
|
|
22
|
+
|------|------|-------|
|
|
23
|
+
| `visible` | `boolean` | Required. Fully controlled — Drawer never tracks its own open state. |
|
|
24
|
+
| `onRequestClose` | `() => void` | Required. Fires from backdrop press, Android hardware back, and iOS VoiceOver's escape gesture. Never fired from an internal state. |
|
|
25
|
+
| `children` | `ReactNode` | Required. Arbitrary consumer content below the grabber. |
|
|
26
|
+
| `testID` | `string` | Also seeds `${testID}-backdrop`, `${testID}-panel`, `${testID}-handle`. |
|
|
27
|
+
|
|
28
|
+
No `style`/`containerStyle` prop — same precedent as this library's own `Modal` (also style-less):
|
|
29
|
+
it's a full-screen transient overlay whose position is fixed by the component, not something an
|
|
30
|
+
app's layout places.
|
|
31
|
+
|
|
32
|
+
## Animation
|
|
33
|
+
|
|
34
|
+
One `Animated.Value` (`progress`, 0 → 1) drives BOTH the panel's `translateY` (interpolated from the
|
|
35
|
+
window's own height down to `0`) and the backdrop's `opacity`, so they move in lockstep. This is why
|
|
36
|
+
the underlying RN `<Modal>` is always given `animationType="none"` — RN's native transition is a
|
|
37
|
+
single discrete enum for the whole native surface; it can't also fade a separately-Animated backdrop
|
|
38
|
+
in step with a custom slide, so this module owns the entire transition instead (same reasoning
|
|
39
|
+
`Modal.tsx`'s reduced-motion note documents for its own native-vs-JS boundary, in reverse).
|
|
40
|
+
|
|
41
|
+
`resolveDrawerAnimationDuration` (WCAG 2.3.3) collapses the duration to `0` under
|
|
42
|
+
`useReducedMotion()` — an instant snap, never a frozen half-slid frame, same contract every other
|
|
43
|
+
animated module in this catalogue holds.
|
|
44
|
+
|
|
45
|
+
**Exit-animation lifecycle.** RN's `<Modal>` only actually hides its children once native dismissal
|
|
46
|
+
completes or the component unmounts — flipping `visible` straight to the native `Modal`'s own
|
|
47
|
+
`visible` prop would cut the exit slide/fade off before it plays. So Drawer keeps its own `mounted`
|
|
48
|
+
state, distinct from the caller's `visible` prop: on close, the exit animation starts immediately and
|
|
49
|
+
a plain `setTimeout` (matching `duration`, not the `Animated.timing` completion callback — that rides
|
|
50
|
+
`requestAnimationFrame`, which doesn't resolve deterministically under fake timers) unmounts the
|
|
51
|
+
underlying `<Modal>` once the animation has actually finished. Same idiom as `Toast.tsx`'s `hide()`.
|
|
52
|
+
|
|
53
|
+
## Web portal mechanism (opt-in)
|
|
54
|
+
|
|
55
|
+
Same containment bug, same fix, as `Modal`/`Select`/`Menu`: `react-native-web`'s own `<Modal>`
|
|
56
|
+
unconditionally portals to `document.body` (no `container`/`portalHost` override exists — see
|
|
57
|
+
`../modal/ModalPortalContext.ts`), which breaks visual containment inside a fixed-size preview
|
|
58
|
+
frame (`example/DeviceFrame.tsx`'s 390px phone card) — the sheet rendered full-browser-viewport
|
|
59
|
+
instead of clipped to the frame.
|
|
60
|
+
|
|
61
|
+
`Drawer.tsx` reads `ModalPortalContext`/`renderWebPortal` straight from `../modal` (the same
|
|
62
|
+
deliberate cross-module exception `Select.tsx`'s own top comment documents — a plain context +
|
|
63
|
+
stateless helper, never this library's own `Modal` component). Gated on
|
|
64
|
+
`Platform.OS === "web" && portalContainer != null`; every other case (native, or web with no
|
|
65
|
+
`ModalPortalProvider`) renders through RN's own `<Modal>`, byte-identical to before this
|
|
66
|
+
mechanism existed. See `../modal/MODULE.md`'s "Web portal mechanism" section for the full
|
|
67
|
+
context/renderer design.
|
|
68
|
+
|
|
69
|
+
**Unlike `Modal`'s portal branch, Drawer loses no animation fidelity.** Modal's portal path
|
|
70
|
+
skips RN `<Modal>`'s native open/close animation because that's what drives Modal's fade; Drawer
|
|
71
|
+
never relied on RN Modal's `animationType` in the first place (always `"none"` — see Animation
|
|
72
|
+
above) — the slide+fade is 100% driven by the `progress` `Animated.Value` regardless of which
|
|
73
|
+
container the tree renders into, so the portaled tree animates identically to the RNModal path.
|
|
74
|
+
The portal branch is gated on `mounted` (not `visible`), reproducing RN Modal's own
|
|
75
|
+
`visible={mounted}` so the same mount-through-exit-animation lifecycle applies on both paths —
|
|
76
|
+
the exit slide/fade still plays out before the portaled tree unmounts.
|
|
77
|
+
|
|
78
|
+
**Known minor gap:** `translateY`'s off-screen starting point interpolates from the actual
|
|
79
|
+
browser `useWindowDimensions().height`, not the portal container's height (there's no cheap way
|
|
80
|
+
to read the container's own height from a portal-container ref alone). Inside a frame shorter
|
|
81
|
+
than the full window, the panel starts further off-screen than strictly necessary, animating
|
|
82
|
+
over the same fixed duration — the resting position (`translateY: 0`) and clipping are still
|
|
83
|
+
correct, this only affects how far the panel travels before entering view. Not a visual escape;
|
|
84
|
+
left as-is rather than adding a container-height measurement this component doesn't otherwise
|
|
85
|
+
need.
|
|
86
|
+
|
|
87
|
+
## Accessibility contract (WCAG)
|
|
88
|
+
|
|
89
|
+
- **2.3.3** — see Animation above.
|
|
90
|
+
- `accessibilityViewIsModal` on the panel, same as this library's `Modal`.
|
|
91
|
+
- **iOS VoiceOver escape** — `onAccessibilityEscape` on the panel calls `onRequestClose`, identical
|
|
92
|
+
wiring to `Modal.tsx`.
|
|
93
|
+
- **Android hardware back** — free: RN `Modal`'s own `onRequestClose` prop is wired straight through.
|
|
94
|
+
- The grabber (a `bg.sunken` pill) is `accessibilityElementsHidden` +
|
|
95
|
+
`importantForAccessibility="no-hide-descendants"` on its wrapper — purely decorative, so it carries
|
|
96
|
+
no WCAG 1.4.11 obligation (a decorative graphic is out of that SC's scope entirely, same status the
|
|
97
|
+
backdrop scrims across this library already have). Its dismiss affordance is real (backdrop press +
|
|
98
|
+
hardware back + VoiceOver escape); it does not itself act as a control.
|
|
99
|
+
- No owned text (`children` is arbitrary consumer content, same stance `Modal`'s own
|
|
100
|
+
`resolveModalPanelColors` doc comment takes for its body — Drawer additionally has no `title`
|
|
101
|
+
either), so there is nothing here for a WCAG 1.4.3 test to measure. `Drawer.test.ts`'s file header
|
|
102
|
+
records this reasoning explicitly rather than silently omitting the usual `contrastRatio` block.
|
|
103
|
+
|
|
104
|
+
## Known gaps
|
|
105
|
+
|
|
106
|
+
- **No `react-native-safe-area-context` wiring.** It's listed in `peerDependenciesMeta` as an
|
|
107
|
+
optional peer, but is NOT actually declared in `peerDependencies` in this package's own
|
|
108
|
+
`package.json` — it only resolves in this repo's dev sandbox because the `example` workspace
|
|
109
|
+
depends on it directly and npm workspaces hoist it into the root `node_modules`. Importing
|
|
110
|
+
`useSafeAreaInsets` here would work in this repo and then fail to resolve for a consumer app that
|
|
111
|
+
installs `pixelize-native-library` without separately installing that package. `Toast.tsx`'s own MODULE.md
|
|
112
|
+
already flagged the same gap for its overlay inset. Bottom padding instead uses
|
|
113
|
+
`resolveDrawerBottomInset`: the theme's own `space[5]` plus a static iOS home-indicator
|
|
114
|
+
approximation (`DRAWER_IOS_HOME_INDICATOR_INSET`, 20dp) on iOS only. Revisit once
|
|
115
|
+
`react-native-safe-area-context` is added as a REAL peer dependency (a `package.json` change, out of
|
|
116
|
+
this module's scope) — swap the static constant for a real `useSafeAreaInsets().bottom` read.
|
|
117
|
+
- **No swipe-down-to-dismiss in v1 — a deliberate choice, not an oversight.** The spec allowed this as
|
|
118
|
+
a documented v1 gap, and three considerations pointed the same way:
|
|
119
|
+
1. **Testability.** This is the first hand-rolled gesture module in this catalogue — there is no
|
|
120
|
+
`PanResponder` test precedent anywhere in the other 27 shipped components. `PanResponder`
|
|
121
|
+
computes `dx`/`dy`/`vx`/`vy` internally from a raw native touch-event history; accurately
|
|
122
|
+
reproducing that in `@testing-library/react-native` (which has no real touch pipeline) means
|
|
123
|
+
either hand-crafting synthetic touch streams that only approximate the real responder math, or
|
|
124
|
+
shipping the gesture path untested. Both fall short of the "measured, never eyeballed" bar the
|
|
125
|
+
rest of this library holds itself to.
|
|
126
|
+
2. **Full dismiss parity already exists without it** — backdrop press, Android hardware back, and
|
|
127
|
+
the iOS VoiceOver escape gesture together already satisfy WCAG 2.5.7's non-drag-alternative
|
|
128
|
+
requirement; a swipe would be a nice-to-have affordance, not a missing capability.
|
|
129
|
+
3. **Risk to `children`.** A `PanResponder` broad enough to feel natural on the whole panel risks
|
|
130
|
+
fighting a `ScrollView`/`FlatList` inside `children` (a scroll gesture starting near the top of
|
|
131
|
+
scrollable content vs. a sheet-dismiss swipe is a real, easy-to-get-wrong disambiguation); scoping
|
|
132
|
+
it to only the grabber's small handle strip avoids that fight but makes the gesture much narrower
|
|
133
|
+
and less discoverable than the "drag anywhere" affordance users expect from a bottom sheet.
|
|
134
|
+
A future version should revisit this with `PanResponder` scoped to `drawerHandleStructure`'s handle
|
|
135
|
+
strip only (never the full panel), driving `resolveDrawerAnimationDuration`'s same `progress` value,
|
|
136
|
+
gated by a real distance/velocity threshold — and, at that point, a way to verify the gesture math
|
|
137
|
+
deterministically (e.g. extracting the dy/vy → dismiss decision into its own pure, unit-tested
|
|
138
|
+
function, the same "keep the decision pure, wire the mechanism thin" split this file already uses
|
|
139
|
+
everywhere else) rather than only relying on `PanResponder`'s live wiring.
|
|
140
|
+
- No `size` prop — v1 is a single shape (content sizes the panel up to a 90% max-height cap), matching
|
|
141
|
+
the spec this module was built against.
|
|
142
|
+
|
|
143
|
+
## Patterns copied from Modal / Select / Toast
|
|
144
|
+
|
|
145
|
+
1. **Structure vs colour split.** Structural values (padding, top-corner radius, the grabber's fixed
|
|
146
|
+
pill) → `createThemedVariants` (or the untethemed `createVariants` where nothing is theme-scaled,
|
|
147
|
+
same idiom `RadioGroup`'s `radioDotStructure` uses) — never a fresh inline style object per render.
|
|
148
|
+
Colour → resolved from role tokens, applied inline.
|
|
149
|
+
2. **Pure, testable resolvers** in `Drawer.variants.ts` (no React/lucide) — reduced motion, the
|
|
150
|
+
bottom-inset fallback, and colour resolution are all unit-tested without rendering React Native.
|
|
151
|
+
3. **RN's raw `Modal`, not this library's own `../modal` COMPONENT** — same isolation contract
|
|
152
|
+
`Select.tsx`'s own top comment states, so Drawer never depends on a sibling module's rendered
|
|
153
|
+
output. The one deliberate exception is the web portal mechanism (`ModalPortalContext`/
|
|
154
|
+
`renderWebPortal` — a plain context + stateless helper, not the `Modal` component) — see "Web
|
|
155
|
+
portal mechanism" above.
|
|
156
|
+
4. **Mount-through-exit-animation + deterministic timer-based unmount** — copied from `Toast.tsx`'s
|
|
157
|
+
`hide()`, adapted from a provider's imperative `show`/`hide` to a fully-controlled `visible` prop.
|
|
158
|
+
|
|
159
|
+
## Performance
|
|
160
|
+
|
|
161
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Only renders host primitives (`Pressable`/`View`/`Animated.View`/RN's own `Modal`) — no library child component receives a derived callback/array, so no `useCallback`/`useMemo` was needed.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/drawer`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveDrawerPanelColors`, `DRAWER_ANIMATION_MS`, …) stay
|
|
6
|
+
* internal — a consumer controls a Drawer through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Drawer } from "./Drawer.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Drawer"],"sourceRoot":"../../../../src","sources":["modules/drawer/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,aAAU","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* EmptyState — a centred placeholder for "nothing here yet" / zero-result states: an optional
|
|
5
|
+
* decorative icon, a required title, an optional description, and an optional call-to-action.
|
|
6
|
+
* The action is rendered through this library's own, stable `Button` module — a justified
|
|
7
|
+
* composition (the same reasoning `AlertDialog` documents for its own footer buttons) — never a
|
|
8
|
+
* hand-rolled `Pressable` that would duplicate Button's press/focus/disabled/hit-target wiring.
|
|
9
|
+
*
|
|
10
|
+
* No `accessibilityRole` of its own: like `Card`, this is a plain grouping container with no
|
|
11
|
+
* interaction beyond the composed Button, so there is nothing here for assistive tech to announce
|
|
12
|
+
* beyond its children — the title and description read as their own `Text` elements, in order,
|
|
13
|
+
* and the icon (redundant with the title) is hidden from the accessibility tree entirely.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { memo } from "react";
|
|
17
|
+
import { StyleSheet, Text, View } from "react-native";
|
|
18
|
+
import { Icon } from "../../core/icon/index.js";
|
|
19
|
+
import { useTheme } from "../../theme/index.js";
|
|
20
|
+
import { Button } from "../button/index.js";
|
|
21
|
+
import { EMPTY_STATE_ICON_SIZE, emptyStateStructure, resolveEmptyStateColors } from "./EmptyState.variants.js";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
// A lighter stroke than the default 2 — at 48dp a 2px stroke reads heavier than the muted,
|
|
24
|
+
// secondary role this glyph plays next to the title.
|
|
25
|
+
const ICON_STROKE = 1.5;
|
|
26
|
+
export const EmptyState = /*#__PURE__*/memo(function EmptyState({
|
|
27
|
+
icon,
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
action,
|
|
31
|
+
style,
|
|
32
|
+
testID
|
|
33
|
+
}) {
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
const colors = resolveEmptyStateColors(theme.colors);
|
|
36
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
37
|
+
testID: testID,
|
|
38
|
+
style: [emptyStateStructure(theme), style],
|
|
39
|
+
children: [icon !== undefined &&
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
// Decorative — redundant with the visible title below, so it is hidden from assistive
|
|
42
|
+
// tech rather than announced as a second, unexplained element (same contract `Avatar` and
|
|
43
|
+
// `Skeleton` give their own decorative default).
|
|
44
|
+
_jsx(View, {
|
|
45
|
+
testID: testID === undefined ? undefined : `${testID}-icon`,
|
|
46
|
+
accessibilityElementsHidden: true,
|
|
47
|
+
importantForAccessibility: "no-hide-descendants",
|
|
48
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
name: icon,
|
|
50
|
+
size: EMPTY_STATE_ICON_SIZE,
|
|
51
|
+
color: colors.icon,
|
|
52
|
+
strokeWidth: ICON_STROKE
|
|
53
|
+
})
|
|
54
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
55
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.bold), styles.text, {
|
|
56
|
+
fontSize: theme.fontSizes.lg,
|
|
57
|
+
color: colors.title
|
|
58
|
+
}],
|
|
59
|
+
children: title
|
|
60
|
+
}), description !== undefined && /*#__PURE__*/_jsx(Text, {
|
|
61
|
+
style: [styles.text, {
|
|
62
|
+
fontSize: theme.fontSizes.sm,
|
|
63
|
+
color: colors.description
|
|
64
|
+
}],
|
|
65
|
+
children: description
|
|
66
|
+
}), action !== undefined && /*#__PURE__*/_jsx(Button, {
|
|
67
|
+
label: action.label,
|
|
68
|
+
onPress: action.onPress,
|
|
69
|
+
tone: "accent",
|
|
70
|
+
variant: "solid"
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
const styles = StyleSheet.create({
|
|
75
|
+
text: {
|
|
76
|
+
textAlign: "center"
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=EmptyState.js.map
|