@cdx-ui/components 0.0.1-beta.99 → 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,520 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Children,
|
|
3
|
+
cloneElement,
|
|
4
|
+
forwardRef,
|
|
5
|
+
isValidElement,
|
|
6
|
+
useCallback,
|
|
7
|
+
useId,
|
|
8
|
+
useMemo,
|
|
9
|
+
useRef,
|
|
10
|
+
useState,
|
|
11
|
+
type ReactElement,
|
|
12
|
+
type ReactNode,
|
|
13
|
+
} from 'react';
|
|
14
|
+
import { Platform, StyleSheet, Text, View, type ViewProps, type ViewStyle } from 'react-native';
|
|
15
|
+
import {
|
|
16
|
+
SliderRoot as SliderRootPrimitive,
|
|
17
|
+
SliderRail as SliderRailPrimitive,
|
|
18
|
+
SliderThumb as SliderThumbPrimitive,
|
|
19
|
+
Slot,
|
|
20
|
+
Portal,
|
|
21
|
+
createPortalFn,
|
|
22
|
+
useAnchoredOverlay,
|
|
23
|
+
dataAttributes,
|
|
24
|
+
getFillExtent,
|
|
25
|
+
getMarkerPositionStyle,
|
|
26
|
+
getMarkerStepValues,
|
|
27
|
+
mergeDataAttributes,
|
|
28
|
+
useSliderContext,
|
|
29
|
+
useSliderThumbContext,
|
|
30
|
+
valueToPercent,
|
|
31
|
+
type ISliderProps,
|
|
32
|
+
type ISliderRailProps,
|
|
33
|
+
type ISliderThumbProps,
|
|
34
|
+
type SliderOrientation,
|
|
35
|
+
type SliderRangeValueProps,
|
|
36
|
+
type SliderSingleValueProps,
|
|
37
|
+
} from '@cdx-ui/primitives';
|
|
38
|
+
import {
|
|
39
|
+
cn,
|
|
40
|
+
composeEventHandlers,
|
|
41
|
+
mergeRefs,
|
|
42
|
+
ParentContext,
|
|
43
|
+
useParentContext,
|
|
44
|
+
useStyleContext,
|
|
45
|
+
} from '@cdx-ui/utils';
|
|
46
|
+
import {
|
|
47
|
+
sliderMarkerVariants,
|
|
48
|
+
sliderPopupBaseVariants,
|
|
49
|
+
sliderRootVariants,
|
|
50
|
+
sliderRailVariants,
|
|
51
|
+
sliderRailColorVariants,
|
|
52
|
+
sliderTrackColorVariants,
|
|
53
|
+
sliderTrackVariants,
|
|
54
|
+
sliderThumbVariants,
|
|
55
|
+
type SliderColor,
|
|
56
|
+
type SliderVariantProps,
|
|
57
|
+
} from './styles';
|
|
58
|
+
import {
|
|
59
|
+
getSliderPopupPortalStyle,
|
|
60
|
+
SLIDER_POPUP_OFFSET,
|
|
61
|
+
SLIDER_POPUP_Z_INDEX,
|
|
62
|
+
type SliderPopupPortalOrigin,
|
|
63
|
+
} from './getSliderPopupPosition';
|
|
64
|
+
|
|
65
|
+
const SCOPE = 'SLIDER';
|
|
66
|
+
|
|
67
|
+
const useSliderStyleContext = () => {
|
|
68
|
+
const { color, orientation } = useStyleContext(SCOPE) as Pick<
|
|
69
|
+
SliderVariantProps,
|
|
70
|
+
'color' | 'orientation'
|
|
71
|
+
>;
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
color,
|
|
75
|
+
orientation: orientation ?? 'horizontal',
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export interface SliderProps extends Omit<ISliderProps, 'orientation'> {
|
|
80
|
+
className?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Semantic color token for the track fill and thumb border.
|
|
83
|
+
* @default `action`
|
|
84
|
+
*/
|
|
85
|
+
color?: SliderColor;
|
|
86
|
+
orientation?: SliderOrientation;
|
|
87
|
+
children?: ReactNode;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type { SliderRangeValueProps, SliderSingleValueProps };
|
|
91
|
+
|
|
92
|
+
const SliderRoot = forwardRef<View, SliderProps>(
|
|
93
|
+
(
|
|
94
|
+
{
|
|
95
|
+
className,
|
|
96
|
+
style,
|
|
97
|
+
color = 'action',
|
|
98
|
+
orientation = 'horizontal',
|
|
99
|
+
children,
|
|
100
|
+
isDisabled,
|
|
101
|
+
...props
|
|
102
|
+
},
|
|
103
|
+
ref,
|
|
104
|
+
) => {
|
|
105
|
+
const parent = useParentContext();
|
|
106
|
+
const ctx = useMemo(
|
|
107
|
+
() => ({
|
|
108
|
+
...parent,
|
|
109
|
+
[SCOPE]: { color, orientation },
|
|
110
|
+
}),
|
|
111
|
+
[color, orientation, parent],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const computedClassName = cn(sliderRootVariants({ orientation }), className);
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<ParentContext.Provider value={ctx}>
|
|
118
|
+
<SliderRootPrimitive
|
|
119
|
+
ref={ref}
|
|
120
|
+
className={computedClassName}
|
|
121
|
+
style={style}
|
|
122
|
+
orientation={orientation}
|
|
123
|
+
isDisabled={isDisabled}
|
|
124
|
+
{...props}
|
|
125
|
+
>
|
|
126
|
+
{children}
|
|
127
|
+
</SliderRootPrimitive>
|
|
128
|
+
</ParentContext.Provider>
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
SliderRoot.displayName = 'Slider';
|
|
134
|
+
|
|
135
|
+
export interface SliderRailProps extends ISliderRailProps {
|
|
136
|
+
className?: string;
|
|
137
|
+
children?: ReactNode;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const SliderRail = forwardRef<View, SliderRailProps>(
|
|
141
|
+
({ className, style, children, ...props }, ref) => {
|
|
142
|
+
const { orientation, color } = useSliderStyleContext();
|
|
143
|
+
|
|
144
|
+
const computedClassName = cn(
|
|
145
|
+
sliderRailVariants({ orientation }),
|
|
146
|
+
sliderRailColorVariants({ color }),
|
|
147
|
+
className,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<SliderRailPrimitive ref={ref} className={computedClassName} style={style} {...props}>
|
|
152
|
+
{children}
|
|
153
|
+
</SliderRailPrimitive>
|
|
154
|
+
);
|
|
155
|
+
},
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
SliderRail.displayName = 'Slider.Rail';
|
|
159
|
+
|
|
160
|
+
export interface SliderTrackProps extends ViewProps {
|
|
161
|
+
asChild?: boolean;
|
|
162
|
+
className?: string;
|
|
163
|
+
children?: ReactNode;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const SliderTrack = forwardRef<View, SliderTrackProps>(
|
|
167
|
+
({ asChild, className, style, children, testID, ...props }, ref) => {
|
|
168
|
+
const { color, orientation } = useSliderStyleContext();
|
|
169
|
+
const { values, isDragging, trackLayout, thumbSize, getThumbPercent } = useSliderContext();
|
|
170
|
+
|
|
171
|
+
const fillStyle = useMemo((): ViewStyle => {
|
|
172
|
+
const trackSize =
|
|
173
|
+
trackLayout == null
|
|
174
|
+
? 0
|
|
175
|
+
: orientation === 'horizontal'
|
|
176
|
+
? trackLayout.width
|
|
177
|
+
: trackLayout.height;
|
|
178
|
+
|
|
179
|
+
if (trackSize <= 0) {
|
|
180
|
+
return orientation === 'vertical'
|
|
181
|
+
? { position: 'absolute', left: 0, right: 0, bottom: 0, height: 0 }
|
|
182
|
+
: { position: 'absolute', top: 0, bottom: 0, left: 0, width: 0 };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const isSingleThumb = values.length <= 1;
|
|
186
|
+
const startPercent = isSingleThumb ? 0 : getThumbPercent(0);
|
|
187
|
+
const endPercent = isSingleThumb ? getThumbPercent(0) : getThumbPercent(values.length - 1);
|
|
188
|
+
const { offset, length } = getFillExtent(startPercent, endPercent, trackSize, thumbSize);
|
|
189
|
+
|
|
190
|
+
if (orientation === 'vertical') {
|
|
191
|
+
return {
|
|
192
|
+
position: 'absolute',
|
|
193
|
+
left: 0,
|
|
194
|
+
right: 0,
|
|
195
|
+
bottom: offset,
|
|
196
|
+
height: length,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
position: 'absolute',
|
|
202
|
+
top: 0,
|
|
203
|
+
bottom: 0,
|
|
204
|
+
left: offset,
|
|
205
|
+
width: length,
|
|
206
|
+
};
|
|
207
|
+
}, [getThumbPercent, orientation, thumbSize, trackLayout, values.length]);
|
|
208
|
+
|
|
209
|
+
const computedClassName = cn(
|
|
210
|
+
sliderTrackVariants({ orientation }),
|
|
211
|
+
sliderTrackColorVariants({ color }),
|
|
212
|
+
className,
|
|
213
|
+
);
|
|
214
|
+
const Comp = asChild ? Slot : View;
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<Comp
|
|
218
|
+
ref={ref}
|
|
219
|
+
testID={testID}
|
|
220
|
+
className={computedClassName}
|
|
221
|
+
pointerEvents="none"
|
|
222
|
+
style={[fillStyle, style]}
|
|
223
|
+
accessibilityElementsHidden
|
|
224
|
+
importantForAccessibility="no-hide-descendants"
|
|
225
|
+
{...mergeDataAttributes(
|
|
226
|
+
props,
|
|
227
|
+
dataAttributes({ slot: 'slider-track', dragging: isDragging }),
|
|
228
|
+
)}
|
|
229
|
+
>
|
|
230
|
+
{children}
|
|
231
|
+
</Comp>
|
|
232
|
+
);
|
|
233
|
+
},
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
SliderTrack.displayName = 'Slider.Track';
|
|
237
|
+
|
|
238
|
+
export interface SliderThumbProps extends ISliderThumbProps {
|
|
239
|
+
className?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Zero-based thumb index. Defaults to `0` for single-value sliders.
|
|
242
|
+
*/
|
|
243
|
+
index?: number;
|
|
244
|
+
children?: ReactNode;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const SliderThumb = forwardRef<View, SliderThumbProps>(
|
|
248
|
+
({ className, style, index, children, ...props }, ref) => {
|
|
249
|
+
const { color } = useSliderStyleContext();
|
|
250
|
+
|
|
251
|
+
const computedClassName = cn(sliderThumbVariants({ color }), className);
|
|
252
|
+
|
|
253
|
+
return (
|
|
254
|
+
<SliderThumbPrimitive
|
|
255
|
+
ref={ref}
|
|
256
|
+
index={index}
|
|
257
|
+
className={computedClassName}
|
|
258
|
+
style={style}
|
|
259
|
+
{...props}
|
|
260
|
+
>
|
|
261
|
+
{children}
|
|
262
|
+
</SliderThumbPrimitive>
|
|
263
|
+
);
|
|
264
|
+
},
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
SliderThumb.displayName = 'Slider.Thumb';
|
|
268
|
+
|
|
269
|
+
function dataOrientation(orientation: 'horizontal' | 'vertical' | null | undefined) {
|
|
270
|
+
return { 'data-orientation': orientation ?? 'horizontal' } as const;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function renderPopupLabel(children: ReactNode, getValueLabel: () => string) {
|
|
274
|
+
if (children == null || typeof children === 'string' || typeof children === 'number') {
|
|
275
|
+
return (
|
|
276
|
+
<Text className="text-content-primary text-xs font-medium select-none" selectable={false}>
|
|
277
|
+
{children ?? getValueLabel()}
|
|
278
|
+
</Text>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return children;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface SliderPopupProps extends ViewProps {
|
|
286
|
+
asChild?: boolean;
|
|
287
|
+
className?: string;
|
|
288
|
+
children?: ReactNode;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const SliderPopup = forwardRef<View, SliderPopupProps>(
|
|
292
|
+
({ asChild, className, style, children, onLayout, ...props }, ref) => {
|
|
293
|
+
const { orientation } = useSliderStyleContext();
|
|
294
|
+
const { index, isDragging, isHovered, isFocused, thumbRef, percent } = useSliderThumbContext();
|
|
295
|
+
const { getThumbValueLabel } = useSliderContext();
|
|
296
|
+
const portalName = useId();
|
|
297
|
+
const portalRef = useRef<View>(null);
|
|
298
|
+
const [portalOrigin, setPortalOrigin] = useState<SliderPopupPortalOrigin | null>(null);
|
|
299
|
+
|
|
300
|
+
const visible = isDragging || isHovered || isFocused;
|
|
301
|
+
const {
|
|
302
|
+
floatingRef,
|
|
303
|
+
onFloatingLayout,
|
|
304
|
+
style: popupPositionStyle,
|
|
305
|
+
} = useAnchoredOverlay(thumbRef, visible, {
|
|
306
|
+
placement: orientation === 'vertical' ? 'right' : 'top',
|
|
307
|
+
offset: SLIDER_POPUP_OFFSET,
|
|
308
|
+
collisionBehavior: 'none',
|
|
309
|
+
width: 'content',
|
|
310
|
+
remeasureKey: percent,
|
|
311
|
+
trackWhileOpen: true,
|
|
312
|
+
});
|
|
313
|
+
const measurePortalOrigin = useCallback(() => {
|
|
314
|
+
if (Platform.OS === 'web' || orientation !== 'vertical') {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
portalRef.current?.measureInWindow((x, y) => {
|
|
319
|
+
setPortalOrigin((previous) =>
|
|
320
|
+
previous?.x === x && previous.y === y ? previous : { x, y },
|
|
321
|
+
);
|
|
322
|
+
});
|
|
323
|
+
}, [orientation]);
|
|
324
|
+
const resolvedPopupPositionStyle = useMemo(
|
|
325
|
+
() =>
|
|
326
|
+
Platform.OS !== 'web' && orientation === 'vertical'
|
|
327
|
+
? getSliderPopupPortalStyle(popupPositionStyle, portalOrigin)
|
|
328
|
+
: popupPositionStyle,
|
|
329
|
+
[orientation, popupPositionStyle, portalOrigin],
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
if (!visible) {
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const getValueLabel = () => getThumbValueLabel(index);
|
|
337
|
+
const label = renderPopupLabel(children, getValueLabel);
|
|
338
|
+
const computedClassName = cn(sliderPopupBaseVariants(), className);
|
|
339
|
+
const Comp = asChild ? Slot : View;
|
|
340
|
+
|
|
341
|
+
const popup = (
|
|
342
|
+
<View
|
|
343
|
+
pointerEvents="none"
|
|
344
|
+
style={[resolvedPopupPositionStyle, { zIndex: SLIDER_POPUP_Z_INDEX }]}
|
|
345
|
+
>
|
|
346
|
+
<Comp
|
|
347
|
+
ref={mergeRefs(ref, floatingRef)}
|
|
348
|
+
className={computedClassName}
|
|
349
|
+
style={style}
|
|
350
|
+
onLayout={composeEventHandlers(onLayout, onFloatingLayout)}
|
|
351
|
+
{...props}
|
|
352
|
+
accessibilityElementsHidden
|
|
353
|
+
importantForAccessibility="no-hide-descendants"
|
|
354
|
+
{...mergeDataAttributes(
|
|
355
|
+
props,
|
|
356
|
+
dataAttributes({ slot: 'slider-popup', visible: true }),
|
|
357
|
+
dataOrientation(orientation),
|
|
358
|
+
)}
|
|
359
|
+
>
|
|
360
|
+
{label}
|
|
361
|
+
</Comp>
|
|
362
|
+
</View>
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
if (Platform.OS === 'web' && createPortalFn && typeof document !== 'undefined') {
|
|
366
|
+
return createPortalFn(popup, document.body);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return (
|
|
370
|
+
<Portal name={portalName}>
|
|
371
|
+
<View
|
|
372
|
+
ref={portalRef}
|
|
373
|
+
pointerEvents="box-none"
|
|
374
|
+
style={[StyleSheet.absoluteFill, { zIndex: SLIDER_POPUP_Z_INDEX }]}
|
|
375
|
+
onLayout={measurePortalOrigin}
|
|
376
|
+
>
|
|
377
|
+
{popup}
|
|
378
|
+
</View>
|
|
379
|
+
</Portal>
|
|
380
|
+
);
|
|
381
|
+
},
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
SliderPopup.displayName = 'Slider.Popup';
|
|
385
|
+
|
|
386
|
+
export interface SliderMarkerProps extends ViewProps {
|
|
387
|
+
asChild?: boolean;
|
|
388
|
+
className?: string;
|
|
389
|
+
value?: number;
|
|
390
|
+
children?: ReactNode;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const SliderMarker = forwardRef<View, SliderMarkerProps>(
|
|
394
|
+
({ asChild, className, style, value, testID, ...props }, ref) => {
|
|
395
|
+
const { values, min, max, orientation, trackLayout, thumbSize } = useSliderContext();
|
|
396
|
+
|
|
397
|
+
const markerStyle = useMemo(() => {
|
|
398
|
+
if (value == null) {
|
|
399
|
+
return undefined;
|
|
400
|
+
}
|
|
401
|
+
const percent = valueToPercent(value, min, max);
|
|
402
|
+
return getMarkerPositionStyle(percent, orientation, trackLayout, thumbSize);
|
|
403
|
+
}, [max, min, orientation, thumbSize, trackLayout, value]);
|
|
404
|
+
|
|
405
|
+
const low = values[0] ?? min;
|
|
406
|
+
const high = values[values.length - 1] ?? low;
|
|
407
|
+
const isFilled =
|
|
408
|
+
value != null && (values.length <= 1 ? value <= low : value >= low && value <= high);
|
|
409
|
+
const computedClassName = cn(sliderMarkerVariants({ filled: isFilled }), className);
|
|
410
|
+
const Comp = asChild ? Slot : View;
|
|
411
|
+
|
|
412
|
+
return (
|
|
413
|
+
<Comp
|
|
414
|
+
ref={ref}
|
|
415
|
+
testID={testID}
|
|
416
|
+
className={computedClassName}
|
|
417
|
+
style={[markerStyle, style]}
|
|
418
|
+
accessibilityElementsHidden
|
|
419
|
+
importantForAccessibility="no-hide-descendants"
|
|
420
|
+
{...mergeDataAttributes(
|
|
421
|
+
props,
|
|
422
|
+
dataAttributes({
|
|
423
|
+
slot: 'slider-marker',
|
|
424
|
+
value: value == null ? undefined : String(value),
|
|
425
|
+
filled: isFilled,
|
|
426
|
+
}),
|
|
427
|
+
)}
|
|
428
|
+
/>
|
|
429
|
+
);
|
|
430
|
+
},
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
SliderMarker.displayName = 'Slider.Marker';
|
|
434
|
+
|
|
435
|
+
function isSliderMarkerElement(child: unknown): child is ReactElement<SliderMarkerProps> {
|
|
436
|
+
if (!isValidElement(child)) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
const type = child.type as { displayName?: string };
|
|
440
|
+
return type.displayName === 'Slider.Marker';
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface SliderMarkerGroupProps extends ViewProps {
|
|
444
|
+
asChild?: boolean;
|
|
445
|
+
className?: string;
|
|
446
|
+
children?: ReactNode;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const SliderMarkerGroup = forwardRef<View, SliderMarkerGroupProps>(
|
|
450
|
+
({ asChild, className, style, children, testID, ...props }, ref) => {
|
|
451
|
+
const { min, max, step } = useSliderContext();
|
|
452
|
+
|
|
453
|
+
const markers = useMemo(() => {
|
|
454
|
+
if (step <= 0 || max <= min) {
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const childList = Children.toArray(children);
|
|
459
|
+
if (childList.length === 0) {
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
const templateMarker = childList.find(
|
|
464
|
+
(child): child is ReactElement<SliderMarkerProps> =>
|
|
465
|
+
isSliderMarkerElement(child) && child.props.value == null,
|
|
466
|
+
);
|
|
467
|
+
|
|
468
|
+
if (templateMarker) {
|
|
469
|
+
return getMarkerStepValues(min, max, step).map((markerValue) =>
|
|
470
|
+
cloneElement(templateMarker, { key: markerValue, value: markerValue }),
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return childList;
|
|
475
|
+
}, [children, max, min, step]);
|
|
476
|
+
|
|
477
|
+
if (!markers) {
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
const Comp = asChild ? Slot : View;
|
|
482
|
+
|
|
483
|
+
return (
|
|
484
|
+
<Comp
|
|
485
|
+
ref={ref}
|
|
486
|
+
testID={testID}
|
|
487
|
+
className={cn('absolute inset-0 z-[1]', className)}
|
|
488
|
+
style={style}
|
|
489
|
+
pointerEvents="none"
|
|
490
|
+
accessibilityElementsHidden
|
|
491
|
+
importantForAccessibility="no-hide-descendants"
|
|
492
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'slider-marker-group' }))}
|
|
493
|
+
>
|
|
494
|
+
{markers}
|
|
495
|
+
</Comp>
|
|
496
|
+
);
|
|
497
|
+
},
|
|
498
|
+
);
|
|
499
|
+
|
|
500
|
+
SliderMarkerGroup.displayName = 'Slider.MarkerGroup';
|
|
501
|
+
|
|
502
|
+
type SliderCompoundComponent = typeof SliderRoot & {
|
|
503
|
+
Rail: typeof SliderRail;
|
|
504
|
+
Track: typeof SliderTrack;
|
|
505
|
+
Thumb: typeof SliderThumb;
|
|
506
|
+
Popup: typeof SliderPopup;
|
|
507
|
+
MarkerGroup: typeof SliderMarkerGroup;
|
|
508
|
+
Marker: typeof SliderMarker;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
export const Slider = Object.assign(SliderRoot, {
|
|
512
|
+
Rail: SliderRail,
|
|
513
|
+
Track: SliderTrack,
|
|
514
|
+
Thumb: SliderThumb,
|
|
515
|
+
Popup: SliderPopup,
|
|
516
|
+
MarkerGroup: SliderMarkerGroup,
|
|
517
|
+
Marker: SliderMarker,
|
|
518
|
+
}) as SliderCompoundComponent;
|
|
519
|
+
|
|
520
|
+
export type { SliderColor, SliderVariantProps };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
3
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
|
|
4
|
+
|
|
5
|
+
export const sliderColorOptions = ['action', 'danger', 'warning', 'success', 'info'] as const;
|
|
6
|
+
export type SliderColor = (typeof sliderColorOptions)[number];
|
|
7
|
+
|
|
8
|
+
export const sliderRootVariants = cva(
|
|
9
|
+
[
|
|
10
|
+
'relative w-full touch-none select-none',
|
|
11
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
12
|
+
DISABLED_CURSOR,
|
|
13
|
+
'web:outline-none',
|
|
14
|
+
],
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
orientation: {
|
|
18
|
+
horizontal: 'h-5 overflow-visible',
|
|
19
|
+
vertical: 'flex h-48 w-8 items-center justify-center overflow-visible',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
orientation: 'horizontal',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const sliderRailVariants = cva(
|
|
29
|
+
['relative w-full overflow-hidden rounded-full', TRANSITION_COLORS],
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
orientation: {
|
|
33
|
+
horizontal: 'h-1.5',
|
|
34
|
+
vertical: 'h-full w-1.5',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
orientation: 'horizontal',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
export const sliderRailColorVariants = cva([], {
|
|
44
|
+
variants: {
|
|
45
|
+
color: {
|
|
46
|
+
action: 'bg-surface-action-subtle',
|
|
47
|
+
danger: 'bg-surface-danger-subtle',
|
|
48
|
+
warning: 'bg-surface-warning-subtle',
|
|
49
|
+
success: 'bg-surface-success-subtle',
|
|
50
|
+
info: 'bg-surface-info-subtle',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
color: 'action',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const sliderTrackVariants = cva(['rounded-full transition-none'], {
|
|
59
|
+
variants: {
|
|
60
|
+
orientation: {
|
|
61
|
+
horizontal: '',
|
|
62
|
+
vertical: '',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
orientation: 'horizontal',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const sliderTrackColorVariants = cva([], {
|
|
71
|
+
variants: {
|
|
72
|
+
color: {
|
|
73
|
+
action: 'bg-surface-action-strong',
|
|
74
|
+
danger: 'bg-surface-danger-strong',
|
|
75
|
+
warning: 'bg-surface-warning-strong',
|
|
76
|
+
success: 'bg-surface-success-strong',
|
|
77
|
+
info: 'bg-surface-info-strong',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
defaultVariants: {
|
|
81
|
+
color: 'action',
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export const sliderThumbVariants = cva(
|
|
86
|
+
[
|
|
87
|
+
'box-border size-5 z-2 overflow-visible rounded-full bg-white border-3 border-solid shadow-md',
|
|
88
|
+
'web:cursor-grab web:active:cursor-grabbing',
|
|
89
|
+
'transition-[transform,box-shadow,opacity] duration-150',
|
|
90
|
+
'data-[dragging=true]:transition-none',
|
|
91
|
+
Platform.select({
|
|
92
|
+
default: 'data-[active=true]:scale-105',
|
|
93
|
+
web: 'data-[hover=true]:scale-110 data-[dragging=true]:scale-110 data-[hover=true]:shadow-lg web:data-[focus-visible=true]:ring-4 web:data-[focus-visible=true]:ring-stroke-focus',
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
{
|
|
97
|
+
variants: {
|
|
98
|
+
color: {
|
|
99
|
+
action: 'border-surface-action-strong',
|
|
100
|
+
danger: 'border-surface-danger-strong',
|
|
101
|
+
warning: 'border-surface-warning-strong',
|
|
102
|
+
success: 'border-surface-success-strong',
|
|
103
|
+
info: 'border-surface-info-strong',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
color: 'action',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
export const sliderThumbHaloVariants = cva(['hidden'], {
|
|
113
|
+
variants: {
|
|
114
|
+
visible: {
|
|
115
|
+
true: '',
|
|
116
|
+
false: '',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
defaultVariants: { visible: false },
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export const sliderPopupBaseVariants = cva([
|
|
123
|
+
'rounded-md bg-white px-2 py-1',
|
|
124
|
+
'text-content-primary text-xs font-medium shadow-md select-none pointer-events-none',
|
|
125
|
+
]);
|
|
126
|
+
|
|
127
|
+
export const sliderMarkerVariants = cva(
|
|
128
|
+
['rounded-full size-0.5 shrink-0', 'data-[value=0]:hidden data-[value=100]:hidden'],
|
|
129
|
+
{
|
|
130
|
+
variants: {
|
|
131
|
+
filled: {
|
|
132
|
+
true: 'bg-surface-action-subtle',
|
|
133
|
+
false: 'bg-content-action',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
filled: false,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
export type SliderVariantProps = VariantProps<typeof sliderRootVariants> &
|
|
143
|
+
VariantProps<typeof sliderRailVariants> &
|
|
144
|
+
VariantProps<typeof sliderRailColorVariants> &
|
|
145
|
+
VariantProps<typeof sliderTrackVariants> &
|
|
146
|
+
VariantProps<typeof sliderTrackColorVariants> &
|
|
147
|
+
VariantProps<typeof sliderThumbVariants>;
|
|
@@ -7,12 +7,20 @@ import {
|
|
|
7
7
|
type ISwitchProps,
|
|
8
8
|
} from '@cdx-ui/primitives';
|
|
9
9
|
import { BaseSwitch } from './BaseSwitch';
|
|
10
|
-
import type { SwitchVariantProps } from './styles';
|
|
11
10
|
|
|
12
|
-
export interface SwitchProps extends ISwitchProps
|
|
11
|
+
export interface SwitchProps extends ISwitchProps {
|
|
12
|
+
/**
|
|
13
|
+
* Track and thumb size.
|
|
14
|
+
* @default 'md'
|
|
15
|
+
*/
|
|
16
|
+
size?: 'sm' | 'md' | 'lg';
|
|
17
|
+
/** Additional Uniwind/Tailwind classes, merged after the switch's own styles. */
|
|
13
18
|
className?: string;
|
|
19
|
+
/** Accessible label announced by screen readers. */
|
|
14
20
|
accessibilityLabel?: string;
|
|
21
|
+
/** Called when the switch receives focus. */
|
|
15
22
|
onFocus?: () => void;
|
|
23
|
+
/** Called when the switch loses focus. */
|
|
16
24
|
onBlur?: () => void;
|
|
17
25
|
}
|
|
18
26
|
|