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,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Accordion — a stack of collapsible sections. `type="single"` (default) keeps at most one section
|
|
5
|
+
* open at a time (opening one closes whichever else was open; pressing the open section's own
|
|
6
|
+
* header closes it too — a single-select disclosure list, not a one-way reveal); `type="multiple"`
|
|
7
|
+
* lets every section toggle independently.
|
|
8
|
+
*
|
|
9
|
+
* Each header is a `Pressable` disclosure control (`accessibilityRole="button"`,
|
|
10
|
+
* `accessibilityState={{ expanded }}`) with a "chevron-down" glyph that rotates 180° open, animated
|
|
11
|
+
* with a single `Animated.Value` exactly like `Tabs`' indicator: under reduced motion (WCAG 2.3.3)
|
|
12
|
+
* the value is snapped with `setValue` instead of tweened with `Animated.timing`, so a duration-0
|
|
13
|
+
* `Animated.timing` can never sneak an intermediate frame through.
|
|
14
|
+
*
|
|
15
|
+
* Content is CONDITIONALLY RENDERED (mounted only while expanded), not height-animated. React
|
|
16
|
+
* Native has no native height transition without a measure-then-animate hack (measure the content
|
|
17
|
+
* once mounted, then tween a `height`/`Animated.Value` from 0 to the measured value) — that hack is
|
|
18
|
+
* fragile (a wrong first measurement, a content resize, and the animation targets a stale height)
|
|
19
|
+
* and untestable in this repo's jsdom-less test renderer, which never runs real layout. A conditional
|
|
20
|
+
* mount is a real instant "snap" open/close, so it also satisfies the reduced-motion requirement for
|
|
21
|
+
* free — there is no tween to gate for that case at all.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
25
|
+
import { Animated, Pressable, StyleSheet, Text, View } from "react-native";
|
|
26
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
27
|
+
import { Icon } from "../../core/icon/index.js";
|
|
28
|
+
import { useTheme } from "../../theme/index.js";
|
|
29
|
+
import { ACCORDION_SIZES, accordionContentStructure, accordionHeaderStructure, accordionItemStructure, resolveAccordionColors, resolveAccordionHeaderAccessibility } from "./Accordion.variants.js";
|
|
30
|
+
|
|
31
|
+
/** At most one section open at a time. The default shape — `type` may be omitted. */
|
|
32
|
+
|
|
33
|
+
/** Every section toggles independently. */
|
|
34
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
|
+
const ICON_STROKE = 2;
|
|
36
|
+
const ROTATE_MS = 200;
|
|
37
|
+
// The focus ring sits a small gap OUTSIDE the header, on the canvas, because `border.focus` is the
|
|
38
|
+
// role token proven ≥ 3:1 against the canvas (WCAG 2.4.11) — same idiom as Button/Checkbox/Input.
|
|
39
|
+
const FOCUS_RING_WIDTH = 2;
|
|
40
|
+
const FOCUS_RING_GAP = 2;
|
|
41
|
+
const toArray = v => v === undefined ? [] : Array.isArray(v) ? v : [v];
|
|
42
|
+
export const Accordion = /*#__PURE__*/memo(function Accordion(props) {
|
|
43
|
+
const {
|
|
44
|
+
items,
|
|
45
|
+
disabled = false,
|
|
46
|
+
size = "md",
|
|
47
|
+
style,
|
|
48
|
+
testID
|
|
49
|
+
} = props;
|
|
50
|
+
const type = props.type ?? "single";
|
|
51
|
+
const multiple = type === "multiple";
|
|
52
|
+
const theme = useTheme();
|
|
53
|
+
const colors = useMemo(() => resolveAccordionColors(theme.colors), [theme.colors]);
|
|
54
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(() => toArray(props.defaultValue));
|
|
55
|
+
const isControlled = props.value !== undefined;
|
|
56
|
+
const openValues = isControlled ? toArray(props.value) : uncontrolledOpen;
|
|
57
|
+
const emitChange = useCallback(next => {
|
|
58
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
59
|
+
if (multiple) {
|
|
60
|
+
props.onValueChange?.(next);
|
|
61
|
+
} else {
|
|
62
|
+
props.onValueChange?.(next[0] ?? "");
|
|
63
|
+
}
|
|
64
|
+
}, [isControlled, multiple, props]);
|
|
65
|
+
|
|
66
|
+
// Stable across renders (no per-item closure) so `AccordionRow`'s memo isn't defeated — the row
|
|
67
|
+
// calls back with its own `item.value` rather than the parent binding one arrow per item.
|
|
68
|
+
const toggle = useCallback(itemValue => {
|
|
69
|
+
if (disabled) return;
|
|
70
|
+
const isOpen = openValues.includes(itemValue);
|
|
71
|
+
if (multiple) {
|
|
72
|
+
emitChange(isOpen ? openValues.filter(v => v !== itemValue) : [...openValues, itemValue]);
|
|
73
|
+
} else {
|
|
74
|
+
emitChange(isOpen ? [] : [itemValue]);
|
|
75
|
+
}
|
|
76
|
+
}, [disabled, multiple, openValues, emitChange]);
|
|
77
|
+
return /*#__PURE__*/_jsx(View, {
|
|
78
|
+
testID: testID,
|
|
79
|
+
style: style,
|
|
80
|
+
children: items.map(item => /*#__PURE__*/_jsx(AccordionRow, {
|
|
81
|
+
item: item,
|
|
82
|
+
expanded: openValues.includes(item.value),
|
|
83
|
+
disabled: disabled,
|
|
84
|
+
size: size,
|
|
85
|
+
theme: theme,
|
|
86
|
+
colors: colors,
|
|
87
|
+
onToggle: toggle,
|
|
88
|
+
testID: testID ? `${testID}-${item.value}` : undefined
|
|
89
|
+
}, item.value))
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
const AccordionRow = /*#__PURE__*/memo(function AccordionRow({
|
|
93
|
+
item,
|
|
94
|
+
expanded,
|
|
95
|
+
disabled,
|
|
96
|
+
size,
|
|
97
|
+
theme,
|
|
98
|
+
colors,
|
|
99
|
+
onToggle,
|
|
100
|
+
testID
|
|
101
|
+
}) {
|
|
102
|
+
const reducedMotion = useReducedMotion();
|
|
103
|
+
const spec = ACCORDION_SIZES[size];
|
|
104
|
+
const rotation = useRef(new Animated.Value(expanded ? 1 : 0)).current;
|
|
105
|
+
const [focused, setFocused] = useState(false);
|
|
106
|
+
const a11y = resolveAccordionHeaderAccessibility({
|
|
107
|
+
expanded,
|
|
108
|
+
disabled
|
|
109
|
+
});
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (reducedMotion) {
|
|
112
|
+
rotation.setValue(expanded ? 1 : 0);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
Animated.timing(rotation, {
|
|
116
|
+
toValue: expanded ? 1 : 0,
|
|
117
|
+
duration: ROTATE_MS,
|
|
118
|
+
useNativeDriver: true
|
|
119
|
+
}).start();
|
|
120
|
+
}, [expanded, reducedMotion, rotation]);
|
|
121
|
+
const rotateDeg = rotation.interpolate({
|
|
122
|
+
inputRange: [0, 1],
|
|
123
|
+
outputRange: ["0deg", "180deg"]
|
|
124
|
+
});
|
|
125
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
126
|
+
style: [accordionItemStructure(theme), {
|
|
127
|
+
borderBottomColor: colors.divider
|
|
128
|
+
}],
|
|
129
|
+
children: [/*#__PURE__*/_jsxs(Pressable, {
|
|
130
|
+
testID: testID,
|
|
131
|
+
accessibilityRole: a11y.accessibilityRole,
|
|
132
|
+
accessibilityState: a11y.accessibilityState,
|
|
133
|
+
accessibilityLabel: item.title,
|
|
134
|
+
disabled: a11y.disabled,
|
|
135
|
+
onPress: a11y.disabled ? undefined : () => onToggle(item.value),
|
|
136
|
+
onFocus: () => setFocused(true),
|
|
137
|
+
onBlur: () => setFocused(false),
|
|
138
|
+
hitSlop: spec.hitSlop,
|
|
139
|
+
style: ({
|
|
140
|
+
pressed
|
|
141
|
+
}) => [accordionHeaderStructure(theme, {
|
|
142
|
+
size
|
|
143
|
+
}), pressed && !disabled && {
|
|
144
|
+
backgroundColor: colors.pressedHeaderBg
|
|
145
|
+
}, disabled && styles.dimmed],
|
|
146
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
147
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.medium), {
|
|
148
|
+
flex: 1,
|
|
149
|
+
fontSize: spec.fontSize,
|
|
150
|
+
color: colors.title
|
|
151
|
+
}],
|
|
152
|
+
children: item.title
|
|
153
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
154
|
+
style: {
|
|
155
|
+
transform: [{
|
|
156
|
+
rotate: rotateDeg
|
|
157
|
+
}]
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
160
|
+
name: "chevron-down",
|
|
161
|
+
size: spec.iconSize,
|
|
162
|
+
color: colors.icon,
|
|
163
|
+
strokeWidth: ICON_STROKE
|
|
164
|
+
})
|
|
165
|
+
}), focused && /*#__PURE__*/_jsx(View, {
|
|
166
|
+
pointerEvents: "none",
|
|
167
|
+
testID: testID ? `${testID}-focus-ring` : undefined,
|
|
168
|
+
style: {
|
|
169
|
+
position: "absolute",
|
|
170
|
+
top: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
171
|
+
left: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
172
|
+
right: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
173
|
+
bottom: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
|
|
174
|
+
borderWidth: FOCUS_RING_WIDTH,
|
|
175
|
+
borderColor: colors.focusRing,
|
|
176
|
+
borderRadius: theme.radii.sm + FOCUS_RING_GAP + FOCUS_RING_WIDTH
|
|
177
|
+
}
|
|
178
|
+
})]
|
|
179
|
+
}), expanded && /*#__PURE__*/_jsx(View, {
|
|
180
|
+
testID: testID ? `${testID}-content` : undefined,
|
|
181
|
+
style: accordionContentStructure(theme, {
|
|
182
|
+
size
|
|
183
|
+
}),
|
|
184
|
+
children: item.content
|
|
185
|
+
})]
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
const styles = StyleSheet.create({
|
|
189
|
+
// A disabled header is exempt from the contrast minimum (WCAG 1.4.3), so a uniform dim is correct.
|
|
190
|
+
dimmed: {
|
|
191
|
+
opacity: 0.5
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useEffect","useMemo","useRef","useState","Animated","Pressable","StyleSheet","Text","View","useReducedMotion","Icon","useTheme","ACCORDION_SIZES","accordionContentStructure","accordionHeaderStructure","accordionItemStructure","resolveAccordionColors","resolveAccordionHeaderAccessibility","jsx","_jsx","jsxs","_jsxs","ICON_STROKE","ROTATE_MS","FOCUS_RING_WIDTH","FOCUS_RING_GAP","toArray","v","undefined","Array","isArray","Accordion","props","items","disabled","size","style","testID","type","multiple","theme","colors","uncontrolledOpen","setUncontrolledOpen","defaultValue","isControlled","value","openValues","emitChange","next","onValueChange","toggle","itemValue","isOpen","includes","filter","children","map","item","AccordionRow","expanded","onToggle","reducedMotion","spec","rotation","Value","current","focused","setFocused","a11y","setValue","timing","toValue","duration","useNativeDriver","start","rotateDeg","interpolate","inputRange","outputRange","borderBottomColor","divider","accessibilityRole","accessibilityState","accessibilityLabel","title","onPress","onFocus","onBlur","hitSlop","pressed","backgroundColor","pressedHeaderBg","styles","dimmed","fontStyleForWeight","fontWeights","medium","flex","fontSize","color","transform","rotate","name","iconSize","icon","strokeWidth","pointerEvents","position","top","left","right","bottom","borderWidth","borderColor","focusRing","borderRadius","radii","sm","content","create","opacity"],"sourceRoot":"../../../../src","sources":["modules/accordion/Accordion.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/E,SAASC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAG1E,SAASC,gBAAgB,QAAQ,0BAAiB;AAClD,SAASC,IAAI,QAAQ,0BAAiB;AAEtC,SAASC,QAAQ,QAAQ,sBAAa;AAGtC,SACEC,eAAe,EACfC,yBAAyB,EACzBC,wBAAwB,EACxBC,sBAAsB,EACtBC,sBAAsB,EACtBC,mCAAmC,QAC9B,yBAAsB;;AAqB7B;;AAQA;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUA,MAAMC,WAAW,GAA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B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Accordion's style + behaviour resolution — pure, React/lucide-free, same split as Button/Tabs:
|
|
5
|
+
* - STRUCTURE (header min-height/padding, item separator width) lives in the `createThemedVariants`
|
|
6
|
+
* resolvers below, registered once per (theme, size) — never rebuilt per render.
|
|
7
|
+
* - COLOUR is resolved from the theme's ROLE colours (`resolveAccordionColors`), never a raw hex:
|
|
8
|
+
* the title is always `fg.default`, the chevron is always `fg.muted`, and the item separator is
|
|
9
|
+
* the same decorative `border.default` rung `Divider` uses — a separator between sections
|
|
10
|
+
* conveys no information of its own (removing it changes spacing, not meaning), so WCAG 1.4.11
|
|
11
|
+
* doesn't bind it; never the guaranteed-≥3:1 `interactive`/`focus` rungs those exist for.
|
|
12
|
+
* - `resolveAccordionHeaderAccessibility` derives one header's a11y surface purely, so the
|
|
13
|
+
* "expanded tracks open state / disabled blocks the toggle" contract is unit-testable without
|
|
14
|
+
* rendering React Native.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
18
|
+
/** Same floor as Button/Tabs/Select — 44dp (WCAG 2.5.5 AAA / HIG). Duplicated, not imported: modules
|
|
19
|
+
* stay isolated. */
|
|
20
|
+
export const MIN_TOUCH_TARGET = 44;
|
|
21
|
+
const slopFor = height => Math.max(0, Math.ceil((MIN_TOUCH_TARGET - height) / 2));
|
|
22
|
+
/**
|
|
23
|
+
* Accordion-specific dimensions. Kept a plain constant — no theme dependency — so the hit-target
|
|
24
|
+
* test can assert `headerMinHeight + 2·hitSlop ≥ 44` without a provider, same as `BUTTON_SIZES`.
|
|
25
|
+
*/
|
|
26
|
+
export const ACCORDION_SIZES = {
|
|
27
|
+
sm: {
|
|
28
|
+
headerMinHeight: 40,
|
|
29
|
+
fontSize: 14,
|
|
30
|
+
iconSize: 16,
|
|
31
|
+
hitSlop: slopFor(40)
|
|
32
|
+
},
|
|
33
|
+
md: {
|
|
34
|
+
headerMinHeight: 48,
|
|
35
|
+
fontSize: 16,
|
|
36
|
+
iconSize: 18,
|
|
37
|
+
hitSlop: slopFor(48)
|
|
38
|
+
},
|
|
39
|
+
lg: {
|
|
40
|
+
headerMinHeight: 56,
|
|
41
|
+
fontSize: 18,
|
|
42
|
+
iconSize: 20,
|
|
43
|
+
hitSlop: slopFor(56)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Maps the accordion's fixed visual roles onto ROLE colours — never a hardcoded hex. There is no
|
|
48
|
+
* per-item `tone`: every title is the same `fg.default`, every chevron the same `fg.muted`, so —
|
|
49
|
+
* like `RadioGroup`/`Tabs` — this is pure indirection into the roles, not a union to resolve.
|
|
50
|
+
*/
|
|
51
|
+
export function resolveAccordionColors(colors) {
|
|
52
|
+
return {
|
|
53
|
+
title: colors.fg.default,
|
|
54
|
+
icon: colors.fg.muted,
|
|
55
|
+
divider: colors.border.default,
|
|
56
|
+
// `bg.sunken`, NOT `bg.hover`: the same class of fix `Button`'s "neutral" tone and `RadioGroup`
|
|
57
|
+
// document — `bg.hover`'s saturated mid-tone risks dropping `fg.default` below 4.5:1 on brand-
|
|
58
|
+
// tinted palettes, while the pale `bg.sunken` keeps a neutral `fg.default` label comfortably
|
|
59
|
+
// clear (measured in `Accordion.test.ts`).
|
|
60
|
+
pressedHeaderBg: colors.bg.sunken,
|
|
61
|
+
focusRing: colors.border.focus
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Derives one header's accessibility surface purely, mirroring `resolveSelectAccessibility`:
|
|
66
|
+
* `expanded` tracks whether that item's content is showing (WCAG 4.1.2 — a disclosure control must
|
|
67
|
+
* expose its expanded/collapsed state), and `disabled` blocks the toggle at the whole-accordion
|
|
68
|
+
* level (there is no per-item `disabled` — see `Accordion.tsx`).
|
|
69
|
+
*/
|
|
70
|
+
export function resolveAccordionHeaderAccessibility(input) {
|
|
71
|
+
return {
|
|
72
|
+
accessibilityRole: "button",
|
|
73
|
+
accessibilityState: {
|
|
74
|
+
expanded: input.expanded,
|
|
75
|
+
disabled: input.disabled
|
|
76
|
+
},
|
|
77
|
+
disabled: input.disabled
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* One item's separator — a hairline on the bottom edge, theme-scaled border WIDTH. Colour
|
|
83
|
+
* (`divider`) is resolved separately and applied inline over this.
|
|
84
|
+
*/
|
|
85
|
+
export const accordionItemStructure = createThemedVariants(theme => ({
|
|
86
|
+
base: {
|
|
87
|
+
borderBottomWidth: theme.borderWidths.thin
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The header row's layout — height floor, inset vertical padding, and the gap to the chevron.
|
|
93
|
+
* Colour (title/icon tint, pressed fill) is resolved and applied inline over this.
|
|
94
|
+
*/
|
|
95
|
+
export const accordionHeaderStructure = createThemedVariants(theme => ({
|
|
96
|
+
base: {
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
justifyContent: "space-between",
|
|
100
|
+
columnGap: theme.space[3]
|
|
101
|
+
},
|
|
102
|
+
variants: {
|
|
103
|
+
size: {
|
|
104
|
+
sm: {
|
|
105
|
+
minHeight: ACCORDION_SIZES.sm.headerMinHeight,
|
|
106
|
+
paddingVertical: theme.space[2]
|
|
107
|
+
},
|
|
108
|
+
md: {
|
|
109
|
+
minHeight: ACCORDION_SIZES.md.headerMinHeight,
|
|
110
|
+
paddingVertical: theme.space[3]
|
|
111
|
+
},
|
|
112
|
+
lg: {
|
|
113
|
+
minHeight: ACCORDION_SIZES.lg.headerMinHeight,
|
|
114
|
+
paddingVertical: theme.space[4]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
defaultVariants: {
|
|
119
|
+
size: "md"
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
|
|
123
|
+
/** The expanded content's layout — bottom inset only (matches the header's own horizontal flush,
|
|
124
|
+
* shadcn-style: no left/right padding of its own). */
|
|
125
|
+
export const accordionContentStructure = createThemedVariants(theme => ({
|
|
126
|
+
variants: {
|
|
127
|
+
size: {
|
|
128
|
+
sm: {
|
|
129
|
+
paddingBottom: theme.space[3]
|
|
130
|
+
},
|
|
131
|
+
md: {
|
|
132
|
+
paddingBottom: theme.space[4]
|
|
133
|
+
},
|
|
134
|
+
lg: {
|
|
135
|
+
paddingBottom: theme.space[5]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
defaultVariants: {
|
|
140
|
+
size: "md"
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
//# sourceMappingURL=Accordion.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","MIN_TOUCH_TARGET","slopFor","height","Math","max","ceil","ACCORDION_SIZES","sm","headerMinHeight","fontSize","iconSize","hitSlop","md","lg","resolveAccordionColors","colors","title","fg","default","icon","muted","divider","border","pressedHeaderBg","bg","sunken","focusRing","focus","resolveAccordionHeaderAccessibility","input","accessibilityRole","accessibilityState","expanded","disabled","accordionItemStructure","theme","base","borderBottomWidth","borderWidths","thin","accordionHeaderStructure","flexDirection","alignItems","justifyContent","columnGap","space","variants","size","minHeight","paddingVertical","defaultVariants","accordionContentStructure","paddingBottom"],"sourceRoot":"../../../../src","sources":["modules/accordion/Accordion.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;AAIvD;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,EAAE;AAElC,MAAMC,OAAO,GAAIC,MAAc,IAAaC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,IAAI,CAAC,CAACL,gBA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,aAAa,EAAEjB,KAAK,CAACU,KAAK,CAAC,CAAC;MAAE;IACtC;EACF,CAAC;EACDK,eAAe,EAAE;IAAEH,IAAI,EAAE;EAAK;AAChC,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# accordion/ — a single- or multi-select stack of collapsible sections
|
|
2
|
+
|
|
3
|
+
`Accordion` renders a stack of disclosure rows: a pressable header (title + a rotating chevron)
|
|
4
|
+
that reveals its `content` when expanded. `type="single"` (default) keeps at most one section open
|
|
5
|
+
— opening one closes whichever else was open, and pressing the open section's own header closes it
|
|
6
|
+
too. `type="multiple"` lets every section toggle independently.
|
|
7
|
+
|
|
8
|
+
## Files
|
|
9
|
+
|
|
10
|
+
| File | Role |
|
|
11
|
+
|------|------|
|
|
12
|
+
| `Accordion.tsx` | The component. `Accordion` owns open/close state (controlled or uncontrolled) and maps `items` to `AccordionRow`, the per-item header + content + chevron-rotation animation. |
|
|
13
|
+
| `Accordion.variants.ts` | Pure resolvers (`ACCORDION_SIZES`, `resolveAccordionColors`, `resolveAccordionHeaderAccessibility`) + the themed structural resolvers (`accordionItemStructure`, `accordionHeaderStructure`, `accordionContentStructure`). No React, no lucide. |
|
|
14
|
+
| `index.ts` | Public surface: `Accordion`, `AccordionProps`, `AccordionItem`, `AccordionSize`. |
|
|
15
|
+
| `__tests__/Accordion.test.ts` | Pure: WCAG contrast (all brands × modes) + touch target + a11y contract. |
|
|
16
|
+
| `__tests__/Accordion.render.test.tsx` | Render: single/multiple semantics, controlled vs uncontrolled `value`, disabled, reduced-motion chevron, focus ring. |
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Notes |
|
|
21
|
+
|------|------|---------|-------|
|
|
22
|
+
| `items` | `{ value: string; title: string; content: ReactNode }[]` | — | Rendered in order. `content` is ordinary composition rendered directly under a `View` when expanded — same contract as `Card.children`: wrap your own raw text in `Text` yourself. |
|
|
23
|
+
| `type` | `single \| multiple` | `single` | Discriminates the shape of `value`/`defaultValue`/`onValueChange` below. |
|
|
24
|
+
| `value` | `string` (single) / `string[]` (multiple) | — | Controlled open value(s). Omit for uncontrolled. |
|
|
25
|
+
| `defaultValue` | `string` (single) / `string[]` (multiple) | — | Initial open value(s) when uncontrolled. |
|
|
26
|
+
| `onValueChange` | `(value: string) => void` (single) / `(value: string[]) => void` (multiple) | — | Fires on every toggle, in both controlled and uncontrolled use. |
|
|
27
|
+
| `disabled` | `boolean` | `false` | Blocks every header's toggle at once — there is no per-item `disabled`. |
|
|
28
|
+
| `size` | `sm \| md \| lg` | `md` | 40 / 48 / 56 dp header floor; `sm` reaches 44 via `hitSlop`. |
|
|
29
|
+
| `style` | `LayoutStyle` | — | Layout-only, outermost (the container `View`), applied exactly once, last. |
|
|
30
|
+
| `testID` | `string` | — | Container's testID; each header gets `` `${testID}-${item.value}` ``, its content `` `${testID}-${item.value}-content` ``, and its focus ring `` `${testID}-${item.value}-focus-ring` ``, when set. |
|
|
31
|
+
|
|
32
|
+
`AccordionProps` is a discriminated union on `type`: the `multiple` shape requires `type: "multiple"`
|
|
33
|
+
and types `value`/`defaultValue`/`onValueChange` against `string[]`; omitting `type` (or passing
|
|
34
|
+
`"single"`) types them against a plain `string`. Both controlled (`value` supplied) and uncontrolled
|
|
35
|
+
(`defaultValue` + internal state) usage are supported — the only prop in this library shaped that
|
|
36
|
+
way so far, because a disclosure list's open state is commonly local UI state, not app state.
|
|
37
|
+
|
|
38
|
+
## Accessibility contract (WCAG)
|
|
39
|
+
|
|
40
|
+
- **4.1.2** — each header carries `accessibilityRole="button"` and
|
|
41
|
+
`accessibilityState={{ expanded, disabled }}`, so a screen reader announces the disclosure state
|
|
42
|
+
the visual chevron also shows.
|
|
43
|
+
- **2.5.x target size** — every size reaches ≥ 44 dp: `sm`'s 40 dp header grows via `hitSlop`;
|
|
44
|
+
`md`/`lg` are already ≥ 44 dp.
|
|
45
|
+
- **1.4.3** — the title is `fg.default`, measured ≥ 4.5:1 against the canvas AND against its own
|
|
46
|
+
pressed background (`pressedHeaderBg` = `bg.sunken`, not `bg.hover` — same class of fix
|
|
47
|
+
`Button`'s "neutral" tone and `Tabs`' `pressedTab` document) for every brand × mode.
|
|
48
|
+
- **1.4.11** — the chevron (`fg.muted`) is measured ≥ 3:1 against the canvas and the pressed
|
|
49
|
+
background. The item separator is the same decorative `border.default` rung `Divider` uses — a
|
|
50
|
+
plain hairline between sections conveys no information of its own, so 1.4.11 doesn't bind it
|
|
51
|
+
(regression-guarded in `Accordion.test.ts` to never silently become the interactive/focus rung).
|
|
52
|
+
- **2.4.7 / 2.4.11** — a visible focus ring (`border.focus`) appears on keyboard/AT focus, a small
|
|
53
|
+
gap outside the header on the canvas — same idiom as `Button`/`Checkbox`/`Input`/`Textarea`.
|
|
54
|
+
- **2.3.3** — the chevron's 180° rotation is one `Animated.Value` driven by `expanded`. Under
|
|
55
|
+
reduced motion it is snapped with `setValue` instead of tweened with `Animated.timing` (verified
|
|
56
|
+
by spying on `Animated.timing` and asserting it is never called) — the same idiom `Tabs`' indicator
|
|
57
|
+
uses, not a `duration: 0` timing (which can still tween through intermediate frames).
|
|
58
|
+
|
|
59
|
+
## Why content is conditionally rendered, not height-animated
|
|
60
|
+
|
|
61
|
+
React Native has no native height transition without a measure-then-animate hack: mount the content
|
|
62
|
+
off-screen, measure it via `onLayout`, then tween an `Animated.Value` from 0 to the measured height.
|
|
63
|
+
That hack is fragile (a resize invalidates the cached measurement, a wrong first frame is visible)
|
|
64
|
+
and is not meaningfully testable under this repo's test renderer, which never runs real layout (see
|
|
65
|
+
`Tabs`' own documented gap for its indicator's `onLayout` dependency). A conditional mount is an
|
|
66
|
+
honest instant "snap", which is explicitly an accepted alternative for this component — and it means
|
|
67
|
+
there is nothing left to gate for reduced motion on the content itself; only the chevron animates.
|
|
68
|
+
|
|
69
|
+
## Why `disabled` is whole-accordion, not per-item
|
|
70
|
+
|
|
71
|
+
The spec's prop list has one `disabled`, not a per-item flag on `AccordionItem` — mirroring how
|
|
72
|
+
`RadioGroup`'s `disabled` blocks every row at once. A consumer needing a single non-collapsible
|
|
73
|
+
section can omit that item from `items` reactively, or simply not wire its header (this library
|
|
74
|
+
does not attempt to special-case that; flagged here rather than silently guessed at).
|
|
75
|
+
|
|
76
|
+
## Patterns (copied from Button / Tabs / Select)
|
|
77
|
+
|
|
78
|
+
1. **Structure vs colour split.** Header height floor/padding and the separator's border WIDTH are
|
|
79
|
+
`createThemedVariants` (registered once per `(theme, size)`); colour is resolved by
|
|
80
|
+
`resolveAccordionColors` from role tokens and applied inline over the structural style.
|
|
81
|
+
2. **Pure, testable resolvers** in `Accordion.variants.ts` (no React) so the WCAG + behaviour
|
|
82
|
+
contract is unit-tested against the real palettes — never eyeballed.
|
|
83
|
+
3. **No `{...rest}`, `style` once on the outermost node.** No icon prop — the chevron is an internal
|
|
84
|
+
implementation detail (always `"chevron-down"`), so `IconName` is not re-exported here.
|
|
85
|
+
4. **Controlled/uncontrolled duality** normalizes internally to a `string[]` of open values
|
|
86
|
+
regardless of `type`, converting to/from the public `string | string[]` shape only at the
|
|
87
|
+
`value`/`defaultValue`/`onValueChange` boundary.
|
|
88
|
+
|
|
89
|
+
## Known gaps
|
|
90
|
+
|
|
91
|
+
- No per-item `disabled` (see above — a deliberate scope decision, not an oversight).
|
|
92
|
+
- No horizontal scrolling / virtualization concern — v1 assumes `items` is a normal-length list
|
|
93
|
+
(same scope decision `RadioGroup`/`Tabs` made for their own lists).
|
|
94
|
+
|
|
95
|
+
## Performance
|
|
96
|
+
|
|
97
|
+
Both `Accordion` and the internal (non-exported) `AccordionRow` are wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLAUDE.md`); `colors` is `useMemo`'d, and `emitChange`/`toggle` are `useCallback`'d so the parent hands every row the SAME stable `onToggle` function (the row now calls back with its own `item.value` instead of the parent binding a fresh per-item closure) — without this, `AccordionRow`'s memo would be a no-op.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public surface of `pixelize-native-library/accordion`. Value exports and type exports are split for
|
|
5
|
+
* `verbatimModuleSyntax`. The resolvers (`resolveAccordionColors`, `ACCORDION_SIZES`, …) stay
|
|
6
|
+
* internal — a consumer configures an Accordion through its props, never by importing internals.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { Accordion } from "./Accordion.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Accordion"],"sourceRoot":"../../../../src","sources":["modules/accordion/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,gBAAa","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AlertDialog — a small, focused confirm/alert dialog, DELIBERATELY composed from this library's
|
|
5
|
+
* own, already-shipped `Modal` and `Button` rather than reimplementing a backdrop/panel/action row
|
|
6
|
+
* from scratch. `Modal` owns presentation, dismissal, and the title's contrast; `Button` owns every
|
|
7
|
+
* action's tone, press feedback, and touch target. This module's entire job is wiring: which two
|
|
8
|
+
* actions appear, in what order, and which tone the confirm action carries.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { memo } from "react";
|
|
12
|
+
import { Text, View } from "react-native";
|
|
13
|
+
import { useTheme } from "../../theme/index.js";
|
|
14
|
+
import { Button } from "../button/index.js";
|
|
15
|
+
import { Modal } from "../modal/index.js";
|
|
16
|
+
import { alertDialogActionsStructure, resolveAlertDialogConfirmTone } from "./AlertDialog.variants.js";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
export const AlertDialog = /*#__PURE__*/memo(function AlertDialog({
|
|
19
|
+
visible,
|
|
20
|
+
onRequestClose,
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
confirmLabel,
|
|
24
|
+
cancelLabel = "Cancel",
|
|
25
|
+
onConfirm,
|
|
26
|
+
onCancel,
|
|
27
|
+
tone = "default",
|
|
28
|
+
testID
|
|
29
|
+
}) {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
const confirmTone = resolveAlertDialogConfirmTone(tone);
|
|
32
|
+
const cancelPress = onCancel ?? onRequestClose;
|
|
33
|
+
return /*#__PURE__*/_jsxs(Modal, {
|
|
34
|
+
visible: visible,
|
|
35
|
+
onRequestClose: onRequestClose,
|
|
36
|
+
title: title,
|
|
37
|
+
testID: testID,
|
|
38
|
+
children: [description !== undefined && /*#__PURE__*/_jsx(Text, {
|
|
39
|
+
style: [theme.fontStyleForWeight(theme.fontWeights.regular), {
|
|
40
|
+
fontSize: theme.fontSizes.md,
|
|
41
|
+
color: theme.colors.fg.muted,
|
|
42
|
+
marginBottom: theme.space[5]
|
|
43
|
+
}],
|
|
44
|
+
children: description
|
|
45
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: alertDialogActionsStructure(theme),
|
|
47
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
48
|
+
variant: "outline",
|
|
49
|
+
label: cancelLabel,
|
|
50
|
+
onPress: cancelPress,
|
|
51
|
+
testID: testID ? `${testID}-cancel` : undefined
|
|
52
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
53
|
+
variant: "solid",
|
|
54
|
+
tone: confirmTone,
|
|
55
|
+
label: confirmLabel,
|
|
56
|
+
onPress: onConfirm,
|
|
57
|
+
testID: testID ? `${testID}-confirm` : undefined
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=AlertDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","Text","View","useTheme","Button","Modal","alertDialogActionsStructure","resolveAlertDialogConfirmTone","jsx","_jsx","jsxs","_jsxs","AlertDialog","visible","onRequestClose","title","description","confirmLabel","cancelLabel","onConfirm","onCancel","tone","testID","theme","confirmTone","cancelPress","children","undefined","style","fontStyleForWeight","fontWeights","regular","fontSize","fontSizes","md","color","colors","fg","muted","marginBottom","space","variant","label","onPress"],"sourceRoot":"../../../../src","sources":["modules/alert-dialog/AlertDialog.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,MAAM,QAAQ,oBAAW;AAClC,SAASC,KAAK,QAAQ,mBAAU;AAEhC,SAASC,2BAA2B,EAAEC,6BAA6B,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAkBpG,OAAO,MAAMC,WAAW,gBAAGZ,IAAI,CAAC,SAASY,WAAWA,CAAC;EACnDC,OAAO;EACPC,cAAc;EACdC,KAAK;EACLC,WAAW;EACXC,YAAY;EACZC,WAAW,GAAG,QAAQ;EACtBC,SAAS;EACTC,QAAQ;EACRC,IAAI,GAAG,SAAS;EAChBC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAGpB,QAAQ,CAAC,CAAC;EACxB,MAAMqB,WAAW,GAAGjB,6BAA6B,CAACc,IAAI,CAAC;EACvD,MAAMI,WAAW,GAAGL,QAAQ,IAAIN,cAAc;EAE9C,oBACEH,KAAA,CAACN,KAAK;IAACQ,OAAO,EAAEA,OAAQ;IAACC,cAAc,EAAEA,cAAe;IAACC,KAAK,EAAEA,KAAM;IAACO,MAAM,EAAEA,MAAO;IAAAI,QAAA,GACnFV,WAAW,KAAKW,SAAS,iBACxBlB,IAAA,CAACR,IAAI;MACH2B,KAAK,EAAE,CACLL,KAAK,CAACM,kBAAkB,CAACN,KAAK,CAACO,WAAW,CAACC,OAAO,CAAC,EACnD;QAAEC,QAAQ,EAAET,KAAK,CAACU,SAAS,CAACC,EAAE;QAAEC,KAAK,EAAEZ,KAAK,CAACa,MAAM,CAACC,EAAE,CAACC,KAAK;QAAEC,YAAY,EAAEhB,KAAK,CAACiB,KAAK,CAAC,CAAC;MAAE,CAAC,CAC5F;MAAAd,QAAA,EAEDV;IAAW,CACR,CACP,eACDL,KAAA,CAACT,IAAI;MAAC0B,KAAK,EAAEtB,2BAA2B,CAACiB,KAAK,CAAE;MAAAG,QAAA,gBAC9CjB,IAAA,CAACL,MAAM;QACLqC,OAAO,EAAC,SAAS;QACjBC,KAAK,EAAExB,WAAY;QACnByB,OAAO,EAAElB,WAAY;QACrBH,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,SAAS,GAAGK;MAAU,CACjD,CAAC,eACFlB,IAAA,CAACL,MAAM;QACLqC,OAAO,EAAC,OAAO;QACfpB,IAAI,EAAEG,WAAY;QAClBkB,KAAK,EAAEzB,YAAa;QACpB0B,OAAO,EAAExB,SAAU;QACnBG,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,UAAU,GAAGK;MAAU,CAClD,CAAC;IAAA,CACE,CAAC;EAAA,CACF,CAAC;AAEZ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AlertDialog's pure resolvers. This module owns no colour RESOLVER of its own — the panel, the
|
|
5
|
+
* title, and the confirm action's fill are `Modal`'s and `Button`'s own resolvers, applied unchanged
|
|
6
|
+
* (see `Modal.test.ts` / `Button.test.ts`). The Cancel action's outline label/border ARE measured
|
|
7
|
+
* against the panel's `bg.surface` — but off Button's actually-rendered output (in
|
|
8
|
+
* `AlertDialog.render.test.tsx`, which mounts `<AlertDialog>` and reads the Cancel Button's rendered
|
|
9
|
+
* style), never by importing `Button`'s internal `resolveButtonTone` resolver directly — `Button`'s
|
|
10
|
+
* own index.ts keeps that resolver internal. What IS this module's own contract, and so lives here:
|
|
11
|
+
* the `tone` → confirm-button-tone mapping, and the structural layout of the action row.
|
|
12
|
+
*
|
|
13
|
+
* Free of React and of any `Modal`/`Button` RENDER import — only `ButtonTone`'s TYPE is pulled in —
|
|
14
|
+
* so this stays a pure resolver file, exactly like `Button.variants.ts` / `Modal.variants.ts`.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createThemedVariants } from "../../core/style/index.js";
|
|
18
|
+
/**
|
|
19
|
+
* Maps AlertDialog's own closed `tone` union onto the confirm action's `ButtonTone`. `"default"`
|
|
20
|
+
* resolves to Button's own default tone (`"accent"`) rather than inventing a fourth tone value;
|
|
21
|
+
* `"danger"` mirrors Button's destructive-action tone directly, so a destructive AlertDialog and a
|
|
22
|
+
* destructive Button read identically.
|
|
23
|
+
*/
|
|
24
|
+
export function resolveAlertDialogConfirmTone(tone) {
|
|
25
|
+
switch (tone) {
|
|
26
|
+
case "danger":
|
|
27
|
+
return "danger";
|
|
28
|
+
case "default":
|
|
29
|
+
return "accent";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The two-action row beneath the description. Structural only (layout/spacing) — colour is entirely
|
|
35
|
+
* each `Button`'s own tone-resolved fill, applied by Button itself.
|
|
36
|
+
*/
|
|
37
|
+
export const alertDialogActionsStructure = createThemedVariants(theme => ({
|
|
38
|
+
base: {
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
justifyContent: "flex-end",
|
|
41
|
+
columnGap: theme.space[3]
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
//# sourceMappingURL=AlertDialog.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createThemedVariants","resolveAlertDialogConfirmTone","tone","alertDialogActionsStructure","theme","base","flexDirection","justifyContent","columnGap","space"],"sourceRoot":"../../../../src","sources":["modules/alert-dialog/AlertDialog.variants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAAkB;AAKvD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,6BAA6BA,CAACC,IAAqB,EAAc;EAC/E,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAO,QAAQ;IACjB,KAAK,SAAS;MACZ,OAAO,QAAQ;EACnB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,GAAGH,oBAAoB,CAAEI,KAAY,KAAM;EACjFC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,UAAU;IAC1BC,SAAS,EAAEJ,KAAK,CAACK,KAAK,CAAC,CAAC;EAC1B;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
|