@seed-design/react 2.5.1 → 3.0.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/lib/components/Accordion/Accordion.cjs +2 -1
- package/lib/components/Accordion/Accordion.d.ts.map +1 -1
- package/lib/components/Accordion/Accordion.js +2 -1
- package/lib/components/ActionButton/ActionButton.cjs +1 -1
- package/lib/components/ActionButton/ActionButton.js +1 -1
- package/lib/components/AlertDialog/AlertDialog.cjs +34 -0
- package/lib/components/AlertDialog/AlertDialog.d.ts +51 -0
- package/lib/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/lib/components/AlertDialog/AlertDialog.js +24 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.cjs +22 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.d.ts +2 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.d.ts.map +1 -0
- package/lib/components/AlertDialog/AlertDialog.namespace.js +17 -0
- package/lib/components/AlertDialog/AlertDialog.test.d.ts +2 -0
- package/lib/components/AlertDialog/AlertDialog.test.d.ts.map +1 -0
- package/lib/components/AlertDialog/index.cjs +19 -0
- package/lib/components/AlertDialog/index.d.ts +3 -0
- package/lib/components/AlertDialog/index.d.ts.map +1 -0
- package/lib/components/AlertDialog/index.js +3 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.cjs +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplay.js +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +1 -1
- package/lib/components/AttachmentDisplay/index.cjs +8 -0
- package/lib/components/AttachmentDisplay/index.d.ts +2 -0
- package/lib/components/AttachmentDisplay/index.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/index.js +2 -1
- package/lib/components/AttachmentInput/AttachmentInput.cjs +1 -1
- package/lib/components/AttachmentInput/AttachmentInput.js +1 -1
- package/lib/components/AttachmentInput/AttachmentInputDropzone.cjs +1 -1
- package/lib/components/AttachmentInput/AttachmentInputDropzone.js +1 -1
- package/lib/components/AttachmentInput/AttachmentInputItem.cjs +2 -2
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -1
- package/lib/components/AttachmentInput/AttachmentInputItem.js +2 -2
- package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +1 -1
- package/lib/components/AttachmentInput/AttachmentInputTrigger.js +1 -1
- package/lib/components/AttachmentInput/index.cjs +8 -0
- package/lib/components/AttachmentInput/index.d.ts +2 -0
- package/lib/components/AttachmentInput/index.d.ts.map +1 -1
- package/lib/components/AttachmentInput/index.js +2 -1
- package/lib/components/Badge/Badge.cjs +52 -10
- package/lib/components/Badge/Badge.d.ts +13 -4
- package/lib/components/Badge/Badge.d.ts.map +1 -1
- package/lib/components/Badge/Badge.js +49 -11
- package/lib/components/Badge/Badge.namespace.cjs +16 -0
- package/lib/components/Badge/Badge.namespace.d.ts +2 -0
- package/lib/components/Badge/Badge.namespace.d.ts.map +1 -0
- package/lib/components/Badge/Badge.namespace.js +11 -0
- package/lib/components/Badge/Badge.test.d.ts +2 -0
- package/lib/components/Badge/Badge.test.d.ts.map +1 -0
- package/lib/components/Badge/index.cjs +11 -1
- package/lib/components/Badge/index.d.ts +2 -1
- package/lib/components/Badge/index.d.ts.map +1 -1
- package/lib/components/Badge/index.js +3 -2
- package/lib/components/Box/Box.test.d.ts +2 -0
- package/lib/components/Box/Box.test.d.ts.map +1 -0
- package/lib/components/Checkbox/Checkbox.cjs +2 -2
- package/lib/components/Checkbox/Checkbox.d.ts +3 -1
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -2
- package/lib/components/Checkbox/Checkbox.namespace.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -1
- package/lib/components/Checkbox/index.d.ts +1 -1
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Chip/Chip.cjs +13 -5
- package/lib/components/Chip/Chip.d.ts +13 -2
- package/lib/components/Chip/Chip.d.ts.map +1 -1
- package/lib/components/Chip/Chip.js +10 -5
- package/lib/components/Chip/Chip.namespace.cjs +5 -2
- package/lib/components/Chip/Chip.namespace.d.ts +1 -1
- package/lib/components/Chip/Chip.namespace.d.ts.map +1 -1
- package/lib/components/Chip/Chip.namespace.js +6 -3
- package/lib/components/Chip/index.cjs +4 -1
- package/lib/components/Chip/index.d.ts +1 -1
- package/lib/components/Chip/index.d.ts.map +1 -1
- package/lib/components/Chip/index.js +2 -2
- package/lib/components/ChipTabs/ChipTabs.cjs +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +1 -1
- package/lib/components/DatePicker/DatePicker.cjs +192 -190
- package/lib/components/DatePicker/DatePicker.d.ts +50 -21
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +189 -187
- package/lib/components/DatePicker/DatePicker.namespace.cjs +16 -0
- package/lib/components/DatePicker/DatePicker.namespace.d.ts +2 -0
- package/lib/components/DatePicker/DatePicker.namespace.d.ts.map +1 -0
- package/lib/components/DatePicker/DatePicker.namespace.js +11 -0
- package/lib/components/DatePicker/index.cjs +11 -4
- package/lib/components/DatePicker/index.d.ts +3 -2
- package/lib/components/DatePicker/index.d.ts.map +1 -1
- package/lib/components/DatePicker/index.js +3 -2
- package/lib/components/Dialog/Dialog.cjs +84 -9
- package/lib/components/Dialog/Dialog.d.ts +21 -14
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +80 -9
- package/lib/components/Dialog/Dialog.namespace.cjs +2 -0
- package/lib/components/Dialog/Dialog.namespace.d.ts +1 -1
- package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.namespace.js +3 -1
- package/lib/components/Dialog/index.cjs +2 -0
- package/lib/components/Dialog/index.d.ts +1 -1
- package/lib/components/Dialog/index.d.ts.map +1 -1
- package/lib/components/Dialog/index.js +2 -2
- package/lib/components/HelpBubble/HelpBubble.cjs +18 -5
- package/lib/components/HelpBubble/HelpBubble.d.ts +5 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +18 -5
- package/lib/components/HelpBubble/HelpBubble.test.d.ts +2 -0
- package/lib/components/HelpBubble/HelpBubble.test.d.ts.map +1 -0
- package/lib/components/ImageFrame/ImageFrame.cjs +5 -4
- package/lib/components/ImageFrame/ImageFrame.d.ts +2 -2
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +6 -5
- package/lib/components/List/List.cjs +14 -3
- package/lib/components/List/List.d.ts +15 -0
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js +11 -4
- package/lib/components/List/List.namespace.cjs +4 -0
- package/lib/components/List/List.namespace.d.ts +1 -1
- package/lib/components/List/List.namespace.d.ts.map +1 -1
- package/lib/components/List/List.namespace.js +5 -1
- package/lib/components/List/index.cjs +4 -0
- package/lib/components/List/index.d.ts +1 -1
- package/lib/components/List/index.d.ts.map +1 -1
- package/lib/components/List/index.js +2 -2
- package/lib/components/Menu/Menu.cjs +3 -2
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +3 -2
- package/lib/components/MenuSheet/MenuSheet.cjs +4 -3
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +4 -3
- package/lib/components/NavigationMenu/NavigationMenu.cjs +4 -3
- package/lib/components/NavigationMenu/NavigationMenu.d.ts.map +1 -1
- package/lib/components/NavigationMenu/NavigationMenu.js +4 -3
- package/lib/components/PageBanner/PageBanner.cjs +3 -2
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.js +3 -2
- package/lib/components/{ContentDialog/ContentDialog.cjs → Popover/Popover.cjs} +61 -40
- package/lib/components/Popover/Popover.d.ts +69 -0
- package/lib/components/Popover/Popover.d.ts.map +1 -0
- package/lib/components/{ContentDialog/ContentDialog.js → Popover/Popover.js} +49 -29
- package/lib/components/Popover/Popover.namespace.cjs +26 -0
- package/lib/components/Popover/Popover.namespace.d.ts +2 -0
- package/lib/components/Popover/Popover.namespace.d.ts.map +1 -0
- package/lib/components/Popover/Popover.namespace.js +21 -0
- package/lib/components/Popover/Popover.test.d.ts +2 -0
- package/lib/components/Popover/Popover.test.d.ts.map +1 -0
- package/lib/components/Popover/index.cjs +23 -0
- package/lib/components/Popover/index.d.ts +3 -0
- package/lib/components/Popover/index.d.ts.map +1 -0
- package/lib/components/Popover/index.js +3 -0
- package/lib/components/QuantityPicker/QuantityPicker.d.ts.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.cjs +2 -2
- package/lib/components/RadioGroup/RadioGroup.d.ts +2 -0
- package/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +2 -2
- package/lib/components/RadioGroup/RadioGroup.namespace.d.ts +1 -1
- package/lib/components/RadioGroup/RadioGroup.namespace.d.ts.map +1 -1
- package/lib/components/RadioGroup/index.d.ts +1 -1
- package/lib/components/RadioGroup/index.d.ts.map +1 -1
- package/lib/components/RadioGroupField/RadioGroupField.cjs +2 -2
- package/lib/components/RadioGroupField/RadioGroupField.d.ts +5 -1
- package/lib/components/RadioGroupField/RadioGroupField.d.ts.map +1 -1
- package/lib/components/RadioGroupField/RadioGroupField.js +2 -2
- package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts +1 -1
- package/lib/components/RadioGroupField/RadioGroupField.namespace.d.ts.map +1 -1
- package/lib/components/ReactionButton/ReactionButton.cjs +1 -1
- package/lib/components/ReactionButton/ReactionButton.js +1 -1
- package/lib/components/ResponsiveDialog/ResponsiveDialog.cjs +13 -13
- package/lib/components/ResponsiveDialog/ResponsiveDialog.d.ts +15 -15
- package/lib/components/ResponsiveDialog/ResponsiveDialog.d.ts.map +1 -1
- package/lib/components/ResponsiveDialog/ResponsiveDialog.js +13 -13
- package/lib/components/SegmentedControl/SegmentedControl.cjs +2 -1
- package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/components/SegmentedControl/SegmentedControl.js +2 -1
- package/lib/components/Select/Select.cjs +5 -4
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +5 -4
- package/lib/components/SelectBox/CheckSelectBox.cjs +20 -6
- package/lib/components/SelectBox/CheckSelectBox.d.ts +7 -0
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.js +21 -7
- package/lib/components/SelectBox/RadioSelectBox.cjs +20 -6
- package/lib/components/SelectBox/RadioSelectBox.d.ts +7 -0
- package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/RadioSelectBox.js +21 -7
- package/lib/components/SelectBox/SelectBox.test.d.ts +2 -0
- package/lib/components/SelectBox/SelectBox.test.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.cjs +2 -2
- package/lib/components/SideNavigation/SideNavigation.js +2 -2
- package/lib/components/SideNavigation/index.cjs +8 -0
- package/lib/components/SideNavigation/index.d.ts +1 -0
- package/lib/components/SideNavigation/index.d.ts.map +1 -1
- package/lib/components/SideNavigation/index.js +2 -1
- package/lib/components/SidePanel/SidePanel.d.ts +0 -12
- package/lib/components/SidePanel/SidePanel.d.ts.map +1 -1
- package/lib/components/Slider/Slider.cjs +1 -1
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/Snackbar/Snackbar.cjs +2 -2
- package/lib/components/Snackbar/Snackbar.js +2 -2
- package/lib/components/Snackbar/useSnackbarAdapter.cjs +1 -1
- package/lib/components/Snackbar/useSnackbarAdapter.js +1 -1
- package/lib/components/Stack/Stack.cjs +0 -12
- package/lib/components/Stack/Stack.d.ts +0 -8
- package/lib/components/Stack/Stack.d.ts.map +1 -1
- package/lib/components/Stack/Stack.js +1 -12
- package/lib/components/Stack/index.cjs +0 -1
- package/lib/components/Stack/index.d.ts +1 -1
- package/lib/components/Stack/index.d.ts.map +1 -1
- package/lib/components/Stack/index.js +2 -2
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +3 -2
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +3 -2
- package/lib/components/Switch/Switch.cjs +3 -3
- package/lib/components/Switch/Switch.d.ts +5 -1
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +3 -3
- package/lib/components/Switch/Switch.namespace.d.ts +1 -1
- package/lib/components/Switch/Switch.namespace.d.ts.map +1 -1
- package/lib/components/Switch/index.d.ts +1 -1
- package/lib/components/Switch/index.d.ts.map +1 -1
- package/lib/components/TagGroup/TagGroup.d.ts.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.cjs +1 -1
- package/lib/components/ToggleButton/ToggleButton.js +1 -1
- package/lib/components/WheelPicker/WheelPicker.cjs +11 -12
- package/lib/components/WheelPicker/WheelPicker.d.ts +7 -2
- package/lib/components/WheelPicker/WheelPicker.d.ts.map +1 -1
- package/lib/components/WheelPicker/WheelPicker.js +11 -12
- package/lib/components/index.cjs +90 -94
- package/lib/components/index.d.ts +2 -12
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +17 -24
- package/lib/index.cjs +116 -94
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +20 -25
- package/lib/utils/styled.cjs +3 -2
- package/lib/utils/styled.d.ts +18 -11
- package/lib/utils/styled.d.ts.map +1 -1
- package/lib/utils/styled.js +3 -2
- package/lib/utils/withContentScale.cjs +30 -0
- package/lib/utils/withContentScale.d.ts +12 -0
- package/lib/utils/withContentScale.d.ts.map +1 -0
- package/lib/utils/withContentScale.js +27 -0
- package/lib/utils/withContentScale.test.d.ts +2 -0
- package/lib/utils/withContentScale.test.d.ts.map +1 -0
- package/package.json +9 -14
- package/src/components/Accordion/Accordion.tsx +3 -3
- package/src/components/AlertDialog/AlertDialog.namespace.ts +22 -0
- package/src/components/AlertDialog/AlertDialog.test.tsx +61 -0
- package/src/components/AlertDialog/AlertDialog.tsx +115 -0
- package/src/components/AlertDialog/index.ts +24 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +2 -0
- package/src/components/AttachmentDisplay/index.ts +10 -0
- package/src/components/AttachmentInput/AttachmentInputItem.tsx +2 -0
- package/src/components/AttachmentInput/index.ts +10 -0
- package/src/components/Badge/Badge.namespace.ts +10 -0
- package/src/components/Badge/Badge.test.tsx +56 -0
- package/src/components/Badge/Badge.tsx +82 -11
- package/src/components/Badge/index.ts +12 -1
- package/src/components/Box/Box.test.tsx +88 -0
- package/src/components/Checkbox/Checkbox.namespace.ts +1 -0
- package/src/components/Checkbox/Checkbox.tsx +3 -1
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/Chip.namespace.ts +8 -2
- package/src/components/Chip/Chip.tsx +34 -7
- package/src/components/Chip/index.ts +8 -2
- package/src/components/DatePicker/DatePicker.namespace.ts +14 -0
- package/src/components/DatePicker/DatePicker.test.tsx +85 -276
- package/src/components/DatePicker/DatePicker.tsx +327 -284
- package/src/components/DatePicker/index.ts +25 -21
- package/src/components/Dialog/Dialog.namespace.ts +4 -0
- package/src/components/Dialog/Dialog.tsx +128 -10
- package/src/components/Dialog/index.ts +4 -5
- package/src/components/HelpBubble/HelpBubble.test.tsx +111 -0
- package/src/components/HelpBubble/HelpBubble.tsx +19 -3
- package/src/components/ImageFrame/ImageFrame.tsx +12 -4
- package/src/components/List/List.namespace.ts +8 -0
- package/src/components/List/List.tsx +43 -3
- package/src/components/List/index.ts +8 -0
- package/src/components/Menu/Menu.tsx +4 -3
- package/src/components/MenuSheet/MenuSheet.tsx +20 -17
- package/src/components/NavigationMenu/NavigationMenu.tsx +20 -17
- package/src/components/PageBanner/PageBanner.tsx +6 -3
- package/src/components/Popover/Popover.namespace.ts +30 -0
- package/src/components/Popover/Popover.test.tsx +222 -0
- package/src/components/Popover/Popover.tsx +282 -0
- package/src/components/Popover/index.ts +32 -0
- package/src/components/QuantityPicker/QuantityPicker.tsx +2 -0
- package/src/components/RadioGroup/RadioGroup.namespace.ts +1 -0
- package/src/components/RadioGroup/RadioGroup.tsx +2 -0
- package/src/components/RadioGroup/index.ts +1 -0
- package/src/components/RadioGroupField/RadioGroupField.namespace.ts +1 -0
- package/src/components/RadioGroupField/RadioGroupField.tsx +5 -3
- package/src/components/ResponsiveDialog/ResponsiveDialog.tsx +45 -48
- package/src/components/SegmentedControl/SegmentedControl.tsx +3 -3
- package/src/components/Select/Select.tsx +7 -6
- package/src/components/SelectBox/CheckSelectBox.tsx +28 -10
- package/src/components/SelectBox/RadioSelectBox.tsx +28 -10
- package/src/components/SelectBox/SelectBox.test.tsx +138 -0
- package/src/components/SideNavigation/index.ts +5 -0
- package/src/components/SidePanel/SidePanel.tsx +1 -16
- package/src/components/Stack/Stack.tsx +0 -12
- package/src/components/Stack/index.ts +1 -8
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +20 -18
- package/src/components/Switch/Switch.namespace.ts +1 -0
- package/src/components/Switch/Switch.tsx +6 -3
- package/src/components/Switch/index.ts +1 -0
- package/src/components/TagGroup/TagGroup.tsx +2 -0
- package/src/components/WheelPicker/WheelPicker.test.tsx +53 -44
- package/src/components/WheelPicker/WheelPicker.tsx +24 -21
- package/src/components/index.ts +2 -12
- package/src/index.ts +25 -2
- package/src/utils/styled.tsx +72 -15
- package/src/utils/withContentScale.test.tsx +88 -0
- package/src/utils/withContentScale.tsx +48 -0
- package/lib/components/ActionChip/ActionChip.cjs +0 -15
- package/lib/components/ActionChip/ActionChip.d.ts +0 -23
- package/lib/components/ActionChip/ActionChip.d.ts.map +0 -1
- package/lib/components/ActionChip/ActionChip.js +0 -14
- package/lib/components/ActionChip/index.cjs +0 -3
- package/lib/components/ActionChip/index.d.ts +0 -2
- package/lib/components/ActionChip/index.d.ts.map +0 -1
- package/lib/components/ActionChip/index.js +0 -2
- package/lib/components/ActionSheet/ActionSheet.cjs +0 -72
- package/lib/components/ActionSheet/ActionSheet.d.ts +0 -113
- package/lib/components/ActionSheet/ActionSheet.d.ts.map +0 -1
- package/lib/components/ActionSheet/ActionSheet.js +0 -61
- package/lib/components/ActionSheet/ActionSheet.namespace.cjs +0 -23
- package/lib/components/ActionSheet/ActionSheet.namespace.d.ts +0 -2
- package/lib/components/ActionSheet/ActionSheet.namespace.d.ts.map +0 -1
- package/lib/components/ActionSheet/ActionSheet.namespace.js +0 -18
- package/lib/components/ActionSheet/index.cjs +0 -20
- package/lib/components/ActionSheet/index.d.ts +0 -3
- package/lib/components/ActionSheet/index.d.ts.map +0 -1
- package/lib/components/ActionSheet/index.js +0 -3
- package/lib/components/Columns/Columns.cjs +0 -38
- package/lib/components/Columns/Columns.d.ts +0 -22
- package/lib/components/Columns/Columns.d.ts.map +0 -1
- package/lib/components/Columns/Columns.js +0 -35
- package/lib/components/Columns/index.cjs +0 -4
- package/lib/components/Columns/index.d.ts +0 -2
- package/lib/components/Columns/index.d.ts.map +0 -1
- package/lib/components/Columns/index.js +0 -2
- package/lib/components/ContentDialog/ContentDialog.d.ts +0 -50
- package/lib/components/ContentDialog/ContentDialog.d.ts.map +0 -1
- package/lib/components/ContentDialog/ContentDialog.namespace.cjs +0 -24
- package/lib/components/ContentDialog/ContentDialog.namespace.d.ts +0 -2
- package/lib/components/ContentDialog/ContentDialog.namespace.d.ts.map +0 -1
- package/lib/components/ContentDialog/ContentDialog.namespace.js +0 -19
- package/lib/components/ContentDialog/index.cjs +0 -21
- package/lib/components/ContentDialog/index.d.ts +0 -3
- package/lib/components/ContentDialog/index.d.ts.map +0 -1
- package/lib/components/ContentDialog/index.js +0 -3
- package/lib/components/ControlChip/ControlChip.cjs +0 -15
- package/lib/components/ControlChip/ControlChip.d.ts +0 -28
- package/lib/components/ControlChip/ControlChip.d.ts.map +0 -1
- package/lib/components/ControlChip/ControlChip.js +0 -14
- package/lib/components/ControlChip/index.cjs +0 -3
- package/lib/components/ControlChip/index.d.ts +0 -2
- package/lib/components/ControlChip/index.d.ts.map +0 -1
- package/lib/components/ControlChip/index.js +0 -2
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +0 -77
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +0 -122
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts.map +0 -1
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +0 -65
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.cjs +0 -24
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts +0 -2
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts.map +0 -1
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.js +0 -19
- package/lib/components/ExtendedActionSheet/index.cjs +0 -21
- package/lib/components/ExtendedActionSheet/index.d.ts +0 -3
- package/lib/components/ExtendedActionSheet/index.d.ts.map +0 -1
- package/lib/components/ExtendedActionSheet/index.js +0 -3
- package/lib/components/ExtendedFab/ExtendedFab.cjs +0 -16
- package/lib/components/ExtendedFab/ExtendedFab.d.ts +0 -13
- package/lib/components/ExtendedFab/ExtendedFab.d.ts.map +0 -1
- package/lib/components/ExtendedFab/ExtendedFab.js +0 -15
- package/lib/components/ExtendedFab/index.cjs +0 -3
- package/lib/components/ExtendedFab/index.d.ts +0 -2
- package/lib/components/ExtendedFab/index.d.ts.map +0 -1
- package/lib/components/ExtendedFab/index.js +0 -2
- package/lib/components/Fab/Fab.cjs +0 -13
- package/lib/components/Fab/Fab.d.ts +0 -13
- package/lib/components/Fab/Fab.d.ts.map +0 -1
- package/lib/components/Fab/Fab.js +0 -12
- package/lib/components/Fab/index.cjs +0 -3
- package/lib/components/Fab/index.d.ts +0 -2
- package/lib/components/Fab/index.d.ts.map +0 -1
- package/lib/components/Fab/index.js +0 -2
- package/lib/components/Inline/Inline.cjs +0 -23
- package/lib/components/Inline/Inline.d.ts +0 -12
- package/lib/components/Inline/Inline.d.ts.map +0 -1
- package/lib/components/Inline/Inline.js +0 -21
- package/lib/components/Inline/index.cjs +0 -3
- package/lib/components/Inline/index.d.ts +0 -2
- package/lib/components/Inline/index.d.ts.map +0 -1
- package/lib/components/Inline/index.js +0 -2
- package/lib/components/InlineBanner/InlineBanner.cjs +0 -39
- package/lib/components/InlineBanner/InlineBanner.d.ts +0 -59
- package/lib/components/InlineBanner/InlineBanner.d.ts.map +0 -1
- package/lib/components/InlineBanner/InlineBanner.js +0 -33
- package/lib/components/InlineBanner/InlineBanner.namespace.cjs +0 -18
- package/lib/components/InlineBanner/InlineBanner.namespace.d.ts +0 -2
- package/lib/components/InlineBanner/InlineBanner.namespace.d.ts.map +0 -1
- package/lib/components/InlineBanner/InlineBanner.namespace.js +0 -13
- package/lib/components/InlineBanner/index.cjs +0 -15
- package/lib/components/InlineBanner/index.d.ts +0 -3
- package/lib/components/InlineBanner/index.d.ts.map +0 -1
- package/lib/components/InlineBanner/index.js +0 -3
- package/lib/components/LinkContent/LinkContent.cjs +0 -14
- package/lib/components/LinkContent/LinkContent.d.ts +0 -14
- package/lib/components/LinkContent/LinkContent.d.ts.map +0 -1
- package/lib/components/LinkContent/LinkContent.js +0 -13
- package/lib/components/LinkContent/index.cjs +0 -3
- package/lib/components/LinkContent/index.d.ts +0 -2
- package/lib/components/LinkContent/index.d.ts.map +0 -1
- package/lib/components/LinkContent/index.js +0 -2
- package/lib/components/TimePicker/TimePicker.cjs +0 -97
- package/lib/components/TimePicker/TimePicker.d.ts +0 -28
- package/lib/components/TimePicker/TimePicker.d.ts.map +0 -1
- package/lib/components/TimePicker/TimePicker.js +0 -94
- package/lib/components/TimePicker/TimePicker.test.d.ts +0 -2
- package/lib/components/TimePicker/TimePicker.test.d.ts.map +0 -1
- package/lib/components/TimePicker/index.cjs +0 -3
- package/lib/components/TimePicker/index.d.ts +0 -2
- package/lib/components/TimePicker/index.d.ts.map +0 -1
- package/lib/components/TimePicker/index.js +0 -2
- package/lib/components/private/WheelPicker.cjs +0 -63
- package/lib/components/private/WheelPicker.d.ts +0 -16
- package/lib/components/private/WheelPicker.d.ts.map +0 -1
- package/lib/components/private/WheelPicker.js +0 -59
- package/lib/components/private/WheelPicker.test.d.ts +0 -2
- package/lib/components/private/WheelPicker.test.d.ts.map +0 -1
- package/lib/primitive.cjs +0 -154
- package/lib/primitive.d.ts +0 -18
- package/lib/primitive.d.ts.map +0 -1
- package/lib/primitive.js +0 -17
- package/src/components/ActionChip/ActionChip.tsx +0 -34
- package/src/components/ActionChip/index.ts +0 -4
- package/src/components/ActionSheet/ActionSheet.namespace.ts +0 -24
- package/src/components/ActionSheet/ActionSheet.tsx +0 -192
- package/src/components/ActionSheet/index.ts +0 -26
- package/src/components/Columns/Columns.tsx +0 -50
- package/src/components/Columns/index.ts +0 -1
- package/src/components/ContentDialog/ContentDialog.namespace.ts +0 -26
- package/src/components/ContentDialog/ContentDialog.tsx +0 -224
- package/src/components/ContentDialog/index.ts +0 -33
- package/src/components/ControlChip/ControlChip.tsx +0 -38
- package/src/components/ControlChip/index.ts +0 -5
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.namespace.ts +0 -26
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +0 -220
- package/src/components/ExtendedActionSheet/index.ts +0 -28
- package/src/components/ExtendedFab/ExtendedFab.tsx +0 -25
- package/src/components/ExtendedFab/index.ts +0 -4
- package/src/components/Fab/Fab.tsx +0 -21
- package/src/components/Fab/index.ts +0 -4
- package/src/components/Inline/Inline.tsx +0 -25
- package/src/components/Inline/index.ts +0 -1
- package/src/components/InlineBanner/InlineBanner.namespace.ts +0 -14
- package/src/components/InlineBanner/InlineBanner.tsx +0 -103
- package/src/components/InlineBanner/index.ts +0 -16
- package/src/components/LinkContent/LinkContent.tsx +0 -23
- package/src/components/LinkContent/index.ts +0 -4
- package/src/components/TimePicker/TimePicker.test.tsx +0 -166
- package/src/components/TimePicker/TimePicker.tsx +0 -163
- package/src/components/TimePicker/index.ts +0 -6
- package/src/components/private/WheelPicker.test.tsx +0 -55
- package/src/components/private/WheelPicker.tsx +0 -110
- package/src/primitive.ts +0 -17
|
@@ -54,3 +54,13 @@ export {
|
|
|
54
54
|
} from "./AttachmentInputTrigger";
|
|
55
55
|
|
|
56
56
|
export * as AttachmentInput from "./AttachmentInput.namespace";
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
useFileUploadContext as useAttachmentInputContext,
|
|
60
|
+
type UseFileUploadContext as AttachmentInputContextValue,
|
|
61
|
+
} from "@seed-design/react-file-upload";
|
|
62
|
+
|
|
63
|
+
export type {
|
|
64
|
+
FileEntry as AttachmentInputFileEntry,
|
|
65
|
+
FileStatusDetails as AttachmentInputFileStatusDetails,
|
|
66
|
+
} from "@seed-design/react-file-upload";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export {
|
|
2
|
+
BadgeRoot as Root,
|
|
3
|
+
BadgePrefix as Prefix,
|
|
4
|
+
BadgeLabel as Label,
|
|
5
|
+
BadgeAction as Action,
|
|
6
|
+
type BadgeRootProps as RootProps,
|
|
7
|
+
type BadgePrefixProps as PrefixProps,
|
|
8
|
+
type BadgeLabelProps as LabelProps,
|
|
9
|
+
type BadgeActionProps as ActionProps,
|
|
10
|
+
} from "./Badge";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { badge } from "@seed-design/css/recipes/badge";
|
|
2
|
+
import { SCALE_FEEDBACK_CLASS_NAME } from "@seed-design/css/scale-feedback";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { describe, expect, it } from "bun:test";
|
|
5
|
+
import { BadgeAction, BadgeLabel, BadgePrefix, BadgeRoot } from "./Badge";
|
|
6
|
+
|
|
7
|
+
describe("Badge", () => {
|
|
8
|
+
it("applies root and label classes", () => {
|
|
9
|
+
const classNames = badge();
|
|
10
|
+
const { container } = render(
|
|
11
|
+
<BadgeRoot>
|
|
12
|
+
<BadgeLabel>New</BadgeLabel>
|
|
13
|
+
</BadgeRoot>,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
expect(container.firstElementChild).toHaveClass(classNames.root);
|
|
17
|
+
expect(container.querySelector("span span")).toHaveClass(classNames.label);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("renders prefix without an action", () => {
|
|
21
|
+
const classNames = badge();
|
|
22
|
+
const { container } = render(
|
|
23
|
+
<BadgeRoot>
|
|
24
|
+
<BadgePrefix>New</BadgePrefix>
|
|
25
|
+
</BadgeRoot>,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
expect(container.querySelector("span span")).toHaveClass(classNames.prefix);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("renders action without a prefix", () => {
|
|
32
|
+
const classNames = badge();
|
|
33
|
+
const { getByRole } = render(
|
|
34
|
+
<BadgeRoot>
|
|
35
|
+
<BadgeAction aria-label="Dismiss" />
|
|
36
|
+
</BadgeRoot>,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const action = getByRole("button", { name: "Dismiss" });
|
|
40
|
+
expect(action).toHaveClass(classNames.action, SCALE_FEEDBACK_CLASS_NAME);
|
|
41
|
+
expect(action).toHaveAttribute("type", "button");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("renders a prefix and action together", () => {
|
|
45
|
+
const classNames = badge();
|
|
46
|
+
const { getByRole, getByText } = render(
|
|
47
|
+
<BadgeRoot>
|
|
48
|
+
<BadgePrefix>New</BadgePrefix>
|
|
49
|
+
<BadgeAction aria-label="Details" />
|
|
50
|
+
</BadgeRoot>,
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
expect(getByText("New")).toHaveClass(classNames.prefix);
|
|
54
|
+
expect(getByRole("button", { name: "Details" })).toHaveClass(classNames.action);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -1,26 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
4
|
+
import { badge, type BadgeSlotName, type BadgeVariantProps } from "@seed-design/css/recipes/badge";
|
|
1
5
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
-
import {
|
|
3
|
-
import type * as React from "react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
6
|
+
import { useScaleFeedback } from "@seed-design/react-scale-feedback";
|
|
5
7
|
import clsx from "clsx";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
|
|
10
|
+
type BadgeClassNames = Record<BadgeSlotName, string>;
|
|
11
|
+
|
|
12
|
+
interface BadgeSlotContextValue {
|
|
13
|
+
classNames: BadgeClassNames;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const BadgeSlotContext = React.createContext<BadgeSlotContextValue | null>(null);
|
|
17
|
+
|
|
18
|
+
function useBadgeSlotContext() {
|
|
19
|
+
const context = React.useContext(BadgeSlotContext);
|
|
20
|
+
|
|
21
|
+
if (!context) {
|
|
22
|
+
throw new Error("Badge slots must be rendered within Badge.Root.");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return context;
|
|
26
|
+
}
|
|
6
27
|
|
|
7
28
|
////////////////////////////////////////////////////////////////////////////////////
|
|
8
29
|
|
|
9
|
-
export interface
|
|
30
|
+
export interface BadgeRootProps
|
|
10
31
|
extends BadgeVariantProps,
|
|
11
32
|
PrimitiveProps,
|
|
12
33
|
React.HTMLAttributes<HTMLSpanElement> {}
|
|
13
34
|
|
|
14
|
-
export const
|
|
15
|
-
({ className,
|
|
35
|
+
export const BadgeRoot = React.forwardRef<HTMLSpanElement, BadgeRootProps>(
|
|
36
|
+
({ className, ...props }, ref) => {
|
|
16
37
|
const [variantProps, restProps] = badge.splitVariantProps(props);
|
|
17
|
-
const
|
|
38
|
+
const classNames = badge(variantProps);
|
|
39
|
+
const contextValue: BadgeSlotContextValue = { classNames };
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<BadgeSlotContext.Provider value={contextValue}>
|
|
43
|
+
<Primitive.span ref={ref} className={clsx(classNames.root, className)} {...restProps} />
|
|
44
|
+
</BadgeSlotContext.Provider>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
BadgeRoot.displayName = "Badge.Root";
|
|
49
|
+
|
|
50
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
51
|
+
|
|
52
|
+
export interface BadgePrefixProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {}
|
|
53
|
+
|
|
54
|
+
export const BadgePrefix = React.forwardRef<HTMLSpanElement, BadgePrefixProps>(
|
|
55
|
+
({ className, ...props }, ref) => {
|
|
56
|
+
const { classNames } = useBadgeSlotContext();
|
|
57
|
+
|
|
58
|
+
return <Primitive.span ref={ref} className={clsx(classNames.prefix, className)} {...props} />;
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
BadgePrefix.displayName = "Badge.Prefix";
|
|
62
|
+
|
|
63
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
64
|
+
|
|
65
|
+
export interface BadgeLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {}
|
|
66
|
+
|
|
67
|
+
export const BadgeLabel = React.forwardRef<HTMLSpanElement, BadgeLabelProps>(
|
|
68
|
+
({ className, ...props }, ref) => {
|
|
69
|
+
const { classNames } = useBadgeSlotContext();
|
|
70
|
+
|
|
71
|
+
return <Primitive.span ref={ref} className={clsx(classNames.label, className)} {...props} />;
|
|
72
|
+
},
|
|
73
|
+
);
|
|
74
|
+
BadgeLabel.displayName = "Badge.Label";
|
|
75
|
+
|
|
76
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
77
|
+
|
|
78
|
+
export interface BadgeActionProps
|
|
79
|
+
extends PrimitiveProps,
|
|
80
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
81
|
+
|
|
82
|
+
export const BadgeAction = React.forwardRef<HTMLButtonElement, BadgeActionProps>(
|
|
83
|
+
({ className, ...props }, ref) => {
|
|
84
|
+
const { classNames } = useBadgeSlotContext();
|
|
85
|
+
const { scaleFeedbackRef, scaleFeedbackClassName } = useScaleFeedback();
|
|
18
86
|
|
|
19
87
|
return (
|
|
20
|
-
<Primitive.
|
|
21
|
-
|
|
22
|
-
|
|
88
|
+
<Primitive.button
|
|
89
|
+
ref={useComposedRefs(scaleFeedbackRef, ref)}
|
|
90
|
+
type="button"
|
|
91
|
+
className={clsx(classNames.action, scaleFeedbackClassName, className)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
23
94
|
);
|
|
24
95
|
},
|
|
25
96
|
);
|
|
26
|
-
|
|
97
|
+
BadgeAction.displayName = "Badge.Action";
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {
|
|
2
|
+
BadgeRoot,
|
|
3
|
+
BadgePrefix,
|
|
4
|
+
BadgeLabel,
|
|
5
|
+
BadgeAction,
|
|
6
|
+
type BadgeRootProps,
|
|
7
|
+
type BadgePrefixProps,
|
|
8
|
+
type BadgeLabelProps,
|
|
9
|
+
type BadgeActionProps,
|
|
10
|
+
} from "./Badge";
|
|
11
|
+
|
|
12
|
+
export * as Badge from "./Badge.namespace";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { describe, expect, it } from "bun:test";
|
|
3
|
+
import { Box } from "./Box";
|
|
4
|
+
|
|
5
|
+
describe("Box safeArea", () => {
|
|
6
|
+
it("resolves pl and pr to the inline safe area insets", () => {
|
|
7
|
+
render(<Box data-testid="box" pl="safeArea" pr="safeArea" />);
|
|
8
|
+
const { style } = screen.getByTestId("box");
|
|
9
|
+
|
|
10
|
+
expect(style.getPropertyValue("--seed-box-padding-left-base")).toBe(
|
|
11
|
+
"var(--seed-safe-area-left)",
|
|
12
|
+
);
|
|
13
|
+
expect(style.getPropertyValue("--seed-box-padding-right-base")).toBe(
|
|
14
|
+
"var(--seed-safe-area-right)",
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("keeps resolving other pl and pr values as dimensions", () => {
|
|
19
|
+
render(<Box data-testid="box" pl="spacingX.globalGutter" pr="x4" />);
|
|
20
|
+
const { style } = screen.getByTestId("box");
|
|
21
|
+
|
|
22
|
+
expect(style.getPropertyValue("--seed-box-padding-left-base")).toBe(
|
|
23
|
+
"var(--seed-dimension-spacing-x-global-gutter)",
|
|
24
|
+
);
|
|
25
|
+
expect(style.getPropertyValue("--seed-box-padding-right-base")).toBe(
|
|
26
|
+
"var(--seed-dimension-x4)",
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("resolves safeArea per breakpoint", () => {
|
|
31
|
+
render(<Box data-testid="box" pl={{ base: "safeArea", md: "x4" }} />);
|
|
32
|
+
const { style } = screen.getByTestId("box");
|
|
33
|
+
|
|
34
|
+
expect(style.getPropertyValue("--seed-box-padding-left-base")).toBe(
|
|
35
|
+
"var(--seed-safe-area-left)",
|
|
36
|
+
);
|
|
37
|
+
expect(style.getPropertyValue("--seed-box-padding-left-md")).toBe("var(--seed-dimension-x4)");
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("prefers paddingLeft over pl", () => {
|
|
41
|
+
render(<Box data-testid="box" paddingLeft="safeArea" pl="x4" />);
|
|
42
|
+
const { style } = screen.getByTestId("box");
|
|
43
|
+
|
|
44
|
+
expect(style.getPropertyValue("--seed-box-padding-left-base")).toBe(
|
|
45
|
+
"var(--seed-safe-area-left)",
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("resolves directional bleed to the safe area inset and its negative margin", () => {
|
|
50
|
+
render(<Box data-testid="box" bleedLeft="safeArea" bleedTop="safeArea" />);
|
|
51
|
+
const { style } = screen.getByTestId("box");
|
|
52
|
+
|
|
53
|
+
expect(style.getPropertyValue("--seed-box-bleed-left-base")).toBe("var(--seed-safe-area-left)");
|
|
54
|
+
expect(style.getPropertyValue("--seed-box-margin-left-base")).toBe(
|
|
55
|
+
"calc(var(--seed-safe-area-left) * -1)",
|
|
56
|
+
);
|
|
57
|
+
expect(style.getPropertyValue("--seed-box-bleed-top-base")).toBe("var(--seed-safe-area-top)");
|
|
58
|
+
expect(style.getPropertyValue("--seed-box-margin-top-base")).toBe(
|
|
59
|
+
"calc(var(--seed-safe-area-top) * -1)",
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("resolves bleedX and bleedY to each side's own inset", () => {
|
|
64
|
+
render(<Box data-testid="box" bleedX="safeArea" bleedY="safeArea" />);
|
|
65
|
+
const { style } = screen.getByTestId("box");
|
|
66
|
+
|
|
67
|
+
expect(style.getPropertyValue("--seed-box-bleed-left-base")).toBe("var(--seed-safe-area-left)");
|
|
68
|
+
expect(style.getPropertyValue("--seed-box-bleed-right-base")).toBe(
|
|
69
|
+
"var(--seed-safe-area-right)",
|
|
70
|
+
);
|
|
71
|
+
expect(style.getPropertyValue("--seed-box-margin-right-base")).toBe(
|
|
72
|
+
"calc(var(--seed-safe-area-right) * -1)",
|
|
73
|
+
);
|
|
74
|
+
expect(style.getPropertyValue("--seed-box-bleed-top-base")).toBe("var(--seed-safe-area-top)");
|
|
75
|
+
expect(style.getPropertyValue("--seed-box-bleed-bottom-base")).toBe(
|
|
76
|
+
"var(--seed-safe-area-bottom)",
|
|
77
|
+
);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("lets a directional bleed override bleed", () => {
|
|
81
|
+
render(<Box data-testid="box" bleed="safeArea" bleedBottom="x4" />);
|
|
82
|
+
const { style } = screen.getByTestId("box");
|
|
83
|
+
|
|
84
|
+
expect(style.getPropertyValue("--seed-box-bleed-top-base")).toBe("var(--seed-safe-area-top)");
|
|
85
|
+
expect(style.getPropertyValue("--seed-box-bleed-left-base")).toBe("var(--seed-safe-area-left)");
|
|
86
|
+
expect(style.getPropertyValue("--seed-box-bleed-bottom-base")).toBe("var(--seed-dimension-x4)");
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -41,6 +41,8 @@ export interface CheckboxRootProps
|
|
|
41
41
|
CheckmarkVariantProps,
|
|
42
42
|
CheckboxPrimitive.RootProps {}
|
|
43
43
|
|
|
44
|
+
export interface CheckboxRootPrimitiveProps extends CheckboxPrimitive.RootProps {}
|
|
45
|
+
|
|
44
46
|
export const CheckboxRoot = Object.assign(
|
|
45
47
|
forwardRef<HTMLLabelElement, CheckboxRootProps>(({ className, ...props }, ref) => {
|
|
46
48
|
const [{ checkbox: checkboxVariantProps, checkmark: checkmarkVariantProps }, otherProps] =
|
|
@@ -68,7 +70,7 @@ export const CheckboxRoot = Object.assign(
|
|
|
68
70
|
////////////////////////////////////////////////////////////////////////////////////
|
|
69
71
|
|
|
70
72
|
/**
|
|
71
|
-
* CheckboxControl combines Checkbox.Primitive with checkmark.root styling
|
|
73
|
+
* CheckboxControl combines Checkbox.Root.Primitive with checkmark.root styling
|
|
72
74
|
* This enables standalone usage of Checkbox.Control with variants
|
|
73
75
|
*/
|
|
74
76
|
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export {
|
|
2
|
-
|
|
2
|
+
ChipToggle as Toggle,
|
|
3
|
+
ChipRadioRoot as RadioRoot,
|
|
4
|
+
ChipRadioItem as RadioItem,
|
|
5
|
+
type ChipToggleProps as ToggleProps,
|
|
6
|
+
type ChipRadioRootProps as RadioRootProps,
|
|
7
|
+
type ChipRadioItemProps as RadioItemProps,
|
|
8
|
+
ChipButton as Button,
|
|
3
9
|
ChipLabel as Label,
|
|
4
10
|
ChipPrefixIcon as PrefixIcon,
|
|
5
11
|
ChipPrefixAvatar as PrefixAvatar,
|
|
6
12
|
ChipSuffixIcon as SuffixIcon,
|
|
7
|
-
type
|
|
13
|
+
type ChipButtonProps as ButtonProps,
|
|
8
14
|
type ChipLabelProps as LabelProps,
|
|
9
15
|
type ChipPrefixIconProps as PrefixIconProps,
|
|
10
16
|
type ChipPrefixAvatarProps as PrefixAvatarProps,
|
|
@@ -5,8 +5,11 @@ import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
|
5
5
|
import { withScaleFeedback } from "../../utils/withScaleFeedback";
|
|
6
6
|
import { withIconRequired } from "../Icon/Icon";
|
|
7
7
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
8
|
-
import { useCheckboxContext } from "@seed-design/react-checkbox";
|
|
9
|
-
import {
|
|
8
|
+
import { Checkbox as CheckboxPrimitive, useCheckboxContext } from "@seed-design/react-checkbox";
|
|
9
|
+
import {
|
|
10
|
+
RadioGroup as RadioGroupPrimitive,
|
|
11
|
+
useRadioGroupItemContext,
|
|
12
|
+
} from "@seed-design/react-radio-group";
|
|
10
13
|
|
|
11
14
|
const { withProvider, withContext } = createSlotRecipeContext(chip);
|
|
12
15
|
const withStateProps = createWithStateProps([
|
|
@@ -16,16 +19,40 @@ const withStateProps = createWithStateProps([
|
|
|
16
19
|
|
|
17
20
|
////////////////////////////////////////////////////////////////////////////////////
|
|
18
21
|
|
|
19
|
-
export interface
|
|
22
|
+
export interface ChipButtonProps
|
|
20
23
|
extends PrimitiveProps,
|
|
21
24
|
ChipVariantProps,
|
|
22
25
|
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
23
26
|
|
|
24
|
-
export const
|
|
25
|
-
withScaleFeedback(withProvider<HTMLButtonElement,
|
|
26
|
-
(props:
|
|
27
|
+
export const ChipButton = withIconRequired(
|
|
28
|
+
withScaleFeedback(withProvider<HTMLButtonElement, ChipButtonProps>(Primitive.button, "root")),
|
|
29
|
+
(props: ChipButtonProps) => props.layout === "iconOnly",
|
|
27
30
|
);
|
|
28
|
-
|
|
31
|
+
ChipButton.displayName = "Chip.Button";
|
|
32
|
+
|
|
33
|
+
export interface ChipToggleProps extends ChipVariantProps, CheckboxPrimitive.RootProps {}
|
|
34
|
+
|
|
35
|
+
export const ChipToggle = withIconRequired(
|
|
36
|
+
withScaleFeedback(
|
|
37
|
+
withProvider<HTMLLabelElement, ChipToggleProps>(CheckboxPrimitive.Root, "root"),
|
|
38
|
+
),
|
|
39
|
+
(props: ChipToggleProps) => props.layout === "iconOnly",
|
|
40
|
+
);
|
|
41
|
+
ChipToggle.displayName = "Chip.Toggle";
|
|
42
|
+
|
|
43
|
+
export interface ChipRadioRootProps extends RadioGroupPrimitive.RootProps {}
|
|
44
|
+
|
|
45
|
+
export const ChipRadioRoot = RadioGroupPrimitive.Root;
|
|
46
|
+
|
|
47
|
+
export interface ChipRadioItemProps extends ChipVariantProps, RadioGroupPrimitive.ItemProps {}
|
|
48
|
+
|
|
49
|
+
export const ChipRadioItem = withIconRequired(
|
|
50
|
+
withScaleFeedback(
|
|
51
|
+
withProvider<HTMLLabelElement, ChipRadioItemProps>(RadioGroupPrimitive.Item, "root"),
|
|
52
|
+
),
|
|
53
|
+
(props: ChipRadioItemProps) => props.layout === "iconOnly",
|
|
54
|
+
);
|
|
55
|
+
ChipRadioItem.displayName = "Chip.RadioItem";
|
|
29
56
|
|
|
30
57
|
////////////////////////////////////////////////////////////////////////////////////
|
|
31
58
|
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export {
|
|
2
|
-
|
|
2
|
+
ChipToggle,
|
|
3
|
+
ChipRadioRoot,
|
|
4
|
+
ChipRadioItem,
|
|
5
|
+
type ChipToggleProps,
|
|
6
|
+
type ChipRadioRootProps,
|
|
7
|
+
type ChipRadioItemProps,
|
|
8
|
+
ChipButton,
|
|
3
9
|
ChipLabel,
|
|
4
10
|
ChipPrefixIcon,
|
|
5
11
|
ChipPrefixAvatar,
|
|
6
12
|
ChipSuffixIcon,
|
|
7
|
-
type
|
|
13
|
+
type ChipButtonProps,
|
|
8
14
|
type ChipLabelProps,
|
|
9
15
|
type ChipPrefixIconProps,
|
|
10
16
|
type ChipPrefixAvatarProps,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
DatePickerRoot as Root,
|
|
3
|
+
DatePickerHeader as Header,
|
|
4
|
+
DatePickerCalendar as Calendar,
|
|
5
|
+
DatePickerWheel as Wheel,
|
|
6
|
+
type DatePickerRootProps as RootProps,
|
|
7
|
+
type DatePickerHeaderProps as HeaderProps,
|
|
8
|
+
type DatePickerCalendarProps as CalendarProps,
|
|
9
|
+
type DatePickerWheelProps as WheelProps,
|
|
10
|
+
type DatePickerWheelRenderProps as WheelRenderProps,
|
|
11
|
+
type DatePickerWheelColumn as WheelColumn,
|
|
12
|
+
type DatePickerCellContentRenderProps as CellContentRenderProps,
|
|
13
|
+
type DatePickerActions as Actions,
|
|
14
|
+
} from "./DatePicker";
|