@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
|
@@ -109,15 +109,31 @@ export function createNumberField(
|
|
|
109
109
|
get "aria-labelledby"() {
|
|
110
110
|
return getProps()["aria-labelledby"];
|
|
111
111
|
},
|
|
112
|
-
|
|
112
|
+
// Upstream react-aria `useNumberField` → `useField` → `useLabel` with the DEFAULT
|
|
113
|
+
// `labelElementType: 'label'`: the S2 NumberField label is a native `<label htmlFor>`
|
|
114
|
+
// (verified against the shipped React DOM: `<label id for=inputId>`). This hardcoded
|
|
115
|
+
// `"span"` was a self-inflicted divergence — it dropped the `for` association and made
|
|
116
|
+
// `NumberFieldLabel` render a `<span>`. Reverted to `"label"` so `createLabel` emits
|
|
117
|
+
// `for: inputId` (the input still also carries `aria-labelledby`, exactly as upstream).
|
|
118
|
+
labelElementType: "label",
|
|
113
119
|
});
|
|
114
120
|
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
// Increment/decrement button labels — a 1:1 port of upstream `useNumberField`'s
|
|
122
|
+
// four-case logic. Upstream RAC's `NumberField` component feeds `useNumberField` a
|
|
123
|
+
// BOOLEAN slot for `label` (from `useSlot`), never the label string, so a visible
|
|
124
|
+
// label is NEVER concatenated into the button `aria-label`. Instead: with a visible
|
|
125
|
+
// label the button reads `aria-label: "Increase"` PLUS `aria-labelledby: "<selfId>
|
|
126
|
+
// <labelId>"`; only an explicit `aria-label` (and no visible label) changes the text
|
|
127
|
+
// (`"Increase <aria-label>"`). The prior `Increase ${getLabelText()}` was a
|
|
128
|
+
// self-inflicted divergence that produced "Increase Quantity" where S2 ships
|
|
129
|
+
// "Increase". `fieldLabel` mirrors upstream: `props['aria-label'] || ''` — the visible
|
|
130
|
+
// label string is intentionally excluded (it arrives as a boolean slot in RAC).
|
|
131
|
+
const fieldLabel = (): string => getProps()["aria-label"] ?? "";
|
|
132
|
+
const buttonLabelledBy = (): string | undefined => {
|
|
133
|
+
if (fieldLabel()) return undefined;
|
|
134
|
+
return getProps().label != null
|
|
135
|
+
? (labelProps.id as string | undefined)
|
|
136
|
+
: getProps()["aria-labelledby"];
|
|
121
137
|
};
|
|
122
138
|
|
|
123
139
|
// Filter DOM props
|
|
@@ -234,6 +250,15 @@ export function createNumberField(
|
|
|
234
250
|
|
|
235
251
|
incrementTouchPressUp = false;
|
|
236
252
|
};
|
|
253
|
+
const onIncrementClick = (e: MouseEvent) => {
|
|
254
|
+
if (!state.canIncrement()) {
|
|
255
|
+
e.preventDefault();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
state.increment();
|
|
260
|
+
inputRef?.()?.focus();
|
|
261
|
+
};
|
|
237
262
|
|
|
238
263
|
const onDecrementPressStart = (e: PressEvent) => {
|
|
239
264
|
if (e.pointerType !== "touch") {
|
|
@@ -258,6 +283,15 @@ export function createNumberField(
|
|
|
258
283
|
|
|
259
284
|
decrementTouchPressUp = false;
|
|
260
285
|
};
|
|
286
|
+
const onDecrementClick = (e: MouseEvent) => {
|
|
287
|
+
if (!state.canDecrement()) {
|
|
288
|
+
e.preventDefault();
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
state.decrement();
|
|
293
|
+
inputRef?.()?.focus();
|
|
294
|
+
};
|
|
261
295
|
|
|
262
296
|
// Build aria-describedby
|
|
263
297
|
const getAriaDescribedBy = () => {
|
|
@@ -295,11 +329,29 @@ export function createNumberField(
|
|
|
295
329
|
autoComplete: "off",
|
|
296
330
|
autoCorrect: "off",
|
|
297
331
|
spellcheck: false,
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
"
|
|
301
|
-
|
|
302
|
-
"
|
|
332
|
+
// Upstream routes the input through useFormattedTextField → useTextField →
|
|
333
|
+
// useFocusable, which "always set[s] a tabIndex so that Safari allows
|
|
334
|
+
// focusing native buttons and inputs": `excludeFromTabOrder ? -1 : 0`, then
|
|
335
|
+
// `undefined` when disabled. The input is never excluded, so the rendered
|
|
336
|
+
// DOM carries `tabindex="0"` (absent only when disabled). We hand-roll
|
|
337
|
+
// inputProps (see the spinbutton-override note below) so we must replay that
|
|
338
|
+
// one focusable prop here to stay byte-identical to React's tab order.
|
|
339
|
+
tabIndex: isDisabled ? undefined : 0,
|
|
340
|
+
// Upstream useNumberField wraps useSpinButton but deliberately
|
|
341
|
+
// overrides its output: role=spinbutton can't be focused with
|
|
342
|
+
// VoiceOver, so the input is a plain textbox (inside the role=group
|
|
343
|
+
// wrapper above) and every aria-value* is dropped in favour of
|
|
344
|
+
// aria-roledescription. The formatted value is still announced via the
|
|
345
|
+
// input's own value. Mirror that contract instead of leaking the raw
|
|
346
|
+
// spinbutton semantics.
|
|
347
|
+
//
|
|
348
|
+
// The string MUST match upstream's `stringFormatter.format('numberField')`,
|
|
349
|
+
// whose en-US value is `Number field` (capitalised) — not a lowercase
|
|
350
|
+
// hand-roll. Full locale routing via `createStringFormatter` (as
|
|
351
|
+
// `createDateField` does) is tracked as `intl-roledescription-hardcodes`
|
|
352
|
+
// (also covers the ColorArea/ColorSwatch English hardcodes); this keeps the
|
|
353
|
+
// en-US roledescription byte-identical to React Spectrum in the meantime.
|
|
354
|
+
"aria-roledescription": "Number field",
|
|
303
355
|
"aria-invalid": p.isInvalid || undefined,
|
|
304
356
|
"aria-required": p.isRequired || undefined,
|
|
305
357
|
"aria-describedby": getAriaDescribedBy(),
|
|
@@ -323,32 +375,48 @@ export function createNumberField(
|
|
|
323
375
|
) as JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
324
376
|
},
|
|
325
377
|
get incrementButtonProps() {
|
|
378
|
+
const labelledBy = buttonLabelledBy();
|
|
326
379
|
return {
|
|
327
380
|
id: incrementId,
|
|
328
|
-
"
|
|
381
|
+
type: "button",
|
|
382
|
+
"aria-label": `Increase ${fieldLabel()}`.trim(),
|
|
383
|
+
"aria-labelledby": labelledBy ? `${incrementId} ${labelledBy}` : undefined,
|
|
329
384
|
"aria-controls": inputId,
|
|
330
385
|
excludeFromTabOrder: true,
|
|
331
386
|
preventFocusOnPress: true,
|
|
332
387
|
allowFocusWhenDisabled: true,
|
|
388
|
+
get disabled() {
|
|
389
|
+
return !state.canIncrement();
|
|
390
|
+
},
|
|
391
|
+
tabIndex: -1,
|
|
333
392
|
get isDisabled() {
|
|
334
393
|
return !state.canIncrement();
|
|
335
394
|
},
|
|
395
|
+
onClick: onIncrementClick,
|
|
336
396
|
onPressStart: onIncrementPressStart,
|
|
337
397
|
onPressUp: onIncrementPressUp,
|
|
338
398
|
onPressEnd: onIncrementPressEnd,
|
|
339
399
|
} as AriaButtonProps;
|
|
340
400
|
},
|
|
341
401
|
get decrementButtonProps() {
|
|
402
|
+
const labelledBy = buttonLabelledBy();
|
|
342
403
|
return {
|
|
343
404
|
id: decrementId,
|
|
344
|
-
"
|
|
405
|
+
type: "button",
|
|
406
|
+
"aria-label": `Decrease ${fieldLabel()}`.trim(),
|
|
407
|
+
"aria-labelledby": labelledBy ? `${decrementId} ${labelledBy}` : undefined,
|
|
345
408
|
"aria-controls": inputId,
|
|
346
409
|
excludeFromTabOrder: true,
|
|
347
410
|
preventFocusOnPress: true,
|
|
348
411
|
allowFocusWhenDisabled: true,
|
|
412
|
+
get disabled() {
|
|
413
|
+
return !state.canDecrement();
|
|
414
|
+
},
|
|
415
|
+
tabIndex: -1,
|
|
349
416
|
get isDisabled() {
|
|
350
417
|
return !state.canDecrement();
|
|
351
418
|
},
|
|
419
|
+
onClick: onDecrementClick,
|
|
352
420
|
onPressStart: onDecrementPressStart,
|
|
353
421
|
onPressUp: onDecrementPressUp,
|
|
354
422
|
onPressEnd: onDecrementPressEnd,
|
|
@@ -78,6 +78,8 @@ export interface PositionOpts {
|
|
|
78
78
|
crossOffset: number;
|
|
79
79
|
maxHeight?: number;
|
|
80
80
|
arrowBoundaryOffset?: number;
|
|
81
|
+
/** Overrides the target element's measured rect (e.g. position relative to a cursor point). */
|
|
82
|
+
targetRect?: Offset | null | undefined;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
type HeightGrowthDirection = "top" | "bottom";
|
|
@@ -627,8 +629,12 @@ export function getRect(node: Element, ignoreScale: boolean) {
|
|
|
627
629
|
return { top, left, width, height };
|
|
628
630
|
}
|
|
629
631
|
|
|
630
|
-
function getElementOffset(
|
|
631
|
-
|
|
632
|
+
function getElementOffset(
|
|
633
|
+
node: Element,
|
|
634
|
+
ignoreScale: boolean,
|
|
635
|
+
overrideRect?: Offset | null,
|
|
636
|
+
): Offset {
|
|
637
|
+
const { top, left, width, height } = overrideRect || getRect(node, ignoreScale);
|
|
632
638
|
const { scrollTop, scrollLeft, clientTop, clientLeft } = document.documentElement;
|
|
633
639
|
return {
|
|
634
640
|
top: top + scrollTop - clientTop,
|
|
@@ -638,13 +644,18 @@ function getElementOffset(node: Element, ignoreScale: boolean): Offset {
|
|
|
638
644
|
};
|
|
639
645
|
}
|
|
640
646
|
|
|
641
|
-
function getPosition(
|
|
647
|
+
function getPosition(
|
|
648
|
+
node: Element,
|
|
649
|
+
parent: Element,
|
|
650
|
+
ignoreScale: boolean,
|
|
651
|
+
overrideRect?: Offset | null,
|
|
652
|
+
): Offset {
|
|
642
653
|
const style = window.getComputedStyle(node);
|
|
643
654
|
let offset: Offset;
|
|
644
655
|
if (style.position === "fixed") {
|
|
645
|
-
offset = getRect(node, ignoreScale);
|
|
656
|
+
offset = overrideRect || getRect(node, ignoreScale);
|
|
646
657
|
} else {
|
|
647
|
-
offset = getElementOffset(node, ignoreScale);
|
|
658
|
+
offset = getElementOffset(node, ignoreScale, overrideRect);
|
|
648
659
|
const parentOffset = getElementOffset(parent, ignoreScale);
|
|
649
660
|
const parentStyle = window.getComputedStyle(parent);
|
|
650
661
|
parentOffset.top +=
|
|
@@ -712,6 +723,7 @@ export function calculatePosition(opts: PositionOpts): PositionResult {
|
|
|
712
723
|
maxHeight,
|
|
713
724
|
arrowSize,
|
|
714
725
|
arrowBoundaryOffset = 0,
|
|
726
|
+
targetRect,
|
|
715
727
|
} = opts;
|
|
716
728
|
|
|
717
729
|
const visualViewport = getVisualViewport();
|
|
@@ -721,8 +733,8 @@ export function calculatePosition(opts: PositionOpts): PositionResult {
|
|
|
721
733
|
const containerPositionStyle = window.getComputedStyle(container).position;
|
|
722
734
|
const isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== "static";
|
|
723
735
|
const childOffset: Offset = isViewportContainer
|
|
724
|
-
? getElementOffset(targetNode, false)
|
|
725
|
-
: getPosition(targetNode, container, false);
|
|
736
|
+
? getElementOffset(targetNode, false, targetRect)
|
|
737
|
+
: getPosition(targetNode, container, false, targetRect);
|
|
726
738
|
|
|
727
739
|
if (!isViewportContainer) {
|
|
728
740
|
const { marginTop, marginLeft } = window.getComputedStyle(targetNode);
|
|
@@ -94,6 +94,14 @@ export interface AriaPositionProps extends PositionProps {
|
|
|
94
94
|
* @default 0
|
|
95
95
|
*/
|
|
96
96
|
arrowBoundaryOffset?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Overrides the target element's bounding rectangle. Useful for positioning relative to
|
|
99
|
+
* a specific point such as the mouse cursor (e.g. context menus) or text selection.
|
|
100
|
+
*
|
|
101
|
+
* @default target.getBoundingClientRect()
|
|
102
|
+
* @param target - The target element.
|
|
103
|
+
*/
|
|
104
|
+
getTargetRect?: (target: Element) => DOMRect | null | undefined;
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
export interface PositionAria {
|
|
@@ -192,6 +200,7 @@ export function createOverlayPosition(props: AriaPositionProps): PositionAria {
|
|
|
192
200
|
maxHeight: maxHeight(),
|
|
193
201
|
arrowSize: arrowSize() ?? (arrowNode ? getRect(arrowNode, true).width : 0),
|
|
194
202
|
arrowBoundaryOffset: arrowBoundaryOffset(),
|
|
203
|
+
targetRect: props.getTargetRect?.(targetNode),
|
|
195
204
|
});
|
|
196
205
|
|
|
197
206
|
if (!result.position) {
|
package/src/radio/createRadio.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { mergeProps } from "../utils/mergeProps";
|
|
|
14
14
|
import { filterDOMProps } from "../utils/filterDOMProps";
|
|
15
15
|
import { type MaybeAccessor, access } from "../utils/reactivity";
|
|
16
16
|
import { isDevEnv } from "../utils/env";
|
|
17
|
+
import { createSlotId } from "../ssr";
|
|
17
18
|
import { type RadioGroupState, radioGroupSyncVersion } from "@proyecto-viviana/solid-stately";
|
|
18
19
|
import { radioGroupData } from "./createRadioGroup";
|
|
19
20
|
import { type PressEvent } from "../interactions/PressEvent";
|
|
@@ -62,6 +63,8 @@ export interface RadioAria {
|
|
|
62
63
|
labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
|
|
63
64
|
/** Props for the input element. */
|
|
64
65
|
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
66
|
+
/** Props for the radio's description element, if any. */
|
|
67
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
65
68
|
/** Whether the radio is disabled. */
|
|
66
69
|
isDisabled: boolean;
|
|
67
70
|
/** Whether the radio is currently selected. */
|
|
@@ -133,8 +136,8 @@ export function createRadio(
|
|
|
133
136
|
// internal `checked` state when clicked, regardless of what the signal says
|
|
134
137
|
//
|
|
135
138
|
// To prevent this, we force the input's `checked` DOM property to match our state
|
|
136
|
-
// after processing the change. This is
|
|
137
|
-
//
|
|
139
|
+
// after processing the change. This is a common pattern across SolidJS component
|
|
140
|
+
// libraries (see CREDITS.md for attribution).
|
|
138
141
|
const onChange: JSX.EventHandler<HTMLInputElement, Event> = (e) => {
|
|
139
142
|
e.stopPropagation();
|
|
140
143
|
|
|
@@ -267,6 +270,10 @@ export function createRadio(
|
|
|
267
270
|
|
|
268
271
|
const combinedIsPressed: Accessor<boolean> = () => isPressed() || isLabelPressed();
|
|
269
272
|
|
|
273
|
+
// The radio's own description slot id — resolves only once an element with
|
|
274
|
+
// this id is rendered (e.g. a `<Text slot="description">` child).
|
|
275
|
+
const descriptionId = createSlotId();
|
|
276
|
+
|
|
270
277
|
return {
|
|
271
278
|
labelProps: mergeProps(labelPressProps, {
|
|
272
279
|
onClick: (e: MouseEvent) => e.preventDefault(),
|
|
@@ -276,10 +283,17 @@ export function createRadio(
|
|
|
276
283
|
const p = getProps();
|
|
277
284
|
const groupData = getGroupData();
|
|
278
285
|
|
|
286
|
+
// Order mirrors upstream useRadio: the user's aria-describedby, then the
|
|
287
|
+
// radio's own description, then the group's error message (when invalid)
|
|
288
|
+
// and the group's shared description.
|
|
279
289
|
const describedByIds: string[] = [];
|
|
280
290
|
if (p["aria-describedby"]) {
|
|
281
291
|
describedByIds.push(p["aria-describedby"]);
|
|
282
292
|
}
|
|
293
|
+
const ownDescriptionId = descriptionId();
|
|
294
|
+
if (ownDescriptionId) {
|
|
295
|
+
describedByIds.push(ownDescriptionId);
|
|
296
|
+
}
|
|
283
297
|
if (state.isInvalid && groupData?.errorMessageId) {
|
|
284
298
|
describedByIds.push(groupData.errorMessageId);
|
|
285
299
|
}
|
|
@@ -302,6 +316,9 @@ export function createRadio(
|
|
|
302
316
|
"aria-describedby": ariaDescribedBy,
|
|
303
317
|
}) as JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
304
318
|
},
|
|
319
|
+
get descriptionProps() {
|
|
320
|
+
return { id: descriptionId() };
|
|
321
|
+
},
|
|
305
322
|
isDisabled: isDisabled(),
|
|
306
323
|
isSelected,
|
|
307
324
|
isPressed: combinedIsPressed,
|
|
@@ -344,15 +344,21 @@ export function createSelect<T>(
|
|
|
344
344
|
|
|
345
345
|
// Handle focus events
|
|
346
346
|
const handleFocus = (e: FocusEvent) => {
|
|
347
|
-
state.setFocused(true);
|
|
348
347
|
getProps().onFocus?.(e);
|
|
349
348
|
getProps().onFocusChange?.(true);
|
|
349
|
+
state.setFocused(true);
|
|
350
350
|
};
|
|
351
351
|
|
|
352
352
|
const handleBlur = (e: FocusEvent) => {
|
|
353
|
-
|
|
353
|
+
// Focus moving into the open listbox is not a select blur; the menu's own
|
|
354
|
+
// onBlur clears the state when focus leaves the listbox entirely.
|
|
355
|
+
if (state.isOpen()) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
|
|
354
359
|
getProps().onBlur?.(e);
|
|
355
360
|
getProps().onFocusChange?.(false);
|
|
361
|
+
state.setFocused(false);
|
|
356
362
|
};
|
|
357
363
|
|
|
358
364
|
return {
|
|
@@ -410,6 +416,16 @@ export function createSelect<T>(
|
|
|
410
416
|
"aria-labelledby": buttonId,
|
|
411
417
|
"aria-multiselectable": state.selectionMode() === "multiple" ? true : undefined,
|
|
412
418
|
tabIndex: -1,
|
|
419
|
+
onBlur: (e: FocusEvent) => {
|
|
420
|
+
// Only a blur that leaves the listbox entirely blurs the select.
|
|
421
|
+
if ((e.currentTarget as Node | null)?.contains(e.relatedTarget as Node)) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
getProps().onBlur?.(e);
|
|
426
|
+
getProps().onFocusChange?.(false);
|
|
427
|
+
state.setFocused(false);
|
|
428
|
+
},
|
|
413
429
|
} as JSX.HTMLAttributes<HTMLElement>;
|
|
414
430
|
},
|
|
415
431
|
get descriptionProps() {
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOMLayoutDelegate - reads layout information for collection items directly
|
|
3
|
+
* from the DOM, used by {@link ListKeyboardDelegate} for page up/down
|
|
4
|
+
* navigation. Based on @react-aria/selection's `DOMLayoutDelegate`.
|
|
5
|
+
*
|
|
6
|
+
* React → Solid adaptation: the layout delegate captures a Solid ref accessor
|
|
7
|
+
* (`() => HTMLElement | null`) instead of a React `RefObject`; everything else
|
|
8
|
+
* is a faithful port.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { Accessor } from "solid-js";
|
|
12
|
+
import type { Key } from "@proyecto-viviana/solid-stately";
|
|
13
|
+
import { getItemElement } from "./utils";
|
|
14
|
+
|
|
15
|
+
/** A rectangle in the collection's scroll coordinate space. */
|
|
16
|
+
export interface Rect {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** The size of the collection's scrollable content. */
|
|
24
|
+
export interface Size {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Provides layout information about the items in a collection. By default this
|
|
31
|
+
* is read from the DOM (see {@link DOMLayoutDelegate}), but a virtualized
|
|
32
|
+
* collection can supply its own implementation. Mirrors @react-types/shared's
|
|
33
|
+
* `LayoutDelegate`, scoped to the members that selection navigation consumes.
|
|
34
|
+
*/
|
|
35
|
+
export interface LayoutDelegate {
|
|
36
|
+
/** Returns the rectangle for the item with the given key, in scroll coordinates. */
|
|
37
|
+
getItemRect(key: Key): Rect | null;
|
|
38
|
+
/** Returns the total size of the scrollable content. */
|
|
39
|
+
getContentSize(): Size;
|
|
40
|
+
/** Returns the currently visible rectangle (the scroll viewport). */
|
|
41
|
+
getVisibleRect(): Rect;
|
|
42
|
+
/** Returns the keys between two keys (inclusive), if known without walking the collection. */
|
|
43
|
+
getKeyRange?(from: Key, to: Key): Key[];
|
|
44
|
+
/** Returns the key spatially to the left of the given key, if known. */
|
|
45
|
+
getKeyLeftOf?(key: Key): Key | null;
|
|
46
|
+
/** Returns the key spatially to the right of the given key, if known. */
|
|
47
|
+
getKeyRightOf?(key: Key): Key | null;
|
|
48
|
+
/** Returns the key spatially above the given key, if known. */
|
|
49
|
+
getKeyAbove?(key: Key): Key | null;
|
|
50
|
+
/** Returns the key spatially below the given key, if known. */
|
|
51
|
+
getKeyBelow?(key: Key): Key | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A {@link LayoutDelegate} that measures items via the DOM.
|
|
56
|
+
*/
|
|
57
|
+
export class DOMLayoutDelegate implements LayoutDelegate {
|
|
58
|
+
private ref: Accessor<HTMLElement | null>;
|
|
59
|
+
|
|
60
|
+
constructor(ref: Accessor<HTMLElement | null>) {
|
|
61
|
+
this.ref = ref;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
getItemRect(key: Key): Rect | null {
|
|
65
|
+
const container = this.ref();
|
|
66
|
+
if (!container) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const item = key != null ? getItemElement(this.ref, key) : null;
|
|
70
|
+
if (!item) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const containerRect = container.getBoundingClientRect();
|
|
75
|
+
const itemRect = item.getBoundingClientRect();
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
|
|
79
|
+
y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
|
|
80
|
+
width: itemRect.width,
|
|
81
|
+
height: itemRect.height,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
getContentSize(): Size {
|
|
86
|
+
const container = this.ref();
|
|
87
|
+
return {
|
|
88
|
+
width: container?.scrollWidth ?? 0,
|
|
89
|
+
height: container?.scrollHeight ?? 0,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
getVisibleRect(): Rect {
|
|
94
|
+
const container = this.ref();
|
|
95
|
+
return {
|
|
96
|
+
x: container?.scrollLeft ?? 0,
|
|
97
|
+
y: container?.scrollTop ?? 0,
|
|
98
|
+
width: container?.clientWidth ?? 0,
|
|
99
|
+
height: container?.clientHeight ?? 0,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|