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,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* NumberInput's style + behaviour resolution — same split as Input.variants:
|
|
5
|
+
* - STRUCTURE (height, width, border WIDTH) lives in the themed `numberInputStructure` /
|
|
6
|
+
* `numberInputStepperStructure` resolvers, static per (brand, mode).
|
|
7
|
+
* - COLOUR is `status`-driven (never a free `color` prop), resolved from the theme's ROLE colours by
|
|
8
|
+
* `resolveNumberInputStatus` — same border token choice as Input, and for the same reason
|
|
9
|
+
* (`status.danger.border` fails 3:1 against the canvas on several brands; `status.danger.solid`
|
|
10
|
+
* clears it everywhere).
|
|
11
|
+
* - VALUE handling (`clampNumberInputValue`, `parseNumberInputDraft`, `canDecrementNumberInput` /
|
|
12
|
+
* `canIncrementNumberInput`) and ACCESSIBILITY prop derivation (`resolveNumberInputAccessibility`)
|
|
13
|
+
* are kept pure so the clamping/limit contract is unit-testable without rendering React Native.
|
|
14
|
+
*
|
|
15
|
+
* Free of `lucide` and of any React tree, so the WCAG + behaviour tests import it directly (mocking
|
|
16
|
+
* only `react-native`'s `StyleSheet`, as `core/style` does).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
20
|
+
|
|
21
|
+
/** A state, not a brand tone — same reasoning as Input's `status`. */
|
|
22
|
+
|
|
23
|
+
/** Same floor as Button/Input/Select — 44dp (WCAG 2.5.5 / HIG). Duplicated, not imported: modules
|
|
24
|
+
* stay isolated. */
|
|
25
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
26
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
27
|
+
/** Same numbers as Input's sizes, so a NumberInput lines up beside a plain field. */
|
|
28
|
+
export const NUMBER_INPUT_SIZES = {
|
|
29
|
+
sm: {
|
|
30
|
+
height: 32,
|
|
31
|
+
fontSize: 14,
|
|
32
|
+
iconSize: 16,
|
|
33
|
+
hitSlop: slopFor(32)
|
|
34
|
+
},
|
|
35
|
+
md: {
|
|
36
|
+
height: 40,
|
|
37
|
+
fontSize: 16,
|
|
38
|
+
iconSize: 18,
|
|
39
|
+
hitSlop: slopFor(40)
|
|
40
|
+
},
|
|
41
|
+
lg: {
|
|
42
|
+
height: 48,
|
|
43
|
+
fontSize: 18,
|
|
44
|
+
iconSize: 20,
|
|
45
|
+
hitSlop: slopFor(48)
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Pressed-state colours for the stepper buttons. Deliberately NOT `bg.sunken`: a stepper carries no
|
|
50
|
+
* background at rest, so its fill's only edge is against `bg.canvas` — and `bg.sunken` measures only
|
|
51
|
+
* ~1.0–1.12:1 there (WCAG 1.4.11 needs ≥ 3:1). This reuses Button's own "neutral" solid recipe
|
|
52
|
+
* (`fg.default` fill / `bg.canvas` label) instead of inventing a new colour: `fg.default` is already
|
|
53
|
+
* proven ≥ 4.5:1 against `bg.canvas` by the resting-icon test above, and contrast is symmetric, so the
|
|
54
|
+
* fill clears the 3:1 non-text minimum AND the inverted icon clears 4.5:1 text contrast on it, on
|
|
55
|
+
* every brand × mode, for free — see the `it.each` measurement in `NumberInput.test.ts`.
|
|
56
|
+
*
|
|
57
|
+
* Keyboard/AT focus is a SEPARATE indicator — the offset `border.focus` ring `NumberInput.tsx` draws
|
|
58
|
+
* per stepper, same geometry/token as Button/Input/Checkbox. This fill is for the touch press only.
|
|
59
|
+
*/
|
|
60
|
+
export function resolveNumberInputStepperPressColors(colors) {
|
|
61
|
+
return {
|
|
62
|
+
fill: colors.fg.default,
|
|
63
|
+
icon: colors.bg.canvas
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Maps `status` onto the theme's role colours — identical reasoning and token choice to Input's
|
|
69
|
+
* `resolveInputStatus`: the error border deliberately reads `status.danger.solid`, NOT
|
|
70
|
+
* `status.danger.border` (the latter is the decorative chip/badge outline and measures below 3:1
|
|
71
|
+
* against the canvas on several brand × mode combinations).
|
|
72
|
+
*/
|
|
73
|
+
export function resolveNumberInputStatus(colors, status) {
|
|
74
|
+
if (status === "error") {
|
|
75
|
+
return {
|
|
76
|
+
border: colors.status.danger.solid
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
border: colors.border.interactive
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** Same fallback contract as `resolveInputAccessibility`: an explicit `accessibilityLabel` always
|
|
84
|
+
* wins over the visible label. */
|
|
85
|
+
export function resolveNumberInputAccessibility(input) {
|
|
86
|
+
const disabled = input.disabled === true;
|
|
87
|
+
return {
|
|
88
|
+
accessibilityLabel: input.accessibilityLabel ?? input.label,
|
|
89
|
+
accessibilityState: {
|
|
90
|
+
disabled
|
|
91
|
+
},
|
|
92
|
+
editable: !disabled
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Clamps to [min, max]. Either bound may be absent, meaning "no floor"/"no ceiling" on that side. */
|
|
97
|
+
export function clampNumberInputValue(value, min, max) {
|
|
98
|
+
let clamped = value;
|
|
99
|
+
if (min !== undefined) clamped = Math.max(min, clamped);
|
|
100
|
+
if (max !== undefined) clamped = Math.min(max, clamped);
|
|
101
|
+
return clamped;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Parses a typed draft to a finite number, or `null` for anything that isn't a complete number yet
|
|
106
|
+
* ("", "-", ".", "-.") — so the caller can tell "no value yet" apart from a real `0` and doesn't
|
|
107
|
+
* commit a bogus `NaN`/clamp on every half-typed keystroke.
|
|
108
|
+
*/
|
|
109
|
+
export function parseNumberInputDraft(raw) {
|
|
110
|
+
const trimmed = raw.trim();
|
|
111
|
+
if (trimmed === "" || trimmed === "-" || trimmed === "." || trimmed === "-.") return null;
|
|
112
|
+
const parsed = Number(trimmed);
|
|
113
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
114
|
+
}
|
|
115
|
+
/** Decrement is blocked once `value` is already at (or below) `min`, or the field is disabled. */
|
|
116
|
+
export function canDecrementNumberInput(input) {
|
|
117
|
+
if (input.disabled === true) return false;
|
|
118
|
+
return input.min === undefined || input.value > input.min;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Increment is blocked once `value` is already at (or above) `max`, or the field is disabled. */
|
|
122
|
+
export function canIncrementNumberInput(input) {
|
|
123
|
+
if (input.disabled === true) return false;
|
|
124
|
+
return input.max === undefined || input.value < input.max;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Structural styles for the field row — layout, height, border WIDTH. No colours (status-driven,
|
|
129
|
+
* applied inline over this), so this compiles once per theme identity via the `WeakMap`-cached
|
|
130
|
+
* themed resolver and never rebuilds per render.
|
|
131
|
+
*/
|
|
132
|
+
export const numberInputStructure = createThemedVariants(theme => ({
|
|
133
|
+
base: {
|
|
134
|
+
flexDirection: "row",
|
|
135
|
+
alignItems: "center",
|
|
136
|
+
borderWidth: theme.borderWidths.thin,
|
|
137
|
+
borderRadius: theme.radii.base
|
|
138
|
+
},
|
|
139
|
+
variants: {
|
|
140
|
+
size: {
|
|
141
|
+
sm: {
|
|
142
|
+
height: NUMBER_INPUT_SIZES.sm.height
|
|
143
|
+
},
|
|
144
|
+
md: {
|
|
145
|
+
height: NUMBER_INPUT_SIZES.md.height
|
|
146
|
+
},
|
|
147
|
+
lg: {
|
|
148
|
+
height: NUMBER_INPUT_SIZES.lg.height
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
defaultVariants: {
|
|
153
|
+
size: "md"
|
|
154
|
+
}
|
|
155
|
+
}));
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Structural styles for each stepper button. `alignSelf: "stretch"` is the same fix Input's own
|
|
159
|
+
* `TextInput` carries: without it, the row's `alignItems: "center"` shrinks the button to its
|
|
160
|
+
* intrinsic content height instead of the row's full `spec.height`, silently voiding the `hitSlop`
|
|
161
|
+
* touch-target math (a real Wave-1 bug on Input — not one to repeat here). The corner radii on the
|
|
162
|
+
* outer edge match the row's own `radii.base` so a pressed/focused fill doesn't square off past the
|
|
163
|
+
* row's rounded corner.
|
|
164
|
+
*/
|
|
165
|
+
export const numberInputStepperStructure = createThemedVariants(theme => ({
|
|
166
|
+
base: {
|
|
167
|
+
alignItems: "center",
|
|
168
|
+
justifyContent: "center",
|
|
169
|
+
alignSelf: "stretch"
|
|
170
|
+
},
|
|
171
|
+
variants: {
|
|
172
|
+
size: {
|
|
173
|
+
sm: {
|
|
174
|
+
width: NUMBER_INPUT_SIZES.sm.height
|
|
175
|
+
},
|
|
176
|
+
md: {
|
|
177
|
+
width: NUMBER_INPUT_SIZES.md.height
|
|
178
|
+
},
|
|
179
|
+
lg: {
|
|
180
|
+
width: NUMBER_INPUT_SIZES.lg.height
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
position: {
|
|
184
|
+
leading: {
|
|
185
|
+
borderRightWidth: theme.borderWidths.thin,
|
|
186
|
+
borderTopLeftRadius: theme.radii.base,
|
|
187
|
+
borderBottomLeftRadius: theme.radii.base
|
|
188
|
+
},
|
|
189
|
+
trailing: {
|
|
190
|
+
borderLeftWidth: theme.borderWidths.thin,
|
|
191
|
+
borderTopRightRadius: theme.radii.base,
|
|
192
|
+
borderBottomRightRadius: theme.radii.base
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
defaultVariants: {
|
|
197
|
+
size: "md"
|
|
198
|
+
}
|
|
199
|
+
}));
|
|
200
|
+
//# sourceMappingURL=NumberInput.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","NUMBER_INPUT_SIZES","sm","fontSize","iconSize","hitSlop","md","lg","resolveNumberInputStepperPressColors","colors","fill","fg","default","icon","bg","canvas","resolveNumberInputStatus","status","border","danger","solid","interactive","resolveNumberInputAccessibility","input","disabled","accessibilityLabel","label","accessibilityState","editable","clampNumberInputValue","value","min","clamped","undefined","parseNumberInputDraft","raw","trimmed","trim","parsed","Number","isFinite","canDecrementNumberInput","canIncrementNumberInput","numberInputStructure","theme","base","flexDirection","alignItems","borderWidth","borderWidths","thin","borderRadius","radii","variants","size","defaultVariants","numberInputStepperStructure","justifyContent","alignSelf","width","position","leading","borderRightWidth","borderTopLeftRadius","borderBottomLeftRadius","trailing","borderLeftWidth","borderTopRightRadius","borderBottomRightRadius"],"sourceRoot":"../../../../src","sources":["modules/number-input/NumberInput.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;;AAGvD;;AAGA;AACA;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,OAAO,MAAMI,kBAAkB,GAAG;EAChCC,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,EAAE;IAAEC,OAAO,EAAET,OAAO,CAAC,EAAE;EAAE,CAAC;EACpEW,EAAE,EAAE;IAAEV,MAAM,EAAE,EAAE;IAAEM,QAAQ,EAAE,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,OAAO,EAAET,OAAO,CAAC,EAAE;EAAE;AACrE,CAAiE;AAcjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASY,oCAAoCA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ACD0D,eAAe,EAAE;IAAED,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,2BAA2B,GAAG9D,oBAAoB,CAAEkD,KAAY,KAAM;EACjFC,IAAI,EAAE;IACJE,UAAU,EAAE,QAAQ;IACpBU,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE;EACb,CAAC;EACDL,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJpD,EAAE,EAAE;QAAEyD,KAAK,EAAE1D,kBAAkB,CAACC,EAAE,CAACL;MAAO,CAAC;MAC3CS,EAAE,EAAE;QAAEqD,KAAK,EAAE1D,kBAAkB,CAACK,EAAE,CAACT;MAAO,CAAC;MAC3CU,EAAE,EAAE;QAAEoD,KAAK,EAAE1D,kBAAkB,CAACM,EAAE,CAACV;MAAO;IAC5C,CAAC;IACD+D,QAAQ,EAAE;MACRC,OAAO,EAAE;QACPC,gBAAgB,EAAElB,KAAK,CAACK,YAAY,CAACC,IAAI;QACzCa,mBAAmB,EAAEnB,KAAK,CAACQ,KAAK,CAACP,IAAI;QACrCmB,sBAAsB,EAAEpB,KAAK,CAACQ,KAAK,CAACP;MACtC,CAAC;MACDoB,QAAQ,EAAE;QACRC,eAAe,EAAEtB,KAAK,CAACK,YAAY,CAACC,IAAI;QACxCiB,oBAAoB,EAAEvB,KAAK,CAACQ,KAAK,CAACP,IAAI;QACtCuB,uBAAuB,EAAExB,KAAK,CAACQ,KAAK,CAACP;MACvC;IACF;EACF,CAAC;EACDU,eAAe,EAAE;IAAED,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/number-input`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The visual/behaviour resolvers (`resolveNumberInputStatus`,
|
|
6
|
+
* `NUMBER_INPUT_SIZES`, …) stay internal — a consumer configures a NumberInput through its props,
|
|
7
|
+
* never by importing its internals. The stepper icons are fixed ("minus"/"plus"), so there is no
|
|
8
|
+
* `icon` prop and nothing to re-export from `core/icon`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export { NumberInput } from "./NumberInput.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NumberInput"],"sourceRoot":"../../../../src","sources":["modules/number-input/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# pin-input/ — OTP-style multi-box code entry backed by one real, hidden `TextInput`
|
|
2
|
+
|
|
3
|
+
`PinInput` renders N visual boxes as a pure PROJECTION of a single controlled `value` string. It
|
|
4
|
+
does NOT manage focus across N separate `TextInput`s — that is fragile (advancing on every
|
|
5
|
+
keystroke breaks on backspace/selection) and defeats OS paste (a pasted code would land in
|
|
6
|
+
whichever box happened to be focused instead of filling the whole field). One hidden field is the
|
|
7
|
+
single source of truth; the boxes only render what it already holds.
|
|
8
|
+
|
|
9
|
+
## Files
|
|
10
|
+
|
|
11
|
+
| File | Role |
|
|
12
|
+
|------|------|
|
|
13
|
+
| `PinInput.tsx` | The component. The hidden `TextInput`, the box projection, the row `Pressable` (single touch target), the per-box focus ring. |
|
|
14
|
+
| `PinInput.variants.ts` | Pure resolvers (`PIN_INPUT_SIZES`, `resolvePinInputBoxColors`, `clampPinInputValue`, `resolvePinInputActiveIndex`, `isPinInputComplete`, `resolvePinInputAccessibility`) + the themed structural resolvers `pinInputRowStructure` / `pinInputBoxStructure`. No React. |
|
|
15
|
+
| `index.ts` | Public surface: `PinInput`, `PinInputProps`, the closed unions. |
|
|
16
|
+
| `__tests__/PinInput.test.ts` | Pure: WCAG contrast (all brands × modes) + touch target arithmetic + clamp/active-index/complete + a11y contract (incl. `secureTextEntry` masking the resolved `accessibilityValue`). |
|
|
17
|
+
| `__tests__/PinInput.render.test.tsx` | Render: box projection, masking (visual dots + the real field's `secureTextEntry`/`accessibilityValue`), change/paste clamping, `onComplete` firing-once, disabled, focus ring, real rendered hitSlop/box-size touch target. |
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default | Notes |
|
|
22
|
+
|------|------|---------|-------|
|
|
23
|
+
| `length` | `number` | `6` | Number of boxes / max code length. |
|
|
24
|
+
| `value` | `string` | — | Required — controlled. |
|
|
25
|
+
| `onValueChange` | `(value: string) => void` | — | Required. Receives the CLAMPED value (see below). |
|
|
26
|
+
| `onComplete` | `(value: string) => void` | — | Fires once per completion (`value.length === length` on a genuine change), never on an unrelated re-render while already full — see "Fires once" below. |
|
|
27
|
+
| `secureTextEntry` | `boolean` | `false` | Renders a dot instead of the character per box, forwards to the real hidden `TextInput` (native secure-entry actually engages), and masks the announced `accessibilityValue` to one `•` per digit — same masking concept as `Input`'s prop of the same name, but end-to-end: visual, native, AND assistive tech. |
|
|
28
|
+
| `keyboardType` | `number-pad \| default` | `number-pad` | `number-pad` strips non-digit characters on every change (typed OR pasted). |
|
|
29
|
+
| `status` | `default \| error` | `default` | Closed union — a state, not a brand tone. |
|
|
30
|
+
| `disabled` | `boolean` | `false` | Dimmed; blocks editing and the row's press-to-focus. |
|
|
31
|
+
| `size` | `sm \| md \| lg` | `md` | Box 40/48/56dp square; short sizes reach 44dp via the ROW's `hitSlop`. |
|
|
32
|
+
| `autoFocus` | `boolean` | `false` | Forwarded to the hidden `TextInput`. |
|
|
33
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last — the row `Pressable` is the outermost node. |
|
|
34
|
+
| `testID` | `string` | — | Roots `${testID}-box-{i}`, `${testID}-dot-{i}`, `${testID}-input`. |
|
|
35
|
+
| `accessibilityLabel` | `string` | — | **Required at the type level** — PinInput has no visible text label of its own (e.g. `"6-digit verification code"`). |
|
|
36
|
+
|
|
37
|
+
## The keystroke/paste contract
|
|
38
|
+
|
|
39
|
+
`clampPinInputValue(raw, length, keyboardType)` runs on every `onChangeText`: strips non-digits
|
|
40
|
+
when `keyboardType="number-pad"` (so a pasted code like `"123-456"` or `"123 456"` lands clean),
|
|
41
|
+
then clamps to `length` characters either way. Because the hidden field is controlled and receives
|
|
42
|
+
the FULL new text on every change (not per-keystroke deltas), a paste of any length is handled by
|
|
43
|
+
the same code path as typing — no separate paste handler needed.
|
|
44
|
+
|
|
45
|
+
## `onComplete` — fires once, ref-guarded against inline callback identity
|
|
46
|
+
|
|
47
|
+
The completion effect depends only on `[value, length]`; a fresh inline `onComplete` reference on
|
|
48
|
+
every parent render (a common pattern: `onComplete={(v) => ...}`) is read through a ref
|
|
49
|
+
(`onCompleteRef.current = onComplete` on every render body) rather than being an effect
|
|
50
|
+
dependency — so it never becomes a *cause* of a re-fire, only ever the thing that gets called
|
|
51
|
+
when `value`/`length` actually change into a complete state. `PinInput.render.test.tsx` asserts
|
|
52
|
+
both: a value transition into "complete" fires once, and an unrelated re-render (even with a brand
|
|
53
|
+
new `onComplete` closure) does not fire again.
|
|
54
|
+
|
|
55
|
+
## The hidden `TextInput` — why one field, not N
|
|
56
|
+
|
|
57
|
+
- **Paste UX**: OS paste/autofill delivers the whole code to whichever input has focus. With N
|
|
58
|
+
separate fields, a paste only fills one box; with one field, `onChangeText` receives the full
|
|
59
|
+
pasted string and the existing clamp logic handles it identically to typing.
|
|
60
|
+
- **Focus management**: auto-advancing focus across N fields on every keystroke is a well-known
|
|
61
|
+
source of bugs on backspace, selection, and IME composition. One field sidesteps the whole class.
|
|
62
|
+
- **iOS/Android OTP autofill**: `textContentType="oneTimeCode"` (set when `keyboardType="number-pad"`)
|
|
63
|
+
lets iOS surface the SMS one-time-code suggestion above the keyboard, same as it would for a
|
|
64
|
+
normal single-field OTP input.
|
|
65
|
+
- The field is `opacity: 0` (not `display: none`) so it stays real, focusable, and editable —
|
|
66
|
+
`display: none` risks the OS treating it as unfocusable on some platforms. It is positioned
|
|
67
|
+
`StyleSheet.absoluteFill` over the boxes with `pointerEvents="none"` so it never intercepts
|
|
68
|
+
touches; the row's own `Pressable` (see below) calls `inputRef.current.focus()` instead.
|
|
69
|
+
|
|
70
|
+
## Touch target — the ROW, not per-box
|
|
71
|
+
|
|
72
|
+
Tapping ANY box focuses the same single underlying field — splitting the touch target per box
|
|
73
|
+
would just be N different ways to trigger the identical action, with no independent affordance
|
|
74
|
+
each box could offer on its own. So the whole row is ONE `Pressable` (wrapping both the boxes and
|
|
75
|
+
the hidden field), and `hitSlop` (via the same `slopFor` formula Button/Input use) is computed
|
|
76
|
+
once against the row/box height, not per box. `PinInput.test.ts` asserts
|
|
77
|
+
`boxSize + 2·hitSlop ≥ 44` arithmetically for every size; `PinInput.render.test.tsx` additionally
|
|
78
|
+
asserts the REAL rendered `hitSlop` prop and box dimensions (not just the constants) reach 44dp,
|
|
79
|
+
same pattern as `Input`/`ButtonGroup`/`Reorder`'s render-level touch-target checks.
|
|
80
|
+
|
|
81
|
+
## Accessibility contract (WCAG)
|
|
82
|
+
|
|
83
|
+
- **1.3.1 / one real field, not N mystery boxes** — every box is `accessibilityRole="none"` +
|
|
84
|
+
`accessibilityElementsHidden` + `importantForAccessibility="no-hide-descendants"` (decorative,
|
|
85
|
+
not independently focusable). The hidden `TextInput` alone carries `accessibilityLabel` (the
|
|
86
|
+
required prop) and `accessibilityValue`, so a screen reader announces this as the single field it
|
|
87
|
+
actually is.
|
|
88
|
+
- **`secureTextEntry` masking is end-to-end, not cosmetic** — when set, the real hidden `TextInput`
|
|
89
|
+
also receives `secureTextEntry` (so OS-level secure-input behaviour genuinely engages, not just
|
|
90
|
+
the decorative dots) and `accessibilityValue.text` is masked to one `•` per digit
|
|
91
|
+
(`resolvePinInputAccessibility`) instead of the raw value — a screen reader must never speak a
|
|
92
|
+
masked PIN's digits aloud. Covered by `PinInput.test.ts`'s pure a11y-contract tests and
|
|
93
|
+
`PinInput.render.test.tsx`'s "secureTextEntry" describe (asserts the real field's
|
|
94
|
+
`props.secureTextEntry` and `props.accessibilityValue` directly, not just the pure resolver).
|
|
95
|
+
- **1.4.11** — the box border clears 3:1 against the canvas in both `default` (`border.interactive`)
|
|
96
|
+
and `error` (`status.danger.solid` — **not** `status.danger.border`, which `Input.variants.ts`
|
|
97
|
+
already documents as failing 3:1 on several brands in dark mode; same precedent applied here,
|
|
98
|
+
measured in `PinInput.test.ts`).
|
|
99
|
+
- **1.4.3** — the digit glyph / masked dot (`fg.default`) clears 4.5:1 against the canvas; boxes
|
|
100
|
+
render no explicit background, so the canvas is what it is actually read against (same reasoning
|
|
101
|
+
as `Input`'s borderless field).
|
|
102
|
+
- **2.4.7** — a focus ring (`border.focus`, offset outside the box — same geometry/token as
|
|
103
|
+
Button/Input/NumberInput's ring) appears on the ACTIVE box only while the hidden field is
|
|
104
|
+
genuinely focused (`onFocus`/`onBlur`), never merely because `value` reached that index — a
|
|
105
|
+
focus indicator that renders while unfocused would misrepresent real keyboard state.
|
|
106
|
+
- **2.5.5 / 2.5.8** — the row reaches ≥ 44dp via `hitSlop` (see "Touch target" above).
|
|
107
|
+
- A disabled field is exempt from the contrast minimum (WCAG 1.4.3) and dims via `opacity: 0.5`,
|
|
108
|
+
same convention as every other module.
|
|
109
|
+
|
|
110
|
+
## Patterns copied from Button/Input
|
|
111
|
+
|
|
112
|
+
1. **Structure vs colour split** — `pinInputRowStructure` / `pinInputBoxStructure` (via
|
|
113
|
+
`createThemedVariants`) hold only layout numbers; colour is resolved by
|
|
114
|
+
`resolvePinInputBoxColors` and applied inline.
|
|
115
|
+
2. **Pure, testable resolvers** in `PinInput.variants.ts` — the WCAG + behaviour contract is
|
|
116
|
+
unit-tested against the real palettes, never eyeballed.
|
|
117
|
+
3. **Closed unions only** (`size` / `status` / `keyboardType`), `style: LayoutStyle` last and once,
|
|
118
|
+
no `{...rest}`.
|
|
119
|
+
4. **Offset focus ring** — identical geometry/token to Button's, scoped to one box.
|
|
120
|
+
5. **Type-enforced a11y** — `accessibilityLabel` is required, not optional, because this control
|
|
121
|
+
has no visible text label of its own (same reasoning as Button's icon-only variant).
|
|
122
|
+
|
|
123
|
+
## Known gaps
|
|
124
|
+
|
|
125
|
+
- No per-box entrance/error-shake animation — out of scope for v1; `useReducedMotion()` is not
|
|
126
|
+
imported because nothing here currently animates. If a shake-on-error is added later it MUST
|
|
127
|
+
gate on `useReducedMotion()` (WCAG 2.3.3), matching every other animated module.
|
|
128
|
+
- `keyboardType="default"` accepts any pasted/typed character up to `length` with no charset
|
|
129
|
+
validation beyond length — alphanumeric-code validation (if a consuming app needs it) is the
|
|
130
|
+
caller's responsibility via `status="error"`, same as `Input`'s `errorText` model.
|
|
131
|
+
|
|
132
|
+
## Performance
|
|
133
|
+
|
|
134
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). No library child components at all — the `Array.from({length})` box list renders host `View`/`Text` — nothing to memoize.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PinInput — OTP-style multi-box code entry. Backed by ONE real (near-invisible) `TextInput` that
|
|
5
|
+
* captures the actual keyboard input; the N visual boxes are a pure PROJECTION of that single
|
|
6
|
+
* controlled `value` string, never N separately-focusable fields. This is deliberate, not a
|
|
7
|
+
* shortcut: managing focus across N `TextInput`s is fragile (advancing on every keystroke breaks
|
|
8
|
+
* on backspace/selection) and defeats OS paste — a pasted code lands in whichever box happened to
|
|
9
|
+
* be focused instead of filling the whole field. One field, one source of truth.
|
|
10
|
+
*
|
|
11
|
+
* Touch target: the ROW is the single 44dp+ touch target (`hitSlop` on the wrapping `Pressable`),
|
|
12
|
+
* not per-box targets — tapping ANY box focuses the same underlying field, so splitting the target
|
|
13
|
+
* per box would just be N ways to trigger the identical action.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
17
|
+
import { Pressable, StyleSheet, Text, TextInput, View } from "react-native";
|
|
18
|
+
import { useTheme } from "../../theme/index.js";
|
|
19
|
+
import { clampPinInputValue, isPinInputComplete, PIN_INPUT_SIZES, pinInputBoxStructure, pinInputRowStructure, resolvePinInputAccessibility, resolvePinInputActiveIndex, resolvePinInputBoxColors } from "./PinInput.variants.js";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
const FOCUS_RING_WIDTH = 2;
|
|
22
|
+
const FOCUS_RING_GAP = 2;
|
|
23
|
+
export const PinInput = /*#__PURE__*/memo(function PinInput(props) {
|
|
24
|
+
const {
|
|
25
|
+
length = 6,
|
|
26
|
+
value,
|
|
27
|
+
onValueChange,
|
|
28
|
+
onComplete,
|
|
29
|
+
secureTextEntry = false,
|
|
30
|
+
keyboardType = "number-pad",
|
|
31
|
+
status = "default",
|
|
32
|
+
disabled = false,
|
|
33
|
+
size = "md",
|
|
34
|
+
autoFocus = false,
|
|
35
|
+
style,
|
|
36
|
+
testID,
|
|
37
|
+
accessibilityLabel
|
|
38
|
+
} = props;
|
|
39
|
+
const theme = useTheme();
|
|
40
|
+
const inputRef = useRef(null);
|
|
41
|
+
const [focused, setFocused] = useState(false);
|
|
42
|
+
const spec = PIN_INPUT_SIZES[size];
|
|
43
|
+
const boxColors = resolvePinInputBoxColors(theme.colors, status);
|
|
44
|
+
const a11y = resolvePinInputAccessibility({
|
|
45
|
+
accessibilityLabel,
|
|
46
|
+
value,
|
|
47
|
+
disabled,
|
|
48
|
+
secureTextEntry
|
|
49
|
+
});
|
|
50
|
+
const activeIndex = resolvePinInputActiveIndex(value, length);
|
|
51
|
+
|
|
52
|
+
// Always reads the LATEST `onComplete` without making it an effect dependency — a caller passing
|
|
53
|
+
// a fresh inline arrow every render must not re-fire the completion effect on every render, only
|
|
54
|
+
// on a genuine `value`/`length` change.
|
|
55
|
+
const onCompleteRef = useRef(onComplete);
|
|
56
|
+
onCompleteRef.current = onComplete;
|
|
57
|
+
|
|
58
|
+
// Fires exactly once per completion event: `value` is the effect's only real dependency, so an
|
|
59
|
+
// unrelated re-render while already full does not re-fire, but backspacing out and retyping the
|
|
60
|
+
// same code IS a new completion and correctly fires again.
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (isPinInputComplete(value, length)) onCompleteRef.current?.(value);
|
|
63
|
+
}, [value, length]);
|
|
64
|
+
const focusInput = () => inputRef.current?.focus();
|
|
65
|
+
const handleChangeText = raw => {
|
|
66
|
+
onValueChange(clampPinInputValue(raw, length, keyboardType));
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
69
|
+
testID: testID,
|
|
70
|
+
accessible: false,
|
|
71
|
+
disabled: disabled,
|
|
72
|
+
onPress: disabled ? undefined : focusInput,
|
|
73
|
+
hitSlop: spec.hitSlop,
|
|
74
|
+
style: [pinInputRowStructure(theme, {
|
|
75
|
+
size
|
|
76
|
+
}), disabled && styles.dimmed, style],
|
|
77
|
+
children: [Array.from({
|
|
78
|
+
length
|
|
79
|
+
}, (_, index) => {
|
|
80
|
+
const char = value[index];
|
|
81
|
+
const isActive = focused && index === activeIndex;
|
|
82
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
83
|
+
testID: testID ? `${testID}-box-${index}` : undefined,
|
|
84
|
+
accessibilityRole: "none",
|
|
85
|
+
accessibilityElementsHidden: true,
|
|
86
|
+
importantForAccessibility: "no-hide-descendants",
|
|
87
|
+
style: [pinInputBoxStructure(theme, {
|
|
88
|
+
size
|
|
89
|
+
}), {
|
|
90
|
+
borderColor: boxColors.border
|
|
91
|
+
}],
|
|
92
|
+
children: [isActive && /*#__PURE__*/_jsx(View, {
|
|
93
|
+
pointerEvents: "none",
|
|
94
|
+
testID: "pin-input-focus-ring",
|
|
95
|
+
style: {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
top: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
98
|
+
left: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
99
|
+
right: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
100
|
+
bottom: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
101
|
+
borderWidth: FOCUS_RING_WIDTH,
|
|
102
|
+
borderColor: theme.colors.border.focus,
|
|
103
|
+
borderRadius: theme.radii.base + FOCUS_RING_GAP + FOCUS_RING_WIDTH
|
|
104
|
+
}
|
|
105
|
+
}), char !== undefined && (secureTextEntry ? /*#__PURE__*/_jsx(View, {
|
|
106
|
+
testID: testID ? `${testID}-dot-${index}` : undefined,
|
|
107
|
+
style: {
|
|
108
|
+
width: spec.dotSize,
|
|
109
|
+
height: spec.dotSize,
|
|
110
|
+
borderRadius: spec.dotSize / 2,
|
|
111
|
+
backgroundColor: boxColors.text
|
|
112
|
+
}
|
|
113
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
114
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.semibold), {
|
|
115
|
+
fontSize: spec.fontSize,
|
|
116
|
+
color: boxColors.text
|
|
117
|
+
}],
|
|
118
|
+
children: char
|
|
119
|
+
}))]
|
|
120
|
+
}, index);
|
|
121
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
122
|
+
ref: inputRef,
|
|
123
|
+
testID: testID ? `${testID}-input` : undefined,
|
|
124
|
+
value: value,
|
|
125
|
+
onChangeText: handleChangeText,
|
|
126
|
+
secureTextEntry: secureTextEntry,
|
|
127
|
+
keyboardType: keyboardType,
|
|
128
|
+
maxLength: length,
|
|
129
|
+
autoFocus: autoFocus,
|
|
130
|
+
autoCorrect: false,
|
|
131
|
+
autoCapitalize: "none",
|
|
132
|
+
spellCheck: false,
|
|
133
|
+
caretHidden: true,
|
|
134
|
+
textContentType: keyboardType === "number-pad" ? "oneTimeCode" : undefined,
|
|
135
|
+
editable: a11y.editable,
|
|
136
|
+
accessibilityLabel: a11y.accessibilityLabel,
|
|
137
|
+
accessibilityValue: a11y.accessibilityValue,
|
|
138
|
+
accessibilityState: a11y.accessibilityState,
|
|
139
|
+
onFocus: () => setFocused(true),
|
|
140
|
+
onBlur: () => setFocused(false),
|
|
141
|
+
pointerEvents: "none",
|
|
142
|
+
style: [StyleSheet.absoluteFill, styles.hiddenInput]
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
const styles = StyleSheet.create({
|
|
147
|
+
// A disabled control is exempt from the contrast minimum (WCAG 1.4.3), so a uniform dim is correct.
|
|
148
|
+
dimmed: {
|
|
149
|
+
opacity: 0.5
|
|
150
|
+
},
|
|
151
|
+
// Real, focusable, and editable — just visually suppressed. `opacity: 0` (not `display: none`) so
|
|
152
|
+
// it stays in the accessibility tree and keeps accepting the OS keyboard / paste / autofill.
|
|
153
|
+
hiddenInput: {
|
|
154
|
+
opacity: 0,
|
|
155
|
+
color: "transparent"
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
//# sourceMappingURL=PinInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useEffect","useRef","useState","Pressable","StyleSheet","Text","TextInput","View","useTheme","clampPinInputValue","isPinInputComplete","PIN_INPUT_SIZES","pinInputBoxStructure","pinInputRowStructure","resolvePinInputAccessibility","resolvePinInputActiveIndex","resolvePinInputBoxColors","jsx","_jsx","jsxs","_jsxs","FOCUS_RING_WIDTH","FOCUS_RING_GAP","PinInput","props","length","value","onValueChange","onComplete","secureTextEntry","keyboardType","status","disabled","size","autoFocus","style","testID","accessibilityLabel","theme","inputRef","focused","setFocused","spec","boxColors","colors","a11y","activeIndex","onCompleteRef","current","focusInput","focus","handleChangeText","raw","accessible","onPress","undefined","hitSlop","styles","dimmed","children","Array","from","_","index","char","isActive","accessibilityRole","accessibilityElementsHidden","importantForAccessibility","borderColor","border","pointerEvents","position","top","left","right","bottom","borderWidth","borderRadius","radii","base","width","dotSize","height","backgroundColor","text","fontStyleForWeight","fontWeights","semibold","fontSize","color","ref","onChangeText","maxLength","autoCorrect","autoCapitalize","spellCheck","caretHidden","textContentType","editable","accessibilityValue","accessibilityState","onFocus","onBlur","absoluteFill","hiddenInput","create","opacity"],"sourceRoot":"../../../../src","sources":["modules/pin-input/PinInput.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzD,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAG3E,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SACEC,kBAAkB,EAClBC,kBAAkB,EAClBC,eAAe,EACfC,oBAAoB,EACpBC,oBAAoB,EACpBC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,wBAAwB,QACnB,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4B7B,MAAMC,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,cAAc,GAAG,CAAC;AAExB,OAAO,MAAMC,QAAQ,gBAAGxB,IAAI,CAAC,SAASwB,QAAQA,CAACC,KAAoB,EAAE;EACnE,MAAM;IACJC,MAAM,GAAG,CAAC;IACVC,KAAK;IACLC,aAAa;IACbC,UAAU;IACVC,eAAe,GAAG,KAAK;IACvBC,YAAY,GAAG,YAAY;IAC3BC,MAAM,GAAG,SAAS;IAClBC,QAAQ,GAAG,KAAK;IAChBC,IAAI,GAAG,IAAI;IACXC,SAAS,GAAG,KAAK;IACjBC,KAAK;IACLC,MAAM;IACNC;EACF,CAAC,GAAGb,KAAK;EAET,MAAMc,KAAK,GAAG9B,QAAQ,CAAC,CAAC;EACxB,MAAM+B,QAAQ,GAAGtC,MAAM,CAAY,IAAI,CAAC;EACxC,MAAM,CAACuC,OAAO,EAAEC,UAAU,CAAC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