@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
|
@@ -1,55 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { useStyleProps } from "../../utils/styled.js";
|
|
4
3
|
import { Icon } from "../Icon/Icon.js";
|
|
5
4
|
import { ActionButton } from "../ActionButton/ActionButton.js";
|
|
6
|
-
import {
|
|
5
|
+
import { Box } from "../Box/Box.js";
|
|
7
6
|
import { Primitive } from "@seed-design/react-primitive";
|
|
8
7
|
import clsx$1 from "clsx";
|
|
9
8
|
import * as React$1 from "react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
12
10
|
import { mergeProps } from "@seed-design/dom-utils";
|
|
13
11
|
import { datePicker } from "@seed-design/css/recipes/date-picker";
|
|
14
12
|
import { useDatePicker } from "@seed-design/react-date-picker";
|
|
13
|
+
import { Popover, usePopoverContext } from "@seed-design/react-popover";
|
|
15
14
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
16
|
-
var
|
|
17
|
-
var
|
|
15
|
+
var MONTH_WHEEL_ITEM_SIZE = 44;
|
|
16
|
+
var MONTH_WHEEL_VISIBLE_ITEM_COUNT = 7;
|
|
17
|
+
var MONTH_WHEEL_SCROLL_FOG_SIZE = 102;
|
|
18
|
+
var WEEK_WHEEL_POPOVER_GUTTER = 4;
|
|
18
19
|
function getContinuousSpacerStyle(height) {
|
|
19
20
|
return { "--seed-date-picker-continuous-spacer-height": `${height}px` };
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ref
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
fill: "currentColor"
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
NavigationChevronIcon.displayName = "NavigationChevronIcon";
|
|
38
|
-
var HeaderChevronIcon = React$1.forwardRef(({ expanded, ...props }, ref) => /* @__PURE__ */ jsx("svg", {
|
|
39
|
-
ref,
|
|
40
|
-
...props,
|
|
41
|
-
viewBox: "0 0 20 20",
|
|
42
|
-
fill: "none",
|
|
43
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
45
|
-
fillRule: "evenodd",
|
|
46
|
-
clipRule: "evenodd",
|
|
47
|
-
d: "M5.2453 7.74286C5.57141 7.4181 6.09905 7.41919 6.42381 7.7453L9.98736 11.3237L13.5808 7.77134C13.9081 7.44778 14.4357 7.45081 14.7593 7.77812C15.0829 8.10542 15.0798 8.63305 14.7525 8.95661L10.5686 13.0926C10.2422 13.4154 9.7162 13.4133 9.39228 13.088L5.24286 8.92137C4.9181 8.59526 4.91919 8.06762 5.2453 7.74286Z",
|
|
48
|
-
fill: "currentColor",
|
|
49
|
-
transform: expanded ? "rotate(180 10 10)" : void 0
|
|
50
|
-
})
|
|
51
|
-
}));
|
|
52
|
-
HeaderChevronIcon.displayName = "HeaderChevronIcon";
|
|
22
|
+
function composeRefs(...refs) {
|
|
23
|
+
return (value) => {
|
|
24
|
+
for (const ref of refs) if (typeof ref === "function") ref(value);
|
|
25
|
+
else if (ref) ref.current = value;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
var DatePickerContext = React$1.createContext(null);
|
|
29
|
+
function useDatePickerContext() {
|
|
30
|
+
const context = React$1.useContext(DatePickerContext);
|
|
31
|
+
if (!context) throw new Error("DatePicker compound components must be used within DatePicker.Root");
|
|
32
|
+
return context;
|
|
33
|
+
}
|
|
53
34
|
function WeekdayRow({ api, classNames, semantic = true }) {
|
|
54
35
|
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
55
36
|
role: semantic ? "row" : void 0,
|
|
@@ -126,22 +107,27 @@ function MonthView({ api, classNames, month, renderDateCellContent, renderDateCe
|
|
|
126
107
|
]
|
|
127
108
|
});
|
|
128
109
|
}
|
|
129
|
-
function NavigationButton({
|
|
110
|
+
function NavigationButton({ icon, className, ...props }) {
|
|
130
111
|
return /* @__PURE__ */ jsx(ActionButton, {
|
|
131
112
|
...props,
|
|
132
113
|
variant: "ghost",
|
|
133
114
|
size: "medium",
|
|
134
115
|
layout: "iconOnly",
|
|
135
116
|
className,
|
|
136
|
-
children: /* @__PURE__ */ jsx(Icon, { svg:
|
|
117
|
+
children: /* @__PURE__ */ jsx(Icon, { svg: icon })
|
|
137
118
|
});
|
|
138
119
|
}
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
const
|
|
120
|
+
var DatePickerHeader = React$1.forwardRef(({ leftIcon, rightIcon, headerIcon }, ref) => {
|
|
121
|
+
const { api, classNames } = useDatePickerContext();
|
|
122
|
+
const popover = usePopoverContext();
|
|
123
|
+
if (api.visibleRange === "continuous" || api.visibleRange === "twoMonths") return null;
|
|
124
|
+
const previousIcon = api.isRtl ? rightIcon : leftIcon;
|
|
125
|
+
const nextIcon = api.isRtl ? leftIcon : rightIcon;
|
|
142
126
|
return /* @__PURE__ */ jsxs(Primitive.div, {
|
|
127
|
+
ref,
|
|
143
128
|
className: classNames.header,
|
|
144
129
|
children: [/* @__PURE__ */ jsxs(Primitive.button, {
|
|
130
|
+
ref: popover.refs.anchor,
|
|
145
131
|
...api.monthYearButtonProps,
|
|
146
132
|
id: `${api.rootProps.id}-header-label`,
|
|
147
133
|
className: classNames.headerLabel,
|
|
@@ -149,24 +135,26 @@ function Header({ api, classNames }) {
|
|
|
149
135
|
"data-date-picker-header-label": "",
|
|
150
136
|
children: api.headerLabel
|
|
151
137
|
}), /* @__PURE__ */ jsx(Primitive.span, {
|
|
138
|
+
"data-expanded": api.isWheelOpen ? "" : void 0,
|
|
152
139
|
className: classNames.headerChevron,
|
|
153
|
-
children: /* @__PURE__ */ jsx(Icon, { svg:
|
|
140
|
+
children: /* @__PURE__ */ jsx(Icon, { svg: headerIcon })
|
|
154
141
|
})]
|
|
155
142
|
}), /* @__PURE__ */ jsxs(Primitive.div, {
|
|
156
143
|
className: classNames.navigation,
|
|
157
144
|
children: [/* @__PURE__ */ jsx(NavigationButton, {
|
|
158
145
|
...api.previousButtonProps,
|
|
159
|
-
|
|
146
|
+
icon: previousIcon,
|
|
160
147
|
className: classNames.navigationButton
|
|
161
148
|
}), /* @__PURE__ */ jsx(NavigationButton, {
|
|
162
149
|
...api.nextButtonProps,
|
|
163
|
-
|
|
150
|
+
icon: nextIcon,
|
|
164
151
|
className: classNames.navigationButton
|
|
165
152
|
})]
|
|
166
153
|
})]
|
|
167
154
|
});
|
|
168
|
-
}
|
|
169
|
-
|
|
155
|
+
});
|
|
156
|
+
DatePickerHeader.displayName = "DatePickerHeader";
|
|
157
|
+
function TwoMonthHeader({ api, classNames, label, labelId, position, leftIcon, rightIcon }) {
|
|
170
158
|
const isFirst = position === "first";
|
|
171
159
|
const direction = api.isRtl ? isFirst ? "right" : "left" : isFirst ? "left" : "right";
|
|
172
160
|
const buttonProps = isFirst ? api.previousButtonProps : api.nextButtonProps;
|
|
@@ -178,168 +166,182 @@ function TwoMonthHeader({ api, classNames, label, labelId, position }) {
|
|
|
178
166
|
children: label
|
|
179
167
|
}), /* @__PURE__ */ jsx(NavigationButton, {
|
|
180
168
|
...buttonProps,
|
|
181
|
-
direction,
|
|
169
|
+
icon: direction === "left" ? leftIcon : rightIcon,
|
|
182
170
|
"data-placement": isFirst ? "start" : "end",
|
|
183
171
|
className: classNames.twoMonthNavigationButton
|
|
184
172
|
})]
|
|
185
173
|
});
|
|
186
174
|
}
|
|
187
|
-
|
|
175
|
+
var DatePickerWheel = React$1.forwardRef(({ children }, ref) => {
|
|
176
|
+
const { api, classNames } = useDatePickerContext();
|
|
177
|
+
if (!api.isWheelOpen || api.visibleRange === "twoMonths" || api.visibleRange === "continuous") return null;
|
|
178
|
+
const columns = [{
|
|
179
|
+
id: "year",
|
|
180
|
+
"aria-label": api.ariaLabels.yearWheel,
|
|
181
|
+
className: classNames.yearColumn,
|
|
182
|
+
options: api.wheel.yearOptions,
|
|
183
|
+
value: api.wheel.yearValue,
|
|
184
|
+
onValueChange: api.wheel.onYearValueChange,
|
|
185
|
+
loop: false
|
|
186
|
+
}, {
|
|
187
|
+
id: "month",
|
|
188
|
+
"aria-label": api.ariaLabels.monthWheel,
|
|
189
|
+
className: classNames.monthColumn,
|
|
190
|
+
options: api.wheel.monthOptions,
|
|
191
|
+
value: api.wheel.monthValue,
|
|
192
|
+
onValueChange: api.wheel.onMonthValueChange,
|
|
193
|
+
loop: true
|
|
194
|
+
}];
|
|
195
|
+
const sharedRootProps = {
|
|
196
|
+
...api.wheelProps,
|
|
197
|
+
disabled: api.disabled,
|
|
198
|
+
readOnly: api.readOnly,
|
|
199
|
+
"aria-label": api.headerLabel,
|
|
200
|
+
className: classNames.wheelView
|
|
201
|
+
};
|
|
202
|
+
if (api.visibleRange === "week") return /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
203
|
+
className: classNames.wheelPositioner,
|
|
204
|
+
children: /* @__PURE__ */ jsx(Popover.Content, {
|
|
205
|
+
ref,
|
|
206
|
+
"aria-labelledby": `${api.rootProps.id}-header-label`,
|
|
207
|
+
className: classNames.wheelPopover,
|
|
208
|
+
children: children({
|
|
209
|
+
rootProps: {
|
|
210
|
+
...sharedRootProps,
|
|
211
|
+
size: "small"
|
|
212
|
+
},
|
|
213
|
+
columns
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
});
|
|
188
217
|
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
218
|
+
ref,
|
|
189
219
|
className: classNames.wheelContainer,
|
|
190
|
-
children:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
scrollFogClassName: classNames.wheelScrollFog,
|
|
200
|
-
selectionIndicatorClassName: classNames.wheelSelectionIndicator,
|
|
201
|
-
fogSize: 102,
|
|
202
|
-
children: [/* @__PURE__ */ jsx(InternalWheelPickerColumn, {
|
|
203
|
-
"aria-label": api.ariaLabels.yearWheel,
|
|
204
|
-
className: classNames.yearColumn,
|
|
205
|
-
itemClassName: classNames.wheelItem,
|
|
206
|
-
options: api.wheel.yearOptions,
|
|
207
|
-
value: api.wheel.yearValue,
|
|
208
|
-
onValueChange: api.wheel.onYearValueChange,
|
|
209
|
-
loop: false
|
|
210
|
-
}), /* @__PURE__ */ jsx(InternalWheelPickerColumn, {
|
|
211
|
-
"aria-label": api.ariaLabels.monthWheel,
|
|
212
|
-
className: classNames.monthColumn,
|
|
213
|
-
itemClassName: classNames.wheelItem,
|
|
214
|
-
options: api.wheel.monthOptions,
|
|
215
|
-
value: api.wheel.monthValue,
|
|
216
|
-
onValueChange: api.wheel.onMonthValueChange,
|
|
217
|
-
loop: true
|
|
218
|
-
})]
|
|
220
|
+
children: children({
|
|
221
|
+
rootProps: {
|
|
222
|
+
...sharedRootProps,
|
|
223
|
+
size: "medium",
|
|
224
|
+
itemSize: MONTH_WHEEL_ITEM_SIZE,
|
|
225
|
+
visibleItemCount: MONTH_WHEEL_VISIBLE_ITEM_COUNT,
|
|
226
|
+
scrollFogSize: MONTH_WHEEL_SCROLL_FOG_SIZE
|
|
227
|
+
},
|
|
228
|
+
columns
|
|
219
229
|
})
|
|
220
230
|
});
|
|
221
|
-
}
|
|
222
|
-
|
|
231
|
+
});
|
|
232
|
+
DatePickerWheel.displayName = "DatePickerWheel";
|
|
233
|
+
var DatePickerCalendar = React$1.forwardRef(({ leftIcon, rightIcon }, ref) => {
|
|
234
|
+
const { api, classNames, renderDateCellContent, renderDateCellSupplement } = useDatePickerContext();
|
|
235
|
+
if (api.visibleRange === "continuous") return /* @__PURE__ */ jsxs(Primitive.div, {
|
|
236
|
+
ref: composeRefs(ref, api.refs.continuousScroll),
|
|
237
|
+
...api.continuousScrollProps,
|
|
238
|
+
"data-date-picker-continuous-scroll": "",
|
|
239
|
+
className: classNames.continuousScroll,
|
|
240
|
+
children: [/* @__PURE__ */ jsx(WeekdayRow, {
|
|
241
|
+
api,
|
|
242
|
+
classNames,
|
|
243
|
+
semantic: false
|
|
244
|
+
}), /* @__PURE__ */ jsxs(Primitive.div, {
|
|
245
|
+
className: classNames.continuousContent,
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ jsx(Primitive.div, {
|
|
248
|
+
"aria-hidden": "true",
|
|
249
|
+
"data-date-picker-continuous-spacer": "",
|
|
250
|
+
className: classNames.continuousSpacer,
|
|
251
|
+
style: getContinuousSpacerStyle(api.virtual.topHeight)
|
|
252
|
+
}),
|
|
253
|
+
api.months.map((month) => /* @__PURE__ */ jsx(MonthView, {
|
|
254
|
+
api,
|
|
255
|
+
classNames,
|
|
256
|
+
month,
|
|
257
|
+
renderDateCellContent,
|
|
258
|
+
renderDateCellSupplement,
|
|
259
|
+
showWeekdays: false,
|
|
260
|
+
showMonthLabel: true,
|
|
261
|
+
monthRef: api.refs.continuousMonth(month.key)
|
|
262
|
+
}, month.key)),
|
|
263
|
+
/* @__PURE__ */ jsx(Primitive.div, {
|
|
264
|
+
"aria-hidden": "true",
|
|
265
|
+
"data-date-picker-continuous-spacer": "",
|
|
266
|
+
className: classNames.continuousSpacer,
|
|
267
|
+
style: getContinuousSpacerStyle(api.virtual.bottomHeight)
|
|
268
|
+
})
|
|
269
|
+
]
|
|
270
|
+
})]
|
|
271
|
+
});
|
|
272
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
273
|
+
ref,
|
|
274
|
+
"data-wheel-open": api.isWheelOpen && api.visibleRange === "month" ? "" : void 0,
|
|
275
|
+
"aria-hidden": api.isWheelOpen && api.visibleRange === "month" ? true : void 0,
|
|
276
|
+
className: classNames.months,
|
|
277
|
+
children: api.months.map((month, index) => /* @__PURE__ */ jsx(MonthView, {
|
|
278
|
+
api,
|
|
279
|
+
classNames,
|
|
280
|
+
month,
|
|
281
|
+
renderDateCellContent,
|
|
282
|
+
renderDateCellSupplement,
|
|
283
|
+
showWeekdays: true,
|
|
284
|
+
showMonthLabel: false,
|
|
285
|
+
renderHeader: api.visibleRange === "twoMonths" ? (labelId) => /* @__PURE__ */ jsx(TwoMonthHeader, {
|
|
286
|
+
api,
|
|
287
|
+
classNames,
|
|
288
|
+
label: month.label,
|
|
289
|
+
labelId,
|
|
290
|
+
position: index === 0 ? "first" : "last",
|
|
291
|
+
leftIcon,
|
|
292
|
+
rightIcon
|
|
293
|
+
}) : void 0
|
|
294
|
+
}, month.key))
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
DatePickerCalendar.displayName = "DatePickerCalendar";
|
|
298
|
+
var DatePickerRoot = React$1.forwardRef((props, forwardedRef) => {
|
|
223
299
|
const api = useDatePicker(props);
|
|
224
300
|
const [variantProps, otherProps] = datePicker.splitVariantProps(props);
|
|
225
301
|
const classNames = datePicker({
|
|
226
302
|
...variantProps,
|
|
227
303
|
visibleRange: api.visibleRange
|
|
228
304
|
});
|
|
229
|
-
const { renderDateCellContent, renderDateCellSupplement, actionsRef, selectionMode: _selectionMode, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, viewDate: _viewDate, defaultViewDate: _defaultViewDate, onViewDateChange: _onViewDateChange, today: _today, locale: _locale, weekStartsOn: _weekStartsOn, yearRange: _yearRange, monthRange: _monthRange, constraints: _constraints, disabled: _disabled, readOnly: _readOnly, rangeStartReadOnly: _rangeStartReadOnly, ariaLabels: _ariaLabels, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...
|
|
230
|
-
const { style: styleProps, restProps: rootProps } = useStyleProps(styleAndRootProps);
|
|
231
|
-
const rootRef = React$1.useRef(null);
|
|
305
|
+
const { children, renderDateCellContent, renderDateCellSupplement, actionsRef, selectionMode: _selectionMode, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, viewDate: _viewDate, defaultViewDate: _defaultViewDate, onViewDateChange: _onViewDateChange, today: _today, locale: _locale, weekStartsOn: _weekStartsOn, yearRange: _yearRange, monthRange: _monthRange, constraints: _constraints, disabled: _disabled, readOnly: _readOnly, rangeStartReadOnly: _rangeStartReadOnly, ariaLabels: _ariaLabels, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, height, minHeight, maxHeight, ...rootProps } = otherProps;
|
|
232
306
|
const hasContinuousSizeConstraint = props.height !== void 0 || props.minHeight !== void 0 || props.maxHeight !== void 0;
|
|
233
307
|
React$1.useEffect(() => {
|
|
234
308
|
if (process.env.NODE_ENV === "production" || api.visibleRange !== "continuous") return;
|
|
235
|
-
if (!hasContinuousSizeConstraint) console.warn("
|
|
309
|
+
if (!hasContinuousSizeConstraint) console.warn("DatePicker.Root: continuous에서는 height, minHeight 또는 maxHeight가 필요합니다.");
|
|
236
310
|
}, [api.visibleRange, hasContinuousSizeConstraint]);
|
|
237
311
|
React$1.useImperativeHandle(actionsRef, () => api.actions, [api.actions]);
|
|
238
312
|
const rootAriaLabel = ariaLabelledby ? ariaLabel : ariaLabel ?? api.ariaLabels.root;
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
children:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
month,
|
|
268
|
-
renderDateCellContent,
|
|
269
|
-
renderDateCellSupplement,
|
|
270
|
-
showWeekdays: false,
|
|
271
|
-
showMonthLabel: true,
|
|
272
|
-
monthRef: api.refs.continuousMonth(month.key)
|
|
273
|
-
}, month.key)),
|
|
274
|
-
/* @__PURE__ */ jsx(Primitive.div, {
|
|
275
|
-
"aria-hidden": "true",
|
|
276
|
-
"data-date-picker-continuous-spacer": "",
|
|
277
|
-
className: classNames.continuousSpacer,
|
|
278
|
-
style: getContinuousSpacerStyle(api.virtual.bottomHeight)
|
|
279
|
-
})
|
|
280
|
-
]
|
|
281
|
-
})]
|
|
282
|
-
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
283
|
-
api.visibleRange !== "twoMonths" && /* @__PURE__ */ jsx(Header, {
|
|
284
|
-
api,
|
|
285
|
-
classNames
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ jsx(Primitive.div, {
|
|
288
|
-
"data-wheel-open": api.isWheelOpen && api.visibleRange !== "twoMonths" ? "" : void 0,
|
|
289
|
-
"aria-hidden": api.isWheelOpen && api.visibleRange !== "twoMonths" ? true : void 0,
|
|
290
|
-
className: classNames.months,
|
|
291
|
-
children: api.months.map((month, index) => /* @__PURE__ */ jsx(MonthView, {
|
|
292
|
-
api,
|
|
293
|
-
classNames,
|
|
294
|
-
month,
|
|
295
|
-
renderDateCellContent,
|
|
296
|
-
renderDateCellSupplement,
|
|
297
|
-
showWeekdays: true,
|
|
298
|
-
showMonthLabel: false,
|
|
299
|
-
renderHeader: api.visibleRange === "twoMonths" ? (labelId) => /* @__PURE__ */ jsx(TwoMonthHeader, {
|
|
300
|
-
api,
|
|
301
|
-
classNames,
|
|
302
|
-
label: month.label,
|
|
303
|
-
labelId,
|
|
304
|
-
position: index === 0 ? "first" : "last"
|
|
305
|
-
}) : void 0
|
|
306
|
-
}, month.key))
|
|
307
|
-
}),
|
|
308
|
-
api.isWheelOpen && api.visibleRange !== "twoMonths" && /* @__PURE__ */ jsx(WheelView, {
|
|
309
|
-
api,
|
|
310
|
-
classNames
|
|
313
|
+
return /* @__PURE__ */ jsx(DatePickerContext.Provider, {
|
|
314
|
+
value: {
|
|
315
|
+
api,
|
|
316
|
+
classNames,
|
|
317
|
+
renderDateCellContent,
|
|
318
|
+
renderDateCellSupplement
|
|
319
|
+
},
|
|
320
|
+
children: /* @__PURE__ */ jsx(Popover.Root, {
|
|
321
|
+
open: api.visibleRange === "week" && api.isWheelOpen,
|
|
322
|
+
onOpenChange: (open) => {
|
|
323
|
+
if (!open) api.closeWheel();
|
|
324
|
+
},
|
|
325
|
+
placement: "bottom-start",
|
|
326
|
+
gutter: WEEK_WHEEL_POPOVER_GUTTER,
|
|
327
|
+
children: /* @__PURE__ */ jsxs(Box, {
|
|
328
|
+
ref: composeRefs(forwardedRef, api.refs.root),
|
|
329
|
+
...mergeProps(api.rootProps, rootProps),
|
|
330
|
+
"aria-label": rootAriaLabel,
|
|
331
|
+
"aria-labelledby": ariaLabelledby,
|
|
332
|
+
className: clsx$1(classNames.root, className),
|
|
333
|
+
height,
|
|
334
|
+
minHeight,
|
|
335
|
+
maxHeight,
|
|
336
|
+
children: [children, /* @__PURE__ */ jsx(Primitive.span, {
|
|
337
|
+
...api.liveRegionProps,
|
|
338
|
+
className: classNames.liveRegion,
|
|
339
|
+
children: api.headerLabel
|
|
340
|
+
})]
|
|
311
341
|
})
|
|
312
|
-
|
|
313
|
-
...api.liveRegionProps,
|
|
314
|
-
className: classNames.liveRegion,
|
|
315
|
-
children: api.headerLabel
|
|
316
|
-
})]
|
|
342
|
+
})
|
|
317
343
|
});
|
|
318
344
|
});
|
|
319
|
-
|
|
320
|
-
var DatePicker = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(DatePickerImplementation, {
|
|
321
|
-
ref,
|
|
322
|
-
...props,
|
|
323
|
-
visibleRange: "month"
|
|
324
|
-
}));
|
|
325
|
-
DatePicker.displayName = "DatePicker";
|
|
326
|
-
var TwoMonthDatePicker = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(DatePickerImplementation, {
|
|
327
|
-
ref,
|
|
328
|
-
...props,
|
|
329
|
-
visibleRange: "twoMonths"
|
|
330
|
-
}));
|
|
331
|
-
TwoMonthDatePicker.displayName = "TwoMonthDatePicker";
|
|
332
|
-
var WeekDatePicker = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(DatePickerImplementation, {
|
|
333
|
-
ref,
|
|
334
|
-
...props,
|
|
335
|
-
visibleRange: "week"
|
|
336
|
-
}));
|
|
337
|
-
WeekDatePicker.displayName = "WeekDatePicker";
|
|
338
|
-
var ContinuousDatePicker = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(DatePickerImplementation, {
|
|
339
|
-
ref,
|
|
340
|
-
...props,
|
|
341
|
-
visibleRange: "continuous"
|
|
342
|
-
}));
|
|
343
|
-
ContinuousDatePicker.displayName = "ContinuousDatePicker";
|
|
345
|
+
DatePickerRoot.displayName = "DatePickerRoot";
|
|
344
346
|
//#endregion
|
|
345
|
-
export {
|
|
347
|
+
export { DatePickerCalendar, DatePickerHeader, DatePickerRoot, DatePickerWheel };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_DatePicker = require("./DatePicker.cjs");
|
|
3
|
+
//#region src/components/DatePicker/DatePicker.namespace.ts
|
|
4
|
+
var DatePicker_namespace_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
5
|
+
Calendar: () => require_DatePicker.DatePickerCalendar,
|
|
6
|
+
Header: () => require_DatePicker.DatePickerHeader,
|
|
7
|
+
Root: () => require_DatePicker.DatePickerRoot,
|
|
8
|
+
Wheel: () => require_DatePicker.DatePickerWheel
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
Object.defineProperty(exports, "DatePicker_namespace_exports", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return DatePicker_namespace_exports;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { DatePickerRoot as Root, DatePickerHeader as Header, DatePickerCalendar as Calendar, DatePickerWheel as Wheel, type DatePickerRootProps as RootProps, type DatePickerHeaderProps as HeaderProps, type DatePickerCalendarProps as CalendarProps, type DatePickerWheelProps as WheelProps, type DatePickerWheelRenderProps as WheelRenderProps, type DatePickerWheelColumn as WheelColumn, type DatePickerCellContentRenderProps as CellContentRenderProps, type DatePickerActions as Actions, } from './DatePicker';
|
|
2
|
+
//# sourceMappingURL=DatePicker.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,IAAI,EACtB,gBAAgB,IAAI,MAAM,EAC1B,kBAAkB,IAAI,QAAQ,EAC9B,eAAe,IAAI,KAAK,EACxB,KAAK,mBAAmB,IAAI,SAAS,EACrC,KAAK,qBAAqB,IAAI,WAAW,EACzC,KAAK,uBAAuB,IAAI,aAAa,EAC7C,KAAK,oBAAoB,IAAI,UAAU,EACvC,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,qBAAqB,IAAI,WAAW,EACzC,KAAK,gCAAgC,IAAI,sBAAsB,EAC/D,KAAK,iBAAiB,IAAI,OAAO,GAClC,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { DatePickerCalendar, DatePickerHeader, DatePickerRoot, DatePickerWheel } from "./DatePicker.js";
|
|
3
|
+
//#region src/components/DatePicker/DatePicker.namespace.ts
|
|
4
|
+
var DatePicker_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Calendar: () => DatePickerCalendar,
|
|
6
|
+
Header: () => DatePickerHeader,
|
|
7
|
+
Root: () => DatePickerRoot,
|
|
8
|
+
Wheel: () => DatePickerWheel
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { DatePicker_namespace_exports };
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_DatePicker = require("./DatePicker.cjs");
|
|
4
|
+
const require_DatePicker_namespace = require("./DatePicker.namespace.cjs");
|
|
4
5
|
let _seed_design_react_date_picker = require("@seed-design/react-date-picker");
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Object.defineProperty(exports, "DatePicker", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return require_DatePicker_namespace.DatePicker_namespace_exports;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.DatePickerCalendar = require_DatePicker.DatePickerCalendar;
|
|
13
|
+
exports.DatePickerHeader = require_DatePicker.DatePickerHeader;
|
|
14
|
+
exports.DatePickerRoot = require_DatePicker.DatePickerRoot;
|
|
15
|
+
exports.DatePickerWheel = require_DatePicker.DatePickerWheel;
|
|
9
16
|
Object.defineProperty(exports, "compareDates", {
|
|
10
17
|
enumerable: true,
|
|
11
18
|
get: function() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { DatePickerRoot, DatePickerHeader, DatePickerCalendar, DatePickerWheel, type DatePickerRootProps, type DatePickerHeaderProps, type DatePickerCalendarProps, type DatePickerWheelProps, type DatePickerWheelRenderProps, type DatePickerWheelColumn, type DatePickerCellContentRenderProps, type DatePickerActions, } from './DatePicker';
|
|
2
|
+
export * as DatePicker from './DatePicker.namespace';
|
|
3
|
+
export { compareDates, dateKey, dateOnOrAfter, dateOnOrBefore, excludeDates, isSameDate, maxSelectionCount, rangeDayCountAtLeast, rangeDayCountAtMost, type DatePickerAriaLabels, type DatePickerConstraint, type DatePickerConstraintContext, type DatePickerDate, type DatePickerMonthRange, type DatePickerMultipleProps, type DatePickerRangeProps, type DatePickerRangeValue, type DatePickerSelectionMode, type DatePickerSingleProps, type DatePickerValue, type DatePickerYearMonth, } from '@seed-design/react-date-picker';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DatePickerCalendar, DatePickerHeader, DatePickerRoot, DatePickerWheel } from "./DatePicker.js";
|
|
2
|
+
import { DatePicker_namespace_exports } from "./DatePicker.namespace.js";
|
|
2
3
|
import { compareDates, dateKey, dateOnOrAfter, dateOnOrBefore, excludeDates, isSameDate, maxSelectionCount, rangeDayCountAtLeast, rangeDayCountAtMost } from "@seed-design/react-date-picker";
|
|
3
|
-
export {
|
|
4
|
+
export { DatePicker_namespace_exports as DatePicker, DatePickerCalendar, DatePickerHeader, DatePickerRoot, DatePickerWheel, compareDates, dateKey, dateOnOrAfter, dateOnOrBefore, excludeDates, isSameDate, maxSelectionCount, rangeDayCountAtLeast, rangeDayCountAtMost };
|