@proyecto-viviana/solidaria 0.4.2 → 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 +687 -602
- package/dist/_chunk/datepicker.js.map +1 -1
- package/dist/_chunk/datepicker.jsx +687 -602
- 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 +226 -80
- package/dist/_chunk/select.js.map +1 -1
- package/dist/_chunk/select.jsx +162 -70
- 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 +52 -42
- package/dist/_chunk/spinbutton.js.map +1 -1
- package/dist/_chunk/spinbutton.jsx +52 -42
- 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/index.d.ts +2 -2
- package/dist/spinbutton/index.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 +30 -11
- package/src/actiongroup/createActionGroup.ts +49 -27
- 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 +38 -22
- package/src/datepicker/createDatePicker.ts +14 -0
- package/src/datepicker/createDatePickerGroup.ts +24 -12
- package/src/datepicker/createDateRangePicker.ts +14 -0
- package/src/datepicker/createDateSegment.ts +110 -46
- package/src/datepicker/createDisplayNames.ts +16 -1
- package/src/datepicker/createTimeField.ts +15 -5
- package/src/datepicker/intl.ts +623 -544
- 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 +60 -9
- package/src/dnd/DropTargetKeyboardNavigation.ts +8 -6
- package/src/dnd/createDrag.ts +18 -1
- package/src/dnd/createDraggableCollection.ts +96 -32
- package/src/dnd/createDraggableItem.ts +73 -31
- package/src/dnd/createDrop.ts +18 -1
- package/src/dnd/createDropIndicator.ts +92 -0
- package/src/dnd/createDroppableCollection.ts +113 -48
- 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 +80 -34
- 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/index.ts +2 -10
- package/src/spinbutton/intl.ts +70 -34
- 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 +104 -52
- 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 +15 -6
- 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 +66 -50
- 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
package/dist/_chunk/dialog.js
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
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/dialog/useDialog.ts
|
|
13
|
+
import { t as onOwnedCleanup } from "./owner.js";
|
|
1
14
|
import { t as filterDOMProps } from "./filterDOMProps.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
15
|
+
import { D as runAfterPaint, w as focusSafely } from "./dom.js";
|
|
16
|
+
import { createSlotId } from "../ssr/index.js";
|
|
17
|
+
import { createMemo, createSignal, createTrackedEffect } from "solid-js";
|
|
4
18
|
//#region src/dialog/createDialog.ts
|
|
5
19
|
/**
|
|
6
20
|
* Ported from React Aria:
|
|
@@ -13,30 +27,45 @@ import { createEffect, createMemo, createSignal, createUniqueId, onCleanup } fro
|
|
|
13
27
|
function createDialog(props, ref) {
|
|
14
28
|
const getProps = typeof props === "function" ? props : () => props;
|
|
15
29
|
const role = () => getProps().role ?? "dialog";
|
|
16
|
-
const generatedTitleId =
|
|
30
|
+
const generatedTitleId = createSlotId();
|
|
31
|
+
const generatedContentId = createSlotId();
|
|
17
32
|
const [isRefocusing, setIsRefocusing] = createSignal(false);
|
|
18
33
|
const titleId = createMemo(() => {
|
|
34
|
+
return getProps()["aria-label"] ? void 0 : generatedTitleId();
|
|
35
|
+
});
|
|
36
|
+
const contentId = createMemo(() => {
|
|
19
37
|
const p = getProps();
|
|
20
|
-
|
|
21
|
-
return p["aria-label"] ? void 0 : generatedTitleId;
|
|
38
|
+
return role() === "alertdialog" && !p["aria-describedby"] ? generatedContentId() : void 0;
|
|
22
39
|
});
|
|
23
|
-
|
|
40
|
+
let didScheduleInitialFocus = false;
|
|
41
|
+
let cancelInitialFocus;
|
|
42
|
+
let safariTimeout;
|
|
43
|
+
createTrackedEffect(() => {
|
|
24
44
|
if (typeof document === "undefined") return;
|
|
45
|
+
if (didScheduleInitialFocus) return;
|
|
25
46
|
const dialogEl = ref();
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
47
|
+
if (!dialogEl) return;
|
|
48
|
+
didScheduleInitialFocus = true;
|
|
49
|
+
const doc = dialogEl.ownerDocument;
|
|
50
|
+
cancelInitialFocus = runAfterPaint(() => {
|
|
51
|
+
cancelInitialFocus = void 0;
|
|
52
|
+
const el = ref();
|
|
53
|
+
if (!el || el.contains(doc.activeElement)) return;
|
|
54
|
+
focusSafely(el);
|
|
55
|
+
safariTimeout = setTimeout(() => {
|
|
56
|
+
safariTimeout = void 0;
|
|
57
|
+
if (doc.activeElement === el || doc.activeElement === doc.body) {
|
|
30
58
|
setIsRefocusing(true);
|
|
31
|
-
|
|
32
|
-
focusSafely(
|
|
59
|
+
el.blur();
|
|
60
|
+
focusSafely(el);
|
|
33
61
|
setIsRefocusing(false);
|
|
34
62
|
}
|
|
35
63
|
}, 500);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
64
|
+
}, doc);
|
|
65
|
+
});
|
|
66
|
+
onOwnedCleanup(() => {
|
|
67
|
+
cancelInitialFocus?.();
|
|
68
|
+
if (safariTimeout !== void 0) clearTimeout(safariTimeout);
|
|
40
69
|
});
|
|
41
70
|
return {
|
|
42
71
|
dialogProps: createMemo(() => {
|
|
@@ -46,14 +75,15 @@ function createDialog(props, ref) {
|
|
|
46
75
|
role: role(),
|
|
47
76
|
tabIndex: -1,
|
|
48
77
|
"aria-label": p["aria-label"],
|
|
49
|
-
"aria-labelledby": p["aria-labelledby"]
|
|
50
|
-
"aria-describedby": p["aria-describedby"],
|
|
78
|
+
"aria-labelledby": p["aria-labelledby"] ?? titleId(),
|
|
79
|
+
"aria-describedby": p["aria-describedby"] ?? contentId(),
|
|
51
80
|
onBlur: (e) => {
|
|
52
81
|
if (isRefocusing()) e.stopPropagation();
|
|
53
82
|
}
|
|
54
83
|
};
|
|
55
84
|
}),
|
|
56
|
-
titleProps: createMemo(() => ({ id: titleId() }))
|
|
85
|
+
titleProps: createMemo(() => ({ id: titleId() })),
|
|
86
|
+
contentProps: createMemo(() => ({ id: contentId() }))
|
|
57
87
|
};
|
|
58
88
|
}
|
|
59
89
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":[],"sources":["../../src/dialog/createDialog.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/**\n * Ported from React Aria:\n * https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/dialog/src/useDialog.ts\n */\n\nimport {\
|
|
1
|
+
{"version":3,"file":"dialog.js","names":[],"sources":["../../src/dialog/createDialog.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/dialog/useDialog.ts\n\n/**\n * Ported from React Aria:\n * https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/dialog/src/useDialog.ts\n */\n\nimport { filterDOMProps, focusSafely, onOwnedCleanup } from \"../utils\";\nimport { Accessor, createMemo, createSignal, createTrackedEffect } from \"solid-js\";\nimport { createSlotId } from \"../ssr\";\nimport { runAfterPaint } from \"../utils/focus\";\nimport type { AriaLabelingProps, DOMProps } from \"./types\";\n\nexport interface AriaDialogProps extends DOMProps, AriaLabelingProps {\n /**\n * The role of the dialog element.\n * @default 'dialog'\n */\n role?: \"dialog\" | \"alertdialog\";\n}\n\nexport interface DialogAria {\n /** Props for the dialog container element. */\n dialogProps: Accessor<Record<string, unknown>>;\n\n /** Props for the dialog title element. */\n titleProps: Accessor<Record<string, unknown>>;\n\n /** Props for the dialog content/description element. Used for aria-describedby on alertdialogs. */\n contentProps: Accessor<Record<string, unknown>>;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a dialog component.\n * A dialog is an overlay shown above other content in an application.\n */\nexport function createDialog(\n props: AriaDialogProps | Accessor<AriaDialogProps>,\n ref: Accessor<HTMLElement | undefined>,\n): DialogAria {\n // Support both direct props and accessor pattern\n const getProps = typeof props === \"function\" ? props : () => props;\n\n const role = () => getProps().role ?? \"dialog\";\n // Slot ids, like upstream `useDialog` (`useSlotId`): each resolves to\n // undefined unless an element actually renders with it, so a dialog without a\n // title or an alertdialog without content never points at a missing node.\n const generatedTitleId = createSlotId();\n const generatedContentId = createSlotId();\n const [isRefocusing, setIsRefocusing] = createSignal(false);\n\n const titleId = createMemo(() => {\n const p = getProps();\n return p[\"aria-label\"] ? undefined : generatedTitleId();\n });\n\n const contentId = createMemo(() => {\n const p = getProps();\n return role() === \"alertdialog\" && !p[\"aria-describedby\"] ? generatedContentId() : undefined;\n });\n\n // Match @react-aria/dialog `useDialog`: initial focus is `useEffect`-timed\n // (after paint), not a sync `createEffect` inside the opening click flush.\n let didScheduleInitialFocus = false;\n let cancelInitialFocus: (() => void) | undefined;\n let safariTimeout: ReturnType<typeof setTimeout> | undefined;\n createTrackedEffect(() => {\n if (typeof document === \"undefined\") return;\n if (didScheduleInitialFocus) return;\n\n const dialogEl = ref();\n if (!dialogEl) return;\n\n didScheduleInitialFocus = true;\n const doc = dialogEl.ownerDocument;\n cancelInitialFocus = runAfterPaint(() => {\n cancelInitialFocus = undefined;\n const el = ref();\n if (!el || el.contains(doc.activeElement)) {\n return;\n }\n\n focusSafely(el);\n\n // Safari on iOS does not move the VoiceOver cursor to the dialog\n // or announce that it has opened until it has rendered. A workaround\n // is to wait for half a second, then blur and re-focus the dialog.\n safariTimeout = setTimeout(() => {\n safariTimeout = undefined;\n if (doc.activeElement === el || doc.activeElement === doc.body) {\n setIsRefocusing(true);\n el.blur();\n focusSafely(el);\n setIsRefocusing(false);\n }\n }, 500);\n }, doc);\n });\n onOwnedCleanup(() => {\n cancelInitialFocus?.();\n if (safariTimeout !== undefined) {\n clearTimeout(safariTimeout);\n }\n });\n\n // Note: Focus containment is typically handled by createModal at a higher level\n // For standalone dialogs, focus containment should be managed by the overlay system\n\n const dialogProps = createMemo(() => {\n const p = getProps();\n return {\n ...filterDOMProps(p),\n role: role(),\n tabIndex: -1,\n \"aria-label\": p[\"aria-label\"],\n \"aria-labelledby\": p[\"aria-labelledby\"] ?? titleId(),\n \"aria-describedby\": p[\"aria-describedby\"] ?? contentId(),\n // Prevent blur events from reaching createOverlay, which may cause\n // popovers to close. Since focus is contained within the dialog,\n // we don't want this to occur due to the above createEffect.\n onBlur: (e: FocusEvent) => {\n if (isRefocusing()) {\n e.stopPropagation();\n }\n },\n };\n });\n\n const titlePropsValue = createMemo(() => ({\n id: titleId(),\n }));\n\n const contentPropsValue = createMemo(() => ({\n id: contentId(),\n }));\n\n return {\n dialogProps,\n titleProps: titlePropsValue,\n contentProps: contentPropsValue,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,aACd,OACA,KACY;CAEZ,MAAM,WAAW,OAAO,UAAU,aAAa,cAAc;CAE7D,MAAM,aAAa,SAAS,CAAC,CAAC,QAAQ;CAItC,MAAM,mBAAmB,aAAa;CACtC,MAAM,qBAAqB,aAAa;CACxC,MAAM,CAAC,cAAc,mBAAmB,aAAa,KAAK;CAE1D,MAAM,UAAU,iBAAiB;EAE/B,OADU,SACH,CAAC,CAAC,gBAAgB,KAAA,IAAY,iBAAiB;CACxD,CAAC;CAED,MAAM,YAAY,iBAAiB;EACjC,MAAM,IAAI,SAAS;EACnB,OAAO,KAAK,MAAM,iBAAiB,CAAC,EAAE,sBAAsB,mBAAmB,IAAI,KAAA;CACrF,CAAC;CAID,IAAI,0BAA0B;CAC9B,IAAI;CACJ,IAAI;CACJ,0BAA0B;EACxB,IAAI,OAAO,aAAa,aAAa;EACrC,IAAI,yBAAyB;EAE7B,MAAM,WAAW,IAAI;EACrB,IAAI,CAAC,UAAU;EAEf,0BAA0B;EAC1B,MAAM,MAAM,SAAS;EACrB,qBAAqB,oBAAoB;GACvC,qBAAqB,KAAA;GACrB,MAAM,KAAK,IAAI;GACf,IAAI,CAAC,MAAM,GAAG,SAAS,IAAI,aAAa,GACtC;GAGF,YAAY,EAAE;GAKd,gBAAgB,iBAAiB;IAC/B,gBAAgB,KAAA;IAChB,IAAI,IAAI,kBAAkB,MAAM,IAAI,kBAAkB,IAAI,MAAM;KAC9D,gBAAgB,IAAI;KACpB,GAAG,KAAK;KACR,YAAY,EAAE;KACd,gBAAgB,KAAK;IACvB;GACF,GAAG,GAAG;EACR,GAAG,GAAG;CACR,CAAC;CACD,qBAAqB;EACnB,qBAAqB;EACrB,IAAI,kBAAkB,KAAA,GACpB,aAAa,aAAa;CAE9B,CAAC;CAiCD,OAAO;EACL,aA7BkB,iBAAiB;GACnC,MAAM,IAAI,SAAS;GACnB,OAAO;IACL,GAAG,eAAe,CAAC;IACnB,MAAM,KAAK;IACX,UAAU;IACV,cAAc,EAAE;IAChB,mBAAmB,EAAE,sBAAsB,QAAQ;IACnD,oBAAoB,EAAE,uBAAuB,UAAU;IAIvD,SAAS,MAAkB;KACzB,IAAI,aAAa,GACf,EAAE,gBAAgB;IAEtB;GACF;EACF,CAWY;EACV,YAVsB,kBAAkB,EACxC,IAAI,QAAQ,EACd,EAQ4B;EAC1B,cAPwB,kBAAkB,EAC1C,IAAI,UAAU,EAChB,EAKgC;CAChC;AACF"}
|
package/dist/_chunk/dialog.jsx
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
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/dialog/useDialog.ts
|
|
13
|
+
import { t as onOwnedCleanup } from "./owner.jsx";
|
|
1
14
|
import { t as filterDOMProps } from "./filterDOMProps.jsx";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
15
|
+
import { D as runAfterPaint, w as focusSafely } from "./dom.jsx";
|
|
16
|
+
import { createSlotId } from "../ssr/index.jsx";
|
|
17
|
+
import { createMemo, createSignal, createTrackedEffect } from "solid-js";
|
|
4
18
|
//#region src/dialog/createDialog.ts
|
|
5
19
|
/**
|
|
6
20
|
* Ported from React Aria:
|
|
@@ -13,30 +27,45 @@ import { createEffect, createMemo, createSignal, createUniqueId, onCleanup } fro
|
|
|
13
27
|
function createDialog(props, ref) {
|
|
14
28
|
const getProps = typeof props === "function" ? props : () => props;
|
|
15
29
|
const role = () => getProps().role ?? "dialog";
|
|
16
|
-
const generatedTitleId =
|
|
30
|
+
const generatedTitleId = createSlotId();
|
|
31
|
+
const generatedContentId = createSlotId();
|
|
17
32
|
const [isRefocusing, setIsRefocusing] = createSignal(false);
|
|
18
33
|
const titleId = createMemo(() => {
|
|
34
|
+
return getProps()["aria-label"] ? void 0 : generatedTitleId();
|
|
35
|
+
});
|
|
36
|
+
const contentId = createMemo(() => {
|
|
19
37
|
const p = getProps();
|
|
20
|
-
|
|
21
|
-
return p["aria-label"] ? void 0 : generatedTitleId;
|
|
38
|
+
return role() === "alertdialog" && !p["aria-describedby"] ? generatedContentId() : void 0;
|
|
22
39
|
});
|
|
23
|
-
|
|
40
|
+
let didScheduleInitialFocus = false;
|
|
41
|
+
let cancelInitialFocus;
|
|
42
|
+
let safariTimeout;
|
|
43
|
+
createTrackedEffect(() => {
|
|
24
44
|
if (typeof document === "undefined") return;
|
|
45
|
+
if (didScheduleInitialFocus) return;
|
|
25
46
|
const dialogEl = ref();
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
47
|
+
if (!dialogEl) return;
|
|
48
|
+
didScheduleInitialFocus = true;
|
|
49
|
+
const doc = dialogEl.ownerDocument;
|
|
50
|
+
cancelInitialFocus = runAfterPaint(() => {
|
|
51
|
+
cancelInitialFocus = void 0;
|
|
52
|
+
const el = ref();
|
|
53
|
+
if (!el || el.contains(doc.activeElement)) return;
|
|
54
|
+
focusSafely(el);
|
|
55
|
+
safariTimeout = setTimeout(() => {
|
|
56
|
+
safariTimeout = void 0;
|
|
57
|
+
if (doc.activeElement === el || doc.activeElement === doc.body) {
|
|
30
58
|
setIsRefocusing(true);
|
|
31
|
-
|
|
32
|
-
focusSafely(
|
|
59
|
+
el.blur();
|
|
60
|
+
focusSafely(el);
|
|
33
61
|
setIsRefocusing(false);
|
|
34
62
|
}
|
|
35
63
|
}, 500);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
64
|
+
}, doc);
|
|
65
|
+
});
|
|
66
|
+
onOwnedCleanup(() => {
|
|
67
|
+
cancelInitialFocus?.();
|
|
68
|
+
if (safariTimeout !== void 0) clearTimeout(safariTimeout);
|
|
40
69
|
});
|
|
41
70
|
return {
|
|
42
71
|
dialogProps: createMemo(() => {
|
|
@@ -46,14 +75,15 @@ function createDialog(props, ref) {
|
|
|
46
75
|
role: role(),
|
|
47
76
|
tabIndex: -1,
|
|
48
77
|
"aria-label": p["aria-label"],
|
|
49
|
-
"aria-labelledby": p["aria-labelledby"]
|
|
50
|
-
"aria-describedby": p["aria-describedby"],
|
|
78
|
+
"aria-labelledby": p["aria-labelledby"] ?? titleId(),
|
|
79
|
+
"aria-describedby": p["aria-describedby"] ?? contentId(),
|
|
51
80
|
onBlur: (e) => {
|
|
52
81
|
if (isRefocusing()) e.stopPropagation();
|
|
53
82
|
}
|
|
54
83
|
};
|
|
55
84
|
}),
|
|
56
|
-
titleProps: createMemo(() => ({ id: titleId() }))
|
|
85
|
+
titleProps: createMemo(() => ({ id: titleId() })),
|
|
86
|
+
contentProps: createMemo(() => ({ id: contentId() }))
|
|
57
87
|
};
|
|
58
88
|
}
|
|
59
89
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.jsx","names":[],"sources":["../../src/dialog/createDialog.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/**\n * Ported from React Aria:\n * https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/dialog/src/useDialog.ts\n */\n\nimport {\
|
|
1
|
+
{"version":3,"file":"dialog.jsx","names":[],"sources":["../../src/dialog/createDialog.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/dialog/useDialog.ts\n\n/**\n * Ported from React Aria:\n * https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/dialog/src/useDialog.ts\n */\n\nimport { filterDOMProps, focusSafely, onOwnedCleanup } from \"../utils\";\nimport { Accessor, createMemo, createSignal, createTrackedEffect } from \"solid-js\";\nimport { createSlotId } from \"../ssr\";\nimport { runAfterPaint } from \"../utils/focus\";\nimport type { AriaLabelingProps, DOMProps } from \"./types\";\n\nexport interface AriaDialogProps extends DOMProps, AriaLabelingProps {\n /**\n * The role of the dialog element.\n * @default 'dialog'\n */\n role?: \"dialog\" | \"alertdialog\";\n}\n\nexport interface DialogAria {\n /** Props for the dialog container element. */\n dialogProps: Accessor<Record<string, unknown>>;\n\n /** Props for the dialog title element. */\n titleProps: Accessor<Record<string, unknown>>;\n\n /** Props for the dialog content/description element. Used for aria-describedby on alertdialogs. */\n contentProps: Accessor<Record<string, unknown>>;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a dialog component.\n * A dialog is an overlay shown above other content in an application.\n */\nexport function createDialog(\n props: AriaDialogProps | Accessor<AriaDialogProps>,\n ref: Accessor<HTMLElement | undefined>,\n): DialogAria {\n // Support both direct props and accessor pattern\n const getProps = typeof props === \"function\" ? props : () => props;\n\n const role = () => getProps().role ?? \"dialog\";\n // Slot ids, like upstream `useDialog` (`useSlotId`): each resolves to\n // undefined unless an element actually renders with it, so a dialog without a\n // title or an alertdialog without content never points at a missing node.\n const generatedTitleId = createSlotId();\n const generatedContentId = createSlotId();\n const [isRefocusing, setIsRefocusing] = createSignal(false);\n\n const titleId = createMemo(() => {\n const p = getProps();\n return p[\"aria-label\"] ? undefined : generatedTitleId();\n });\n\n const contentId = createMemo(() => {\n const p = getProps();\n return role() === \"alertdialog\" && !p[\"aria-describedby\"] ? generatedContentId() : undefined;\n });\n\n // Match @react-aria/dialog `useDialog`: initial focus is `useEffect`-timed\n // (after paint), not a sync `createEffect` inside the opening click flush.\n let didScheduleInitialFocus = false;\n let cancelInitialFocus: (() => void) | undefined;\n let safariTimeout: ReturnType<typeof setTimeout> | undefined;\n createTrackedEffect(() => {\n if (typeof document === \"undefined\") return;\n if (didScheduleInitialFocus) return;\n\n const dialogEl = ref();\n if (!dialogEl) return;\n\n didScheduleInitialFocus = true;\n const doc = dialogEl.ownerDocument;\n cancelInitialFocus = runAfterPaint(() => {\n cancelInitialFocus = undefined;\n const el = ref();\n if (!el || el.contains(doc.activeElement)) {\n return;\n }\n\n focusSafely(el);\n\n // Safari on iOS does not move the VoiceOver cursor to the dialog\n // or announce that it has opened until it has rendered. A workaround\n // is to wait for half a second, then blur and re-focus the dialog.\n safariTimeout = setTimeout(() => {\n safariTimeout = undefined;\n if (doc.activeElement === el || doc.activeElement === doc.body) {\n setIsRefocusing(true);\n el.blur();\n focusSafely(el);\n setIsRefocusing(false);\n }\n }, 500);\n }, doc);\n });\n onOwnedCleanup(() => {\n cancelInitialFocus?.();\n if (safariTimeout !== undefined) {\n clearTimeout(safariTimeout);\n }\n });\n\n // Note: Focus containment is typically handled by createModal at a higher level\n // For standalone dialogs, focus containment should be managed by the overlay system\n\n const dialogProps = createMemo(() => {\n const p = getProps();\n return {\n ...filterDOMProps(p),\n role: role(),\n tabIndex: -1,\n \"aria-label\": p[\"aria-label\"],\n \"aria-labelledby\": p[\"aria-labelledby\"] ?? titleId(),\n \"aria-describedby\": p[\"aria-describedby\"] ?? contentId(),\n // Prevent blur events from reaching createOverlay, which may cause\n // popovers to close. Since focus is contained within the dialog,\n // we don't want this to occur due to the above createEffect.\n onBlur: (e: FocusEvent) => {\n if (isRefocusing()) {\n e.stopPropagation();\n }\n },\n };\n });\n\n const titlePropsValue = createMemo(() => ({\n id: titleId(),\n }));\n\n const contentPropsValue = createMemo(() => ({\n id: contentId(),\n }));\n\n return {\n dialogProps,\n titleProps: titlePropsValue,\n contentProps: contentPropsValue,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,aACd,OACA,KACY;CAEZ,MAAM,WAAW,OAAO,UAAU,aAAa,cAAc;CAE7D,MAAM,aAAa,SAAS,CAAC,CAAC,QAAQ;CAItC,MAAM,mBAAmB,aAAa;CACtC,MAAM,qBAAqB,aAAa;CACxC,MAAM,CAAC,cAAc,mBAAmB,aAAa,KAAK;CAE1D,MAAM,UAAU,iBAAiB;EAE/B,OADU,SACH,CAAC,CAAC,gBAAgB,KAAA,IAAY,iBAAiB;CACxD,CAAC;CAED,MAAM,YAAY,iBAAiB;EACjC,MAAM,IAAI,SAAS;EACnB,OAAO,KAAK,MAAM,iBAAiB,CAAC,EAAE,sBAAsB,mBAAmB,IAAI,KAAA;CACrF,CAAC;CAID,IAAI,0BAA0B;CAC9B,IAAI;CACJ,IAAI;CACJ,0BAA0B;EACxB,IAAI,OAAO,aAAa,aAAa;EACrC,IAAI,yBAAyB;EAE7B,MAAM,WAAW,IAAI;EACrB,IAAI,CAAC,UAAU;EAEf,0BAA0B;EAC1B,MAAM,MAAM,SAAS;EACrB,qBAAqB,oBAAoB;GACvC,qBAAqB,KAAA;GACrB,MAAM,KAAK,IAAI;GACf,IAAI,CAAC,MAAM,GAAG,SAAS,IAAI,aAAa,GACtC;GAGF,YAAY,EAAE;GAKd,gBAAgB,iBAAiB;IAC/B,gBAAgB,KAAA;IAChB,IAAI,IAAI,kBAAkB,MAAM,IAAI,kBAAkB,IAAI,MAAM;KAC9D,gBAAgB,IAAI;KACpB,GAAG,KAAK;KACR,YAAY,EAAE;KACd,gBAAgB,KAAK;IACvB;GACF,GAAG,GAAG;EACR,GAAG,GAAG;CACR,CAAC;CACD,qBAAqB;EACnB,qBAAqB;EACrB,IAAI,kBAAkB,KAAA,GACpB,aAAa,aAAa;CAE9B,CAAC;CAiCD,OAAO;EACL,aA7BkB,iBAAiB;GACnC,MAAM,IAAI,SAAS;GACnB,OAAO;IACL,GAAG,eAAe,CAAC;IACnB,MAAM,KAAK;IACX,UAAU;IACV,cAAc,EAAE;IAChB,mBAAmB,EAAE,sBAAsB,QAAQ;IACnD,oBAAoB,EAAE,uBAAuB,UAAU;IAIvD,SAAS,MAAkB;KACzB,IAAI,aAAa,GACf,EAAE,gBAAgB;IAEtB;GACF;EACF,CAWY;EACV,YAVsB,kBAAkB,EACxC,IAAI,QAAQ,EACd,EAQ4B;EAC1B,cAPwB,kBAAkB,EAC1C,IAAI,UAAU,EAChB,EAKgC;CAChC;AACF"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 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/disclosure/useDisclosure.ts
|
|
13
|
+
import { t as mergeProps } from "./mergeProps.js";
|
|
14
|
+
import { t as onOwnedCleanup } from "./owner.js";
|
|
1
15
|
import { t as createPress } from "./createPress.js";
|
|
2
|
-
import { i as mergeProps$1 } from "./env.js";
|
|
3
16
|
import { canUseDOM, createId } from "../ssr/index.js";
|
|
4
|
-
import {
|
|
17
|
+
import { createTrackedEffect } from "solid-js";
|
|
5
18
|
//#region src/disclosure/createDisclosure.ts
|
|
6
19
|
/**
|
|
7
20
|
* createDisclosure hook for Solidaria
|
|
@@ -71,7 +84,8 @@ function createDisclosure(props, state, panelRef) {
|
|
|
71
84
|
const getPanelAnimations = (panel) => {
|
|
72
85
|
return typeof panel.getAnimations === "function" ? panel.getAnimations() : [];
|
|
73
86
|
};
|
|
74
|
-
|
|
87
|
+
createTrackedEffect(() => {
|
|
88
|
+
const _s2Cleanups = [];
|
|
75
89
|
if (!canUseDOM) return;
|
|
76
90
|
const panel = panelRef();
|
|
77
91
|
if (!panel) return;
|
|
@@ -84,40 +98,46 @@ function createDisclosure(props, state, panelRef) {
|
|
|
84
98
|
state.toggle();
|
|
85
99
|
};
|
|
86
100
|
panel.addEventListener("beforematch", handleBeforeMatch);
|
|
87
|
-
|
|
101
|
+
_s2Cleanups.push(() => {
|
|
88
102
|
panel.removeEventListener("beforematch", handleBeforeMatch);
|
|
89
103
|
});
|
|
104
|
+
return () => {
|
|
105
|
+
for (const c of _s2Cleanups) c();
|
|
106
|
+
};
|
|
90
107
|
});
|
|
91
|
-
|
|
108
|
+
createTrackedEffect(() => {
|
|
92
109
|
if (!canUseDOM) return;
|
|
93
110
|
const panel = panelRef();
|
|
94
111
|
if (!panel) return;
|
|
95
112
|
const isExpanded = state.isExpanded();
|
|
96
113
|
cancelPendingRaf();
|
|
97
|
-
if (isExpandedRef === null || typeof panel.getAnimations !== "function")
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
if (isExpandedRef === null || typeof panel.getAnimations !== "function") {
|
|
115
|
+
if (isExpanded) {
|
|
116
|
+
panel.removeAttribute("hidden");
|
|
117
|
+
setPanelSize(panel, "auto", "auto");
|
|
118
|
+
} else {
|
|
119
|
+
panel.setAttribute("hidden", "until-found");
|
|
120
|
+
setPanelSize(panel, "0px", "0px");
|
|
121
|
+
}
|
|
122
|
+
} else if (isExpanded !== isExpandedRef) {
|
|
123
|
+
if (isExpanded) {
|
|
124
|
+
panel.removeAttribute("hidden");
|
|
125
|
+
setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);
|
|
126
|
+
Promise.all(getPanelAnimations(panel).map((animation) => animation.finished)).then(() => {
|
|
127
|
+
if (panelRef() === panel && state.isExpanded()) setPanelSize(panel, "auto", "auto");
|
|
128
|
+
}).catch(() => {});
|
|
129
|
+
} else {
|
|
130
|
+
setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);
|
|
131
|
+
window.getComputedStyle(panel).height;
|
|
132
|
+
setPanelSize(panel, "0px", "0px");
|
|
133
|
+
Promise.all(getPanelAnimations(panel).map((animation) => animation.finished)).then(() => {
|
|
134
|
+
if (panelRef() === panel && !state.isExpanded()) panel.setAttribute("hidden", "until-found");
|
|
135
|
+
}).catch(() => {});
|
|
136
|
+
}
|
|
117
137
|
}
|
|
118
138
|
isExpandedRef = isExpanded;
|
|
119
139
|
});
|
|
120
|
-
|
|
140
|
+
onOwnedCleanup(cancelPendingRaf);
|
|
121
141
|
const { pressProps, isPressed } = createPress({
|
|
122
142
|
get isDisabled() {
|
|
123
143
|
return getProps().isDisabled;
|
|
@@ -133,7 +153,7 @@ function createDisclosure(props, state, panelRef) {
|
|
|
133
153
|
isPressed,
|
|
134
154
|
get buttonProps() {
|
|
135
155
|
const p = getProps();
|
|
136
|
-
return mergeProps
|
|
156
|
+
return mergeProps(pressProps, {
|
|
137
157
|
id: triggerId,
|
|
138
158
|
type: "button",
|
|
139
159
|
"aria-expanded": state.isExpanded(),
|
|
@@ -146,7 +166,7 @@ function createDisclosure(props, state, panelRef) {
|
|
|
146
166
|
id: panelId,
|
|
147
167
|
role: "group",
|
|
148
168
|
"aria-labelledby": triggerId,
|
|
149
|
-
"aria-hidden":
|
|
169
|
+
"aria-hidden": state.isExpanded() ? "false" : "true",
|
|
150
170
|
hidden: getDisclosurePanelHiddenAttribute(state.isExpanded())
|
|
151
171
|
};
|
|
152
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disclosure.js","names":["mergeProps"],"sources":["../../src/disclosure/createDisclosure.ts","../../src/disclosure/createDisclosureGroup.ts"],"sourcesContent":["/**\n * createDisclosure hook for Solidaria\n *\n * Provides the behavior and accessibility implementation for a disclosure component.\n *\n * Port of @react-aria/disclosure useDisclosure.\n */\n\nimport { type JSX, createEffect, onCleanup } from \"solid-js\";\nimport { type DisclosureState } from \"@proyecto-viviana/solid-stately\";\nimport { createId, canUseDOM } from \"../ssr\";\nimport { createPress } from \"../interactions/createPress\";\nimport { mergeProps } from \"../utils/mergeProps\";\n\nexport interface AriaDisclosureProps {\n /** Whether the disclosure is disabled. */\n isDisabled?: boolean;\n}\n\nexport interface DisclosureAria {\n /** Props for the disclosure trigger button. */\n buttonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Props for the disclosure panel. */\n panelProps: JSX.HTMLAttributes<HTMLElement>;\n /** Whether the disclosure trigger is currently pressed. */\n isPressed: () => boolean;\n}\n\nexport function getDisclosurePanelHiddenAttribute(\n isExpanded: boolean,\n hasDOM = canUseDOM,\n): true | undefined {\n return hasDOM ? undefined : !isExpanded || undefined;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a disclosure component.\n *\n * A disclosure is a widget that can be toggled to show or hide content.\n * It consists of a trigger button and a panel.\n *\n * @example\n * ```tsx\n * import { createDisclosure } from 'solidaria';\n * import { createDisclosureState } from 'solid-stately';\n *\n * function Disclosure(props) {\n * const state = createDisclosureState(props);\n * let panelRef;\n * const { buttonProps, panelProps } = createDisclosure(\n * { get isDisabled() { return props.isDisabled; } },\n * state,\n * () => panelRef\n * );\n *\n * return (\n * <div>\n * <button {...buttonProps}>Toggle</button>\n * <div {...panelProps} ref={panelRef}>\n * {props.children}\n * </div>\n * </div>\n * );\n * }\n * ```\n */\nexport function createDisclosure(\n props: AriaDisclosureProps | (() => AriaDisclosureProps),\n state: DisclosureState,\n panelRef: () => HTMLElement | null,\n): DisclosureAria {\n // Handle both plain object and accessor function patterns\n const getProps = typeof props === \"function\" ? props : () => props;\n\n const triggerId = createId();\n const panelId = createId();\n\n let raf: number | null = null;\n let isExpandedRef: boolean | null = null;\n\n const requestFrame = (callback: FrameRequestCallback): number => {\n if (typeof requestAnimationFrame === \"function\") {\n return requestAnimationFrame(callback);\n }\n\n return window.setTimeout(() => callback(performance.now()), 16);\n };\n\n const cancelFrame = (id: number) => {\n if (typeof cancelAnimationFrame === \"function\") {\n cancelAnimationFrame(id);\n } else {\n window.clearTimeout(id);\n }\n };\n\n const cancelPendingRaf = () => {\n if (raf != null && canUseDOM) {\n cancelFrame(raf);\n raf = null;\n }\n };\n\n const setPanelSize = (panel: HTMLElement, width: string, height: string) => {\n panel.style.setProperty(\"--disclosure-panel-width\", width);\n panel.style.setProperty(\"--disclosure-panel-height\", height);\n };\n\n const getPanelAnimations = (panel: HTMLElement): Animation[] => {\n return typeof panel.getAnimations === \"function\" ? panel.getAnimations() : [];\n };\n\n // Handle browser find-in-page reveal for collapsed panels.\n createEffect(() => {\n if (!canUseDOM) return;\n\n const panel = panelRef();\n if (!panel) return;\n\n const handleBeforeMatch = () => {\n cancelPendingRaf();\n raf = requestFrame(() => {\n if (panelRef() === panel) {\n panel.setAttribute(\"hidden\", \"until-found\");\n }\n raf = null;\n });\n\n state.toggle();\n };\n\n panel.addEventListener(\"beforematch\", handleBeforeMatch);\n onCleanup(() => {\n panel.removeEventListener(\"beforematch\", handleBeforeMatch);\n });\n });\n\n // Handle panel visibility and animation sizing.\n createEffect(() => {\n if (!canUseDOM) return;\n\n const panel = panelRef();\n if (!panel) return;\n\n const isExpanded = state.isExpanded();\n cancelPendingRaf();\n\n if (isExpandedRef === null || typeof panel.getAnimations !== \"function\") {\n if (isExpanded) {\n panel.removeAttribute(\"hidden\");\n setPanelSize(panel, \"auto\", \"auto\");\n } else {\n panel.setAttribute(\"hidden\", \"until-found\");\n setPanelSize(panel, \"0px\", \"0px\");\n }\n } else if (isExpanded !== isExpandedRef) {\n if (isExpanded) {\n panel.removeAttribute(\"hidden\");\n setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);\n\n Promise.all(getPanelAnimations(panel).map((animation) => animation.finished))\n .then(() => {\n if (panelRef() === panel && state.isExpanded()) {\n setPanelSize(panel, \"auto\", \"auto\");\n }\n })\n .catch(() => {});\n } else {\n setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);\n\n // Force style recalculation before animating to zero.\n window.getComputedStyle(panel).height;\n\n setPanelSize(panel, \"0px\", \"0px\");\n\n Promise.all(getPanelAnimations(panel).map((animation) => animation.finished))\n .then(() => {\n if (panelRef() === panel && !state.isExpanded()) {\n panel.setAttribute(\"hidden\", \"until-found\");\n }\n })\n .catch(() => {});\n }\n }\n\n isExpandedRef = isExpanded;\n });\n\n onCleanup(cancelPendingRaf);\n\n // Use createPress for proper interaction handling (matches Select/Menu pattern)\n const { pressProps, isPressed } = createPress({\n get isDisabled() {\n return getProps().isDisabled;\n },\n onPressStart(event) {\n if (event.pointerType === \"keyboard\") {\n state.toggle();\n }\n },\n onPress(event) {\n if (event.pointerType !== \"keyboard\") {\n state.toggle();\n }\n },\n });\n\n return {\n isPressed,\n // Button props - merge with pressProps for consistent interaction handling\n // Using getter (not createMemo) to match createSelect pattern\n get buttonProps(): JSX.ButtonHTMLAttributes<HTMLButtonElement> {\n const p = getProps();\n return mergeProps(\n pressProps as Record<string, unknown>,\n {\n id: triggerId,\n type: \"button\",\n \"aria-expanded\": state.isExpanded(),\n \"aria-controls\": panelId,\n disabled: p.isDisabled,\n } as Record<string, unknown>,\n ) as JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n },\n // Panel props\n get panelProps(): JSX.HTMLAttributes<HTMLElement> {\n return {\n id: panelId,\n role: \"group\",\n \"aria-labelledby\": triggerId,\n \"aria-hidden\": !state.isExpanded(),\n hidden: getDisclosurePanelHiddenAttribute(state.isExpanded()),\n };\n },\n };\n}\n","/**\n * createDisclosureGroup hook for Solidaria\n *\n * Provides accessibility implementation for a group of disclosures (accordion).\n *\n * Port of @react-aria/disclosure.\n */\n\nimport { type JSX } from \"solid-js\";\nimport { type DisclosureGroupState } from \"@proyecto-viviana/solid-stately\";\nimport { type MaybeAccessor } from \"../utils/reactivity\";\n\nexport interface AriaDisclosureGroupProps {\n /** Whether the disclosure group is disabled. */\n isDisabled?: boolean;\n}\n\nexport interface DisclosureGroupAria {\n /** Props for the disclosure group container. */\n groupProps: JSX.HTMLAttributes<HTMLElement>;\n}\n\n/**\n * Provides accessibility implementation for a group of disclosures (accordion).\n *\n * @example\n * ```tsx\n * import { createDisclosureGroup } from 'solidaria';\n * import { createDisclosureGroupState } from 'solid-stately';\n *\n * function Accordion(props) {\n * const state = createDisclosureGroupState(props);\n * const { groupProps } = createDisclosureGroup(props, state);\n *\n * return (\n * <div {...groupProps}>\n * {props.children}\n * </div>\n * );\n * }\n * ```\n */\nexport function createDisclosureGroup(\n _props: MaybeAccessor<AriaDisclosureGroupProps>,\n _state: DisclosureGroupState,\n): DisclosureGroupAria {\n return {\n get groupProps() {\n return {};\n },\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"disclosure.js","names":[],"sources":["../../src/disclosure/createDisclosure.ts","../../src/disclosure/createDisclosureGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 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/disclosure/useDisclosure.ts\n\n/**\n * createDisclosure hook for Solidaria\n *\n * Provides the behavior and accessibility implementation for a disclosure component.\n *\n * Port of @react-aria/disclosure useDisclosure.\n */\n\nimport { onOwnedCleanup } from \"../utils/owner\";\nimport { createTrackedEffect } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport { type DisclosureState } from \"@proyecto-viviana/solid-stately\";\nimport { createId, canUseDOM } from \"../ssr\";\nimport { createPress } from \"../interactions/createPress\";\nimport { mergeProps } from \"../utils/mergeProps\";\n\nexport interface AriaDisclosureProps {\n /** Whether the disclosure is disabled. */\n isDisabled?: boolean;\n}\n\nexport interface DisclosureAria {\n /** Props for the disclosure trigger button. */\n buttonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n /** Props for the disclosure panel. */\n panelProps: JSX.HTMLAttributes<HTMLElement>;\n /** Whether the disclosure trigger is currently pressed. */\n isPressed: () => boolean;\n}\n\nexport function getDisclosurePanelHiddenAttribute(\n isExpanded: boolean,\n hasDOM = canUseDOM,\n): true | undefined {\n return hasDOM ? undefined : !isExpanded || undefined;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a disclosure component.\n *\n * A disclosure is a widget that can be toggled to show or hide content.\n * It consists of a trigger button and a panel.\n *\n * @example\n * ```tsx\n * import { createDisclosure } from 'solidaria';\n * import { createDisclosureState } from 'solid-stately';\n *\n * function Disclosure(props) {\n * const state = createDisclosureState(props);\n * let panelRef;\n * const { buttonProps, panelProps } = createDisclosure(\n * { get isDisabled() { return props.isDisabled; } },\n * state,\n * () => panelRef\n * );\n *\n * return (\n * <div>\n * <button {...buttonProps}>Toggle</button>\n * <div {...panelProps} ref={panelRef}>\n * {props.children}\n * </div>\n * </div>\n * );\n * }\n * ```\n */\nexport function createDisclosure(\n props: AriaDisclosureProps | (() => AriaDisclosureProps),\n state: DisclosureState,\n panelRef: () => HTMLElement | null,\n): DisclosureAria {\n // Handle both plain object and accessor function patterns\n const getProps = typeof props === \"function\" ? props : () => props;\n\n const triggerId = createId();\n const panelId = createId();\n\n let raf: number | null = null;\n let isExpandedRef: boolean | null = null;\n\n const requestFrame = (callback: FrameRequestCallback): number => {\n if (typeof requestAnimationFrame === \"function\") {\n return requestAnimationFrame(callback);\n }\n\n return window.setTimeout(() => callback(performance.now()), 16);\n };\n\n const cancelFrame = (id: number) => {\n if (typeof cancelAnimationFrame === \"function\") {\n cancelAnimationFrame(id);\n } else {\n window.clearTimeout(id);\n }\n };\n\n const cancelPendingRaf = () => {\n if (raf != null && canUseDOM) {\n cancelFrame(raf);\n raf = null;\n }\n };\n\n const setPanelSize = (panel: HTMLElement, width: string, height: string) => {\n panel.style.setProperty(\"--disclosure-panel-width\", width);\n panel.style.setProperty(\"--disclosure-panel-height\", height);\n };\n\n const getPanelAnimations = (panel: HTMLElement): Animation[] => {\n return typeof panel.getAnimations === \"function\" ? panel.getAnimations() : [];\n };\n\n // Handle browser find-in-page reveal for collapsed panels.\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n if (!canUseDOM) return;\n\n const panel = panelRef();\n if (!panel) return;\n\n const handleBeforeMatch = () => {\n cancelPendingRaf();\n raf = requestFrame(() => {\n if (panelRef() === panel) {\n panel.setAttribute(\"hidden\", \"until-found\");\n }\n raf = null;\n });\n\n state.toggle();\n };\n\n panel.addEventListener(\"beforematch\", handleBeforeMatch);\n _s2Cleanups.push(() => {\n panel.removeEventListener(\"beforematch\", handleBeforeMatch);\n });\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n // Handle panel visibility and animation sizing.\n createTrackedEffect(() => {\n if (!canUseDOM) return;\n\n const panel = panelRef();\n if (!panel) return;\n\n const isExpanded = state.isExpanded();\n cancelPendingRaf();\n\n if (isExpandedRef === null || typeof panel.getAnimations !== \"function\") {\n if (isExpanded) {\n panel.removeAttribute(\"hidden\");\n setPanelSize(panel, \"auto\", \"auto\");\n } else {\n panel.setAttribute(\"hidden\", \"until-found\");\n setPanelSize(panel, \"0px\", \"0px\");\n }\n } else if (isExpanded !== isExpandedRef) {\n if (isExpanded) {\n panel.removeAttribute(\"hidden\");\n setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);\n\n Promise.all(getPanelAnimations(panel).map((animation) => animation.finished))\n .then(() => {\n if (panelRef() === panel && state.isExpanded()) {\n setPanelSize(panel, \"auto\", \"auto\");\n }\n })\n .catch(() => {});\n } else {\n setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);\n\n // Force style recalculation before animating to zero.\n window.getComputedStyle(panel).height;\n\n setPanelSize(panel, \"0px\", \"0px\");\n\n Promise.all(getPanelAnimations(panel).map((animation) => animation.finished))\n .then(() => {\n if (panelRef() === panel && !state.isExpanded()) {\n panel.setAttribute(\"hidden\", \"until-found\");\n }\n })\n .catch(() => {});\n }\n }\n\n isExpandedRef = isExpanded;\n });\n\n onOwnedCleanup(cancelPendingRaf);\n\n // Use createPress for proper interaction handling (matches Select/Menu pattern)\n const { pressProps, isPressed } = createPress({\n get isDisabled() {\n return getProps().isDisabled;\n },\n onPressStart(event) {\n if (event.pointerType === \"keyboard\") {\n state.toggle();\n }\n },\n onPress(event) {\n if (event.pointerType !== \"keyboard\") {\n state.toggle();\n }\n },\n });\n\n return {\n isPressed,\n // Button props - merge with pressProps for consistent interaction handling\n // Using getter (not createMemo) to match createSelect pattern\n get buttonProps(): JSX.ButtonHTMLAttributes<HTMLButtonElement> {\n const p = getProps();\n return mergeProps(\n pressProps as Record<string, unknown>,\n {\n id: triggerId,\n type: \"button\",\n \"aria-expanded\": state.isExpanded(),\n \"aria-controls\": panelId,\n disabled: p.isDisabled,\n } as Record<string, unknown>,\n ) as JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n },\n // Panel props\n get panelProps(): JSX.HTMLAttributes<HTMLElement> {\n return {\n id: panelId,\n role: \"group\",\n \"aria-labelledby\": triggerId,\n \"aria-hidden\": state.isExpanded() ? \"false\" : \"true\",\n hidden: getDisclosurePanelHiddenAttribute(state.isExpanded()),\n };\n },\n };\n}\n","/**\n * createDisclosureGroup hook for Solidaria\n *\n * This is a local Solidaria composition helper. The pinned React Aria revision\n * has no disclosure-group ARIA hook.\n */\n\nimport type { JSX } from \"@solidjs/web\";\nimport { type DisclosureGroupState } from \"@proyecto-viviana/solid-stately\";\nimport { type MaybeAccessor } from \"../utils/reactivity\";\n\nexport interface AriaDisclosureGroupProps {\n /** Whether the disclosure group is disabled. */\n isDisabled?: boolean;\n}\n\nexport interface DisclosureGroupAria {\n /** Props for the disclosure group container. */\n groupProps: JSX.HTMLAttributes<HTMLElement>;\n}\n\n/**\n * Provides accessibility implementation for a group of disclosures (accordion).\n *\n * @example\n * ```tsx\n * import { createDisclosureGroup } from 'solidaria';\n * import { createDisclosureGroupState } from 'solid-stately';\n *\n * function Accordion(props) {\n * const state = createDisclosureGroupState(props);\n * const { groupProps } = createDisclosureGroup(props, state);\n *\n * return (\n * <div {...groupProps}>\n * {props.children}\n * </div>\n * );\n * }\n * ```\n */\nexport function createDisclosureGroup(\n _props: MaybeAccessor<AriaDisclosureGroupProps>,\n _state: DisclosureGroupState,\n): DisclosureGroupAria {\n return {\n get groupProps() {\n return {};\n },\n };\n}\n"],"mappings":"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"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 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/disclosure/useDisclosure.ts
|
|
13
|
+
import { t as mergeProps } from "./mergeProps.jsx";
|
|
14
|
+
import { t as onOwnedCleanup } from "./owner.jsx";
|
|
1
15
|
import { t as createPress } from "./createPress.jsx";
|
|
2
|
-
import { i as mergeProps$1 } from "./env.jsx";
|
|
3
16
|
import { canUseDOM, createId } from "../ssr/index.jsx";
|
|
4
|
-
import {
|
|
17
|
+
import { createTrackedEffect } from "solid-js";
|
|
5
18
|
//#region src/disclosure/createDisclosure.ts
|
|
6
19
|
/**
|
|
7
20
|
* createDisclosure hook for Solidaria
|
|
@@ -71,7 +84,8 @@ function createDisclosure(props, state, panelRef) {
|
|
|
71
84
|
const getPanelAnimations = (panel) => {
|
|
72
85
|
return typeof panel.getAnimations === "function" ? panel.getAnimations() : [];
|
|
73
86
|
};
|
|
74
|
-
|
|
87
|
+
createTrackedEffect(() => {
|
|
88
|
+
const _s2Cleanups = [];
|
|
75
89
|
if (!canUseDOM) return;
|
|
76
90
|
const panel = panelRef();
|
|
77
91
|
if (!panel) return;
|
|
@@ -84,40 +98,46 @@ function createDisclosure(props, state, panelRef) {
|
|
|
84
98
|
state.toggle();
|
|
85
99
|
};
|
|
86
100
|
panel.addEventListener("beforematch", handleBeforeMatch);
|
|
87
|
-
|
|
101
|
+
_s2Cleanups.push(() => {
|
|
88
102
|
panel.removeEventListener("beforematch", handleBeforeMatch);
|
|
89
103
|
});
|
|
104
|
+
return () => {
|
|
105
|
+
for (const c of _s2Cleanups) c();
|
|
106
|
+
};
|
|
90
107
|
});
|
|
91
|
-
|
|
108
|
+
createTrackedEffect(() => {
|
|
92
109
|
if (!canUseDOM) return;
|
|
93
110
|
const panel = panelRef();
|
|
94
111
|
if (!panel) return;
|
|
95
112
|
const isExpanded = state.isExpanded();
|
|
96
113
|
cancelPendingRaf();
|
|
97
|
-
if (isExpandedRef === null || typeof panel.getAnimations !== "function")
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
if (isExpandedRef === null || typeof panel.getAnimations !== "function") {
|
|
115
|
+
if (isExpanded) {
|
|
116
|
+
panel.removeAttribute("hidden");
|
|
117
|
+
setPanelSize(panel, "auto", "auto");
|
|
118
|
+
} else {
|
|
119
|
+
panel.setAttribute("hidden", "until-found");
|
|
120
|
+
setPanelSize(panel, "0px", "0px");
|
|
121
|
+
}
|
|
122
|
+
} else if (isExpanded !== isExpandedRef) {
|
|
123
|
+
if (isExpanded) {
|
|
124
|
+
panel.removeAttribute("hidden");
|
|
125
|
+
setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);
|
|
126
|
+
Promise.all(getPanelAnimations(panel).map((animation) => animation.finished)).then(() => {
|
|
127
|
+
if (panelRef() === panel && state.isExpanded()) setPanelSize(panel, "auto", "auto");
|
|
128
|
+
}).catch(() => {});
|
|
129
|
+
} else {
|
|
130
|
+
setPanelSize(panel, `${panel.scrollWidth}px`, `${panel.scrollHeight}px`);
|
|
131
|
+
window.getComputedStyle(panel).height;
|
|
132
|
+
setPanelSize(panel, "0px", "0px");
|
|
133
|
+
Promise.all(getPanelAnimations(panel).map((animation) => animation.finished)).then(() => {
|
|
134
|
+
if (panelRef() === panel && !state.isExpanded()) panel.setAttribute("hidden", "until-found");
|
|
135
|
+
}).catch(() => {});
|
|
136
|
+
}
|
|
117
137
|
}
|
|
118
138
|
isExpandedRef = isExpanded;
|
|
119
139
|
});
|
|
120
|
-
|
|
140
|
+
onOwnedCleanup(cancelPendingRaf);
|
|
121
141
|
const { pressProps, isPressed } = createPress({
|
|
122
142
|
get isDisabled() {
|
|
123
143
|
return getProps().isDisabled;
|
|
@@ -133,7 +153,7 @@ function createDisclosure(props, state, panelRef) {
|
|
|
133
153
|
isPressed,
|
|
134
154
|
get buttonProps() {
|
|
135
155
|
const p = getProps();
|
|
136
|
-
return mergeProps
|
|
156
|
+
return mergeProps(pressProps, {
|
|
137
157
|
id: triggerId,
|
|
138
158
|
type: "button",
|
|
139
159
|
"aria-expanded": state.isExpanded(),
|
|
@@ -146,7 +166,7 @@ function createDisclosure(props, state, panelRef) {
|
|
|
146
166
|
id: panelId,
|
|
147
167
|
role: "group",
|
|
148
168
|
"aria-labelledby": triggerId,
|
|
149
|
-
"aria-hidden":
|
|
169
|
+
"aria-hidden": state.isExpanded() ? "false" : "true",
|
|
150
170
|
hidden: getDisclosurePanelHiddenAttribute(state.isExpanded())
|
|
151
171
|
};
|
|
152
172
|
}
|