@proyecto-viviana/solidaria 0.3.0 → 0.4.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/dist/_chunk/actiongroup.js +207 -0
- package/dist/_chunk/actiongroup.js.map +1 -0
- package/dist/_chunk/actiongroup.jsx +207 -0
- package/dist/_chunk/actiongroup.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 +196 -0
- package/dist/_chunk/autocomplete.js.map +1 -0
- package/dist/_chunk/autocomplete.jsx +196 -0
- package/dist/_chunk/autocomplete.jsx.map +1 -0
- package/dist/_chunk/breadcrumbs.js +119 -0
- package/dist/_chunk/breadcrumbs.js.map +1 -0
- package/dist/_chunk/breadcrumbs.jsx +119 -0
- package/dist/_chunk/breadcrumbs.jsx.map +1 -0
- package/dist/_chunk/button.js +276 -0
- package/dist/_chunk/button.js.map +1 -0
- package/dist/_chunk/button.jsx +276 -0
- package/dist/_chunk/button.jsx.map +1 -0
- package/dist/_chunk/calendar.js +1036 -0
- package/dist/_chunk/calendar.js.map +1 -0
- package/dist/_chunk/calendar.jsx +1036 -0
- package/dist/_chunk/calendar.jsx.map +1 -0
- package/dist/_chunk/checkbox.js +234 -0
- package/dist/_chunk/checkbox.js.map +1 -0
- package/dist/_chunk/checkbox.jsx +234 -0
- package/dist/_chunk/checkbox.jsx.map +1 -0
- package/dist/_chunk/color.js +1174 -0
- package/dist/_chunk/color.js.map +1 -0
- package/dist/_chunk/color.jsx +1174 -0
- package/dist/_chunk/color.jsx.map +1 -0
- package/dist/_chunk/combobox.js +436 -0
- package/dist/_chunk/combobox.js.map +1 -0
- package/dist/_chunk/combobox.jsx +436 -0
- package/dist/_chunk/combobox.jsx.map +1 -0
- package/dist/_chunk/createCollator.js +229 -0
- package/dist/_chunk/createCollator.js.map +1 -0
- package/dist/_chunk/createCollator.jsx +223 -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 +54 -0
- package/dist/_chunk/createField.js.map +1 -0
- package/dist/_chunk/createField.jsx +54 -0
- package/dist/_chunk/createField.jsx.map +1 -0
- package/dist/_chunk/createFocus.js +101 -0
- package/dist/_chunk/createFocus.js.map +1 -0
- package/dist/_chunk/createFocus.jsx +101 -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 +121 -0
- package/dist/_chunk/createFocusWithin.js.map +1 -0
- package/dist/_chunk/createFocusWithin.jsx +121 -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/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 +130 -0
- package/dist/_chunk/createHover.js.map +1 -0
- package/dist/_chunk/createHover.jsx +130 -0
- package/dist/_chunk/createHover.jsx.map +1 -0
- package/dist/_chunk/createInteractionModality.js +269 -0
- package/dist/_chunk/createInteractionModality.js.map +1 -0
- package/dist/_chunk/createInteractionModality.jsx +269 -0
- package/dist/_chunk/createInteractionModality.jsx.map +1 -0
- package/dist/_chunk/createLabel.js +46 -0
- package/dist/_chunk/createLabel.js.map +1 -0
- package/dist/_chunk/createLabel.jsx +46 -0
- package/dist/_chunk/createLabel.jsx.map +1 -0
- package/dist/_chunk/createLabels.js +31 -0
- package/dist/_chunk/createLabels.js.map +1 -0
- package/dist/_chunk/createLabels.jsx +31 -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/createLongPress.js +91 -0
- package/dist/_chunk/createLongPress.js.map +1 -0
- package/dist/_chunk/createLongPress.jsx +91 -0
- package/dist/_chunk/createLongPress.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 +81 -0
- package/dist/_chunk/createProgressBar.js.map +1 -0
- package/dist/_chunk/createProgressBar.jsx +81 -0
- package/dist/_chunk/createProgressBar.jsx.map +1 -0
- package/dist/_chunk/createSelectableItem.js +298 -0
- package/dist/_chunk/createSelectableItem.js.map +1 -0
- package/dist/_chunk/createSelectableItem.jsx +298 -0
- package/dist/_chunk/createSelectableItem.jsx.map +1 -0
- package/dist/_chunk/createToggle.js +158 -0
- package/dist/_chunk/createToggle.js.map +1 -0
- package/dist/_chunk/createToggle.jsx +158 -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 +1393 -0
- package/dist/_chunk/datepicker.js.map +1 -0
- package/dist/_chunk/datepicker.jsx +1393 -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 +1304 -0
- package/dist/_chunk/dnd.js.map +1 -0
- package/dist/_chunk/dnd.jsx +1304 -0
- package/dist/_chunk/dnd.jsx.map +1 -0
- package/dist/_chunk/env.js +105 -0
- package/dist/_chunk/env.js.map +1 -0
- package/dist/_chunk/env.jsx +105 -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 +895 -0
- package/dist/_chunk/focus2.js.map +1 -0
- package/dist/_chunk/focus2.jsx +870 -0
- package/dist/_chunk/focus2.jsx.map +1 -0
- package/dist/_chunk/form.js +39 -0
- package/dist/_chunk/form.js.map +1 -0
- package/dist/_chunk/form.jsx +39 -0
- package/dist/_chunk/form.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 +364 -0
- package/dist/_chunk/gridlist.js.map +1 -0
- package/dist/_chunk/gridlist.jsx +364 -0
- package/dist/_chunk/gridlist.jsx.map +1 -0
- package/dist/_chunk/i18n.js +254 -0
- package/dist/_chunk/i18n.js.map +1 -0
- package/dist/_chunk/i18n.jsx +254 -0
- package/dist/_chunk/i18n.jsx.map +1 -0
- package/dist/_chunk/interactions.js +241 -0
- package/dist/_chunk/interactions.js.map +1 -0
- package/dist/_chunk/interactions.jsx +237 -0
- package/dist/_chunk/interactions.jsx.map +1 -0
- package/dist/_chunk/link.js +96 -0
- package/dist/_chunk/link.js.map +1 -0
- package/dist/_chunk/link.jsx +96 -0
- package/dist/_chunk/link.jsx.map +1 -0
- package/dist/_chunk/listbox.js +324 -0
- package/dist/_chunk/listbox.js.map +1 -0
- package/dist/_chunk/listbox.jsx +324 -0
- package/dist/_chunk/listbox.jsx.map +1 -0
- package/dist/_chunk/live-announcer.js +207 -0
- package/dist/_chunk/live-announcer.js.map +1 -0
- package/dist/_chunk/live-announcer.jsx +207 -0
- package/dist/_chunk/live-announcer.jsx.map +1 -0
- package/dist/_chunk/menu.js +518 -0
- package/dist/_chunk/menu.js.map +1 -0
- package/dist/_chunk/menu.jsx +518 -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 +258 -0
- package/dist/_chunk/numberfield.js.map +1 -0
- package/dist/_chunk/numberfield.jsx +258 -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 +319 -0
- package/dist/_chunk/radio.js.map +1 -0
- package/dist/_chunk/radio.jsx +319 -0
- package/dist/_chunk/radio.jsx.map +1 -0
- package/dist/_chunk/searchfield.js +209 -0
- package/dist/_chunk/searchfield.js.map +1 -0
- package/dist/_chunk/searchfield.jsx +209 -0
- package/dist/_chunk/searchfield.jsx.map +1 -0
- package/dist/_chunk/select.js +403 -0
- package/dist/_chunk/select.js.map +1 -0
- package/dist/_chunk/select.jsx +394 -0
- package/dist/_chunk/select.jsx.map +1 -0
- package/dist/_chunk/selection.js +679 -0
- package/dist/_chunk/selection.js.map +1 -0
- package/dist/_chunk/selection.jsx +679 -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 +255 -0
- package/dist/_chunk/slider.js.map +1 -0
- package/dist/_chunk/slider.jsx +255 -0
- package/dist/_chunk/slider.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 +1051 -0
- package/dist/_chunk/table.js.map +1 -0
- package/dist/_chunk/table.jsx +1051 -0
- package/dist/_chunk/table.jsx.map +1 -0
- package/dist/_chunk/tabs.js +260 -0
- package/dist/_chunk/tabs.js.map +1 -0
- package/dist/_chunk/tabs.jsx +260 -0
- package/dist/_chunk/tabs.jsx.map +1 -0
- package/dist/_chunk/tag.js +286 -0
- package/dist/_chunk/tag.js.map +1 -0
- package/dist/_chunk/tag.jsx +286 -0
- package/dist/_chunk/tag.jsx.map +1 -0
- package/dist/_chunk/textfield.js +109 -0
- package/dist/_chunk/textfield.js.map +1 -0
- package/dist/_chunk/textfield.jsx +109 -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 +258 -0
- package/dist/_chunk/toolbar.js.map +1 -0
- package/dist/_chunk/toolbar.jsx +258 -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 +424 -0
- package/dist/_chunk/tree.js.map +1 -0
- package/dist/_chunk/tree.jsx +424 -0
- package/dist/_chunk/tree.jsx.map +1 -0
- package/dist/_chunk/utils.js +665 -0
- package/dist/_chunk/utils.js.map +1 -0
- package/dist/_chunk/utils.jsx +665 -0
- package/dist/_chunk/utils.jsx.map +1 -0
- package/dist/_chunk/visually-hidden.js +92 -0
- package/dist/_chunk/visually-hidden.js.map +1 -0
- package/dist/_chunk/visually-hidden.jsx +92 -0
- package/dist/_chunk/visually-hidden.jsx.map +1 -0
- package/dist/actiongroup/index.js +2 -0
- package/dist/actiongroup/index.jsx +2 -0
- package/dist/autocomplete/createAutocomplete.d.ts +2 -0
- 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/index.js +2 -0
- package/dist/breadcrumbs/index.jsx +2 -0
- 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/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/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/index.js +2 -0
- package/dist/color/index.jsx +2 -0
- package/dist/combobox/index.js +2 -0
- package/dist/combobox/index.jsx +2 -0
- package/dist/datepicker/createDateSegment.d.ts.map +1 -1
- package/dist/datepicker/index.js +2 -0
- package/dist/datepicker/index.jsx +2 -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/createDroppableCollection.d.ts.map +1 -1
- package/dist/dnd/index.js +2 -0
- package/dist/dnd/index.jsx +2 -0
- package/dist/dnd/utils.d.ts +2 -2
- package/dist/dnd/utils.d.ts.map +1 -1
- package/dist/focus/FocusScope.d.ts.map +1 -1
- package/dist/focus/index.js +2 -0
- package/dist/focus/index.jsx +2 -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 +3 -0
- package/dist/i18n/index.jsx +3 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -18311
- package/dist/index.jsx +71 -18242
- package/dist/interactions/PressEvent.d.ts +11 -0
- package/dist/interactions/PressEvent.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 +10 -0
- package/dist/interactions/index.jsx +10 -0
- 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 +6 -0
- 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.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 +4 -0
- package/dist/selection/index.jsx +4 -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/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/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/index.js +2 -0
- package/dist/table/index.jsx +2 -0
- package/dist/table/types.d.ts +27 -1
- package/dist/table/types.d.ts.map +1 -1
- package/dist/tabs/createTabs.d.ts +4 -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/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/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 +48 -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 +5 -0
- package/dist/utils/index.jsx +5 -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/autocomplete/createAutocomplete.ts +67 -21
- package/src/calendar/createCalendar.ts +2 -0
- package/src/calendar/createCalendarCell.ts +19 -2
- package/src/calendar/createCalendarGrid.ts +43 -9
- package/src/calendar/createCalendarMonthPicker.ts +105 -0
- package/src/calendar/createCalendarYearPicker.ts +144 -0
- package/src/calendar/createRangeCalendar.ts +2 -0
- package/src/calendar/index.ts +17 -0
- package/src/calendar/utils.ts +4 -0
- package/src/checkbox/createCheckbox.ts +10 -0
- package/src/checkbox/createCheckboxGroupItem.ts +12 -16
- package/src/datepicker/createDateSegment.ts +6 -1
- package/src/dnd/createDroppableCollection.ts +4 -1
- package/src/dnd/utils.ts +27 -3
- package/src/focus/FocusScope.tsx +152 -18
- package/src/form/createFormValidation.ts +8 -1
- package/src/gridlist/createGridList.ts +145 -42
- 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 +40 -0
- package/src/interactions/PressEvent.ts +14 -0
- package/src/interactions/createInteractionModality.ts +21 -12
- package/src/interactions/createKeyboard.ts +10 -0
- package/src/interactions/createPress.ts +29 -6
- package/src/listbox/createListBox.ts +129 -8
- package/src/listbox/createOption.ts +68 -73
- 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 +18 -2
- 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 +498 -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/ssr/index.tsx +31 -0
- package/src/switch/createSwitch.ts +10 -0
- package/src/table/createTable.ts +56 -26
- package/src/table/createTableRow.ts +198 -203
- package/src/table/createTableSelectAllCheckbox.ts +3 -4
- package/src/table/types.ts +29 -1
- package/src/tabs/createTabs.ts +50 -20
- package/src/tag/createTag.ts +9 -4
- package/src/toast/createToast.ts +1 -0
- package/src/toggle/createToggle.ts +20 -0
- package/src/toolbar/createToolbar.ts +43 -42
- package/src/tree/createTree.ts +100 -42
- package/src/tree/createTreeItem.ts +105 -120
- package/src/tree/types.ts +10 -0
- package/src/utils/animation.ts +151 -0
- package/src/utils/dom.ts +215 -25
- package/src/utils/index.ts +8 -0
- package/src/utils/keyboard.ts +25 -0
- package/src/utils/mergeProps.ts +8 -1
- package/src/utils/scrollIntoView.ts +181 -0
- package/dist/index.js.map +0 -1
- package/dist/index.jsx.map +0 -1
|
@@ -3,11 +3,20 @@
|
|
|
3
3
|
* Based on @react-aria/gridlist/useGridListItem.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { createMemo,
|
|
6
|
+
import { createMemo, type Accessor } from "solid-js";
|
|
7
7
|
import type { JSX } from "solid-js";
|
|
8
|
-
import type {
|
|
8
|
+
import type {
|
|
9
|
+
Collection,
|
|
10
|
+
GridState,
|
|
11
|
+
GridCollection,
|
|
12
|
+
Key,
|
|
13
|
+
Selection,
|
|
14
|
+
} from "@proyecto-viviana/solid-stately";
|
|
9
15
|
import type { AriaGridListItemProps, GridListItemAria } from "./types";
|
|
10
16
|
import { getGridListData } from "./createGridList";
|
|
17
|
+
import { createSelectableItem, type SelectableItemState } from "../selection/createSelectableItem";
|
|
18
|
+
import { mergeCollectionRowInteractionProps } from "../selection/createCollectionRowInteraction";
|
|
19
|
+
import { mergeProps } from "../utils/mergeProps";
|
|
11
20
|
|
|
12
21
|
/**
|
|
13
22
|
* Creates accessibility props for a grid list item.
|
|
@@ -18,159 +27,80 @@ export function createGridListItem<
|
|
|
18
27
|
>(
|
|
19
28
|
props: Accessor<AriaGridListItemProps>,
|
|
20
29
|
state: Accessor<GridState<T, C>>,
|
|
21
|
-
|
|
30
|
+
ref: Accessor<HTMLElement | null>,
|
|
22
31
|
): GridListItemAria {
|
|
23
|
-
const [isPressed, setIsPressed] = createSignal(false);
|
|
24
|
-
let isPointerPressed = false;
|
|
25
|
-
let ignoreNextClick = false;
|
|
26
|
-
|
|
27
32
|
const isSelected = createMemo(() => {
|
|
28
33
|
const s = state();
|
|
29
34
|
const p = props();
|
|
30
35
|
return s.isSelected(p.node.key);
|
|
31
36
|
});
|
|
32
37
|
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
} else {
|
|
74
|
-
s.replaceSelection(p.node.key);
|
|
75
|
-
}
|
|
76
|
-
} else {
|
|
77
|
-
s.replaceSelection(p.node.key);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
// No selection mode, just trigger action
|
|
82
|
-
if (onAction) {
|
|
83
|
-
onAction(p.node.key);
|
|
84
|
-
}
|
|
85
|
-
if (p.onAction) {
|
|
86
|
-
p.onAction();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// Handle click/press for selection and actions.
|
|
92
|
-
const onClick = (e: MouseEvent) => {
|
|
93
|
-
if (ignoreNextClick) {
|
|
94
|
-
ignoreNextClick = false;
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
handleActivation(e);
|
|
38
|
+
const selectableState: SelectableItemState<T> = {
|
|
39
|
+
collection: () => state().collection as unknown as Collection<T>,
|
|
40
|
+
isFocused: () => state().isFocused,
|
|
41
|
+
setFocused: (focused: boolean) => state().setFocused(focused),
|
|
42
|
+
focusedKey: () => state().focusedKey,
|
|
43
|
+
childFocusStrategy: () => state().childFocusStrategy,
|
|
44
|
+
setFocusedKey: (key: Key | null, strategy) => state().setFocusedKey(key, strategy),
|
|
45
|
+
selectionMode: () => state().selectionMode,
|
|
46
|
+
selectionBehavior: () => props().selectionBehavior ?? state().selectionBehavior,
|
|
47
|
+
disallowEmptySelection: () => state().disallowEmptySelection,
|
|
48
|
+
selectedKeys: () => state().selectedKeys as Selection,
|
|
49
|
+
disabledKeys: () => state().disabledKeys,
|
|
50
|
+
disabledBehavior: () => state().disabledBehavior,
|
|
51
|
+
isEmpty: () => {
|
|
52
|
+
const keys = state().selectedKeys;
|
|
53
|
+
return keys !== "all" && keys.size === 0;
|
|
54
|
+
},
|
|
55
|
+
isSelectAll: () => state().selectedKeys === "all",
|
|
56
|
+
isSelected: (key: Key) => state().isSelected(key),
|
|
57
|
+
isDisabled: (key: Key) => {
|
|
58
|
+
const s = state();
|
|
59
|
+
const item = s.collection.getItem(key);
|
|
60
|
+
return (
|
|
61
|
+
s.disabledBehavior === "all" &&
|
|
62
|
+
s.isDisabled(key) &&
|
|
63
|
+
item?.props?.disabledBehavior !== "selection"
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
canSelectItem: (key: Key) => {
|
|
67
|
+
const s = state();
|
|
68
|
+
return s.selectionMode !== "none" && !s.isDisabled(key);
|
|
69
|
+
},
|
|
70
|
+
setSelectionBehavior: (behavior) => state().setSelectionBehavior(behavior),
|
|
71
|
+
toggleSelection: (key: Key) => state().toggleSelection(key),
|
|
72
|
+
replaceSelection: (key: Key) => state().replaceSelection(key),
|
|
73
|
+
setSelectedKeys: (keys: Iterable<Key>) => state().setSelectedKeys(keys),
|
|
74
|
+
selectAll: () => state().selectAll(),
|
|
75
|
+
clearSelection: () => state().clearSelection(),
|
|
76
|
+
toggleSelectAll: () => state().toggleSelectAll(),
|
|
77
|
+
extendSelection: (toKey: Key, _collection: Collection<T>) => state().extendSelection(toKey),
|
|
99
78
|
};
|
|
100
79
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (isDisabled()) return;
|
|
106
|
-
|
|
107
|
-
if (e.key === "Enter") {
|
|
108
|
-
// Get grid list metadata for actions
|
|
80
|
+
const selectableItem = createSelectableItem<T>(
|
|
81
|
+
() => {
|
|
82
|
+
const s = state();
|
|
83
|
+
const p = props();
|
|
109
84
|
const gridListData = getGridListData(s);
|
|
110
85
|
const onAction = gridListData?.actions.onAction;
|
|
111
86
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const onFocus = () => {
|
|
133
|
-
const s = state();
|
|
134
|
-
const p = props();
|
|
135
|
-
s.setFocusedKey(p.node.key);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const onPointerDown = () => {
|
|
139
|
-
if (isDisabled()) return;
|
|
140
|
-
isPointerPressed = true;
|
|
141
|
-
setIsPressed(true);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const onPointerUp = (e: PointerEvent) => {
|
|
145
|
-
const wasPointerPressed = isPointerPressed;
|
|
146
|
-
isPointerPressed = false;
|
|
147
|
-
setIsPressed(false);
|
|
148
|
-
|
|
149
|
-
if (!wasPointerPressed || isDisabled()) return;
|
|
150
|
-
|
|
151
|
-
const currentTarget = e.currentTarget;
|
|
152
|
-
const target = e.target;
|
|
153
|
-
if (
|
|
154
|
-
currentTarget instanceof HTMLElement &&
|
|
155
|
-
target instanceof Node &&
|
|
156
|
-
!currentTarget.contains(target)
|
|
157
|
-
) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
ignoreNextClick = true;
|
|
162
|
-
handleActivation(e);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const onPointerCancel = () => {
|
|
166
|
-
isPointerPressed = false;
|
|
167
|
-
setIsPressed(false);
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
const onPointerLeave = () => {
|
|
171
|
-
isPointerPressed = false;
|
|
172
|
-
setIsPressed(false);
|
|
173
|
-
};
|
|
87
|
+
return {
|
|
88
|
+
key: p.node.key,
|
|
89
|
+
id: `${gridListData?.gridListId ?? "gridlist"}-row-${String(p.node.key)}`,
|
|
90
|
+
isVirtualized: p.isVirtualized,
|
|
91
|
+
shouldSelectOnPressUp: gridListData?.shouldSelectOnPressUp ?? false,
|
|
92
|
+
onAction:
|
|
93
|
+
onAction || p.onAction
|
|
94
|
+
? () => {
|
|
95
|
+
p.onAction?.();
|
|
96
|
+
onAction?.(p.node.key);
|
|
97
|
+
}
|
|
98
|
+
: undefined,
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
selectableState,
|
|
102
|
+
ref,
|
|
103
|
+
);
|
|
174
104
|
|
|
175
105
|
const rowProps = createMemo(() => {
|
|
176
106
|
const s = state();
|
|
@@ -180,15 +110,7 @@ export function createGridListItem<
|
|
|
180
110
|
const baseProps: Record<string, unknown> = {
|
|
181
111
|
role: "row",
|
|
182
112
|
"aria-selected": s.selectionMode !== "none" ? isSelected() : undefined,
|
|
183
|
-
"aria-disabled": isDisabled() || undefined,
|
|
184
|
-
tabIndex: isFocused() ? 0 : -1,
|
|
185
|
-
onClick,
|
|
186
|
-
onKeyDown,
|
|
187
|
-
onFocus,
|
|
188
|
-
onPointerDown,
|
|
189
|
-
onPointerUp,
|
|
190
|
-
onPointerCancel,
|
|
191
|
-
onPointerLeave,
|
|
113
|
+
"aria-disabled": selectableItem.isDisabled() || undefined,
|
|
192
114
|
};
|
|
193
115
|
|
|
194
116
|
// Add aria-rowindex for virtualized lists
|
|
@@ -196,7 +118,17 @@ export function createGridListItem<
|
|
|
196
118
|
baseProps["aria-rowindex"] = node.rowIndex + 1; // 1-based
|
|
197
119
|
}
|
|
198
120
|
|
|
199
|
-
|
|
121
|
+
const gridListData = getGridListData(s);
|
|
122
|
+
const mergedProps = mergeProps<JSX.HTMLAttributes<HTMLElement>>(
|
|
123
|
+
selectableItem.itemProps,
|
|
124
|
+
baseProps,
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
return mergeCollectionRowInteractionProps(mergedProps, {
|
|
128
|
+
ref,
|
|
129
|
+
keyboardNavigationBehavior: () => gridListData?.keyboardNavigationBehavior ?? "arrow",
|
|
130
|
+
direction: () => gridListData?.direction ?? "ltr",
|
|
131
|
+
});
|
|
200
132
|
});
|
|
201
133
|
|
|
202
134
|
const gridCellProps = createMemo(() => {
|
|
@@ -216,10 +148,10 @@ export function createGridListItem<
|
|
|
216
148
|
return isSelected();
|
|
217
149
|
},
|
|
218
150
|
get isDisabled() {
|
|
219
|
-
return isDisabled();
|
|
151
|
+
return selectableItem.isDisabled();
|
|
220
152
|
},
|
|
221
153
|
get isPressed() {
|
|
222
|
-
return isPressed();
|
|
154
|
+
return selectableItem.isPressed();
|
|
223
155
|
},
|
|
224
156
|
};
|
|
225
157
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createGridListSection - Provides accessibility for a grid list section.
|
|
3
|
+
* Based on @react-aria/gridlist/useGridListSection.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { createMemo } from "solid-js";
|
|
7
|
+
import { createId, createSlotId } from "../ssr";
|
|
8
|
+
import { createLabels } from "../label/createLabels";
|
|
9
|
+
import type { AriaGridListSectionProps, GridListSectionAria } from "./types";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates accessibility props for a grid list section.
|
|
13
|
+
*
|
|
14
|
+
* Mirrors upstream `useGridListSection`: a section is a `role="rowgroup"`
|
|
15
|
+
* wrapper whose optional header renders as `role="row"` › `role="rowheader"`.
|
|
16
|
+
* The `aria-labelledby` of the wrapper points at the header's id via a slot id
|
|
17
|
+
* that resolves to `undefined` when no header is rendered.
|
|
18
|
+
*/
|
|
19
|
+
export function createGridListSection(props: AriaGridListSectionProps): GridListSectionAria {
|
|
20
|
+
const headingId = createSlotId();
|
|
21
|
+
// Stable id for the rowgroup so `createLabels` does not regenerate one each
|
|
22
|
+
// time the slot id resolves (it short-circuits on a provided id).
|
|
23
|
+
const rowGroupId = createId();
|
|
24
|
+
|
|
25
|
+
const labelProps = createMemo(() =>
|
|
26
|
+
createLabels({
|
|
27
|
+
id: rowGroupId,
|
|
28
|
+
"aria-label": props["aria-label"],
|
|
29
|
+
"aria-labelledby": headingId(),
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
rowProps: { role: "row" },
|
|
35
|
+
rowHeaderProps: {
|
|
36
|
+
get id() {
|
|
37
|
+
return headingId();
|
|
38
|
+
},
|
|
39
|
+
role: "rowheader",
|
|
40
|
+
},
|
|
41
|
+
rowGroupProps: {
|
|
42
|
+
role: "rowgroup",
|
|
43
|
+
get id() {
|
|
44
|
+
return labelProps().id;
|
|
45
|
+
},
|
|
46
|
+
get "aria-label"() {
|
|
47
|
+
return labelProps()["aria-label"];
|
|
48
|
+
},
|
|
49
|
+
get "aria-labelledby"() {
|
|
50
|
+
return labelProps()["aria-labelledby"];
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
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,
|
|
@@ -371,6 +372,15 @@ export {
|
|
|
371
372
|
createCalendar,
|
|
372
373
|
type AriaCalendarProps,
|
|
373
374
|
type CalendarAria,
|
|
375
|
+
createCalendarMonthPicker,
|
|
376
|
+
type CalendarMonthPickerProps,
|
|
377
|
+
type CalendarMonthPickerItem,
|
|
378
|
+
type CalendarMonthPickerAria,
|
|
379
|
+
createCalendarYearPicker,
|
|
380
|
+
type CalendarYearPickerProps,
|
|
381
|
+
type CalendarYearPickerFormatOptions,
|
|
382
|
+
type CalendarYearPickerItem,
|
|
383
|
+
type CalendarYearPickerAria,
|
|
374
384
|
createCalendarGrid,
|
|
375
385
|
type AriaCalendarGridProps,
|
|
376
386
|
type CalendarGridAria,
|
|
@@ -456,6 +466,7 @@ export {
|
|
|
456
466
|
createGridList,
|
|
457
467
|
createGridListItem,
|
|
458
468
|
createGridListSelectionCheckbox,
|
|
469
|
+
createGridListSection,
|
|
459
470
|
getGridListData,
|
|
460
471
|
type AriaGridListProps,
|
|
461
472
|
type GridListAria,
|
|
@@ -463,6 +474,8 @@ export {
|
|
|
463
474
|
type GridListItemAria,
|
|
464
475
|
type AriaGridListSelectionCheckboxProps,
|
|
465
476
|
type GridListSelectionCheckboxAria,
|
|
477
|
+
type AriaGridListSectionProps,
|
|
478
|
+
type GridListSectionAria,
|
|
466
479
|
} from "./gridlist";
|
|
467
480
|
|
|
468
481
|
export {
|
|
@@ -614,7 +627,34 @@ export {
|
|
|
614
627
|
} from "./steplist";
|
|
615
628
|
|
|
616
629
|
export { createTypeSelect, type TypeSelectOptions, type TypeSelectAria } from "./selection";
|
|
630
|
+
export { createScrollIntoViewOnFocus, type ScrollIntoViewOnFocusOptions } from "./selection";
|
|
631
|
+
export {
|
|
632
|
+
createSelectableItem,
|
|
633
|
+
ITEM_ACTION_EVENT,
|
|
634
|
+
type CreateSelectableItemOptions,
|
|
635
|
+
type SelectableItemAria,
|
|
636
|
+
type LinkBehavior,
|
|
637
|
+
} from "./selection";
|
|
638
|
+
export {
|
|
639
|
+
createSelectableCollection,
|
|
640
|
+
createSelectableList,
|
|
641
|
+
ListKeyboardDelegate,
|
|
642
|
+
DOMLayoutDelegate,
|
|
643
|
+
getItemElement,
|
|
644
|
+
isNonContiguousSelectionModifier,
|
|
645
|
+
FOCUS_EVENT,
|
|
646
|
+
CLEAR_FOCUS_EVENT,
|
|
647
|
+
type CreateSelectableCollectionOptions,
|
|
648
|
+
type SelectableCollectionAria,
|
|
649
|
+
type CreateSelectableListOptions,
|
|
650
|
+
type SelectableListAria,
|
|
651
|
+
type ListKeyboardDelegateOptions,
|
|
652
|
+
type LayoutDelegate,
|
|
653
|
+
type Rect,
|
|
654
|
+
type Size,
|
|
655
|
+
} from "./selection";
|
|
617
656
|
|
|
618
657
|
export { mergeProps, filterDOMProps, focusSafely, type FilterDOMPropsOptions } from "./utils";
|
|
619
658
|
export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from "./utils";
|
|
620
659
|
export { createDescription, type DescriptionProps } from "./utils";
|
|
660
|
+
export { createEnterAnimation, createExitAnimation, type ElementAccessor } from "./utils";
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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
|
|