@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACrF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ACX,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the accessibility implementation for input fields.
|
|
5
|
+
* Fields accept user input, gain context from their label, and may display
|
|
6
|
+
* a description or error message.
|
|
7
|
+
*
|
|
8
|
+
* This is a 1:1 port of @react-aria/label's useField hook.
|
|
9
|
+
*/
|
|
10
|
+
import { JSX } from 'solid-js';
|
|
11
|
+
import { type LabelAriaProps, type LabelAria } from './createLabel';
|
|
12
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
13
|
+
export interface HelpTextProps {
|
|
14
|
+
/** A description for the field. Provides a hint such as specific requirements for what to choose. */
|
|
15
|
+
description?: JSX.Element;
|
|
16
|
+
/** An error message for the field. */
|
|
17
|
+
errorMessage?: JSX.Element | ((validation: ValidationResult) => JSX.Element);
|
|
18
|
+
}
|
|
19
|
+
export interface ValidationResult {
|
|
20
|
+
/** Whether the input value is invalid. */
|
|
21
|
+
isInvalid: boolean;
|
|
22
|
+
/** The current error messages for the input if it is invalid, otherwise an empty array. */
|
|
23
|
+
validationErrors: string[];
|
|
24
|
+
/** The native validity state for the input. */
|
|
25
|
+
validationDetails: ValidityState;
|
|
26
|
+
}
|
|
27
|
+
export interface Validation<T> {
|
|
28
|
+
/** Whether the input value is invalid. */
|
|
29
|
+
isInvalid?: boolean;
|
|
30
|
+
/** Whether the input is required before form submission. */
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
/** A function that returns an error message if a given value is invalid. */
|
|
33
|
+
validate?: (value: T) => string | string[] | true | null | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation<any>, 'isRequired'> {
|
|
36
|
+
}
|
|
37
|
+
export interface FieldAria extends LabelAria {
|
|
38
|
+
/** Props for the description element, if any. */
|
|
39
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
40
|
+
/** Props for the error message element, if any. */
|
|
41
|
+
errorMessageProps: JSX.HTMLAttributes<HTMLElement>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Provides the accessibility implementation for input fields.
|
|
45
|
+
* Fields accept user input, gain context from their label, and may display
|
|
46
|
+
* a description or error message.
|
|
47
|
+
*
|
|
48
|
+
* @param props - Props for the Field.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createField(props: MaybeAccessor<AriaFieldProps>): FieldAria;
|
|
51
|
+
//# sourceMappingURL=createField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createField.d.ts","sourceRoot":"","sources":["../../src/label/createField.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,SAAS,EAAyC,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,aAAa;IAC5B,qGAAqG;IACrG,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,sCAAsC;IACtC,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,UAAU,EAAE,gBAAgB,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,2FAA2F;IAC3F,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,+CAA+C;IAC/C,iBAAiB,EAAE,aAAa,CAAC;CAClC;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC;CAAG;AAE7G,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,iDAAiD;IACjD,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,mDAAmD;IACnD,iBAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CACpD;AAMD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,SAAS,CA+E3E"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the accessibility implementation for labels and their associated elements.
|
|
5
|
+
* Labels provide context for user inputs.
|
|
6
|
+
*
|
|
7
|
+
* This is a 1:1 port of @react-aria/label's useLabel hook.
|
|
8
|
+
*/
|
|
9
|
+
import { JSX } from 'solid-js';
|
|
10
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
11
|
+
export interface AriaLabelingProps {
|
|
12
|
+
/** Defines a string value that labels the current element. */
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
17
|
+
'aria-describedby'?: string;
|
|
18
|
+
/** Identifies the element (or elements) that provide a detailed, extended description for the object. */
|
|
19
|
+
'aria-details'?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface LabelableProps {
|
|
22
|
+
/** The content to display as the label. */
|
|
23
|
+
label?: JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
export interface DOMProps {
|
|
26
|
+
/** The element's unique identifier. */
|
|
27
|
+
id?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {
|
|
30
|
+
/**
|
|
31
|
+
* The HTML element used to render the label, e.g. 'label', or 'span'.
|
|
32
|
+
* @default 'label'
|
|
33
|
+
*/
|
|
34
|
+
labelElementType?: 'label' | 'span' | 'div';
|
|
35
|
+
}
|
|
36
|
+
export interface LabelAria {
|
|
37
|
+
/** Props to apply to the label container element. */
|
|
38
|
+
labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement> | JSX.HTMLAttributes<HTMLSpanElement>;
|
|
39
|
+
/** Props to apply to the field container element being labeled. */
|
|
40
|
+
fieldProps: AriaLabelingProps & DOMProps;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Provides the accessibility implementation for labels and their associated elements.
|
|
44
|
+
* Labels provide context for user inputs.
|
|
45
|
+
*
|
|
46
|
+
* @param props - The props for labels and fields.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createLabel(props: MaybeAccessor<LabelAriaProps>): LabelAria;
|
|
49
|
+
//# sourceMappingURL=createLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLabel.d.ts","sourceRoot":"","sources":["../../src/label/createLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAG/B,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAOjE,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,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,cAAc;IAC7B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc,EAAE,QAAQ,EAAE,iBAAiB;IACjF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;CAC7C;AAED,MAAM,WAAW,SAAS;IACxB,qDAAqD;IACrD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IAC5F,mEAAmE;IACnE,UAAU,EAAE,iBAAiB,GAAG,QAAQ,CAAC;CAC1C;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,SAAS,CAmD3E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Labels utility for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Merges aria-label and aria-labelledby into aria-labelledby when both exist.
|
|
5
|
+
*
|
|
6
|
+
* This is a 1:1 port of @react-aria/utils's useLabels hook.
|
|
7
|
+
*/
|
|
8
|
+
import type { AriaLabelingProps, DOMProps } from './createLabel';
|
|
9
|
+
/**
|
|
10
|
+
* Merges aria-label and aria-labelledby into aria-labelledby when both exist.
|
|
11
|
+
*
|
|
12
|
+
* @param props - Aria label props.
|
|
13
|
+
* @param defaultLabel - Default value for aria-label when not present.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createLabels(props: DOMProps & AriaLabelingProps, defaultLabel?: string): DOMProps & AriaLabelingProps;
|
|
16
|
+
//# sourceMappingURL=createLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLabels.d.ts","sourceRoot":"","sources":["../../src/label/createLabels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,GAAG,iBAAiB,EACnC,YAAY,CAAC,EAAE,MAAM,GACpB,QAAQ,GAAG,iBAAiB,CA6B9B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createLabel } from './createLabel';
|
|
2
|
+
export type { LabelAriaProps, LabelAria, AriaLabelingProps, LabelableProps, DOMProps, } from './createLabel';
|
|
3
|
+
export { createField } from './createField';
|
|
4
|
+
export type { AriaFieldProps, FieldAria, HelpTextProps, ValidationResult, Validation, } from './createField';
|
|
5
|
+
export { createLabels } from './createLabels';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createLandmark - SolidJS implementation of React Aria's useLandmark
|
|
3
|
+
*
|
|
4
|
+
* Provides landmark navigation in an application. Call this with a role and label
|
|
5
|
+
* to register a landmark navigable with the F6 key.
|
|
6
|
+
*
|
|
7
|
+
* ARIA landmarks help screen reader users navigate between major sections of a page.
|
|
8
|
+
* The F6 key (or Shift+F6) cycles through all registered landmarks.
|
|
9
|
+
*/
|
|
10
|
+
import type { JSX, Accessor } from 'solid-js';
|
|
11
|
+
import { type MaybeAccessor } from '../utils';
|
|
12
|
+
/** ARIA landmark roles */
|
|
13
|
+
export type AriaLandmarkRole = 'main' | 'region' | 'search' | 'navigation' | 'form' | 'banner' | 'contentinfo' | 'complementary';
|
|
14
|
+
export interface AriaLandmarkProps {
|
|
15
|
+
/** The ARIA landmark role. */
|
|
16
|
+
role: AriaLandmarkRole;
|
|
17
|
+
/**
|
|
18
|
+
* A human-readable label for the landmark.
|
|
19
|
+
* Required when multiple landmarks with the same role exist on a page.
|
|
20
|
+
*/
|
|
21
|
+
'aria-label'?: string;
|
|
22
|
+
/** Identifies the element(s) that labels the landmark. */
|
|
23
|
+
'aria-labelledby'?: string;
|
|
24
|
+
/** The element's unique identifier. */
|
|
25
|
+
id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* A custom focus handler called when this landmark receives focus via F6 navigation.
|
|
28
|
+
* Use this to focus a specific element within the landmark instead of the container.
|
|
29
|
+
*/
|
|
30
|
+
focus?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export interface LandmarkAria<T extends HTMLElement = HTMLElement> {
|
|
33
|
+
/** Props to spread on the landmark element. */
|
|
34
|
+
landmarkProps: JSX.HTMLAttributes<T>;
|
|
35
|
+
}
|
|
36
|
+
export interface LandmarkController {
|
|
37
|
+
/** Focus the next landmark in DOM order. */
|
|
38
|
+
focusNext: () => void;
|
|
39
|
+
/** Focus the previous landmark in DOM order. */
|
|
40
|
+
focusPrevious: () => void;
|
|
41
|
+
/** Focus the main landmark. */
|
|
42
|
+
focusMain: () => void;
|
|
43
|
+
/** Navigate to a specific landmark by role. If multiple exist, the first one is focused. */
|
|
44
|
+
navigate: (role: AriaLandmarkRole) => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Provides landmark navigation in an application.
|
|
48
|
+
* Call this with a role and label to register a landmark navigable with F6.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* function Navigation(props) {
|
|
53
|
+
* let ref: HTMLElement;
|
|
54
|
+
* const { landmarkProps } = createLandmark({
|
|
55
|
+
* role: 'navigation',
|
|
56
|
+
* 'aria-label': 'Main navigation'
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* return (
|
|
60
|
+
* <nav {...landmarkProps} ref={ref}>
|
|
61
|
+
* {props.children}
|
|
62
|
+
* </nav>
|
|
63
|
+
* );
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function createLandmark<T extends HTMLElement = HTMLElement>(props: MaybeAccessor<AriaLandmarkProps>, ref: Accessor<T | undefined>): LandmarkAria<T>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a controller for programmatic landmark navigation.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* const controller = getLandmarkController();
|
|
74
|
+
* controller.focusMain(); // Focus the main landmark
|
|
75
|
+
* controller.focusNext(); // Focus the next landmark
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare function getLandmarkController(): LandmarkController;
|
|
79
|
+
//# sourceMappingURL=createLandmark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLandmark.d.ts","sourceRoot":"","sources":["../../src/landmark/createLandmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO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"index.d.ts","sourceRoot":"","sources":["../../src/landmark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link hook for Solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides the behavior and accessibility implementation for a link component.
|
|
5
|
+
* A link allows a user to navigate to another page or resource within a web page
|
|
6
|
+
* or application.
|
|
7
|
+
*
|
|
8
|
+
* This is a 1:1 port of @react-aria/link's useLink hook.
|
|
9
|
+
*/
|
|
10
|
+
import { type Accessor } from 'solid-js';
|
|
11
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
12
|
+
import { type PressEvent } from '../interactions/PressEvent';
|
|
13
|
+
export interface AriaLinkProps {
|
|
14
|
+
/** Whether the link is disabled. */
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
/** The HTML element used to render the link, e.g. 'a', or 'span'. @default 'a' */
|
|
17
|
+
elementType?: string;
|
|
18
|
+
/** The URL to link to. */
|
|
19
|
+
href?: string;
|
|
20
|
+
/** The target window for the link. */
|
|
21
|
+
target?: string;
|
|
22
|
+
/** The relationship between the linked resource and the current page. */
|
|
23
|
+
rel?: string;
|
|
24
|
+
/** Handler that is called when the press is released over the target. */
|
|
25
|
+
onPress?: (e: PressEvent) => void;
|
|
26
|
+
/** Handler that is called when a press interaction starts. */
|
|
27
|
+
onPressStart?: (e: PressEvent) => void;
|
|
28
|
+
/** Handler that is called when a press interaction ends. */
|
|
29
|
+
onPressEnd?: (e: PressEvent) => void;
|
|
30
|
+
/** Handler that is called when the element is clicked. */
|
|
31
|
+
onClick?: (e: MouseEvent) => void;
|
|
32
|
+
/** Handler that is called when the element receives focus. */
|
|
33
|
+
onFocus?: (e: FocusEvent) => void;
|
|
34
|
+
/** Handler that is called when the element loses focus. */
|
|
35
|
+
onBlur?: (e: FocusEvent) => void;
|
|
36
|
+
/** Handler that is called when the element's focus status changes. */
|
|
37
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
38
|
+
/** Handler that is called when a key is pressed. */
|
|
39
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
40
|
+
/** Handler that is called when a key is released. */
|
|
41
|
+
onKeyUp?: (e: KeyboardEvent) => void;
|
|
42
|
+
/** Whether to autofocus the element. */
|
|
43
|
+
autoFocus?: boolean;
|
|
44
|
+
/** Indicates the current "page" or state within a set of related elements. */
|
|
45
|
+
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
|
|
46
|
+
/** Defines a string value that labels the current element. */
|
|
47
|
+
'aria-label'?: string;
|
|
48
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
49
|
+
'aria-labelledby'?: string;
|
|
50
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
51
|
+
'aria-describedby'?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface LinkAria {
|
|
54
|
+
/** Props for the link element. */
|
|
55
|
+
linkProps: Record<string, unknown>;
|
|
56
|
+
/** Whether the link is currently pressed. */
|
|
57
|
+
isPressed: Accessor<boolean>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Provides the behavior and accessibility implementation for a link component.
|
|
61
|
+
* A link allows a user to navigate to another page or resource within a web page
|
|
62
|
+
* or application.
|
|
63
|
+
*/
|
|
64
|
+
export declare function createLink(props?: MaybeAccessor<AriaLinkProps>): LinkAria;
|
|
65
|
+
//# sourceMappingURL=createLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLink.d.ts","sourceRoot":"","sources":["../../src/link/createLink.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,KAAK,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GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAC7F,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,6CAA6C;IAC7C,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC9B;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,GAAE,aAAa,CAAC,aAAa,CAAM,GACvC,QAAQ,CAoGV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a listbox component.
|
|
3
|
+
* A listbox displays a list of options and allows a user to select one or more of them.
|
|
4
|
+
* Based on @react-aria/listbox useListBox.
|
|
5
|
+
*/
|
|
6
|
+
import { type JSX } from 'solid-js';
|
|
7
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
8
|
+
import type { ListState, Key } from '@proyecto-viviana/solid-stately';
|
|
9
|
+
export interface AriaListBoxProps {
|
|
10
|
+
/** An ID for the listbox. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Whether the listbox is disabled. */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** The label for the listbox. */
|
|
15
|
+
label?: JSX.Element;
|
|
16
|
+
/** An accessible label for the listbox when no visible label is provided. */
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
/** The ID of an element that labels the listbox. */
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
/** The ID of an element that describes the listbox. */
|
|
21
|
+
'aria-describedby'?: string;
|
|
22
|
+
/** Handler called when focus moves into the listbox. */
|
|
23
|
+
onFocus?: (e: FocusEvent) => void;
|
|
24
|
+
/** Handler called when focus moves out of the listbox. */
|
|
25
|
+
onBlur?: (e: FocusEvent) => void;
|
|
26
|
+
/** Handler called when the focus state changes. */
|
|
27
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
28
|
+
/** Handler called when an item is activated (pressed). */
|
|
29
|
+
onAction?: (key: Key) => void;
|
|
30
|
+
/** Whether focus should automatically wrap around. */
|
|
31
|
+
shouldFocusWrap?: boolean;
|
|
32
|
+
/** Whether selection should occur on press up. */
|
|
33
|
+
shouldSelectOnPressUp?: boolean;
|
|
34
|
+
/** Whether to focus items on hover. */
|
|
35
|
+
shouldFocusOnHover?: boolean;
|
|
36
|
+
/** Whether type-to-select is disabled. @default false */
|
|
37
|
+
disallowTypeAhead?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface ListBoxAria {
|
|
40
|
+
/** Props for the listbox element. */
|
|
41
|
+
listBoxProps: JSX.HTMLAttributes<HTMLElement>;
|
|
42
|
+
/** Props for the listbox's label element (if any). */
|
|
43
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
44
|
+
}
|
|
45
|
+
interface ListBoxData {
|
|
46
|
+
id: string;
|
|
47
|
+
onAction?: (key: Key) => void;
|
|
48
|
+
shouldSelectOnPressUp?: boolean;
|
|
49
|
+
shouldFocusOnHover?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare function getListBoxData(state: ListState): ListBoxData | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Provides the behavior and accessibility implementation for a listbox component.
|
|
54
|
+
* A listbox displays a list of options and allows a user to select one or more of them.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createListBox<T>(props: MaybeAccessor<AriaListBoxProps>, state: ListState<T>, _ref?: () => HTMLElement | null): ListBoxAria;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=createListBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createListBox.d.ts","sourceRoot":"","sources":["../../src/listbox/createListBox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA2B,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAO7D,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,sDAAsD;IACtD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kDAAkD;IAClD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uCAAuC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,sDAAsD;IACtD,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CAC7C;AAKD,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAExE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,EACtC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,IAAI,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,GAC9B,WAAW,CA+Lb"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for an option in a listbox.
|
|
3
|
+
* Based on @react-aria/listbox useOption.
|
|
4
|
+
*/
|
|
5
|
+
import { type JSX, type Accessor } from 'solid-js';
|
|
6
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
7
|
+
import type { ListState, Key } from '@proyecto-viviana/solid-stately';
|
|
8
|
+
export interface AriaOptionProps {
|
|
9
|
+
/** The unique key for the option. */
|
|
10
|
+
key: Key;
|
|
11
|
+
/** Whether the option is disabled. */
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
/** An accessible label for the option. */
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
/** Whether selection should occur on press up. */
|
|
16
|
+
shouldSelectOnPressUp?: boolean;
|
|
17
|
+
/** Whether to focus the option on hover. */
|
|
18
|
+
shouldFocusOnHover?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface OptionAria {
|
|
21
|
+
/** Props for the option element. */
|
|
22
|
+
optionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
23
|
+
/** Props for the label text inside the option. */
|
|
24
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
25
|
+
/** Props for the description text inside the option. */
|
|
26
|
+
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
27
|
+
/** Whether the option is currently selected. */
|
|
28
|
+
isSelected: Accessor<boolean>;
|
|
29
|
+
/** Whether the option is currently focused. */
|
|
30
|
+
isFocused: Accessor<boolean>;
|
|
31
|
+
/** Whether the option is keyboard focused. */
|
|
32
|
+
isFocusVisible: Accessor<boolean>;
|
|
33
|
+
/** Whether the option is currently pressed. */
|
|
34
|
+
isPressed: Accessor<boolean>;
|
|
35
|
+
/** Whether the option is disabled. */
|
|
36
|
+
isDisabled: Accessor<boolean>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Provides the behavior and accessibility implementation for an option in a listbox.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createOption<T>(props: MaybeAccessor<AriaOptionProps>, state: ListState<T>, _ref?: () => HTMLElement | null): OptionAria;
|
|
42
|
+
//# sourceMappingURL=createOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOption.d.ts","sourceRoot":"","sources":["../../src/listbox/createOption.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKnD,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IAC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zB,OAAO,EACL,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live announcer for solidaria
|
|
3
|
+
*
|
|
4
|
+
* Provides functions to make announcements to screen readers using
|
|
5
|
+
* ARIA live regions. Useful for announcing dynamic content changes.
|
|
6
|
+
*
|
|
7
|
+
* Port of react-aria's @react-aria/live-announcer.
|
|
8
|
+
*
|
|
9
|
+
* SSR Safety: All functions are safe to call during SSR. The announcer
|
|
10
|
+
* will only be created when running in the browser.
|
|
11
|
+
*/
|
|
12
|
+
export type Assertiveness = 'assertive' | 'polite';
|
|
13
|
+
export type Message = string | {
|
|
14
|
+
'aria-labelledby': string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Announces a message to screen readers using ARIA live regions.
|
|
18
|
+
*
|
|
19
|
+
* @param message - The message to announce, or an object with aria-labelledby
|
|
20
|
+
* @param assertiveness - 'assertive' interrupts, 'polite' waits for a pause
|
|
21
|
+
* @param timeout - How long to keep the message in the DOM (default 7000ms)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Simple announcement
|
|
26
|
+
* announce('Item added to cart');
|
|
27
|
+
*
|
|
28
|
+
* // Polite announcement (won't interrupt)
|
|
29
|
+
* announce('3 results found', 'polite');
|
|
30
|
+
*
|
|
31
|
+
* // Using aria-labelledby for complex content
|
|
32
|
+
* announce({ 'aria-labelledby': 'my-element-id' });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function announce(message: Message, assertiveness?: Assertiveness, timeout?: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* Clears all queued announcements for the given assertiveness level.
|
|
38
|
+
*
|
|
39
|
+
* @param assertiveness - Which log to clear ('assertive' or 'polite')
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Clear assertive announcements
|
|
44
|
+
* clearAnnouncer('assertive');
|
|
45
|
+
*
|
|
46
|
+
* // Clear polite announcements
|
|
47
|
+
* clearAnnouncer('polite');
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function clearAnnouncer(assertiveness?: Assertiveness): void;
|
|
51
|
+
/**
|
|
52
|
+
* Removes the live announcer from the DOM entirely.
|
|
53
|
+
* Call this when unmounting your app or when announcements are no longer needed.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* // Clean up on app unmount
|
|
58
|
+
* onCleanup(() => {
|
|
59
|
+
* destroyAnnouncer();
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function destroyAnnouncer(): void;
|
|
64
|
+
export interface UseAnnouncerResult {
|
|
65
|
+
/** Announce a message to screen readers. */
|
|
66
|
+
announce: (message: Message, assertiveness?: Assertiveness, timeout?: number) => void;
|
|
67
|
+
/** Clear announcements for the given assertiveness level. */
|
|
68
|
+
clear: (assertiveness?: Assertiveness) => void;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Hook that provides access to the live announcer with automatic cleanup.
|
|
72
|
+
*
|
|
73
|
+
* This is the recommended way to use the announcer in SolidJS components.
|
|
74
|
+
* It ensures the announcer is created only on the client and provides
|
|
75
|
+
* type-safe methods for announcing and clearing messages.
|
|
76
|
+
*
|
|
77
|
+
* SSR Safety: Returns no-op functions during SSR. The announcer is only
|
|
78
|
+
* created when the component mounts on the client.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```tsx
|
|
82
|
+
* function SearchResults(props) {
|
|
83
|
+
* const announcer = useAnnouncer();
|
|
84
|
+
*
|
|
85
|
+
* createEffect(() => {
|
|
86
|
+
* const count = props.results.length;
|
|
87
|
+
* announcer.announce(`${count} results found`, 'polite');
|
|
88
|
+
* });
|
|
89
|
+
*
|
|
90
|
+
* return <ul>...</ul>;
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* function Form() {
|
|
97
|
+
* const announcer = useAnnouncer();
|
|
98
|
+
*
|
|
99
|
+
* const onSubmit = async () => {
|
|
100
|
+
* try {
|
|
101
|
+
* await submitForm();
|
|
102
|
+
* announcer.announce('Form submitted successfully');
|
|
103
|
+
* } catch (error) {
|
|
104
|
+
* announcer.announce('Error submitting form', 'assertive');
|
|
105
|
+
* }
|
|
106
|
+
* };
|
|
107
|
+
*
|
|
108
|
+
* return <form onSubmit={onSubmit}>...</form>;
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare function useAnnouncer(): UseAnnouncerResult;
|
|
113
|
+
//# sourceMappingURL=announce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../../src/live-announcer/announce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC;AA8H7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,OAAO,EAChB,aAAa,GAAE,aAA2B,EAC1C,OAAO,GAAE,MAAiC,GACzC,IAAI,CAwBN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAIlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC;AAMD,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,QAAQ,EAAE,CACR,OAAO,EAAE,OAAO,EAChB,aAAa,CAAC,EAAE,aAAa,EAC7B,OAAO,CAAC,EAAE,MAAM,KACb,IAAI,CAAC;IACV,6DAA6D;IAC7D,KAAK,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CA6BjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/live-announcer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the behavior and accessibility implementation for a menu component.
|
|
3
|
+
* A menu displays a list of actions or options that a user can choose.
|
|
4
|
+
* Based on @react-aria/menu useMenu.
|
|
5
|
+
*/
|
|
6
|
+
import { type JSX, type Accessor } from 'solid-js';
|
|
7
|
+
import { type MaybeAccessor } from '../utils/reactivity';
|
|
8
|
+
import type { MenuState, Key } from '@proyecto-viviana/solid-stately';
|
|
9
|
+
export interface AriaMenuProps {
|
|
10
|
+
/** An ID for the menu. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Whether the menu is disabled. */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** The label for the menu. */
|
|
15
|
+
label?: JSX.Element;
|
|
16
|
+
/** An accessible label for the menu when no visible label is provided. */
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
/** The ID of an element that labels the menu. */
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
/** The ID of an element that describes the menu. */
|
|
21
|
+
'aria-describedby'?: string;
|
|
22
|
+
/** Handler called when focus moves into the menu. */
|
|
23
|
+
onFocus?: (e: FocusEvent) => void;
|
|
24
|
+
/** Handler called when focus moves out of the menu. */
|
|
25
|
+
onBlur?: (e: FocusEvent) => void;
|
|
26
|
+
/** Handler called when the focus state changes. */
|
|
27
|
+
onFocusChange?: (isFocused: boolean) => void;
|
|
28
|
+
/** Handler called when an item is activated (pressed). */
|
|
29
|
+
onAction?: (key: Key) => void;
|
|
30
|
+
/** Handler called when the menu should close. */
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
/** Whether focus should automatically wrap around. */
|
|
33
|
+
shouldFocusWrap?: boolean;
|
|
34
|
+
/** Whether to auto-focus the first item when the menu opens. */
|
|
35
|
+
autoFocus?: boolean | 'first' | 'last';
|
|
36
|
+
/** Whether type-to-select is disabled. @default false */
|
|
37
|
+
disallowTypeAhead?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface MenuAria {
|
|
40
|
+
/** Props for the menu element. */
|
|
41
|
+
menuProps: JSX.HTMLAttributes<HTMLElement>;
|
|
42
|
+
/** Props for the menu's label element (if any). */
|
|
43
|
+
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
44
|
+
}
|
|
45
|
+
interface MenuData {
|
|
46
|
+
id: string;
|
|
47
|
+
onAction?: (key: Key) => void;
|
|
48
|
+
onClose?: () => void;
|
|
49
|
+
}
|
|
50
|
+
export declare function getMenuData(state: MenuState): MenuData | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Provides the behavior and accessibility implementation for a menu component.
|
|
53
|
+
* A menu displays a list of actions or options that a user can choose.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createMenu<T>(props: MaybeAccessor<AriaMenuProps>, state: MenuState<T>, ref?: Accessor<HTMLElement | null>): MenuAria;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=createMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMenu.d.ts","sourceRoot":"","sources":["../../src/menu/createMenu.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA2B,KAAK,GAAG,EAAE,KAAK,QA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