@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,307 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
}, R = [], G = class {
|
|
16
|
-
constructor(e, a) {
|
|
17
|
-
u(this, "trapStack"), u(this, "config"), u(this, "doc"), u(this, "state", {
|
|
18
|
-
containers: [],
|
|
19
|
-
containerGroups: [],
|
|
20
|
-
tabbableGroups: [],
|
|
21
|
-
nodeFocusedBeforeActivation: null,
|
|
22
|
-
mostRecentlyFocusedNode: null,
|
|
23
|
-
active: !1,
|
|
24
|
-
paused: !1,
|
|
25
|
-
delayInitialFocusTimer: void 0,
|
|
26
|
-
recentNavEvent: void 0
|
|
27
|
-
}), u(this, "listenerCleanups", []), u(this, "handleFocus", (t) => {
|
|
28
|
-
const s = N(t), r = this.findContainerIndex(s, t) >= 0;
|
|
29
|
-
if (r || C(s))
|
|
30
|
-
r && (this.state.mostRecentlyFocusedNode = s);
|
|
31
|
-
else {
|
|
32
|
-
t.stopImmediatePropagation();
|
|
33
|
-
let i, c = !0;
|
|
34
|
-
if (this.state.mostRecentlyFocusedNode)
|
|
35
|
-
if (v(this.state.mostRecentlyFocusedNode) > 0) {
|
|
36
|
-
const h = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: o } = this.state.containerGroups[h];
|
|
37
|
-
if (o.length > 0) {
|
|
38
|
-
const d = o.findIndex((l) => l === this.state.mostRecentlyFocusedNode);
|
|
39
|
-
d >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? d + 1 < o.length && (i = o[d + 1], c = !1) : d - 1 >= 0 && (i = o[d - 1], c = !1));
|
|
40
|
-
}
|
|
41
|
-
} else
|
|
42
|
-
this.state.containerGroups.some((h) => h.tabbableNodes.some((o) => v(o) > 0)) || (c = !1);
|
|
43
|
-
else
|
|
44
|
-
c = !1;
|
|
45
|
-
c && (i = this.findNextNavNode({
|
|
46
|
-
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
47
|
-
// outside the trap causing the focus escape we're trying to fix)
|
|
48
|
-
target: this.state.mostRecentlyFocusedNode,
|
|
49
|
-
isBackward: this.config.isKeyBackward(this.state.recentNavEvent)
|
|
50
|
-
})), i ? this.tryFocus(i) : this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());
|
|
51
|
-
}
|
|
52
|
-
this.state.recentNavEvent = void 0;
|
|
53
|
-
}), u(this, "handlePointerDown", (t) => {
|
|
54
|
-
const s = N(t);
|
|
55
|
-
if (!(this.findContainerIndex(s, t) >= 0)) {
|
|
56
|
-
if (F(this.config.clickOutsideDeactivates, t)) {
|
|
57
|
-
this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
F(this.config.allowOutsideClick, t) || t.preventDefault();
|
|
61
|
-
}
|
|
62
|
-
}), u(this, "handleClick", (t) => {
|
|
63
|
-
const s = N(t);
|
|
64
|
-
this.findContainerIndex(s, t) >= 0 || F(this.config.clickOutsideDeactivates, t) || F(this.config.allowOutsideClick, t) || (t.preventDefault(), t.stopImmediatePropagation());
|
|
65
|
-
}), u(this, "handleTabKey", (t) => {
|
|
66
|
-
if (this.config.isKeyForward(t) || this.config.isKeyBackward(t)) {
|
|
67
|
-
this.state.recentNavEvent = t;
|
|
68
|
-
const s = this.config.isKeyBackward(t), r = this.findNextNavNode({ event: t, isBackward: s });
|
|
69
|
-
if (!r) return;
|
|
70
|
-
g(t) && t.preventDefault(), this.tryFocus(r);
|
|
71
|
-
}
|
|
72
|
-
}), u(this, "handleEscapeKey", (t) => {
|
|
73
|
-
B(t) && F(this.config.escapeDeactivates, t) !== !1 && (t.preventDefault(), this.deactivate());
|
|
74
|
-
}), u(this, "_mutationObserver"), u(this, "setupMutationObserver", () => {
|
|
75
|
-
const t = this.doc.defaultView || window;
|
|
76
|
-
this._mutationObserver = new t.MutationObserver((s) => {
|
|
77
|
-
s.some((i) => Array.from(i.removedNodes).some((h) => h === this.state.mostRecentlyFocusedNode)) && this.tryFocus(this.getInitialFocusNode());
|
|
78
|
-
});
|
|
79
|
-
}), u(this, "updateObservedNodes", () => {
|
|
80
|
-
var t;
|
|
81
|
-
(t = this._mutationObserver) == null || t.disconnect(), this.state.active && !this.state.paused && this.state.containers.map((s) => {
|
|
82
|
-
var r;
|
|
83
|
-
(r = this._mutationObserver) == null || r.observe(s, { subtree: !0, childList: !0 });
|
|
84
|
-
});
|
|
85
|
-
}), u(this, "getInitialFocusNode", () => {
|
|
86
|
-
let t = this.getNodeForOption("initialFocus", { hasFallback: !0 });
|
|
87
|
-
if (t === !1)
|
|
88
|
-
return !1;
|
|
89
|
-
if (t === void 0 || t && !y(t))
|
|
90
|
-
if (this.findContainerIndex(this.doc.activeElement) >= 0)
|
|
91
|
-
t = this.doc.activeElement;
|
|
92
|
-
else {
|
|
93
|
-
const s = this.state.tabbableGroups[0];
|
|
94
|
-
t = s && s.firstTabbableNode || this.getNodeForOption("fallbackFocus");
|
|
95
|
-
}
|
|
96
|
-
else t === null && (t = this.getNodeForOption("fallbackFocus"));
|
|
97
|
-
if (!t)
|
|
98
|
-
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
99
|
-
return t.isConnected || (t = this.getNodeForOption("fallbackFocus")), t;
|
|
100
|
-
}), u(this, "tryFocus", (t) => {
|
|
101
|
-
if (t !== !1 && t !== D(this.doc)) {
|
|
102
|
-
if (!t || !t.focus) {
|
|
103
|
-
this.tryFocus(this.getInitialFocusNode());
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
t.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = t, K(t) && t.select();
|
|
107
|
-
}
|
|
108
|
-
}), u(this, "deactivate", (t) => {
|
|
109
|
-
if (!this.state.active) return this;
|
|
110
|
-
const s = {
|
|
111
|
-
onDeactivate: this.config.onDeactivate,
|
|
112
|
-
onPostDeactivate: this.config.onPostDeactivate,
|
|
113
|
-
checkCanReturnFocus: this.config.checkCanReturnFocus,
|
|
114
|
-
...t
|
|
115
|
-
};
|
|
116
|
-
clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), m.deactivateTrap(this.trapStack, this);
|
|
117
|
-
const r = this.getOption(s, "onDeactivate"), i = this.getOption(s, "onPostDeactivate"), c = this.getOption(s, "checkCanReturnFocus"), h = this.getOption(s, "returnFocus", "returnFocusOnDeactivate");
|
|
118
|
-
r == null || r();
|
|
119
|
-
const o = () => {
|
|
120
|
-
T(() => {
|
|
121
|
-
if (h) {
|
|
122
|
-
const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
|
|
123
|
-
this.tryFocus(d);
|
|
124
|
-
}
|
|
125
|
-
i == null || i();
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
if (h && c) {
|
|
129
|
-
const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
|
|
130
|
-
return c(d).then(o, o), this;
|
|
131
|
-
}
|
|
132
|
-
return o(), this;
|
|
133
|
-
}), u(this, "pause", (t) => {
|
|
134
|
-
if (this.state.paused || !this.state.active)
|
|
135
|
-
return this;
|
|
136
|
-
const s = this.getOption(t, "onPause"), r = this.getOption(t, "onPostPause");
|
|
137
|
-
return this.state.paused = !0, s == null || s(), this.removeListeners(), this.updateObservedNodes(), r == null || r(), this;
|
|
138
|
-
}), u(this, "unpause", (t) => {
|
|
139
|
-
if (!this.state.paused || !this.state.active)
|
|
140
|
-
return this;
|
|
141
|
-
const s = this.getOption(t, "onUnpause"), r = this.getOption(t, "onPostUnpause");
|
|
142
|
-
return this.state.paused = !1, s == null || s(), this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), r == null || r(), this;
|
|
143
|
-
}), u(this, "updateContainerElements", (t) => (this.state.containers = Array.isArray(t) ? t.filter(Boolean) : [t].filter(Boolean), this.state.active && this.updateTabbableNodes(), this.updateObservedNodes(), this)), u(this, "getReturnFocusNode", (t) => {
|
|
144
|
-
const s = this.getNodeForOption("setReturnFocus", {
|
|
145
|
-
params: [t]
|
|
146
|
-
});
|
|
147
|
-
return s || (s === !1 ? !1 : t);
|
|
148
|
-
}), u(this, "getOption", (t, s, r) => t && t[s] !== void 0 ? t[s] : (
|
|
149
|
-
// @ts-expect-error
|
|
150
|
-
this.config[r || s]
|
|
151
|
-
)), u(this, "getNodeForOption", (t, { hasFallback: s = !1, params: r = [] } = {}) => {
|
|
152
|
-
let i = this.config[t];
|
|
153
|
-
if (typeof i == "function" && (i = i(...r)), i === !0 && (i = void 0), !i) {
|
|
154
|
-
if (i === void 0 || i === !1)
|
|
155
|
-
return i;
|
|
156
|
-
throw new Error(`\`${t}\` was specified but was not a node, or did not return a node`);
|
|
157
|
-
}
|
|
158
|
-
let c = i;
|
|
159
|
-
if (typeof i == "string") {
|
|
160
|
-
try {
|
|
161
|
-
c = this.doc.querySelector(i);
|
|
162
|
-
} catch (h) {
|
|
163
|
-
throw new Error(`\`${t}\` appears to be an invalid selector; error="${h.message}"`);
|
|
164
|
-
}
|
|
165
|
-
if (!c && !s)
|
|
166
|
-
throw new Error(`\`${t}\` as selector refers to no known node`);
|
|
167
|
-
}
|
|
168
|
-
return c;
|
|
169
|
-
}), u(this, "findNextNavNode", (t) => {
|
|
170
|
-
const { event: s, isBackward: r = !1 } = t, i = t.target || N(s);
|
|
171
|
-
this.updateTabbableNodes();
|
|
172
|
-
let c = null;
|
|
173
|
-
if (this.state.tabbableGroups.length > 0) {
|
|
174
|
-
const h = this.findContainerIndex(i, s), o = h >= 0 ? this.state.containerGroups[h] : void 0;
|
|
175
|
-
if (h < 0)
|
|
176
|
-
r ? c = this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : c = this.state.tabbableGroups[0].firstTabbableNode;
|
|
177
|
-
else if (r) {
|
|
178
|
-
let d = this.state.tabbableGroups.findIndex(
|
|
179
|
-
({ firstTabbableNode: l }) => i === l
|
|
180
|
-
);
|
|
181
|
-
if (d < 0 && ((o == null ? void 0 : o.container) === i || y(i) && !b(i) && !(o != null && o.nextTabbableNode(i, !1))) && (d = h), d >= 0) {
|
|
182
|
-
const l = d === 0 ? this.state.tabbableGroups.length - 1 : d - 1, f = this.state.tabbableGroups[l];
|
|
183
|
-
c = v(i) >= 0 ? f.lastTabbableNode : f.lastDomTabbableNode;
|
|
184
|
-
} else g(s) || (c = o == null ? void 0 : o.nextTabbableNode(i, !1));
|
|
185
|
-
} else {
|
|
186
|
-
let d = this.state.tabbableGroups.findIndex(
|
|
187
|
-
({ lastTabbableNode: l }) => i === l
|
|
188
|
-
);
|
|
189
|
-
if (d < 0 && ((o == null ? void 0 : o.container) === i || y(i) && !b(i) && !(o != null && o.nextTabbableNode(i))) && (d = h), d >= 0) {
|
|
190
|
-
const l = d === this.state.tabbableGroups.length - 1 ? 0 : d + 1, f = this.state.tabbableGroups[l];
|
|
191
|
-
c = v(i) >= 0 ? f.firstTabbableNode : f.firstDomTabbableNode;
|
|
192
|
-
} else g(s) || (c = o == null ? void 0 : o.nextTabbableNode(i));
|
|
193
|
-
}
|
|
194
|
-
} else
|
|
195
|
-
c = this.getNodeForOption("fallbackFocus");
|
|
196
|
-
return c;
|
|
197
|
-
}), this.trapStack = a.trapStack || R;
|
|
198
|
-
const n = {
|
|
1
|
+
import { FocusTrap as s } from "./focus-trap.js";
|
|
2
|
+
import { raf as u } from "../../dom-query/dist/raf.js";
|
|
3
|
+
import { getDocument as i } from "../../dom-query/dist/node.js";
|
|
4
|
+
function y(r, n = {}) {
|
|
5
|
+
let t;
|
|
6
|
+
const a = u(() => {
|
|
7
|
+
const o = (Array.isArray(r) ? r : [r]).map((e) => typeof e == "function" ? e() : e).filter((e) => e != null);
|
|
8
|
+
if (o.length === 0) return;
|
|
9
|
+
const c = o[0];
|
|
10
|
+
t = new s(o, {
|
|
11
|
+
escapeDeactivates: !1,
|
|
12
|
+
allowOutsideClick: !0,
|
|
13
|
+
preventScroll: !0,
|
|
199
14
|
returnFocusOnDeactivate: !0,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
...a
|
|
209
|
-
};
|
|
210
|
-
this.doc = n.document || w(Array.isArray(e) ? e[0] : e), this.config = n, this.updateContainerElements(e), this.setupMutationObserver();
|
|
211
|
-
}
|
|
212
|
-
get active() {
|
|
213
|
-
return this.state.active;
|
|
214
|
-
}
|
|
215
|
-
get paused() {
|
|
216
|
-
return this.state.paused;
|
|
217
|
-
}
|
|
218
|
-
findContainerIndex(e, a) {
|
|
219
|
-
const n = typeof (a == null ? void 0 : a.composedPath) == "function" ? a.composedPath() : void 0;
|
|
220
|
-
return this.state.containerGroups.findIndex(
|
|
221
|
-
({ container: t, tabbableNodes: s }) => t.contains(e) || (n == null ? void 0 : n.includes(t)) || s.find((r) => r === e)
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
updateTabbableNodes() {
|
|
225
|
-
if (this.state.containerGroups = this.state.containers.map((e) => {
|
|
226
|
-
const a = x(e), n = I(e), t = a.length > 0 ? a[0] : void 0, s = a.length > 0 ? a[a.length - 1] : void 0, r = n.find((o) => b(o)), i = n.slice().reverse().find((o) => b(o)), c = !!a.find((o) => v(o) > 0);
|
|
227
|
-
function h(o, d = !0) {
|
|
228
|
-
const l = a.indexOf(o);
|
|
229
|
-
return l < 0 ? d ? n.slice(n.indexOf(o) + 1).find((f) => b(f)) : n.slice(0, n.indexOf(o)).reverse().find((f) => b(f)) : a[l + (d ? 1 : -1)];
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
container: e,
|
|
233
|
-
tabbableNodes: a,
|
|
234
|
-
focusableNodes: n,
|
|
235
|
-
posTabIndexesFound: c,
|
|
236
|
-
firstTabbableNode: t,
|
|
237
|
-
lastTabbableNode: s,
|
|
238
|
-
firstDomTabbableNode: r,
|
|
239
|
-
lastDomTabbableNode: i,
|
|
240
|
-
nextTabbableNode: h
|
|
241
|
-
};
|
|
242
|
-
}), this.state.tabbableGroups = this.state.containerGroups.filter((e) => e.tabbableNodes.length > 0), this.state.tabbableGroups.length <= 0 && !this.getNodeForOption("fallbackFocus"))
|
|
243
|
-
throw new Error(
|
|
244
|
-
"Your focus-trap must have at least one container with at least one tabbable node in it at all times"
|
|
245
|
-
);
|
|
246
|
-
if (this.state.containerGroups.find((e) => e.posTabIndexesFound) && this.state.containerGroups.length > 1)
|
|
247
|
-
throw new Error(
|
|
248
|
-
"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps."
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
addListeners() {
|
|
252
|
-
if (this.state.active)
|
|
253
|
-
return m.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? T(() => {
|
|
254
|
-
this.tryFocus(this.getInitialFocusNode());
|
|
255
|
-
}) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(
|
|
256
|
-
p(this.doc, "focusin", this.handleFocus, !0),
|
|
257
|
-
p(this.doc, "mousedown", this.handlePointerDown, { capture: !0, passive: !1 }),
|
|
258
|
-
p(this.doc, "touchstart", this.handlePointerDown, { capture: !0, passive: !1 }),
|
|
259
|
-
p(this.doc, "click", this.handleClick, { capture: !0, passive: !1 }),
|
|
260
|
-
p(this.doc, "keydown", this.handleTabKey, { capture: !0, passive: !1 }),
|
|
261
|
-
p(this.doc, "keydown", this.handleEscapeKey)
|
|
262
|
-
), this;
|
|
263
|
-
}
|
|
264
|
-
removeListeners() {
|
|
265
|
-
if (this.state.active)
|
|
266
|
-
return this.listenerCleanups.forEach((e) => e()), this.listenerCleanups = [], this;
|
|
267
|
-
}
|
|
268
|
-
activate(e) {
|
|
269
|
-
if (this.state.active)
|
|
270
|
-
return this;
|
|
271
|
-
const a = this.getOption(e, "onActivate"), n = this.getOption(e, "onPostActivate"), t = this.getOption(e, "checkCanFocusTrap");
|
|
272
|
-
t || this.updateTabbableNodes(), this.state.active = !0, this.state.paused = !1, this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null, a == null || a();
|
|
273
|
-
const s = () => {
|
|
274
|
-
t && this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), n == null || n();
|
|
275
|
-
};
|
|
276
|
-
return t ? (t(this.state.containers.concat()).then(s, s), this) : (s(), this);
|
|
277
|
-
}
|
|
278
|
-
}, g = (e) => e.key === "Tab", F = (e, ...a) => typeof e == "function" ? e(...a) : e, B = (e) => !e.isComposing && e.key === "Escape", T = (e) => setTimeout(e, 0), K = (e) => e.localName === "input" && "select" in e && typeof e.select == "function";
|
|
279
|
-
function P(e, a = {}) {
|
|
280
|
-
let n;
|
|
281
|
-
const t = O(() => {
|
|
282
|
-
const s = typeof e == "function" ? e() : e;
|
|
283
|
-
if (s) {
|
|
284
|
-
n = new G(s, {
|
|
285
|
-
escapeDeactivates: !1,
|
|
286
|
-
allowOutsideClick: !0,
|
|
287
|
-
preventScroll: !0,
|
|
288
|
-
returnFocusOnDeactivate: !0,
|
|
289
|
-
delayInitialFocus: !1,
|
|
290
|
-
fallbackFocus: s,
|
|
291
|
-
...a,
|
|
292
|
-
document: w(s)
|
|
293
|
-
});
|
|
294
|
-
try {
|
|
295
|
-
n.activate();
|
|
296
|
-
} catch {
|
|
297
|
-
}
|
|
15
|
+
delayInitialFocus: !1,
|
|
16
|
+
fallbackFocus: c,
|
|
17
|
+
...n,
|
|
18
|
+
document: i(c)
|
|
19
|
+
});
|
|
20
|
+
try {
|
|
21
|
+
t.activate();
|
|
22
|
+
} catch {
|
|
298
23
|
}
|
|
299
24
|
});
|
|
300
25
|
return function() {
|
|
301
|
-
|
|
26
|
+
t == null || t.deactivate(), a();
|
|
302
27
|
};
|
|
303
28
|
}
|
|
304
29
|
export {
|
|
305
|
-
|
|
306
|
-
|
|
30
|
+
s as FocusTrap,
|
|
31
|
+
y as trapFocus
|
|
307
32
|
};
|
|
@@ -1,74 +1,98 @@
|
|
|
1
|
-
import { getWindow as d, getDocument as
|
|
2
|
-
|
|
1
|
+
import { getWindow as d, getDocument as f, getActiveElement as h } from "../../dom-query/dist/node.js";
|
|
2
|
+
import { isVirtualClick as T, getEventTarget as L } from "../../dom-query/dist/event.js";
|
|
3
|
+
import { isMac as F } from "../../dom-query/dist/platform.js";
|
|
4
|
+
function M(e) {
|
|
3
5
|
return !(e.metaKey || !F() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
4
6
|
}
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return e = e ||
|
|
7
|
+
var H = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
|
|
8
|
+
function K(e, r, t) {
|
|
9
|
+
const n = t ? L(t) : null, s = f(n), a = d(n), i = h(s);
|
|
10
|
+
return e = e || i instanceof a.HTMLInputElement && !H.has(i == null ? void 0 : i.type) || i instanceof a.HTMLTextAreaElement || i instanceof a.HTMLElement && i.isContentEditable, !(e && r === "keyboard" && t instanceof a.KeyboardEvent && !Reflect.has(I, t.key));
|
|
9
11
|
}
|
|
10
|
-
var
|
|
12
|
+
var u = null, p = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), c = !1, m = !1, V = !1, I = {
|
|
11
13
|
Tab: !0,
|
|
12
14
|
Escape: !0
|
|
13
15
|
};
|
|
14
|
-
function
|
|
15
|
-
for (let
|
|
16
|
-
|
|
16
|
+
function E(e, r) {
|
|
17
|
+
for (let t of p)
|
|
18
|
+
t(e, r);
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
+
function v(e) {
|
|
21
|
+
c = !0, M(e) && (u = "keyboard", E("keyboard", e));
|
|
20
22
|
}
|
|
21
23
|
function o(e) {
|
|
22
|
-
|
|
24
|
+
u = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (c = !0, E("pointer", e));
|
|
23
25
|
}
|
|
24
26
|
function b(e) {
|
|
25
|
-
|
|
27
|
+
T(e) && (c = !0, u = "virtual");
|
|
26
28
|
}
|
|
27
29
|
function w(e) {
|
|
28
30
|
const r = L(e);
|
|
29
|
-
r === d(r) || r ===
|
|
31
|
+
r === d(r) || r === f(r) || V || !e.isTrusted || (!c && !m && (u = "virtual", E("virtual", e)), c = !1, m = !1);
|
|
30
32
|
}
|
|
31
33
|
function k() {
|
|
32
|
-
|
|
34
|
+
c = !1, m = !0;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
if (typeof window > "u" ||
|
|
36
|
+
function P(e) {
|
|
37
|
+
if (typeof window > "u" || l.get(d(e)))
|
|
36
38
|
return;
|
|
37
|
-
const r = d(e),
|
|
38
|
-
let
|
|
39
|
-
function
|
|
40
|
-
|
|
39
|
+
const r = d(e), t = f(e);
|
|
40
|
+
let n = r.HTMLElement.prototype.focus;
|
|
41
|
+
function s() {
|
|
42
|
+
c = !0, n.apply(this, arguments);
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
try {
|
|
45
|
+
Object.defineProperty(r.HTMLElement.prototype, "focus", {
|
|
46
|
+
configurable: !0,
|
|
47
|
+
value: s
|
|
48
|
+
});
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
t.addEventListener("keydown", v, !0), t.addEventListener("keyup", v, !0), t.addEventListener("click", b, !0), r.addEventListener("focus", w, !0), r.addEventListener("blur", k, !1), typeof r.PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), r.addEventListener(
|
|
46
52
|
"beforeunload",
|
|
47
53
|
() => {
|
|
48
54
|
S(e);
|
|
49
55
|
},
|
|
50
56
|
{ once: !0 }
|
|
51
|
-
),
|
|
57
|
+
), l.set(r, { focus: n });
|
|
52
58
|
}
|
|
53
59
|
var S = (e, r) => {
|
|
54
|
-
const
|
|
55
|
-
|
|
60
|
+
const t = d(e), n = f(e), s = l.get(t);
|
|
61
|
+
if (s) {
|
|
62
|
+
try {
|
|
63
|
+
Object.defineProperty(t.HTMLElement.prototype, "focus", {
|
|
64
|
+
configurable: !0,
|
|
65
|
+
value: s.focus
|
|
66
|
+
});
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
n.removeEventListener("keydown", v, !0), n.removeEventListener("keyup", v, !0), n.removeEventListener("click", b, !0), t.removeEventListener("focus", w, !0), t.removeEventListener("blur", k, !1), typeof t.PointerEvent < "u" ? (n.removeEventListener("pointerdown", o, !0), n.removeEventListener("pointermove", o, !0), n.removeEventListener("pointerup", o, !0)) : (n.removeEventListener("mousedown", o, !0), n.removeEventListener("mousemove", o, !0), n.removeEventListener("mouseup", o, !0)), l.delete(t);
|
|
70
|
+
}
|
|
56
71
|
};
|
|
72
|
+
function C() {
|
|
73
|
+
return u;
|
|
74
|
+
}
|
|
75
|
+
function D(e) {
|
|
76
|
+
u = e, E(e, null);
|
|
77
|
+
}
|
|
57
78
|
function y() {
|
|
58
|
-
return
|
|
79
|
+
return u === "keyboard" || u === "virtual";
|
|
59
80
|
}
|
|
60
|
-
function
|
|
61
|
-
const { isTextInput: r, autoFocus:
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
81
|
+
function O(e = {}) {
|
|
82
|
+
const { isTextInput: r, autoFocus: t, onChange: n, root: s } = e;
|
|
83
|
+
P(s), n == null || n({ isFocusVisible: t || y(), modality: u });
|
|
84
|
+
const a = (i, g) => {
|
|
85
|
+
K(!!r, i, g) && (n == null || n({ isFocusVisible: y(), modality: i }));
|
|
65
86
|
};
|
|
66
|
-
return
|
|
67
|
-
|
|
87
|
+
return p.add(a), () => {
|
|
88
|
+
p.delete(a);
|
|
68
89
|
};
|
|
69
90
|
}
|
|
70
91
|
export {
|
|
92
|
+
C as getInteractionModality,
|
|
93
|
+
V as ignoreFocusEvent,
|
|
71
94
|
y as isFocusVisible,
|
|
72
|
-
|
|
73
|
-
|
|
95
|
+
l as listenerMap,
|
|
96
|
+
D as setInteractionModality,
|
|
97
|
+
O as trackFocusVisible
|
|
74
98
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function m(a) {
|
|
2
|
+
const e = {
|
|
3
|
+
each(n) {
|
|
4
|
+
var r;
|
|
5
|
+
for (let t = 0; t < ((r = a.frames) == null ? void 0 : r.length); t += 1) {
|
|
6
|
+
const c = a.frames[t];
|
|
7
|
+
c && n(c);
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
addEventListener(n, r, t) {
|
|
11
|
+
return e.each((c) => {
|
|
12
|
+
try {
|
|
13
|
+
c.document.addEventListener(n, r, t);
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
}), () => {
|
|
17
|
+
try {
|
|
18
|
+
e.removeEventListener(n, r, t);
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
removeEventListener(n, r, t) {
|
|
24
|
+
e.each((c) => {
|
|
25
|
+
try {
|
|
26
|
+
c.document.removeEventListener(n, r, t);
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
function v(a) {
|
|
35
|
+
const e = a.frameElement != null ? a.parent : null;
|
|
36
|
+
return {
|
|
37
|
+
addEventListener: (n, r, t) => {
|
|
38
|
+
try {
|
|
39
|
+
e == null || e.addEventListener(n, r, t);
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
return () => {
|
|
43
|
+
try {
|
|
44
|
+
e == null || e.removeEventListener(n, r, t);
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
removeEventListener: (n, r, t) => {
|
|
50
|
+
try {
|
|
51
|
+
e == null || e.removeEventListener(n, r, t);
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
v as getParentWindow,
|
|
59
|
+
m as getWindowFrames
|
|
60
|
+
};
|