@cdx-ui/components 0.0.1-beta.14 → 0.0.1-beta.140
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/LICENSE +21 -0
- package/README.md +39 -20
- package/lib/commonjs/animation/hooks/index.js +50 -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/hooks/usePopupDialogContentAnimation.js +175 -0
- package/lib/commonjs/animation/hooks/usePopupDialogContentAnimation.js.map +1 -0
- package/lib/commonjs/animation/hooks/usePopupOverlayAnimation.js +69 -0
- package/lib/commonjs/animation/hooks/usePopupOverlayAnimation.js.map +1 -0
- package/lib/commonjs/animation/hooks/usePopupRootAnimation.js +26 -0
- package/lib/commonjs/animation/hooks/usePopupRootAnimation.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 +32 -16
- 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 +37 -30
- 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 +10 -45
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -1
- package/lib/commonjs/components/Box/Box.js +1 -11
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Breadcrumbs/index.js +219 -0
- package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -0
- package/lib/commonjs/components/Breadcrumbs/styles.js +38 -0
- package/lib/commonjs/components/Breadcrumbs/styles.js.map +1 -0
- 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 +98 -33
- 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 +21 -7
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/Carousel/context.js +13 -0
- package/lib/commonjs/components/Carousel/context.js.map +1 -0
- package/lib/commonjs/components/Carousel/index.js +158 -0
- package/lib/commonjs/components/Carousel/index.js.map +1 -0
- package/lib/commonjs/components/Carousel/navButton.js +119 -0
- package/lib/commonjs/components/Carousel/navButton.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 +44 -0
- package/lib/commonjs/components/Carousel/styles.js.map +1 -0
- package/lib/commonjs/components/Carousel/useCarouselActiveIndex.js +52 -0
- package/lib/commonjs/components/Carousel/useCarouselActiveIndex.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 +46 -50
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +115 -18
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +181 -24
- 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/animation.js +13 -0
- package/lib/commonjs/components/Dialog/animation.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +403 -66
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +67 -17
- 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 +9 -9
- 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/Form/styles.js +2 -2
- package/lib/commonjs/components/Form/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +3 -3
- 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 +24 -35
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +138 -13
- 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 +23 -10
- 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 +55 -8
- 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 +31 -59
- 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 +10 -8
- 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/ProgressBar/styles.js +3 -3
- package/lib/commonjs/components/ProgressBar/styles.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/ProgressSegmented/styles.js +5 -5
- package/lib/commonjs/components/ProgressSegmented/styles.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 +24 -11
- 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/ScrollShadow/index.js +82 -0
- package/lib/commonjs/components/ScrollShadow/index.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/styles.js +54 -0
- package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +83 -0
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.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 +27 -22
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +39 -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/Slider/getSliderPopupPosition.js +43 -0
- package/lib/commonjs/components/Slider/getSliderPopupPosition.js.map +1 -0
- package/lib/commonjs/components/Slider/index.js +363 -0
- package/lib/commonjs/components/Slider/index.js.map +1 -0
- package/lib/commonjs/components/Slider/styles.js +112 -0
- package/lib/commonjs/components/Slider/styles.js.map +1 -0
- package/lib/commonjs/components/Stack/styles.js +3 -3
- package/lib/commonjs/components/Stack/styles.js.map +1 -1
- 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/Switch/styles.js +8 -8
- package/lib/commonjs/components/Switch/styles.js.map +1 -1
- package/lib/commonjs/components/Tabs/index.js +527 -0
- package/lib/commonjs/components/Tabs/index.js.map +1 -0
- package/lib/commonjs/components/Tabs/styles.js +333 -0
- package/lib/commonjs/components/Tabs/styles.js.map +1 -0
- package/lib/commonjs/components/Text/styles.js +3 -3
- 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 +150 -77
- package/lib/commonjs/components/Tile/index.js.map +1 -1
- package/lib/commonjs/components/Tile/styles.js +11 -11
- package/lib/commonjs/components/Tile/styles.js.map +1 -1
- package/lib/commonjs/components/Toast/animation.js +331 -0
- package/lib/commonjs/components/Toast/animation.js.map +1 -0
- package/lib/commonjs/components/Toast/hooks.js +67 -0
- package/lib/commonjs/components/Toast/hooks.js.map +1 -0
- package/lib/commonjs/components/Toast/index.js +508 -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 +180 -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 +34 -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 +47 -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 +7 -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/hooks/usePopupDialogContentAnimation.js +171 -0
- package/lib/module/animation/hooks/usePopupDialogContentAnimation.js.map +1 -0
- package/lib/module/animation/hooks/usePopupOverlayAnimation.js +65 -0
- package/lib/module/animation/hooks/usePopupOverlayAnimation.js.map +1 -0
- package/lib/module/animation/hooks/usePopupRootAnimation.js +22 -0
- package/lib/module/animation/hooks/usePopupRootAnimation.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 +33 -16
- 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 +37 -30
- 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 +8 -43
- package/lib/module/components/BottomSheet/styles.js.map +1 -1
- package/lib/module/components/Box/Box.js +1 -11
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Breadcrumbs/index.js +215 -0
- package/lib/module/components/Breadcrumbs/index.js.map +1 -0
- package/lib/module/components/Breadcrumbs/styles.js +34 -0
- package/lib/module/components/Breadcrumbs/styles.js.map +1 -0
- 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 +95 -30
- 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 +17 -3
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Carousel/context.js +7 -0
- package/lib/module/components/Carousel/context.js.map +1 -0
- package/lib/module/components/Carousel/index.js +152 -0
- package/lib/module/components/Carousel/index.js.map +1 -0
- package/lib/module/components/Carousel/navButton.js +114 -0
- package/lib/module/components/Carousel/navButton.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 +41 -0
- package/lib/module/components/Carousel/styles.js.map +1 -0
- package/lib/module/components/Carousel/useCarouselActiveIndex.js +48 -0
- package/lib/module/components/Carousel/useCarouselActiveIndex.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 +46 -49
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +119 -22
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +180 -23
- 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/animation.js +7 -0
- package/lib/module/components/Dialog/animation.js.map +1 -0
- package/lib/module/components/Dialog/index.js +409 -74
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +66 -16
- 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 +6 -6
- 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/Form/styles.js +1 -1
- package/lib/module/components/Form/styles.js.map +1 -1
- package/lib/module/components/Heading/styles.js +2 -2
- 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 +26 -37
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +137 -12
- 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 +21 -8
- 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 +54 -8
- 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 +29 -57
- 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 +10 -8
- 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/ProgressBar/styles.js +2 -2
- package/lib/module/components/ProgressBar/styles.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/ProgressSegmented/styles.js +3 -3
- package/lib/module/components/ProgressSegmented/styles.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 +21 -9
- 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/ScrollShadow/index.js +78 -0
- package/lib/module/components/ScrollShadow/index.js.map +1 -0
- package/lib/module/components/ScrollShadow/styles.js +50 -0
- package/lib/module/components/ScrollShadow/styles.js.map +1 -0
- package/lib/module/components/ScrollShadow/useScrollShadow.js +79 -0
- package/lib/module/components/ScrollShadow/useScrollShadow.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 +27 -22
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +34 -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/Slider/getSliderPopupPosition.js +38 -0
- package/lib/module/components/Slider/getSliderPopupPosition.js.map +1 -0
- package/lib/module/components/Slider/index.js +359 -0
- package/lib/module/components/Slider/index.js.map +1 -0
- package/lib/module/components/Slider/styles.js +108 -0
- package/lib/module/components/Slider/styles.js.map +1 -0
- package/lib/module/components/Stack/styles.js +1 -1
- package/lib/module/components/Stack/styles.js.map +1 -1
- 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/Switch/styles.js +1 -1
- package/lib/module/components/Switch/styles.js.map +1 -1
- package/lib/module/components/Tabs/index.js +522 -0
- package/lib/module/components/Tabs/index.js.map +1 -0
- package/lib/module/components/Tabs/styles.js +330 -0
- package/lib/module/components/Tabs/styles.js.map +1 -0
- package/lib/module/components/Text/styles.js +3 -3
- 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 +155 -83
- package/lib/module/components/Tile/index.js.map +1 -1
- package/lib/module/components/Tile/styles.js +3 -3
- package/lib/module/components/Tile/styles.js.map +1 -1
- package/lib/module/components/Toast/animation.js +326 -0
- package/lib/module/components/Toast/animation.js.map +1 -0
- package/lib/module/components/Toast/hooks.js +62 -0
- package/lib/module/components/Toast/hooks.js.map +1 -0
- package/lib/module/components/Toast/index.js +502 -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 +15 -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 +28 -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 +4 -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 +5 -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/hooks/usePopupDialogContentAnimation.d.ts +47 -0
- package/lib/typescript/animation/hooks/usePopupDialogContentAnimation.d.ts.map +1 -0
- package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts +29 -0
- package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts.map +1 -0
- package/lib/typescript/animation/hooks/usePopupRootAnimation.d.ts +16 -0
- package/lib/typescript/animation/hooks/usePopupRootAnimation.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 +10 -7
- 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 +5 -5
- 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 +5 -9
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -1
- package/lib/typescript/components/Box/Box.d.ts +0 -3
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Breadcrumbs/index.d.ts +28 -0
- package/lib/typescript/components/Breadcrumbs/index.d.ts.map +1 -0
- package/lib/typescript/components/Breadcrumbs/styles.d.ts +11 -0
- package/lib/typescript/components/Breadcrumbs/styles.d.ts.map +1 -0
- package/lib/typescript/components/Button/index.d.ts +86 -9
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +11 -8
- 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 +6 -2
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/Carousel/context.d.ts +15 -0
- package/lib/typescript/components/Carousel/context.d.ts.map +1 -0
- package/lib/typescript/components/Carousel/index.d.ts +73 -0
- package/lib/typescript/components/Carousel/index.d.ts.map +1 -0
- package/lib/typescript/components/Carousel/navButton.d.ts +40 -0
- package/lib/typescript/components/Carousel/navButton.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 +16 -0
- package/lib/typescript/components/Carousel/styles.d.ts.map +1 -0
- package/lib/typescript/components/Carousel/useCarouselActiveIndex.d.ts +12 -0
- package/lib/typescript/components/Carousel/useCarouselActiveIndex.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 +51 -8
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +13 -5
- 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/animation.d.ts +11 -0
- package/lib/typescript/components/Dialog/animation.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/index.d.ts +43 -13
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +18 -6
- 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 +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 +2 -2
- package/lib/typescript/components/Heading/styles.d.ts.map +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 +14 -4
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +7 -3
- 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 +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 +5 -2
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/styles.d.ts +10 -3
- 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 +4 -11
- 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 +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/ProgressBar/styles.d.ts +1 -1
- package/lib/typescript/components/ProgressBar/styles.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/ProgressSegmented/styles.d.ts +1 -1
- package/lib/typescript/components/ProgressSegmented/styles.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/ScrollShadow/index.d.ts +29 -0
- package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/styles.d.ts +12 -0
- package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +17 -0
- package/lib/typescript/components/ScrollShadow/useScrollShadow.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 +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/Slider/getSliderPopupPosition.d.ts +10 -0
- package/lib/typescript/components/Slider/getSliderPopupPosition.d.ts.map +1 -0
- package/lib/typescript/components/Slider/index.d.ts +61 -0
- package/lib/typescript/components/Slider/index.d.ts.map +1 -0
- package/lib/typescript/components/Slider/styles.d.ts +30 -0
- package/lib/typescript/components/Slider/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/Switch/styles.d.ts +1 -1
- package/lib/typescript/components/Switch/styles.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/index.d.ts +48 -0
- package/lib/typescript/components/Tabs/index.d.ts.map +1 -0
- package/lib/typescript/components/Tabs/styles.d.ts +107 -0
- package/lib/typescript/components/Tabs/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/styles.d.ts +2 -2
- package/lib/typescript/components/Text/styles.d.ts.map +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 +8 -2
- package/lib/typescript/components/Tile/index.d.ts.map +1 -1
- package/lib/typescript/components/Tile/styles.d.ts +2 -2
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -1
- 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 +308 -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 +15 -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 +6 -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 +28 -17
- package/src/animation/hooks/index.ts +4 -0
- package/src/animation/hooks/useCombinedAnimationDisabledState.ts +46 -0
- package/src/animation/hooks/usePopupDialogContentAnimation.ts +265 -0
- package/src/animation/hooks/usePopupOverlayAnimation.ts +91 -0
- package/src/animation/hooks/usePopupRootAnimation.ts +27 -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 +36 -22
- package/src/components/Avatar/index.tsx +143 -45
- package/src/components/Avatar/styles.ts +50 -35
- 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 +10 -57
- package/src/components/Box/Box.tsx +3 -7
- package/src/components/Breadcrumbs/index.tsx +311 -0
- package/src/components/Breadcrumbs/styles.ts +63 -0
- package/src/components/Button/index.tsx +289 -47
- package/src/components/Button/styles.ts +79 -38
- package/src/components/CLAUDE.md +195 -0
- package/src/components/Card/index.tsx +94 -28
- package/src/components/Card/styles.ts +20 -5
- package/src/components/Carousel/context.ts +15 -0
- package/src/components/Carousel/index.tsx +268 -0
- package/src/components/Carousel/navButton.tsx +160 -0
- package/src/components/Carousel/paginationNavigation.ts +32 -0
- package/src/components/Carousel/styles.ts +45 -0
- package/src/components/Carousel/useCarouselActiveIndex.ts +54 -0
- package/src/components/Checkbox/index.tsx +124 -51
- package/src/components/Checkbox/styles.ts +93 -84
- package/src/components/Chip/index.tsx +194 -32
- package/src/components/Chip/styles.ts +225 -23
- package/src/components/CurrencyInput/index.tsx +192 -0
- package/src/components/CurrencyInput/styles.ts +44 -0
- package/src/components/Dialog/animation.ts +13 -0
- package/src/components/Dialog/index.tsx +538 -90
- package/src/components/Dialog/styles.ts +94 -31
- 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 +7 -6
- package/src/components/Form/index.tsx +18 -14
- package/src/components/Form/styles.ts +1 -1
- package/src/components/Heading/styles.ts +2 -2
- package/src/components/Icon/index.tsx +14 -8
- package/src/components/IconButton/index.tsx +45 -37
- package/src/components/IconButton/styles.ts +137 -11
- package/src/components/Input/index.tsx +95 -33
- package/src/components/Input/styles.ts +36 -13
- package/src/components/InsuranceDisclosure/index.tsx +59 -0
- package/src/components/InsuranceDisclosure/styles.ts +12 -0
- package/src/components/Link/index.tsx +58 -18
- package/src/components/Link/styles.ts +48 -11
- package/src/components/ListItem/index.tsx +157 -87
- package/src/components/ListItem/styles.ts +47 -71
- package/src/components/OtpInput/index.tsx +149 -34
- package/src/components/OtpInput/styles.ts +21 -14
- package/src/components/ProgressBar/index.tsx +11 -16
- package/src/components/ProgressBar/styles.ts +2 -2
- package/src/components/ProgressSegmented/index.tsx +45 -14
- package/src/components/ProgressSegmented/styles.ts +3 -3
- 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 +38 -15
- package/src/components/ScopedTheme/index.tsx +17 -0
- package/src/components/ScrollShadow/index.tsx +119 -0
- package/src/components/ScrollShadow/styles.ts +57 -0
- package/src/components/ScrollShadow/useScrollShadow.ts +110 -0
- package/src/components/Select/index.tsx +175 -55
- package/src/components/Select/styles.ts +64 -52
- package/src/components/Skeleton/index.tsx +43 -0
- package/src/components/Skeleton/styles.ts +5 -0
- package/src/components/Slider/getSliderPopupPosition.ts +37 -0
- package/src/components/Slider/index.tsx +456 -0
- package/src/components/Slider/styles.ts +147 -0
- package/src/components/Stack/styles.ts +1 -1
- 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/Switch/styles.ts +1 -1
- package/src/components/Tabs/index.tsx +698 -0
- package/src/components/Tabs/styles.ts +340 -0
- package/src/components/Text/styles.ts +3 -3
- package/src/components/Textarea/index.tsx +180 -0
- package/src/components/Textarea/styles.ts +86 -0
- package/src/components/Tile/index.tsx +145 -94
- package/src/components/Tile/styles.ts +3 -3
- package/src/components/Toast/animation.ts +405 -0
- package/src/components/Toast/hooks.ts +93 -0
- package/src/components/Toast/index.tsx +551 -0
- package/src/components/Toast/styles.ts +186 -0
- package/src/components/Toast/types.ts +338 -0
- package/src/components/VirtualizedList/index.tsx +11 -1
- package/src/components/index.ts +15 -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 +6 -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 -156
- package/lib/commonjs/styles/primitives.js.map +0 -1
- package/lib/commonjs/utils/WrapStringChild.js +0 -22
- package/lib/commonjs/utils/WrapStringChild.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 -152
- package/lib/module/styles/primitives.js.map +0 -1
- package/lib/module/utils/WrapStringChild.js +0 -18
- package/lib/module/utils/WrapStringChild.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 -120
- package/lib/typescript/styles/primitives.d.ts.map +0 -1
- package/lib/typescript/utils/WrapStringChild.d.ts +0 -10
- package/lib/typescript/utils/WrapStringChild.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 -140
- package/src/utils/WrapStringChild.tsx +0 -25
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef } from 'react';
|
|
4
|
+
import { Platform, View } from 'react-native';
|
|
5
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
6
|
+
import { DefaultToast } from '../../components/Toast';
|
|
7
|
+
import { InsetsContainer } from './insets-container';
|
|
8
|
+
import { ToastLifecycleContext } from './lifecycle.context';
|
|
9
|
+
import { toastReducer } from './reducer';
|
|
10
|
+
import { ToastConfigContext } from './toast-config.context';
|
|
11
|
+
import { ToastItemRenderer } from './toast-item-renderer';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const DEFAULT_DURATION = 4000;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Context for toast manager
|
|
17
|
+
*/
|
|
18
|
+
const ToasterContext = /*#__PURE__*/createContext(null);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Merges global config with local config, ensuring local config takes precedence
|
|
22
|
+
* Only includes defined values from localConfig to avoid overriding global config with undefined
|
|
23
|
+
*/
|
|
24
|
+
function mergeToastConfig(globalConfig, localConfig) {
|
|
25
|
+
const result = {
|
|
26
|
+
...globalConfig
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Only override with defined values from localConfig
|
|
30
|
+
if (localConfig.color !== undefined) {
|
|
31
|
+
result.color = localConfig.color;
|
|
32
|
+
}
|
|
33
|
+
if (localConfig.placement !== undefined) {
|
|
34
|
+
result.placement = localConfig.placement;
|
|
35
|
+
}
|
|
36
|
+
if (localConfig.isSwipeable !== undefined) {
|
|
37
|
+
result.isSwipeable = localConfig.isSwipeable;
|
|
38
|
+
}
|
|
39
|
+
if (localConfig.animation !== undefined) {
|
|
40
|
+
result.animation = localConfig.animation;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Creates a component function for simple string toast
|
|
47
|
+
*/
|
|
48
|
+
function createStringToastComponent(label, globalConfig) {
|
|
49
|
+
return props => {
|
|
50
|
+
const mergedConfig = mergeToastConfig(globalConfig, {
|
|
51
|
+
color: 'neutral'
|
|
52
|
+
});
|
|
53
|
+
return /*#__PURE__*/_jsx(DefaultToast, {
|
|
54
|
+
...props,
|
|
55
|
+
label: label,
|
|
56
|
+
color: mergedConfig.color,
|
|
57
|
+
placement: mergedConfig.placement,
|
|
58
|
+
isSwipeable: mergedConfig.isSwipeable,
|
|
59
|
+
animation: mergedConfig.animation
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Creates a component function for config-based toast
|
|
66
|
+
*/
|
|
67
|
+
function createConfigToastComponent(config, globalConfig) {
|
|
68
|
+
return props => {
|
|
69
|
+
const mergedConfig = mergeToastConfig(globalConfig, {
|
|
70
|
+
color: config.color,
|
|
71
|
+
placement: config.placement,
|
|
72
|
+
isSwipeable: config.isSwipeable,
|
|
73
|
+
animation: config.animation
|
|
74
|
+
});
|
|
75
|
+
return /*#__PURE__*/_jsx(DefaultToast, {
|
|
76
|
+
...props,
|
|
77
|
+
color: mergedConfig.color,
|
|
78
|
+
placement: mergedConfig.placement,
|
|
79
|
+
isSwipeable: mergedConfig.isSwipeable,
|
|
80
|
+
animation: mergedConfig.animation,
|
|
81
|
+
label: config.label,
|
|
82
|
+
description: config.description,
|
|
83
|
+
actionLabel: config.actionLabel,
|
|
84
|
+
onActionPress: config.onActionPress,
|
|
85
|
+
icon: config.icon
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Toast provider component
|
|
92
|
+
* Wraps your app to enable toast functionality
|
|
93
|
+
*/
|
|
94
|
+
export function ToastProvider({
|
|
95
|
+
defaultProps,
|
|
96
|
+
insets,
|
|
97
|
+
maxVisibleToasts = 3,
|
|
98
|
+
contentWrapper,
|
|
99
|
+
children,
|
|
100
|
+
disableFullWindowOverlay = false,
|
|
101
|
+
unstable_accessibilityContainerViewIsModal,
|
|
102
|
+
announceLabel
|
|
103
|
+
}) {
|
|
104
|
+
const [toasts, dispatch] = useReducer(toastReducer, []);
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Memoize global config to prevent unnecessary re-renders
|
|
108
|
+
*/
|
|
109
|
+
const globalConfig = useMemo(() => defaultProps, [defaultProps]);
|
|
110
|
+
const isToastVisible = toasts.length > 0;
|
|
111
|
+
const heights = useSharedValue({});
|
|
112
|
+
const total = useSharedValue(0);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Derive total from toasts.length so the animated opacity/scale/translateY
|
|
116
|
+
* interpolations always use the real count. Manual increment/decrement
|
|
117
|
+
* was prone to drift when hide + show ran in the same tick or when
|
|
118
|
+
* auto-dismiss raced with a manual hide (stale-closure mismatch).
|
|
119
|
+
*/
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
total.set(toasts.length);
|
|
122
|
+
}, [toasts.length, total]);
|
|
123
|
+
const idCounter = useRef(0);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Timer state per toast — tracks remaining time so pause/resume can
|
|
127
|
+
* restart with only the leftover duration (WCAG 2.2.1).
|
|
128
|
+
*/
|
|
129
|
+
const timersRef = useRef(new Map());
|
|
130
|
+
const pausedRef = useRef(false);
|
|
131
|
+
const hideRef = useRef(null);
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Safety reset: when all toasts are gone the InsetsContainer unmounts and
|
|
135
|
+
* no resume event can fire. Clear the paused flag and any orphaned timer
|
|
136
|
+
* entries so the next toast's timer starts normally.
|
|
137
|
+
*/
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
if (toasts.length === 0) {
|
|
140
|
+
pausedRef.current = false;
|
|
141
|
+
timersRef.current.forEach(entry => {
|
|
142
|
+
if (entry.timer) clearTimeout(entry.timer);
|
|
143
|
+
});
|
|
144
|
+
timersRef.current.clear();
|
|
145
|
+
}
|
|
146
|
+
}, [toasts.length]);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Remove one or more toasts from the array. On web this is the second half
|
|
150
|
+
* of the two-phase hide flow — the toast component calls it from
|
|
151
|
+
* `onTransitionEnd` (or a safety timeout) after the exit transition plays.
|
|
152
|
+
* Also cleans up per-id height state.
|
|
153
|
+
*/
|
|
154
|
+
const remove = useCallback(ids => {
|
|
155
|
+
const idsArray = Array.isArray(ids) ? ids : [ids];
|
|
156
|
+
if (idsArray.length === 0) return;
|
|
157
|
+
dispatch({
|
|
158
|
+
type: 'REMOVE',
|
|
159
|
+
payload: {
|
|
160
|
+
ids: idsArray
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
heights.modify(value => {
|
|
164
|
+
'worklet';
|
|
165
|
+
|
|
166
|
+
const result = {
|
|
167
|
+
...value
|
|
168
|
+
};
|
|
169
|
+
for (const id of idsArray) {
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
171
|
+
delete result[id];
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
});
|
|
175
|
+
}, [heights]);
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Hide one or more toasts
|
|
179
|
+
* - No argument: hides the last toast in the array
|
|
180
|
+
* - "all": hides all toasts
|
|
181
|
+
* - Single ID: hides that toast
|
|
182
|
+
* - Array of IDs: hides those toasts
|
|
183
|
+
*
|
|
184
|
+
* On web this only marks toasts as `pendingRemoval` so their CSS exit
|
|
185
|
+
* transition can play; the actual removal happens when the toast
|
|
186
|
+
* component calls `remove(id)` on transition end.
|
|
187
|
+
* On native this dispatches removal directly — Reanimated's `exiting`
|
|
188
|
+
* layout animation plays before unmount.
|
|
189
|
+
*/
|
|
190
|
+
const hide = useCallback(ids => {
|
|
191
|
+
const isWeb = Platform.OS === 'web';
|
|
192
|
+
if (ids === undefined) {
|
|
193
|
+
if (toasts.length === 0) return;
|
|
194
|
+
// Hide the last non-pending toast in the array. Using the last
|
|
195
|
+
// pending toast would be a no-op on web.
|
|
196
|
+
let lastToast = null;
|
|
197
|
+
for (let i = toasts.length - 1; i >= 0; i--) {
|
|
198
|
+
const candidate = toasts[i];
|
|
199
|
+
if (!candidate.pendingRemoval) {
|
|
200
|
+
lastToast = candidate;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (!lastToast) return;
|
|
205
|
+
const timerEntry = timersRef.current.get(lastToast.id);
|
|
206
|
+
if (timerEntry?.timer) {
|
|
207
|
+
clearTimeout(timerEntry.timer);
|
|
208
|
+
}
|
|
209
|
+
timersRef.current.delete(lastToast.id);
|
|
210
|
+
if (lastToast.onHide) {
|
|
211
|
+
lastToast.onHide();
|
|
212
|
+
}
|
|
213
|
+
if (isWeb) {
|
|
214
|
+
dispatch({
|
|
215
|
+
type: 'MARK_CLOSED',
|
|
216
|
+
payload: {
|
|
217
|
+
ids: [lastToast.id]
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
} else {
|
|
221
|
+
remove([lastToast.id]);
|
|
222
|
+
}
|
|
223
|
+
} else if (ids === 'all') {
|
|
224
|
+
timersRef.current.forEach(entry => {
|
|
225
|
+
if (entry.timer) clearTimeout(entry.timer);
|
|
226
|
+
});
|
|
227
|
+
timersRef.current.clear();
|
|
228
|
+
const targetIds = [];
|
|
229
|
+
toasts.forEach(toast => {
|
|
230
|
+
if (toast.pendingRemoval) return;
|
|
231
|
+
targetIds.push(toast.id);
|
|
232
|
+
if (toast.onHide) {
|
|
233
|
+
toast.onHide();
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
if (targetIds.length === 0) return;
|
|
237
|
+
if (isWeb) {
|
|
238
|
+
dispatch({
|
|
239
|
+
type: 'MARK_CLOSED',
|
|
240
|
+
payload: {
|
|
241
|
+
ids: targetIds
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
} else {
|
|
245
|
+
remove(targetIds);
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
const idsArray = Array.isArray(ids) ? ids : [ids];
|
|
249
|
+
const targetIds = [];
|
|
250
|
+
idsArray.forEach(id => {
|
|
251
|
+
const toast = toasts.find(t => t.id === id);
|
|
252
|
+
if (!toast || toast.pendingRemoval) return;
|
|
253
|
+
const timerEntry = timersRef.current.get(id);
|
|
254
|
+
if (timerEntry?.timer) {
|
|
255
|
+
clearTimeout(timerEntry.timer);
|
|
256
|
+
}
|
|
257
|
+
timersRef.current.delete(id);
|
|
258
|
+
targetIds.push(id);
|
|
259
|
+
if (toast.onHide) {
|
|
260
|
+
toast.onHide();
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
if (targetIds.length === 0) return;
|
|
264
|
+
if (isWeb) {
|
|
265
|
+
dispatch({
|
|
266
|
+
type: 'MARK_CLOSED',
|
|
267
|
+
payload: {
|
|
268
|
+
ids: targetIds
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
} else {
|
|
272
|
+
remove(targetIds);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}, [remove, toasts]);
|
|
276
|
+
|
|
277
|
+
// Keep hide ref up to date
|
|
278
|
+
hideRef.current = hide;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Pause all running auto-dismiss timers (WCAG 2.2.1).
|
|
282
|
+
* Stores elapsed time so resumeAll can restart with the remainder.
|
|
283
|
+
*/
|
|
284
|
+
const pauseAll = useCallback(() => {
|
|
285
|
+
if (pausedRef.current) return;
|
|
286
|
+
pausedRef.current = true;
|
|
287
|
+
const now = Date.now();
|
|
288
|
+
timersRef.current.forEach(entry => {
|
|
289
|
+
if (entry.timer) {
|
|
290
|
+
clearTimeout(entry.timer);
|
|
291
|
+
entry.timer = null;
|
|
292
|
+
}
|
|
293
|
+
const elapsed = now - entry.startedAt;
|
|
294
|
+
entry.remaining = Math.max(0, entry.remaining - elapsed);
|
|
295
|
+
});
|
|
296
|
+
}, []);
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Resume all paused auto-dismiss timers with their remaining duration.
|
|
300
|
+
*/
|
|
301
|
+
const resumeAll = useCallback(() => {
|
|
302
|
+
pausedRef.current = false;
|
|
303
|
+
const now = Date.now();
|
|
304
|
+
timersRef.current.forEach((entry, id) => {
|
|
305
|
+
if (entry.timer) return;
|
|
306
|
+
if (entry.remaining <= 0) {
|
|
307
|
+
if (hideRef.current) hideRef.current(id);
|
|
308
|
+
timersRef.current.delete(id);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
entry.startedAt = now;
|
|
312
|
+
entry.timer = setTimeout(() => {
|
|
313
|
+
if (hideRef.current) hideRef.current(id);
|
|
314
|
+
timersRef.current.delete(id);
|
|
315
|
+
}, entry.remaining);
|
|
316
|
+
});
|
|
317
|
+
}, []);
|
|
318
|
+
const lifecycleContextValue = useMemo(() => {
|
|
319
|
+
const pending = new Set();
|
|
320
|
+
let frontmostId = null;
|
|
321
|
+
for (const toast of toasts) {
|
|
322
|
+
if (toast.pendingRemoval) {
|
|
323
|
+
pending.add(toast.id);
|
|
324
|
+
} else {
|
|
325
|
+
frontmostId = toast.id;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
remove: id => remove([id]),
|
|
330
|
+
pendingRemovalIds: pending,
|
|
331
|
+
frontmostId
|
|
332
|
+
};
|
|
333
|
+
}, [remove, toasts]);
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Show a toast
|
|
337
|
+
* Supports three usage patterns:
|
|
338
|
+
* 1. Simple string: toast.show('This is toast')
|
|
339
|
+
* 2. Config object: toast.show({ label, color, ... })
|
|
340
|
+
* 3. Custom component: toast.show({ component: (props) => <Toast>...</Toast> })
|
|
341
|
+
*/
|
|
342
|
+
const show = useCallback(options => {
|
|
343
|
+
let normalizedOptions;
|
|
344
|
+
let duration = DEFAULT_DURATION; // Default duration
|
|
345
|
+
let explicitId;
|
|
346
|
+
|
|
347
|
+
// Case 1: Simple string
|
|
348
|
+
if (typeof options === 'string') {
|
|
349
|
+
normalizedOptions = {
|
|
350
|
+
id: undefined,
|
|
351
|
+
component: createStringToastComponent(options, globalConfig),
|
|
352
|
+
duration: DEFAULT_DURATION
|
|
353
|
+
};
|
|
354
|
+
duration = DEFAULT_DURATION;
|
|
355
|
+
explicitId = undefined;
|
|
356
|
+
}
|
|
357
|
+
// Case 2: Config object without component
|
|
358
|
+
else if (!('component' in options) || options.component === undefined) {
|
|
359
|
+
const config = options;
|
|
360
|
+
duration = config.duration ?? DEFAULT_DURATION;
|
|
361
|
+
explicitId = config.id;
|
|
362
|
+
normalizedOptions = {
|
|
363
|
+
id: config.id,
|
|
364
|
+
component: createConfigToastComponent(config, globalConfig),
|
|
365
|
+
duration,
|
|
366
|
+
onShow: config.onShow,
|
|
367
|
+
onHide: config.onHide
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
// Case 3: Config object with component (existing behavior)
|
|
371
|
+
else {
|
|
372
|
+
normalizedOptions = options;
|
|
373
|
+
duration = normalizedOptions.duration ?? DEFAULT_DURATION;
|
|
374
|
+
explicitId = normalizedOptions.id;
|
|
375
|
+
}
|
|
376
|
+
const id = normalizedOptions.id ?? `toast-${String(Date.now())}-${String(idCounter.current++)}`;
|
|
377
|
+
|
|
378
|
+
// If an explicit ID was provided, check if a toast with that ID already exists
|
|
379
|
+
// If it exists, skip adding a new toast and return the existing ID
|
|
380
|
+
if (explicitId !== undefined) {
|
|
381
|
+
const existingToast = toasts.find(toast => toast.id === explicitId);
|
|
382
|
+
if (existingToast) {
|
|
383
|
+
return existingToast.id;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
dispatch({
|
|
387
|
+
type: 'SHOW',
|
|
388
|
+
payload: {
|
|
389
|
+
id,
|
|
390
|
+
component: normalizedOptions.component,
|
|
391
|
+
duration,
|
|
392
|
+
onShow: normalizedOptions.onShow,
|
|
393
|
+
onHide: normalizedOptions.onHide
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
if (normalizedOptions.onShow) {
|
|
397
|
+
normalizedOptions.onShow();
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Set up auto-dismiss timeout synchronously
|
|
401
|
+
if (duration !== 'persistent' && typeof duration === 'number' && !Number.isNaN(duration) && duration >= 0 && duration !== Infinity) {
|
|
402
|
+
// Handle immediate dismissal
|
|
403
|
+
if (duration === 0) {
|
|
404
|
+
if (hideRef.current) {
|
|
405
|
+
hideRef.current(id);
|
|
406
|
+
}
|
|
407
|
+
} else {
|
|
408
|
+
const now = Date.now();
|
|
409
|
+
const timer = setTimeout(() => {
|
|
410
|
+
if (hideRef.current) {
|
|
411
|
+
hideRef.current(id);
|
|
412
|
+
}
|
|
413
|
+
timersRef.current.delete(id);
|
|
414
|
+
}, duration);
|
|
415
|
+
const entry = {
|
|
416
|
+
startedAt: now,
|
|
417
|
+
remaining: duration,
|
|
418
|
+
timer: timer,
|
|
419
|
+
duration
|
|
420
|
+
};
|
|
421
|
+
timersRef.current.set(id, entry);
|
|
422
|
+
if (pausedRef.current) {
|
|
423
|
+
clearTimeout(timer);
|
|
424
|
+
entry.timer = null;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return id;
|
|
429
|
+
}, [toasts, globalConfig]);
|
|
430
|
+
const contextValue = useMemo(() => ({
|
|
431
|
+
toast: {
|
|
432
|
+
show,
|
|
433
|
+
hide,
|
|
434
|
+
pauseAll,
|
|
435
|
+
resumeAll
|
|
436
|
+
},
|
|
437
|
+
isToastVisible
|
|
438
|
+
}), [show, hide, pauseAll, resumeAll, isToastVisible]);
|
|
439
|
+
return /*#__PURE__*/_jsx(ToastConfigContext.Provider, {
|
|
440
|
+
value: globalConfig,
|
|
441
|
+
children: /*#__PURE__*/_jsx(ToasterContext.Provider, {
|
|
442
|
+
value: contextValue,
|
|
443
|
+
children: /*#__PURE__*/_jsxs(ToastLifecycleContext.Provider, {
|
|
444
|
+
value: lifecycleContextValue,
|
|
445
|
+
children: [children, toasts.length > 0 && /*#__PURE__*/_jsx(InsetsContainer, {
|
|
446
|
+
insets: insets,
|
|
447
|
+
announceLabel: announceLabel,
|
|
448
|
+
contentWrapper: contentWrapper,
|
|
449
|
+
disableFullWindowOverlay: disableFullWindowOverlay,
|
|
450
|
+
unstable_accessibilityContainerViewIsModal: unstable_accessibilityContainerViewIsModal,
|
|
451
|
+
pauseAll: pauseAll,
|
|
452
|
+
resumeAll: resumeAll,
|
|
453
|
+
hide: hide,
|
|
454
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
455
|
+
className: "flex-1",
|
|
456
|
+
children: toasts.map((toastItem, index) => /*#__PURE__*/_jsx(ToastItemRenderer, {
|
|
457
|
+
toastItem: toastItem,
|
|
458
|
+
show: show,
|
|
459
|
+
hide: hide,
|
|
460
|
+
index: index,
|
|
461
|
+
total: total,
|
|
462
|
+
heights: heights,
|
|
463
|
+
maxVisibleToasts: maxVisibleToasts
|
|
464
|
+
}, toastItem.id))
|
|
465
|
+
})
|
|
466
|
+
})]
|
|
467
|
+
})
|
|
468
|
+
})
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Hook to access toast functionality
|
|
474
|
+
*
|
|
475
|
+
* @returns Object containing toast manager and visibility state
|
|
476
|
+
*
|
|
477
|
+
* @example
|
|
478
|
+
* ```tsx
|
|
479
|
+
* const { toast, isToastVisible } = useToast();
|
|
480
|
+
*
|
|
481
|
+
* // Show a toast
|
|
482
|
+
* toast.show({ component: <Toast>Hello</Toast> });
|
|
483
|
+
*
|
|
484
|
+
* // Hide a toast
|
|
485
|
+
* toast.hide('my-toast');
|
|
486
|
+
*
|
|
487
|
+
* // Check if any toast is visible
|
|
488
|
+
* if (isToastVisible) {
|
|
489
|
+
* console.log('A toast is currently displayed');
|
|
490
|
+
* }
|
|
491
|
+
* ```
|
|
492
|
+
*/
|
|
493
|
+
export function useToast() {
|
|
494
|
+
const context = useContext(ToasterContext);
|
|
495
|
+
if (!context) {
|
|
496
|
+
throw new Error('useToast must be used within a ToastProvider provider');
|
|
497
|
+
}
|
|
498
|
+
return {
|
|
499
|
+
toast: context.toast,
|
|
500
|
+
isToastVisible: context.isToastVisible
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useCallback","useContext","useEffect","useMemo","useReducer","useRef","Platform","View","useSharedValue","DefaultToast","InsetsContainer","ToastLifecycleContext","toastReducer","ToastConfigContext","ToastItemRenderer","jsx","_jsx","jsxs","_jsxs","DEFAULT_DURATION","ToasterContext","mergeToastConfig","globalConfig","localConfig","result","color","undefined","placement","isSwipeable","animation","createStringToastComponent","label","props","mergedConfig","createConfigToastComponent","config","description","actionLabel","onActionPress","icon","ToastProvider","defaultProps","insets","maxVisibleToasts","contentWrapper","children","disableFullWindowOverlay","unstable_accessibilityContainerViewIsModal","announceLabel","toasts","dispatch","isToastVisible","length","heights","total","set","idCounter","timersRef","Map","pausedRef","hideRef","current","forEach","entry","timer","clearTimeout","clear","remove","ids","idsArray","Array","isArray","type","payload","modify","value","id","hide","isWeb","OS","lastToast","i","candidate","pendingRemoval","timerEntry","get","delete","onHide","targetIds","toast","push","find","t","pauseAll","now","Date","elapsed","startedAt","remaining","Math","max","resumeAll","setTimeout","lifecycleContextValue","pending","Set","frontmostId","add","pendingRemovalIds","show","options","normalizedOptions","duration","explicitId","component","onShow","String","existingToast","Number","isNaN","Infinity","contextValue","Provider","className","map","toastItem","index","useToast","context","Error"],"sourceRoot":"../../../../src","sources":["providers/toast/provider.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,WAAW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,MAAMC,OAAO,GAAG/H,UAAU,CAACmB,cAAc,CAAC;EAE1C,IAAI,CAAC4G,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,uDAAuD,CAAC;EAC1E;EAEA,OAAO;IACLxC,KAAK,EAAEuC,OAAO,CAACvC,KAAK;IACpBtC,cAAc,EAAE6E,OAAO,CAAC7E;EAC1B,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reducer for managing toast state
|
|
5
|
+
*
|
|
6
|
+
* Removal is a two-phase flow so web can play its CSS exit transition
|
|
7
|
+
* before the DOM node is unmounted:
|
|
8
|
+
* `MARK_CLOSED` → flips `pendingRemoval: true` (node stays mounted).
|
|
9
|
+
* `REMOVE` → filters the toast out of the array (node unmounts).
|
|
10
|
+
*
|
|
11
|
+
* Native dispatches `REMOVE` directly since Reanimated's `exiting`
|
|
12
|
+
* layout animation plays before unmount without a lingering state.
|
|
13
|
+
*/
|
|
14
|
+
export function toastReducer(state, action) {
|
|
15
|
+
switch (action.type) {
|
|
16
|
+
case 'SHOW':
|
|
17
|
+
{
|
|
18
|
+
const filtered = state.filter(toast => toast.id !== action.payload.id);
|
|
19
|
+
return [...filtered, action.payload];
|
|
20
|
+
}
|
|
21
|
+
case 'MARK_CLOSED':
|
|
22
|
+
{
|
|
23
|
+
const idsSet = new Set(action.payload.ids);
|
|
24
|
+
// Early out preserves the array reference when nothing would change,
|
|
25
|
+
// which keeps `useMemo(..., [toasts])` consumers stable.
|
|
26
|
+
const hasChange = state.some(toast => idsSet.has(toast.id) && !toast.pendingRemoval);
|
|
27
|
+
if (!hasChange) return state;
|
|
28
|
+
return state.map(toast => idsSet.has(toast.id) && !toast.pendingRemoval ? {
|
|
29
|
+
...toast,
|
|
30
|
+
pendingRemoval: true
|
|
31
|
+
} : toast);
|
|
32
|
+
}
|
|
33
|
+
case 'REMOVE':
|
|
34
|
+
{
|
|
35
|
+
const idsSet = new Set(action.payload.ids);
|
|
36
|
+
return state.filter(toast => !idsSet.has(toast.id));
|
|
37
|
+
}
|
|
38
|
+
default:
|
|
39
|
+
return state;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["toastReducer","state","action","type","filtered","filter","toast","id","payload","idsSet","Set","ids","hasChange","some","has","pendingRemoval","map"],"sourceRoot":"../../../../src","sources":["providers/toast/reducer.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAACC,KAAkB,EAAEC,MAAmB,EAAe;EACjF,QAAQA,MAAM,CAACC,IAAI;IACjB,KAAK,MAAM;MAAE;QACX,MAAMC,QAAQ,GAAGH,KAAK,CAACI,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAACC,EAAE,KAAKL,MAAM,CAACM,OAAO,CAACD,EAAE,CAAC;QACxE,OAAO,CAAC,GAAGH,QAAQ,EAAEF,MAAM,CAACM,OAAO,CAAC;MACtC;IAEA,KAAK,aAAa;MAAE;QAClB,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAACR,MAAM,CAACM,OAAO,CAACG,GAAG,CAAC;QAC1C;QACA;QACA,MAAMC,SAAS,GAAGX,KAAK,CAACY,IAAI,CAAEP,KAAK,IAAKG,MAAM,CAACK,GAAG,CAACR,KAAK,CAACC,EAAE,CAAC,IAAI,CAACD,KAAK,CAACS,cAAc,CAAC;QACtF,IAAI,CAACH,SAAS,EAAE,OAAOX,KAAK;QAC5B,OAAOA,KAAK,CAACe,GAAG,CAAEV,KAAK,IACrBG,MAAM,CAACK,GAAG,CAACR,KAAK,CAACC,EAAE,CAAC,IAAI,CAACD,KAAK,CAACS,cAAc,GAAG;UAAE,GAAGT,KAAK;UAAES,cAAc,EAAE;QAAK,CAAC,GAAGT,KACvF,CAAC;MACH;IAEA,KAAK,QAAQ;MAAE;QACb,MAAMG,MAAM,GAAG,IAAIC,GAAG,CAACR,MAAM,CAACM,OAAO,CAACG,GAAG,CAAC;QAC1C,OAAOV,KAAK,CAACI,MAAM,CAAEC,KAAK,IAAK,CAACG,MAAM,CAACK,GAAG,CAACR,KAAK,CAACC,EAAE,CAAC,CAAC;MACvD;IAEA;MACE,OAAON,KAAK;EAChB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Context for global toast configuration
|
|
6
|
+
* Extracted to separate file to avoid circular dependencies with toast component
|
|
7
|
+
*/
|
|
8
|
+
const ToastConfigContext = /*#__PURE__*/createContext(undefined);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Hook to access global toast configuration
|
|
12
|
+
*
|
|
13
|
+
* @returns Global toast configuration or undefined if not set
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const globalConfig = useToastConfig();
|
|
18
|
+
* // Use globalConfig.color, globalConfig.placement, etc.
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function useToastConfig() {
|
|
22
|
+
return useContext(ToastConfigContext);
|
|
23
|
+
}
|
|
24
|
+
export { ToastConfigContext };
|
|
25
|
+
//# sourceMappingURL=toast-config.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","ToastConfigContext","undefined","useToastConfig"],"sourceRoot":"../../../../src","sources":["providers/toast/toast-config.context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAGjD;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,gBAAGF,aAAa,CAAgCG,SAAS,CAAC;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAkC;EAC9D,OAAOH,UAAU,CAACC,kBAAkB,CAAC;AACvC;AAEA,SAASA,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Memoized toast item component to prevent unnecessary re-renders
|
|
6
|
+
* Only re-renders when the toast item itself changes
|
|
7
|
+
*/
|
|
8
|
+
export const ToastItemRenderer = /*#__PURE__*/memo(({
|
|
9
|
+
toastItem,
|
|
10
|
+
show,
|
|
11
|
+
hide,
|
|
12
|
+
index,
|
|
13
|
+
total,
|
|
14
|
+
heights,
|
|
15
|
+
maxVisibleToasts
|
|
16
|
+
}) => {
|
|
17
|
+
if (typeof toastItem.component !== 'function') {
|
|
18
|
+
throw new Error('Toast component must be a function that receives ToastComponentProps');
|
|
19
|
+
}
|
|
20
|
+
const content = toastItem.component({
|
|
21
|
+
id: toastItem.id,
|
|
22
|
+
index,
|
|
23
|
+
total,
|
|
24
|
+
heights,
|
|
25
|
+
maxVisibleToasts,
|
|
26
|
+
show,
|
|
27
|
+
hide
|
|
28
|
+
});
|
|
29
|
+
return content;
|
|
30
|
+
}, (prevProps, nextProps) => {
|
|
31
|
+
// Only re-render if the toast ID, component reference, index, or
|
|
32
|
+
// pending-removal flag changed. `pendingRemoval` flips when the
|
|
33
|
+
// provider marks a toast closed on web so the Toast component can
|
|
34
|
+
// play its exit transition — the renderer must propagate that
|
|
35
|
+
// change even though the id and component reference are unchanged.
|
|
36
|
+
// show, hide, total, and heights are stable references.
|
|
37
|
+
return prevProps.toastItem.id === nextProps.toastItem.id && prevProps.toastItem.component === nextProps.toastItem.component && prevProps.toastItem.pendingRemoval === nextProps.toastItem.pendingRemoval && prevProps.index === nextProps.index;
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=toast-item-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","ToastItemRenderer","toastItem","show","hide","index","total","heights","maxVisibleToasts","component","Error","content","id","prevProps","nextProps","pendingRemoval"],"sourceRoot":"../../../../src","sources":["providers/toast/toast-item-renderer.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,gBAAGD,IAAI,CACnC,CAAC;EAAEE,SAAS;EAAEC,IAAI;EAAEC,IAAI;EAAEC,KAAK;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAyC,CAAC,KAAK;EAC9F,IAAI,OAAON,SAAS,CAACO,SAAS,KAAK,UAAU,EAAE;IAC7C,MAAM,IAAIC,KAAK,CAAC,sEAAsE,CAAC;EACzF;EAEA,MAAMC,OAAO,GAAGT,SAAS,CAACO,SAAS,CAAC;IAClCG,EAAE,EAAEV,SAAS,CAACU,EAAE;IAChBP,KAAK;IACLC,KAAK;IACLC,OAAO;IACPC,gBAAgB;IAChBL,IAAI;IACJC;EACF,CAAC,CAAC;EAEF,OAAOO,OAAO;AAChB,CAAC,EACD,CAACE,SAAS,EAAEC,SAAS,KAAK;EACxB;EACA;EACA;EACA;EACA;EACA;EACA,OACED,SAAS,CAACX,SAAS,CAACU,EAAE,KAAKE,SAAS,CAACZ,SAAS,CAACU,EAAE,IACjDC,SAAS,CAACX,SAAS,CAACO,SAAS,KAAKK,SAAS,CAACZ,SAAS,CAACO,SAAS,IAC/DI,SAAS,CAACX,SAAS,CAACa,cAAc,KAAKD,SAAS,CAACZ,SAAS,CAACa,cAAc,IACzEF,SAAS,CAACR,KAAK,KAAKS,SAAS,CAACT,KAAK;AAEvC,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["providers/toast/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// packages/components/src/styles/constants.ts
|
|
4
|
+
// Semantic constants for Forge UI component styling.
|
|
5
|
+
|
|
6
|
+
// ─── Transitions ─────────────────────────────────────────
|
|
7
|
+
export const TRANSITION_COLORS = 'transition-colors duration-150';
|
|
8
|
+
|
|
9
|
+
// ─── Disabled ────────────────────────────────────────────
|
|
10
|
+
export const DISABLED_OPACITY = 'data-[disabled=true]:opacity-50';
|
|
11
|
+
export const DISABLED_CURSOR = 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none';
|
|
12
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TRANSITION_COLORS","DISABLED_OPACITY","DISABLED_CURSOR"],"sourceRoot":"../../../src","sources":["styles/constants.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA,OAAO,MAAMA,iBAAiB,GAAG,gCAAgC;;AAEjE;AACA,OAAO,MAAMC,gBAAgB,GAAG,iCAAiC;AACjE,OAAO,MAAMC,eAAe,GAC1B,kFAAkF","ignoreList":[]}
|