@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,311 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Children,
|
|
3
|
+
Fragment,
|
|
4
|
+
cloneElement,
|
|
5
|
+
forwardRef,
|
|
6
|
+
isValidElement,
|
|
7
|
+
useMemo,
|
|
8
|
+
type ReactElement,
|
|
9
|
+
type ReactNode,
|
|
10
|
+
} from 'react';
|
|
11
|
+
import { Platform, Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
12
|
+
import {
|
|
13
|
+
BreadcrumbsRoot as BreadcrumbsRootPrimitive,
|
|
14
|
+
LinkRoot as LinkRootPrimitive,
|
|
15
|
+
dataAttributes,
|
|
16
|
+
mergeDataAttributes,
|
|
17
|
+
useBreadcrumbsContext,
|
|
18
|
+
type IBreadcrumbsProps,
|
|
19
|
+
type ILinkProps,
|
|
20
|
+
} from '@cdx-ui/primitives';
|
|
21
|
+
import { cn } from '@cdx-ui/utils';
|
|
22
|
+
import {
|
|
23
|
+
breadcrumbItemVariants,
|
|
24
|
+
breadcrumbDisabledCursor,
|
|
25
|
+
breadcrumbItemRootVariants,
|
|
26
|
+
breadcrumbRootVariants,
|
|
27
|
+
breadcrumbSeparatorVariants,
|
|
28
|
+
} from './styles';
|
|
29
|
+
|
|
30
|
+
export type { BreadcrumbColor } from '@cdx-ui/primitives';
|
|
31
|
+
export type { BreadcrumbVariantProps } from './styles';
|
|
32
|
+
|
|
33
|
+
type BreadcrumbItemState = 'current' | 'ancestor' | 'disabled';
|
|
34
|
+
|
|
35
|
+
export interface BreadcrumbsProps extends IBreadcrumbsProps {
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Separator rendered between breadcrumb items.
|
|
39
|
+
* @default `/`
|
|
40
|
+
*/
|
|
41
|
+
separator?: ReactNode;
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface BreadcrumbItemInternalProps {
|
|
46
|
+
isLast?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface BreadcrumbsItemProps extends Omit<ILinkProps, 'children' | 'disabled'> {
|
|
50
|
+
className?: string;
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isBreadcrumbsItemElement(
|
|
55
|
+
child: unknown,
|
|
56
|
+
): child is ReactElement<BreadcrumbsItemProps & BreadcrumbItemInternalProps> {
|
|
57
|
+
if (!isValidElement(child)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const type = child.type as { displayName?: string };
|
|
61
|
+
return type.displayName === 'Breadcrumbs.Item';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function isTextOnlyChild(children: ReactNode): children is string | number {
|
|
65
|
+
return typeof children === 'string' || typeof children === 'number';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function BreadcrumbItemContent({
|
|
69
|
+
children,
|
|
70
|
+
className,
|
|
71
|
+
state,
|
|
72
|
+
}: {
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
className: string;
|
|
75
|
+
state: BreadcrumbItemState;
|
|
76
|
+
}) {
|
|
77
|
+
if (isTextOnlyChild(children)) {
|
|
78
|
+
return (
|
|
79
|
+
<Text className={className} {...dataAttributes({ state })}>
|
|
80
|
+
{children}
|
|
81
|
+
</Text>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<View className={cn('flex-row items-center gap-1', className)} {...dataAttributes({ state })}>
|
|
87
|
+
{children}
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function BreadcrumbsSeparator({ separator }: { separator: ReactNode }) {
|
|
93
|
+
const { isDisabled } = useBreadcrumbsContext();
|
|
94
|
+
const disabledClassName = isDisabled ? breadcrumbDisabledCursor : undefined;
|
|
95
|
+
const slotProps = mergeDataAttributes({}, dataAttributes({ slot: 'breadcrumbs-separator' }));
|
|
96
|
+
const a11yProps = {
|
|
97
|
+
accessibilityElementsHidden: true,
|
|
98
|
+
importantForAccessibility: 'no-hide-descendants' as const,
|
|
99
|
+
'aria-hidden': true,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
if (isTextOnlyChild(separator)) {
|
|
103
|
+
return (
|
|
104
|
+
<Text
|
|
105
|
+
className={cn(breadcrumbSeparatorVariants(), disabledClassName)}
|
|
106
|
+
{...a11yProps}
|
|
107
|
+
{...slotProps}
|
|
108
|
+
>
|
|
109
|
+
{separator}
|
|
110
|
+
</Text>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<View
|
|
116
|
+
className={cn(
|
|
117
|
+
breadcrumbSeparatorVariants(),
|
|
118
|
+
'items-center justify-center px-1',
|
|
119
|
+
disabledClassName,
|
|
120
|
+
)}
|
|
121
|
+
{...a11yProps}
|
|
122
|
+
{...slotProps}
|
|
123
|
+
>
|
|
124
|
+
{separator}
|
|
125
|
+
</View>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const BreadcrumbsRoot = forwardRef<View, BreadcrumbsProps>(
|
|
130
|
+
(
|
|
131
|
+
{
|
|
132
|
+
className,
|
|
133
|
+
style,
|
|
134
|
+
children,
|
|
135
|
+
separator = '/',
|
|
136
|
+
isDisabled = false,
|
|
137
|
+
isUnderlined = false,
|
|
138
|
+
color = 'neutral',
|
|
139
|
+
accessibilityLabel,
|
|
140
|
+
...props
|
|
141
|
+
},
|
|
142
|
+
ref,
|
|
143
|
+
) => {
|
|
144
|
+
const items = useMemo(
|
|
145
|
+
() => Children.toArray(children).filter(isBreadcrumbsItemElement),
|
|
146
|
+
[children],
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
const computedClassName = cn(breadcrumbRootVariants(), className);
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<BreadcrumbsRootPrimitive
|
|
153
|
+
ref={ref}
|
|
154
|
+
className={computedClassName}
|
|
155
|
+
style={style}
|
|
156
|
+
isDisabled={isDisabled}
|
|
157
|
+
isUnderlined={isUnderlined}
|
|
158
|
+
color={color}
|
|
159
|
+
accessibilityLabel={accessibilityLabel}
|
|
160
|
+
{...props}
|
|
161
|
+
>
|
|
162
|
+
{items.map((child, index) => {
|
|
163
|
+
const isLast = index === items.length - 1;
|
|
164
|
+
const item = cloneElement(child, { isLast });
|
|
165
|
+
|
|
166
|
+
if (isLast) {
|
|
167
|
+
return (
|
|
168
|
+
<Fragment key={child.key ?? `breadcrumb-item-${String(index)}`}>{item}</Fragment>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<Fragment key={child.key ?? `breadcrumb-item-${String(index)}`}>
|
|
174
|
+
{item}
|
|
175
|
+
<BreadcrumbsSeparator separator={separator} />
|
|
176
|
+
</Fragment>
|
|
177
|
+
);
|
|
178
|
+
})}
|
|
179
|
+
</BreadcrumbsRootPrimitive>
|
|
180
|
+
);
|
|
181
|
+
},
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
BreadcrumbsRoot.displayName = 'Breadcrumbs';
|
|
185
|
+
|
|
186
|
+
function resolveStaticStyle(style: ILinkProps['style']): ViewProps['style'] {
|
|
187
|
+
return typeof style === 'function' ? undefined : style;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function getItemState(isLast: boolean, isDisabled: boolean): BreadcrumbItemState {
|
|
191
|
+
if (isLast) {
|
|
192
|
+
return 'current';
|
|
193
|
+
}
|
|
194
|
+
if (isDisabled) {
|
|
195
|
+
return 'disabled';
|
|
196
|
+
}
|
|
197
|
+
return 'ancestor';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const BreadcrumbsItem = forwardRef<View, BreadcrumbsItemProps & BreadcrumbItemInternalProps>(
|
|
201
|
+
(
|
|
202
|
+
{ className, style, children, href, onPress, action, webProps, isLast = false, ...props },
|
|
203
|
+
ref,
|
|
204
|
+
) => {
|
|
205
|
+
const { isDisabled, isUnderlined, color } = useBreadcrumbsContext();
|
|
206
|
+
const state = getItemState(isLast, isDisabled);
|
|
207
|
+
const isInteractive = !isDisabled && !isLast && !!href;
|
|
208
|
+
|
|
209
|
+
const labelClassName = cn(
|
|
210
|
+
breadcrumbItemVariants({
|
|
211
|
+
isUnderlined,
|
|
212
|
+
color,
|
|
213
|
+
}),
|
|
214
|
+
isDisabled ? breadcrumbDisabledCursor : undefined,
|
|
215
|
+
className,
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const currentPageProps =
|
|
219
|
+
Platform.OS === 'web' && isLast ? ({ 'aria-current': 'page' as const } as const) : {};
|
|
220
|
+
const nativeCurrentPageProps =
|
|
221
|
+
Platform.OS !== 'web' && isLast
|
|
222
|
+
? ({
|
|
223
|
+
accessibilityState: {
|
|
224
|
+
...props.accessibilityState,
|
|
225
|
+
selected: true,
|
|
226
|
+
},
|
|
227
|
+
} as const)
|
|
228
|
+
: {};
|
|
229
|
+
|
|
230
|
+
if (isInteractive) {
|
|
231
|
+
return (
|
|
232
|
+
<LinkRootPrimitive
|
|
233
|
+
ref={ref}
|
|
234
|
+
href={href}
|
|
235
|
+
onPress={onPress}
|
|
236
|
+
action={action}
|
|
237
|
+
webProps={webProps}
|
|
238
|
+
className={breadcrumbItemRootVariants()}
|
|
239
|
+
style={style}
|
|
240
|
+
{...props}
|
|
241
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'breadcrumbs-item', state }))}
|
|
242
|
+
>
|
|
243
|
+
<BreadcrumbItemContent className={labelClassName} state={state}>
|
|
244
|
+
{children}
|
|
245
|
+
</BreadcrumbItemContent>
|
|
246
|
+
</LinkRootPrimitive>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const staticStyle = resolveStaticStyle(style);
|
|
251
|
+
|
|
252
|
+
if (isTextOnlyChild(children)) {
|
|
253
|
+
return (
|
|
254
|
+
<Text
|
|
255
|
+
ref={ref as never}
|
|
256
|
+
className={cn(breadcrumbItemRootVariants(), labelClassName)}
|
|
257
|
+
style={staticStyle}
|
|
258
|
+
accessibilityRole={isLast ? 'text' : undefined}
|
|
259
|
+
{...(props as TextProps)}
|
|
260
|
+
{...currentPageProps}
|
|
261
|
+
{...nativeCurrentPageProps}
|
|
262
|
+
{...mergeDataAttributes(
|
|
263
|
+
props,
|
|
264
|
+
dataAttributes({
|
|
265
|
+
slot: 'breadcrumbs-item',
|
|
266
|
+
state,
|
|
267
|
+
}),
|
|
268
|
+
)}
|
|
269
|
+
>
|
|
270
|
+
{children}
|
|
271
|
+
</Text>
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return (
|
|
276
|
+
<View
|
|
277
|
+
ref={ref}
|
|
278
|
+
className={cn(
|
|
279
|
+
breadcrumbItemRootVariants(),
|
|
280
|
+
'flex-row items-center',
|
|
281
|
+
isDisabled && breadcrumbDisabledCursor,
|
|
282
|
+
)}
|
|
283
|
+
style={staticStyle}
|
|
284
|
+
{...(props as ViewProps)}
|
|
285
|
+
{...currentPageProps}
|
|
286
|
+
{...nativeCurrentPageProps}
|
|
287
|
+
{...mergeDataAttributes(
|
|
288
|
+
props,
|
|
289
|
+
dataAttributes({
|
|
290
|
+
slot: 'breadcrumbs-item',
|
|
291
|
+
state,
|
|
292
|
+
}),
|
|
293
|
+
)}
|
|
294
|
+
>
|
|
295
|
+
<BreadcrumbItemContent className={labelClassName} state={state}>
|
|
296
|
+
{children}
|
|
297
|
+
</BreadcrumbItemContent>
|
|
298
|
+
</View>
|
|
299
|
+
);
|
|
300
|
+
},
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
BreadcrumbsItem.displayName = 'Breadcrumbs.Item';
|
|
304
|
+
|
|
305
|
+
type BreadcrumbsCompoundComponent = typeof BreadcrumbsRoot & {
|
|
306
|
+
Item: typeof BreadcrumbsItem;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const Breadcrumbs = Object.assign(BreadcrumbsRoot, {
|
|
310
|
+
Item: BreadcrumbsItem,
|
|
311
|
+
}) as BreadcrumbsCompoundComponent;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
3
|
+
import type { BreadcrumbColor } from '@cdx-ui/primitives';
|
|
4
|
+
import { TRANSITION_COLORS } from '../../styles/constants';
|
|
5
|
+
|
|
6
|
+
export const breadcrumbRootVariants = cva([
|
|
7
|
+
'flex-row flex-wrap items-center',
|
|
8
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
9
|
+
'web:data-[disabled=true]:cursor-not-allowed',
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
export const breadcrumbDisabledCursor = 'web:cursor-not-allowed';
|
|
13
|
+
|
|
14
|
+
export const breadcrumbSeparatorVariants = cva(['body-md text-content-tertiary select-none px-1']);
|
|
15
|
+
|
|
16
|
+
export const breadcrumbItemRootVariants = cva([
|
|
17
|
+
'self-start',
|
|
18
|
+
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
19
|
+
'web:data-[focus-visible=true]:rounded-[2px]',
|
|
20
|
+
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const breadcrumbColorVariants = {
|
|
24
|
+
neutral: '',
|
|
25
|
+
action:
|
|
26
|
+
'data-[state=ancestor]:text-content-action data-[state=ancestor]:border-content-action web:data-[state=ancestor]:hover:text-content-primary',
|
|
27
|
+
danger:
|
|
28
|
+
'data-[state=ancestor]:text-content-danger data-[state=ancestor]:border-content-danger web:data-[state=ancestor]:hover:text-content-primary',
|
|
29
|
+
warning:
|
|
30
|
+
'data-[state=ancestor]:text-content-warning data-[state=ancestor]:border-content-warning web:data-[state=ancestor]:hover:text-content-primary',
|
|
31
|
+
success:
|
|
32
|
+
'data-[state=ancestor]:text-content-success data-[state=ancestor]:border-content-success web:data-[state=ancestor]:hover:text-content-primary',
|
|
33
|
+
info: 'data-[state=ancestor]:text-content-info data-[state=ancestor]:border-content-info web:data-[state=ancestor]:hover:text-content-primary',
|
|
34
|
+
} satisfies Record<BreadcrumbColor, string>;
|
|
35
|
+
|
|
36
|
+
export const breadcrumbItemVariants = cva(
|
|
37
|
+
[
|
|
38
|
+
'body-md',
|
|
39
|
+
TRANSITION_COLORS,
|
|
40
|
+
'data-[state=current]:text-content-primary',
|
|
41
|
+
'data-[state=ancestor]:text-content-secondary',
|
|
42
|
+
'data-[state=disabled]:text-content-tertiary',
|
|
43
|
+
],
|
|
44
|
+
{
|
|
45
|
+
variants: {
|
|
46
|
+
isUnderlined: {
|
|
47
|
+
true: Platform.select({
|
|
48
|
+
web: 'data-[state=ancestor]:underline data-[state=ancestor]:underline-offset-4',
|
|
49
|
+
default:
|
|
50
|
+
'data-[state=ancestor]:border-b data-[state=ancestor]:border-content-secondary data-[state=ancestor]:pb-0.5',
|
|
51
|
+
}),
|
|
52
|
+
false: '',
|
|
53
|
+
},
|
|
54
|
+
color: breadcrumbColorVariants,
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
isUnderlined: false,
|
|
58
|
+
color: 'neutral',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export type BreadcrumbVariantProps = VariantProps<typeof breadcrumbItemVariants>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef,
|
|
1
|
+
import React, { forwardRef, useMemo, type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ActivityIndicator,
|
|
4
4
|
Text,
|
|
@@ -45,31 +45,42 @@ const useButtonStyleContext = () => useStyleContext(SCOPE) as ButtonVariantProps
|
|
|
45
45
|
|
|
46
46
|
export type ButtonVariant = 'solid' | 'outline' | 'ghost';
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
extends PressableProps, IButtonProps, Omit<ButtonVariantProps, 'variant'> {
|
|
48
|
+
export interface ButtonProps extends PressableProps, IButtonProps {
|
|
49
|
+
/**
|
|
50
|
+
* Render the consumer's child element in place of the default `Pressable` host —
|
|
51
|
+
* merges Button's props onto the child instead of wrapping it (e.g. `<Button asChild><Link /></Button>`).
|
|
52
|
+
*/
|
|
53
|
+
asChild?: boolean;
|
|
55
54
|
/**
|
|
56
55
|
* Visual style variant.
|
|
57
56
|
* @default 'solid'
|
|
58
57
|
*/
|
|
59
|
-
variant?:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
variant?: ButtonVariant;
|
|
59
|
+
/**
|
|
60
|
+
* Color theme applied to the button surface and content.
|
|
61
|
+
* @default 'action'
|
|
62
|
+
*/
|
|
63
|
+
color?: 'action' | 'danger' | 'warning' | 'success' | 'info';
|
|
64
|
+
/**
|
|
65
|
+
* Height and horizontal padding scale.
|
|
66
|
+
* @default 'default'
|
|
67
|
+
*/
|
|
68
|
+
size?: 'default' | 'small';
|
|
69
|
+
/**
|
|
70
|
+
* Stretch the button to fill the width of its container.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
fullWidth?: boolean;
|
|
74
|
+
/** Additional Uniwind/Tailwind classes, merged after the button's own styles. */
|
|
65
75
|
className?: string;
|
|
76
|
+
/** Button content — typically `Button.Label`, `Button.Icon`, and/or `Button.Spinner`. */
|
|
66
77
|
children?: ReactNode;
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
const ButtonRoot = forwardRef<View, ButtonProps>(
|
|
70
81
|
(
|
|
71
82
|
{
|
|
72
|
-
variant
|
|
83
|
+
variant = 'solid',
|
|
73
84
|
color = 'action',
|
|
74
85
|
size = 'default',
|
|
75
86
|
fullWidth = false,
|
|
@@ -80,17 +91,6 @@ const ButtonRoot = forwardRef<View, ButtonProps>(
|
|
|
80
91
|
},
|
|
81
92
|
ref,
|
|
82
93
|
) => {
|
|
83
|
-
// TODO: Remove this once the `strong` variant is removed.
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
if (__DEV__ && variantProp === 'strong' && !hasWarnedStrongButtonVariant) {
|
|
86
|
-
hasWarnedStrongButtonVariant = true;
|
|
87
|
-
console.warn(
|
|
88
|
-
'[Button] The `strong` variant is deprecated and will be removed in a future major release. Use `solid` instead.',
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}, [variantProp]);
|
|
92
|
-
|
|
93
|
-
const variant = variantProp === 'strong' ? 'solid' : variantProp;
|
|
94
94
|
const computedClassName = cn(
|
|
95
95
|
buttonRootVariants({ variant, color, size, fullWidth }),
|
|
96
96
|
className,
|
|
@@ -125,8 +125,11 @@ ButtonRoot.displayName = 'Button';
|
|
|
125
125
|
// =============================================================================
|
|
126
126
|
|
|
127
127
|
export interface ButtonLabelProps extends TextProps {
|
|
128
|
+
/** Render the consumer's child element in place of the default `Text` host. */
|
|
128
129
|
asChild?: boolean;
|
|
130
|
+
/** Additional Uniwind/Tailwind classes, merged after the label's own styles. */
|
|
129
131
|
className?: string;
|
|
132
|
+
/** Label content (or a custom element when `asChild` is set). */
|
|
130
133
|
children?: ReactNode;
|
|
131
134
|
}
|
|
132
135
|
|
|
@@ -158,13 +161,24 @@ ButtonLabel.displayName = 'Button.Label';
|
|
|
158
161
|
|
|
159
162
|
// TODO: Use ButtonGroupVariantProps
|
|
160
163
|
export interface ButtonGroupProps extends Omit<ViewProps, 'children'> {
|
|
164
|
+
/** Render the consumer's child element in place of the default `View` host. */
|
|
161
165
|
asChild?: boolean;
|
|
166
|
+
/** Additional Uniwind/Tailwind classes, merged after the group's own styles. */
|
|
162
167
|
className?: string;
|
|
168
|
+
/** The buttons to group together. */
|
|
163
169
|
children: ReactElement | ReactElement[];
|
|
170
|
+
/**
|
|
171
|
+
* Layout direction of the grouped buttons.
|
|
172
|
+
* @default 'row'
|
|
173
|
+
*/
|
|
164
174
|
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
175
|
+
/** Disable every button in the group. */
|
|
165
176
|
isDisabled?: boolean;
|
|
177
|
+
/** Remove the gap between buttons and merge their adjoining borders. */
|
|
166
178
|
isAttached?: boolean;
|
|
179
|
+
/** Reverse the visual order of the buttons. */
|
|
167
180
|
reversed?: boolean;
|
|
181
|
+
/** Alias of `reversed`. */
|
|
168
182
|
isReversed?: boolean;
|
|
169
183
|
}
|
|
170
184
|
|
|
@@ -264,6 +278,7 @@ ButtonGroup.displayName = 'Button.Group';
|
|
|
264
278
|
// =============================================================================
|
|
265
279
|
|
|
266
280
|
export interface ButtonIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
281
|
+
/** Render the consumer's child element in place of the default icon host. */
|
|
267
282
|
asChild?: boolean;
|
|
268
283
|
/**
|
|
269
284
|
* Forge icon component to render. Required unless `asChild` is set, in which
|
|
@@ -323,8 +338,11 @@ ButtonIcon.displayName = 'Button.Icon';
|
|
|
323
338
|
// =============================================================================
|
|
324
339
|
|
|
325
340
|
export interface ButtonSpinnerProps extends ActivityIndicatorProps {
|
|
341
|
+
/** Render the consumer's child element in place of the default `ActivityIndicator` host. */
|
|
326
342
|
asChild?: boolean;
|
|
343
|
+
/** Additional Uniwind/Tailwind classes for the spinner container. */
|
|
327
344
|
className?: string;
|
|
345
|
+
/** Uniwind `accent-*` color class override for the spinner. */
|
|
328
346
|
colorClassName?: string;
|
|
329
347
|
/**
|
|
330
348
|
* Position hint that emits `data-icon="inline-start"` or `data-icon="inline-end"`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
import { cva, type VariantProps } from '
|
|
3
|
-
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/
|
|
2
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
3
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
|
|
4
4
|
|
|
5
5
|
// TODO: Validate that `dark:` syntax works with Uniwind `ScopedTheme`
|
|
6
6
|
|
|
@@ -67,8 +67,8 @@ export const buttonRootVariants = cva(
|
|
|
67
67
|
className: [
|
|
68
68
|
'bg-surface-warning-strong',
|
|
69
69
|
Platform.select({
|
|
70
|
-
default: 'data-[active=true]:bg-
|
|
71
|
-
web: 'data-[hover=true]:bg-
|
|
70
|
+
default: 'data-[active=true]:bg-surface-warning-strong-active',
|
|
71
|
+
web: 'data-[hover=true]:bg-surface-warning-strong-hover data-[active=true]:data-[hover=true]:bg-surface-warning-strong-active',
|
|
72
72
|
}),
|
|
73
73
|
],
|
|
74
74
|
},
|
|
@@ -78,8 +78,8 @@ export const buttonRootVariants = cva(
|
|
|
78
78
|
className: [
|
|
79
79
|
'bg-surface-success-strong',
|
|
80
80
|
Platform.select({
|
|
81
|
-
default: 'data-[active=true]:bg-
|
|
82
|
-
web: 'data-[hover=true]:bg-
|
|
81
|
+
default: 'data-[active=true]:bg-surface-success-strong-active',
|
|
82
|
+
web: 'data-[hover=true]:bg-surface-success-strong-hover data-[active=true]:data-[hover=true]:bg-surface-success-strong-active',
|
|
83
83
|
}),
|
|
84
84
|
],
|
|
85
85
|
},
|
|
@@ -89,8 +89,8 @@ export const buttonRootVariants = cva(
|
|
|
89
89
|
className: [
|
|
90
90
|
'bg-surface-info-strong',
|
|
91
91
|
Platform.select({
|
|
92
|
-
default: 'data-[active=true]:bg-
|
|
93
|
-
web: 'data-[hover=true]:bg-
|
|
92
|
+
default: 'data-[active=true]:bg-surface-info-strong-active',
|
|
93
|
+
web: 'data-[hover=true]:bg-surface-info-strong-hover data-[active=true]:data-[hover=true]:bg-surface-info-strong-active',
|
|
94
94
|
}),
|
|
95
95
|
],
|
|
96
96
|
},
|
|
@@ -102,8 +102,8 @@ export const buttonRootVariants = cva(
|
|
|
102
102
|
className: [
|
|
103
103
|
'border-stroke-action',
|
|
104
104
|
Platform.select({
|
|
105
|
-
default: 'data-[active=true]:bg-surface-action-
|
|
106
|
-
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-
|
|
105
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
106
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
|
|
107
107
|
}),
|
|
108
108
|
],
|
|
109
109
|
},
|
|
@@ -113,8 +113,8 @@ export const buttonRootVariants = cva(
|
|
|
113
113
|
className: [
|
|
114
114
|
'border-stroke-danger',
|
|
115
115
|
Platform.select({
|
|
116
|
-
default: 'data-[active=true]:bg-surface-danger-
|
|
117
|
-
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-
|
|
116
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
117
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
|
|
118
118
|
}),
|
|
119
119
|
],
|
|
120
120
|
},
|
|
@@ -124,8 +124,8 @@ export const buttonRootVariants = cva(
|
|
|
124
124
|
className: [
|
|
125
125
|
'border-stroke-warning',
|
|
126
126
|
Platform.select({
|
|
127
|
-
default: 'data-[active=true]:bg-surface-warning-
|
|
128
|
-
web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-
|
|
127
|
+
default: 'data-[active=true]:bg-surface-warning-tint-active',
|
|
128
|
+
web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
|
|
129
129
|
}),
|
|
130
130
|
],
|
|
131
131
|
},
|
|
@@ -135,8 +135,8 @@ export const buttonRootVariants = cva(
|
|
|
135
135
|
className: [
|
|
136
136
|
'border-stroke-success',
|
|
137
137
|
Platform.select({
|
|
138
|
-
default: 'data-[active=true]:bg-surface-success-
|
|
139
|
-
web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-
|
|
138
|
+
default: 'data-[active=true]:bg-surface-success-tint-active',
|
|
139
|
+
web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
|
|
140
140
|
}),
|
|
141
141
|
],
|
|
142
142
|
},
|
|
@@ -146,8 +146,8 @@ export const buttonRootVariants = cva(
|
|
|
146
146
|
className: [
|
|
147
147
|
'border-stroke-info',
|
|
148
148
|
Platform.select({
|
|
149
|
-
default: 'data-[active=true]:bg-surface-info-
|
|
150
|
-
web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-
|
|
149
|
+
default: 'data-[active=true]:bg-surface-info-tint-active',
|
|
150
|
+
web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
|
|
151
151
|
}),
|
|
152
152
|
],
|
|
153
153
|
},
|
|
@@ -158,8 +158,8 @@ export const buttonRootVariants = cva(
|
|
|
158
158
|
color: 'action',
|
|
159
159
|
className: [
|
|
160
160
|
Platform.select({
|
|
161
|
-
default: 'data-[active=true]:bg-surface-action-
|
|
162
|
-
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-
|
|
161
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
162
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
|
|
163
163
|
}),
|
|
164
164
|
],
|
|
165
165
|
},
|
|
@@ -168,8 +168,8 @@ export const buttonRootVariants = cva(
|
|
|
168
168
|
color: 'danger',
|
|
169
169
|
className: [
|
|
170
170
|
Platform.select({
|
|
171
|
-
default: 'data-[active=true]:bg-surface-danger-
|
|
172
|
-
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-
|
|
171
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
172
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
|
|
173
173
|
}),
|
|
174
174
|
],
|
|
175
175
|
},
|
|
@@ -178,8 +178,8 @@ export const buttonRootVariants = cva(
|
|
|
178
178
|
color: 'warning',
|
|
179
179
|
className: [
|
|
180
180
|
Platform.select({
|
|
181
|
-
default: 'data-[active=true]:bg-surface-warning-
|
|
182
|
-
web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-
|
|
181
|
+
default: 'data-[active=true]:bg-surface-warning-tint-active',
|
|
182
|
+
web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
|
|
183
183
|
}),
|
|
184
184
|
],
|
|
185
185
|
},
|
|
@@ -188,8 +188,8 @@ export const buttonRootVariants = cva(
|
|
|
188
188
|
color: 'success',
|
|
189
189
|
className: [
|
|
190
190
|
Platform.select({
|
|
191
|
-
default: 'data-[active=true]:bg-surface-success-
|
|
192
|
-
web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-
|
|
191
|
+
default: 'data-[active=true]:bg-surface-success-tint-active',
|
|
192
|
+
web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
|
|
193
193
|
}),
|
|
194
194
|
],
|
|
195
195
|
},
|
|
@@ -198,8 +198,8 @@ export const buttonRootVariants = cva(
|
|
|
198
198
|
color: 'info',
|
|
199
199
|
className: [
|
|
200
200
|
Platform.select({
|
|
201
|
-
default: 'data-[active=true]:bg-surface-info-
|
|
202
|
-
web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-
|
|
201
|
+
default: 'data-[active=true]:bg-surface-info-tint-active',
|
|
202
|
+
web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
|
|
203
203
|
}),
|
|
204
204
|
],
|
|
205
205
|
},
|
package/src/components/CLAUDE.md
CHANGED
|
@@ -156,8 +156,8 @@ Each `styles.ts` exports CVA variant functions and their derived `VariantProps`
|
|
|
156
156
|
|
|
157
157
|
```ts
|
|
158
158
|
import { Platform } from 'react-native';
|
|
159
|
-
import { cva, type VariantProps } from '
|
|
160
|
-
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/
|
|
159
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
160
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
|
|
161
161
|
|
|
162
162
|
export const componentRootVariants = cva(
|
|
163
163
|
[
|
|
@@ -185,7 +185,7 @@ export type ComponentVariantProps = VariantProps<typeof componentRootVariants>;
|
|
|
185
185
|
- **`data-[state]` selectors** — use `data-[disabled=true]:`, `data-[hover=true]:`, `data-[active=true]:`, `data-[focus-visible=true]:` for interaction states. Primitives emit these data attributes (Standard 1). **Interaction state is never a CVA variant input** (Standard 5). On native, prefer single-condition `data-[field-state=...]` selectors backed by a primitive-derived compound-state attribute over compound `data-[]:data-[]` chains (which only match the last condition); web may keep compound chains. See `Input/styles.ts` / `Select/styles.ts`.
|
|
186
186
|
- **`data-[icon=inline-start|inline-end]` selectors** for icon/spinner position spacing (Standard 6) — pair with logical-property utilities (`me-*`/`ms-*`) so RTL flips automatically.
|
|
187
187
|
- **`Platform.select()`** for platform-specific classes — web gets `data-[hover=true]` styles (hover exists on web); native responds only to `data-[active=true]` (press). Always set `default` (native) and `web` keys.
|
|
188
|
-
- **Shared style primitives** — import `DISABLED_CURSOR`, `TRANSITION_COLORS`, etc. from `../../styles/
|
|
188
|
+
- **Shared style primitives** — import `DISABLED_CURSOR`, `TRANSITION_COLORS`, etc. from `../../styles/constants` for cross-component consistency.
|
|
189
189
|
- **`web:` prefix** for web-only utilities — e.g., `web:outline-none`, `web:focus-visible:ring-2`.
|
|
190
190
|
- **`compoundVariants`** for variant × variant combinations where simple variant merging is insufficient.
|
|
191
191
|
- **`defaultVariants`** must match the destructured defaults in the component's `index.tsx`.
|