@proyecto-viviana/solidaria 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +1120 -485
- package/dist/index.js.map +7 -0
- package/dist/{index.jsx → index.ssr.js} +143 -89
- package/dist/index.ssr.js.map +7 -0
- 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 -4
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles positioning overlays like popovers and menus relative to a trigger
|
|
3
|
+
* element, and updating the position when the window resizes.
|
|
4
|
+
*
|
|
5
|
+
* Ported from @react-aria/overlays useOverlayPosition.
|
|
6
|
+
*/
|
|
7
|
+
import { type JSX } from 'solid-js';
|
|
8
|
+
import { type Placement, type PlacementAxis } from './calculatePosition';
|
|
9
|
+
export interface PositionProps {
|
|
10
|
+
/**
|
|
11
|
+
* The placement of the element with respect to its anchor element.
|
|
12
|
+
* @default 'bottom'
|
|
13
|
+
*/
|
|
14
|
+
placement?: Placement;
|
|
15
|
+
/**
|
|
16
|
+
* The placement padding that should be applied between the element and its
|
|
17
|
+
* surrounding container.
|
|
18
|
+
* @default 12
|
|
19
|
+
*/
|
|
20
|
+
containerPadding?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The additional offset applied along the main axis between the element and its
|
|
23
|
+
* anchor element.
|
|
24
|
+
* @default 0
|
|
25
|
+
*/
|
|
26
|
+
offset?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The additional offset applied along the cross axis between the element and its
|
|
29
|
+
* anchor element.
|
|
30
|
+
* @default 0
|
|
31
|
+
*/
|
|
32
|
+
crossOffset?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the element should flip its orientation (e.g. top to bottom or left to right) when
|
|
35
|
+
* there is insufficient room for it to render completely.
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
shouldFlip?: boolean;
|
|
39
|
+
/** Whether the overlay is currently open. */
|
|
40
|
+
isOpen?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface AriaPositionProps extends PositionProps {
|
|
43
|
+
/**
|
|
44
|
+
* Cross size of the overlay arrow in pixels.
|
|
45
|
+
* @default 0
|
|
46
|
+
*/
|
|
47
|
+
arrowSize?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Element that that serves as the positioning boundary.
|
|
50
|
+
* @default document.body
|
|
51
|
+
*/
|
|
52
|
+
boundaryElement?: Element;
|
|
53
|
+
/**
|
|
54
|
+
* The ref for the element which the overlay positions itself with respect to.
|
|
55
|
+
*/
|
|
56
|
+
targetRef: () => Element | null;
|
|
57
|
+
/**
|
|
58
|
+
* The ref for the overlay element.
|
|
59
|
+
*/
|
|
60
|
+
overlayRef: () => Element | null;
|
|
61
|
+
/**
|
|
62
|
+
* The ref for the arrow element.
|
|
63
|
+
*/
|
|
64
|
+
arrowRef?: () => Element | null;
|
|
65
|
+
/**
|
|
66
|
+
* A ref for the scrollable region within the overlay.
|
|
67
|
+
* @default overlayRef
|
|
68
|
+
*/
|
|
69
|
+
scrollRef?: () => Element | null;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the overlay should update its position automatically.
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
shouldUpdatePosition?: boolean;
|
|
75
|
+
/** Handler that is called when the overlay should close. */
|
|
76
|
+
onClose?: (() => void) | null;
|
|
77
|
+
/**
|
|
78
|
+
* The maxHeight specified for the overlay element.
|
|
79
|
+
* By default, it will take all space up to the current viewport height.
|
|
80
|
+
*/
|
|
81
|
+
maxHeight?: number;
|
|
82
|
+
/**
|
|
83
|
+
* The minimum distance the arrow's edge should be from the edge of the overlay element.
|
|
84
|
+
* @default 0
|
|
85
|
+
*/
|
|
86
|
+
arrowBoundaryOffset?: number;
|
|
87
|
+
}
|
|
88
|
+
export interface PositionAria {
|
|
89
|
+
/** Props for the overlay container element. */
|
|
90
|
+
overlayProps: JSX.HTMLAttributes<HTMLElement>;
|
|
91
|
+
/** Props for the overlay tip arrow if any. */
|
|
92
|
+
arrowProps: JSX.HTMLAttributes<HTMLElement>;
|
|
93
|
+
/** Placement of the overlay with respect to the overlay trigger. */
|
|
94
|
+
placement: () => PlacementAxis | null;
|
|
95
|
+
/** The origin of the target in the overlay's coordinate system. Useful for animations. */
|
|
96
|
+
triggerAnchorPoint: () => {
|
|
97
|
+
x: number;
|
|
98
|
+
y: number;
|
|
99
|
+
} | null;
|
|
100
|
+
/** Updates the position of the overlay. */
|
|
101
|
+
updatePosition: () => void;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Handles positioning overlays like popovers and menus relative to a trigger
|
|
105
|
+
* element, and updating the position when the window resizes.
|
|
106
|
+
*/
|
|
107
|
+
export declare function createOverlayPosition(props: AriaPositionProps): PositionAria;
|
|
108
|
+
export { type Placement, type PlacementAxis } from './calculatePosition';
|
|
109
|
+
//# sourceMappingURL=createOverlayPosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOverlayPosition.d.ts","sourceRoot":"","sources":["../../src/popover/createOverlayPosition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,8CAA8C;IAC9C,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,oEAAoE;IACpE,SAAS,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IACtC,0FAA0F;IAC1F,kBAAkB,EAAE,MAAM;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1D,2CAA2C;IAC3C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAWD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAsO5E;AAED,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a popover component.
|
|
3
|
+
* A popover is an overlay element positioned relative to a trigger.
|
|
4
|
+
*
|
|
5
|
+
* Ported from @react-aria/overlays usePopover.
|
|
6
|
+
*/
|
|
7
|
+
import { type JSX } from 'solid-js';
|
|
8
|
+
import { type AriaPositionProps, type PlacementAxis } from './createOverlayPosition';
|
|
9
|
+
export interface OverlayTriggerState {
|
|
10
|
+
/** Whether the overlay is currently open. */
|
|
11
|
+
isOpen: () => boolean;
|
|
12
|
+
/** Opens the overlay. */
|
|
13
|
+
open: () => void;
|
|
14
|
+
/** Closes the overlay. */
|
|
15
|
+
close: () => void;
|
|
16
|
+
/** Toggles the overlay's open state. */
|
|
17
|
+
toggle: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface AriaPopoverProps extends Omit<AriaPositionProps, 'isOpen' | 'onClose' | 'targetRef' | 'overlayRef'> {
|
|
20
|
+
/**
|
|
21
|
+
* The ref for the element which the popover positions itself with respect to.
|
|
22
|
+
*/
|
|
23
|
+
triggerRef: () => Element | null;
|
|
24
|
+
/**
|
|
25
|
+
* The ref for the popover element.
|
|
26
|
+
*/
|
|
27
|
+
popoverRef: () => Element | null;
|
|
28
|
+
/** A ref for the popover arrow element. */
|
|
29
|
+
arrowRef?: () => Element | null;
|
|
30
|
+
/**
|
|
31
|
+
* An optional ref for a group of popovers, e.g. submenus.
|
|
32
|
+
* When provided, this element is used to detect outside interactions
|
|
33
|
+
* and hiding elements from assistive technologies instead of the popoverRef.
|
|
34
|
+
*/
|
|
35
|
+
groupRef?: () => Element | null;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the popover is non-modal, i.e. elements outside the popover may be
|
|
38
|
+
* interacted with by assistive technologies.
|
|
39
|
+
*
|
|
40
|
+
* Most popovers should not use this option as it may negatively impact the screen
|
|
41
|
+
* reader experience. Only use with components such as combobox, which are designed
|
|
42
|
+
* to handle this situation carefully.
|
|
43
|
+
*/
|
|
44
|
+
isNonModal?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether pressing the escape key to close the popover should be disabled.
|
|
47
|
+
*
|
|
48
|
+
* Most popovers should not use this option. When set to true, an alternative
|
|
49
|
+
* way to close the popover with a keyboard must be provided.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
isKeyboardDismissDisabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* When user interacts with the argument element outside of the popover ref,
|
|
56
|
+
* return true if onClose should be called. This gives you a chance to filter
|
|
57
|
+
* out interaction with elements that should not dismiss the popover.
|
|
58
|
+
* By default, onClose will always be called on interaction outside the popover ref.
|
|
59
|
+
*/
|
|
60
|
+
shouldCloseOnInteractOutside?: (element: Element) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The type of trigger that opened the popover.
|
|
63
|
+
* Used for submenu detection.
|
|
64
|
+
*/
|
|
65
|
+
trigger?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface PopoverAria {
|
|
68
|
+
/** Props for the popover element. */
|
|
69
|
+
popoverProps: JSX.HTMLAttributes<HTMLElement>;
|
|
70
|
+
/** Props for the popover tip arrow if any. */
|
|
71
|
+
arrowProps: JSX.HTMLAttributes<HTMLElement>;
|
|
72
|
+
/** Props to apply to the underlay element, if any. */
|
|
73
|
+
underlayProps: JSX.HTMLAttributes<HTMLElement>;
|
|
74
|
+
/** Placement of the popover with respect to the trigger. */
|
|
75
|
+
placement: () => PlacementAxis | null;
|
|
76
|
+
/** The origin of the target in the overlay's coordinate system. Useful for animations. */
|
|
77
|
+
triggerAnchorPoint: () => {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
} | null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Provides the behavior and accessibility implementation for a popover component.
|
|
84
|
+
* A popover is an overlay element positioned relative to a trigger.
|
|
85
|
+
*/
|
|
86
|
+
export declare function createPopover(props: AriaPopoverProps, state: OverlayTriggerState): PopoverAria;
|
|
87
|
+
export { type PlacementAxis } from './createOverlayPosition';
|
|
88
|
+
//# sourceMappingURL=createPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPopover.d.ts","sourceRoot":"","sources":["../../src/popover/createPopover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA2B,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,yBAAyB;IACzB,IAAI,EAAE,MAAM,IAAI,CAAC;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AgB,EACvB,KAAK,EAAE,mBAAmB,GACzB,WAAW,CAoEb;AAED,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createPopover, type AriaPopoverProps, type PopoverAria, type OverlayTriggerState, } from './createPopover';
|
|
2
|
+
export { createOverlayPosition, type AriaPositionProps, type PositionProps, type PositionAria, } from './createOverlayPosition';
|
|
3
|
+
export { calculatePosition, type Placement, type PlacementAxis, type PositionOpts, type PositionResult, } from './calculatePosition';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressBar hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the accessibility implementation for a progress bar component.
|
|
5
|
+
* Progress bars show either determinate or indeterminate progress of an operation
|
|
6
|
+
* over time.
|
|
7
|
+
*
|
|
8
|
+
* This is a 1:1 port of @react-aria/progress's useProgressBar hook.
|
|
9
|
+
*/
|
|
10
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
11
|
+
export interface AriaProgressBarProps {
|
|
12
|
+
/** The current value (controlled). */
|
|
13
|
+
value?: number;
|
|
14
|
+
/** The smallest value allowed for the input. @default 0 */
|
|
15
|
+
minValue?: number;
|
|
16
|
+
/** The largest value allowed for the input. @default 100 */
|
|
17
|
+
maxValue?: number;
|
|
18
|
+
/** The content to display as the value's label (e.g. 1 of 4). */
|
|
19
|
+
valueLabel?: string;
|
|
20
|
+
/** Whether presentation is indeterminate when progress isn't known. */
|
|
21
|
+
isIndeterminate?: boolean;
|
|
22
|
+
/** The display format of the value label. */
|
|
23
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
24
|
+
/** The content to display as the label. */
|
|
25
|
+
label?: string;
|
|
26
|
+
/** An accessibility label for this item. */
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
29
|
+
'aria-labelledby'?: string;
|
|
30
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
31
|
+
'aria-describedby'?: string;
|
|
32
|
+
/** Identifies the element (or elements) that provide a detailed, extended description for the object. */
|
|
33
|
+
'aria-details'?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ProgressBarAria {
|
|
36
|
+
/** Props for the progress bar container element. */
|
|
37
|
+
progressBarProps: Record<string, unknown>;
|
|
38
|
+
/** Props for the progress bar's visual label element (if any). */
|
|
39
|
+
labelProps: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Provides the accessibility implementation for a progress bar component.
|
|
43
|
+
* Progress bars show either determinate or indeterminate progress of an operation
|
|
44
|
+
* over time.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createProgressBar(props?: MaybeAccessor<AriaProgressBarProps>): ProgressBarAria;
|
|
47
|
+
//# sourceMappingURL=createProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createProgressBar.d.ts","sourceRoot":"","sources":["../../src/progress/createProgressBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACzC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yGAAyG;IACzG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAcD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,GAAE,aAAa,CAAC,oBAAoB,CAAM,GAC9C,eAAe,CAyDjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radio hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for an individual
|
|
5
|
+
* radio button in a radio group.
|
|
6
|
+
*
|
|
7
|
+
* This is a 1:1 port of @react-aria/radio's useRadio hook.
|
|
8
|
+
*/
|
|
9
|
+
import { JSX, Accessor } from 'solid-js';
|
|
10
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
11
|
+
import { type RadioGroupState } from '@proyecto-viviana/solid-stately';
|
|
12
|
+
import { type PressEvent } from '../interactions/PressEvent';
|
|
13
|
+
export interface AriaRadioProps {
|
|
14
|
+
/** The value of the radio button, used when submitting an HTML form. */
|
|
15
|
+
value: string;
|
|
16
|
+
/** Whether the radio button is disabled. */
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/** The label for the radio button. */
|
|
19
|
+
children?: JSX.Element;
|
|
20
|
+
/** Defines a string value that labels the current element. */
|
|
21
|
+
'aria-label'?: string;
|
|
22
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
23
|
+
'aria-labelledby'?: string;
|
|
24
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
25
|
+
'aria-describedby'?: string;
|
|
26
|
+
/** Handler that is called when the press is released over the target. */
|
|
27
|
+
onPress?: (e: PressEvent) => void;
|
|
28
|
+
/** Handler that is called when a press interaction starts. */
|
|
29
|
+
onPressStart?: (e: PressEvent) => void;
|
|
30
|
+
/** Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. */
|
|
31
|
+
onPressEnd?: (e: PressEvent) => void;
|
|
32
|
+
/** Handler that is called when the press state changes. */
|
|
33
|
+
onPressChange?: (isPressed: boolean) => void;
|
|
34
|
+
/** Handler that is called when a press is released over the target, regardless of whether it started on the target or not. */
|
|
35
|
+
onPressUp?: (e: PressEvent) => void;
|
|
36
|
+
/** Handler that is called when the element is clicked. */
|
|
37
|
+
onClick?: (e: MouseEvent) => void;
|
|
38
|
+
/** Handler that is called when the element receives focus. */
|
|
39
|
+
onFocus?: (e: FocusEvent) => void;
|
|
40
|
+
/** Handler that is called when the element loses focus. */
|
|
41
|
+
onBlur?: (e: FocusEvent) => void;
|
|
42
|
+
/** Handler that is called when the element's focus status changes. */
|
|
43
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
44
|
+
/** Handler that is called when a key is pressed. */
|
|
45
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
46
|
+
/** Handler that is called when a key is released. */
|
|
47
|
+
onKeyUp?: (e: KeyboardEvent) => void;
|
|
48
|
+
/** Whether to autofocus the element. */
|
|
49
|
+
autoFocus?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface RadioAria {
|
|
52
|
+
/** Props for the label wrapper element. */
|
|
53
|
+
labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
|
|
54
|
+
/** Props for the input element. */
|
|
55
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
56
|
+
/** Whether the radio is disabled. */
|
|
57
|
+
isDisabled: boolean;
|
|
58
|
+
/** Whether the radio is currently selected. */
|
|
59
|
+
isSelected: Accessor<boolean>;
|
|
60
|
+
/** Whether the radio is in a pressed state. */
|
|
61
|
+
isPressed: Accessor<boolean>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Provides the behavior and accessibility implementation for an individual
|
|
65
|
+
* radio button in a radio group.
|
|
66
|
+
*/
|
|
67
|
+
export declare function createRadio(props: MaybeAccessor<AriaRadioProps>, state: RadioGroupState, ref: () => HTMLInputElement | null): RadioAria;
|
|
68
|
+
//# sourceMappingURL=createRadio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRadio.d.ts","sourceRoot":"","sources":["../../src/radio/createRadio.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAKvD,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,4BAA4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a,KAAK,IAAI,CAAC;IACrC,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,qCAAqC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B,+CAA+C;IAC/C,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC9B;AAMD;;;GAGG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,EACpC,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,MAAM,gBAAgB,GAAG,IAAI,GACjC,SAAS,CAsMX"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radio group hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for a radio group component.
|
|
5
|
+
* Radio groups allow users to select a single item from a list of mutually exclusive options.
|
|
6
|
+
*
|
|
7
|
+
* This is a 1:1 port of @react-aria/radio's useRadioGroup hook.
|
|
8
|
+
*/
|
|
9
|
+
import { JSX } from 'solid-js';
|
|
10
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
11
|
+
import { type RadioGroupState } from '@proyecto-viviana/solid-stately';
|
|
12
|
+
export interface AriaRadioGroupProps {
|
|
13
|
+
/** The content to display as the label. */
|
|
14
|
+
label?: JSX.Element;
|
|
15
|
+
/** A description for the radio group. Provides additional context. */
|
|
16
|
+
description?: JSX.Element;
|
|
17
|
+
/** An error message for the radio group. */
|
|
18
|
+
errorMessage?: JSX.Element | ((validation: {
|
|
19
|
+
isInvalid: boolean;
|
|
20
|
+
validationErrors: string[];
|
|
21
|
+
}) => JSX.Element);
|
|
22
|
+
/** Whether the radio group is disabled. */
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
/** Whether the radio group is read only. */
|
|
25
|
+
isReadOnly?: boolean;
|
|
26
|
+
/** Whether the radio group is required. */
|
|
27
|
+
isRequired?: boolean;
|
|
28
|
+
/** Whether the radio group is invalid. */
|
|
29
|
+
isInvalid?: boolean;
|
|
30
|
+
/** The axis the Radio Button(s) should align with. Defaults to 'vertical'. */
|
|
31
|
+
orientation?: 'horizontal' | 'vertical';
|
|
32
|
+
/** The name of the radio group, used when submitting an HTML form. */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** The form to associate the radio group with. */
|
|
35
|
+
form?: string;
|
|
36
|
+
/** Validation behavior for the radio group. */
|
|
37
|
+
validationBehavior?: 'aria' | 'native';
|
|
38
|
+
/** Handler that is called when the radio group receives focus. */
|
|
39
|
+
onFocus?: (e: FocusEvent) => void;
|
|
40
|
+
/** Handler that is called when the radio group loses focus. */
|
|
41
|
+
onBlur?: (e: FocusEvent) => void;
|
|
42
|
+
/** Handler that is called when the radio group's focus status changes. */
|
|
43
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
44
|
+
/** Defines a string value that labels the current element. */
|
|
45
|
+
'aria-label'?: string;
|
|
46
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
47
|
+
'aria-labelledby'?: string;
|
|
48
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
49
|
+
'aria-describedby'?: string;
|
|
50
|
+
/** Identifies the element (or elements) that provide an error message for the object. */
|
|
51
|
+
'aria-errormessage'?: string;
|
|
52
|
+
/** The element's unique identifier. */
|
|
53
|
+
id?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface RadioGroupAria {
|
|
56
|
+
/** Props for the radio group wrapper element. */
|
|
57
|
+
radioGroupProps: JSX.HTMLAttributes<HTMLDivElement>;
|
|
58
|
+
/** Props for the radio group's visible label (if any). */
|
|
59
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
60
|
+
/** Props for the radio group description element, if any. */
|
|
61
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
62
|
+
/** Props for the radio group error message element, if any. */
|
|
63
|
+
errorMessageProps: JSX.HTMLAttributes<HTMLElement>;
|
|
64
|
+
/** Whether the radio group is invalid. */
|
|
65
|
+
isInvalid: boolean;
|
|
66
|
+
/** Validation errors, if any. */
|
|
67
|
+
validationErrors: string[];
|
|
68
|
+
/** Validation details, if any. */
|
|
69
|
+
validationDetails: Record<string, boolean>;
|
|
70
|
+
}
|
|
71
|
+
interface RadioGroupData {
|
|
72
|
+
name: string;
|
|
73
|
+
form: string | undefined;
|
|
74
|
+
descriptionId: string | undefined;
|
|
75
|
+
errorMessageId: string | undefined;
|
|
76
|
+
validationBehavior: 'aria' | 'native';
|
|
77
|
+
}
|
|
78
|
+
export declare const radioGroupData: WeakMap<RadioGroupState, RadioGroupData>;
|
|
79
|
+
/**
|
|
80
|
+
* Provides the behavior and accessibility implementation for a radio group component.
|
|
81
|
+
* Radio groups allow users to select a single item from a list of mutually exclusive options.
|
|
82
|
+
*/
|
|
83
|
+
export declare function createRadioGroup(props: MaybeAccessor<AriaRadioGroupProps>, state: RadioGroupState): RadioGroupAria;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=createRadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRadioGroup.d.ts","sourceRoot":"","sources":["../../src/radio/createRadioGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAM/B,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvE,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAA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AW,cAAc;IAC7B,iDAAiD;IACjD,eAAe,EAAE,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACpD,0DAA0D;IAC1D,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,6DAA6D;IAC7D,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,+DAA+D;IAC/D,iBAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACnD,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,kCAAkC;IAClC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAGD,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,kBAAkB,EAAE,MAAM,GAAG,QAAQ,CAAC;CACvC;AAED,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,eAAe,EAAE,cAAc,CAAiB,CAAC;AAMtF;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,EACzC,KAAK,EAAE,eAAe,GACrB,cAAc,CAsFhB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radio group state for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides state management for a radio group component.
|
|
5
|
+
* Provides a name for the group, and manages selection and focus state.
|
|
6
|
+
*
|
|
7
|
+
* This is a 1:1 port of @react-stately/radio's useRadioGroupState.
|
|
8
|
+
*/
|
|
9
|
+
import { Accessor } from 'solid-js';
|
|
10
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
11
|
+
export interface RadioGroupProps {
|
|
12
|
+
/** The current selected value (controlled). */
|
|
13
|
+
value?: string | null;
|
|
14
|
+
/** The default selected value (uncontrolled). */
|
|
15
|
+
defaultValue?: string | null;
|
|
16
|
+
/** Handler that is called when the value changes. */
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
/** Whether the radio group is disabled. */
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
/** Whether the radio group is read only. */
|
|
21
|
+
isReadOnly?: boolean;
|
|
22
|
+
/** Whether the radio group is required. */
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
/** Whether the radio group is invalid. */
|
|
25
|
+
isInvalid?: boolean;
|
|
26
|
+
/** The name of the radio group, used when submitting an HTML form. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** The form to associate the radio group with. */
|
|
29
|
+
form?: string;
|
|
30
|
+
/** The label for the radio group. */
|
|
31
|
+
label?: string;
|
|
32
|
+
/** Orientation of the radio group. */
|
|
33
|
+
orientation?: 'horizontal' | 'vertical';
|
|
34
|
+
/** Handler that is called when the radio group receives focus. */
|
|
35
|
+
onFocus?: (e: FocusEvent) => void;
|
|
36
|
+
/** Handler that is called when the radio group loses focus. */
|
|
37
|
+
onBlur?: (e: FocusEvent) => void;
|
|
38
|
+
/** Handler that is called when the radio group's focus status changes. */
|
|
39
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
40
|
+
}
|
|
41
|
+
export interface RadioGroupState {
|
|
42
|
+
/** The name for the group, used for native form submission. */
|
|
43
|
+
readonly name: string;
|
|
44
|
+
/** Whether the radio group is disabled. */
|
|
45
|
+
readonly isDisabled: boolean;
|
|
46
|
+
/** Whether the radio group is read only. */
|
|
47
|
+
readonly isReadOnly: boolean;
|
|
48
|
+
/** Whether the radio group is required. */
|
|
49
|
+
readonly isRequired: boolean;
|
|
50
|
+
/** Whether the radio group is invalid. */
|
|
51
|
+
readonly isInvalid: boolean;
|
|
52
|
+
/** The currently selected value. */
|
|
53
|
+
readonly selectedValue: Accessor<string | null>;
|
|
54
|
+
/** The default selected value. */
|
|
55
|
+
readonly defaultSelectedValue: string | null;
|
|
56
|
+
/** Sets the selected value. */
|
|
57
|
+
setSelectedValue(value: string | null): void;
|
|
58
|
+
/** The value of the last focused radio. */
|
|
59
|
+
readonly lastFocusedValue: Accessor<string | null>;
|
|
60
|
+
/** Sets the last focused value. */
|
|
61
|
+
setLastFocusedValue(value: string | null): void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Internal WeakMap to store sync version accessors for each radio group state.
|
|
65
|
+
* This is used by createRadio to trigger DOM sync when native radio behavior
|
|
66
|
+
* causes the DOM checked state to desync from our reactive state.
|
|
67
|
+
*
|
|
68
|
+
* This is kept separate from RadioGroupState to maintain API parity with React-Aria.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare const radioGroupSyncVersion: WeakMap<RadioGroupState, Accessor<number>>;
|
|
72
|
+
/**
|
|
73
|
+
* Provides state management for a radio group component.
|
|
74
|
+
* Provides a name for the group, and manages selection and focus state.
|
|
75
|
+
*/
|
|
76
|
+
export declare function createRadioGroupState(props?: MaybeAccessor<RadioGroupProps>): RadioGroupState;
|
|
77
|
+
//# sourceMappingURL=createRadioGroupState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRadioGroupState.d.ts","sourceRoot":"","sources":["../../src/radio/createRadioGroupState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgB,QAAQ,EAAW,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAOjE,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAA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KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE7C,2CAA2C;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEnD,mCAAmC;IACnC,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACjD;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAiB,CAAC;AAM/F;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,GAAE,aAAa,CAAC,eAAe,CAAM,GACzC,eAAe,CAgGjB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createRadioGroupState, radioGroupSyncVersion, type RadioGroupProps, type RadioGroupState, } from '@proyecto-viviana/solid-stately';
|
|
2
|
+
export { createRadioGroup, radioGroupData, type AriaRadioGroupProps, type RadioGroupAria, } from './createRadioGroup';
|
|
3
|
+
export { createRadio, type AriaRadioProps, type RadioAria, } from './createRadio';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radio/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a search field.
|
|
3
|
+
* A search field allows a user to enter and clear a search query.
|
|
4
|
+
* Based on @react-aria/searchfield useSearchField.
|
|
5
|
+
*/
|
|
6
|
+
import { type JSX } from 'solid-js';
|
|
7
|
+
import { type AriaTextFieldProps, type TextFieldAria } from '../textfield';
|
|
8
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
9
|
+
import type { SearchFieldState } from '@proyecto-viviana/solid-stately';
|
|
10
|
+
export interface AriaSearchFieldProps extends Omit<AriaTextFieldProps, 'type'> {
|
|
11
|
+
/** Handler that is called when the user submits the search (pressing Enter). */
|
|
12
|
+
onSubmit?: (value: string) => void;
|
|
13
|
+
/** Handler that is called when the clear button is pressed or Escape clears the field. */
|
|
14
|
+
onClear?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface SearchFieldAria extends Omit<TextFieldAria, 'inputProps'> {
|
|
17
|
+
/** Props for the input element. */
|
|
18
|
+
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
19
|
+
/** Props for the clear button. */
|
|
20
|
+
clearButtonProps: {
|
|
21
|
+
'aria-label': string;
|
|
22
|
+
tabIndex: number;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
onMouseDown: (e: MouseEvent) => void;
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Provides the behavior and accessibility implementation for a search field.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createSearchField(props: MaybeAccessor<AriaSearchFieldProps>, state: SearchFieldState, inputRef?: () => HTMLInputElement | null): SearchFieldAria;
|
|
32
|
+
//# sourceMappingURL=createSearchField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSearchField.d.ts","sourceRoot":"","sources":["../../src/searchfield/createSearchField.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAmB,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,cAA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