@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
|
@@ -9,6 +9,7 @@ import { createMemo } from "solid-js";
|
|
|
9
9
|
import { DateFormatter, startOfWeek, today } from "@internationalized/date";
|
|
10
10
|
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
11
11
|
import type { CalendarState, CalendarDate } from "@proyecto-viviana/solid-stately";
|
|
12
|
+
import { formatVisibleRangeDescription, getCalendarHookData } from "./utils";
|
|
12
13
|
|
|
13
14
|
export interface AriaCalendarGridProps {
|
|
14
15
|
/** The start date of the grid (defaults to start of focused month). */
|
|
@@ -142,16 +143,49 @@ export function createCalendarGrid<T extends CalendarState>(
|
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
145
|
|
|
146
|
+
// Whether more than one date can be selected at once. Mirrors
|
|
147
|
+
// @react-aria/calendar useCalendarGrid: true for a RangeCalendar (highlightable
|
|
148
|
+
// range) or a Calendar in multiple-selection mode.
|
|
149
|
+
const isMultiSelectable = (): boolean => {
|
|
150
|
+
if ("highlightedRange" in state) {
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
return (
|
|
154
|
+
"selectionMode" in state &&
|
|
155
|
+
typeof state.selectionMode === "function" &&
|
|
156
|
+
state.selectionMode() === "multiple"
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// The grid's accessible name combines the calendar's label with a description
|
|
161
|
+
// of this grid's visible month/range, mirroring @react-aria/calendar
|
|
162
|
+
// useCalendarGrid (useVisibleRangeDescription over the grid's own start/end so
|
|
163
|
+
// multi-month calendars name each grid by its own month).
|
|
164
|
+
const visibleRangeDescription = createMemo(() => {
|
|
165
|
+
const gridProps = access(props);
|
|
166
|
+
const start = gridProps.startDate ?? state.visibleRange().start;
|
|
167
|
+
const end = gridProps.endDate ?? state.visibleRange().end;
|
|
168
|
+
return formatVisibleRangeDescription(start, end, state.timeZone, state.locale());
|
|
169
|
+
});
|
|
170
|
+
|
|
145
171
|
// Grid props
|
|
146
|
-
const gridProps = createMemo(() =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
172
|
+
const gridProps = createMemo(() => {
|
|
173
|
+
const data = getCalendarHookData(state);
|
|
174
|
+
const gridLabel = [data?.ariaLabel, visibleRangeDescription()].filter(Boolean).join(", ");
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
role: "grid",
|
|
178
|
+
"aria-label": gridLabel || undefined,
|
|
179
|
+
"aria-labelledby": data?.ariaLabelledBy,
|
|
180
|
+
"aria-readonly": state.isReadOnly() || undefined,
|
|
181
|
+
"aria-disabled": state.isDisabled() || undefined,
|
|
182
|
+
"aria-multiselectable": isMultiSelectable() || undefined,
|
|
183
|
+
tabIndex: state.isFocused() ? 0 : -1,
|
|
184
|
+
onFocus: () => state.setFocused(true),
|
|
185
|
+
onBlur: () => state.setFocused(false),
|
|
186
|
+
onKeyDown: handleKeyDown,
|
|
187
|
+
};
|
|
188
|
+
});
|
|
155
189
|
|
|
156
190
|
// Header props are intentionally empty. Consumers render this on <thead>,
|
|
157
191
|
// which already has correct table semantics.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createCalendarMonthPicker hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for a month picker
|
|
5
|
+
* within a calendar — a listbox/select that jumps the focused date to a chosen
|
|
6
|
+
* month of the focused year.
|
|
7
|
+
* Based on @react-aria/calendar useCalendarMonthPicker.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { createMemo } from "solid-js";
|
|
11
|
+
import { DateFormatter, type CalendarDate } from "@internationalized/date";
|
|
12
|
+
import type { CalendarState, RangeCalendarState } from "@proyecto-viviana/solid-stately";
|
|
13
|
+
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
14
|
+
import { useLocale } from "../i18n";
|
|
15
|
+
|
|
16
|
+
type Key = string | number;
|
|
17
|
+
|
|
18
|
+
export interface CalendarMonthPickerProps {
|
|
19
|
+
/** The format of the month to display in the picker. @default 'short' */
|
|
20
|
+
format?: "numeric" | "2-digit" | "long" | "short" | "narrow";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CalendarMonthPickerItem {
|
|
24
|
+
/** The 1-based month number, used as the item's key. */
|
|
25
|
+
id: number;
|
|
26
|
+
/** The first day of the month. */
|
|
27
|
+
date: CalendarDate;
|
|
28
|
+
/** The localized month name. */
|
|
29
|
+
formatted: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface CalendarMonthPickerAria {
|
|
33
|
+
/** An accessible label for the month picker. */
|
|
34
|
+
"aria-label": string;
|
|
35
|
+
/** The key of the currently focused month (its 1-based number). */
|
|
36
|
+
value: Key;
|
|
37
|
+
/** Handler that moves focus to the selected month. */
|
|
38
|
+
onChange: (key: Key | null) => void;
|
|
39
|
+
/** The list of selectable months in the focused year. */
|
|
40
|
+
items: CalendarMonthPickerItem[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Provides the behavior and accessibility implementation for a month picker
|
|
45
|
+
* within a calendar.
|
|
46
|
+
*/
|
|
47
|
+
export function createCalendarMonthPicker(
|
|
48
|
+
props: MaybeAccessor<CalendarMonthPickerProps>,
|
|
49
|
+
state: CalendarState | RangeCalendarState,
|
|
50
|
+
): CalendarMonthPickerAria {
|
|
51
|
+
const getProps = () => access(props);
|
|
52
|
+
const locale = useLocale();
|
|
53
|
+
|
|
54
|
+
const formatter = createMemo(
|
|
55
|
+
() =>
|
|
56
|
+
new DateFormatter(locale().locale, {
|
|
57
|
+
month: getProps().format ?? "short",
|
|
58
|
+
calendar: state.focusedDate().calendar.identifier,
|
|
59
|
+
timeZone: state.timeZone,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// Build the list of months in the focused year. The number of months can vary
|
|
64
|
+
// by year in some calendar systems (e.g. the Hebrew leap year), so derive it
|
|
65
|
+
// from the focused date rather than assuming twelve.
|
|
66
|
+
const items = createMemo<CalendarMonthPickerItem[]>(() => {
|
|
67
|
+
const focused = state.focusedDate();
|
|
68
|
+
const fmt = formatter();
|
|
69
|
+
const numMonths = focused.calendar.getMonthsInYear(focused);
|
|
70
|
+
const months: CalendarMonthPickerItem[] = [];
|
|
71
|
+
for (let i = 1; i <= numMonths; i++) {
|
|
72
|
+
const date = focused.set({ month: i });
|
|
73
|
+
// Calendars that offset their month numbering (e.g. fiscal calendars)
|
|
74
|
+
// expose getFormattableMonth to map back to the displayable month.
|
|
75
|
+
const displayDate = date.calendar.getFormattableMonth?.(date) ?? date;
|
|
76
|
+
months.push({
|
|
77
|
+
id: i,
|
|
78
|
+
date,
|
|
79
|
+
formatted: fmt.format(displayDate.toDate(state.timeZone)),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return months;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const ariaLabel = createMemo(
|
|
86
|
+
() => new Intl.DisplayNames(locale().locale, { type: "dateTimeField" }).of("month") ?? "month",
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
get "aria-label"() {
|
|
91
|
+
return ariaLabel();
|
|
92
|
+
},
|
|
93
|
+
get value() {
|
|
94
|
+
return state.focusedDate().month;
|
|
95
|
+
},
|
|
96
|
+
onChange: (key) => {
|
|
97
|
+
if (key != null) {
|
|
98
|
+
state.setFocusedDate(items()[Number(key) - 1].date);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
get items() {
|
|
102
|
+
return items();
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createCalendarYearPicker hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for a year picker
|
|
5
|
+
* within a calendar — a listbox/select that jumps the focused date to a chosen
|
|
6
|
+
* year within a sliding window centered on the focused year.
|
|
7
|
+
* Based on @react-aria/calendar useCalendarYearPicker.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { createMemo } from "solid-js";
|
|
11
|
+
import {
|
|
12
|
+
DateFormatter,
|
|
13
|
+
isSameYear,
|
|
14
|
+
toCalendarDate,
|
|
15
|
+
type CalendarDate,
|
|
16
|
+
} from "@internationalized/date";
|
|
17
|
+
import type { CalendarState, RangeCalendarState } from "@proyecto-viviana/solid-stately";
|
|
18
|
+
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
19
|
+
import { useLocale } from "../i18n";
|
|
20
|
+
|
|
21
|
+
type Key = string | number;
|
|
22
|
+
|
|
23
|
+
export interface CalendarYearPickerFormatOptions {
|
|
24
|
+
/** The format of the year. @default 'numeric' */
|
|
25
|
+
year?: "numeric" | "2-digit";
|
|
26
|
+
/** The format of the era. */
|
|
27
|
+
era?: "long" | "short" | "narrow";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CalendarYearPickerProps {
|
|
31
|
+
/** The number of years to display in the picker. @default 20 */
|
|
32
|
+
visibleYears?: number;
|
|
33
|
+
/** The format of the year/era to display. */
|
|
34
|
+
format?: CalendarYearPickerFormatOptions;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface CalendarYearPickerItem {
|
|
38
|
+
/** The index of the year within the visible window, used as the item's key. */
|
|
39
|
+
id: number;
|
|
40
|
+
/** The first day of the year. */
|
|
41
|
+
date: CalendarDate;
|
|
42
|
+
/** The localized year name. */
|
|
43
|
+
formatted: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface CalendarYearPickerAria {
|
|
47
|
+
/** An accessible label for the year picker. */
|
|
48
|
+
"aria-label": string;
|
|
49
|
+
/** The key of the currently focused year (its index in the visible window). */
|
|
50
|
+
value: Key;
|
|
51
|
+
/** Handler that moves focus to the selected year. */
|
|
52
|
+
onChange: (key: Key | null) => void;
|
|
53
|
+
/** The list of selectable years in the visible window. */
|
|
54
|
+
items: CalendarYearPickerItem[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Provides the behavior and accessibility implementation for a year picker
|
|
59
|
+
* within a calendar.
|
|
60
|
+
*/
|
|
61
|
+
export function createCalendarYearPicker(
|
|
62
|
+
props: MaybeAccessor<CalendarYearPickerProps>,
|
|
63
|
+
state: CalendarState | RangeCalendarState,
|
|
64
|
+
): CalendarYearPickerAria {
|
|
65
|
+
const getProps = () => access(props);
|
|
66
|
+
const locale = useLocale();
|
|
67
|
+
|
|
68
|
+
const formatter = createMemo(() => {
|
|
69
|
+
const focused = state.focusedDate();
|
|
70
|
+
const format = getProps().format;
|
|
71
|
+
return new DateFormatter(locale().locale, {
|
|
72
|
+
year: format?.year ?? "numeric",
|
|
73
|
+
era:
|
|
74
|
+
format?.era ??
|
|
75
|
+
(focused.calendar.identifier === "gregory" && focused.era === "BC" ? "short" : undefined),
|
|
76
|
+
calendar: focused.calendar.identifier,
|
|
77
|
+
timeZone: state.timeZone,
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Compute a window of years centered on the focused year, then clamp it to the
|
|
82
|
+
// calendar's min/max so the picker never offers an out-of-range year.
|
|
83
|
+
const data = createMemo(() => {
|
|
84
|
+
const focused = state.focusedDate();
|
|
85
|
+
const fmt = formatter();
|
|
86
|
+
// Falsy coercion (not `??`) mirrors upstream `props.visibleYears || 20`, so a
|
|
87
|
+
// `0`/`NaN` visibleYears falls back to the default 20 rather than producing an
|
|
88
|
+
// empty window.
|
|
89
|
+
const visibleYears = getProps().visibleYears || 20;
|
|
90
|
+
let minDate = focused.subtract({ years: Math.floor(visibleYears / 2) });
|
|
91
|
+
let maxDate = focused.add({ years: Math.ceil(visibleYears / 2) - 1 });
|
|
92
|
+
|
|
93
|
+
const stateMax = state.maxValue();
|
|
94
|
+
const stateMin = state.minValue();
|
|
95
|
+
if (stateMax && maxDate.compare(stateMax) > 0) {
|
|
96
|
+
maxDate = toCalendarDate(stateMax);
|
|
97
|
+
minDate = maxDate.subtract({ years: visibleYears - 1 });
|
|
98
|
+
}
|
|
99
|
+
if (stateMin && minDate.compare(stateMin) < 0) {
|
|
100
|
+
minDate = toCalendarDate(stateMin);
|
|
101
|
+
maxDate = minDate.add({ years: visibleYears - 1 });
|
|
102
|
+
if (stateMax && maxDate.compare(stateMax) > 0) {
|
|
103
|
+
maxDate = toCalendarDate(stateMax);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const years: CalendarYearPickerItem[] = [];
|
|
108
|
+
let value: number = 0;
|
|
109
|
+
let date = minDate;
|
|
110
|
+
while (date.compare(maxDate) <= 0) {
|
|
111
|
+
if (isSameYear(date, focused)) {
|
|
112
|
+
value = years.length;
|
|
113
|
+
}
|
|
114
|
+
years.push({
|
|
115
|
+
id: years.length,
|
|
116
|
+
date,
|
|
117
|
+
formatted: fmt.format(date.toDate(state.timeZone)),
|
|
118
|
+
});
|
|
119
|
+
date = date.add({ years: 1 });
|
|
120
|
+
}
|
|
121
|
+
return { items: years, value };
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const ariaLabel = createMemo(
|
|
125
|
+
() => new Intl.DisplayNames(locale().locale, { type: "dateTimeField" }).of("year") ?? "year",
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
get "aria-label"() {
|
|
130
|
+
return ariaLabel();
|
|
131
|
+
},
|
|
132
|
+
get value() {
|
|
133
|
+
return data().value;
|
|
134
|
+
},
|
|
135
|
+
onChange: (key) => {
|
|
136
|
+
if (key != null) {
|
|
137
|
+
state.setFocusedDate(data().items[Number(key)].date);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
get items() {
|
|
141
|
+
return data().items;
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -86,6 +86,8 @@ export function createRangeCalendar<T extends RangeCalendarState>(
|
|
|
86
86
|
initialProps.errorMessage || initialProps.errorMessageId
|
|
87
87
|
? errorMessageId
|
|
88
88
|
: existingHookData?.errorMessageId,
|
|
89
|
+
ariaLabel: initialProps["aria-label"],
|
|
90
|
+
ariaLabelledBy: initialProps["aria-labelledby"],
|
|
89
91
|
get selectedDateDescription() {
|
|
90
92
|
return selectedDateDescription();
|
|
91
93
|
},
|
package/src/calendar/index.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
// Calendar
|
|
2
2
|
export { createCalendar, type AriaCalendarProps, type CalendarAria } from "./createCalendar";
|
|
3
3
|
|
|
4
|
+
// Calendar Month Picker
|
|
5
|
+
export {
|
|
6
|
+
createCalendarMonthPicker,
|
|
7
|
+
type CalendarMonthPickerProps,
|
|
8
|
+
type CalendarMonthPickerItem,
|
|
9
|
+
type CalendarMonthPickerAria,
|
|
10
|
+
} from "./createCalendarMonthPicker";
|
|
11
|
+
|
|
12
|
+
// Calendar Year Picker
|
|
13
|
+
export {
|
|
14
|
+
createCalendarYearPicker,
|
|
15
|
+
type CalendarYearPickerProps,
|
|
16
|
+
type CalendarYearPickerFormatOptions,
|
|
17
|
+
type CalendarYearPickerItem,
|
|
18
|
+
type CalendarYearPickerAria,
|
|
19
|
+
} from "./createCalendarYearPicker";
|
|
20
|
+
|
|
4
21
|
// Calendar Grid
|
|
5
22
|
export {
|
|
6
23
|
createCalendarGrid,
|
package/src/calendar/utils.ts
CHANGED
|
@@ -11,6 +11,10 @@ import { formatCalendarLabel } from "./intl";
|
|
|
11
11
|
export interface CalendarHookData {
|
|
12
12
|
errorMessageId?: string;
|
|
13
13
|
selectedDateDescription?: string;
|
|
14
|
+
/** The calendar's accessible label, shared with each grid (mirrors @react-aria/calendar hookData.ariaLabel). */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/** The id of an element labelling the calendar, shared with each grid (mirrors hookData.ariaLabelledBy). */
|
|
17
|
+
ariaLabelledBy?: string;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
const hookData = new WeakMap<CalendarState | RangeCalendarState, CalendarHookData>();
|
|
@@ -37,6 +37,10 @@ export interface CheckboxAria {
|
|
|
37
37
|
labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
|
|
38
38
|
/** Props for the input element. */
|
|
39
39
|
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
40
|
+
/** Props for the checkbox description element, if any. */
|
|
41
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
42
|
+
/** Props for the checkbox error message element, if any. */
|
|
43
|
+
errorMessageProps: JSX.HTMLAttributes<HTMLElement>;
|
|
40
44
|
/** Whether the checkbox is selected. */
|
|
41
45
|
isSelected: Accessor<boolean>;
|
|
42
46
|
/** Whether the checkbox is in a pressed state. */
|
|
@@ -118,6 +122,12 @@ export function createCheckbox(
|
|
|
118
122
|
required: isRequired && validationBehavior === "native",
|
|
119
123
|
}) as JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
120
124
|
},
|
|
125
|
+
get descriptionProps() {
|
|
126
|
+
return toggleResult.descriptionProps;
|
|
127
|
+
},
|
|
128
|
+
get errorMessageProps() {
|
|
129
|
+
return toggleResult.errorMessageProps;
|
|
130
|
+
},
|
|
121
131
|
isSelected,
|
|
122
132
|
isPressed,
|
|
123
133
|
isDisabled,
|
|
@@ -80,22 +80,18 @@ export function createCheckboxGroupItem(
|
|
|
80
80
|
const baseInputProps = result.inputProps;
|
|
81
81
|
const groupData = getGroupData();
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
describedByIds.push(groupData.descriptionId);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const ariaDescribedBy = describedByIds.length > 0 ? describedByIds.join(" ") : undefined;
|
|
83
|
+
// Mirror upstream useCheckboxGroupItem: keep the checkbox's own
|
|
84
|
+
// aria-describedby (its description/error slot ids from createCheckbox/
|
|
85
|
+
// createToggle, which already fold in the user's aria-describedby) and append
|
|
86
|
+
// the group's shared description/error ids.
|
|
87
|
+
const ariaDescribedBy =
|
|
88
|
+
[
|
|
89
|
+
baseInputProps["aria-describedby"],
|
|
90
|
+
state.isInvalid && groupData?.errorMessageId ? groupData.errorMessageId : null,
|
|
91
|
+
groupData?.descriptionId,
|
|
92
|
+
]
|
|
93
|
+
.filter(Boolean)
|
|
94
|
+
.join(" ") || undefined;
|
|
99
95
|
|
|
100
96
|
return {
|
|
101
97
|
...baseInputProps,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { createSignal, createMemo, onCleanup } from "solid-js";
|
|
9
9
|
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
10
|
+
import { scrollIntoViewport, getScrollParent } from "../utils";
|
|
10
11
|
import type { DateFieldState, DateSegment, DateSegmentType } from "@proyecto-viviana/solid-stately";
|
|
11
12
|
import { useLocale } from "../i18n";
|
|
12
13
|
|
|
@@ -288,8 +289,12 @@ export function createDateSegment<T extends DateFieldState>(
|
|
|
288
289
|
}
|
|
289
290
|
hadPointerDown = false;
|
|
290
291
|
|
|
291
|
-
// Select all text in the segment
|
|
292
292
|
const el = ref?.();
|
|
293
|
+
if (el) {
|
|
294
|
+
scrollIntoViewport(el, { containingElement: getScrollParent(el) });
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Select all text in the segment
|
|
293
298
|
if (el && typeof window !== "undefined") {
|
|
294
299
|
const selection = window.getSelection();
|
|
295
300
|
if (selection) {
|
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
DropTarget,
|
|
13
13
|
DropOperation,
|
|
14
14
|
DropItem,
|
|
15
|
+
DragType,
|
|
15
16
|
DragTypes,
|
|
16
17
|
Key,
|
|
17
18
|
} from "@proyecto-viviana/solid-stately";
|
|
@@ -390,7 +391,9 @@ export function createDroppableCollection(
|
|
|
390
391
|
return { has: () => true };
|
|
391
392
|
}
|
|
392
393
|
return {
|
|
393
|
-
|
|
394
|
+
// Keyboard drag mirrors upstream's raw Set<string> delegate: no
|
|
395
|
+
// wildcard expansion (that lives in the DataTransfer-backed DragTypes).
|
|
396
|
+
has: (type: DragType | DragType[]) => typeof type === "string" && draggingTypes.has(type),
|
|
394
397
|
};
|
|
395
398
|
};
|
|
396
399
|
const isValidDropTarget = (target: DropTarget) =>
|
package/src/dnd/utils.ts
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
6
|
DragItem,
|
|
7
|
+
DragType,
|
|
7
8
|
DropItem,
|
|
8
9
|
TextDropItem,
|
|
9
10
|
FileDropItem,
|
|
10
11
|
DirectoryDropItem,
|
|
11
12
|
DropOperation,
|
|
12
13
|
} from "@proyecto-viviana/solid-stately";
|
|
14
|
+
import { DIRECTORY_DRAG_TYPE } from "@proyecto-viviana/solid-stately";
|
|
13
15
|
|
|
14
16
|
// Native drag types that can be transferred between applications
|
|
15
17
|
export const NATIVE_DRAG_TYPES: Set<string> = new Set(["text/plain", "text/uri-list", "text/html"]);
|
|
@@ -231,11 +233,33 @@ export class DragTypesImpl {
|
|
|
231
233
|
this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes("Files");
|
|
232
234
|
}
|
|
233
235
|
|
|
234
|
-
has(type:
|
|
235
|
-
if (
|
|
236
|
+
has(type: DragType | DragType[]): boolean {
|
|
237
|
+
if (Array.isArray(type)) {
|
|
238
|
+
return type.some((t) => this.has(t));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (
|
|
242
|
+
this.includesUnknownTypes ||
|
|
243
|
+
(type === DIRECTORY_DRAG_TYPE && this.types.has(GENERIC_TYPE)) ||
|
|
244
|
+
type === "*/*"
|
|
245
|
+
) {
|
|
236
246
|
return true;
|
|
237
247
|
}
|
|
238
|
-
|
|
248
|
+
|
|
249
|
+
if (typeof type === "string") {
|
|
250
|
+
// Wildcard MIME match, e.g. "image/*" accepts "image/png".
|
|
251
|
+
if (type.endsWith("/*")) {
|
|
252
|
+
for (const key of this.types) {
|
|
253
|
+
if (key.startsWith(type.slice(0, -2))) {
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
return this.types.has(type);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return false;
|
|
239
263
|
}
|
|
240
264
|
}
|
|
241
265
|
|