@proyecto-viviana/solidaria 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autocomplete/createAutocomplete.d.ts +109 -0
- package/dist/autocomplete/createAutocomplete.d.ts.map +1 -0
- package/dist/autocomplete/index.d.ts +2 -0
- package/dist/autocomplete/index.d.ts.map +1 -0
- package/dist/breadcrumbs/createBreadcrumbs.d.ts +43 -0
- package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.d.ts.map +1 -0
- package/dist/button/createButton.d.ts +29 -0
- package/dist/button/createButton.d.ts.map +1 -0
- package/dist/button/createToggleButton.d.ts +41 -0
- package/dist/button/createToggleButton.d.ts.map +1 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/types.d.ts +77 -0
- package/dist/button/types.d.ts.map +1 -0
- package/dist/calendar/createCalendar.d.ts +41 -0
- package/dist/calendar/createCalendar.d.ts.map +1 -0
- package/dist/calendar/createCalendarCell.d.ts +41 -0
- package/dist/calendar/createCalendarCell.d.ts.map +1 -0
- package/dist/calendar/createCalendarGrid.d.ts +29 -0
- package/dist/calendar/createCalendarGrid.d.ts.map +1 -0
- package/dist/calendar/createRangeCalendar.d.ts +39 -0
- package/dist/calendar/createRangeCalendar.d.ts.map +1 -0
- package/dist/calendar/createRangeCalendarCell.d.ts +45 -0
- package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -0
- package/dist/calendar/index.d.ts +6 -0
- package/dist/calendar/index.d.ts.map +1 -0
- package/dist/checkbox/createCheckbox.d.ts +56 -0
- package/dist/checkbox/createCheckbox.d.ts.map +1 -0
- package/dist/checkbox/createCheckboxGroup.d.ts +53 -0
- package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -0
- package/dist/checkbox/createCheckboxGroupItem.d.ts +25 -0
- package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -0
- package/dist/checkbox/createCheckboxGroupState.d.ts +71 -0
- package/dist/checkbox/createCheckboxGroupState.d.ts.map +1 -0
- package/dist/checkbox/index.d.ts +9 -0
- package/dist/checkbox/index.d.ts.map +1 -0
- package/dist/color/createColorArea.d.ts +13 -0
- package/dist/color/createColorArea.d.ts.map +1 -0
- package/dist/color/createColorField.d.ts +13 -0
- package/dist/color/createColorField.d.ts.map +1 -0
- package/dist/color/createColorSlider.d.ts +13 -0
- package/dist/color/createColorSlider.d.ts.map +1 -0
- package/dist/color/createColorSwatch.d.ts +12 -0
- package/dist/color/createColorSwatch.d.ts.map +1 -0
- package/dist/color/createColorWheel.d.ts +13 -0
- package/dist/color/createColorWheel.d.ts.map +1 -0
- package/dist/color/index.d.ts +10 -0
- package/dist/color/index.d.ts.map +1 -0
- package/dist/color/types.d.ts +106 -0
- package/dist/color/types.d.ts.map +1 -0
- package/dist/combobox/createComboBox.d.ts +77 -0
- package/dist/combobox/createComboBox.d.ts.map +1 -0
- package/dist/combobox/index.d.ts +2 -0
- package/dist/combobox/index.d.ts.map +1 -0
- package/dist/combobox/intl/index.d.ts +14 -0
- package/dist/combobox/intl/index.d.ts.map +1 -0
- package/dist/datepicker/createDateField.d.ts +51 -0
- package/dist/datepicker/createDateField.d.ts.map +1 -0
- package/dist/datepicker/createDatePicker.d.ts +65 -0
- package/dist/datepicker/createDatePicker.d.ts.map +1 -0
- package/dist/datepicker/createDateSegment.d.ts +29 -0
- package/dist/datepicker/createDateSegment.d.ts.map +1 -0
- package/dist/datepicker/createTimeField.d.ts +51 -0
- package/dist/datepicker/createTimeField.d.ts.map +1 -0
- package/dist/datepicker/index.d.ts +5 -0
- package/dist/datepicker/index.d.ts.map +1 -0
- package/dist/dialog/createDialog.d.ts +25 -0
- package/dist/dialog/createDialog.d.ts.map +1 -0
- package/dist/dialog/index.d.ts +3 -0
- package/dist/dialog/index.d.ts.map +1 -0
- package/dist/dialog/types.d.ts +18 -0
- package/dist/dialog/types.d.ts.map +1 -0
- package/dist/disclosure/createDisclosure.d.ts +52 -0
- package/dist/disclosure/createDisclosure.d.ts.map +1 -0
- package/dist/disclosure/createDisclosureGroup.d.ts +39 -0
- package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -0
- package/dist/disclosure/index.d.ts +3 -0
- package/dist/disclosure/index.d.ts.map +1 -0
- package/dist/dnd/createDrag.d.ts +16 -0
- package/dist/dnd/createDrag.d.ts.map +1 -0
- package/dist/dnd/createDraggableCollection.d.ts +27 -0
- package/dist/dnd/createDraggableCollection.d.ts.map +1 -0
- package/dist/dnd/createDraggableItem.d.ts +37 -0
- package/dist/dnd/createDraggableItem.d.ts.map +1 -0
- package/dist/dnd/createDrop.d.ts +16 -0
- package/dist/dnd/createDrop.d.ts.map +1 -0
- package/dist/dnd/createDroppableCollection.d.ts +76 -0
- package/dist/dnd/createDroppableCollection.d.ts.map +1 -0
- package/dist/dnd/createDroppableItem.d.ts +31 -0
- package/dist/dnd/createDroppableItem.d.ts.map +1 -0
- package/dist/dnd/index.d.ts +18 -0
- package/dist/dnd/index.d.ts.map +1 -0
- package/dist/dnd/types.d.ts +66 -0
- package/dist/dnd/types.d.ts.map +1 -0
- package/dist/dnd/utils.d.ts +57 -0
- package/dist/dnd/utils.d.ts.map +1 -0
- package/dist/focus/FocusScope.d.ts +57 -0
- package/dist/focus/FocusScope.d.ts.map +1 -0
- package/dist/focus/createAutoFocus.d.ts +120 -0
- package/dist/focus/createAutoFocus.d.ts.map +1 -0
- package/dist/focus/createFocusRestore.d.ts +116 -0
- package/dist/focus/createFocusRestore.d.ts.map +1 -0
- package/dist/focus/createVirtualFocus.d.ts +170 -0
- package/dist/focus/createVirtualFocus.d.ts.map +1 -0
- package/dist/focus/index.d.ts +5 -0
- package/dist/focus/index.d.ts.map +1 -0
- package/dist/form/createFormReset.d.ts +27 -0
- package/dist/form/createFormReset.d.ts.map +1 -0
- package/dist/form/createFormValidation.d.ts +56 -0
- package/dist/form/createFormValidation.d.ts.map +1 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/grid/GridKeyboardDelegate.d.ts +79 -0
- package/dist/grid/GridKeyboardDelegate.d.ts.map +1 -0
- package/dist/grid/createGrid.d.ts +24 -0
- package/dist/grid/createGrid.d.ts.map +1 -0
- package/dist/grid/createGridCell.d.ts +12 -0
- package/dist/grid/createGridCell.d.ts.map +1 -0
- package/dist/grid/createGridRow.d.ts +12 -0
- package/dist/grid/createGridRow.d.ts.map +1 -0
- package/dist/grid/index.d.ts +10 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/types.d.ts +126 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/gridlist/createGridList.d.ts +28 -0
- package/dist/gridlist/createGridList.d.ts.map +1 -0
- package/dist/gridlist/createGridListItem.d.ts +12 -0
- package/dist/gridlist/createGridListItem.d.ts.map +1 -0
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts +12 -0
- package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -0
- package/dist/gridlist/index.d.ts +8 -0
- package/dist/gridlist/index.d.ts.map +1 -0
- package/dist/gridlist/types.d.ts +75 -0
- package/dist/gridlist/types.d.ts.map +1 -0
- package/dist/i18n/NumberFormatter.d.ts +43 -0
- package/dist/i18n/NumberFormatter.d.ts.map +1 -0
- package/dist/i18n/createCollator.d.ts +41 -0
- package/dist/i18n/createCollator.d.ts.map +1 -0
- package/dist/i18n/createDateFormatter.d.ts +45 -0
- package/dist/i18n/createDateFormatter.d.ts.map +1 -0
- package/dist/i18n/createFilter.d.ts +57 -0
- package/dist/i18n/createFilter.d.ts.map +1 -0
- package/dist/i18n/createNumberFormatter.d.ts +43 -0
- package/dist/i18n/createNumberFormatter.d.ts.map +1 -0
- package/dist/i18n/createStringFormatter.d.ts +42 -0
- package/dist/i18n/createStringFormatter.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/locale.d.ts +66 -0
- package/dist/i18n/locale.d.ts.map +1 -0
- package/dist/i18n/utils.d.ts +17 -0
- package/dist/i18n/utils.d.ts.map +1 -0
- package/dist/index.d.ts +50 -6135
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +7 -1
- package/dist/index.ssr.js +5 -5
- package/dist/index.ssr.js.map +7 -1
- package/dist/interactions/FocusableProvider.d.ts +26 -0
- package/dist/interactions/FocusableProvider.d.ts.map +1 -0
- package/dist/interactions/PressEvent.d.ts +73 -0
- package/dist/interactions/PressEvent.d.ts.map +1 -0
- package/dist/interactions/createFocus.d.ts +31 -0
- package/dist/interactions/createFocus.d.ts.map +1 -0
- package/dist/interactions/createFocusRing.d.ts +37 -0
- package/dist/interactions/createFocusRing.d.ts.map +1 -0
- package/dist/interactions/createFocusWithin.d.ts +27 -0
- package/dist/interactions/createFocusWithin.d.ts.map +1 -0
- package/dist/interactions/createFocusable.d.ts +65 -0
- package/dist/interactions/createFocusable.d.ts.map +1 -0
- package/dist/interactions/createHover.d.ts +43 -0
- package/dist/interactions/createHover.d.ts.map +1 -0
- package/dist/interactions/createInteractionModality.d.ts +73 -0
- package/dist/interactions/createInteractionModality.d.ts.map +1 -0
- package/dist/interactions/createKeyboard.d.ts +35 -0
- package/dist/interactions/createKeyboard.d.ts.map +1 -0
- package/dist/interactions/createLongPress.d.ts +63 -0
- package/dist/interactions/createLongPress.d.ts.map +1 -0
- package/dist/interactions/createMove.d.ts +40 -0
- package/dist/interactions/createMove.d.ts.map +1 -0
- package/dist/interactions/createPress.d.ts +55 -0
- package/dist/interactions/createPress.d.ts.map +1 -0
- package/dist/interactions/index.d.ts +13 -0
- package/dist/interactions/index.d.ts.map +1 -0
- package/dist/label/createField.d.ts +51 -0
- package/dist/label/createField.d.ts.map +1 -0
- package/dist/label/createLabel.d.ts +49 -0
- package/dist/label/createLabel.d.ts.map +1 -0
- package/dist/label/createLabels.d.ts +16 -0
- package/dist/label/createLabels.d.ts.map +1 -0
- package/dist/label/index.d.ts +6 -0
- package/dist/label/index.d.ts.map +1 -0
- package/dist/landmark/createLandmark.d.ts +79 -0
- package/dist/landmark/createLandmark.d.ts.map +1 -0
- package/dist/landmark/index.d.ts +2 -0
- package/dist/landmark/index.d.ts.map +1 -0
- package/dist/link/createLink.d.ts +65 -0
- package/dist/link/createLink.d.ts.map +1 -0
- package/dist/link/index.d.ts +2 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/listbox/createListBox.d.ts +58 -0
- package/dist/listbox/createListBox.d.ts.map +1 -0
- package/dist/listbox/createOption.d.ts +42 -0
- package/dist/listbox/createOption.d.ts.map +1 -0
- package/dist/listbox/index.d.ts +3 -0
- package/dist/listbox/index.d.ts.map +1 -0
- package/dist/live-announcer/announce.d.ts +113 -0
- package/dist/live-announcer/announce.d.ts.map +1 -0
- package/dist/live-announcer/index.d.ts +2 -0
- package/dist/live-announcer/index.d.ts.map +1 -0
- package/dist/menu/createMenu.d.ts +57 -0
- package/dist/menu/createMenu.d.ts.map +1 -0
- package/dist/menu/createMenuItem.d.ts +42 -0
- package/dist/menu/createMenuItem.d.ts.map +1 -0
- package/dist/menu/createMenuTrigger.d.ts +29 -0
- package/dist/menu/createMenuTrigger.d.ts.map +1 -0
- package/dist/menu/index.d.ts +4 -0
- package/dist/menu/index.d.ts.map +1 -0
- package/dist/meter/createMeter.d.ts +44 -0
- package/dist/meter/createMeter.d.ts.map +1 -0
- package/dist/meter/index.d.ts +2 -0
- package/dist/meter/index.d.ts.map +1 -0
- package/dist/numberfield/createNumberField.d.ts +56 -0
- package/dist/numberfield/createNumberField.d.ts.map +1 -0
- package/dist/numberfield/index.d.ts +2 -0
- package/dist/numberfield/index.d.ts.map +1 -0
- package/dist/overlays/ariaHideOutside.d.ts +25 -0
- package/dist/overlays/ariaHideOutside.d.ts.map +1 -0
- package/dist/overlays/createInteractOutside.d.ts +20 -0
- package/dist/overlays/createInteractOutside.d.ts.map +1 -0
- package/dist/overlays/createModal.d.ts +70 -0
- package/dist/overlays/createModal.d.ts.map +1 -0
- package/dist/overlays/createOverlay.d.ts +43 -0
- package/dist/overlays/createOverlay.d.ts.map +1 -0
- package/dist/overlays/createOverlayTrigger.d.ts +30 -0
- package/dist/overlays/createOverlayTrigger.d.ts.map +1 -0
- package/dist/overlays/createPreventScroll.d.ts +15 -0
- package/dist/overlays/createPreventScroll.d.ts.map +1 -0
- package/dist/overlays/index.d.ts +7 -0
- package/dist/overlays/index.d.ts.map +1 -0
- package/dist/popover/calculatePosition.d.ts +67 -0
- package/dist/popover/calculatePosition.d.ts.map +1 -0
- package/dist/popover/createOverlayPosition.d.ts +109 -0
- package/dist/popover/createOverlayPosition.d.ts.map +1 -0
- package/dist/popover/createPopover.d.ts +88 -0
- package/dist/popover/createPopover.d.ts.map +1 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/index.d.ts.map +1 -0
- package/dist/progress/createProgressBar.d.ts +47 -0
- package/dist/progress/createProgressBar.d.ts.map +1 -0
- package/dist/progress/index.d.ts +2 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/radio/createRadio.d.ts +68 -0
- package/dist/radio/createRadio.d.ts.map +1 -0
- package/dist/radio/createRadioGroup.d.ts +85 -0
- package/dist/radio/createRadioGroup.d.ts.map +1 -0
- package/dist/radio/createRadioGroupState.d.ts +77 -0
- package/dist/radio/createRadioGroupState.d.ts.map +1 -0
- package/dist/radio/index.d.ts +4 -0
- package/dist/radio/index.d.ts.map +1 -0
- package/dist/searchfield/createSearchField.d.ts +32 -0
- package/dist/searchfield/createSearchField.d.ts.map +1 -0
- package/dist/searchfield/index.d.ts +3 -0
- package/dist/searchfield/index.d.ts.map +1 -0
- package/dist/select/createHiddenSelect.d.ts +69 -0
- package/dist/select/createHiddenSelect.d.ts.map +1 -0
- package/dist/select/createSelect.d.ts +70 -0
- package/dist/select/createSelect.d.ts.map +1 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/index.d.ts.map +1 -0
- package/dist/selection/createTypeSelect.d.ts +43 -0
- package/dist/selection/createTypeSelect.d.ts.map +1 -0
- package/dist/selection/index.d.ts +6 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/separator/createSeparator.d.ts +38 -0
- package/dist/separator/createSeparator.d.ts.map +1 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.d.ts.map +1 -0
- package/dist/slider/createSlider.d.ts +43 -0
- package/dist/slider/createSlider.d.ts.map +1 -0
- package/dist/slider/index.d.ts +3 -0
- package/dist/slider/index.d.ts.map +1 -0
- package/dist/ssr/index.d.ts +221 -0
- package/dist/ssr/index.d.ts.map +1 -0
- package/dist/switch/createSwitch.d.ts +34 -0
- package/dist/switch/createSwitch.d.ts.map +1 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.d.ts.map +1 -0
- package/dist/table/createTable.d.ts +24 -0
- package/dist/table/createTable.d.ts.map +1 -0
- package/dist/table/createTableCell.d.ts +12 -0
- package/dist/table/createTableCell.d.ts.map +1 -0
- package/dist/table/createTableColumnHeader.d.ts +12 -0
- package/dist/table/createTableColumnHeader.d.ts.map +1 -0
- package/dist/table/createTableHeaderRow.d.ts +12 -0
- package/dist/table/createTableHeaderRow.d.ts.map +1 -0
- package/dist/table/createTableRow.d.ts +12 -0
- package/dist/table/createTableRow.d.ts.map +1 -0
- package/dist/table/createTableRowGroup.d.ts +11 -0
- package/dist/table/createTableRowGroup.d.ts.map +1 -0
- package/dist/table/createTableSelectAllCheckbox.d.ts +12 -0
- package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -0
- package/dist/table/createTableSelectionCheckbox.d.ts +12 -0
- package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -0
- package/dist/table/index.d.ts +14 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/types.d.ts +150 -0
- package/dist/table/types.d.ts.map +1 -0
- package/dist/tabs/createTabs.d.ts +123 -0
- package/dist/tabs/createTabs.d.ts.map +1 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tag/createTag.d.ts +42 -0
- package/dist/tag/createTag.d.ts.map +1 -0
- package/dist/tag/createTagGroup.d.ts +54 -0
- package/dist/tag/createTagGroup.d.ts.map +1 -0
- package/dist/tag/index.d.ts +3 -0
- package/dist/tag/index.d.ts.map +1 -0
- package/dist/textfield/createTextField.d.ts +73 -0
- package/dist/textfield/createTextField.d.ts.map +1 -0
- package/dist/textfield/index.d.ts +2 -0
- package/dist/textfield/index.d.ts.map +1 -0
- package/dist/toast/createToast.d.ts +58 -0
- package/dist/toast/createToast.d.ts.map +1 -0
- package/dist/toast/createToastRegion.d.ts +49 -0
- package/dist/toast/createToastRegion.d.ts.map +1 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toggle/createToggle.d.ts +94 -0
- package/dist/toggle/createToggle.d.ts.map +1 -0
- package/dist/toggle/createToggleState.d.ts +34 -0
- package/dist/toggle/createToggleState.d.ts.map +1 -0
- package/dist/toggle/index.d.ts +5 -0
- package/dist/toggle/index.d.ts.map +1 -0
- package/dist/toolbar/createToolbar.d.ts +49 -0
- package/dist/toolbar/createToolbar.d.ts.map +1 -0
- package/dist/toolbar/index.d.ts +2 -0
- package/dist/toolbar/index.d.ts.map +1 -0
- package/dist/tooltip/createTooltip.d.ts +48 -0
- package/dist/tooltip/createTooltip.d.ts.map +1 -0
- package/dist/tooltip/createTooltipTrigger.d.ts +64 -0
- package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -0
- package/dist/tooltip/index.d.ts +3 -0
- package/dist/tooltip/index.d.ts.map +1 -0
- package/dist/tree/createTree.d.ts +28 -0
- package/dist/tree/createTree.d.ts.map +1 -0
- package/dist/tree/createTreeItem.d.ts +12 -0
- package/dist/tree/createTreeItem.d.ts.map +1 -0
- package/dist/tree/createTreeSelectionCheckbox.d.ts +12 -0
- package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -0
- package/dist/tree/index.d.ts +8 -0
- package/dist/tree/index.d.ts.map +1 -0
- package/dist/tree/types.d.ts +81 -0
- package/dist/tree/types.d.ts.map +1 -0
- package/dist/utils/createDescription.d.ts +56 -0
- package/dist/utils/createDescription.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +68 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/env.d.ts +18 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/events.d.ts +29 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/filterDOMProps.d.ts +29 -0
- package/dist/utils/filterDOMProps.d.ts.map +1 -0
- package/dist/utils/focus.d.ts +20 -0
- package/dist/utils/focus.d.ts.map +1 -0
- package/dist/utils/geometry.d.ts +40 -0
- package/dist/utils/geometry.d.ts.map +1 -0
- package/dist/utils/globalListeners.d.ts +36 -0
- package/dist/utils/globalListeners.d.ts.map +1 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/mergeProps.d.ts +11 -0
- package/dist/utils/mergeProps.d.ts.map +1 -0
- package/dist/utils/platform.d.ts +14 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/reactivity.d.ts +28 -0
- package/dist/utils/reactivity.d.ts.map +1 -0
- package/dist/utils/textSelection.d.ts +19 -0
- package/dist/utils/textSelection.d.ts.map +1 -0
- package/dist/visually-hidden/createVisuallyHidden.d.ts +60 -0
- package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -0
- package/dist/visually-hidden/index.d.ts +2 -0
- package/dist/visually-hidden/index.d.ts.map +1 -0
- package/package.json +4 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a hidden native select element for form integration.
|
|
3
|
+
* Based on @react-aria/select useHiddenSelect.
|
|
4
|
+
*/
|
|
5
|
+
import { type JSX, type Accessor } from 'solid-js';
|
|
6
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
7
|
+
import type { SelectState, FormValidationState } from '@proyecto-viviana/solid-stately';
|
|
8
|
+
export type ValidationBehavior = 'aria' | 'native';
|
|
9
|
+
export interface AriaHiddenSelectProps<T> {
|
|
10
|
+
/** The state object for the select. */
|
|
11
|
+
state: SelectState<T>;
|
|
12
|
+
/** The name attribute for the hidden select. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Whether the select is disabled. */
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
/** Whether the select is required. */
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
/** Describes the type of autocomplete functionality the select should provide. */
|
|
19
|
+
autoComplete?: string;
|
|
20
|
+
/** The `form` attribute to associate the select with a form by ID. */
|
|
21
|
+
form?: string;
|
|
22
|
+
/** Validation behavior: 'aria' for realtime, 'native' for on submit. */
|
|
23
|
+
validationBehavior?: ValidationBehavior;
|
|
24
|
+
/** A ref to the trigger element for focus on validation error. */
|
|
25
|
+
triggerRef?: Accessor<HTMLElement | null>;
|
|
26
|
+
/** Form validation state (optional, for native validation). */
|
|
27
|
+
validationState?: FormValidationState;
|
|
28
|
+
}
|
|
29
|
+
export interface HiddenSelectAria {
|
|
30
|
+
/** Props for the container element. */
|
|
31
|
+
containerProps: JSX.HTMLAttributes<HTMLDivElement>;
|
|
32
|
+
/** Props for the hidden select element. */
|
|
33
|
+
selectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
|
|
34
|
+
/** Props for the hidden input element (for form submission). */
|
|
35
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Provides the accessibility implementation for a hidden select.
|
|
39
|
+
* This is used for native form submission and accessibility on mobile devices.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createHiddenSelect<T>(props: MaybeAccessor<AriaHiddenSelectProps<T>>): HiddenSelectAria;
|
|
42
|
+
export interface HiddenSelectProps<T> {
|
|
43
|
+
/** The state object for the select. */
|
|
44
|
+
state: SelectState<T>;
|
|
45
|
+
/** The name attribute for the hidden select. */
|
|
46
|
+
name?: string;
|
|
47
|
+
/** Whether the select is disabled. */
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
/** Whether the select is required. */
|
|
50
|
+
isRequired?: boolean;
|
|
51
|
+
/** A ref to the trigger element. */
|
|
52
|
+
triggerRef?: () => HTMLElement | null;
|
|
53
|
+
/** Label for the select. */
|
|
54
|
+
label?: string;
|
|
55
|
+
/** Describes the type of autocomplete functionality the select should provide. */
|
|
56
|
+
autoComplete?: string;
|
|
57
|
+
/** The `form` attribute to associate the select with a form by ID. */
|
|
58
|
+
form?: string;
|
|
59
|
+
/** Validation behavior: 'aria' for realtime, 'native' for on submit. */
|
|
60
|
+
validationBehavior?: ValidationBehavior;
|
|
61
|
+
/** Form validation state (optional, for native validation). */
|
|
62
|
+
validationState?: FormValidationState;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A component that renders a hidden native select for form submission.
|
|
66
|
+
* This is useful on mobile devices where native select behavior is preferred.
|
|
67
|
+
*/
|
|
68
|
+
export declare function HiddenSelect<T>(props: HiddenSelectProps<T>): JSX.Element;
|
|
69
|
+
//# sourceMappingURL=createHiddenSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHiddenSelect.d.ts","sourceRoot":"","sources":["../../src/select/createHiddenSelect.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,QAAQ,EAAgC,MAAM,UAAU,CAAC;AACjF,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAO,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,uCAAuC;IACvC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,kEAAkE;IAClE,UAAU,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,+DAA+D;IAC/D,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACnD,2CAA2C;IAC3C,WAAW,EAAE,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IACzD,gEAAgE;IAChE,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAC7C,gBAAgB,CA0GlB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,uCAAuC;IACvC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACtC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,+DAA+D;IAC/D,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAmDxE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a select component.
|
|
3
|
+
* A select displays a collapsible list of options and allows a user to select one of them.
|
|
4
|
+
* Based on @react-aria/select useSelect.
|
|
5
|
+
*/
|
|
6
|
+
import { type JSX, type Accessor } from 'solid-js';
|
|
7
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
8
|
+
import type { SelectState, CollectionNode } from '@proyecto-viviana/solid-stately';
|
|
9
|
+
export interface AriaSelectProps {
|
|
10
|
+
/** An ID for the select. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Whether the select is disabled. */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** Whether the select is required. */
|
|
15
|
+
isRequired?: boolean;
|
|
16
|
+
/** The label for the select. */
|
|
17
|
+
label?: JSX.Element;
|
|
18
|
+
/** An accessible label for the select when no visible label is provided. */
|
|
19
|
+
'aria-label'?: string;
|
|
20
|
+
/** The ID of an element that labels the select. */
|
|
21
|
+
'aria-labelledby'?: string;
|
|
22
|
+
/** The ID of an element that describes the select. */
|
|
23
|
+
'aria-describedby'?: string;
|
|
24
|
+
/** Placeholder text when no option is selected. */
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/** Whether the select should be auto-focused. */
|
|
27
|
+
autoFocus?: boolean;
|
|
28
|
+
/** Handler called when focus moves to the select. */
|
|
29
|
+
onFocus?: (e: FocusEvent) => void;
|
|
30
|
+
/** Handler called when focus moves away from the select. */
|
|
31
|
+
onBlur?: (e: FocusEvent) => void;
|
|
32
|
+
/** Handler called when the focus state changes. */
|
|
33
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
34
|
+
/** The name of the select, used when submitting an HTML form. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Whether type-to-select is disabled. @default false */
|
|
37
|
+
disallowTypeAhead?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface SelectAria<T> {
|
|
40
|
+
/** Props for the label element. */
|
|
41
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
42
|
+
/** Props for the trigger button element. */
|
|
43
|
+
triggerProps: JSX.HTMLAttributes<HTMLElement>;
|
|
44
|
+
/** Props for the value display element. */
|
|
45
|
+
valueProps: JSX.HTMLAttributes<HTMLElement>;
|
|
46
|
+
/** Props for the listbox/menu popup. */
|
|
47
|
+
menuProps: JSX.HTMLAttributes<HTMLElement>;
|
|
48
|
+
/** Props for the description element, if any. */
|
|
49
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
50
|
+
/** Props for the error message element, if any. */
|
|
51
|
+
errorMessageProps: JSX.HTMLAttributes<HTMLElement>;
|
|
52
|
+
/** Whether the select is currently focused. */
|
|
53
|
+
isFocused: Accessor<boolean>;
|
|
54
|
+
/** Whether the select has keyboard focus. */
|
|
55
|
+
isFocusVisible: Accessor<boolean>;
|
|
56
|
+
/** Whether the select is currently open. */
|
|
57
|
+
isOpen: Accessor<boolean>;
|
|
58
|
+
/** The currently selected item. */
|
|
59
|
+
selectedItem: Accessor<CollectionNode<T> | null>;
|
|
60
|
+
}
|
|
61
|
+
interface SelectData {
|
|
62
|
+
id: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function getSelectData(state: SelectState): SelectData | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Provides the behavior and accessibility implementation for a select component.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createSelect<T>(props: MaybeAccessor<AriaSelectProps>, state: SelectState<T>, _ref?: () => HTMLElement | null): SelectAria<T>;
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=createSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSelect.d.ts","sourceRoot":"","sources":["../../src/select/createSelect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAQ5E,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEnF,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,4DAA4D;IAC5D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,4CAA4C;IAC5C,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,wCAAwC;IACxC,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,iDAAiD;IACjD,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,mDAAmD;IACnD,iBAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACnD,+CAA+C;IAC/C,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,6CAA6C;IAC7C,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClC,4CAA4C;IAC5C,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,mCAAmC;IACnC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAClD;AAKD,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAExE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,EACrC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACrB,IAAI,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,GAC9B,UAAU,CAAC,CAAC,CAAC,CAiTf"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createSelect, getSelectData, type AriaSelectProps, type SelectAria, } from './createSelect';
|
|
2
|
+
export { createHiddenSelect, HiddenSelect, type AriaHiddenSelectProps, type HiddenSelectAria, type HiddenSelectProps, } from './createHiddenSelect.jsx';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createTypeSelect - Handles typeahead interactions with collections.
|
|
3
|
+
* Based on @react-aria/selection useTypeSelect.
|
|
4
|
+
*
|
|
5
|
+
* Allows users to navigate to items by typing characters that match
|
|
6
|
+
* item text values. Supports multi-character search with debouncing.
|
|
7
|
+
*/
|
|
8
|
+
import type { JSX, Accessor } from 'solid-js';
|
|
9
|
+
import type { Key, Collection } from '@proyecto-viviana/solid-stately';
|
|
10
|
+
export interface TypeSelectOptions<T> {
|
|
11
|
+
/** The collection to search through. */
|
|
12
|
+
collection: Accessor<Collection<T>>;
|
|
13
|
+
/** The currently focused key. */
|
|
14
|
+
focusedKey: Accessor<Key | null>;
|
|
15
|
+
/** Callback to set the focused key when a match is found. */
|
|
16
|
+
onFocusedKeyChange: (key: Key) => void;
|
|
17
|
+
/** Callback when an item is focused by typing. */
|
|
18
|
+
onTypeSelect?: (key: Key) => void;
|
|
19
|
+
/** Function to check if a key is disabled. */
|
|
20
|
+
isKeyDisabled?: (key: Key) => boolean;
|
|
21
|
+
/** Whether type-to-select is disabled. */
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface TypeSelectAria {
|
|
25
|
+
/** Props to spread on the collection element. */
|
|
26
|
+
typeSelectProps: JSX.HTMLAttributes<HTMLElement>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates typeahead/type-to-select functionality for a collection.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const { typeSelectProps } = createTypeSelect({
|
|
34
|
+
* collection: () => state.collection(),
|
|
35
|
+
* focusedKey: () => state.focusedKey(),
|
|
36
|
+
* onFocusedKeyChange: (key) => state.setFocusedKey(key),
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* return <ul {...mergeProps(listBoxProps, typeSelectProps)}>...</ul>;
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function createTypeSelect<T>(options: TypeSelectOptions<T>): TypeSelectAria;
|
|
43
|
+
//# sourceMappingURL=createTypeSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTypeSelect.d.ts","sourceRoot":"","sources":["../../src/selection/createTypeSelect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAkB,MAAM,iCAAiC,CAAC;AAOvF,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,wCAAwC;IACxC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,iCAAiC;IACjC,UAAU,EAAE,QAAQ,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACjC,6DAA6D;IAC7D,kBAAkB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IACtC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,eAAe,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CAClD;AA4ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CA4EjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selection/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createSeparator - SolidJS implementation of React Aria's useSeparator
|
|
3
|
+
*
|
|
4
|
+
* A separator is a visual divider between two groups of content,
|
|
5
|
+
* e.g. groups of menu items or sections of a page.
|
|
6
|
+
*/
|
|
7
|
+
import type { JSX } from 'solid-js';
|
|
8
|
+
import { type MaybeAccessor } from '../utils';
|
|
9
|
+
export type Orientation = 'horizontal' | 'vertical';
|
|
10
|
+
export interface AriaSeparatorProps {
|
|
11
|
+
/**
|
|
12
|
+
* The orientation of the separator.
|
|
13
|
+
* @default 'horizontal'
|
|
14
|
+
*/
|
|
15
|
+
orientation?: Orientation;
|
|
16
|
+
/**
|
|
17
|
+
* The HTML element type that will be used to render the separator.
|
|
18
|
+
* @default 'hr'
|
|
19
|
+
*/
|
|
20
|
+
elementType?: string;
|
|
21
|
+
/** An accessibility label for the separator. */
|
|
22
|
+
'aria-label'?: string;
|
|
23
|
+
/** Identifies the element(s) that labels the separator. */
|
|
24
|
+
'aria-labelledby'?: string;
|
|
25
|
+
/** The element's unique identifier. */
|
|
26
|
+
id?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SeparatorAria {
|
|
29
|
+
/** Props for the separator element. */
|
|
30
|
+
separatorProps: JSX.HTMLAttributes<HTMLElement>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Provides the accessibility implementation for a separator.
|
|
34
|
+
* A separator is a visual divider between two groups of content,
|
|
35
|
+
* e.g. groups of menu items or sections of a page.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createSeparator(props?: MaybeAccessor<AriaSeparatorProps>): SeparatorAria;
|
|
38
|
+
//# sourceMappingURL=createSeparator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSeparator.d.ts","sourceRoot":"","sources":["../../src/separator/createSeparator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAOtD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CACjD;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,aAAa,CAAC,kBAAkB,CAAM,GAC5C,aAAa,CA6Bf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/separator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a slider component.
|
|
3
|
+
* A slider allows users to select a value from a range.
|
|
4
|
+
* Based on @react-aria/slider useSlider.
|
|
5
|
+
*/
|
|
6
|
+
import { type JSX } from 'solid-js';
|
|
7
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
8
|
+
import type { SliderState, SliderOrientation } from '@proyecto-viviana/solid-stately';
|
|
9
|
+
export interface AriaSliderProps {
|
|
10
|
+
/** An ID for the slider. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Whether the slider is disabled. */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** The label for the slider. */
|
|
15
|
+
label?: JSX.Element;
|
|
16
|
+
/** An accessible label for the slider when no visible label is provided. */
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
/** The ID of an element that labels the slider. */
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
/** The ID of an element that describes the slider. */
|
|
21
|
+
'aria-describedby'?: string;
|
|
22
|
+
/** The orientation of the slider. */
|
|
23
|
+
orientation?: SliderOrientation;
|
|
24
|
+
}
|
|
25
|
+
export interface SliderAria {
|
|
26
|
+
/** Props for the label element. */
|
|
27
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
28
|
+
/** Props for the root group element. */
|
|
29
|
+
groupProps: JSX.HTMLAttributes<HTMLElement>;
|
|
30
|
+
/** Props for the track element. */
|
|
31
|
+
trackProps: JSX.HTMLAttributes<HTMLElement>;
|
|
32
|
+
/** Props for the thumb element. */
|
|
33
|
+
thumbProps: JSX.HTMLAttributes<HTMLElement>;
|
|
34
|
+
/** Props for the hidden input element. */
|
|
35
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
36
|
+
/** Props for the output element (showing current value). */
|
|
37
|
+
outputProps: JSX.HTMLAttributes<HTMLElement>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Provides the behavior and accessibility implementation for a slider.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createSlider(props: MaybeAccessor<AriaSliderProps>, state: SliderState, trackRef?: () => HTMLElement | null): SliderAria;
|
|
43
|
+
//# sourceMappingURL=createSlider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSlider.d.ts","sourceRoot":"","sources":["../../src/slider/createSlider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAsB,MAAM,UAAU,CAAC;AAMxD,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEtF,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,wCAAwC;IACxC,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,0CAA0C;IAC1C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,4DAA4D;IAC5D,WAAW,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,GAClC,UAAU,CAsSZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSR utilities for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* SolidJS has built-in SSR support with `isServer` and `createUniqueId()`.
|
|
5
|
+
* These utilities provide a consistent API matching React-Aria's patterns
|
|
6
|
+
* with additional features for hydration management.
|
|
7
|
+
*/
|
|
8
|
+
import { type Accessor, type JSX, type ParentProps } from 'solid-js';
|
|
9
|
+
export interface SSRProviderProps extends ParentProps {
|
|
10
|
+
}
|
|
11
|
+
export interface SSRContextValue {
|
|
12
|
+
/** Whether currently rendering on the server. */
|
|
13
|
+
isSSR: boolean;
|
|
14
|
+
/** Prefix for generated IDs, allowing nested providers. */
|
|
15
|
+
prefix: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns whether the component is currently being server side rendered.
|
|
19
|
+
* Can be used to delay browser-specific rendering until after hydration.
|
|
20
|
+
*
|
|
21
|
+
* Note: This returns a static boolean. For reactive hydration detection,
|
|
22
|
+
* use `createHydrationState()`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createIsSSR(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Check if we can use DOM APIs.
|
|
27
|
+
* This is useful for code that needs to run only in the browser.
|
|
28
|
+
*/
|
|
29
|
+
export declare const canUseDOM: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Generate a unique ID that is stable across server and client.
|
|
32
|
+
* Uses SolidJS's built-in createUniqueId which handles SSR correctly.
|
|
33
|
+
*
|
|
34
|
+
* @param defaultId - Optional default ID to use instead of generating one.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* function TextField(props) {
|
|
39
|
+
* const inputId = createId(props.id);
|
|
40
|
+
* return (
|
|
41
|
+
* <>
|
|
42
|
+
* <label for={inputId}>{props.label}</label>
|
|
43
|
+
* <input id={inputId} />
|
|
44
|
+
* </>
|
|
45
|
+
* );
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function createId(defaultId?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Provides SSR context to the component tree.
|
|
52
|
+
*
|
|
53
|
+
* While SolidJS handles most SSR scenarios automatically, this provider
|
|
54
|
+
* can be useful for:
|
|
55
|
+
* - Nested ID prefixes to avoid collisions in micro-frontends
|
|
56
|
+
* - Explicit hydration boundary markers
|
|
57
|
+
* - Testing SSR behavior
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* // Root of your app
|
|
62
|
+
* <SSRProvider>
|
|
63
|
+
* <App />
|
|
64
|
+
* </SSRProvider>
|
|
65
|
+
*
|
|
66
|
+
* // With custom prefix for micro-frontend
|
|
67
|
+
* <SSRProvider prefix="widget">
|
|
68
|
+
* <Widget />
|
|
69
|
+
* </SSRProvider>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function SSRProvider(props: SSRProviderProps & {
|
|
73
|
+
prefix?: string;
|
|
74
|
+
}): JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* Tracks whether the component is currently hydrating.
|
|
77
|
+
*
|
|
78
|
+
* During server-side rendering, this returns `true`. After hydration
|
|
79
|
+
* completes on the client, it switches to `false`. This is useful for
|
|
80
|
+
* components that need to show different content during hydration.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* function ClientOnlyComponent() {
|
|
85
|
+
* const isHydrating = createHydrationState();
|
|
86
|
+
*
|
|
87
|
+
* return (
|
|
88
|
+
* <Show when={!isHydrating()} fallback={<LoadingPlaceholder />}>
|
|
89
|
+
* <InteractiveWidget />
|
|
90
|
+
* </Show>
|
|
91
|
+
* );
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare function createHydrationState(): Accessor<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Hook that returns `true` during SSR and initial hydration.
|
|
98
|
+
* Use this to delay browser-specific code until hydration is complete.
|
|
99
|
+
*
|
|
100
|
+
* Unlike `createIsSSR()` which is static, this updates reactively
|
|
101
|
+
* after hydration completes.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```tsx
|
|
105
|
+
* function BrowserOnlyFeature() {
|
|
106
|
+
* const isSSR = useIsSSR();
|
|
107
|
+
*
|
|
108
|
+
* createEffect(() => {
|
|
109
|
+
* if (!isSSR()) {
|
|
110
|
+
* // Safe to access browser APIs here
|
|
111
|
+
* window.localStorage.getItem('key');
|
|
112
|
+
* }
|
|
113
|
+
* });
|
|
114
|
+
*
|
|
115
|
+
* return <Show when={!isSSR()}>...</Show>;
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export declare function useIsSSR(): Accessor<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Creates an effect that only runs on the client after hydration.
|
|
122
|
+
* This is a convenience wrapper that ensures browser-specific code
|
|
123
|
+
* doesn't run during SSR.
|
|
124
|
+
*
|
|
125
|
+
* @param fn - The effect function to run
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* function Analytics() {
|
|
130
|
+
* createBrowserEffect(() => {
|
|
131
|
+
* // Safe to access window, document, localStorage, etc.
|
|
132
|
+
* window.analytics.track('page_view');
|
|
133
|
+
* });
|
|
134
|
+
*
|
|
135
|
+
* return null;
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
export declare function createBrowserEffect(fn: () => void | (() => void)): void;
|
|
140
|
+
/**
|
|
141
|
+
* Creates a value that is computed only on the client.
|
|
142
|
+
* On the server, returns the fallback value.
|
|
143
|
+
*
|
|
144
|
+
* @param fn - Function to compute the value on the client
|
|
145
|
+
* @param fallback - Value to return during SSR
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```tsx
|
|
149
|
+
* function WindowSize() {
|
|
150
|
+
* const width = createBrowserValue(
|
|
151
|
+
* () => window.innerWidth,
|
|
152
|
+
* 0
|
|
153
|
+
* );
|
|
154
|
+
*
|
|
155
|
+
* return <span>Width: {width()}</span>;
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
export declare function createBrowserValue<T>(fn: () => T, fallback: T): Accessor<T>;
|
|
160
|
+
/**
|
|
161
|
+
* Returns the window object if available, or undefined during SSR.
|
|
162
|
+
* Useful for accessing browser globals safely.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```tsx
|
|
166
|
+
* const win = getWindow();
|
|
167
|
+
* if (win) {
|
|
168
|
+
* win.addEventListener('resize', handler);
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
export declare function getWindow(): Window | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* Returns the document object if available, or undefined during SSR.
|
|
175
|
+
* Useful for accessing document safely.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```tsx
|
|
179
|
+
* const doc = getDocument();
|
|
180
|
+
* if (doc) {
|
|
181
|
+
* doc.addEventListener('keydown', handler);
|
|
182
|
+
* }
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
export declare function getDocument(): Document | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Returns the owner document of an element, with SSR safety.
|
|
188
|
+
*
|
|
189
|
+
* @param el - The element to get the owner document from
|
|
190
|
+
*/
|
|
191
|
+
export declare function getOwnerDocument(el: Element | null | undefined): Document | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Returns the owner window of an element, with SSR safety.
|
|
194
|
+
*
|
|
195
|
+
* @param el - The element to get the owner window from
|
|
196
|
+
*/
|
|
197
|
+
export declare function getOwnerWindow(el: Element | null | undefined): Window | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Gets the appropriate container for portals, with SSR safety.
|
|
200
|
+
* Returns the specified container, or document.body on the client,
|
|
201
|
+
* or undefined during SSR.
|
|
202
|
+
*
|
|
203
|
+
* @param container - Optional custom container element
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* function Modal(props) {
|
|
208
|
+
* const container = getPortalContainer(props.container);
|
|
209
|
+
*
|
|
210
|
+
* return (
|
|
211
|
+
* <Show when={container}>
|
|
212
|
+
* <Portal mount={container}>
|
|
213
|
+
* {props.children}
|
|
214
|
+
* </Portal>
|
|
215
|
+
* </Show>
|
|
216
|
+
* );
|
|
217
|
+
* }
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
export declare function getPortalContainer(container?: Element): Element | undefined;
|
|
221
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssr/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,WAAW,EASjB,MAAM,UAAU,CAAC;AAOlB,MAAM,WAAW,gBAAiB,SAAQ,WAAW;CAAG;AAExD,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,KAAK,EAAE,OAAO,CAAC;IACf,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,SAAY,CAAC;AAEnC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAOnD;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAiBtF;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,OAAO,CAAC,CAcxD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAE5C;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAWvE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,EAAE,EAAE,MAAM,CAAC,EACX,QAAQ,EAAE,CAAC,GACV,QAAQ,CAAC,CAAC,CAAC,CAYb;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,SAAS,CAK9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CAKlD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAErF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEjF;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAK3E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for a switch component.
|
|
5
|
+
* A switch is similar to a checkbox, but represents on/off values as opposed to selection.
|
|
6
|
+
*
|
|
7
|
+
* This is a 1:1 port of @react-aria/switch's useSwitch hook.
|
|
8
|
+
*/
|
|
9
|
+
import { JSX, Accessor } from 'solid-js';
|
|
10
|
+
import { type AriaToggleProps } from '../toggle/createToggle';
|
|
11
|
+
import { type ToggleState } from '@proyecto-viviana/solid-stately';
|
|
12
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
13
|
+
export interface AriaSwitchProps extends AriaToggleProps {
|
|
14
|
+
}
|
|
15
|
+
export interface SwitchAria {
|
|
16
|
+
/** Props for the label wrapper element. */
|
|
17
|
+
labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
|
|
18
|
+
/** Props for the input element. */
|
|
19
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
20
|
+
/** Whether the switch is selected. */
|
|
21
|
+
isSelected: Accessor<boolean>;
|
|
22
|
+
/** Whether the switch is in a pressed state. */
|
|
23
|
+
isPressed: Accessor<boolean>;
|
|
24
|
+
/** Whether the switch is disabled. */
|
|
25
|
+
isDisabled: boolean;
|
|
26
|
+
/** Whether the switch is read only. */
|
|
27
|
+
isReadOnly: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Provides the behavior and accessibility implementation for a switch component.
|
|
31
|
+
* A switch is similar to a checkbox, but represents on/off values as opposed to selection.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createSwitch(props: MaybeAccessor<AriaSwitchProps>, state: ToggleState, ref: () => HTMLInputElement | null): SwitchAria;
|
|
34
|
+
//# sourceMappingURL=createSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSwitch.d.ts","sourceRoot":"","sources":["../../src/switch/createSwitch.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,MAAM,WAAW,eAAgB,SAAQ,eAAe;CAEvD;AAED,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,sCAAsC;IACtC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B,gDAAgD;IAChD,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,gBAAgB,GAAG,IAAI,GACjC,UAAU,CAoBZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createTable - Provides accessibility for a table component.
|
|
3
|
+
* Based on @react-aria/table/useTable.
|
|
4
|
+
*/
|
|
5
|
+
import { type Accessor } from 'solid-js';
|
|
6
|
+
import type { TableState, TableCollection, Key } from '@proyecto-viviana/solid-stately';
|
|
7
|
+
import type { AriaTableProps, TableAria } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Get the table metadata for child components.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getTableData<T>(state: TableState<T, TableCollection<T>>): {
|
|
12
|
+
tableId: string;
|
|
13
|
+
actions: {
|
|
14
|
+
onRowAction?: (key: Key) => void;
|
|
15
|
+
onCellAction?: (key: Key) => void;
|
|
16
|
+
};
|
|
17
|
+
shouldSelectOnPressUp?: boolean;
|
|
18
|
+
focusMode?: "row" | "cell";
|
|
19
|
+
} | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Creates accessibility props for a table component.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createTable<T extends object>(props: Accessor<AriaTableProps>, state: Accessor<TableState<T, TableCollection<T>>>, ref: Accessor<HTMLTableElement | null>): TableAria;
|
|
24
|
+
//# sourceMappingURL=createTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTable.d.ts","sourceRoot":"","sources":["../../src/table/createTable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgC,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGvE,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAY,MAAM,iCAAiC,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAezD;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;aAV3D,MAAM;aACN;QAAE,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;KAAE;4BACxD,OAAO;gBACnB,KAAK,GAAG,MAAM;cAS7B;AAgCD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,EAC/B,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,EAClD,GAAG,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,GACrC,SAAS,CAycX"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createTableCell - Provides accessibility for a table cell.
|
|
3
|
+
* Based on @react-aria/table/useTableCell.
|
|
4
|
+
*/
|
|
5
|
+
import { type Accessor } from 'solid-js';
|
|
6
|
+
import type { TableState, TableCollection } from '@proyecto-viviana/solid-stately';
|
|
7
|
+
import type { AriaTableCellProps, TableCellAria } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Creates accessibility props for a table cell.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createTableCell<T extends object>(props: Accessor<AriaTableCellProps>, state: Accessor<TableState<T, TableCollection<T>>>, _ref: Accessor<HTMLTableCellElement | null>): TableCellAria;
|
|
12
|
+
//# sourceMappingURL=createTableCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTableCell.d.ts","sourceRoot":"","sources":["../../src/table/createTableCell.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA4B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGjE;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAC9C,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EACnC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,EAClD,IAAI,EAAE,QAAQ,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAC1C,aAAa,CAgIf"}
|