@cdx-ui/components 0.0.1-beta.98 → 0.1.0
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 +29 -6
- package/coverage.svg +1 -0
- package/lib/commonjs/animation/hooks/index.js +33 -0
- package/lib/commonjs/animation/hooks/index.js.map +1 -1
- 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/components/Accordion/index.js +286 -0
- package/lib/commonjs/components/Accordion/index.js.map +1 -0
- package/lib/commonjs/components/Accordion/styles.js +56 -0
- package/lib/commonjs/components/Accordion/styles.js.map +1 -0
- package/lib/commonjs/components/Alert/styles.js +8 -8
- package/lib/commonjs/components/Alert/styles.js.map +1 -1
- package/lib/commonjs/components/AlertDialog/index.js +16 -3
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/styles.js +6 -6
- package/lib/commonjs/components/Avatar/styles.js.map +1 -1
- package/lib/commonjs/components/Badge/styles.js +6 -6
- package/lib/commonjs/components/Badge/styles.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/index.js +34 -2
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/styles.js +8 -8
- 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 +1 -12
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +34 -34
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +3 -3
- package/lib/commonjs/components/Calendar/CalendarMonthHeader.js +96 -0
- package/lib/commonjs/components/Calendar/CalendarMonthHeader.js.map +1 -0
- package/lib/commonjs/components/Calendar/CalendarYearPickerGrid.js +74 -0
- package/lib/commonjs/components/Calendar/CalendarYearPickerGrid.js.map +1 -0
- package/lib/commonjs/components/Calendar/flashCalendarAdapter.js +298 -0
- package/lib/commonjs/components/Calendar/flashCalendarAdapter.js.map +1 -0
- package/lib/commonjs/components/Calendar/index.js +149 -0
- package/lib/commonjs/components/Calendar/index.js.map +1 -0
- package/lib/commonjs/components/Calendar/styles.js +70 -0
- package/lib/commonjs/components/Calendar/styles.js.map +1 -0
- package/lib/commonjs/components/Card/index.js +25 -0
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/Card/styles.js +11 -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 +29 -4
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +26 -20
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +22 -2
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +56 -56
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/CurrencyInput/index.js +3 -1
- package/lib/commonjs/components/CurrencyInput/index.js.map +1 -1
- package/lib/commonjs/components/CurrencyInput/styles.js +4 -4
- package/lib/commonjs/components/CurrencyInput/styles.js.map +1 -1
- package/lib/commonjs/components/DateField/index.js +147 -0
- package/lib/commonjs/components/DateField/index.js.map +1 -0
- package/lib/commonjs/components/DateField/styles.js +34 -0
- package/lib/commonjs/components/DateField/styles.js.map +1 -0
- package/lib/commonjs/components/DatePicker/index.js +163 -0
- package/lib/commonjs/components/DatePicker/index.js.map +1 -0
- package/lib/commonjs/components/DateRangePicker/index.js +177 -0
- package/lib/commonjs/components/DateRangePicker/index.js.map +1 -0
- package/lib/commonjs/components/DateTimeField/index.js +96 -0
- package/lib/commonjs/components/DateTimeField/index.js.map +1 -0
- package/lib/commonjs/components/DateTimeList/index.js +180 -0
- package/lib/commonjs/components/DateTimeList/index.js.map +1 -0
- package/lib/commonjs/components/DateTimeList/styles.js +55 -0
- package/lib/commonjs/components/DateTimeList/styles.js.map +1 -0
- package/lib/commonjs/components/DateTimePicker/index.js +187 -0
- package/lib/commonjs/components/DateTimePicker/index.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 +301 -30
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +25 -21
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/components/Divider/styles.js +4 -4
- package/lib/commonjs/components/Divider/styles.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/styles.js +2 -2
- package/lib/commonjs/components/Form/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +2 -2
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +15 -3
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +27 -27
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +7 -7
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/InsuranceDisclosure/index.js +56 -0
- package/lib/commonjs/components/InsuranceDisclosure/index.js.map +1 -0
- package/lib/commonjs/components/InsuranceDisclosure/styles.js +11 -0
- package/lib/commonjs/components/InsuranceDisclosure/styles.js.map +1 -0
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/Link/styles.js +7 -10
- package/lib/commonjs/components/Link/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +11 -11
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +509 -0
- package/lib/commonjs/components/Menu/index.js.map +1 -0
- package/lib/commonjs/components/Menu/styles.js +100 -0
- package/lib/commonjs/components/Menu/styles.js.map +1 -0
- package/lib/commonjs/components/MonthCalendar/index.js +229 -0
- package/lib/commonjs/components/MonthCalendar/index.js.map +1 -0
- package/lib/commonjs/components/MonthPicker/index.js +163 -0
- package/lib/commonjs/components/MonthPicker/index.js.map +1 -0
- package/lib/commonjs/components/OtpInput/index.js +21 -9
- 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/styles.js +3 -3
- package/lib/commonjs/components/ProgressBar/styles.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js +91 -0
- package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js.map +1 -0
- package/lib/commonjs/components/ProgressCircle/index.js +84 -0
- package/lib/commonjs/components/ProgressCircle/index.js.map +1 -0
- package/lib/commonjs/components/ProgressCircle/styles.js +50 -0
- package/lib/commonjs/components/ProgressCircle/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressCircle/useProgressCircleColors.js +35 -0
- package/lib/commonjs/components/ProgressCircle/useProgressCircleColors.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/index.js +1 -14
- 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/styles.js +6 -6
- package/lib/commonjs/components/QuickActionButton/styles.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +17 -2
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/Radio/styles.js +26 -11
- package/lib/commonjs/components/Radio/styles.js.map +1 -1
- package/lib/commonjs/components/RangeCalendar/index.js +165 -0
- package/lib/commonjs/components/RangeCalendar/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 +66 -26
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +6 -45
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +3 -1
- package/lib/commonjs/components/Skeleton/index.js.map +1 -1
- package/lib/commonjs/components/Skeleton/styles.js +2 -2
- package/lib/commonjs/components/Skeleton/styles.js.map +1 -1
- package/lib/commonjs/components/Slider/getSliderPopupPosition.js +67 -0
- package/lib/commonjs/components/Slider/getSliderPopupPosition.js.map +1 -0
- package/lib/commonjs/components/Slider/index.js +406 -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/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/Table/index.js +389 -0
- package/lib/commonjs/components/Table/index.js.map +1 -0
- package/lib/commonjs/components/Table/index.web.js +329 -0
- package/lib/commonjs/components/Table/index.web.js.map +1 -0
- package/lib/commonjs/components/Table/styles.js +111 -0
- package/lib/commonjs/components/Table/styles.js.map +1 -0
- package/lib/commonjs/components/Table/types.js +6 -0
- package/lib/commonjs/components/Table/types.js.map +1 -0
- package/lib/commonjs/components/Table/useTableStyleContext.js +28 -0
- package/lib/commonjs/components/Table/useTableStyleContext.js.map +1 -0
- package/lib/commonjs/components/TablePagination/TablePaginationContext.js +31 -0
- package/lib/commonjs/components/TablePagination/TablePaginationContext.js.map +1 -0
- package/lib/commonjs/components/TablePagination/getTablePaginationItems.js +50 -0
- package/lib/commonjs/components/TablePagination/getTablePaginationItems.js.map +1 -0
- package/lib/commonjs/components/TablePagination/index.js +395 -0
- package/lib/commonjs/components/TablePagination/index.js.map +1 -0
- package/lib/commonjs/components/TablePagination/styles.js +13 -0
- package/lib/commonjs/components/TablePagination/styles.js.map +1 -0
- 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 +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Textarea/styles.js +6 -6
- package/lib/commonjs/components/Textarea/styles.js.map +1 -1
- package/lib/commonjs/components/Tile/styles.js +10 -10
- package/lib/commonjs/components/Tile/styles.js.map +1 -1
- package/lib/commonjs/components/Toast/animation.js +3 -1
- package/lib/commonjs/components/Toast/animation.js.map +1 -1
- package/lib/commonjs/components/Toast/hooks.js +1 -0
- package/lib/commonjs/components/Toast/hooks.js.map +1 -1
- package/lib/commonjs/components/Toast/index.js +18 -3
- package/lib/commonjs/components/Toast/index.js.map +1 -1
- package/lib/commonjs/components/Toast/styles.js +14 -14
- package/lib/commonjs/components/Toast/styles.js.map +1 -1
- package/lib/commonjs/components/Tooltip/index.js +106 -0
- package/lib/commonjs/components/Tooltip/index.js.map +1 -0
- package/lib/commonjs/components/Tooltip/styles.js +10 -0
- package/lib/commonjs/components/Tooltip/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +264 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/picker/PickerTrigger.js +49 -0
- package/lib/commonjs/components/picker/PickerTrigger.js.map +1 -0
- package/lib/commonjs/components/picker/styles.js +15 -0
- package/lib/commonjs/components/picker/styles.js.map +1 -0
- package/lib/commonjs/components/picker/surfaces.js +148 -0
- package/lib/commonjs/components/picker/surfaces.js.map +1 -0
- package/lib/commonjs/figma/Accordion.figma.js +50 -0
- package/lib/commonjs/figma/Accordion.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js +3 -3
- package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -1
- package/lib/commonjs/figma/Card.Header.figma.js +5 -5
- package/lib/commonjs/figma/Card.Header.figma.js.map +1 -1
- 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 +3 -0
- package/lib/commonjs/figma/Card.figma.js.map +1 -1
- package/lib/commonjs/figma/Chip.figma.js +2 -2
- package/lib/commonjs/figma/Chip.figma.js.map +1 -1
- package/lib/commonjs/figma/Dialog.Header.figma.js +6 -1
- package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -1
- package/lib/commonjs/figma/Dialog.Title.figma.js +3 -3
- package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -1
- package/lib/commonjs/figma/Field.Input.figma.js +1 -1
- 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 +1 -1
- package/lib/commonjs/figma/Field.Textarea.figma.js +1 -1
- package/lib/commonjs/figma/IconButton.figma.js +1 -1
- package/lib/commonjs/figma/IconButton.figma.js.map +1 -1
- package/lib/commonjs/figma/Menu.Item.figma.js +52 -0
- package/lib/commonjs/figma/Menu.Item.figma.js.map +1 -0
- package/lib/commonjs/figma/Menu.figma.js +29 -0
- package/lib/commonjs/figma/Menu.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/icons.figma.batch.json +5 -0
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/forge-design/provider.js +35 -16
- package/lib/commonjs/providers/forge-design/provider.js.map +1 -1
- package/lib/commonjs/providers/toast/insets-container.js +4 -1
- package/lib/commonjs/providers/toast/insets-container.js.map +1 -1
- package/lib/commonjs/providers/toast/provider.js +127 -46
- package/lib/commonjs/providers/toast/provider.js.map +1 -1
- package/lib/commonjs/providers/toast/toast-item-renderer.js +2 -1
- package/lib/commonjs/providers/toast/toast-item-renderer.js.map +1 -1
- package/lib/commonjs/styles/constants.js +16 -0
- package/lib/commonjs/styles/constants.js.map +1 -0
- package/lib/commonjs/styles.css +1 -0
- package/lib/module/animation/hooks/index.js +3 -0
- package/lib/module/animation/hooks/index.js.map +1 -1
- 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/components/Accordion/index.js +282 -0
- package/lib/module/components/Accordion/index.js.map +1 -0
- package/lib/module/components/Accordion/styles.js +52 -0
- package/lib/module/components/Accordion/styles.js.map +1 -0
- package/lib/module/components/Alert/styles.js +1 -1
- package/lib/module/components/Alert/styles.js.map +1 -1
- package/lib/module/components/AlertDialog/index.js +16 -2
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/styles.js +1 -1
- package/lib/module/components/Avatar/styles.js.map +1 -1
- package/lib/module/components/Badge/styles.js +2 -2
- package/lib/module/components/Badge/styles.js.map +1 -1
- package/lib/module/components/BottomSheet/index.js +34 -3
- package/lib/module/components/BottomSheet/index.js.map +1 -1
- package/lib/module/components/BottomSheet/styles.js +5 -5
- 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 +2 -13
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +28 -28
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +3 -3
- package/lib/module/components/Calendar/CalendarMonthHeader.js +92 -0
- package/lib/module/components/Calendar/CalendarMonthHeader.js.map +1 -0
- package/lib/module/components/Calendar/CalendarYearPickerGrid.js +70 -0
- package/lib/module/components/Calendar/CalendarYearPickerGrid.js.map +1 -0
- package/lib/module/components/Calendar/flashCalendarAdapter.js +290 -0
- package/lib/module/components/Calendar/flashCalendarAdapter.js.map +1 -0
- package/lib/module/components/Calendar/index.js +145 -0
- package/lib/module/components/Calendar/index.js.map +1 -0
- package/lib/module/components/Calendar/styles.js +66 -0
- package/lib/module/components/Calendar/styles.js.map +1 -0
- package/lib/module/components/Card/index.js +26 -1
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +6 -2
- 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 +29 -4
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +23 -17
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +23 -3
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +53 -53
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/CurrencyInput/index.js +3 -1
- package/lib/module/components/CurrencyInput/index.js.map +1 -1
- package/lib/module/components/CurrencyInput/styles.js +2 -2
- package/lib/module/components/CurrencyInput/styles.js.map +1 -1
- package/lib/module/components/DateField/index.js +143 -0
- package/lib/module/components/DateField/index.js.map +1 -0
- package/lib/module/components/DateField/styles.js +30 -0
- package/lib/module/components/DateField/styles.js.map +1 -0
- package/lib/module/components/DatePicker/index.js +159 -0
- package/lib/module/components/DatePicker/index.js.map +1 -0
- package/lib/module/components/DateRangePicker/index.js +173 -0
- package/lib/module/components/DateRangePicker/index.js.map +1 -0
- package/lib/module/components/DateTimeField/index.js +92 -0
- package/lib/module/components/DateTimeField/index.js.map +1 -0
- package/lib/module/components/DateTimeList/index.js +176 -0
- package/lib/module/components/DateTimeList/index.js.map +1 -0
- package/lib/module/components/DateTimeList/styles.js +52 -0
- package/lib/module/components/DateTimeList/styles.js.map +1 -0
- package/lib/module/components/DateTimePicker/index.js +183 -0
- package/lib/module/components/DateTimePicker/index.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 +301 -36
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +14 -10
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/components/Divider/styles.js +1 -1
- package/lib/module/components/Divider/styles.js.map +1 -1
- package/lib/module/components/Field/styles.js +2 -2
- package/lib/module/components/Field/styles.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 +1 -1
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/IconButton/index.js +16 -4
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +24 -24
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +2 -2
- 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.map +1 -1
- package/lib/module/components/Link/styles.js +3 -6
- package/lib/module/components/Link/styles.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +2 -2
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/Menu/index.js +505 -0
- package/lib/module/components/Menu/index.js.map +1 -0
- package/lib/module/components/Menu/styles.js +96 -0
- package/lib/module/components/Menu/styles.js.map +1 -0
- package/lib/module/components/MonthCalendar/index.js +225 -0
- package/lib/module/components/MonthCalendar/index.js.map +1 -0
- package/lib/module/components/MonthPicker/index.js +159 -0
- package/lib/module/components/MonthPicker/index.js.map +1 -0
- package/lib/module/components/OtpInput/index.js +21 -9
- 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/styles.js +2 -2
- package/lib/module/components/ProgressBar/styles.js.map +1 -1
- package/lib/module/components/ProgressCircle/ProgressCircleRing.js +86 -0
- package/lib/module/components/ProgressCircle/ProgressCircleRing.js.map +1 -0
- package/lib/module/components/ProgressCircle/index.js +80 -0
- package/lib/module/components/ProgressCircle/index.js.map +1 -0
- package/lib/module/components/ProgressCircle/styles.js +46 -0
- package/lib/module/components/ProgressCircle/styles.js.map +1 -0
- package/lib/module/components/ProgressCircle/useProgressCircleColors.js +32 -0
- package/lib/module/components/ProgressCircle/useProgressCircleColors.js.map +1 -0
- package/lib/module/components/ProgressSegmented/index.js +2 -15
- 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/styles.js +2 -2
- package/lib/module/components/QuickActionButton/styles.js.map +1 -1
- package/lib/module/components/Radio/index.js +17 -2
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/Radio/styles.js +23 -8
- package/lib/module/components/Radio/styles.js.map +1 -1
- package/lib/module/components/RangeCalendar/index.js +161 -0
- package/lib/module/components/RangeCalendar/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 +64 -24
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +2 -41
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +3 -1
- package/lib/module/components/Skeleton/index.js.map +1 -1
- package/lib/module/components/Skeleton/styles.js +1 -1
- package/lib/module/components/Skeleton/styles.js.map +1 -1
- package/lib/module/components/Slider/getSliderPopupPosition.js +61 -0
- package/lib/module/components/Slider/getSliderPopupPosition.js.map +1 -0
- package/lib/module/components/Slider/index.js +402 -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/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/Table/index.js +385 -0
- package/lib/module/components/Table/index.js.map +1 -0
- package/lib/module/components/Table/index.web.js +325 -0
- package/lib/module/components/Table/index.web.js.map +1 -0
- package/lib/module/components/Table/styles.js +107 -0
- package/lib/module/components/Table/styles.js.map +1 -0
- package/lib/module/components/Table/types.js +4 -0
- package/lib/module/components/Table/types.js.map +1 -0
- package/lib/module/components/Table/useTableStyleContext.js +17 -0
- package/lib/module/components/Table/useTableStyleContext.js.map +1 -0
- package/lib/module/components/TablePagination/TablePaginationContext.js +25 -0
- package/lib/module/components/TablePagination/TablePaginationContext.js.map +1 -0
- package/lib/module/components/TablePagination/getTablePaginationItems.js +46 -0
- package/lib/module/components/TablePagination/getTablePaginationItems.js.map +1 -0
- package/lib/module/components/TablePagination/index.js +386 -0
- package/lib/module/components/TablePagination/index.js.map +1 -0
- package/lib/module/components/TablePagination/styles.js +9 -0
- package/lib/module/components/TablePagination/styles.js.map +1 -0
- 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 +1 -1
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Textarea/styles.js +2 -2
- package/lib/module/components/Textarea/styles.js.map +1 -1
- package/lib/module/components/Tile/styles.js +2 -2
- package/lib/module/components/Tile/styles.js.map +1 -1
- package/lib/module/components/Toast/animation.js +3 -1
- package/lib/module/components/Toast/animation.js.map +1 -1
- package/lib/module/components/Toast/hooks.js +1 -0
- package/lib/module/components/Toast/hooks.js.map +1 -1
- package/lib/module/components/Toast/index.js +18 -3
- package/lib/module/components/Toast/index.js.map +1 -1
- package/lib/module/components/Toast/styles.js +9 -9
- package/lib/module/components/Toast/styles.js.map +1 -1
- package/lib/module/components/Tooltip/index.js +102 -0
- package/lib/module/components/Tooltip/index.js.map +1 -0
- package/lib/module/components/Tooltip/styles.js +6 -0
- package/lib/module/components/Tooltip/styles.js.map +1 -0
- package/lib/module/components/index.js +22 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/picker/PickerTrigger.js +45 -0
- package/lib/module/components/picker/PickerTrigger.js.map +1 -0
- package/lib/module/components/picker/styles.js +12 -0
- package/lib/module/components/picker/styles.js.map +1 -0
- package/lib/module/components/picker/surfaces.js +142 -0
- package/lib/module/components/picker/surfaces.js.map +1 -0
- package/lib/module/figma/Accordion.figma.js +44 -0
- package/lib/module/figma/Accordion.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Title.figma.js +3 -3
- package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -1
- package/lib/module/figma/Card.Header.figma.js +5 -5
- package/lib/module/figma/Card.Header.figma.js.map +1 -1
- 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 +3 -0
- package/lib/module/figma/Card.figma.js.map +1 -1
- package/lib/module/figma/Chip.figma.js +2 -2
- package/lib/module/figma/Chip.figma.js.map +1 -1
- package/lib/module/figma/Dialog.Header.figma.js +6 -1
- package/lib/module/figma/Dialog.Header.figma.js.map +1 -1
- package/lib/module/figma/Dialog.Title.figma.js +3 -3
- package/lib/module/figma/Dialog.Title.figma.js.map +1 -1
- package/lib/module/figma/Field.Input.figma.js +1 -1
- 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 +1 -1
- package/lib/module/figma/Field.Textarea.figma.js +1 -1
- package/lib/module/figma/IconButton.figma.js +1 -1
- package/lib/module/figma/IconButton.figma.js.map +1 -1
- package/lib/module/figma/Menu.Item.figma.js +46 -0
- package/lib/module/figma/Menu.Item.figma.js.map +1 -0
- package/lib/module/figma/Menu.figma.js +23 -0
- package/lib/module/figma/Menu.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/icons.figma.batch.json +5 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/forge-design/provider.js +36 -17
- package/lib/module/providers/forge-design/provider.js.map +1 -1
- package/lib/module/providers/toast/insets-container.js +5 -2
- package/lib/module/providers/toast/insets-container.js.map +1 -1
- package/lib/module/providers/toast/provider.js +127 -46
- package/lib/module/providers/toast/provider.js.map +1 -1
- package/lib/module/providers/toast/toast-item-renderer.js +2 -1
- package/lib/module/providers/toast/toast-item-renderer.js.map +1 -1
- package/lib/module/styles/constants.js +12 -0
- package/lib/module/styles/constants.js.map +1 -0
- package/lib/module/styles.css +1 -0
- package/lib/typescript/animation/hooks/index.d.ts +3 -0
- package/lib/typescript/animation/hooks/index.d.ts.map +1 -1
- 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/components/Accordion/index.d.ts +90 -0
- package/lib/typescript/components/Accordion/index.d.ts.map +1 -0
- package/lib/typescript/components/Accordion/styles.d.ts +17 -0
- package/lib/typescript/components/Accordion/styles.d.ts.map +1 -0
- package/lib/typescript/components/Alert/styles.d.ts +1 -1
- package/lib/typescript/components/Alert/styles.d.ts.map +1 -1
- package/lib/typescript/components/AlertDialog/index.d.ts +8 -6
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/styles.d.ts +1 -1
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -1
- package/lib/typescript/components/Badge/styles.d.ts +1 -1
- package/lib/typescript/components/Badge/styles.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/index.d.ts +22 -2
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/styles.d.ts +5 -5
- 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 +40 -6
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +1 -1
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Calendar/CalendarMonthHeader.d.ts +14 -0
- package/lib/typescript/components/Calendar/CalendarMonthHeader.d.ts.map +1 -0
- package/lib/typescript/components/Calendar/CalendarYearPickerGrid.d.ts +12 -0
- package/lib/typescript/components/Calendar/CalendarYearPickerGrid.d.ts.map +1 -0
- package/lib/typescript/components/Calendar/flashCalendarAdapter.d.ts +18 -0
- package/lib/typescript/components/Calendar/flashCalendarAdapter.d.ts.map +1 -0
- package/lib/typescript/components/Calendar/index.d.ts +19 -0
- package/lib/typescript/components/Calendar/index.d.ts.map +1 -0
- package/lib/typescript/components/Calendar/styles.d.ts +23 -0
- package/lib/typescript/components/Calendar/styles.d.ts.map +1 -0
- package/lib/typescript/components/Card/index.d.ts +6 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts +2 -1
- 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 +2 -0
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +21 -1
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +6 -6
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/CurrencyInput/index.d.ts +1 -1
- package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -1
- package/lib/typescript/components/CurrencyInput/styles.d.ts +1 -1
- package/lib/typescript/components/CurrencyInput/styles.d.ts.map +1 -1
- package/lib/typescript/components/DateField/index.d.ts +43 -0
- package/lib/typescript/components/DateField/index.d.ts.map +1 -0
- package/lib/typescript/components/DateField/styles.d.ts +15 -0
- package/lib/typescript/components/DateField/styles.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/index.d.ts +40 -0
- package/lib/typescript/components/DatePicker/index.d.ts.map +1 -0
- package/lib/typescript/components/DateRangePicker/index.d.ts +45 -0
- package/lib/typescript/components/DateRangePicker/index.d.ts.map +1 -0
- package/lib/typescript/components/DateTimeField/index.d.ts +29 -0
- package/lib/typescript/components/DateTimeField/index.d.ts.map +1 -0
- package/lib/typescript/components/DateTimeList/index.d.ts +19 -0
- package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -0
- package/lib/typescript/components/DateTimeList/styles.d.ts +17 -0
- package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -0
- package/lib/typescript/components/DateTimePicker/index.d.ts +40 -0
- package/lib/typescript/components/DateTimePicker/index.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 +27 -3
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +4 -3
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
- package/lib/typescript/components/Divider/styles.d.ts +1 -1
- package/lib/typescript/components/Divider/styles.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/Heading/styles.d.ts +1 -1
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts +11 -1
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +3 -3
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +20 -2
- 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 +1 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/styles.d.ts +1 -1
- package/lib/typescript/components/Link/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/Menu/index.d.ts +119 -0
- package/lib/typescript/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/components/Menu/styles.d.ts +24 -0
- package/lib/typescript/components/Menu/styles.d.ts.map +1 -0
- package/lib/typescript/components/MonthCalendar/index.d.ts +29 -0
- package/lib/typescript/components/MonthCalendar/index.d.ts.map +1 -0
- package/lib/typescript/components/MonthPicker/index.d.ts +40 -0
- package/lib/typescript/components/MonthPicker/index.d.ts.map +1 -0
- 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/styles.d.ts +1 -1
- package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -1
- package/lib/typescript/components/ProgressCircle/ProgressCircleRing.d.ts +7 -0
- package/lib/typescript/components/ProgressCircle/ProgressCircleRing.d.ts.map +1 -0
- package/lib/typescript/components/ProgressCircle/index.d.ts +29 -0
- package/lib/typescript/components/ProgressCircle/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressCircle/styles.d.ts +23 -0
- package/lib/typescript/components/ProgressCircle/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressCircle/useProgressCircleColors.d.ts +6 -0
- package/lib/typescript/components/ProgressCircle/useProgressCircleColors.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts +0 -5
- 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/styles.d.ts +1 -1
- package/lib/typescript/components/QuickActionButton/styles.d.ts.map +1 -1
- 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/RangeCalendar/index.d.ts +19 -0
- package/lib/typescript/components/RangeCalendar/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 +11 -0
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +1 -8
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/styles.d.ts +1 -1
- package/lib/typescript/components/Skeleton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Slider/getSliderPopupPosition.d.ts +15 -0
- package/lib/typescript/components/Slider/getSliderPopupPosition.d.ts.map +1 -0
- package/lib/typescript/components/Slider/index.d.ts +66 -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/Switch/index.d.ts +10 -2
- 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/Table/index.d.ts +23 -0
- package/lib/typescript/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/components/Table/index.web.d.ts +22 -0
- package/lib/typescript/components/Table/index.web.d.ts.map +1 -0
- package/lib/typescript/components/Table/styles.d.ts +36 -0
- package/lib/typescript/components/Table/styles.d.ts.map +1 -0
- package/lib/typescript/components/Table/types.d.ts +51 -0
- package/lib/typescript/components/Table/types.d.ts.map +1 -0
- package/lib/typescript/components/Table/useTableStyleContext.d.ts +11 -0
- package/lib/typescript/components/Table/useTableStyleContext.d.ts.map +1 -0
- package/lib/typescript/components/TablePagination/TablePaginationContext.d.ts +20 -0
- package/lib/typescript/components/TablePagination/TablePaginationContext.d.ts.map +1 -0
- package/lib/typescript/components/TablePagination/getTablePaginationItems.d.ts +7 -0
- package/lib/typescript/components/TablePagination/getTablePaginationItems.d.ts.map +1 -0
- package/lib/typescript/components/TablePagination/index.d.ts +74 -0
- package/lib/typescript/components/TablePagination/index.d.ts.map +1 -0
- package/lib/typescript/components/TablePagination/styles.d.ts +8 -0
- package/lib/typescript/components/TablePagination/styles.d.ts.map +1 -0
- 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 +1 -1
- package/lib/typescript/components/Text/styles.d.ts.map +1 -1
- package/lib/typescript/components/Textarea/styles.d.ts +1 -1
- package/lib/typescript/components/Textarea/styles.d.ts.map +1 -1
- package/lib/typescript/components/Tile/styles.d.ts +1 -1
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/animation.d.ts.map +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts +2 -2
- package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
- package/lib/typescript/components/Toast/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/styles.d.ts +5 -5
- package/lib/typescript/components/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/types.d.ts +13 -8
- package/lib/typescript/components/Toast/types.d.ts.map +1 -1
- package/lib/typescript/components/Tooltip/index.d.ts +32 -0
- package/lib/typescript/components/Tooltip/index.d.ts.map +1 -0
- package/lib/typescript/components/Tooltip/styles.d.ts +5 -0
- package/lib/typescript/components/Tooltip/styles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +22 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/picker/PickerTrigger.d.ts +25 -0
- package/lib/typescript/components/picker/PickerTrigger.d.ts.map +1 -0
- package/lib/typescript/components/picker/styles.d.ts +4 -0
- package/lib/typescript/components/picker/styles.d.ts.map +1 -0
- package/lib/typescript/components/picker/surfaces.d.ts +28 -0
- package/lib/typescript/components/picker/surfaces.d.ts.map +1 -0
- package/lib/typescript/figma/Accordion.figma.d.ts +8 -0
- package/lib/typescript/figma/Accordion.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Button.figma.d.ts +1 -1
- package/lib/typescript/figma/Alert.Close.figma.d.ts +1 -1
- package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -1
- 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/Menu.Item.figma.d.ts +8 -0
- package/lib/typescript/figma/Menu.Item.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Menu.figma.d.ts +8 -0
- package/lib/typescript/figma/Menu.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/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/providers/forge-design/provider.d.ts.map +1 -1
- package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -1
- package/lib/typescript/providers/toast/lifecycle.context.d.ts +2 -2
- package/lib/typescript/providers/toast/lifecycle.context.d.ts.map +1 -1
- package/lib/typescript/providers/toast/provider.d.ts.map +1 -1
- package/lib/typescript/providers/toast/toast-item-renderer.d.ts.map +1 -1
- package/lib/typescript/providers/toast/types.d.ts +22 -8
- package/lib/typescript/providers/toast/types.d.ts.map +1 -1
- package/lib/typescript/styles/constants.d.ts +4 -0
- package/lib/typescript/styles/constants.d.ts.map +1 -0
- package/package.json +35 -19
- package/src/animation/hooks/index.ts +3 -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/components/Accordion/index.tsx +385 -0
- package/src/components/Accordion/styles.ts +82 -0
- package/src/components/Alert/styles.ts +1 -1
- package/src/components/AlertDialog/index.tsx +17 -4
- package/src/components/Avatar/styles.ts +1 -1
- package/src/components/Badge/styles.ts +2 -2
- package/src/components/BottomSheet/index.tsx +31 -1
- package/src/components/BottomSheet/styles.ts +5 -5
- 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 +44 -26
- package/src/components/Button/styles.ts +28 -28
- package/src/components/CLAUDE.md +3 -3
- package/src/components/Calendar/CalendarMonthHeader.tsx +124 -0
- package/src/components/Calendar/CalendarYearPickerGrid.tsx +101 -0
- package/src/components/Calendar/flashCalendarAdapter.ts +362 -0
- package/src/components/Calendar/index.tsx +151 -0
- package/src/components/Calendar/styles.ts +80 -0
- package/src/components/Card/index.tsx +31 -0
- package/src/components/Card/styles.ts +5 -2
- 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 +37 -2
- package/src/components/Checkbox/styles.ts +56 -24
- package/src/components/Chip/index.tsx +61 -3
- package/src/components/Chip/styles.ts +53 -53
- package/src/components/CurrencyInput/index.tsx +3 -1
- package/src/components/CurrencyInput/styles.ts +2 -2
- package/src/components/DateField/index.tsx +196 -0
- package/src/components/DateField/styles.ts +51 -0
- package/src/components/DatePicker/index.tsx +187 -0
- package/src/components/DateRangePicker/index.tsx +202 -0
- package/src/components/DateTimeField/index.tsx +128 -0
- package/src/components/DateTimeList/index.tsx +187 -0
- package/src/components/DateTimeList/styles.ts +59 -0
- package/src/components/DateTimePicker/index.tsx +233 -0
- package/src/components/Dialog/animation.ts +13 -0
- package/src/components/Dialog/index.tsx +391 -39
- package/src/components/Dialog/styles.ts +26 -9
- package/src/components/Divider/styles.ts +1 -1
- package/src/components/Field/styles.ts +2 -2
- package/src/components/Form/styles.ts +1 -1
- package/src/components/Heading/styles.ts +1 -1
- package/src/components/IconButton/index.tsx +35 -4
- package/src/components/IconButton/styles.ts +24 -24
- package/src/components/Input/index.tsx +20 -1
- package/src/components/Input/styles.ts +2 -2
- package/src/components/InsuranceDisclosure/index.tsx +59 -0
- package/src/components/InsuranceDisclosure/styles.ts +12 -0
- package/src/components/Link/index.tsx +1 -0
- package/src/components/Link/styles.ts +9 -12
- package/src/components/ListItem/styles.ts +2 -2
- package/src/components/Menu/index.tsx +667 -0
- package/src/components/Menu/styles.ts +153 -0
- package/src/components/MonthCalendar/index.tsx +252 -0
- package/src/components/MonthPicker/index.tsx +188 -0
- package/src/components/OtpInput/index.tsx +74 -42
- package/src/components/OtpInput/styles.ts +21 -14
- package/src/components/ProgressBar/styles.ts +2 -2
- package/src/components/ProgressCircle/ProgressCircleRing.tsx +105 -0
- package/src/components/ProgressCircle/index.tsx +110 -0
- package/src/components/ProgressCircle/styles.ts +47 -0
- package/src/components/ProgressCircle/useProgressCircleColors.ts +33 -0
- package/src/components/ProgressSegmented/index.tsx +2 -21
- package/src/components/ProgressSegmented/styles.ts +3 -3
- package/src/components/QuickActionButton/styles.ts +2 -2
- package/src/components/Radio/index.tsx +20 -0
- package/src/components/Radio/styles.ts +31 -5
- package/src/components/RangeCalendar/index.tsx +162 -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 +92 -26
- package/src/components/Select/styles.ts +2 -61
- package/src/components/Skeleton/index.tsx +2 -1
- package/src/components/Skeleton/styles.ts +1 -1
- package/src/components/Slider/getSliderPopupPosition.ts +70 -0
- package/src/components/Slider/index.tsx +520 -0
- package/src/components/Slider/styles.ts +147 -0
- package/src/components/Stack/styles.ts +1 -1
- package/src/components/Switch/index.tsx +10 -2
- package/src/components/Switch/styles.ts +1 -1
- package/src/components/Table/index.tsx +459 -0
- package/src/components/Table/index.web.tsx +395 -0
- package/src/components/Table/styles.ts +143 -0
- package/src/components/Table/types.ts +57 -0
- package/src/components/Table/useTableStyleContext.ts +14 -0
- package/src/components/TablePagination/TablePaginationContext.tsx +37 -0
- package/src/components/TablePagination/getTablePaginationItems.ts +62 -0
- package/src/components/TablePagination/index.tsx +498 -0
- package/src/components/TablePagination/styles.ts +15 -0
- package/src/components/Tabs/index.tsx +698 -0
- package/src/components/Tabs/styles.ts +340 -0
- package/src/components/Text/styles.ts +1 -1
- package/src/components/Textarea/styles.ts +2 -2
- package/src/components/Tile/styles.ts +2 -2
- package/src/components/Toast/animation.ts +19 -1
- package/src/components/Toast/hooks.ts +3 -2
- package/src/components/Toast/index.tsx +34 -3
- package/src/components/Toast/styles.ts +9 -9
- package/src/components/Toast/types.ts +14 -8
- package/src/components/Tooltip/index.tsx +149 -0
- package/src/components/Tooltip/styles.ts +16 -0
- package/src/components/index.ts +22 -0
- package/src/components/picker/PickerTrigger.tsx +65 -0
- package/src/components/picker/styles.ts +17 -0
- package/src/components/picker/surfaces.tsx +178 -0
- package/src/index.ts +2 -0
- package/src/providers/forge-design/provider.tsx +49 -21
- package/src/providers/toast/insets-container.tsx +3 -2
- package/src/providers/toast/lifecycle.context.tsx +2 -2
- package/src/providers/toast/provider.tsx +151 -52
- package/src/providers/toast/toast-item-renderer.tsx +5 -1
- package/src/providers/toast/types.ts +22 -8
- package/src/styles/constants.ts +10 -0
- package/src/styles.css +1 -0
- package/lib/commonjs/metro/withCdxMetroConfig.js +0 -13
- package/lib/commonjs/metro/withCdxMetroConfig.js.map +0 -1
- package/lib/commonjs/metro/withForgeMetroConfig.js +0 -24
- package/lib/commonjs/metro/withForgeMetroConfig.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 -159
- 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/metro/withCdxMetroConfig.js +0 -6
- package/lib/module/metro/withCdxMetroConfig.js.map +0 -1
- package/lib/module/metro/withForgeMetroConfig.js +0 -20
- package/lib/module/metro/withForgeMetroConfig.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 -155
- 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/metro/withCdxMetroConfig.d.ts +0 -5
- package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +0 -1
- package/lib/typescript/metro/withForgeMetroConfig.d.ts +0 -19
- package/lib/typescript/metro/withForgeMetroConfig.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 -123
- 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/metro/withCdxMetroConfig.ts +0 -4
- package/src/metro/withForgeMetroConfig.ts +0 -29
- package/src/styles/index.ts +0 -1
- package/src/styles/primitives.ts +0 -143
- package/src/utils/WrapStringChild.tsx +0 -25
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
|
+
import { Schedule } from '@cdx-ui/icons';
|
|
5
|
+
import { dataAttributes, DateTimePickerContext, DateTimePickerRoot as DateTimePickerRootPrimitive, mergeDataAttributes, useDateTimePickerContext } from '@cdx-ui/primitives';
|
|
6
|
+
import { clampDateTimeId, nowDateTimeId } from '@cdx-ui/formatters';
|
|
7
|
+
import { cn, ParentContext, useParentContext } from '@cdx-ui/utils';
|
|
8
|
+
import { Dialog } from '../Dialog';
|
|
9
|
+
import { Icon } from '../Icon';
|
|
10
|
+
import { DateTimeList } from '../DateTimeList';
|
|
11
|
+
import { PickerTrigger } from '../picker/PickerTrigger';
|
|
12
|
+
import { PickerBottomSheetSurface, PickerDialogSurface, PickerPopoverSurface } from '../picker/surfaces';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const DATE_FIELD_SCOPE = 'DATE_FIELD';
|
|
15
|
+
const DateTimePickerRoot = /*#__PURE__*/forwardRef(({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
style,
|
|
19
|
+
...props
|
|
20
|
+
}, ref) => {
|
|
21
|
+
const parent = useParentContext();
|
|
22
|
+
const ctx = useMemo(() => ({
|
|
23
|
+
...parent,
|
|
24
|
+
[DATE_FIELD_SCOPE]: {
|
|
25
|
+
variant: 'outline',
|
|
26
|
+
size: 'default',
|
|
27
|
+
fullWidth: true
|
|
28
|
+
}
|
|
29
|
+
}), [parent]);
|
|
30
|
+
return /*#__PURE__*/_jsx(ParentContext.Provider, {
|
|
31
|
+
value: ctx,
|
|
32
|
+
children: /*#__PURE__*/_jsx(DateTimePickerRootPrimitive, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: cn('gap-2', className),
|
|
35
|
+
style: style,
|
|
36
|
+
...props,
|
|
37
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
38
|
+
slot: 'date-time-picker'
|
|
39
|
+
})),
|
|
40
|
+
children: children
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
DateTimePickerRoot.displayName = 'DateTimePicker';
|
|
45
|
+
const DateTimePickerTrigger = /*#__PURE__*/forwardRef(({
|
|
46
|
+
accessibilityLabel,
|
|
47
|
+
...props
|
|
48
|
+
}, ref) => {
|
|
49
|
+
const {
|
|
50
|
+
open,
|
|
51
|
+
setOpen,
|
|
52
|
+
disabled,
|
|
53
|
+
triggerRef,
|
|
54
|
+
labels
|
|
55
|
+
} = useDateTimePickerContext();
|
|
56
|
+
return /*#__PURE__*/_jsx(PickerTrigger, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
open: open,
|
|
59
|
+
setOpen: setOpen,
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
triggerRef: triggerRef,
|
|
62
|
+
accessibilityLabel: accessibilityLabel ?? labels.openDateTimePicker,
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
DateTimePickerTrigger.displayName = 'DateTimePicker.Trigger';
|
|
67
|
+
const DateTimePickerTriggerIndicator = () => /*#__PURE__*/_jsx(Icon, {
|
|
68
|
+
as: Schedule,
|
|
69
|
+
className: "text-content-secondary"
|
|
70
|
+
});
|
|
71
|
+
DateTimePickerTriggerIndicator.displayName = 'DateTimePicker.TriggerIndicator';
|
|
72
|
+
const DateTimePickerList = /*#__PURE__*/forwardRef(({
|
|
73
|
+
...props
|
|
74
|
+
}, ref) => {
|
|
75
|
+
const {
|
|
76
|
+
value,
|
|
77
|
+
onValueChange,
|
|
78
|
+
draftValue,
|
|
79
|
+
setDraftValue,
|
|
80
|
+
open,
|
|
81
|
+
granularity,
|
|
82
|
+
locale,
|
|
83
|
+
hour12,
|
|
84
|
+
minValue,
|
|
85
|
+
maxValue
|
|
86
|
+
} = useDateTimePickerContext();
|
|
87
|
+
const userInteractedRef = useRef(false);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (open) {
|
|
90
|
+
userInteractedRef.current = false;
|
|
91
|
+
}
|
|
92
|
+
}, [open]);
|
|
93
|
+
const handleUserInteract = useCallback(() => {
|
|
94
|
+
userInteractedRef.current = true;
|
|
95
|
+
}, []);
|
|
96
|
+
const handleValueChange = useCallback(next => {
|
|
97
|
+
setDraftValue(next);
|
|
98
|
+
if (!open) {
|
|
99
|
+
onValueChange?.(next);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (value !== undefined || userInteractedRef.current) {
|
|
103
|
+
onValueChange?.(next);
|
|
104
|
+
}
|
|
105
|
+
}, [onValueChange, open, setDraftValue, value]);
|
|
106
|
+
const listValue = open ? draftValue ?? clampDateTimeId(value ?? nowDateTimeId({
|
|
107
|
+
granularity
|
|
108
|
+
}), {
|
|
109
|
+
min: minValue,
|
|
110
|
+
max: maxValue
|
|
111
|
+
}) : value;
|
|
112
|
+
return /*#__PURE__*/_jsx(DateTimeList, {
|
|
113
|
+
ref: ref,
|
|
114
|
+
value: listValue,
|
|
115
|
+
onValueChange: handleValueChange,
|
|
116
|
+
onUserInteract: handleUserInteract,
|
|
117
|
+
granularity: granularity,
|
|
118
|
+
locale: locale,
|
|
119
|
+
hour12: hour12,
|
|
120
|
+
minValue: minValue,
|
|
121
|
+
maxValue: maxValue,
|
|
122
|
+
...props
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
DateTimePickerList.displayName = 'DateTimePicker.List';
|
|
126
|
+
function DateTimePickerDialog({
|
|
127
|
+
children
|
|
128
|
+
}) {
|
|
129
|
+
const ctx = useDateTimePickerContext();
|
|
130
|
+
return /*#__PURE__*/_jsx(PickerDialogSurface, {
|
|
131
|
+
open: ctx.open,
|
|
132
|
+
setOpen: ctx.setOpen,
|
|
133
|
+
registerSurface: ctx.registerSurface,
|
|
134
|
+
children: /*#__PURE__*/_jsx(Dialog.Popup, {
|
|
135
|
+
className: "p-4",
|
|
136
|
+
children: /*#__PURE__*/_jsx(DateTimePickerContext.Provider, {
|
|
137
|
+
value: ctx,
|
|
138
|
+
children: children
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function DateTimePickerBottomSheet({
|
|
144
|
+
children
|
|
145
|
+
}) {
|
|
146
|
+
const ctx = useDateTimePickerContext();
|
|
147
|
+
return /*#__PURE__*/_jsx(PickerBottomSheetSurface, {
|
|
148
|
+
open: ctx.open,
|
|
149
|
+
setOpen: ctx.setOpen,
|
|
150
|
+
registerSurface: ctx.registerSurface,
|
|
151
|
+
children: /*#__PURE__*/_jsx(DateTimePickerContext.Provider, {
|
|
152
|
+
value: ctx,
|
|
153
|
+
children: children
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function DateTimePickerPopover({
|
|
158
|
+
children,
|
|
159
|
+
className
|
|
160
|
+
}) {
|
|
161
|
+
const ctx = useDateTimePickerContext();
|
|
162
|
+
return /*#__PURE__*/_jsx(PickerPopoverSurface, {
|
|
163
|
+
open: ctx.open,
|
|
164
|
+
setOpen: ctx.setOpen,
|
|
165
|
+
registerSurface: ctx.registerSurface,
|
|
166
|
+
anchorRef: ctx.anchorRef,
|
|
167
|
+
triggerRef: ctx.triggerRef,
|
|
168
|
+
className: className,
|
|
169
|
+
children: /*#__PURE__*/_jsx(DateTimePickerContext.Provider, {
|
|
170
|
+
value: ctx,
|
|
171
|
+
children: children
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
export const DateTimePicker = Object.assign(DateTimePickerRoot, {
|
|
176
|
+
Trigger: DateTimePickerTrigger,
|
|
177
|
+
TriggerIndicator: DateTimePickerTriggerIndicator,
|
|
178
|
+
List: DateTimePickerList,
|
|
179
|
+
Popover: DateTimePickerPopover,
|
|
180
|
+
Dialog: DateTimePickerDialog,
|
|
181
|
+
BottomSheet: DateTimePickerBottomSheet
|
|
182
|
+
});
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useCallback","useEffect","useMemo","useRef","Schedule","dataAttributes","DateTimePickerContext","DateTimePickerRoot","DateTimePickerRootPrimitive","mergeDataAttributes","useDateTimePickerContext","clampDateTimeId","nowDateTimeId","cn","ParentContext","useParentContext","Dialog","Icon","DateTimeList","PickerTrigger","PickerBottomSheetSurface","PickerDialogSurface","PickerPopoverSurface","jsx","_jsx","DATE_FIELD_SCOPE","className","children","style","props","ref","parent","ctx","variant","size","fullWidth","Provider","value","slot","displayName","DateTimePickerTrigger","accessibilityLabel","open","setOpen","disabled","triggerRef","labels","openDateTimePicker","DateTimePickerTriggerIndicator","as","DateTimePickerList","onValueChange","draftValue","setDraftValue","granularity","locale","hour12","minValue","maxValue","userInteractedRef","current","handleUserInteract","handleValueChange","next","undefined","listValue","min","max","onUserInteract","DateTimePickerDialog","registerSurface","Popup","DateTimePickerBottomSheet","DateTimePickerPopover","anchorRef","DateTimePicker","Object","assign","Trigger","TriggerIndicator","List","Popover","BottomSheet"],"sourceRoot":"../../../../src","sources":["components/DateTimePicker/index.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","DialogAnimationProvider","useDialogAnimation","strict"],"sourceRoot":"../../../../src","sources":["components/Dialog/animation.ts"],"mappings":";;AACA,SAASA,aAAa,QAAQ,eAAe;AAQ7C,OAAO,MAAM,CAACC,uBAAuB,EAAEC,kBAAkB,CAAC,GACxDF,aAAa,CAA8B,wBAAwB,EAAE;EACnEG,MAAM,EAAE;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef, useMemo } from 'react';
|
|
4
|
-
import { Text, View } from 'react-native';
|
|
3
|
+
import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { KeyboardAvoidingView, Platform, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { GestureDetector } from 'react-native-gesture-handler';
|
|
6
|
+
import Animated, { useSharedValue } from 'react-native-reanimated';
|
|
5
7
|
import { CheckCircle, Close as CloseIcon, EmergencyHome, Warning } from '@cdx-ui/icons';
|
|
6
|
-
import { DialogClose as DialogClosePrimitive,
|
|
7
|
-
import { cn, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
|
|
8
|
+
import { DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogPortal as DialogPortalPrimitive, DialogRoot as DialogRootPrimitive, DialogTrigger as DialogTriggerPrimitive, FullWindowOverlay, MODAL_OVERLAY_Z_INDEX, Slot, dataAttributes, mergeDataAttributes, useDialog } from '@cdx-ui/primitives';
|
|
9
|
+
import { cn, mergeRefs, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
|
|
10
|
+
import { usePopupDialogContentAnimation, usePopupOverlayAnimation, usePopupRootAnimation } from '../../animation';
|
|
11
|
+
import { AnimationSettingsProvider, useAnimationSettings } from '../../providers/animation-settings';
|
|
8
12
|
import { Icon } from '../Icon';
|
|
9
|
-
import {
|
|
13
|
+
import { DialogAnimationProvider, useDialogAnimation } from './animation';
|
|
14
|
+
import { dialogCloseIconVariants, dialogCloseVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogPopupVariants, dialogPortalVariants, dialogTextVariants, dialogTitleIconVariants, dialogTitleVariants } from './styles';
|
|
10
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
16
|
export { useDialog } from '@cdx-ui/primitives';
|
|
12
|
-
|
|
17
|
+
const IS_WEB = Platform.OS === 'web';
|
|
18
|
+
const WEB_TRANSITION_SAFETY_MS = 300;
|
|
13
19
|
// =============================================================================
|
|
14
20
|
// STYLE CONTEXT
|
|
15
21
|
// =============================================================================
|
|
@@ -17,6 +23,12 @@ export { useDialog } from '@cdx-ui/primitives';
|
|
|
17
23
|
const SCOPE = 'DIALOG';
|
|
18
24
|
const useDialogStyleContext = () => useStyleContext(SCOPE);
|
|
19
25
|
|
|
26
|
+
// =============================================================================
|
|
27
|
+
// ANIMATED PRIMITIVES
|
|
28
|
+
// =============================================================================
|
|
29
|
+
|
|
30
|
+
const AnimatedOverlay = Animated.createAnimatedComponent(DialogOverlayPrimitive);
|
|
31
|
+
|
|
20
32
|
// =============================================================================
|
|
21
33
|
// STYLED ROOT
|
|
22
34
|
// =============================================================================
|
|
@@ -24,6 +36,7 @@ const useDialogStyleContext = () => useStyleContext(SCOPE);
|
|
|
24
36
|
const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
25
37
|
size = 'md',
|
|
26
38
|
fullBleed = false,
|
|
39
|
+
animation,
|
|
27
40
|
className,
|
|
28
41
|
children,
|
|
29
42
|
style,
|
|
@@ -37,17 +50,39 @@ const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
|
37
50
|
fullBleed
|
|
38
51
|
}
|
|
39
52
|
}), [parent, size, fullBleed]);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
const {
|
|
54
|
+
progress,
|
|
55
|
+
isDragging,
|
|
56
|
+
isGestureReleaseAnimationRunning,
|
|
57
|
+
isAllAnimationsDisabled
|
|
58
|
+
} = usePopupRootAnimation({
|
|
59
|
+
animation
|
|
60
|
+
});
|
|
61
|
+
const animationContextValue = useMemo(() => ({
|
|
62
|
+
progress,
|
|
63
|
+
isDragging,
|
|
64
|
+
isGestureReleaseAnimationRunning
|
|
65
|
+
}), [progress, isDragging, isGestureReleaseAnimationRunning]);
|
|
66
|
+
const animationSettingsContextValue = useMemo(() => ({
|
|
67
|
+
isAllAnimationsDisabled
|
|
68
|
+
}), [isAllAnimationsDisabled]);
|
|
69
|
+
return /*#__PURE__*/_jsx(AnimationSettingsProvider, {
|
|
70
|
+
value: animationSettingsContextValue,
|
|
71
|
+
children: /*#__PURE__*/_jsx(DialogAnimationProvider, {
|
|
72
|
+
value: animationContextValue,
|
|
73
|
+
children: /*#__PURE__*/_jsx(ParentContext.Provider, {
|
|
74
|
+
value: ctx,
|
|
75
|
+
children: /*#__PURE__*/_jsx(DialogRootPrimitive, {
|
|
76
|
+
ref: ref,
|
|
77
|
+
className: className,
|
|
78
|
+
style: style,
|
|
79
|
+
...props,
|
|
80
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
81
|
+
slot: 'dialog'
|
|
82
|
+
})),
|
|
83
|
+
children: children
|
|
84
|
+
})
|
|
85
|
+
})
|
|
51
86
|
})
|
|
52
87
|
});
|
|
53
88
|
});
|
|
@@ -75,7 +110,7 @@ const DialogTrigger = /*#__PURE__*/forwardRef(({
|
|
|
75
110
|
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
76
111
|
|
|
77
112
|
// =============================================================================
|
|
78
|
-
// STYLED POPUP
|
|
113
|
+
// STYLED POPUP (portal + overlay + content composition)
|
|
79
114
|
// =============================================================================
|
|
80
115
|
|
|
81
116
|
const DialogPopup = /*#__PURE__*/forwardRef(({
|
|
@@ -83,26 +118,221 @@ const DialogPopup = /*#__PURE__*/forwardRef(({
|
|
|
83
118
|
className,
|
|
84
119
|
children,
|
|
85
120
|
style,
|
|
121
|
+
forceMount = false,
|
|
122
|
+
avoidKeyboard = true,
|
|
123
|
+
keyboardVerticalOffset = 0,
|
|
124
|
+
disableFullWindowOverlay = false,
|
|
125
|
+
isSwipeable = true,
|
|
126
|
+
zIndex = MODAL_OVERLAY_Z_INDEX,
|
|
86
127
|
...props
|
|
87
128
|
}, ref) => {
|
|
88
129
|
const {
|
|
89
130
|
size: contextSize
|
|
90
131
|
} = useDialogStyleContext();
|
|
91
132
|
const size = sizeProp ?? contextSize;
|
|
92
|
-
const
|
|
133
|
+
const {
|
|
134
|
+
open,
|
|
135
|
+
onOpenChange
|
|
136
|
+
} = useDialog();
|
|
137
|
+
const parentContext = useParentContext();
|
|
138
|
+
const animationContext = useDialogAnimation();
|
|
139
|
+
const parentAnimationSettings = useAnimationSettings();
|
|
140
|
+
const fallbackProgress = useSharedValue(0);
|
|
141
|
+
const fallbackIsDragging = useSharedValue(false);
|
|
142
|
+
const fallbackIsGestureReleaseAnimationRunning = useSharedValue(false);
|
|
143
|
+
const progress = animationContext?.progress ?? fallbackProgress;
|
|
144
|
+
const isDragging = animationContext?.isDragging ?? fallbackIsDragging;
|
|
145
|
+
const isGestureReleaseAnimationRunning = animationContext?.isGestureReleaseAnimationRunning ?? fallbackIsGestureReleaseAnimationRunning;
|
|
146
|
+
const {
|
|
147
|
+
rContainerStyle,
|
|
148
|
+
entering: overlayEntering,
|
|
149
|
+
exiting: overlayExiting
|
|
150
|
+
} = usePopupOverlayAnimation({
|
|
151
|
+
progress,
|
|
152
|
+
isDragging,
|
|
153
|
+
isGestureReleaseAnimationRunning
|
|
154
|
+
});
|
|
155
|
+
const {
|
|
156
|
+
contentY,
|
|
157
|
+
contentHeight,
|
|
158
|
+
panGesture,
|
|
159
|
+
rDragContainerStyle,
|
|
160
|
+
entering: contentEntering,
|
|
161
|
+
exiting: contentExiting
|
|
162
|
+
} = usePopupDialogContentAnimation({
|
|
163
|
+
isOpen: open,
|
|
164
|
+
progress,
|
|
165
|
+
isDragging,
|
|
166
|
+
isGestureReleaseAnimationRunning,
|
|
167
|
+
onOpenChange,
|
|
168
|
+
isSwipeable
|
|
169
|
+
});
|
|
170
|
+
const dragContainerRef = useRef(null);
|
|
171
|
+
useLayoutEffect(() => {
|
|
172
|
+
if (!open || IS_WEB) return;
|
|
173
|
+
dragContainerRef.current?.measure((_x, _y, _width, height, _pageX, pageY) => {
|
|
174
|
+
contentY.set(pageY);
|
|
175
|
+
contentHeight.set(height);
|
|
176
|
+
});
|
|
177
|
+
}, [open, contentY, contentHeight]);
|
|
178
|
+
|
|
179
|
+
// ---- Web enter/exit lifecycle ----
|
|
180
|
+
// Mirrors the Toast pattern: mount → 'entering' → (rAF) → 'open' → (close)
|
|
181
|
+
// → 'closed' → (transitionend) → unmount.
|
|
182
|
+
//
|
|
183
|
+
// Critical: `isExiting` is derived synchronously (via ref tracking the previous
|
|
184
|
+
// `open` value) so the component stays mounted in the SAME render that sees
|
|
185
|
+
// `open` go false — if we used useEffect the component would return null before
|
|
186
|
+
// the effect fires.
|
|
187
|
+
//
|
|
188
|
+
// The transitionend listener targets the popup element (via popupRef) instead of
|
|
189
|
+
// the portal wrapper. CSS exit transitions live on the overlay and popup children,
|
|
190
|
+
// not the wrapper — listening on the wrapper would unmount on the first bubbled
|
|
191
|
+
// event, potentially cutting the other child's animation short.
|
|
192
|
+
const wrapperRef = useRef(null);
|
|
193
|
+
const popupRef = useRef(null);
|
|
194
|
+
const prevOpenRef = useRef(open);
|
|
195
|
+
const [isExiting, setIsExiting] = useState(false);
|
|
196
|
+
const [webState, setWebState] = useState(open ? 'entering' : 'closed');
|
|
197
|
+
|
|
198
|
+
// Detect open → false transition synchronously during render
|
|
199
|
+
if (IS_WEB && prevOpenRef.current && !open && !isExiting) {
|
|
200
|
+
setIsExiting(true);
|
|
201
|
+
setWebState('closed');
|
|
202
|
+
}
|
|
203
|
+
// Detect closed → open transition synchronously during render
|
|
204
|
+
if (IS_WEB && !prevOpenRef.current && open) {
|
|
205
|
+
setIsExiting(false);
|
|
206
|
+
setWebState('entering');
|
|
207
|
+
}
|
|
208
|
+
prevOpenRef.current = open;
|
|
209
|
+
|
|
210
|
+
// Entrance: commit 'entering' on first paint, then transition to 'open'
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
if (!IS_WEB || !open) return;
|
|
213
|
+
const raf = requestAnimationFrame(() => {
|
|
214
|
+
setWebState('open');
|
|
215
|
+
});
|
|
216
|
+
return () => cancelAnimationFrame(raf);
|
|
217
|
+
}, [open]);
|
|
218
|
+
|
|
219
|
+
// Exit: wait for CSS transition to finish, then unmount.
|
|
220
|
+
// Listens on the popup element directly — its exit transitions (opacity +
|
|
221
|
+
// transform) are at least as long as the overlay's, so when the popup
|
|
222
|
+
// finishes both children are done animating.
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
if (!IS_WEB || !isExiting) return;
|
|
225
|
+
const node = popupRef.current;
|
|
226
|
+
let done = false;
|
|
227
|
+
const finish = () => {
|
|
228
|
+
if (done) return;
|
|
229
|
+
done = true;
|
|
230
|
+
setIsExiting(false);
|
|
231
|
+
};
|
|
232
|
+
const safetyTimer = setTimeout(finish, WEB_TRANSITION_SAFETY_MS);
|
|
233
|
+
if (!node || typeof node.addEventListener !== 'function') {
|
|
234
|
+
return () => {
|
|
235
|
+
clearTimeout(safetyTimer);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
const handler = event => {
|
|
239
|
+
if (event.target !== node) return;
|
|
240
|
+
const propertyName = event.propertyName ?? '';
|
|
241
|
+
if (propertyName === 'opacity' || propertyName === 'transform') {
|
|
242
|
+
finish();
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
node.addEventListener('transitionend', handler);
|
|
246
|
+
return () => {
|
|
247
|
+
clearTimeout(safetyTimer);
|
|
248
|
+
node.removeEventListener('transitionend', handler);
|
|
249
|
+
};
|
|
250
|
+
}, [isExiting]);
|
|
251
|
+
const dataState = webState;
|
|
252
|
+
const shouldMount = IS_WEB ? open || isExiting : open;
|
|
253
|
+
if (!forceMount && !shouldMount) {
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
const portalClassName = cn(dialogPortalVariants());
|
|
257
|
+
const overlayClassName = cn(dialogOverlayVariants());
|
|
258
|
+
const popupClassName = cn(dialogPopupVariants({
|
|
93
259
|
size
|
|
94
260
|
}), className);
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
261
|
+
const keyboardBehavior = avoidKeyboard ? Platform.select({
|
|
262
|
+
ios: 'padding',
|
|
263
|
+
default: 'height'
|
|
264
|
+
}) : undefined;
|
|
265
|
+
return /*#__PURE__*/_jsx(DialogPortalPrimitive, {
|
|
266
|
+
forceMount: true,
|
|
267
|
+
children: /*#__PURE__*/_jsx(ParentContext.Provider, {
|
|
268
|
+
value: parentContext,
|
|
269
|
+
children: /*#__PURE__*/_jsx(AnimationSettingsProvider, {
|
|
270
|
+
value: parentAnimationSettings,
|
|
271
|
+
children: /*#__PURE__*/_jsx(DialogAnimationProvider, {
|
|
272
|
+
value: animationContext,
|
|
273
|
+
children: /*#__PURE__*/_jsx(FullWindowOverlay, {
|
|
274
|
+
disableFullWindowOverlay: disableFullWindowOverlay,
|
|
275
|
+
unstable_accessibilityContainerViewIsModal: true,
|
|
276
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
277
|
+
ref: wrapperRef,
|
|
278
|
+
className: portalClassName,
|
|
279
|
+
style: {
|
|
280
|
+
zIndex
|
|
281
|
+
},
|
|
282
|
+
pointerEvents: "box-none",
|
|
283
|
+
...(IS_WEB ? dataAttributes({
|
|
284
|
+
state: dataState
|
|
285
|
+
}) : undefined),
|
|
286
|
+
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
287
|
+
entering: overlayEntering,
|
|
288
|
+
exiting: overlayExiting,
|
|
289
|
+
style: StyleSheet.absoluteFill,
|
|
290
|
+
children: /*#__PURE__*/_jsx(AnimatedOverlay, {
|
|
291
|
+
forceMount: true,
|
|
292
|
+
className: overlayClassName,
|
|
293
|
+
style: IS_WEB ? undefined : rContainerStyle,
|
|
294
|
+
...(IS_WEB ? dataAttributes({
|
|
295
|
+
state: dataState
|
|
296
|
+
}) : undefined)
|
|
297
|
+
})
|
|
298
|
+
}), /*#__PURE__*/_jsx(GestureDetector, {
|
|
299
|
+
gesture: panGesture,
|
|
300
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
301
|
+
ref: dragContainerRef,
|
|
302
|
+
style: internalStyles.fill,
|
|
303
|
+
pointerEvents: "box-none",
|
|
304
|
+
entering: contentEntering,
|
|
305
|
+
exiting: contentExiting,
|
|
306
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
307
|
+
style: IS_WEB ? internalStyles.fill : [internalStyles.fill, rDragContainerStyle],
|
|
308
|
+
pointerEvents: "box-none",
|
|
309
|
+
children: /*#__PURE__*/_jsx(KeyboardAvoidingView, {
|
|
310
|
+
style: internalStyles.center,
|
|
311
|
+
pointerEvents: "box-none",
|
|
312
|
+
behavior: keyboardBehavior,
|
|
313
|
+
keyboardVerticalOffset: keyboardVerticalOffset,
|
|
314
|
+
children: /*#__PURE__*/_jsx(DialogContentPrimitive, {
|
|
315
|
+
ref: mergeRefs(ref, popupRef),
|
|
316
|
+
forceMount: true,
|
|
317
|
+
className: popupClassName,
|
|
318
|
+
style: style,
|
|
319
|
+
...props,
|
|
320
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
321
|
+
slot: 'dialog-popup'
|
|
322
|
+
}), IS_WEB ? dataAttributes({
|
|
323
|
+
state: dataState
|
|
324
|
+
}) : undefined),
|
|
325
|
+
children: children
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
})
|
|
329
|
+
})
|
|
330
|
+
})]
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
})
|
|
334
|
+
})
|
|
335
|
+
})
|
|
106
336
|
});
|
|
107
337
|
});
|
|
108
338
|
DialogPopup.displayName = 'Dialog.Popup';
|
|
@@ -134,26 +364,45 @@ const DialogHeader = /*#__PURE__*/forwardRef(({
|
|
|
134
364
|
DialogHeader.displayName = 'Dialog.Header';
|
|
135
365
|
|
|
136
366
|
// =============================================================================
|
|
137
|
-
// STYLED TITLE (styled-only sub-slot with
|
|
367
|
+
// STYLED TITLE (styled-only sub-slot with severity variants)
|
|
138
368
|
// =============================================================================
|
|
139
369
|
|
|
140
|
-
|
|
370
|
+
/** @deprecated Use `severity` prop instead of `appearance`. */
|
|
371
|
+
|
|
372
|
+
let hasWarnedDialogAppearanceProp = false;
|
|
373
|
+
let hasWarnedDialogDefaultSeverity = false;
|
|
374
|
+
const SEVERITY_ICON_MAP = {
|
|
141
375
|
danger: EmergencyHome,
|
|
142
376
|
warning: Warning,
|
|
143
377
|
success: CheckCircle
|
|
144
378
|
};
|
|
145
379
|
const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
146
380
|
asChild,
|
|
147
|
-
|
|
381
|
+
severity: severityProp,
|
|
382
|
+
appearance,
|
|
148
383
|
className,
|
|
149
384
|
children,
|
|
150
385
|
style,
|
|
151
386
|
...props
|
|
152
387
|
}, ref) => {
|
|
388
|
+
useEffect(() => {
|
|
389
|
+
if (__DEV__ && appearance !== undefined && !hasWarnedDialogAppearanceProp) {
|
|
390
|
+
hasWarnedDialogAppearanceProp = true;
|
|
391
|
+
console.warn('[Dialog.Title] The `appearance` prop is deprecated and will be removed in a future major release. Use `severity` instead.');
|
|
392
|
+
}
|
|
393
|
+
}, [appearance]);
|
|
394
|
+
const rawSeverity = severityProp ?? appearance ?? 'neutral';
|
|
395
|
+
useEffect(() => {
|
|
396
|
+
if (__DEV__ && rawSeverity === 'default' && !hasWarnedDialogDefaultSeverity) {
|
|
397
|
+
hasWarnedDialogDefaultSeverity = true;
|
|
398
|
+
console.warn('[Dialog.Title] The `default` severity value is deprecated and will be removed in a future major release. Use `neutral` instead.');
|
|
399
|
+
}
|
|
400
|
+
}, [rawSeverity]);
|
|
401
|
+
const severity = rawSeverity === 'default' ? 'neutral' : rawSeverity;
|
|
153
402
|
const computedClassName = cn(dialogTitleVariants({
|
|
154
|
-
|
|
403
|
+
severity
|
|
155
404
|
}), className);
|
|
156
|
-
const IconComponent =
|
|
405
|
+
const IconComponent = severity && severity in SEVERITY_ICON_MAP ? SEVERITY_ICON_MAP[severity] : null;
|
|
157
406
|
const Comp = asChild ? Slot : Text;
|
|
158
407
|
const titleElement = /*#__PURE__*/_jsx(Comp, {
|
|
159
408
|
ref: ref,
|
|
@@ -171,7 +420,7 @@ const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
|
171
420
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
172
421
|
as: IconComponent,
|
|
173
422
|
className: dialogTitleIconVariants({
|
|
174
|
-
|
|
423
|
+
severity
|
|
175
424
|
})
|
|
176
425
|
}), titleElement]
|
|
177
426
|
});
|
|
@@ -339,4 +588,20 @@ export const Dialog = Object.assign(DialogRoot, {
|
|
|
339
588
|
Footer: DialogFooter,
|
|
340
589
|
Close: DialogClose
|
|
341
590
|
});
|
|
591
|
+
export { MODAL_OVERLAY_Z_INDEX };
|
|
592
|
+
|
|
593
|
+
// =============================================================================
|
|
594
|
+
// INTERNAL STYLES
|
|
595
|
+
// =============================================================================
|
|
596
|
+
|
|
597
|
+
const internalStyles = StyleSheet.create({
|
|
598
|
+
fill: {
|
|
599
|
+
flex: 1
|
|
600
|
+
},
|
|
601
|
+
center: {
|
|
602
|
+
flex: 1,
|
|
603
|
+
alignItems: 'center',
|
|
604
|
+
justifyContent: 'center'
|
|
605
|
+
}
|
|
606
|
+
});
|
|
342
607
|
//# sourceMappingURL=index.js.map
|