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,115 @@
|
|
|
1
|
+
# filter-sheet/ — a staged, grouped filter panel for a board/list's filter dimensions
|
|
2
|
+
|
|
3
|
+
`FilterSheet` wraps this library's OWN `Drawer` (`../drawer`) as the sheet shell for a fully
|
|
4
|
+
app-supplied set of filter DIMENSIONS — consumed exactly as `BottomNav` consumes `Drawer` for its
|
|
5
|
+
own overflow sheet, through `Drawer`'s public props, never its internal `Drawer.variants.ts`.
|
|
6
|
+
|
|
7
|
+
**Deliberately narrow scope — a product decision, not an omission**, mirroring tickets-web's own
|
|
8
|
+
FilterBar but leaving out its rich/admin-only surface: no date-range filtering (`kind` is closed to
|
|
9
|
+
`"single" | "multi"`), no advanced field/operator/value query builder, no per-board admin
|
|
10
|
+
default-filter editor, no saved views, and no search input (a consumer places its own `Input`
|
|
11
|
+
elsewhere — search stays outside the grouped panel, the same stance tickets-web already takes).
|
|
12
|
+
|
|
13
|
+
## Files
|
|
14
|
+
|
|
15
|
+
| File | Role |
|
|
16
|
+
|------|------|
|
|
17
|
+
| `FilterSheet.tsx` | The component. Owns `visible`/staged-edit state, wraps `Drawer`, wires Apply/Reset/quick-toggle/dimension-change. Data types (`FilterDimension`, `FilterOption`, `FilterValues`) live here, same precedent as `BottomNav`'s own data types. |
|
|
18
|
+
| `FilterSheetBody.tsx` | PRIVATE (not exported) — the sheet's content: title header, per-dimension quick-chip rows, a single-open `Accordion` of facet controls, the Apply/Reset footer. Also hosts the private `DimensionControl` and `QuickChip` sub-components. |
|
|
19
|
+
| `FilterChip.tsx` | Public. A small removable/locked chip for showing one currently-applied filter fact — see "FilterChip vs the quick chip" below. |
|
|
20
|
+
| `FilterSheet.variants.ts` | Pure resolvers (`resolveFilterChipColors`, `resolveFilterChipAccessibility`, `resolveQuickChipColors`, `resolveFilterSheetBodyHeight`) + themed structural resolvers. No React, no lucide. |
|
|
21
|
+
| `filterSheet.helpers.ts` | Pure, framework-free: `countActiveFilters`, `normalizeFilterValues`, `resolveResetValues`, `applyQuickToggle`, `isOptionSelected`. No React, no `react-native` import at all. |
|
|
22
|
+
| `index.ts` | Public surface: `FilterSheet`, `FilterSheetProps`, `FilterChip`, `FilterChipProps`, `FilterDimension`, `FilterDimensionKind`, `FilterOption`, `FilterValues`, `countActiveFilters`. |
|
|
23
|
+
| `__tests__/FilterSheet.test.ts` | Pure: WCAG contrast (chip + quick-chip, all brands × modes), touch target, `resolveFilterChipAccessibility`, `resolveFilterSheetBodyHeight`. |
|
|
24
|
+
| `__tests__/filterSheet.helpers.test.ts` | Pure: active-filter counting, value normalisation, reset, quick-toggle, option-selected — both `kind`s. |
|
|
25
|
+
| `__tests__/FilterSheet.render.test.tsx` | Render: open/close, Apply commits + closes, backdrop/back dismiss discards, Reset clears without closing/applying, quick-toggle is immediate, single-open accordion, dimension control wiring. |
|
|
26
|
+
| `__tests__/FilterChip.render.test.tsx` | Render: removable vs locked shape + accessibility props. |
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
### `FilterSheetProps`
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Default | Notes |
|
|
33
|
+
|------|------|---------|-------|
|
|
34
|
+
| `visible` / `onRequestClose` | `boolean` / `() => void` | — | Required. Controlled, same pair `Drawer` itself takes. |
|
|
35
|
+
| `dimensions` | `FilterDimension[]` | — | Required. Fully consumer-supplied — zero hardcoded domain vocabulary. |
|
|
36
|
+
| `values` | `FilterValues` | — | Required. The currently APPLIED values, not the sheet's in-progress edits. |
|
|
37
|
+
| `onApply` | `(values: FilterValues) => void` | — | Required. The sheet's one commit point. |
|
|
38
|
+
| `onReset` | `() => void` | — | Omit → no Reset button renders at all. |
|
|
39
|
+
| `title` / `applyLabel` / `resetLabel` | `string` | `"Filters"` / `"Apply"` / `"Reset"` | |
|
|
40
|
+
| `testID` | `string` | — | Seeds `-panel`/`-backdrop`/`-handle` (Drawer's own), `-quick-${key}-${value}`, `-accordion-${key}`, `-control-${key}`, `-reset`, `-apply`. |
|
|
41
|
+
|
|
42
|
+
`FilterDimension`: `key`, `label`, `kind: "single" | "multi"`, `options: FilterOption[]`.
|
|
43
|
+
`FilterOption`: `label`, `value`, `quick?: boolean`. `FilterValues = Record<string, string | string[]>`.
|
|
44
|
+
|
|
45
|
+
### `FilterChipProps`
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Notes |
|
|
48
|
+
|------|------|-------|
|
|
49
|
+
| `label` | `string` | Required. |
|
|
50
|
+
| `onRemove` | `() => void` | Omit → non-removable/"locked" chip: plain `View`, no press, no "x". |
|
|
51
|
+
| `style` | `LayoutStyle` | Layout-only, outermost, applied exactly once, last. |
|
|
52
|
+
| `testID` | `string` | |
|
|
53
|
+
|
|
54
|
+
No `tone`/`size` — a single fixed shape, since a chip states a filter FACT, not a severity level.
|
|
55
|
+
|
|
56
|
+
## Interaction model (decided, not assumed — see filter-sheet's own build brief)
|
|
57
|
+
|
|
58
|
+
1. `FilterSheet` wraps `Drawer` internally (`<Drawer visible={visible} onRequestClose={...}>`) — the
|
|
59
|
+
consumer never touches `Drawer` directly for this use case.
|
|
60
|
+
2. Internal STAGED state seeds from `values` on every closed→open transition (a `useEffect` gated on
|
|
61
|
+
the previous `visible`, not on every render) — edits inside the sheet are local until Apply.
|
|
62
|
+
3. Any dismissal that isn't Apply — backdrop tap, Android back, VoiceOver escape — DISCARDS the
|
|
63
|
+
staged edits: `onRequestClose` fires, `onApply` never does.
|
|
64
|
+
4. Apply calls `onApply(staged)`, then `onRequestClose()` — the sheet closes itself on commit, the
|
|
65
|
+
same "close on selection commit" precedent `MultiSelect`'s own row toggle does NOT need (it has
|
|
66
|
+
no Apply step) but `Select`'s single-choice commit does.
|
|
67
|
+
5. Reset (rendered only when `onReset` is supplied) clears every dimension's staged value —
|
|
68
|
+
`multi → []`, `single` → cleared — WITHOUT closing the sheet and WITHOUT calling `onApply`, then
|
|
69
|
+
invokes the consumer's own `onReset`.
|
|
70
|
+
6. Each dimension renders as one `Accordion` section (`type="single"` — one open at a time): title =
|
|
71
|
+
`dimension.label`, content = `MultiSelect` (`kind: "multi"`) or `RadioGroup` (`kind: "single"`),
|
|
72
|
+
pre-wired to the staged value for `dimension.key`.
|
|
73
|
+
7. A `quick: true` option renders as a one-tap pill ABOVE the whole Accordion (grouped per
|
|
74
|
+
dimension, in dimension order) — tapping it toggles that value into staged IMMEDIATELY, not
|
|
75
|
+
staged-then-Apply for the tap itself (the "staged" concept is the sheet's overall commit point,
|
|
76
|
+
not each individual tap).
|
|
77
|
+
8. No search input anywhere in this module.
|
|
78
|
+
|
|
79
|
+
### FilterChip vs the quick chip — two different chips, on purpose
|
|
80
|
+
|
|
81
|
+
The public `FilterChip` (frozen shape: `label`/`onRemove`) is for a consumer showing currently
|
|
82
|
+
APPLIED filters elsewhere in its own UI (e.g. "Status: Open ✕" above a list) — it has no notion of
|
|
83
|
+
"selected" and no bare press-to-select. The quick-option pill inside `FilterSheetBody` needs both a
|
|
84
|
+
press-to-toggle AND a selected visual state, neither of which `FilterChip`'s contract supports — so
|
|
85
|
+
it is a small, PRIVATE, unexported component (`QuickChip`), not a repurposed `FilterChip`.
|
|
86
|
+
|
|
87
|
+
## Controlled vs internal state
|
|
88
|
+
|
|
89
|
+
| State | Owner | Mechanism |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| Sheet open | **App** | `visible`/`onRequestClose` — same pair `Drawer` itself takes. |
|
|
92
|
+
| Applied filter values | **App** | `values` in; `onApply(values)` out. |
|
|
93
|
+
| Dimensions/options data | **App** | `dimensions` — zero hardcoded vocabulary. |
|
|
94
|
+
| In-progress (staged) edits | **Library** | internal `useState`, re-seeded from `values` on every closed→open transition; discarded on any non-Apply dismissal. |
|
|
95
|
+
| Which Accordion section is open | **Library** | `Accordion`'s own uncontrolled state (this module never controls it). |
|
|
96
|
+
|
|
97
|
+
## API stability contract
|
|
98
|
+
|
|
99
|
+
**Frozen:** `FilterSheetProps.visible/onRequestClose/dimensions/values/onApply`,
|
|
100
|
+
`FilterDimension.key/label/kind/options`, `FilterOption.label/value`, `FilterChipProps.label`.
|
|
101
|
+
`FilterDimensionKind` is closed to `"single" | "multi"` today; it **may gain new members** (e.g. a
|
|
102
|
+
future `"range"`) in a MINOR release if a real product need arises, but `"single"`/`"multi"` can
|
|
103
|
+
never be renamed or removed — existing consumers' exhaustive `switch`es would only need a new case,
|
|
104
|
+
never a migration.
|
|
105
|
+
|
|
106
|
+
**Extension points (optional, additive):** `onReset`, `title`, `applyLabel`, `resetLabel`, `testID`,
|
|
107
|
+
`FilterOption.quick`, `FilterChipProps.onRemove/style/testID`.
|
|
108
|
+
|
|
109
|
+
## Known gaps
|
|
110
|
+
|
|
111
|
+
- No control over which Accordion section starts open on a fresh sheet open — left to `Accordion`'s
|
|
112
|
+
own uncontrolled default (all collapsed). Not requested by this module's spec.
|
|
113
|
+
- `MultiSelect`'s own option sheet opens as a NESTED native `Modal` while `FilterSheet`'s `Drawer` is
|
|
114
|
+
already showing — this is the library's existing, tested `MultiSelect` composed as-is (per
|
|
115
|
+
CLAUDE.md's component decision order), not a new modal-stacking mechanism built for this module.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* FilterSheet's pure, framework-free logic — no React, no `react-native` import at all. Types are
|
|
5
|
+
* imported `import type` only (erased by `verbatimModuleSyntax`), so this file pulls in no runtime
|
|
6
|
+
* dependency on `FilterSheet.tsx`, React, or React Native — it stays testable under plain jest with
|
|
7
|
+
* zero mocking, the same "orthogonal concern gets its own file" call `BottomNav.search.ts` makes.
|
|
8
|
+
*
|
|
9
|
+
* `values`/`staged` are always the CONSUMER's shape (`Record<string, string | string[]>`); every
|
|
10
|
+
* helper here normalises defensively rather than trusting a caller passed exactly what a
|
|
11
|
+
* dimension's `kind` expects (e.g. a stale `string` left over for a dimension that became
|
|
12
|
+
* `kind: "multi"` in a later release of the consumer's own dimension config).
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
function isDimensionActive(dimension, values) {
|
|
16
|
+
const value = values[dimension.key];
|
|
17
|
+
return dimension.kind === "multi" ? Array.isArray(value) && value.length > 0 : typeof value === "string" && value.length > 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* How many DIMENSIONS currently have a selection — not the total number of selected options. A
|
|
22
|
+
* `multi` dimension with 3 selected values still counts as ONE active filter, matching the
|
|
23
|
+
* "N filters applied" badge this exists to power (see MODULE.md's interaction model). Exported from
|
|
24
|
+
* `index.ts` as the module's one pure, UI-free public helper — every consumer needs this arithmetic
|
|
25
|
+
* and would otherwise reimplement it slightly differently each time.
|
|
26
|
+
*/
|
|
27
|
+
export function countActiveFilters(dimensions, values) {
|
|
28
|
+
return dimensions.reduce((count, dimension) => isDimensionActive(dimension, values) ? count + 1 : count, 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Normalises a consumer's `values` into the shape every dimension's `kind` actually expects —
|
|
33
|
+
* defensive, not a plain copy: a `multi` dimension always gets a real array (never a stray leftover
|
|
34
|
+
* string), and a `single` dimension with no/empty value is OMITTED entirely rather than carrying an
|
|
35
|
+
* empty string, so `values[key]` reads `undefined` exactly like a freshly-reset one. Used both to
|
|
36
|
+
* seed the sheet's staged state on open and to build the Reset target below.
|
|
37
|
+
*/
|
|
38
|
+
export function normalizeFilterValues(dimensions, values) {
|
|
39
|
+
const next = {};
|
|
40
|
+
for (const dimension of dimensions) {
|
|
41
|
+
const value = values[dimension.key];
|
|
42
|
+
if (dimension.kind === "multi") {
|
|
43
|
+
next[dimension.key] = Array.isArray(value) ? value : [];
|
|
44
|
+
} else if (typeof value === "string" && value.length > 0) {
|
|
45
|
+
next[dimension.key] = value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return next;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Every dimension cleared: `multi` → `[]`, `single` → omitted (see `normalizeFilterValues` above).
|
|
52
|
+
* Reset only ever replaces the SHEET's own staged state — it never calls `onApply` (see MODULE.md
|
|
53
|
+
* interaction model, point 5). */
|
|
54
|
+
export function resolveResetValues(dimensions) {
|
|
55
|
+
return normalizeFilterValues(dimensions, {});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Applies ONE quick-option tap to a dimension's staged value, immediately (not gated behind Apply —
|
|
60
|
+
* see MODULE.md interaction model, point 7). `multi` toggles the value in/out of the array, exactly
|
|
61
|
+
* like `MultiSelect`'s own row toggle; `single` toggles the WHOLE dimension between that value and
|
|
62
|
+
* cleared — a second tap on the same quick option un-selects it, since a quick option is the only
|
|
63
|
+
* way to clear a `single` dimension short of the sheet's own Reset button.
|
|
64
|
+
*/
|
|
65
|
+
export function applyQuickToggle(values, dimension, optionValue) {
|
|
66
|
+
const next = {
|
|
67
|
+
...values
|
|
68
|
+
};
|
|
69
|
+
if (dimension.kind === "multi") {
|
|
70
|
+
const current = Array.isArray(next[dimension.key]) ? next[dimension.key] : [];
|
|
71
|
+
next[dimension.key] = current.includes(optionValue) ? current.filter(v => v !== optionValue) : [...current, optionValue];
|
|
72
|
+
return next;
|
|
73
|
+
}
|
|
74
|
+
const current = typeof next[dimension.key] === "string" ? next[dimension.key] : "";
|
|
75
|
+
if (current === optionValue) {
|
|
76
|
+
delete next[dimension.key];
|
|
77
|
+
} else {
|
|
78
|
+
next[dimension.key] = optionValue;
|
|
79
|
+
}
|
|
80
|
+
return next;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Whether ONE option is currently selected within a dimension's (usually staged) values — shared
|
|
84
|
+
* by the quick-chip row, which needs this to render its own selected look independent of whichever
|
|
85
|
+
* Accordion section happens to be expanded. */
|
|
86
|
+
export function isOptionSelected(dimension, values, optionValue) {
|
|
87
|
+
const value = values[dimension.key];
|
|
88
|
+
return dimension.kind === "multi" ? Array.isArray(value) && value.includes(optionValue) : value === optionValue;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=filterSheet.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isDimensionActive","dimension","values","value","key","kind","Array","isArray","length","countActiveFilters","dimensions","reduce","count","normalizeFilterValues","next","resolveResetValues","applyQuickToggle","optionValue","current","includes","filter","v","isOptionSelected"],"sourceRoot":"../../../../src","sources":["modules/filter-sheet/filterSheet.helpers.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiBA,CAACC,SAA0B,EAAEC,MAAoB,EAAW;EACpF,MAAMC,KAAK,GAAGD,MAAM,CAACD,SAAS,CAACG,GAAG,CAAC;EACnC,OAAOH,SAAS,CAACI,IAAI,KAAK,OAAO,GAC7BC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAIA,KAAK,CAACK,MAAM,GAAG,CAAC,GACxC,OAAOL,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACK,MAAM,GAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,UAA6B,EAAER,MAAoB,EAAU;EAC9F,OAAOQ,UAAU,CAACC,MAAM,CACtB,CAACC,KAAK,EAAEX,SAAS,KAAMD,iBAAiB,CAACC,SAAS,EAAEC,MAAM,CAAC,GAAGU,KAAK,GAAG,CAAC,GAAGA,KAAM,EAChF,CACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACH,UAA6B,EAAER,MAAoB,EAAgB;EACvG,MAAMY,IAAkB,GAAG,CAAC,CAAC;EAC7B,KAAK,MAAMb,SAAS,IAAIS,UAAU,EAAE;IAClC,MAAMP,KAAK,GAAGD,MAAM,CAACD,SAAS,CAACG,GAAG,CAAC;IACnC,IAAIH,SAAS,CAACI,IAAI,KAAK,OAAO,EAAE;MAC9BS,IAAI,CAACb,SAAS,CAACG,GAAG,CAAC,GAAGE,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,GAAGA,KAAK,GAAG,EAAE;IACzD,CAAC,MAAM,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;AACA;AACA;AACA,OAAO,SAASQ,gBAAgBA,CAC9BrB,SAA0B,EAC1BC,MAAoB,EACpBe,WAAmB,EACV;EACT,MAAMd,KAAK,GAAGD,MAAM,CAACD,SAAS,CAACG,GAAG,CAAC;EACnC,OAAOH,SAAS,CAACI,IAAI,KAAK,OAAO,GAC7BC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAIA,KAAK,CAACgB,QAAQ,CAACF,WAAW,CAAC,GACnDd,KAAK,KAAKc,WAAW;AAC3B","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/filter-sheet`. Value exports and type exports are split
|
|
5
|
+
* for `verbatimModuleSyntax`. `FilterSheetBody`, every resolver in `FilterSheet.variants.ts`, and
|
|
6
|
+
* every helper in `filterSheet.helpers.ts` OTHER than `countActiveFilters` stay internal — a
|
|
7
|
+
* consumer configures a FilterSheet through its props, never by importing its internals.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { FilterSheet } from "./FilterSheet.js";
|
|
11
|
+
export { FilterChip } from "./FilterChip.js";
|
|
12
|
+
// Pure, framework-free — the module's one non-component export (see MODULE.md).
|
|
13
|
+
export { countActiveFilters } from "./filterSheet.helpers.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FilterSheet","FilterChip","countActiveFilters"],"sourceRoot":"../../../../src","sources":["modules/filter-sheet/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,kBAAe;AAS3C,SAASC,UAAU,QAAQ,iBAAc;AAGzC;AACA,SAASC,kBAAkB,QAAQ,0BAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Input — wraps RN's `TextInput`. Colour is `status`-driven (never a free `color` prop), structure
|
|
5
|
+
* comes from `createThemedVariants`, and the focus indicator is the same offset-ring pattern as
|
|
6
|
+
* Button: a `border.focus` ring drawn a small gap OUTSIDE the field, on the canvas, because that is
|
|
7
|
+
* the role token proven ≥ 3:1 against the canvas (over the field's own border it isn't guaranteed).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { memo, useState } from "react";
|
|
11
|
+
import { Platform, StyleSheet, Text, TextInput, View } from "react-native";
|
|
12
|
+
import { Icon } from "../../core/icon/index.js";
|
|
13
|
+
import { useTheme } from "../../theme/index.js";
|
|
14
|
+
import { INPUT_SIZES, inputStructure, resolveInputAccessibility, resolveInputStatus } from "./Input.variants.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const FOCUS_RING_WIDTH = 2;
|
|
17
|
+
const FOCUS_RING_GAP = 2;
|
|
18
|
+
export const Input = /*#__PURE__*/memo(function Input(props) {
|
|
19
|
+
const {
|
|
20
|
+
value,
|
|
21
|
+
onChangeText,
|
|
22
|
+
placeholder,
|
|
23
|
+
size = "md",
|
|
24
|
+
status = "default",
|
|
25
|
+
disabled = false,
|
|
26
|
+
label,
|
|
27
|
+
helperText,
|
|
28
|
+
errorText,
|
|
29
|
+
leadingIcon,
|
|
30
|
+
trailingIcon,
|
|
31
|
+
secureTextEntry,
|
|
32
|
+
accessibilityLabel,
|
|
33
|
+
containerStyle,
|
|
34
|
+
testID
|
|
35
|
+
} = props;
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
const [focused, setFocused] = useState(false);
|
|
38
|
+
const spec = INPUT_SIZES[size];
|
|
39
|
+
const statusColors = resolveInputStatus(theme.colors, status);
|
|
40
|
+
const a11y = resolveInputAccessibility({
|
|
41
|
+
label,
|
|
42
|
+
accessibilityLabel,
|
|
43
|
+
disabled
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Error message takes priority over the helper text — the field shows one message at a time.
|
|
47
|
+
const message = status === "error" ? errorText : helperText;
|
|
48
|
+
const glyph = name => /*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
name: name,
|
|
50
|
+
size: spec.iconSize,
|
|
51
|
+
color: theme.colors.fg.muted,
|
|
52
|
+
strokeWidth: 2
|
|
53
|
+
});
|
|
54
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
55
|
+
style: containerStyle,
|
|
56
|
+
children: [label !== undefined &&
|
|
57
|
+
/*#__PURE__*/
|
|
58
|
+
// Decorative — the real accessible name lives on the TextInput below, so this isn't a
|
|
59
|
+
// second element a screen reader would announce redundantly right after it.
|
|
60
|
+
_jsx(Text, {
|
|
61
|
+
accessibilityElementsHidden: true,
|
|
62
|
+
importantForAccessibility: "no-hide-descendants",
|
|
63
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.medium), {
|
|
64
|
+
fontSize: theme.fontSizes.sm,
|
|
65
|
+
color: theme.colors.fg.default,
|
|
66
|
+
marginBottom: theme.space[1]
|
|
67
|
+
}],
|
|
68
|
+
children: label
|
|
69
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
70
|
+
style: [inputStructure(theme, {
|
|
71
|
+
size
|
|
72
|
+
}), {
|
|
73
|
+
borderColor: statusColors.border
|
|
74
|
+
}, disabled && styles.dimmed],
|
|
75
|
+
children: [focused && !disabled && /*#__PURE__*/_jsx(View, {
|
|
76
|
+
pointerEvents: "none",
|
|
77
|
+
testID: "input-focus-ring",
|
|
78
|
+
style: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
top: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
81
|
+
left: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
82
|
+
right: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
83
|
+
bottom: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
84
|
+
borderWidth: FOCUS_RING_WIDTH,
|
|
85
|
+
borderColor: theme.colors.border.focus,
|
|
86
|
+
borderRadius: theme.radii.base + FOCUS_RING_GAP + FOCUS_RING_WIDTH
|
|
87
|
+
}
|
|
88
|
+
}), leadingIcon && glyph(leadingIcon), /*#__PURE__*/_jsx(TextInput, {
|
|
89
|
+
testID: testID,
|
|
90
|
+
value: value,
|
|
91
|
+
onChangeText: onChangeText,
|
|
92
|
+
placeholder: placeholder,
|
|
93
|
+
placeholderTextColor: theme.colors.fg.muted,
|
|
94
|
+
secureTextEntry: secureTextEntry,
|
|
95
|
+
editable: a11y.editable,
|
|
96
|
+
accessibilityLabel: a11y.accessibilityLabel,
|
|
97
|
+
accessibilityState: a11y.accessibilityState,
|
|
98
|
+
hitSlop: spec.hitSlop,
|
|
99
|
+
onFocus: () => setFocused(true),
|
|
100
|
+
onBlur: () => setFocused(false),
|
|
101
|
+
style: [{
|
|
102
|
+
flex: 1,
|
|
103
|
+
alignSelf: "stretch",
|
|
104
|
+
fontSize: spec.fontSize,
|
|
105
|
+
color: theme.colors.fg.default,
|
|
106
|
+
padding: 0
|
|
107
|
+
}, theme.fontStyleForWeight(theme.fontWeights.regular), Platform.OS === "web" && styles.webOutlineReset]
|
|
108
|
+
}), trailingIcon && glyph(trailingIcon)]
|
|
109
|
+
}), message !== undefined && /*#__PURE__*/_jsx(Text, {
|
|
110
|
+
accessibilityLiveRegion: status === "error" ? "polite" : undefined,
|
|
111
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
112
|
+
fontSize: theme.fontSizes.xs,
|
|
113
|
+
color: statusColors.message,
|
|
114
|
+
marginTop: theme.space[1]
|
|
115
|
+
}],
|
|
116
|
+
children: message
|
|
117
|
+
})]
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
const styles = StyleSheet.create({
|
|
121
|
+
// A disabled control is exempt from the contrast minimum (WCAG 1.4.3), so a uniform dim is correct.
|
|
122
|
+
dimmed: {
|
|
123
|
+
opacity: 0.5
|
|
124
|
+
},
|
|
125
|
+
// RNW renders `TextInput` as a real `<input>`, which paints the browser's own default focus
|
|
126
|
+
// outline on top of the themed ring above it — a visible double border. Web-only: `outlineWidth`
|
|
127
|
+
// also drives native TV remote-control focus, so zeroing it globally would break that.
|
|
128
|
+
webOutlineReset: {
|
|
129
|
+
outlineWidth: 0
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useState","Platform","StyleSheet","Text","TextInput","View","Icon","useTheme","INPUT_SIZES","inputStructure","resolveInputAccessibility","resolveInputStatus","jsx","_jsx","jsxs","_jsxs","FOCUS_RING_WIDTH","FOCUS_RING_GAP","Input","props","value","onChangeText","placeholder","size","status","disabled","label","helperText","errorText","leadingIcon","trailingIcon","secureTextEntry","accessibilityLabel","containerStyle","testID","theme","focused","setFocused","spec","statusColors","colors","a11y","message","glyph","name","iconSize","color","fg","muted","strokeWidth","style","children","undefined","accessibilityElementsHidden","importantForAccessibility","fontStyleForWeight","fontWeights","medium","fontSize","fontSizes","sm","default","marginBottom","space","borderColor","border","styles","dimmed","pointerEvents","position","top","left","right","bottom","borderWidth","focus","borderRadius","radii","base","placeholderTextColor","editable","accessibilityState","hitSlop","onFocus","onBlur","flex","alignSelf","padding","regular","OS","webOutlineReset","accessibilityLiveRegion","xs","marginTop","create","opacity","outlineWidth"],"sourceRoot":"../../../../src","sources":["modules/input/Input.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AACtC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAE1E,SAASC,IAAI,QAAQ,0BAAiB;AAGtC,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SACEC,WAAW,EACXC,cAAc,EACdC,yBAAyB,EACzBC,kBAAkB,QACb,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,I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,EAAE;QAAE9C,KAAK,EAAEP,YAAY,CAACG,OAAO;QAAEmD,SAAS,EAAE1D,KAAK,CAAC4B,KAAK,CAAC,CAAC;MAAE,CAAC,CACxF;MAAAZ,QAAA,EAEDT;IAAO,CACJ,CACP;EAAA,CACG,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMwB,MAAM,GAAGhE,UAAU,CAAC4F,MAAM,CAAC;EAC/B;EACA3B,MAAM,EAAE;IAAE4B,OAAO,EAAE;EAAI,CAAC;EACxB;EACA;EACA;EACAL,eAAe,EAAE;IAAEM,YAAY,EAAE;EAAE;AACrC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Input's style + behaviour resolution — same split as Button.variants:
|
|
5
|
+
* - STRUCTURE (height, padding, radius, border WIDTH) lives in the themed `inputStructure`
|
|
6
|
+
* resolver, static per (brand, mode), registered once via `StyleSheet.create`.
|
|
7
|
+
* - COLOUR is `status`-driven (never a free `color` prop) and resolved from the theme's ROLE
|
|
8
|
+
* colours by `resolveInputStatus`, so it is guaranteed legible in both modes.
|
|
9
|
+
* - ACCESSIBILITY prop derivation is `resolveInputAccessibility`, kept pure so the
|
|
10
|
+
* "accessibilityLabel falls back to the visible label / disabled blocks editing" contract is
|
|
11
|
+
* unit-testable without rendering React Native.
|
|
12
|
+
*
|
|
13
|
+
* Free of `lucide` and of any React tree, so the WCAG + behaviour tests import it directly
|
|
14
|
+
* (mocking only `react-native`'s `StyleSheet`, as `core/style` does).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
18
|
+
|
|
19
|
+
/** A state, not a brand tone — an input's colour reports validity, so it is never called `tone`. */
|
|
20
|
+
|
|
21
|
+
/** Same floor as Button — 44dp (WCAG 2.5.5 / HIG). Duplicated, not imported: modules stay isolated. */
|
|
22
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
23
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
24
|
+
/**
|
|
25
|
+
* Input-specific dimensions. Height/iconSize/slop are the component's own design constants;
|
|
26
|
+
* `fontSize` sits on the theme's `fontSizes` scale (14/16/18) — same numbers as Button's sizes, so
|
|
27
|
+
* an icon-adjacent label and a field row line up when placed side by side.
|
|
28
|
+
*/
|
|
29
|
+
export const INPUT_SIZES = {
|
|
30
|
+
sm: {
|
|
31
|
+
height: 32,
|
|
32
|
+
fontSize: 14,
|
|
33
|
+
iconSize: 16,
|
|
34
|
+
hitSlop: slopFor(32)
|
|
35
|
+
},
|
|
36
|
+
md: {
|
|
37
|
+
height: 40,
|
|
38
|
+
fontSize: 16,
|
|
39
|
+
iconSize: 18,
|
|
40
|
+
hitSlop: slopFor(40)
|
|
41
|
+
},
|
|
42
|
+
lg: {
|
|
43
|
+
height: 48,
|
|
44
|
+
fontSize: 18,
|
|
45
|
+
iconSize: 20,
|
|
46
|
+
hitSlop: slopFor(48)
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Maps `status` onto the theme's role colours. The whole reason the prop is a closed union and not
|
|
51
|
+
* `color?: string`: every colour an Input can show is one of these role lookups, so it can never be
|
|
52
|
+
* an off-palette value an app invented, and it inverts light↔dark for free.
|
|
53
|
+
*
|
|
54
|
+
* The error border deliberately reads `status.danger.solid`, NOT `status.danger.border` —
|
|
55
|
+
* `StatusColors.border` is documented as the decorative chip/badge outline (`ramp[200]`) and
|
|
56
|
+
* measures below 3:1 against the canvas on every brand × mode (as low as 2.07:1). A 1px field
|
|
57
|
+
* outline is a real UI boundary (WCAG 1.4.11), so it needs the rung that actually clears 3:1;
|
|
58
|
+
* `solid` does, comfortably, everywhere (≥ 3.37:1 light, ≥ 5.05:1 dark) — see `Input.test.ts`.
|
|
59
|
+
*/
|
|
60
|
+
export function resolveInputStatus(colors, status) {
|
|
61
|
+
if (status === "error") {
|
|
62
|
+
return {
|
|
63
|
+
border: colors.status.danger.solid,
|
|
64
|
+
message: colors.status.danger.text
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
border: colors.border.interactive,
|
|
69
|
+
message: colors.fg.muted
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Derives the accessibility surface once, purely, so the fallback contract is testable without a
|
|
74
|
+
* renderer. RN's `TextInput` has no `htmlFor`-equivalent link to a sibling label `Text`, so the
|
|
75
|
+
* label's content must be copied onto `accessibilityLabel` directly (an explicit
|
|
76
|
+
* `accessibilityLabel` always wins).
|
|
77
|
+
*/
|
|
78
|
+
export function resolveInputAccessibility(input) {
|
|
79
|
+
const disabled = input.disabled === true;
|
|
80
|
+
return {
|
|
81
|
+
accessibilityLabel: input.accessibilityLabel ?? input.label,
|
|
82
|
+
accessibilityState: {
|
|
83
|
+
disabled
|
|
84
|
+
},
|
|
85
|
+
editable: !disabled
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Structural styles only — layout, height, padding, radius, border WIDTH. No colours (those are
|
|
91
|
+
* status-driven and applied inline over this), so this compiles once per theme identity via the
|
|
92
|
+
* `WeakMap`-cached themed resolver and never rebuilds per render.
|
|
93
|
+
*/
|
|
94
|
+
export const inputStructure = createThemedVariants(theme => ({
|
|
95
|
+
base: {
|
|
96
|
+
flexDirection: "row",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
borderWidth: theme.borderWidths.thin,
|
|
99
|
+
borderRadius: theme.radii.base,
|
|
100
|
+
columnGap: theme.space[2]
|
|
101
|
+
},
|
|
102
|
+
variants: {
|
|
103
|
+
size: {
|
|
104
|
+
sm: {
|
|
105
|
+
height: INPUT_SIZES.sm.height,
|
|
106
|
+
paddingHorizontal: theme.space[3]
|
|
107
|
+
},
|
|
108
|
+
md: {
|
|
109
|
+
height: INPUT_SIZES.md.height,
|
|
110
|
+
paddingHorizontal: theme.space[4]
|
|
111
|
+
},
|
|
112
|
+
lg: {
|
|
113
|
+
height: INPUT_SIZES.lg.height,
|
|
114
|
+
paddingHorizontal: theme.space[6]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
defaultVariants: {
|
|
119
|
+
size: "md"
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
//# sourceMappingURL=Input.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","INPUT_SIZES","sm","fontSize","iconSize","hitSlop","md","lg","resolveInputStatus","colors","status","border","danger","solid","message","text","interactive","fg","muted","resolveInputAccessibility","input","disabled","accessibilityLabel","label","accessibilityState","editable","inputStructure","theme","base","flexDirection","alignItems","borderWidth","borderWidths","thin","borderRadius","radii","columnGap","space","variants","size","paddingHorizontal","defaultVariants"],"sourceRoot":"../../../../src","sources":["modules/input/Input.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,oBAAoB,QAAQ,2BAAkB;;AAGvD;;AAGA;AACA,OAAO,MAAMC,gBAAgB,GAAG,EAAE;AAElC,MAAMC,OAAO,GAAIC,MAAc,IAAaC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,IAAI,CAAC,CAACL,gBAAgB,GAAGE,MAAM,IAAI,CAAC,CAAC,CAAC;AAanG;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,WAAW,GAAG;EACzBC,EAAE,EAAE;IAAEL,MAAM,EAAE,EAAE;IAAEM,QAAQ,EAAE,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,OAAO,EAAET,OAAO,CAAC,EAAE;EAAE,CAAC;EACpEU,EAAE,EAAE;IAAET,MAAM,EAAE,EAAE;IAAEM,QAAQ,EAAE,EAAE;IAAEC,QAAQ,EAAE,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ACU,KAAK,CAAC,CAAC;EAC1B,CAAC;EACDC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJrC,EAAE,EAAE;QAAEL,MAAM,EAAEI,WAAW,CAACC,EAAE,CAACL,MAAM;QAAE2C,iBAAiB,EAAEb,KAAK,CAACU,KAAK,CAAC,CAAC;MAAE,CAAC;MACxE/B,EAAE,EAAE;QAAET,MAAM,EAAEI,WAAW,CAACK,EAAE,CAACT,MAAM;QAAE2C,iBAAiB,EAAEb,KAAK,CAACU,KAAK,CAAC,CAAC;MAAE,CAAC;MACxE9B,EAAE,EAAE;QAAEV,MAAM,EAAEI,WAAW,CAACM,EAAE,CAACV,MAAM;QAAE2C,iBAAiB,EAAEb,KAAK,CAACU,KAAK,CAAC,CAAC;MAAE;IACzE;EACF,CAAC;EACDI,eAAe,EAAE;IAAEF,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# input/ — a controlled text field with label, status, and helper/error messaging
|
|
2
|
+
|
|
3
|
+
`Input` wraps RN's `TextInput`. It follows Button's reference pattern: structure vs colour split,
|
|
4
|
+
pure/testable resolvers, closed unions, no `{...rest}`.
|
|
5
|
+
|
|
6
|
+
## Files
|
|
7
|
+
|
|
8
|
+
| File | Role |
|
|
9
|
+
|------|------|
|
|
10
|
+
| `Input.tsx` | The component. Composition, a11y wiring, focus ring, disabled dimming. |
|
|
11
|
+
| `Input.variants.ts` | Pure resolvers (`INPUT_SIZES`, `resolveInputStatus`, `resolveInputAccessibility`) + the themed structural variant resolver `inputStructure`. No React, no lucide. |
|
|
12
|
+
| `index.ts` | Public surface: `Input`, `InputProps`, the closed unions, `IconName` (re-exported from `core/icon`). |
|
|
13
|
+
| `__tests__/Input.test.ts` | Pure: WCAG contrast (all brands × modes) + touch target + a11y contract. |
|
|
14
|
+
| `__tests__/Input.render.test.tsx` | Render: value/placeholder, editing, disabled, helper/error swap, focus ring. |
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Notes |
|
|
19
|
+
|------|------|---------|-------|
|
|
20
|
+
| `value` | `string` | — | Required — controlled. |
|
|
21
|
+
| `onChangeText` | `(text: string) => void` | — | Required. |
|
|
22
|
+
| `placeholder` | `string` | — | |
|
|
23
|
+
| `size` | `sm \| md \| lg` | `md` | 32 / 40 / 48 dp; short sizes reach 44 via `hitSlop`. |
|
|
24
|
+
| `status` | `default \| error` | `default` | Closed union — a **state**, not a brand `tone`. |
|
|
25
|
+
| `disabled` | `boolean` | `false` | Dimmed; blocks editing. |
|
|
26
|
+
| `label` | `string` | — | Rendered above the field; falls back into `accessibilityLabel`. |
|
|
27
|
+
| `helperText` | `string` | — | Shown below the field when `status` is `default`. |
|
|
28
|
+
| `errorText` | `string` | — | Shown below the field (replacing `helperText`), live-announced, when `status` is `error`. |
|
|
29
|
+
| `leadingIcon` / `trailingIcon` | `IconName` | — | A NAME, never a `ReactNode`. Decorative (no built-in clear/press behaviour in v1). |
|
|
30
|
+
| `secureTextEntry` | `boolean` | `false` | No visibility-toggle button in v1 — needs an icon outside the current catalogue. |
|
|
31
|
+
| `accessibilityLabel` | `string` | `label` | Overrides the label fallback. |
|
|
32
|
+
| `containerStyle` | `LayoutStyle` | — | The documented exception for a native-primitive wrapper. Outermost, last, once. Never `inputStyle`. |
|
|
33
|
+
| `testID` | `string` | — | Forwarded to the underlying `TextInput`. |
|
|
34
|
+
|
|
35
|
+
## Accessibility contract (WCAG)
|
|
36
|
+
|
|
37
|
+
- **2.5.5 / 2.5.8 target size** — every size reaches ≥ 44 dp via `hitSlop` on the `TextInput`. This
|
|
38
|
+
only holds because the `TextInput` carries `alignSelf: "stretch"`, so it fills the row's full
|
|
39
|
+
`spec.height` instead of shrinking to its intrinsic single-line text height — the same
|
|
40
|
+
height-must-match-hitSlop assumption Button satisfies by setting `height` directly on the
|
|
41
|
+
`Pressable` that receives its `hitSlop`. `Input.render.test.tsx` asserts the rendered node, not
|
|
42
|
+
just the `height + 2·hitSlop` arithmetic.
|
|
43
|
+
- **1.4.3** — label/value text (`fg.default`), placeholder/helper text (`fg.muted`), and the error
|
|
44
|
+
message (`status.danger.text`) are all measured ≥ 4.5:1 against the canvas, for all 8 brands ×
|
|
45
|
+
both modes (`Input.test.ts`). The field renders no explicit background (transparent, like Button's
|
|
46
|
+
outline/ghost/link variants), so the canvas is what every colour is actually read against.
|
|
47
|
+
- **1.4.11** — the resting/focus border (`border.interactive` / `border.focus`) and the error border
|
|
48
|
+
clear 3:1 against the canvas. The error border deliberately reads `status.danger.solid`, **not**
|
|
49
|
+
`status.danger.border` — the latter is `StatusColors`' documented decorative chip/badge outline
|
|
50
|
+
and measures as low as ~2.07:1 against the canvas on several brands in dark mode. `solid` clears
|
|
51
|
+
3:1 everywhere (≥ 3.37:1 light, ≥ 5.05:1 dark) — see the comment on `resolveInputStatus`.
|
|
52
|
+
- **2.4.7 / 2.4.11** — a visible focus ring (`border.focus`) appears on `TextInput` focus/blur, offset
|
|
53
|
+
a small gap OUTSIDE the field, same pattern as Button's ring (its guaranteed ≥ 3:1 is against the
|
|
54
|
+
canvas, not the field's own border).
|
|
55
|
+
- **Web** — RNW renders `TextInput` as a real `<input>`, so `styles.webOutlineReset` (`outlineWidth: 0`,
|
|
56
|
+
applied only when `Platform.OS === "web"`) suppresses the browser's own default focus outline, which
|
|
57
|
+
would otherwise double up visibly with the themed ring above. The themed ring remains the sole
|
|
58
|
+
visible focus indicator — this doesn't touch native, where `outlineWidth` drives TV remote focus.
|
|
59
|
+
- The visible label `Text` is hidden from the accessibility tree
|
|
60
|
+
(`accessibilityElementsHidden` / `importantForAccessibility="no-hide-descendants"`): RN's
|
|
61
|
+
`TextInput` has no `htmlFor`-equivalent link to a sibling label, so its content is copied onto the
|
|
62
|
+
field's own `accessibilityLabel` instead — keeping the label visible without a screen reader
|
|
63
|
+
announcing "Email" twice (once for the label, once for the field).
|
|
64
|
+
- `errorText` carries `accessibilityLiveRegion="polite"` so a validation error appearing after the
|
|
65
|
+
user leaves the field is announced without requiring re-focus.
|
|
66
|
+
- A disabled field is exempt from the contrast minimum (WCAG 1.4.3) and dims via `opacity: 0.5`,
|
|
67
|
+
same as Button's disabled state — not a separate, unverified colour token.
|
|
68
|
+
|
|
69
|
+
## Why `status` is a union, not a `color`
|
|
70
|
+
|
|
71
|
+
Same reasoning as Button's `tone`: every colour an Input can show is a role lookup
|
|
72
|
+
(`resolveInputStatus`), so it is guaranteed legible in both modes and can never be an off-palette
|
|
73
|
+
value an app invented. `status` is named for what it actually is — validity state, not brand
|
|
74
|
+
identity — so it is never called `tone`.
|
|
75
|
+
|
|
76
|
+
## Patterns copied from Button
|
|
77
|
+
|
|
78
|
+
1. **Structure vs colour split** — `inputStructure` (via `createThemedVariants`) holds only layout
|
|
79
|
+
numbers (height, padding, radius, border *width*); colour is resolved by `resolveInputStatus` and
|
|
80
|
+
applied inline.
|
|
81
|
+
2. **Pure, testable resolvers** in `Input.variants.ts` (no React/lucide) — the WCAG + behaviour
|
|
82
|
+
contract is unit-tested against the real palettes, never eyeballed.
|
|
83
|
+
3. **Closed unions only** (`size` / `status`), icons as NAMEs, `containerStyle: LayoutStyle` last and
|
|
84
|
+
once, no `{...rest}`.
|
|
85
|
+
4. **Offset focus ring** — identical geometry/token to Button's (`border.focus`, 2dp gap + 2dp width).
|
|
86
|
+
|
|
87
|
+
## Known gaps
|
|
88
|
+
|
|
89
|
+
- No visibility-toggle button for `secureTextEntry` — would need an "eye" icon outside the current
|
|
90
|
+
22-name catalogue (`core/icon`); flagged rather than adding one from this module.
|
|
91
|
+
- `leadingIcon`/`trailingIcon` are decorative-only in v1 (no `onClear` callback was in scope) — a
|
|
92
|
+
trailing `"x"` renders but doesn't clear the field; a future version could add an explicit
|
|
93
|
+
`onClear` prop if a consuming app needs it.
|
|
94
|
+
|
|
95
|
+
## Performance
|
|
96
|
+
|
|
97
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Its one library child, `Icon`, only ever receives primitives — nothing to memoize; `TextInput`/`View` are host elements, outside this pass's scope.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/input`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The visual/behaviour resolvers (`resolveInputStatus`, `INPUT_SIZES`, …)
|
|
6
|
+
* stay internal — a consumer configures an Input through its props, never by importing its internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Input } from "./Input.js";
|
|
10
|
+
|
|
11
|
+
// Re-exported so a caller can type a `leadingIcon`/`trailingIcon` prop without a separate import
|
|
12
|
+
// from `core/icon`.
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Input"],"sourceRoot":"../../../../src","sources":["modules/input/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,YAAS;;AAK/B;AACA","ignoreList":[]}
|