@serendie/ui 3.2.0 → 3.2.1-dev.202604210459
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/dist/client.js +6 -6
- package/dist/components/Accordion/Accordion.js +18 -21
- package/dist/components/Accordion/AccordionGroup.js +4 -4
- package/dist/components/Avatar/Avatar.js +19 -21
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Banner/Banner.js +4 -4
- package/dist/components/BottomNavigation/BottomNavigationItem.js +4 -4
- package/dist/components/Button/Button.js +6 -6
- package/dist/components/CheckBox/CheckBox.js +28 -32
- package/dist/components/ChoiceBox/ChoiceBox.js +46 -52
- package/dist/components/DashboardWidget/DashboardWidget.js +4 -4
- package/dist/components/DataTable/DataTableComponent.js +16 -17
- package/dist/components/DataTable/table/HeaderCell.js +4 -4
- package/dist/components/DataTable/table/Root.js +4 -4
- package/dist/components/DatePicker/DatePicker.js +107 -127
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Drawer/Drawer.js +22 -26
- package/dist/components/DropdownMenu/DropdownMenu.js +36 -41
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/List/ListItem.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.js +27 -33
- package/dist/components/NotificationBadge/NotificationBadge.js +1 -1
- package/dist/components/Pagination/Pagination.js +54 -59
- package/dist/components/RadioButton/RadioButton.js +32 -36
- package/dist/components/RadioButton/RadioGroup.js +4 -4
- package/dist/components/Search/Search.js +67 -74
- package/dist/components/Select/Select.js +53 -60
- package/dist/components/Switch/Switch.js +18 -22
- package/dist/components/Tabs/TabItem.js +6 -6
- package/dist/components/Tabs/Tabs.js +9 -10
- package/dist/components/TextArea/TextArea.js +4 -4
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/Toast/Toast.js +16 -17
- package/dist/components/Tooltip/Tooltip.js +30 -35
- package/dist/components/TopAppBar/TopAppBar.js +4 -4
- package/dist/index.js +6 -6
- package/dist/node_modules/@ark-ui/react/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +15 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +25 -22
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +21 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +21 -11
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -12
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group-provider.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group.js +32 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +13 -9
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +19 -13
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group.js +43 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +16 -14
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +14 -12
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +15 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/split-collapsible-props.js +5 -3
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +17 -12
- package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-empty.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +14 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +20 -11
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +19 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-label.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-list.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root-provider.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +24 -14
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.js +42 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-group-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +13 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +14 -7
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-preset-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-range-text.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root-provider.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +32 -16
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +16 -13
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +18 -13
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +22 -12
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-value-text.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-cell.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-header-cell.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +16 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.js +64 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +16 -14
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +19 -13
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +15 -12
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +17 -7
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-trigger.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +21 -22
- package/dist/node_modules/@ark-ui/react/dist/components/field/use-field-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js +11 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow-tip.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-checkbox-item.js +35 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +21 -12
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-text.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +25 -13
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item-group.js +28 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item.js +39 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root-provider.js +31 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +32 -19
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-separator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger-item.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +18 -17
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu.js +48 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-group-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-machine-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-trigger-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +19 -14
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-first-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-item.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-last-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +20 -12
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination-context.js +4 -4
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +16 -20
- package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +13 -12
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +26 -13
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-label.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +18 -10
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +20 -13
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js +23 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-text.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +22 -13
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-list.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root-provider.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +25 -14
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +11 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select.js +44 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +12 -10
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +13 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +18 -12
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +10 -7
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +13 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-content.js +28 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +20 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-action-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-close-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-description.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +14 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +37 -22
- package/dist/node_modules/@ark-ui/react/dist/components/toast/use-toast-context.js +4 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +16 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +12 -8
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/providers/environment/use-environment-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/providers/locale/use-locale-context.js +5 -2
- package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +7 -10
- package/dist/node_modules/@ark-ui/react/dist/utils/create-context.js +17 -20
- package/dist/node_modules/@ark-ui/react/dist/utils/create-split-props.js +4 -7
- package/dist/node_modules/@ark-ui/react/dist/utils/render-strategy.js +6 -6
- package/dist/node_modules/@ark-ui/react/dist/utils/use-controllable-state.js +8 -0
- package/dist/node_modules/@ark-ui/react/dist/utils/use-effect-once.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +7 -10
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +294 -289
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +195 -194
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -97
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +60 -62
- package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +18 -12
- package/dist/node_modules/@internationalized/date/dist/conversion.js +35 -35
- package/dist/node_modules/@internationalized/date/dist/queries.js +126 -75
- package/dist/node_modules/@internationalized/date/dist/string.js +29 -28
- package/dist/node_modules/@zag-js/accordion/dist/accordion.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +129 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.dom.js +30 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.machine.js +137 -0
- package/dist/node_modules/@zag-js/aria-hidden/dist/aria-hidden.js +14 -0
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +12 -49
- package/dist/node_modules/@zag-js/aria-hidden/dist/walk-tree-outside.js +41 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.connect.js +52 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.dom.js +17 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.machine.js +93 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.connect.js +108 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.dom.js +21 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.machine.js +141 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.connect.js +80 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.dom.js +16 -0
- package/dist/node_modules/@zag-js/collapsible/dist/{index.js → collapsible.machine.js} +58 -115
- package/dist/node_modules/@zag-js/collection/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/collection/dist/{index.js → list-collection.js} +58 -56
- package/dist/node_modules/@zag-js/collection/dist/selection-map.js +58 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.anatomy.js +21 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.collection.js +6 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +341 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.dom.js +68 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +936 -0
- package/dist/node_modules/@zag-js/core/dist/create-machine.js +32 -0
- package/dist/node_modules/@zag-js/core/dist/memo.js +11 -0
- package/dist/node_modules/@zag-js/core/dist/merge-props.js +48 -0
- package/dist/node_modules/@zag-js/core/dist/scope.js +19 -0
- package/dist/node_modules/@zag-js/core/dist/state.js +143 -0
- package/dist/node_modules/@zag-js/core/dist/types.js +5 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.anatomy.js +31 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +742 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.dom.js +73 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +1042 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.parse.js +8 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +155 -0
- package/dist/node_modules/@zag-js/date-utils/dist/align.js +15 -0
- package/dist/node_modules/@zag-js/date-utils/dist/assertion.js +26 -0
- package/dist/node_modules/@zag-js/date-utils/dist/constrain.js +40 -0
- package/dist/node_modules/@zag-js/date-utils/dist/date-month.js +74 -0
- package/dist/node_modules/@zag-js/date-utils/dist/date-year.js +37 -0
- package/dist/node_modules/@zag-js/date-utils/dist/duration.js +13 -0
- package/dist/node_modules/@zag-js/date-utils/dist/format.js +25 -0
- package/dist/node_modules/@zag-js/date-utils/dist/formatter.js +30 -0
- package/dist/node_modules/@zag-js/date-utils/dist/get-era-format.js +8 -0
- package/dist/node_modules/@zag-js/date-utils/dist/mutation.js +9 -0
- package/dist/node_modules/@zag-js/date-utils/dist/pagination.js +95 -0
- package/dist/node_modules/@zag-js/date-utils/dist/parse-date.js +34 -0
- package/dist/node_modules/@zag-js/date-utils/dist/preset.js +41 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.anatomy.js +14 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.connect.js +104 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +42 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +220 -0
- package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +80 -0
- package/dist/node_modules/@zag-js/dismissable/dist/escape-keydown.js +11 -0
- package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +103 -0
- package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +37 -0
- package/dist/node_modules/@zag-js/dom-query/dist/caret.js +12 -0
- package/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
- package/dist/node_modules/@zag-js/dom-query/dist/controller.js +76 -0
- package/dist/node_modules/@zag-js/dom-query/dist/event.js +80 -0
- package/dist/node_modules/@zag-js/dom-query/dist/form.js +70 -0
- package/dist/node_modules/@zag-js/dom-query/dist/initial-focus.js +22 -0
- package/dist/node_modules/@zag-js/dom-query/dist/mutation-observer.js +41 -0
- package/dist/node_modules/@zag-js/dom-query/dist/navigate.js +13 -0
- package/dist/node_modules/@zag-js/dom-query/dist/node.js +87 -0
- package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +27 -0
- package/dist/node_modules/@zag-js/dom-query/dist/platform.js +24 -0
- package/dist/node_modules/@zag-js/dom-query/dist/press.js +61 -0
- package/dist/node_modules/@zag-js/dom-query/dist/query.js +31 -0
- package/dist/node_modules/@zag-js/dom-query/dist/raf.js +51 -0
- package/dist/node_modules/@zag-js/dom-query/dist/resize-observer.js +34 -0
- package/dist/node_modules/@zag-js/dom-query/dist/searchable.js +17 -0
- package/dist/node_modules/@zag-js/dom-query/dist/set.js +29 -0
- package/dist/node_modules/@zag-js/dom-query/dist/shared.js +11 -0
- package/dist/node_modules/@zag-js/dom-query/dist/tabbable.js +110 -0
- package/dist/node_modules/@zag-js/dom-query/dist/text-selection.js +36 -0
- package/dist/node_modules/@zag-js/dom-query/dist/typeahead.js +25 -0
- package/dist/node_modules/@zag-js/dom-query/dist/visually-hidden.js +15 -0
- package/dist/node_modules/@zag-js/dom-query/dist/wait-for.js +42 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/focus-trap.js +335 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/index.js +24 -299
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +63 -39
- package/dist/node_modules/@zag-js/interact-outside/dist/frame-utils.js +60 -0
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +97 -131
- package/dist/node_modules/@zag-js/menu/dist/menu.anatomy.js +21 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +385 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +93 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +855 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.utils.js +51 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.anatomy.js +14 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.connect.js +145 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.dom.js +31 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.machine.js +132 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.utils.js +39 -0
- package/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
- package/dist/node_modules/@zag-js/popper/dist/get-placement.js +190 -0
- package/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
- package/dist/node_modules/@zag-js/popper/dist/middleware.js +57 -0
- package/dist/node_modules/@zag-js/popper/dist/placement.js +11 -0
- package/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
- package/dist/node_modules/@zag-js/presence/dist/{index.js → presence.machine.js} +39 -47
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.anatomy.js +13 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.connect.js +197 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.dom.js +57 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.machine.js +179 -0
- package/dist/node_modules/@zag-js/react/dist/bindable.js +52 -0
- package/dist/node_modules/@zag-js/react/dist/machine.js +208 -0
- package/dist/node_modules/@zag-js/react/dist/normalize-props.js +5 -0
- package/dist/node_modules/@zag-js/react/dist/refs.js +15 -0
- package/dist/node_modules/@zag-js/react/dist/track.js +13 -0
- package/dist/node_modules/@zag-js/react/dist/use-layout-effect.js +5 -0
- package/dist/node_modules/@zag-js/rect-utils/dist/polygon.js +23 -0
- package/dist/node_modules/@zag-js/rect-utils/dist/rect.js +26 -0
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +32 -23
- package/dist/node_modules/@zag-js/select/dist/select.anatomy.js +22 -0
- package/dist/node_modules/@zag-js/select/dist/select.collection.js +6 -0
- package/dist/node_modules/@zag-js/select/dist/select.connect.js +372 -0
- package/dist/node_modules/@zag-js/select/dist/select.dom.js +53 -0
- package/dist/node_modules/@zag-js/select/dist/select.machine.js +690 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.connect.js +110 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.dom.js +25 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.machine.js +143 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.connect.js +176 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.dom.js +47 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +268 -0
- package/dist/node_modules/@zag-js/toast/dist/index.js +6 -798
- package/dist/node_modules/@zag-js/toast/dist/toast-group.connect.js +54 -0
- package/dist/node_modules/@zag-js/toast/dist/toast-group.machine.js +236 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.anatomy.js +13 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.connect.js +102 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.dom.js +10 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.machine.js +234 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.store.js +134 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.utils.js +122 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +120 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +25 -0
- package/dist/node_modules/@zag-js/tooltip/dist/{index.js → tooltip.machine.js} +109 -188
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
- package/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
- package/dist/node_modules/@zag-js/utils/dist/array.js +39 -0
- package/dist/node_modules/@zag-js/utils/dist/chunk-MXGZDBDQ.js +8 -0
- package/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
- package/dist/node_modules/@zag-js/utils/dist/functions.js +28 -0
- package/dist/node_modules/@zag-js/utils/dist/guard.js +19 -0
- package/dist/node_modules/@zag-js/utils/dist/number.js +11 -0
- package/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
- package/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
- package/dist/node_modules/@zag-js/utils/dist/timers.js +39 -0
- package/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
- package/dist/styled-system/css/css.js +1 -1
- package/dist/styled-system/helpers.js +85 -83
- package/dist/styled-system/jsx/is-valid-prop.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +18 -21
- package/styled-system/css/css.js +1 -1
- package/styled-system/helpers.js +3 -0
- package/styled-system/jsx/is-valid-prop.js +1 -1
- package/styled-system/patterns/aspect-ratio.d.ts +0 -1
- package/styled-system/patterns/bleed.d.ts +0 -1
- package/styled-system/patterns/box.d.ts +0 -1
- package/styled-system/patterns/center.d.ts +0 -1
- package/styled-system/patterns/circle.d.ts +0 -1
- package/styled-system/patterns/container.d.ts +0 -1
- package/styled-system/patterns/cq.d.ts +0 -1
- package/styled-system/patterns/divider.d.ts +0 -1
- package/styled-system/patterns/flex.d.ts +0 -1
- package/styled-system/patterns/float.d.ts +0 -1
- package/styled-system/patterns/grid-item.d.ts +0 -1
- package/styled-system/patterns/grid.d.ts +0 -1
- package/styled-system/patterns/hstack.d.ts +0 -1
- package/styled-system/patterns/link-overlay.d.ts +0 -1
- package/styled-system/patterns/spacer.d.ts +0 -1
- package/styled-system/patterns/square.d.ts +0 -1
- package/styled-system/patterns/stack.d.ts +0 -1
- package/styled-system/patterns/visually-hidden.d.ts +0 -1
- package/styled-system/patterns/vstack.d.ts +0 -1
- package/styled-system/patterns/wrap.d.ts +0 -1
- package/styled-system/themes/theme-asagi.json +1 -1
- package/styled-system/themes/theme-konjo-dark.json +1 -1
- package/styled-system/themes/theme-kurikawa.json +1 -1
- package/styled-system/themes/theme-sumire.json +1 -1
- package/styled-system/themes/theme-tsutsuji.json +1 -1
- package/styled-system/tokens/tokens.d.ts +1 -1
- package/styled-system/types/conditions.d.ts +11 -11
- package/styled-system/types/prop-type.d.ts +2 -0
- package/styled-system/types/style-props.d.ts +3 -4
- package/dist/node_modules/@zag-js/accordion/dist/index.js +0 -290
- package/dist/node_modules/@zag-js/avatar/dist/index.js +0 -154
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +0 -270
- package/dist/node_modules/@zag-js/combobox/dist/index.js +0 -1415
- package/dist/node_modules/@zag-js/core/dist/index.js +0 -92
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +0 -1826
- package/dist/node_modules/@zag-js/date-utils/dist/index.js +0 -366
- package/dist/node_modules/@zag-js/dialog/dist/index.js +0 -324
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +0 -188
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +0 -633
- package/dist/node_modules/@zag-js/menu/dist/index.js +0 -1235
- package/dist/node_modules/@zag-js/pagination/dist/index.js +0 -273
- package/dist/node_modules/@zag-js/popper/dist/index.js +0 -260
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +0 -407
- package/dist/node_modules/@zag-js/react/dist/index.js +0 -269
- package/dist/node_modules/@zag-js/rect-utils/dist/index.js +0 -46
- package/dist/node_modules/@zag-js/select/dist/index.js +0 -1088
- package/dist/node_modules/@zag-js/switch/dist/index.js +0 -275
- package/dist/node_modules/@zag-js/tabs/dist/index.js +0 -475
- package/dist/node_modules/@zag-js/types/dist/index.js +0 -12
- package/dist/node_modules/@zag-js/utils/dist/index.js +0 -173
- /package/dist/node_modules/@zag-js/anatomy/dist/{index.js → create-anatomy.js} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CalendarDate as e } from "../../../@internationalized/date/dist/CalendarDate.js";
|
|
2
|
+
import { parseDate as a } from "../../../@internationalized/date/dist/string.js";
|
|
3
|
+
function c(r) {
|
|
4
|
+
return Array.isArray(r) ? r.map((t) => c(t)) : r instanceof Date ? new e(r.getFullYear(), r.getMonth() + 1, r.getDate()) : a(r);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
c as parse
|
|
8
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { DateFormatter as s } from "../../../@internationalized/date/dist/DateFormatter.js";
|
|
2
|
+
import { memo as S } from "../../core/dist/memo.js";
|
|
3
|
+
import { match as d } from "../../utils/dist/functions.js";
|
|
4
|
+
import { clampValue as D } from "../../utils/dist/number.js";
|
|
5
|
+
import { getDecadeRange as V } from "../../date-utils/dist/date-year.js";
|
|
6
|
+
function k(e) {
|
|
7
|
+
const [t, r] = e;
|
|
8
|
+
let n;
|
|
9
|
+
return !t || !r ? n = e : n = t.compare(r) <= 0 ? e : [r, t], n;
|
|
10
|
+
}
|
|
11
|
+
function E(e, t) {
|
|
12
|
+
const [r, n] = t;
|
|
13
|
+
return !r || !n ? !1 : r.compare(e) <= 0 && n.compare(e) >= 0;
|
|
14
|
+
}
|
|
15
|
+
function F(e) {
|
|
16
|
+
return e.slice().filter((t) => t != null).sort((t, r) => t.compare(r));
|
|
17
|
+
}
|
|
18
|
+
function I(e) {
|
|
19
|
+
return d(e, {
|
|
20
|
+
year: "calendar decade",
|
|
21
|
+
month: "calendar year",
|
|
22
|
+
day: "calendar month"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
var T = {
|
|
26
|
+
day: "dd",
|
|
27
|
+
month: "mm",
|
|
28
|
+
year: "yyyy"
|
|
29
|
+
};
|
|
30
|
+
function j(e) {
|
|
31
|
+
return new s(e).formatToParts(/* @__PURE__ */ new Date()).map((t) => T[t.type] ?? t.value).join("");
|
|
32
|
+
}
|
|
33
|
+
var $ = (e, t) => e ? /\d/.test(e) || e === t || e.length !== 1 : !0, A = (e) => !Number.isNaN(e.day) && !Number.isNaN(e.month) && !Number.isNaN(e.year), L = (e, t) => e.split("").filter((r) => $(r, t)).join("");
|
|
34
|
+
function M(e) {
|
|
35
|
+
const n = new Intl.DateTimeFormat(e).formatToParts(/* @__PURE__ */ new Date()).find((l) => l.type === "literal");
|
|
36
|
+
return n ? n.value : "/";
|
|
37
|
+
}
|
|
38
|
+
var W = {
|
|
39
|
+
dayCell(e) {
|
|
40
|
+
return e.unavailable ? `Not available. ${e.valueText}` : e.firstInRange ? `Starting range from ${e.valueText}` : e.lastInRange ? `Range ending at ${e.valueText}` : e.selected ? `Selected date. ${e.valueText}` : `Choose ${e.valueText}`;
|
|
41
|
+
},
|
|
42
|
+
trigger(e) {
|
|
43
|
+
return e ? "Close calendar" : "Open calendar";
|
|
44
|
+
},
|
|
45
|
+
viewTrigger(e) {
|
|
46
|
+
return d(e, {
|
|
47
|
+
year: "Switch to month view",
|
|
48
|
+
month: "Switch to day view",
|
|
49
|
+
day: "Switch to year view"
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
presetTrigger(e) {
|
|
53
|
+
const [t = "", r = ""] = e;
|
|
54
|
+
return `select ${t} to ${r}`;
|
|
55
|
+
},
|
|
56
|
+
prevTrigger(e) {
|
|
57
|
+
return d(e, {
|
|
58
|
+
year: "Switch to previous decade",
|
|
59
|
+
month: "Switch to previous year",
|
|
60
|
+
day: "Switch to previous month"
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
nextTrigger(e) {
|
|
64
|
+
return d(e, {
|
|
65
|
+
year: "Switch to next decade",
|
|
66
|
+
month: "Switch to next year",
|
|
67
|
+
day: "Switch to next month"
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
// TODO: Revisit this
|
|
71
|
+
placeholder() {
|
|
72
|
+
return { day: "dd", month: "mm", year: "yyyy" };
|
|
73
|
+
},
|
|
74
|
+
content: "calendar",
|
|
75
|
+
monthSelect: "Select month",
|
|
76
|
+
yearSelect: "Select year",
|
|
77
|
+
clearTrigger: "Clear selected dates",
|
|
78
|
+
weekColumnHeader: "Wk",
|
|
79
|
+
weekNumberCell(e) {
|
|
80
|
+
return `Week ${e}`;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
function a(e, t) {
|
|
84
|
+
return e ? e === "day" ? 0 : e === "month" ? 1 : 2 : t || 0;
|
|
85
|
+
}
|
|
86
|
+
function f(e) {
|
|
87
|
+
return e === 0 ? "day" : e === 1 ? "month" : "year";
|
|
88
|
+
}
|
|
89
|
+
function w(e, t, r) {
|
|
90
|
+
return f(
|
|
91
|
+
D(a(e, 0), a(t, 0), a(r, 2))
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function H(e, t) {
|
|
95
|
+
return a(e, 0) > a(t, 0);
|
|
96
|
+
}
|
|
97
|
+
function O(e, t) {
|
|
98
|
+
return a(e, 0) < a(t, 0);
|
|
99
|
+
}
|
|
100
|
+
function B(e, t, r) {
|
|
101
|
+
const n = a(e, 0) + 1;
|
|
102
|
+
return w(f(n), t, r);
|
|
103
|
+
}
|
|
104
|
+
function Z(e, t, r) {
|
|
105
|
+
const n = a(e, 0) - 1;
|
|
106
|
+
return w(f(n), t, r);
|
|
107
|
+
}
|
|
108
|
+
var N = ["day", "month", "year"];
|
|
109
|
+
function q(e) {
|
|
110
|
+
N.forEach((t) => e(t));
|
|
111
|
+
}
|
|
112
|
+
var z = S(
|
|
113
|
+
(e) => [e.view, e.startValue.toString(), e.endValue.toString(), e.locale],
|
|
114
|
+
([e], t) => {
|
|
115
|
+
const { startValue: r, endValue: n, locale: l, timeZone: o, selectionMode: y } = t;
|
|
116
|
+
if (e === "year") {
|
|
117
|
+
const c = V(r.year, { strict: !0 }), i = c.at(0).toString(), u = c.at(-1).toString();
|
|
118
|
+
return { start: i, end: u, formatted: `${i} - ${u}` };
|
|
119
|
+
}
|
|
120
|
+
if (e === "month") {
|
|
121
|
+
const c = new s(l, {
|
|
122
|
+
year: "numeric",
|
|
123
|
+
timeZone: o,
|
|
124
|
+
calendar: r.calendar.identifier
|
|
125
|
+
}), i = c.format(r.toDate(o)), u = c.format(n.toDate(o)), v = y === "range" ? `${i} - ${u}` : i;
|
|
126
|
+
return { start: i, end: u, formatted: v };
|
|
127
|
+
}
|
|
128
|
+
const g = new s(l, {
|
|
129
|
+
month: "long",
|
|
130
|
+
year: "numeric",
|
|
131
|
+
timeZone: o,
|
|
132
|
+
calendar: r.calendar.identifier
|
|
133
|
+
}), m = g.format(r.toDate(o)), h = g.format(n.toDate(o)), p = y === "range" ? `${m} - ${h}` : m;
|
|
134
|
+
return { start: m, end: h, formatted: p };
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
export {
|
|
138
|
+
k as adjustStartAndEndDate,
|
|
139
|
+
w as clampView,
|
|
140
|
+
W as defaultTranslations,
|
|
141
|
+
q as eachView,
|
|
142
|
+
L as ensureValidCharacters,
|
|
143
|
+
j as getInputPlaceholder,
|
|
144
|
+
M as getLocaleSeparator,
|
|
145
|
+
B as getNextView,
|
|
146
|
+
Z as getPreviousView,
|
|
147
|
+
I as getRoleDescription,
|
|
148
|
+
z as getVisibleRangeText,
|
|
149
|
+
H as isAboveMinView,
|
|
150
|
+
O as isBelowMinView,
|
|
151
|
+
E as isDateWithinRange,
|
|
152
|
+
$ as isValidCharacter,
|
|
153
|
+
A as isValidDate,
|
|
154
|
+
F as sortDates
|
|
155
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { alignCenter as g, alignEnd as a, alignStart as f } from "./constrain.js";
|
|
2
|
+
function u(r, c, t, e, n, s) {
|
|
3
|
+
switch (c) {
|
|
4
|
+
case "start":
|
|
5
|
+
return f(r, t, e, n, s);
|
|
6
|
+
case "end":
|
|
7
|
+
return a(r, t, e, n, s);
|
|
8
|
+
case "center":
|
|
9
|
+
default:
|
|
10
|
+
return g(r, t, e, n, s);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
u as alignDate
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { toCalendarDateTime as i } from "../../../@internationalized/date/dist/conversion.js";
|
|
2
|
+
import { isSameDay as o } from "../../../@internationalized/date/dist/queries.js";
|
|
3
|
+
function m(r, n) {
|
|
4
|
+
return r == null || n == null ? r === n : !("hour" in r) && !("hour" in n) ? o(r, n) : i(r).compare(i(n)) === 0;
|
|
5
|
+
}
|
|
6
|
+
function p(r, n, u, e, t) {
|
|
7
|
+
return r ? n != null && n(r, u) ? !0 : f(r, e, t) : !1;
|
|
8
|
+
}
|
|
9
|
+
function f(r, n, u) {
|
|
10
|
+
return n != null && r.compare(n) < 0 || u != null && r.compare(u) > 0;
|
|
11
|
+
}
|
|
12
|
+
function l(r, n, u) {
|
|
13
|
+
const e = r.subtract({ days: 1 });
|
|
14
|
+
return o(e, r) || f(e, n, u);
|
|
15
|
+
}
|
|
16
|
+
function $(r, n, u) {
|
|
17
|
+
const e = r.add({ days: 1 });
|
|
18
|
+
return o(e, r) || f(e, n, u);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
m as isDateEqual,
|
|
22
|
+
f as isDateOutsideRange,
|
|
23
|
+
p as isDateUnavailable,
|
|
24
|
+
$ as isNextRangeInvalid,
|
|
25
|
+
l as isPreviousRangeInvalid
|
|
26
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { toCalendarDate as a } from "../../../@internationalized/date/dist/conversion.js";
|
|
2
|
+
import { maxDate as y, minDate as l, startOfYear as h, startOfMonth as u, startOfWeek as O } from "../../../@internationalized/date/dist/queries.js";
|
|
3
|
+
function D(f, t, r, o, s) {
|
|
4
|
+
const e = {};
|
|
5
|
+
for (let m in t) {
|
|
6
|
+
const c = m, i = t[c];
|
|
7
|
+
i != null && (e[c] = Math.floor(i / 2), e[c] > 0 && i % 2 === 0 && e[c]--);
|
|
8
|
+
}
|
|
9
|
+
const n = $(f, t, r).subtract(e);
|
|
10
|
+
return p(f, n, t, r, o, s);
|
|
11
|
+
}
|
|
12
|
+
function $(f, t, r, o, s) {
|
|
13
|
+
let e = f;
|
|
14
|
+
return t.years ? e = h(f) : t.months ? e = u(f) : t.weeks && (e = O(f, r)), p(f, e, t, r, o, s);
|
|
15
|
+
}
|
|
16
|
+
function b(f, t, r, o, s) {
|
|
17
|
+
let e = { ...t };
|
|
18
|
+
e.days ? e.days-- : e.weeks ? e.weeks-- : e.months ? e.months-- : e.years && e.years--;
|
|
19
|
+
let n = $(f, t, r).subtract(e);
|
|
20
|
+
return p(f, n, t, r, o, s);
|
|
21
|
+
}
|
|
22
|
+
function p(f, t, r, o, s, e) {
|
|
23
|
+
return s && f.compare(s) >= 0 && (t = y(t, $(a(s), r, o))), e && f.compare(e) <= 0 && (t = l(t, b(a(e), r, o))), t;
|
|
24
|
+
}
|
|
25
|
+
function v(f, t, r) {
|
|
26
|
+
const o = a(f), s = t ? a(t) : void 0, e = r ? a(r) : void 0;
|
|
27
|
+
let n = o;
|
|
28
|
+
return s && (n = y(n, s)), e && (n = l(n, e)), n.compare(o) === 0 ? f : "hour" in f ? f.set({
|
|
29
|
+
year: n.year,
|
|
30
|
+
month: n.month,
|
|
31
|
+
day: n.day
|
|
32
|
+
}) : n;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
D as alignCenter,
|
|
36
|
+
b as alignEnd,
|
|
37
|
+
$ as alignStart,
|
|
38
|
+
p as constrainStart,
|
|
39
|
+
v as constrainValue
|
|
40
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { startOfWeek as f, isSameDay as k, getWeeksInMonth as w } from "../../../@internationalized/date/dist/queries.js";
|
|
2
|
+
import { DateFormatter as i } from "../../../@internationalized/date/dist/DateFormatter.js";
|
|
3
|
+
var g = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
4
|
+
function u(e) {
|
|
5
|
+
return e != null ? g[e] : void 0;
|
|
6
|
+
}
|
|
7
|
+
function y(e, o, t) {
|
|
8
|
+
const r = u(t);
|
|
9
|
+
return f(e, o, r);
|
|
10
|
+
}
|
|
11
|
+
function p(e, o, t, r) {
|
|
12
|
+
const c = o.add({ weeks: e }), a = [];
|
|
13
|
+
let n = y(c, t, r);
|
|
14
|
+
for (; a.length < 7; ) {
|
|
15
|
+
a.push(n);
|
|
16
|
+
let s = n.add({ days: 1 });
|
|
17
|
+
if (k(n, s)) break;
|
|
18
|
+
n = s;
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
}
|
|
22
|
+
function M(e, o, t, r) {
|
|
23
|
+
const c = u(r), a = t ?? w(e, o, c);
|
|
24
|
+
return [...new Array(a).keys()].map((s) => p(s, e, o, r));
|
|
25
|
+
}
|
|
26
|
+
function l(e, o) {
|
|
27
|
+
const t = new i(e, { weekday: "long", timeZone: o }), r = new i(e, { weekday: "short", timeZone: o }), c = new i(e, { weekday: "narrow", timeZone: o });
|
|
28
|
+
return (a) => {
|
|
29
|
+
const n = a instanceof Date ? a : a.toDate(o);
|
|
30
|
+
return {
|
|
31
|
+
value: a,
|
|
32
|
+
short: r.format(n),
|
|
33
|
+
long: t.format(n),
|
|
34
|
+
narrow: c.format(n)
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function D(e, o, t, r) {
|
|
39
|
+
const c = y(e, r, o), a = [...new Array(7).keys()], n = l(r, t);
|
|
40
|
+
return a.map((s) => n(c.add({ days: s })));
|
|
41
|
+
}
|
|
42
|
+
function b(e, o = "long", t) {
|
|
43
|
+
if (!t || t.calendar.identifier === "gregory" || t.calendar.identifier === "iso8601") {
|
|
44
|
+
const n = new Date(2021, 0, 1), s = [];
|
|
45
|
+
for (let d = 0; d < 12; d++)
|
|
46
|
+
s.push(n.toLocaleString(e, { month: o })), n.setMonth(n.getMonth() + 1);
|
|
47
|
+
return s;
|
|
48
|
+
}
|
|
49
|
+
const r = t.calendar.getMonthsInYear(t), c = new i(e, {
|
|
50
|
+
month: o,
|
|
51
|
+
calendar: t.calendar.identifier
|
|
52
|
+
}), a = [];
|
|
53
|
+
for (let n = 1; n <= r; n++) {
|
|
54
|
+
const s = t.set({ month: n });
|
|
55
|
+
a.push(c.format(s.toDate("UTC")));
|
|
56
|
+
}
|
|
57
|
+
return a;
|
|
58
|
+
}
|
|
59
|
+
function x(e, o) {
|
|
60
|
+
const t = f(e, o, "mon"), r = t.year, c = t.set({ month: 1, day: 4 }), a = f(c, o, "mon"), n = t.calendar.toJulianDay(t), s = a.calendar.toJulianDay(a);
|
|
61
|
+
if (n >= s)
|
|
62
|
+
return 1 + Math.floor((n - s) / 7);
|
|
63
|
+
const d = t.set({ year: r - 1, month: 1, day: 4 }), m = f(d, o, "mon"), h = m.calendar.toJulianDay(m);
|
|
64
|
+
return 1 + Math.floor((n - h) / 7);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
p as getDaysInWeek,
|
|
68
|
+
M as getMonthDays,
|
|
69
|
+
b as getMonthNames,
|
|
70
|
+
y as getStartOfWeek,
|
|
71
|
+
D as getWeekDays,
|
|
72
|
+
x as getWeekOfYear,
|
|
73
|
+
l as getWeekdayFormats
|
|
74
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CalendarDate as c } from "../../../@internationalized/date/dist/CalendarDate.js";
|
|
2
|
+
import { toCalendar as f } from "../../../@internationalized/date/dist/conversion.js";
|
|
3
|
+
function d(e) {
|
|
4
|
+
const r = [];
|
|
5
|
+
for (let t = e.from; t <= e.to; t += 1) r.push(t);
|
|
6
|
+
return r;
|
|
7
|
+
}
|
|
8
|
+
var s = 1900, l = 2099;
|
|
9
|
+
function E(e, r, t) {
|
|
10
|
+
const a = e.calendar, n = (r == null ? void 0 : r.year) ?? f(new c(s, 1, 1), a).year, o = (t == null ? void 0 : t.year) ?? f(new c(l, 12, 31), a).year;
|
|
11
|
+
return { from: n, to: o };
|
|
12
|
+
}
|
|
13
|
+
var i = 10;
|
|
14
|
+
function R(e) {
|
|
15
|
+
if (e) {
|
|
16
|
+
if (e.length === 3) return e.padEnd(4, "0");
|
|
17
|
+
if (e.length === 2) {
|
|
18
|
+
const r = (/* @__PURE__ */ new Date()).getFullYear(), t = Math.floor(r / 100) * 100, a = parseInt(e.slice(-2), 10), n = t + a;
|
|
19
|
+
return n > r + i ? (n - 100).toString() : n.toString();
|
|
20
|
+
}
|
|
21
|
+
return e;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function D(e, r) {
|
|
25
|
+
const t = r != null && r.strict ? 10 : 12, a = e - e % 10, n = [];
|
|
26
|
+
for (let o = 0; o < t; o += 1) {
|
|
27
|
+
const u = a + o;
|
|
28
|
+
n.push(u);
|
|
29
|
+
}
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
D as getDecadeRange,
|
|
34
|
+
E as getDefaultYearRange,
|
|
35
|
+
d as getYearsRange,
|
|
36
|
+
R as normalizeYear
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isSameDay as c } from "../../../@internationalized/date/dist/queries.js";
|
|
2
|
+
import { getDayFormatter as m } from "./formatter.js";
|
|
3
|
+
function p(f, i, u, o, r) {
|
|
4
|
+
let t = u.formatRangeToParts(f.toDate(r), i.toDate(r)), a = -1;
|
|
5
|
+
for (let e = 0; e < t.length; e++) {
|
|
6
|
+
let s = t[e];
|
|
7
|
+
if (s.source === "shared" && s.type === "literal")
|
|
8
|
+
a = e;
|
|
9
|
+
else if (s.source === "endRange")
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
let l = "", n = "";
|
|
13
|
+
for (let e = 0; e < t.length; e++)
|
|
14
|
+
e < a ? l += t[e].value : e > a && (n += t[e].value);
|
|
15
|
+
return o(l, n);
|
|
16
|
+
}
|
|
17
|
+
function $(f, i, u, o) {
|
|
18
|
+
if (!f) return "";
|
|
19
|
+
let r = f, t = i ?? f, a = m(u, o);
|
|
20
|
+
return c(r, t) ? a.format(r.toDate(o)) : p(r, t, a, (l, n) => `${l} – ${n}`, o);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
p as formatRange,
|
|
24
|
+
$ as formatSelectedDate
|
|
25
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { toCalendarDateTime as f } from "../../../@internationalized/date/dist/conversion.js";
|
|
2
|
+
import { today as o } from "../../../@internationalized/date/dist/queries.js";
|
|
3
|
+
import { DateFormatter as n } from "../../../@internationalized/date/dist/DateFormatter.js";
|
|
4
|
+
import { getEraFormat as d } from "./get-era-format.js";
|
|
5
|
+
function l(a, e, t) {
|
|
6
|
+
const r = t ?? f(o(e));
|
|
7
|
+
return new n(a, {
|
|
8
|
+
weekday: "long",
|
|
9
|
+
month: "long",
|
|
10
|
+
year: "numeric",
|
|
11
|
+
day: "numeric",
|
|
12
|
+
era: d(r),
|
|
13
|
+
calendar: r.calendar.identifier,
|
|
14
|
+
timeZone: e
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function p(a, e, t) {
|
|
18
|
+
const r = t ?? o(e);
|
|
19
|
+
return new n(a, {
|
|
20
|
+
month: "long",
|
|
21
|
+
year: "numeric",
|
|
22
|
+
era: d(r),
|
|
23
|
+
calendar: r.calendar.identifier,
|
|
24
|
+
timeZone: e
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
l as getDayFormatter,
|
|
29
|
+
p as getMonthFormatter
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { toCalendar as t } from "../../../@internationalized/date/dist/conversion.js";
|
|
2
|
+
import { today as f, getLocalTimeZone as r } from "../../../@internationalized/date/dist/queries.js";
|
|
3
|
+
function d(o, a) {
|
|
4
|
+
const e = f(o ?? r());
|
|
5
|
+
return a ? t(e, a) : e;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
d as getTodayDate
|
|
9
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { isDateOutsideRange as P } from "./assertion.js";
|
|
2
|
+
import { alignStart as p, constrainStart as j, constrainValue as y, alignEnd as S } from "./constrain.js";
|
|
3
|
+
import { getUnitDuration as h, getEndDate as k } from "./duration.js";
|
|
4
|
+
function o(f, c, r, t) {
|
|
5
|
+
return function(s) {
|
|
6
|
+
const { startDate: n, focusedDate: d } = s, e = k(n, f);
|
|
7
|
+
return P(d, r, t) ? {
|
|
8
|
+
startDate: n,
|
|
9
|
+
focusedDate: y(d, r, t),
|
|
10
|
+
endDate: e
|
|
11
|
+
} : d.compare(n) < 0 ? {
|
|
12
|
+
startDate: S(d, f, c, r, t),
|
|
13
|
+
focusedDate: y(d, r, t),
|
|
14
|
+
endDate: e
|
|
15
|
+
} : d.compare(e) > 0 ? {
|
|
16
|
+
startDate: p(d, f, c, r, t),
|
|
17
|
+
endDate: e,
|
|
18
|
+
focusedDate: y(d, r, t)
|
|
19
|
+
} : {
|
|
20
|
+
startDate: n,
|
|
21
|
+
endDate: e,
|
|
22
|
+
focusedDate: y(d, r, t)
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function w(f, c, r, t, g, s) {
|
|
27
|
+
const n = o(r, t, g, s), d = c.add(r);
|
|
28
|
+
return n({
|
|
29
|
+
focusedDate: f.add(r),
|
|
30
|
+
startDate: p(
|
|
31
|
+
j(f, d, r, t, g, s),
|
|
32
|
+
r,
|
|
33
|
+
t
|
|
34
|
+
)
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function E(f, c, r, t, g, s) {
|
|
38
|
+
const n = o(r, t, g, s);
|
|
39
|
+
let d = c.subtract(r);
|
|
40
|
+
return n({
|
|
41
|
+
focusedDate: f.subtract(r),
|
|
42
|
+
startDate: p(
|
|
43
|
+
j(f, d, r, t, g, s),
|
|
44
|
+
r,
|
|
45
|
+
t
|
|
46
|
+
)
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function O(f, c, r, t, g, s, n) {
|
|
50
|
+
const d = o(t, g, s, n);
|
|
51
|
+
if (!r && !t.days)
|
|
52
|
+
return d({
|
|
53
|
+
focusedDate: f.add(h(t)),
|
|
54
|
+
startDate: c
|
|
55
|
+
});
|
|
56
|
+
if (t.days)
|
|
57
|
+
return w(f, c, t, g, s, n);
|
|
58
|
+
if (t.weeks)
|
|
59
|
+
return d({
|
|
60
|
+
focusedDate: f.add({ months: 1 }),
|
|
61
|
+
startDate: c
|
|
62
|
+
});
|
|
63
|
+
if (t.months || t.years)
|
|
64
|
+
return d({
|
|
65
|
+
focusedDate: f.add({ years: 1 }),
|
|
66
|
+
startDate: c
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function R(f, c, r, t, g, s, n) {
|
|
70
|
+
const d = o(t, g, s, n);
|
|
71
|
+
if (!r && !t.days)
|
|
72
|
+
return d({
|
|
73
|
+
focusedDate: f.subtract(h(t)),
|
|
74
|
+
startDate: c
|
|
75
|
+
});
|
|
76
|
+
if (t.days)
|
|
77
|
+
return E(f, c, t, g, s, n);
|
|
78
|
+
if (t.weeks)
|
|
79
|
+
return d({
|
|
80
|
+
focusedDate: f.subtract({ months: 1 }),
|
|
81
|
+
startDate: c
|
|
82
|
+
});
|
|
83
|
+
if (t.months || t.years)
|
|
84
|
+
return d({
|
|
85
|
+
focusedDate: f.subtract({ years: 1 }),
|
|
86
|
+
startDate: c
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
o as getAdjustedDateFn,
|
|
91
|
+
w as getNextPage,
|
|
92
|
+
O as getNextSection,
|
|
93
|
+
E as getPreviousPage,
|
|
94
|
+
R as getPreviousSection
|
|
95
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CalendarDate as c } from "../../../@internationalized/date/dist/CalendarDate.js";
|
|
2
|
+
import { DateFormatter as m } from "../../../@internationalized/date/dist/DateFormatter.js";
|
|
3
|
+
import { normalizeYear as f } from "./date-year.js";
|
|
4
|
+
var u = (e) => e != null && e.length === 4, g = (e) => e != null && parseFloat(e) <= 12, h = (e) => e != null && parseFloat(e) <= 31;
|
|
5
|
+
function b(e, l, o) {
|
|
6
|
+
const i = p(l, o);
|
|
7
|
+
let { year: t, month: r, day: a } = d(i, e) ?? {};
|
|
8
|
+
if (t != null || r != null || a != null) {
|
|
9
|
+
const n = /* @__PURE__ */ new Date();
|
|
10
|
+
t || (t = n.getFullYear().toString()), r || (r = (n.getMonth() + 1).toString()), a || (a = n.getDate().toString());
|
|
11
|
+
}
|
|
12
|
+
if (u(t) || (t = f(t)), u(t) && g(r) && h(a))
|
|
13
|
+
return new c(+t, +r, +a);
|
|
14
|
+
const s = Date.parse(e);
|
|
15
|
+
if (!isNaN(s)) {
|
|
16
|
+
const n = new Date(s);
|
|
17
|
+
return new c(n.getFullYear(), n.getMonth() + 1, n.getDate());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function p(e, l) {
|
|
21
|
+
return new m(e, { day: "numeric", month: "numeric", year: "numeric", timeZone: l }).formatToParts(new Date(2e3, 11, 25)).map(({ type: t, value: r }) => t === "literal" ? `${r}?` : `((?!=<${t}>)\\d+)?`).join("");
|
|
22
|
+
}
|
|
23
|
+
function d(e, l) {
|
|
24
|
+
var i;
|
|
25
|
+
const o = l.match(e);
|
|
26
|
+
return (i = e.toString().match(/<(.+?)>/g)) == null ? void 0 : i.map((t) => {
|
|
27
|
+
var a;
|
|
28
|
+
const r = t.match(/<(.+)>/);
|
|
29
|
+
return !r || r.length <= 0 ? null : (a = t.match(/<(.+)>/)) == null ? void 0 : a[1];
|
|
30
|
+
}).reduce((t, r, a) => (r && (o && o.length > a ? t[r] = o[a + 1] : t[r] = null), t), {});
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
b as parseDateString
|
|
34
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { toCalendarDate as o } from "../../../@internationalized/date/dist/conversion.js";
|
|
2
|
+
import { now as $, startOfYear as s, endOfYear as h, startOfWeek as d, endOfWeek as n, startOfMonth as t, endOfMonth as f } from "../../../@internationalized/date/dist/queries.js";
|
|
3
|
+
function m(r, e, c) {
|
|
4
|
+
const a = o($(c));
|
|
5
|
+
switch (r) {
|
|
6
|
+
case "thisWeek":
|
|
7
|
+
return [d(a, e), n(a, e)];
|
|
8
|
+
case "thisMonth":
|
|
9
|
+
return [t(a), a];
|
|
10
|
+
case "thisQuarter":
|
|
11
|
+
return [t(a).add({ months: -((a.month - 1) % 3) }), a];
|
|
12
|
+
case "thisYear":
|
|
13
|
+
return [s(a), a];
|
|
14
|
+
case "last3Days":
|
|
15
|
+
return [a.add({ days: -2 }), a];
|
|
16
|
+
case "last7Days":
|
|
17
|
+
return [a.add({ days: -6 }), a];
|
|
18
|
+
case "last14Days":
|
|
19
|
+
return [a.add({ days: -13 }), a];
|
|
20
|
+
case "last30Days":
|
|
21
|
+
return [a.add({ days: -29 }), a];
|
|
22
|
+
case "last90Days":
|
|
23
|
+
return [a.add({ days: -89 }), a];
|
|
24
|
+
case "lastMonth":
|
|
25
|
+
return [t(a.add({ months: -1 })), f(a.add({ months: -1 }))];
|
|
26
|
+
case "lastQuarter":
|
|
27
|
+
return [
|
|
28
|
+
t(a.add({ months: -((a.month - 1) % 3) - 3 })),
|
|
29
|
+
f(a.add({ months: -((a.month - 1) % 3) - 1 }))
|
|
30
|
+
];
|
|
31
|
+
case "lastWeek":
|
|
32
|
+
return [d(a, e).add({ weeks: -1 }), n(a, e).add({ weeks: -1 })];
|
|
33
|
+
case "lastYear":
|
|
34
|
+
return [s(a.add({ years: -1 })), h(a.add({ years: -1 }))];
|
|
35
|
+
default:
|
|
36
|
+
throw new Error(`Invalid date range preset: ${r}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
m as getDateRangePreset
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createAnatomy as r } from "../../anatomy/dist/create-anatomy.js";
|
|
2
|
+
var t = r("dialog").parts(
|
|
3
|
+
"trigger",
|
|
4
|
+
"backdrop",
|
|
5
|
+
"positioner",
|
|
6
|
+
"content",
|
|
7
|
+
"title",
|
|
8
|
+
"description",
|
|
9
|
+
"closeTrigger"
|
|
10
|
+
), a = t.build();
|
|
11
|
+
export {
|
|
12
|
+
t as anatomy,
|
|
13
|
+
a as parts
|
|
14
|
+
};
|