@serendie/ui 3.2.0 → 3.2.1-dev.202604210459
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +6 -6
- package/dist/components/Accordion/Accordion.js +18 -21
- package/dist/components/Accordion/AccordionGroup.js +4 -4
- package/dist/components/Avatar/Avatar.js +19 -21
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Banner/Banner.js +4 -4
- package/dist/components/BottomNavigation/BottomNavigationItem.js +4 -4
- package/dist/components/Button/Button.js +6 -6
- package/dist/components/CheckBox/CheckBox.js +28 -32
- package/dist/components/ChoiceBox/ChoiceBox.js +46 -52
- package/dist/components/DashboardWidget/DashboardWidget.js +4 -4
- package/dist/components/DataTable/DataTableComponent.js +16 -17
- package/dist/components/DataTable/table/HeaderCell.js +4 -4
- package/dist/components/DataTable/table/Root.js +4 -4
- package/dist/components/DatePicker/DatePicker.js +107 -127
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Drawer/Drawer.js +22 -26
- package/dist/components/DropdownMenu/DropdownMenu.js +36 -41
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/List/ListItem.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.js +27 -33
- package/dist/components/NotificationBadge/NotificationBadge.js +1 -1
- package/dist/components/Pagination/Pagination.js +54 -59
- package/dist/components/RadioButton/RadioButton.js +32 -36
- package/dist/components/RadioButton/RadioGroup.js +4 -4
- package/dist/components/Search/Search.js +67 -74
- package/dist/components/Select/Select.js +53 -60
- package/dist/components/Switch/Switch.js +18 -22
- package/dist/components/Tabs/TabItem.js +6 -6
- package/dist/components/Tabs/Tabs.js +9 -10
- package/dist/components/TextArea/TextArea.js +4 -4
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/Toast/Toast.js +16 -17
- package/dist/components/Tooltip/Tooltip.js +30 -35
- package/dist/components/TopAppBar/TopAppBar.js +4 -4
- package/dist/index.js +6 -6
- package/dist/node_modules/@ark-ui/react/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +15 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +25 -22
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +21 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +21 -11
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -12
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group-provider.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-group.js +32 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +13 -9
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +19 -13
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox-group.js +43 -0
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +16 -14
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +14 -12
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +15 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/split-collapsible-props.js +5 -3
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +17 -12
- package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-empty.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +14 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +20 -11
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +19 -10
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-label.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-list.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root-provider.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +24 -14
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox.js +42 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-group-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +13 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +14 -7
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-preset-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-range-text.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root-provider.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +32 -16
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +16 -13
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +18 -13
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +22 -12
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-value-text.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-trigger.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-cell.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-week-number-header-cell.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +16 -9
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.js +64 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +16 -14
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +19 -13
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +15 -12
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +17 -7
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-trigger.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +21 -22
- package/dist/node_modules/@ark-ui/react/dist/components/field/use-field-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js +11 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow-tip.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-arrow.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-checkbox-item.js +35 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +21 -12
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-text.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +25 -13
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item-group.js +28 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-radio-item.js +39 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root-provider.js +31 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +32 -19
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-separator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger-item.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +18 -17
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu.js +48 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-item-group-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-machine-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-trigger-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +19 -14
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-first-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-item.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-last-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +20 -12
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination-context.js +4 -4
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +16 -20
- package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +13 -12
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +26 -13
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-label.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +18 -10
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +20 -13
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js +23 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-group.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item-text.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +22 -13
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-list.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +11 -8
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root-provider.js +25 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +25 -14
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +11 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select.js +44 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +12 -10
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +13 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +18 -12
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +10 -7
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +13 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-content.js +28 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-indicator.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +14 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root-provider.js +24 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +20 -11
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs-context.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-action-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-close-trigger.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-description.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +14 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +37 -22
- package/dist/node_modules/@ark-ui/react/dist/components/toast/use-toast-context.js +4 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +12 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +13 -10
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +16 -9
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +12 -8
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip.js +22 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/providers/environment/use-environment-context.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/providers/locale/use-locale-context.js +5 -2
- package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +7 -10
- package/dist/node_modules/@ark-ui/react/dist/utils/create-context.js +17 -20
- package/dist/node_modules/@ark-ui/react/dist/utils/create-split-props.js +4 -7
- package/dist/node_modules/@ark-ui/react/dist/utils/render-strategy.js +6 -6
- package/dist/node_modules/@ark-ui/react/dist/utils/use-controllable-state.js +8 -0
- package/dist/node_modules/@ark-ui/react/dist/utils/use-effect-once.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +7 -10
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +294 -289
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +195 -194
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -97
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +60 -62
- package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +18 -12
- package/dist/node_modules/@internationalized/date/dist/conversion.js +35 -35
- package/dist/node_modules/@internationalized/date/dist/queries.js +126 -75
- package/dist/node_modules/@internationalized/date/dist/string.js +29 -28
- package/dist/node_modules/@zag-js/accordion/dist/accordion.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +129 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.dom.js +30 -0
- package/dist/node_modules/@zag-js/accordion/dist/accordion.machine.js +137 -0
- package/dist/node_modules/@zag-js/aria-hidden/dist/aria-hidden.js +14 -0
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +12 -49
- package/dist/node_modules/@zag-js/aria-hidden/dist/walk-tree-outside.js +41 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.connect.js +52 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.dom.js +17 -0
- package/dist/node_modules/@zag-js/avatar/dist/avatar.machine.js +93 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.connect.js +108 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.dom.js +21 -0
- package/dist/node_modules/@zag-js/checkbox/dist/checkbox.machine.js +141 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.connect.js +80 -0
- package/dist/node_modules/@zag-js/collapsible/dist/collapsible.dom.js +16 -0
- package/dist/node_modules/@zag-js/collapsible/dist/{index.js → collapsible.machine.js} +58 -115
- package/dist/node_modules/@zag-js/collection/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/collection/dist/{index.js → list-collection.js} +58 -56
- package/dist/node_modules/@zag-js/collection/dist/selection-map.js +58 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.anatomy.js +21 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.collection.js +6 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +341 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.dom.js +68 -0
- package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +936 -0
- package/dist/node_modules/@zag-js/core/dist/create-machine.js +32 -0
- package/dist/node_modules/@zag-js/core/dist/memo.js +11 -0
- package/dist/node_modules/@zag-js/core/dist/merge-props.js +48 -0
- package/dist/node_modules/@zag-js/core/dist/scope.js +19 -0
- package/dist/node_modules/@zag-js/core/dist/state.js +143 -0
- package/dist/node_modules/@zag-js/core/dist/types.js +5 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.anatomy.js +31 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +742 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.dom.js +73 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +1042 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.parse.js +8 -0
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +155 -0
- package/dist/node_modules/@zag-js/date-utils/dist/align.js +15 -0
- package/dist/node_modules/@zag-js/date-utils/dist/assertion.js +26 -0
- package/dist/node_modules/@zag-js/date-utils/dist/constrain.js +40 -0
- package/dist/node_modules/@zag-js/date-utils/dist/date-month.js +74 -0
- package/dist/node_modules/@zag-js/date-utils/dist/date-year.js +37 -0
- package/dist/node_modules/@zag-js/date-utils/dist/duration.js +13 -0
- package/dist/node_modules/@zag-js/date-utils/dist/format.js +25 -0
- package/dist/node_modules/@zag-js/date-utils/dist/formatter.js +30 -0
- package/dist/node_modules/@zag-js/date-utils/dist/get-era-format.js +8 -0
- package/dist/node_modules/@zag-js/date-utils/dist/mutation.js +9 -0
- package/dist/node_modules/@zag-js/date-utils/dist/pagination.js +95 -0
- package/dist/node_modules/@zag-js/date-utils/dist/parse-date.js +34 -0
- package/dist/node_modules/@zag-js/date-utils/dist/preset.js +41 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.anatomy.js +14 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.connect.js +104 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +42 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +220 -0
- package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +80 -0
- package/dist/node_modules/@zag-js/dismissable/dist/escape-keydown.js +11 -0
- package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +103 -0
- package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +37 -0
- package/dist/node_modules/@zag-js/dom-query/dist/caret.js +12 -0
- package/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
- package/dist/node_modules/@zag-js/dom-query/dist/controller.js +76 -0
- package/dist/node_modules/@zag-js/dom-query/dist/event.js +80 -0
- package/dist/node_modules/@zag-js/dom-query/dist/form.js +70 -0
- package/dist/node_modules/@zag-js/dom-query/dist/initial-focus.js +22 -0
- package/dist/node_modules/@zag-js/dom-query/dist/mutation-observer.js +41 -0
- package/dist/node_modules/@zag-js/dom-query/dist/navigate.js +13 -0
- package/dist/node_modules/@zag-js/dom-query/dist/node.js +87 -0
- package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +27 -0
- package/dist/node_modules/@zag-js/dom-query/dist/platform.js +24 -0
- package/dist/node_modules/@zag-js/dom-query/dist/press.js +61 -0
- package/dist/node_modules/@zag-js/dom-query/dist/query.js +31 -0
- package/dist/node_modules/@zag-js/dom-query/dist/raf.js +51 -0
- package/dist/node_modules/@zag-js/dom-query/dist/resize-observer.js +34 -0
- package/dist/node_modules/@zag-js/dom-query/dist/searchable.js +17 -0
- package/dist/node_modules/@zag-js/dom-query/dist/set.js +29 -0
- package/dist/node_modules/@zag-js/dom-query/dist/shared.js +11 -0
- package/dist/node_modules/@zag-js/dom-query/dist/tabbable.js +110 -0
- package/dist/node_modules/@zag-js/dom-query/dist/text-selection.js +36 -0
- package/dist/node_modules/@zag-js/dom-query/dist/typeahead.js +25 -0
- package/dist/node_modules/@zag-js/dom-query/dist/visually-hidden.js +15 -0
- package/dist/node_modules/@zag-js/dom-query/dist/wait-for.js +42 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/focus-trap.js +335 -0
- package/dist/node_modules/@zag-js/focus-trap/dist/index.js +24 -299
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +63 -39
- package/dist/node_modules/@zag-js/interact-outside/dist/frame-utils.js +60 -0
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +97 -131
- package/dist/node_modules/@zag-js/menu/dist/menu.anatomy.js +21 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +385 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +93 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +855 -0
- package/dist/node_modules/@zag-js/menu/dist/menu.utils.js +51 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.anatomy.js +14 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.connect.js +145 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.dom.js +31 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.machine.js +132 -0
- package/dist/node_modules/@zag-js/pagination/dist/pagination.utils.js +39 -0
- package/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
- package/dist/node_modules/@zag-js/popper/dist/get-placement.js +190 -0
- package/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
- package/dist/node_modules/@zag-js/popper/dist/middleware.js +57 -0
- package/dist/node_modules/@zag-js/popper/dist/placement.js +11 -0
- package/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
- package/dist/node_modules/@zag-js/presence/dist/{index.js → presence.machine.js} +39 -47
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.anatomy.js +13 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.connect.js +197 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.dom.js +57 -0
- package/dist/node_modules/@zag-js/radio-group/dist/radio-group.machine.js +179 -0
- package/dist/node_modules/@zag-js/react/dist/bindable.js +52 -0
- package/dist/node_modules/@zag-js/react/dist/machine.js +208 -0
- package/dist/node_modules/@zag-js/react/dist/normalize-props.js +5 -0
- package/dist/node_modules/@zag-js/react/dist/refs.js +15 -0
- package/dist/node_modules/@zag-js/react/dist/track.js +13 -0
- package/dist/node_modules/@zag-js/react/dist/use-layout-effect.js +5 -0
- package/dist/node_modules/@zag-js/rect-utils/dist/polygon.js +23 -0
- package/dist/node_modules/@zag-js/rect-utils/dist/rect.js +26 -0
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +32 -23
- package/dist/node_modules/@zag-js/select/dist/select.anatomy.js +22 -0
- package/dist/node_modules/@zag-js/select/dist/select.collection.js +6 -0
- package/dist/node_modules/@zag-js/select/dist/select.connect.js +372 -0
- package/dist/node_modules/@zag-js/select/dist/select.dom.js +53 -0
- package/dist/node_modules/@zag-js/select/dist/select.machine.js +690 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.connect.js +110 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.dom.js +25 -0
- package/dist/node_modules/@zag-js/switch/dist/switch.machine.js +143 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.connect.js +176 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.dom.js +47 -0
- package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +268 -0
- package/dist/node_modules/@zag-js/toast/dist/index.js +6 -798
- package/dist/node_modules/@zag-js/toast/dist/toast-group.connect.js +54 -0
- package/dist/node_modules/@zag-js/toast/dist/toast-group.machine.js +236 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.anatomy.js +13 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.connect.js +102 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.dom.js +10 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.machine.js +234 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.store.js +134 -0
- package/dist/node_modules/@zag-js/toast/dist/toast.utils.js +122 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +120 -0
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +25 -0
- package/dist/node_modules/@zag-js/tooltip/dist/{index.js → tooltip.machine.js} +109 -188
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
- package/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
- package/dist/node_modules/@zag-js/utils/dist/array.js +39 -0
- package/dist/node_modules/@zag-js/utils/dist/chunk-MXGZDBDQ.js +8 -0
- package/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
- package/dist/node_modules/@zag-js/utils/dist/functions.js +28 -0
- package/dist/node_modules/@zag-js/utils/dist/guard.js +19 -0
- package/dist/node_modules/@zag-js/utils/dist/number.js +11 -0
- package/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
- package/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
- package/dist/node_modules/@zag-js/utils/dist/timers.js +39 -0
- package/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
- package/dist/styled-system/css/css.js +1 -1
- package/dist/styled-system/helpers.js +85 -83
- package/dist/styled-system/jsx/is-valid-prop.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +18 -21
- package/styled-system/css/css.js +1 -1
- package/styled-system/helpers.js +3 -0
- package/styled-system/jsx/is-valid-prop.js +1 -1
- package/styled-system/patterns/aspect-ratio.d.ts +0 -1
- package/styled-system/patterns/bleed.d.ts +0 -1
- package/styled-system/patterns/box.d.ts +0 -1
- package/styled-system/patterns/center.d.ts +0 -1
- package/styled-system/patterns/circle.d.ts +0 -1
- package/styled-system/patterns/container.d.ts +0 -1
- package/styled-system/patterns/cq.d.ts +0 -1
- package/styled-system/patterns/divider.d.ts +0 -1
- package/styled-system/patterns/flex.d.ts +0 -1
- package/styled-system/patterns/float.d.ts +0 -1
- package/styled-system/patterns/grid-item.d.ts +0 -1
- package/styled-system/patterns/grid.d.ts +0 -1
- package/styled-system/patterns/hstack.d.ts +0 -1
- package/styled-system/patterns/link-overlay.d.ts +0 -1
- package/styled-system/patterns/spacer.d.ts +0 -1
- package/styled-system/patterns/square.d.ts +0 -1
- package/styled-system/patterns/stack.d.ts +0 -1
- package/styled-system/patterns/visually-hidden.d.ts +0 -1
- package/styled-system/patterns/vstack.d.ts +0 -1
- package/styled-system/patterns/wrap.d.ts +0 -1
- package/styled-system/themes/theme-asagi.json +1 -1
- package/styled-system/themes/theme-konjo-dark.json +1 -1
- package/styled-system/themes/theme-kurikawa.json +1 -1
- package/styled-system/themes/theme-sumire.json +1 -1
- package/styled-system/themes/theme-tsutsuji.json +1 -1
- package/styled-system/tokens/tokens.d.ts +1 -1
- package/styled-system/types/conditions.d.ts +11 -11
- package/styled-system/types/prop-type.d.ts +2 -0
- package/styled-system/types/style-props.d.ts +3 -4
- package/dist/node_modules/@zag-js/accordion/dist/index.js +0 -290
- package/dist/node_modules/@zag-js/avatar/dist/index.js +0 -154
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +0 -270
- package/dist/node_modules/@zag-js/combobox/dist/index.js +0 -1415
- package/dist/node_modules/@zag-js/core/dist/index.js +0 -92
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +0 -1826
- package/dist/node_modules/@zag-js/date-utils/dist/index.js +0 -366
- package/dist/node_modules/@zag-js/dialog/dist/index.js +0 -324
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +0 -188
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +0 -633
- package/dist/node_modules/@zag-js/menu/dist/index.js +0 -1235
- package/dist/node_modules/@zag-js/pagination/dist/index.js +0 -273
- package/dist/node_modules/@zag-js/popper/dist/index.js +0 -260
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +0 -407
- package/dist/node_modules/@zag-js/react/dist/index.js +0 -269
- package/dist/node_modules/@zag-js/rect-utils/dist/index.js +0 -46
- package/dist/node_modules/@zag-js/select/dist/index.js +0 -1088
- package/dist/node_modules/@zag-js/switch/dist/index.js +0 -275
- package/dist/node_modules/@zag-js/tabs/dist/index.js +0 -475
- package/dist/node_modules/@zag-js/types/dist/index.js +0 -12
- package/dist/node_modules/@zag-js/utils/dist/index.js +0 -173
- /package/dist/node_modules/@zag-js/anatomy/dist/{index.js → create-anatomy.js} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var a = (r) => ({ variable: r, reference: `var(${r})` }), y = {
|
|
2
|
+
arrowSize: a("--arrow-size"),
|
|
3
|
+
arrowSizeHalf: a("--arrow-size-half"),
|
|
4
|
+
arrowBg: a("--arrow-background"),
|
|
5
|
+
transformOrigin: a("--transform-origin"),
|
|
6
|
+
arrowOffset: a("--arrow-offset")
|
|
7
|
+
}, Y = (r) => r === "top" || r === "bottom" ? "y" : "x";
|
|
8
|
+
function j(r, t) {
|
|
9
|
+
return {
|
|
10
|
+
name: "transformOrigin",
|
|
11
|
+
fn(o) {
|
|
12
|
+
var O, $, w, v;
|
|
13
|
+
const { elements: s, middlewareData: e, placement: i, rects: p, y: b } = o, g = i.split("-")[0], A = Y(g), z = ((O = e.arrow) == null ? void 0 : O.x) || 0, H = (($ = e.arrow) == null ? void 0 : $.y) || 0, M = (t == null ? void 0 : t.clientWidth) || 0, l = (t == null ? void 0 : t.clientHeight) || 0, c = z + M / 2, m = H + l / 2, S = Math.abs(((w = e.shift) == null ? void 0 : w.y) || 0), T = p.reference.height / 2, x = l / 2, f = ((v = r.offset) == null ? void 0 : v.mainAxis) ?? r.gutter, n = typeof f == "number" ? f + x : f ?? x, V = S > n, h = {
|
|
14
|
+
top: `${c}px calc(100% + ${n}px)`,
|
|
15
|
+
bottom: `${c}px ${-n}px`,
|
|
16
|
+
left: `calc(100% + ${n}px) ${m}px`,
|
|
17
|
+
right: `${-n}px ${m}px`
|
|
18
|
+
}[g], d = `${c}px ${p.reference.y + T - b}px`, u = !!r.overlap && A === "y" && V;
|
|
19
|
+
return s.floating.style.setProperty(
|
|
20
|
+
y.transformOrigin.variable,
|
|
21
|
+
u ? d : h
|
|
22
|
+
), {
|
|
23
|
+
data: {
|
|
24
|
+
transformOrigin: u ? d : h
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var B = {
|
|
31
|
+
name: "rects",
|
|
32
|
+
fn({ rects: r }) {
|
|
33
|
+
return {
|
|
34
|
+
data: r
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}, W = (r) => {
|
|
38
|
+
if (r)
|
|
39
|
+
return {
|
|
40
|
+
name: "shiftArrow",
|
|
41
|
+
fn({ placement: t, middlewareData: o }) {
|
|
42
|
+
if (!o.arrow) return {};
|
|
43
|
+
const { x: s, y: e } = o.arrow, i = t.split("-")[0];
|
|
44
|
+
return Object.assign(r.style, {
|
|
45
|
+
left: s != null ? `${s}px` : "",
|
|
46
|
+
top: e != null ? `${e}px` : "",
|
|
47
|
+
[i]: `calc(100% + ${y.arrowOffset.reference})`
|
|
48
|
+
}), {};
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
j as createTransformOriginMiddleware,
|
|
54
|
+
y as cssVars,
|
|
55
|
+
B as rectMiddleware,
|
|
56
|
+
W as shiftArrowMiddleware
|
|
57
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function i(n, c) {
|
|
2
|
+
const { state: o, send: t, context: s } = n, u = o.matches("mounted", "unmountSuspended");
|
|
3
|
+
return {
|
|
4
|
+
skip: !s.get("initial"),
|
|
5
|
+
present: u,
|
|
6
|
+
setNode(e) {
|
|
7
|
+
e && t({ type: "NODE.SET", node: e });
|
|
8
|
+
},
|
|
9
|
+
unmount() {
|
|
10
|
+
t({ type: "UNMOUNT" });
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as connect
|
|
16
|
+
};
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
present: a,
|
|
9
|
-
setNode(r) {
|
|
10
|
-
r && n({ type: "NODE.SET", node: r });
|
|
11
|
-
},
|
|
12
|
-
unmount() {
|
|
13
|
-
n({ type: "UNMOUNT" });
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
var O = v({
|
|
1
|
+
import { createMachine as E } from "../../core/dist/create-machine.js";
|
|
2
|
+
import { setStyle as v } from "../../dom-query/dist/set.js";
|
|
3
|
+
import { nextTick as f, raf as p } from "../../dom-query/dist/raf.js";
|
|
4
|
+
import { getComputedStyle as y } from "../../dom-query/dist/computed-style.js";
|
|
5
|
+
import { getWindow as U } from "../../dom-query/dist/node.js";
|
|
6
|
+
import { getEventTarget as g } from "../../dom-query/dist/event.js";
|
|
7
|
+
var C = E({
|
|
18
8
|
props({ props: e }) {
|
|
19
9
|
return { ...e, present: !!e.present };
|
|
20
10
|
},
|
|
@@ -38,7 +28,7 @@ var O = v({
|
|
|
38
28
|
}))
|
|
39
29
|
};
|
|
40
30
|
},
|
|
41
|
-
exit: ["
|
|
31
|
+
exit: ["cleanupNode"],
|
|
42
32
|
watch({ track: e, prop: t, send: i }) {
|
|
43
33
|
e([() => t("present")], () => {
|
|
44
34
|
i({ type: "PRESENCE.CHANGED" });
|
|
@@ -93,35 +83,37 @@ var O = v({
|
|
|
93
83
|
e.set("initial", !0);
|
|
94
84
|
});
|
|
95
85
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
(
|
|
86
|
+
invokeOnExitComplete: ({ prop: e, refs: t }) => {
|
|
87
|
+
var a;
|
|
88
|
+
(a = e("onExitComplete")) == null || a();
|
|
89
|
+
const i = t.get("node");
|
|
90
|
+
if (!i) return;
|
|
91
|
+
const r = U(i), n = new r.CustomEvent("exitcomplete", { bubbles: !1 });
|
|
92
|
+
i.dispatchEvent(n);
|
|
102
93
|
},
|
|
103
94
|
setupNode: ({ refs: e, event: t }) => {
|
|
104
|
-
e.get("node") !== t.node && (e.set("node", t.node), e.set("styles",
|
|
95
|
+
e.get("node") !== t.node && (e.set("node", t.node), e.set("styles", y(t.node)));
|
|
105
96
|
},
|
|
106
97
|
cleanupNode: ({ refs: e }) => {
|
|
107
98
|
e.set("node", null), e.set("styles", null);
|
|
108
99
|
},
|
|
109
|
-
syncPresence: ({ context: e, refs: t, send: i, prop:
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
100
|
+
syncPresence: ({ context: e, refs: t, send: i, prop: r }) => {
|
|
101
|
+
const n = r("present");
|
|
102
|
+
if (n)
|
|
112
103
|
return i({ type: "MOUNT", src: "presence.changed" });
|
|
113
104
|
const a = t.get("node");
|
|
114
|
-
if (!
|
|
105
|
+
if (!n && (a == null ? void 0 : a.ownerDocument.visibilityState) === "hidden")
|
|
115
106
|
return i({ type: "UNMOUNT", src: "visibilitychange" });
|
|
116
107
|
p(() => {
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
var m, u;
|
|
109
|
+
if (r("present")) return;
|
|
110
|
+
const s = c(t.get("styles"));
|
|
111
|
+
e.set("unmountAnimationName", s), s === "none" || s === e.get("prevAnimationName") || ((m = t.get("styles")) == null ? void 0 : m.display) === "none" || ((u = t.get("styles")) == null ? void 0 : u.animationDuration) === "0s" ? i({ type: "UNMOUNT", src: "presence.changed" }) : i({ type: "UNMOUNT.SUSPEND" });
|
|
120
112
|
});
|
|
121
113
|
},
|
|
122
114
|
setPrevAnimationName: ({ context: e, refs: t }) => {
|
|
123
115
|
p(() => {
|
|
124
|
-
e.set("prevAnimationName",
|
|
116
|
+
e.set("prevAnimationName", c(t.get("styles")));
|
|
125
117
|
});
|
|
126
118
|
},
|
|
127
119
|
clearPrevAnimationName: ({ context: e }) => {
|
|
@@ -129,30 +121,30 @@ var O = v({
|
|
|
129
121
|
}
|
|
130
122
|
},
|
|
131
123
|
effects: {
|
|
132
|
-
trackAnimationEvents: ({ context: e, refs: t, send: i }) => {
|
|
124
|
+
trackAnimationEvents: ({ context: e, refs: t, send: i, prop: r }) => {
|
|
133
125
|
const n = t.get("node");
|
|
134
126
|
if (!n) return;
|
|
135
|
-
const
|
|
136
|
-
var
|
|
137
|
-
(((
|
|
138
|
-
},
|
|
139
|
-
const
|
|
140
|
-
|
|
127
|
+
const a = (o) => {
|
|
128
|
+
var N, d;
|
|
129
|
+
(((d = (N = o.composedPath) == null ? void 0 : N.call(o)) == null ? void 0 : d[0]) ?? o.target) === n && e.set("prevAnimationName", c(t.get("styles")));
|
|
130
|
+
}, s = (o) => {
|
|
131
|
+
const l = c(t.get("styles"));
|
|
132
|
+
g(o) === n && l === e.get("unmountAnimationName") && !r("present") && i({ type: "UNMOUNT", src: "animationend" });
|
|
133
|
+
}, m = (o) => {
|
|
134
|
+
g(o) === n && !r("present") && i({ type: "UNMOUNT", src: "animationcancel" });
|
|
141
135
|
};
|
|
142
|
-
n.addEventListener("animationstart",
|
|
143
|
-
const
|
|
136
|
+
n.addEventListener("animationstart", a), n.addEventListener("animationcancel", m), n.addEventListener("animationend", s);
|
|
137
|
+
const u = v(n, { animationFillMode: "forwards" });
|
|
144
138
|
return () => {
|
|
145
|
-
n.removeEventListener("animationstart",
|
|
139
|
+
n.removeEventListener("animationstart", a), n.removeEventListener("animationcancel", m), n.removeEventListener("animationend", s), f(() => u());
|
|
146
140
|
};
|
|
147
141
|
}
|
|
148
142
|
}
|
|
149
143
|
}
|
|
150
144
|
});
|
|
151
|
-
function
|
|
145
|
+
function c(e) {
|
|
152
146
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
153
147
|
}
|
|
154
|
-
y()(["onExitComplete", "present", "immediate"]);
|
|
155
148
|
export {
|
|
156
|
-
|
|
157
|
-
O as machine
|
|
149
|
+
C as machine
|
|
158
150
|
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { getEventTarget as V, isLeftClick as p } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { isSafari as C } from "../../dom-query/dist/platform.js";
|
|
3
|
+
import { dataAttr as r } from "../../dom-query/dist/shared.js";
|
|
4
|
+
import { visuallyHiddenStyle as P } from "../../dom-query/dist/visually-hidden.js";
|
|
5
|
+
import { isFocusVisible as k } from "../../focus-visible/dist/index.js";
|
|
6
|
+
import { parts as s } from "./radio-group.anatomy.js";
|
|
7
|
+
import { getIndicatorId as D, getItemLabelId as I, getItemHiddenInputId as E, getRootId as h, getItemControlId as _, getItemHiddenInputEl as A, getItemId as q, getLabelId as T, getFirstEnabledAndCheckedInputEl as w, getFirstEnabledInputEl as L } from "./radio-group.dom.js";
|
|
8
|
+
import { toPx as m } from "../../utils/dist/number.js";
|
|
9
|
+
function M(l, u) {
|
|
10
|
+
const { context: o, send: d, computed: S, prop: i, scope: n } = l, v = S("isDisabled"), g = i("invalid"), f = i("readOnly");
|
|
11
|
+
function c(e) {
|
|
12
|
+
return {
|
|
13
|
+
value: e.value,
|
|
14
|
+
invalid: !!e.invalid || !!g,
|
|
15
|
+
disabled: !!e.disabled || v,
|
|
16
|
+
checked: o.get("value") === e.value,
|
|
17
|
+
focused: o.get("focusedValue") === e.value,
|
|
18
|
+
focusVisible: o.get("focusVisibleValue") === e.value,
|
|
19
|
+
hovered: o.get("hoveredValue") === e.value,
|
|
20
|
+
active: o.get("activeValue") === e.value
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function b(e) {
|
|
24
|
+
const t = c(e);
|
|
25
|
+
return {
|
|
26
|
+
"data-focus": r(t.focused),
|
|
27
|
+
"data-focus-visible": r(t.focusVisible),
|
|
28
|
+
"data-disabled": r(t.disabled),
|
|
29
|
+
"data-readonly": r(f),
|
|
30
|
+
"data-state": t.checked ? "checked" : "unchecked",
|
|
31
|
+
"data-hover": r(t.hovered),
|
|
32
|
+
"data-invalid": r(t.invalid),
|
|
33
|
+
"data-orientation": i("orientation"),
|
|
34
|
+
"data-ssr": r(o.get("ssr"))
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const y = () => {
|
|
38
|
+
const e = w(n) ?? L(n);
|
|
39
|
+
e == null || e.focus();
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
focus: y,
|
|
43
|
+
value: o.get("value"),
|
|
44
|
+
setValue(e) {
|
|
45
|
+
d({ type: "SET_VALUE", value: e, isTrusted: !1 });
|
|
46
|
+
},
|
|
47
|
+
clearValue() {
|
|
48
|
+
d({ type: "SET_VALUE", value: null, isTrusted: !1 });
|
|
49
|
+
},
|
|
50
|
+
getRootProps() {
|
|
51
|
+
return u.element({
|
|
52
|
+
...s.root.attrs,
|
|
53
|
+
role: "radiogroup",
|
|
54
|
+
id: h(n),
|
|
55
|
+
"aria-labelledby": T(n),
|
|
56
|
+
"aria-required": i("required") || void 0,
|
|
57
|
+
"aria-disabled": v || void 0,
|
|
58
|
+
"aria-readonly": f || void 0,
|
|
59
|
+
"data-orientation": i("orientation"),
|
|
60
|
+
"data-disabled": r(v),
|
|
61
|
+
"data-invalid": r(g),
|
|
62
|
+
"data-required": r(i("required")),
|
|
63
|
+
"aria-orientation": i("orientation"),
|
|
64
|
+
dir: i("dir"),
|
|
65
|
+
style: {
|
|
66
|
+
position: "relative"
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
getLabelProps() {
|
|
71
|
+
return u.element({
|
|
72
|
+
...s.label.attrs,
|
|
73
|
+
dir: i("dir"),
|
|
74
|
+
"data-orientation": i("orientation"),
|
|
75
|
+
"data-disabled": r(v),
|
|
76
|
+
"data-invalid": r(g),
|
|
77
|
+
"data-required": r(i("required")),
|
|
78
|
+
id: T(n),
|
|
79
|
+
onClick: y
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
getItemState: c,
|
|
83
|
+
getItemProps(e) {
|
|
84
|
+
const t = c(e);
|
|
85
|
+
return u.label({
|
|
86
|
+
...s.item.attrs,
|
|
87
|
+
dir: i("dir"),
|
|
88
|
+
id: q(n, e.value),
|
|
89
|
+
htmlFor: E(n, e.value),
|
|
90
|
+
...b(e),
|
|
91
|
+
onPointerMove() {
|
|
92
|
+
t.disabled || t.hovered || d({ type: "SET_HOVERED", value: e.value, hovered: !0 });
|
|
93
|
+
},
|
|
94
|
+
onPointerLeave() {
|
|
95
|
+
t.disabled || d({ type: "SET_HOVERED", value: null });
|
|
96
|
+
},
|
|
97
|
+
onPointerDown(a) {
|
|
98
|
+
t.disabled || p(a) && (t.focused && a.pointerType === "mouse" && a.preventDefault(), d({ type: "SET_ACTIVE", value: e.value, active: !0 }));
|
|
99
|
+
},
|
|
100
|
+
onPointerUp() {
|
|
101
|
+
t.disabled || d({ type: "SET_ACTIVE", value: null });
|
|
102
|
+
},
|
|
103
|
+
onClick() {
|
|
104
|
+
var a;
|
|
105
|
+
!t.disabled && C() && ((a = A(n, e.value)) == null || a.focus());
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
getItemTextProps(e) {
|
|
110
|
+
return u.element({
|
|
111
|
+
...s.itemText.attrs,
|
|
112
|
+
dir: i("dir"),
|
|
113
|
+
id: I(n, e.value),
|
|
114
|
+
...b(e)
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
getItemControlProps(e) {
|
|
118
|
+
const t = c(e);
|
|
119
|
+
return u.element({
|
|
120
|
+
...s.itemControl.attrs,
|
|
121
|
+
dir: i("dir"),
|
|
122
|
+
id: _(n, e.value),
|
|
123
|
+
"data-active": r(t.active),
|
|
124
|
+
"aria-hidden": !0,
|
|
125
|
+
...b(e)
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
getItemHiddenInputProps(e) {
|
|
129
|
+
const t = c(e);
|
|
130
|
+
return u.input({
|
|
131
|
+
"data-ownedby": h(n),
|
|
132
|
+
id: E(n, e.value),
|
|
133
|
+
type: "radio",
|
|
134
|
+
name: i("name") || i("id"),
|
|
135
|
+
form: i("form"),
|
|
136
|
+
value: e.value,
|
|
137
|
+
required: i("required"),
|
|
138
|
+
"aria-labelledby": I(n, e.value),
|
|
139
|
+
"aria-invalid": t.invalid || void 0,
|
|
140
|
+
onClick(a) {
|
|
141
|
+
if (f) {
|
|
142
|
+
a.preventDefault();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
a.currentTarget.checked && d({ type: "SET_VALUE", value: e.value, isTrusted: !0 });
|
|
146
|
+
},
|
|
147
|
+
onBlur() {
|
|
148
|
+
d({ type: "SET_FOCUSED", value: null, focused: !1, focusVisible: !1 });
|
|
149
|
+
},
|
|
150
|
+
onFocus() {
|
|
151
|
+
const a = k();
|
|
152
|
+
d({ type: "SET_FOCUSED", value: e.value, focused: !0, focusVisible: a });
|
|
153
|
+
},
|
|
154
|
+
onKeyDown(a) {
|
|
155
|
+
a.defaultPrevented || a.key === " " && d({ type: "SET_ACTIVE", value: e.value, active: !0 });
|
|
156
|
+
},
|
|
157
|
+
onKeyUp(a) {
|
|
158
|
+
a.defaultPrevented || a.key === " " && d({ type: "SET_ACTIVE", value: null });
|
|
159
|
+
},
|
|
160
|
+
disabled: t.disabled || f,
|
|
161
|
+
defaultChecked: t.checked,
|
|
162
|
+
style: P
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
getIndicatorProps() {
|
|
166
|
+
const e = o.get("indicatorRect"), t = o.get("animateIndicator");
|
|
167
|
+
return u.element({
|
|
168
|
+
id: D(n),
|
|
169
|
+
...s.indicator.attrs,
|
|
170
|
+
dir: i("dir"),
|
|
171
|
+
hidden: o.get("value") == null || O(e),
|
|
172
|
+
"data-disabled": r(v),
|
|
173
|
+
"data-orientation": i("orientation"),
|
|
174
|
+
onTransitionEnd(a) {
|
|
175
|
+
V(a) === a.currentTarget && d({ type: "INDICATOR_TRANSITION_END" });
|
|
176
|
+
},
|
|
177
|
+
style: {
|
|
178
|
+
"--transition-property": "left, top, width, height",
|
|
179
|
+
"--left": m(e == null ? void 0 : e.x),
|
|
180
|
+
"--top": m(e == null ? void 0 : e.y),
|
|
181
|
+
"--width": m(e == null ? void 0 : e.width),
|
|
182
|
+
"--height": m(e == null ? void 0 : e.height),
|
|
183
|
+
position: "absolute",
|
|
184
|
+
willChange: t ? "var(--transition-property)" : "auto",
|
|
185
|
+
transitionProperty: t ? "var(--transition-property)" : "none",
|
|
186
|
+
transitionDuration: t ? "var(--transition-duration, 150ms)" : "0ms",
|
|
187
|
+
transitionTimingFunction: "var(--transition-timing-function)",
|
|
188
|
+
[i("orientation") === "horizontal" ? "left" : "top"]: i("orientation") === "horizontal" ? "var(--left)" : "var(--top)"
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
var O = (l) => l == null || l.width === 0 && l.height === 0 && l.x === 0 && l.y === 0;
|
|
195
|
+
export {
|
|
196
|
+
M as connect
|
|
197
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { queryAll as a } from "../../dom-query/dist/query.js";
|
|
2
|
+
var e = (d) => {
|
|
3
|
+
var t;
|
|
4
|
+
return ((t = d.ids) == null ? void 0 : t.root) ?? `radio-group:${d.id}`;
|
|
5
|
+
}, s = (d) => {
|
|
6
|
+
var t;
|
|
7
|
+
return ((t = d.ids) == null ? void 0 : t.label) ?? `radio-group:${d.id}:label`;
|
|
8
|
+
}, n = (d, t) => {
|
|
9
|
+
var r, i;
|
|
10
|
+
return ((i = (r = d.ids) == null ? void 0 : r.item) == null ? void 0 : i.call(r, t)) ?? `radio-group:${d.id}:radio:${t}`;
|
|
11
|
+
}, g = (d, t) => {
|
|
12
|
+
var r, i;
|
|
13
|
+
return ((i = (r = d.ids) == null ? void 0 : r.itemHiddenInput) == null ? void 0 : i.call(r, t)) ?? `radio-group:${d.id}:radio:input:${t}`;
|
|
14
|
+
}, u = (d, t) => {
|
|
15
|
+
var r, i;
|
|
16
|
+
return ((i = (r = d.ids) == null ? void 0 : r.itemControl) == null ? void 0 : i.call(r, t)) ?? `radio-group:${d.id}:radio:control:${t}`;
|
|
17
|
+
}, f = (d, t) => {
|
|
18
|
+
var r, i;
|
|
19
|
+
return ((i = (r = d.ids) == null ? void 0 : r.itemLabel) == null ? void 0 : i.call(r, t)) ?? `radio-group:${d.id}:radio:label:${t}`;
|
|
20
|
+
}, I = (d) => {
|
|
21
|
+
var t;
|
|
22
|
+
return ((t = d.ids) == null ? void 0 : t.indicator) ?? `radio-group:${d.id}:indicator`;
|
|
23
|
+
}, o = (d) => d.getById(e(d)), b = (d, t) => d.getById(g(d, t)), $ = (d) => d.getById(I(d)), m = (d) => {
|
|
24
|
+
var t;
|
|
25
|
+
return (t = o(d)) == null ? void 0 : t.querySelector("input:not(:disabled)");
|
|
26
|
+
}, v = (d) => {
|
|
27
|
+
var t;
|
|
28
|
+
return (t = o(d)) == null ? void 0 : t.querySelector("input:not(:disabled):checked");
|
|
29
|
+
}, y = (d) => {
|
|
30
|
+
const r = `input[type=radio][data-ownedby='${CSS.escape(e(d))}']:not([disabled])`;
|
|
31
|
+
return a(o(d), r);
|
|
32
|
+
}, E = (d, t) => {
|
|
33
|
+
if (t)
|
|
34
|
+
return d.getById(n(d, t));
|
|
35
|
+
}, h = (d) => ({
|
|
36
|
+
x: (d == null ? void 0 : d.offsetLeft) ?? 0,
|
|
37
|
+
y: (d == null ? void 0 : d.offsetTop) ?? 0,
|
|
38
|
+
width: (d == null ? void 0 : d.offsetWidth) ?? 0,
|
|
39
|
+
height: (d == null ? void 0 : d.offsetHeight) ?? 0
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
v as getFirstEnabledAndCheckedInputEl,
|
|
43
|
+
m as getFirstEnabledInputEl,
|
|
44
|
+
$ as getIndicatorEl,
|
|
45
|
+
I as getIndicatorId,
|
|
46
|
+
y as getInputEls,
|
|
47
|
+
u as getItemControlId,
|
|
48
|
+
b as getItemHiddenInputEl,
|
|
49
|
+
g as getItemHiddenInputId,
|
|
50
|
+
n as getItemId,
|
|
51
|
+
f as getItemLabelId,
|
|
52
|
+
s as getLabelId,
|
|
53
|
+
h as getOffsetRect,
|
|
54
|
+
E as getRadioEl,
|
|
55
|
+
o as getRootEl,
|
|
56
|
+
e as getRootId
|
|
57
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { trackFocusVisible as c } from "../../focus-visible/dist/index.js";
|
|
2
|
+
import { getInputEls as r, getIndicatorEl as o, getRadioEl as d, getRootEl as v, getOffsetRect as V } from "./radio-group.dom.js";
|
|
3
|
+
import { createMachine as f, createGuards as m } from "../../core/dist/create-machine.js";
|
|
4
|
+
import { dispatchInputCheckedEvent as g, trackFormControl as E } from "../../dom-query/dist/form.js";
|
|
5
|
+
import { resizeObserverBorderBox as p } from "../../dom-query/dist/resize-observer.js";
|
|
6
|
+
var { not: I } = m(), S = f({
|
|
7
|
+
props({ props: e }) {
|
|
8
|
+
return {
|
|
9
|
+
orientation: "vertical",
|
|
10
|
+
...e
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
initialState() {
|
|
14
|
+
return "idle";
|
|
15
|
+
},
|
|
16
|
+
context({ prop: e, bindable: t }) {
|
|
17
|
+
return {
|
|
18
|
+
value: t(() => ({
|
|
19
|
+
defaultValue: e("defaultValue"),
|
|
20
|
+
value: e("value"),
|
|
21
|
+
onChange(l) {
|
|
22
|
+
var a;
|
|
23
|
+
(a = e("onValueChange")) == null || a({ value: l });
|
|
24
|
+
}
|
|
25
|
+
})),
|
|
26
|
+
activeValue: t(() => ({
|
|
27
|
+
defaultValue: null
|
|
28
|
+
})),
|
|
29
|
+
focusedValue: t(() => ({
|
|
30
|
+
defaultValue: null
|
|
31
|
+
})),
|
|
32
|
+
focusVisibleValue: t(() => ({
|
|
33
|
+
defaultValue: null
|
|
34
|
+
})),
|
|
35
|
+
hoveredValue: t(() => ({
|
|
36
|
+
defaultValue: null
|
|
37
|
+
})),
|
|
38
|
+
indicatorRect: t(() => ({
|
|
39
|
+
defaultValue: null
|
|
40
|
+
})),
|
|
41
|
+
animateIndicator: t(() => ({
|
|
42
|
+
defaultValue: !1
|
|
43
|
+
})),
|
|
44
|
+
fieldsetDisabled: t(() => ({
|
|
45
|
+
defaultValue: !1
|
|
46
|
+
})),
|
|
47
|
+
ssr: t(() => ({
|
|
48
|
+
defaultValue: !0
|
|
49
|
+
}))
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
refs() {
|
|
53
|
+
return {
|
|
54
|
+
indicatorCleanup: null,
|
|
55
|
+
focusVisibleValue: null,
|
|
56
|
+
prevValue: null
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
isDisabled: ({ prop: e, context: t }) => !!e("disabled") || t.get("fieldsetDisabled")
|
|
61
|
+
},
|
|
62
|
+
entry: ["syncPrevValue", "syncIndicatorRect", "syncSsr"],
|
|
63
|
+
exit: ["cleanupObserver"],
|
|
64
|
+
effects: ["trackFormControlState", "trackFocusVisible"],
|
|
65
|
+
watch({ track: e, action: t, context: l }) {
|
|
66
|
+
e([() => l.get("value")], () => {
|
|
67
|
+
t(["syncIndicatorAnimation", "syncIndicatorRect", "syncInputElements"]);
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
on: {
|
|
71
|
+
SET_VALUE: [
|
|
72
|
+
{
|
|
73
|
+
guard: I("isTrusted"),
|
|
74
|
+
actions: ["setValue", "dispatchChangeEvent"]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
actions: ["setValue"]
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
SET_HOVERED: {
|
|
81
|
+
actions: ["setHovered"]
|
|
82
|
+
},
|
|
83
|
+
SET_ACTIVE: {
|
|
84
|
+
actions: ["setActive"]
|
|
85
|
+
},
|
|
86
|
+
SET_FOCUSED: {
|
|
87
|
+
actions: ["setFocused"]
|
|
88
|
+
},
|
|
89
|
+
INDICATOR_TRANSITION_END: {
|
|
90
|
+
actions: ["clearIndicatorAnimation"]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
states: {
|
|
94
|
+
idle: {}
|
|
95
|
+
},
|
|
96
|
+
implementations: {
|
|
97
|
+
guards: {
|
|
98
|
+
isTrusted: ({ event: e }) => !!e.isTrusted
|
|
99
|
+
},
|
|
100
|
+
effects: {
|
|
101
|
+
trackFormControlState({ context: e, scope: t }) {
|
|
102
|
+
return E(v(t), {
|
|
103
|
+
onFieldsetDisabledChange(l) {
|
|
104
|
+
e.set("fieldsetDisabled", l);
|
|
105
|
+
},
|
|
106
|
+
onFormReset() {
|
|
107
|
+
e.set("value", e.initial("value"));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
trackFocusVisible({ scope: e }) {
|
|
112
|
+
var t;
|
|
113
|
+
return c({ root: (t = e.getRootNode) == null ? void 0 : t.call(e) });
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
actions: {
|
|
117
|
+
setValue({ context: e, event: t }) {
|
|
118
|
+
e.set("value", t.value);
|
|
119
|
+
},
|
|
120
|
+
setHovered({ context: e, event: t }) {
|
|
121
|
+
e.set("hoveredValue", t.value);
|
|
122
|
+
},
|
|
123
|
+
setActive({ context: e, event: t }) {
|
|
124
|
+
e.set("activeValue", t.value);
|
|
125
|
+
},
|
|
126
|
+
setFocused({ context: e, event: t }) {
|
|
127
|
+
e.set("focusedValue", t.value);
|
|
128
|
+
const l = t.value != null && t.focusVisible ? t.value : null;
|
|
129
|
+
e.set("focusVisibleValue", l);
|
|
130
|
+
},
|
|
131
|
+
syncPrevValue({ context: e, refs: t }) {
|
|
132
|
+
t.set("prevValue", e.get("value"));
|
|
133
|
+
},
|
|
134
|
+
syncIndicatorAnimation({ context: e, refs: t }) {
|
|
135
|
+
const l = t.get("prevValue"), a = e.get("value"), s = l != null && a != null && l !== a;
|
|
136
|
+
e.set("animateIndicator", s), t.set("prevValue", a);
|
|
137
|
+
},
|
|
138
|
+
clearIndicatorAnimation({ context: e }) {
|
|
139
|
+
e.set("animateIndicator", !1);
|
|
140
|
+
},
|
|
141
|
+
syncInputElements({ context: e, scope: t }) {
|
|
142
|
+
r(t).forEach((a) => {
|
|
143
|
+
a.checked = a.value === e.get("value");
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
cleanupObserver({ refs: e }) {
|
|
147
|
+
var t;
|
|
148
|
+
(t = e.get("indicatorCleanup")) == null || t();
|
|
149
|
+
},
|
|
150
|
+
syncSsr({ context: e }) {
|
|
151
|
+
e.set("ssr", !1);
|
|
152
|
+
},
|
|
153
|
+
syncIndicatorRect({ context: e, scope: t, refs: l }) {
|
|
154
|
+
var n;
|
|
155
|
+
if ((n = l.get("indicatorCleanup")) == null || n(), !o(t)) return;
|
|
156
|
+
const a = e.get("value"), s = d(t, a);
|
|
157
|
+
if (a == null || !s) {
|
|
158
|
+
e.set("indicatorRect", null);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const u = () => {
|
|
162
|
+
e.set("indicatorRect", V(s));
|
|
163
|
+
};
|
|
164
|
+
u();
|
|
165
|
+
const i = p.observe(s, u);
|
|
166
|
+
l.set("indicatorCleanup", i);
|
|
167
|
+
},
|
|
168
|
+
dispatchChangeEvent({ context: e, scope: t }) {
|
|
169
|
+
r(t).forEach((a) => {
|
|
170
|
+
const s = a.value === e.get("value");
|
|
171
|
+
s !== a.checked && g(a, { checked: s });
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
export {
|
|
178
|
+
S as machine
|
|
179
|
+
};
|