@proyecto-viviana/solidaria 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6135 -50
- package/dist/index.js +485 -1120
- package/dist/{index.ssr.js → index.jsx} +89 -143
- package/package.json +7 -9
- package/dist/autocomplete/createAutocomplete.d.ts +0 -109
- package/dist/autocomplete/createAutocomplete.d.ts.map +0 -1
- package/dist/autocomplete/index.d.ts +0 -2
- package/dist/autocomplete/index.d.ts.map +0 -1
- package/dist/breadcrumbs/createBreadcrumbs.d.ts +0 -43
- package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs/index.d.ts +0 -2
- package/dist/breadcrumbs/index.d.ts.map +0 -1
- package/dist/button/createButton.d.ts +0 -29
- package/dist/button/createButton.d.ts.map +0 -1
- package/dist/button/createToggleButton.d.ts +0 -41
- package/dist/button/createToggleButton.d.ts.map +0 -1
- package/dist/button/index.d.ts +0 -5
- package/dist/button/index.d.ts.map +0 -1
- package/dist/button/types.d.ts +0 -77
- package/dist/button/types.d.ts.map +0 -1
- package/dist/calendar/createCalendar.d.ts +0 -41
- package/dist/calendar/createCalendar.d.ts.map +0 -1
- package/dist/calendar/createCalendarCell.d.ts +0 -41
- package/dist/calendar/createCalendarCell.d.ts.map +0 -1
- package/dist/calendar/createCalendarGrid.d.ts +0 -29
- package/dist/calendar/createCalendarGrid.d.ts.map +0 -1
- package/dist/calendar/createRangeCalendar.d.ts +0 -39
- package/dist/calendar/createRangeCalendar.d.ts.map +0 -1
- package/dist/calendar/createRangeCalendarCell.d.ts +0 -45
- package/dist/calendar/createRangeCalendarCell.d.ts.map +0 -1
- package/dist/calendar/index.d.ts +0 -6
- package/dist/calendar/index.d.ts.map +0 -1
- package/dist/checkbox/createCheckbox.d.ts +0 -56
- package/dist/checkbox/createCheckbox.d.ts.map +0 -1
- package/dist/checkbox/createCheckboxGroup.d.ts +0 -53
- package/dist/checkbox/createCheckboxGroup.d.ts.map +0 -1
- package/dist/checkbox/createCheckboxGroupItem.d.ts +0 -25
- package/dist/checkbox/createCheckboxGroupItem.d.ts.map +0 -1
- package/dist/checkbox/createCheckboxGroupState.d.ts +0 -71
- package/dist/checkbox/createCheckboxGroupState.d.ts.map +0 -1
- package/dist/checkbox/index.d.ts +0 -9
- package/dist/checkbox/index.d.ts.map +0 -1
- package/dist/color/createColorArea.d.ts +0 -13
- package/dist/color/createColorArea.d.ts.map +0 -1
- package/dist/color/createColorField.d.ts +0 -13
- package/dist/color/createColorField.d.ts.map +0 -1
- package/dist/color/createColorSlider.d.ts +0 -13
- package/dist/color/createColorSlider.d.ts.map +0 -1
- package/dist/color/createColorSwatch.d.ts +0 -12
- package/dist/color/createColorSwatch.d.ts.map +0 -1
- package/dist/color/createColorWheel.d.ts +0 -13
- package/dist/color/createColorWheel.d.ts.map +0 -1
- package/dist/color/index.d.ts +0 -10
- package/dist/color/index.d.ts.map +0 -1
- package/dist/color/types.d.ts +0 -106
- package/dist/color/types.d.ts.map +0 -1
- package/dist/combobox/createComboBox.d.ts +0 -77
- package/dist/combobox/createComboBox.d.ts.map +0 -1
- package/dist/combobox/index.d.ts +0 -2
- package/dist/combobox/index.d.ts.map +0 -1
- package/dist/combobox/intl/index.d.ts +0 -14
- package/dist/combobox/intl/index.d.ts.map +0 -1
- package/dist/datepicker/createDateField.d.ts +0 -51
- package/dist/datepicker/createDateField.d.ts.map +0 -1
- package/dist/datepicker/createDatePicker.d.ts +0 -65
- package/dist/datepicker/createDatePicker.d.ts.map +0 -1
- package/dist/datepicker/createDateSegment.d.ts +0 -29
- package/dist/datepicker/createDateSegment.d.ts.map +0 -1
- package/dist/datepicker/createTimeField.d.ts +0 -51
- package/dist/datepicker/createTimeField.d.ts.map +0 -1
- package/dist/datepicker/index.d.ts +0 -5
- package/dist/datepicker/index.d.ts.map +0 -1
- package/dist/dialog/createDialog.d.ts +0 -25
- package/dist/dialog/createDialog.d.ts.map +0 -1
- package/dist/dialog/index.d.ts +0 -3
- package/dist/dialog/index.d.ts.map +0 -1
- package/dist/dialog/types.d.ts +0 -18
- package/dist/dialog/types.d.ts.map +0 -1
- package/dist/disclosure/createDisclosure.d.ts +0 -52
- package/dist/disclosure/createDisclosure.d.ts.map +0 -1
- package/dist/disclosure/createDisclosureGroup.d.ts +0 -39
- package/dist/disclosure/createDisclosureGroup.d.ts.map +0 -1
- package/dist/disclosure/index.d.ts +0 -3
- package/dist/disclosure/index.d.ts.map +0 -1
- package/dist/dnd/createDrag.d.ts +0 -16
- package/dist/dnd/createDrag.d.ts.map +0 -1
- package/dist/dnd/createDraggableCollection.d.ts +0 -27
- package/dist/dnd/createDraggableCollection.d.ts.map +0 -1
- package/dist/dnd/createDraggableItem.d.ts +0 -37
- package/dist/dnd/createDraggableItem.d.ts.map +0 -1
- package/dist/dnd/createDrop.d.ts +0 -16
- package/dist/dnd/createDrop.d.ts.map +0 -1
- package/dist/dnd/createDroppableCollection.d.ts +0 -76
- package/dist/dnd/createDroppableCollection.d.ts.map +0 -1
- package/dist/dnd/createDroppableItem.d.ts +0 -31
- package/dist/dnd/createDroppableItem.d.ts.map +0 -1
- package/dist/dnd/index.d.ts +0 -18
- package/dist/dnd/index.d.ts.map +0 -1
- package/dist/dnd/types.d.ts +0 -66
- package/dist/dnd/types.d.ts.map +0 -1
- package/dist/dnd/utils.d.ts +0 -57
- package/dist/dnd/utils.d.ts.map +0 -1
- package/dist/focus/FocusScope.d.ts +0 -57
- package/dist/focus/FocusScope.d.ts.map +0 -1
- package/dist/focus/createAutoFocus.d.ts +0 -120
- package/dist/focus/createAutoFocus.d.ts.map +0 -1
- package/dist/focus/createFocusRestore.d.ts +0 -116
- package/dist/focus/createFocusRestore.d.ts.map +0 -1
- package/dist/focus/createVirtualFocus.d.ts +0 -170
- package/dist/focus/createVirtualFocus.d.ts.map +0 -1
- package/dist/focus/index.d.ts +0 -5
- package/dist/focus/index.d.ts.map +0 -1
- package/dist/form/createFormReset.d.ts +0 -27
- package/dist/form/createFormReset.d.ts.map +0 -1
- package/dist/form/createFormValidation.d.ts +0 -56
- package/dist/form/createFormValidation.d.ts.map +0 -1
- package/dist/form/index.d.ts +0 -3
- package/dist/form/index.d.ts.map +0 -1
- package/dist/grid/GridKeyboardDelegate.d.ts +0 -79
- package/dist/grid/GridKeyboardDelegate.d.ts.map +0 -1
- package/dist/grid/createGrid.d.ts +0 -24
- package/dist/grid/createGrid.d.ts.map +0 -1
- package/dist/grid/createGridCell.d.ts +0 -12
- package/dist/grid/createGridCell.d.ts.map +0 -1
- package/dist/grid/createGridRow.d.ts +0 -12
- package/dist/grid/createGridRow.d.ts.map +0 -1
- package/dist/grid/index.d.ts +0 -10
- package/dist/grid/index.d.ts.map +0 -1
- package/dist/grid/types.d.ts +0 -126
- package/dist/grid/types.d.ts.map +0 -1
- package/dist/gridlist/createGridList.d.ts +0 -28
- package/dist/gridlist/createGridList.d.ts.map +0 -1
- package/dist/gridlist/createGridListItem.d.ts +0 -12
- package/dist/gridlist/createGridListItem.d.ts.map +0 -1
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts +0 -12
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +0 -1
- package/dist/gridlist/index.d.ts +0 -8
- package/dist/gridlist/index.d.ts.map +0 -1
- package/dist/gridlist/types.d.ts +0 -75
- package/dist/gridlist/types.d.ts.map +0 -1
- package/dist/i18n/NumberFormatter.d.ts +0 -43
- package/dist/i18n/NumberFormatter.d.ts.map +0 -1
- package/dist/i18n/createCollator.d.ts +0 -41
- package/dist/i18n/createCollator.d.ts.map +0 -1
- package/dist/i18n/createDateFormatter.d.ts +0 -45
- package/dist/i18n/createDateFormatter.d.ts.map +0 -1
- package/dist/i18n/createFilter.d.ts +0 -57
- package/dist/i18n/createFilter.d.ts.map +0 -1
- package/dist/i18n/createNumberFormatter.d.ts +0 -43
- package/dist/i18n/createNumberFormatter.d.ts.map +0 -1
- package/dist/i18n/createStringFormatter.d.ts +0 -42
- package/dist/i18n/createStringFormatter.d.ts.map +0 -1
- package/dist/i18n/index.d.ts +0 -9
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/locale.d.ts +0 -66
- package/dist/i18n/locale.d.ts.map +0 -1
- package/dist/i18n/utils.d.ts +0 -17
- package/dist/i18n/utils.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/index.ssr.js.map +0 -7
- package/dist/interactions/FocusableProvider.d.ts +0 -26
- package/dist/interactions/FocusableProvider.d.ts.map +0 -1
- package/dist/interactions/PressEvent.d.ts +0 -73
- package/dist/interactions/PressEvent.d.ts.map +0 -1
- package/dist/interactions/createFocus.d.ts +0 -31
- package/dist/interactions/createFocus.d.ts.map +0 -1
- package/dist/interactions/createFocusRing.d.ts +0 -37
- package/dist/interactions/createFocusRing.d.ts.map +0 -1
- package/dist/interactions/createFocusWithin.d.ts +0 -27
- package/dist/interactions/createFocusWithin.d.ts.map +0 -1
- package/dist/interactions/createFocusable.d.ts +0 -65
- package/dist/interactions/createFocusable.d.ts.map +0 -1
- package/dist/interactions/createHover.d.ts +0 -43
- package/dist/interactions/createHover.d.ts.map +0 -1
- package/dist/interactions/createInteractionModality.d.ts +0 -73
- package/dist/interactions/createInteractionModality.d.ts.map +0 -1
- package/dist/interactions/createKeyboard.d.ts +0 -35
- package/dist/interactions/createKeyboard.d.ts.map +0 -1
- package/dist/interactions/createLongPress.d.ts +0 -63
- package/dist/interactions/createLongPress.d.ts.map +0 -1
- package/dist/interactions/createMove.d.ts +0 -40
- package/dist/interactions/createMove.d.ts.map +0 -1
- package/dist/interactions/createPress.d.ts +0 -55
- package/dist/interactions/createPress.d.ts.map +0 -1
- package/dist/interactions/index.d.ts +0 -13
- package/dist/interactions/index.d.ts.map +0 -1
- package/dist/label/createField.d.ts +0 -51
- package/dist/label/createField.d.ts.map +0 -1
- package/dist/label/createLabel.d.ts +0 -49
- package/dist/label/createLabel.d.ts.map +0 -1
- package/dist/label/createLabels.d.ts +0 -16
- package/dist/label/createLabels.d.ts.map +0 -1
- package/dist/label/index.d.ts +0 -6
- package/dist/label/index.d.ts.map +0 -1
- package/dist/landmark/createLandmark.d.ts +0 -79
- package/dist/landmark/createLandmark.d.ts.map +0 -1
- package/dist/landmark/index.d.ts +0 -2
- package/dist/landmark/index.d.ts.map +0 -1
- package/dist/link/createLink.d.ts +0 -65
- package/dist/link/createLink.d.ts.map +0 -1
- package/dist/link/index.d.ts +0 -2
- package/dist/link/index.d.ts.map +0 -1
- package/dist/listbox/createListBox.d.ts +0 -58
- package/dist/listbox/createListBox.d.ts.map +0 -1
- package/dist/listbox/createOption.d.ts +0 -42
- package/dist/listbox/createOption.d.ts.map +0 -1
- package/dist/listbox/index.d.ts +0 -3
- package/dist/listbox/index.d.ts.map +0 -1
- package/dist/live-announcer/announce.d.ts +0 -113
- package/dist/live-announcer/announce.d.ts.map +0 -1
- package/dist/live-announcer/index.d.ts +0 -2
- package/dist/live-announcer/index.d.ts.map +0 -1
- package/dist/menu/createMenu.d.ts +0 -57
- package/dist/menu/createMenu.d.ts.map +0 -1
- package/dist/menu/createMenuItem.d.ts +0 -42
- package/dist/menu/createMenuItem.d.ts.map +0 -1
- package/dist/menu/createMenuTrigger.d.ts +0 -29
- package/dist/menu/createMenuTrigger.d.ts.map +0 -1
- package/dist/menu/index.d.ts +0 -4
- package/dist/menu/index.d.ts.map +0 -1
- package/dist/meter/createMeter.d.ts +0 -44
- package/dist/meter/createMeter.d.ts.map +0 -1
- package/dist/meter/index.d.ts +0 -2
- package/dist/meter/index.d.ts.map +0 -1
- package/dist/numberfield/createNumberField.d.ts +0 -56
- package/dist/numberfield/createNumberField.d.ts.map +0 -1
- package/dist/numberfield/index.d.ts +0 -2
- package/dist/numberfield/index.d.ts.map +0 -1
- package/dist/overlays/ariaHideOutside.d.ts +0 -25
- package/dist/overlays/ariaHideOutside.d.ts.map +0 -1
- package/dist/overlays/createInteractOutside.d.ts +0 -20
- package/dist/overlays/createInteractOutside.d.ts.map +0 -1
- package/dist/overlays/createModal.d.ts +0 -70
- package/dist/overlays/createModal.d.ts.map +0 -1
- package/dist/overlays/createOverlay.d.ts +0 -43
- package/dist/overlays/createOverlay.d.ts.map +0 -1
- package/dist/overlays/createOverlayTrigger.d.ts +0 -30
- package/dist/overlays/createOverlayTrigger.d.ts.map +0 -1
- package/dist/overlays/createPreventScroll.d.ts +0 -15
- package/dist/overlays/createPreventScroll.d.ts.map +0 -1
- package/dist/overlays/index.d.ts +0 -7
- package/dist/overlays/index.d.ts.map +0 -1
- package/dist/popover/calculatePosition.d.ts +0 -67
- package/dist/popover/calculatePosition.d.ts.map +0 -1
- package/dist/popover/createOverlayPosition.d.ts +0 -109
- package/dist/popover/createOverlayPosition.d.ts.map +0 -1
- package/dist/popover/createPopover.d.ts +0 -88
- package/dist/popover/createPopover.d.ts.map +0 -1
- package/dist/popover/index.d.ts +0 -4
- package/dist/popover/index.d.ts.map +0 -1
- package/dist/progress/createProgressBar.d.ts +0 -47
- package/dist/progress/createProgressBar.d.ts.map +0 -1
- package/dist/progress/index.d.ts +0 -2
- package/dist/progress/index.d.ts.map +0 -1
- package/dist/radio/createRadio.d.ts +0 -68
- package/dist/radio/createRadio.d.ts.map +0 -1
- package/dist/radio/createRadioGroup.d.ts +0 -85
- package/dist/radio/createRadioGroup.d.ts.map +0 -1
- package/dist/radio/createRadioGroupState.d.ts +0 -77
- package/dist/radio/createRadioGroupState.d.ts.map +0 -1
- package/dist/radio/index.d.ts +0 -4
- package/dist/radio/index.d.ts.map +0 -1
- package/dist/searchfield/createSearchField.d.ts +0 -32
- package/dist/searchfield/createSearchField.d.ts.map +0 -1
- package/dist/searchfield/index.d.ts +0 -3
- package/dist/searchfield/index.d.ts.map +0 -1
- package/dist/select/createHiddenSelect.d.ts +0 -69
- package/dist/select/createHiddenSelect.d.ts.map +0 -1
- package/dist/select/createSelect.d.ts +0 -70
- package/dist/select/createSelect.d.ts.map +0 -1
- package/dist/select/index.d.ts +0 -3
- package/dist/select/index.d.ts.map +0 -1
- package/dist/selection/createTypeSelect.d.ts +0 -43
- package/dist/selection/createTypeSelect.d.ts.map +0 -1
- package/dist/selection/index.d.ts +0 -6
- package/dist/selection/index.d.ts.map +0 -1
- package/dist/separator/createSeparator.d.ts +0 -38
- package/dist/separator/createSeparator.d.ts.map +0 -1
- package/dist/separator/index.d.ts +0 -2
- package/dist/separator/index.d.ts.map +0 -1
- package/dist/slider/createSlider.d.ts +0 -43
- package/dist/slider/createSlider.d.ts.map +0 -1
- package/dist/slider/index.d.ts +0 -3
- package/dist/slider/index.d.ts.map +0 -1
- package/dist/ssr/index.d.ts +0 -221
- package/dist/ssr/index.d.ts.map +0 -1
- package/dist/switch/createSwitch.d.ts +0 -34
- package/dist/switch/createSwitch.d.ts.map +0 -1
- package/dist/switch/index.d.ts +0 -2
- package/dist/switch/index.d.ts.map +0 -1
- package/dist/table/createTable.d.ts +0 -24
- package/dist/table/createTable.d.ts.map +0 -1
- package/dist/table/createTableCell.d.ts +0 -12
- package/dist/table/createTableCell.d.ts.map +0 -1
- package/dist/table/createTableColumnHeader.d.ts +0 -12
- package/dist/table/createTableColumnHeader.d.ts.map +0 -1
- package/dist/table/createTableHeaderRow.d.ts +0 -12
- package/dist/table/createTableHeaderRow.d.ts.map +0 -1
- package/dist/table/createTableRow.d.ts +0 -12
- package/dist/table/createTableRow.d.ts.map +0 -1
- package/dist/table/createTableRowGroup.d.ts +0 -11
- package/dist/table/createTableRowGroup.d.ts.map +0 -1
- package/dist/table/createTableSelectAllCheckbox.d.ts +0 -12
- package/dist/table/createTableSelectAllCheckbox.d.ts.map +0 -1
- package/dist/table/createTableSelectionCheckbox.d.ts +0 -12
- package/dist/table/createTableSelectionCheckbox.d.ts.map +0 -1
- package/dist/table/index.d.ts +0 -14
- package/dist/table/index.d.ts.map +0 -1
- package/dist/table/types.d.ts +0 -150
- package/dist/table/types.d.ts.map +0 -1
- package/dist/tabs/createTabs.d.ts +0 -123
- package/dist/tabs/createTabs.d.ts.map +0 -1
- package/dist/tabs/index.d.ts +0 -2
- package/dist/tabs/index.d.ts.map +0 -1
- package/dist/tag/createTag.d.ts +0 -42
- package/dist/tag/createTag.d.ts.map +0 -1
- package/dist/tag/createTagGroup.d.ts +0 -54
- package/dist/tag/createTagGroup.d.ts.map +0 -1
- package/dist/tag/index.d.ts +0 -3
- package/dist/tag/index.d.ts.map +0 -1
- package/dist/textfield/createTextField.d.ts +0 -73
- package/dist/textfield/createTextField.d.ts.map +0 -1
- package/dist/textfield/index.d.ts +0 -2
- package/dist/textfield/index.d.ts.map +0 -1
- package/dist/toast/createToast.d.ts +0 -58
- package/dist/toast/createToast.d.ts.map +0 -1
- package/dist/toast/createToastRegion.d.ts +0 -49
- package/dist/toast/createToastRegion.d.ts.map +0 -1
- package/dist/toast/index.d.ts +0 -3
- package/dist/toast/index.d.ts.map +0 -1
- package/dist/toggle/createToggle.d.ts +0 -94
- package/dist/toggle/createToggle.d.ts.map +0 -1
- package/dist/toggle/createToggleState.d.ts +0 -34
- package/dist/toggle/createToggleState.d.ts.map +0 -1
- package/dist/toggle/index.d.ts +0 -5
- package/dist/toggle/index.d.ts.map +0 -1
- package/dist/toolbar/createToolbar.d.ts +0 -49
- package/dist/toolbar/createToolbar.d.ts.map +0 -1
- package/dist/toolbar/index.d.ts +0 -2
- package/dist/toolbar/index.d.ts.map +0 -1
- package/dist/tooltip/createTooltip.d.ts +0 -48
- package/dist/tooltip/createTooltip.d.ts.map +0 -1
- package/dist/tooltip/createTooltipTrigger.d.ts +0 -64
- package/dist/tooltip/createTooltipTrigger.d.ts.map +0 -1
- package/dist/tooltip/index.d.ts +0 -3
- package/dist/tooltip/index.d.ts.map +0 -1
- package/dist/tree/createTree.d.ts +0 -28
- package/dist/tree/createTree.d.ts.map +0 -1
- package/dist/tree/createTreeItem.d.ts +0 -12
- package/dist/tree/createTreeItem.d.ts.map +0 -1
- package/dist/tree/createTreeSelectionCheckbox.d.ts +0 -12
- package/dist/tree/createTreeSelectionCheckbox.d.ts.map +0 -1
- package/dist/tree/index.d.ts +0 -8
- package/dist/tree/index.d.ts.map +0 -1
- package/dist/tree/types.d.ts +0 -81
- package/dist/tree/types.d.ts.map +0 -1
- package/dist/utils/createDescription.d.ts +0 -56
- package/dist/utils/createDescription.d.ts.map +0 -1
- package/dist/utils/dom.d.ts +0 -68
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/env.d.ts +0 -18
- package/dist/utils/env.d.ts.map +0 -1
- package/dist/utils/events.d.ts +0 -29
- package/dist/utils/events.d.ts.map +0 -1
- package/dist/utils/filterDOMProps.d.ts +0 -29
- package/dist/utils/filterDOMProps.d.ts.map +0 -1
- package/dist/utils/focus.d.ts +0 -20
- package/dist/utils/focus.d.ts.map +0 -1
- package/dist/utils/geometry.d.ts +0 -40
- package/dist/utils/geometry.d.ts.map +0 -1
- package/dist/utils/globalListeners.d.ts +0 -36
- package/dist/utils/globalListeners.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -13
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/mergeProps.d.ts +0 -11
- package/dist/utils/mergeProps.d.ts.map +0 -1
- package/dist/utils/platform.d.ts +0 -14
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/reactivity.d.ts +0 -28
- package/dist/utils/reactivity.d.ts.map +0 -1
- package/dist/utils/textSelection.d.ts +0 -19
- package/dist/utils/textSelection.d.ts.map +0 -1
- package/dist/visually-hidden/createVisuallyHidden.d.ts +0 -60
- package/dist/visually-hidden/createVisuallyHidden.d.ts.map +0 -1
- package/dist/visually-hidden/index.d.ts +0 -2
- package/dist/visually-hidden/index.d.ts.map +0 -1
- package/src/autocomplete/createAutocomplete.ts +0 -341
- package/src/autocomplete/index.ts +0 -9
- package/src/breadcrumbs/createBreadcrumbs.ts +0 -196
- package/src/breadcrumbs/index.ts +0 -8
- package/src/button/createButton.ts +0 -142
- package/src/button/createToggleButton.ts +0 -101
- package/src/button/index.ts +0 -4
- package/src/button/types.ts +0 -78
- package/src/calendar/createCalendar.ts +0 -138
- package/src/calendar/createCalendarCell.ts +0 -187
- package/src/calendar/createCalendarGrid.ts +0 -140
- package/src/calendar/createRangeCalendar.ts +0 -136
- package/src/calendar/createRangeCalendarCell.ts +0 -186
- package/src/calendar/index.ts +0 -34
- package/src/checkbox/createCheckbox.ts +0 -135
- package/src/checkbox/createCheckboxGroup.ts +0 -137
- package/src/checkbox/createCheckboxGroupItem.ts +0 -117
- package/src/checkbox/createCheckboxGroupState.ts +0 -193
- package/src/checkbox/index.ts +0 -13
- package/src/color/createColorArea.ts +0 -314
- package/src/color/createColorField.ts +0 -137
- package/src/color/createColorSlider.ts +0 -197
- package/src/color/createColorSwatch.ts +0 -40
- package/src/color/createColorWheel.ts +0 -208
- package/src/color/index.ts +0 -24
- package/src/color/types.ts +0 -116
- package/src/combobox/createComboBox.ts +0 -647
- package/src/combobox/index.ts +0 -6
- package/src/combobox/intl/en-US.json +0 -7
- package/src/combobox/intl/es-ES.json +0 -7
- package/src/combobox/intl/index.ts +0 -23
- package/src/datepicker/createDateField.ts +0 -154
- package/src/datepicker/createDatePicker.ts +0 -206
- package/src/datepicker/createDateSegment.ts +0 -229
- package/src/datepicker/createTimeField.ts +0 -154
- package/src/datepicker/index.ts +0 -28
- package/src/dialog/createDialog.ts +0 -120
- package/src/dialog/index.ts +0 -2
- package/src/dialog/types.ts +0 -19
- package/src/disclosure/createDisclosure.ts +0 -131
- package/src/disclosure/createDisclosureGroup.ts +0 -62
- package/src/disclosure/index.ts +0 -11
- package/src/dnd/createDrag.ts +0 -209
- package/src/dnd/createDraggableCollection.ts +0 -63
- package/src/dnd/createDraggableItem.ts +0 -243
- package/src/dnd/createDrop.ts +0 -321
- package/src/dnd/createDroppableCollection.ts +0 -293
- package/src/dnd/createDroppableItem.ts +0 -213
- package/src/dnd/index.ts +0 -47
- package/src/dnd/types.ts +0 -89
- package/src/dnd/utils.ts +0 -294
- package/src/focus/FocusScope.tsx +0 -408
- package/src/focus/createAutoFocus.ts +0 -321
- package/src/focus/createFocusRestore.ts +0 -313
- package/src/focus/createVirtualFocus.ts +0 -396
- package/src/focus/index.ts +0 -35
- package/src/form/createFormReset.ts +0 -51
- package/src/form/createFormValidation.ts +0 -224
- package/src/form/index.ts +0 -11
- package/src/grid/GridKeyboardDelegate.ts +0 -429
- package/src/grid/createGrid.ts +0 -261
- package/src/grid/createGridCell.ts +0 -182
- package/src/grid/createGridRow.ts +0 -153
- package/src/grid/index.ts +0 -18
- package/src/grid/types.ts +0 -133
- package/src/gridlist/createGridList.ts +0 -185
- package/src/gridlist/createGridListItem.ts +0 -180
- package/src/gridlist/createGridListSelectionCheckbox.ts +0 -59
- package/src/gridlist/index.ts +0 -16
- package/src/gridlist/types.ts +0 -81
- package/src/i18n/NumberFormatter.ts +0 -266
- package/src/i18n/createCollator.ts +0 -79
- package/src/i18n/createDateFormatter.ts +0 -83
- package/src/i18n/createFilter.ts +0 -131
- package/src/i18n/createNumberFormatter.ts +0 -52
- package/src/i18n/createStringFormatter.ts +0 -87
- package/src/i18n/index.ts +0 -40
- package/src/i18n/locale.tsx +0 -188
- package/src/i18n/utils.ts +0 -99
- package/src/index.ts +0 -670
- package/src/interactions/FocusableProvider.tsx +0 -44
- package/src/interactions/PressEvent.ts +0 -124
- package/src/interactions/createFocus.ts +0 -163
- package/src/interactions/createFocusRing.ts +0 -89
- package/src/interactions/createFocusWithin.ts +0 -206
- package/src/interactions/createFocusable.ts +0 -168
- package/src/interactions/createHover.ts +0 -254
- package/src/interactions/createInteractionModality.ts +0 -424
- package/src/interactions/createKeyboard.ts +0 -82
- package/src/interactions/createLongPress.ts +0 -174
- package/src/interactions/createMove.ts +0 -289
- package/src/interactions/createPress.ts +0 -834
- package/src/interactions/index.ts +0 -78
- package/src/label/createField.ts +0 -145
- package/src/label/createLabel.ts +0 -117
- package/src/label/createLabels.ts +0 -50
- package/src/label/index.ts +0 -19
- package/src/landmark/createLandmark.ts +0 -377
- package/src/landmark/index.ts +0 -8
- package/src/link/createLink.ts +0 -182
- package/src/link/index.ts +0 -1
- package/src/listbox/createListBox.ts +0 -269
- package/src/listbox/createOption.ts +0 -151
- package/src/listbox/index.ts +0 -12
- package/src/live-announcer/announce.ts +0 -322
- package/src/live-announcer/index.ts +0 -9
- package/src/menu/createMenu.ts +0 -396
- package/src/menu/createMenuItem.ts +0 -149
- package/src/menu/createMenuTrigger.ts +0 -88
- package/src/menu/index.ts +0 -18
- package/src/meter/createMeter.ts +0 -75
- package/src/meter/index.ts +0 -1
- package/src/numberfield/createNumberField.ts +0 -268
- package/src/numberfield/index.ts +0 -5
- package/src/overlays/ariaHideOutside.ts +0 -219
- package/src/overlays/createInteractOutside.ts +0 -149
- package/src/overlays/createModal.tsx +0 -202
- package/src/overlays/createOverlay.ts +0 -155
- package/src/overlays/createOverlayTrigger.ts +0 -85
- package/src/overlays/createPreventScroll.ts +0 -266
- package/src/overlays/index.ts +0 -44
- package/src/popover/calculatePosition.ts +0 -766
- package/src/popover/createOverlayPosition.ts +0 -356
- package/src/popover/createPopover.ts +0 -170
- package/src/popover/index.ts +0 -24
- package/src/progress/createProgressBar.ts +0 -128
- package/src/progress/index.ts +0 -5
- package/src/radio/createRadio.ts +0 -287
- package/src/radio/createRadioGroup.ts +0 -189
- package/src/radio/createRadioGroupState.ts +0 -201
- package/src/radio/index.ts +0 -23
- package/src/searchfield/createSearchField.ts +0 -186
- package/src/searchfield/index.ts +0 -2
- package/src/select/createHiddenSelect.tsx +0 -236
- package/src/select/createSelect.ts +0 -395
- package/src/select/index.ts +0 -14
- package/src/selection/createTypeSelect.ts +0 -201
- package/src/selection/index.ts +0 -6
- package/src/separator/createSeparator.ts +0 -82
- package/src/separator/index.ts +0 -6
- package/src/slider/createSlider.ts +0 -349
- package/src/slider/index.ts +0 -2
- package/src/ssr/index.tsx +0 -370
- package/src/switch/createSwitch.ts +0 -70
- package/src/switch/index.ts +0 -1
- package/src/table/createTable.ts +0 -526
- package/src/table/createTableCell.ts +0 -147
- package/src/table/createTableColumnHeader.ts +0 -115
- package/src/table/createTableHeaderRow.ts +0 -40
- package/src/table/createTableRow.ts +0 -155
- package/src/table/createTableRowGroup.ts +0 -32
- package/src/table/createTableSelectAllCheckbox.ts +0 -73
- package/src/table/createTableSelectionCheckbox.ts +0 -59
- package/src/table/index.ts +0 -30
- package/src/table/types.ts +0 -165
- package/src/tabs/createTabs.ts +0 -472
- package/src/tabs/index.ts +0 -14
- package/src/tag/createTag.ts +0 -194
- package/src/tag/createTagGroup.ts +0 -154
- package/src/tag/index.ts +0 -12
- package/src/textfield/createTextField.ts +0 -198
- package/src/textfield/index.ts +0 -5
- package/src/toast/createToast.ts +0 -118
- package/src/toast/createToastRegion.ts +0 -100
- package/src/toast/index.ts +0 -11
- package/src/toggle/createToggle.ts +0 -223
- package/src/toggle/createToggleState.ts +0 -94
- package/src/toggle/index.ts +0 -7
- package/src/toolbar/createToolbar.ts +0 -368
- package/src/toolbar/index.ts +0 -6
- package/src/tooltip/createTooltip.ts +0 -79
- package/src/tooltip/createTooltipTrigger.ts +0 -222
- package/src/tooltip/index.ts +0 -6
- package/src/tree/createTree.ts +0 -246
- package/src/tree/createTreeItem.ts +0 -233
- package/src/tree/createTreeSelectionCheckbox.ts +0 -68
- package/src/tree/index.ts +0 -16
- package/src/tree/types.ts +0 -87
- package/src/utils/createDescription.ts +0 -137
- package/src/utils/dom.ts +0 -327
- package/src/utils/env.ts +0 -54
- package/src/utils/events.ts +0 -106
- package/src/utils/filterDOMProps.ts +0 -116
- package/src/utils/focus.ts +0 -151
- package/src/utils/geometry.ts +0 -115
- package/src/utils/globalListeners.ts +0 -142
- package/src/utils/index.ts +0 -80
- package/src/utils/mergeProps.ts +0 -52
- package/src/utils/platform.ts +0 -52
- package/src/utils/reactivity.ts +0 -36
- package/src/utils/textSelection.ts +0 -114
- package/src/visually-hidden/createVisuallyHidden.ts +0 -124
- package/src/visually-hidden/index.ts +0 -6
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FocusScope component for managing focus containment, restoration, and auto-focus.
|
|
3
|
-
* Based on @react-aria/focus FocusScope.
|
|
4
|
-
*/
|
|
5
|
-
import { type JSX, type ParentComponent } from 'solid-js';
|
|
6
|
-
export interface FocusScopeProps {
|
|
7
|
-
/** The contents of the focus scope. */
|
|
8
|
-
children: JSX.Element;
|
|
9
|
-
/**
|
|
10
|
-
* Whether to contain focus inside the scope, so users cannot
|
|
11
|
-
* move focus outside, for example in a modal dialog.
|
|
12
|
-
*/
|
|
13
|
-
contain?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Whether to restore focus back to the element that was focused
|
|
16
|
-
* when the focus scope mounted, after the focus scope unmounts.
|
|
17
|
-
*/
|
|
18
|
-
restoreFocus?: boolean;
|
|
19
|
-
/** Whether to auto focus the first focusable element in the focus scope on mount. */
|
|
20
|
-
autoFocus?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface FocusManagerOptions {
|
|
23
|
-
/** The element to start searching from. The currently focused element by default. */
|
|
24
|
-
from?: Element;
|
|
25
|
-
/** Whether to only include tabbable elements, or all focusable elements. */
|
|
26
|
-
tabbable?: boolean;
|
|
27
|
-
/** Whether focus should wrap around when it reaches the end of the scope. */
|
|
28
|
-
wrap?: boolean;
|
|
29
|
-
/** A callback that determines whether the given element is focused. */
|
|
30
|
-
accept?: (node: Element) => boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface FocusManager {
|
|
33
|
-
/** Moves focus to the next focusable or tabbable element in the focus scope. */
|
|
34
|
-
focusNext(opts?: FocusManagerOptions): HTMLElement | null;
|
|
35
|
-
/** Moves focus to the previous focusable or tabbable element in the focus scope. */
|
|
36
|
-
focusPrevious(opts?: FocusManagerOptions): HTMLElement | null;
|
|
37
|
-
/** Moves focus to the first focusable or tabbable element in the focus scope. */
|
|
38
|
-
focusFirst(opts?: FocusManagerOptions): HTMLElement | null;
|
|
39
|
-
/** Moves focus to the last focusable or tabbable element in the focus scope. */
|
|
40
|
-
focusLast(opts?: FocusManagerOptions): HTMLElement | null;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Returns a FocusManager interface for the parent FocusScope.
|
|
44
|
-
* A FocusManager can be used to programmatically move focus within
|
|
45
|
-
* a FocusScope, e.g. in response to user events like keyboard navigation.
|
|
46
|
-
*/
|
|
47
|
-
export declare function useFocusManager(): FocusManager | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* A FocusScope manages focus for its descendants. It supports containing focus inside
|
|
50
|
-
* the scope, restoring focus to the previously focused element on unmount, and auto
|
|
51
|
-
* focusing children on mount. It also acts as a container for a programmatic focus
|
|
52
|
-
* management interface that can be used to move focus forward and back in response
|
|
53
|
-
* to user events.
|
|
54
|
-
*/
|
|
55
|
-
export declare const FocusScope: ParentComponent<FocusScopeProps>;
|
|
56
|
-
export default FocusScope;
|
|
57
|
-
//# sourceMappingURL=FocusScope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FocusScope.d.ts","sourceRoot":"","sources":["../../src/focus/FocusScope.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKL,KAAK,GAAG,EAER,KAAK,eAAe,EAGrB,MAAM,UAAU,CAAA;AASjB,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IACzD,oFAAoF;IACpF,aAAa,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IAC7D,iFAAiF;IACjF,UAAU,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IAC1D,gFAAgF;IAChF,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;CAC1D;AAaD;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAE1D;AAwED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,eAAe,CAqPvD,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auto-focus management for solidaria
|
|
3
|
-
*
|
|
4
|
-
* Provides priority-based auto-focus with deferred execution
|
|
5
|
-
* and conflict resolution for multiple auto-focus elements.
|
|
6
|
-
*/
|
|
7
|
-
export interface AutoFocusOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Whether auto-focus is enabled.
|
|
10
|
-
* @default true
|
|
11
|
-
*/
|
|
12
|
-
isEnabled?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Priority level (higher = more important).
|
|
15
|
-
* When multiple elements request auto-focus, the highest priority wins.
|
|
16
|
-
* @default 0
|
|
17
|
-
*/
|
|
18
|
-
priority?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Delay in milliseconds before focusing.
|
|
21
|
-
* Useful for animations or transitions.
|
|
22
|
-
* @default 0
|
|
23
|
-
*/
|
|
24
|
-
delay?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Whether to focus even if another element is already focused.
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
force?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Whether to prevent scrolling when focusing.
|
|
32
|
-
* @default true
|
|
33
|
-
*/
|
|
34
|
-
preventScroll?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Callback when focus is applied.
|
|
37
|
-
*/
|
|
38
|
-
onFocus?: (element: HTMLElement) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Callback when focus is skipped (due to lower priority or other reasons).
|
|
41
|
-
*/
|
|
42
|
-
onSkip?: () => void;
|
|
43
|
-
}
|
|
44
|
-
export interface AutoFocusResult {
|
|
45
|
-
/**
|
|
46
|
-
* Manually trigger the auto-focus.
|
|
47
|
-
*/
|
|
48
|
-
focus: () => void;
|
|
49
|
-
/**
|
|
50
|
-
* Cancel any pending auto-focus.
|
|
51
|
-
*/
|
|
52
|
-
cancel: () => void;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Creates auto-focus behavior for an element.
|
|
56
|
-
*
|
|
57
|
-
* This hook registers the element for auto-focus when mounted. If multiple
|
|
58
|
-
* elements request auto-focus, the one with the highest priority wins.
|
|
59
|
-
*
|
|
60
|
-
* @param ref - Accessor for the element to focus
|
|
61
|
-
* @param options - Auto-focus options
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```tsx
|
|
65
|
-
* function Dialog(props) {
|
|
66
|
-
* let contentRef: HTMLDivElement | undefined;
|
|
67
|
-
*
|
|
68
|
-
* createAutoFocus(() => contentRef, {
|
|
69
|
-
* priority: 10, // High priority for dialogs
|
|
70
|
-
* onFocus: () => console.log('Dialog focused'),
|
|
71
|
-
* });
|
|
72
|
-
*
|
|
73
|
-
* return (
|
|
74
|
-
* <div ref={contentRef} tabIndex={-1}>
|
|
75
|
-
* {props.children}
|
|
76
|
-
* </div>
|
|
77
|
-
* );
|
|
78
|
-
* }
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```tsx
|
|
83
|
-
* // With delay for animations
|
|
84
|
-
* function AnimatedPanel() {
|
|
85
|
-
* let panelRef: HTMLDivElement | undefined;
|
|
86
|
-
*
|
|
87
|
-
* createAutoFocus(() => panelRef, {
|
|
88
|
-
* delay: 300, // Wait for animation
|
|
89
|
-
* });
|
|
90
|
-
*
|
|
91
|
-
* return <div ref={panelRef} class="animated-panel">...</div>;
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```tsx
|
|
97
|
-
* // Conditional auto-focus
|
|
98
|
-
* function Input(props) {
|
|
99
|
-
* let inputRef: HTMLInputElement | undefined;
|
|
100
|
-
*
|
|
101
|
-
* createAutoFocus(() => inputRef, {
|
|
102
|
-
* isEnabled: props.autoFocus,
|
|
103
|
-
* });
|
|
104
|
-
*
|
|
105
|
-
* return <input ref={inputRef} />;
|
|
106
|
-
* }
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
export declare function createAutoFocus(ref: () => HTMLElement | null | undefined, options?: AutoFocusOptions): AutoFocusResult;
|
|
110
|
-
/**
|
|
111
|
-
* Clears all pending auto-focus requests.
|
|
112
|
-
* Useful for testing or when navigating away.
|
|
113
|
-
*/
|
|
114
|
-
export declare function clearAutoFocusQueue(): void;
|
|
115
|
-
/**
|
|
116
|
-
* Gets the current auto-focus queue length.
|
|
117
|
-
* Useful for debugging.
|
|
118
|
-
*/
|
|
119
|
-
export declare function getAutoFocusQueueLength(): number;
|
|
120
|
-
//# sourceMappingURL=createAutoFocus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createAutoFocus.d.ts","sourceRoot":"","sources":["../../src/focus/createAutoFocus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAgHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,EACzC,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAgEjB;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Focus restoration utilities for solidaria
|
|
3
|
-
*
|
|
4
|
-
* Provides enhanced focus restoration with retry logic, cross-scope tracking,
|
|
5
|
-
* and safe restoration patterns.
|
|
6
|
-
*/
|
|
7
|
-
export interface FocusRestoreOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Whether to restore focus when the component unmounts.
|
|
10
|
-
* @default true
|
|
11
|
-
*/
|
|
12
|
-
restoreOnUnmount?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Maximum number of retries if the element is not in the DOM.
|
|
15
|
-
* @default 3
|
|
16
|
-
*/
|
|
17
|
-
maxRetries?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Delay between retries in milliseconds.
|
|
20
|
-
* @default 50
|
|
21
|
-
*/
|
|
22
|
-
retryDelay?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Callback when focus is successfully restored.
|
|
25
|
-
*/
|
|
26
|
-
onRestore?: (element: HTMLElement) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Callback when focus restoration fails.
|
|
29
|
-
*/
|
|
30
|
-
onRestoreFailed?: () => void;
|
|
31
|
-
/**
|
|
32
|
-
* Whether to prevent scrolling when restoring focus.
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
preventScroll?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface FocusRestoreResult {
|
|
38
|
-
/**
|
|
39
|
-
* Manually restore focus to the saved element.
|
|
40
|
-
*/
|
|
41
|
-
restore: () => boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Get the saved element (if any).
|
|
44
|
-
*/
|
|
45
|
-
getSavedElement: () => HTMLElement | null;
|
|
46
|
-
/**
|
|
47
|
-
* Save the currently focused element.
|
|
48
|
-
*/
|
|
49
|
-
saveCurrentFocus: () => void;
|
|
50
|
-
/**
|
|
51
|
-
* Clear the saved element without restoring.
|
|
52
|
-
*/
|
|
53
|
-
clear: () => void;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Push an element onto the focus stack.
|
|
57
|
-
*/
|
|
58
|
-
export declare function pushFocusStack(element: HTMLElement): void;
|
|
59
|
-
/**
|
|
60
|
-
* Pop the last element from the focus stack.
|
|
61
|
-
*/
|
|
62
|
-
export declare function popFocusStack(): HTMLElement | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* Get the current focus stack length.
|
|
65
|
-
*/
|
|
66
|
-
export declare function getFocusStackLength(): number;
|
|
67
|
-
/**
|
|
68
|
-
* Clear the entire focus stack.
|
|
69
|
-
*/
|
|
70
|
-
export declare function clearFocusStack(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Creates a focus restoration manager.
|
|
73
|
-
*
|
|
74
|
-
* This hook saves the currently focused element when mounted and provides
|
|
75
|
-
* methods to restore focus later, with retry logic for reliability.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```tsx
|
|
79
|
-
* function Modal(props) {
|
|
80
|
-
* const focusRestore = createFocusRestore({
|
|
81
|
-
* restoreOnUnmount: true,
|
|
82
|
-
* onRestore: () => console.log('Focus restored'),
|
|
83
|
-
* });
|
|
84
|
-
*
|
|
85
|
-
* return (
|
|
86
|
-
* <div role="dialog">
|
|
87
|
-
* {props.children}
|
|
88
|
-
* <button onClick={() => focusRestore.restore()}>
|
|
89
|
-
* Close
|
|
90
|
-
* </button>
|
|
91
|
-
* </div>
|
|
92
|
-
* );
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```tsx
|
|
98
|
-
* // Manual focus management
|
|
99
|
-
* function Dropdown() {
|
|
100
|
-
* const focusRestore = createFocusRestore({ restoreOnUnmount: false });
|
|
101
|
-
*
|
|
102
|
-
* const onOpen = () => {
|
|
103
|
-
* focusRestore.saveCurrentFocus();
|
|
104
|
-
* // Focus dropdown content
|
|
105
|
-
* };
|
|
106
|
-
*
|
|
107
|
-
* const onClose = () => {
|
|
108
|
-
* focusRestore.restore();
|
|
109
|
-
* };
|
|
110
|
-
*
|
|
111
|
-
* return <div>...</div>;
|
|
112
|
-
* }
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
export declare function createFocusRestore(options?: FocusRestoreOptions): FocusRestoreResult;
|
|
116
|
-
//# sourceMappingURL=createFocusRestore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFocusRestore.d.ts","sourceRoot":"","sources":["../../src/focus/createFocusRestore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AASD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,WAAW,GAAG,SAAS,CAEvD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAuED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CAgGpB"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Virtual focus management for solidaria
|
|
3
|
-
*
|
|
4
|
-
* Provides virtual focus for large collections where tracking DOM focus
|
|
5
|
-
* on every item is impractical. Instead, a single element receives real
|
|
6
|
-
* focus while aria-activedescendant indicates the virtually focused item.
|
|
7
|
-
*
|
|
8
|
-
* This is commonly used in:
|
|
9
|
-
* - Virtualized lists (where not all items are in the DOM)
|
|
10
|
-
* - Large trees
|
|
11
|
-
* - Autocomplete/combobox suggestions
|
|
12
|
-
* - Grid/table navigation
|
|
13
|
-
*/
|
|
14
|
-
import { type Accessor } from 'solid-js';
|
|
15
|
-
export interface VirtualFocusOptions<T> {
|
|
16
|
-
/**
|
|
17
|
-
* The items in the collection.
|
|
18
|
-
*/
|
|
19
|
-
items: Accessor<T[]>;
|
|
20
|
-
/**
|
|
21
|
-
* Function to get a unique key for each item.
|
|
22
|
-
*/
|
|
23
|
-
getKey: (item: T) => string;
|
|
24
|
-
/**
|
|
25
|
-
* Function to check if an item is disabled.
|
|
26
|
-
*/
|
|
27
|
-
isDisabled?: (item: T) => boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Initial focused key.
|
|
30
|
-
*/
|
|
31
|
-
defaultFocusedKey?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Controlled focused key.
|
|
34
|
-
*/
|
|
35
|
-
focusedKey?: Accessor<string | null>;
|
|
36
|
-
/**
|
|
37
|
-
* Callback when focused key changes.
|
|
38
|
-
*/
|
|
39
|
-
onFocusChange?: (key: string | null) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to wrap focus at the edges.
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
wrap?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether to loop through disabled items.
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
|
-
skipDisabled?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Orientation for keyboard navigation.
|
|
52
|
-
* @default 'vertical'
|
|
53
|
-
*/
|
|
54
|
-
orientation?: 'horizontal' | 'vertical' | 'both';
|
|
55
|
-
}
|
|
56
|
-
export interface VirtualFocusResult<T> {
|
|
57
|
-
/**
|
|
58
|
-
* The currently focused key.
|
|
59
|
-
*/
|
|
60
|
-
focusedKey: Accessor<string | null>;
|
|
61
|
-
/**
|
|
62
|
-
* The currently focused item (if any).
|
|
63
|
-
*/
|
|
64
|
-
focusedItem: Accessor<T | null>;
|
|
65
|
-
/**
|
|
66
|
-
* Set the focused key.
|
|
67
|
-
*/
|
|
68
|
-
setFocusedKey: (key: string | null) => void;
|
|
69
|
-
/**
|
|
70
|
-
* Move focus to the next item.
|
|
71
|
-
*/
|
|
72
|
-
focusNext: () => void;
|
|
73
|
-
/**
|
|
74
|
-
* Move focus to the previous item.
|
|
75
|
-
*/
|
|
76
|
-
focusPrevious: () => void;
|
|
77
|
-
/**
|
|
78
|
-
* Move focus to the first item.
|
|
79
|
-
*/
|
|
80
|
-
focusFirst: () => void;
|
|
81
|
-
/**
|
|
82
|
-
* Move focus to the last item.
|
|
83
|
-
*/
|
|
84
|
-
focusLast: () => void;
|
|
85
|
-
/**
|
|
86
|
-
* Move focus by a page (for large lists).
|
|
87
|
-
*/
|
|
88
|
-
focusPageDown: (pageSize?: number) => void;
|
|
89
|
-
/**
|
|
90
|
-
* Move focus up by a page (for large lists).
|
|
91
|
-
*/
|
|
92
|
-
focusPageUp: (pageSize?: number) => void;
|
|
93
|
-
/**
|
|
94
|
-
* Check if a key is the currently focused key.
|
|
95
|
-
*/
|
|
96
|
-
isFocused: (key: string) => boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Props to spread on the container element.
|
|
99
|
-
*/
|
|
100
|
-
containerProps: {
|
|
101
|
-
'aria-activedescendant': Accessor<string | undefined>;
|
|
102
|
-
onKeyDown: (e: KeyboardEvent) => void;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Get props for an item element.
|
|
106
|
-
*/
|
|
107
|
-
getItemProps: (key: string) => {
|
|
108
|
-
id: string;
|
|
109
|
-
'aria-selected'?: boolean;
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Creates virtual focus management for a collection.
|
|
114
|
-
*
|
|
115
|
-
* Virtual focus uses aria-activedescendant to indicate which item is
|
|
116
|
-
* "focused" while keeping real DOM focus on a container element. This
|
|
117
|
-
* is more performant for large collections and required for virtualized
|
|
118
|
-
* lists where items may not be in the DOM.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```tsx
|
|
122
|
-
* function Listbox(props) {
|
|
123
|
-
* const virtualFocus = createVirtualFocus({
|
|
124
|
-
* items: () => props.items,
|
|
125
|
-
* getKey: (item) => item.id,
|
|
126
|
-
* isDisabled: (item) => item.disabled,
|
|
127
|
-
* });
|
|
128
|
-
*
|
|
129
|
-
* return (
|
|
130
|
-
* <ul
|
|
131
|
-
* role="listbox"
|
|
132
|
-
* tabIndex={0}
|
|
133
|
-
* aria-activedescendant={virtualFocus.containerProps['aria-activedescendant']()}
|
|
134
|
-
* onKeyDown={virtualFocus.containerProps.onKeyDown}
|
|
135
|
-
* >
|
|
136
|
-
* <For each={props.items}>
|
|
137
|
-
* {(item) => (
|
|
138
|
-
* <li
|
|
139
|
-
* {...virtualFocus.getItemProps(item.id)}
|
|
140
|
-
* role="option"
|
|
141
|
-
* aria-selected={virtualFocus.isFocused(item.id)}
|
|
142
|
-
* >
|
|
143
|
-
* {item.name}
|
|
144
|
-
* </li>
|
|
145
|
-
* )}
|
|
146
|
-
* </For>
|
|
147
|
-
* </ul>
|
|
148
|
-
* );
|
|
149
|
-
* }
|
|
150
|
-
* ```
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```tsx
|
|
154
|
-
* // With controlled focus
|
|
155
|
-
* function ControlledListbox() {
|
|
156
|
-
* const [focusedKey, setFocusedKey] = createSignal<string | null>(null);
|
|
157
|
-
*
|
|
158
|
-
* const virtualFocus = createVirtualFocus({
|
|
159
|
-
* items: () => items,
|
|
160
|
-
* getKey: (item) => item.id,
|
|
161
|
-
* focusedKey: focusedKey,
|
|
162
|
-
* onFocusChange: setFocusedKey,
|
|
163
|
-
* });
|
|
164
|
-
*
|
|
165
|
-
* return <ul>...</ul>;
|
|
166
|
-
* }
|
|
167
|
-
* ```
|
|
168
|
-
*/
|
|
169
|
-
export declare function createVirtualFocus<T>(options: VirtualFocusOptions<T>): VirtualFocusResult<T>;
|
|
170
|
-
//# sourceMappingURL=createVirtualFocus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createVirtualFocus.d.ts","sourceRoot":"","sources":["../../src/focus/createVirtualFocus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,UAAU,CAAC;AAOhF,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAClC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAChC;;OAEG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC;;OAEG;IACH,cAAc,EAAE;QACd,uBAAuB,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QACtD,SAAS,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;KACvC,CAAC;IACF;;OAEG;IACH,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK;QAC7B,EAAE,EAAE,MAAM,CAAC;QACX,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC9B,kBAAkB,CAAC,CAAC,CAAC,CA8MvB"}
|
package/dist/focus/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { FocusScope, useFocusManager, type FocusScopeProps, type FocusManager, type FocusManagerOptions, } from './FocusScope';
|
|
2
|
-
export { createFocusRestore, pushFocusStack, popFocusStack, getFocusStackLength, clearFocusStack, type FocusRestoreOptions, type FocusRestoreResult, } from './createFocusRestore';
|
|
3
|
-
export { createVirtualFocus, type VirtualFocusOptions, type VirtualFocusResult, } from './createVirtualFocus';
|
|
4
|
-
export { createAutoFocus, clearAutoFocusQueue, getAutoFocusQueueLength, type AutoFocusOptions, type AutoFocusResult, } from './createAutoFocus';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/focus/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* createFormReset - Handles form reset events for form fields.
|
|
3
|
-
*
|
|
4
|
-
* Resets the field value to its default when the containing form is reset.
|
|
5
|
-
* Port of @react-aria/utils useFormReset.
|
|
6
|
-
*/
|
|
7
|
-
import { type Accessor } from 'solid-js';
|
|
8
|
-
export interface FormResetOptions<T> {
|
|
9
|
-
/** The default value to reset to. */
|
|
10
|
-
defaultValue: T;
|
|
11
|
-
/** Function to set the current value. */
|
|
12
|
-
onReset: (value: T) => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Listens for form reset events and resets the field value to its default.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* createFormReset(
|
|
20
|
-
* () => inputRef,
|
|
21
|
-
* { label: 'Default' },
|
|
22
|
-
* (value) => state.setSelectedKey(value.key)
|
|
23
|
-
* );
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare function createFormReset<T>(ref: Accessor<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | undefined>, defaultValue: T, onReset: (value: T) => void): void;
|
|
27
|
-
//# sourceMappingURL=createFormReset.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFormReset.d.ts","sourceRoot":"","sources":["../../src/form/createFormReset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,qCAAqC;IACrC,YAAY,EAAE,CAAC,CAAC;IAChB,yCAAyC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,QAAQ,CAAC,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,SAAS,CAAC,EACrF,YAAY,EAAE,CAAC,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAC1B,IAAI,CAkBN"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* createFormValidation hook for solidaria
|
|
3
|
-
*
|
|
4
|
-
* Connects form validation state to native HTML form validation.
|
|
5
|
-
* Handles the invalid event, form reset, and focus management.
|
|
6
|
-
*
|
|
7
|
-
* Port of react-aria's useFormValidation.
|
|
8
|
-
*/
|
|
9
|
-
import { type Accessor } from 'solid-js';
|
|
10
|
-
import { type FormValidationState } from '@proyecto-viviana/solid-stately';
|
|
11
|
-
export type ValidatableElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
|
|
12
|
-
export type ValidationBehavior = 'aria' | 'native';
|
|
13
|
-
export interface FormValidationProps {
|
|
14
|
-
/** Validation behavior: 'aria' for realtime, 'native' for on submit. */
|
|
15
|
-
validationBehavior?: ValidationBehavior;
|
|
16
|
-
/** Custom focus function to call on validation error. */
|
|
17
|
-
focus?: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Connects form validation state to a native HTML form input.
|
|
21
|
-
*
|
|
22
|
-
* This hook:
|
|
23
|
-
* - Sets custom validity on the native input based on validation state
|
|
24
|
-
* - Handles the 'invalid' event to commit validation and focus the first invalid input
|
|
25
|
-
* - Handles form reset to clear validation state
|
|
26
|
-
* - Handles input change to commit validation
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* function MyTextField(props) {
|
|
31
|
-
* let inputRef: HTMLInputElement | undefined;
|
|
32
|
-
*
|
|
33
|
-
* const validationState = createFormValidationState({
|
|
34
|
-
* value: props.value,
|
|
35
|
-
* validate: props.validate,
|
|
36
|
-
* validationBehavior: 'native',
|
|
37
|
-
* });
|
|
38
|
-
*
|
|
39
|
-
* createFormValidation(
|
|
40
|
-
* { validationBehavior: 'native' },
|
|
41
|
-
* validationState,
|
|
42
|
-
* () => inputRef
|
|
43
|
-
* );
|
|
44
|
-
*
|
|
45
|
-
* return (
|
|
46
|
-
* <input
|
|
47
|
-
* ref={inputRef}
|
|
48
|
-
* value={props.value}
|
|
49
|
-
* aria-invalid={validationState.displayValidation().isInvalid || undefined}
|
|
50
|
-
* />
|
|
51
|
-
* );
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export declare function createFormValidation(props: FormValidationProps, state: FormValidationState, ref: Accessor<ValidatableElement | undefined>): void;
|
|
56
|
-
//# sourceMappingURL=createFormValidation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFormValidation.d.ts","sourceRoot":"","sources":["../../src/form/createFormValidation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAClE,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,iCAAiC,CAAC;AAOzC,MAAM,MAAM,kBAAkB,GAC1B,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB;AA8CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,QAAQ,CAAC,kBAAkB,GAAG,SAAS,CAAC,GAC5C,IAAI,CAyGN"}
|
package/dist/form/index.d.ts
DELETED
package/dist/form/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GridKeyboardDelegate - Handles keyboard navigation in a grid.
|
|
3
|
-
* Based on @react-aria/grid/GridKeyboardDelegate.
|
|
4
|
-
*/
|
|
5
|
-
import type { GridCollection, Key } from '@proyecto-viviana/solid-stately';
|
|
6
|
-
import type { KeyboardDelegate } from './types';
|
|
7
|
-
import type { Accessor } from 'solid-js';
|
|
8
|
-
export interface GridKeyboardDelegateOptions<T> {
|
|
9
|
-
/** The grid collection. */
|
|
10
|
-
collection: GridCollection<T>;
|
|
11
|
-
/** Set of disabled keys. */
|
|
12
|
-
disabledKeys: Set<Key>;
|
|
13
|
-
/** Ref to the grid element. */
|
|
14
|
-
ref: Accessor<HTMLElement | null>;
|
|
15
|
-
/** Focus mode: row or cell. */
|
|
16
|
-
focusMode: 'row' | 'cell';
|
|
17
|
-
/** Text direction (ltr or rtl). */
|
|
18
|
-
direction: 'ltr' | 'rtl';
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A keyboard delegate that handles navigation in a grid.
|
|
22
|
-
*/
|
|
23
|
-
export declare class GridKeyboardDelegate<T> implements KeyboardDelegate {
|
|
24
|
-
private collection;
|
|
25
|
-
private disabledKeys;
|
|
26
|
-
private ref;
|
|
27
|
-
private focusMode;
|
|
28
|
-
private direction;
|
|
29
|
-
constructor(options: GridKeyboardDelegateOptions<T>);
|
|
30
|
-
/**
|
|
31
|
-
* Check if a key is disabled.
|
|
32
|
-
*/
|
|
33
|
-
private isDisabled;
|
|
34
|
-
/**
|
|
35
|
-
* Get the parent row key for a cell.
|
|
36
|
-
*/
|
|
37
|
-
private getRowKey;
|
|
38
|
-
/**
|
|
39
|
-
* Get all body rows (excluding header rows).
|
|
40
|
-
*/
|
|
41
|
-
private getBodyRows;
|
|
42
|
-
/**
|
|
43
|
-
* Get the first non-disabled key.
|
|
44
|
-
*/
|
|
45
|
-
getFirstKey(fromKey?: Key, global?: boolean): Key | null;
|
|
46
|
-
/**
|
|
47
|
-
* Get the last non-disabled key.
|
|
48
|
-
*/
|
|
49
|
-
getLastKey(fromKey?: Key, global?: boolean): Key | null;
|
|
50
|
-
/**
|
|
51
|
-
* Get the key above the current key.
|
|
52
|
-
*/
|
|
53
|
-
getKeyAbove(key: Key): Key | null;
|
|
54
|
-
/**
|
|
55
|
-
* Get the key below the current key.
|
|
56
|
-
*/
|
|
57
|
-
getKeyBelow(key: Key): Key | null;
|
|
58
|
-
/**
|
|
59
|
-
* Get the key to the left of the current key.
|
|
60
|
-
*/
|
|
61
|
-
getKeyLeftOf(key: Key): Key | null;
|
|
62
|
-
/**
|
|
63
|
-
* Get the key to the right of the current key.
|
|
64
|
-
*/
|
|
65
|
-
getKeyRightOf(key: Key): Key | null;
|
|
66
|
-
/**
|
|
67
|
-
* Get the key for page up.
|
|
68
|
-
*/
|
|
69
|
-
getKeyPageAbove(key: Key): Key | null;
|
|
70
|
-
/**
|
|
71
|
-
* Get the key for page down.
|
|
72
|
-
*/
|
|
73
|
-
getKeyPageBelow(key: Key): Key | null;
|
|
74
|
-
/**
|
|
75
|
-
* Get the key that matches the search string.
|
|
76
|
-
*/
|
|
77
|
-
getKeyForSearch(search: string, fromKey?: Key): Key | null;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=GridKeyboardDelegate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridKeyboardDelegate.d.ts","sourceRoot":"","sources":["../../src/grid/GridKeyboardDelegate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAY,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,2BAA2B,CAAC,CAAC;IAC5C,2BAA2B;IAC3B,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,4BAA4B;IAC5B,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,+BAA+B;IAC/B,GAAG,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClC,+BAA+B;IAC/B,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,mCAAmC;IACnC,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,YAAW,gBAAgB;IAC9D,OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,YAAY,CAAW;IAC/B,OAAO,CAAC,GAAG,CAA+B;IAC1C,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,SAAS,CAAgB;gBAErB,OAAO,EAAE,2BAA2B,CAAC,CAAC,CAAC;IAQnD;;OAEG;IACH,OAAO,CAAC,UAAU;IAIlB;;OAEG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI;IAmCxD;;OAEG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI;IAmCvD;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IA2CjC;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IA2CjC;;OAEG;IACH,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IA6BlC;;OAEG;IACH,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IA6BnC;;OAEG;IACH,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IAuCrC;;OAEG;IACH,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;IAuCrC;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;CAqC3D"}
|