@proyecto-viviana/solidaria 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunk/DragManager.js +627 -0
- package/dist/_chunk/DragManager.js.map +1 -0
- package/dist/_chunk/DragManager.jsx +627 -0
- package/dist/_chunk/DragManager.jsx.map +1 -0
- package/dist/_chunk/FocusScope.js +400 -0
- package/dist/_chunk/FocusScope.js.map +1 -0
- package/dist/_chunk/FocusScope.jsx +375 -0
- package/dist/_chunk/FocusScope.jsx.map +1 -0
- package/dist/_chunk/actiongroup.js +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
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
import { createSignal, createEffect, onCleanup, type Accessor } from "solid-js";
|
|
11
11
|
import { createId, getOwnerDocument } from "../ssr";
|
|
12
|
-
import { type AutocompleteState } from "@proyecto-viviana/solid-stately";
|
|
12
|
+
import { type AutocompleteState, type CollectionNode } from "@proyecto-viviana/solid-stately";
|
|
13
|
+
import { FOCUS_EVENT, CLEAR_FOCUS_EVENT } from "../selection/constants";
|
|
14
|
+
import { getActiveElement, getEventTarget } from "../utils/dom";
|
|
15
|
+
import { getPointerType } from "../interactions";
|
|
13
16
|
|
|
14
17
|
export interface CollectionOptions {
|
|
15
18
|
/** The id of the collection element. */
|
|
@@ -51,7 +54,7 @@ export interface AutocompleteInputProps {
|
|
|
51
54
|
autoComplete: "off";
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
export interface AriaAutocompleteOptions<
|
|
57
|
+
export interface AriaAutocompleteOptions<T = unknown> {
|
|
55
58
|
/** Ref accessor for the input element. */
|
|
56
59
|
inputRef: Accessor<HTMLInputElement | undefined>;
|
|
57
60
|
/** Ref accessor for the collection element. */
|
|
@@ -64,8 +67,9 @@ export interface AriaAutocompleteOptions<_T = unknown> {
|
|
|
64
67
|
* An optional filter function used to determine if an option should be included.
|
|
65
68
|
* @param textValue - The text value of the item
|
|
66
69
|
* @param inputValue - The current input value
|
|
70
|
+
* @param node - The collection node being filtered
|
|
67
71
|
*/
|
|
68
|
-
filter?: (textValue: string, inputValue: string) => boolean;
|
|
72
|
+
filter?: (textValue: string, inputValue: string, node: CollectionNode<T>) => boolean;
|
|
69
73
|
/**
|
|
70
74
|
* Whether to focus the first item after filtering.
|
|
71
75
|
* @default false
|
|
@@ -78,13 +82,13 @@ export interface AriaAutocompleteOptions<_T = unknown> {
|
|
|
78
82
|
disableVirtualFocus?: boolean;
|
|
79
83
|
}
|
|
80
84
|
|
|
81
|
-
export interface AutocompleteAria<
|
|
85
|
+
export interface AutocompleteAria<T = unknown> {
|
|
82
86
|
/** Props for the autocomplete input element. */
|
|
83
87
|
inputProps: AutocompleteInputProps;
|
|
84
88
|
/** Props for the collection (ListBox/Menu). */
|
|
85
89
|
collectionProps: CollectionOptions;
|
|
86
90
|
/** A filter function that returns if the item should be shown. */
|
|
87
|
-
filter?: (
|
|
91
|
+
filter?: (nodeTextValue: string, node: CollectionNode<T>) => boolean;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
function toKeyboardEventInit(e: KeyboardEvent): KeyboardEventInit {
|
|
@@ -103,9 +107,14 @@ function toKeyboardEventInit(e: KeyboardEvent): KeyboardEventInit {
|
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
109
|
|
|
106
|
-
// Custom event names for collection communication
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
// Custom event names for collection communication.
|
|
111
|
+
// These are the shared @react-aria/selection constants the collection's
|
|
112
|
+
// createSelectableCollection listens for (FOCUS_EVENT / CLEAR_FOCUS_EVENT);
|
|
113
|
+
// the aliases below are retained for backwards-compatible re-exports.
|
|
114
|
+
/** @deprecated Use {@link FOCUS_EVENT} from the selection layer. */
|
|
115
|
+
export const AUTOCOMPLETE_FOCUS_EVENT = FOCUS_EVENT;
|
|
116
|
+
/** @deprecated Use {@link CLEAR_FOCUS_EVENT} from the selection layer. */
|
|
117
|
+
export const AUTOCOMPLETE_CLEAR_FOCUS_EVENT = CLEAR_FOCUS_EVENT;
|
|
109
118
|
|
|
110
119
|
/**
|
|
111
120
|
* Provides the behavior and accessibility implementation for an autocomplete component.
|
|
@@ -158,6 +167,20 @@ export function createAutocomplete<T = unknown>(
|
|
|
158
167
|
const [autoFocusOnMount, setAutoFocusOnMount] = createSignal(false);
|
|
159
168
|
let lastInputType = "";
|
|
160
169
|
|
|
170
|
+
// Reverse-focus (collection → input aria-activedescendant) bookkeeping, mirroring
|
|
171
|
+
// useAutocomplete's queuedActiveDescendant / delayNextActiveDescendant / timeout
|
|
172
|
+
// refs. `queuedActiveDescendant` is the id of the option the collection has
|
|
173
|
+
// virtually focused — tracked synchronously on every collection `focusin`, even
|
|
174
|
+
// while the visible aria-activedescendant reflection is deferred, so key
|
|
175
|
+
// navigation always dispatches to the right item. When typing forward,
|
|
176
|
+
// `delayNextActiveDescendant` defers the next reflection behind a 500ms timeout so
|
|
177
|
+
// a screen reader finishes announcing the just-typed letter before naming the
|
|
178
|
+
// active option; every new focusin (and teardown) clears the pending timeout.
|
|
179
|
+
let queuedActiveDescendant: string | null = null;
|
|
180
|
+
let delayNextActiveDescendant = false;
|
|
181
|
+
let activeDescendantTimeout: ReturnType<typeof setTimeout> | undefined;
|
|
182
|
+
const ACTIVE_DESCENDANT_DELAY = 500;
|
|
183
|
+
|
|
161
184
|
// Track the input type for determining focus behavior. We listen to
|
|
162
185
|
// `beforeinput` (not `input`) so `lastInputType` is set before the input's
|
|
163
186
|
// `onChange` runs, mirroring @react-aria/autocomplete.
|
|
@@ -179,6 +202,11 @@ export function createAutocomplete<T = unknown>(
|
|
|
179
202
|
|
|
180
203
|
// Focus first item in collection
|
|
181
204
|
const focusFirstItem = () => {
|
|
205
|
+
// Typing forward focuses the first filtered row, but the resulting
|
|
206
|
+
// aria-activedescendant reflection must wait so the SR announces the typed
|
|
207
|
+
// letter first (see updateActiveDescendant). Mirrors useAutocomplete
|
|
208
|
+
// setting delayNextActiveDescendant.current = true before the focus event.
|
|
209
|
+
delayNextActiveDescendant = true;
|
|
182
210
|
const collection = collectionRef();
|
|
183
211
|
if (!collection) {
|
|
184
212
|
// Collection isn't mounted yet — defer focusing the first item to mount
|
|
@@ -188,7 +216,7 @@ export function createAutocomplete<T = unknown>(
|
|
|
188
216
|
return;
|
|
189
217
|
}
|
|
190
218
|
collection.dispatchEvent(
|
|
191
|
-
new CustomEvent(
|
|
219
|
+
new CustomEvent(FOCUS_EVENT, {
|
|
192
220
|
cancelable: true,
|
|
193
221
|
bubbles: true,
|
|
194
222
|
detail: { focusStrategy: "first" },
|
|
@@ -199,11 +227,18 @@ export function createAutocomplete<T = unknown>(
|
|
|
199
227
|
// Clear virtual focus
|
|
200
228
|
const clearVirtualFocus = (clearFocusKey = false) => {
|
|
201
229
|
setAutoFocusOnMount(false);
|
|
230
|
+
// Drop any pending delayed reflection and the tracked item alongside the
|
|
231
|
+
// active descendant so a subsequent focusin can't resurrect a stale id
|
|
232
|
+
// (mirrors useAutocomplete clearing queuedActiveDescendant / the timeout /
|
|
233
|
+
// delayNextActiveDescendant in clearVirtualFocus).
|
|
234
|
+
clearTimeout(activeDescendantTimeout);
|
|
235
|
+
queuedActiveDescendant = null;
|
|
236
|
+
delayNextActiveDescendant = false;
|
|
202
237
|
state.setFocusedNodeId(null);
|
|
203
238
|
const collection = collectionRef();
|
|
204
239
|
if (collection) {
|
|
205
240
|
collection.dispatchEvent(
|
|
206
|
-
new CustomEvent(
|
|
241
|
+
new CustomEvent(CLEAR_FOCUS_EVENT, {
|
|
207
242
|
cancelable: true,
|
|
208
243
|
bubbles: true,
|
|
209
244
|
detail: { clearFocusKey },
|
|
@@ -243,7 +278,13 @@ export function createAutocomplete<T = unknown>(
|
|
|
243
278
|
return;
|
|
244
279
|
}
|
|
245
280
|
|
|
246
|
-
|
|
281
|
+
// Navigate against the id the collection has virtually focused, tracked
|
|
282
|
+
// synchronously on every focusin, NOT the (possibly still-delayed)
|
|
283
|
+
// aria-activedescendant reflection in state — mirrors useAutocomplete
|
|
284
|
+
// reading queuedActiveDescendant.current here. Reading state.focusedNodeId()
|
|
285
|
+
// would be null during the post-type reflection delay, so arrows would
|
|
286
|
+
// re-focus the first row instead of advancing.
|
|
287
|
+
const focusedNodeId = queuedActiveDescendant;
|
|
247
288
|
const collection = collectionRef();
|
|
248
289
|
const ownerDocument = getOwnerDocument(inputRef() ?? collection);
|
|
249
290
|
|
|
@@ -275,7 +316,7 @@ export function createAutocomplete<T = unknown>(
|
|
|
275
316
|
// Dispatch focus event to collection
|
|
276
317
|
if (collection) {
|
|
277
318
|
collection.dispatchEvent(
|
|
278
|
-
new CustomEvent(
|
|
319
|
+
new CustomEvent(FOCUS_EVENT, {
|
|
279
320
|
cancelable: true,
|
|
280
321
|
bubbles: true,
|
|
281
322
|
}),
|
|
@@ -310,7 +351,11 @@ export function createAutocomplete<T = unknown>(
|
|
|
310
351
|
|
|
311
352
|
// Forward keyboard events to the focused item (or the collection when there
|
|
312
353
|
// is no virtual focus) so the collection can act on them, e.g. onAction.
|
|
313
|
-
|
|
354
|
+
// Gated only on the collection existing — NOT on e.defaultPrevented: arrows
|
|
355
|
+
// call preventDefault above to stop the input's text cursor moving, but the
|
|
356
|
+
// key must still be re-dispatched to the row so navigation advances (mirrors
|
|
357
|
+
// useAutocomplete forwarding whenever collectionRef.current !== null).
|
|
358
|
+
if (collection) {
|
|
314
359
|
e.stopPropagation();
|
|
315
360
|
|
|
316
361
|
let shouldPerformDefaultAction = true;
|
|
@@ -357,9 +402,85 @@ export function createAutocomplete<T = unknown>(
|
|
|
357
402
|
// Virtual focus blur handling would go here
|
|
358
403
|
};
|
|
359
404
|
|
|
360
|
-
//
|
|
405
|
+
// Reverse path: mirror the collection's virtually-focused option into the
|
|
406
|
+
// input's aria-activedescendant. The collection dispatches a synthetic,
|
|
407
|
+
// bubbling `focusin` (via moveVirtualFocus) on its focused option; we read the
|
|
408
|
+
// target id, track it in `queuedActiveDescendant` synchronously (so key nav
|
|
409
|
+
// always dispatches to the right item), and reflect it into AutocompleteState
|
|
410
|
+
// — immediately, or, when `delayNextActiveDescendant` was set by forward
|
|
411
|
+
// typing, behind a 500ms timeout so the SR finishes announcing the typed
|
|
412
|
+
// letter before naming the active option. Faithful port of useAutocomplete's
|
|
413
|
+
// updateActiveDescendantEvent.
|
|
414
|
+
const updateActiveDescendant = (e: Event) => {
|
|
415
|
+
const input = inputRef();
|
|
416
|
+
// If the user clicks/taps an option directly (non-touch), pull real focus
|
|
417
|
+
// back to the input so typing keeps working.
|
|
418
|
+
if (
|
|
419
|
+
!e.isTrusted &&
|
|
420
|
+
shouldUseVirtualFocus() &&
|
|
421
|
+
input &&
|
|
422
|
+
getActiveElement(getOwnerDocument(input)) !== input &&
|
|
423
|
+
getPointerType() !== "touch"
|
|
424
|
+
) {
|
|
425
|
+
input.focus();
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const target = getEventTarget<Element>(e);
|
|
429
|
+
if (e.isTrusted || !target || queuedActiveDescendant === target.id) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const collection = collectionRef();
|
|
434
|
+
// A new focusin supersedes any pending delayed reflection.
|
|
435
|
+
clearTimeout(activeDescendantTimeout);
|
|
436
|
+
if (target !== collection) {
|
|
437
|
+
const targetId = target.id;
|
|
438
|
+
if (delayNextActiveDescendant) {
|
|
439
|
+
// Forward typing just focused the first row: track it now, but defer the
|
|
440
|
+
// aria-activedescendant reflection so the just-typed letter is announced
|
|
441
|
+
// before the active option.
|
|
442
|
+
queuedActiveDescendant = targetId;
|
|
443
|
+
activeDescendantTimeout = setTimeout(() => {
|
|
444
|
+
state.setFocusedNodeId(targetId);
|
|
445
|
+
}, ACTIVE_DESCENDANT_DELAY);
|
|
446
|
+
} else {
|
|
447
|
+
queuedActiveDescendant = targetId;
|
|
448
|
+
state.setFocusedNodeId(targetId);
|
|
449
|
+
}
|
|
450
|
+
} else if (
|
|
451
|
+
queuedActiveDescendant &&
|
|
452
|
+
!getOwnerDocument(collection)?.getElementById(queuedActiveDescendant)
|
|
453
|
+
) {
|
|
454
|
+
// Refocus of the collection itself while the previously focused node no
|
|
455
|
+
// longer exists (filtered away, or the input was refocused): clear the
|
|
456
|
+
// tracked item and the active descendant.
|
|
457
|
+
queuedActiveDescendant = null;
|
|
458
|
+
state.setFocusedNodeId(null);
|
|
459
|
+
}
|
|
460
|
+
// Reflection delay is a one-shot; the next focusin reflects immediately
|
|
461
|
+
// unless forward typing sets the flag again.
|
|
462
|
+
delayNextActiveDescendant = false;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
createEffect(() => {
|
|
466
|
+
if (!shouldUseVirtualFocus()) return;
|
|
467
|
+
const collection = collectionRef();
|
|
468
|
+
if (collection) {
|
|
469
|
+
collection.addEventListener("focusin", updateActiveDescendant);
|
|
470
|
+
onCleanup(() => {
|
|
471
|
+
collection.removeEventListener("focusin", updateActiveDescendant);
|
|
472
|
+
clearTimeout(activeDescendantTimeout);
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// Create filter function. The user's 3-arg predicate (textValue, inputValue,
|
|
478
|
+
// node) is closed over the current input value and exposed to the collection
|
|
479
|
+
// as the 2-arg (nodeTextValue, node) shape that UNSTABLE_useFilteredListState
|
|
480
|
+
// (createFilteredListState) expects.
|
|
361
481
|
const filterFn = filter
|
|
362
|
-
? (
|
|
482
|
+
? (nodeTextValue: string, node: CollectionNode<T>) =>
|
|
483
|
+
filter(nodeTextValue, state.inputValue(), node)
|
|
363
484
|
: undefined;
|
|
364
485
|
|
|
365
486
|
return {
|
|
@@ -84,8 +84,14 @@ export function createBreadcrumbItem(
|
|
|
84
84
|
const elementType = () => getProps().elementType ?? "a";
|
|
85
85
|
|
|
86
86
|
// Use createLink for base link behavior
|
|
87
|
-
// Current items are treated as disabled (can't navigate to current page)
|
|
88
|
-
|
|
87
|
+
// Current items are treated as disabled (can't navigate to current page).
|
|
88
|
+
// Keep the whole return value (do NOT destructure linkProps): `linkProps` is a
|
|
89
|
+
// reactive getter, and destructuring it here would snapshot getLinkProps() once
|
|
90
|
+
// at mount — freezing role/tabIndex to whatever elementType was during the
|
|
91
|
+
// transient first render (e.g. before isCurrent settles). Reading
|
|
92
|
+
// linkAria.linkProps fresh inside getItemProps keeps it live, mirroring React
|
|
93
|
+
// re-running useLink every render.
|
|
94
|
+
const linkAria = createLink({
|
|
89
95
|
get isDisabled() {
|
|
90
96
|
return isDisabled() || isCurrent();
|
|
91
97
|
},
|
|
@@ -148,6 +154,8 @@ export function createBreadcrumbItem(
|
|
|
148
154
|
const getItemProps = (): Record<string, unknown> => {
|
|
149
155
|
const p = getProps();
|
|
150
156
|
const current = isCurrent();
|
|
157
|
+
// Read fresh each call so elementType-driven role/tabIndex stay reactive.
|
|
158
|
+
const linkProps = linkAria.linkProps;
|
|
151
159
|
|
|
152
160
|
// Start with link props, forwarding id if provided
|
|
153
161
|
let baseProps: Record<string, unknown> = p.id ? mergeProps(linkProps, { id: p.id }) : linkProps;
|
|
@@ -175,8 +183,8 @@ export function createBreadcrumbItem(
|
|
|
175
183
|
return getItemProps();
|
|
176
184
|
},
|
|
177
185
|
get linkProps() {
|
|
178
|
-
return linkProps;
|
|
186
|
+
return linkAria.linkProps;
|
|
179
187
|
},
|
|
180
|
-
isPressed,
|
|
188
|
+
isPressed: linkAria.isPressed,
|
|
181
189
|
};
|
|
182
190
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JSX } from "solid-js";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
2
3
|
import type { Key, ToggleGroupProps, ToggleGroupState } from "@proyecto-viviana/solid-stately";
|
|
3
4
|
import { createToolbar, type Orientation } from "../toolbar";
|
|
4
5
|
import { mergeProps } from "../utils";
|
|
@@ -75,21 +76,25 @@ export function createToggleButtonGroupItem(
|
|
|
75
76
|
props: AriaToggleButtonGroupItemProps,
|
|
76
77
|
state: ToggleGroupState,
|
|
77
78
|
): ToggleButtonAria {
|
|
78
|
-
|
|
79
|
+
// splitProps keeps `toggleProps` a reactive proxy; an object-rest destructure
|
|
80
|
+
// (`{ id, ...toggleProps }`) eagerly reads and freezes every key. `id` is
|
|
81
|
+
// dropped here and re-read live via props.id below. guard:idiomatic-solid.
|
|
82
|
+
const [, toggleProps] = splitProps(props, ["id"]);
|
|
79
83
|
|
|
80
|
-
const toggleButton = createToggleButton(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
const toggleButton = createToggleButton(
|
|
85
|
+
mergeProps(toggleProps, {
|
|
86
|
+
get isSelected() {
|
|
87
|
+
return state.selectedKeys.has(props.id);
|
|
88
|
+
},
|
|
89
|
+
onChange(isSelected: boolean) {
|
|
90
|
+
state.setSelected(props.id, isSelected);
|
|
91
|
+
props.onChange?.(isSelected);
|
|
92
|
+
},
|
|
93
|
+
get isDisabled() {
|
|
94
|
+
return isDisabledValue(props.isDisabled) || state.isDisabled;
|
|
95
|
+
},
|
|
96
|
+
}) as AriaToggleButtonProps,
|
|
97
|
+
);
|
|
93
98
|
|
|
94
99
|
const baseButtonProps = toggleButton.buttonProps as Record<string, unknown>;
|
|
95
100
|
const buttonProps: Record<string, unknown> = {
|
|
@@ -11,6 +11,7 @@ import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
|
11
11
|
import { mergeProps } from "../utils/mergeProps";
|
|
12
12
|
import type { CalendarState } from "@proyecto-viviana/solid-stately";
|
|
13
13
|
import { formatVisibleRangeDescription, setCalendarHookData } from "./utils";
|
|
14
|
+
import { formatCalendarLabel } from "./intl";
|
|
14
15
|
|
|
15
16
|
export interface AriaCalendarProps {
|
|
16
17
|
/** An ID for the calendar. */
|
|
@@ -99,14 +100,13 @@ export function createCalendar<T extends CalendarState>(
|
|
|
99
100
|
const isDisabled = p.isDisabled || state.isDisabled();
|
|
100
101
|
|
|
101
102
|
return {
|
|
102
|
-
"aria-label":
|
|
103
|
+
"aria-label": formatCalendarLabel(state.locale(), "previous"),
|
|
103
104
|
onClick: () => {
|
|
104
105
|
if (!isDisabled) {
|
|
105
106
|
state.focusPreviousPage();
|
|
106
107
|
}
|
|
107
108
|
},
|
|
108
109
|
disabled: isDisabled,
|
|
109
|
-
tabIndex: -1,
|
|
110
110
|
};
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -116,14 +116,13 @@ export function createCalendar<T extends CalendarState>(
|
|
|
116
116
|
const isDisabled = p.isDisabled || state.isDisabled();
|
|
117
117
|
|
|
118
118
|
return {
|
|
119
|
-
"aria-label":
|
|
119
|
+
"aria-label": formatCalendarLabel(state.locale(), "next"),
|
|
120
120
|
onClick: () => {
|
|
121
121
|
if (!isDisabled) {
|
|
122
122
|
state.focusNextPage();
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
disabled: isDisabled,
|
|
126
|
-
tabIndex: -1,
|
|
127
126
|
};
|
|
128
127
|
});
|
|
129
128
|
|
|
@@ -14,7 +14,12 @@ import { getInteractionModality } from "../interactions/createInteractionModalit
|
|
|
14
14
|
import { useLocale } from "../i18n";
|
|
15
15
|
import { mergeProps } from "../utils/mergeProps";
|
|
16
16
|
import type { CalendarState, CalendarDate, DateValue } from "@proyecto-viviana/solid-stately";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
isToday as isTodayUtil,
|
|
19
|
+
DateFormatter,
|
|
20
|
+
getLocalTimeZone,
|
|
21
|
+
isSameDay,
|
|
22
|
+
} from "@internationalized/date";
|
|
18
23
|
import { getCalendarHookData } from "./utils";
|
|
19
24
|
import { formatCalendarLabel } from "./intl";
|
|
20
25
|
|
|
@@ -76,7 +81,6 @@ export function createCalendarCell<T extends CalendarState>(
|
|
|
76
81
|
|
|
77
82
|
// Check states
|
|
78
83
|
const isSelected = createMemo(() => state.isSelected(date()));
|
|
79
|
-
const isFocused = createMemo(() => state.isCellFocused(date()));
|
|
80
84
|
const isInvalid = createMemo(() => state.isValueInvalid() && isSelected());
|
|
81
85
|
const isDisabled = createMemo(() => {
|
|
82
86
|
return getProps().isDisabled || state.isCellDisabled(date());
|
|
@@ -85,6 +89,11 @@ export function createCalendarCell<T extends CalendarState>(
|
|
|
85
89
|
const isOutsideMonth = createMemo(
|
|
86
90
|
() => getProps().isOutsideMonth ?? state.isOutsideVisibleRange(date()),
|
|
87
91
|
);
|
|
92
|
+
// Mirror @react-aria/calendar useCalendarCell: `isCellFocused(date) &&
|
|
93
|
+
// !isOutsideMonth`. isCellFocused is gated on the calendar-level focus flag,
|
|
94
|
+
// so this drives the focusSafely effect (never on mount) — NOT the roving
|
|
95
|
+
// tabIndex, which tracks focusedDate directly below.
|
|
96
|
+
const isFocused = createMemo(() => state.isCellFocused(date()) && !isOutsideMonth());
|
|
88
97
|
const isToday = createMemo(() => isTodayUtil(date(), timeZone));
|
|
89
98
|
const isCellFocusVisible = createMemo(
|
|
90
99
|
() => isFocused() && isRingFocusVisible() && getInteractionModality() !== null,
|
|
@@ -193,7 +202,12 @@ export function createCalendarCell<T extends CalendarState>(
|
|
|
193
202
|
focusProps as Record<string, unknown>,
|
|
194
203
|
{
|
|
195
204
|
role: "button",
|
|
196
|
-
|
|
205
|
+
// Roving tabbable cell = the focusedDate cell, ungated by calendar
|
|
206
|
+
// focus, mirroring @react-aria/calendar useCalendarCell
|
|
207
|
+
// (`tabIndex = isSameDay(date, state.focusedDate) ? 0 : -1`, undefined
|
|
208
|
+
// when disabled). Keeps one cell tabbable on mount without stealing
|
|
209
|
+
// focus, and prunes tabindex from disabled cells like upstream.
|
|
210
|
+
tabIndex: isDisabled() ? undefined : isSameDay(date(), state.focusedDate()) ? 0 : -1,
|
|
197
211
|
"aria-label": label,
|
|
198
212
|
"aria-disabled": isDisabled() || isUnavailable() || undefined,
|
|
199
213
|
"aria-invalid": isInvalid() || undefined,
|
|
@@ -180,16 +180,17 @@ export function createCalendarGrid<T extends CalendarState>(
|
|
|
180
180
|
"aria-readonly": state.isReadOnly() || undefined,
|
|
181
181
|
"aria-disabled": state.isDisabled() || undefined,
|
|
182
182
|
"aria-multiselectable": isMultiSelectable() || undefined,
|
|
183
|
-
tabIndex: state.isFocused() ? 0 : -1,
|
|
184
183
|
onFocus: () => state.setFocused(true),
|
|
185
184
|
onBlur: () => state.setFocused(false),
|
|
186
185
|
onKeyDown: handleKeyDown,
|
|
187
186
|
};
|
|
188
187
|
});
|
|
189
188
|
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
|
|
189
|
+
// Column headers are hidden to screen readers to make navigating with a touch
|
|
190
|
+
// screen reader easier — the day names are already included in each cell's
|
|
191
|
+
// label, so there's no need to announce them twice. Consumers render this on
|
|
192
|
+
// <thead>. Mirrors @react-aria/calendar useCalendarGrid headerProps.
|
|
193
|
+
const headerProps = createMemo(() => ({ "aria-hidden": true }));
|
|
193
194
|
|
|
194
195
|
return {
|
|
195
196
|
get gridProps() {
|
|
@@ -13,9 +13,9 @@ import type { RangeCalendarState } from "@proyecto-viviana/solid-stately";
|
|
|
13
13
|
import {
|
|
14
14
|
formatSelectedDateDescription,
|
|
15
15
|
formatVisibleRangeDescription,
|
|
16
|
-
getCalendarHookData,
|
|
17
16
|
setCalendarHookData,
|
|
18
17
|
} from "./utils";
|
|
18
|
+
import { formatCalendarLabel } from "./intl";
|
|
19
19
|
|
|
20
20
|
export interface AriaRangeCalendarProps {
|
|
21
21
|
/** An ID for the calendar. */
|
|
@@ -80,18 +80,30 @@ export function createRangeCalendar<T extends RangeCalendarState>(
|
|
|
80
80
|
const selectedDateDescription = createMemo(() => formatSelectedDateDescription(state));
|
|
81
81
|
|
|
82
82
|
const initialProps = getProps();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
// Gate the hook-data write on an identifying prop, mirroring createCalendar.
|
|
84
|
+
// The headless RangeCalendarButton re-invokes createRangeCalendar({}, state)
|
|
85
|
+
// to read prev/next button props from context; without this gate that bare
|
|
86
|
+
// call would clobber the ariaLabel / selectedDateDescription the owning
|
|
87
|
+
// RangeCalendar published, dropping the calendar label from every grid name.
|
|
88
|
+
if (
|
|
89
|
+
initialProps.id ||
|
|
90
|
+
initialProps["aria-label"] ||
|
|
91
|
+
initialProps["aria-labelledby"] ||
|
|
92
|
+
initialProps["aria-describedby"] ||
|
|
93
|
+
initialProps["aria-details"] ||
|
|
94
|
+
initialProps.errorMessage ||
|
|
95
|
+
initialProps.errorMessageId
|
|
96
|
+
) {
|
|
97
|
+
setCalendarHookData(state, {
|
|
98
|
+
errorMessageId:
|
|
99
|
+
initialProps.errorMessage || initialProps.errorMessageId ? errorMessageId : undefined,
|
|
100
|
+
ariaLabel: initialProps["aria-label"],
|
|
101
|
+
ariaLabelledBy: initialProps["aria-labelledby"],
|
|
102
|
+
get selectedDateDescription() {
|
|
103
|
+
return selectedDateDescription();
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
95
107
|
|
|
96
108
|
// Previous button props
|
|
97
109
|
const prevButtonProps = createMemo(() => {
|
|
@@ -99,14 +111,13 @@ export function createRangeCalendar<T extends RangeCalendarState>(
|
|
|
99
111
|
const isDisabled = p.isDisabled || state.isDisabled() || state.isPreviousVisibleRangeInvalid();
|
|
100
112
|
|
|
101
113
|
return {
|
|
102
|
-
"aria-label":
|
|
114
|
+
"aria-label": formatCalendarLabel(state.locale(), "previous"),
|
|
103
115
|
onClick: () => {
|
|
104
116
|
if (!isDisabled) {
|
|
105
117
|
state.focusPreviousPage();
|
|
106
118
|
}
|
|
107
119
|
},
|
|
108
120
|
disabled: isDisabled,
|
|
109
|
-
tabIndex: -1,
|
|
110
121
|
};
|
|
111
122
|
});
|
|
112
123
|
|
|
@@ -116,14 +127,13 @@ export function createRangeCalendar<T extends RangeCalendarState>(
|
|
|
116
127
|
const isDisabled = p.isDisabled || state.isDisabled() || state.isNextVisibleRangeInvalid();
|
|
117
128
|
|
|
118
129
|
return {
|
|
119
|
-
"aria-label":
|
|
130
|
+
"aria-label": formatCalendarLabel(state.locale(), "next"),
|
|
120
131
|
onClick: () => {
|
|
121
132
|
if (!isDisabled) {
|
|
122
133
|
state.focusNextPage();
|
|
123
134
|
}
|
|
124
135
|
},
|
|
125
136
|
disabled: isDisabled,
|
|
126
|
-
tabIndex: -1,
|
|
127
137
|
};
|
|
128
138
|
});
|
|
129
139
|
|
|
@@ -10,7 +10,12 @@ import { access, type MaybeAccessor } from "../utils/reactivity";
|
|
|
10
10
|
import { focusSafely } from "../utils/focus";
|
|
11
11
|
import { createDescription } from "../utils/createDescription";
|
|
12
12
|
import type { RangeCalendarState, CalendarDate, DateValue } from "@proyecto-viviana/solid-stately";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
isToday as isTodayUtil,
|
|
15
|
+
isSameDay,
|
|
16
|
+
DateFormatter,
|
|
17
|
+
getLocalTimeZone,
|
|
18
|
+
} from "@internationalized/date";
|
|
14
19
|
import { getCalendarHookData, getEraFormat } from "./utils";
|
|
15
20
|
import { formatCalendarLabel, formatCalendarPrompt } from "./intl";
|
|
16
21
|
|
|
@@ -71,7 +76,6 @@ export function createRangeCalendarCell<T extends RangeCalendarState>(
|
|
|
71
76
|
const isSelected = createMemo(() => state.isSelected(date()));
|
|
72
77
|
const isSelectionStart = createMemo(() => state.isSelectionStart(date()));
|
|
73
78
|
const isSelectionEnd = createMemo(() => state.isSelectionEnd(date()));
|
|
74
|
-
const isFocused = createMemo(() => state.isCellFocused(date()));
|
|
75
79
|
const isInvalid = createMemo(() => {
|
|
76
80
|
const range = state.highlightedRange();
|
|
77
81
|
const d = date();
|
|
@@ -91,6 +95,11 @@ export function createRangeCalendarCell<T extends RangeCalendarState>(
|
|
|
91
95
|
const isOutsideMonth = createMemo(() => {
|
|
92
96
|
return getProps().isOutsideMonth ?? state.isOutsideVisibleRange(date());
|
|
93
97
|
});
|
|
98
|
+
// Mirror @react-aria/calendar useCalendarCell: `isCellFocused(date) &&
|
|
99
|
+
// !isOutsideMonth`. isCellFocused is now gated on the calendar-level focus
|
|
100
|
+
// flag, so this drives the focusSafely effect + range-selection prompt (never
|
|
101
|
+
// on mount) — NOT the roving tabIndex, which tracks focusedDate directly.
|
|
102
|
+
const isFocused = createMemo(() => state.isCellFocused(date()) && !isOutsideMonth());
|
|
94
103
|
const isToday = createMemo(() => isTodayUtil(date(), timeZone));
|
|
95
104
|
const rangeSelectionPrompt = createMemo(() => {
|
|
96
105
|
if (!isFocused() || state.isReadOnly() || !isSelectable()) {
|
|
@@ -199,7 +208,12 @@ export function createRangeCalendarCell<T extends RangeCalendarState>(
|
|
|
199
208
|
|
|
200
209
|
return {
|
|
201
210
|
role: "button",
|
|
202
|
-
|
|
211
|
+
// Roving tabbable cell = the focusedDate cell, ungated by calendar focus,
|
|
212
|
+
// mirroring @react-aria/calendar useCalendarCell
|
|
213
|
+
// (`tabIndex = isSameDay(date, state.focusedDate) ? 0 : -1`, undefined when
|
|
214
|
+
// disabled). Keeps one cell tabbable on mount without stealing focus, and
|
|
215
|
+
// prunes tabindex from disabled cells like upstream.
|
|
216
|
+
tabIndex: isDisabled() ? undefined : isSameDay(d, state.focusedDate()) ? 0 : -1,
|
|
203
217
|
"aria-label": label,
|
|
204
218
|
"aria-disabled": isDisabled() || isUnavailable() || undefined,
|
|
205
219
|
"aria-invalid": isInvalid() || undefined,
|
|
@@ -10,6 +10,8 @@ type CalendarLabelKey =
|
|
|
10
10
|
| "dateSelected"
|
|
11
11
|
| "maximumDate"
|
|
12
12
|
| "minimumDate"
|
|
13
|
+
| "next"
|
|
14
|
+
| "previous"
|
|
13
15
|
| "selectedDateDescription"
|
|
14
16
|
| "selectedRangeDescription"
|
|
15
17
|
| "todayDate"
|
|
@@ -169,6 +171,8 @@ const calendarLabelStrings: LocalizedStrings<CalendarLabelKey, CalendarLabelMess
|
|
|
169
171
|
dateSelected: (args) => `${args?.date} selected`,
|
|
170
172
|
maximumDate: "Last available date",
|
|
171
173
|
minimumDate: "First available date",
|
|
174
|
+
next: "Next",
|
|
175
|
+
previous: "Previous",
|
|
172
176
|
selectedDateDescription: (args) => `Selected Date: ${args?.date}`,
|
|
173
177
|
selectedRangeDescription: (args) => `Selected Range: ${args?.dateRange}`,
|
|
174
178
|
todayDate: (args) => `Today, ${args?.date}`,
|
|
@@ -181,6 +185,8 @@ const calendarLabelStrings: LocalizedStrings<CalendarLabelKey, CalendarLabelMess
|
|
|
181
185
|
minimumDate: "Première date disponible",
|
|
182
186
|
selectedDateDescription: (args) => `Date sélectionnée : ${args?.date}`,
|
|
183
187
|
selectedRangeDescription: (args) => `Plage sélectionnée : ${args?.dateRange}`,
|
|
188
|
+
next: "Suivant",
|
|
189
|
+
previous: "Précédent",
|
|
184
190
|
todayDate: (args) => `Aujourd'hui, ${args?.date}`,
|
|
185
191
|
todayDateSelected: (args) => `Aujourd’hui, ${args?.date} sélectionné`,
|
|
186
192
|
},
|
|
@@ -189,6 +195,8 @@ const calendarLabelStrings: LocalizedStrings<CalendarLabelKey, CalendarLabelMess
|
|
|
189
195
|
dateSelected: (args) => `${args?.date} المحدد`,
|
|
190
196
|
maximumDate: "آخر تاريخ متاح",
|
|
191
197
|
minimumDate: "أول تاريخ متاح",
|
|
198
|
+
next: "التالي",
|
|
199
|
+
previous: "السابق",
|
|
192
200
|
selectedDateDescription: (args) => `تاريخ محدد: ${args?.date}`,
|
|
193
201
|
selectedRangeDescription: (args) => `المدى الزمني المحدد: ${args?.dateRange}`,
|
|
194
202
|
todayDate: (args) => `اليوم، ${args?.date}`,
|