@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,801 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var et = Q("toast").parts(
|
|
7
|
-
"group",
|
|
8
|
-
"root",
|
|
9
|
-
"title",
|
|
10
|
-
"description",
|
|
11
|
-
"actionTrigger",
|
|
12
|
-
"closeTrigger"
|
|
13
|
-
), O = et.build(), st = (t) => `toast-group:${t}`, H = (t, e) => t.getById(`toast-group:${e}`), W = (t) => `toast:${t.id}`, U = (t) => t.getById(W(t)), V = (t) => `toast:${t.id}:title`, G = (t) => `toast:${t.id}:description`, it = (t) => `toast${t.id}:close`, $ = {
|
|
14
|
-
info: 5e3,
|
|
15
|
-
error: 5e3,
|
|
16
|
-
success: 2e3,
|
|
17
|
-
loading: 1 / 0,
|
|
18
|
-
DEFAULT: 5e3
|
|
19
|
-
};
|
|
20
|
-
function A(t, e) {
|
|
21
|
-
return t ?? $[e] ?? $.DEFAULT;
|
|
22
|
-
}
|
|
23
|
-
var nt = (t) => typeof t == "string" ? { left: t, right: t, bottom: t, top: t } : t;
|
|
24
|
-
function rt(t, e) {
|
|
25
|
-
var b;
|
|
26
|
-
const { prop: i, computed: s, context: r } = t, { offsets: a, gap: c } = i("store").attrs, l = r.get("heights"), d = nt(a), m = i("dir") === "rtl", u = e.replace("-start", m ? "-right" : "-left").replace("-end", m ? "-left" : "-right"), p = u.includes("right"), E = u.includes("left"), f = {
|
|
27
|
-
position: "fixed",
|
|
28
|
-
pointerEvents: s("count") > 0 ? void 0 : "none",
|
|
29
|
-
display: "flex",
|
|
30
|
-
flexDirection: "column",
|
|
31
|
-
"--gap": `${c}px`,
|
|
32
|
-
"--first-height": `${((b = l[0]) == null ? void 0 : b.height) || 0}px`,
|
|
33
|
-
zIndex: X
|
|
34
|
-
};
|
|
35
|
-
let h = "center";
|
|
36
|
-
if (p && (h = "flex-end"), E && (h = "flex-start"), f.alignItems = h, u.includes("top")) {
|
|
37
|
-
const T = d.top;
|
|
38
|
-
f.top = `max(env(safe-area-inset-top, 0px), ${T})`;
|
|
39
|
-
}
|
|
40
|
-
if (u.includes("bottom")) {
|
|
41
|
-
const T = d.bottom;
|
|
42
|
-
f.bottom = `max(env(safe-area-inset-bottom, 0px), ${T})`;
|
|
43
|
-
}
|
|
44
|
-
if (!u.includes("left")) {
|
|
45
|
-
const T = d.right;
|
|
46
|
-
f.insetInlineEnd = `calc(env(safe-area-inset-right, 0px) + ${T})`;
|
|
47
|
-
}
|
|
48
|
-
if (!u.includes("right")) {
|
|
49
|
-
const T = d.left;
|
|
50
|
-
f.insetInlineStart = `calc(env(safe-area-inset-left, 0px) + ${T})`;
|
|
51
|
-
}
|
|
52
|
-
return f;
|
|
53
|
-
}
|
|
54
|
-
function ot(t, e) {
|
|
55
|
-
const { prop: i, context: s, computed: r } = t, a = i("parent"), c = a.computed("placement"), { gap: l } = a.prop("store").attrs, [d] = c.split("-"), m = s.get("mounted"), u = s.get("remainingTime"), p = r("height"), E = r("frontmost"), f = !E, h = !i("stacked"), b = i("stacked"), S = i("type") === "loading" ? Number.MAX_SAFE_INTEGER : u, F = r("heightIndex") * l + r("heightBefore"), R = {
|
|
56
|
-
position: "absolute",
|
|
57
|
-
pointerEvents: "auto",
|
|
58
|
-
"--opacity": "0",
|
|
59
|
-
"--remove-delay": `${i("removeDelay")}ms`,
|
|
60
|
-
"--duration": `${S}ms`,
|
|
61
|
-
"--initial-height": `${p}px`,
|
|
62
|
-
"--offset": `${F}px`,
|
|
63
|
-
"--index": i("index"),
|
|
64
|
-
"--z-index": r("zIndex"),
|
|
65
|
-
"--lift-amount": "calc(var(--lift) * var(--gap))",
|
|
66
|
-
"--y": "100%",
|
|
67
|
-
"--x": "0"
|
|
68
|
-
}, g = (k) => Object.assign(R, k);
|
|
69
|
-
return d === "top" ? g({
|
|
70
|
-
top: "0",
|
|
71
|
-
"--sign": "-1",
|
|
72
|
-
"--y": "-100%",
|
|
73
|
-
"--lift": "1"
|
|
74
|
-
}) : d === "bottom" && g({
|
|
75
|
-
bottom: "0",
|
|
76
|
-
"--sign": "1",
|
|
77
|
-
"--y": "100%",
|
|
78
|
-
"--lift": "-1"
|
|
79
|
-
}), m && (g({
|
|
80
|
-
"--y": "0",
|
|
81
|
-
"--opacity": "1"
|
|
82
|
-
}), b && g({
|
|
83
|
-
"--y": "calc(var(--lift) * var(--offset))",
|
|
84
|
-
"--height": "var(--initial-height)"
|
|
85
|
-
})), e || g({
|
|
86
|
-
"--opacity": "0",
|
|
87
|
-
pointerEvents: "none"
|
|
88
|
-
}), f && h && (g({
|
|
89
|
-
"--base-scale": "var(--index) * 0.05 + 1",
|
|
90
|
-
"--y": "calc(var(--lift-amount) * var(--index))",
|
|
91
|
-
"--scale": "calc(-1 * var(--base-scale))",
|
|
92
|
-
"--height": "var(--first-height)"
|
|
93
|
-
}), e || g({
|
|
94
|
-
"--y": "calc(var(--sign) * 40%)"
|
|
95
|
-
})), f && b && !e && g({
|
|
96
|
-
"--y": "calc(var(--lift) * var(--offset) + var(--lift) * -100%)"
|
|
97
|
-
}), E && !e && g({
|
|
98
|
-
"--y": "calc(var(--lift) * -100%)"
|
|
99
|
-
}), R;
|
|
100
|
-
}
|
|
101
|
-
function at(t, e) {
|
|
102
|
-
const { computed: i } = t, s = {
|
|
103
|
-
position: "absolute",
|
|
104
|
-
inset: "0",
|
|
105
|
-
scale: "1 2",
|
|
106
|
-
pointerEvents: e ? "none" : "auto"
|
|
107
|
-
}, r = (a) => Object.assign(s, a);
|
|
108
|
-
return i("frontmost") && !e && r({
|
|
109
|
-
height: "calc(var(--initial-height) + 80%)"
|
|
110
|
-
}), s;
|
|
111
|
-
}
|
|
112
|
-
function ct() {
|
|
113
|
-
return {
|
|
114
|
-
position: "absolute",
|
|
115
|
-
left: "0",
|
|
116
|
-
height: "calc(var(--gap) + 2px)",
|
|
117
|
-
bottom: "100%",
|
|
118
|
-
width: "100%"
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function lt(t, e) {
|
|
122
|
-
const { context: i, prop: s, send: r, refs: a, computed: c } = t;
|
|
123
|
-
return {
|
|
124
|
-
getCount() {
|
|
125
|
-
return i.get("toasts").length;
|
|
126
|
-
},
|
|
127
|
-
getToasts() {
|
|
128
|
-
return i.get("toasts");
|
|
129
|
-
},
|
|
130
|
-
getGroupProps(l = {}) {
|
|
131
|
-
const { label: d = "Notifications" } = l, { hotkey: m } = s("store").attrs, u = m.join("+").replace(/Key/g, "").replace(/Digit/g, ""), p = c("placement"), [E, f = "center"] = p.split("-");
|
|
132
|
-
return e.element({
|
|
133
|
-
...O.group.attrs,
|
|
134
|
-
dir: s("dir"),
|
|
135
|
-
tabIndex: -1,
|
|
136
|
-
"aria-label": `${p} ${d} ${u}`,
|
|
137
|
-
id: st(p),
|
|
138
|
-
"data-placement": p,
|
|
139
|
-
"data-side": E,
|
|
140
|
-
"data-align": f,
|
|
141
|
-
"aria-live": "polite",
|
|
142
|
-
role: "region",
|
|
143
|
-
style: rt(t, p),
|
|
144
|
-
onMouseMove() {
|
|
145
|
-
r({ type: "REGION.POINTER_ENTER", placement: p });
|
|
146
|
-
},
|
|
147
|
-
onMouseLeave() {
|
|
148
|
-
r({ type: "REGION.POINTER_LEAVE", placement: p });
|
|
149
|
-
},
|
|
150
|
-
onFocus(h) {
|
|
151
|
-
r({ type: "REGION.FOCUS", target: h.relatedTarget });
|
|
152
|
-
},
|
|
153
|
-
onBlur(h) {
|
|
154
|
-
a.get("isFocusWithin") && !q(h.currentTarget, h.relatedTarget) && queueMicrotask(() => r({ type: "REGION.BLUR" }));
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
subscribe(l) {
|
|
159
|
-
return s("store").subscribe(() => l(i.get("toasts")));
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
var ut = K({
|
|
164
|
-
props({ props: t }) {
|
|
165
|
-
return {
|
|
166
|
-
dir: "ltr",
|
|
167
|
-
id: _(),
|
|
168
|
-
...t,
|
|
169
|
-
store: t.store
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
initialState({ prop: t }) {
|
|
173
|
-
return t("store").attrs.overlap ? "overlap" : "stack";
|
|
174
|
-
},
|
|
175
|
-
refs() {
|
|
176
|
-
return {
|
|
177
|
-
lastFocusedEl: null,
|
|
178
|
-
isFocusWithin: !1,
|
|
179
|
-
dismissableCleanup: void 0
|
|
180
|
-
};
|
|
181
|
-
},
|
|
182
|
-
context({ bindable: t }) {
|
|
183
|
-
return {
|
|
184
|
-
toasts: t(() => ({
|
|
185
|
-
defaultValue: [],
|
|
186
|
-
sync: !0,
|
|
187
|
-
hash: (e) => e.map((i) => i.id).join(",")
|
|
188
|
-
})),
|
|
189
|
-
heights: t(() => ({
|
|
190
|
-
defaultValue: [],
|
|
191
|
-
sync: !0
|
|
192
|
-
}))
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
computed: {
|
|
196
|
-
count: ({ context: t }) => t.get("toasts").length,
|
|
197
|
-
overlap: ({ prop: t }) => t("store").attrs.overlap,
|
|
198
|
-
placement: ({ prop: t }) => t("store").attrs.placement
|
|
199
|
-
},
|
|
200
|
-
effects: ["subscribeToStore", "trackDocumentVisibility", "trackHotKeyPress"],
|
|
201
|
-
watch({ track: t, context: e, action: i }) {
|
|
202
|
-
t([() => e.hash("toasts")], () => {
|
|
203
|
-
queueMicrotask(() => {
|
|
204
|
-
i(["collapsedIfEmpty", "setDismissableBranch"]);
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
},
|
|
208
|
-
exit: ["clearDismissableBranch", "clearLastFocusedEl"],
|
|
209
|
-
on: {
|
|
210
|
-
"DOC.HOTKEY": {
|
|
211
|
-
actions: ["focusRegionEl"]
|
|
212
|
-
},
|
|
213
|
-
"REGION.BLUR": [
|
|
214
|
-
{
|
|
215
|
-
guard: "isOverlapping",
|
|
216
|
-
target: "overlap",
|
|
217
|
-
actions: ["collapseToasts", "resumeToasts", "restoreLastFocusedEl"]
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
target: "stack",
|
|
221
|
-
actions: ["resumeToasts", "restoreLastFocusedEl"]
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"TOAST.REMOVE": {
|
|
225
|
-
actions: ["removeToast", "removeHeight"]
|
|
226
|
-
},
|
|
227
|
-
"TOAST.PAUSE": {
|
|
228
|
-
actions: ["pauseToasts"]
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
states: {
|
|
232
|
-
stack: {
|
|
233
|
-
on: {
|
|
234
|
-
"REGION.POINTER_LEAVE": [
|
|
235
|
-
{
|
|
236
|
-
guard: "isOverlapping",
|
|
237
|
-
target: "overlap",
|
|
238
|
-
actions: ["resumeToasts", "collapseToasts"]
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
actions: ["resumeToasts"]
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"REGION.OVERLAP": {
|
|
245
|
-
target: "overlap",
|
|
246
|
-
actions: ["collapseToasts"]
|
|
247
|
-
},
|
|
248
|
-
"REGION.FOCUS": {
|
|
249
|
-
actions: ["setLastFocusedEl", "pauseToasts"]
|
|
250
|
-
},
|
|
251
|
-
"REGION.POINTER_ENTER": {
|
|
252
|
-
actions: ["pauseToasts"]
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
overlap: {
|
|
257
|
-
on: {
|
|
258
|
-
"REGION.STACK": {
|
|
259
|
-
target: "stack",
|
|
260
|
-
actions: ["expandToasts"]
|
|
261
|
-
},
|
|
262
|
-
"REGION.POINTER_ENTER": {
|
|
263
|
-
target: "stack",
|
|
264
|
-
actions: ["pauseToasts", "expandToasts"]
|
|
265
|
-
},
|
|
266
|
-
"REGION.FOCUS": {
|
|
267
|
-
target: "stack",
|
|
268
|
-
actions: ["setLastFocusedEl", "pauseToasts", "expandToasts"]
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
implementations: {
|
|
274
|
-
guards: {
|
|
275
|
-
isOverlapping: ({ computed: t }) => t("overlap")
|
|
276
|
-
},
|
|
277
|
-
effects: {
|
|
278
|
-
subscribeToStore({ context: t, prop: e }) {
|
|
279
|
-
return e("store").subscribe((i) => {
|
|
280
|
-
if (i.dismiss) {
|
|
281
|
-
t.set("toasts", (s) => s.filter((r) => r.id !== i.id));
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
t.set("toasts", (s) => {
|
|
285
|
-
const r = s.findIndex((a) => a.id === i.id);
|
|
286
|
-
return r !== -1 ? [...s.slice(0, r), { ...s[r], ...i }, ...s.slice(r + 1)] : [i, ...s];
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
},
|
|
290
|
-
trackHotKeyPress({ prop: t, send: e }) {
|
|
291
|
-
return L(document, "keydown", (s) => {
|
|
292
|
-
const { hotkey: r } = t("store").attrs;
|
|
293
|
-
r.every((c) => s[c] || s.code === c) && e({ type: "DOC.HOTKEY" });
|
|
294
|
-
}, { capture: !0 });
|
|
295
|
-
},
|
|
296
|
-
trackDocumentVisibility({ prop: t, send: e, scope: i }) {
|
|
297
|
-
const { pauseOnPageIdle: s } = t("store").attrs;
|
|
298
|
-
if (!s) return;
|
|
299
|
-
const r = i.getDoc();
|
|
300
|
-
return L(r, "visibilitychange", () => {
|
|
301
|
-
const a = r.visibilityState === "hidden";
|
|
302
|
-
e({ type: a ? "PAUSE_ALL" : "RESUME_ALL" });
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
actions: {
|
|
307
|
-
setDismissableBranch({ refs: t, context: e, computed: i, scope: s }) {
|
|
308
|
-
var m;
|
|
309
|
-
const r = e.get("toasts"), a = i("placement"), c = r.length > 0;
|
|
310
|
-
if (!c) {
|
|
311
|
-
(m = t.get("dismissableCleanup")) == null || m();
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
if (c && t.get("dismissableCleanup"))
|
|
315
|
-
return;
|
|
316
|
-
const d = Z(() => H(s, a), { defer: !0 });
|
|
317
|
-
t.set("dismissableCleanup", d);
|
|
318
|
-
},
|
|
319
|
-
clearDismissableBranch({ refs: t }) {
|
|
320
|
-
var e;
|
|
321
|
-
(e = t.get("dismissableCleanup")) == null || e();
|
|
322
|
-
},
|
|
323
|
-
focusRegionEl({ scope: t, computed: e }) {
|
|
324
|
-
queueMicrotask(() => {
|
|
325
|
-
var i;
|
|
326
|
-
(i = H(t, e("placement"))) == null || i.focus();
|
|
327
|
-
});
|
|
328
|
-
},
|
|
329
|
-
pauseToasts({ prop: t }) {
|
|
330
|
-
t("store").pause();
|
|
331
|
-
},
|
|
332
|
-
resumeToasts({ prop: t }) {
|
|
333
|
-
t("store").resume();
|
|
334
|
-
},
|
|
335
|
-
expandToasts({ prop: t }) {
|
|
336
|
-
t("store").expand();
|
|
337
|
-
},
|
|
338
|
-
collapseToasts({ prop: t }) {
|
|
339
|
-
t("store").collapse();
|
|
340
|
-
},
|
|
341
|
-
removeToast({ prop: t, event: e }) {
|
|
342
|
-
t("store").remove(e.id);
|
|
343
|
-
},
|
|
344
|
-
removeHeight({ event: t, context: e }) {
|
|
345
|
-
(t == null ? void 0 : t.id) != null && queueMicrotask(() => {
|
|
346
|
-
e.set("heights", (i) => i.filter((s) => s.id !== t.id));
|
|
347
|
-
});
|
|
348
|
-
},
|
|
349
|
-
collapsedIfEmpty({ send: t, computed: e }) {
|
|
350
|
-
!e("overlap") || e("count") > 1 || t({ type: "REGION.OVERLAP" });
|
|
351
|
-
},
|
|
352
|
-
setLastFocusedEl({ refs: t, event: e }) {
|
|
353
|
-
t.get("isFocusWithin") || !e.target || (t.set("isFocusWithin", !0), t.set("lastFocusedEl", e.target));
|
|
354
|
-
},
|
|
355
|
-
restoreLastFocusedEl({ refs: t }) {
|
|
356
|
-
var e;
|
|
357
|
-
t.get("lastFocusedEl") && ((e = t.get("lastFocusedEl")) == null || e.focus({ preventScroll: !0 }), t.set("lastFocusedEl", null), t.set("isFocusWithin", !1));
|
|
358
|
-
},
|
|
359
|
-
clearLastFocusedEl({ refs: t }) {
|
|
360
|
-
var e;
|
|
361
|
-
t.get("lastFocusedEl") && ((e = t.get("lastFocusedEl")) == null || e.focus({ preventScroll: !0 }), t.set("lastFocusedEl", null), t.set("isFocusWithin", !1));
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
function Ot(t, e) {
|
|
367
|
-
const { state: i, send: s, prop: r, scope: a, context: c, computed: l } = t, d = i.hasTag("visible"), m = i.hasTag("paused"), u = c.get("mounted"), p = l("frontmost"), E = r("parent").computed("placement"), f = r("type"), h = r("stacked"), b = r("title"), T = r("description"), S = r("action"), [F, R = "center"] = E.split("-");
|
|
368
|
-
return {
|
|
369
|
-
type: f,
|
|
370
|
-
title: b,
|
|
371
|
-
description: T,
|
|
372
|
-
placement: E,
|
|
373
|
-
visible: d,
|
|
374
|
-
paused: m,
|
|
375
|
-
closable: !!r("closable"),
|
|
376
|
-
pause() {
|
|
377
|
-
s({ type: "PAUSE" });
|
|
378
|
-
},
|
|
379
|
-
resume() {
|
|
380
|
-
s({ type: "RESUME" });
|
|
381
|
-
},
|
|
382
|
-
dismiss() {
|
|
383
|
-
s({ type: "DISMISS", src: "programmatic" });
|
|
384
|
-
},
|
|
385
|
-
getRootProps() {
|
|
386
|
-
return e.element({
|
|
387
|
-
...O.root.attrs,
|
|
388
|
-
dir: r("dir"),
|
|
389
|
-
id: W(a),
|
|
390
|
-
"data-state": d ? "open" : "closed",
|
|
391
|
-
"data-type": f,
|
|
392
|
-
"data-placement": E,
|
|
393
|
-
"data-align": R,
|
|
394
|
-
"data-side": F,
|
|
395
|
-
"data-mounted": D(u),
|
|
396
|
-
"data-paused": D(m),
|
|
397
|
-
"data-first": D(p),
|
|
398
|
-
"data-sibling": D(!p),
|
|
399
|
-
"data-stack": D(h),
|
|
400
|
-
"data-overlap": D(!h),
|
|
401
|
-
role: "status",
|
|
402
|
-
"aria-atomic": "true",
|
|
403
|
-
"aria-describedby": T ? G(a) : void 0,
|
|
404
|
-
"aria-labelledby": b ? V(a) : void 0,
|
|
405
|
-
tabIndex: 0,
|
|
406
|
-
style: ot(t, d),
|
|
407
|
-
onKeyDown(g) {
|
|
408
|
-
g.defaultPrevented || g.key == "Escape" && (s({ type: "DISMISS", src: "keyboard" }), g.preventDefault());
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
},
|
|
412
|
-
/* Leave a ghost div to avoid setting hover to false when transitioning out */
|
|
413
|
-
getGhostBeforeProps() {
|
|
414
|
-
return e.element({
|
|
415
|
-
"data-ghost": "before",
|
|
416
|
-
style: at(t, d)
|
|
417
|
-
});
|
|
418
|
-
},
|
|
419
|
-
/* Needed to avoid setting hover to false when in between toasts */
|
|
420
|
-
getGhostAfterProps() {
|
|
421
|
-
return e.element({
|
|
422
|
-
"data-ghost": "after",
|
|
423
|
-
style: ct()
|
|
424
|
-
});
|
|
425
|
-
},
|
|
426
|
-
getTitleProps() {
|
|
427
|
-
return e.element({
|
|
428
|
-
...O.title.attrs,
|
|
429
|
-
id: V(a)
|
|
430
|
-
});
|
|
431
|
-
},
|
|
432
|
-
getDescriptionProps() {
|
|
433
|
-
return e.element({
|
|
434
|
-
...O.description.attrs,
|
|
435
|
-
id: G(a)
|
|
436
|
-
});
|
|
437
|
-
},
|
|
438
|
-
getActionTriggerProps() {
|
|
439
|
-
return e.button({
|
|
440
|
-
...O.actionTrigger.attrs,
|
|
441
|
-
type: "button",
|
|
442
|
-
onClick(g) {
|
|
443
|
-
var k;
|
|
444
|
-
g.defaultPrevented || ((k = S == null ? void 0 : S.onClick) == null || k.call(S), s({ type: "DISMISS", src: "user" }));
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
},
|
|
448
|
-
getCloseTriggerProps() {
|
|
449
|
-
return e.button({
|
|
450
|
-
id: it(a),
|
|
451
|
-
...O.closeTrigger.attrs,
|
|
452
|
-
type: "button",
|
|
453
|
-
"aria-label": "Dismiss notification",
|
|
454
|
-
onClick(g) {
|
|
455
|
-
g.defaultPrevented || s({ type: "DISMISS", src: "user" });
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
var { not: dt } = Y(), Rt = K({
|
|
462
|
-
props({ props: t }) {
|
|
463
|
-
return tt(t, ["id", "type", "parent", "removeDelay"], "toast"), {
|
|
464
|
-
closable: !0,
|
|
465
|
-
...t,
|
|
466
|
-
duration: A(t.duration, t.type)
|
|
467
|
-
};
|
|
468
|
-
},
|
|
469
|
-
initialState({ prop: t }) {
|
|
470
|
-
return t("type") === "loading" || t("duration") === 1 / 0 ? "visible:persist" : "visible";
|
|
471
|
-
},
|
|
472
|
-
context({ prop: t, bindable: e }) {
|
|
473
|
-
return {
|
|
474
|
-
remainingTime: e(() => ({
|
|
475
|
-
defaultValue: A(t("duration"), t("type"))
|
|
476
|
-
})),
|
|
477
|
-
createdAt: e(() => ({
|
|
478
|
-
defaultValue: Date.now()
|
|
479
|
-
})),
|
|
480
|
-
mounted: e(() => ({
|
|
481
|
-
defaultValue: !1
|
|
482
|
-
})),
|
|
483
|
-
initialHeight: e(() => ({
|
|
484
|
-
defaultValue: 0
|
|
485
|
-
}))
|
|
486
|
-
};
|
|
487
|
-
},
|
|
488
|
-
refs() {
|
|
489
|
-
return {
|
|
490
|
-
closeTimerStartTime: Date.now(),
|
|
491
|
-
lastCloseStartTimerStartTime: 0
|
|
492
|
-
};
|
|
493
|
-
},
|
|
494
|
-
computed: {
|
|
495
|
-
zIndex: ({ prop: t }) => {
|
|
496
|
-
const e = t("parent").context.get("toasts"), i = e.findIndex((s) => s.id === t("id"));
|
|
497
|
-
return e.length - i;
|
|
498
|
-
},
|
|
499
|
-
height: ({ prop: t }) => {
|
|
500
|
-
const i = t("parent").context.get("heights").find((s) => s.id === t("id"));
|
|
501
|
-
return (i == null ? void 0 : i.height) ?? 0;
|
|
502
|
-
},
|
|
503
|
-
heightIndex: ({ prop: t }) => t("parent").context.get("heights").findIndex((i) => i.id === t("id")),
|
|
504
|
-
frontmost: ({ prop: t }) => t("index") === 0,
|
|
505
|
-
heightBefore: ({ prop: t }) => {
|
|
506
|
-
const e = t("parent").context.get("heights"), i = e.findIndex((s) => s.id === t("id"));
|
|
507
|
-
return e.reduce((s, r, a) => a >= i ? s : s + r.height, 0);
|
|
508
|
-
},
|
|
509
|
-
shouldPersist: ({ prop: t }) => t("type") === "loading" || t("duration") === 1 / 0
|
|
510
|
-
},
|
|
511
|
-
watch({ track: t, prop: e, send: i }) {
|
|
512
|
-
t([() => e("message")], () => {
|
|
513
|
-
const s = e("message");
|
|
514
|
-
s && i({ type: s, src: "programmatic" });
|
|
515
|
-
}), t([() => e("type"), () => e("duration")], () => {
|
|
516
|
-
i({ type: "UPDATE" });
|
|
517
|
-
});
|
|
518
|
-
},
|
|
519
|
-
on: {
|
|
520
|
-
UPDATE: [
|
|
521
|
-
{
|
|
522
|
-
guard: "shouldPersist",
|
|
523
|
-
target: "visible:persist",
|
|
524
|
-
actions: ["resetCloseTimer"]
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
target: "visible:updating",
|
|
528
|
-
actions: ["resetCloseTimer"]
|
|
529
|
-
}
|
|
530
|
-
],
|
|
531
|
-
MEASURE: {
|
|
532
|
-
actions: ["measureHeight"]
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
entry: ["setMounted", "measureHeight", "invokeOnVisible"],
|
|
536
|
-
effects: ["trackHeight"],
|
|
537
|
-
states: {
|
|
538
|
-
"visible:updating": {
|
|
539
|
-
tags: ["visible", "updating"],
|
|
540
|
-
effects: ["waitForNextTick"],
|
|
541
|
-
on: {
|
|
542
|
-
SHOW: {
|
|
543
|
-
target: "visible"
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
"visible:persist": {
|
|
548
|
-
tags: ["visible", "paused"],
|
|
549
|
-
on: {
|
|
550
|
-
RESUME: {
|
|
551
|
-
guard: dt("isLoadingType"),
|
|
552
|
-
target: "visible",
|
|
553
|
-
actions: ["setCloseTimer"]
|
|
554
|
-
},
|
|
555
|
-
DISMISS: {
|
|
556
|
-
target: "dismissing"
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
visible: {
|
|
561
|
-
tags: ["visible"],
|
|
562
|
-
effects: ["waitForDuration"],
|
|
563
|
-
on: {
|
|
564
|
-
DISMISS: {
|
|
565
|
-
target: "dismissing"
|
|
566
|
-
},
|
|
567
|
-
PAUSE: {
|
|
568
|
-
target: "visible:persist",
|
|
569
|
-
actions: ["syncRemainingTime"]
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
},
|
|
573
|
-
dismissing: {
|
|
574
|
-
entry: ["invokeOnDismiss"],
|
|
575
|
-
effects: ["waitForRemoveDelay"],
|
|
576
|
-
on: {
|
|
577
|
-
REMOVE: {
|
|
578
|
-
target: "unmounted",
|
|
579
|
-
actions: ["notifyParentToRemove"]
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
unmounted: {
|
|
584
|
-
entry: ["invokeOnUnmount"]
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
implementations: {
|
|
588
|
-
effects: {
|
|
589
|
-
waitForRemoveDelay({ prop: t, send: e }) {
|
|
590
|
-
return w(() => {
|
|
591
|
-
e({ type: "REMOVE", src: "timer" });
|
|
592
|
-
}, t("removeDelay"));
|
|
593
|
-
},
|
|
594
|
-
waitForDuration({ send: t, context: e, computed: i }) {
|
|
595
|
-
if (!i("shouldPersist"))
|
|
596
|
-
return w(() => {
|
|
597
|
-
t({ type: "DISMISS", src: "timer" });
|
|
598
|
-
}, e.get("remainingTime"));
|
|
599
|
-
},
|
|
600
|
-
waitForNextTick({ send: t }) {
|
|
601
|
-
return w(() => {
|
|
602
|
-
t({ type: "SHOW", src: "timer" });
|
|
603
|
-
}, 0);
|
|
604
|
-
},
|
|
605
|
-
trackHeight({ scope: t, prop: e }) {
|
|
606
|
-
let i;
|
|
607
|
-
return N(() => {
|
|
608
|
-
const s = U(t);
|
|
609
|
-
if (!s) return;
|
|
610
|
-
const r = () => {
|
|
611
|
-
const l = s.style.height;
|
|
612
|
-
s.style.height = "auto";
|
|
613
|
-
const d = s.getBoundingClientRect().height;
|
|
614
|
-
s.style.height = l;
|
|
615
|
-
const m = { id: e("id"), height: d };
|
|
616
|
-
B(e("parent"), m);
|
|
617
|
-
}, a = t.getWin(), c = new a.MutationObserver(r);
|
|
618
|
-
c.observe(s, {
|
|
619
|
-
childList: !0,
|
|
620
|
-
subtree: !0,
|
|
621
|
-
characterData: !0
|
|
622
|
-
}), i = () => c.disconnect();
|
|
623
|
-
}), () => i == null ? void 0 : i();
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
guards: {
|
|
627
|
-
isLoadingType: ({ prop: t }) => t("type") === "loading",
|
|
628
|
-
shouldPersist: ({ computed: t }) => t("shouldPersist")
|
|
629
|
-
},
|
|
630
|
-
actions: {
|
|
631
|
-
setMounted({ context: t }) {
|
|
632
|
-
N(() => {
|
|
633
|
-
t.set("mounted", !0);
|
|
634
|
-
});
|
|
635
|
-
},
|
|
636
|
-
measureHeight({ scope: t, prop: e, context: i }) {
|
|
637
|
-
queueMicrotask(() => {
|
|
638
|
-
const s = U(t);
|
|
639
|
-
if (!s) return;
|
|
640
|
-
const r = s.style.height;
|
|
641
|
-
s.style.height = "auto";
|
|
642
|
-
const a = s.getBoundingClientRect().height;
|
|
643
|
-
s.style.height = r, i.set("initialHeight", a);
|
|
644
|
-
const c = { id: e("id"), height: a };
|
|
645
|
-
B(e("parent"), c);
|
|
646
|
-
});
|
|
647
|
-
},
|
|
648
|
-
setCloseTimer({ refs: t }) {
|
|
649
|
-
t.set("closeTimerStartTime", Date.now());
|
|
650
|
-
},
|
|
651
|
-
resetCloseTimer({ context: t, refs: e, prop: i }) {
|
|
652
|
-
e.set("closeTimerStartTime", Date.now()), t.set("remainingTime", A(i("duration"), i("type")));
|
|
653
|
-
},
|
|
654
|
-
syncRemainingTime({ context: t, refs: e }) {
|
|
655
|
-
t.set("remainingTime", (i) => {
|
|
656
|
-
const s = e.get("closeTimerStartTime"), r = Date.now() - s;
|
|
657
|
-
return e.set("lastCloseStartTimerStartTime", Date.now()), i - r;
|
|
658
|
-
});
|
|
659
|
-
},
|
|
660
|
-
notifyParentToRemove({ prop: t }) {
|
|
661
|
-
t("parent").send({ type: "TOAST.REMOVE", id: t("id") });
|
|
662
|
-
},
|
|
663
|
-
invokeOnDismiss({ prop: t, event: e }) {
|
|
664
|
-
var i;
|
|
665
|
-
(i = t("onStatusChange")) == null || i({ status: "dismissing", src: e.src });
|
|
666
|
-
},
|
|
667
|
-
invokeOnUnmount({ prop: t }) {
|
|
668
|
-
var e;
|
|
669
|
-
(e = t("onStatusChange")) == null || e({ status: "unmounted" });
|
|
670
|
-
},
|
|
671
|
-
invokeOnVisible({ prop: t }) {
|
|
672
|
-
var e;
|
|
673
|
-
(e = t("onStatusChange")) == null || e({ status: "visible" });
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
});
|
|
678
|
-
function B(t, e) {
|
|
679
|
-
const { id: i, height: s } = e;
|
|
680
|
-
t.context.set("heights", (r) => r.find((c) => c.id === i) ? r.map((c) => c.id === i ? { ...c, height: s } : c) : [{ id: i, height: s }, ...r]);
|
|
681
|
-
}
|
|
682
|
-
var gt = (t, e) => ({ ...e, ...J(t) });
|
|
683
|
-
function kt(t) {
|
|
684
|
-
const e = gt(t, {
|
|
685
|
-
placement: "bottom",
|
|
686
|
-
overlap: !1,
|
|
687
|
-
max: 24,
|
|
688
|
-
gap: 16,
|
|
689
|
-
offsets: "1rem",
|
|
690
|
-
hotkey: ["altKey", "KeyT"],
|
|
691
|
-
removeDelay: 200,
|
|
692
|
-
pauseOnPageIdle: !0
|
|
693
|
-
});
|
|
694
|
-
let i = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
|
|
695
|
-
const c = (n) => (i.push(n), () => {
|
|
696
|
-
const o = i.indexOf(n);
|
|
697
|
-
i.splice(o, 1);
|
|
698
|
-
}), l = (n) => (i.forEach((o) => o(n)), n), d = (n) => {
|
|
699
|
-
if (s.length >= e.max) {
|
|
700
|
-
a.push(n);
|
|
701
|
-
return;
|
|
702
|
-
}
|
|
703
|
-
l(n), s.unshift(n);
|
|
704
|
-
}, m = () => {
|
|
705
|
-
for (; a.length > 0 && s.length < e.max; ) {
|
|
706
|
-
const n = a.shift();
|
|
707
|
-
n && (l(n), s.unshift(n));
|
|
708
|
-
}
|
|
709
|
-
}, u = (n) => {
|
|
710
|
-
const o = n.id ?? `toast:${_()}`, I = s.find((v) => v.id === o);
|
|
711
|
-
return r.has(o) && r.delete(o), I ? s = s.map((v) => v.id === o ? l({ ...v, ...n, id: o }) : v) : d({
|
|
712
|
-
id: o,
|
|
713
|
-
duration: e.duration,
|
|
714
|
-
removeDelay: e.removeDelay,
|
|
715
|
-
type: "info",
|
|
716
|
-
...n,
|
|
717
|
-
stacked: !e.overlap,
|
|
718
|
-
gap: e.gap
|
|
719
|
-
}), o;
|
|
720
|
-
}, p = (n) => (r.add(n), n ? (i.forEach((o) => o({ id: n, dismiss: !0 })), s = s.filter((o) => o.id !== n), m()) : (s.forEach((o) => {
|
|
721
|
-
i.forEach((I) => I({ id: o.id, dismiss: !0 }));
|
|
722
|
-
}), s = [], a = []), n);
|
|
723
|
-
return {
|
|
724
|
-
attrs: e,
|
|
725
|
-
subscribe: c,
|
|
726
|
-
create: u,
|
|
727
|
-
update: (n, o) => u({ id: n, ...o }),
|
|
728
|
-
remove: p,
|
|
729
|
-
dismiss: (n) => {
|
|
730
|
-
n != null ? s = s.map((o) => o.id === n ? l({ ...o, message: "DISMISS" }) : o) : s = s.map((o) => l({ ...o, message: "DISMISS" }));
|
|
731
|
-
},
|
|
732
|
-
error: (n) => u({ ...n, type: "error" }),
|
|
733
|
-
success: (n) => u({ ...n, type: "success" }),
|
|
734
|
-
info: (n) => u({ ...n, type: "info" }),
|
|
735
|
-
warning: (n) => u({ ...n, type: "warning" }),
|
|
736
|
-
loading: (n) => u({ ...n, type: "loading" }),
|
|
737
|
-
getVisibleToasts: () => s.filter((n) => !r.has(n.id)),
|
|
738
|
-
getCount: () => s.length,
|
|
739
|
-
promise: (n, o, I = {}) => {
|
|
740
|
-
if (!o || !o.loading) {
|
|
741
|
-
z("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
const v = u({
|
|
745
|
-
...I,
|
|
746
|
-
...o.loading,
|
|
747
|
-
promise: n,
|
|
748
|
-
type: "loading"
|
|
749
|
-
});
|
|
750
|
-
let M = !0, P;
|
|
751
|
-
const j = C(n).then(async (y) => {
|
|
752
|
-
if (P = ["resolve", y], pt(y) && !y.ok) {
|
|
753
|
-
M = !1;
|
|
754
|
-
const x = C(o.error, `HTTP Error! status: ${y.status}`);
|
|
755
|
-
u({ ...I, ...x, id: v, type: "error" });
|
|
756
|
-
} else if (o.success !== void 0) {
|
|
757
|
-
M = !1;
|
|
758
|
-
const x = C(o.success, y);
|
|
759
|
-
u({ ...I, ...x, id: v, type: "success" });
|
|
760
|
-
}
|
|
761
|
-
}).catch(async (y) => {
|
|
762
|
-
if (P = ["reject", y], o.error !== void 0) {
|
|
763
|
-
M = !1;
|
|
764
|
-
const x = C(o.error, y);
|
|
765
|
-
u({ ...I, ...x, id: v, type: "error" });
|
|
766
|
-
}
|
|
767
|
-
}).finally(() => {
|
|
768
|
-
var y;
|
|
769
|
-
M && p(v), (y = o.finally) == null || y.call(o);
|
|
770
|
-
});
|
|
771
|
-
return { id: v, unwrap: () => new Promise(
|
|
772
|
-
(y, x) => j.then(() => P[0] === "reject" ? x(P[1]) : y(P[1])).catch(x)
|
|
773
|
-
) };
|
|
774
|
-
},
|
|
775
|
-
pause: (n) => {
|
|
776
|
-
n != null ? s = s.map((o) => o.id === n ? l({ ...o, message: "PAUSE" }) : o) : s = s.map((o) => l({ ...o, message: "PAUSE" }));
|
|
777
|
-
},
|
|
778
|
-
resume: (n) => {
|
|
779
|
-
n != null ? s = s.map((o) => o.id === n ? l({ ...o, message: "RESUME" }) : o) : s = s.map((o) => l({ ...o, message: "RESUME" }));
|
|
780
|
-
},
|
|
781
|
-
isVisible: (n) => !r.has(n) && !!s.find((o) => o.id === n),
|
|
782
|
-
isDismissed: (n) => r.has(n),
|
|
783
|
-
expand: () => {
|
|
784
|
-
s = s.map((n) => l({ ...n, stacked: !0 }));
|
|
785
|
-
},
|
|
786
|
-
collapse: () => {
|
|
787
|
-
s = s.map((n) => l({ ...n, stacked: !1 }));
|
|
788
|
-
}
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
var pt = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", Pt = {
|
|
792
|
-
connect: lt,
|
|
793
|
-
machine: ut
|
|
1
|
+
import { groupConnect as o } from "./toast-group.connect.js";
|
|
2
|
+
import { groupMachine as r } from "./toast-group.machine.js";
|
|
3
|
+
var c = {
|
|
4
|
+
connect: o,
|
|
5
|
+
machine: r
|
|
794
6
|
};
|
|
795
7
|
export {
|
|
796
|
-
|
|
797
|
-
Ot as connect,
|
|
798
|
-
kt as createStore,
|
|
799
|
-
Pt as group,
|
|
800
|
-
Rt as machine
|
|
8
|
+
c as group
|
|
801
9
|
};
|