@proyecto-viviana/solidaria 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunk/DragManager.js +627 -0
- package/dist/_chunk/DragManager.js.map +1 -0
- package/dist/_chunk/DragManager.jsx +627 -0
- package/dist/_chunk/DragManager.jsx.map +1 -0
- package/dist/_chunk/FocusScope.js +400 -0
- package/dist/_chunk/FocusScope.js.map +1 -0
- package/dist/_chunk/FocusScope.jsx +375 -0
- package/dist/_chunk/FocusScope.jsx.map +1 -0
- package/dist/_chunk/actiongroup.js +141 -0
- package/dist/_chunk/actiongroup.js.map +1 -0
- package/dist/_chunk/actiongroup.jsx +141 -0
- package/dist/_chunk/actiongroup.jsx.map +1 -0
- package/dist/_chunk/announce.js +207 -0
- package/dist/_chunk/announce.js.map +1 -0
- package/dist/_chunk/announce.jsx +207 -0
- package/dist/_chunk/announce.jsx.map +1 -0
- package/dist/_chunk/ariaHideOutside.js +122 -0
- package/dist/_chunk/ariaHideOutside.js.map +1 -0
- package/dist/_chunk/ariaHideOutside.jsx +122 -0
- package/dist/_chunk/ariaHideOutside.jsx.map +1 -0
- package/dist/_chunk/autocomplete.js +244 -0
- package/dist/_chunk/autocomplete.js.map +1 -0
- package/dist/_chunk/autocomplete.jsx +244 -0
- package/dist/_chunk/autocomplete.jsx.map +1 -0
- package/dist/_chunk/breadcrumbs.js +121 -0
- package/dist/_chunk/breadcrumbs.js.map +1 -0
- package/dist/_chunk/breadcrumbs.jsx +121 -0
- package/dist/_chunk/breadcrumbs.jsx.map +1 -0
- package/dist/_chunk/button.js +275 -0
- package/dist/_chunk/button.js.map +1 -0
- package/dist/_chunk/button.jsx +275 -0
- package/dist/_chunk/button.jsx.map +1 -0
- package/dist/_chunk/calendar.js +1037 -0
- package/dist/_chunk/calendar.js.map +1 -0
- package/dist/_chunk/calendar.jsx +1037 -0
- package/dist/_chunk/calendar.jsx.map +1 -0
- package/dist/_chunk/checkbox.js +235 -0
- package/dist/_chunk/checkbox.js.map +1 -0
- package/dist/_chunk/checkbox.jsx +235 -0
- package/dist/_chunk/checkbox.jsx.map +1 -0
- package/dist/_chunk/color.js +1458 -0
- package/dist/_chunk/color.js.map +1 -0
- package/dist/_chunk/color.jsx +1458 -0
- package/dist/_chunk/color.jsx.map +1 -0
- package/dist/_chunk/combobox.js +1062 -0
- package/dist/_chunk/combobox.js.map +1 -0
- package/dist/_chunk/combobox.jsx +1062 -0
- package/dist/_chunk/combobox.jsx.map +1 -0
- package/dist/_chunk/constants.js +19 -0
- package/dist/_chunk/constants.js.map +1 -0
- package/dist/_chunk/constants.jsx +19 -0
- package/dist/_chunk/constants.jsx.map +1 -0
- package/dist/_chunk/createCollator.js +61 -0
- package/dist/_chunk/createCollator.js.map +1 -0
- package/dist/_chunk/createCollator.jsx +61 -0
- package/dist/_chunk/createCollator.jsx.map +1 -0
- package/dist/_chunk/createCollectionRowInteraction.js +133 -0
- package/dist/_chunk/createCollectionRowInteraction.js.map +1 -0
- package/dist/_chunk/createCollectionRowInteraction.jsx +133 -0
- package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -0
- package/dist/_chunk/createField.js +55 -0
- package/dist/_chunk/createField.js.map +1 -0
- package/dist/_chunk/createField.jsx +55 -0
- package/dist/_chunk/createField.jsx.map +1 -0
- package/dist/_chunk/createFocus.js +105 -0
- package/dist/_chunk/createFocus.js.map +1 -0
- package/dist/_chunk/createFocus.jsx +105 -0
- package/dist/_chunk/createFocus.jsx.map +1 -0
- package/dist/_chunk/createFocusRing.js +54 -0
- package/dist/_chunk/createFocusRing.js.map +1 -0
- package/dist/_chunk/createFocusRing.jsx +54 -0
- package/dist/_chunk/createFocusRing.jsx.map +1 -0
- package/dist/_chunk/createFocusWithin.js +120 -0
- package/dist/_chunk/createFocusWithin.js.map +1 -0
- package/dist/_chunk/createFocusWithin.jsx +120 -0
- package/dist/_chunk/createFocusWithin.jsx.map +1 -0
- package/dist/_chunk/createFocusable.js +131 -0
- package/dist/_chunk/createFocusable.js.map +1 -0
- package/dist/_chunk/createFocusable.jsx +131 -0
- package/dist/_chunk/createFocusable.jsx.map +1 -0
- package/dist/_chunk/createFormReset.js +39 -0
- package/dist/_chunk/createFormReset.js.map +1 -0
- package/dist/_chunk/createFormReset.jsx +39 -0
- package/dist/_chunk/createFormReset.jsx.map +1 -0
- package/dist/_chunk/createFormValidation.js +135 -0
- package/dist/_chunk/createFormValidation.js.map +1 -0
- package/dist/_chunk/createFormValidation.jsx +135 -0
- package/dist/_chunk/createFormValidation.jsx.map +1 -0
- package/dist/_chunk/createHover.js +131 -0
- package/dist/_chunk/createHover.js.map +1 -0
- package/dist/_chunk/createHover.jsx +131 -0
- package/dist/_chunk/createHover.jsx.map +1 -0
- package/dist/_chunk/createInteractionModality.js +268 -0
- package/dist/_chunk/createInteractionModality.js.map +1 -0
- package/dist/_chunk/createInteractionModality.jsx +268 -0
- package/dist/_chunk/createInteractionModality.jsx.map +1 -0
- package/dist/_chunk/createLabel.js +47 -0
- package/dist/_chunk/createLabel.js.map +1 -0
- package/dist/_chunk/createLabel.jsx +47 -0
- package/dist/_chunk/createLabel.jsx.map +1 -0
- package/dist/_chunk/createLabels.js +32 -0
- package/dist/_chunk/createLabels.js.map +1 -0
- package/dist/_chunk/createLabels.jsx +32 -0
- package/dist/_chunk/createLabels.jsx.map +1 -0
- package/dist/_chunk/createLandmark.js +198 -0
- package/dist/_chunk/createLandmark.js.map +1 -0
- package/dist/_chunk/createLandmark.jsx +198 -0
- package/dist/_chunk/createLandmark.jsx.map +1 -0
- package/dist/_chunk/createOverlay.js +327 -0
- package/dist/_chunk/createOverlay.js.map +1 -0
- package/dist/_chunk/createOverlay.jsx +327 -0
- package/dist/_chunk/createOverlay.jsx.map +1 -0
- package/dist/_chunk/createPress.js +526 -0
- package/dist/_chunk/createPress.js.map +1 -0
- package/dist/_chunk/createPress.jsx +526 -0
- package/dist/_chunk/createPress.jsx.map +1 -0
- package/dist/_chunk/createProgressBar.js +82 -0
- package/dist/_chunk/createProgressBar.js.map +1 -0
- package/dist/_chunk/createProgressBar.jsx +82 -0
- package/dist/_chunk/createProgressBar.jsx.map +1 -0
- package/dist/_chunk/createSelectableItem.js +302 -0
- package/dist/_chunk/createSelectableItem.js.map +1 -0
- package/dist/_chunk/createSelectableItem.jsx +302 -0
- package/dist/_chunk/createSelectableItem.jsx.map +1 -0
- package/dist/_chunk/createStringFormatter.js +61 -0
- package/dist/_chunk/createStringFormatter.js.map +1 -0
- package/dist/_chunk/createStringFormatter.jsx +61 -0
- package/dist/_chunk/createStringFormatter.jsx.map +1 -0
- package/dist/_chunk/createToggle.js +159 -0
- package/dist/_chunk/createToggle.js.map +1 -0
- package/dist/_chunk/createToggle.jsx +159 -0
- package/dist/_chunk/createToggle.jsx.map +1 -0
- package/dist/_chunk/createTypeSelect.js +125 -0
- package/dist/_chunk/createTypeSelect.js.map +1 -0
- package/dist/_chunk/createTypeSelect.jsx +125 -0
- package/dist/_chunk/createTypeSelect.jsx.map +1 -0
- package/dist/_chunk/datepicker.js +1706 -0
- package/dist/_chunk/datepicker.js.map +1 -0
- package/dist/_chunk/datepicker.jsx +1706 -0
- package/dist/_chunk/datepicker.jsx.map +1 -0
- package/dist/_chunk/dialog.js +62 -0
- package/dist/_chunk/dialog.js.map +1 -0
- package/dist/_chunk/dialog.jsx +62 -0
- package/dist/_chunk/dialog.jsx.map +1 -0
- package/dist/_chunk/disclosure.js +185 -0
- package/dist/_chunk/disclosure.js.map +1 -0
- package/dist/_chunk/disclosure.jsx +185 -0
- package/dist/_chunk/disclosure.jsx.map +1 -0
- package/dist/_chunk/dnd.js +2395 -0
- package/dist/_chunk/dnd.js.map +1 -0
- package/dist/_chunk/dnd.jsx +2395 -0
- package/dist/_chunk/dnd.jsx.map +1 -0
- package/dist/_chunk/env.js +87 -0
- package/dist/_chunk/env.js.map +1 -0
- package/dist/_chunk/env.jsx +87 -0
- package/dist/_chunk/env.jsx.map +1 -0
- package/dist/_chunk/filterDOMProps.js +82 -0
- package/dist/_chunk/filterDOMProps.js.map +1 -0
- package/dist/_chunk/filterDOMProps.jsx +82 -0
- package/dist/_chunk/filterDOMProps.jsx.map +1 -0
- package/dist/_chunk/focus.js +399 -0
- package/dist/_chunk/focus.js.map +1 -0
- package/dist/_chunk/focus.jsx +399 -0
- package/dist/_chunk/focus.jsx.map +1 -0
- package/dist/_chunk/focus2.js +631 -0
- package/dist/_chunk/focus2.js.map +1 -0
- package/dist/_chunk/focus2.jsx +631 -0
- package/dist/_chunk/focus2.jsx.map +1 -0
- package/dist/_chunk/grid.js +623 -0
- package/dist/_chunk/grid.js.map +1 -0
- package/dist/_chunk/grid.jsx +623 -0
- package/dist/_chunk/grid.jsx.map +1 -0
- package/dist/_chunk/gridlist.js +369 -0
- package/dist/_chunk/gridlist.js.map +1 -0
- package/dist/_chunk/gridlist.jsx +369 -0
- package/dist/_chunk/gridlist.jsx.map +1 -0
- package/dist/_chunk/i18n.js +199 -0
- package/dist/_chunk/i18n.js.map +1 -0
- package/dist/_chunk/i18n.jsx +199 -0
- package/dist/_chunk/i18n.jsx.map +1 -0
- package/dist/_chunk/interactions.js +331 -0
- package/dist/_chunk/interactions.js.map +1 -0
- package/dist/_chunk/interactions.jsx +325 -0
- package/dist/_chunk/interactions.jsx.map +1 -0
- package/dist/_chunk/link.js +97 -0
- package/dist/_chunk/link.js.map +1 -0
- package/dist/_chunk/link.jsx +97 -0
- package/dist/_chunk/link.jsx.map +1 -0
- package/dist/_chunk/listbox.js +356 -0
- package/dist/_chunk/listbox.js.map +1 -0
- package/dist/_chunk/listbox.jsx +356 -0
- package/dist/_chunk/listbox.jsx.map +1 -0
- package/dist/_chunk/locale.js +173 -0
- package/dist/_chunk/locale.js.map +1 -0
- package/dist/_chunk/locale.jsx +167 -0
- package/dist/_chunk/locale.jsx.map +1 -0
- package/dist/_chunk/menu.js +519 -0
- package/dist/_chunk/menu.js.map +1 -0
- package/dist/_chunk/menu.jsx +519 -0
- package/dist/_chunk/menu.jsx.map +1 -0
- package/dist/_chunk/meter.js +33 -0
- package/dist/_chunk/meter.js.map +1 -0
- package/dist/_chunk/meter.jsx +33 -0
- package/dist/_chunk/meter.jsx.map +1 -0
- package/dist/_chunk/numberfield.js +259 -0
- package/dist/_chunk/numberfield.js.map +1 -0
- package/dist/_chunk/numberfield.jsx +259 -0
- package/dist/_chunk/numberfield.jsx.map +1 -0
- package/dist/_chunk/overlays.js +186 -0
- package/dist/_chunk/overlays.js.map +1 -0
- package/dist/_chunk/overlays.jsx +162 -0
- package/dist/_chunk/overlays.jsx.map +1 -0
- package/dist/_chunk/popover.js +574 -0
- package/dist/_chunk/popover.js.map +1 -0
- package/dist/_chunk/popover.jsx +574 -0
- package/dist/_chunk/popover.jsx.map +1 -0
- package/dist/_chunk/radio.js +320 -0
- package/dist/_chunk/radio.js.map +1 -0
- package/dist/_chunk/radio.jsx +320 -0
- package/dist/_chunk/radio.jsx.map +1 -0
- package/dist/_chunk/reactivity.js +21 -0
- package/dist/_chunk/reactivity.js.map +1 -0
- package/dist/_chunk/reactivity.jsx +21 -0
- package/dist/_chunk/reactivity.jsx.map +1 -0
- package/dist/_chunk/searchfield.js +210 -0
- package/dist/_chunk/searchfield.js.map +1 -0
- package/dist/_chunk/searchfield.jsx +210 -0
- package/dist/_chunk/searchfield.jsx.map +1 -0
- package/dist/_chunk/select.js +406 -0
- package/dist/_chunk/select.js.map +1 -0
- package/dist/_chunk/select.jsx +397 -0
- package/dist/_chunk/select.jsx.map +1 -0
- package/dist/_chunk/selection.js +666 -0
- package/dist/_chunk/selection.js.map +1 -0
- package/dist/_chunk/selection.jsx +666 -0
- package/dist/_chunk/selection.jsx.map +1 -0
- package/dist/_chunk/separator.js +29 -0
- package/dist/_chunk/separator.js.map +1 -0
- package/dist/_chunk/separator.jsx +29 -0
- package/dist/_chunk/separator.jsx.map +1 -0
- package/dist/_chunk/slider.js +256 -0
- package/dist/_chunk/slider.js.map +1 -0
- package/dist/_chunk/slider.jsx +256 -0
- package/dist/_chunk/slider.jsx.map +1 -0
- package/dist/_chunk/spinbutton.js +153 -0
- package/dist/_chunk/spinbutton.js.map +1 -0
- package/dist/_chunk/spinbutton.jsx +153 -0
- package/dist/_chunk/spinbutton.jsx.map +1 -0
- package/dist/_chunk/steplist.js +66 -0
- package/dist/_chunk/steplist.js.map +1 -0
- package/dist/_chunk/steplist.jsx +66 -0
- package/dist/_chunk/steplist.jsx.map +1 -0
- package/dist/_chunk/switch.js +34 -0
- package/dist/_chunk/switch.js.map +1 -0
- package/dist/_chunk/switch.jsx +34 -0
- package/dist/_chunk/switch.jsx.map +1 -0
- package/dist/_chunk/table.js +1088 -0
- package/dist/_chunk/table.js.map +1 -0
- package/dist/_chunk/table.jsx +1088 -0
- package/dist/_chunk/table.jsx.map +1 -0
- package/dist/_chunk/tabs.js +263 -0
- package/dist/_chunk/tabs.js.map +1 -0
- package/dist/_chunk/tabs.jsx +263 -0
- package/dist/_chunk/tabs.jsx.map +1 -0
- package/dist/_chunk/tag.js +322 -0
- package/dist/_chunk/tag.js.map +1 -0
- package/dist/_chunk/tag.jsx +322 -0
- package/dist/_chunk/tag.jsx.map +1 -0
- package/dist/_chunk/textfield.js +110 -0
- package/dist/_chunk/textfield.js.map +1 -0
- package/dist/_chunk/textfield.jsx +110 -0
- package/dist/_chunk/textfield.jsx.map +1 -0
- package/dist/_chunk/toast.js +250 -0
- package/dist/_chunk/toast.js.map +1 -0
- package/dist/_chunk/toast.jsx +250 -0
- package/dist/_chunk/toast.jsx.map +1 -0
- package/dist/_chunk/toolbar.js +226 -0
- package/dist/_chunk/toolbar.js.map +1 -0
- package/dist/_chunk/toolbar.jsx +226 -0
- package/dist/_chunk/toolbar.jsx.map +1 -0
- package/dist/_chunk/tooltip.js +185 -0
- package/dist/_chunk/tooltip.js.map +1 -0
- package/dist/_chunk/tooltip.jsx +185 -0
- package/dist/_chunk/tooltip.jsx.map +1 -0
- package/dist/_chunk/tree.js +452 -0
- package/dist/_chunk/tree.js.map +1 -0
- package/dist/_chunk/tree.jsx +452 -0
- package/dist/_chunk/tree.jsx.map +1 -0
- package/dist/_chunk/utils.js +705 -0
- package/dist/_chunk/utils.js.map +1 -0
- package/dist/_chunk/utils.jsx +705 -0
- package/dist/_chunk/utils.jsx.map +1 -0
- package/dist/_chunk/visually-hidden.js +93 -0
- package/dist/_chunk/visually-hidden.js.map +1 -0
- package/dist/_chunk/visually-hidden.jsx +93 -0
- package/dist/_chunk/visually-hidden.jsx.map +1 -0
- package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
- package/dist/actiongroup/index.js +2 -0
- package/dist/actiongroup/index.jsx +2 -0
- package/dist/autocomplete/createAutocomplete.d.ts +12 -7
- package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
- package/dist/autocomplete/index.js +2 -0
- package/dist/autocomplete/index.jsx +2 -0
- package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
- package/dist/breadcrumbs/index.js +2 -0
- package/dist/breadcrumbs/index.jsx +2 -0
- package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
- package/dist/button/index.js +2 -0
- package/dist/button/index.jsx +2 -0
- package/dist/calendar/createCalendar.d.ts.map +1 -1
- package/dist/calendar/createCalendarCell.d.ts.map +1 -1
- package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
- package/dist/calendar/createCalendarMonthPicker.d.ts +41 -0
- package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -0
- package/dist/calendar/createCalendarYearPicker.d.ts +49 -0
- package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -0
- package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
- package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
- package/dist/calendar/index.d.ts +2 -0
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +2 -0
- package/dist/calendar/index.jsx +2 -0
- package/dist/calendar/intl/index.d.ts +1 -1
- package/dist/calendar/intl/index.d.ts.map +1 -1
- package/dist/calendar/utils.d.ts +4 -0
- package/dist/calendar/utils.d.ts.map +1 -1
- package/dist/checkbox/createCheckbox.d.ts +4 -0
- package/dist/checkbox/createCheckbox.d.ts.map +1 -1
- package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/index.jsx +2 -0
- package/dist/collections/index.js +160 -0
- package/dist/collections/index.js.map +1 -0
- package/dist/collections/index.jsx +160 -0
- package/dist/collections/index.jsx.map +1 -0
- package/dist/color/createColorArea.d.ts.map +1 -1
- package/dist/color/createColorField.d.ts.map +1 -1
- package/dist/color/createColorSlider.d.ts.map +1 -1
- package/dist/color/createColorSwatch.d.ts.map +1 -1
- package/dist/color/createColorWheel.d.ts.map +1 -1
- package/dist/color/index.js +2 -0
- package/dist/color/index.jsx +2 -0
- package/dist/color/intl/index.d.ts +30 -0
- package/dist/color/intl/index.d.ts.map +1 -0
- package/dist/combobox/createComboBox.d.ts.map +1 -1
- package/dist/combobox/index.js +2 -0
- package/dist/combobox/index.jsx +2 -0
- package/dist/combobox/intl/generated-locales.d.ts +16 -0
- package/dist/combobox/intl/generated-locales.d.ts.map +1 -0
- package/dist/combobox/intl/index.d.ts +2 -2
- package/dist/combobox/intl/index.d.ts.map +1 -1
- package/dist/datepicker/createDateField.d.ts +45 -23
- package/dist/datepicker/createDateField.d.ts.map +1 -1
- package/dist/datepicker/createDatePicker.d.ts +34 -6
- package/dist/datepicker/createDatePicker.d.ts.map +1 -1
- package/dist/datepicker/createDatePickerGroup.d.ts +13 -13
- package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
- package/dist/datepicker/createDateRangePicker.d.ts +55 -7
- package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
- package/dist/datepicker/createDateSegment.d.ts +6 -15
- package/dist/datepicker/createDateSegment.d.ts.map +1 -1
- package/dist/datepicker/createDisplayNames.d.ts +17 -0
- package/dist/datepicker/createDisplayNames.d.ts.map +1 -0
- package/dist/datepicker/createTimeField.d.ts +12 -49
- package/dist/datepicker/createTimeField.d.ts.map +1 -1
- package/dist/datepicker/index.d.ts +3 -3
- package/dist/datepicker/index.d.ts.map +1 -1
- package/dist/datepicker/index.js +2 -0
- package/dist/datepicker/index.jsx +2 -0
- package/dist/datepicker/intl.d.ts +12 -0
- package/dist/datepicker/intl.d.ts.map +1 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/index.jsx +2 -0
- package/dist/disclosure/index.js +2 -0
- package/dist/disclosure/index.jsx +2 -0
- package/dist/dnd/DragManager.d.ts +86 -0
- package/dist/dnd/DragManager.d.ts.map +1 -0
- package/dist/dnd/DropTargetKeyboardNavigation.d.ts +42 -0
- package/dist/dnd/DropTargetKeyboardNavigation.d.ts.map +1 -0
- package/dist/dnd/createDrag.d.ts.map +1 -1
- package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
- package/dist/dnd/createDraggableItem.d.ts +12 -7
- package/dist/dnd/createDraggableItem.d.ts.map +1 -1
- package/dist/dnd/createDroppableCollection.d.ts +7 -15
- package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
- package/dist/dnd/index.d.ts +5 -1
- package/dist/dnd/index.d.ts.map +1 -1
- package/dist/dnd/index.js +3 -0
- package/dist/dnd/index.jsx +3 -0
- package/dist/dnd/intl/index.d.ts +39 -0
- package/dist/dnd/intl/index.d.ts.map +1 -0
- package/dist/dnd/utils.d.ts +7 -2
- package/dist/dnd/utils.d.ts.map +1 -1
- package/dist/focus/FocusScope.d.ts +7 -0
- package/dist/focus/FocusScope.d.ts.map +1 -1
- package/dist/focus/index.d.ts +2 -1
- package/dist/focus/index.d.ts.map +1 -1
- package/dist/focus/index.js +3 -0
- package/dist/focus/index.jsx +3 -0
- package/dist/focus/virtualFocus.d.ts +26 -0
- package/dist/focus/virtualFocus.d.ts.map +1 -0
- package/dist/form/createFormValidation.d.ts.map +1 -1
- package/dist/form/index.js +3 -0
- package/dist/form/index.jsx +3 -0
- package/dist/grid/index.js +2 -0
- package/dist/grid/index.jsx +2 -0
- package/dist/gridlist/createGridList.d.ts +7 -1
- package/dist/gridlist/createGridList.d.ts.map +1 -1
- package/dist/gridlist/createGridListItem.d.ts +1 -1
- package/dist/gridlist/createGridListItem.d.ts.map +1 -1
- package/dist/gridlist/createGridListSection.d.ts +15 -0
- package/dist/gridlist/createGridListSection.d.ts.map +1 -0
- package/dist/gridlist/index.d.ts +2 -1
- package/dist/gridlist/index.d.ts.map +1 -1
- package/dist/gridlist/index.js +2 -0
- package/dist/gridlist/index.jsx +2 -0
- package/dist/gridlist/types.d.ts +50 -0
- package/dist/gridlist/types.d.ts.map +1 -1
- package/dist/i18n/index.js +5 -0
- package/dist/i18n/index.jsx +5 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +77 -18311
- package/dist/index.jsx +77 -18242
- package/dist/interactions/FocusableProvider.d.ts.map +1 -1
- package/dist/interactions/PressEvent.d.ts +11 -0
- package/dist/interactions/PressEvent.d.ts.map +1 -1
- package/dist/interactions/createFocus.d.ts.map +1 -1
- package/dist/interactions/createFocusWithin.d.ts.map +1 -1
- package/dist/interactions/createInteractionModality.d.ts +0 -1
- package/dist/interactions/createInteractionModality.d.ts.map +1 -1
- package/dist/interactions/createKeyboard.d.ts.map +1 -1
- package/dist/interactions/createPress.d.ts.map +1 -1
- package/dist/interactions/index.js +9 -0
- package/dist/interactions/index.jsx +9 -0
- package/dist/label/createLabels.d.ts.map +1 -1
- package/dist/label/index.js +4 -0
- package/dist/label/index.jsx +4 -0
- package/dist/landmark/index.js +2 -0
- package/dist/landmark/index.jsx +2 -0
- package/dist/link/index.js +2 -0
- package/dist/link/index.jsx +2 -0
- package/dist/listbox/createListBox.d.ts +37 -0
- 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/listbox/index.js +2 -0
- package/dist/listbox/index.jsx +2 -0
- package/dist/live-announcer/index.js +2 -0
- package/dist/live-announcer/index.jsx +2 -0
- package/dist/menu/createMenu.d.ts +7 -4
- package/dist/menu/createMenu.d.ts.map +1 -1
- package/dist/menu/createMenuItem.d.ts +9 -1
- package/dist/menu/createMenuItem.d.ts.map +1 -1
- package/dist/menu/index.js +2 -0
- package/dist/menu/index.jsx +2 -0
- package/dist/meter/index.js +2 -0
- package/dist/meter/index.jsx +2 -0
- package/dist/numberfield/createNumberField.d.ts.map +1 -1
- package/dist/numberfield/index.js +2 -0
- package/dist/numberfield/index.jsx +2 -0
- package/dist/overlays/index.js +4 -0
- package/dist/overlays/index.jsx +4 -0
- package/dist/popover/calculatePosition.d.ts +2 -0
- package/dist/popover/calculatePosition.d.ts.map +1 -1
- package/dist/popover/createOverlayPosition.d.ts +8 -0
- package/dist/popover/createOverlayPosition.d.ts.map +1 -1
- package/dist/popover/index.js +2 -0
- package/dist/popover/index.jsx +2 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/index.jsx +2 -0
- package/dist/radio/createRadio.d.ts +2 -0
- package/dist/radio/createRadio.d.ts.map +1 -1
- package/dist/radio/index.js +2 -0
- package/dist/radio/index.jsx +2 -0
- package/dist/searchfield/index.js +2 -0
- package/dist/searchfield/index.jsx +2 -0
- package/dist/select/createSelect.d.ts +2 -0
- package/dist/select/createSelect.d.ts.map +1 -1
- package/dist/select/index.js +2 -0
- package/dist/select/index.jsx +2 -0
- package/dist/selection/DOMLayoutDelegate.d.ts +58 -0
- package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -0
- package/dist/selection/ListKeyboardDelegate.d.ts +95 -0
- package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -0
- package/dist/selection/constants.d.ts +15 -0
- package/dist/selection/constants.d.ts.map +1 -0
- package/dist/selection/createCollectionRowInteraction.d.ts +13 -0
- package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -0
- package/dist/selection/createScrollIntoViewOnFocus.d.ts +31 -0
- package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -0
- package/dist/selection/createSelectableCollection.d.ts +69 -0
- package/dist/selection/createSelectableCollection.d.ts.map +1 -0
- package/dist/selection/createSelectableItem.d.ts +154 -0
- package/dist/selection/createSelectableItem.d.ts.map +1 -0
- package/dist/selection/createSelectableList.d.ts +43 -0
- package/dist/selection/createSelectableList.d.ts.map +1 -0
- package/dist/selection/createTypeSelect.d.ts.map +1 -1
- package/dist/selection/index.d.ts +9 -0
- package/dist/selection/index.d.ts.map +1 -1
- package/dist/selection/index.js +5 -0
- package/dist/selection/index.jsx +5 -0
- package/dist/selection/selectItem.d.ts +29 -0
- package/dist/selection/selectItem.d.ts.map +1 -0
- package/dist/selection/utils.d.ts +40 -0
- package/dist/selection/utils.d.ts.map +1 -0
- package/dist/separator/index.js +2 -0
- package/dist/separator/index.jsx +2 -0
- package/dist/slider/createSlider.d.ts.map +1 -1
- package/dist/slider/index.js +2 -0
- package/dist/slider/index.jsx +2 -0
- package/dist/spinbutton/createSpinButton.d.ts +41 -0
- package/dist/spinbutton/createSpinButton.d.ts.map +1 -0
- package/dist/spinbutton/index.d.ts +3 -0
- package/dist/spinbutton/index.d.ts.map +1 -0
- package/dist/spinbutton/index.js +2 -0
- package/dist/spinbutton/index.jsx +2 -0
- package/dist/spinbutton/intl.d.ts +5 -0
- package/dist/spinbutton/intl.d.ts.map +1 -0
- package/dist/ssr/index.d.ts +17 -0
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/index.js +299 -0
- package/dist/ssr/index.js.map +1 -0
- package/dist/ssr/index.jsx +292 -0
- package/dist/ssr/index.jsx.map +1 -0
- package/dist/steplist/index.js +2 -0
- package/dist/steplist/index.jsx +2 -0
- package/dist/switch/createSwitch.d.ts +4 -0
- package/dist/switch/createSwitch.d.ts.map +1 -1
- package/dist/switch/index.js +2 -0
- package/dist/switch/index.jsx +2 -0
- package/dist/table/createTable.d.ts.map +1 -1
- package/dist/table/createTableColumnHeader.d.ts.map +1 -1
- package/dist/table/createTableRow.d.ts +1 -1
- package/dist/table/createTableRow.d.ts.map +1 -1
- package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
- package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
- package/dist/table/index.js +2 -0
- package/dist/table/index.jsx +2 -0
- package/dist/table/types.d.ts +35 -1
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/utils.d.ts +15 -0
- package/dist/table/utils.d.ts.map +1 -0
- package/dist/tabs/createTabs.d.ts +5 -3
- package/dist/tabs/createTabs.d.ts.map +1 -1
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/index.jsx +2 -0
- package/dist/tag/createTag.d.ts +2 -0
- package/dist/tag/createTag.d.ts.map +1 -1
- package/dist/tag/createTagGroup.d.ts +7 -0
- package/dist/tag/createTagGroup.d.ts.map +1 -1
- package/dist/tag/index.js +2 -0
- package/dist/tag/index.jsx +2 -0
- package/dist/textfield/index.js +2 -0
- package/dist/textfield/index.jsx +2 -0
- package/dist/toast/createToast.d.ts.map +1 -1
- package/dist/toast/index.js +2 -0
- package/dist/toast/index.jsx +2 -0
- package/dist/toggle/createToggle.d.ts +4 -0
- package/dist/toggle/createToggle.d.ts.map +1 -1
- package/dist/toggle/index.js +3 -0
- package/dist/toggle/index.jsx +3 -0
- package/dist/toolbar/createToolbar.d.ts +1 -1
- package/dist/toolbar/createToolbar.d.ts.map +1 -1
- package/dist/toolbar/index.js +2 -0
- package/dist/toolbar/index.jsx +2 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/index.jsx +2 -0
- package/dist/tree/createTree.d.ts +5 -1
- package/dist/tree/createTree.d.ts.map +1 -1
- package/dist/tree/createTreeItem.d.ts +1 -1
- package/dist/tree/createTreeItem.d.ts.map +1 -1
- package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
- package/dist/tree/index.js +2 -0
- package/dist/tree/index.jsx +2 -0
- package/dist/tree/types.d.ts +10 -0
- package/dist/tree/types.d.ts.map +1 -1
- package/dist/utils/animation.d.ts +60 -0
- package/dist/utils/animation.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +49 -2
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.jsx +6 -0
- package/dist/utils/keyboard.d.ts +17 -0
- package/dist/utils/keyboard.d.ts.map +1 -0
- package/dist/utils/mergeProps.d.ts.map +1 -1
- package/dist/utils/scrollIntoView.d.ts +30 -0
- package/dist/utils/scrollIntoView.d.ts.map +1 -0
- package/dist/visually-hidden/index.js +2 -0
- package/dist/visually-hidden/index.jsx +2 -0
- package/package.json +304 -3
- package/src/actiongroup/createActionGroup.ts +26 -109
- package/src/autocomplete/createAutocomplete.ts +202 -35
- package/src/breadcrumbs/createBreadcrumbs.ts +12 -4
- package/src/button/createToggleButtonGroup.ts +19 -14
- package/src/calendar/createCalendar.ts +5 -4
- package/src/calendar/createCalendarCell.ts +36 -5
- package/src/calendar/createCalendarGrid.ts +47 -12
- package/src/calendar/createCalendarMonthPicker.ts +105 -0
- package/src/calendar/createCalendarYearPicker.ts +144 -0
- package/src/calendar/createRangeCalendar.ts +27 -15
- package/src/calendar/createRangeCalendarCell.ts +17 -3
- package/src/calendar/index.ts +17 -0
- package/src/calendar/intl/index.ts +8 -0
- package/src/calendar/utils.ts +4 -0
- package/src/checkbox/createCheckbox.ts +10 -0
- package/src/checkbox/createCheckboxGroupItem.ts +12 -16
- package/src/color/createColorArea.ts +17 -10
- package/src/color/createColorField.ts +8 -1
- package/src/color/createColorSlider.ts +1 -2
- package/src/color/createColorSwatch.ts +4 -2
- package/src/color/createColorWheel.ts +0 -6
- package/src/color/intl/index.ts +316 -0
- package/src/combobox/createComboBox.ts +35 -4
- package/src/combobox/intl/generated-locales.ts +635 -0
- package/src/combobox/intl/index.ts +8 -2
- package/src/datepicker/createDateField.ts +228 -213
- package/src/datepicker/createDatePicker.ts +157 -146
- package/src/datepicker/createDatePickerGroup.ts +88 -82
- package/src/datepicker/createDateRangePicker.ts +230 -179
- package/src/datepicker/createDateSegment.ts +386 -384
- package/src/datepicker/createDisplayNames.ts +45 -0
- package/src/datepicker/createTimeField.ts +36 -129
- package/src/datepicker/index.ts +13 -14
- package/src/datepicker/intl.ts +633 -0
- package/src/dnd/DragManager.ts +693 -0
- package/src/dnd/DropTargetKeyboardNavigation.ts +337 -0
- package/src/dnd/createDrag.ts +31 -5
- package/src/dnd/createDraggableCollection.ts +33 -15
- package/src/dnd/createDraggableItem.ts +92 -5
- package/src/dnd/createDroppableCollection.ts +488 -371
- package/src/dnd/index.ts +11 -0
- package/src/dnd/intl/ar-AE.json +29 -0
- package/src/dnd/intl/bg-BG.json +29 -0
- package/src/dnd/intl/cs-CZ.json +29 -0
- package/src/dnd/intl/da-DK.json +29 -0
- package/src/dnd/intl/de-DE.json +29 -0
- package/src/dnd/intl/el-GR.json +29 -0
- package/src/dnd/intl/en-US.json +29 -0
- package/src/dnd/intl/es-ES.json +29 -0
- package/src/dnd/intl/et-EE.json +29 -0
- package/src/dnd/intl/fi-FI.json +29 -0
- package/src/dnd/intl/fr-FR.json +29 -0
- package/src/dnd/intl/he-IL.json +29 -0
- package/src/dnd/intl/hr-HR.json +29 -0
- package/src/dnd/intl/hu-HU.json +29 -0
- package/src/dnd/intl/index.ts +139 -0
- package/src/dnd/intl/it-IT.json +29 -0
- package/src/dnd/intl/ja-JP.json +29 -0
- package/src/dnd/intl/ko-KR.json +29 -0
- package/src/dnd/intl/lt-LT.json +29 -0
- package/src/dnd/intl/lv-LV.json +29 -0
- package/src/dnd/intl/nb-NO.json +29 -0
- package/src/dnd/intl/nl-NL.json +29 -0
- package/src/dnd/intl/pl-PL.json +29 -0
- package/src/dnd/intl/pt-BR.json +29 -0
- package/src/dnd/intl/pt-PT.json +29 -0
- package/src/dnd/intl/ro-RO.json +29 -0
- package/src/dnd/intl/ru-RU.json +29 -0
- package/src/dnd/intl/sk-SK.json +29 -0
- package/src/dnd/intl/sl-SI.json +29 -0
- package/src/dnd/intl/sr-SP.json +29 -0
- package/src/dnd/intl/sv-SE.json +29 -0
- package/src/dnd/intl/tr-TR.json +29 -0
- package/src/dnd/intl/uk-UA.json +29 -0
- package/src/dnd/intl/zh-CN.json +29 -0
- package/src/dnd/intl/zh-TW.json +29 -0
- package/src/dnd/utils.ts +63 -3
- package/src/focus/FocusScope.tsx +266 -24
- package/src/focus/index.ts +8 -0
- package/src/focus/virtualFocus.ts +55 -0
- package/src/form/createFormValidation.ts +8 -1
- package/src/gridlist/createGridList.ts +187 -48
- package/src/gridlist/createGridListItem.ts +87 -155
- package/src/gridlist/createGridListSection.ts +54 -0
- package/src/gridlist/index.ts +3 -0
- package/src/gridlist/types.ts +47 -0
- package/src/index.ts +51 -3
- package/src/interactions/FocusableProvider.tsx +11 -6
- package/src/interactions/PressEvent.ts +14 -0
- package/src/interactions/createFocus.ts +26 -21
- package/src/interactions/createFocusWithin.ts +23 -24
- package/src/interactions/createInteractionModality.ts +26 -15
- package/src/interactions/createKeyboard.ts +10 -0
- package/src/interactions/createPress.ts +29 -6
- package/src/label/createLabels.ts +7 -4
- package/src/listbox/createListBox.ts +203 -10
- package/src/listbox/createOption.ts +84 -74
- package/src/menu/createMenu.ts +93 -16
- package/src/menu/createMenuItem.ts +253 -41
- package/src/numberfield/createNumberField.ts +82 -14
- package/src/popover/calculatePosition.ts +19 -7
- package/src/popover/createOverlayPosition.ts +9 -0
- package/src/radio/createRadio.ts +19 -2
- package/src/select/createSelect.ts +41 -4
- package/src/selection/DOMLayoutDelegate.ts +102 -0
- package/src/selection/ListKeyboardDelegate.ts +398 -0
- package/src/selection/constants.ts +16 -0
- package/src/selection/createCollectionRowInteraction.ts +209 -0
- package/src/selection/createScrollIntoViewOnFocus.ts +65 -0
- package/src/selection/createSelectableCollection.ts +645 -0
- package/src/selection/createSelectableItem.ts +512 -0
- package/src/selection/createSelectableList.ts +93 -0
- package/src/selection/createTypeSelect.ts +112 -51
- package/src/selection/index.ts +31 -0
- package/src/selection/selectItem.ts +80 -0
- package/src/selection/utils.ts +82 -0
- package/src/slider/createSlider.ts +48 -1
- package/src/spinbutton/createSpinButton.ts +163 -0
- package/src/spinbutton/index.ts +10 -0
- package/src/spinbutton/intl.ts +115 -0
- package/src/ssr/index.tsx +31 -0
- package/src/switch/createSwitch.ts +10 -0
- package/src/table/createTable.ts +82 -27
- package/src/table/createTableColumnHeader.ts +10 -0
- package/src/table/createTableRow.ts +208 -203
- package/src/table/createTableSelectAllCheckbox.ts +3 -4
- package/src/table/createTableSelectionCheckbox.ts +24 -1
- package/src/table/types.ts +37 -1
- package/src/table/utils.ts +41 -0
- package/src/tabs/createTabs.ts +95 -24
- package/src/tag/createTag.ts +30 -36
- package/src/tag/createTagGroup.ts +92 -0
- package/src/toast/createToast.ts +1 -0
- package/src/toggle/createToggle.ts +20 -0
- package/src/toolbar/createToolbar.ts +43 -94
- package/src/tree/createTree.ts +165 -52
- package/src/tree/createTreeItem.ts +105 -120
- package/src/tree/createTreeSelectionCheckbox.ts +14 -1
- package/src/tree/types.ts +10 -0
- package/src/utils/animation.ts +243 -0
- package/src/utils/dom.ts +216 -25
- package/src/utils/index.ts +10 -0
- package/src/utils/keyboard.ts +25 -0
- package/src/utils/mergeProps.ts +8 -1
- package/src/utils/scrollIntoView.ts +181 -0
- package/dist/datepicker/createTimeSegment.d.ts +0 -29
- package/dist/datepicker/createTimeSegment.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.jsx.map +0 -1
- package/src/datepicker/createTimeSegment.ts +0 -352
package/src/gridlist/index.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { createGridList, getGridListData } from "./createGridList";
|
|
6
6
|
export { createGridListItem } from "./createGridListItem";
|
|
7
7
|
export { createGridListSelectionCheckbox } from "./createGridListSelectionCheckbox";
|
|
8
|
+
export { createGridListSection } from "./createGridListSection";
|
|
8
9
|
|
|
9
10
|
export type {
|
|
10
11
|
AriaGridListProps,
|
|
@@ -13,4 +14,6 @@ export type {
|
|
|
13
14
|
GridListItemAria,
|
|
14
15
|
AriaGridListSelectionCheckboxProps,
|
|
15
16
|
GridListSelectionCheckboxAria,
|
|
17
|
+
AriaGridListSectionProps,
|
|
18
|
+
GridListSectionAria,
|
|
16
19
|
} from "./types";
|
package/src/gridlist/types.ts
CHANGED
|
@@ -26,8 +26,30 @@ export interface AriaGridListProps {
|
|
|
26
26
|
shouldSelectOnPressUp?: boolean;
|
|
27
27
|
/** How selection should behave when pressing an item. */
|
|
28
28
|
selectionBehavior?: "replace" | "toggle";
|
|
29
|
+
/**
|
|
30
|
+
* How keyboard navigation should behave within rows.
|
|
31
|
+
*
|
|
32
|
+
* `"arrow"` treats the collection as a single tab stop and uses arrow keys to
|
|
33
|
+
* move through row children. `"tab"` lets tabbable row children participate in
|
|
34
|
+
* normal tab order and stops child key events before collection navigation.
|
|
35
|
+
*
|
|
36
|
+
* @default "arrow"
|
|
37
|
+
*/
|
|
38
|
+
keyboardNavigationBehavior?: "arrow" | "tab";
|
|
29
39
|
/** Whether the grid list is disabled. */
|
|
30
40
|
isDisabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The primary orientation of the items. In a horizontal stack the inline
|
|
43
|
+
* (left/right) axis becomes the primary keyboard-navigation axis.
|
|
44
|
+
* @default "vertical"
|
|
45
|
+
*/
|
|
46
|
+
orientation?: "horizontal" | "vertical";
|
|
47
|
+
/**
|
|
48
|
+
* The text direction, used to flip the inline navigation axis in a horizontal
|
|
49
|
+
* orientation.
|
|
50
|
+
* @default "ltr"
|
|
51
|
+
*/
|
|
52
|
+
direction?: "ltr" | "rtl";
|
|
31
53
|
}
|
|
32
54
|
|
|
33
55
|
/**
|
|
@@ -83,3 +105,28 @@ export interface GridListSelectionCheckboxAria {
|
|
|
83
105
|
/** Props to spread on the checkbox input element. */
|
|
84
106
|
checkboxProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
85
107
|
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Props for the createGridListSection hook.
|
|
111
|
+
*/
|
|
112
|
+
export interface AriaGridListSectionProps {
|
|
113
|
+
/** ARIA label for the section, when it has no visible header. */
|
|
114
|
+
"aria-label"?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Return value from createGridListSection.
|
|
119
|
+
*/
|
|
120
|
+
export interface GridListSectionAria {
|
|
121
|
+
/** Props to spread on the section header's outer (row) element. */
|
|
122
|
+
rowProps: { role: "row" };
|
|
123
|
+
/** Props to spread on the section header's inner (rowheader) element. */
|
|
124
|
+
rowHeaderProps: { id: string | undefined; role: "rowheader" };
|
|
125
|
+
/** Props to spread on the section's wrapper (rowgroup) element. */
|
|
126
|
+
rowGroupProps: {
|
|
127
|
+
role: "rowgroup";
|
|
128
|
+
id?: string;
|
|
129
|
+
"aria-label"?: string;
|
|
130
|
+
"aria-labelledby"?: string;
|
|
131
|
+
};
|
|
132
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -124,6 +124,7 @@ export {
|
|
|
124
124
|
// Basic utilities
|
|
125
125
|
createIsSSR,
|
|
126
126
|
createId,
|
|
127
|
+
createSlotId,
|
|
127
128
|
canUseDOM,
|
|
128
129
|
// SSR Provider
|
|
129
130
|
SSRProvider,
|
|
@@ -326,6 +327,7 @@ export {
|
|
|
326
327
|
export {
|
|
327
328
|
FocusScope,
|
|
328
329
|
useFocusManager,
|
|
330
|
+
createFocusManager,
|
|
329
331
|
type FocusScopeProps,
|
|
330
332
|
type FocusManager,
|
|
331
333
|
type FocusManagerOptions,
|
|
@@ -339,6 +341,10 @@ export {
|
|
|
339
341
|
createVirtualFocus,
|
|
340
342
|
type VirtualFocusOptions,
|
|
341
343
|
type VirtualFocusResult,
|
|
344
|
+
moveVirtualFocus,
|
|
345
|
+
dispatchVirtualBlur,
|
|
346
|
+
dispatchVirtualFocus,
|
|
347
|
+
getVirtuallyFocusedElement,
|
|
342
348
|
createAutoFocus,
|
|
343
349
|
clearAutoFocusQueue,
|
|
344
350
|
getAutoFocusQueueLength,
|
|
@@ -371,6 +377,15 @@ export {
|
|
|
371
377
|
createCalendar,
|
|
372
378
|
type AriaCalendarProps,
|
|
373
379
|
type CalendarAria,
|
|
380
|
+
createCalendarMonthPicker,
|
|
381
|
+
type CalendarMonthPickerProps,
|
|
382
|
+
type CalendarMonthPickerItem,
|
|
383
|
+
type CalendarMonthPickerAria,
|
|
384
|
+
createCalendarYearPicker,
|
|
385
|
+
type CalendarYearPickerProps,
|
|
386
|
+
type CalendarYearPickerFormatOptions,
|
|
387
|
+
type CalendarYearPickerItem,
|
|
388
|
+
type CalendarYearPickerAria,
|
|
374
389
|
createCalendarGrid,
|
|
375
390
|
type AriaCalendarGridProps,
|
|
376
391
|
type CalendarGridAria,
|
|
@@ -395,9 +410,6 @@ export {
|
|
|
395
410
|
createTimeField,
|
|
396
411
|
type AriaTimeFieldProps,
|
|
397
412
|
type TimeFieldAria,
|
|
398
|
-
createTimeSegment,
|
|
399
|
-
type AriaTimeSegmentProps,
|
|
400
|
-
type TimeSegmentAria,
|
|
401
413
|
createDatePicker,
|
|
402
414
|
createDateRangePicker,
|
|
403
415
|
type AriaDatePickerProps,
|
|
@@ -456,6 +468,7 @@ export {
|
|
|
456
468
|
createGridList,
|
|
457
469
|
createGridListItem,
|
|
458
470
|
createGridListSelectionCheckbox,
|
|
471
|
+
createGridListSection,
|
|
459
472
|
getGridListData,
|
|
460
473
|
type AriaGridListProps,
|
|
461
474
|
type GridListAria,
|
|
@@ -463,6 +476,8 @@ export {
|
|
|
463
476
|
type GridListItemAria,
|
|
464
477
|
type AriaGridListSelectionCheckboxProps,
|
|
465
478
|
type GridListSelectionCheckboxAria,
|
|
479
|
+
type AriaGridListSectionProps,
|
|
480
|
+
type GridListSectionAria,
|
|
466
481
|
} from "./gridlist";
|
|
467
482
|
|
|
468
483
|
export {
|
|
@@ -503,6 +518,10 @@ export {
|
|
|
503
518
|
createDroppableCollection,
|
|
504
519
|
createDraggableItem,
|
|
505
520
|
createDroppableItem,
|
|
521
|
+
createDragSession,
|
|
522
|
+
isVirtualDragging,
|
|
523
|
+
registerDropItem,
|
|
524
|
+
dndIntlStrings,
|
|
506
525
|
setGlobalDraggingCollectionRef,
|
|
507
526
|
getGlobalDraggingCollectionRef,
|
|
508
527
|
setGlobalDraggingKeys,
|
|
@@ -524,6 +543,8 @@ export {
|
|
|
524
543
|
type DraggableItemAria,
|
|
525
544
|
type DroppableItemOptions,
|
|
526
545
|
type DroppableItemAria,
|
|
546
|
+
type DragSession,
|
|
547
|
+
type DndIntlStrings,
|
|
527
548
|
CUSTOM_DRAG_TYPE,
|
|
528
549
|
NATIVE_DRAG_TYPES,
|
|
529
550
|
GENERIC_TYPE,
|
|
@@ -614,7 +635,34 @@ export {
|
|
|
614
635
|
} from "./steplist";
|
|
615
636
|
|
|
616
637
|
export { createTypeSelect, type TypeSelectOptions, type TypeSelectAria } from "./selection";
|
|
638
|
+
export { createScrollIntoViewOnFocus, type ScrollIntoViewOnFocusOptions } from "./selection";
|
|
639
|
+
export {
|
|
640
|
+
createSelectableItem,
|
|
641
|
+
ITEM_ACTION_EVENT,
|
|
642
|
+
type CreateSelectableItemOptions,
|
|
643
|
+
type SelectableItemAria,
|
|
644
|
+
type LinkBehavior,
|
|
645
|
+
} from "./selection";
|
|
646
|
+
export {
|
|
647
|
+
createSelectableCollection,
|
|
648
|
+
createSelectableList,
|
|
649
|
+
ListKeyboardDelegate,
|
|
650
|
+
DOMLayoutDelegate,
|
|
651
|
+
getItemElement,
|
|
652
|
+
isNonContiguousSelectionModifier,
|
|
653
|
+
FOCUS_EVENT,
|
|
654
|
+
CLEAR_FOCUS_EVENT,
|
|
655
|
+
type CreateSelectableCollectionOptions,
|
|
656
|
+
type SelectableCollectionAria,
|
|
657
|
+
type CreateSelectableListOptions,
|
|
658
|
+
type SelectableListAria,
|
|
659
|
+
type ListKeyboardDelegateOptions,
|
|
660
|
+
type LayoutDelegate,
|
|
661
|
+
type Rect,
|
|
662
|
+
type Size,
|
|
663
|
+
} from "./selection";
|
|
617
664
|
|
|
618
665
|
export { mergeProps, filterDOMProps, focusSafely, type FilterDOMPropsOptions } from "./utils";
|
|
619
666
|
export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from "./utils";
|
|
620
667
|
export { createDescription, type DescriptionProps } from "./utils";
|
|
668
|
+
export { createEnterAnimation, createExitAnimation, type ElementAccessor } from "./utils";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This is a 1-1 port of React-Aria's FocusableProvider adapted for SolidJS.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { JSX, ParentComponent } from "solid-js";
|
|
7
|
+
import { JSX, mergeProps, ParentComponent, splitProps } from "solid-js";
|
|
8
8
|
import { FocusableContext, FocusableContextValue, FocusableProviderProps } from "./createFocusable";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -27,14 +27,19 @@ import { FocusableContext, FocusableContextValue, FocusableProviderProps } from
|
|
|
27
27
|
export const FocusableProvider: ParentComponent<
|
|
28
28
|
FocusableProviderProps & JSX.HTMLAttributes<HTMLElement>
|
|
29
29
|
> = (props) => {
|
|
30
|
-
const { children, ...otherProps } = props
|
|
30
|
+
// Don't destructure: `const { children, ...otherProps } = props` evaluates the
|
|
31
|
+
// `children` getter immediately (2nd statement of the body), instantiating the
|
|
32
|
+
// nested subtree BEFORE this provider mounts — so a child that reads
|
|
33
|
+
// FocusableContext during its own setup would miss us. splitProps keeps
|
|
34
|
+
// otherProps a reactive proxy; children is read lazily inside the JSX, under
|
|
35
|
+
// the mounted provider. Same pattern as solidaria-components' useRenderProps.
|
|
36
|
+
const [, otherProps] = splitProps(props, ["children"]);
|
|
31
37
|
|
|
32
|
-
const context
|
|
33
|
-
...otherProps,
|
|
38
|
+
const context = mergeProps(otherProps, {
|
|
34
39
|
ref: (_el: HTMLElement) => {
|
|
35
40
|
// Store ref if needed by parent
|
|
36
41
|
},
|
|
37
|
-
};
|
|
42
|
+
}) as FocusableContextValue;
|
|
38
43
|
|
|
39
|
-
return <FocusableContext.Provider value={context}>{children}</FocusableContext.Provider>;
|
|
44
|
+
return <FocusableContext.Provider value={context}>{props.children}</FocusableContext.Provider>;
|
|
40
45
|
};
|
|
@@ -18,6 +18,11 @@ export interface PressEventSource {
|
|
|
18
18
|
altKey?: boolean;
|
|
19
19
|
clientX?: number;
|
|
20
20
|
clientY?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The key that triggered the event, present on keyboard interactions
|
|
23
|
+
* (the native `KeyboardEvent` is passed through unchanged).
|
|
24
|
+
*/
|
|
25
|
+
key?: string;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export interface IPressEvent {
|
|
@@ -39,6 +44,11 @@ export interface IPressEvent {
|
|
|
39
44
|
x: number;
|
|
40
45
|
/** Y position of the press relative to the target element. */
|
|
41
46
|
y: number;
|
|
47
|
+
/**
|
|
48
|
+
* The key that triggered the press event, if it was triggered by a keyboard
|
|
49
|
+
* interaction. Useful for differentiating between Space and Enter key presses.
|
|
50
|
+
*/
|
|
51
|
+
key?: string;
|
|
42
52
|
/**
|
|
43
53
|
* By default, press events stop propagation to parent elements.
|
|
44
54
|
* Call continuePropagation() to allow the event to bubble up.
|
|
@@ -60,6 +70,7 @@ export class PressEvent implements IPressEvent {
|
|
|
60
70
|
altKey: boolean;
|
|
61
71
|
x: number;
|
|
62
72
|
y: number;
|
|
73
|
+
key?: string;
|
|
63
74
|
|
|
64
75
|
#shouldStopPropagation = true;
|
|
65
76
|
|
|
@@ -79,6 +90,9 @@ export class PressEvent implements IPressEvent {
|
|
|
79
90
|
this.ctrlKey = originalEvent?.ctrlKey ?? false;
|
|
80
91
|
this.metaKey = originalEvent?.metaKey ?? false;
|
|
81
92
|
this.altKey = originalEvent?.altKey ?? false;
|
|
93
|
+
// Present only for keyboard interactions (the native KeyboardEvent carries
|
|
94
|
+
// `key`); pointer events leave this undefined, matching upstream.
|
|
95
|
+
this.key = originalEvent?.key;
|
|
82
96
|
|
|
83
97
|
// Calculate position relative to target
|
|
84
98
|
this.x = 0;
|
|
@@ -102,8 +102,10 @@ function createSyntheticBlurHandler(): (
|
|
|
102
102
|
* Based on react-aria's useFocus but adapted for SolidJS.
|
|
103
103
|
*/
|
|
104
104
|
export function createFocus(props: CreateFocusProps = {}): FocusResult {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
// Read isDisabled/handlers off `props` directly (not via destructure): a Solid
|
|
106
|
+
// hook body runs once, so a destructure would freeze them at call time. The
|
|
107
|
+
// handlers read props.x live and the returned props are getters, mirroring
|
|
108
|
+
// upstream useFocus's per-render re-read. guard:idiomatic-solid.
|
|
107
109
|
let cleanupRef: (() => void) | undefined;
|
|
108
110
|
const syntheticBlurHandler = createSyntheticBlurHandler();
|
|
109
111
|
|
|
@@ -117,12 +119,12 @@ export function createFocus(props: CreateFocusProps = {}): FocusResult {
|
|
|
117
119
|
const onBlur: JSX.EventHandler<HTMLElement, FocusEvent> = (e) => {
|
|
118
120
|
// Only handle if target is the currentTarget (not bubbled from children)
|
|
119
121
|
if (e.target === e.currentTarget) {
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
+
if (props.onBlur) {
|
|
123
|
+
props.onBlur(e);
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
if (onFocusChange) {
|
|
125
|
-
onFocusChange(false);
|
|
126
|
+
if (props.onFocusChange) {
|
|
127
|
+
props.onFocusChange(false);
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
cleanupRef?.();
|
|
@@ -137,12 +139,12 @@ export function createFocus(props: CreateFocusProps = {}): FocusResult {
|
|
|
137
139
|
const activeElement = ownerDocument ? getActiveElement(ownerDocument) : null;
|
|
138
140
|
|
|
139
141
|
if (e.target === e.currentTarget && activeElement === getEventTarget(e)) {
|
|
140
|
-
if (
|
|
141
|
-
|
|
142
|
+
if (props.onFocus) {
|
|
143
|
+
props.onFocus(e);
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
if (onFocusChange) {
|
|
145
|
-
onFocusChange(true);
|
|
146
|
+
if (props.onFocusChange) {
|
|
147
|
+
props.onFocusChange(true);
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
// Set up synthetic blur handler for Firefox bug
|
|
@@ -150,19 +152,22 @@ export function createFocus(props: CreateFocusProps = {}): FocusResult {
|
|
|
150
152
|
}
|
|
151
153
|
};
|
|
152
154
|
|
|
153
|
-
// If disabled or no handlers, return empty props
|
|
154
|
-
|
|
155
|
-
return {
|
|
156
|
-
focusProps: {},
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const hasHandlers = onFocusProp || onFocusChange || onBlurProp;
|
|
161
|
-
|
|
155
|
+
// If disabled or no handlers, return empty props. Getters re-read props so a
|
|
156
|
+
// later isDisabled/handler change is reflected (the body itself runs once).
|
|
162
157
|
return {
|
|
163
158
|
focusProps: {
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
get onFocus() {
|
|
160
|
+
if (props.isDisabled) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
return props.onFocus || props.onFocusChange || props.onBlur ? onFocus : undefined;
|
|
164
|
+
},
|
|
165
|
+
get onBlur() {
|
|
166
|
+
if (props.isDisabled) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
return props.onBlur || props.onFocusChange ? onBlur : undefined;
|
|
170
|
+
},
|
|
166
171
|
},
|
|
167
172
|
};
|
|
168
173
|
}
|
|
@@ -92,7 +92,11 @@ function createSyntheticBlurHandler(): (
|
|
|
92
92
|
* Based on react-aria's useFocusWithin but adapted for SolidJS.
|
|
93
93
|
*/
|
|
94
94
|
export function createFocusWithin(props: FocusWithinProps = {}): FocusWithinResult {
|
|
95
|
-
|
|
95
|
+
// Read isDisabled/handlers off `props` directly (not via destructure): a Solid
|
|
96
|
+
// hook body runs once, so destructuring would freeze them at call time and drop
|
|
97
|
+
// reactive updates — createOverlay/createVisuallyHidden pass a live isDisabled
|
|
98
|
+
// getter. The handlers below read props.x live; the return is getter-based so a
|
|
99
|
+
// later isDisabled flip re-computes. Mirrors upstream useFocusWithin's re-read.
|
|
96
100
|
|
|
97
101
|
// State tracking
|
|
98
102
|
let isFocusWithin = false;
|
|
@@ -123,12 +127,12 @@ export function createFocusWithin(props: FocusWithinProps = {}): FocusWithinResu
|
|
|
123
127
|
cleanupRef?.();
|
|
124
128
|
cleanupRef = undefined;
|
|
125
129
|
|
|
126
|
-
if (onBlurWithin) {
|
|
127
|
-
onBlurWithin(e);
|
|
130
|
+
if (props.onBlurWithin) {
|
|
131
|
+
props.onBlurWithin(e);
|
|
128
132
|
}
|
|
129
133
|
|
|
130
|
-
if (onFocusWithinChange) {
|
|
131
|
-
onFocusWithinChange(false);
|
|
134
|
+
if (props.onFocusWithinChange) {
|
|
135
|
+
props.onFocusWithinChange(false);
|
|
132
136
|
}
|
|
133
137
|
}
|
|
134
138
|
};
|
|
@@ -145,12 +149,12 @@ export function createFocusWithin(props: FocusWithinProps = {}): FocusWithinResu
|
|
|
145
149
|
const activeElement = ownerDocument ? getActiveElement(ownerDocument) : null;
|
|
146
150
|
|
|
147
151
|
if (!isFocusWithin && activeElement === getEventTarget(e)) {
|
|
148
|
-
if (onFocusWithin) {
|
|
149
|
-
onFocusWithin(e);
|
|
152
|
+
if (props.onFocusWithin) {
|
|
153
|
+
props.onFocusWithin(e);
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
if (onFocusWithinChange) {
|
|
153
|
-
onFocusWithinChange(true);
|
|
156
|
+
if (props.onFocusWithinChange) {
|
|
157
|
+
props.onFocusWithinChange(true);
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
isFocusWithin = true;
|
|
@@ -179,12 +183,12 @@ export function createFocusWithin(props: FocusWithinProps = {}): FocusWithinResu
|
|
|
179
183
|
isFocusWithin = false;
|
|
180
184
|
removeAllGlobalListeners();
|
|
181
185
|
|
|
182
|
-
if (onBlurWithin) {
|
|
183
|
-
onBlurWithin(nativeEvent);
|
|
186
|
+
if (props.onBlurWithin) {
|
|
187
|
+
props.onBlurWithin(nativeEvent);
|
|
184
188
|
}
|
|
185
189
|
|
|
186
|
-
if (onFocusWithinChange) {
|
|
187
|
-
onFocusWithinChange(false);
|
|
190
|
+
if (props.onFocusWithinChange) {
|
|
191
|
+
props.onFocusWithinChange(false);
|
|
188
192
|
}
|
|
189
193
|
cleanupRef?.();
|
|
190
194
|
cleanupRef = undefined;
|
|
@@ -196,19 +200,14 @@ export function createFocusWithin(props: FocusWithinProps = {}): FocusWithinResu
|
|
|
196
200
|
}
|
|
197
201
|
};
|
|
198
202
|
|
|
199
|
-
if (isDisabled) {
|
|
200
|
-
return {
|
|
201
|
-
focusWithinProps: {
|
|
202
|
-
onFocus: undefined,
|
|
203
|
-
onBlur: undefined,
|
|
204
|
-
},
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
203
|
return {
|
|
209
204
|
focusWithinProps: {
|
|
210
|
-
onFocus
|
|
211
|
-
|
|
205
|
+
get onFocus() {
|
|
206
|
+
return props.isDisabled ? undefined : onFocus;
|
|
207
|
+
},
|
|
208
|
+
get onBlur() {
|
|
209
|
+
return props.isDisabled ? undefined : onBlur;
|
|
210
|
+
},
|
|
212
211
|
},
|
|
213
212
|
};
|
|
214
213
|
}
|
|
@@ -40,7 +40,7 @@ const changeHandlers = new Set<Handler>();
|
|
|
40
40
|
|
|
41
41
|
export let hasSetupGlobalListeners: Map<
|
|
42
42
|
Window,
|
|
43
|
-
{ focus: typeof window.HTMLElement.prototype.focus
|
|
43
|
+
{ focus: typeof window.HTMLElement.prototype.focus }
|
|
44
44
|
> = new Map();
|
|
45
45
|
let hasEventBeforeFocus = false;
|
|
46
46
|
let hasBlurredWindowRecently = false;
|
|
@@ -145,16 +145,21 @@ function setupGlobalFocusEvents(element?: HTMLElement | null) {
|
|
|
145
145
|
|
|
146
146
|
const documentObject = getOwnerDocument(element);
|
|
147
147
|
|
|
148
|
+
// Programmatic focus() calls shouldn't affect the current input modality, so we
|
|
149
|
+
// patch HTMLElement.prototype.focus to record that an event preceded the focus.
|
|
150
|
+
// Use Reflect.defineProperty (not assignment) so this works even when `focus` is
|
|
151
|
+
// currently a getter-only accessor — e.g. when a test library's setup() has
|
|
152
|
+
// instrumented it. Plain assignment throws in that case; Reflect.defineProperty
|
|
153
|
+
// returns false rather than throwing (and succeeds on the configurable prototype).
|
|
148
154
|
const originalFocus = windowObject.HTMLElement.prototype.focus;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
Reflect.defineProperty(windowObject.HTMLElement.prototype, "focus", {
|
|
156
|
+
configurable: true,
|
|
157
|
+
writable: true,
|
|
158
|
+
value: function () {
|
|
152
159
|
hasEventBeforeFocus = true;
|
|
153
160
|
originalFocus.apply(this, arguments as unknown as [options?: FocusOptions | undefined]);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
canOverride = false;
|
|
157
|
-
}
|
|
161
|
+
},
|
|
162
|
+
});
|
|
158
163
|
|
|
159
164
|
documentObject.addEventListener("keydown", handleKeyboardEvent, true);
|
|
160
165
|
documentObject.addEventListener("keyup", handleKeyboardEvent, true);
|
|
@@ -181,7 +186,7 @@ function setupGlobalFocusEvents(element?: HTMLElement | null) {
|
|
|
181
186
|
{ once: true },
|
|
182
187
|
);
|
|
183
188
|
|
|
184
|
-
hasSetupGlobalListeners.set(windowObject, { focus: originalFocus
|
|
189
|
+
hasSetupGlobalListeners.set(windowObject, { focus: originalFocus });
|
|
185
190
|
}
|
|
186
191
|
|
|
187
192
|
function tearDownWindowFocusTracking(element?: HTMLElement | null, loadListener?: () => void) {
|
|
@@ -201,9 +206,13 @@ function tearDownWindowFocusTracking(element?: HTMLElement | null, loadListener?
|
|
|
201
206
|
}
|
|
202
207
|
|
|
203
208
|
const entry = hasSetupGlobalListeners.get(windowObject)!;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
// Mirror the setup path: defineProperty (not assignment) restores the original
|
|
210
|
+
// focus even if it had been replaced with a getter-only accessor.
|
|
211
|
+
Reflect.defineProperty(windowObject.HTMLElement.prototype, "focus", {
|
|
212
|
+
configurable: true,
|
|
213
|
+
writable: true,
|
|
214
|
+
value: entry.focus,
|
|
215
|
+
});
|
|
207
216
|
|
|
208
217
|
documentObject.removeEventListener("keydown", handleKeyboardEvent, true);
|
|
209
218
|
documentObject.removeEventListener("keyup", handleKeyboardEvent, true);
|
|
@@ -352,11 +361,13 @@ export function createFocusVisible(props: FocusVisibleProps = {}): FocusVisibleR
|
|
|
352
361
|
return { isFocusVisible: () => false };
|
|
353
362
|
}
|
|
354
363
|
|
|
355
|
-
|
|
356
|
-
|
|
364
|
+
// autoFocus seeds the initial value once; isTextInput is read inside the effect
|
|
365
|
+
// so it re-subscribes reactively (a top-level destructure would freeze it — the
|
|
366
|
+
// body runs once). Mirrors upstream useFocusVisible's [isTextInput] dep.
|
|
367
|
+
const [isVisible, setIsVisible] = createSignal<boolean>(props.autoFocus || isFocusVisible());
|
|
357
368
|
|
|
358
369
|
createEffect(() => {
|
|
359
|
-
const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput });
|
|
370
|
+
const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput: props.isTextInput });
|
|
360
371
|
onCleanup(cleanup);
|
|
361
372
|
});
|
|
362
373
|
|
|
@@ -46,10 +46,20 @@ function createEventHandler<T extends globalThis.KeyboardEvent>(
|
|
|
46
46
|
return (e: T) => {
|
|
47
47
|
let shouldStopPropagation = true;
|
|
48
48
|
|
|
49
|
+
// A nested createEventHandler may already have installed continuePropagation
|
|
50
|
+
// on this event; capture it so continuing here continues on the wrapper too.
|
|
51
|
+
const parentContinuePropagation = (e as { continuePropagation?: () => void })
|
|
52
|
+
.continuePropagation;
|
|
53
|
+
|
|
49
54
|
// Create a wrapped event with continuePropagation
|
|
50
55
|
const event = Object.assign(e, {
|
|
51
56
|
continuePropagation() {
|
|
52
57
|
shouldStopPropagation = false;
|
|
58
|
+
// Nested createEventHandler might have set continuePropagation, so we
|
|
59
|
+
// should continue propagation on the wrappers too.
|
|
60
|
+
if (typeof parentContinuePropagation === "function") {
|
|
61
|
+
parentContinuePropagation.call(e);
|
|
62
|
+
}
|
|
53
63
|
},
|
|
54
64
|
}) as KeyboardEvent;
|
|
55
65
|
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
isMac,
|
|
26
26
|
createGlobalListeners,
|
|
27
27
|
setEventTarget,
|
|
28
|
+
focusWithoutScrolling,
|
|
28
29
|
} from "../utils";
|
|
29
30
|
|
|
30
31
|
export { PressEvent, type PointerType } from "./PressEvent";
|
|
@@ -83,6 +84,28 @@ function isPressedValue(isPressed: Accessor<boolean> | boolean | undefined): boo
|
|
|
83
84
|
return isPressed ?? false;
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
function eventPathContains(parent: EventTarget | null | undefined, event: Event): boolean {
|
|
88
|
+
if (!parent) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const target = getEventTarget(event);
|
|
93
|
+
if (
|
|
94
|
+
typeof Node !== "undefined" &&
|
|
95
|
+
parent instanceof Node &&
|
|
96
|
+
target instanceof Node &&
|
|
97
|
+
nodeContains(parent, target)
|
|
98
|
+
) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (typeof event.composedPath === "function") {
|
|
103
|
+
return event.composedPath().includes(parent);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
|
|
86
109
|
// Track which links have been programmatically clicked to avoid double activation
|
|
87
110
|
const linkClickedSet = new WeakSet<HTMLElement>();
|
|
88
111
|
|
|
@@ -280,7 +303,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
280
303
|
const onPointerDown: JSX.EventHandler<HTMLElement, PointerEvent> = (e) => {
|
|
281
304
|
// Only handle left clicks, and ignore events that bubbled through portals
|
|
282
305
|
const button = e.button ?? 0;
|
|
283
|
-
if (button !== 0 || !
|
|
306
|
+
if (button !== 0 || !eventPathContains(e.currentTarget, e)) {
|
|
284
307
|
return;
|
|
285
308
|
}
|
|
286
309
|
|
|
@@ -316,7 +339,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
316
339
|
|
|
317
340
|
// Mouse down handler when using pointer events - only prevents focus, doesn't trigger press
|
|
318
341
|
const onMouseDownPointer: JSX.EventHandler<HTMLElement, MouseEvent> = (e) => {
|
|
319
|
-
if (!
|
|
342
|
+
if (!eventPathContains(e.currentTarget, e)) {
|
|
320
343
|
return;
|
|
321
344
|
}
|
|
322
345
|
|
|
@@ -341,7 +364,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
341
364
|
return;
|
|
342
365
|
}
|
|
343
366
|
|
|
344
|
-
const isOverTarget =
|
|
367
|
+
const isOverTarget = eventPathContains(pressState.target, e);
|
|
345
368
|
if (isOverTarget && pressState.pointerType != null && pressState.pointerType !== "virtual") {
|
|
346
369
|
// Pointer released over target - wait for onClick to complete the press sequence.
|
|
347
370
|
// This matches React-Aria's behavior for compatibility with DOM mutations and third-party libraries.
|
|
@@ -366,7 +389,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
366
389
|
cancel(e);
|
|
367
390
|
} else {
|
|
368
391
|
// Click didn't happen (probably due to stopPropagation), trigger it manually
|
|
369
|
-
pressState.target
|
|
392
|
+
focusWithoutScrolling(pressState.target);
|
|
370
393
|
pressState.target.click();
|
|
371
394
|
}
|
|
372
395
|
}
|
|
@@ -400,7 +423,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
400
423
|
};
|
|
401
424
|
|
|
402
425
|
const onPointerUpTarget: JSX.EventHandler<HTMLElement, PointerEvent> = (e) => {
|
|
403
|
-
if (!
|
|
426
|
+
if (!eventPathContains(e.currentTarget, e) || pressState.pointerType === "virtual") {
|
|
404
427
|
return;
|
|
405
428
|
}
|
|
406
429
|
|
|
@@ -781,7 +804,7 @@ export function createPress(props: CreatePressProps = {}): PressResult {
|
|
|
781
804
|
|
|
782
805
|
const onClick: JSX.EventHandler<HTMLElement, MouseEvent> = (e) => {
|
|
783
806
|
// Don't handle click if it's not on the target
|
|
784
|
-
if (!
|
|
807
|
+
if (!eventPathContains(e.currentTarget, e)) {
|
|
785
808
|
return;
|
|
786
809
|
}
|
|
787
810
|
|
|
@@ -19,10 +19,13 @@ export function createLabels(
|
|
|
19
19
|
props: DOMProps & AriaLabelingProps,
|
|
20
20
|
defaultLabel?: string,
|
|
21
21
|
): DOMProps & AriaLabelingProps {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
|
|
22
|
+
// Read props directly rather than destructuring: in Solid a destructure
|
|
23
|
+
// freezes the value at call time. This is a pure snapshot transform, so it is
|
|
24
|
+
// behaviourally identical, but keeping the reactive read explicit matches the
|
|
25
|
+
// rest of the port and satisfies guard:idiomatic-solid.
|
|
26
|
+
let id = createId(props.id);
|
|
27
|
+
let label = props["aria-label"];
|
|
28
|
+
let labelledBy = props["aria-labelledby"];
|
|
26
29
|
|
|
27
30
|
// If there is both an aria-label and aria-labelledby,
|
|
28
31
|
// combine them by pointing to the element itself.
|