@proyecto-viviana/solidaria 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunk/DragManager.js +627 -0
- package/dist/_chunk/DragManager.js.map +1 -0
- package/dist/_chunk/DragManager.jsx +627 -0
- package/dist/_chunk/DragManager.jsx.map +1 -0
- package/dist/_chunk/FocusScope.js +400 -0
- package/dist/_chunk/FocusScope.js.map +1 -0
- package/dist/_chunk/FocusScope.jsx +375 -0
- package/dist/_chunk/FocusScope.jsx.map +1 -0
- package/dist/_chunk/actiongroup.js +13 -79
- package/dist/_chunk/actiongroup.js.map +1 -1
- package/dist/_chunk/actiongroup.jsx +13 -79
- package/dist/_chunk/actiongroup.jsx.map +1 -1
- package/dist/_chunk/{live-announcer.js → announce.js} +1 -1
- package/dist/_chunk/announce.js.map +1 -0
- package/dist/_chunk/{live-announcer.jsx → announce.jsx} +1 -1
- package/dist/_chunk/announce.jsx.map +1 -0
- package/dist/_chunk/autocomplete.js +56 -8
- package/dist/_chunk/autocomplete.js.map +1 -1
- package/dist/_chunk/autocomplete.jsx +56 -8
- package/dist/_chunk/autocomplete.jsx.map +1 -1
- package/dist/_chunk/breadcrumbs.js +6 -4
- package/dist/_chunk/breadcrumbs.js.map +1 -1
- package/dist/_chunk/breadcrumbs.jsx +6 -4
- package/dist/_chunk/breadcrumbs.jsx.map +1 -1
- package/dist/_chunk/button.js +8 -9
- package/dist/_chunk/button.js.map +1 -1
- package/dist/_chunk/button.jsx +8 -9
- package/dist/_chunk/button.jsx.map +1 -1
- package/dist/_chunk/calendar.js +27 -26
- package/dist/_chunk/calendar.js.map +1 -1
- package/dist/_chunk/calendar.jsx +27 -26
- package/dist/_chunk/calendar.jsx.map +1 -1
- package/dist/_chunk/checkbox.js +5 -4
- package/dist/_chunk/checkbox.js.map +1 -1
- package/dist/_chunk/checkbox.jsx +5 -4
- package/dist/_chunk/checkbox.jsx.map +1 -1
- package/dist/_chunk/color.js +302 -18
- package/dist/_chunk/color.js.map +1 -1
- package/dist/_chunk/color.jsx +302 -18
- package/dist/_chunk/color.jsx.map +1 -1
- package/dist/_chunk/combobox.js +638 -12
- package/dist/_chunk/combobox.js.map +1 -1
- package/dist/_chunk/combobox.jsx +638 -12
- package/dist/_chunk/combobox.jsx.map +1 -1
- package/dist/_chunk/constants.js +19 -0
- package/dist/_chunk/constants.js.map +1 -0
- package/dist/_chunk/constants.jsx +19 -0
- package/dist/_chunk/constants.jsx.map +1 -0
- package/dist/_chunk/createCollator.js +3 -171
- package/dist/_chunk/createCollator.js.map +1 -1
- package/dist/_chunk/createCollator.jsx +3 -165
- package/dist/_chunk/createCollator.jsx.map +1 -1
- package/dist/_chunk/createField.js +2 -1
- package/dist/_chunk/createField.js.map +1 -1
- package/dist/_chunk/createField.jsx +2 -1
- package/dist/_chunk/createField.jsx.map +1 -1
- package/dist/_chunk/createFocus.js +12 -8
- package/dist/_chunk/createFocus.js.map +1 -1
- package/dist/_chunk/createFocus.jsx +12 -8
- package/dist/_chunk/createFocus.jsx.map +1 -1
- package/dist/_chunk/createFocusWithin.js +12 -13
- package/dist/_chunk/createFocusWithin.js.map +1 -1
- package/dist/_chunk/createFocusWithin.jsx +12 -13
- package/dist/_chunk/createFocusWithin.jsx.map +1 -1
- package/dist/_chunk/createFocusable.js +3 -3
- package/dist/_chunk/createFocusable.js.map +1 -1
- package/dist/_chunk/createFocusable.jsx +3 -3
- package/dist/_chunk/createFocusable.jsx.map +1 -1
- package/dist/_chunk/{form.js → createFormReset.js} +1 -1
- package/dist/_chunk/createFormReset.js.map +1 -0
- package/dist/_chunk/{form.jsx → createFormReset.jsx} +1 -1
- package/dist/_chunk/createFormReset.jsx.map +1 -0
- package/dist/_chunk/createHover.js +2 -1
- package/dist/_chunk/createHover.js.map +1 -1
- package/dist/_chunk/createHover.jsx +2 -1
- package/dist/_chunk/createHover.jsx.map +1 -1
- package/dist/_chunk/createInteractionModality.js +2 -3
- package/dist/_chunk/createInteractionModality.js.map +1 -1
- package/dist/_chunk/createInteractionModality.jsx +2 -3
- package/dist/_chunk/createInteractionModality.jsx.map +1 -1
- package/dist/_chunk/createLabel.js +2 -1
- package/dist/_chunk/createLabel.js.map +1 -1
- package/dist/_chunk/createLabel.jsx +2 -1
- package/dist/_chunk/createLabel.jsx.map +1 -1
- package/dist/_chunk/createLabels.js +3 -2
- package/dist/_chunk/createLabels.js.map +1 -1
- package/dist/_chunk/createLabels.jsx +3 -2
- package/dist/_chunk/createLabels.jsx.map +1 -1
- package/dist/_chunk/createLandmark.js +1 -1
- package/dist/_chunk/createLandmark.jsx +1 -1
- package/dist/_chunk/createProgressBar.js +2 -1
- package/dist/_chunk/createProgressBar.js.map +1 -1
- package/dist/_chunk/createProgressBar.jsx +2 -1
- package/dist/_chunk/createProgressBar.jsx.map +1 -1
- package/dist/_chunk/createSelectableItem.js +7 -3
- package/dist/_chunk/createSelectableItem.js.map +1 -1
- package/dist/_chunk/createSelectableItem.jsx +7 -3
- package/dist/_chunk/createSelectableItem.jsx.map +1 -1
- package/dist/_chunk/createStringFormatter.js +61 -0
- package/dist/_chunk/createStringFormatter.js.map +1 -0
- package/dist/_chunk/createStringFormatter.jsx +61 -0
- package/dist/_chunk/createStringFormatter.jsx.map +1 -0
- package/dist/_chunk/createToggle.js +5 -4
- package/dist/_chunk/createToggle.js.map +1 -1
- package/dist/_chunk/createToggle.jsx +5 -4
- package/dist/_chunk/createToggle.jsx.map +1 -1
- package/dist/_chunk/datepicker.js +1413 -1100
- package/dist/_chunk/datepicker.js.map +1 -1
- package/dist/_chunk/datepicker.jsx +1413 -1100
- package/dist/_chunk/datepicker.jsx.map +1 -1
- package/dist/_chunk/disclosure.js +2 -2
- package/dist/_chunk/disclosure.js.map +1 -1
- package/dist/_chunk/disclosure.jsx +2 -2
- package/dist/_chunk/disclosure.jsx.map +1 -1
- package/dist/_chunk/dnd.js +1586 -495
- package/dist/_chunk/dnd.js.map +1 -1
- package/dist/_chunk/dnd.jsx +1586 -495
- package/dist/_chunk/dnd.jsx.map +1 -1
- package/dist/_chunk/env.js +1 -19
- package/dist/_chunk/env.js.map +1 -1
- package/dist/_chunk/env.jsx +1 -19
- package/dist/_chunk/env.jsx.map +1 -1
- package/dist/_chunk/focus.js +1 -1
- package/dist/_chunk/focus.js.map +1 -1
- package/dist/_chunk/focus.jsx +1 -1
- package/dist/_chunk/focus.jsx.map +1 -1
- package/dist/_chunk/focus2.js +54 -318
- package/dist/_chunk/focus2.js.map +1 -1
- package/dist/_chunk/focus2.jsx +53 -292
- package/dist/_chunk/focus2.jsx.map +1 -1
- package/dist/_chunk/grid.js +1 -1
- package/dist/_chunk/grid.jsx +1 -1
- package/dist/_chunk/gridlist.js +14 -9
- package/dist/_chunk/gridlist.js.map +1 -1
- package/dist/_chunk/gridlist.jsx +14 -9
- package/dist/_chunk/gridlist.jsx.map +1 -1
- package/dist/_chunk/i18n.js +3 -58
- package/dist/_chunk/i18n.js.map +1 -1
- package/dist/_chunk/i18n.jsx +3 -58
- package/dist/_chunk/i18n.jsx.map +1 -1
- package/dist/_chunk/interactions.js +99 -9
- package/dist/_chunk/interactions.js.map +1 -1
- package/dist/_chunk/interactions.jsx +97 -9
- package/dist/_chunk/interactions.jsx.map +1 -1
- package/dist/_chunk/link.js +2 -1
- package/dist/_chunk/link.js.map +1 -1
- package/dist/_chunk/link.jsx +2 -1
- package/dist/_chunk/link.jsx.map +1 -1
- package/dist/_chunk/listbox.js +42 -10
- package/dist/_chunk/listbox.js.map +1 -1
- package/dist/_chunk/listbox.jsx +42 -10
- package/dist/_chunk/listbox.jsx.map +1 -1
- package/dist/_chunk/locale.js +173 -0
- package/dist/_chunk/locale.js.map +1 -0
- package/dist/_chunk/locale.jsx +167 -0
- package/dist/_chunk/locale.jsx.map +1 -0
- package/dist/_chunk/menu.js +5 -4
- package/dist/_chunk/menu.js.map +1 -1
- package/dist/_chunk/menu.jsx +5 -4
- package/dist/_chunk/menu.jsx.map +1 -1
- package/dist/_chunk/numberfield.js +3 -2
- package/dist/_chunk/numberfield.js.map +1 -1
- package/dist/_chunk/numberfield.jsx +3 -2
- package/dist/_chunk/numberfield.jsx.map +1 -1
- package/dist/_chunk/overlays.js +1 -1
- package/dist/_chunk/overlays.jsx +1 -1
- package/dist/_chunk/popover.js +3 -3
- package/dist/_chunk/popover.js.map +1 -1
- package/dist/_chunk/popover.jsx +3 -3
- package/dist/_chunk/popover.jsx.map +1 -1
- package/dist/_chunk/radio.js +7 -6
- package/dist/_chunk/radio.js.map +1 -1
- package/dist/_chunk/radio.jsx +7 -6
- package/dist/_chunk/radio.jsx.map +1 -1
- package/dist/_chunk/reactivity.js +21 -0
- package/dist/_chunk/reactivity.js.map +1 -0
- package/dist/_chunk/reactivity.jsx +21 -0
- package/dist/_chunk/reactivity.jsx.map +1 -0
- package/dist/_chunk/searchfield.js +2 -1
- package/dist/_chunk/searchfield.js.map +1 -1
- package/dist/_chunk/searchfield.jsx +2 -1
- package/dist/_chunk/searchfield.jsx.map +1 -1
- package/dist/_chunk/select.js +8 -5
- package/dist/_chunk/select.js.map +1 -1
- package/dist/_chunk/select.jsx +8 -5
- package/dist/_chunk/select.jsx.map +1 -1
- package/dist/_chunk/selection.js +8 -21
- package/dist/_chunk/selection.js.map +1 -1
- package/dist/_chunk/selection.jsx +8 -21
- package/dist/_chunk/selection.jsx.map +1 -1
- package/dist/_chunk/separator.js +1 -1
- package/dist/_chunk/separator.jsx +1 -1
- package/dist/_chunk/slider.js +5 -4
- package/dist/_chunk/slider.js.map +1 -1
- package/dist/_chunk/slider.jsx +5 -4
- package/dist/_chunk/slider.jsx.map +1 -1
- package/dist/_chunk/spinbutton.js +153 -0
- package/dist/_chunk/spinbutton.js.map +1 -0
- package/dist/_chunk/spinbutton.jsx +153 -0
- package/dist/_chunk/spinbutton.jsx.map +1 -0
- package/dist/_chunk/table.js +45 -8
- package/dist/_chunk/table.js.map +1 -1
- package/dist/_chunk/table.jsx +45 -8
- package/dist/_chunk/table.jsx.map +1 -1
- package/dist/_chunk/tabs.js +11 -8
- package/dist/_chunk/tabs.js.map +1 -1
- package/dist/_chunk/tabs.jsx +11 -8
- package/dist/_chunk/tabs.jsx.map +1 -1
- package/dist/_chunk/tag.js +54 -18
- package/dist/_chunk/tag.js.map +1 -1
- package/dist/_chunk/tag.jsx +54 -18
- package/dist/_chunk/tag.jsx.map +1 -1
- package/dist/_chunk/textfield.js +2 -1
- package/dist/_chunk/textfield.js.map +1 -1
- package/dist/_chunk/textfield.jsx +2 -1
- package/dist/_chunk/textfield.jsx.map +1 -1
- package/dist/_chunk/toolbar.js +4 -36
- package/dist/_chunk/toolbar.js.map +1 -1
- package/dist/_chunk/toolbar.jsx +4 -36
- package/dist/_chunk/toolbar.jsx.map +1 -1
- package/dist/_chunk/tooltip.js +2 -2
- package/dist/_chunk/tooltip.js.map +1 -1
- package/dist/_chunk/tooltip.jsx +2 -2
- package/dist/_chunk/tooltip.jsx.map +1 -1
- package/dist/_chunk/tree.js +42 -14
- package/dist/_chunk/tree.js.map +1 -1
- package/dist/_chunk/tree.jsx +42 -14
- package/dist/_chunk/tree.jsx.map +1 -1
- package/dist/_chunk/utils.js +59 -19
- package/dist/_chunk/utils.js.map +1 -1
- package/dist/_chunk/utils.jsx +59 -19
- package/dist/_chunk/utils.jsx.map +1 -1
- package/dist/_chunk/visually-hidden.js +3 -2
- package/dist/_chunk/visually-hidden.js.map +1 -1
- package/dist/_chunk/visually-hidden.jsx +3 -2
- package/dist/_chunk/visually-hidden.jsx.map +1 -1
- package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
- package/dist/autocomplete/createAutocomplete.d.ts +10 -7
- package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
- package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
- package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
- 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/createRangeCalendar.d.ts.map +1 -1
- package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
- package/dist/calendar/intl/index.d.ts +1 -1
- package/dist/calendar/intl/index.d.ts.map +1 -1
- package/dist/collections/index.js +1 -1
- package/dist/collections/index.jsx +1 -1
- package/dist/color/createColorArea.d.ts.map +1 -1
- package/dist/color/createColorField.d.ts.map +1 -1
- package/dist/color/createColorSlider.d.ts.map +1 -1
- package/dist/color/createColorSwatch.d.ts.map +1 -1
- package/dist/color/createColorWheel.d.ts.map +1 -1
- package/dist/color/intl/index.d.ts +30 -0
- package/dist/color/intl/index.d.ts.map +1 -0
- package/dist/combobox/createComboBox.d.ts.map +1 -1
- package/dist/combobox/intl/generated-locales.d.ts +16 -0
- package/dist/combobox/intl/generated-locales.d.ts.map +1 -0
- package/dist/combobox/intl/index.d.ts +2 -2
- package/dist/combobox/intl/index.d.ts.map +1 -1
- package/dist/datepicker/createDateField.d.ts +45 -23
- package/dist/datepicker/createDateField.d.ts.map +1 -1
- package/dist/datepicker/createDatePicker.d.ts +34 -6
- package/dist/datepicker/createDatePicker.d.ts.map +1 -1
- package/dist/datepicker/createDatePickerGroup.d.ts +13 -13
- package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
- package/dist/datepicker/createDateRangePicker.d.ts +55 -7
- package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
- package/dist/datepicker/createDateSegment.d.ts +6 -15
- package/dist/datepicker/createDateSegment.d.ts.map +1 -1
- package/dist/datepicker/createDisplayNames.d.ts +17 -0
- package/dist/datepicker/createDisplayNames.d.ts.map +1 -0
- package/dist/datepicker/createTimeField.d.ts +12 -49
- package/dist/datepicker/createTimeField.d.ts.map +1 -1
- package/dist/datepicker/index.d.ts +3 -3
- package/dist/datepicker/index.d.ts.map +1 -1
- package/dist/datepicker/index.js +2 -2
- package/dist/datepicker/index.jsx +2 -2
- package/dist/datepicker/intl.d.ts +12 -0
- package/dist/datepicker/intl.d.ts.map +1 -0
- package/dist/dnd/DragManager.d.ts +86 -0
- package/dist/dnd/DragManager.d.ts.map +1 -0
- package/dist/dnd/DropTargetKeyboardNavigation.d.ts +42 -0
- package/dist/dnd/DropTargetKeyboardNavigation.d.ts.map +1 -0
- package/dist/dnd/createDrag.d.ts.map +1 -1
- package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
- package/dist/dnd/createDraggableItem.d.ts +12 -7
- package/dist/dnd/createDraggableItem.d.ts.map +1 -1
- package/dist/dnd/createDroppableCollection.d.ts +7 -15
- package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
- package/dist/dnd/index.d.ts +5 -1
- package/dist/dnd/index.d.ts.map +1 -1
- package/dist/dnd/index.js +3 -2
- package/dist/dnd/index.jsx +3 -2
- package/dist/dnd/intl/index.d.ts +39 -0
- package/dist/dnd/intl/index.d.ts.map +1 -0
- package/dist/dnd/utils.d.ts +5 -0
- package/dist/dnd/utils.d.ts.map +1 -1
- package/dist/focus/FocusScope.d.ts +7 -0
- package/dist/focus/FocusScope.d.ts.map +1 -1
- package/dist/focus/index.d.ts +2 -1
- package/dist/focus/index.d.ts.map +1 -1
- package/dist/focus/index.js +3 -2
- package/dist/focus/index.jsx +3 -2
- package/dist/focus/virtualFocus.d.ts +26 -0
- package/dist/focus/virtualFocus.d.ts.map +1 -0
- package/dist/form/index.js +1 -1
- package/dist/form/index.jsx +1 -1
- package/dist/gridlist/createGridList.d.ts.map +1 -1
- package/dist/i18n/index.js +4 -2
- package/dist/i18n/index.jsx +4 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -12
- package/dist/index.jsx +18 -12
- package/dist/interactions/FocusableProvider.d.ts.map +1 -1
- package/dist/interactions/createFocus.d.ts.map +1 -1
- package/dist/interactions/createFocusWithin.d.ts.map +1 -1
- package/dist/interactions/createInteractionModality.d.ts.map +1 -1
- package/dist/interactions/index.js +1 -2
- package/dist/interactions/index.jsx +1 -2
- package/dist/label/createLabels.d.ts.map +1 -1
- package/dist/listbox/createListBox.d.ts.map +1 -1
- package/dist/listbox/createOption.d.ts +1 -1
- package/dist/listbox/createOption.d.ts.map +1 -1
- package/dist/live-announcer/index.js +1 -1
- package/dist/live-announcer/index.jsx +1 -1
- package/dist/select/createSelect.d.ts +2 -0
- package/dist/select/createSelect.d.ts.map +1 -1
- package/dist/selection/createSelectableItem.d.ts.map +1 -1
- package/dist/selection/index.js +2 -1
- package/dist/selection/index.jsx +2 -1
- package/dist/spinbutton/createSpinButton.d.ts +41 -0
- package/dist/spinbutton/createSpinButton.d.ts.map +1 -0
- package/dist/spinbutton/index.d.ts +3 -0
- package/dist/spinbutton/index.d.ts.map +1 -0
- package/dist/spinbutton/index.js +2 -0
- package/dist/spinbutton/index.jsx +2 -0
- package/dist/spinbutton/intl.d.ts +5 -0
- package/dist/spinbutton/intl.d.ts.map +1 -0
- package/dist/table/createTable.d.ts.map +1 -1
- package/dist/table/createTableColumnHeader.d.ts.map +1 -1
- package/dist/table/createTableRow.d.ts.map +1 -1
- package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
- package/dist/table/types.d.ts +8 -0
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/utils.d.ts +15 -0
- package/dist/table/utils.d.ts.map +1 -0
- package/dist/tabs/createTabs.d.ts +1 -0
- package/dist/tabs/createTabs.d.ts.map +1 -1
- package/dist/tag/createTag.d.ts.map +1 -1
- package/dist/tag/createTagGroup.d.ts +7 -0
- package/dist/tag/createTagGroup.d.ts.map +1 -1
- package/dist/toolbar/createToolbar.d.ts.map +1 -1
- package/dist/tree/createTree.d.ts.map +1 -1
- package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
- package/dist/utils/animation.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -3
- package/dist/utils/index.jsx +4 -3
- package/package.json +2 -2
- package/src/actiongroup/createActionGroup.ts +26 -109
- package/src/autocomplete/createAutocomplete.ts +136 -15
- package/src/breadcrumbs/createBreadcrumbs.ts +12 -4
- package/src/button/createToggleButtonGroup.ts +19 -14
- package/src/calendar/createCalendar.ts +3 -4
- package/src/calendar/createCalendarCell.ts +17 -3
- package/src/calendar/createCalendarGrid.ts +5 -4
- package/src/calendar/createRangeCalendar.ts +27 -17
- package/src/calendar/createRangeCalendarCell.ts +17 -3
- package/src/calendar/intl/index.ts +8 -0
- package/src/color/createColorArea.ts +17 -10
- package/src/color/createColorField.ts +8 -1
- package/src/color/createColorSlider.ts +1 -2
- package/src/color/createColorSwatch.ts +4 -2
- package/src/color/createColorWheel.ts +0 -6
- package/src/color/intl/index.ts +316 -0
- package/src/combobox/createComboBox.ts +35 -4
- package/src/combobox/intl/generated-locales.ts +635 -0
- package/src/combobox/intl/index.ts +8 -2
- package/src/datepicker/createDateField.ts +228 -213
- package/src/datepicker/createDatePicker.ts +157 -146
- package/src/datepicker/createDatePickerGroup.ts +88 -82
- package/src/datepicker/createDateRangePicker.ts +230 -179
- package/src/datepicker/createDateSegment.ts +386 -389
- package/src/datepicker/createDisplayNames.ts +45 -0
- package/src/datepicker/createTimeField.ts +36 -129
- package/src/datepicker/index.ts +13 -14
- package/src/datepicker/intl.ts +633 -0
- package/src/dnd/DragManager.ts +693 -0
- package/src/dnd/DropTargetKeyboardNavigation.ts +337 -0
- package/src/dnd/createDrag.ts +31 -5
- package/src/dnd/createDraggableCollection.ts +33 -15
- package/src/dnd/createDraggableItem.ts +92 -5
- package/src/dnd/createDroppableCollection.ts +487 -373
- package/src/dnd/index.ts +11 -0
- package/src/dnd/intl/ar-AE.json +29 -0
- package/src/dnd/intl/bg-BG.json +29 -0
- package/src/dnd/intl/cs-CZ.json +29 -0
- package/src/dnd/intl/da-DK.json +29 -0
- package/src/dnd/intl/de-DE.json +29 -0
- package/src/dnd/intl/el-GR.json +29 -0
- package/src/dnd/intl/en-US.json +29 -0
- package/src/dnd/intl/es-ES.json +29 -0
- package/src/dnd/intl/et-EE.json +29 -0
- package/src/dnd/intl/fi-FI.json +29 -0
- package/src/dnd/intl/fr-FR.json +29 -0
- package/src/dnd/intl/he-IL.json +29 -0
- package/src/dnd/intl/hr-HR.json +29 -0
- package/src/dnd/intl/hu-HU.json +29 -0
- package/src/dnd/intl/index.ts +139 -0
- package/src/dnd/intl/it-IT.json +29 -0
- package/src/dnd/intl/ja-JP.json +29 -0
- package/src/dnd/intl/ko-KR.json +29 -0
- package/src/dnd/intl/lt-LT.json +29 -0
- package/src/dnd/intl/lv-LV.json +29 -0
- package/src/dnd/intl/nb-NO.json +29 -0
- package/src/dnd/intl/nl-NL.json +29 -0
- package/src/dnd/intl/pl-PL.json +29 -0
- package/src/dnd/intl/pt-BR.json +29 -0
- package/src/dnd/intl/pt-PT.json +29 -0
- package/src/dnd/intl/ro-RO.json +29 -0
- package/src/dnd/intl/ru-RU.json +29 -0
- package/src/dnd/intl/sk-SK.json +29 -0
- package/src/dnd/intl/sl-SI.json +29 -0
- package/src/dnd/intl/sr-SP.json +29 -0
- package/src/dnd/intl/sv-SE.json +29 -0
- package/src/dnd/intl/tr-TR.json +29 -0
- package/src/dnd/intl/uk-UA.json +29 -0
- package/src/dnd/intl/zh-CN.json +29 -0
- package/src/dnd/intl/zh-TW.json +29 -0
- package/src/dnd/utils.ts +36 -0
- package/src/focus/FocusScope.tsx +120 -12
- package/src/focus/index.ts +8 -0
- package/src/focus/virtualFocus.ts +55 -0
- package/src/gridlist/createGridList.ts +52 -16
- package/src/index.ts +11 -3
- package/src/interactions/FocusableProvider.tsx +11 -6
- package/src/interactions/createFocus.ts +26 -21
- package/src/interactions/createFocusWithin.ts +23 -24
- package/src/interactions/createInteractionModality.ts +5 -3
- package/src/label/createLabels.ts +7 -4
- package/src/listbox/createListBox.ts +74 -2
- package/src/listbox/createOption.ts +16 -1
- package/src/select/createSelect.ts +23 -2
- package/src/selection/createSelectableItem.ts +14 -0
- package/src/spinbutton/createSpinButton.ts +163 -0
- package/src/spinbutton/index.ts +10 -0
- package/src/spinbutton/intl.ts +115 -0
- package/src/table/createTable.ts +26 -1
- package/src/table/createTableColumnHeader.ts +10 -0
- package/src/table/createTableRow.ts +10 -0
- package/src/table/createTableSelectionCheckbox.ts +24 -1
- package/src/table/types.ts +8 -0
- package/src/table/utils.ts +41 -0
- package/src/tabs/createTabs.ts +53 -12
- package/src/tag/createTag.ts +21 -32
- package/src/tag/createTagGroup.ts +92 -0
- package/src/toolbar/createToolbar.ts +6 -58
- package/src/tree/createTree.ts +69 -14
- package/src/tree/createTreeSelectionCheckbox.ts +14 -1
- package/src/utils/animation.ts +119 -27
- package/src/utils/dom.ts +3 -2
- package/src/utils/index.ts +2 -0
- package/dist/_chunk/createLongPress.js +0 -91
- package/dist/_chunk/createLongPress.js.map +0 -1
- package/dist/_chunk/createLongPress.jsx +0 -91
- package/dist/_chunk/createLongPress.jsx.map +0 -1
- package/dist/_chunk/form.js.map +0 -1
- package/dist/_chunk/form.jsx.map +0 -1
- package/dist/_chunk/live-announcer.js.map +0 -1
- package/dist/_chunk/live-announcer.jsx.map +0 -1
- package/dist/datepicker/createTimeSegment.d.ts +0 -29
- package/dist/datepicker/createTimeSegment.d.ts.map +0 -1
- package/src/datepicker/createTimeSegment.ts +0 -352
|
@@ -19,10 +19,13 @@ export function createLabels(
|
|
|
19
19
|
props: DOMProps & AriaLabelingProps,
|
|
20
20
|
defaultLabel?: string,
|
|
21
21
|
): DOMProps & AriaLabelingProps {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
|
|
22
|
+
// Read props directly rather than destructuring: in Solid a destructure
|
|
23
|
+
// freezes the value at call time. This is a pure snapshot transform, so it is
|
|
24
|
+
// behaviourally identical, but keeping the reactive read explicit matches the
|
|
25
|
+
// rest of the port and satisfies guard:idiomatic-solid.
|
|
26
|
+
let id = createId(props.id);
|
|
27
|
+
let label = props["aria-label"];
|
|
28
|
+
let labelledBy = props["aria-labelledby"];
|
|
26
29
|
|
|
27
30
|
// If there is both an aria-label and aria-labelledby,
|
|
28
31
|
// combine them by pointing to the element itself.
|
|
@@ -250,6 +250,57 @@ export function createListBox<T>(
|
|
|
250
250
|
},
|
|
251
251
|
});
|
|
252
252
|
|
|
253
|
+
// Focus marshalling — the container is a trampoline. When a standalone
|
|
254
|
+
// listbox receives DOM focus with nothing focused yet (e.g. Tab lands on the
|
|
255
|
+
// container, whose roving tabIndex is 0 only while `focusedKey == null`), move
|
|
256
|
+
// the focused key to the first/last option; `createSelectableItem`'s focus
|
|
257
|
+
// effect then pulls REAL DOM focus onto that option and the container rolls to
|
|
258
|
+
// tabIndex -1. This mirrors `useSelectableCollection`'s `onFocus`
|
|
259
|
+
// (useSelectableCollection.ts:409-454) and is why upstream never needs
|
|
260
|
+
// `aria-activedescendant` on a standalone listbox — real focus IS the AT
|
|
261
|
+
// channel. Skipped under `shouldUseVirtualFocus` (ComboBox/Autocomplete keep
|
|
262
|
+
// DOM focus on the input and drive an activedescendant via the virtual-focus
|
|
263
|
+
// channel instead).
|
|
264
|
+
//
|
|
265
|
+
// NOTE on the guard: unlike upstream (whose selectable `onFocus` sets
|
|
266
|
+
// `manager.setFocused(true)` itself and guards on `manager.isFocused`), our
|
|
267
|
+
// `createFocusWithin` already flips `setFocused(true)` via `onFocusWithinChange`
|
|
268
|
+
// — and mergeProps chains it BEFORE this handler — so `manager.isFocused` is
|
|
269
|
+
// already true here. Guard on `focusedKey() == null` instead (only marshal when
|
|
270
|
+
// no option is focused yet). `onFocus` is non-bubbling in Solid, so this fires
|
|
271
|
+
// only when the container element itself receives focus, not on child focus.
|
|
272
|
+
const onListBoxFocus: JSX.EventHandler<HTMLElement, FocusEvent> = (e) => {
|
|
273
|
+
const p = getProps();
|
|
274
|
+
if (p.isDisabled || p.shouldUseVirtualFocus) return;
|
|
275
|
+
// Ignore focus events that bubbled through a portal.
|
|
276
|
+
if (!e.currentTarget.contains(e.target as Node)) return;
|
|
277
|
+
if (state.focusedKey() != null) return;
|
|
278
|
+
|
|
279
|
+
const manager = state.selectionManager;
|
|
280
|
+
const selectOnFocus = state.selectionBehavior() === "replace";
|
|
281
|
+
const navigateToKey = (key: Key | null | undefined) => {
|
|
282
|
+
if (key == null) return;
|
|
283
|
+
state.setFocusedKey(key);
|
|
284
|
+
if (selectOnFocus && !manager.isSelected(key)) {
|
|
285
|
+
state.replaceSelection(key);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const collection = state.collection();
|
|
290
|
+
const relatedTarget = e.relatedTarget as Element | null;
|
|
291
|
+
// Detect tab direction: if focus came from an element that FOLLOWS the
|
|
292
|
+
// listbox in the document, the user is shift-tabbing backward into it, so
|
|
293
|
+
// enter at the last item; otherwise enter at the first.
|
|
294
|
+
if (
|
|
295
|
+
relatedTarget &&
|
|
296
|
+
e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
297
|
+
) {
|
|
298
|
+
navigateToKey(manager.lastSelectedKey ?? collection.getLastKey());
|
|
299
|
+
} else {
|
|
300
|
+
navigateToKey(manager.firstSelectedKey ?? collection.getFirstKey());
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
|
|
253
304
|
// Keyboard navigation
|
|
254
305
|
const onKeyDown: JSX.EventHandler<HTMLElement, KeyboardEvent> = (e) => {
|
|
255
306
|
const p = getProps();
|
|
@@ -410,6 +461,26 @@ export function createListBox<T>(
|
|
|
410
461
|
get listBoxProps() {
|
|
411
462
|
const p = getProps();
|
|
412
463
|
const selectionMode = state.selectionMode();
|
|
464
|
+
const virtualFocus = p.shouldUseVirtualFocus ?? false;
|
|
465
|
+
const focusedKey = state.focusedKey();
|
|
466
|
+
|
|
467
|
+
// Roving container tabIndex mirrors `useSelectableCollection`
|
|
468
|
+
// (useSelectableCollection.ts:581-582): with real option focus, the
|
|
469
|
+
// container is tabbable (0) only while nothing is focused, then rolls to
|
|
470
|
+
// -1 once focus lands on an option so Tab exits the widget. Under virtual
|
|
471
|
+
// focus (ComboBox/Autocomplete) the container is NOT a tab stop at all —
|
|
472
|
+
// upstream leaves `tabIndex` undefined, so the popover listbox never
|
|
473
|
+
// appears in the roving trail. `aria-activedescendant` is the
|
|
474
|
+
// virtual-focus AT channel and is emitted ONLY on that path — a standalone
|
|
475
|
+
// listbox announces the active option through real DOM focus, so upstream
|
|
476
|
+
// never sets it there.
|
|
477
|
+
const tabIndex = p.isDisabled
|
|
478
|
+
? undefined
|
|
479
|
+
: virtualFocus
|
|
480
|
+
? undefined
|
|
481
|
+
: focusedKey != null
|
|
482
|
+
? -1
|
|
483
|
+
: 0;
|
|
413
484
|
|
|
414
485
|
const baseProps = mergeProps(
|
|
415
486
|
domProps(),
|
|
@@ -417,12 +488,13 @@ export function createListBox<T>(
|
|
|
417
488
|
fieldProps as Record<string, unknown>,
|
|
418
489
|
{
|
|
419
490
|
role: "listbox",
|
|
420
|
-
tabIndex
|
|
491
|
+
tabIndex,
|
|
421
492
|
"aria-disabled": p.isDisabled || undefined,
|
|
422
493
|
"aria-multiselectable": selectionMode === "multiple" ? true : undefined,
|
|
423
494
|
"aria-activedescendant":
|
|
424
|
-
|
|
495
|
+
virtualFocus && focusedKey != null ? String(focusedKey) : undefined,
|
|
425
496
|
onKeyDown,
|
|
497
|
+
onFocus: onListBoxFocus,
|
|
426
498
|
},
|
|
427
499
|
);
|
|
428
500
|
|
|
@@ -9,7 +9,7 @@ import { createFocusRing } from "../interactions/createFocusRing";
|
|
|
9
9
|
import { mergeProps } from "../utils/mergeProps";
|
|
10
10
|
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
11
11
|
import { getListBoxData } from "./createListBox";
|
|
12
|
-
import type
|
|
12
|
+
import { getItemCount, type ListState, type Key } from "@proyecto-viviana/solid-stately";
|
|
13
13
|
import { createSelectableItem, type SelectableItemState } from "../selection/createSelectableItem";
|
|
14
14
|
|
|
15
15
|
export interface AriaOptionProps {
|
|
@@ -164,6 +164,19 @@ export function createOption<T>(
|
|
|
164
164
|
const selectionMode = state.selectionMode();
|
|
165
165
|
const ariaLabel = getProps()["aria-label"];
|
|
166
166
|
|
|
167
|
+
// When the listbox is virtualized the DOM only holds the windowed rows, so
|
|
168
|
+
// (mirroring @react-aria/listbox useOption) publish the item's absolute
|
|
169
|
+
// position in the full collection for assistive tech. Only under
|
|
170
|
+
// virtualization — an un-windowed listbox exposes every row and the browser
|
|
171
|
+
// derives posinset/setsize itself.
|
|
172
|
+
let ariaPosInSet: number | undefined;
|
|
173
|
+
let ariaSetSize: number | undefined;
|
|
174
|
+
if (isVirtualized()) {
|
|
175
|
+
const index = Number(state.collection().getItem(key)?.index);
|
|
176
|
+
ariaPosInSet = Number.isNaN(index) ? undefined : index + 1;
|
|
177
|
+
ariaSetSize = getItemCount(state.collection());
|
|
178
|
+
}
|
|
179
|
+
|
|
167
180
|
return mergeProps(
|
|
168
181
|
selectableItem.itemProps as Record<string, unknown>,
|
|
169
182
|
hoverProps as Record<string, unknown>,
|
|
@@ -176,6 +189,8 @@ export function createOption<T>(
|
|
|
176
189
|
"aria-label": ariaLabel,
|
|
177
190
|
"aria-labelledby": !ariaLabel ? labelId : undefined,
|
|
178
191
|
"aria-describedby": descriptionId,
|
|
192
|
+
"aria-posinset": ariaPosInSet,
|
|
193
|
+
"aria-setsize": ariaSetSize,
|
|
179
194
|
"data-selected": selectableItem.isSelected() || undefined,
|
|
180
195
|
"data-focused": selectableItem.isFocused() || undefined,
|
|
181
196
|
"data-focus-visible": (selectableItem.isFocused() && isFocusVisible()) || undefined,
|
|
@@ -73,6 +73,8 @@ export interface SelectAria<T> {
|
|
|
73
73
|
isFocusVisible: Accessor<boolean>;
|
|
74
74
|
/** Whether the select is currently open. */
|
|
75
75
|
isOpen: Accessor<boolean>;
|
|
76
|
+
/** Whether the trigger button is currently pressed (for `pressScale`). */
|
|
77
|
+
isPressed: Accessor<boolean>;
|
|
76
78
|
/** The currently selected item. */
|
|
77
79
|
selectedItem: Accessor<CollectionNode<T> | null>;
|
|
78
80
|
}
|
|
@@ -196,7 +198,7 @@ export function createSelect<T>(
|
|
|
196
198
|
}
|
|
197
199
|
};
|
|
198
200
|
|
|
199
|
-
const { pressProps } = createPress({
|
|
201
|
+
const { pressProps, isPressed } = createPress({
|
|
200
202
|
get isDisabled() {
|
|
201
203
|
return getProps().isDisabled ?? state.isDisabled;
|
|
202
204
|
},
|
|
@@ -385,6 +387,15 @@ export function createSelect<T>(
|
|
|
385
387
|
"aria-disabled": isDisabled || undefined,
|
|
386
388
|
"aria-required": p.isRequired || undefined,
|
|
387
389
|
"aria-describedby": p["aria-describedby"] || undefined,
|
|
390
|
+
// Mirror upstream `useSelect`: the trigger's accessible name folds the
|
|
391
|
+
// SELECTED VALUE ("Pro") ahead of the field label ("Plan") → "Pro Plan"
|
|
392
|
+
// via `aria-labelledby=[valueId, labelId]`. Only wire this when there is
|
|
393
|
+
// a real visible label; with an `aria-label` (no `labelledby`) the field
|
|
394
|
+
// props' `aria-label` stays the trigger name (label-less legacy path,
|
|
395
|
+
// keeps TabsPicker/label-less Select unchanged).
|
|
396
|
+
"aria-labelledby": fieldProps["aria-labelledby"]
|
|
397
|
+
? [valueId, fieldProps["aria-labelledby"]].filter(Boolean).join(" ")
|
|
398
|
+
: undefined,
|
|
388
399
|
onKeyDown,
|
|
389
400
|
onFocus: handleFocus,
|
|
390
401
|
onBlur: handleBlur,
|
|
@@ -409,11 +420,21 @@ export function createSelect<T>(
|
|
|
409
420
|
id: valueId,
|
|
410
421
|
} as JSX.HTMLAttributes<HTMLElement>;
|
|
411
422
|
},
|
|
423
|
+
// Surfaced so the styled layer (S2 Picker) can apply the `pressScale` press
|
|
424
|
+
// effect on the trigger button — upstream S2 wires `pressScale(buttonRef)` on
|
|
425
|
+
// the RAC Button, which needs the button's live `isPressed`.
|
|
426
|
+
isPressed,
|
|
412
427
|
get menuProps() {
|
|
413
428
|
return {
|
|
414
429
|
id: listBoxId,
|
|
415
430
|
role: "listbox",
|
|
416
|
-
|
|
431
|
+
// Mirror upstream `useSelect`: the listbox is labelled by the FIELD LABEL
|
|
432
|
+
// (`fieldProps['aria-labelledby']` → the visible "Plan" label), NOT the
|
|
433
|
+
// trigger button — the button's own accessible name folds in the selected
|
|
434
|
+
// value ("Pro Plan"), which must not leak onto the listbox. Only when
|
|
435
|
+
// there is no visible label (an `aria-label` on the field) does it fall
|
|
436
|
+
// back to the trigger id (unchanged legacy behavior for label-less use).
|
|
437
|
+
"aria-labelledby": fieldProps["aria-labelledby"] ?? buttonId,
|
|
417
438
|
"aria-multiselectable": state.selectionMode() === "multiple" ? true : undefined,
|
|
418
439
|
tabIndex: -1,
|
|
419
440
|
onBlur: (e: FocusEvent) => {
|
|
@@ -44,6 +44,7 @@ import { focusSafely } from "../utils/focus";
|
|
|
44
44
|
import { getOwnerDocument, getEventTarget, openLink } from "../utils/dom";
|
|
45
45
|
import { getCollectionId, isNonContiguousSelectionModifier } from "./utils";
|
|
46
46
|
import { selectItem, type SelectItemState } from "./selectItem";
|
|
47
|
+
import { createDragSession } from "../dnd/DragManager";
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* DOM event dispatched when an item action is performed. Mirrors upstream's
|
|
@@ -289,7 +290,20 @@ export function createSelectableItem<T>(
|
|
|
289
290
|
// Focus the associated DOM node when this item becomes the focused key. This
|
|
290
291
|
// is the imperative half of roving tabindex — the tabIndex 0/-1 swap below is
|
|
291
292
|
// only declarative.
|
|
293
|
+
const dragSession = createDragSession();
|
|
292
294
|
createEffect(() => {
|
|
295
|
+
// While a keyboard drag session is active, real DOM focus is owned by the
|
|
296
|
+
// DragManager (it lives on drop indicators / the collection), and upstream's
|
|
297
|
+
// React `useSelectableItem` focus effect provably cannot re-run mid-drag —
|
|
298
|
+
// its dep array `[ref, key, focusedKey, childFocusStrategy, isFocused]` stays
|
|
299
|
+
// frozen. Our reactive effect would otherwise re-fire and steal focus back
|
|
300
|
+
// onto the focused option, bouncing focus off the drop indicator. Reading the
|
|
301
|
+
// reactive drag-session accessor here also re-runs this effect once the drag
|
|
302
|
+
// ends, restoring normal roving-tabindex focus.
|
|
303
|
+
if (dragSession()) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
293
307
|
if (key() !== manager.focusedKey() || !manager.isFocused()) {
|
|
294
308
|
return;
|
|
295
309
|
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createSpinButton hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the ARIA spinbutton props and live-region announcement behaviour for
|
|
5
|
+
* a single spinbutton (e.g. a date-field segment). Port of the keyboard/announce
|
|
6
|
+
* portion of @react-aria/spinbutton `useSpinButton`. The pointer press-and-hold
|
|
7
|
+
* button machinery (increment/decrement buttons) is intentionally omitted — date
|
|
8
|
+
* segments drive value changes through the keyboard only.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { createMemo, createEffect } from "solid-js";
|
|
12
|
+
import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
13
|
+
import { createStringFormatter } from "../i18n";
|
|
14
|
+
import { announce, clearAnnouncer } from "../live-announcer";
|
|
15
|
+
import { spinButtonStrings, type SpinButtonStringKey } from "./intl";
|
|
16
|
+
|
|
17
|
+
export interface SpinButtonProps {
|
|
18
|
+
/** The current value of the spinbutton. */
|
|
19
|
+
value?: number;
|
|
20
|
+
/** A human-readable text alternative for the value. */
|
|
21
|
+
textValue?: string;
|
|
22
|
+
/** The smallest value allowed. */
|
|
23
|
+
minValue?: number;
|
|
24
|
+
/** The largest value allowed. */
|
|
25
|
+
maxValue?: number;
|
|
26
|
+
/** Whether the spinbutton is disabled. */
|
|
27
|
+
isDisabled?: boolean;
|
|
28
|
+
/** Whether the spinbutton is read only. */
|
|
29
|
+
isReadOnly?: boolean;
|
|
30
|
+
/** Whether the spinbutton is required. */
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
onIncrement?: () => void;
|
|
33
|
+
onIncrementPage?: () => void;
|
|
34
|
+
onDecrement?: () => void;
|
|
35
|
+
onDecrementPage?: () => void;
|
|
36
|
+
onDecrementToMin?: () => void;
|
|
37
|
+
onIncrementToMax?: () => void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface SpinButtonAria {
|
|
41
|
+
/** Props for the spinbutton element. */
|
|
42
|
+
spinButtonProps: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Provides the behaviour and accessibility implementation for a spinbutton.
|
|
47
|
+
*/
|
|
48
|
+
export function createSpinButton(props: MaybeAccessor<SpinButtonProps>): SpinButtonAria {
|
|
49
|
+
const getProps = () => access(props);
|
|
50
|
+
const stringFormatter = createStringFormatter<SpinButtonStringKey>(
|
|
51
|
+
spinButtonStrings,
|
|
52
|
+
"@react-aria/spinbutton",
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const onKeyDown = (e: KeyboardEvent) => {
|
|
56
|
+
const p = getProps();
|
|
57
|
+
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || p.isReadOnly || e.isComposing) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
switch (e.key) {
|
|
62
|
+
// Upstream deliberately falls through PageUp → ArrowUp when no page
|
|
63
|
+
// handler exists; our tsconfig forbids lexical fallthrough, so the
|
|
64
|
+
// PageUp case mirrors that branch inline instead.
|
|
65
|
+
case "PageUp":
|
|
66
|
+
if (p.onIncrementPage) {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
p.onIncrementPage();
|
|
69
|
+
} else if (p.onIncrement) {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
p.onIncrement();
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "ArrowUp":
|
|
75
|
+
case "Up":
|
|
76
|
+
if (p.onIncrement) {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
p.onIncrement();
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
// Same faithful fallthrough as PageUp, mirrored inline (PageDown → ArrowDown).
|
|
82
|
+
case "PageDown":
|
|
83
|
+
if (p.onDecrementPage) {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
p.onDecrementPage();
|
|
86
|
+
} else if (p.onDecrement) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
p.onDecrement();
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "ArrowDown":
|
|
92
|
+
case "Down":
|
|
93
|
+
if (p.onDecrement) {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
p.onDecrement();
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "Home":
|
|
99
|
+
if (p.onDecrementToMin) {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
p.onDecrementToMin();
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case "End":
|
|
105
|
+
if (p.onIncrementToMax) {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
p.onIncrementToMax();
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// Non-reactive focus flag — matches upstream's `isFocused` ref. Toggling it must
|
|
114
|
+
// NOT re-run the announce effect; only a change in `ariaTextValue` announces.
|
|
115
|
+
let isFocused = false;
|
|
116
|
+
const onFocus = () => {
|
|
117
|
+
isFocused = true;
|
|
118
|
+
};
|
|
119
|
+
const onBlur = () => {
|
|
120
|
+
isFocused = false;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// Replace Unicode hyphen-minus (U+002D) with minus sign (U+2212) so VoiceOver
|
|
124
|
+
// announces it as "minus". Replace the empty string with the word "Empty".
|
|
125
|
+
const ariaTextValue = createMemo(() => {
|
|
126
|
+
const p = getProps();
|
|
127
|
+
return p.textValue === ""
|
|
128
|
+
? stringFormatter().format("Empty")
|
|
129
|
+
: (p.textValue || `${p.value}`).replace("-", "−");
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
createEffect(() => {
|
|
133
|
+
const value = ariaTextValue();
|
|
134
|
+
if (isFocused) {
|
|
135
|
+
clearAnnouncer("assertive");
|
|
136
|
+
announce(value, "assertive");
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const spinButtonProps = createMemo(() => {
|
|
141
|
+
const p = getProps();
|
|
142
|
+
const value = p.value;
|
|
143
|
+
return {
|
|
144
|
+
role: "spinbutton",
|
|
145
|
+
"aria-valuenow": value !== undefined && !isNaN(value) ? value : undefined,
|
|
146
|
+
"aria-valuetext": ariaTextValue(),
|
|
147
|
+
"aria-valuemin": p.minValue,
|
|
148
|
+
"aria-valuemax": p.maxValue,
|
|
149
|
+
"aria-disabled": p.isDisabled || undefined,
|
|
150
|
+
"aria-readonly": p.isReadOnly || undefined,
|
|
151
|
+
"aria-required": p.isRequired || undefined,
|
|
152
|
+
onKeyDown,
|
|
153
|
+
onFocus,
|
|
154
|
+
onBlur,
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
get spinButtonProps() {
|
|
160
|
+
return spinButtonProps();
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Spinbutton announcement catalog, ported verbatim from @react-aria/spinbutton's
|
|
2
|
+
// intl/*.json (34 locales). Keep in sync with the vendored react-spectrum source on
|
|
3
|
+
// every pin bump.
|
|
4
|
+
import { LocalizedStringDictionary } from "@internationalized/string";
|
|
5
|
+
|
|
6
|
+
export type SpinButtonStringKey = "Empty";
|
|
7
|
+
|
|
8
|
+
export const spinButtonStrings: Record<string, Record<SpinButtonStringKey, string>> = {
|
|
9
|
+
"ar-AE": {
|
|
10
|
+
"Empty": `\u{641}\u{627}\u{631}\u{63A}`
|
|
11
|
+
},
|
|
12
|
+
"bg-BG": {
|
|
13
|
+
"Empty": `\u{418}\u{437}\u{43F}\u{440}\u{430}\u{437}\u{43D}\u{438}`
|
|
14
|
+
},
|
|
15
|
+
"cs-CZ": {
|
|
16
|
+
"Empty": `Pr\xe1zdn\xe9`
|
|
17
|
+
},
|
|
18
|
+
"da-DK": {
|
|
19
|
+
"Empty": `Tom`
|
|
20
|
+
},
|
|
21
|
+
"de-DE": {
|
|
22
|
+
"Empty": `Leer`
|
|
23
|
+
},
|
|
24
|
+
"el-GR": {
|
|
25
|
+
"Empty": `\u{386}\u{3B4}\u{3B5}\u{3B9}\u{3BF}`
|
|
26
|
+
},
|
|
27
|
+
"en-US": {
|
|
28
|
+
"Empty": `Empty`
|
|
29
|
+
},
|
|
30
|
+
"es-ES": {
|
|
31
|
+
"Empty": `Vac\xedo`
|
|
32
|
+
},
|
|
33
|
+
"et-EE": {
|
|
34
|
+
"Empty": `T\xfchjenda`
|
|
35
|
+
},
|
|
36
|
+
"fi-FI": {
|
|
37
|
+
"Empty": `Tyhj\xe4`
|
|
38
|
+
},
|
|
39
|
+
"fr-FR": {
|
|
40
|
+
"Empty": `Vide`
|
|
41
|
+
},
|
|
42
|
+
"he-IL": {
|
|
43
|
+
"Empty": `\u{5E8}\u{5D9}\u{5E7}`
|
|
44
|
+
},
|
|
45
|
+
"hr-HR": {
|
|
46
|
+
"Empty": `Prazno`
|
|
47
|
+
},
|
|
48
|
+
"hu-HU": {
|
|
49
|
+
"Empty": `\xdcres`
|
|
50
|
+
},
|
|
51
|
+
"it-IT": {
|
|
52
|
+
"Empty": `Vuoto`
|
|
53
|
+
},
|
|
54
|
+
"ja-JP": {
|
|
55
|
+
"Empty": `\u{7A7A}`
|
|
56
|
+
},
|
|
57
|
+
"ko-KR": {
|
|
58
|
+
"Empty": `\u{BE44}\u{C5B4} \u{C788}\u{C74C}`
|
|
59
|
+
},
|
|
60
|
+
"lt-LT": {
|
|
61
|
+
"Empty": `Tu\u{161}\u{10D}ias`
|
|
62
|
+
},
|
|
63
|
+
"lv-LV": {
|
|
64
|
+
"Empty": `Tuk\u{161}s`
|
|
65
|
+
},
|
|
66
|
+
"nb-NO": {
|
|
67
|
+
"Empty": `Tom`
|
|
68
|
+
},
|
|
69
|
+
"nl-NL": {
|
|
70
|
+
"Empty": `Leeg`
|
|
71
|
+
},
|
|
72
|
+
"pl-PL": {
|
|
73
|
+
"Empty": `Pusty`
|
|
74
|
+
},
|
|
75
|
+
"pt-BR": {
|
|
76
|
+
"Empty": `Vazio`
|
|
77
|
+
},
|
|
78
|
+
"pt-PT": {
|
|
79
|
+
"Empty": `Vazio`
|
|
80
|
+
},
|
|
81
|
+
"ro-RO": {
|
|
82
|
+
"Empty": `Gol`
|
|
83
|
+
},
|
|
84
|
+
"ru-RU": {
|
|
85
|
+
"Empty": `\u{41D}\u{435} \u{437}\u{430}\u{43F}\u{43E}\u{43B}\u{43D}\u{435}\u{43D}\u{43E}`
|
|
86
|
+
},
|
|
87
|
+
"sk-SK": {
|
|
88
|
+
"Empty": `Pr\xe1zdne`
|
|
89
|
+
},
|
|
90
|
+
"sl-SI": {
|
|
91
|
+
"Empty": `Prazen`
|
|
92
|
+
},
|
|
93
|
+
"sr-SP": {
|
|
94
|
+
"Empty": `Prazno`
|
|
95
|
+
},
|
|
96
|
+
"sv-SE": {
|
|
97
|
+
"Empty": `Tomt`
|
|
98
|
+
},
|
|
99
|
+
"tr-TR": {
|
|
100
|
+
"Empty": `Bo\u{15F}`
|
|
101
|
+
},
|
|
102
|
+
"uk-UA": {
|
|
103
|
+
"Empty": `\u{41F}\u{443}\u{441}\u{442}\u{43E}`
|
|
104
|
+
},
|
|
105
|
+
"zh-CN": {
|
|
106
|
+
"Empty": `\u{7A7A}`
|
|
107
|
+
},
|
|
108
|
+
"zh-TW": {
|
|
109
|
+
"Empty": `\u{7A7A}\u{767D}`
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const spinButtonDictionary = new LocalizedStringDictionary<SpinButtonStringKey, string>(
|
|
114
|
+
spinButtonStrings,
|
|
115
|
+
);
|
package/src/table/createTable.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { TableState, TableCollection, Key, GridNode } from "@proyecto-vivia
|
|
|
10
10
|
import type { AriaTableProps, TableAria } from "./types";
|
|
11
11
|
import { useLocale } from "../i18n";
|
|
12
12
|
import { announce } from "../live-announcer";
|
|
13
|
+
import { createDescription } from "../utils/createDescription";
|
|
13
14
|
import { scrollIntoViewport } from "../utils";
|
|
14
15
|
import { getInteractionModality } from "../interactions/createInteractionModality";
|
|
15
16
|
|
|
@@ -590,16 +591,40 @@ export function createTable<T extends object>(
|
|
|
590
591
|
}
|
|
591
592
|
});
|
|
592
593
|
|
|
594
|
+
// A sorted table exposes a persistent sort description on the grid ("sorted by
|
|
595
|
+
// column {name} in {direction} order"), mirroring `useTable`'s
|
|
596
|
+
// `useDescription(sortDescription)` — separate from the transient live-region
|
|
597
|
+
// announcement above. `columnName` follows upstream exactly
|
|
598
|
+
// (`columns.find(c => c.key === column)?.textValue ?? ''`) so a header with no
|
|
599
|
+
// plain-text value yields an empty name, matching the S2 oracle.
|
|
600
|
+
const sortDescription = () => {
|
|
601
|
+
const s = state();
|
|
602
|
+
const descriptor = s.sortDescriptor;
|
|
603
|
+
const column = descriptor?.column;
|
|
604
|
+
const direction = descriptor?.direction;
|
|
605
|
+
if (!direction || column == null) {
|
|
606
|
+
return undefined;
|
|
607
|
+
}
|
|
608
|
+
const columnName = s.collection.columns.find((c) => c.key === column)?.textValue ?? "";
|
|
609
|
+
return `sorted by column ${columnName} in ${direction} order`;
|
|
610
|
+
};
|
|
611
|
+
const sortDescriptionProps = createDescription(sortDescription);
|
|
612
|
+
|
|
593
613
|
const gridProps = createMemo(() => {
|
|
594
614
|
const p = props();
|
|
595
615
|
const s = state();
|
|
596
616
|
|
|
617
|
+
const describedBy =
|
|
618
|
+
[sortDescriptionProps["aria-describedby"], p["aria-describedby"]]
|
|
619
|
+
.filter(Boolean)
|
|
620
|
+
.join(" ") || undefined;
|
|
621
|
+
|
|
597
622
|
const baseProps: Record<string, unknown> = {
|
|
598
623
|
role: "grid",
|
|
599
624
|
id,
|
|
600
625
|
"aria-label": p["aria-label"],
|
|
601
626
|
"aria-labelledby": p["aria-labelledby"],
|
|
602
|
-
"aria-describedby":
|
|
627
|
+
"aria-describedby": describedBy,
|
|
603
628
|
"aria-multiselectable": s.selectionMode === "multiple" ? "true" : undefined,
|
|
604
629
|
// Keep the grid itself tabbable so keyboard users can enter
|
|
605
630
|
// row/cell navigation without requiring a prior pointer interaction.
|
|
@@ -8,6 +8,7 @@ import type { JSX } from "solid-js";
|
|
|
8
8
|
import type { TableState, TableCollection } from "@proyecto-viviana/solid-stately";
|
|
9
9
|
import type { AriaTableColumnHeaderProps, TableColumnHeaderAria } from "./types";
|
|
10
10
|
import { getTableData } from "./createTable";
|
|
11
|
+
import { createDescription } from "../utils/createDescription";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Creates accessibility props for a table column header.
|
|
@@ -27,6 +28,14 @@ export function createTableColumnHeader<T extends object>(
|
|
|
27
28
|
return s.focusedKey === p.node.key;
|
|
28
29
|
});
|
|
29
30
|
|
|
31
|
+
// A sortable column header is described as "sortable column" — mirrors
|
|
32
|
+
// `useTableColumnHeader`'s `useDescription(stringFormatter.format('sortable'))`.
|
|
33
|
+
// Backed by a shared hidden element (ref-counted) and referenced via
|
|
34
|
+
// aria-describedby.
|
|
35
|
+
const sortDescriptionProps = createDescription(() =>
|
|
36
|
+
props().allowsSorting ? "sortable column" : undefined,
|
|
37
|
+
);
|
|
38
|
+
|
|
30
39
|
const sortColumn = () => {
|
|
31
40
|
const s = state();
|
|
32
41
|
const p = props();
|
|
@@ -125,6 +134,7 @@ export function createTableColumnHeader<T extends object>(
|
|
|
125
134
|
role: "columnheader",
|
|
126
135
|
id: tableData ? `${tableData.tableId}-${node.key}` : undefined,
|
|
127
136
|
"aria-sort": ariaSort,
|
|
137
|
+
"aria-describedby": sortDescriptionProps["aria-describedby"],
|
|
128
138
|
tabIndex: isFocused() ? 0 : -1,
|
|
129
139
|
onFocus,
|
|
130
140
|
};
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
} from "@proyecto-viviana/solid-stately";
|
|
15
15
|
import type { AriaTableRowProps, TableRowAria, ExpandButtonProps } from "./types";
|
|
16
16
|
import { getTableData } from "./createTable";
|
|
17
|
+
import { getRowLabelledBy } from "./utils";
|
|
17
18
|
import { useLocale } from "../i18n";
|
|
18
19
|
import { createSelectableItem, type SelectableItemState } from "../selection/createSelectableItem";
|
|
19
20
|
import { mergeProps } from "../utils/mergeProps";
|
|
@@ -201,6 +202,15 @@ export function createTableRow<T extends object>(
|
|
|
201
202
|
"aria-disabled": isDisabled() || undefined,
|
|
202
203
|
};
|
|
203
204
|
|
|
205
|
+
// A row is labelled by its row-header cell(s) — mirrors `useTableRow`'s
|
|
206
|
+
// `'aria-labelledby': getRowLabelledBy(state, node.key)`. Without it the
|
|
207
|
+
// browser falls back to concatenating every cell (incl. the selection
|
|
208
|
+
// checkbox), so the row's accessible name reads "Select Foo.pdf PDF …".
|
|
209
|
+
const labelledBy = getRowLabelledBy(s, node.key);
|
|
210
|
+
if (labelledBy) {
|
|
211
|
+
baseProps["aria-labelledby"] = labelledBy;
|
|
212
|
+
}
|
|
213
|
+
|
|
204
214
|
// Tree-grid rows expose their nesting depth, position and expansion state.
|
|
205
215
|
if (s.treeColumn != null) {
|
|
206
216
|
const { posinset, setsize } = siblingInfo();
|