@cdx-ui/components 0.0.1-beta.99 → 0.1.1
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 +19 -11
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/InsuranceDisclosure/FdicLockup.js +31 -0
- package/lib/commonjs/components/InsuranceDisclosure/FdicLockup.js.map +1 -0
- package/lib/commonjs/components/InsuranceDisclosure/index.js +74 -0
- package/lib/commonjs/components/InsuranceDisclosure/index.js.map +1 -0
- package/lib/commonjs/components/InsuranceDisclosure/styles.js +21 -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 +17 -48
- 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 +10 -8
- 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/InsuranceDisclosure.figma.js +26 -0
- package/lib/commonjs/figma/InsuranceDisclosure.figma.js.map +1 -0
- 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 +20 -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 +14 -6
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/InsuranceDisclosure/FdicLockup.js +27 -0
- package/lib/module/components/InsuranceDisclosure/FdicLockup.js.map +1 -0
- package/lib/module/components/InsuranceDisclosure/index.js +70 -0
- package/lib/module/components/InsuranceDisclosure/index.js.map +1 -0
- package/lib/module/components/InsuranceDisclosure/styles.js +17 -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 +13 -44
- 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 +6 -4
- 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/InsuranceDisclosure.figma.js +20 -0
- package/lib/module/figma/InsuranceDisclosure.figma.js.map +1 -0
- 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 +16 -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/FdicLockup.d.ts +2 -0
- package/lib/typescript/components/InsuranceDisclosure/FdicLockup.d.ts.map +1 -0
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts +31 -0
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts.map +1 -0
- package/lib/typescript/components/InsuranceDisclosure/styles.d.ts +8 -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/InsuranceDisclosure.figma.d.ts +8 -0
- package/lib/typescript/figma/InsuranceDisclosure.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 +5 -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 +12 -4
- package/src/components/InsuranceDisclosure/FdicLockup.tsx +23 -0
- package/src/components/InsuranceDisclosure/index.tsx +99 -0
- package/src/components/InsuranceDisclosure/styles.ts +31 -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 +12 -63
- 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 +6 -4
- 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 +14 -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,160 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import type { RefObject } from 'react';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { ICarouselInstance } from 'react-native-reanimated-carousel';
|
|
5
|
+
import {
|
|
6
|
+
ChevronLeft,
|
|
7
|
+
ChevronRight,
|
|
8
|
+
KeyboardArrowDown,
|
|
9
|
+
KeyboardArrowUp,
|
|
10
|
+
type ForgeIcon,
|
|
11
|
+
} from '@cdx-ui/icons';
|
|
12
|
+
import { dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
|
|
13
|
+
import { cn } from '@cdx-ui/utils';
|
|
14
|
+
import { IconButton, type IconButtonProps } from '../IconButton';
|
|
15
|
+
import { useCarouselProgressContext } from './context';
|
|
16
|
+
import { carouselNavButtonIconVariants, carouselNavButtonRootVariants } from './styles';
|
|
17
|
+
import { useCarouselActiveIndex } from './useCarouselActiveIndex';
|
|
18
|
+
|
|
19
|
+
export interface CarouselNavButtonProps extends Omit<
|
|
20
|
+
IconButtonProps,
|
|
21
|
+
'as' | 'variant' | 'onPress' | 'disabled' | 'isDisabled'
|
|
22
|
+
> {
|
|
23
|
+
/** Mirrors `Carousel`'s `data.length` — only required when rendered outside `<Carousel>`. */
|
|
24
|
+
itemCount?: number;
|
|
25
|
+
/** Explicit progress value — only required when rendered outside `<Carousel>`. */
|
|
26
|
+
progress?: SharedValue<number>;
|
|
27
|
+
/** Explicit carousel ref — only required outside `<Carousel>` (unless `onPress` is provided). */
|
|
28
|
+
carouselRef?: RefObject<ICarouselInstance | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Mirrors `Carousel`'s `loop` prop for bounds-aware disabled state.
|
|
31
|
+
* Defaults to `true` (same as `Carousel`) when omitted outside context.
|
|
32
|
+
*/
|
|
33
|
+
loop?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Mirrors `Carousel`'s `vertical` prop for default icons and accessibility labels.
|
|
36
|
+
* Defaults to `false` when omitted outside context.
|
|
37
|
+
*/
|
|
38
|
+
vertical?: boolean;
|
|
39
|
+
/** Overrides the default press-to-navigate behavior (`prev` / `next` with `{ animated: true }`). */
|
|
40
|
+
onPress?: () => void;
|
|
41
|
+
/** Manual override; when omitted, derived from `loop` and `progress` at bounds. */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** Forge icon component — defaults to direction-appropriate chevrons or arrows. */
|
|
44
|
+
as?: ForgeIcon;
|
|
45
|
+
/** Overrides default `"Previous slide"` / `"Next slide"` (or item labels when `vertical`). */
|
|
46
|
+
accessibilityLabel?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface CarouselNavButtonInternalProps extends CarouselNavButtonProps {
|
|
50
|
+
direction: 'prev' | 'next';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function resolveDefaultIcon(vertical: boolean, direction: 'prev' | 'next'): ForgeIcon {
|
|
54
|
+
if (vertical) {
|
|
55
|
+
return direction === 'prev' ? KeyboardArrowUp : KeyboardArrowDown;
|
|
56
|
+
}
|
|
57
|
+
return direction === 'prev' ? ChevronLeft : ChevronRight;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function resolveDefaultAccessibilityLabel(vertical: boolean, direction: 'prev' | 'next'): string {
|
|
61
|
+
if (vertical) {
|
|
62
|
+
return direction === 'prev' ? 'Previous item' : 'Next item';
|
|
63
|
+
}
|
|
64
|
+
return direction === 'prev' ? 'Previous slide' : 'Next slide';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function CarouselNavButton({
|
|
68
|
+
direction,
|
|
69
|
+
progress: progressProp,
|
|
70
|
+
carouselRef: carouselRefProp,
|
|
71
|
+
itemCount: itemCountProp,
|
|
72
|
+
loop: loopProp,
|
|
73
|
+
vertical: verticalProp,
|
|
74
|
+
onPress,
|
|
75
|
+
disabled: disabledProp,
|
|
76
|
+
as,
|
|
77
|
+
accessibilityLabel,
|
|
78
|
+
color = 'neutral',
|
|
79
|
+
size = 'default',
|
|
80
|
+
className,
|
|
81
|
+
iconClassName,
|
|
82
|
+
...iconButtonProps
|
|
83
|
+
}: CarouselNavButtonInternalProps) {
|
|
84
|
+
const context = useCarouselProgressContext();
|
|
85
|
+
const progress = progressProp ?? context?.progress;
|
|
86
|
+
const carouselRef = carouselRefProp ?? context?.carouselRef;
|
|
87
|
+
const itemCount = itemCountProp ?? context?.itemCount;
|
|
88
|
+
const loop = loopProp ?? context?.loop ?? true;
|
|
89
|
+
const vertical = verticalProp ?? context?.vertical ?? false;
|
|
90
|
+
|
|
91
|
+
if (!progress) {
|
|
92
|
+
throw new Error(
|
|
93
|
+
`Carousel.${direction === 'prev' ? 'PrevButton' : 'NextButton'} must be rendered inside <Carousel> or receive an explicit \`progress\` prop.`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (!onPress && !carouselRef) {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`Carousel.${direction === 'prev' ? 'PrevButton' : 'NextButton'} must be rendered inside <Carousel> or receive an explicit \`carouselRef\` prop (or a custom \`onPress\`).`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (itemCount == null) {
|
|
104
|
+
throw new Error(
|
|
105
|
+
`Carousel.${direction === 'prev' ? 'PrevButton' : 'NextButton'} must be rendered inside <Carousel> or receive an explicit \`itemCount\` prop.`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const activeIndex = useCarouselActiveIndex(progress);
|
|
110
|
+
const atStart = activeIndex <= 0;
|
|
111
|
+
const atEnd = activeIndex >= itemCount - 1;
|
|
112
|
+
const autoDisabled = !loop && (direction === 'prev' ? atStart : atEnd);
|
|
113
|
+
const disabled = disabledProp ?? autoDisabled;
|
|
114
|
+
|
|
115
|
+
const handlePress = useCallback(() => {
|
|
116
|
+
if (onPress) {
|
|
117
|
+
onPress();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (direction === 'prev') {
|
|
122
|
+
carouselRef?.current?.prev({ animated: true });
|
|
123
|
+
} else {
|
|
124
|
+
carouselRef?.current?.next({ animated: true });
|
|
125
|
+
}
|
|
126
|
+
}, [onPress, carouselRef, direction]);
|
|
127
|
+
|
|
128
|
+
const dataSlot = direction === 'prev' ? 'carousel-prev-button' : 'carousel-next-button';
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<IconButton
|
|
132
|
+
as={as ?? resolveDefaultIcon(vertical, direction)}
|
|
133
|
+
variant="ghost"
|
|
134
|
+
color={color}
|
|
135
|
+
size={size}
|
|
136
|
+
isDisabled={disabled}
|
|
137
|
+
onPress={handlePress}
|
|
138
|
+
accessibilityLabel={
|
|
139
|
+
accessibilityLabel ?? resolveDefaultAccessibilityLabel(vertical, direction)
|
|
140
|
+
}
|
|
141
|
+
accessibilityState={{ disabled }}
|
|
142
|
+
className={cn(carouselNavButtonRootVariants({ disabled }), className)}
|
|
143
|
+
iconClassName={cn(carouselNavButtonIconVariants({ disabled }), iconClassName)}
|
|
144
|
+
{...iconButtonProps}
|
|
145
|
+
{...mergeDataAttributes(iconButtonProps, dataAttributes({ slot: dataSlot }))}
|
|
146
|
+
/>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function CarouselPrevButton(props: CarouselNavButtonProps) {
|
|
151
|
+
return <CarouselNavButton direction="prev" {...props} />;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
CarouselPrevButton.displayName = 'Carousel.PrevButton';
|
|
155
|
+
|
|
156
|
+
export function CarouselNextButton(props: CarouselNavButtonProps) {
|
|
157
|
+
return <CarouselNavButton direction="next" {...props} />;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
CarouselNextButton.displayName = 'Carousel.NextButton';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ICarouselInstance } from 'react-native-reanimated-carousel';
|
|
2
|
+
|
|
3
|
+
type CarouselPaginationScrollAction = NonNullable<Parameters<ICarouselInstance['scrollTo']>[0]>;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the shortest `scrollTo` action for pagination dot presses.
|
|
7
|
+
*
|
|
8
|
+
* In loop mode the library's absolute `scrollTo({ index })` can animate through every
|
|
9
|
+
* slide when the current index is past the halfway point of the loop buffer (e.g. index 2 → 3
|
|
10
|
+
* with four items). Relative `count` navigation avoids that wrap-around path.
|
|
11
|
+
*/
|
|
12
|
+
export function resolveCarouselPaginationScrollAction(
|
|
13
|
+
currentIndex: number,
|
|
14
|
+
targetIndex: number,
|
|
15
|
+
dataLength: number,
|
|
16
|
+
loop: boolean,
|
|
17
|
+
): CarouselPaginationScrollAction | null {
|
|
18
|
+
if (currentIndex === targetIndex) return null;
|
|
19
|
+
|
|
20
|
+
if (!loop) {
|
|
21
|
+
return { index: targetIndex, animated: true };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const forwardDelta = (targetIndex - currentIndex + dataLength) % dataLength;
|
|
25
|
+
const backwardDelta = (currentIndex - targetIndex + dataLength) % dataLength;
|
|
26
|
+
|
|
27
|
+
if (forwardDelta <= backwardDelta) {
|
|
28
|
+
return { count: forwardDelta, animated: true };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return { count: -backwardDelta, animated: true };
|
|
32
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
2
|
+
|
|
3
|
+
/** Small default gap between dots — the library ships no default spacing between pagination items. */
|
|
4
|
+
export const carouselPaginationContainerClassName = 'gap-2 py-1';
|
|
5
|
+
|
|
6
|
+
export const carouselPaginationDotVariants = cva('rounded-full', {
|
|
7
|
+
variants: {
|
|
8
|
+
active: {
|
|
9
|
+
true: 'bg-surface-neutral-strong',
|
|
10
|
+
false: 'bg-surface-neutral-subtle',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
active: false,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type CarouselPaginationDotVariants = VariantProps<typeof carouselPaginationDotVariants>;
|
|
19
|
+
|
|
20
|
+
/** Overrides IconButton's default disabled opacity so tertiary icon color reads clearly at bounds. */
|
|
21
|
+
export const carouselNavButtonRootVariants = cva([], {
|
|
22
|
+
variants: {
|
|
23
|
+
disabled: {
|
|
24
|
+
true: 'data-[disabled=true]:opacity-100',
|
|
25
|
+
false: '',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
disabled: false,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const carouselNavButtonIconVariants = cva([], {
|
|
34
|
+
variants: {
|
|
35
|
+
disabled: {
|
|
36
|
+
true: 'text-content-tertiary',
|
|
37
|
+
false: '',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
disabled: false,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export type CarouselNavButtonVariants = VariantProps<typeof carouselNavButtonRootVariants>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { useAnimatedReaction, type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
4
|
+
|
|
5
|
+
let nextListenerId = 1;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Syncs `Math.round(progress)` into React state for bounds-aware disabled state.
|
|
9
|
+
* Do not call `getCurrentIndex()` during render — the adopted library warns against it.
|
|
10
|
+
*
|
|
11
|
+
* Uses both:
|
|
12
|
+
* - `useAnimatedReaction` + `scheduleOnRN` (native / Babel-transformed web worklets)
|
|
13
|
+
* - SharedValue `addListener` (JS-thread fallback for web hosts that serve bob-built
|
|
14
|
+
* `lib/` without the Reanimated Babel plugin — e.g. the docs Vite SPA)
|
|
15
|
+
*/
|
|
16
|
+
export function useCarouselActiveIndex(progress: SharedValue<number>): number {
|
|
17
|
+
const [activeIndex, setActiveIndex] = useState(() => Math.round(progress.get()));
|
|
18
|
+
const setActiveIndexRef = useRef(setActiveIndex);
|
|
19
|
+
setActiveIndexRef.current = setActiveIndex;
|
|
20
|
+
|
|
21
|
+
useAnimatedReaction(
|
|
22
|
+
() => Math.round(progress.get()),
|
|
23
|
+
(current, previous) => {
|
|
24
|
+
if (current !== previous) {
|
|
25
|
+
scheduleOnRN(setActiveIndexRef.current, current);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const listenerId = nextListenerId++;
|
|
32
|
+
const onChange = (value: number) => {
|
|
33
|
+
const next = Math.round(value);
|
|
34
|
+
setActiveIndexRef.current((prev) => (prev === next ? prev : next));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
progress.addListener(listenerId, onChange);
|
|
39
|
+
} catch {
|
|
40
|
+
// Native JS runtime rejects addListener — the worklet path above handles it.
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return () => {
|
|
45
|
+
try {
|
|
46
|
+
progress.removeListener(listenerId);
|
|
47
|
+
} catch {
|
|
48
|
+
// ignore
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}, [progress]);
|
|
52
|
+
|
|
53
|
+
return activeIndex;
|
|
54
|
+
}
|
|
@@ -57,6 +57,22 @@ CheckboxRoot.displayName = 'Checkbox';
|
|
|
57
57
|
// CHECKBOX INDICATOR (styled-only, reads context for data-* styling)
|
|
58
58
|
// =============================================================================
|
|
59
59
|
|
|
60
|
+
/** Compound check × invalid × active state for native Uniwind selectors (single data-field-state). */
|
|
61
|
+
const INDICATOR_STATES = {
|
|
62
|
+
'unchecked:false:false': 'idle',
|
|
63
|
+
'unchecked:true:false': 'invalid',
|
|
64
|
+
'unchecked:false:true': 'active',
|
|
65
|
+
'unchecked:true:true': 'invalid-active',
|
|
66
|
+
'checked:false:false': 'checked',
|
|
67
|
+
'checked:true:false': 'checked-invalid',
|
|
68
|
+
'checked:false:true': 'checked-active',
|
|
69
|
+
'checked:true:true': 'checked-invalid-active',
|
|
70
|
+
'indeterminate:false:false': 'indeterminate',
|
|
71
|
+
'indeterminate:true:false': 'indeterminate-invalid',
|
|
72
|
+
'indeterminate:false:true': 'indeterminate-active',
|
|
73
|
+
'indeterminate:true:true': 'indeterminate-invalid-active',
|
|
74
|
+
} as const;
|
|
75
|
+
|
|
60
76
|
export interface CheckboxIndicatorProps extends ViewProps {
|
|
61
77
|
asChild?: boolean;
|
|
62
78
|
className?: string;
|
|
@@ -77,6 +93,13 @@ const CheckboxIndicator = forwardRef<View, CheckboxIndicatorProps>(
|
|
|
77
93
|
isFocusVisible,
|
|
78
94
|
} = useCheckboxContext();
|
|
79
95
|
|
|
96
|
+
const checkState = isIndeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked';
|
|
97
|
+
const fieldState = isReadOnly
|
|
98
|
+
? (`readonly-${checkState}${isInvalid ? '-invalid' : ''}` as const)
|
|
99
|
+
: INDICATOR_STATES[
|
|
100
|
+
`${checkState}:${isInvalid ? 'true' : 'false'}:${isPressed ? 'true' : 'false'}`
|
|
101
|
+
];
|
|
102
|
+
|
|
80
103
|
const computedClassName = cn(checkboxIndicatorVariants(), className);
|
|
81
104
|
const Comp = asChild ? Slot : View;
|
|
82
105
|
|
|
@@ -99,6 +122,7 @@ const CheckboxIndicator = forwardRef<View, CheckboxIndicatorProps>(
|
|
|
99
122
|
active: isPressed,
|
|
100
123
|
focused: isFocused,
|
|
101
124
|
indeterminate: isIndeterminate,
|
|
125
|
+
fieldState,
|
|
102
126
|
}),
|
|
103
127
|
)}
|
|
104
128
|
>
|
|
@@ -117,6 +141,7 @@ CheckboxIndicator.displayName = 'Checkbox.Indicator';
|
|
|
117
141
|
export interface CheckboxIconProps extends Omit<IconProps, 'children'> {}
|
|
118
142
|
|
|
119
143
|
const CheckboxIcon = ({ className, style, ...props }: CheckboxIconProps) => {
|
|
144
|
+
const { isReadOnly } = useCheckboxContext();
|
|
120
145
|
const computedClassName = cn(checkboxIconVariants(), className);
|
|
121
146
|
|
|
122
147
|
return (
|
|
@@ -124,7 +149,13 @@ const CheckboxIcon = ({ className, style, ...props }: CheckboxIconProps) => {
|
|
|
124
149
|
className={computedClassName}
|
|
125
150
|
style={style}
|
|
126
151
|
{...props}
|
|
127
|
-
{...mergeDataAttributes(
|
|
152
|
+
{...mergeDataAttributes(
|
|
153
|
+
props,
|
|
154
|
+
dataAttributes({
|
|
155
|
+
slot: 'checkbox-icon',
|
|
156
|
+
readonly: isReadOnly,
|
|
157
|
+
}),
|
|
158
|
+
)}
|
|
128
159
|
/>
|
|
129
160
|
);
|
|
130
161
|
};
|
|
@@ -159,7 +190,7 @@ export interface CheckboxLabelProps extends TextProps {
|
|
|
159
190
|
|
|
160
191
|
const CheckboxLabel = forwardRef<Text, CheckboxLabelProps>(
|
|
161
192
|
({ asChild, className, children, style, ...props }, ref) => {
|
|
162
|
-
const { isDisabled } = useCheckboxContext();
|
|
193
|
+
const { isDisabled, isReadOnly } = useCheckboxContext();
|
|
163
194
|
const computedClassName = cn(checkboxLabelVariants(), className);
|
|
164
195
|
const Comp = asChild ? Slot : Text;
|
|
165
196
|
|
|
@@ -174,6 +205,7 @@ const CheckboxLabel = forwardRef<Text, CheckboxLabelProps>(
|
|
|
174
205
|
dataAttributes({
|
|
175
206
|
slot: 'checkbox-label',
|
|
176
207
|
disabled: isDisabled,
|
|
208
|
+
readonly: isReadOnly,
|
|
177
209
|
}),
|
|
178
210
|
)}
|
|
179
211
|
>
|
|
@@ -198,6 +230,8 @@ export interface CheckboxGroupProps extends ViewProps {
|
|
|
198
230
|
isInvalid?: boolean;
|
|
199
231
|
isReadOnly?: boolean;
|
|
200
232
|
direction?: 'column' | 'row';
|
|
233
|
+
'aria-label'?: string;
|
|
234
|
+
'aria-labelledby'?: string;
|
|
201
235
|
}
|
|
202
236
|
|
|
203
237
|
const CheckboxGroup = forwardRef<View, CheckboxGroupProps>(
|
|
@@ -228,6 +262,7 @@ const CheckboxGroup = forwardRef<View, CheckboxGroupProps>(
|
|
|
228
262
|
isDisabled={isDisabled}
|
|
229
263
|
isInvalid={isInvalid}
|
|
230
264
|
isReadOnly={isReadOnly}
|
|
265
|
+
{...viewProps}
|
|
231
266
|
{...mergeDataAttributes(viewProps, dataAttributes({ slot: 'checkbox-group' }))}
|
|
232
267
|
>
|
|
233
268
|
{children}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
import { cva } from '
|
|
3
|
-
import { DISABLED_CURSOR, DISABLED_OPACITY, TRANSITION_COLORS } from '../../styles/
|
|
2
|
+
import { cva } from '@cdx-ui/utils';
|
|
3
|
+
import { DISABLED_CURSOR, DISABLED_OPACITY, TRANSITION_COLORS } from '../../styles/constants';
|
|
4
4
|
|
|
5
5
|
// TODO: Handle text wrapping in the label
|
|
6
6
|
|
|
@@ -8,6 +8,7 @@ export const checkboxRootVariants = cva([
|
|
|
8
8
|
'flex-row items-center gap-2.5',
|
|
9
9
|
DISABLED_OPACITY,
|
|
10
10
|
DISABLED_CURSOR,
|
|
11
|
+
'data-[readonly=true]:cursor-default',
|
|
11
12
|
// Suppress stray outline on the Pressable/label wrapper; focus ring is drawn on Checkbox.Indicator (Radio pattern).
|
|
12
13
|
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
13
14
|
]);
|
|
@@ -33,6 +34,12 @@ export const checkboxIndicatorVariants = cva([
|
|
|
33
34
|
'data-[invalid=true]:border-stroke-danger',
|
|
34
35
|
Platform.select({
|
|
35
36
|
web: [
|
|
37
|
+
// Read-only — compound selectors evaluate correctly on web.
|
|
38
|
+
'data-[readonly=true]:bg-surface-secondary',
|
|
39
|
+
'data-[readonly=true]:data-[checked=true]:border-stroke-action',
|
|
40
|
+
'data-[readonly=true]:data-[indeterminate=true]:border-stroke-action',
|
|
41
|
+
'data-[readonly=true]:data-[checked=true]:bg-surface-secondary',
|
|
42
|
+
'data-[readonly=true]:data-[indeterminate=true]:bg-surface-secondary',
|
|
36
43
|
// Invalid bg — compound selectors evaluate correctly on web.
|
|
37
44
|
'data-[invalid=true]:data-[checked=true]:bg-surface-danger-strong',
|
|
38
45
|
'data-[invalid=true]:data-[indeterminate=true]:bg-surface-danger-strong',
|
|
@@ -43,49 +50,74 @@ export const checkboxIndicatorVariants = cva([
|
|
|
43
50
|
'data-[hover=true]:data-[invalid=true]:data-[checked=false]:data-[indeterminate=false]:bg-surface-danger-strong/[0.08]',
|
|
44
51
|
// Hover — checked / indeterminate (bg + border darken together)
|
|
45
52
|
'data-[hover=true]:data-[checked=true]:bg-surface-action-strong-hover',
|
|
46
|
-
'data-[hover=true]:data-[checked=true]:border-
|
|
53
|
+
'data-[hover=true]:data-[checked=true]:border-surface-action-strong-hover',
|
|
47
54
|
'data-[hover=true]:data-[indeterminate=true]:bg-surface-action-strong-hover',
|
|
48
|
-
'data-[hover=true]:data-[indeterminate=true]:border-
|
|
55
|
+
'data-[hover=true]:data-[indeterminate=true]:border-surface-action-strong-hover',
|
|
49
56
|
'data-[hover=true]:data-[checked=true]:data-[invalid=true]:bg-surface-danger-strong-hover',
|
|
50
|
-
'data-[hover=true]:data-[checked=true]:data-[invalid=true]:border-
|
|
57
|
+
'data-[hover=true]:data-[checked=true]:data-[invalid=true]:border-surface-danger-strong-hover',
|
|
51
58
|
'data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:bg-surface-danger-strong-hover',
|
|
52
|
-
'data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:border-
|
|
59
|
+
'data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:border-surface-danger-strong-hover',
|
|
53
60
|
// Active — CSS :active pseudo-class (web root does not track press via data-active).
|
|
54
61
|
// data-[hover=true] guard ensures active beats hover by specificity (0,3,0 > 0,2,0).
|
|
62
|
+
// Unchecked — border only (Radio pattern)
|
|
63
|
+
'web:active:data-[hover=true]:data-[checked=false]:data-[indeterminate=false]:border-stroke-hover',
|
|
64
|
+
'web:active:data-[hover=true]:data-[invalid=true]:data-[checked=false]:data-[indeterminate=false]:border-surface-danger-strong-active',
|
|
55
65
|
'web:active:data-[hover=true]:data-[checked=true]:bg-surface-action-strong-active',
|
|
56
|
-
'web:active:data-[hover=true]:data-[checked=true]:border-
|
|
66
|
+
'web:active:data-[hover=true]:data-[checked=true]:border-surface-action-strong-active',
|
|
57
67
|
'web:active:data-[hover=true]:data-[indeterminate=true]:bg-surface-action-strong-active',
|
|
58
|
-
'web:active:data-[hover=true]:data-[indeterminate=true]:border-
|
|
68
|
+
'web:active:data-[hover=true]:data-[indeterminate=true]:border-surface-action-strong-active',
|
|
59
69
|
'web:active:data-[hover=true]:data-[checked=true]:data-[invalid=true]:bg-surface-danger-strong-active',
|
|
60
|
-
'web:active:data-[hover=true]:data-[checked=true]:data-[invalid=true]:border-
|
|
70
|
+
'web:active:data-[hover=true]:data-[checked=true]:data-[invalid=true]:border-surface-danger-strong-active',
|
|
61
71
|
'web:active:data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:bg-surface-danger-strong-active',
|
|
62
|
-
'web:active:data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:border-
|
|
63
|
-
// Focus ring
|
|
72
|
+
'web:active:data-[hover=true]:data-[indeterminate=true]:data-[invalid=true]:border-surface-danger-strong-active',
|
|
73
|
+
// Focus ring — applies to read-only as well (focusable + aria-readonly).
|
|
64
74
|
'web:data-[focus-visible=true]:outline-none',
|
|
65
75
|
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
|
|
66
76
|
].join(' '),
|
|
67
77
|
default: [
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'data-[
|
|
77
|
-
'data-[
|
|
78
|
-
'data-[
|
|
79
|
-
'data-[
|
|
78
|
+
// Native: Uniwind only evaluates the last data-[] condition in a compound chain.
|
|
79
|
+
// Use single-condition data-[field-state=...] selectors (emitted by CheckboxIndicator).
|
|
80
|
+
// Read-only — derived field-state encodes check × readonly (no active/hover on readonly).
|
|
81
|
+
'data-[field-state=readonly-unchecked]:bg-surface-secondary',
|
|
82
|
+
'data-[field-state=readonly-checked]:bg-surface-secondary',
|
|
83
|
+
'data-[field-state=readonly-checked]:border-stroke-action',
|
|
84
|
+
'data-[field-state=readonly-indeterminate]:bg-surface-secondary',
|
|
85
|
+
'data-[field-state=readonly-indeterminate]:border-stroke-action',
|
|
86
|
+
'data-[field-state=readonly-unchecked-invalid]:bg-surface-secondary',
|
|
87
|
+
'data-[field-state=readonly-checked-invalid]:bg-surface-secondary',
|
|
88
|
+
'data-[field-state=readonly-checked-invalid]:border-stroke-action',
|
|
89
|
+
'data-[field-state=readonly-indeterminate-invalid]:bg-surface-secondary',
|
|
90
|
+
'data-[field-state=readonly-indeterminate-invalid]:border-stroke-action',
|
|
91
|
+
// checked/indeterminate + invalid → danger bg
|
|
92
|
+
'data-[field-state=checked-invalid]:bg-surface-danger-strong',
|
|
93
|
+
'data-[field-state=indeterminate-invalid]:bg-surface-danger-strong',
|
|
94
|
+
// unchecked + active → border only (Radio pattern)
|
|
95
|
+
'data-[field-state=active]:border-stroke-hover',
|
|
96
|
+
'data-[field-state=invalid-active]:border-surface-danger-strong-active',
|
|
97
|
+
// checked/indeterminate + active → action active bg + matching border
|
|
98
|
+
'data-[field-state=checked-active]:bg-surface-action-strong-active',
|
|
99
|
+
'data-[field-state=checked-active]:border-surface-action-strong-active',
|
|
100
|
+
'data-[field-state=indeterminate-active]:bg-surface-action-strong-active',
|
|
101
|
+
'data-[field-state=indeterminate-active]:border-surface-action-strong-active',
|
|
102
|
+
// checked/indeterminate + invalid + active → danger active bg + matching border
|
|
103
|
+
'data-[field-state=checked-invalid-active]:bg-surface-danger-strong-active',
|
|
104
|
+
'data-[field-state=checked-invalid-active]:border-surface-danger-strong-active',
|
|
105
|
+
'data-[field-state=indeterminate-invalid-active]:bg-surface-danger-strong-active',
|
|
106
|
+
'data-[field-state=indeterminate-invalid-active]:border-surface-danger-strong-active',
|
|
80
107
|
].join(' '),
|
|
81
108
|
}),
|
|
82
109
|
]);
|
|
83
110
|
|
|
84
|
-
export const checkboxIconVariants = cva([
|
|
111
|
+
export const checkboxIconVariants = cva([
|
|
112
|
+
'text-white',
|
|
113
|
+
'data-[readonly=true]:text-content-action',
|
|
114
|
+
'h-5 w-5',
|
|
115
|
+
]);
|
|
85
116
|
|
|
86
117
|
export const checkboxLabelVariants = cva([
|
|
87
118
|
'text-content-primary text-base',
|
|
88
119
|
'data-[disabled=true]:text-content-tertiary',
|
|
120
|
+
'data-[readonly=true]:cursor-default',
|
|
89
121
|
]);
|
|
90
122
|
|
|
91
123
|
export const checkboxGroupVariants = cva([], {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef, useMemo, type ReactNode } from 'react';
|
|
1
|
+
import { forwardRef, useEffect, useMemo, type ReactNode } from 'react';
|
|
2
2
|
import { Text, View, type TextProps } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
ChipRoot as ChipRootPrimitive,
|
|
@@ -27,16 +27,74 @@ const useChipStyleContext = () => useStyleContext(SCOPE) as ChipVariantProps;
|
|
|
27
27
|
// ROOT
|
|
28
28
|
// =============================================================================
|
|
29
29
|
|
|
30
|
-
export
|
|
30
|
+
export type ChipVariant = 'subtle' | 'outline';
|
|
31
|
+
|
|
32
|
+
/** @deprecated Use {@link ChipVariant} (`'subtle'`) instead. */
|
|
33
|
+
export type ChipVariantTint = 'tint';
|
|
34
|
+
|
|
35
|
+
export type ChipColor = 'neutral' | 'action' | 'danger' | 'warning' | 'success' | 'info';
|
|
36
|
+
|
|
37
|
+
/** @deprecated Use {@link ChipColor} (`'neutral'`) instead. */
|
|
38
|
+
export type ChipColorDefault = 'default';
|
|
39
|
+
|
|
40
|
+
let hasWarnedChipTintVariant = false;
|
|
41
|
+
let hasWarnedChipDefaultColor = false;
|
|
42
|
+
|
|
43
|
+
export interface ChipProps extends IChipProps, Omit<ChipVariantProps, 'variant' | 'color'> {
|
|
44
|
+
/**
|
|
45
|
+
* Visual style variant.
|
|
46
|
+
* @default 'subtle'
|
|
47
|
+
*/
|
|
48
|
+
variant?:
|
|
49
|
+
| ChipVariant
|
|
50
|
+
/** @deprecated Use `'subtle'` instead. */
|
|
51
|
+
| 'tint';
|
|
52
|
+
/**
|
|
53
|
+
* Color theme applied to the chip surface and content.
|
|
54
|
+
* @default 'neutral'
|
|
55
|
+
*/
|
|
56
|
+
color?:
|
|
57
|
+
| ChipColor
|
|
58
|
+
/** @deprecated Use `'neutral'` instead. */
|
|
59
|
+
| 'default';
|
|
31
60
|
className?: string;
|
|
32
61
|
children?: ReactNode;
|
|
33
62
|
}
|
|
34
63
|
|
|
35
64
|
const ChipRoot = forwardRef<View, ChipProps>(
|
|
36
65
|
(
|
|
37
|
-
{
|
|
66
|
+
{
|
|
67
|
+
children,
|
|
68
|
+
variant: variantProp = 'subtle',
|
|
69
|
+
size = 'default',
|
|
70
|
+
color: colorProp = 'neutral',
|
|
71
|
+
className,
|
|
72
|
+
style,
|
|
73
|
+
...props
|
|
74
|
+
},
|
|
38
75
|
ref,
|
|
39
76
|
) => {
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (__DEV__ && variantProp === 'tint' && !hasWarnedChipTintVariant) {
|
|
79
|
+
hasWarnedChipTintVariant = true;
|
|
80
|
+
console.warn(
|
|
81
|
+
'[Chip] The `tint` variant is deprecated and will be removed in a future major release. Use `subtle` instead.',
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}, [variantProp]);
|
|
85
|
+
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (__DEV__ && colorProp === 'default' && !hasWarnedChipDefaultColor) {
|
|
88
|
+
hasWarnedChipDefaultColor = true;
|
|
89
|
+
console.warn(
|
|
90
|
+
'[Chip] The `default` color is deprecated and will be removed in a future major release. Use `neutral` instead.',
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}, [colorProp]);
|
|
94
|
+
|
|
95
|
+
const variant = variantProp === 'tint' ? 'subtle' : variantProp;
|
|
96
|
+
const color = colorProp === 'default' ? 'neutral' : colorProp;
|
|
97
|
+
|
|
40
98
|
const parent = useParentContext();
|
|
41
99
|
const ctx = useMemo(
|
|
42
100
|
() => ({ ...parent, [SCOPE]: { variant, size, color } }),
|