@serendie/ui 3.2.0 → 3.2.1-dev.202604251106
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/BottomNavigation.js +12 -11
- 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/BodyCell.js +3 -2
- package/dist/components/DataTable/table/HeaderCell.js +16 -15
- package/dist/components/DataTable/table/Root.js +7 -6
- 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 +16 -15
- 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,56 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
}).filter((a) => !!a), g = /* @__PURE__ */ new Set(["script", "output", "status", "next-route-announcer"]), W = (t) => g.has(t.localName) || t.role === "status" || t.hasAttribute("aria-live") ? !0 : t.matches("[data-live-announcer]"), H = (t, n) => {
|
|
6
|
-
const { parentNode: a, markerName: s, controlAttribute: u } = n, o = M(a, Array.isArray(t) ? t : [t]);
|
|
7
|
-
p[s] || (p[s] = /* @__PURE__ */ new WeakMap());
|
|
8
|
-
const c = p[s], v = [], f = /* @__PURE__ */ new Set(), N = new Set(o), d = (e) => {
|
|
9
|
-
!e || f.has(e) || (f.add(e), d(e.parentNode));
|
|
10
|
-
};
|
|
11
|
-
o.forEach(d);
|
|
12
|
-
const A = (e) => {
|
|
13
|
-
!e || N.has(e) || Array.prototype.forEach.call(e.children, (r) => {
|
|
14
|
-
if (f.has(r))
|
|
15
|
-
A(r);
|
|
16
|
-
else
|
|
17
|
-
try {
|
|
18
|
-
if (W(r)) return;
|
|
19
|
-
const k = r.getAttribute(u) === "true", w = (i.get(r) || 0) + 1, b = (c.get(r) || 0) + 1;
|
|
20
|
-
i.set(r, w), c.set(r, b), v.push(r), w === 1 && k && h.set(r, !0), b === 1 && r.setAttribute(s, ""), k || r.setAttribute(u, "true");
|
|
21
|
-
} catch (l) {
|
|
22
|
-
console.error("[zag-js > ariaHidden] cannot operate on ", r, l);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
return A(a), f.clear(), m++, () => {
|
|
27
|
-
v.forEach((e) => {
|
|
28
|
-
const r = i.get(e) - 1, l = c.get(e) - 1;
|
|
29
|
-
i.set(e, r), c.set(e, l), r || (h.has(e) || e.removeAttribute(u), h.delete(e)), l || e.removeAttribute(s);
|
|
30
|
-
}), m--, m || (i = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), p = {});
|
|
31
|
-
};
|
|
32
|
-
}, E = (t) => (Array.isArray(t) ? t[0] : t).ownerDocument.body, S = (t, n = E(t), a = "data-aria-hidden") => {
|
|
33
|
-
if (n)
|
|
34
|
-
return H(t, {
|
|
35
|
-
parentNode: n,
|
|
36
|
-
markerName: a,
|
|
37
|
-
controlAttribute: "aria-hidden"
|
|
38
|
-
});
|
|
39
|
-
}, V = (t) => {
|
|
40
|
-
const n = requestAnimationFrame(() => t());
|
|
41
|
-
return () => cancelAnimationFrame(n);
|
|
1
|
+
import { hideOthers as i } from "./aria-hidden.js";
|
|
2
|
+
var s = (t) => {
|
|
3
|
+
const r = requestAnimationFrame(() => t());
|
|
4
|
+
return () => cancelAnimationFrame(r);
|
|
42
5
|
};
|
|
43
|
-
function
|
|
44
|
-
const { defer: a = !0 } =
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
6
|
+
function m(t, r = {}) {
|
|
7
|
+
const { defer: a = !0 } = r, c = a ? s : (e) => e(), n = [];
|
|
8
|
+
return n.push(
|
|
9
|
+
c(() => {
|
|
10
|
+
const o = (typeof t == "function" ? t() : t).filter(Boolean);
|
|
11
|
+
o.length !== 0 && n.push(i(o));
|
|
49
12
|
})
|
|
50
13
|
), () => {
|
|
51
|
-
|
|
14
|
+
n.forEach((e) => e == null ? void 0 : e());
|
|
52
15
|
};
|
|
53
16
|
}
|
|
54
17
|
export {
|
|
55
|
-
|
|
18
|
+
m as ariaHidden
|
|
56
19
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isHTMLElement as E } from "../../dom-query/dist/node.js";
|
|
2
|
+
import { findControlledElements as W } from "../../dom-query/dist/controller.js";
|
|
3
|
+
var o = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = {}, h = 0, d = (r) => r && (r.host || d(r.parentNode)), H = (r, f) => f.map((a) => {
|
|
4
|
+
if (r.contains(a)) return a;
|
|
5
|
+
const n = d(a);
|
|
6
|
+
return n && r.contains(n) ? n : (console.error("[zag-js > ariaHidden] target", a, "in not contained inside", r, ". Doing nothing"), null);
|
|
7
|
+
}).filter((a) => !!a), V = /* @__PURE__ */ new Set(["script", "output", "status", "next-route-announcer"]), C = (r) => V.has(r.localName) || r.role === "status" || r.hasAttribute("aria-live") ? !0 : r.matches("[data-live-announcer]"), x = (r, f) => {
|
|
8
|
+
const { parentNode: a, markerName: n, controlAttribute: p, explicitBooleanValue: k, followControlledElements: g = !0 } = f, v = H(a, Array.isArray(r) ? r : [r]);
|
|
9
|
+
l[n] || (l[n] = /* @__PURE__ */ new WeakMap());
|
|
10
|
+
const i = l[n], w = [], u = /* @__PURE__ */ new Set(), y = new Set(v), m = (e) => {
|
|
11
|
+
!e || u.has(e) || (u.add(e), m(e.parentNode));
|
|
12
|
+
};
|
|
13
|
+
v.forEach((e) => {
|
|
14
|
+
m(e), g && E(e) && W(e, (t) => {
|
|
15
|
+
m(t);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
const A = (e) => {
|
|
19
|
+
!e || y.has(e) || Array.prototype.forEach.call(e.children, (t) => {
|
|
20
|
+
if (u.has(t))
|
|
21
|
+
A(t);
|
|
22
|
+
else
|
|
23
|
+
try {
|
|
24
|
+
if (C(t)) return;
|
|
25
|
+
const s = t.getAttribute(p), M = k ? s === "true" : s !== null && s !== "false", N = (o.get(t) || 0) + 1, b = (i.get(t) || 0) + 1;
|
|
26
|
+
o.set(t, N), i.set(t, b), w.push(t), N === 1 && M && c.set(t, !0), b === 1 && t.setAttribute(n, ""), M || t.setAttribute(p, k ? "true" : "");
|
|
27
|
+
} catch (s) {
|
|
28
|
+
console.error("[zag-js > ariaHidden] cannot operate on ", t, s);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return A(a), u.clear(), h++, () => {
|
|
33
|
+
w.forEach((e) => {
|
|
34
|
+
const t = o.get(e) - 1, s = i.get(e) - 1;
|
|
35
|
+
o.set(e, t), i.set(e, s), t || (c.has(e) || e.removeAttribute(p), c.delete(e)), s || e.removeAttribute(n);
|
|
36
|
+
}), h--, h || (o = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = {});
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
x as walkTreeOutside
|
|
41
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { parts as s } from "./avatar.anatomy.js";
|
|
2
|
+
import { getFallbackId as p, getImageId as g, getRootId as l, getImageEl as m } from "./avatar.dom.js";
|
|
3
|
+
function I(i, d) {
|
|
4
|
+
const { state: n, send: t, prop: o, scope: r } = i, e = n.matches("loaded");
|
|
5
|
+
return {
|
|
6
|
+
loaded: e,
|
|
7
|
+
setSrc(c) {
|
|
8
|
+
const a = m(r);
|
|
9
|
+
a == null || a.setAttribute("src", c);
|
|
10
|
+
},
|
|
11
|
+
setLoaded() {
|
|
12
|
+
t({ type: "img.loaded", src: "api" });
|
|
13
|
+
},
|
|
14
|
+
setError() {
|
|
15
|
+
t({ type: "img.error", src: "api" });
|
|
16
|
+
},
|
|
17
|
+
getRootProps() {
|
|
18
|
+
return d.element({
|
|
19
|
+
...s.root.attrs,
|
|
20
|
+
dir: o("dir"),
|
|
21
|
+
id: l(r)
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
getImageProps() {
|
|
25
|
+
return d.img({
|
|
26
|
+
...s.image.attrs,
|
|
27
|
+
hidden: !e,
|
|
28
|
+
dir: o("dir"),
|
|
29
|
+
id: g(r),
|
|
30
|
+
"data-state": e ? "visible" : "hidden",
|
|
31
|
+
onLoad() {
|
|
32
|
+
t({ type: "img.loaded", src: "element" });
|
|
33
|
+
},
|
|
34
|
+
onError() {
|
|
35
|
+
t({ type: "img.error", src: "element" });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
getFallbackProps() {
|
|
40
|
+
return d.element({
|
|
41
|
+
...s.fallback.attrs,
|
|
42
|
+
dir: o("dir"),
|
|
43
|
+
id: p(r),
|
|
44
|
+
hidden: e,
|
|
45
|
+
"data-state": e ? "hidden" : "visible"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
I as connect
|
|
52
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var d = (a) => {
|
|
2
|
+
var e;
|
|
3
|
+
return ((e = a.ids) == null ? void 0 : e.root) ?? `avatar:${a.id}`;
|
|
4
|
+
}, g = (a) => {
|
|
5
|
+
var e;
|
|
6
|
+
return ((e = a.ids) == null ? void 0 : e.image) ?? `avatar:${a.id}:image`;
|
|
7
|
+
}, r = (a) => {
|
|
8
|
+
var e;
|
|
9
|
+
return ((e = a.ids) == null ? void 0 : e.fallback) ?? `avatar:${a.id}:fallback`;
|
|
10
|
+
}, t = (a) => a.getById(d(a)), i = (a) => a.getById(g(a));
|
|
11
|
+
export {
|
|
12
|
+
r as getFallbackId,
|
|
13
|
+
i as getImageEl,
|
|
14
|
+
g as getImageId,
|
|
15
|
+
t as getRootEl,
|
|
16
|
+
d as getRootId
|
|
17
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { getImageEl as n, getRootEl as c } from "./avatar.dom.js";
|
|
2
|
+
import { createMachine as s } from "../../core/dist/create-machine.js";
|
|
3
|
+
import { observeAttributes as i, observeChildren as d } from "../../dom-query/dist/mutation-observer.js";
|
|
4
|
+
var k = s({
|
|
5
|
+
initialState() {
|
|
6
|
+
return "loading";
|
|
7
|
+
},
|
|
8
|
+
effects: ["trackImageRemoval", "trackSrcChange"],
|
|
9
|
+
on: {
|
|
10
|
+
"src.change": {
|
|
11
|
+
target: "loading"
|
|
12
|
+
},
|
|
13
|
+
"img.unmount": {
|
|
14
|
+
target: "error"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
states: {
|
|
18
|
+
loading: {
|
|
19
|
+
entry: ["checkImageStatus"],
|
|
20
|
+
on: {
|
|
21
|
+
"img.loaded": {
|
|
22
|
+
target: "loaded",
|
|
23
|
+
actions: ["invokeOnLoad"]
|
|
24
|
+
},
|
|
25
|
+
"img.error": {
|
|
26
|
+
target: "error",
|
|
27
|
+
actions: ["invokeOnError"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
error: {
|
|
32
|
+
on: {
|
|
33
|
+
"img.loaded": {
|
|
34
|
+
target: "loaded",
|
|
35
|
+
actions: ["invokeOnLoad"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
loaded: {
|
|
40
|
+
on: {
|
|
41
|
+
"img.error": {
|
|
42
|
+
target: "error",
|
|
43
|
+
actions: ["invokeOnError"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
implementations: {
|
|
49
|
+
actions: {
|
|
50
|
+
invokeOnLoad({ prop: e }) {
|
|
51
|
+
var r;
|
|
52
|
+
(r = e("onStatusChange")) == null || r({ status: "loaded" });
|
|
53
|
+
},
|
|
54
|
+
invokeOnError({ prop: e }) {
|
|
55
|
+
var r;
|
|
56
|
+
(r = e("onStatusChange")) == null || r({ status: "error" });
|
|
57
|
+
},
|
|
58
|
+
checkImageStatus({ send: e, scope: r }) {
|
|
59
|
+
const t = n(r);
|
|
60
|
+
if (!(t != null && t.complete)) return;
|
|
61
|
+
const o = m(t) ? "img.loaded" : "img.error";
|
|
62
|
+
e({ type: o, src: "ssr" });
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
effects: {
|
|
66
|
+
trackImageRemoval({ send: e, scope: r }) {
|
|
67
|
+
const t = c(r);
|
|
68
|
+
return d(t, {
|
|
69
|
+
callback(o) {
|
|
70
|
+
Array.from(o[0].removedNodes).find(
|
|
71
|
+
(a) => a.nodeType === Node.ELEMENT_NODE && a.matches("[data-scope=avatar][data-part=image]")
|
|
72
|
+
) && e({ type: "img.unmount" });
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
trackSrcChange({ send: e, scope: r }) {
|
|
77
|
+
const t = n(r);
|
|
78
|
+
return i(t, {
|
|
79
|
+
attributes: ["src", "srcset"],
|
|
80
|
+
callback() {
|
|
81
|
+
e({ type: "src.change" });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
function m(e) {
|
|
89
|
+
return e.complete && e.naturalWidth !== 0 && e.naturalHeight !== 0;
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
k as machine
|
|
93
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { getEventTarget as y } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { dataAttr as r } from "../../dom-query/dist/shared.js";
|
|
3
|
+
import { visuallyHiddenStyle as I } from "../../dom-query/dist/visually-hidden.js";
|
|
4
|
+
import { isFocusVisible as P } from "../../focus-visible/dist/index.js";
|
|
5
|
+
import { parts as u } from "./checkbox.anatomy.js";
|
|
6
|
+
import { getLabelId as T, getHiddenInputId as E, getControlId as S, getHiddenInputEl as x, getRootId as H } from "./checkbox.dom.js";
|
|
7
|
+
function X(b, n) {
|
|
8
|
+
const { send: d, context: a, prop: e, computed: p, scope: o } = b, i = !!e("disabled"), f = !!e("readOnly"), C = !!e("required"), g = !!e("invalid"), h = !i && a.get("focused"), k = !i && a.get("focusVisible"), c = p("checked"), l = p("indeterminate"), v = a.get("checked"), s = {
|
|
9
|
+
"data-active": r(a.get("active")),
|
|
10
|
+
"data-focus": r(h),
|
|
11
|
+
"data-focus-visible": r(k),
|
|
12
|
+
"data-readonly": r(f),
|
|
13
|
+
"data-hover": r(a.get("hovered")),
|
|
14
|
+
"data-disabled": r(i),
|
|
15
|
+
"data-state": l ? "indeterminate" : c ? "checked" : "unchecked",
|
|
16
|
+
"data-invalid": r(g),
|
|
17
|
+
"data-required": r(C)
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
checked: c,
|
|
21
|
+
disabled: i,
|
|
22
|
+
indeterminate: l,
|
|
23
|
+
focused: h,
|
|
24
|
+
checkedState: v,
|
|
25
|
+
setChecked(t) {
|
|
26
|
+
d({ type: "CHECKED.SET", checked: t, isTrusted: !1 });
|
|
27
|
+
},
|
|
28
|
+
toggleChecked() {
|
|
29
|
+
d({ type: "CHECKED.TOGGLE", checked: c, isTrusted: !1 });
|
|
30
|
+
},
|
|
31
|
+
getRootProps() {
|
|
32
|
+
return n.label({
|
|
33
|
+
...u.root.attrs,
|
|
34
|
+
...s,
|
|
35
|
+
dir: e("dir"),
|
|
36
|
+
id: H(o),
|
|
37
|
+
htmlFor: E(o),
|
|
38
|
+
onPointerMove() {
|
|
39
|
+
i || d({ type: "CONTEXT.SET", context: { hovered: !0 } });
|
|
40
|
+
},
|
|
41
|
+
onPointerLeave() {
|
|
42
|
+
i || d({ type: "CONTEXT.SET", context: { hovered: !1 } });
|
|
43
|
+
},
|
|
44
|
+
onClick(t) {
|
|
45
|
+
y(t) === x(o) && t.stopPropagation();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
getLabelProps() {
|
|
50
|
+
return n.element({
|
|
51
|
+
...u.label.attrs,
|
|
52
|
+
...s,
|
|
53
|
+
dir: e("dir"),
|
|
54
|
+
id: T(o)
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
getControlProps() {
|
|
58
|
+
return n.element({
|
|
59
|
+
...u.control.attrs,
|
|
60
|
+
...s,
|
|
61
|
+
dir: e("dir"),
|
|
62
|
+
id: S(o),
|
|
63
|
+
"aria-hidden": !0
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
getIndicatorProps() {
|
|
67
|
+
return n.element({
|
|
68
|
+
...u.indicator.attrs,
|
|
69
|
+
...s,
|
|
70
|
+
dir: e("dir"),
|
|
71
|
+
hidden: !l && !c
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
getHiddenInputProps() {
|
|
75
|
+
return n.input({
|
|
76
|
+
id: E(o),
|
|
77
|
+
type: "checkbox",
|
|
78
|
+
required: e("required"),
|
|
79
|
+
defaultChecked: c,
|
|
80
|
+
disabled: i,
|
|
81
|
+
"aria-labelledby": T(o),
|
|
82
|
+
"aria-invalid": g,
|
|
83
|
+
name: e("name"),
|
|
84
|
+
form: e("form"),
|
|
85
|
+
value: e("value"),
|
|
86
|
+
style: I,
|
|
87
|
+
onFocus() {
|
|
88
|
+
const t = P();
|
|
89
|
+
d({ type: "CONTEXT.SET", context: { focused: !0, focusVisible: t } });
|
|
90
|
+
},
|
|
91
|
+
onBlur() {
|
|
92
|
+
d({ type: "CONTEXT.SET", context: { focused: !1, focusVisible: !1 } });
|
|
93
|
+
},
|
|
94
|
+
onClick(t) {
|
|
95
|
+
if (f) {
|
|
96
|
+
t.preventDefault();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const m = t.currentTarget.checked;
|
|
100
|
+
d({ type: "CHECKED.SET", checked: m, isTrusted: !0 });
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
X as connect
|
|
108
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var o = (d) => {
|
|
2
|
+
var e;
|
|
3
|
+
return ((e = d.ids) == null ? void 0 : e.root) ?? `checkbox:${d.id}`;
|
|
4
|
+
}, i = (d) => {
|
|
5
|
+
var e;
|
|
6
|
+
return ((e = d.ids) == null ? void 0 : e.label) ?? `checkbox:${d.id}:label`;
|
|
7
|
+
}, r = (d) => {
|
|
8
|
+
var e;
|
|
9
|
+
return ((e = d.ids) == null ? void 0 : e.control) ?? `checkbox:${d.id}:control`;
|
|
10
|
+
}, t = (d) => {
|
|
11
|
+
var e;
|
|
12
|
+
return ((e = d.ids) == null ? void 0 : e.hiddenInput) ?? `checkbox:${d.id}:input`;
|
|
13
|
+
}, l = (d) => d.getById(o(d)), n = (d) => d.getById(t(d));
|
|
14
|
+
export {
|
|
15
|
+
r as getControlId,
|
|
16
|
+
n as getHiddenInputEl,
|
|
17
|
+
t as getHiddenInputId,
|
|
18
|
+
i as getLabelId,
|
|
19
|
+
l as getRootEl,
|
|
20
|
+
o as getRootId
|
|
21
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { trackFocusVisible as i } from "../../focus-visible/dist/index.js";
|
|
2
|
+
import { getHiddenInputEl as d, getRootEl as n } from "./checkbox.dom.js";
|
|
3
|
+
import { createMachine as o, createGuards as l } from "../../core/dist/create-machine.js";
|
|
4
|
+
import { dispatchInputCheckedEvent as u, setElementChecked as f, trackFormControl as h } from "../../dom-query/dist/form.js";
|
|
5
|
+
import { trackPress as k } from "../../dom-query/dist/press.js";
|
|
6
|
+
var { not: r } = l(), F = o({
|
|
7
|
+
props({ props: e }) {
|
|
8
|
+
return {
|
|
9
|
+
value: "on",
|
|
10
|
+
...e,
|
|
11
|
+
defaultChecked: e.defaultChecked ?? !1
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
initialState() {
|
|
15
|
+
return "ready";
|
|
16
|
+
},
|
|
17
|
+
context({ prop: e, bindable: t }) {
|
|
18
|
+
return {
|
|
19
|
+
checked: t(() => ({
|
|
20
|
+
defaultValue: e("defaultChecked"),
|
|
21
|
+
value: e("checked"),
|
|
22
|
+
onChange(s) {
|
|
23
|
+
var a;
|
|
24
|
+
(a = e("onCheckedChange")) == null || a({ checked: s });
|
|
25
|
+
}
|
|
26
|
+
})),
|
|
27
|
+
fieldsetDisabled: t(() => ({ defaultValue: !1 })),
|
|
28
|
+
focusVisible: t(() => ({ defaultValue: !1 })),
|
|
29
|
+
active: t(() => ({ defaultValue: !1 })),
|
|
30
|
+
focused: t(() => ({ defaultValue: !1 })),
|
|
31
|
+
hovered: t(() => ({ defaultValue: !1 }))
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
watch({ track: e, context: t, prop: s, action: a }) {
|
|
35
|
+
e([() => s("disabled")], () => {
|
|
36
|
+
a(["removeFocusIfNeeded"]);
|
|
37
|
+
}), e([() => t.get("checked")], () => {
|
|
38
|
+
a(["syncInputElement"]);
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
effects: ["trackFormControlState", "trackPressEvent", "trackFocusVisible"],
|
|
42
|
+
on: {
|
|
43
|
+
"CHECKED.TOGGLE": [
|
|
44
|
+
{
|
|
45
|
+
guard: r("isTrusted"),
|
|
46
|
+
actions: ["toggleChecked", "dispatchChangeEvent"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
actions: ["toggleChecked"]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"CHECKED.SET": [
|
|
53
|
+
{
|
|
54
|
+
guard: r("isTrusted"),
|
|
55
|
+
actions: ["setChecked", "dispatchChangeEvent"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
actions: ["setChecked"]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"CONTEXT.SET": {
|
|
62
|
+
actions: ["setContext"]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
indeterminate: ({ context: e }) => c(e.get("checked")),
|
|
67
|
+
checked: ({ context: e }) => C(e.get("checked")),
|
|
68
|
+
disabled: ({ context: e, prop: t }) => !!t("disabled") || e.get("fieldsetDisabled")
|
|
69
|
+
},
|
|
70
|
+
states: {
|
|
71
|
+
ready: {}
|
|
72
|
+
},
|
|
73
|
+
implementations: {
|
|
74
|
+
guards: {
|
|
75
|
+
isTrusted: ({ event: e }) => !!e.isTrusted
|
|
76
|
+
},
|
|
77
|
+
effects: {
|
|
78
|
+
trackPressEvent({ context: e, computed: t, scope: s }) {
|
|
79
|
+
if (!t("disabled"))
|
|
80
|
+
return k({
|
|
81
|
+
pointerNode: n(s),
|
|
82
|
+
keyboardNode: d(s),
|
|
83
|
+
isValidKey: (a) => a.key === " ",
|
|
84
|
+
onPress: () => e.set("active", !1),
|
|
85
|
+
onPressStart: () => e.set("active", !0),
|
|
86
|
+
onPressEnd: () => e.set("active", !1)
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
trackFocusVisible({ computed: e, scope: t }) {
|
|
90
|
+
var s;
|
|
91
|
+
if (!e("disabled"))
|
|
92
|
+
return i({ root: (s = t.getRootNode) == null ? void 0 : s.call(t) });
|
|
93
|
+
},
|
|
94
|
+
trackFormControlState({ context: e, scope: t }) {
|
|
95
|
+
return h(d(t), {
|
|
96
|
+
onFieldsetDisabledChange(s) {
|
|
97
|
+
e.set("fieldsetDisabled", s);
|
|
98
|
+
},
|
|
99
|
+
onFormReset() {
|
|
100
|
+
e.set("checked", e.initial("checked"));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
actions: {
|
|
106
|
+
setContext({ context: e, event: t }) {
|
|
107
|
+
for (const s in t.context)
|
|
108
|
+
e.set(s, t.context[s]);
|
|
109
|
+
},
|
|
110
|
+
syncInputElement({ context: e, computed: t, scope: s }) {
|
|
111
|
+
const a = d(s);
|
|
112
|
+
a && (f(a, t("checked")), a.indeterminate = c(e.get("checked")));
|
|
113
|
+
},
|
|
114
|
+
removeFocusIfNeeded({ context: e, prop: t }) {
|
|
115
|
+
t("disabled") && e.get("focused") && (e.set("focused", !1), e.set("focusVisible", !1));
|
|
116
|
+
},
|
|
117
|
+
setChecked({ context: e, event: t }) {
|
|
118
|
+
e.set("checked", t.checked);
|
|
119
|
+
},
|
|
120
|
+
toggleChecked({ context: e, computed: t }) {
|
|
121
|
+
const s = c(t("checked")) ? !0 : !t("checked");
|
|
122
|
+
e.set("checked", s);
|
|
123
|
+
},
|
|
124
|
+
dispatchChangeEvent({ computed: e, scope: t }) {
|
|
125
|
+
queueMicrotask(() => {
|
|
126
|
+
const s = d(t);
|
|
127
|
+
u(s, { checked: e("checked") });
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
function c(e) {
|
|
134
|
+
return e === "indeterminate";
|
|
135
|
+
}
|
|
136
|
+
function C(e) {
|
|
137
|
+
return c(e) ? !1 : !!e;
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
F as machine
|
|
141
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { dataAttr as c } from "../../dom-query/dist/shared.js";
|
|
2
|
+
import { parts as p } from "./collapsible.anatomy.js";
|
|
3
|
+
import { getContentId as P, getTriggerId as H, getRootId as W } from "./collapsible.dom.js";
|
|
4
|
+
import { toPx as t } from "../../utils/dist/number.js";
|
|
5
|
+
function T(v, a) {
|
|
6
|
+
const { state: s, send: h, context: m, scope: i, prop: e } = v, g = s.matches("open") || s.matches("closing"), o = s.matches("open"), u = s.matches("closed"), { width: w, height: x } = m.get("size"), d = !!e("disabled"), n = e("collapsedHeight"), r = e("collapsedWidth"), f = n != null, b = r != null, C = f || b, y = !m.get("initial") && o;
|
|
7
|
+
return {
|
|
8
|
+
disabled: d,
|
|
9
|
+
visible: g,
|
|
10
|
+
open: o,
|
|
11
|
+
measureSize() {
|
|
12
|
+
h({ type: "size.measure" });
|
|
13
|
+
},
|
|
14
|
+
setOpen(l) {
|
|
15
|
+
s.matches("open") !== l && h({ type: l ? "open" : "close" });
|
|
16
|
+
},
|
|
17
|
+
getRootProps() {
|
|
18
|
+
return a.element({
|
|
19
|
+
...p.root.attrs,
|
|
20
|
+
"data-state": o ? "open" : "closed",
|
|
21
|
+
dir: e("dir"),
|
|
22
|
+
id: W(i)
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
getContentProps() {
|
|
26
|
+
return a.element({
|
|
27
|
+
...p.content.attrs,
|
|
28
|
+
id: P(i),
|
|
29
|
+
"data-collapsible": "",
|
|
30
|
+
"data-state": y ? void 0 : o ? "open" : "closed",
|
|
31
|
+
"data-disabled": c(d),
|
|
32
|
+
"data-has-collapsed-size": c(C),
|
|
33
|
+
hidden: !g && !C,
|
|
34
|
+
dir: e("dir"),
|
|
35
|
+
style: {
|
|
36
|
+
"--height": t(x),
|
|
37
|
+
"--width": t(w),
|
|
38
|
+
"--collapsed-height": t(n),
|
|
39
|
+
"--collapsed-width": t(r),
|
|
40
|
+
...u && f && {
|
|
41
|
+
overflow: "hidden",
|
|
42
|
+
minHeight: t(n),
|
|
43
|
+
maxHeight: t(n)
|
|
44
|
+
},
|
|
45
|
+
...u && b && {
|
|
46
|
+
overflow: "hidden",
|
|
47
|
+
minWidth: t(r),
|
|
48
|
+
maxWidth: t(r)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
getTriggerProps() {
|
|
54
|
+
return a.element({
|
|
55
|
+
...p.trigger.attrs,
|
|
56
|
+
id: H(i),
|
|
57
|
+
dir: e("dir"),
|
|
58
|
+
type: "button",
|
|
59
|
+
"data-state": o ? "open" : "closed",
|
|
60
|
+
"data-disabled": c(d),
|
|
61
|
+
"aria-controls": P(i),
|
|
62
|
+
"aria-expanded": g || !1,
|
|
63
|
+
onClick(l) {
|
|
64
|
+
l.defaultPrevented || d || h({ type: o ? "close" : "open" });
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
getIndicatorProps() {
|
|
69
|
+
return a.element({
|
|
70
|
+
...p.indicator.attrs,
|
|
71
|
+
dir: e("dir"),
|
|
72
|
+
"data-state": o ? "open" : "closed",
|
|
73
|
+
"data-disabled": c(d)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
T as connect
|
|
80
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var o = (e) => {
|
|
2
|
+
var t;
|
|
3
|
+
return ((t = e.ids) == null ? void 0 : t.root) ?? `collapsible:${e.id}`;
|
|
4
|
+
}, i = (e) => {
|
|
5
|
+
var t;
|
|
6
|
+
return ((t = e.ids) == null ? void 0 : t.content) ?? `collapsible:${e.id}:content`;
|
|
7
|
+
}, r = (e) => {
|
|
8
|
+
var t;
|
|
9
|
+
return ((t = e.ids) == null ? void 0 : t.trigger) ?? `collapsible:${e.id}:trigger`;
|
|
10
|
+
}, g = (e) => e.getById(i(e));
|
|
11
|
+
export {
|
|
12
|
+
g as getContentEl,
|
|
13
|
+
i as getContentId,
|
|
14
|
+
o as getRootId,
|
|
15
|
+
r as getTriggerId
|
|
16
|
+
};
|