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,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PinInput's style + behaviour resolution — same split as Button/Input:
|
|
5
|
+
* - STRUCTURE (box size, row gap, border WIDTH) lives in the themed `pinInputRowStructure` /
|
|
6
|
+
* `pinInputBoxStructure` resolvers, static per (brand, mode), registered once via
|
|
7
|
+
* `StyleSheet.create`.
|
|
8
|
+
* - COLOUR is `status`-driven (never a free `color` prop) and resolved from the theme's ROLE
|
|
9
|
+
* colours by `resolvePinInputBoxColors`, so it is guaranteed legible in both modes.
|
|
10
|
+
* - The keystroke/paste contract (`clampPinInputValue`), the active-box index
|
|
11
|
+
* (`resolvePinInputActiveIndex`), completion (`isPinInputComplete`), and accessibility prop
|
|
12
|
+
* derivation (`resolvePinInputAccessibility`) are kept pure so they are unit-testable without
|
|
13
|
+
* rendering React Native.
|
|
14
|
+
*
|
|
15
|
+
* Free of React and of any `TextInput`/`Pressable` import, so the WCAG + behaviour tests import it
|
|
16
|
+
* directly (mocking only `react-native`'s `StyleSheet`, as `core/style` does).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
20
|
+
|
|
21
|
+
/** A validity state, not a brand tone — same reasoning as `InputStatus`. */
|
|
22
|
+
|
|
23
|
+
/** Same floor as Button/Input — 44dp (WCAG 2.5.5 / HIG). Duplicated, not imported: modules stay isolated. */
|
|
24
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
25
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
26
|
+
/**
|
|
27
|
+
* PinInput-specific dimensions. Box size / dot size / gap are the component's own design
|
|
28
|
+
* constants; `fontSize` sits on the theme's `fontSizes` scale (xl/2xl/3xl = 20/24/30) — a digit
|
|
29
|
+
* reads larger than body text, unlike Button/Input's 14/16/18 label sizes.
|
|
30
|
+
*/
|
|
31
|
+
export const PIN_INPUT_SIZES = {
|
|
32
|
+
sm: {
|
|
33
|
+
boxSize: 40,
|
|
34
|
+
fontSize: 20,
|
|
35
|
+
dotSize: 8,
|
|
36
|
+
gap: 8,
|
|
37
|
+
hitSlop: slopFor(40)
|
|
38
|
+
},
|
|
39
|
+
md: {
|
|
40
|
+
boxSize: 48,
|
|
41
|
+
fontSize: 24,
|
|
42
|
+
dotSize: 10,
|
|
43
|
+
gap: 10,
|
|
44
|
+
hitSlop: slopFor(48)
|
|
45
|
+
},
|
|
46
|
+
lg: {
|
|
47
|
+
boxSize: 56,
|
|
48
|
+
fontSize: 30,
|
|
49
|
+
dotSize: 12,
|
|
50
|
+
gap: 12,
|
|
51
|
+
hitSlop: slopFor(56)
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Maps `status` onto the theme's role colours — identical precedent to `resolveInputStatus`.
|
|
56
|
+
* The error border deliberately reads `status.danger.solid`, NOT `status.danger.border`:
|
|
57
|
+
* `StatusColors.border` is documented (see `Input.variants.ts`) as the decorative chip/badge
|
|
58
|
+
* outline (`ramp[200]`) and measures below 3:1 against the canvas on several brands in dark mode.
|
|
59
|
+
* A pin box border is a real UI boundary (WCAG 1.4.11), so it needs the rung that actually clears
|
|
60
|
+
* 3:1 everywhere — `solid` does, measured in `PinInput.test.ts`.
|
|
61
|
+
*/
|
|
62
|
+
export function resolvePinInputBoxColors(colors, status) {
|
|
63
|
+
if (status === "error") {
|
|
64
|
+
return {
|
|
65
|
+
border: colors.status.danger.solid,
|
|
66
|
+
text: colors.fg.default
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
border: colors.border.interactive,
|
|
71
|
+
text: colors.fg.default
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Strips the keystroke/paste payload to what an OTP field actually accepts: digits only when
|
|
77
|
+
* `keyboardType` is `"number-pad"` (a pasted code with stray spaces/dashes still lands cleanly),
|
|
78
|
+
* left as-is for `"default"` (alphanumeric codes), then clamped to `length` characters either way
|
|
79
|
+
* — a paste longer than the field can never overflow the controlled `value`.
|
|
80
|
+
*/
|
|
81
|
+
export function clampPinInputValue(raw, length, keyboardType) {
|
|
82
|
+
const filtered = keyboardType === "number-pad" ? raw.replace(/[^0-9]/g, "") : raw;
|
|
83
|
+
return filtered.slice(0, Math.max(0, length));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The box index that represents "where typing would land next": the current value's length, or
|
|
88
|
+
* the last box once the value is full. Pure so the projection from `value` → active box is
|
|
89
|
+
* testable without a renderer; the component gates its VISIBLE indicator on this AND real
|
|
90
|
+
* `TextInput` focus (WCAG 2.4.7 — a focus indicator only while actually focused).
|
|
91
|
+
*/
|
|
92
|
+
export function resolvePinInputActiveIndex(value, length) {
|
|
93
|
+
return Math.min(value.length, Math.max(0, length - 1));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Whether `value` fills every box — the trigger condition for `onComplete`. */
|
|
97
|
+
export function isPinInputComplete(value, length) {
|
|
98
|
+
return length > 0 && value.length === length;
|
|
99
|
+
}
|
|
100
|
+
/** Screen-reader stand-in for a masked digit — marks a box as filled without revealing its value. */
|
|
101
|
+
const ACCESSIBILITY_MASK_CHAR = "•";
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Derives the accessibility surface once, purely — same shape as `resolveInputAccessibility`, but
|
|
105
|
+
* `accessibilityLabel` is required (never a fallback) because PinInput has no visible text label of
|
|
106
|
+
* its own; the caller must always name the field (e.g. "6-digit verification code").
|
|
107
|
+
*/
|
|
108
|
+
export function resolvePinInputAccessibility(input) {
|
|
109
|
+
const disabled = input.disabled === true;
|
|
110
|
+
const masked = input.secureTextEntry === true;
|
|
111
|
+
return {
|
|
112
|
+
accessibilityLabel: input.accessibilityLabel,
|
|
113
|
+
accessibilityValue: {
|
|
114
|
+
text: masked ? ACCESSIBILITY_MASK_CHAR.repeat(input.value.length) : input.value
|
|
115
|
+
},
|
|
116
|
+
accessibilityState: {
|
|
117
|
+
disabled
|
|
118
|
+
},
|
|
119
|
+
editable: !disabled
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Structural styles for the ROW — the single contiguous touch target. No colours (status is
|
|
125
|
+
* resolved per box by `resolvePinInputBoxColors`), so this compiles once per theme identity via
|
|
126
|
+
* the `WeakMap`-cached themed resolver and never rebuilds per render.
|
|
127
|
+
*/
|
|
128
|
+
export const pinInputRowStructure = createThemedVariants(_theme => ({
|
|
129
|
+
base: {
|
|
130
|
+
flexDirection: "row",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
alignSelf: "flex-start"
|
|
133
|
+
},
|
|
134
|
+
variants: {
|
|
135
|
+
size: {
|
|
136
|
+
sm: {
|
|
137
|
+
columnGap: PIN_INPUT_SIZES.sm.gap
|
|
138
|
+
},
|
|
139
|
+
md: {
|
|
140
|
+
columnGap: PIN_INPUT_SIZES.md.gap
|
|
141
|
+
},
|
|
142
|
+
lg: {
|
|
143
|
+
columnGap: PIN_INPUT_SIZES.lg.gap
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
defaultVariants: {
|
|
148
|
+
size: "md"
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Structural styles for ONE box — square, bordered, centred content. No colours (border/text are
|
|
154
|
+
* resolved by `resolvePinInputBoxColors` and applied inline over this).
|
|
155
|
+
*/
|
|
156
|
+
export const pinInputBoxStructure = createThemedVariants(theme => ({
|
|
157
|
+
base: {
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
justifyContent: "center",
|
|
160
|
+
borderWidth: theme.borderWidths.thin,
|
|
161
|
+
borderRadius: theme.radii.base
|
|
162
|
+
},
|
|
163
|
+
variants: {
|
|
164
|
+
size: {
|
|
165
|
+
sm: {
|
|
166
|
+
width: PIN_INPUT_SIZES.sm.boxSize,
|
|
167
|
+
height: PIN_INPUT_SIZES.sm.boxSize
|
|
168
|
+
},
|
|
169
|
+
md: {
|
|
170
|
+
width: PIN_INPUT_SIZES.md.boxSize,
|
|
171
|
+
height: PIN_INPUT_SIZES.md.boxSize
|
|
172
|
+
},
|
|
173
|
+
lg: {
|
|
174
|
+
width: PIN_INPUT_SIZES.lg.boxSize,
|
|
175
|
+
height: PIN_INPUT_SIZES.lg.boxSize
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
defaultVariants: {
|
|
180
|
+
size: "md"
|
|
181
|
+
}
|
|
182
|
+
}));
|
|
183
|
+
//# sourceMappingURL=PinInput.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","PIN_INPUT_SIZES","sm","boxSize","fontSize","dotSize","gap","hitSlop","md","lg","resolvePinInputBoxColors","colors","status","border","danger","solid","text","fg","default","interactive","clampPinInputValue","raw","length","keyboardType","filtered","replace","slice","resolvePinInputActiveIndex","value","min","isPinInputComplete","ACCESSIBILITY_MASK_CHAR","resolvePinInputAccessibility","input","disabled","masked","secureTextEntry","accessibilityLabel","accessibilityValue","repeat","accessibilityState","editable","pinInputRowStructure","_theme","base","flexDirection","alignItems","alignSelf","variants","size","columnGap","defaultVariants","pinInputBoxStructure","theme","justifyContent","borderWidth","borderWidths","thin","borderRadius","radii","width"],"sourceRoot":"../../../../src","sources":["modules/pin-input/PinInput.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;;AAGvD;;AAIA;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;AAk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E,EAAE;QAAEgD,SAAS,EAAEjD,eAAe,CAACC,EAAE,CAACI;MAAI,CAAC;MACzCE,EAAE,EAAE;QAAE0C,SAAS,EAAEjD,eAAe,CAACO,EAAE,CAACF;MAAI,CAAC;MACzCG,EAAE,EAAE;QAAEyC,SAAS,EAAEjD,eAAe,CAACQ,EAAE,CAACH;MAAI;IAC1C;EACF,CAAC;EACD6C,eAAe,EAAE;IAAEF,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA;AACA;AACA,OAAO,MAAMG,oBAAoB,GAAG1D,oBAAoB,CAAE2D,KAAY,KAAM;EAC1ET,IAAI,EAAE;IACJE,UAAU,EAAE,QAAQ;IACpBQ,cAAc,EAAE,QAAQ;IACxBC,WAAW,EAAEF,KAAK,CAACG,YAAY,CAACC,IAAI;IACpCC,YAAY,EAAEL,KAAK,CAACM,KAAK,CAACf;EAC5B,CAAC;EACDI,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJ/C,EAAE,EAAE;QAAE0D,KAAK,EAAE3D,eAAe,CAACC,EAAE,CAACC,OAAO;QAAEN,MAAM,EAAEI,eAAe,CAACC,EAAE,CAACC;MAAQ,CAAC;MAC7EK,EAAE,EAAE;QAAEoD,KAAK,EAAE3D,eAAe,CAACO,EAAE,CAACL,OAAO;QAAEN,MAAM,EAAEI,eAAe,CAACO,EAAE,CAACL;MAAQ,CAAC;MAC7EM,EAAE,EAAE;QAAEmD,KAAK,EAAE3D,eAAe,CAACQ,EAAE,CAACN,OAAO;QAAEN,MAAM,EAAEI,eAAe,CAACQ,EAAE,CAACN;MAAQ;IAC9E;EACF,CAAC;EACDgD,eAAe,EAAE;IAAEF,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/pin-input`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The visual/behaviour resolvers (`resolvePinInputBoxColors`,
|
|
6
|
+
* `PIN_INPUT_SIZES`, …) stay internal — a consumer configures a PinInput through its props, never
|
|
7
|
+
* by importing its internals.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { PinInput } from "./PinInput.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PinInput"],"sourceRoot":"../../../../src","sources":["modules/pin-input/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# progress-bar/ — a linear progress indicator, determinate or indeterminate
|
|
2
|
+
|
|
3
|
+
`ProgressBar` renders a horizontal track with a coloured fill. Determinate (`value` given) sizes
|
|
4
|
+
the fill to a 0–100 value; indeterminate (`value` omitted) sweeps a segment across the track in a
|
|
5
|
+
loop. It takes no children and no interaction — it is a status display, not a control.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
| File | Role |
|
|
10
|
+
|------|------|
|
|
11
|
+
| `ProgressBar.tsx` | The component. Resolves colour/a11y, measures the track via `onLayout`, drives the `Animated` sweep loop, `style` last. |
|
|
12
|
+
| `ProgressBar.variants.ts` | Pure resolvers (`resolveProgressBarValue`, `resolveProgressBarFill`, `resolveProgressBarAccessibility`, `PROGRESS_BAR_SIZES`) + the themed structural resolvers `progressBarTrackStructure` / `progressBarFillStructure`. No React, no Animated. |
|
|
13
|
+
| `index.ts` | Public surface: `ProgressBar`, `ProgressBarProps`, `ProgressBarSize`, `ProgressBarTone`. No `icon` prop, so no `IconName` re-export. |
|
|
14
|
+
| `__tests__/ProgressBar.test.ts` | Pure: WCAG 1.4.11 contrast (all brands × modes × tones) + the value-clamp and accessibility contracts. |
|
|
15
|
+
| `__tests__/ProgressBar.render.test.tsx` | Render: determinate fill width/clamping, indeterminate sweep mount, reduced-motion static fallback, tone/track colour, consumer `style` last. |
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Notes |
|
|
20
|
+
|------|------|---------|-------|
|
|
21
|
+
| `value` | `number` | — | 0–100, clamped. Omit entirely for an indeterminate sweep. |
|
|
22
|
+
| `tone` | `accent \| success \| warning \| danger` | `accent` | Closed union — resolves to `colors.accent.text` / the matching `colors.status.*.text` (not `.solid` — see rationale below). |
|
|
23
|
+
| `size` | `sm \| md` | `md` | Track height — 4dp / 8dp. |
|
|
24
|
+
| `accessibilityLabel` | `string` | — | Optional — a progress bar is often paired with its own adjacent text label, so unlike `Spinner`/`Switch` this is not type-required. |
|
|
25
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
26
|
+
| `testID` | `string` | — | Forwarded to the track. The fill/sweep segment gets `${testID}-fill` (determinate or reduced-motion static) or `${testID}-sweep` (indeterminate, animated). |
|
|
27
|
+
|
|
28
|
+
## Accessibility contract (WCAG)
|
|
29
|
+
|
|
30
|
+
- `accessibilityRole="progressbar"` on the outer (track) node, always `accessible`.
|
|
31
|
+
- **Determinate** — `accessibilityValue={{ min: 0, max: 100, now: value }}` (value already clamped),
|
|
32
|
+
`accessibilityState={{ busy: false }}`.
|
|
33
|
+
- **Indeterminate** — **no** `accessibilityValue` at all. The absence of `now` is how assistive tech
|
|
34
|
+
reports "indeterminate"; inventing a guessed number would misreport actual progress.
|
|
35
|
+
`accessibilityState={{ busy: true }}` (1.4.1) announces the ongoing work the visual sweep alone
|
|
36
|
+
doesn't convey to a screen reader.
|
|
37
|
+
- **1.4.11 (non-text contrast)** — every tone's fill is measured ≥ 3:1 against the `bg.sunken`
|
|
38
|
+
track, for all 8 brands × both modes (`ProgressBar.test.ts`) — the fill is a non-text UI boundary
|
|
39
|
+
conveying information (WCAG 1.4.11), not decoration.
|
|
40
|
+
- **2.3.3 (reduced motion)** — `useReducedMotion()` gates the sweep loop entirely: when true, the
|
|
41
|
+
`Animated.View` is never mounted and the track instead renders a static fill at a fixed 50%
|
|
42
|
+
fraction — never a frame frozen mid-sweep (same "skip, don't freeze" contract as `Skeleton`'s
|
|
43
|
+
shimmer and `Spinner`'s spin).
|
|
44
|
+
- **Touch target (2.5.x)** — N/A. `ProgressBar` is never interactive; there is no `hitSlop`.
|
|
45
|
+
|
|
46
|
+
## Why `tone` is a union, not a `color`
|
|
47
|
+
|
|
48
|
+
Same reasoning as every other module: `color?: string` would hand the token system back to the app.
|
|
49
|
+
Every fill a `ProgressBar` can show is a role lookup (`resolveProgressBarFill`) and can never be an
|
|
50
|
+
off-palette value an app invented.
|
|
51
|
+
|
|
52
|
+
### Why the fill reads `colors.*.text`, not `colors.*.solid` — a measured correction
|
|
53
|
+
|
|
54
|
+
The obvious mapping — `accent.solid` / `status.<role>.solid` — is what `Button` uses for ITS solid
|
|
55
|
+
fill, and what an earlier draft of this component used too. Measuring it against this component's
|
|
56
|
+
actual `bg.sunken` track (`ProgressBar.test.ts`, all 8 brands × both modes × every tone) found a real
|
|
57
|
+
`AA_NON_TEXT` (3:1) failure in **light mode**: `solid` is only derived to clear contrast against its
|
|
58
|
+
own `onSolid` label, never against an arbitrary neutral surface. The shared semantic ramps make this
|
|
59
|
+
concrete — `warning.solid`/`success.solid` are the same pale orange/green on every brand, and land as
|
|
60
|
+
low as ~1.9–2.4:1 against a light `bg.sunken`. That is the exact class of mistake the component spec
|
|
61
|
+
warns about (`RadioGroup`/`Tabs` shipped a real WCAG failure the same way, by assuming a role pairing
|
|
62
|
+
"should" clear AA without measuring it) — so this component does not repeat it.
|
|
63
|
+
|
|
64
|
+
The fix stays entirely inside the existing role-token surface: `colors.*.text` is
|
|
65
|
+
`readableOn(ramp, [ramp[50]])` — the same field `Button` already uses for its outline/ghost/link
|
|
66
|
+
label, engineered specifically to read on a pale surface. Measured here, it clears ≥ 4.4:1 against
|
|
67
|
+
`bg.sunken` for every tone × all 8 brands × both modes, comfortably above the 3:1 this fill needs.
|
|
68
|
+
Reusing a "text" role as a solid fill block is a reinterpretation of an existing measured-safe value,
|
|
69
|
+
not a new colour — never a raw ramp, never a hardcoded hex.
|
|
70
|
+
|
|
71
|
+
## The indeterminate sweep — why it needs `onLayout`
|
|
72
|
+
|
|
73
|
+
RN's `transform: translateX` takes numeric dp, not a percentage string — there is no supported way
|
|
74
|
+
to animate a transform-based sweep purely in percentages. So the track measures its own rendered
|
|
75
|
+
width via `onLayout` (`trackWidth` state), and the sweep segment's width (`SWEEP_FRACTION` = 40% of
|
|
76
|
+
the track) and its `translateX` range (`-sweepWidth → trackWidth`, so it fully enters and exits) are
|
|
77
|
+
both derived from that measured width. The `Animated.loop`/`Animated.timing` itself only depends on
|
|
78
|
+
`reducedMotion`/`determinate` — resizing the track re-derives the sweep's distance on the next
|
|
79
|
+
render without restarting the loop.
|
|
80
|
+
|
|
81
|
+
## Patterns copied from `button/`, `skeleton/`, and `spinner/`
|
|
82
|
+
|
|
83
|
+
1. **Structure vs colour split.** Track height + the pill radius + `overflow: hidden` →
|
|
84
|
+
`progressBarTrackStructure` (`createThemedVariants`, registered once per theme). The fill/sweep
|
|
85
|
+
segment's own matching radius → `progressBarFillStructure` (same factory, no `size` variant —
|
|
86
|
+
its height always fills the track, applied inline). Colour (track's single `bg.sunken`, and the
|
|
87
|
+
tone-driven fill) is resolved and applied inline, same split as `buttonStructure`.
|
|
88
|
+
2. **Looping `Animated` value, reduced-motion gated** — the same shape as `Skeleton`'s shimmer:
|
|
89
|
+
`useRef(new Animated.Value(0))`, an `Animated.loop` started/stopped in a `useEffect` keyed on the
|
|
90
|
+
condition that should suppress it, never a paused-mid-animation static value.
|
|
91
|
+
3. **Pure, testable resolvers** in `ProgressBar.variants.ts` (no React, no Animated) so the WCAG +
|
|
92
|
+
value-clamp + accessibility contracts are unit-tested against real palettes — never eyeballed.
|
|
93
|
+
4. **Closed unions only** (`tone`/`size`), `style: LayoutStyle` last and once, no `{...rest}`.
|
|
94
|
+
|
|
95
|
+
## Known gaps
|
|
96
|
+
|
|
97
|
+
None — no icon, no new theme token, no new core helper needed for this component.
|
|
98
|
+
|
|
99
|
+
## Performance
|
|
100
|
+
|
|
101
|
+
Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`). Only renders `View`/`Animated.View` (host elements) — no library child components, nothing to memoize.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ProgressBar — a linear progress indicator. Determinate (`value` 0–100) renders a static fill
|
|
5
|
+
* sized to the value; indeterminate (`value` omitted) renders a looping `Animated` sweep across the
|
|
6
|
+
* track, skipped in favour of a static half-filled track when `useReducedMotion()` is true (WCAG
|
|
7
|
+
* 2.3.3 — never a frame frozen mid-sweep).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
11
|
+
import { Animated, View } from "react-native";
|
|
12
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
13
|
+
import { useTheme } from "../../theme/index.js";
|
|
14
|
+
import { progressBarFillStructure, progressBarTrackStructure, REDUCED_MOTION_FILL_FRACTION, resolveProgressBarAccessibility, resolveProgressBarFill, resolveProgressBarValue, SWEEP_DURATION_MS, SWEEP_FRACTION } from "./ProgressBar.variants.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export const ProgressBar = /*#__PURE__*/memo(function ProgressBar({
|
|
17
|
+
value,
|
|
18
|
+
tone = "accent",
|
|
19
|
+
size = "md",
|
|
20
|
+
accessibilityLabel,
|
|
21
|
+
style,
|
|
22
|
+
testID
|
|
23
|
+
}) {
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
const reducedMotion = useReducedMotion();
|
|
26
|
+
const sweep = useRef(new Animated.Value(0)).current;
|
|
27
|
+
const [trackWidth, setTrackWidth] = useState(0);
|
|
28
|
+
const clampedValue = resolveProgressBarValue(value);
|
|
29
|
+
const determinate = clampedValue !== undefined;
|
|
30
|
+
const fillColor = resolveProgressBarFill(theme.colors, tone);
|
|
31
|
+
const a11y = resolveProgressBarAccessibility({
|
|
32
|
+
value: clampedValue
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// WCAG 2.3.3 — the sweep never starts (and never mounts) once reduced motion is on; the branch
|
|
36
|
+
// below renders a static half-filled track instead of a frame frozen mid-sweep.
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (determinate || reducedMotion) return undefined;
|
|
39
|
+
const loop = Animated.loop(Animated.timing(sweep, {
|
|
40
|
+
toValue: 1,
|
|
41
|
+
duration: SWEEP_DURATION_MS,
|
|
42
|
+
useNativeDriver: true
|
|
43
|
+
}));
|
|
44
|
+
loop.start();
|
|
45
|
+
return () => loop.stop();
|
|
46
|
+
}, [determinate, reducedMotion, sweep]);
|
|
47
|
+
const handleLayout = event => {
|
|
48
|
+
setTrackWidth(event.nativeEvent.layout.width);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// The sweep's translateX range is derived from the track's own measured width (there is no
|
|
52
|
+
// reliable percentage-based `transform`), so it recomputes with layout — the loop itself never
|
|
53
|
+
// restarts, only the distance it travels.
|
|
54
|
+
const sweepWidth = trackWidth * SWEEP_FRACTION;
|
|
55
|
+
const translateX = sweep.interpolate({
|
|
56
|
+
inputRange: [0, 1],
|
|
57
|
+
outputRange: [-sweepWidth, trackWidth]
|
|
58
|
+
});
|
|
59
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
60
|
+
testID: testID,
|
|
61
|
+
onLayout: handleLayout,
|
|
62
|
+
accessible: true,
|
|
63
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
64
|
+
accessibilityLabel: accessibilityLabel,
|
|
65
|
+
accessibilityValue: a11y.accessibilityValue,
|
|
66
|
+
accessibilityState: a11y.accessibilityState,
|
|
67
|
+
style: [progressBarTrackStructure(theme, {
|
|
68
|
+
size
|
|
69
|
+
}), {
|
|
70
|
+
backgroundColor: theme.colors.bg.sunken
|
|
71
|
+
}, style],
|
|
72
|
+
children: [determinate && /*#__PURE__*/_jsx(View, {
|
|
73
|
+
testID: testID === undefined ? undefined : `${testID}-fill`,
|
|
74
|
+
style: [progressBarFillStructure(theme), {
|
|
75
|
+
height: "100%",
|
|
76
|
+
width: `${clampedValue}%`,
|
|
77
|
+
backgroundColor: fillColor
|
|
78
|
+
}]
|
|
79
|
+
}), !determinate && reducedMotion && /*#__PURE__*/_jsx(View, {
|
|
80
|
+
testID: testID === undefined ? undefined : `${testID}-fill`,
|
|
81
|
+
style: [progressBarFillStructure(theme), {
|
|
82
|
+
height: "100%",
|
|
83
|
+
width: `${REDUCED_MOTION_FILL_FRACTION * 100}%`,
|
|
84
|
+
backgroundColor: fillColor
|
|
85
|
+
}]
|
|
86
|
+
}), !determinate && !reducedMotion && /*#__PURE__*/_jsx(Animated.View, {
|
|
87
|
+
testID: testID === undefined ? undefined : `${testID}-sweep`,
|
|
88
|
+
pointerEvents: "none",
|
|
89
|
+
style: [progressBarFillStructure(theme), {
|
|
90
|
+
position: "absolute",
|
|
91
|
+
top: 0,
|
|
92
|
+
bottom: 0,
|
|
93
|
+
width: sweepWidth,
|
|
94
|
+
backgroundColor: fillColor,
|
|
95
|
+
transform: [{
|
|
96
|
+
translateX
|
|
97
|
+
}]
|
|
98
|
+
}]
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useEffect","useRef","useState","Animated","View","useReducedMotion","useTheme","progressBarFillStructure","progressBarTrackStructure","REDUCED_MOTION_FILL_FRACTION","resolveProgressBarAccessibility","resolveProgressBarFill","resolveProgressBarValue","SWEEP_DURATION_MS","SWEEP_FRACTION","jsx","_jsx","jsxs","_jsxs","ProgressBar","value","tone","size","accessibilityLabel","style","testID","theme","reducedMotion","sweep","Value","current","trackWidth","setTrackWidth","clampedValue","determinate","undefined","fillColor","colors","a11y","loop","timing","toValue","duration","useNativeDriver","start","stop","handleLayout","event","nativeEvent","layout","width","sweepWidth","translateX","interpolate","inputRange","outputRange","onLayout","accessible","accessibilityRole","accessibilityValue","accessibilityState","backgroundColor","bg","sunken","children","height","pointerEvents","position","top","bottom","transform"],"sourceRoot":"../../../../src","sources":["modules/progress-bar/ProgressBar.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzD,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAG7C,SAASC,gBAAgB,QAAQ,0BAAiB;AAElD,SAASC,QAAQ,QAAQ,sBAAa;AAEtC,SACEC,wBAAwB,EACxBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,sBAAsB,EACtBC,uBAAuB,EACvBC,iBAAiB,EACjBC,cAAc,QACT,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAehC,OAAO,MAAMC,WAAW,gBAAGpB,IAAI,CAAC,SAASoB,WAAWA,CAAC;EACnDC,KAAK;EACLC,IAAI,GAAG,QAAQ;EACfC,IAAI,GAAG,IAAI;EACXC,kBAAkB;EAClBC,KAAK;EACLC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAGpB,QAAQ,CAAC,CAAC;EACxB,MAAMqB,aAAa,GAAGtB,gBAAgB,CAAC,CAAC;EACxC,MAAMuB,KAAK,GAAG3B,MAAM,CAAC,IAAIE,QAAQ,CAAC0B,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EACnD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG9B,QAAQ,CAAC,CAAC,CAAC;EAE/C,MAAM+B,YAAY,GAAGrB,uBAAuB,CAACQ,KAAK,CAAC;E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,eAAe,EAAEzB,SAAS;QAC1BkC,SAAS,EAAE,CAAC;UAAElB;QAAW,CAAC;MAC5B,CAAC;IACD,CACH,CACF;EAAA,CACG,CAAC;AAEX,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ProgressBar's style + accessibility resolution — the pure functions the component (and its tests)
|
|
5
|
+
* depend on, plus the themed structural variant resolvers.
|
|
6
|
+
*
|
|
7
|
+
* The split every sibling module copies (see `Button.variants.ts`):
|
|
8
|
+
* - STRUCTURE (track height, the pill radius, `overflow: hidden`) lives in the `createThemedVariants`
|
|
9
|
+
* resolvers below — static per (brand, mode), registered once.
|
|
10
|
+
* - COLOUR is tone-driven and resolved by `resolveProgressBarFill` from the theme's ROLE colours,
|
|
11
|
+
* never a raw ramp and never a hardcoded hex. The track itself has exactly one neutral colour
|
|
12
|
+
* (`bg.sunken`, applied inline in `ProgressBar.tsx`) — there is nothing to widen on the track.
|
|
13
|
+
* - ACCESSIBILITY prop derivation is `resolveProgressBarAccessibility`, kept pure so the
|
|
14
|
+
* determinate/indeterminate contract is unit-testable without rendering React Native.
|
|
15
|
+
*
|
|
16
|
+
* Everything here is free of React and of any Animated import, so the WCAG + behaviour tests import
|
|
17
|
+
* it directly (mocking only `react-native`'s `StyleSheet`, as `Button.variants` does).
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
21
|
+
/** Track heights. Not on the theme's spacing scale, so a plain constant (same reasoning as `BUTTON_SIZES`). */
|
|
22
|
+
export const PROGRESS_BAR_SIZES = {
|
|
23
|
+
sm: {
|
|
24
|
+
height: 4
|
|
25
|
+
},
|
|
26
|
+
md: {
|
|
27
|
+
height: 8
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** Fraction of the track's measured width the indeterminate sweep segment covers. */
|
|
32
|
+
export const SWEEP_FRACTION = 0.4;
|
|
33
|
+
/** One full indeterminate sweep cycle, ms. */
|
|
34
|
+
export const SWEEP_DURATION_MS = 1200;
|
|
35
|
+
/** Fill fraction rendered, static, when the sweep is skipped for reduced motion (WCAG 2.3.3). */
|
|
36
|
+
export const REDUCED_MOTION_FILL_FRACTION = 0.5;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Clamps a caller-given value onto the 0–100 scale the track, the fill width, and
|
|
40
|
+
* `accessibilityValue.now` all agree on. `undefined` is preserved — that absence IS the
|
|
41
|
+
* indeterminate signal, never a value to coerce. A `NaN` (a caller's bad ratio math) clamps to `0`
|
|
42
|
+
* rather than propagating into a `NaN%` width or an invalid `now`.
|
|
43
|
+
*/
|
|
44
|
+
export function resolveProgressBarValue(value) {
|
|
45
|
+
if (value === undefined) return undefined;
|
|
46
|
+
if (Number.isNaN(value)) return 0;
|
|
47
|
+
return Math.min(100, Math.max(0, value));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Maps `tone` onto the theme's ROLE colours — using the `text` rung, not `solid`. Never a raw ramp
|
|
52
|
+
* or a hardcoded hex, so every fill is guaranteed legible and can never be an off-palette value an
|
|
53
|
+
* app invented.
|
|
54
|
+
*
|
|
55
|
+
* Why `text`, not the seemingly-obvious `solid`: `solid` is only guaranteed to clear contrast
|
|
56
|
+
* against its OWN derived `onSolid` label, never against an arbitrary neutral surface. Measured
|
|
57
|
+
* against the `bg.sunken` track this component actually uses, `warning.solid`/`success.solid` (a
|
|
58
|
+
* pale, semantic-ramp orange/green shared across every brand) fall as low as ~1.9–2.4:1 in light
|
|
59
|
+
* mode — a real `AA_NON_TEXT` (3:1) failure, the same class of mistake `RadioGroup`/`Tabs` shipped
|
|
60
|
+
* by assuming a role pairing "should" clear AA without measuring it. `text` is `readableOn(ramp,
|
|
61
|
+
* [ramp[50]])` — the SAME role `Button` already uses for its outline/ghost/link label specifically
|
|
62
|
+
* because it is engineered to read on a pale surface — and measured here at ≥ 4.4:1 against
|
|
63
|
+
* `bg.sunken` for every tone × all 8 brands × both modes (`ProgressBar.test.ts`), comfortably
|
|
64
|
+
* clearing the 3:1 floor this fill actually needs.
|
|
65
|
+
*/
|
|
66
|
+
export function resolveProgressBarFill(colors, tone) {
|
|
67
|
+
switch (tone) {
|
|
68
|
+
case "accent":
|
|
69
|
+
return colors.accent.text;
|
|
70
|
+
case "success":
|
|
71
|
+
return colors.status.success.text;
|
|
72
|
+
case "warning":
|
|
73
|
+
return colors.status.warning.text;
|
|
74
|
+
case "danger":
|
|
75
|
+
return colors.status.danger.text;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Derives the accessibility surface once, purely, so the determinate/indeterminate contract is
|
|
80
|
+
* testable without a renderer:
|
|
81
|
+
* - determinate (`value` given) → `accessibilityValue` carries `now`; `busy` is false once the
|
|
82
|
+
* value is known.
|
|
83
|
+
* - indeterminate (`value` omitted) → NO `accessibilityValue` at all. The absence of `now` is how
|
|
84
|
+
* assistive tech reports "indeterminate" — inventing a guessed number would misreport actual
|
|
85
|
+
* progress. `busy: true` (WCAG 1.4.1) announces the ongoing work the visual sweep alone doesn't
|
|
86
|
+
* convey to a screen reader.
|
|
87
|
+
*/
|
|
88
|
+
export function resolveProgressBarAccessibility(input) {
|
|
89
|
+
const {
|
|
90
|
+
value
|
|
91
|
+
} = input;
|
|
92
|
+
if (value === undefined) {
|
|
93
|
+
return {
|
|
94
|
+
accessibilityRole: "progressbar",
|
|
95
|
+
accessibilityValue: undefined,
|
|
96
|
+
accessibilityState: {
|
|
97
|
+
busy: true
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
accessibilityRole: "progressbar",
|
|
103
|
+
accessibilityValue: {
|
|
104
|
+
min: 0,
|
|
105
|
+
max: 100,
|
|
106
|
+
now: value
|
|
107
|
+
},
|
|
108
|
+
accessibilityState: {
|
|
109
|
+
busy: false
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Structural track styles: `size`-driven height, full pill radius, and `overflow: hidden` so the
|
|
116
|
+
* fill/sweep sibling clips to the rounded ends without recomputing the radius itself. No colour here
|
|
117
|
+
* (the track's single neutral fill is applied inline in `ProgressBar.tsx`) — same structure/colour
|
|
118
|
+
* split as `buttonStructure`/`skeletonStructure`.
|
|
119
|
+
*/
|
|
120
|
+
export const progressBarTrackStructure = createThemedVariants(theme => ({
|
|
121
|
+
base: {
|
|
122
|
+
overflow: "hidden",
|
|
123
|
+
borderRadius: theme.radii.full
|
|
124
|
+
},
|
|
125
|
+
variants: {
|
|
126
|
+
size: {
|
|
127
|
+
sm: {
|
|
128
|
+
height: PROGRESS_BAR_SIZES.sm.height
|
|
129
|
+
},
|
|
130
|
+
md: {
|
|
131
|
+
height: PROGRESS_BAR_SIZES.md.height
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
defaultVariants: {
|
|
136
|
+
size: "md"
|
|
137
|
+
}
|
|
138
|
+
}));
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The fill/sweep segment's own corner radius — matches the track's, so a partial determinate fill
|
|
142
|
+
* or the indeterminate sweep still reads as a rounded pill rather than a rectangle poking past a
|
|
143
|
+
* rounded track end. No `size` variant: the segment's height always fills the track (`height: "100%"`,
|
|
144
|
+
* applied inline in `ProgressBar.tsx`), so only the radius is structural here.
|
|
145
|
+
*/
|
|
146
|
+
export const progressBarFillStructure = createThemedVariants(theme => ({
|
|
147
|
+
base: {
|
|
148
|
+
borderRadius: theme.radii.full
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
//# sourceMappingURL=ProgressBar.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","PROGRESS_BAR_SIZES","sm","height","md","SWEEP_FRACTION","SWEEP_DURATION_MS","REDUCED_MOTION_FILL_FRACTION","resolveProgressBarValue","value","undefined","Number","isNaN","Math","min","max","resolveProgressBarFill","colors","tone","accent","text","status","success","warning","danger","resolveProgressBarAccessibility","input","accessibilityRole","accessibilityValue","accessibilityState","busy","now","progressBarTrackStructure","theme","base","overflow","borderRadius","radii","full","variants","size","defaultVariants","progressBarFillStructure"],"sourceRoot":"../../../../src","sources":["modules/progress-bar/ProgressBar.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;AAUvD;AACA,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,EAAE,EAAE;IAAEC,MAAM,EAAE;EAAE,CAAC;EACjBC,EAAE,EAAE;IAAED,MAAM,EAAE;EAAE;AAClB,CAAiE;;AAEjE;AACA,OAAO,MAAME,cAAc,GAAG,GAAG;AACjC;AACA,OAAO,MAAMC,iBAAiB,GAAG,IAAI;AACrC;AACA,OAAO,MAAMC,4BAA4B,GAAG,GAAG;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,KAAyB,EAAsB;EACrF,IAAIA,KAAK,KAAKC,SAAS,EAAE,OAAOA,SAAS;EACzC,IAAIC,MAAM,CAACC,KAAK,CAACH,KAAK,CAAC,EAAE,OAAO,CAAC;EACjC,OAAOI,IAAI,CAACC,GAAG,CAAC,GAAG,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEN,KAAK,CAAC,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,sBAAsBA,CAACC,MAAkB,EAAEC,IAAqB,EAAU;EACxF,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAOD,MAAM,CAACE,MAAM,CAACC,IAAI;IAC3B,KAAK,SAAS;MACZ,OAAOH,MAAM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,OAAO,MAAME,wBAAwB,GAAG1C,oBAAoB,CAAEiC,KAAY,KAAM;EAC9EC,IAAI,EAAE;IAAEE,YAAY,EAAEH,KAAK,CAACI,KAAK,CAACC;EAAK;AACzC,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/progress-bar`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveProgressBarFill`, `PROGRESS_BAR_SIZES`, …) stay
|
|
6
|
+
* internal — a consumer configures a ProgressBar through its props, never by importing its internals.
|
|
7
|
+
*
|
|
8
|
+
* No `icon` prop, so no `IconName` re-export (same as `Spinner`/`Switch`).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export { ProgressBar } from "./ProgressBar.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ProgressBar"],"sourceRoot":"../../../../src","sources":["modules/progress-bar/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,kBAAe","ignoreList":[]}
|