@cdx-ui/components 0.0.1-beta.11 → 0.0.1-beta.111
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 +32 -20
- package/lib/commonjs/animation/hooks/index.js +17 -0
- package/lib/commonjs/animation/hooks/index.js.map +1 -0
- package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js +50 -0
- package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
- package/lib/commonjs/animation/index.js +39 -0
- package/lib/commonjs/animation/index.js.map +1 -0
- package/lib/commonjs/animation/types.js +6 -0
- package/lib/commonjs/animation/types.js.map +1 -0
- package/lib/commonjs/animation/utils.js +223 -0
- package/lib/commonjs/animation/utils.js.map +1 -0
- package/lib/commonjs/components/Alert/index.js +263 -0
- package/lib/commonjs/components/Alert/index.js.map +1 -0
- package/lib/commonjs/components/Alert/styles.js +87 -0
- package/lib/commonjs/components/Alert/styles.js.map +1 -0
- package/lib/commonjs/components/AlertDialog/index.js +17 -14
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +135 -26
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/styles.js +36 -29
- package/lib/commonjs/components/Avatar/styles.js.map +1 -1
- package/lib/commonjs/components/Badge/index.js +86 -0
- package/lib/commonjs/components/Badge/index.js.map +1 -0
- package/lib/commonjs/components/Badge/styles.js +127 -0
- package/lib/commonjs/components/Badge/styles.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/index.js +75 -27
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/styles.js +8 -43
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +143 -29
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +95 -30
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +195 -0
- package/lib/commonjs/components/Card/index.js +74 -15
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/Card/styles.js +17 -3
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/Carousel/index.js +153 -0
- package/lib/commonjs/components/Carousel/index.js.map +1 -0
- package/lib/commonjs/components/Carousel/paginationNavigation.js +35 -0
- package/lib/commonjs/components/Carousel/paginationNavigation.js.map +1 -0
- package/lib/commonjs/components/Carousel/styles.js +21 -0
- package/lib/commonjs/components/Carousel/styles.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +89 -48
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +44 -48
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +94 -17
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +178 -21
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/CurrencyInput/index.js +157 -0
- package/lib/commonjs/components/CurrencyInput/index.js.map +1 -0
- package/lib/commonjs/components/CurrencyInput/styles.js +31 -0
- package/lib/commonjs/components/CurrencyInput/styles.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +140 -65
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +61 -15
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/components/Divider/index.js +98 -0
- package/lib/commonjs/components/Divider/index.js.map +1 -0
- package/lib/commonjs/components/Divider/styles.js +75 -0
- package/lib/commonjs/components/Divider/styles.js.map +1 -0
- package/lib/commonjs/components/Field/index.js +77 -27
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Field/styles.js +5 -5
- package/lib/commonjs/components/Field/styles.js.map +1 -1
- package/lib/commonjs/components/Form/index.js +5 -12
- package/lib/commonjs/components/Form/index.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +1 -1
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +12 -5
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +11 -34
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +136 -11
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/index.js +50 -20
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +20 -7
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/InsuranceDisclosure/index.js +56 -0
- package/lib/commonjs/components/InsuranceDisclosure/index.js.map +1 -0
- package/lib/commonjs/components/InsuranceDisclosure/styles.js +11 -0
- package/lib/commonjs/components/InsuranceDisclosure/styles.js.map +1 -0
- package/lib/commonjs/components/Link/index.js +35 -9
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/Link/styles.js +54 -7
- package/lib/commonjs/components/Link/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +132 -79
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +30 -58
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/OtpInput/index.js +114 -36
- package/lib/commonjs/components/OtpInput/index.js.map +1 -1
- package/lib/commonjs/components/OtpInput/styles.js +9 -7
- package/lib/commonjs/components/OtpInput/styles.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +8 -13
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib/commonjs/components/ProgressSegmented/index.js +24 -10
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
- package/lib/commonjs/components/QuickActionButton/index.js +133 -0
- package/lib/commonjs/components/QuickActionButton/index.js.map +1 -0
- package/lib/commonjs/components/QuickActionButton/styles.js +17 -0
- package/lib/commonjs/components/QuickActionButton/styles.js.map +1 -0
- package/lib/commonjs/components/Radio/index.js +66 -51
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/Radio/styles.js +21 -8
- package/lib/commonjs/components/Radio/styles.js.map +1 -1
- package/lib/commonjs/components/ScopedTheme/index.js +24 -0
- package/lib/commonjs/components/ScopedTheme/index.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +111 -39
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +26 -21
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +37 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/styles.js +9 -0
- package/lib/commonjs/components/Skeleton/styles.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js +23 -13
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +25 -21
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +34 -3
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Textarea/index.js +135 -0
- package/lib/commonjs/components/Textarea/index.js.map +1 -0
- package/lib/commonjs/components/Textarea/styles.js +49 -0
- package/lib/commonjs/components/Textarea/styles.js.map +1 -0
- package/lib/commonjs/components/Tile/index.js +324 -0
- package/lib/commonjs/components/Tile/index.js.map +1 -0
- package/lib/commonjs/components/Tile/styles.js +52 -0
- package/lib/commonjs/components/Tile/styles.js.map +1 -0
- package/lib/commonjs/components/Toast/animation.js +329 -0
- package/lib/commonjs/components/Toast/animation.js.map +1 -0
- package/lib/commonjs/components/Toast/hooks.js +66 -0
- package/lib/commonjs/components/Toast/hooks.js.map +1 -0
- package/lib/commonjs/components/Toast/index.js +493 -0
- package/lib/commonjs/components/Toast/index.js.map +1 -0
- package/lib/commonjs/components/Toast/styles.js +141 -0
- package/lib/commonjs/components/Toast/styles.js.map +1 -0
- package/lib/commonjs/components/Toast/types.js +6 -0
- package/lib/commonjs/components/Toast/types.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -1
- package/lib/commonjs/components/index.js +144 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Alert.Button.figma.js +31 -0
- package/lib/commonjs/figma/Alert.Button.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Close.figma.js +24 -0
- package/lib/commonjs/figma/Alert.Close.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Description.figma.js +20 -0
- package/lib/commonjs/figma/Alert.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Title.figma.js +20 -0
- package/lib/commonjs/figma/Alert.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.figma.js +42 -0
- package/lib/commonjs/figma/Alert.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js +41 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js +28 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.figma.js +43 -0
- package/lib/commonjs/figma/AlertDialog.figma.js.map +1 -0
- package/lib/commonjs/figma/Avatar.figma.js +57 -0
- package/lib/commonjs/figma/Avatar.figma.js.map +1 -0
- package/lib/commonjs/figma/Badge.Indicator.figma.js +47 -0
- package/lib/commonjs/figma/Badge.Indicator.figma.js.map +1 -0
- package/lib/commonjs/figma/Badge.figma.js +65 -0
- package/lib/commonjs/figma/Badge.figma.js.map +1 -0
- package/lib/commonjs/figma/BottomSheet.Footer.figma.js +31 -0
- package/lib/commonjs/figma/BottomSheet.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/BottomSheet.Header.figma.js +30 -0
- package/lib/commonjs/figma/BottomSheet.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/BottomSheet.figma.js +54 -0
- package/lib/commonjs/figma/BottomSheet.figma.js.map +1 -0
- package/lib/commonjs/figma/Button.figma.js +4 -7
- package/lib/commonjs/figma/Button.figma.js.map +1 -1
- package/lib/commonjs/figma/CLAUDE.md +30 -0
- package/lib/commonjs/figma/Card.Header.figma.js +28 -0
- package/lib/commonjs/figma/Card.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Card.Stripe.figma.js +20 -0
- package/lib/commonjs/figma/Card.Stripe.figma.js.map +1 -0
- package/lib/commonjs/figma/Card.figma.js +45 -0
- package/lib/commonjs/figma/Card.figma.js.map +1 -0
- package/lib/commonjs/figma/Checkbox.figma.js +55 -0
- package/lib/commonjs/figma/Checkbox.figma.js.map +1 -0
- package/lib/commonjs/figma/Chip.figma.js +68 -0
- package/lib/commonjs/figma/Chip.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js +30 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js +29 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.figma.js +51 -0
- package/lib/commonjs/figma/Dialog.figma.js.map +1 -0
- package/lib/commonjs/figma/Divider.figma.js +32 -0
- package/lib/commonjs/figma/Divider.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Input.figma.js +57 -0
- package/lib/commonjs/figma/Field.Input.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.OtpInput.figma.js +52 -0
- package/lib/commonjs/figma/Field.OtpInput.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Select.figma.js +57 -0
- package/lib/commonjs/figma/Field.Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Textarea.figma.js +57 -0
- package/lib/commonjs/figma/Field.Textarea.figma.js.map +1 -0
- package/lib/commonjs/figma/Heading.figma.js +30 -0
- package/lib/commonjs/figma/Heading.figma.js.map +1 -0
- package/lib/commonjs/figma/Icon.figma.js +20 -0
- package/lib/commonjs/figma/Icon.figma.js.map +1 -0
- package/lib/commonjs/figma/IconButton.figma.js +47 -0
- package/lib/commonjs/figma/IconButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Input.figma.js +52 -0
- package/lib/commonjs/figma/Input.figma.js.map +1 -0
- package/lib/commonjs/figma/Link.figma.js +30 -0
- package/lib/commonjs/figma/Link.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Description.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Meta.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Meta.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Title.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.figma.js +50 -0
- package/lib/commonjs/figma/ListItem.figma.js.map +1 -0
- package/lib/commonjs/figma/OtpInput.Cell.figma.js +55 -0
- package/lib/commonjs/figma/OtpInput.Cell.figma.js.map +1 -0
- package/lib/commonjs/figma/OtpInput.figma.js +42 -0
- package/lib/commonjs/figma/OtpInput.figma.js.map +1 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js +39 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/commonjs/figma/QuickActionButton.figma.js +38 -0
- package/lib/commonjs/figma/QuickActionButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Radio.figma.js +8 -6
- package/lib/commonjs/figma/Radio.figma.js.map +1 -1
- package/lib/commonjs/figma/Select.figma.js +53 -0
- package/lib/commonjs/figma/Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Text.figma.js +32 -0
- package/lib/commonjs/figma/Text.figma.js.map +1 -0
- package/lib/commonjs/figma/Textarea.figma.js +47 -0
- package/lib/commonjs/figma/Textarea.figma.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.js +27 -0
- package/lib/commonjs/figma/icons.figma.batch.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.json +17705 -0
- package/lib/commonjs/globals.d.js +2 -0
- package/lib/commonjs/globals.d.js.map +1 -0
- package/lib/commonjs/hooks/index.js +19 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js +246 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/commonjs/index.js +39 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/metro/withCdxMetroConfig.js +7 -18
- package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -1
- package/lib/commonjs/metro/withForgeMetroConfig.js +24 -0
- package/lib/commonjs/metro/withForgeMetroConfig.js.map +1 -0
- package/lib/commonjs/navigation/forgeTabIcon.js +43 -0
- package/lib/commonjs/navigation/forgeTabIcon.js.map +1 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js +35 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/commonjs/navigation/index.js +13 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/types.js +38 -0
- package/lib/commonjs/navigation/types.js.map +1 -0
- package/lib/commonjs/providers/animation-settings/index.js +31 -0
- package/lib/commonjs/providers/animation-settings/index.js.map +1 -0
- package/lib/commonjs/providers/animation-settings/provider.js +59 -0
- package/lib/commonjs/providers/animation-settings/provider.js.map +1 -0
- package/lib/commonjs/providers/animation-settings/types.js +6 -0
- package/lib/commonjs/providers/animation-settings/types.js.map +1 -0
- package/lib/commonjs/providers/forge-design/index.js +29 -0
- package/lib/commonjs/providers/forge-design/index.js.map +1 -0
- package/lib/commonjs/providers/forge-design/provider.js +71 -0
- package/lib/commonjs/providers/forge-design/provider.js.map +1 -0
- package/lib/commonjs/providers/forge-design/types.js +6 -0
- package/lib/commonjs/providers/forge-design/types.js.map +1 -0
- package/lib/commonjs/providers/text-component/index.js +28 -0
- package/lib/commonjs/providers/text-component/index.js.map +1 -0
- package/lib/commonjs/providers/text-component/provider.js +11 -0
- package/lib/commonjs/providers/text-component/provider.js.map +1 -0
- package/lib/commonjs/providers/text-component/types.js +6 -0
- package/lib/commonjs/providers/text-component/types.js.map +1 -0
- package/lib/commonjs/providers/toast/index.js +33 -0
- package/lib/commonjs/providers/toast/index.js.map +1 -0
- package/lib/commonjs/providers/toast/insets-container.js +166 -0
- package/lib/commonjs/providers/toast/insets-container.js.map +1 -0
- package/lib/commonjs/providers/toast/lifecycle.context.js +36 -0
- package/lib/commonjs/providers/toast/lifecycle.context.js.map +1 -0
- package/lib/commonjs/providers/toast/provider.js +508 -0
- package/lib/commonjs/providers/toast/provider.js.map +1 -0
- package/lib/commonjs/providers/toast/reducer.js +46 -0
- package/lib/commonjs/providers/toast/reducer.js.map +1 -0
- package/lib/commonjs/providers/toast/toast-config.context.js +29 -0
- package/lib/commonjs/providers/toast/toast-config.context.js.map +1 -0
- package/lib/commonjs/providers/toast/toast-item-renderer.js +43 -0
- package/lib/commonjs/providers/toast/toast-item-renderer.js.map +1 -0
- package/lib/commonjs/providers/toast/types.js +6 -0
- package/lib/commonjs/providers/toast/types.js.map +1 -0
- package/lib/commonjs/styles/constants.js +16 -0
- package/lib/commonjs/styles/constants.js.map +1 -0
- package/lib/commonjs/styles.css +0 -5
- package/lib/commonjs/utils/positionToDataIcon.js +41 -0
- package/lib/commonjs/utils/positionToDataIcon.js.map +1 -0
- package/lib/module/animation/hooks/index.js +4 -0
- package/lib/module/animation/hooks/index.js.map +1 -0
- package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js +47 -0
- package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
- package/lib/module/animation/index.js +6 -0
- package/lib/module/animation/index.js.map +1 -0
- package/lib/module/animation/types.js +4 -0
- package/lib/module/animation/types.js.map +1 -0
- package/lib/module/animation/utils.js +212 -0
- package/lib/module/animation/utils.js.map +1 -0
- package/lib/module/components/Alert/index.js +259 -0
- package/lib/module/components/Alert/index.js.map +1 -0
- package/lib/module/components/Alert/styles.js +84 -0
- package/lib/module/components/Alert/styles.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +18 -15
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +138 -29
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Avatar/styles.js +36 -29
- package/lib/module/components/Avatar/styles.js.map +1 -1
- package/lib/module/components/Badge/index.js +83 -0
- package/lib/module/components/Badge/index.js.map +1 -0
- package/lib/module/components/Badge/styles.js +123 -0
- package/lib/module/components/Badge/styles.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +80 -32
- package/lib/module/components/BottomSheet/index.js.map +1 -1
- package/lib/module/components/BottomSheet/styles.js +7 -42
- package/lib/module/components/BottomSheet/styles.js.map +1 -1
- package/lib/module/components/Button/index.js +146 -33
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +94 -29
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +195 -0
- package/lib/module/components/Card/index.js +77 -18
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +16 -2
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Carousel/index.js +147 -0
- package/lib/module/components/Carousel/index.js.map +1 -0
- package/lib/module/components/Carousel/paginationNavigation.js +31 -0
- package/lib/module/components/Carousel/paginationNavigation.js.map +1 -0
- package/lib/module/components/Carousel/styles.js +18 -0
- package/lib/module/components/Carousel/styles.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +93 -52
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +45 -48
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +98 -21
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +177 -20
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/CurrencyInput/index.js +154 -0
- package/lib/module/components/CurrencyInput/index.js.map +1 -0
- package/lib/module/components/CurrencyInput/styles.js +27 -0
- package/lib/module/components/CurrencyInput/styles.js.map +1 -0
- package/lib/module/components/Dialog/index.js +147 -72
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +60 -14
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/components/Divider/index.js +94 -0
- package/lib/module/components/Divider/index.js.map +1 -0
- package/lib/module/components/Divider/styles.js +71 -0
- package/lib/module/components/Divider/styles.js.map +1 -0
- package/lib/module/components/Field/index.js +81 -32
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Field/styles.js +5 -5
- package/lib/module/components/Field/styles.js.map +1 -1
- package/lib/module/components/Form/index.js +7 -14
- package/lib/module/components/Form/index.js.map +1 -1
- package/lib/module/components/Heading/styles.js +1 -1
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +12 -5
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/IconButton/index.js +12 -35
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +136 -11
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/index.js +53 -23
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +20 -7
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/InsuranceDisclosure/index.js +52 -0
- package/lib/module/components/InsuranceDisclosure/index.js.map +1 -0
- package/lib/module/components/InsuranceDisclosure/styles.js +7 -0
- package/lib/module/components/InsuranceDisclosure/styles.js.map +1 -0
- package/lib/module/components/Link/index.js +38 -11
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/module/components/Link/styles.js +53 -7
- package/lib/module/components/Link/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js +137 -84
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +30 -58
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/OtpInput/index.js +114 -36
- package/lib/module/components/OtpInput/index.js.map +1 -1
- package/lib/module/components/OtpInput/styles.js +9 -7
- package/lib/module/components/OtpInput/styles.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +9 -14
- package/lib/module/components/ProgressBar/index.js.map +1 -1
- package/lib/module/components/ProgressSegmented/index.js +25 -11
- package/lib/module/components/ProgressSegmented/index.js.map +1 -1
- package/lib/module/components/QuickActionButton/index.js +129 -0
- package/lib/module/components/QuickActionButton/index.js.map +1 -0
- package/lib/module/components/QuickActionButton/styles.js +13 -0
- package/lib/module/components/QuickActionButton/styles.js.map +1 -0
- package/lib/module/components/Radio/index.js +69 -55
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/Radio/styles.js +20 -8
- package/lib/module/components/Radio/styles.js.map +1 -1
- package/lib/module/components/ScopedTheme/index.js +19 -0
- package/lib/module/components/ScopedTheme/index.js.map +1 -0
- package/lib/module/components/Select/index.js +117 -45
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +26 -21
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +32 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Skeleton/styles.js +5 -0
- package/lib/module/components/Skeleton/styles.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.js +24 -14
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/module/components/Switch/BaseSwitch.web.js +26 -22
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/module/components/Switch/index.js +35 -4
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +2 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Textarea/index.js +132 -0
- package/lib/module/components/Textarea/index.js.map +1 -0
- package/lib/module/components/Textarea/styles.js +45 -0
- package/lib/module/components/Textarea/styles.js.map +1 -0
- package/lib/module/components/Tile/index.js +315 -0
- package/lib/module/components/Tile/index.js.map +1 -0
- package/lib/module/components/Tile/styles.js +48 -0
- package/lib/module/components/Tile/styles.js.map +1 -0
- package/lib/module/components/Toast/animation.js +324 -0
- package/lib/module/components/Toast/animation.js.map +1 -0
- package/lib/module/components/Toast/hooks.js +61 -0
- package/lib/module/components/Toast/hooks.js.map +1 -0
- package/lib/module/components/Toast/index.js +487 -0
- package/lib/module/components/Toast/index.js.map +1 -0
- package/lib/module/components/Toast/styles.js +138 -0
- package/lib/module/components/Toast/styles.js.map +1 -0
- package/lib/module/components/Toast/types.js +4 -0
- package/lib/module/components/Toast/types.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -1
- package/lib/module/components/index.js +12 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Alert.Button.figma.js +25 -0
- package/lib/module/figma/Alert.Button.figma.js.map +1 -0
- package/lib/module/figma/Alert.Close.figma.js +18 -0
- package/lib/module/figma/Alert.Close.figma.js.map +1 -0
- package/lib/module/figma/Alert.Description.figma.js +14 -0
- package/lib/module/figma/Alert.Description.figma.js.map +1 -0
- package/lib/module/figma/Alert.Title.figma.js +14 -0
- package/lib/module/figma/Alert.Title.figma.js.map +1 -0
- package/lib/module/figma/Alert.figma.js +36 -0
- package/lib/module/figma/Alert.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Description.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js +35 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Header.figma.js +22 -0
- package/lib/module/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Text.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Title.figma.js +21 -0
- package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.figma.js +37 -0
- package/lib/module/figma/AlertDialog.figma.js.map +1 -0
- package/lib/module/figma/Avatar.figma.js +51 -0
- package/lib/module/figma/Avatar.figma.js.map +1 -0
- package/lib/module/figma/Badge.Indicator.figma.js +41 -0
- package/lib/module/figma/Badge.Indicator.figma.js.map +1 -0
- package/lib/module/figma/Badge.figma.js +59 -0
- package/lib/module/figma/Badge.figma.js.map +1 -0
- package/lib/module/figma/BottomSheet.Footer.figma.js +25 -0
- package/lib/module/figma/BottomSheet.Footer.figma.js.map +1 -0
- package/lib/module/figma/BottomSheet.Header.figma.js +24 -0
- package/lib/module/figma/BottomSheet.Header.figma.js.map +1 -0
- package/lib/module/figma/BottomSheet.figma.js +48 -0
- package/lib/module/figma/BottomSheet.figma.js.map +1 -0
- package/lib/module/figma/Button.figma.js +4 -7
- package/lib/module/figma/Button.figma.js.map +1 -1
- package/lib/module/figma/CLAUDE.md +30 -0
- package/lib/module/figma/Card.Header.figma.js +22 -0
- package/lib/module/figma/Card.Header.figma.js.map +1 -0
- package/lib/module/figma/Card.Stripe.figma.js +15 -0
- package/lib/module/figma/Card.Stripe.figma.js.map +1 -0
- package/lib/module/figma/Card.figma.js +39 -0
- package/lib/module/figma/Card.figma.js.map +1 -0
- package/lib/module/figma/Checkbox.figma.js +49 -0
- package/lib/module/figma/Checkbox.figma.js.map +1 -0
- package/lib/module/figma/Chip.figma.js +62 -0
- package/lib/module/figma/Chip.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Description.figma.js +14 -0
- package/lib/module/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Footer.figma.js +24 -0
- package/lib/module/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Header.figma.js +23 -0
- package/lib/module/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Text.figma.js +14 -0
- package/lib/module/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Title.figma.js +21 -0
- package/lib/module/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/module/figma/Dialog.figma.js +45 -0
- package/lib/module/figma/Dialog.figma.js.map +1 -0
- package/lib/module/figma/Divider.figma.js +26 -0
- package/lib/module/figma/Divider.figma.js.map +1 -0
- package/lib/module/figma/Field.Input.figma.js +51 -0
- package/lib/module/figma/Field.Input.figma.js.map +1 -0
- package/lib/module/figma/Field.OtpInput.figma.js +46 -0
- package/lib/module/figma/Field.OtpInput.figma.js.map +1 -0
- package/lib/module/figma/Field.Select.figma.js +51 -0
- package/lib/module/figma/Field.Select.figma.js.map +1 -0
- package/lib/module/figma/Field.Textarea.figma.js +51 -0
- package/lib/module/figma/Field.Textarea.figma.js.map +1 -0
- package/lib/module/figma/Heading.figma.js +24 -0
- package/lib/module/figma/Heading.figma.js.map +1 -0
- package/lib/module/figma/Icon.figma.js +14 -0
- package/lib/module/figma/Icon.figma.js.map +1 -0
- package/lib/module/figma/IconButton.figma.js +41 -0
- package/lib/module/figma/IconButton.figma.js.map +1 -0
- package/lib/module/figma/Input.figma.js +46 -0
- package/lib/module/figma/Input.figma.js.map +1 -0
- package/lib/module/figma/Link.figma.js +24 -0
- package/lib/module/figma/Link.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Description.figma.js +17 -0
- package/lib/module/figma/ListItem.Description.figma.js.map +1 -0
- package/lib/module/figma/ListItem.LeadingSlot.figma.js +18 -0
- package/lib/module/figma/ListItem.LeadingSlot.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Meta.figma.js +17 -0
- package/lib/module/figma/ListItem.Meta.figma.js.map +1 -0
- package/lib/module/figma/ListItem.SectionHeader.figma.js +18 -0
- package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Title.figma.js +17 -0
- package/lib/module/figma/ListItem.Title.figma.js.map +1 -0
- package/lib/module/figma/ListItem.TrailingSlot.figma.js +18 -0
- package/lib/module/figma/ListItem.TrailingSlot.figma.js.map +1 -0
- package/lib/module/figma/ListItem.figma.js +44 -0
- package/lib/module/figma/ListItem.figma.js.map +1 -0
- package/lib/module/figma/OtpInput.Cell.figma.js +49 -0
- package/lib/module/figma/OtpInput.Cell.figma.js.map +1 -0
- package/lib/module/figma/OtpInput.figma.js +36 -0
- package/lib/module/figma/OtpInput.figma.js.map +1 -0
- package/lib/module/figma/ProgressSegmented.figma.js +33 -0
- package/lib/module/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/module/figma/QuickActionButton.figma.js +32 -0
- package/lib/module/figma/QuickActionButton.figma.js.map +1 -0
- package/lib/module/figma/Radio.figma.js +8 -6
- package/lib/module/figma/Radio.figma.js.map +1 -1
- package/lib/module/figma/Select.figma.js +47 -0
- package/lib/module/figma/Select.figma.js.map +1 -0
- package/lib/module/figma/Text.figma.js +26 -0
- package/lib/module/figma/Text.figma.js.map +1 -0
- package/lib/module/figma/Textarea.figma.js +41 -0
- package/lib/module/figma/Textarea.figma.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.js +22 -0
- package/lib/module/figma/icons.figma.batch.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.json +17705 -0
- package/lib/module/globals.d.js +2 -0
- package/lib/module/globals.d.js.map +1 -0
- package/lib/module/hooks/index.js +4 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js +242 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/metro/withCdxMetroConfig.js +3 -17
- package/lib/module/metro/withCdxMetroConfig.js.map +1 -1
- package/lib/module/metro/withForgeMetroConfig.js +20 -0
- package/lib/module/metro/withForgeMetroConfig.js.map +1 -0
- package/lib/module/navigation/forgeTabIcon.js +39 -0
- package/lib/module/navigation/forgeTabIcon.js.map +1 -0
- package/lib/module/navigation/forgeTabIcon.native.js +31 -0
- package/lib/module/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/module/navigation/index.js +4 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/types.js +36 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/module/providers/animation-settings/index.js +4 -0
- package/lib/module/providers/animation-settings/index.js.map +1 -0
- package/lib/module/providers/animation-settings/provider.js +52 -0
- package/lib/module/providers/animation-settings/provider.js.map +1 -0
- package/lib/module/providers/animation-settings/types.js +4 -0
- package/lib/module/providers/animation-settings/types.js.map +1 -0
- package/lib/module/providers/forge-design/index.js +5 -0
- package/lib/module/providers/forge-design/index.js.map +1 -0
- package/lib/module/providers/forge-design/provider.js +66 -0
- package/lib/module/providers/forge-design/provider.js.map +1 -0
- package/lib/module/providers/forge-design/types.js +4 -0
- package/lib/module/providers/forge-design/types.js.map +1 -0
- package/lib/module/providers/text-component/index.js +5 -0
- package/lib/module/providers/text-component/index.js.map +1 -0
- package/lib/module/providers/text-component/provider.js +6 -0
- package/lib/module/providers/text-component/provider.js.map +1 -0
- package/lib/module/providers/text-component/types.js +4 -0
- package/lib/module/providers/text-component/types.js.map +1 -0
- package/lib/module/providers/toast/index.js +6 -0
- package/lib/module/providers/toast/index.js.map +1 -0
- package/lib/module/providers/toast/insets-container.js +162 -0
- package/lib/module/providers/toast/insets-container.js.map +1 -0
- package/lib/module/providers/toast/lifecycle.context.js +32 -0
- package/lib/module/providers/toast/lifecycle.context.js.map +1 -0
- package/lib/module/providers/toast/provider.js +503 -0
- package/lib/module/providers/toast/provider.js.map +1 -0
- package/lib/module/providers/toast/reducer.js +42 -0
- package/lib/module/providers/toast/reducer.js.map +1 -0
- package/lib/module/providers/toast/toast-config.context.js +25 -0
- package/lib/module/providers/toast/toast-config.context.js.map +1 -0
- package/lib/module/providers/toast/toast-item-renderer.js +39 -0
- package/lib/module/providers/toast/toast-item-renderer.js.map +1 -0
- package/lib/module/providers/toast/types.js +4 -0
- package/lib/module/providers/toast/types.js.map +1 -0
- package/lib/module/styles/constants.js +12 -0
- package/lib/module/styles/constants.js.map +1 -0
- package/lib/module/styles.css +0 -5
- package/lib/module/utils/positionToDataIcon.js +38 -0
- package/lib/module/utils/positionToDataIcon.js.map +1 -0
- package/lib/typescript/animation/hooks/index.d.ts +2 -0
- package/lib/typescript/animation/hooks/index.d.ts.map +1 -0
- package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts +22 -0
- package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts.map +1 -0
- package/lib/typescript/animation/index.d.ts +4 -0
- package/lib/typescript/animation/index.d.ts.map +1 -0
- package/lib/typescript/animation/types.d.ts +105 -0
- package/lib/typescript/animation/types.d.ts.map +1 -0
- package/lib/typescript/animation/utils.d.ts +120 -0
- package/lib/typescript/animation/utils.d.ts.map +1 -0
- package/lib/typescript/components/Alert/index.d.ts +67 -0
- package/lib/typescript/components/Alert/index.d.ts.map +1 -0
- package/lib/typescript/components/Alert/styles.d.ts +19 -0
- package/lib/typescript/components/Alert/styles.d.ts.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +3 -2
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +14 -2
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/styles.d.ts +4 -4
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -1
- package/lib/typescript/components/Badge/index.d.ts +14 -0
- package/lib/typescript/components/Badge/index.d.ts.map +1 -0
- package/lib/typescript/components/Badge/styles.d.ts +18 -0
- package/lib/typescript/components/Badge/styles.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/index.d.ts +2 -2
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/styles.d.ts +4 -8
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +81 -9
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +10 -7
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +12 -2
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts +5 -1
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/Carousel/index.d.ts +70 -0
- package/lib/typescript/components/Carousel/index.d.ts.map +1 -0
- package/lib/typescript/components/Carousel/paginationNavigation.d.ts +12 -0
- package/lib/typescript/components/Carousel/paginationNavigation.d.ts.map +1 -0
- package/lib/typescript/components/Carousel/styles.d.ts +8 -0
- package/lib/typescript/components/Carousel/styles.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +4 -3
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -14
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +31 -8
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +12 -4
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/CurrencyInput/index.d.ts +15 -0
- package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -0
- package/lib/typescript/components/CurrencyInput/styles.d.ts +9 -0
- package/lib/typescript/components/CurrencyInput/styles.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/index.d.ts +25 -13
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +16 -5
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
- package/lib/typescript/components/Divider/index.d.ts +21 -0
- package/lib/typescript/components/Divider/index.d.ts.map +1 -0
- package/lib/typescript/components/Divider/styles.d.ts +12 -0
- package/lib/typescript/components/Divider/styles.d.ts.map +1 -0
- package/lib/typescript/components/Field/index.d.ts +14 -7
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Field/styles.d.ts.map +1 -1
- package/lib/typescript/components/Form/index.d.ts +4 -4
- package/lib/typescript/components/Form/index.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts +1 -1
- package/lib/typescript/components/Icon/index.d.ts +5 -5
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts +3 -3
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +6 -2
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +31 -5
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts +10 -0
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts.map +1 -0
- package/lib/typescript/components/InsuranceDisclosure/styles.d.ts +4 -0
- package/lib/typescript/components/InsuranceDisclosure/styles.d.ts.map +1 -0
- package/lib/typescript/components/Link/index.d.ts +4 -2
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/styles.d.ts +9 -2
- package/lib/typescript/components/Link/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +28 -6
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +3 -10
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts +30 -3
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -1
- package/lib/typescript/components/ProgressBar/index.d.ts +4 -4
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressSegmented/index.d.ts +14 -3
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
- package/lib/typescript/components/QuickActionButton/index.d.ts +41 -0
- package/lib/typescript/components/QuickActionButton/index.d.ts.map +1 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts +7 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Radio/index.d.ts +4 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/styles.d.ts.map +1 -1
- package/lib/typescript/components/ScopedTheme/index.d.ts +16 -0
- package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +35 -2
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts +9 -0
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/components/Skeleton/styles.d.ts +4 -0
- package/lib/typescript/components/Skeleton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Stack/styles.d.ts +2 -2
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +12 -5
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +11 -5
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -1
- package/lib/typescript/components/Switch/index.d.ts +15 -3
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +1 -1
- package/lib/typescript/components/Textarea/index.d.ts +27 -0
- package/lib/typescript/components/Textarea/index.d.ts.map +1 -0
- package/lib/typescript/components/Textarea/styles.d.ts +11 -0
- package/lib/typescript/components/Textarea/styles.d.ts.map +1 -0
- package/lib/typescript/components/Tile/index.d.ts +76 -0
- package/lib/typescript/components/Tile/index.d.ts.map +1 -0
- package/lib/typescript/components/Tile/styles.d.ts +18 -0
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -0
- package/lib/typescript/components/Toast/animation.d.ts +21 -0
- package/lib/typescript/components/Toast/animation.d.ts.map +1 -0
- package/lib/typescript/components/Toast/hooks.d.ts +17 -0
- package/lib/typescript/components/Toast/hooks.d.ts.map +1 -0
- package/lib/typescript/components/Toast/index.d.ts +28 -0
- package/lib/typescript/components/Toast/index.d.ts.map +1 -0
- package/lib/typescript/components/Toast/styles.d.ts +73 -0
- package/lib/typescript/components/Toast/styles.d.ts.map +1 -0
- package/lib/typescript/components/Toast/types.d.ts +303 -0
- package/lib/typescript/components/Toast/types.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +2 -1
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +12 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/Alert.Button.figma.d.ts +11 -0
- package/lib/typescript/figma/Alert.Button.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Close.figma.d.ts +11 -0
- package/lib/typescript/figma/Alert.Close.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Avatar.figma.d.ts +11 -0
- package/lib/typescript/figma/Avatar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Badge.Indicator.figma.d.ts +11 -0
- package/lib/typescript/figma/Badge.Indicator.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Badge.figma.d.ts +8 -0
- package/lib/typescript/figma/Badge.figma.d.ts.map +1 -0
- package/lib/typescript/figma/BottomSheet.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/BottomSheet.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/BottomSheet.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/BottomSheet.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/BottomSheet.figma.d.ts +8 -0
- package/lib/typescript/figma/BottomSheet.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
- package/lib/typescript/figma/Card.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Card.Stripe.figma.d.ts +11 -0
- package/lib/typescript/figma/Card.Stripe.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Card.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts +8 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Chip.figma.d.ts +8 -0
- package/lib/typescript/figma/Chip.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Divider.figma.d.ts +8 -0
- package/lib/typescript/figma/Divider.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.OtpInput.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.OtpInput.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Textarea.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Textarea.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Heading.figma.d.ts +8 -0
- package/lib/typescript/figma/Heading.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Icon.figma.d.ts +8 -0
- package/lib/typescript/figma/Icon.figma.d.ts.map +1 -0
- package/lib/typescript/figma/IconButton.figma.d.ts +8 -0
- package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Link.figma.d.ts +8 -0
- package/lib/typescript/figma/Link.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Description.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Meta.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Meta.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Title.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.figma.d.ts.map +1 -0
- package/lib/typescript/figma/OtpInput.Cell.figma.d.ts +8 -0
- package/lib/typescript/figma/OtpInput.Cell.figma.d.ts.map +1 -0
- package/lib/typescript/figma/OtpInput.figma.d.ts +8 -0
- package/lib/typescript/figma/OtpInput.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts +8 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -0
- package/lib/typescript/figma/QuickActionButton.figma.d.ts +8 -0
- package/lib/typescript/figma/QuickActionButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Radio.figma.d.ts.map +1 -1
- package/lib/typescript/figma/Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Text.figma.d.ts +11 -0
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Textarea.figma.d.ts +8 -0
- package/lib/typescript/figma/Textarea.figma.d.ts.map +1 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts +14 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts +137 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/metro/withCdxMetroConfig.d.ts +4 -18
- package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -1
- package/lib/typescript/metro/withForgeMetroConfig.d.ts +19 -0
- package/lib/typescript/metro/withForgeMetroConfig.d.ts.map +1 -0
- package/lib/typescript/navigation/forgeTabIcon.d.ts +27 -0
- package/lib/typescript/navigation/forgeTabIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts +15 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts.map +1 -0
- package/lib/typescript/navigation/index.d.ts +4 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +37 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/providers/animation-settings/index.d.ts +3 -0
- package/lib/typescript/providers/animation-settings/index.d.ts.map +1 -0
- package/lib/typescript/providers/animation-settings/provider.d.ts +28 -0
- package/lib/typescript/providers/animation-settings/provider.d.ts.map +1 -0
- package/lib/typescript/providers/animation-settings/types.d.ts +35 -0
- package/lib/typescript/providers/animation-settings/types.d.ts.map +1 -0
- package/lib/typescript/providers/forge-design/index.d.ts +3 -0
- package/lib/typescript/providers/forge-design/index.d.ts.map +1 -0
- package/lib/typescript/providers/forge-design/provider.d.ts +24 -0
- package/lib/typescript/providers/forge-design/provider.d.ts.map +1 -0
- package/lib/typescript/providers/forge-design/types.d.ts +82 -0
- package/lib/typescript/providers/forge-design/types.d.ts.map +1 -0
- package/lib/typescript/providers/text-component/index.d.ts +3 -0
- package/lib/typescript/providers/text-component/index.d.ts.map +1 -0
- package/lib/typescript/providers/text-component/provider.d.ts +7 -0
- package/lib/typescript/providers/text-component/provider.d.ts.map +1 -0
- package/lib/typescript/providers/text-component/types.d.ts +51 -0
- package/lib/typescript/providers/text-component/types.d.ts.map +1 -0
- package/lib/typescript/providers/toast/index.d.ts +5 -0
- package/lib/typescript/providers/toast/index.d.ts.map +1 -0
- package/lib/typescript/providers/toast/insets-container.d.ts +72 -0
- package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -0
- package/lib/typescript/providers/toast/lifecycle.context.d.ts +32 -0
- package/lib/typescript/providers/toast/lifecycle.context.d.ts.map +1 -0
- package/lib/typescript/providers/toast/provider.d.ts +32 -0
- package/lib/typescript/providers/toast/provider.d.ts.map +1 -0
- package/lib/typescript/providers/toast/reducer.d.ts +14 -0
- package/lib/typescript/providers/toast/reducer.d.ts.map +1 -0
- package/lib/typescript/providers/toast/toast-config.context.d.ts +20 -0
- package/lib/typescript/providers/toast/toast-config.context.d.ts.map +1 -0
- package/lib/typescript/providers/toast/toast-item-renderer.d.ts +7 -0
- package/lib/typescript/providers/toast/toast-item-renderer.d.ts.map +1 -0
- package/lib/typescript/providers/toast/types.d.ts +422 -0
- package/lib/typescript/providers/toast/types.d.ts.map +1 -0
- package/lib/typescript/styles/constants.d.ts +4 -0
- package/lib/typescript/styles/constants.d.ts.map +1 -0
- package/lib/typescript/utils/positionToDataIcon.d.ts +29 -0
- package/lib/typescript/utils/positionToDataIcon.d.ts.map +1 -0
- package/package.json +17 -14
- package/src/animation/hooks/index.ts +1 -0
- package/src/animation/hooks/useCombinedAnimationDisabledState.ts +46 -0
- package/src/animation/index.ts +3 -0
- package/src/animation/types.ts +128 -0
- package/src/animation/utils.ts +249 -0
- package/src/components/Alert/index.tsx +318 -0
- package/src/components/Alert/styles.ts +88 -0
- package/src/components/AlertDialog/index.tsx +21 -20
- package/src/components/Avatar/index.tsx +143 -45
- package/src/components/Avatar/styles.ts +49 -34
- package/src/components/Badge/index.tsx +91 -0
- package/src/components/Badge/styles.ts +136 -0
- package/src/components/BottomSheet/index.tsx +107 -50
- package/src/components/BottomSheet/styles.ts +9 -56
- package/src/components/Button/index.tsx +284 -47
- package/src/components/Button/styles.ts +78 -37
- package/src/components/CLAUDE.md +195 -0
- package/src/components/Card/index.tsx +94 -28
- package/src/components/Card/styles.ts +19 -4
- package/src/components/Carousel/index.tsx +263 -0
- package/src/components/Carousel/paginationNavigation.ts +32 -0
- package/src/components/Carousel/styles.ts +18 -0
- package/src/components/Checkbox/index.tsx +124 -51
- package/src/components/Checkbox/styles.ts +93 -86
- package/src/components/Chip/index.tsx +136 -32
- package/src/components/Chip/styles.ts +220 -18
- package/src/components/CurrencyInput/index.tsx +192 -0
- package/src/components/CurrencyInput/styles.ts +44 -0
- package/src/components/Dialog/index.tsx +199 -93
- package/src/components/Dialog/styles.ts +72 -30
- package/src/components/Divider/index.tsx +94 -0
- package/src/components/Divider/styles.ts +86 -0
- package/src/components/Field/index.tsx +121 -50
- package/src/components/Field/styles.ts +6 -5
- package/src/components/Form/index.tsx +18 -14
- package/src/components/Heading/styles.ts +1 -1
- package/src/components/Icon/index.tsx +14 -8
- package/src/components/IconButton/index.tsx +13 -36
- package/src/components/IconButton/styles.ts +136 -10
- package/src/components/Input/index.tsx +95 -33
- package/src/components/Input/styles.ts +35 -12
- package/src/components/InsuranceDisclosure/index.tsx +59 -0
- package/src/components/InsuranceDisclosure/styles.ts +12 -0
- package/src/components/Link/index.tsx +57 -18
- package/src/components/Link/styles.ts +47 -10
- package/src/components/ListItem/index.tsx +157 -87
- package/src/components/ListItem/styles.ts +50 -81
- package/src/components/OtpInput/index.tsx +149 -34
- package/src/components/OtpInput/styles.ts +20 -13
- package/src/components/ProgressBar/index.tsx +11 -16
- package/src/components/ProgressSegmented/index.tsx +45 -14
- package/src/components/QuickActionButton/index.tsx +161 -0
- package/src/components/QuickActionButton/styles.ts +42 -0
- package/src/components/Radio/index.tsx +96 -53
- package/src/components/Radio/styles.ts +37 -14
- package/src/components/ScopedTheme/index.tsx +17 -0
- package/src/components/Select/index.tsx +175 -55
- package/src/components/Select/styles.ts +63 -51
- package/src/components/Skeleton/index.tsx +42 -0
- package/src/components/Skeleton/styles.ts +5 -0
- package/src/components/Switch/BaseSwitch.tsx +38 -16
- package/src/components/Switch/BaseSwitch.web.tsx +28 -35
- package/src/components/Switch/index.tsx +61 -6
- package/src/components/Text/styles.ts +2 -2
- package/src/components/Textarea/index.tsx +180 -0
- package/src/components/Textarea/styles.ts +86 -0
- package/src/components/Tile/index.tsx +347 -0
- package/src/components/Tile/styles.ts +82 -0
- package/src/components/Toast/animation.ts +387 -0
- package/src/components/Toast/hooks.ts +92 -0
- package/src/components/Toast/index.tsx +520 -0
- package/src/components/Toast/styles.ts +186 -0
- package/src/components/Toast/types.ts +332 -0
- package/src/components/VirtualizedList/index.tsx +11 -1
- package/src/components/index.ts +12 -0
- package/src/globals.d.ts +1 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useForgeBottomTabScreenOptions.ts +245 -0
- package/src/index.ts +4 -0
- package/src/metro/withCdxMetroConfig.ts +4 -29
- package/src/metro/withForgeMetroConfig.ts +29 -0
- package/src/navigation/forgeTabIcon.native.ts +36 -0
- package/src/navigation/forgeTabIcon.ts +33 -0
- package/src/navigation/index.ts +3 -0
- package/src/navigation/types.ts +54 -0
- package/src/providers/animation-settings/index.ts +11 -0
- package/src/providers/animation-settings/provider.tsx +54 -0
- package/src/providers/animation-settings/types.ts +37 -0
- package/src/providers/forge-design/index.ts +2 -0
- package/src/providers/forge-design/provider.tsx +61 -0
- package/src/providers/forge-design/types.ts +84 -0
- package/src/providers/text-component/index.ts +2 -0
- package/src/providers/text-component/provider.tsx +7 -0
- package/src/providers/text-component/types.ts +52 -0
- package/src/providers/toast/index.ts +4 -0
- package/src/providers/toast/insets-container.tsx +232 -0
- package/src/providers/toast/lifecycle.context.tsx +37 -0
- package/src/providers/toast/provider.tsx +572 -0
- package/src/providers/toast/reducer.ts +40 -0
- package/src/providers/toast/toast-config.context.ts +25 -0
- package/src/providers/toast/toast-item-renderer.tsx +40 -0
- package/src/providers/toast/types.ts +431 -0
- package/src/styles/constants.ts +10 -0
- package/src/styles.css +0 -5
- package/src/utils/positionToDataIcon.ts +34 -0
- package/lib/commonjs/components/Field/FieldLabel.js +0 -33
- package/lib/commonjs/components/Field/FieldLabel.js.map +0 -1
- package/lib/commonjs/components/Field/FieldLabel.web.js +0 -22
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.js +0 -25
- package/lib/commonjs/components/Form/FormRoot.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.web.js +0 -17
- package/lib/commonjs/components/Form/FormRoot.web.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.android.js +0 -20
- package/lib/commonjs/components/Input/BaseInput.android.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.js +0 -13
- package/lib/commonjs/components/Input/BaseInput.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.web.js +0 -50
- package/lib/commonjs/components/Input/BaseInput.web.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.js +0 -10
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +0 -98
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/commonjs/styles/index.js +0 -17
- package/lib/commonjs/styles/index.js.map +0 -1
- package/lib/commonjs/styles/primitives.js +0 -122
- package/lib/commonjs/styles/primitives.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.js +0 -29
- package/lib/module/components/Field/FieldLabel.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.web.js +0 -17
- package/lib/module/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/module/components/Form/FormRoot.js +0 -21
- package/lib/module/components/Form/FormRoot.js.map +0 -1
- package/lib/module/components/Form/FormRoot.web.js +0 -12
- package/lib/module/components/Form/FormRoot.web.js.map +0 -1
- package/lib/module/components/Input/BaseInput.android.js +0 -16
- package/lib/module/components/Input/BaseInput.android.js.map +0 -1
- package/lib/module/components/Input/BaseInput.js +0 -4
- package/lib/module/components/Input/BaseInput.js.map +0 -1
- package/lib/module/components/Input/BaseInput.web.js +0 -45
- package/lib/module/components/Input/BaseInput.web.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.js +0 -7
- package/lib/module/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.web.js +0 -93
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/module/styles/index.js +0 -4
- package/lib/module/styles/index.js.map +0 -1
- package/lib/module/styles/primitives.js +0 -118
- package/lib/module/styles/primitives.js.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.d.ts +0 -18
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +0 -16
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.d.ts +0 -14
- package/lib/typescript/components/Form/FormRoot.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.web.d.ts +0 -10
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.android.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.d.ts +0 -2
- package/lib/typescript/components/Input/BaseInput.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.web.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.web.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +0 -3
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +0 -13
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +0 -1
- package/lib/typescript/styles/index.d.ts +0 -2
- package/lib/typescript/styles/index.d.ts.map +0 -1
- package/lib/typescript/styles/primitives.d.ts +0 -85
- package/lib/typescript/styles/primitives.d.ts.map +0 -1
- package/src/components/Field/FieldLabel.tsx +0 -33
- package/src/components/Field/FieldLabel.web.tsx +0 -25
- package/src/components/Form/FormRoot.tsx +0 -20
- package/src/components/Form/FormRoot.web.tsx +0 -12
- package/src/components/Input/BaseInput.android.tsx +0 -13
- package/src/components/Input/BaseInput.tsx +0 -1
- package/src/components/Input/BaseInput.web.tsx +0 -41
- package/src/components/Select/SelectTriggerHost.tsx +0 -4
- package/src/components/Select/SelectTriggerHost.web.tsx +0 -136
- package/src/styles/index.ts +0 -1
- package/src/styles/primitives.ts +0 -106
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Components — authoring & styling conventions
|
|
2
|
+
|
|
3
|
+
Auto-loaded when working in `packages/components/src/components/**`. Covers both the
|
|
4
|
+
styled component files (`index.tsx`) and their co-located CVA variant files (`styles.ts`).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Component Authoring (`index.tsx`)
|
|
9
|
+
|
|
10
|
+
Styled components in `@cdx-ui/components` follow a consistent pattern. Read the full guides before making changes:
|
|
11
|
+
|
|
12
|
+
- `docs/internal/practices/composition.md` — compound component pattern, naming conventions
|
|
13
|
+
- `docs/internal/practices/types.md` — prop types, `I*Props` vs `*Props`, exporting
|
|
14
|
+
- `docs/internal/practices/styling.md` — `cn()`, CVA, token classes, `Platform.select()`
|
|
15
|
+
- `docs/internal/practices/state.md` — `useControllableState`, `composeEventHandlers`
|
|
16
|
+
- `docs/internal/practices/data-attributes.md` — `data-[state]`, `data-slot`, and `data-icon` conventions
|
|
17
|
+
- `docs/internal/practices/as-child.md` — styled-layer `asChild` via re-exported `Slot`
|
|
18
|
+
|
|
19
|
+
## Six standards (Standards 4–6 apply here)
|
|
20
|
+
|
|
21
|
+
Standards 1–3 govern primitive-layer authoring (see `packages/primitives/src/CLAUDE.md`).
|
|
22
|
+
Standards 4–6 govern the styled layer:
|
|
23
|
+
|
|
24
|
+
### Standard 4 — `data-slot` attributes
|
|
25
|
+
|
|
26
|
+
Every public styled slot emits a stable `data-slot="<component>-<part>"` attribute on its outermost rendered element. The convention is lowercase, kebab-case, `<component>` then `-<slot>` if not the root.
|
|
27
|
+
|
|
28
|
+
| Slot | Attribute |
|
|
29
|
+
| ------------------ | ---------------------------- |
|
|
30
|
+
| `<Button>` root | `data-slot="button"` |
|
|
31
|
+
| `<Button.Label>` | `data-slot="button-label"` |
|
|
32
|
+
| `<Button.Icon>` | `data-slot="button-icon"` |
|
|
33
|
+
| `<Button.Spinner>` | `data-slot="button-spinner"` |
|
|
34
|
+
| `<Button.Group>` | `data-slot="button-group"` |
|
|
35
|
+
| `<IconButton>` | `data-slot="icon-button"` |
|
|
36
|
+
| `<Dialog.Content>` | `data-slot="dialog-content"` |
|
|
37
|
+
|
|
38
|
+
Use `dataAttributes({ slot: '<component>-<part>' })` from `@cdx-ui/primitives` so the helper handles native (flat `data-*` keys) and web (RNW `dataSet`) correctly.
|
|
39
|
+
|
|
40
|
+
#### Combining multiple data-attribute sources — use `mergeDataAttributes`
|
|
41
|
+
|
|
42
|
+
When the same element receives `data-*` from more than one source (e.g. a slot identifier plus a position hint, or consumer-supplied data attrs flowing in through props), do **not** chain multiple `{...dataAttributes(...)}` spreads — on web each call returns `{ dataSet: {...} }` and a plain JSX spread replaces the `dataSet` key entirely, so the second source wipes out the first. Use `mergeDataAttributes(...)` from `@cdx-ui/primitives` to combine sources; later args win on key conflicts:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
|
|
46
|
+
|
|
47
|
+
<Element
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={...}
|
|
50
|
+
style={style}
|
|
51
|
+
{...props}
|
|
52
|
+
{...mergeDataAttributes(
|
|
53
|
+
props, // pulls in any consumer-supplied data attrs
|
|
54
|
+
dataAttributes({ slot: '<component>-<part>' }),
|
|
55
|
+
positionToDataIcon(position), // optional, may be undefined
|
|
56
|
+
)}
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Spread `{...props}` first, then the merge — so any keys that `mergeDataAttributes` produces overwrite their counterparts in props with the merged values.
|
|
61
|
+
|
|
62
|
+
When the styled component renders a primitive Root, the primitive Root applies the same pattern internally — incoming data attrs (slot from the styled layer) are merged with the primitive's own interaction-state data attrs and emitted once. The styled layer doesn't need to do anything special; just pass `data-slot` through and the primitive's merge does the rest.
|
|
63
|
+
|
|
64
|
+
### Standard 5 — Static design variants vs. interaction state
|
|
65
|
+
|
|
66
|
+
Variant functions take only static design inputs (`variant`/`color`/`size`/`fullWidth`/etc.). Interaction states (`hover`/`focus`/`active`/`disabled`/`focus-visible`) are expressed as `data-[...]:` selectors **inside** CVA variant strings, never as variant inputs.
|
|
67
|
+
|
|
68
|
+
- CSS-layer state changes are free of React work: when the primitive flips `data-hover=true`, the CSS engine (web) and Uniwind's native style layer reconcile styles without re-rendering React, re-running CVA, or invoking `cn()`/`tailwind-merge`.
|
|
69
|
+
- Variant-input state changes cascade React work: CVA re-runs, `cn()` re-merges, and className-prop reconciliation cascades through the tree.
|
|
70
|
+
- Sub-slots can react to root state via parent selectors (`data-[hover=true]:`) without each slot subscribing to context (per Standard 1).
|
|
71
|
+
- **Native compound conditions** — on native, prefer single-condition `data-[field-state=...]` selectors backed by a primitive-derived compound-state attribute over compound `data-[]:data-[]` chains (Uniwind matches only the last condition). Web may keep compound chains. See `Input/styles.ts` and `Select/styles.ts`; full practice in `docs/internal/practices/data-attributes.md` § "Compound state on native".
|
|
72
|
+
|
|
73
|
+
### Standard 6 — Position hints (`data-icon="inline-start|inline-end"`)
|
|
74
|
+
|
|
75
|
+
Icon-/spinner-bearing styled slots accept an optional `position?: 'leading' | 'trailing'` prop that emits `data-icon="inline-start|inline-end"`. Spacing rules in CVA target the `data-icon` attribute via logical-property utilities (`me-*`/`ms-*`) so RTL is handled for free.
|
|
76
|
+
|
|
77
|
+
Mapping (via the shared `positionToDataIcon` helper at `packages/components/src/utils/positionToDataIcon.ts`):
|
|
78
|
+
|
|
79
|
+
- `position="leading"` → `data-icon="inline-start"`
|
|
80
|
+
- `position="trailing"` → `data-icon="inline-end"`
|
|
81
|
+
- `position` omitted → no `data-icon` attribute, baseline spacing applies
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { positionToDataIcon, type IconSlotPosition } from '../../utils/positionToDataIcon';
|
|
85
|
+
|
|
86
|
+
interface ButtonIconProps {
|
|
87
|
+
position?: IconSlotPosition;
|
|
88
|
+
// ...
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
<Icon {...positionToDataIcon(position)} {...props} />;
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
<Button>
|
|
96
|
+
<Button.Icon as={CheckIcon} position="leading" />
|
|
97
|
+
<Button.Label>Confirm</Button.Label>
|
|
98
|
+
</Button>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
CVA expresses padding via logical-property selectors:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
cva(['data-[icon=inline-start]:me-1.5 data-[icon=inline-end]:ms-1.5'], { ... });
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Where: **styled layer.** Pure styling hint with no behavior or a11y semantics — fails Standard 3, so no primitive involvement.
|
|
108
|
+
|
|
109
|
+
## Canonical reference
|
|
110
|
+
|
|
111
|
+
`packages/components/src/components/Button/index.tsx` + `Button/styles.ts` is the canonical example for Standards 4–6:
|
|
112
|
+
|
|
113
|
+
- `data-slot` on `Button`, `Button.Label`, `Button.Icon`, `Button.Spinner`, `Button.Group`
|
|
114
|
+
- `asChild` re-uses `Slot` from `@cdx-ui/primitives` — no new primitive needed for sub-slots
|
|
115
|
+
- `buttonIconVariants` / `buttonSpinnerVariants` carry `data-[icon=inline-start]:me-1.5 data-[icon=inline-end]:ms-1.5` so leading/trailing padding works without per-call overrides
|
|
116
|
+
|
|
117
|
+
`packages/components/src/components/QuickActionButton/index.tsx` shows the second axis of Standard 1: a styled-layer sub-slot (the Indicator) opts into `useButtonContext()` when its styling reacts to interaction state. The pattern is the same as the primitive Root — call `useButtonContext()`, spread `mergeDataAttributes(props, dataAttributes({ ... }))` — only it lives in the styled layer.
|
|
118
|
+
|
|
119
|
+
### Pattern summary
|
|
120
|
+
|
|
121
|
+
Each component follows this structure (see `Button/index.tsx`):
|
|
122
|
+
|
|
123
|
+
1. **Imports** — RN base components, primitive `Root` and `Slot` from `@cdx-ui/primitives`, `cn` + style context from `@cdx-ui/utils`, variant functions from `./styles`
|
|
124
|
+
2. **Scope constant** — `const SCOPE = 'COMPONENT_NAME'` for `useStyleContext` with a `ParentContext.Provider` wrapper for static variant context
|
|
125
|
+
3. **Root component** — renders the primitive Root (or a host element directly when no primitive exists), spreads `dataAttributes({ slot: '<component>' })`
|
|
126
|
+
4. **Sub-slots** — each accepts `asChild`, renders a host element via `const Comp = asChild ? Slot : DefaultElement`, spreads `dataAttributes({ slot: '<component>-<slot>' })`. Sub-slots **do not** call `useButtonContext()` (or its equivalent) unless their own styling reacts to interaction state.
|
|
127
|
+
5. **Position-aware sub-slots** — icon/spinner-style slots accept `position?: 'leading' | 'trailing'` and emit `data-icon` via `dataAttributes({ icon: '...' })`.
|
|
128
|
+
6. **Compound export** — `Object.assign(RootComponent, { Sub1, Sub2 }) as CompoundType`
|
|
129
|
+
|
|
130
|
+
### Key rules
|
|
131
|
+
|
|
132
|
+
- Props interface extends RN base props + primitive `I*Props` + CVA `VariantProps` + `{ className?: string }`
|
|
133
|
+
- Always accept and spread `style` alongside `className`
|
|
134
|
+
- Variant defaults in destructuring must match CVA `defaultVariants`
|
|
135
|
+
- `displayName` set on every exported sub-component
|
|
136
|
+
- `className` is merged last via `cn()` so consumer overrides always win
|
|
137
|
+
- Never hardcode colors — use semantic token classes (`bg-surface-*`, `text-content-*`, `border-stroke-*`)
|
|
138
|
+
- Event handlers composed via `composeEventHandlers` from `@cdx-ui/utils`
|
|
139
|
+
- Third-party libraries fully abstracted — no adopted library types leak to consumers
|
|
140
|
+
- **`data-slot`** emitted on every styled slot via `dataAttributes({ slot: '<component>-<part>' })`
|
|
141
|
+
- **`asChild`** supported on every styled slot — `const Comp = asChild ? Slot : DefaultElement`
|
|
142
|
+
- **`position`** prop on icon/spinner-style slots maps to `data-icon="inline-start|inline-end"`
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Styling Conventions (`styles.ts`)
|
|
147
|
+
|
|
148
|
+
Variant definitions live in co-located `styles.ts` files using CVA. Read the full guides before making changes:
|
|
149
|
+
|
|
150
|
+
- `docs/internal/practices/styling.md` — `cn()`, CVA, token architecture, dark mode, `Platform.select()`
|
|
151
|
+
- `docs/internal/practices/data-attributes.md` — `data-[state]` and `data-icon` selectors
|
|
152
|
+
|
|
153
|
+
### Pattern summary
|
|
154
|
+
|
|
155
|
+
Each `styles.ts` exports CVA variant functions and their derived `VariantProps` types (see `Button/styles.ts` as the canonical example):
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
import { Platform } from 'react-native';
|
|
159
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
160
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
|
|
161
|
+
|
|
162
|
+
export const componentRootVariants = cva(
|
|
163
|
+
[
|
|
164
|
+
/* base classes + interaction state selectors (data-[hover=true]:..., data-[active=true]:...) */
|
|
165
|
+
],
|
|
166
|
+
{
|
|
167
|
+
variants: {
|
|
168
|
+
/* static design axes only — variant, color, size, fullWidth, etc. */
|
|
169
|
+
},
|
|
170
|
+
compoundVariants: [
|
|
171
|
+
/* variant × variant combinations */
|
|
172
|
+
],
|
|
173
|
+
defaultVariants: {
|
|
174
|
+
/* defaults matching the component's destructured defaults */
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
export type ComponentVariantProps = VariantProps<typeof componentRootVariants>;
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Key rules
|
|
183
|
+
|
|
184
|
+
- **Semantic token classes only** — use `bg-surface-action-strong`, `text-content-primary`, `border-stroke-primary`, etc. Never hardcode hex colors, `bg-white`, `text-black`, or raw Tailwind color scales for themed values.
|
|
185
|
+
- **`data-[state]` selectors** — use `data-[disabled=true]:`, `data-[hover=true]:`, `data-[active=true]:`, `data-[focus-visible=true]:` for interaction states. Primitives emit these data attributes (Standard 1). **Interaction state is never a CVA variant input** (Standard 5). On native, prefer single-condition `data-[field-state=...]` selectors backed by a primitive-derived compound-state attribute over compound `data-[]:data-[]` chains (which only match the last condition); web may keep compound chains. See `Input/styles.ts` / `Select/styles.ts`.
|
|
186
|
+
- **`data-[icon=inline-start|inline-end]` selectors** for icon/spinner position spacing (Standard 6) — pair with logical-property utilities (`me-*`/`ms-*`) so RTL flips automatically.
|
|
187
|
+
- **`Platform.select()`** for platform-specific classes — web gets `data-[hover=true]` styles (hover exists on web); native responds only to `data-[active=true]` (press). Always set `default` (native) and `web` keys.
|
|
188
|
+
- **Shared style primitives** — import `DISABLED_CURSOR`, `TRANSITION_COLORS`, etc. from `../../styles/constants` for cross-component consistency.
|
|
189
|
+
- **`web:` prefix** for web-only utilities — e.g., `web:outline-none`, `web:focus-visible:ring-2`.
|
|
190
|
+
- **`compoundVariants`** for variant × variant combinations where simple variant merging is insufficient.
|
|
191
|
+
- **`defaultVariants`** must match the destructured defaults in the component's `index.tsx`.
|
|
192
|
+
- **One `cva()` per sub-component** — root, text, icon, spinner, etc. each get their own variant function.
|
|
193
|
+
- **Export `VariantProps` types** — derived via `VariantProps<typeof variantFn>` for the component layer to consume.
|
|
194
|
+
- **No dynamic string construction** — all Tailwind class names must be statically detectable by the Tailwind scanner.
|
|
195
|
+
- **CSS variables for token values** — use `rounded-[var(--border-radius-button)]` syntax when referencing design tokens not mapped to Tailwind utilities.
|
|
@@ -1,54 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import { forwardRef, useMemo } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Slot, dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
|
|
7
|
+
import { cardContentVariants, cardFooterVariants, cardHeaderVariants, cardRootVariants, cardStripeVariants } from './styles';
|
|
7
8
|
|
|
8
9
|
// =============================================================================
|
|
9
10
|
// STYLED ROOT COMPONENT
|
|
10
11
|
// =============================================================================
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
const SCOPE = 'CARD';
|
|
13
|
-
const Root = withStyleContext(View, SCOPE);
|
|
14
14
|
const useCardStyleContext = () => useStyleContext(SCOPE);
|
|
15
15
|
const CardRoot = /*#__PURE__*/forwardRef(({
|
|
16
|
+
asChild,
|
|
16
17
|
className,
|
|
17
18
|
children,
|
|
18
19
|
style,
|
|
19
20
|
fullBleed,
|
|
20
21
|
...props
|
|
21
22
|
}, ref) => {
|
|
23
|
+
const parent = useParentContext();
|
|
24
|
+
const ctx = useMemo(() => ({
|
|
25
|
+
...parent,
|
|
26
|
+
[SCOPE]: {
|
|
27
|
+
fullBleed
|
|
28
|
+
}
|
|
29
|
+
}), [parent, fullBleed]);
|
|
22
30
|
const computedClassName = cn(cardRootVariants(), className);
|
|
23
|
-
|
|
31
|
+
const Comp = asChild ? Slot : View;
|
|
32
|
+
return /*#__PURE__*/_jsx(ParentContext.Provider, {
|
|
33
|
+
value: ctx,
|
|
34
|
+
children: /*#__PURE__*/_jsx(Comp, {
|
|
35
|
+
ref: ref,
|
|
36
|
+
className: computedClassName,
|
|
37
|
+
style: style,
|
|
38
|
+
...props,
|
|
39
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
40
|
+
slot: 'card'
|
|
41
|
+
})),
|
|
42
|
+
children: children
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
CardRoot.displayName = 'Card';
|
|
47
|
+
|
|
48
|
+
// =============================================================================
|
|
49
|
+
// STYLED STRIPE COMPONENT
|
|
50
|
+
// =============================================================================
|
|
51
|
+
|
|
52
|
+
const CardStripe = /*#__PURE__*/forwardRef(({
|
|
53
|
+
asChild,
|
|
54
|
+
className,
|
|
55
|
+
style,
|
|
56
|
+
...props
|
|
57
|
+
}, ref) => {
|
|
58
|
+
const computedClassName = cn(cardStripeVariants(), className);
|
|
59
|
+
const Comp = asChild ? Slot : View;
|
|
60
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
24
61
|
ref: ref,
|
|
25
62
|
className: computedClassName,
|
|
26
63
|
style: style,
|
|
27
|
-
context: {
|
|
28
|
-
fullBleed
|
|
29
|
-
},
|
|
30
64
|
...props,
|
|
31
|
-
|
|
65
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
66
|
+
slot: 'card-stripe'
|
|
67
|
+
}))
|
|
32
68
|
});
|
|
33
69
|
});
|
|
34
|
-
|
|
70
|
+
CardStripe.displayName = 'Card.Stripe';
|
|
35
71
|
|
|
36
72
|
// =============================================================================
|
|
37
73
|
// STYLED HEADER COMPONENT
|
|
38
74
|
// =============================================================================
|
|
39
75
|
|
|
40
76
|
const CardHeader = /*#__PURE__*/forwardRef(({
|
|
77
|
+
asChild,
|
|
41
78
|
className,
|
|
42
79
|
children,
|
|
43
80
|
style,
|
|
44
81
|
...props
|
|
45
82
|
}, ref) => {
|
|
46
83
|
const computedClassName = cn(cardHeaderVariants(), className);
|
|
47
|
-
|
|
84
|
+
const Comp = asChild ? Slot : View;
|
|
85
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
48
86
|
ref: ref,
|
|
49
87
|
className: computedClassName,
|
|
50
88
|
style: style,
|
|
51
89
|
...props,
|
|
90
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
91
|
+
slot: 'card-header'
|
|
92
|
+
})),
|
|
52
93
|
children: children
|
|
53
94
|
});
|
|
54
95
|
});
|
|
@@ -59,6 +100,7 @@ CardHeader.displayName = 'Card.Header';
|
|
|
59
100
|
// =============================================================================
|
|
60
101
|
|
|
61
102
|
const CardContent = /*#__PURE__*/forwardRef(({
|
|
103
|
+
asChild,
|
|
62
104
|
className,
|
|
63
105
|
children,
|
|
64
106
|
style,
|
|
@@ -71,11 +113,15 @@ const CardContent = /*#__PURE__*/forwardRef(({
|
|
|
71
113
|
const computedClassName = cn(cardContentVariants({
|
|
72
114
|
fullBleed: fullBleed ?? fullBleedFromContext
|
|
73
115
|
}), className);
|
|
74
|
-
|
|
116
|
+
const Comp = asChild ? Slot : View;
|
|
117
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
75
118
|
ref: ref,
|
|
76
119
|
className: computedClassName,
|
|
77
120
|
style: style,
|
|
78
121
|
...props,
|
|
122
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
123
|
+
slot: 'card-content'
|
|
124
|
+
})),
|
|
79
125
|
children: children
|
|
80
126
|
});
|
|
81
127
|
});
|
|
@@ -86,17 +132,28 @@ CardContent.displayName = 'Card.Content';
|
|
|
86
132
|
// =============================================================================
|
|
87
133
|
|
|
88
134
|
const CardFooter = /*#__PURE__*/forwardRef(({
|
|
135
|
+
asChild,
|
|
89
136
|
className,
|
|
90
137
|
children,
|
|
91
138
|
style,
|
|
139
|
+
fullBleed,
|
|
92
140
|
...props
|
|
93
141
|
}, ref) => {
|
|
94
|
-
const
|
|
95
|
-
|
|
142
|
+
const {
|
|
143
|
+
fullBleed: fullBleedFromContext
|
|
144
|
+
} = useCardStyleContext();
|
|
145
|
+
const computedClassName = cn(cardFooterVariants({
|
|
146
|
+
fullBleed: fullBleed ?? fullBleedFromContext
|
|
147
|
+
}), className);
|
|
148
|
+
const Comp = asChild ? Slot : View;
|
|
149
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
96
150
|
ref: ref,
|
|
97
151
|
className: computedClassName,
|
|
98
152
|
style: style,
|
|
99
153
|
...props,
|
|
154
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
155
|
+
slot: 'card-footer'
|
|
156
|
+
})),
|
|
100
157
|
children: children
|
|
101
158
|
});
|
|
102
159
|
});
|
|
@@ -106,8 +163,10 @@ CardFooter.displayName = 'Card.Footer';
|
|
|
106
163
|
// COMPOUND COMPONENT
|
|
107
164
|
// =============================================================================
|
|
108
165
|
|
|
109
|
-
export const Card = CardRoot
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
166
|
+
export const Card = Object.assign(CardRoot, {
|
|
167
|
+
Stripe: CardStripe,
|
|
168
|
+
Header: CardHeader,
|
|
169
|
+
Content: CardContent,
|
|
170
|
+
Footer: CardFooter
|
|
171
|
+
});
|
|
113
172
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","cn","
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","View","Slot","dataAttributes","mergeDataAttributes","cn","ParentContext","useParentContext","useStyleContext","cardContentVariants","cardFooterVariants","cardHeaderVariants","cardRootVariants","cardStripeVariants","jsx","_jsx","SCOPE","useCardStyleContext","CardRoot","asChild","className","children","style","fullBleed","props","ref","parent","ctx","computedClassName","Comp","Provider","value","slot","displayName","CardStripe","CardHeader","CardContent","fullBleedFromContext","CardFooter","Card","Object","assign","Stripe","Header","Content","Footer"],"sourceRoot":"../../../../src","sources":["components/Card/index.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -13,9 +13,13 @@ export const cardRootVariants = cva(['bg-surface-primary', 'border border-stroke
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
+
// ── Stripe ──────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
export const cardStripeVariants = cva(['bg-brand-400', 'h-2', 'w-full']);
|
|
19
|
+
|
|
16
20
|
// ── Header ──────────────────────────────────────────────────
|
|
17
21
|
|
|
18
|
-
export const cardHeaderVariants = cva(['
|
|
22
|
+
export const cardHeaderVariants = cva(['border-b border-solid border-b-stroke-secondary', 'flex-row items-center justify-between gap-0.5', 'px-5 py-3']);
|
|
19
23
|
|
|
20
24
|
// ── Title ───────────────────────────────────────────────────
|
|
21
25
|
|
|
@@ -33,5 +37,15 @@ export const cardContentVariants = cva(['text-content-primary', 'p-5'], {
|
|
|
33
37
|
|
|
34
38
|
// ── Footer ──────────────────────────────────────────────────
|
|
35
39
|
|
|
36
|
-
export const cardFooterVariants = cva(['
|
|
40
|
+
export const cardFooterVariants = cva(['flex-col items-stretch gap-2'], {
|
|
41
|
+
variants: {
|
|
42
|
+
fullBleed: {
|
|
43
|
+
true: 'p-5',
|
|
44
|
+
false: 'px-5 pb-5 pt-0'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
fullBleed: false
|
|
49
|
+
}
|
|
50
|
+
});
|
|
37
51
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","cardRootVariants","variants","fullBleed","true","false","cardHeaderVariants","cardTitleVariants","cardContentVariants","cardFooterVariants"],"sourceRoot":"../../../../src","sources":["components/Card/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAsB,0BAA0B;;AAE5D;;AAEA,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CACjC,CACE,oBAAoB,EACpB,gCAAgC,EAChC,wCAAwC,EACxC,iBAAiB,CAClB,EACD;EACEE,QAAQ,EAAE;IACRC,SAAS,EAAE;MACTC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT;EACF;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMC,kBAAkB,GAAGN,GAAG,CAAC,CACpC,iDAAiD,EACjD,
|
|
1
|
+
{"version":3,"names":["cva","cardRootVariants","variants","fullBleed","true","false","cardStripeVariants","cardHeaderVariants","cardTitleVariants","cardContentVariants","cardFooterVariants","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/Card/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAsB,0BAA0B;;AAE5D;;AAEA,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CACjC,CACE,oBAAoB,EACpB,gCAAgC,EAChC,wCAAwC,EACxC,iBAAiB,CAClB,EACD;EACEE,QAAQ,EAAE;IACRC,SAAS,EAAE;MACTC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT;EACF;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMC,kBAAkB,GAAGN,GAAG,CAAC,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;;AAExE;;AAEA,OAAO,MAAMO,kBAAkB,GAAGP,GAAG,CAAC,CACpC,iDAAiD,EACjD,+CAA+C,EAC/C,WAAW,CACZ,CAAC;;AAEF;;AAEA,OAAO,MAAMQ,iBAAiB,GAAGR,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;;AAEhD;;AAEA,OAAO,MAAMS,mBAAmB,GAAGT,GAAG,CAAC,CAAC,sBAAsB,EAAE,KAAK,CAAC,EAAE;EACtEE,QAAQ,EAAE;IACRC,SAAS,EAAE;MACTC,IAAI,EAAE;IACR;EACF;AACF,CAAC,CAAC;;AAEF;;AAEA,OAAO,MAAMM,kBAAkB,GAAGV,GAAG,CAAC,CAAC,8BAA8B,CAAC,EAAE;EACtEE,QAAQ,EAAE;IACRC,SAAS,EAAE;MACTC,IAAI,EAAE,KAAK;MACXC,KAAK,EAAE;IACT;EACF,CAAC;EACDM,eAAe,EAAE;IACfR,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useCallback, useRef } from 'react';
|
|
4
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
5
|
+
import RNCarousel, { Pagination as RNCarouselPagination } from 'react-native-reanimated-carousel';
|
|
6
|
+
import { useResolveClassNames } from 'uniwind';
|
|
7
|
+
import { cn, createContext, mergeRefs } from '@cdx-ui/utils';
|
|
8
|
+
import { resolveCarouselPaginationScrollAction } from './paginationNavigation';
|
|
9
|
+
import { carouselPaginationContainerClassName, carouselPaginationDotVariants } from './styles';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Full passthrough of `react-native-reanimated-carousel`'s own props (per `01-api-design.md`,
|
|
13
|
+
* Resolved Question #1) — re-exported under a Forge-owned name so consumers never import the
|
|
14
|
+
* adopted library directly. A type alias (not `interface extends`) because `TCarouselProps<T>`
|
|
15
|
+
* is itself a union-containing type (vertical/mode discriminants), which interfaces cannot extend.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** Mirrors the adopted library's private `DotStyle` shape (not exported) without importing it. */
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const [CarouselProgressProvider, useCarouselProgressContext] = createContext('CarouselProgress', {
|
|
21
|
+
strict: false
|
|
22
|
+
});
|
|
23
|
+
function isSharedValueProgress(value) {
|
|
24
|
+
return typeof value === 'object' && value !== null && 'value' in value;
|
|
25
|
+
}
|
|
26
|
+
function CarouselInner({
|
|
27
|
+
className,
|
|
28
|
+
style,
|
|
29
|
+
onProgressChange,
|
|
30
|
+
children,
|
|
31
|
+
loop = true,
|
|
32
|
+
defaultIndex = 0,
|
|
33
|
+
...rest
|
|
34
|
+
}, ref) {
|
|
35
|
+
const internalRef = useRef(null);
|
|
36
|
+
const internalProgress = useSharedValue(defaultIndex);
|
|
37
|
+
const resolvedClassNameStyle = useResolveClassNames(cn(className));
|
|
38
|
+
const handleProgressChange = useCallback((offsetProgress, absoluteProgress) => {
|
|
39
|
+
internalProgress.value = absoluteProgress;
|
|
40
|
+
if (typeof onProgressChange === 'function') {
|
|
41
|
+
onProgressChange(offsetProgress, absoluteProgress);
|
|
42
|
+
}
|
|
43
|
+
}, [onProgressChange, internalProgress]);
|
|
44
|
+
const consumerProgress = isSharedValueProgress(onProgressChange) ? onProgressChange : undefined;
|
|
45
|
+
const contextValue = {
|
|
46
|
+
progress: consumerProgress ?? internalProgress,
|
|
47
|
+
carouselRef: internalRef,
|
|
48
|
+
loop
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/_jsxs(CarouselProgressProvider, {
|
|
51
|
+
value: contextValue,
|
|
52
|
+
children: [/*#__PURE__*/_jsx(RNCarousel, {
|
|
53
|
+
ref: mergeRefs(ref, internalRef),
|
|
54
|
+
style: [resolvedClassNameStyle, style],
|
|
55
|
+
onProgressChange: consumerProgress ?? handleProgressChange,
|
|
56
|
+
loop: loop,
|
|
57
|
+
defaultIndex: defaultIndex,
|
|
58
|
+
...rest
|
|
59
|
+
}), children]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const CarouselRoot = /*#__PURE__*/forwardRef(CarouselInner);
|
|
63
|
+
|
|
64
|
+
// =============================================================================
|
|
65
|
+
// PAGINATION
|
|
66
|
+
// =============================================================================
|
|
67
|
+
|
|
68
|
+
function CarouselPaginationComponent({
|
|
69
|
+
className,
|
|
70
|
+
progress: progressProp,
|
|
71
|
+
carouselRef: carouselRefProp,
|
|
72
|
+
loop: loopProp,
|
|
73
|
+
onPress,
|
|
74
|
+
...rest
|
|
75
|
+
}) {
|
|
76
|
+
// `strict: false` with no `defaultValue` means this returns `undefined` outside a
|
|
77
|
+
// `<Carousel>` provider at runtime; cast to communicate that to TypeScript, since
|
|
78
|
+
// `createContext`'s helper type always reports `T` (see `@cdx-ui/utils`).
|
|
79
|
+
const context = useCarouselProgressContext();
|
|
80
|
+
const progress = progressProp ?? context?.progress;
|
|
81
|
+
const carouselRef = carouselRefProp ?? context?.carouselRef;
|
|
82
|
+
const loop = loopProp ?? context?.loop ?? true;
|
|
83
|
+
if (!progress) {
|
|
84
|
+
throw new Error('Carousel.Pagination must be rendered inside <Carousel> or receive an explicit `progress` prop.');
|
|
85
|
+
}
|
|
86
|
+
if (!onPress && !carouselRef) {
|
|
87
|
+
throw new Error('Carousel.Pagination must be rendered inside <Carousel> or receive an explicit `carouselRef` prop (or a custom `onPress`).');
|
|
88
|
+
}
|
|
89
|
+
const handlePress = useCallback(index => {
|
|
90
|
+
if (onPress) {
|
|
91
|
+
onPress(index);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const carousel = carouselRef?.current;
|
|
95
|
+
if (!carousel) return;
|
|
96
|
+
const scrollAction = resolveCarouselPaginationScrollAction(carousel.getCurrentIndex(), index, rest.data.length, loop);
|
|
97
|
+
if (scrollAction) {
|
|
98
|
+
carousel.scrollTo(scrollAction);
|
|
99
|
+
}
|
|
100
|
+
}, [onPress, carouselRef, loop, rest.data.length]);
|
|
101
|
+
const containerStyle = useResolveClassNames(cn(carouselPaginationContainerClassName, className));
|
|
102
|
+
const dotStyle = useResolveClassNames(carouselPaginationDotVariants({
|
|
103
|
+
active: false
|
|
104
|
+
}));
|
|
105
|
+
const activeDotStyle = useResolveClassNames(carouselPaginationDotVariants({
|
|
106
|
+
active: true
|
|
107
|
+
}));
|
|
108
|
+
return /*#__PURE__*/_jsx(RNCarouselPagination.Custom, {
|
|
109
|
+
...rest,
|
|
110
|
+
progress: progress,
|
|
111
|
+
onPress: handlePress,
|
|
112
|
+
containerStyle: containerStyle,
|
|
113
|
+
dotStyle: {
|
|
114
|
+
width: 6,
|
|
115
|
+
height: 6,
|
|
116
|
+
...dotStyle
|
|
117
|
+
},
|
|
118
|
+
activeDotStyle: {
|
|
119
|
+
width: 18,
|
|
120
|
+
height: 6,
|
|
121
|
+
...activeDotStyle
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
CarouselPaginationComponent.displayName = 'Carousel.Pagination';
|
|
126
|
+
const CarouselPagination = CarouselPaginationComponent;
|
|
127
|
+
export const Carousel = Object.assign(CarouselRoot, {
|
|
128
|
+
Pagination: CarouselPagination
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// =============================================================================
|
|
132
|
+
// HOOK
|
|
133
|
+
// =============================================================================
|
|
134
|
+
|
|
135
|
+
export function useCarousel(options) {
|
|
136
|
+
const ref = useRef(null);
|
|
137
|
+
const progress = useSharedValue(options?.defaultIndex ?? 0);
|
|
138
|
+
return {
|
|
139
|
+
ref,
|
|
140
|
+
/** Bind to `Carousel`'s `onProgressChange` and sibling `Carousel.Pagination`'s `progress`. */
|
|
141
|
+
progress,
|
|
142
|
+
next: opts => ref.current?.next(opts),
|
|
143
|
+
prev: opts => ref.current?.prev(opts),
|
|
144
|
+
scrollTo: opts => ref.current?.scrollTo(opts)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useCallback","useRef","useSharedValue","RNCarousel","Pagination","RNCarouselPagination","useResolveClassNames","cn","createContext","mergeRefs","resolveCarouselPaginationScrollAction","carouselPaginationContainerClassName","carouselPaginationDotVariants","jsx","_jsx","jsxs","_jsxs","CarouselProgressProvider","useCarouselProgressContext","strict","isSharedValueProgress","value","CarouselInner","className","style","onProgressChange","children","loop","defaultIndex","rest","ref","internalRef","internalProgress","resolvedClassNameStyle","handleProgressChange","offsetProgress","absoluteProgress","consumerProgress","undefined","contextValue","progress","carouselRef","CarouselRoot","CarouselPaginationComponent","progressProp","carouselRefProp","loopProp","onPress","context","Error","handlePress","index","carousel","current","scrollAction","getCurrentIndex","data","length","scrollTo","containerStyle","dotStyle","active","activeDotStyle","Custom","width","height","displayName","CarouselPagination","Carousel","Object","assign","useCarousel","options","next","opts","prev"],"sourceRoot":"../../../../src","sources":["components/Carousel/index.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the shortest `scrollTo` action for pagination dot presses.
|
|
5
|
+
*
|
|
6
|
+
* In loop mode the library's absolute `scrollTo({ index })` can animate through every
|
|
7
|
+
* slide when the current index is past the halfway point of the loop buffer (e.g. index 2 → 3
|
|
8
|
+
* with four items). Relative `count` navigation avoids that wrap-around path.
|
|
9
|
+
*/
|
|
10
|
+
export function resolveCarouselPaginationScrollAction(currentIndex, targetIndex, dataLength, loop) {
|
|
11
|
+
if (currentIndex === targetIndex) return null;
|
|
12
|
+
if (!loop) {
|
|
13
|
+
return {
|
|
14
|
+
index: targetIndex,
|
|
15
|
+
animated: true
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const forwardDelta = (targetIndex - currentIndex + dataLength) % dataLength;
|
|
19
|
+
const backwardDelta = (currentIndex - targetIndex + dataLength) % dataLength;
|
|
20
|
+
if (forwardDelta <= backwardDelta) {
|
|
21
|
+
return {
|
|
22
|
+
count: forwardDelta,
|
|
23
|
+
animated: true
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
count: -backwardDelta,
|
|
28
|
+
animated: true
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=paginationNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveCarouselPaginationScrollAction","currentIndex","targetIndex","dataLength","loop","index","animated","forwardDelta","backwardDelta","count"],"sourceRoot":"../../../../src","sources":["components/Carousel/paginationNavigation.ts"],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qCAAqCA,CACnDC,YAAoB,EACpBC,WAAmB,EACnBC,UAAkB,EAClBC,IAAa,EAC0B;EACvC,IAAIH,YAAY,KAAKC,WAAW,EAAE,OAAO,IAAI;EAE7C,IAAI,CAACE,IAAI,EAAE;IACT,OAAO;MAAEC,KAAK,EAAEH,WAAW;MAAEI,QAAQ,EAAE;IAAK,CAAC;EAC/C;EAEA,MAAMC,YAAY,GAAG,CAACL,WAAW,GAAGD,YAAY,GAAGE,UAAU,IAAIA,UAAU;EAC3E,MAAMK,aAAa,GAAG,CAACP,YAAY,GAAGC,WAAW,GAAGC,UAAU,IAAIA,UAAU;EAE5E,IAAII,YAAY,IAAIC,aAAa,EAAE;IACjC,OAAO;MAAEC,KAAK,EAAEF,YAAY;MAAED,QAAQ,EAAE;IAAK,CAAC;EAChD;EAEA,OAAO;IAAEG,KAAK,EAAE,CAACD,aAAa;IAAEF,QAAQ,EAAE;EAAK,CAAC;AAClD","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/** Small default gap between dots — the library ships no default spacing between pagination items. */
|
|
6
|
+
export const carouselPaginationContainerClassName = 'gap-2 py-1';
|
|
7
|
+
export const carouselPaginationDotVariants = cva('rounded-full', {
|
|
8
|
+
variants: {
|
|
9
|
+
active: {
|
|
10
|
+
true: 'bg-surface-neutral-strong',
|
|
11
|
+
false: 'bg-surface-neutral-subtle'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
active: false
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=styles.js.map
|