@proyecto-viviana/solidaria 0.4.3 → 0.6.0-rc.0
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/LICENSE-APACHE-2.0 +201 -0
- package/NOTICE +91 -0
- package/dist/_chunk/DragManager.js +71 -25
- package/dist/_chunk/DragManager.js.map +1 -1
- package/dist/_chunk/DragManager.jsx +71 -25
- package/dist/_chunk/DragManager.jsx.map +1 -1
- package/dist/_chunk/FocusScope.js +281 -66
- package/dist/_chunk/FocusScope.js.map +1 -1
- package/dist/_chunk/FocusScope.jsx +274 -55
- package/dist/_chunk/FocusScope.jsx.map +1 -1
- package/dist/_chunk/actiongroup.js +43 -19
- package/dist/_chunk/actiongroup.js.map +1 -1
- package/dist/_chunk/actiongroup.jsx +43 -19
- package/dist/_chunk/actiongroup.jsx.map +1 -1
- package/dist/_chunk/announce.js +19 -6
- package/dist/_chunk/announce.js.map +1 -1
- package/dist/_chunk/announce.jsx +19 -6
- package/dist/_chunk/announce.jsx.map +1 -1
- package/dist/_chunk/ariaHideOutside.js +212 -10
- package/dist/_chunk/ariaHideOutside.js.map +1 -1
- package/dist/_chunk/ariaHideOutside.jsx +212 -10
- package/dist/_chunk/ariaHideOutside.jsx.map +1 -1
- package/dist/_chunk/autocomplete.js +26 -7
- package/dist/_chunk/autocomplete.js.map +1 -1
- package/dist/_chunk/autocomplete.jsx +26 -7
- package/dist/_chunk/autocomplete.jsx.map +1 -1
- package/dist/_chunk/breadcrumbs.js +17 -2
- package/dist/_chunk/breadcrumbs.js.map +1 -1
- package/dist/_chunk/breadcrumbs.jsx +17 -2
- package/dist/_chunk/breadcrumbs.jsx.map +1 -1
- package/dist/_chunk/button.js +53 -20
- package/dist/_chunk/button.js.map +1 -1
- package/dist/_chunk/button.jsx +53 -20
- package/dist/_chunk/button.jsx.map +1 -1
- package/dist/_chunk/calendar.js +341 -56
- package/dist/_chunk/calendar.js.map +1 -1
- package/dist/_chunk/calendar.jsx +341 -56
- package/dist/_chunk/calendar.jsx.map +1 -1
- package/dist/_chunk/checkbox.js +69 -26
- package/dist/_chunk/checkbox.js.map +1 -1
- package/dist/_chunk/checkbox.jsx +69 -26
- package/dist/_chunk/checkbox.jsx.map +1 -1
- package/dist/_chunk/color.js +307 -48
- package/dist/_chunk/color.js.map +1 -1
- package/dist/_chunk/color.jsx +307 -48
- package/dist/_chunk/color.jsx.map +1 -1
- package/dist/_chunk/combobox.js +193 -103
- package/dist/_chunk/combobox.js.map +1 -1
- package/dist/_chunk/combobox.jsx +193 -103
- package/dist/_chunk/combobox.jsx.map +1 -1
- package/dist/_chunk/constants.js +12 -0
- package/dist/_chunk/constants.js.map +1 -1
- package/dist/_chunk/constants.jsx +12 -0
- package/dist/_chunk/constants.jsx.map +1 -1
- package/dist/_chunk/createCollator.js +12 -0
- package/dist/_chunk/createCollator.js.map +1 -1
- package/dist/_chunk/createCollator.jsx +12 -0
- package/dist/_chunk/createCollator.jsx.map +1 -1
- package/dist/_chunk/createCollectionRowInteraction.js +50 -13
- package/dist/_chunk/createCollectionRowInteraction.js.map +1 -1
- package/dist/_chunk/createCollectionRowInteraction.jsx +50 -13
- package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -1
- package/dist/_chunk/createField.js +35 -25
- package/dist/_chunk/createField.js.map +1 -1
- package/dist/_chunk/createField.jsx +35 -25
- package/dist/_chunk/createField.jsx.map +1 -1
- package/dist/_chunk/createFocus.js +18 -5
- package/dist/_chunk/createFocus.js.map +1 -1
- package/dist/_chunk/createFocus.jsx +18 -5
- package/dist/_chunk/createFocus.jsx.map +1 -1
- package/dist/_chunk/createFocusRing.js +16 -7
- package/dist/_chunk/createFocusRing.js.map +1 -1
- package/dist/_chunk/createFocusRing.jsx +16 -7
- package/dist/_chunk/createFocusRing.jsx.map +1 -1
- package/dist/_chunk/createFocusWithin.js +16 -4
- package/dist/_chunk/createFocusWithin.js.map +1 -1
- package/dist/_chunk/createFocusWithin.jsx +16 -4
- package/dist/_chunk/createFocusWithin.jsx.map +1 -1
- package/dist/_chunk/createFocusable.js +39 -53
- package/dist/_chunk/createFocusable.js.map +1 -1
- package/dist/_chunk/createFocusable.jsx +39 -53
- package/dist/_chunk/createFocusable.jsx.map +1 -1
- package/dist/_chunk/createFormReset.js +24 -12
- package/dist/_chunk/createFormReset.js.map +1 -1
- package/dist/_chunk/createFormReset.jsx +24 -12
- package/dist/_chunk/createFormReset.jsx.map +1 -1
- package/dist/_chunk/createFormValidation.js +41 -17
- package/dist/_chunk/createFormValidation.js.map +1 -1
- package/dist/_chunk/createFormValidation.jsx +41 -17
- package/dist/_chunk/createFormValidation.jsx.map +1 -1
- package/dist/_chunk/createHover.js +56 -42
- package/dist/_chunk/createHover.js.map +1 -1
- package/dist/_chunk/createHover.jsx +56 -42
- package/dist/_chunk/createHover.jsx.map +1 -1
- package/dist/_chunk/createKeyboard.js +205 -0
- package/dist/_chunk/createKeyboard.js.map +1 -0
- package/dist/_chunk/createKeyboard.jsx +205 -0
- package/dist/_chunk/createKeyboard.jsx.map +1 -0
- package/dist/_chunk/createLabel.js +17 -4
- package/dist/_chunk/createLabel.js.map +1 -1
- package/dist/_chunk/createLabel.jsx +17 -4
- package/dist/_chunk/createLabel.jsx.map +1 -1
- package/dist/_chunk/createLabels.js +14 -2
- package/dist/_chunk/createLabels.js.map +1 -1
- package/dist/_chunk/createLabels.jsx +14 -2
- package/dist/_chunk/createLabels.jsx.map +1 -1
- package/dist/_chunk/createLandmark.js +19 -3
- package/dist/_chunk/createLandmark.js.map +1 -1
- package/dist/_chunk/createLandmark.jsx +19 -3
- package/dist/_chunk/createLandmark.jsx.map +1 -1
- package/dist/_chunk/createLongPress.js +105 -0
- package/dist/_chunk/createLongPress.js.map +1 -0
- package/dist/_chunk/createLongPress.jsx +105 -0
- package/dist/_chunk/createLongPress.jsx.map +1 -0
- package/dist/_chunk/createOverlay.js +220 -111
- package/dist/_chunk/createOverlay.js.map +1 -1
- package/dist/_chunk/createOverlay.jsx +220 -111
- package/dist/_chunk/createOverlay.jsx.map +1 -1
- package/dist/_chunk/createOverlayTrigger.js +58 -0
- package/dist/_chunk/createOverlayTrigger.js.map +1 -0
- package/dist/_chunk/createOverlayTrigger.jsx +58 -0
- package/dist/_chunk/createOverlayTrigger.jsx.map +1 -0
- package/dist/_chunk/createPress.js +38 -28
- package/dist/_chunk/createPress.js.map +1 -1
- package/dist/_chunk/createPress.jsx +38 -28
- package/dist/_chunk/createPress.jsx.map +1 -1
- package/dist/_chunk/createProgressBar.js +17 -4
- package/dist/_chunk/createProgressBar.js.map +1 -1
- package/dist/_chunk/createProgressBar.jsx +17 -4
- package/dist/_chunk/createProgressBar.jsx.map +1 -1
- package/dist/_chunk/createSelectableItem.js +58 -20
- package/dist/_chunk/createSelectableItem.js.map +1 -1
- package/dist/_chunk/createSelectableItem.jsx +58 -20
- package/dist/_chunk/createSelectableItem.jsx.map +1 -1
- package/dist/_chunk/createSelectableList.js +776 -0
- package/dist/_chunk/createSelectableList.js.map +1 -0
- package/dist/_chunk/createSelectableList.jsx +776 -0
- package/dist/_chunk/createSelectableList.jsx.map +1 -0
- package/dist/_chunk/createStringFormatter.js +350 -5
- package/dist/_chunk/createStringFormatter.js.map +1 -1
- package/dist/_chunk/createStringFormatter.jsx +350 -5
- package/dist/_chunk/createStringFormatter.jsx.map +1 -1
- package/dist/_chunk/createToggle.js +68 -19
- package/dist/_chunk/createToggle.js.map +1 -1
- package/dist/_chunk/createToggle.jsx +68 -19
- package/dist/_chunk/createToggle.jsx.map +1 -1
- package/dist/_chunk/createTypeSelect.js +15 -3
- package/dist/_chunk/createTypeSelect.js.map +1 -1
- package/dist/_chunk/createTypeSelect.jsx +15 -3
- package/dist/_chunk/createTypeSelect.jsx.map +1 -1
- package/dist/_chunk/{visually-hidden.js → createVisuallyHidden.js} +16 -4
- package/dist/_chunk/createVisuallyHidden.js.map +1 -0
- package/dist/_chunk/{visually-hidden.jsx → createVisuallyHidden.jsx} +16 -4
- package/dist/_chunk/createVisuallyHidden.jsx.map +1 -0
- package/dist/_chunk/datepicker.js +143 -58
- package/dist/_chunk/datepicker.js.map +1 -1
- package/dist/_chunk/datepicker.jsx +143 -58
- package/dist/_chunk/datepicker.jsx.map +1 -1
- package/dist/_chunk/dialog.js +49 -19
- package/dist/_chunk/dialog.js.map +1 -1
- package/dist/_chunk/dialog.jsx +49 -19
- package/dist/_chunk/dialog.jsx.map +1 -1
- package/dist/_chunk/disclosure.js +48 -28
- package/dist/_chunk/disclosure.js.map +1 -1
- package/dist/_chunk/disclosure.jsx +48 -28
- package/dist/_chunk/disclosure.jsx.map +1 -1
- package/dist/_chunk/dnd.js +1340 -1172
- package/dist/_chunk/dnd.js.map +1 -1
- package/dist/_chunk/dnd.jsx +1340 -1172
- package/dist/_chunk/dnd.jsx.map +1 -1
- package/dist/_chunk/dom.js +1200 -0
- package/dist/_chunk/dom.js.map +1 -0
- package/dist/_chunk/dom.jsx +1200 -0
- package/dist/_chunk/dom.jsx.map +1 -0
- package/dist/_chunk/env.js +1 -57
- package/dist/_chunk/env.js.map +1 -1
- package/dist/_chunk/env.jsx +1 -57
- package/dist/_chunk/env.jsx.map +1 -1
- package/dist/_chunk/filterDOMProps.js +32 -7
- package/dist/_chunk/filterDOMProps.js.map +1 -1
- package/dist/_chunk/filterDOMProps.jsx +32 -7
- package/dist/_chunk/filterDOMProps.jsx.map +1 -1
- package/dist/_chunk/focus.js +570 -338
- package/dist/_chunk/focus.js.map +1 -1
- package/dist/_chunk/focus.jsx +570 -338
- package/dist/_chunk/focus.jsx.map +1 -1
- package/dist/_chunk/grid.js +62 -8
- package/dist/_chunk/grid.js.map +1 -1
- package/dist/_chunk/grid.jsx +62 -8
- package/dist/_chunk/grid.jsx.map +1 -1
- package/dist/_chunk/gridlist.js +192 -53
- package/dist/_chunk/gridlist.js.map +1 -1
- package/dist/_chunk/gridlist.jsx +192 -53
- package/dist/_chunk/gridlist.jsx.map +1 -1
- package/dist/_chunk/i18n.js +68 -1
- package/dist/_chunk/i18n.js.map +1 -1
- package/dist/_chunk/i18n.jsx +68 -1
- package/dist/_chunk/i18n.jsx.map +1 -1
- package/dist/_chunk/interactions.js +38 -102
- package/dist/_chunk/interactions.js.map +1 -1
- package/dist/_chunk/interactions.jsx +38 -100
- package/dist/_chunk/interactions.jsx.map +1 -1
- package/dist/_chunk/intl.js +280 -0
- package/dist/_chunk/intl.js.map +1 -0
- package/dist/_chunk/intl.jsx +280 -0
- package/dist/_chunk/intl.jsx.map +1 -0
- package/dist/_chunk/link.js +15 -4
- package/dist/_chunk/link.js.map +1 -1
- package/dist/_chunk/link.jsx +15 -4
- package/dist/_chunk/link.jsx.map +1 -1
- package/dist/_chunk/listbox.js +99 -175
- package/dist/_chunk/listbox.js.map +1 -1
- package/dist/_chunk/listbox.jsx +99 -175
- package/dist/_chunk/listbox.jsx.map +1 -1
- package/dist/_chunk/locale.js +58 -12
- package/dist/_chunk/locale.js.map +1 -1
- package/dist/_chunk/locale.jsx +57 -11
- package/dist/_chunk/locale.jsx.map +1 -1
- package/dist/_chunk/menu.js +298 -57
- package/dist/_chunk/menu.js.map +1 -1
- package/dist/_chunk/menu.jsx +298 -57
- package/dist/_chunk/menu.jsx.map +1 -1
- package/dist/_chunk/mergeProps.js +216 -0
- package/dist/_chunk/mergeProps.js.map +1 -0
- package/dist/_chunk/mergeProps.jsx +216 -0
- package/dist/_chunk/mergeProps.jsx.map +1 -0
- package/dist/_chunk/meter.js +16 -4
- package/dist/_chunk/meter.js.map +1 -1
- package/dist/_chunk/meter.jsx +16 -4
- package/dist/_chunk/meter.jsx.map +1 -1
- package/dist/_chunk/numberfield.js +167 -22
- package/dist/_chunk/numberfield.js.map +1 -1
- package/dist/_chunk/numberfield.jsx +167 -22
- package/dist/_chunk/numberfield.jsx.map +1 -1
- package/dist/_chunk/overlays.js +87 -74
- package/dist/_chunk/overlays.js.map +1 -1
- package/dist/_chunk/overlays.jsx +71 -57
- package/dist/_chunk/overlays.jsx.map +1 -1
- package/dist/_chunk/owner.js +23 -0
- package/dist/_chunk/owner.js.map +1 -0
- package/dist/_chunk/owner.jsx +23 -0
- package/dist/_chunk/owner.jsx.map +1 -0
- package/dist/_chunk/popover.js +180 -42
- package/dist/_chunk/popover.js.map +1 -1
- package/dist/_chunk/popover.jsx +180 -42
- package/dist/_chunk/popover.jsx.map +1 -1
- package/dist/_chunk/radio.js +92 -32
- package/dist/_chunk/radio.js.map +1 -1
- package/dist/_chunk/radio.jsx +92 -32
- package/dist/_chunk/radio.jsx.map +1 -1
- package/dist/_chunk/reactivity.js.map +1 -1
- package/dist/_chunk/reactivity.jsx.map +1 -1
- package/dist/_chunk/refs.js +41 -0
- package/dist/_chunk/refs.js.map +1 -0
- package/dist/_chunk/refs.jsx +41 -0
- package/dist/_chunk/refs.jsx.map +1 -0
- package/dist/_chunk/searchfield.js +69 -3
- package/dist/_chunk/searchfield.js.map +1 -1
- package/dist/_chunk/searchfield.jsx +69 -3
- package/dist/_chunk/searchfield.jsx.map +1 -1
- package/dist/_chunk/select.js +220 -78
- package/dist/_chunk/select.js.map +1 -1
- package/dist/_chunk/select.jsx +156 -68
- package/dist/_chunk/select.jsx.map +1 -1
- package/dist/_chunk/selection.js +20 -638
- package/dist/_chunk/selection.js.map +1 -1
- package/dist/_chunk/selection.jsx +20 -638
- package/dist/_chunk/selection.jsx.map +1 -1
- package/dist/_chunk/separator.js +12 -0
- package/dist/_chunk/separator.js.map +1 -1
- package/dist/_chunk/separator.jsx +12 -0
- package/dist/_chunk/separator.jsx.map +1 -1
- package/dist/_chunk/slider.js +25 -16
- package/dist/_chunk/slider.js.map +1 -1
- package/dist/_chunk/slider.jsx +25 -16
- package/dist/_chunk/slider.jsx.map +1 -1
- package/dist/_chunk/spinbutton.js +18 -8
- package/dist/_chunk/spinbutton.js.map +1 -1
- package/dist/_chunk/spinbutton.jsx +18 -8
- package/dist/_chunk/spinbutton.jsx.map +1 -1
- package/dist/_chunk/steplist.js +14 -1
- package/dist/_chunk/steplist.js.map +1 -1
- package/dist/_chunk/steplist.jsx +14 -1
- package/dist/_chunk/steplist.jsx.map +1 -1
- package/dist/_chunk/switch.js +21 -3
- package/dist/_chunk/switch.js.map +1 -1
- package/dist/_chunk/switch.jsx +21 -3
- package/dist/_chunk/switch.jsx.map +1 -1
- package/dist/_chunk/table.js +666 -88
- package/dist/_chunk/table.js.map +1 -1
- package/dist/_chunk/table.jsx +666 -88
- package/dist/_chunk/table.jsx.map +1 -1
- package/dist/_chunk/tabs.js +115 -17
- package/dist/_chunk/tabs.js.map +1 -1
- package/dist/_chunk/tabs.jsx +115 -17
- package/dist/_chunk/tabs.jsx.map +1 -1
- package/dist/_chunk/tag.js +240 -39
- package/dist/_chunk/tag.js.map +1 -1
- package/dist/_chunk/tag.jsx +240 -39
- package/dist/_chunk/tag.jsx.map +1 -1
- package/dist/_chunk/textfield.js +83 -12
- package/dist/_chunk/textfield.js.map +1 -1
- package/dist/_chunk/textfield.jsx +83 -12
- package/dist/_chunk/textfield.jsx.map +1 -1
- package/dist/_chunk/toast.js +61 -28
- package/dist/_chunk/toast.js.map +1 -1
- package/dist/_chunk/toast.jsx +61 -28
- package/dist/_chunk/toast.jsx.map +1 -1
- package/dist/_chunk/tokenfield.js +567 -0
- package/dist/_chunk/tokenfield.js.map +1 -0
- package/dist/_chunk/tokenfield.jsx +567 -0
- package/dist/_chunk/tokenfield.jsx.map +1 -0
- package/dist/_chunk/toolbar.js +25 -8
- package/dist/_chunk/toolbar.js.map +1 -1
- package/dist/_chunk/toolbar.jsx +25 -8
- package/dist/_chunk/toolbar.jsx.map +1 -1
- package/dist/_chunk/tooltip.js +379 -6
- package/dist/_chunk/tooltip.js.map +1 -1
- package/dist/_chunk/tooltip.jsx +379 -6
- package/dist/_chunk/tooltip.jsx.map +1 -1
- package/dist/_chunk/tree.js +280 -69
- package/dist/_chunk/tree.js.map +1 -1
- package/dist/_chunk/tree.jsx +280 -69
- package/dist/_chunk/tree.jsx.map +1 -1
- package/dist/_chunk/utils.js +192 -150
- package/dist/_chunk/utils.js.map +1 -1
- package/dist/_chunk/utils.jsx +192 -150
- package/dist/_chunk/utils.jsx.map +1 -1
- package/dist/_chunk/virtualFocus.js +54 -0
- package/dist/_chunk/virtualFocus.js.map +1 -0
- package/dist/_chunk/virtualFocus.jsx +54 -0
- package/dist/_chunk/virtualFocus.jsx.map +1 -0
- package/dist/_chunk/virtualizer.js +202 -0
- package/dist/_chunk/virtualizer.js.map +1 -0
- package/dist/_chunk/virtualizer.jsx +202 -0
- package/dist/_chunk/virtualizer.jsx.map +1 -0
- package/dist/actiongroup/createActionGroup.d.ts +2 -1
- package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
- package/dist/autocomplete/createAutocomplete.d.ts +1 -9
- package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
- package/dist/autocomplete/intl/index.d.ts +13 -0
- package/dist/autocomplete/intl/index.d.ts.map +1 -0
- package/dist/breadcrumbs/createBreadcrumbs.d.ts +3 -1
- package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
- package/dist/breadcrumbs/intl/index.d.ts +13 -0
- package/dist/breadcrumbs/intl/index.d.ts.map +1 -0
- package/dist/button/createButton.d.ts.map +1 -1
- package/dist/button/createToggleButton.d.ts.map +1 -1
- package/dist/button/createToggleButtonGroup.d.ts +1 -1
- package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
- package/dist/button/types.d.ts +14 -0
- package/dist/button/types.d.ts.map +1 -1
- package/dist/calendar/createCalendar.d.ts +1 -7
- package/dist/calendar/createCalendar.d.ts.map +1 -1
- package/dist/calendar/createCalendarCell.d.ts +0 -6
- package/dist/calendar/createCalendarCell.d.ts.map +1 -1
- package/dist/calendar/createCalendarGrid.d.ts +1 -7
- package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
- package/dist/calendar/createCalendarMonthPicker.d.ts +0 -8
- package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -1
- package/dist/calendar/createCalendarYearPicker.d.ts +0 -8
- package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -1
- package/dist/calendar/createRangeCalendar.d.ts +13 -7
- package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
- package/dist/calendar/createRangeCalendarCell.d.ts +2 -6
- package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
- package/dist/calendar/intl/index.d.ts.map +1 -1
- package/dist/calendar/utils.d.ts.map +1 -1
- package/dist/checkbox/createCheckbox.d.ts +2 -1
- package/dist/checkbox/createCheckbox.d.ts.map +1 -1
- package/dist/checkbox/createCheckboxGroup.d.ts +1 -9
- package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -1
- package/dist/checkbox/createCheckboxGroupItem.d.ts +0 -8
- package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
- package/dist/collections/index.d.ts +1 -1
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/collections/index.js +18 -2
- package/dist/collections/index.js.map +1 -1
- package/dist/collections/index.jsx +18 -2
- package/dist/collections/index.jsx.map +1 -1
- package/dist/color/createColorArea.d.ts +2 -7
- package/dist/color/createColorArea.d.ts.map +1 -1
- package/dist/color/createColorField.d.ts +2 -7
- package/dist/color/createColorField.d.ts.map +1 -1
- package/dist/color/createColorSlider.d.ts +1 -6
- package/dist/color/createColorSlider.d.ts.map +1 -1
- package/dist/color/createColorSwatch.d.ts +1 -6
- package/dist/color/createColorSwatch.d.ts.map +1 -1
- package/dist/color/createColorWheel.d.ts +1 -6
- package/dist/color/createColorWheel.d.ts.map +1 -1
- package/dist/color/intl/index.d.ts.map +1 -1
- package/dist/color/types.d.ts +47 -1
- package/dist/color/types.d.ts.map +1 -1
- package/dist/combobox/createComboBox.d.ts +17 -8
- package/dist/combobox/createComboBox.d.ts.map +1 -1
- package/dist/combobox/intl/generated-locales.d.ts +3 -0
- package/dist/combobox/intl/generated-locales.d.ts.map +1 -1
- package/dist/combobox/intl/index.d.ts +3 -2
- package/dist/combobox/intl/index.d.ts.map +1 -1
- package/dist/datepicker/createDateField.d.ts +0 -10
- package/dist/datepicker/createDateField.d.ts.map +1 -1
- package/dist/datepicker/createDatePicker.d.ts +0 -16
- package/dist/datepicker/createDatePicker.d.ts.map +1 -1
- package/dist/datepicker/createDatePickerGroup.d.ts +1 -1
- package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
- package/dist/datepicker/createDateRangePicker.d.ts +0 -21
- package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
- package/dist/datepicker/createDateSegment.d.ts +0 -9
- package/dist/datepicker/createDateSegment.d.ts.map +1 -1
- package/dist/datepicker/createDisplayNames.d.ts +1 -9
- package/dist/datepicker/createDisplayNames.d.ts.map +1 -1
- package/dist/datepicker/createTimeField.d.ts.map +1 -1
- package/dist/datepicker/intl.d.ts.map +1 -1
- package/dist/dialog/createDialog.d.ts +2 -4
- package/dist/dialog/createDialog.d.ts.map +1 -1
- package/dist/dialog/types.d.ts +14 -0
- package/dist/dialog/types.d.ts.map +1 -1
- package/dist/disclosure/createDisclosure.d.ts +1 -8
- package/dist/disclosure/createDisclosure.d.ts.map +1 -1
- package/dist/disclosure/createDisclosureGroup.d.ts +3 -4
- package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -1
- package/dist/dnd/DragManager.d.ts +1 -16
- package/dist/dnd/DragManager.d.ts.map +1 -1
- package/dist/dnd/DropTargetKeyboardNavigation.d.ts +2 -2
- package/dist/dnd/createDrag.d.ts +1 -7
- package/dist/dnd/createDrag.d.ts.map +1 -1
- package/dist/dnd/createDraggableCollection.d.ts +1 -7
- package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
- package/dist/dnd/createDraggableItem.d.ts +2 -7
- package/dist/dnd/createDraggableItem.d.ts.map +1 -1
- package/dist/dnd/createDrop.d.ts +1 -7
- package/dist/dnd/createDrop.d.ts.map +1 -1
- package/dist/dnd/createDropIndicator.d.ts +27 -0
- package/dist/dnd/createDropIndicator.d.ts.map +1 -0
- package/dist/dnd/createDroppableCollection.d.ts +6 -8
- package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
- package/dist/dnd/createDroppableItem.d.ts +12 -10
- package/dist/dnd/createDroppableItem.d.ts.map +1 -1
- package/dist/dnd/index.d.ts +3 -1
- package/dist/dnd/index.d.ts.map +1 -1
- package/dist/dnd/index.js +2 -2
- package/dist/dnd/index.jsx +2 -2
- package/dist/dnd/intl/index.d.ts +6 -4
- package/dist/dnd/intl/index.d.ts.map +1 -1
- package/dist/dnd/types.d.ts +20 -1
- package/dist/dnd/types.d.ts.map +1 -1
- package/dist/dnd/utils.d.ts +4 -0
- package/dist/dnd/utils.d.ts.map +1 -1
- package/dist/focus/FocusScope.d.ts +9 -5
- package/dist/focus/FocusScope.d.ts.map +1 -1
- package/dist/focus/createAutoFocus.d.ts +3 -0
- package/dist/focus/createAutoFocus.d.ts.map +1 -1
- package/dist/focus/createFocusRestore.d.ts +3 -0
- package/dist/focus/createFocusRestore.d.ts.map +1 -1
- package/dist/focus/createHasTabbableChild.d.ts +13 -0
- package/dist/focus/createHasTabbableChild.d.ts.map +1 -0
- package/dist/focus/createVirtualFocus.d.ts +4 -1
- package/dist/focus/createVirtualFocus.d.ts.map +1 -1
- package/dist/focus/index.js +3 -2
- package/dist/focus/index.jsx +3 -2
- package/dist/focus/virtualFocus.d.ts +1 -1
- package/dist/form/createFormReset.d.ts +1 -7
- package/dist/form/createFormReset.d.ts.map +1 -1
- package/dist/form/createFormValidation.d.ts +1 -9
- package/dist/form/createFormValidation.d.ts.map +1 -1
- package/dist/grid/GridKeyboardDelegate.d.ts.map +1 -1
- package/dist/grid/createGrid.d.ts +1 -5
- package/dist/grid/createGrid.d.ts.map +1 -1
- package/dist/grid/createGridCell.d.ts +1 -5
- package/dist/grid/createGridCell.d.ts.map +1 -1
- package/dist/grid/createGridRow.d.ts +1 -5
- package/dist/grid/createGridRow.d.ts.map +1 -1
- package/dist/grid/index.d.ts +2 -2
- package/dist/grid/intl/index.d.ts +18 -0
- package/dist/grid/intl/index.d.ts.map +1 -0
- package/dist/grid/types.d.ts +25 -2
- package/dist/grid/types.d.ts.map +1 -1
- package/dist/gridlist/createGridList.d.ts +3 -5
- package/dist/gridlist/createGridList.d.ts.map +1 -1
- package/dist/gridlist/createGridListItem.d.ts +1 -5
- package/dist/gridlist/createGridListItem.d.ts.map +1 -1
- package/dist/gridlist/createGridListSection.d.ts +0 -4
- package/dist/gridlist/createGridListSection.d.ts.map +1 -1
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts +1 -5
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -1
- package/dist/gridlist/intl/index.d.ts +14 -0
- package/dist/gridlist/intl/index.d.ts.map +1 -0
- package/dist/gridlist/types.d.ts +56 -2
- package/dist/gridlist/types.d.ts.map +1 -1
- package/dist/i18n/compileIcu.d.ts +24 -0
- package/dist/i18n/compileIcu.d.ts.map +1 -0
- package/dist/i18n/createCollator.d.ts +0 -7
- package/dist/i18n/createCollator.d.ts.map +1 -1
- package/dist/i18n/createDateFormatter.d.ts +0 -7
- package/dist/i18n/createDateFormatter.d.ts.map +1 -1
- package/dist/i18n/createFilter.d.ts +0 -7
- package/dist/i18n/createFilter.d.ts.map +1 -1
- package/dist/i18n/createListFormatter.d.ts +9 -0
- package/dist/i18n/createListFormatter.d.ts.map +1 -0
- package/dist/i18n/createNumberFormatter.d.ts +0 -7
- package/dist/i18n/createNumberFormatter.d.ts.map +1 -1
- package/dist/i18n/createStringFormatter.d.ts +14 -4
- package/dist/i18n/createStringFormatter.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.jsx +2 -2
- package/dist/i18n/locale.d.ts +2 -8
- package/dist/i18n/locale.d.ts.map +1 -1
- package/dist/i18n/utils.d.ts +0 -7
- package/dist/i18n/utils.d.ts.map +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -21
- package/dist/index.jsx +27 -21
- package/dist/interactions/FocusableProvider.d.ts +3 -2
- package/dist/interactions/FocusableProvider.d.ts.map +1 -1
- package/dist/interactions/PressEvent.d.ts +2 -1
- package/dist/interactions/PressEvent.d.ts.map +1 -1
- package/dist/interactions/createContextMenu.d.ts +24 -0
- package/dist/interactions/createContextMenu.d.ts.map +1 -0
- package/dist/interactions/createFocus.d.ts +3 -2
- package/dist/interactions/createFocus.d.ts.map +1 -1
- package/dist/interactions/createFocusRing.d.ts +2 -1
- package/dist/interactions/createFocusRing.d.ts.map +1 -1
- package/dist/interactions/createFocusWithin.d.ts +1 -6
- package/dist/interactions/createFocusWithin.d.ts.map +1 -1
- package/dist/interactions/createFocusable.d.ts +2 -6
- package/dist/interactions/createFocusable.d.ts.map +1 -1
- package/dist/interactions/createHover.d.ts +3 -10
- package/dist/interactions/createHover.d.ts.map +1 -1
- package/dist/interactions/createInteractionModality.d.ts +12 -10
- package/dist/interactions/createInteractionModality.d.ts.map +1 -1
- package/dist/interactions/createKeyboard.d.ts +12 -3
- package/dist/interactions/createKeyboard.d.ts.map +1 -1
- package/dist/interactions/createKeyboardShortcutHandler.d.ts +24 -0
- package/dist/interactions/createKeyboardShortcutHandler.d.ts.map +1 -0
- package/dist/interactions/createLongPress.d.ts +4 -7
- package/dist/interactions/createLongPress.d.ts.map +1 -1
- package/dist/interactions/createMove.d.ts +1 -6
- package/dist/interactions/createMove.d.ts.map +1 -1
- package/dist/interactions/createPress.d.ts +2 -7
- package/dist/interactions/createPress.d.ts.map +1 -1
- package/dist/interactions/index.d.ts +1 -1
- package/dist/interactions/index.d.ts.map +1 -1
- package/dist/interactions/index.js +5 -3
- package/dist/interactions/index.jsx +5 -3
- package/dist/label/createField.d.ts +7 -1
- package/dist/label/createField.d.ts.map +1 -1
- package/dist/label/createLabel.d.ts +1 -1
- package/dist/label/createLabel.d.ts.map +1 -1
- package/dist/label/createLabels.d.ts +0 -7
- package/dist/label/createLabels.d.ts.map +1 -1
- package/dist/landmark/createLandmark.d.ts +4 -1
- package/dist/landmark/createLandmark.d.ts.map +1 -1
- package/dist/link/createLink.d.ts +1 -1
- package/dist/link/createLink.d.ts.map +1 -1
- package/dist/listbox/createListBox.d.ts +8 -7
- package/dist/listbox/createListBox.d.ts.map +1 -1
- package/dist/listbox/createOption.d.ts +7 -1
- package/dist/listbox/createOption.d.ts.map +1 -1
- package/dist/live-announcer/announce.d.ts +2 -13
- package/dist/live-announcer/announce.d.ts.map +1 -1
- package/dist/menu/createMenu.d.ts +3 -7
- package/dist/menu/createMenu.d.ts.map +1 -1
- package/dist/menu/createMenuItem.d.ts +2 -1
- package/dist/menu/createMenuItem.d.ts.map +1 -1
- package/dist/menu/createMenuTrigger.d.ts +24 -20
- package/dist/menu/createMenuTrigger.d.ts.map +1 -1
- package/dist/menu/index.d.ts +1 -1
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/intl/index.d.ts +4 -0
- package/dist/menu/intl/index.d.ts.map +1 -0
- package/dist/meter/createMeter.d.ts +2 -1
- package/dist/meter/createMeter.d.ts.map +1 -1
- package/dist/numberfield/createNumberField.d.ts +29 -6
- package/dist/numberfield/createNumberField.d.ts.map +1 -1
- package/dist/overlays/ariaHideOutside.d.ts +0 -4
- package/dist/overlays/ariaHideOutside.d.ts.map +1 -1
- package/dist/overlays/createInteractOutside.d.ts +2 -5
- package/dist/overlays/createInteractOutside.d.ts.map +1 -1
- package/dist/overlays/createModal.d.ts +3 -6
- package/dist/overlays/createModal.d.ts.map +1 -1
- package/dist/overlays/createOverlay.d.ts +1 -5
- package/dist/overlays/createOverlay.d.ts.map +1 -1
- package/dist/overlays/createOverlayTrigger.d.ts +2 -6
- package/dist/overlays/createOverlayTrigger.d.ts.map +1 -1
- package/dist/overlays/createPreventScroll.d.ts +0 -4
- package/dist/overlays/createPreventScroll.d.ts.map +1 -1
- package/dist/overlays/index.d.ts +1 -0
- package/dist/overlays/index.d.ts.map +1 -1
- package/dist/overlays/index.js +3 -2
- package/dist/overlays/index.jsx +3 -2
- package/dist/overlays/intl/index.d.ts +13 -0
- package/dist/overlays/intl/index.d.ts.map +1 -0
- package/dist/popover/calculatePosition.d.ts +1 -1
- package/dist/popover/calculatePosition.d.ts.map +1 -1
- package/dist/popover/createOverlayPosition.d.ts +1 -7
- package/dist/popover/createOverlayPosition.d.ts.map +1 -1
- package/dist/popover/createPopover.d.ts +6 -7
- package/dist/popover/createPopover.d.ts.map +1 -1
- package/dist/progress/createProgressBar.d.ts +2 -10
- package/dist/progress/createProgressBar.d.ts.map +1 -1
- package/dist/radio/createRadio.d.ts +8 -1
- package/dist/radio/createRadio.d.ts.map +1 -1
- package/dist/radio/createRadioGroup.d.ts +1 -9
- package/dist/radio/createRadioGroup.d.ts.map +1 -1
- package/dist/searchfield/createSearchField.d.ts +1 -1
- package/dist/searchfield/createSearchField.d.ts.map +1 -1
- package/dist/searchfield/intl/index.d.ts +13 -0
- package/dist/searchfield/intl/index.d.ts.map +1 -0
- package/dist/select/createHiddenSelect.d.ts +3 -10
- package/dist/select/createHiddenSelect.d.ts.map +1 -1
- package/dist/select/createSelect.d.ts +10 -6
- package/dist/select/createSelect.d.ts.map +1 -1
- package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -1
- package/dist/selection/ListKeyboardDelegate.d.ts +2 -1
- package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -1
- package/dist/selection/constants.d.ts.map +1 -1
- package/dist/selection/createCollectionRowInteraction.d.ts +12 -1
- package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -1
- package/dist/selection/createScrollIntoViewOnFocus.d.ts +0 -11
- package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -1
- package/dist/selection/createSelectableCollection.d.ts +1 -23
- package/dist/selection/createSelectableCollection.d.ts.map +1 -1
- package/dist/selection/createSelectableItem.d.ts +2 -29
- package/dist/selection/createSelectableItem.d.ts.map +1 -1
- package/dist/selection/createSelectableList.d.ts +4 -17
- package/dist/selection/createSelectableList.d.ts.map +1 -1
- package/dist/selection/createTypeSelect.d.ts +2 -8
- package/dist/selection/createTypeSelect.d.ts.map +1 -1
- package/dist/selection/index.js +3 -2
- package/dist/selection/index.jsx +3 -2
- package/dist/selection/selectItem.d.ts.map +1 -1
- package/dist/selection/utils.d.ts +1 -1
- package/dist/selection/utils.d.ts.map +1 -1
- package/dist/separator/createSeparator.d.ts +3 -1
- package/dist/separator/createSeparator.d.ts.map +1 -1
- package/dist/slider/createSlider.d.ts +1 -6
- package/dist/slider/createSlider.d.ts.map +1 -1
- package/dist/spinbutton/createSpinButton.d.ts +0 -9
- package/dist/spinbutton/createSpinButton.d.ts.map +1 -1
- package/dist/spinbutton/intl.d.ts.map +1 -1
- package/dist/ssr/index.d.ts +3 -9
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/index.js +47 -26
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/index.jsx +47 -26
- package/dist/ssr/index.jsx.map +1 -1
- package/dist/steplist/createStepList.d.ts +1 -1
- package/dist/steplist/createStepList.d.ts.map +1 -1
- package/dist/switch/createSwitch.d.ts +2 -1
- package/dist/switch/createSwitch.d.ts.map +1 -1
- package/dist/table/createTable.d.ts +1 -5
- package/dist/table/createTable.d.ts.map +1 -1
- package/dist/table/createTableCell.d.ts +1 -5
- package/dist/table/createTableCell.d.ts.map +1 -1
- package/dist/table/createTableColumnHeader.d.ts +1 -5
- package/dist/table/createTableColumnHeader.d.ts.map +1 -1
- package/dist/table/createTableColumnResize.d.ts +2 -8
- package/dist/table/createTableColumnResize.d.ts.map +1 -1
- package/dist/table/createTableHeaderRow.d.ts +1 -5
- package/dist/table/createTableHeaderRow.d.ts.map +1 -1
- package/dist/table/createTableRow.d.ts +1 -5
- package/dist/table/createTableRow.d.ts.map +1 -1
- package/dist/table/createTableRowGroup.d.ts +1 -5
- package/dist/table/createTableRowGroup.d.ts.map +1 -1
- package/dist/table/createTableSelectAllCheckbox.d.ts +1 -5
- package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
- package/dist/table/createTableSelectionCheckbox.d.ts +1 -5
- package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
- package/dist/table/index.d.ts +2 -2
- package/dist/table/intl/index.d.ts +23 -0
- package/dist/table/intl/index.d.ts.map +1 -0
- package/dist/table/types.d.ts +44 -2
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/utils.d.ts.map +1 -1
- package/dist/tabs/createTabs.d.ts +5 -9
- package/dist/tabs/createTabs.d.ts.map +1 -1
- package/dist/tag/createTag.d.ts +4 -8
- package/dist/tag/createTag.d.ts.map +1 -1
- package/dist/tag/createTagGroup.d.ts +0 -9
- package/dist/tag/createTagGroup.d.ts.map +1 -1
- package/dist/tag/intl/index.d.ts +14 -0
- package/dist/tag/intl/index.d.ts.map +1 -0
- package/dist/textfield/createTextField.d.ts +6 -8
- package/dist/textfield/createTextField.d.ts.map +1 -1
- package/dist/toast/createToast.d.ts +1 -8
- package/dist/toast/createToast.d.ts.map +1 -1
- package/dist/toast/createToastRegion.d.ts +7 -18
- package/dist/toast/createToastRegion.d.ts.map +1 -1
- package/dist/toast/intl/index.d.ts +14 -0
- package/dist/toast/intl/index.d.ts.map +1 -0
- package/dist/toggle/createToggle.d.ts +8 -1
- package/dist/toggle/createToggle.d.ts.map +1 -1
- package/dist/tokenfield/createToken.d.ts +15 -0
- package/dist/tokenfield/createToken.d.ts.map +1 -0
- package/dist/tokenfield/createTokenField.d.ts +52 -0
- package/dist/tokenfield/createTokenField.d.ts.map +1 -0
- package/dist/tokenfield/index.d.ts +3 -0
- package/dist/tokenfield/index.d.ts.map +1 -0
- package/dist/tokenfield/index.js +2 -0
- package/dist/tokenfield/index.jsx +2 -0
- package/dist/toolbar/createToolbar.d.ts +1 -1
- package/dist/toolbar/createToolbar.d.ts.map +1 -1
- package/dist/tooltip/createPreviewTrigger.d.ts +23 -0
- package/dist/tooltip/createPreviewTrigger.d.ts.map +1 -0
- package/dist/tooltip/createSafeArea.d.ts +20 -0
- package/dist/tooltip/createSafeArea.d.ts.map +1 -0
- package/dist/tooltip/createTooltip.d.ts +1 -1
- package/dist/tooltip/createTooltip.d.ts.map +1 -1
- package/dist/tooltip/createTooltipTrigger.d.ts +1 -9
- package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -1
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.d.ts.map +1 -1
- package/dist/tooltip/index.js +2 -2
- package/dist/tooltip/index.jsx +2 -2
- package/dist/tooltip/intl/index.d.ts +4 -0
- package/dist/tooltip/intl/index.d.ts.map +1 -0
- package/dist/tree/createTree.d.ts +1 -5
- package/dist/tree/createTree.d.ts.map +1 -1
- package/dist/tree/createTreeItem.d.ts +1 -5
- package/dist/tree/createTreeItem.d.ts.map +1 -1
- package/dist/tree/createTreeSelectionCheckbox.d.ts +1 -5
- package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
- package/dist/tree/intl/index.d.ts +14 -0
- package/dist/tree/intl/index.d.ts.map +1 -0
- package/dist/tree/types.d.ts +35 -2
- package/dist/tree/types.d.ts.map +1 -1
- package/dist/utils/ShadowTreeWalker.d.ts +30 -0
- package/dist/utils/ShadowTreeWalker.d.ts.map +1 -0
- package/dist/utils/animation.d.ts +1 -29
- package/dist/utils/animation.d.ts.map +1 -1
- package/dist/utils/capture.d.ts +14 -0
- package/dist/utils/capture.d.ts.map +1 -0
- package/dist/utils/createDescription.d.ts +1 -25
- package/dist/utils/createDescription.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +45 -11
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/domAttrs.d.ts +16 -0
- package/dist/utils/domAttrs.d.ts.map +1 -0
- package/dist/utils/env.d.ts +2 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/events.d.ts +0 -4
- package/dist/utils/events.d.ts.map +1 -1
- package/dist/utils/filterDOMProps.d.ts +0 -6
- package/dist/utils/filterDOMProps.d.ts.map +1 -1
- package/dist/utils/focus.d.ts +19 -6
- package/dist/utils/focus.d.ts.map +1 -1
- package/dist/utils/geometry.d.ts +1 -1
- package/dist/utils/geometry.d.ts.map +1 -1
- package/dist/utils/getMetaValue.d.ts +13 -0
- package/dist/utils/getMetaValue.d.ts.map +1 -0
- package/dist/utils/getNonce.d.ts +9 -0
- package/dist/utils/getNonce.d.ts.map +1 -0
- package/dist/utils/globalListeners.d.ts +0 -6
- package/dist/utils/globalListeners.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -4
- package/dist/utils/index.jsx +7 -4
- package/dist/utils/keyboard.d.ts +0 -4
- package/dist/utils/keyboard.d.ts.map +1 -1
- package/dist/utils/mergeProps.d.ts +5 -2
- package/dist/utils/mergeProps.d.ts.map +1 -1
- package/dist/utils/owner.d.ts +14 -0
- package/dist/utils/owner.d.ts.map +1 -0
- package/dist/utils/platform.d.ts +0 -4
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/reactivity.d.ts +2 -0
- package/dist/utils/reactivity.d.ts.map +1 -1
- package/dist/utils/refs.d.ts +20 -0
- package/dist/utils/refs.d.ts.map +1 -0
- package/dist/utils/runAfterTransition.d.ts +2 -0
- package/dist/utils/runAfterTransition.d.ts.map +1 -0
- package/dist/utils/scrollIntoView.d.ts +0 -4
- package/dist/utils/scrollIntoView.d.ts.map +1 -1
- package/dist/utils/splitProps.d.ts +17 -0
- package/dist/utils/splitProps.d.ts.map +1 -0
- package/dist/utils/textSelection.d.ts +0 -8
- package/dist/utils/textSelection.d.ts.map +1 -1
- package/dist/virtualizer/ScrollView.d.ts +38 -0
- package/dist/virtualizer/ScrollView.d.ts.map +1 -0
- package/dist/virtualizer/index.d.ts +3 -0
- package/dist/virtualizer/index.d.ts.map +1 -0
- package/dist/virtualizer/index.js +2 -0
- package/dist/virtualizer/index.jsx +2 -0
- package/dist/virtualizer/utils.d.ts +10 -0
- package/dist/virtualizer/utils.d.ts.map +1 -0
- package/dist/visually-hidden/createVisuallyHidden.d.ts +2 -9
- package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -1
- package/dist/visually-hidden/index.js +1 -1
- package/dist/visually-hidden/index.jsx +1 -1
- package/package.json +28 -11
- package/src/actiongroup/createActionGroup.ts +48 -23
- package/src/autocomplete/createAutocomplete.ts +32 -5
- package/src/autocomplete/intl/ar-AE.json +3 -0
- package/src/autocomplete/intl/bg-BG.json +3 -0
- package/src/autocomplete/intl/cs-CZ.json +3 -0
- package/src/autocomplete/intl/da-DK.json +3 -0
- package/src/autocomplete/intl/de-DE.json +3 -0
- package/src/autocomplete/intl/el-GR.json +3 -0
- package/src/autocomplete/intl/en-US.json +3 -0
- package/src/autocomplete/intl/es-ES.json +3 -0
- package/src/autocomplete/intl/et-EE.json +3 -0
- package/src/autocomplete/intl/fi-FI.json +3 -0
- package/src/autocomplete/intl/fr-FR.json +3 -0
- package/src/autocomplete/intl/he-IL.json +3 -0
- package/src/autocomplete/intl/hr-HR.json +3 -0
- package/src/autocomplete/intl/hu-HU.json +3 -0
- package/src/autocomplete/intl/index.ts +122 -0
- package/src/autocomplete/intl/it-IT.json +3 -0
- package/src/autocomplete/intl/ja-JP.json +3 -0
- package/src/autocomplete/intl/ko-KR.json +3 -0
- package/src/autocomplete/intl/lt-LT.json +3 -0
- package/src/autocomplete/intl/lv-LV.json +3 -0
- package/src/autocomplete/intl/nb-NO.json +3 -0
- package/src/autocomplete/intl/nl-NL.json +3 -0
- package/src/autocomplete/intl/pl-PL.json +3 -0
- package/src/autocomplete/intl/pt-BR.json +3 -0
- package/src/autocomplete/intl/pt-PT.json +3 -0
- package/src/autocomplete/intl/ro-RO.json +3 -0
- package/src/autocomplete/intl/ru-RU.json +3 -0
- package/src/autocomplete/intl/sk-SK.json +3 -0
- package/src/autocomplete/intl/sl-SI.json +3 -0
- package/src/autocomplete/intl/sr-SP.json +3 -0
- package/src/autocomplete/intl/sv-SE.json +3 -0
- package/src/autocomplete/intl/tr-TR.json +3 -0
- package/src/autocomplete/intl/uk-UA.json +3 -0
- package/src/autocomplete/intl/zh-CN.json +3 -0
- package/src/autocomplete/intl/zh-TW.json +3 -0
- package/src/breadcrumbs/createBreadcrumbs.ts +18 -1
- package/src/breadcrumbs/intl/ar-AE.json +3 -0
- package/src/breadcrumbs/intl/bg-BG.json +3 -0
- package/src/breadcrumbs/intl/cs-CZ.json +3 -0
- package/src/breadcrumbs/intl/da-DK.json +3 -0
- package/src/breadcrumbs/intl/de-DE.json +3 -0
- package/src/breadcrumbs/intl/el-GR.json +3 -0
- package/src/breadcrumbs/intl/en-US.json +3 -0
- package/src/breadcrumbs/intl/es-ES.json +3 -0
- package/src/breadcrumbs/intl/et-EE.json +3 -0
- package/src/breadcrumbs/intl/fi-FI.json +3 -0
- package/src/breadcrumbs/intl/fr-FR.json +3 -0
- package/src/breadcrumbs/intl/he-IL.json +3 -0
- package/src/breadcrumbs/intl/hr-HR.json +3 -0
- package/src/breadcrumbs/intl/hu-HU.json +3 -0
- package/src/breadcrumbs/intl/index.ts +122 -0
- package/src/breadcrumbs/intl/it-IT.json +3 -0
- package/src/breadcrumbs/intl/ja-JP.json +3 -0
- package/src/breadcrumbs/intl/ko-KR.json +3 -0
- package/src/breadcrumbs/intl/lt-LT.json +3 -0
- package/src/breadcrumbs/intl/lv-LV.json +3 -0
- package/src/breadcrumbs/intl/nb-NO.json +3 -0
- package/src/breadcrumbs/intl/nl-NL.json +3 -0
- package/src/breadcrumbs/intl/pl-PL.json +3 -0
- package/src/breadcrumbs/intl/pt-BR.json +3 -0
- package/src/breadcrumbs/intl/pt-PT.json +3 -0
- package/src/breadcrumbs/intl/ro-RO.json +3 -0
- package/src/breadcrumbs/intl/ru-RU.json +3 -0
- package/src/breadcrumbs/intl/sk-SK.json +3 -0
- package/src/breadcrumbs/intl/sl-SI.json +3 -0
- package/src/breadcrumbs/intl/sr-SP.json +3 -0
- package/src/breadcrumbs/intl/sv-SE.json +3 -0
- package/src/breadcrumbs/intl/tr-TR.json +3 -0
- package/src/breadcrumbs/intl/uk-UA.json +3 -0
- package/src/breadcrumbs/intl/zh-CN.json +3 -0
- package/src/breadcrumbs/intl/zh-TW.json +3 -0
- package/src/button/createButton.ts +15 -1
- package/src/button/createToggleButton.ts +18 -5
- package/src/button/createToggleButtonGroup.ts +23 -8
- package/src/button/types.ts +16 -0
- package/src/calendar/createCalendar.ts +22 -3
- package/src/calendar/createCalendarCell.ts +104 -15
- package/src/calendar/createCalendarGrid.ts +37 -13
- package/src/calendar/createCalendarMonthPicker.ts +14 -0
- package/src/calendar/createCalendarYearPicker.ts +14 -0
- package/src/calendar/createRangeCalendar.ts +124 -1
- package/src/calendar/createRangeCalendarCell.ts +179 -40
- package/src/calendar/intl/index.ts +37 -0
- package/src/calendar/utils.ts +14 -0
- package/src/checkbox/createCheckbox.ts +32 -17
- package/src/checkbox/createCheckboxGroup.ts +31 -13
- package/src/checkbox/createCheckboxGroupItem.ts +15 -1
- package/src/collections/index.ts +21 -3
- package/src/color/createColorArea.ts +226 -29
- package/src/color/createColorField.ts +98 -22
- package/src/color/createColorSlider.ts +24 -3
- package/src/color/createColorSwatch.ts +18 -1
- package/src/color/createColorWheel.ts +27 -5
- package/src/color/intl/index.ts +35 -0
- package/src/color/types.ts +47 -1
- package/src/combobox/createComboBox.ts +303 -152
- package/src/combobox/intl/generated-locales.ts +38 -1
- package/src/combobox/intl/index.ts +38 -2
- package/src/datepicker/createDateField.ts +35 -21
- package/src/datepicker/createDatePicker.ts +14 -0
- package/src/datepicker/createDatePickerGroup.ts +19 -11
- package/src/datepicker/createDateRangePicker.ts +14 -0
- package/src/datepicker/createDateSegment.ts +68 -12
- package/src/datepicker/createDisplayNames.ts +16 -1
- package/src/datepicker/createTimeField.ts +14 -0
- package/src/datepicker/intl.ts +36 -0
- package/src/dialog/createDialog.ts +57 -30
- package/src/dialog/types.ts +14 -0
- package/src/disclosure/createDisclosure.ts +28 -6
- package/src/disclosure/createDisclosureGroup.ts +3 -4
- package/src/dnd/DragManager.ts +55 -4
- package/src/dnd/DropTargetKeyboardNavigation.ts +2 -2
- package/src/dnd/createDrag.ts +18 -1
- package/src/dnd/createDraggableCollection.ts +96 -32
- package/src/dnd/createDraggableItem.ts +70 -30
- package/src/dnd/createDrop.ts +18 -1
- package/src/dnd/createDropIndicator.ts +92 -0
- package/src/dnd/createDroppableCollection.ts +106 -40
- package/src/dnd/createDroppableItem.ts +161 -13
- package/src/dnd/index.ts +3 -0
- package/src/dnd/intl/index.ts +77 -66
- package/src/dnd/types.ts +20 -1
- package/src/dnd/utils.ts +19 -0
- package/src/focus/FocusScope.tsx +542 -157
- package/src/focus/createAutoFocus.ts +94 -68
- package/src/focus/createFocusRestore.ts +16 -12
- package/src/focus/createHasTabbableChild.ts +78 -0
- package/src/focus/createVirtualFocus.ts +21 -5
- package/src/focus/virtualFocus.ts +1 -1
- package/src/form/createFormReset.ts +40 -17
- package/src/form/createFormValidation.ts +128 -86
- package/src/grid/GridKeyboardDelegate.ts +14 -0
- package/src/grid/createGrid.ts +17 -2
- package/src/grid/createGridCell.ts +17 -2
- package/src/grid/createGridRow.ts +17 -2
- package/src/grid/index.ts +2 -2
- package/src/grid/intl/ar-AE.json +8 -0
- package/src/grid/intl/bg-BG.json +8 -0
- package/src/grid/intl/cs-CZ.json +8 -0
- package/src/grid/intl/da-DK.json +8 -0
- package/src/grid/intl/de-DE.json +8 -0
- package/src/grid/intl/el-GR.json +8 -0
- package/src/grid/intl/en-US.json +8 -0
- package/src/grid/intl/es-ES.json +8 -0
- package/src/grid/intl/et-EE.json +8 -0
- package/src/grid/intl/fi-FI.json +8 -0
- package/src/grid/intl/fr-FR.json +8 -0
- package/src/grid/intl/he-IL.json +8 -0
- package/src/grid/intl/hr-HR.json +8 -0
- package/src/grid/intl/hu-HU.json +8 -0
- package/src/grid/intl/index.ts +127 -0
- package/src/grid/intl/it-IT.json +8 -0
- package/src/grid/intl/ja-JP.json +8 -0
- package/src/grid/intl/ko-KR.json +8 -0
- package/src/grid/intl/lt-LT.json +8 -0
- package/src/grid/intl/lv-LV.json +8 -0
- package/src/grid/intl/nb-NO.json +8 -0
- package/src/grid/intl/nl-NL.json +8 -0
- package/src/grid/intl/pl-PL.json +8 -0
- package/src/grid/intl/pt-BR.json +8 -0
- package/src/grid/intl/pt-PT.json +8 -0
- package/src/grid/intl/ro-RO.json +8 -0
- package/src/grid/intl/ru-RU.json +8 -0
- package/src/grid/intl/sk-SK.json +8 -0
- package/src/grid/intl/sl-SI.json +8 -0
- package/src/grid/intl/sr-SP.json +8 -0
- package/src/grid/intl/sv-SE.json +8 -0
- package/src/grid/intl/tr-TR.json +8 -0
- package/src/grid/intl/uk-UA.json +8 -0
- package/src/grid/intl/zh-CN.json +8 -0
- package/src/grid/intl/zh-TW.json +8 -0
- package/src/grid/types.ts +25 -2
- package/src/gridlist/createGridList.ts +172 -42
- package/src/gridlist/createGridListItem.ts +51 -13
- package/src/gridlist/createGridListSection.ts +14 -0
- package/src/gridlist/createGridListSelectionCheckbox.ts +31 -4
- package/src/gridlist/intl/ar-AE.json +4 -0
- package/src/gridlist/intl/bg-BG.json +4 -0
- package/src/gridlist/intl/cs-CZ.json +4 -0
- package/src/gridlist/intl/da-DK.json +4 -0
- package/src/gridlist/intl/de-DE.json +4 -0
- package/src/gridlist/intl/el-GR.json +4 -0
- package/src/gridlist/intl/en-US.json +4 -0
- package/src/gridlist/intl/es-ES.json +4 -0
- package/src/gridlist/intl/et-EE.json +4 -0
- package/src/gridlist/intl/fi-FI.json +4 -0
- package/src/gridlist/intl/fr-FR.json +4 -0
- package/src/gridlist/intl/he-IL.json +4 -0
- package/src/gridlist/intl/hr-HR.json +4 -0
- package/src/gridlist/intl/hu-HU.json +4 -0
- package/src/gridlist/intl/index.ts +123 -0
- package/src/gridlist/intl/it-IT.json +4 -0
- package/src/gridlist/intl/ja-JP.json +4 -0
- package/src/gridlist/intl/ko-KR.json +4 -0
- package/src/gridlist/intl/lt-LT.json +4 -0
- package/src/gridlist/intl/lv-LV.json +4 -0
- package/src/gridlist/intl/nb-NO.json +4 -0
- package/src/gridlist/intl/nl-NL.json +4 -0
- package/src/gridlist/intl/pl-PL.json +4 -0
- package/src/gridlist/intl/pt-BR.json +4 -0
- package/src/gridlist/intl/pt-PT.json +4 -0
- package/src/gridlist/intl/ro-RO.json +4 -0
- package/src/gridlist/intl/ru-RU.json +4 -0
- package/src/gridlist/intl/sk-SK.json +4 -0
- package/src/gridlist/intl/sl-SI.json +4 -0
- package/src/gridlist/intl/sr-SP.json +4 -0
- package/src/gridlist/intl/sv-SE.json +4 -0
- package/src/gridlist/intl/tr-TR.json +4 -0
- package/src/gridlist/intl/uk-UA.json +4 -0
- package/src/gridlist/intl/zh-CN.json +4 -0
- package/src/gridlist/intl/zh-TW.json +4 -0
- package/src/gridlist/types.ts +54 -2
- package/src/i18n/compileIcu.ts +440 -0
- package/src/i18n/createCollator.ts +14 -0
- package/src/i18n/createDateFormatter.ts +14 -0
- package/src/i18n/createFilter.ts +14 -0
- package/src/i18n/createListFormatter.ts +38 -0
- package/src/i18n/createNumberFormatter.ts +14 -0
- package/src/i18n/createStringFormatter.ts +64 -8
- package/src/i18n/index.ts +3 -0
- package/src/i18n/locale.tsx +60 -19
- package/src/i18n/utils.ts +14 -0
- package/src/index.ts +49 -1
- package/src/interactions/FocusableProvider.tsx +28 -11
- package/src/interactions/PressEvent.ts +16 -1
- package/src/interactions/createContextMenu.ts +108 -0
- package/src/interactions/createFocus.ts +26 -6
- package/src/interactions/createFocusRing.ts +28 -13
- package/src/interactions/createFocusWithin.ts +23 -3
- package/src/interactions/createFocusable.ts +45 -28
- package/src/interactions/createHover.ts +102 -81
- package/src/interactions/createInteractionModality.ts +135 -45
- package/src/interactions/createKeyboard.ts +85 -9
- package/src/interactions/createKeyboardShortcutHandler.ts +157 -0
- package/src/interactions/createLongPress.ts +31 -9
- package/src/interactions/createMove.ts +24 -3
- package/src/interactions/createPress.ts +85 -41
- package/src/interactions/index.ts +1 -0
- package/src/label/createField.ts +58 -63
- package/src/label/createLabel.ts +21 -4
- package/src/label/createLabels.ts +25 -1
- package/src/landmark/createLandmark.ts +27 -4
- package/src/link/createLink.ts +20 -12
- package/src/listbox/createListBox.ts +86 -310
- package/src/listbox/createOption.ts +50 -14
- package/src/live-announcer/announce.ts +21 -6
- package/src/menu/createMenu.ts +92 -5
- package/src/menu/createMenuItem.ts +40 -23
- package/src/menu/createMenuTrigger.ts +179 -51
- package/src/menu/index.ts +2 -0
- package/src/menu/intl/index.ts +130 -0
- package/src/meter/createMeter.ts +20 -5
- package/src/numberfield/createNumberField.ts +254 -14
- package/src/overlays/ariaHideOutside.ts +76 -11
- package/src/overlays/createInteractOutside.ts +74 -47
- package/src/overlays/createModal.tsx +42 -27
- package/src/overlays/createOverlay.ts +107 -66
- package/src/overlays/createOverlayTrigger.ts +21 -6
- package/src/overlays/createPreventScroll.ts +92 -62
- package/src/overlays/index.ts +2 -0
- package/src/overlays/intl/ar-AE.json +3 -0
- package/src/overlays/intl/bg-BG.json +3 -0
- package/src/overlays/intl/cs-CZ.json +3 -0
- package/src/overlays/intl/da-DK.json +3 -0
- package/src/overlays/intl/de-DE.json +3 -0
- package/src/overlays/intl/el-GR.json +3 -0
- package/src/overlays/intl/en-US.json +3 -0
- package/src/overlays/intl/es-ES.json +3 -0
- package/src/overlays/intl/et-EE.json +3 -0
- package/src/overlays/intl/fi-FI.json +3 -0
- package/src/overlays/intl/fr-FR.json +3 -0
- package/src/overlays/intl/he-IL.json +3 -0
- package/src/overlays/intl/hr-HR.json +3 -0
- package/src/overlays/intl/hu-HU.json +3 -0
- package/src/overlays/intl/index.ts +122 -0
- package/src/overlays/intl/it-IT.json +3 -0
- package/src/overlays/intl/ja-JP.json +3 -0
- package/src/overlays/intl/ko-KR.json +3 -0
- package/src/overlays/intl/lt-LT.json +3 -0
- package/src/overlays/intl/lv-LV.json +3 -0
- package/src/overlays/intl/nb-NO.json +3 -0
- package/src/overlays/intl/nl-NL.json +3 -0
- package/src/overlays/intl/pl-PL.json +3 -0
- package/src/overlays/intl/pt-BR.json +3 -0
- package/src/overlays/intl/pt-PT.json +3 -0
- package/src/overlays/intl/ro-RO.json +3 -0
- package/src/overlays/intl/ru-RU.json +3 -0
- package/src/overlays/intl/sk-SK.json +3 -0
- package/src/overlays/intl/sl-SI.json +3 -0
- package/src/overlays/intl/sr-SP.json +3 -0
- package/src/overlays/intl/sv-SE.json +3 -0
- package/src/overlays/intl/tr-TR.json +3 -0
- package/src/overlays/intl/uk-UA.json +3 -0
- package/src/overlays/intl/zh-CN.json +3 -0
- package/src/overlays/intl/zh-TW.json +3 -0
- package/src/popover/calculatePosition.ts +21 -3
- package/src/popover/createOverlayPosition.ts +149 -41
- package/src/popover/createPopover.ts +88 -23
- package/src/progress/createProgressBar.ts +19 -4
- package/src/radio/createRadio.ts +80 -25
- package/src/radio/createRadioGroup.ts +47 -13
- package/src/searchfield/createSearchField.ts +31 -2
- package/src/searchfield/intl/ar-AE.json +3 -0
- package/src/searchfield/intl/bg-BG.json +3 -0
- package/src/searchfield/intl/cs-CZ.json +3 -0
- package/src/searchfield/intl/da-DK.json +3 -0
- package/src/searchfield/intl/de-DE.json +3 -0
- package/src/searchfield/intl/el-GR.json +3 -0
- package/src/searchfield/intl/en-US.json +3 -0
- package/src/searchfield/intl/es-ES.json +3 -0
- package/src/searchfield/intl/et-EE.json +3 -0
- package/src/searchfield/intl/fi-FI.json +3 -0
- package/src/searchfield/intl/fr-FR.json +3 -0
- package/src/searchfield/intl/he-IL.json +3 -0
- package/src/searchfield/intl/hr-HR.json +3 -0
- package/src/searchfield/intl/hu-HU.json +3 -0
- package/src/searchfield/intl/index.ts +122 -0
- package/src/searchfield/intl/it-IT.json +3 -0
- package/src/searchfield/intl/ja-JP.json +3 -0
- package/src/searchfield/intl/ko-KR.json +3 -0
- package/src/searchfield/intl/lt-LT.json +3 -0
- package/src/searchfield/intl/lv-LV.json +3 -0
- package/src/searchfield/intl/nb-NO.json +3 -0
- package/src/searchfield/intl/nl-NL.json +3 -0
- package/src/searchfield/intl/pl-PL.json +3 -0
- package/src/searchfield/intl/pt-BR.json +3 -0
- package/src/searchfield/intl/pt-PT.json +3 -0
- package/src/searchfield/intl/ro-RO.json +3 -0
- package/src/searchfield/intl/ru-RU.json +3 -0
- package/src/searchfield/intl/sk-SK.json +3 -0
- package/src/searchfield/intl/sl-SI.json +3 -0
- package/src/searchfield/intl/sr-SP.json +3 -0
- package/src/searchfield/intl/sv-SE.json +3 -0
- package/src/searchfield/intl/tr-TR.json +3 -0
- package/src/searchfield/intl/uk-UA.json +3 -0
- package/src/searchfield/intl/zh-CN.json +3 -0
- package/src/searchfield/intl/zh-TW.json +3 -0
- package/src/select/createHiddenSelect.tsx +166 -69
- package/src/select/createSelect.ts +61 -18
- package/src/selection/DOMLayoutDelegate.ts +14 -0
- package/src/selection/ListKeyboardDelegate.ts +16 -1
- package/src/selection/constants.ts +14 -0
- package/src/selection/createCollectionRowInteraction.ts +75 -6
- package/src/selection/createScrollIntoViewOnFocus.ts +23 -8
- package/src/selection/createSelectableCollection.ts +352 -226
- package/src/selection/createSelectableItem.ts +51 -12
- package/src/selection/createSelectableList.ts +21 -1
- package/src/selection/createTypeSelect.ts +21 -5
- package/src/selection/selectItem.ts +14 -0
- package/src/selection/utils.ts +15 -1
- package/src/separator/createSeparator.ts +17 -1
- package/src/slider/createSlider.ts +24 -18
- package/src/spinbutton/createSpinButton.ts +16 -2
- package/src/spinbutton/intl.ts +36 -0
- package/src/ssr/index.tsx +79 -48
- package/src/steplist/createStepList.ts +17 -2
- package/src/switch/createSwitch.ts +25 -4
- package/src/table/createTable.ts +102 -49
- package/src/table/createTableCell.ts +17 -2
- package/src/table/createTableColumnHeader.ts +21 -3
- package/src/table/createTableColumnResize.ts +19 -3
- package/src/table/createTableHeaderRow.ts +17 -2
- package/src/table/createTableRow.ts +29 -22
- package/src/table/createTableRowGroup.ts +18 -3
- package/src/table/createTableSelectAllCheckbox.ts +30 -14
- package/src/table/createTableSelectionCheckbox.ts +21 -3
- package/src/table/index.ts +2 -2
- package/src/table/intl/ar-AE.json +13 -0
- package/src/table/intl/bg-BG.json +13 -0
- package/src/table/intl/cs-CZ.json +13 -0
- package/src/table/intl/da-DK.json +13 -0
- package/src/table/intl/de-DE.json +13 -0
- package/src/table/intl/el-GR.json +13 -0
- package/src/table/intl/en-US.json +13 -0
- package/src/table/intl/es-ES.json +13 -0
- package/src/table/intl/et-EE.json +13 -0
- package/src/table/intl/fi-FI.json +13 -0
- package/src/table/intl/fr-FR.json +13 -0
- package/src/table/intl/he-IL.json +13 -0
- package/src/table/intl/hr-HR.json +13 -0
- package/src/table/intl/hu-HU.json +13 -0
- package/src/table/intl/index.ts +132 -0
- package/src/table/intl/it-IT.json +13 -0
- package/src/table/intl/ja-JP.json +13 -0
- package/src/table/intl/ko-KR.json +13 -0
- package/src/table/intl/lt-LT.json +13 -0
- package/src/table/intl/lv-LV.json +13 -0
- package/src/table/intl/nb-NO.json +13 -0
- package/src/table/intl/nl-NL.json +13 -0
- package/src/table/intl/pl-PL.json +13 -0
- package/src/table/intl/pt-BR.json +13 -0
- package/src/table/intl/pt-PT.json +13 -0
- package/src/table/intl/ro-RO.json +13 -0
- package/src/table/intl/ru-RU.json +13 -0
- package/src/table/intl/sk-SK.json +13 -0
- package/src/table/intl/sl-SI.json +13 -0
- package/src/table/intl/sr-SP.json +13 -0
- package/src/table/intl/sv-SE.json +13 -0
- package/src/table/intl/tr-TR.json +13 -0
- package/src/table/intl/uk-UA.json +13 -0
- package/src/table/intl/zh-CN.json +13 -0
- package/src/table/intl/zh-TW.json +13 -0
- package/src/table/types.ts +44 -2
- package/src/table/utils.ts +14 -0
- package/src/tabs/createTabs.ts +104 -37
- package/src/tag/createTag.ts +118 -37
- package/src/tag/createTagGroup.ts +20 -12
- package/src/tag/intl/ar-AE.json +4 -0
- package/src/tag/intl/bg-BG.json +4 -0
- package/src/tag/intl/cs-CZ.json +4 -0
- package/src/tag/intl/da-DK.json +4 -0
- package/src/tag/intl/de-DE.json +4 -0
- package/src/tag/intl/el-GR.json +4 -0
- package/src/tag/intl/en-US.json +4 -0
- package/src/tag/intl/es-ES.json +4 -0
- package/src/tag/intl/et-EE.json +4 -0
- package/src/tag/intl/fi-FI.json +4 -0
- package/src/tag/intl/fr-FR.json +4 -0
- package/src/tag/intl/he-IL.json +4 -0
- package/src/tag/intl/hr-HR.json +4 -0
- package/src/tag/intl/hu-HU.json +4 -0
- package/src/tag/intl/index.ts +123 -0
- package/src/tag/intl/it-IT.json +4 -0
- package/src/tag/intl/ja-JP.json +4 -0
- package/src/tag/intl/ko-KR.json +4 -0
- package/src/tag/intl/lt-LT.json +4 -0
- package/src/tag/intl/lv-LV.json +4 -0
- package/src/tag/intl/nb-NO.json +4 -0
- package/src/tag/intl/nl-NL.json +4 -0
- package/src/tag/intl/pl-PL.json +4 -0
- package/src/tag/intl/pt-BR.json +4 -0
- package/src/tag/intl/pt-PT.json +4 -0
- package/src/tag/intl/ro-RO.json +4 -0
- package/src/tag/intl/ru-RU.json +4 -0
- package/src/tag/intl/sk-SK.json +4 -0
- package/src/tag/intl/sl-SI.json +4 -0
- package/src/tag/intl/sr-SP.json +4 -0
- package/src/tag/intl/sv-SE.json +4 -0
- package/src/tag/intl/tr-TR.json +4 -0
- package/src/tag/intl/uk-UA.json +4 -0
- package/src/tag/intl/zh-CN.json +4 -0
- package/src/tag/intl/zh-TW.json +4 -0
- package/src/textfield/createTextField.ts +104 -14
- package/src/toast/createToast.ts +39 -6
- package/src/toast/createToastRegion.ts +28 -15
- package/src/toast/intl/ar-AE.json +4 -0
- package/src/toast/intl/bg-BG.json +4 -0
- package/src/toast/intl/cs-CZ.json +4 -0
- package/src/toast/intl/da-DK.json +4 -0
- package/src/toast/intl/de-DE.json +4 -0
- package/src/toast/intl/el-GR.json +4 -0
- package/src/toast/intl/en-US.json +4 -0
- package/src/toast/intl/es-ES.json +4 -0
- package/src/toast/intl/et-EE.json +4 -0
- package/src/toast/intl/fi-FI.json +4 -0
- package/src/toast/intl/fr-FR.json +4 -0
- package/src/toast/intl/he-IL.json +4 -0
- package/src/toast/intl/hr-HR.json +4 -0
- package/src/toast/intl/hu-HU.json +4 -0
- package/src/toast/intl/index.ts +123 -0
- package/src/toast/intl/it-IT.json +4 -0
- package/src/toast/intl/ja-JP.json +4 -0
- package/src/toast/intl/ko-KR.json +4 -0
- package/src/toast/intl/lt-LT.json +4 -0
- package/src/toast/intl/lv-LV.json +4 -0
- package/src/toast/intl/nb-NO.json +4 -0
- package/src/toast/intl/nl-NL.json +4 -0
- package/src/toast/intl/pl-PL.json +4 -0
- package/src/toast/intl/pt-BR.json +4 -0
- package/src/toast/intl/pt-PT.json +4 -0
- package/src/toast/intl/ro-RO.json +4 -0
- package/src/toast/intl/ru-RU.json +4 -0
- package/src/toast/intl/sk-SK.json +4 -0
- package/src/toast/intl/sl-SI.json +4 -0
- package/src/toast/intl/sr-SP.json +4 -0
- package/src/toast/intl/sv-SE.json +4 -0
- package/src/toast/intl/tr-TR.json +4 -0
- package/src/toast/intl/uk-UA.json +4 -0
- package/src/toast/intl/zh-CN.json +4 -0
- package/src/toast/intl/zh-TW.json +4 -0
- package/src/toggle/createToggle.ts +96 -15
- package/src/tokenfield/createToken.ts +82 -0
- package/src/tokenfield/createTokenField.ts +859 -0
- package/src/tokenfield/index.ts +10 -0
- package/src/toolbar/createToolbar.ts +26 -5
- package/src/tooltip/createPreviewTrigger.ts +301 -0
- package/src/tooltip/createSafeArea.ts +165 -0
- package/src/tooltip/createTooltip.ts +15 -1
- package/src/tooltip/createTooltipTrigger.ts +24 -3
- package/src/tooltip/index.ts +7 -0
- package/src/tooltip/intl/index.ts +76 -0
- package/src/tree/createTree.ts +65 -46
- package/src/tree/createTreeItem.ts +85 -21
- package/src/tree/createTreeSelectionCheckbox.ts +29 -28
- package/src/tree/intl/ar-AE.json +4 -0
- package/src/tree/intl/bg-BG.json +4 -0
- package/src/tree/intl/cs-CZ.json +4 -0
- package/src/tree/intl/da-DK.json +4 -0
- package/src/tree/intl/de-DE.json +4 -0
- package/src/tree/intl/el-GR.json +4 -0
- package/src/tree/intl/en-US.json +4 -0
- package/src/tree/intl/es-ES.json +4 -0
- package/src/tree/intl/et-EE.json +4 -0
- package/src/tree/intl/fi-FI.json +4 -0
- package/src/tree/intl/fr-FR.json +4 -0
- package/src/tree/intl/he-IL.json +4 -0
- package/src/tree/intl/hr-HR.json +4 -0
- package/src/tree/intl/hu-HU.json +4 -0
- package/src/tree/intl/index.ts +123 -0
- package/src/tree/intl/it-IT.json +4 -0
- package/src/tree/intl/ja-JP.json +4 -0
- package/src/tree/intl/ko-KR.json +4 -0
- package/src/tree/intl/lt-LT.json +4 -0
- package/src/tree/intl/lv-LV.json +4 -0
- package/src/tree/intl/nb-NO.json +4 -0
- package/src/tree/intl/nl-NL.json +4 -0
- package/src/tree/intl/pl-PL.json +4 -0
- package/src/tree/intl/pt-BR.json +4 -0
- package/src/tree/intl/pt-PT.json +4 -0
- package/src/tree/intl/ro-RO.json +4 -0
- package/src/tree/intl/ru-RU.json +4 -0
- package/src/tree/intl/sk-SK.json +4 -0
- package/src/tree/intl/sl-SI.json +4 -0
- package/src/tree/intl/sr-SP.json +4 -0
- package/src/tree/intl/sv-SE.json +4 -0
- package/src/tree/intl/tr-TR.json +4 -0
- package/src/tree/intl/uk-UA.json +4 -0
- package/src/tree/intl/zh-CN.json +4 -0
- package/src/tree/intl/zh-TW.json +4 -0
- package/src/tree/types.ts +35 -2
- package/src/utils/ShadowTreeWalker.ts +249 -0
- package/src/utils/animation.ts +106 -85
- package/src/utils/capture.ts +51 -0
- package/src/utils/createDescription.ts +31 -8
- package/src/utils/dom.ts +314 -33
- package/src/utils/domAttrs.ts +84 -0
- package/src/utils/env.ts +2 -0
- package/src/utils/events.ts +39 -3
- package/src/utils/filterDOMProps.ts +34 -2
- package/src/utils/focus.ts +186 -32
- package/src/utils/geometry.ts +15 -1
- package/src/utils/getMetaValue.ts +57 -0
- package/src/utils/getNonce.ts +40 -0
- package/src/utils/globalListeners.ts +16 -3
- package/src/utils/index.ts +14 -0
- package/src/utils/keyboard.ts +15 -1
- package/src/utils/mergeProps.ts +149 -16
- package/src/utils/owner.ts +26 -0
- package/src/utils/platform.ts +15 -1
- package/src/utils/reactivity.ts +2 -0
- package/src/utils/refs.ts +53 -0
- package/src/utils/runAfterTransition.ts +117 -0
- package/src/utils/scrollIntoView.ts +14 -0
- package/src/utils/splitProps.ts +70 -0
- package/src/utils/textSelection.ts +15 -1
- package/src/virtualizer/ScrollView.ts +210 -0
- package/src/virtualizer/index.ts +2 -0
- package/src/virtualizer/utils.ts +100 -0
- package/src/visually-hidden/createVisuallyHidden.ts +20 -4
- package/dist/_chunk/createInteractionModality.js +0 -268
- package/dist/_chunk/createInteractionModality.js.map +0 -1
- package/dist/_chunk/createInteractionModality.jsx +0 -268
- package/dist/_chunk/createInteractionModality.jsx.map +0 -1
- package/dist/_chunk/focus2.js +0 -631
- package/dist/_chunk/focus2.js.map +0 -1
- package/dist/_chunk/focus2.jsx +0 -631
- package/dist/_chunk/focus2.jsx.map +0 -1
- package/dist/_chunk/visually-hidden.js.map +0 -1
- package/dist/_chunk/visually-hidden.jsx.map +0 -1
- package/dist/checkbox/createCheckboxGroupState.d.ts +0 -71
- package/dist/checkbox/createCheckboxGroupState.d.ts.map +0 -1
- package/dist/radio/createRadioGroupState.d.ts +0 -77
- package/dist/radio/createRadioGroupState.d.ts.map +0 -1
- package/dist/toggle/createToggleState.d.ts +0 -34
- package/dist/toggle/createToggleState.d.ts.map +0 -1
- package/src/checkbox/createCheckboxGroupState.ts +0 -174
- package/src/radio/createRadioGroupState.ts +0 -177
- package/src/toggle/createToggleState.ts +0 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragManager.js","names":[],"sources":["../../src/dnd/utils.ts","../../src/dnd/DragManager.ts"],"sourcesContent":["/**\n * Drag and Drop utilities for solidaria.\n */\n\nimport type {\n DragItem,\n DragType,\n DropItem,\n TextDropItem,\n FileDropItem,\n DirectoryDropItem,\n DropOperation,\n} from \"@proyecto-viviana/solid-stately\";\nimport { DIRECTORY_DRAG_TYPE } from \"@proyecto-viviana/solid-stately\";\nimport { getInteractionModality } from \"../interactions\";\n\n// Native drag types that can be transferred between applications\nexport const NATIVE_DRAG_TYPES: Set<string> = new Set([\"text/plain\", \"text/uri-list\", \"text/html\"]);\n\n// Custom drag type for serializing multiple items\nexport const CUSTOM_DRAG_TYPE = \"application/vnd.solidaria.items+json\";\n\n// Generic type for unknown file types\nexport const GENERIC_TYPE = \"application/octet-stream\";\n\n// Drop operation bit flags\nexport enum DROP_OPERATION {\n none = 0,\n cancel = 0,\n move = 1 << 0,\n copy = 1 << 1,\n link = 1 << 2,\n all = (1 << 0) | (1 << 1) | (1 << 2),\n}\n\n// Map from effectAllowed to DROP_OPERATION\nexport const DROP_OPERATION_ALLOWED: Record<string, number> = {\n none: DROP_OPERATION.none,\n copy: DROP_OPERATION.copy,\n copyLink: DROP_OPERATION.copy | DROP_OPERATION.link,\n copyMove: DROP_OPERATION.copy | DROP_OPERATION.move,\n link: DROP_OPERATION.link,\n linkMove: DROP_OPERATION.link | DROP_OPERATION.move,\n move: DROP_OPERATION.move,\n all: DROP_OPERATION.all,\n uninitialized: DROP_OPERATION.all,\n};\n\n// Map from DROP_OPERATION to effectAllowed\nexport const EFFECT_ALLOWED: Record<number, string> = {\n [DROP_OPERATION.none]: \"none\",\n [DROP_OPERATION.move]: \"move\",\n [DROP_OPERATION.copy]: \"copy\",\n [DROP_OPERATION.copy | DROP_OPERATION.move]: \"copyMove\",\n [DROP_OPERATION.link]: \"link\",\n [DROP_OPERATION.link | DROP_OPERATION.move]: \"linkMove\",\n [DROP_OPERATION.copy | DROP_OPERATION.link]: \"copyLink\",\n [DROP_OPERATION.all]: \"all\",\n};\n\n// Map from dropEffect to DropOperation\nexport const DROP_EFFECT_TO_DROP_OPERATION: Record<string, DropOperation> = {\n none: \"cancel\",\n link: \"link\",\n copy: \"copy\",\n move: \"move\",\n};\n\n// Map from DropOperation to dropEffect\nexport const DROP_OPERATION_TO_DROP_EFFECT: Record<DropOperation, string> = {\n cancel: \"none\",\n link: \"link\",\n copy: \"copy\",\n move: \"move\",\n};\n\n/**\n * Maps the current interaction modality onto the drag modality used for\n * announcements and descriptions. Mirrors @react-aria/dnd `mapModality`:\n * pointer collapses to virtual, and a virtual modality on a coarse pointer\n * (touch screen reader) becomes touch.\n */\nfunction mapModality(modality: string | null): string {\n if (!modality) {\n modality = \"virtual\";\n }\n\n if (modality === \"pointer\") {\n modality = \"virtual\";\n }\n\n if (\n modality === \"virtual\" &&\n typeof window !== \"undefined\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(\"(pointer: coarse)\").matches\n ) {\n modality = \"touch\";\n }\n\n return modality;\n}\n\n/**\n * Returns the drag modality ('keyboard' | 'virtual' | 'touch') for the current\n * interaction. Mirrors @react-aria/dnd `getDragModality`.\n */\nexport function getDragModality(): string {\n return mapModality(getInteractionModality());\n}\n\n/**\n * Get the types present in drag items.\n */\nexport function getTypes(items: DragItem[]): Set<string> {\n const types = new Set<string>();\n for (const item of items) {\n for (const type of Object.keys(item)) {\n types.add(type);\n }\n }\n return types;\n}\n\n/**\n * Write drag items to a DataTransfer object.\n */\nexport function writeToDataTransfer(dataTransfer: DataTransfer, items: DragItem[]): void {\n const groupedByType = new Map<string, string[]>();\n let needsCustomData = false;\n const customData: object[] = [];\n\n for (const item of items) {\n const types = Object.keys(item);\n if (types.length > 1) {\n needsCustomData = true;\n }\n\n const dataByType: Record<string, string> = {};\n for (const type of types) {\n let typeItems = groupedByType.get(type);\n if (!typeItems) {\n typeItems = [];\n groupedByType.set(type, typeItems);\n } else {\n needsCustomData = true;\n }\n\n const data = item[type];\n dataByType[type] = data;\n typeItems.push(data);\n }\n\n customData.push(dataByType);\n }\n\n for (const [type, typeItems] of groupedByType) {\n if (NATIVE_DRAG_TYPES.has(type)) {\n // Join all items of this type with newlines\n const data = typeItems.join(\"\\n\");\n dataTransfer.items.add(data, type);\n } else {\n // Set first item for non-native types\n dataTransfer.items.add(typeItems[0], type);\n }\n }\n\n if (needsCustomData) {\n const data = JSON.stringify(customData);\n dataTransfer.items.add(data, CUSTOM_DRAG_TYPE);\n }\n}\n\n/**\n * Read drop items from a DataTransfer object.\n */\nexport function readFromDataTransfer(dataTransfer: DataTransfer): DropItem[] {\n const items: DropItem[] = [];\n\n if (!dataTransfer) {\n return items;\n }\n\n // Check for custom drag type first\n let hasCustomType = false;\n if (dataTransfer.types.includes(CUSTOM_DRAG_TYPE)) {\n try {\n const data = dataTransfer.getData(CUSTOM_DRAG_TYPE);\n const parsed = JSON.parse(data);\n for (const item of parsed) {\n items.push({\n kind: \"text\",\n types: new Set(Object.keys(item)),\n getText: (type) => Promise.resolve(item[type]),\n });\n }\n hasCustomType = true;\n } catch {\n // ignore parsing errors\n }\n }\n\n // Fall back to native items\n if (!hasCustomType) {\n const stringItems = new Map<string, string>();\n\n for (const item of dataTransfer.items) {\n if (item.kind === \"string\") {\n const type = item.type || GENERIC_TYPE;\n stringItems.set(type, dataTransfer.getData(item.type));\n } else if (item.kind === \"file\") {\n const file = item.getAsFile();\n if (file) {\n items.push(createFileItem(file));\n }\n }\n }\n\n if (stringItems.size > 0) {\n items.push({\n kind: \"text\",\n types: new Set(stringItems.keys()),\n getText: (type) => Promise.resolve(stringItems.get(type) ?? \"\"),\n });\n }\n }\n\n return items;\n}\n\n/**\n * Create a FileDropItem from a File object.\n */\nfunction createFileItem(file: File): FileDropItem {\n return {\n kind: \"file\",\n type: file.type || GENERIC_TYPE,\n name: file.name,\n getText: () => file.text(),\n getFile: () => Promise.resolve(file),\n };\n}\n\n/**\n * DragTypes implementation for checking drag types.\n */\nexport class DragTypesImpl {\n private types: Set<string>;\n private includesUnknownTypes: boolean;\n\n constructor(dataTransfer: DataTransfer) {\n this.types = new Set<string>();\n let hasFiles = false;\n\n for (const item of dataTransfer.items) {\n if (item.type !== CUSTOM_DRAG_TYPE) {\n if (item.kind === \"file\") {\n hasFiles = true;\n }\n if (item.type) {\n this.types.add(item.type);\n } else {\n this.types.add(GENERIC_TYPE);\n }\n }\n }\n\n // Safari doesn't expose file types until drop\n this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes(\"Files\");\n }\n\n has(type: DragType | DragType[]): boolean {\n if (Array.isArray(type)) {\n return type.some((t) => this.has(t));\n }\n\n if (\n this.includesUnknownTypes ||\n (type === DIRECTORY_DRAG_TYPE && this.types.has(GENERIC_TYPE)) ||\n type === \"*/*\"\n ) {\n return true;\n }\n\n if (typeof type === \"string\") {\n // Wildcard MIME match, e.g. \"image/*\" accepts \"image/png\".\n if (type.endsWith(\"/*\")) {\n for (const key of this.types) {\n if (key.startsWith(type.slice(0, -2))) {\n return true;\n }\n }\n return false;\n }\n return this.types.has(type);\n }\n\n return false;\n }\n}\n\n/**\n * Check if a drop item is a text item.\n */\nexport function isTextDropItem(dropItem: DropItem): dropItem is TextDropItem {\n return dropItem.kind === \"text\";\n}\n\n/**\n * Check if a drop item is a file item.\n */\nexport function isFileDropItem(dropItem: DropItem): dropItem is FileDropItem {\n return dropItem.kind === \"file\";\n}\n\n/**\n * Check if a drop item is a directory item.\n */\nexport function isDirectoryDropItem(dropItem: DropItem): dropItem is DirectoryDropItem {\n return dropItem.kind === \"directory\";\n}\n\n// Global state for tracking drag operations\nlet globalDropEffect: string | undefined;\nlet globalAllowedDropOperations: number = DROP_OPERATION.none;\n\nexport function setGlobalDropEffect(effect: string | undefined): void {\n globalDropEffect = effect;\n}\n\nexport function getGlobalDropEffect(): string | undefined {\n return globalDropEffect;\n}\n\nexport function setGlobalAllowedDropOperations(ops: number): void {\n globalAllowedDropOperations = ops;\n}\n\nexport function getGlobalAllowedDropOperations(): number {\n return globalAllowedDropOperations;\n}\n","/**\n * Global keyboard/virtual drag session manager.\n *\n * Faithful port of @react-aria/dnd `DragManager` (react-aria 3.50). A single\n * module-level singleton owns the active drag session: it registers drop targets\n * and drop items across every collection on the page, drives Tab/Shift+Tab\n * cycling between them, Enter-to-drop / Escape-to-cancel, and the aria-live\n * announcements — providing the accessible keyboard alternative to native\n * pointer drag and drop.\n *\n * The only framework-specific adaptation from upstream is the reactive\n * subscription: React's `useDragSession` (useState + a subscription Set) becomes\n * a module-level Solid signal exposed through `createDragSession()`. Element refs\n * (upstream `RefObject.current`) become Solid element accessors (`() => el`).\n */\n\nimport { createSignal, type Accessor } from \"solid-js\";\n\nimport { announce } from \"../live-announcer/announce\";\nimport { ariaHideOutside } from \"../overlays/ariaHideOutside\";\nimport type {\n DragEndEvent,\n DragItem,\n DropActivateEvent,\n DropEnterEvent,\n DropEvent,\n DropExitEvent,\n DropItem,\n DropOperation,\n DropTarget as DroppableCollectionTarget,\n} from \"@proyecto-viviana/solid-stately\";\nimport { getActiveElement, getEventTarget, nodeContains } from \"../utils/dom\";\nimport { getDragModality, getTypes } from \"./utils\";\nimport { isVirtualClick, isVirtualPointerEvent } from \"../utils/events\";\nimport type { LocalizedStringFormatter } from \"@internationalized/string\";\n\n/** A Solid element accessor, replacing upstream's `RefObject<T>.current`. */\ntype ElementAccessor = () => HTMLElement | null;\n\nlet dropTargets = new Map<Element, DropTarget>();\nlet dropItems = new Map<Element, DroppableItem>();\nlet dragSession: DragSession | null = null;\n\n// Reactive mirror of `dragSession` for `createDragSession()`. Solid's signal is\n// the notification mechanism, replacing upstream's `subscriptions` Set.\nconst [trackedDragSession, setTrackedDragSession] = createSignal<DragSession | null>(null);\n\ninterface DropTarget {\n element: HTMLElement;\n preventFocusOnDrop?: boolean;\n getDropOperation?: (types: Set<string>, allowedOperations: DropOperation[]) => DropOperation;\n onDropEnter?: (e: DropEnterEvent, dragTarget: DragTarget) => void;\n onDropExit?: (e: DropExitEvent) => void;\n onDropTargetEnter?: (target: DroppableCollectionTarget | null) => void;\n onDropActivate?: (e: DropActivateEvent, target: DroppableCollectionTarget | null) => void;\n onDrop?: (e: DropEvent, target: DroppableCollectionTarget | null) => void;\n onKeyDown?: (e: KeyboardEvent, dragTarget: DragTarget) => void;\n activateButtonRef?: ElementAccessor;\n}\n\nexport function registerDropTarget(target: DropTarget): () => void {\n dropTargets.set(target.element, target);\n dragSession?.updateValidDropTargets();\n return (): void => {\n dropTargets.delete(target.element);\n dragSession?.updateValidDropTargets();\n };\n}\n\ninterface DroppableItem {\n element: HTMLElement;\n target: DroppableCollectionTarget;\n getDropOperation?: (types: Set<string>, allowedOperations: DropOperation[]) => DropOperation;\n activateButtonRef?: ElementAccessor;\n}\n\nexport function registerDropItem(item: DroppableItem): () => void {\n dropItems.set(item.element, item);\n return (): void => {\n dropItems.delete(item.element);\n };\n}\n\ninterface DragTarget {\n element: HTMLElement;\n items: DragItem[];\n allowedDropOperations: DropOperation[];\n onDragEnd?: (e: DragEndEvent) => void;\n}\n\nexport function beginDragging(target: DragTarget, stringFormatter: LocalizedStringFormatter): void {\n if (dragSession) {\n throw new Error(\"Cannot begin dragging while already dragging\");\n }\n\n dragSession = new DragSession(target, stringFormatter);\n setTrackedDragSession(dragSession);\n requestAnimationFrame(() => {\n if (dragSession) {\n dragSession.setup();\n if (getDragModality() === \"keyboard\") {\n dragSession.next();\n }\n }\n });\n}\n\n/** Reactive accessor for the active drag session, or null. */\nexport function createDragSession(): Accessor<DragSession | null> {\n return trackedDragSession;\n}\n\n/** @private */\nexport function isVirtualDragging(): boolean {\n return !!dragSession;\n}\n\nfunction endDragging() {\n dragSession = null;\n setTrackedDragSession(null);\n}\n\nexport function isValidDropTarget(element: Element): boolean {\n for (let target of dropTargets.keys()) {\n if (nodeContains(target, element)) {\n return true;\n }\n }\n\n return false;\n}\n\nconst CANCELED_EVENTS = [\n \"pointerdown\",\n \"pointermove\",\n \"pointerenter\",\n \"pointerleave\",\n \"pointerover\",\n \"pointerout\",\n \"pointerup\",\n \"mousedown\",\n \"mousemove\",\n \"mouseenter\",\n \"mouseleave\",\n \"mouseover\",\n \"mouseout\",\n \"mouseup\",\n \"touchstart\",\n \"touchmove\",\n \"touchend\",\n \"focusin\",\n \"focusout\",\n];\n\nconst CLICK_EVENTS = [\"pointerup\", \"mouseup\", \"touchend\"];\n\nconst MESSAGES = {\n keyboard: \"dragStartedKeyboard\",\n touch: \"dragStartedTouch\",\n virtual: \"dragStartedVirtual\",\n};\n\nclass DragSession {\n dragTarget: DragTarget;\n validDropTargets: DropTarget[] = [];\n currentDropTarget: DropTarget | null = null;\n currentDropItem: DroppableItem | null = null;\n dropOperation: DropOperation | null = null;\n private mutationObserver: MutationObserver | null = null;\n private restoreAriaHidden: (() => void) | null = null;\n private stringFormatter: LocalizedStringFormatter;\n private isVirtualClick: boolean = false;\n private initialFocused: boolean;\n\n constructor(target: DragTarget, stringFormatter: LocalizedStringFormatter) {\n this.dragTarget = target;\n this.stringFormatter = stringFormatter;\n\n this.onKeyDown = this.onKeyDown.bind(this);\n this.onKeyUp = this.onKeyUp.bind(this);\n this.onFocus = this.onFocus.bind(this);\n this.onBlur = this.onBlur.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onPointerDown = this.onPointerDown.bind(this);\n this.cancelEvent = this.cancelEvent.bind(this);\n this.initialFocused = false;\n }\n\n setup(): void {\n document.addEventListener(\"keydown\", this.onKeyDown, true);\n document.addEventListener(\"keyup\", this.onKeyUp, true);\n window.addEventListener(\"focus\", this.onFocus, true);\n window.addEventListener(\"blur\", this.onBlur, true);\n document.addEventListener(\"click\", this.onClick, true);\n document.addEventListener(\"pointerdown\", this.onPointerDown, true);\n\n for (let event of CANCELED_EVENTS) {\n document.addEventListener(event, this.cancelEvent, true);\n }\n\n this.mutationObserver = new MutationObserver(() => this.updateValidDropTargets());\n this.updateValidDropTargets();\n\n announce(this.stringFormatter.format(MESSAGES[getDragModality() as keyof typeof MESSAGES]));\n }\n\n teardown(): void {\n document.removeEventListener(\"keydown\", this.onKeyDown, true);\n document.removeEventListener(\"keyup\", this.onKeyUp, true);\n window.removeEventListener(\"focus\", this.onFocus, true);\n window.removeEventListener(\"blur\", this.onBlur, true);\n document.removeEventListener(\"click\", this.onClick, true);\n document.removeEventListener(\"pointerdown\", this.onPointerDown, true);\n\n for (let event of CANCELED_EVENTS) {\n document.removeEventListener(event, this.cancelEvent, true);\n }\n\n this.mutationObserver?.disconnect();\n this.restoreAriaHidden?.();\n }\n\n onKeyDown(e: KeyboardEvent): void {\n this.cancelEvent(e);\n\n if (e.key === \"Escape\") {\n this.cancel();\n return;\n }\n\n if (e.key === \"Tab\" && !(e.metaKey || e.altKey || e.ctrlKey)) {\n if (e.shiftKey) {\n this.previous();\n } else {\n this.next();\n }\n }\n\n if (typeof this.currentDropTarget?.onKeyDown === \"function\") {\n this.currentDropTarget.onKeyDown(e, this.dragTarget);\n }\n }\n\n onKeyUp(e: KeyboardEvent): void {\n this.cancelEvent(e);\n\n if (e.key === \"Enter\") {\n if (e.altKey || nodeContains(this.getCurrentActivateButton(), getEventTarget<Node>(e))) {\n this.activate(this.currentDropTarget, this.currentDropItem);\n } else {\n this.drop();\n }\n }\n }\n\n getCurrentActivateButton(): HTMLElement | null {\n return (\n this.currentDropItem?.activateButtonRef?.() ??\n this.currentDropTarget?.activateButtonRef?.() ??\n null\n );\n }\n\n onFocus(e: FocusEvent): void {\n let activateButton = this.getCurrentActivateButton();\n let eventTarget = getEventTarget<HTMLElement>(e);\n if (eventTarget === activateButton) {\n // TODO: canceling this breaks the focus ring. Revisit when we support tabbing.\n this.cancelEvent(e);\n return;\n }\n\n // Prevent focus events, except to the original drag target.\n if (eventTarget !== this.dragTarget.element) {\n this.cancelEvent(e);\n }\n\n // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.\n if (!(eventTarget instanceof HTMLElement) || eventTarget === this.dragTarget.element) {\n return;\n }\n\n let dropTarget =\n this.validDropTargets.find((target) => target.element === eventTarget) ||\n this.validDropTargets.find((target) => nodeContains(target.element, eventTarget));\n\n if (!dropTarget) {\n if (this.currentDropTarget) {\n this.currentDropTarget.element.focus();\n } else {\n this.dragTarget.element.focus();\n }\n return;\n }\n\n let item = dropItems.get(eventTarget);\n if (dropTarget) {\n this.setCurrentDropTarget(dropTarget, item);\n }\n }\n\n onBlur(e: FocusEvent): void {\n let activateButton = this.getCurrentActivateButton();\n // Guard activateButton non-null so this doesn't trip on the case where\n // there's no activate button and the focused element loses focus to nothing\n // (browsers and jsdom 26+ both set relatedTarget to null in that case).\n if (activateButton && e.relatedTarget === activateButton) {\n this.cancelEvent(e);\n return;\n }\n\n if (getEventTarget(e) !== this.dragTarget.element) {\n this.cancelEvent(e);\n }\n\n // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),\n // restore focus back to the current drop target if any, or the original drag target.\n if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {\n if (this.currentDropTarget) {\n this.currentDropTarget.element.focus();\n } else {\n this.dragTarget.element.focus();\n }\n }\n }\n\n onClick(e: MouseEvent): void {\n this.cancelEvent(e);\n if (isVirtualClick(e) || this.isVirtualClick) {\n let dropElements = dropItems.values();\n let eventTarget = getEventTarget<HTMLElement>(e);\n let item = [...dropElements].find(\n (item) =>\n item.element === eventTarget ||\n nodeContains(item.activateButtonRef?.() ?? null, eventTarget),\n );\n let dropTarget = this.validDropTargets.find((target) =>\n nodeContains(target.element, eventTarget),\n );\n let activateButton = item?.activateButtonRef?.() ?? dropTarget?.activateButtonRef?.() ?? null;\n if (nodeContains(activateButton, eventTarget) && dropTarget) {\n this.activate(dropTarget, item);\n return;\n }\n\n if (getEventTarget(e) === this.dragTarget.element) {\n this.cancel();\n return;\n }\n\n if (dropTarget) {\n this.setCurrentDropTarget(dropTarget, item);\n this.drop(item);\n }\n }\n }\n\n onPointerDown(e: PointerEvent): void {\n // Android Talkback double tap has e.detail = 1 for onClick. Detect the virtual click in onPointerDown before onClick fires\n // so we can properly perform cancel and drop operations.\n this.cancelEvent(e);\n this.isVirtualClick = isVirtualPointerEvent(e);\n }\n\n cancelEvent(e: Event): void {\n // Allow focusin and focusout on the drag target so focus ring works properly.\n let eventTarget = getEventTarget(e);\n if (\n (e.type === \"focusin\" || e.type === \"focusout\") &&\n (eventTarget === this.dragTarget?.element || eventTarget === this.getCurrentActivateButton())\n ) {\n return;\n }\n\n // Allow default for events that might cancel a click event\n if (!CLICK_EVENTS.includes(e.type)) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n\n updateValidDropTargets(): void {\n if (!this.mutationObserver) {\n return;\n }\n\n this.mutationObserver.disconnect();\n if (this.restoreAriaHidden) {\n this.restoreAriaHidden();\n }\n\n this.validDropTargets = findValidDropTargets(this.dragTarget);\n\n // Shuffle drop target order based on starting drag target.\n if (this.validDropTargets.length > 0) {\n let nearestIndex = this.findNearestDropTarget();\n this.validDropTargets = [\n ...this.validDropTargets.slice(nearestIndex),\n ...this.validDropTargets.slice(0, nearestIndex),\n ];\n }\n\n if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n }\n\n // Find valid drop items within collections\n let types = getTypes(this.dragTarget.items);\n let validDropItems = [...dropItems.values()].filter((item) => {\n if (typeof item.getDropOperation === \"function\") {\n return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== \"cancel\";\n }\n\n return true;\n });\n\n // Filter out drop targets that contain valid items. We don't want to stop hiding elements\n // other than the drop items that exist inside the collection.\n let visibleDropTargets = this.validDropTargets.filter(\n (target) => !validDropItems.some((item) => nodeContains(target.element, item.element)),\n );\n\n this.restoreAriaHidden = ariaHideOutside(\n [\n this.dragTarget.element,\n ...validDropItems.flatMap((item) => {\n let button = item.activateButtonRef?.();\n return button ? [item.element, button] : [item.element];\n }),\n ...visibleDropTargets.flatMap((target) => {\n let button = target.activateButtonRef?.();\n return button ? [target.element, button] : [target.element];\n }),\n ],\n { shouldUseInert: true },\n );\n\n this.mutationObserver.observe(document.body, {\n subtree: true,\n attributes: true,\n attributeFilter: [\"aria-hidden\", \"inert\"],\n });\n }\n\n next(): void {\n // TODO: Allow tabbing to the activate button. Revisit once we fix the focus ring.\n // For now, the activate button is reachable by screen readers and ArrowLeft/ArrowRight\n // is usable specifically by Tree. Will need tabbing for other components.\n\n if (!this.currentDropTarget) {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n return;\n }\n\n let index = this.validDropTargets.indexOf(this.currentDropTarget);\n if (index < 0) {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n return;\n }\n\n // If we've reached the end of the valid drop targets, cycle back to the original drag target.\n // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).\n if (index === this.validDropTargets.length - 1) {\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.setCurrentDropTarget(null);\n this.dragTarget.element.focus();\n } else {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n }\n } else {\n this.setCurrentDropTarget(this.validDropTargets[index + 1]);\n }\n }\n\n previous(): void {\n if (!this.currentDropTarget) {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n return;\n }\n\n let index = this.validDropTargets.indexOf(this.currentDropTarget);\n if (index < 0) {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n return;\n }\n\n // If we've reached the start of the valid drop targets, cycle back to the original drag target.\n // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).\n if (index === 0) {\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.setCurrentDropTarget(null);\n this.dragTarget.element.focus();\n } else {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n }\n } else {\n this.setCurrentDropTarget(this.validDropTargets[index - 1]);\n }\n }\n\n findNearestDropTarget(): number {\n let dragTargetRect = this.dragTarget.element.getBoundingClientRect();\n\n let minDistance = Infinity;\n let nearest = -1;\n for (let i = 0; i < this.validDropTargets.length; i++) {\n let dropTarget = this.validDropTargets[i];\n let rect = dropTarget.element.getBoundingClientRect();\n let dx = rect.left - dragTargetRect.left;\n let dy = rect.top - dragTargetRect.top;\n let dist = dx * dx + dy * dy;\n if (dist < minDistance) {\n minDistance = dist;\n nearest = i;\n }\n }\n\n return nearest;\n }\n\n setCurrentDropTarget(dropTarget: DropTarget | null, item?: DroppableItem): void {\n if (dropTarget !== this.currentDropTarget) {\n if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === \"function\") {\n let rect = this.currentDropTarget.element.getBoundingClientRect();\n this.currentDropTarget.onDropExit({\n type: \"dropexit\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n });\n }\n\n this.currentDropTarget = dropTarget;\n\n if (dropTarget) {\n if (typeof dropTarget.onDropEnter === \"function\") {\n let rect = dropTarget.element.getBoundingClientRect();\n dropTarget.onDropEnter(\n {\n type: \"dropenter\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n },\n this.dragTarget,\n );\n }\n\n if (!item) {\n dropTarget?.element.focus();\n }\n }\n }\n\n if (item != null && item !== this.currentDropItem) {\n if (\n this.currentDropTarget &&\n typeof this.currentDropTarget.onDropTargetEnter === \"function\"\n ) {\n this.currentDropTarget.onDropTargetEnter(item.target);\n }\n item.element.focus();\n this.currentDropItem = item;\n\n // Announce first drop target after drag start announcement finishes.\n // Otherwise, it will never get announced because drag start announcement is assertive.\n if (!this.initialFocused) {\n let label = item?.element.getAttribute(\"aria-label\");\n if (label) {\n announce(label, \"polite\");\n }\n this.initialFocused = true;\n }\n }\n }\n\n end(): void {\n this.teardown();\n endDragging();\n\n if (typeof this.dragTarget.onDragEnd === \"function\") {\n let target =\n this.currentDropTarget && this.dropOperation !== \"cancel\"\n ? this.currentDropTarget\n : this.dragTarget;\n let rect = target.element.getBoundingClientRect();\n this.dragTarget.onDragEnd({\n type: \"dragend\",\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2,\n dropOperation: this.dropOperation || \"cancel\",\n });\n }\n\n if (this.currentDropTarget && !this.currentDropTarget.preventFocusOnDrop) {\n // Re-trigger focus event on active element, since it will not have received it during dragging (see cancelEvent).\n // This corrects state such as whether focus ring should appear.\n // useDroppableCollection handles this itself, so this is only for standalone drop zones.\n getActiveElement()?.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n }\n\n this.setCurrentDropTarget(null);\n }\n\n cancel(): void {\n this.setCurrentDropTarget(null);\n this.end();\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.dragTarget.element.focus();\n }\n\n // Re-trigger focus event on active element, since it will not have received it during dragging (see cancelEvent).\n getActiveElement()?.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n\n announce(this.stringFormatter.format(\"dropCanceled\"));\n }\n\n drop(item?: DroppableItem): void {\n if (!this.currentDropTarget) {\n this.cancel();\n return;\n }\n\n if (typeof item?.getDropOperation === \"function\") {\n let types = getTypes(this.dragTarget.items);\n this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);\n } else if (typeof this.currentDropTarget.getDropOperation === \"function\") {\n let types = getTypes(this.dragTarget.items);\n this.dropOperation = this.currentDropTarget.getDropOperation(\n types,\n this.dragTarget.allowedDropOperations,\n );\n } else {\n // TODO: show menu ??\n this.dropOperation = this.dragTarget.allowedDropOperations[0];\n }\n\n if (typeof this.currentDropTarget.onDrop === \"function\") {\n let items: DropItem[] = this.dragTarget.items.map((item) => ({\n kind: \"text\",\n types: new Set(Object.keys(item)),\n getText: (type: string) => Promise.resolve(item[type]),\n }));\n\n let rect = this.currentDropTarget.element.getBoundingClientRect();\n this.currentDropTarget.onDrop(\n {\n type: \"drop\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n items,\n dropOperation: this.dropOperation,\n },\n item?.target ?? null,\n );\n }\n\n this.end();\n announce(this.stringFormatter.format(\"dropComplete\"));\n }\n\n activate(dropTarget: DropTarget | null, dropItem: DroppableItem | null | undefined): void {\n if (dropTarget && typeof dropTarget.onDropActivate === \"function\") {\n let target = dropItem?.target ?? null;\n let rect = dropTarget.element.getBoundingClientRect();\n dropTarget.onDropActivate(\n {\n type: \"dropactivate\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n },\n target,\n );\n }\n }\n}\n\nfunction findValidDropTargets(options: DragTarget): DropTarget[] {\n let types = getTypes(options.items);\n return [...dropTargets.values()].filter((target) => {\n if (target.element.closest('[aria-hidden=\"true\"], [inert]')) {\n return false;\n }\n\n if (typeof target.getDropOperation === \"function\") {\n return target.getDropOperation(types, options.allowedDropOperations) !== \"cancel\";\n }\n\n return true;\n });\n}\n\nexport type { DragTarget, DropTarget, DroppableItem, DragSession };\n"],"mappings":";;;;;;;;AAiBA,MAAa,oBAAiC,IAAI,IAAI;CAAC;CAAc;CAAiB;AAAW,CAAC;AAGlG,MAAa,mBAAmB;AAGhC,MAAa,eAAe;AAG5B,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,SAAA,KAAA;;AACF,EAAA,CAAA,CAAA;AAGA,MAAa,yBAAiD;CAC5D,MAAA;CACA,MAAA;CACA,UAAU;CACV,UAAU;CACV,MAAA;CACA,UAAU;CACV,MAAA;CACA,KAAA;CACA,eAAA;AACF;AAGA,MAAa,iBAAyC;MAC7B;MACA;MACA;EACtB,IAA4C;MACtB;EACtB,IAA4C;EAC5C,IAA4C;MACvB;AACxB;AAGA,MAAa,gCAA+D;CAC1E,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;AACR;AAGA,MAAa,gCAA+D;CAC1E,QAAQ;CACR,MAAM;CACN,MAAM;CACN,MAAM;AACR;;;;;;;AAQA,SAAS,YAAY,UAAiC;CACpD,IAAI,CAAC,UACH,WAAW;CAGb,IAAI,aAAa,WACf,WAAW;CAGb,IACE,aAAa,aACb,OAAO,WAAW,eAClB,OAAO,OAAO,eAAe,cAC7B,OAAO,WAAW,mBAAmB,CAAC,CAAC,SAEvC,WAAW;CAGb,OAAO;AACT;;;;;AAMA,SAAgB,kBAA0B;CACx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;IACE,MAAM;IACN,GAAG,KAAK,OAAO,KAAK,QAAQ;IAC5B,GAAG,KAAK,MAAM,KAAK,SAAS;IAC5B;IACA,eAAe,KAAK;GACtB,GACA,MAAM,UAAU,IAClB;EACF;EAEA,KAAK,IAAI;EACT,SAAS,KAAK,gBAAgB,OAAO,cAAc,CAAC;CACtD;CAEA,SAAS,YAA+B,UAAkD;EACxF,IAAI,cAAc,OAAO,WAAW,mBAAmB,YAAY;GACjE,IAAI,SAAS,UAAU,UAAU;GACjC,IAAI,OAAO,WAAW,QAAQ,sBAAsB;GACpD,WAAW,eACT;IACE,MAAM;IACN,GAAG,KAAK,OAAO,KAAK,QAAQ;IAC5B,GAAG,KAAK,MAAM,KAAK,SAAS;GAC9B,GACA,MACF;EACF;CACF;AACF;AAEA,SAAS,qBAAqB,SAAmC;CAC/D,IAAI,QAAQ,SAAS,QAAQ,KAAK;CAClC,OAAO,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC,CAAC,QAAQ,WAAW;EAClD,IAAI,OAAO,QAAQ,QAAQ,iCAA+B,GACxD,OAAO;EAGT,IAAI,OAAO,OAAO,qBAAqB,YACrC,OAAO,OAAO,iBAAiB,OAAO,QAAQ,qBAAqB,MAAM;EAG3E,OAAO;CACT,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"DragManager.js","names":[],"sources":["../../src/dnd/utils.ts","../../src/dnd/DragManager.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/constants.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/utils.ts\n\n/**\n * Drag and Drop utilities for solidaria.\n *\n * Ported from:\n * - packages/react-aria/src/dnd/constants.ts\n * - packages/react-aria/src/dnd/utils.ts\n */\n\nimport type {\n DragItem,\n DragType,\n DropItem,\n TextDropItem,\n FileDropItem,\n DirectoryDropItem,\n DropOperation,\n} from \"@proyecto-viviana/solid-stately\";\nimport { DIRECTORY_DRAG_TYPE } from \"@proyecto-viviana/solid-stately\";\nimport { getInteractionModality } from \"../interactions\";\n\n// Native drag types that can be transferred between applications\nexport const NATIVE_DRAG_TYPES: Set<string> = new Set([\"text/plain\", \"text/uri-list\", \"text/html\"]);\n\n// Custom drag type for serializing multiple items\nexport const CUSTOM_DRAG_TYPE = \"application/vnd.solidaria.items+json\";\n\n// Generic type for unknown file types\nexport const GENERIC_TYPE = \"application/octet-stream\";\n\n// Drop operation bit flags\nexport enum DROP_OPERATION {\n none = 0,\n cancel = 0,\n move = 1 << 0,\n copy = 1 << 1,\n link = 1 << 2,\n all = (1 << 0) | (1 << 1) | (1 << 2),\n}\n\n// Map from effectAllowed to DROP_OPERATION\nexport const DROP_OPERATION_ALLOWED: Record<string, number> = {\n none: DROP_OPERATION.none,\n copy: DROP_OPERATION.copy,\n copyLink: DROP_OPERATION.copy | DROP_OPERATION.link,\n copyMove: DROP_OPERATION.copy | DROP_OPERATION.move,\n link: DROP_OPERATION.link,\n linkMove: DROP_OPERATION.link | DROP_OPERATION.move,\n move: DROP_OPERATION.move,\n all: DROP_OPERATION.all,\n uninitialized: DROP_OPERATION.all,\n};\n\n// Map from DROP_OPERATION to effectAllowed\nexport const EFFECT_ALLOWED: Record<number, string> = {\n [DROP_OPERATION.none]: \"none\",\n [DROP_OPERATION.move]: \"move\",\n [DROP_OPERATION.copy]: \"copy\",\n [DROP_OPERATION.copy | DROP_OPERATION.move]: \"copyMove\",\n [DROP_OPERATION.link]: \"link\",\n [DROP_OPERATION.link | DROP_OPERATION.move]: \"linkMove\",\n [DROP_OPERATION.copy | DROP_OPERATION.link]: \"copyLink\",\n [DROP_OPERATION.all]: \"all\",\n};\n\n// Map from dropEffect to DropOperation\nexport const DROP_EFFECT_TO_DROP_OPERATION: Record<string, DropOperation> = {\n none: \"cancel\",\n link: \"link\",\n copy: \"copy\",\n move: \"move\",\n};\n\n// Map from DropOperation to dropEffect\nexport const DROP_OPERATION_TO_DROP_EFFECT: Record<DropOperation, string> = {\n cancel: \"none\",\n link: \"link\",\n copy: \"copy\",\n move: \"move\",\n};\n\n/**\n * Maps the current interaction modality onto the drag modality used for\n * announcements and descriptions. Mirrors @react-aria/dnd `mapModality`:\n * pointer collapses to virtual, and a virtual modality on a coarse pointer\n * (touch screen reader) becomes touch.\n */\nfunction mapModality(modality: string | null): string {\n if (!modality) {\n modality = \"virtual\";\n }\n\n if (modality === \"pointer\") {\n modality = \"virtual\";\n }\n\n if (\n modality === \"virtual\" &&\n typeof window !== \"undefined\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(\"(pointer: coarse)\").matches\n ) {\n modality = \"touch\";\n }\n\n return modality;\n}\n\n/**\n * Returns the drag modality ('keyboard' | 'virtual' | 'touch') for the current\n * interaction. Mirrors @react-aria/dnd `getDragModality`.\n */\nexport function getDragModality(): string {\n return mapModality(getInteractionModality());\n}\n\n/**\n * Get the types present in drag items.\n */\nexport function getTypes(items: DragItem[]): Set<string> {\n const types = new Set<string>();\n for (const item of items) {\n for (const type of Object.keys(item)) {\n types.add(type);\n }\n }\n return types;\n}\n\n/**\n * Write drag items to a DataTransfer object.\n */\nexport function writeToDataTransfer(dataTransfer: DataTransfer, items: DragItem[]): void {\n const groupedByType = new Map<string, string[]>();\n let needsCustomData = false;\n const customData: object[] = [];\n\n for (const item of items) {\n const types = Object.keys(item);\n if (types.length > 1) {\n needsCustomData = true;\n }\n\n const dataByType: Record<string, string> = {};\n for (const type of types) {\n let typeItems = groupedByType.get(type);\n if (!typeItems) {\n typeItems = [];\n groupedByType.set(type, typeItems);\n } else {\n needsCustomData = true;\n }\n\n const data = item[type];\n dataByType[type] = data;\n typeItems.push(data);\n }\n\n customData.push(dataByType);\n }\n\n for (const [type, typeItems] of groupedByType) {\n if (NATIVE_DRAG_TYPES.has(type)) {\n // Join all items of this type with newlines\n const data = typeItems.join(\"\\n\");\n dataTransfer.items.add(data, type);\n } else {\n // Set first item for non-native types\n dataTransfer.items.add(typeItems[0], type);\n }\n }\n\n if (needsCustomData) {\n const data = JSON.stringify(customData);\n dataTransfer.items.add(data, CUSTOM_DRAG_TYPE);\n }\n}\n\n/**\n * Read drop items from a DataTransfer object.\n */\nexport function readFromDataTransfer(dataTransfer: DataTransfer): DropItem[] {\n const items: DropItem[] = [];\n\n if (!dataTransfer) {\n return items;\n }\n\n // Check for custom drag type first\n let hasCustomType = false;\n if (dataTransfer.types.includes(CUSTOM_DRAG_TYPE)) {\n try {\n const data = dataTransfer.getData(CUSTOM_DRAG_TYPE);\n const parsed = JSON.parse(data);\n for (const item of parsed) {\n items.push({\n kind: \"text\",\n types: new Set(Object.keys(item)),\n getText: (type) => Promise.resolve(item[type]),\n });\n }\n hasCustomType = true;\n } catch {\n // ignore parsing errors\n }\n }\n\n // Fall back to native items\n if (!hasCustomType) {\n const stringItems = new Map<string, string>();\n\n for (const item of dataTransfer.items) {\n if (item.kind === \"string\") {\n const type = item.type || GENERIC_TYPE;\n stringItems.set(type, dataTransfer.getData(item.type));\n } else if (item.kind === \"file\") {\n const file = item.getAsFile();\n if (file) {\n items.push(createFileItem(file));\n }\n }\n }\n\n if (stringItems.size > 0) {\n items.push({\n kind: \"text\",\n types: new Set(stringItems.keys()),\n getText: (type) => Promise.resolve(stringItems.get(type) ?? \"\"),\n });\n }\n }\n\n return items;\n}\n\n/**\n * Create a FileDropItem from a File object.\n */\nfunction createFileItem(file: File): FileDropItem {\n return {\n kind: \"file\",\n type: file.type || GENERIC_TYPE,\n name: file.name,\n getText: () => file.text(),\n getFile: () => Promise.resolve(file),\n };\n}\n\n/**\n * DragTypes implementation for checking drag types.\n */\nexport class DragTypesImpl {\n private types: Set<string>;\n private includesUnknownTypes: boolean;\n\n constructor(dataTransfer: DataTransfer) {\n this.types = new Set<string>();\n let hasFiles = false;\n\n for (const item of dataTransfer.items) {\n if (item.type !== CUSTOM_DRAG_TYPE) {\n if (item.kind === \"file\") {\n hasFiles = true;\n }\n if (item.type) {\n this.types.add(item.type);\n } else {\n this.types.add(GENERIC_TYPE);\n }\n }\n }\n\n // Safari doesn't expose file types until drop\n this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes(\"Files\");\n }\n\n has(type: DragType | DragType[]): boolean {\n if (Array.isArray(type)) {\n return type.some((t) => this.has(t));\n }\n\n if (\n this.includesUnknownTypes ||\n (type === DIRECTORY_DRAG_TYPE && this.types.has(GENERIC_TYPE)) ||\n type === \"*/*\"\n ) {\n return true;\n }\n\n if (typeof type === \"string\") {\n // Wildcard MIME match, e.g. \"image/*\" accepts \"image/png\".\n if (type.endsWith(\"/*\")) {\n for (const key of this.types) {\n if (key.startsWith(type.slice(0, -2))) {\n return true;\n }\n }\n return false;\n }\n return this.types.has(type);\n }\n\n return false;\n }\n}\n\n/**\n * Check if a drop item is a text item.\n */\nexport function isTextDropItem(dropItem: DropItem): dropItem is TextDropItem {\n return dropItem.kind === \"text\";\n}\n\n/**\n * Check if a drop item is a file item.\n */\nexport function isFileDropItem(dropItem: DropItem): dropItem is FileDropItem {\n return dropItem.kind === \"file\";\n}\n\n/**\n * Check if a drop item is a directory item.\n */\nexport function isDirectoryDropItem(dropItem: DropItem): dropItem is DirectoryDropItem {\n return dropItem.kind === \"directory\";\n}\n\n// Global state for tracking drag operations\nlet globalDropEffect: string | undefined;\nlet globalAllowedDropOperations: number = DROP_OPERATION.none;\n\nexport function setGlobalDropEffect(effect: string | undefined): void {\n globalDropEffect = effect;\n}\n\nexport function getGlobalDropEffect(): string | undefined {\n return globalDropEffect;\n}\n\nexport function setGlobalAllowedDropOperations(ops: number): void {\n globalAllowedDropOperations = ops;\n}\n\nexport function getGlobalAllowedDropOperations(): number {\n return globalAllowedDropOperations;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/DragManager.ts\n\n/**\n * Global keyboard/virtual drag session manager.\n *\n * Faithful port of @react-aria/dnd `DragManager` (react-aria 3.50). A single\n * module-level singleton owns the active drag session: it registers drop targets\n * and drop items across every collection on the page, drives Tab/Shift+Tab\n * cycling between them, Enter-to-drop / Escape-to-cancel, and the aria-live\n * announcements — providing the accessible keyboard alternative to native\n * pointer drag and drop.\n *\n * The only framework-specific adaptation from upstream is the reactive\n * subscription: React's `useDragSession` (useState + a subscription Set) becomes\n * a module-level Solid signal exposed through `createDragSession()`. Element refs\n * (upstream `RefObject.current`) become Solid element accessors (`() => el`).\n */\n\nimport { createSignal } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\n\nimport { announce } from \"../live-announcer/announce\";\nimport { ariaHideOutside } from \"../overlays/ariaHideOutside\";\nimport type {\n DragEndEvent,\n DragItem,\n DropActivateEvent,\n DropEnterEvent,\n DropEvent,\n DropExitEvent,\n DropItem,\n DropOperation,\n DropTarget as DroppableCollectionTarget,\n} from \"@proyecto-viviana/solid-stately\";\nimport { getActiveElement, getEventTarget, nodeContains } from \"../utils/dom\";\nimport { getDragModality, getTypes } from \"./utils\";\nimport { isVirtualClick, isVirtualPointerEvent } from \"../utils/events\";\nimport type { LocalizedStringFormatter } from \"@internationalized/string\";\n\n/** A Solid element accessor, replacing upstream's `RefObject<T>.current`. */\ntype ElementAccessor = () => HTMLElement | null;\n\nlet dropTargets = new Map<Element, DropTarget>();\nlet dropItems = new Map<Element, DroppableItem>();\nlet dragSession: DragSession | null = null;\n\n// Reactive mirror of `dragSession` for `createDragSession()`. Solid's signal is\n// the notification mechanism, replacing upstream's `subscriptions` Set.\nconst [trackedDragSession, setTrackedDragSession] = createSignal<DragSession | null>(null);\n\ninterface DropTarget {\n element: HTMLElement;\n preventFocusOnDrop?: boolean;\n getDropOperation?: (types: Set<string>, allowedOperations: DropOperation[]) => DropOperation;\n onDropEnter?: (e: DropEnterEvent, dragTarget: DragTarget) => void;\n onDropExit?: (e: DropExitEvent) => void;\n onDropTargetEnter?: (target: DroppableCollectionTarget | null) => void;\n onDropActivate?: (e: DropActivateEvent, target: DroppableCollectionTarget | null) => void;\n onDrop?: (e: DropEvent, target: DroppableCollectionTarget | null) => void;\n onKeyDown?: (e: KeyboardEvent, dragTarget: DragTarget) => void;\n activateButtonRef?: ElementAccessor;\n}\n\nexport function registerDropTarget(target: DropTarget): () => void {\n dropTargets.set(target.element, target);\n dragSession?.updateValidDropTargets();\n return (): void => {\n dropTargets.delete(target.element);\n dragSession?.updateValidDropTargets();\n };\n}\n\ninterface DroppableItem {\n element: HTMLElement;\n target: DroppableCollectionTarget;\n getDropOperation?: (types: Set<string>, allowedOperations: DropOperation[]) => DropOperation;\n activateButtonRef?: ElementAccessor;\n}\n\nexport function registerDropItem(item: DroppableItem): () => void {\n dropItems.set(item.element, item);\n dragSession?.updateValidDropTargets();\n return (): void => {\n dropItems.delete(item.element);\n dragSession?.updateValidDropTargets();\n };\n}\n\ninterface DragTarget {\n element: HTMLElement;\n items: DragItem[];\n allowedDropOperations: DropOperation[];\n onDragEnd?: (e: DragEndEvent) => void;\n}\n\nexport function beginDragging(target: DragTarget, stringFormatter: LocalizedStringFormatter): void {\n if (dragSession) {\n throw new Error(\"Cannot begin dragging while already dragging\");\n }\n\n dragSession = new DragSession(target, stringFormatter);\n setTrackedDragSession(dragSession);\n requestAnimationFrame(() => {\n if (dragSession) {\n dragSession.setup();\n if (getDragModality() === \"keyboard\") {\n dragSession.next();\n }\n }\n });\n}\n\n/** Reactive accessor for the active drag session, or null. */\nexport function createDragSession(): Accessor<DragSession | null> {\n return trackedDragSession;\n}\n\n/** @private */\nexport function isVirtualDragging(): boolean {\n return !!dragSession;\n}\n\nfunction endDragging() {\n dragSession = null;\n setTrackedDragSession(null);\n}\n\nexport function isValidDropTarget(element: Element): boolean {\n for (let target of dropTargets.keys()) {\n if (nodeContains(target, element)) {\n return true;\n }\n }\n\n return false;\n}\n\nconst CANCELED_EVENTS = [\n \"pointerdown\",\n \"pointermove\",\n \"pointerenter\",\n \"pointerleave\",\n \"pointerover\",\n \"pointerout\",\n \"pointerup\",\n \"mousedown\",\n \"mousemove\",\n \"mouseenter\",\n \"mouseleave\",\n \"mouseover\",\n \"mouseout\",\n \"mouseup\",\n \"touchstart\",\n \"touchmove\",\n \"touchend\",\n \"focusin\",\n \"focusout\",\n];\n\nconst CLICK_EVENTS = [\"pointerup\", \"mouseup\", \"touchend\"];\n\nconst MESSAGES = {\n keyboard: \"dragStartedKeyboard\",\n touch: \"dragStartedTouch\",\n virtual: \"dragStartedVirtual\",\n};\n\nclass DragSession {\n dragTarget: DragTarget;\n validDropTargets: DropTarget[] = [];\n currentDropTarget: DropTarget | null = null;\n currentDropItem: DroppableItem | null = null;\n dropOperation: DropOperation | null = null;\n private mutationObserver: MutationObserver | null = null;\n private restoreAriaHidden: (() => void) | null = null;\n private stringFormatter: LocalizedStringFormatter;\n private isVirtualClick: boolean = false;\n private initialFocused: boolean;\n\n constructor(target: DragTarget, stringFormatter: LocalizedStringFormatter) {\n this.dragTarget = target;\n this.stringFormatter = stringFormatter;\n\n this.onKeyDown = this.onKeyDown.bind(this);\n this.onKeyUp = this.onKeyUp.bind(this);\n this.onFocus = this.onFocus.bind(this);\n this.onBlur = this.onBlur.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onPointerDown = this.onPointerDown.bind(this);\n this.cancelEvent = this.cancelEvent.bind(this);\n this.initialFocused = false;\n }\n\n setup(): void {\n document.addEventListener(\"keydown\", this.onKeyDown, true);\n document.addEventListener(\"keyup\", this.onKeyUp, true);\n window.addEventListener(\"focus\", this.onFocus, true);\n window.addEventListener(\"blur\", this.onBlur, true);\n document.addEventListener(\"click\", this.onClick, true);\n document.addEventListener(\"pointerdown\", this.onPointerDown, true);\n\n for (let event of CANCELED_EVENTS) {\n document.addEventListener(event, this.cancelEvent, true);\n }\n\n this.mutationObserver = new MutationObserver(() => this.updateValidDropTargets());\n this.updateValidDropTargets();\n\n announce(this.stringFormatter.format(MESSAGES[getDragModality() as keyof typeof MESSAGES]));\n }\n\n teardown(): void {\n document.removeEventListener(\"keydown\", this.onKeyDown, true);\n document.removeEventListener(\"keyup\", this.onKeyUp, true);\n window.removeEventListener(\"focus\", this.onFocus, true);\n window.removeEventListener(\"blur\", this.onBlur, true);\n document.removeEventListener(\"click\", this.onClick, true);\n document.removeEventListener(\"pointerdown\", this.onPointerDown, true);\n\n for (let event of CANCELED_EVENTS) {\n document.removeEventListener(event, this.cancelEvent, true);\n }\n\n this.mutationObserver?.disconnect();\n this.restoreAriaHidden?.();\n }\n\n onKeyDown(e: KeyboardEvent): void {\n this.cancelEvent(e);\n\n if (e.key === \"Escape\") {\n this.cancel();\n return;\n }\n\n if (e.key === \"Tab\" && !(e.metaKey || e.altKey || e.ctrlKey)) {\n if (e.shiftKey) {\n this.previous();\n } else {\n this.next();\n }\n }\n\n if (typeof this.currentDropTarget?.onKeyDown === \"function\") {\n this.currentDropTarget.onKeyDown(e, this.dragTarget);\n }\n }\n\n onKeyUp(e: KeyboardEvent): void {\n this.cancelEvent(e);\n\n if (e.key === \"Enter\") {\n if (e.altKey || nodeContains(this.getCurrentActivateButton(), getEventTarget<Node>(e))) {\n this.activate(this.currentDropTarget, this.currentDropItem);\n } else {\n this.drop();\n }\n }\n }\n\n getCurrentActivateButton(): HTMLElement | null {\n return (\n this.currentDropItem?.activateButtonRef?.() ??\n this.currentDropTarget?.activateButtonRef?.() ??\n null\n );\n }\n\n onFocus(e: FocusEvent): void {\n let activateButton = this.getCurrentActivateButton();\n let eventTarget = getEventTarget<HTMLElement>(e);\n if (eventTarget === activateButton) {\n // TODO: canceling this breaks the focus ring. Revisit when we support tabbing.\n this.cancelEvent(e);\n return;\n }\n\n // Prevent focus events, except to the original drag target.\n if (eventTarget !== this.dragTarget.element) {\n this.cancelEvent(e);\n }\n\n // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.\n if (!(eventTarget instanceof HTMLElement) || eventTarget === this.dragTarget.element) {\n return;\n }\n\n let dropTarget =\n this.validDropTargets.find((target) => target.element === eventTarget) ||\n this.validDropTargets.find((target) => nodeContains(target.element, eventTarget));\n\n if (!dropTarget) {\n if (this.currentDropTarget) {\n this.currentDropTarget.element.focus();\n } else {\n this.dragTarget.element.focus();\n }\n return;\n }\n\n let item = dropItems.get(eventTarget);\n if (dropTarget) {\n this.setCurrentDropTarget(dropTarget, item);\n }\n }\n\n onBlur(e: FocusEvent): void {\n let activateButton = this.getCurrentActivateButton();\n // Guard activateButton non-null so this doesn't trip on the case where\n // there's no activate button and the focused element loses focus to nothing\n // (browsers and jsdom 26+ both set relatedTarget to null in that case).\n if (activateButton && e.relatedTarget === activateButton) {\n this.cancelEvent(e);\n return;\n }\n\n if (getEventTarget(e) !== this.dragTarget.element) {\n this.cancelEvent(e);\n }\n\n // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),\n // restore focus back to the current drop target if any, or the original drag target.\n if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {\n if (this.currentDropTarget) {\n this.currentDropTarget.element.focus();\n } else {\n this.dragTarget.element.focus();\n }\n }\n }\n\n onClick(e: MouseEvent): void {\n this.cancelEvent(e);\n if (isVirtualClick(e) || this.isVirtualClick) {\n let dropElements = dropItems.values();\n let eventTarget = getEventTarget<HTMLElement>(e);\n let item = [...dropElements].find(\n (item) =>\n item.element === eventTarget ||\n nodeContains(item.activateButtonRef?.() ?? null, eventTarget),\n );\n let dropTarget = this.validDropTargets.find((target) =>\n nodeContains(target.element, eventTarget),\n );\n let activateButton = item?.activateButtonRef?.() ?? dropTarget?.activateButtonRef?.() ?? null;\n if (nodeContains(activateButton, eventTarget) && dropTarget) {\n this.activate(dropTarget, item);\n return;\n }\n\n if (getEventTarget(e) === this.dragTarget.element) {\n this.cancel();\n return;\n }\n\n if (dropTarget) {\n this.setCurrentDropTarget(dropTarget, item);\n this.drop(item);\n }\n }\n }\n\n onPointerDown(e: PointerEvent): void {\n // Android Talkback double tap has e.detail = 1 for onClick. Detect the virtual click in onPointerDown before onClick fires\n // so we can properly perform cancel and drop operations.\n this.cancelEvent(e);\n this.isVirtualClick = isVirtualPointerEvent(e);\n }\n\n cancelEvent(e: Event): void {\n // Allow focusin and focusout on the drag target so focus ring works properly.\n let eventTarget = getEventTarget(e);\n if (\n (e.type === \"focusin\" || e.type === \"focusout\") &&\n (eventTarget === this.dragTarget?.element || eventTarget === this.getCurrentActivateButton())\n ) {\n return;\n }\n\n // Allow default for events that might cancel a click event\n if (!CLICK_EVENTS.includes(e.type)) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n\n updateValidDropTargets(): void {\n if (!this.mutationObserver) {\n return;\n }\n\n this.mutationObserver.disconnect();\n if (this.restoreAriaHidden) {\n this.restoreAriaHidden();\n }\n\n this.validDropTargets = findValidDropTargets(this.dragTarget);\n\n // Shuffle drop target order based on starting drag target.\n if (this.validDropTargets.length > 0) {\n let nearestIndex = this.findNearestDropTarget();\n this.validDropTargets = [\n ...this.validDropTargets.slice(nearestIndex),\n ...this.validDropTargets.slice(0, nearestIndex),\n ];\n }\n\n // RAC `DragManager.ts:421-423` uses object identity (`includes`). If the\n // collection hook re-registers a new DropTarget for the same element\n // mid-session, identity fails and `setCurrentDropTarget` without an item\n // focuses the collection (`listbox:Permissions`) instead of the indicator.\n // Match by element and swap the descriptor in place so keyboard handlers\n // stay current without bouncing DOM focus.\n if (this.currentDropTarget) {\n const currentEl = this.currentDropTarget.element;\n const replacement = this.validDropTargets.find((target) => target.element === currentEl);\n if (replacement) {\n this.currentDropTarget = replacement;\n } else {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n }\n }\n\n // Find valid drop items within collections\n let types = getTypes(this.dragTarget.items);\n let validDropItems = [...dropItems.values()].filter((item) => {\n if (typeof item.getDropOperation === \"function\") {\n return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== \"cancel\";\n }\n\n return true;\n });\n\n // Keyboard pickup calls `setCurrentDropTarget(collection)` with no item, so\n // the collection element is focused. RAC then focuses the active indicator\n // from `useDroppableItem`. If that effect loses the race (inert mutations\n // re-enter this method), `active` stays `listbox:Permissions`. When an\n // indicator already has `data-drop-target`, hand it to `setCurrentDropTarget`\n // as the item so focus lands there before aria-hide.\n if (this.currentDropTarget && this.currentDropItem == null) {\n const activeItem = validDropItems.find((item) =>\n item.element.hasAttribute(\"data-drop-target\"),\n );\n if (activeItem) {\n this.setCurrentDropTarget(this.currentDropTarget, activeItem);\n }\n }\n\n // Filter out drop targets that contain valid items. We don't want to stop hiding elements\n // other than the drop items that exist inside the collection.\n let visibleDropTargets = this.validDropTargets.filter(\n (target) => !validDropItems.some((item) => nodeContains(target.element, item.element)),\n );\n\n this.restoreAriaHidden = ariaHideOutside(\n [\n this.dragTarget.element,\n ...validDropItems.flatMap((item) => {\n let button = item.activateButtonRef?.();\n return button ? [item.element, button] : [item.element];\n }),\n ...visibleDropTargets.flatMap((target) => {\n let button = target.activateButtonRef?.();\n return button ? [target.element, button] : [target.element];\n }),\n ],\n { shouldUseInert: true },\n );\n\n this.mutationObserver.observe(document.body, {\n subtree: true,\n attributes: true,\n attributeFilter: [\"aria-hidden\", \"inert\"],\n });\n }\n\n next(): void {\n // TODO: Allow tabbing to the activate button. Revisit once we fix the focus ring.\n // For now, the activate button is reachable by screen readers and ArrowLeft/ArrowRight\n // is usable specifically by Tree. Will need tabbing for other components.\n\n if (!this.currentDropTarget) {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n return;\n }\n\n let index = this.validDropTargets.indexOf(this.currentDropTarget);\n if (index < 0) {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n return;\n }\n\n // If we've reached the end of the valid drop targets, cycle back to the original drag target.\n // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).\n if (index === this.validDropTargets.length - 1) {\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.setCurrentDropTarget(null);\n this.dragTarget.element.focus();\n } else {\n this.setCurrentDropTarget(this.validDropTargets[0]);\n }\n } else {\n this.setCurrentDropTarget(this.validDropTargets[index + 1]);\n }\n }\n\n previous(): void {\n if (!this.currentDropTarget) {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n return;\n }\n\n let index = this.validDropTargets.indexOf(this.currentDropTarget);\n if (index < 0) {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n return;\n }\n\n // If we've reached the start of the valid drop targets, cycle back to the original drag target.\n // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).\n if (index === 0) {\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.setCurrentDropTarget(null);\n this.dragTarget.element.focus();\n } else {\n this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);\n }\n } else {\n this.setCurrentDropTarget(this.validDropTargets[index - 1]);\n }\n }\n\n findNearestDropTarget(): number {\n let dragTargetRect = this.dragTarget.element.getBoundingClientRect();\n\n let minDistance = Infinity;\n let nearest = -1;\n let ancestor = -1;\n for (let i = 0; i < this.validDropTargets.length; i++) {\n let dropTarget = this.validDropTargets[i];\n // RAC `DragManager.ts:535-537`: prefer the collection that contains the\n // drag source so nested/side-by-side collections don't steal the session.\n if (ancestor < 0 && nodeContains(dropTarget.element, this.dragTarget.element)) {\n ancestor = i;\n }\n\n let rect = dropTarget.element.getBoundingClientRect();\n let dx = rect.left - dragTargetRect.left;\n let dy = rect.top - dragTargetRect.top;\n let dist = dx * dx + dy * dy;\n if (dist < minDistance) {\n minDistance = dist;\n nearest = i;\n }\n }\n\n return ancestor >= 0 ? ancestor : nearest;\n }\n\n setCurrentDropTarget(dropTarget: DropTarget | null, item?: DroppableItem): void {\n if (dropTarget !== this.currentDropTarget) {\n if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === \"function\") {\n let rect = this.currentDropTarget.element.getBoundingClientRect();\n this.currentDropTarget.onDropExit({\n type: \"dropexit\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n });\n }\n\n this.currentDropTarget = dropTarget;\n\n if (dropTarget) {\n if (typeof dropTarget.onDropEnter === \"function\") {\n let rect = dropTarget.element.getBoundingClientRect();\n dropTarget.onDropEnter(\n {\n type: \"dropenter\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n },\n this.dragTarget,\n );\n }\n\n if (!item) {\n dropTarget?.element.focus();\n }\n }\n }\n\n if (item != null && item !== this.currentDropItem) {\n if (\n this.currentDropTarget &&\n typeof this.currentDropTarget.onDropTargetEnter === \"function\"\n ) {\n this.currentDropTarget.onDropTargetEnter(item.target);\n }\n item.element.focus();\n this.currentDropItem = item;\n\n // Announce first drop target after drag start announcement finishes.\n // Otherwise, it will never get announced because drag start announcement is assertive.\n if (!this.initialFocused) {\n let label = item?.element.getAttribute(\"aria-label\");\n if (label) {\n announce(label, \"polite\");\n }\n this.initialFocused = true;\n }\n }\n }\n\n end(): void {\n this.teardown();\n endDragging();\n\n if (typeof this.dragTarget.onDragEnd === \"function\") {\n let target =\n this.currentDropTarget && this.dropOperation !== \"cancel\"\n ? this.currentDropTarget\n : this.dragTarget;\n let rect = target.element.getBoundingClientRect();\n this.dragTarget.onDragEnd({\n type: \"dragend\",\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2,\n dropOperation: this.dropOperation || \"cancel\",\n });\n }\n\n if (this.currentDropTarget && !this.currentDropTarget.preventFocusOnDrop) {\n // Re-trigger focus event on active element, since it will not have received it during dragging (see cancelEvent).\n // This corrects state such as whether focus ring should appear.\n // useDroppableCollection handles this itself, so this is only for standalone drop zones.\n getActiveElement()?.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n }\n\n this.setCurrentDropTarget(null);\n }\n\n cancel(): void {\n this.setCurrentDropTarget(null);\n this.end();\n if (!this.dragTarget.element.closest('[aria-hidden=\"true\"], [inert]')) {\n this.dragTarget.element.focus();\n }\n\n // Re-trigger focus event on active element, since it will not have received it during dragging (see cancelEvent).\n getActiveElement()?.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n\n announce(this.stringFormatter.format(\"dropCanceled\"));\n }\n\n drop(item?: DroppableItem): void {\n if (!this.currentDropTarget) {\n this.cancel();\n return;\n }\n\n if (typeof item?.getDropOperation === \"function\") {\n let types = getTypes(this.dragTarget.items);\n this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);\n } else if (typeof this.currentDropTarget.getDropOperation === \"function\") {\n let types = getTypes(this.dragTarget.items);\n this.dropOperation = this.currentDropTarget.getDropOperation(\n types,\n this.dragTarget.allowedDropOperations,\n );\n } else {\n // TODO: show menu ??\n this.dropOperation = this.dragTarget.allowedDropOperations[0];\n }\n\n if (typeof this.currentDropTarget.onDrop === \"function\") {\n let items: DropItem[] = this.dragTarget.items.map((item) => ({\n kind: \"text\",\n types: new Set(Object.keys(item)),\n getText: (type: string) => Promise.resolve(item[type]),\n }));\n\n let rect = this.currentDropTarget.element.getBoundingClientRect();\n this.currentDropTarget.onDrop(\n {\n type: \"drop\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n items,\n dropOperation: this.dropOperation,\n },\n item?.target ?? null,\n );\n }\n\n this.end();\n announce(this.stringFormatter.format(\"dropComplete\"));\n }\n\n activate(dropTarget: DropTarget | null, dropItem: DroppableItem | null | undefined): void {\n if (dropTarget && typeof dropTarget.onDropActivate === \"function\") {\n let target = dropItem?.target ?? null;\n let rect = dropTarget.element.getBoundingClientRect();\n dropTarget.onDropActivate(\n {\n type: \"dropactivate\",\n x: rect.left + rect.width / 2,\n y: rect.top + rect.height / 2,\n },\n target,\n );\n }\n }\n}\n\nfunction findValidDropTargets(options: DragTarget): DropTarget[] {\n let types = getTypes(options.items);\n return [...dropTargets.values()].filter((target) => {\n if (target.element.closest('[aria-hidden=\"true\"], [inert]')) {\n return false;\n }\n\n if (typeof target.getDropOperation === \"function\") {\n return target.getDropOperation(types, options.allowedDropOperations) !== \"cancel\";\n }\n\n return true;\n });\n}\n\nexport type { DragTarget, DropTarget, DroppableItem, DragSession };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,oCAAiC,IAAI,IAAI;CAAC;CAAc;CAAiB;AAAW,CAAC;AAGlG,MAAa,mBAAmB;AAGhC,MAAa,eAAe;AAG5B,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,SAAA,KAAA;;AACF,EAAA,CAAA,CAAA;AAGA,MAAa,yBAAiD;CAC5D,MAAA;CACA,MAAA;CACA,UAAU;CACV,UAAU;CACV,MAAA;CACA,UAAU;CACV,MAAA;CACA,KAAA;CACA,eAAA;AACF;AAGA,MAAa,iBAAyC;EAC7B,IAAA;EACA,IAAA;EACA,IAAA;EACtB,IAA4C;EACtB,IAAA;EACtB,IAA4C;EAC5C,IAA4C;EACvB,IAAA;AACxB;AAGA,MAAa,gCAA+D;CAC1E,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;AACR;AAGA,MAAa,gCAA+D;CAC1E,QAAQ;CACR,MAAM;CACN,MAAM;CACN,MAAM;AACR;;;;;;;AAQA,SAAS,YAAY,UA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qB,SAAmC;CAC/D,IAAI,QAAQ,SAAS,QAAQ,KAAK;CAClC,OAAO,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC,CAAC,QAAQ,WAAW;EAClD,IAAI,OAAO,QAAQ,QAAQ,iCAA+B,GACxD,OAAO;EAGT,IAAI,OAAO,OAAO,qBAAqB,YACrC,OAAO,OAAO,iBAAiB,OAAO,QAAQ,qBAAqB,MAAM;EAG3E,OAAO;CACT,CAAC;AACH"}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/DragManager.ts
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/constants.ts
|
|
25
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/dnd/utils.ts
|
|
26
|
+
import { H as isVirtualPointerEvent, N as getInteractionModality, V as isVirtualClick, n as getActiveElement, r as getEventTarget, v as nodeContains } from "./dom.jsx";
|
|
5
27
|
import { t as announce } from "./announce.jsx";
|
|
28
|
+
import { t as ariaHideOutside } from "./ariaHideOutside.jsx";
|
|
6
29
|
import { createSignal } from "solid-js";
|
|
7
30
|
import { DIRECTORY_DRAG_TYPE } from "@proyecto-viviana/solid-stately";
|
|
8
31
|
//#region src/dnd/utils.ts
|
|
9
|
-
const NATIVE_DRAG_TYPES = new Set([
|
|
32
|
+
const NATIVE_DRAG_TYPES = /* @__PURE__ */ new Set([
|
|
10
33
|
"text/plain",
|
|
11
34
|
"text/uri-list",
|
|
12
35
|
"text/html"
|
|
@@ -252,8 +275,10 @@ function registerDropTarget(target) {
|
|
|
252
275
|
}
|
|
253
276
|
function registerDropItem(item) {
|
|
254
277
|
dropItems.set(item.element, item);
|
|
278
|
+
dragSession?.updateValidDropTargets();
|
|
255
279
|
return () => {
|
|
256
280
|
dropItems.delete(item.element);
|
|
281
|
+
dragSession?.updateValidDropTargets();
|
|
257
282
|
};
|
|
258
283
|
}
|
|
259
284
|
function beginDragging(target, stringFormatter) {
|
|
@@ -362,14 +387,18 @@ var DragSession = class {
|
|
|
362
387
|
this.cancel();
|
|
363
388
|
return;
|
|
364
389
|
}
|
|
365
|
-
if (e.key === "Tab" && !(e.metaKey || e.altKey || e.ctrlKey))
|
|
366
|
-
|
|
390
|
+
if (e.key === "Tab" && !(e.metaKey || e.altKey || e.ctrlKey)) {
|
|
391
|
+
if (e.shiftKey) this.previous();
|
|
392
|
+
else this.next();
|
|
393
|
+
}
|
|
367
394
|
if (typeof this.currentDropTarget?.onKeyDown === "function") this.currentDropTarget.onKeyDown(e, this.dragTarget);
|
|
368
395
|
}
|
|
369
396
|
onKeyUp(e) {
|
|
370
397
|
this.cancelEvent(e);
|
|
371
|
-
if (e.key === "Enter")
|
|
372
|
-
|
|
398
|
+
if (e.key === "Enter") {
|
|
399
|
+
if (e.altKey || nodeContains(this.getCurrentActivateButton(), getEventTarget(e))) this.activate(this.currentDropTarget, this.currentDropItem);
|
|
400
|
+
else this.drop();
|
|
401
|
+
}
|
|
373
402
|
}
|
|
374
403
|
getCurrentActivateButton() {
|
|
375
404
|
return this.currentDropItem?.activateButtonRef?.() ?? this.currentDropTarget?.activateButtonRef?.() ?? null;
|
|
@@ -399,8 +428,10 @@ var DragSession = class {
|
|
|
399
428
|
return;
|
|
400
429
|
}
|
|
401
430
|
if (getEventTarget(e) !== this.dragTarget.element) this.cancelEvent(e);
|
|
402
|
-
if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement))
|
|
403
|
-
|
|
431
|
+
if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
|
|
432
|
+
if (this.currentDropTarget) this.currentDropTarget.element.focus();
|
|
433
|
+
else this.dragTarget.element.focus();
|
|
434
|
+
}
|
|
404
435
|
}
|
|
405
436
|
onClick(e) {
|
|
406
437
|
this.cancelEvent(e);
|
|
@@ -409,7 +440,8 @@ var DragSession = class {
|
|
|
409
440
|
let eventTarget = getEventTarget(e);
|
|
410
441
|
let item = [...dropElements].find((item) => item.element === eventTarget || nodeContains(item.activateButtonRef?.() ?? null, eventTarget));
|
|
411
442
|
let dropTarget = this.validDropTargets.find((target) => nodeContains(target.element, eventTarget));
|
|
412
|
-
|
|
443
|
+
let activateButton = item?.activateButtonRef?.() ?? dropTarget?.activateButtonRef?.() ?? null;
|
|
444
|
+
if (nodeContains(activateButton, eventTarget) && dropTarget) {
|
|
413
445
|
this.activate(dropTarget, item);
|
|
414
446
|
return;
|
|
415
447
|
}
|
|
@@ -443,12 +475,21 @@ var DragSession = class {
|
|
|
443
475
|
let nearestIndex = this.findNearestDropTarget();
|
|
444
476
|
this.validDropTargets = [...this.validDropTargets.slice(nearestIndex), ...this.validDropTargets.slice(0, nearestIndex)];
|
|
445
477
|
}
|
|
446
|
-
if (this.currentDropTarget
|
|
478
|
+
if (this.currentDropTarget) {
|
|
479
|
+
const currentEl = this.currentDropTarget.element;
|
|
480
|
+
const replacement = this.validDropTargets.find((target) => target.element === currentEl);
|
|
481
|
+
if (replacement) this.currentDropTarget = replacement;
|
|
482
|
+
else this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
483
|
+
}
|
|
447
484
|
let types = getTypes(this.dragTarget.items);
|
|
448
485
|
let validDropItems = [...dropItems.values()].filter((item) => {
|
|
449
486
|
if (typeof item.getDropOperation === "function") return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== "cancel";
|
|
450
487
|
return true;
|
|
451
488
|
});
|
|
489
|
+
if (this.currentDropTarget && this.currentDropItem == null) {
|
|
490
|
+
const activeItem = validDropItems.find((item) => item.element.hasAttribute("data-drop-target"));
|
|
491
|
+
if (activeItem) this.setCurrentDropTarget(this.currentDropTarget, activeItem);
|
|
492
|
+
}
|
|
452
493
|
let visibleDropTargets = this.validDropTargets.filter((target) => !validDropItems.some((item) => nodeContains(target.element, item.element)));
|
|
453
494
|
this.restoreAriaHidden = ariaHideOutside([
|
|
454
495
|
this.dragTarget.element,
|
|
@@ -477,11 +518,12 @@ var DragSession = class {
|
|
|
477
518
|
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
478
519
|
return;
|
|
479
520
|
}
|
|
480
|
-
if (index === this.validDropTargets.length - 1)
|
|
481
|
-
this.
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
521
|
+
if (index === this.validDropTargets.length - 1) {
|
|
522
|
+
if (!this.dragTarget.element.closest("[aria-hidden=\"true\"], [inert]")) {
|
|
523
|
+
this.setCurrentDropTarget(null);
|
|
524
|
+
this.dragTarget.element.focus();
|
|
525
|
+
} else this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
526
|
+
} else this.setCurrentDropTarget(this.validDropTargets[index + 1]);
|
|
485
527
|
}
|
|
486
528
|
previous() {
|
|
487
529
|
if (!this.currentDropTarget) {
|
|
@@ -493,18 +535,22 @@ var DragSession = class {
|
|
|
493
535
|
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
494
536
|
return;
|
|
495
537
|
}
|
|
496
|
-
if (index === 0)
|
|
497
|
-
this.
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
538
|
+
if (index === 0) {
|
|
539
|
+
if (!this.dragTarget.element.closest("[aria-hidden=\"true\"], [inert]")) {
|
|
540
|
+
this.setCurrentDropTarget(null);
|
|
541
|
+
this.dragTarget.element.focus();
|
|
542
|
+
} else this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
543
|
+
} else this.setCurrentDropTarget(this.validDropTargets[index - 1]);
|
|
501
544
|
}
|
|
502
545
|
findNearestDropTarget() {
|
|
503
546
|
let dragTargetRect = this.dragTarget.element.getBoundingClientRect();
|
|
504
547
|
let minDistance = Infinity;
|
|
505
548
|
let nearest = -1;
|
|
549
|
+
let ancestor = -1;
|
|
506
550
|
for (let i = 0; i < this.validDropTargets.length; i++) {
|
|
507
|
-
let
|
|
551
|
+
let dropTarget = this.validDropTargets[i];
|
|
552
|
+
if (ancestor < 0 && nodeContains(dropTarget.element, this.dragTarget.element)) ancestor = i;
|
|
553
|
+
let rect = dropTarget.element.getBoundingClientRect();
|
|
508
554
|
let dx = rect.left - dragTargetRect.left;
|
|
509
555
|
let dy = rect.top - dragTargetRect.top;
|
|
510
556
|
let dist = dx * dx + dy * dy;
|
|
@@ -513,7 +559,7 @@ var DragSession = class {
|
|
|
513
559
|
nearest = i;
|
|
514
560
|
}
|
|
515
561
|
}
|
|
516
|
-
return nearest;
|
|
562
|
+
return ancestor >= 0 ? ancestor : nearest;
|
|
517
563
|
}
|
|
518
564
|
setCurrentDropTarget(dropTarget, item) {
|
|
519
565
|
if (dropTarget !== this.currentDropTarget) {
|