@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
|
@@ -1,173 +1,139 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
o.document.addEventListener(n, r, i);
|
|
16
|
-
} catch {
|
|
17
|
-
}
|
|
18
|
-
}), () => {
|
|
19
|
-
try {
|
|
20
|
-
e.removeEventListener(n, r, i);
|
|
21
|
-
} catch {
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
removeEventListener(n, r, i) {
|
|
26
|
-
e.each((o) => {
|
|
27
|
-
try {
|
|
28
|
-
o.document.removeEventListener(n, r, i);
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
return e;
|
|
35
|
-
}
|
|
36
|
-
function $(t) {
|
|
37
|
-
const e = t.frameElement != null ? t.parent : null;
|
|
38
|
-
return {
|
|
39
|
-
addEventListener: (n, r, i) => {
|
|
40
|
-
try {
|
|
41
|
-
e == null || e.addEventListener(n, r, i);
|
|
42
|
-
} catch {
|
|
43
|
-
}
|
|
44
|
-
return () => {
|
|
45
|
-
try {
|
|
46
|
-
e == null || e.removeEventListener(n, r, i);
|
|
47
|
-
} catch {
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
removeEventListener: (n, r, i) => {
|
|
52
|
-
try {
|
|
53
|
-
e == null || e.removeEventListener(n, r, i);
|
|
54
|
-
} catch {
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
var C = "pointerdown.outside", D = "focus.outside";
|
|
60
|
-
function j(t) {
|
|
61
|
-
for (const e of t)
|
|
62
|
-
if (k(e) && X(e)) return !0;
|
|
1
|
+
import { getParentWindow as q, getWindowFrames as B } from "./frame-utils.js";
|
|
2
|
+
import { raf as W } from "../../dom-query/dist/raf.js";
|
|
3
|
+
import { getDocument as $, getWindow as j, isShadowRoot as z, isHTMLElement as F, contains as G } from "../../dom-query/dist/node.js";
|
|
4
|
+
import { addDomEvent as C, getEventTarget as O, isContextMenuEvent as J } from "../../dom-query/dist/event.js";
|
|
5
|
+
import { isTouchDevice as Y } from "../../dom-query/dist/platform.js";
|
|
6
|
+
import { callAll as R } from "../../utils/dist/functions.js";
|
|
7
|
+
import { isFocusable as U } from "../../dom-query/dist/tabbable.js";
|
|
8
|
+
import { isControlledElement as K } from "../../dom-query/dist/controller.js";
|
|
9
|
+
import { getNearestOverflowAncestor as X } from "../../dom-query/dist/overflow.js";
|
|
10
|
+
var k = "pointerdown.outside", H = "focus.outside";
|
|
11
|
+
function Q(t) {
|
|
12
|
+
for (const n of t)
|
|
13
|
+
if (F(n) && U(n)) return !0;
|
|
63
14
|
return !1;
|
|
64
15
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
67
|
-
if (!
|
|
68
|
-
const
|
|
69
|
-
return
|
|
16
|
+
var _ = (t) => "clientY" in t;
|
|
17
|
+
function Z(t, n) {
|
|
18
|
+
if (!_(n) || !t) return !1;
|
|
19
|
+
const o = t.getBoundingClientRect();
|
|
20
|
+
return o.width === 0 || o.height === 0 ? !1 : o.top <= n.clientY && n.clientY <= o.top + o.height && o.left <= n.clientX && n.clientX <= o.left + o.width;
|
|
70
21
|
}
|
|
71
|
-
function
|
|
72
|
-
return t.y <=
|
|
22
|
+
function v(t, n) {
|
|
23
|
+
return t.y <= n.y && n.y <= t.y + t.height && t.x <= n.x && n.x <= t.x + t.width;
|
|
73
24
|
}
|
|
74
|
-
function
|
|
75
|
-
if (!
|
|
76
|
-
const
|
|
77
|
-
x:
|
|
78
|
-
y:
|
|
79
|
-
width:
|
|
80
|
-
height:
|
|
81
|
-
},
|
|
25
|
+
function N(t, n) {
|
|
26
|
+
if (!n || !_(t)) return !1;
|
|
27
|
+
const o = n.scrollHeight > n.clientHeight, f = o && t.clientX > n.offsetLeft + n.clientWidth, c = n.scrollWidth > n.clientWidth, i = c && t.clientY > n.offsetTop + n.clientHeight, p = {
|
|
28
|
+
x: n.offsetLeft,
|
|
29
|
+
y: n.offsetTop,
|
|
30
|
+
width: n.clientWidth + (o ? 16 : 0),
|
|
31
|
+
height: n.clientHeight + (c ? 16 : 0)
|
|
32
|
+
}, w = {
|
|
82
33
|
x: t.clientX,
|
|
83
34
|
y: t.clientY
|
|
84
35
|
};
|
|
85
|
-
return
|
|
36
|
+
return v(p, w) ? f || i : !1;
|
|
86
37
|
}
|
|
87
|
-
function
|
|
88
|
-
const {
|
|
38
|
+
function tt(t, n) {
|
|
39
|
+
const {
|
|
40
|
+
exclude: o,
|
|
41
|
+
onFocusOutside: f,
|
|
42
|
+
onPointerDownOutside: c,
|
|
43
|
+
onInteractOutside: i,
|
|
44
|
+
defer: p,
|
|
45
|
+
followControlledElements: w = !0
|
|
46
|
+
} = n;
|
|
89
47
|
if (!t) return;
|
|
90
|
-
const
|
|
91
|
-
function
|
|
92
|
-
if (!
|
|
93
|
-
const s =
|
|
48
|
+
const h = $(t), g = j(t), b = B(g), P = q(g);
|
|
49
|
+
function x(e, u) {
|
|
50
|
+
if (!F(u) || !u.isConnected || G(t, u) || Z(t, e) || w && K(t, u)) return !1;
|
|
51
|
+
const s = h.querySelector(`[aria-controls="${t.id}"]`);
|
|
94
52
|
if (s) {
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
53
|
+
const d = X(s);
|
|
54
|
+
if (N(e, d)) return !1;
|
|
97
55
|
}
|
|
98
|
-
const
|
|
99
|
-
return
|
|
56
|
+
const l = X(t);
|
|
57
|
+
return N(e, l) ? !1 : !(o != null && o(u));
|
|
100
58
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
59
|
+
const m = /* @__PURE__ */ new Set(), y = z(t == null ? void 0 : t.getRootNode());
|
|
60
|
+
let L = !1;
|
|
61
|
+
function S(e) {
|
|
62
|
+
L = !0;
|
|
63
|
+
const u = () => {
|
|
64
|
+
L = !1;
|
|
65
|
+
};
|
|
66
|
+
h.addEventListener("pointerup", u, { once: !0 }), g.addEventListener("pointerup", u, { once: !0 });
|
|
67
|
+
function s(l) {
|
|
68
|
+
var I;
|
|
69
|
+
const d = p && !Y() ? W : (E) => E(), r = l ?? e, D = ((I = r == null ? void 0 : r.composedPath) == null ? void 0 : I.call(r)) ?? [r == null ? void 0 : r.target];
|
|
70
|
+
d(() => {
|
|
71
|
+
const E = y ? D[0] : O(e);
|
|
72
|
+
if (!(!t || !x(e, E))) {
|
|
73
|
+
if (c || i) {
|
|
74
|
+
const M = R(c, i);
|
|
75
|
+
t.addEventListener(k, M, { once: !0 });
|
|
112
76
|
}
|
|
113
|
-
|
|
77
|
+
A(t, k, {
|
|
114
78
|
bubbles: !1,
|
|
115
79
|
cancelable: !0,
|
|
116
80
|
detail: {
|
|
117
|
-
originalEvent:
|
|
118
|
-
contextmenu:
|
|
119
|
-
focusable:
|
|
120
|
-
target:
|
|
81
|
+
originalEvent: r,
|
|
82
|
+
contextmenu: J(r),
|
|
83
|
+
focusable: Q(D),
|
|
84
|
+
target: E
|
|
121
85
|
}
|
|
122
86
|
});
|
|
123
87
|
}
|
|
124
88
|
});
|
|
125
89
|
}
|
|
126
|
-
|
|
90
|
+
e.pointerType === "touch" ? (m.forEach((l) => l()), m.add(C(h, "click", s, { once: !0 })), m.add(P.addEventListener("click", s, { once: !0 })), m.add(b.addEventListener("click", s, { once: !0 }))) : s();
|
|
127
91
|
}
|
|
128
|
-
const
|
|
129
|
-
|
|
92
|
+
const a = /* @__PURE__ */ new Set(), V = setTimeout(() => {
|
|
93
|
+
a.add(C(h, "pointerdown", S, !0)), a.add(P.addEventListener("pointerdown", S, !0)), a.add(b.addEventListener("pointerdown", S, !0));
|
|
130
94
|
}, 0);
|
|
131
|
-
function
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
95
|
+
function T(e) {
|
|
96
|
+
if (L) return;
|
|
97
|
+
(p ? W : (s) => s())(() => {
|
|
98
|
+
var d;
|
|
99
|
+
const s = ((d = e == null ? void 0 : e.composedPath) == null ? void 0 : d.call(e)) ?? [e == null ? void 0 : e.target], l = y ? s[0] : O(e);
|
|
100
|
+
if (!(!t || !x(e, l))) {
|
|
101
|
+
if (f || i) {
|
|
102
|
+
const r = R(f, i);
|
|
103
|
+
t.addEventListener(H, r, { once: !0 });
|
|
138
104
|
}
|
|
139
|
-
|
|
105
|
+
A(t, H, {
|
|
140
106
|
bubbles: !1,
|
|
141
107
|
cancelable: !0,
|
|
142
108
|
detail: {
|
|
143
|
-
originalEvent:
|
|
109
|
+
originalEvent: e,
|
|
144
110
|
contextmenu: !1,
|
|
145
|
-
focusable:
|
|
146
|
-
target:
|
|
111
|
+
focusable: U(l),
|
|
112
|
+
target: l
|
|
147
113
|
}
|
|
148
114
|
});
|
|
149
115
|
}
|
|
150
116
|
});
|
|
151
117
|
}
|
|
152
|
-
return
|
|
153
|
-
clearTimeout(
|
|
118
|
+
return Y() || (a.add(C(h, "focusin", T, !0)), a.add(P.addEventListener("focusin", T, !0)), a.add(b.addEventListener("focusin", T, !0))), () => {
|
|
119
|
+
clearTimeout(V), m.forEach((e) => e()), a.forEach((e) => e());
|
|
154
120
|
};
|
|
155
121
|
}
|
|
156
|
-
function
|
|
157
|
-
const { defer:
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
122
|
+
function ft(t, n) {
|
|
123
|
+
const { defer: o } = n, f = o ? W : (i) => i(), c = [];
|
|
124
|
+
return c.push(
|
|
125
|
+
f(() => {
|
|
126
|
+
const i = typeof t == "function" ? t() : t;
|
|
127
|
+
c.push(tt(i, n));
|
|
162
128
|
})
|
|
163
129
|
), () => {
|
|
164
|
-
|
|
130
|
+
c.forEach((i) => i == null ? void 0 : i());
|
|
165
131
|
};
|
|
166
132
|
}
|
|
167
|
-
function
|
|
168
|
-
const
|
|
169
|
-
return t.dispatchEvent(
|
|
133
|
+
function A(t, n, o) {
|
|
134
|
+
const f = t.ownerDocument.defaultView || window, c = new f.CustomEvent(n, o);
|
|
135
|
+
return t.dispatchEvent(c);
|
|
170
136
|
}
|
|
171
137
|
export {
|
|
172
|
-
|
|
138
|
+
ft as trackInteractOutside
|
|
173
139
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createAnatomy as r } from "../../anatomy/dist/create-anatomy.js";
|
|
2
|
+
var t = r("menu").parts(
|
|
3
|
+
"arrow",
|
|
4
|
+
"arrowTip",
|
|
5
|
+
"content",
|
|
6
|
+
"contextTrigger",
|
|
7
|
+
"indicator",
|
|
8
|
+
"item",
|
|
9
|
+
"itemGroup",
|
|
10
|
+
"itemGroupLabel",
|
|
11
|
+
"itemIndicator",
|
|
12
|
+
"itemText",
|
|
13
|
+
"positioner",
|
|
14
|
+
"separator",
|
|
15
|
+
"trigger",
|
|
16
|
+
"triggerItem"
|
|
17
|
+
), i = t.build();
|
|
18
|
+
export {
|
|
19
|
+
t as anatomy,
|
|
20
|
+
i as parts
|
|
21
|
+
};
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { isDownloadingEvent as x, isOpeningInNewTab as U, getEventTarget as v, getEventKey as W, isPrintableKey as $, isModifierKey as j, isContextMenuEvent as q, getEventPoint as f } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { isValidTabEvent as J } from "../../dom-query/dist/initial-focus.js";
|
|
3
|
+
import { contains as Q, isEditableElement as Z } from "../../dom-query/dist/node.js";
|
|
4
|
+
import { dataAttr as T, ariaAttr as z } from "../../dom-query/dist/shared.js";
|
|
5
|
+
import { getPlacementStyles as tt } from "../../popper/dist/get-styles.js";
|
|
6
|
+
import { parts as l } from "./menu.anatomy.js";
|
|
7
|
+
import { getGroupLabelId as V, getGroupId as et, getContextTriggerId as H, getTriggerId as K, getContentId as h, getArrowId as rt, getPositionerId as nt, isTargetDisabled as P, itemSelectEvent as X, getItemId as F } from "./menu.dom.js";
|
|
8
|
+
import { setParentRoutingLock as it } from "./menu.utils.js";
|
|
9
|
+
import { hasProp as N } from "../../utils/dist/guard.js";
|
|
10
|
+
import { mergeProps as ot } from "../../core/dist/merge-props.js";
|
|
11
|
+
import { cast as B } from "../../utils/dist/functions.js";
|
|
12
|
+
function ft(I, g) {
|
|
13
|
+
const { context: m, send: n, state: k, computed: C, prop: a, scope: d } = I, p = k.hasTag("open"), R = m.get("isSubmenu"), Y = C("isTypingAhead"), _ = a("composite"), L = m.get("currentPlacement"), w = m.get("anchorPoint"), D = m.get("highlightedValue"), E = m.get("triggerValue"), b = tt({
|
|
14
|
+
...a("positioning"),
|
|
15
|
+
placement: w ? "bottom" : L
|
|
16
|
+
});
|
|
17
|
+
function O(t) {
|
|
18
|
+
return {
|
|
19
|
+
id: F(d, t.value),
|
|
20
|
+
disabled: !!t.disabled,
|
|
21
|
+
highlighted: D === t.value
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function G(t) {
|
|
25
|
+
const e = t.valueText ?? t.value;
|
|
26
|
+
return { ...t, id: t.value, valueText: e };
|
|
27
|
+
}
|
|
28
|
+
function y(t) {
|
|
29
|
+
return {
|
|
30
|
+
...O(G(t)),
|
|
31
|
+
checked: !!t.checked
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function S(t) {
|
|
35
|
+
const { closeOnSelect: e, valueText: s, value: c } = t, r = O(t), o = F(d, c);
|
|
36
|
+
return g.element({
|
|
37
|
+
...l.item.attrs,
|
|
38
|
+
id: o,
|
|
39
|
+
role: "menuitem",
|
|
40
|
+
"aria-disabled": z(r.disabled),
|
|
41
|
+
"data-disabled": T(r.disabled),
|
|
42
|
+
"data-ownedby": h(d),
|
|
43
|
+
"data-highlighted": T(r.highlighted),
|
|
44
|
+
"data-value": c,
|
|
45
|
+
"data-valuetext": s,
|
|
46
|
+
onDragStart(i) {
|
|
47
|
+
i.currentTarget.matches("a[href]") && i.preventDefault();
|
|
48
|
+
},
|
|
49
|
+
onPointerMove(i) {
|
|
50
|
+
if (r.disabled || i.pointerType !== "mouse") return;
|
|
51
|
+
const u = i.currentTarget;
|
|
52
|
+
if (r.highlighted) return;
|
|
53
|
+
const A = f(i);
|
|
54
|
+
n({ type: "ITEM_POINTERMOVE", id: o, target: u, closeOnSelect: e, point: A });
|
|
55
|
+
},
|
|
56
|
+
onPointerLeave(i) {
|
|
57
|
+
var M;
|
|
58
|
+
if (r.disabled || i.pointerType !== "mouse" || !((M = I.event.previous()) == null ? void 0 : M.type.includes("POINTER"))) return;
|
|
59
|
+
const A = i.currentTarget;
|
|
60
|
+
n({ type: "ITEM_POINTERLEAVE", id: o, target: A, closeOnSelect: e });
|
|
61
|
+
},
|
|
62
|
+
onPointerDown(i) {
|
|
63
|
+
if (r.disabled) return;
|
|
64
|
+
const u = i.currentTarget;
|
|
65
|
+
n({ type: "ITEM_POINTERDOWN", target: u, id: o, closeOnSelect: e });
|
|
66
|
+
},
|
|
67
|
+
onClick(i) {
|
|
68
|
+
if (x(i) || U(i) || r.disabled) return;
|
|
69
|
+
const u = i.currentTarget;
|
|
70
|
+
n({ type: "ITEM_CLICK", target: u, id: o, closeOnSelect: e });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
highlightedValue: D,
|
|
76
|
+
open: p,
|
|
77
|
+
setOpen(t) {
|
|
78
|
+
k.hasTag("open") !== t && n({ type: t ? "OPEN" : "CLOSE" });
|
|
79
|
+
},
|
|
80
|
+
triggerValue: E,
|
|
81
|
+
setTriggerValue(t) {
|
|
82
|
+
n({ type: "TRIGGER_VALUE.SET", value: t });
|
|
83
|
+
},
|
|
84
|
+
setHighlightedValue(t) {
|
|
85
|
+
n({ type: "HIGHLIGHTED.SET", value: t });
|
|
86
|
+
},
|
|
87
|
+
setParent(t) {
|
|
88
|
+
n({ type: "PARENT.SET", value: t, id: t.prop("id") });
|
|
89
|
+
},
|
|
90
|
+
setChild(t) {
|
|
91
|
+
n({ type: "CHILD.SET", value: t, id: t.prop("id") });
|
|
92
|
+
},
|
|
93
|
+
reposition(t = {}) {
|
|
94
|
+
n({ type: "POSITIONING.SET", options: t });
|
|
95
|
+
},
|
|
96
|
+
addItemListener(t) {
|
|
97
|
+
const e = d.getById(t.id);
|
|
98
|
+
if (!e) return;
|
|
99
|
+
const s = () => {
|
|
100
|
+
var c;
|
|
101
|
+
return (c = t.onSelect) == null ? void 0 : c.call(t);
|
|
102
|
+
};
|
|
103
|
+
return e.addEventListener(X, s), () => e.removeEventListener(X, s);
|
|
104
|
+
},
|
|
105
|
+
getContextTriggerProps(t = {}) {
|
|
106
|
+
const { value: e } = t, s = e == null ? !1 : E === e, c = H(d, e);
|
|
107
|
+
return g.element({
|
|
108
|
+
...l.contextTrigger.attrs,
|
|
109
|
+
dir: a("dir"),
|
|
110
|
+
id: c,
|
|
111
|
+
"data-ownedby": d.id,
|
|
112
|
+
"data-value": e,
|
|
113
|
+
"data-current": T(s),
|
|
114
|
+
"data-state": p ? "open" : "closed",
|
|
115
|
+
onPointerDown(r) {
|
|
116
|
+
if (r.pointerType === "mouse") return;
|
|
117
|
+
const o = f(r);
|
|
118
|
+
n({ type: "CONTEXT_MENU_START", point: o, value: e });
|
|
119
|
+
},
|
|
120
|
+
onPointerCancel(r) {
|
|
121
|
+
r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
|
|
122
|
+
},
|
|
123
|
+
onPointerMove(r) {
|
|
124
|
+
r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
|
|
125
|
+
},
|
|
126
|
+
onPointerUp(r) {
|
|
127
|
+
r.pointerType !== "mouse" && n({ type: "CONTEXT_MENU_CANCEL" });
|
|
128
|
+
},
|
|
129
|
+
onContextMenu(r) {
|
|
130
|
+
const o = f(r), i = p && e != null && !s;
|
|
131
|
+
n({
|
|
132
|
+
type: i ? "TRIGGER_VALUE.SET" : "CONTEXT_MENU",
|
|
133
|
+
point: o,
|
|
134
|
+
value: e
|
|
135
|
+
}), r.preventDefault();
|
|
136
|
+
},
|
|
137
|
+
style: {
|
|
138
|
+
WebkitTouchCallout: "none",
|
|
139
|
+
WebkitUserSelect: "none",
|
|
140
|
+
userSelect: "none"
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
getTriggerItemProps(t) {
|
|
145
|
+
const e = t.getTriggerProps();
|
|
146
|
+
return ot(S({ value: e.id }), e);
|
|
147
|
+
},
|
|
148
|
+
getTriggerProps(t = {}) {
|
|
149
|
+
const { value: e } = t, s = e == null ? !1 : E === e, c = K(d, e);
|
|
150
|
+
return g.button({
|
|
151
|
+
...R ? l.triggerItem.attrs : l.trigger.attrs,
|
|
152
|
+
"data-placement": m.get("currentPlacement"),
|
|
153
|
+
type: "button",
|
|
154
|
+
dir: a("dir"),
|
|
155
|
+
id: c,
|
|
156
|
+
// Multi-trigger attributes - only included when value is provided
|
|
157
|
+
...e != null && {
|
|
158
|
+
"data-ownedby": d.id,
|
|
159
|
+
"data-value": e,
|
|
160
|
+
"data-current": T(s)
|
|
161
|
+
},
|
|
162
|
+
"data-uid": a("id"),
|
|
163
|
+
"aria-haspopup": _ ? "menu" : "dialog",
|
|
164
|
+
"aria-controls": h(d),
|
|
165
|
+
"data-controls": h(d),
|
|
166
|
+
"aria-expanded": e == null ? p : p && s,
|
|
167
|
+
"data-state": p ? "open" : "closed",
|
|
168
|
+
onPointerMove(r) {
|
|
169
|
+
if (r.pointerType !== "mouse" || P(r.currentTarget) || !R) return;
|
|
170
|
+
const i = f(r);
|
|
171
|
+
n({ type: "TRIGGER_POINTERMOVE", target: r.currentTarget, point: i });
|
|
172
|
+
},
|
|
173
|
+
onPointerLeave(r) {
|
|
174
|
+
if (P(r.currentTarget) || r.pointerType !== "mouse" || !R) return;
|
|
175
|
+
it(I.refs.get("parent"), !0);
|
|
176
|
+
const o = f(r);
|
|
177
|
+
n({
|
|
178
|
+
type: "TRIGGER_POINTERLEAVE",
|
|
179
|
+
target: r.currentTarget,
|
|
180
|
+
point: o
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
onPointerDown(r) {
|
|
184
|
+
P(r.currentTarget) || q(r) || r.preventDefault();
|
|
185
|
+
},
|
|
186
|
+
onClick(r) {
|
|
187
|
+
if (r.defaultPrevented || P(r.currentTarget)) return;
|
|
188
|
+
const o = p && e != null && !s;
|
|
189
|
+
n({
|
|
190
|
+
type: o ? "TRIGGER_VALUE.SET" : "TRIGGER_CLICK",
|
|
191
|
+
target: r.currentTarget,
|
|
192
|
+
value: e
|
|
193
|
+
});
|
|
194
|
+
},
|
|
195
|
+
onBlur() {
|
|
196
|
+
n({ type: "TRIGGER_BLUR" });
|
|
197
|
+
},
|
|
198
|
+
onFocus() {
|
|
199
|
+
n({ type: "TRIGGER_FOCUS" });
|
|
200
|
+
},
|
|
201
|
+
onKeyDown(r) {
|
|
202
|
+
if (r.defaultPrevented) return;
|
|
203
|
+
const o = {
|
|
204
|
+
ArrowDown() {
|
|
205
|
+
n({ type: "ARROW_DOWN", value: e });
|
|
206
|
+
},
|
|
207
|
+
ArrowUp() {
|
|
208
|
+
n({ type: "ARROW_UP", value: e });
|
|
209
|
+
},
|
|
210
|
+
Enter() {
|
|
211
|
+
n({ type: "ARROW_DOWN", src: "enter", value: e });
|
|
212
|
+
},
|
|
213
|
+
Space() {
|
|
214
|
+
n({ type: "ARROW_DOWN", src: "space", value: e });
|
|
215
|
+
}
|
|
216
|
+
}, i = W(r, {
|
|
217
|
+
orientation: "vertical",
|
|
218
|
+
dir: a("dir")
|
|
219
|
+
}), u = o[i];
|
|
220
|
+
u && (r.preventDefault(), u(r));
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
getIndicatorProps() {
|
|
225
|
+
return g.element({
|
|
226
|
+
...l.indicator.attrs,
|
|
227
|
+
dir: a("dir"),
|
|
228
|
+
"data-state": p ? "open" : "closed"
|
|
229
|
+
});
|
|
230
|
+
},
|
|
231
|
+
getPositionerProps() {
|
|
232
|
+
return g.element({
|
|
233
|
+
...l.positioner.attrs,
|
|
234
|
+
dir: a("dir"),
|
|
235
|
+
id: nt(d),
|
|
236
|
+
style: b.floating
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
getArrowProps() {
|
|
240
|
+
return g.element({
|
|
241
|
+
id: rt(d),
|
|
242
|
+
...l.arrow.attrs,
|
|
243
|
+
dir: a("dir"),
|
|
244
|
+
style: b.arrow
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
getArrowTipProps() {
|
|
248
|
+
return g.element({
|
|
249
|
+
...l.arrowTip.attrs,
|
|
250
|
+
dir: a("dir"),
|
|
251
|
+
style: b.arrowTip
|
|
252
|
+
});
|
|
253
|
+
},
|
|
254
|
+
getContentProps() {
|
|
255
|
+
return g.element({
|
|
256
|
+
...l.content.attrs,
|
|
257
|
+
id: h(d),
|
|
258
|
+
"aria-label": a("aria-label"),
|
|
259
|
+
hidden: !p,
|
|
260
|
+
"data-state": p ? "open" : "closed",
|
|
261
|
+
role: _ ? "menu" : "dialog",
|
|
262
|
+
tabIndex: 0,
|
|
263
|
+
dir: a("dir"),
|
|
264
|
+
"aria-activedescendant": C("highlightedId") || void 0,
|
|
265
|
+
"aria-labelledby": w ? H(d, E ?? void 0) : K(d, E ?? void 0),
|
|
266
|
+
"data-placement": L,
|
|
267
|
+
onPointerEnter(t) {
|
|
268
|
+
t.pointerType === "mouse" && n({ type: "MENU_POINTERENTER" });
|
|
269
|
+
},
|
|
270
|
+
onKeyDown(t) {
|
|
271
|
+
if (t.defaultPrevented || !Q(t.currentTarget, v(t))) return;
|
|
272
|
+
const e = v(t);
|
|
273
|
+
if (!((e == null ? void 0 : e.closest("[role=menu]")) === t.currentTarget || e === t.currentTarget)) return;
|
|
274
|
+
if (t.key === "Tab" && !J(t)) {
|
|
275
|
+
t.preventDefault();
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const c = {
|
|
279
|
+
ArrowDown() {
|
|
280
|
+
n({ type: "ARROW_DOWN" });
|
|
281
|
+
},
|
|
282
|
+
ArrowUp() {
|
|
283
|
+
n({ type: "ARROW_UP" });
|
|
284
|
+
},
|
|
285
|
+
ArrowLeft() {
|
|
286
|
+
n({ type: "ARROW_LEFT" });
|
|
287
|
+
},
|
|
288
|
+
ArrowRight() {
|
|
289
|
+
n({ type: "ARROW_RIGHT" });
|
|
290
|
+
},
|
|
291
|
+
Enter() {
|
|
292
|
+
n({ type: "ENTER" });
|
|
293
|
+
},
|
|
294
|
+
Space(i) {
|
|
295
|
+
var u;
|
|
296
|
+
Y ? n({ type: "TYPEAHEAD", key: i.key }) : (u = c.Enter) == null || u.call(c, i);
|
|
297
|
+
},
|
|
298
|
+
Home() {
|
|
299
|
+
n({ type: "HOME" });
|
|
300
|
+
},
|
|
301
|
+
End() {
|
|
302
|
+
n({ type: "END" });
|
|
303
|
+
}
|
|
304
|
+
}, r = W(t, { dir: a("dir") }), o = c[r];
|
|
305
|
+
if (o) {
|
|
306
|
+
o(t), t.stopPropagation(), t.preventDefault();
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
a("typeahead") && $(t) && (j(t) || Z(e) || (n({ type: "TYPEAHEAD", key: t.key }), t.preventDefault()));
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
getSeparatorProps() {
|
|
314
|
+
return g.element({
|
|
315
|
+
...l.separator.attrs,
|
|
316
|
+
role: "separator",
|
|
317
|
+
dir: a("dir"),
|
|
318
|
+
"aria-orientation": "horizontal"
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
getItemState: O,
|
|
322
|
+
getItemProps: S,
|
|
323
|
+
getOptionItemState: y,
|
|
324
|
+
getOptionItemProps(t) {
|
|
325
|
+
const { type: e, disabled: s, closeOnSelect: c } = t, r = G(t), o = y(t);
|
|
326
|
+
return {
|
|
327
|
+
...S(r),
|
|
328
|
+
...g.element({
|
|
329
|
+
"data-type": e,
|
|
330
|
+
...l.item.attrs,
|
|
331
|
+
dir: a("dir"),
|
|
332
|
+
"data-value": r.value,
|
|
333
|
+
role: `menuitem${e}`,
|
|
334
|
+
"aria-checked": !!o.checked,
|
|
335
|
+
"data-state": o.checked ? "checked" : "unchecked",
|
|
336
|
+
onClick(i) {
|
|
337
|
+
if (s || x(i) || U(i)) return;
|
|
338
|
+
const u = i.currentTarget;
|
|
339
|
+
n({ type: "ITEM_CLICK", target: u, option: r, closeOnSelect: c });
|
|
340
|
+
}
|
|
341
|
+
})
|
|
342
|
+
};
|
|
343
|
+
},
|
|
344
|
+
getItemIndicatorProps(t) {
|
|
345
|
+
const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
|
|
346
|
+
return g.element({
|
|
347
|
+
...l.itemIndicator.attrs,
|
|
348
|
+
dir: a("dir"),
|
|
349
|
+
"data-disabled": T(e.disabled),
|
|
350
|
+
"data-highlighted": T(e.highlighted),
|
|
351
|
+
"data-state": N(t, "checked") ? s : void 0,
|
|
352
|
+
hidden: N(t, "checked") ? !e.checked : void 0
|
|
353
|
+
});
|
|
354
|
+
},
|
|
355
|
+
getItemTextProps(t) {
|
|
356
|
+
const e = y(B(t)), s = e.checked ? "checked" : "unchecked";
|
|
357
|
+
return g.element({
|
|
358
|
+
...l.itemText.attrs,
|
|
359
|
+
dir: a("dir"),
|
|
360
|
+
"data-disabled": T(e.disabled),
|
|
361
|
+
"data-highlighted": T(e.highlighted),
|
|
362
|
+
"data-state": N(t, "checked") ? s : void 0
|
|
363
|
+
});
|
|
364
|
+
},
|
|
365
|
+
getItemGroupLabelProps(t) {
|
|
366
|
+
return g.element({
|
|
367
|
+
...l.itemGroupLabel.attrs,
|
|
368
|
+
id: V(d, t.htmlFor),
|
|
369
|
+
dir: a("dir")
|
|
370
|
+
});
|
|
371
|
+
},
|
|
372
|
+
getItemGroupProps(t) {
|
|
373
|
+
return g.element({
|
|
374
|
+
id: et(d, t.id),
|
|
375
|
+
...l.itemGroup.attrs,
|
|
376
|
+
dir: a("dir"),
|
|
377
|
+
"aria-labelledby": V(d, t.id),
|
|
378
|
+
role: "group"
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
export {
|
|
384
|
+
ft as connect
|
|
385
|
+
};
|