@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
package/dist/index.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { createContext, createSignal, createEffect, onCleanup, onMount, createMemo, useContext, createUniqueId, For, on } from 'solid-js';
|
|
2
|
-
import { isServer, createComponent, Portal, template, spread, insert, effect, memo, use } from 'solid-js/web';
|
|
3
|
-
import { radioGroupSyncVersion, createId as createId$1, normalizeColor, createDragState, createDropState } from '@proyecto-viviana/solid-stately';
|
|
4
|
-
export { createCheckboxGroupState, createRadioGroupState, createToggleState } from '@proyecto-viviana/solid-stately';
|
|
5
|
-
import { LocalizedStringFormatter, LocalizedStringDictionary } from '@internationalized/string';
|
|
6
|
-
|
|
7
1
|
// src/interactions/createPress.ts
|
|
2
|
+
import { createSignal as createSignal2, onCleanup as onCleanup3 } from "solid-js";
|
|
8
3
|
|
|
9
4
|
// src/interactions/PressEvent.ts
|
|
10
5
|
var PressEvent = class {
|
|
@@ -457,13 +452,13 @@ function isVirtualPointerEvent(event) {
|
|
|
457
452
|
return !isAndroid() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
458
453
|
}
|
|
459
454
|
function chain(...callbacks) {
|
|
460
|
-
return (
|
|
455
|
+
return (...args) => {
|
|
461
456
|
for (const callback of callbacks) {
|
|
462
457
|
if (typeof callback === "function") {
|
|
463
458
|
callback(...args);
|
|
464
459
|
}
|
|
465
460
|
}
|
|
466
|
-
}
|
|
461
|
+
};
|
|
467
462
|
}
|
|
468
463
|
function setEventTarget(event, target) {
|
|
469
464
|
Object.defineProperty(event, "target", {
|
|
@@ -631,6 +626,9 @@ function findFocusableAncestor(element) {
|
|
|
631
626
|
return element;
|
|
632
627
|
}
|
|
633
628
|
var focusSafely = focusWithoutScrolling;
|
|
629
|
+
|
|
630
|
+
// src/utils/globalListeners.ts
|
|
631
|
+
import { onCleanup } from "solid-js";
|
|
634
632
|
function createGlobalListeners() {
|
|
635
633
|
const listeners2 = [];
|
|
636
634
|
function addGlobalListener(type, handler, options) {
|
|
@@ -693,6 +691,10 @@ function isDevEnv() {
|
|
|
693
691
|
const nodeEnv = getEnvVar("NODE_ENV");
|
|
694
692
|
return nodeEnv !== "production";
|
|
695
693
|
}
|
|
694
|
+
|
|
695
|
+
// src/utils/createDescription.ts
|
|
696
|
+
import { createSignal, createEffect, onCleanup as onCleanup2 } from "solid-js";
|
|
697
|
+
import { isServer } from "solid-js/web";
|
|
696
698
|
var descriptionId = 0;
|
|
697
699
|
var descriptionNodes = /* @__PURE__ */ new Map();
|
|
698
700
|
function createDescription(description) {
|
|
@@ -721,7 +723,7 @@ function createDescription(description) {
|
|
|
721
723
|
setId(node.element.id);
|
|
722
724
|
}
|
|
723
725
|
node.refCount++;
|
|
724
|
-
|
|
726
|
+
onCleanup2(() => {
|
|
725
727
|
if (node && --node.refCount === 0) {
|
|
726
728
|
node.element.remove();
|
|
727
729
|
descriptionNodes.delete(desc);
|
|
@@ -749,7 +751,7 @@ function isPressedValue(isPressed) {
|
|
|
749
751
|
}
|
|
750
752
|
return isPressed ?? false;
|
|
751
753
|
}
|
|
752
|
-
var LINK_CLICKED =
|
|
754
|
+
var LINK_CLICKED = Symbol("linkClicked");
|
|
753
755
|
var pressableCSSInjected = false;
|
|
754
756
|
function injectPressableCSS() {
|
|
755
757
|
if (pressableCSSInjected || typeof document === "undefined") return;
|
|
@@ -764,7 +766,7 @@ function injectPressableCSS() {
|
|
|
764
766
|
pressableCSSInjected = true;
|
|
765
767
|
}
|
|
766
768
|
function createPress(props = {}) {
|
|
767
|
-
const [internalIsPressed, setInternalIsPressed] =
|
|
769
|
+
const [internalIsPressed, setInternalIsPressed] = createSignal2(false);
|
|
768
770
|
const isPressed = () => {
|
|
769
771
|
const controlledPressed = isPressedValue(props.isPressed);
|
|
770
772
|
if (controlledPressed) {
|
|
@@ -1269,7 +1271,7 @@ function createPress(props = {}) {
|
|
|
1269
1271
|
// Attribute for CSS touch-action
|
|
1270
1272
|
"data-solidaria-pressable": ""
|
|
1271
1273
|
};
|
|
1272
|
-
|
|
1274
|
+
onCleanup3(() => {
|
|
1273
1275
|
removeAllGlobalListeners();
|
|
1274
1276
|
if (pressState.clickCleanup) {
|
|
1275
1277
|
pressState.clickCleanup();
|
|
@@ -1281,6 +1283,9 @@ function createPress(props = {}) {
|
|
|
1281
1283
|
pressProps
|
|
1282
1284
|
};
|
|
1283
1285
|
}
|
|
1286
|
+
|
|
1287
|
+
// src/interactions/createLongPress.ts
|
|
1288
|
+
import { onCleanup as onCleanup4 } from "solid-js";
|
|
1284
1289
|
var DEFAULT_THRESHOLD = 500;
|
|
1285
1290
|
function isDisabledValue2(isDisabled) {
|
|
1286
1291
|
return typeof isDisabled === "function" ? isDisabled() : !!isDisabled;
|
|
@@ -1354,7 +1359,7 @@ function createLongPress(props = {}) {
|
|
|
1354
1359
|
const descriptionProps = createDescription(
|
|
1355
1360
|
() => onLongPress && !isDisabledValue2(isDisabled) ? accessibilityDescription : void 0
|
|
1356
1361
|
);
|
|
1357
|
-
|
|
1362
|
+
onCleanup4(() => {
|
|
1358
1363
|
if (timeoutId) {
|
|
1359
1364
|
clearTimeout(timeoutId);
|
|
1360
1365
|
timeoutId = void 0;
|
|
@@ -1370,6 +1375,9 @@ function createLongPress(props = {}) {
|
|
|
1370
1375
|
longPressProps
|
|
1371
1376
|
};
|
|
1372
1377
|
}
|
|
1378
|
+
|
|
1379
|
+
// src/interactions/createMove.ts
|
|
1380
|
+
import { createSignal as createSignal3, createEffect as createEffect2, onCleanup as onCleanup5 } from "solid-js";
|
|
1373
1381
|
function createBaseEvent(originalEvent, pointerType) {
|
|
1374
1382
|
return {
|
|
1375
1383
|
pointerType,
|
|
@@ -1387,7 +1395,7 @@ function createMove(props = {}) {
|
|
|
1387
1395
|
id: null
|
|
1388
1396
|
};
|
|
1389
1397
|
const { addGlobalListener, removeGlobalListener } = createGlobalListeners();
|
|
1390
|
-
const [pointerDown, setPointerDown] =
|
|
1398
|
+
const [pointerDown, setPointerDown] = createSignal3(null);
|
|
1391
1399
|
const move = (originalEvent, pointerType, deltaX, deltaY) => {
|
|
1392
1400
|
if (deltaX === 0 && deltaY === 0) {
|
|
1393
1401
|
return;
|
|
@@ -1415,7 +1423,7 @@ function createMove(props = {}) {
|
|
|
1415
1423
|
});
|
|
1416
1424
|
}
|
|
1417
1425
|
};
|
|
1418
|
-
|
|
1426
|
+
createEffect2(() => {
|
|
1419
1427
|
const activePointer = pointerDown();
|
|
1420
1428
|
if (!activePointer) return;
|
|
1421
1429
|
if (activePointer === "pointer") {
|
|
@@ -1440,7 +1448,7 @@ function createMove(props = {}) {
|
|
|
1440
1448
|
addGlobalListener("pointermove", onPointerMove, { isWindow: true });
|
|
1441
1449
|
addGlobalListener("pointerup", onPointerUp, { isWindow: true });
|
|
1442
1450
|
addGlobalListener("pointercancel", onPointerUp, { isWindow: true });
|
|
1443
|
-
|
|
1451
|
+
onCleanup5(() => {
|
|
1444
1452
|
removeGlobalListener("pointermove", onPointerMove, { isWindow: true });
|
|
1445
1453
|
removeGlobalListener("pointerup", onPointerUp, { isWindow: true });
|
|
1446
1454
|
removeGlobalListener("pointercancel", onPointerUp, { isWindow: true });
|
|
@@ -1564,10 +1572,15 @@ function createMove(props = {}) {
|
|
|
1564
1572
|
e.stopPropagation();
|
|
1565
1573
|
triggerKeyboardMove(e, 0, 1);
|
|
1566
1574
|
break;
|
|
1575
|
+
default:
|
|
1576
|
+
break;
|
|
1567
1577
|
}
|
|
1568
1578
|
};
|
|
1569
1579
|
return { moveProps };
|
|
1570
1580
|
}
|
|
1581
|
+
|
|
1582
|
+
// src/interactions/createFocus.ts
|
|
1583
|
+
import { onCleanup as onCleanup6 } from "solid-js";
|
|
1571
1584
|
function getActiveElement(doc) {
|
|
1572
1585
|
let activeElement = doc.activeElement;
|
|
1573
1586
|
while (activeElement && activeElement.shadowRoot?.activeElement) {
|
|
@@ -1611,8 +1624,8 @@ function createSyntheticBlurHandler(_onBlur) {
|
|
|
1611
1624
|
function createFocus(props = {}) {
|
|
1612
1625
|
const { isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
|
|
1613
1626
|
let cleanupRef;
|
|
1614
|
-
const syntheticBlurHandler = createSyntheticBlurHandler();
|
|
1615
|
-
|
|
1627
|
+
const syntheticBlurHandler = createSyntheticBlurHandler(onBlurProp);
|
|
1628
|
+
onCleanup6(() => {
|
|
1616
1629
|
if (cleanupRef) {
|
|
1617
1630
|
cleanupRef();
|
|
1618
1631
|
}
|
|
@@ -1655,6 +1668,9 @@ function createFocus(props = {}) {
|
|
|
1655
1668
|
}
|
|
1656
1669
|
};
|
|
1657
1670
|
}
|
|
1671
|
+
|
|
1672
|
+
// src/interactions/createFocusWithin.ts
|
|
1673
|
+
import { onCleanup as onCleanup7 } from "solid-js";
|
|
1658
1674
|
function getActiveElement2(doc) {
|
|
1659
1675
|
let activeElement = doc.activeElement;
|
|
1660
1676
|
while (activeElement && activeElement.shadowRoot?.activeElement) {
|
|
@@ -1699,9 +1715,9 @@ function createFocusWithin(props = {}) {
|
|
|
1699
1715
|
const { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
|
|
1700
1716
|
let isFocusWithin = false;
|
|
1701
1717
|
const { addGlobalListener, removeAllGlobalListeners } = createGlobalListeners();
|
|
1702
|
-
const syntheticBlurHandler = createSyntheticBlurHandler2();
|
|
1718
|
+
const syntheticBlurHandler = createSyntheticBlurHandler2(onBlurWithin);
|
|
1703
1719
|
let cleanupRef;
|
|
1704
|
-
|
|
1720
|
+
onCleanup7(() => {
|
|
1705
1721
|
cleanupRef?.();
|
|
1706
1722
|
removeAllGlobalListeners();
|
|
1707
1723
|
});
|
|
@@ -1781,6 +1797,9 @@ function createFocusWithin(props = {}) {
|
|
|
1781
1797
|
};
|
|
1782
1798
|
}
|
|
1783
1799
|
|
|
1800
|
+
// src/interactions/createFocusable.ts
|
|
1801
|
+
import { createContext, useContext, onMount } from "solid-js";
|
|
1802
|
+
|
|
1784
1803
|
// src/interactions/createKeyboard.ts
|
|
1785
1804
|
function createEventHandler(handler) {
|
|
1786
1805
|
if (!handler) {
|
|
@@ -1817,6 +1836,14 @@ function createKeyboard(props = {}) {
|
|
|
1817
1836
|
var FocusableContext = createContext(null);
|
|
1818
1837
|
function useFocusableContext(setRef) {
|
|
1819
1838
|
const context = useContext(FocusableContext) || {};
|
|
1839
|
+
if (context.ref) {
|
|
1840
|
+
const contextRef = context.ref;
|
|
1841
|
+
const originalSetRef = setRef;
|
|
1842
|
+
setRef = (el) => {
|
|
1843
|
+
originalSetRef(el);
|
|
1844
|
+
contextRef(el);
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1820
1847
|
const { ref: _, ...otherProps } = context;
|
|
1821
1848
|
return otherProps;
|
|
1822
1849
|
}
|
|
@@ -1845,7 +1872,7 @@ function createFocusable(props = {}, ref) {
|
|
|
1845
1872
|
onKeyUp: props.onKeyUp
|
|
1846
1873
|
});
|
|
1847
1874
|
const interactions = mergeProps(focusProps, keyboardProps);
|
|
1848
|
-
const contextProps = useFocusableContext();
|
|
1875
|
+
const contextProps = useFocusableContext(setRef);
|
|
1849
1876
|
const interactionProps = isDisabledValue3(props.isDisabled) ? {} : contextProps;
|
|
1850
1877
|
onMount(() => {
|
|
1851
1878
|
if (props.autoFocus && elementRef && !autoFocusDone) {
|
|
@@ -1869,7 +1896,15 @@ function createFocusable(props = {}, ref) {
|
|
|
1869
1896
|
focusableProps
|
|
1870
1897
|
};
|
|
1871
1898
|
}
|
|
1899
|
+
|
|
1900
|
+
// src/interactions/createFocusRing.ts
|
|
1901
|
+
import { createSignal as createSignal5, createEffect as createEffect4, onCleanup as onCleanup9, createMemo } from "solid-js";
|
|
1902
|
+
|
|
1903
|
+
// src/interactions/createInteractionModality.ts
|
|
1904
|
+
import { createSignal as createSignal4, createEffect as createEffect3, onCleanup as onCleanup8 } from "solid-js";
|
|
1905
|
+
import { isServer as isServer2 } from "solid-js/web";
|
|
1872
1906
|
var currentModality = null;
|
|
1907
|
+
var currentPointerType = "keyboard";
|
|
1873
1908
|
var changeHandlers = /* @__PURE__ */ new Set();
|
|
1874
1909
|
var hasSetupGlobalListeners = /* @__PURE__ */ new Map();
|
|
1875
1910
|
var hasEventBeforeFocus = false;
|
|
@@ -1892,11 +1927,13 @@ function handleKeyboardEvent(e) {
|
|
|
1892
1927
|
const isOpening = openLink.isOpening;
|
|
1893
1928
|
if (!isOpening && isValidKey(e)) {
|
|
1894
1929
|
currentModality = "keyboard";
|
|
1930
|
+
currentPointerType = "keyboard";
|
|
1895
1931
|
triggerChangeHandlers("keyboard", e);
|
|
1896
1932
|
}
|
|
1897
1933
|
}
|
|
1898
1934
|
function handlePointerEvent(e) {
|
|
1899
1935
|
currentModality = "pointer";
|
|
1936
|
+
currentPointerType = "pointerType" in e ? e.pointerType : "mouse";
|
|
1900
1937
|
if (e.type === "mousedown" || e.type === "pointerdown") {
|
|
1901
1938
|
hasEventBeforeFocus = true;
|
|
1902
1939
|
triggerChangeHandlers("pointer", e);
|
|
@@ -1907,6 +1944,7 @@ function handleClickEvent(e) {
|
|
|
1907
1944
|
if (!isOpening && isVirtualClick(e)) {
|
|
1908
1945
|
hasEventBeforeFocus = true;
|
|
1909
1946
|
currentModality = "virtual";
|
|
1947
|
+
currentPointerType = "virtual";
|
|
1910
1948
|
}
|
|
1911
1949
|
}
|
|
1912
1950
|
function handleFocusEvent(e) {
|
|
@@ -1922,12 +1960,16 @@ function handleFocusEvent(e) {
|
|
|
1922
1960
|
}
|
|
1923
1961
|
if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {
|
|
1924
1962
|
currentModality = "virtual";
|
|
1963
|
+
currentPointerType = "virtual";
|
|
1925
1964
|
triggerChangeHandlers("virtual", e);
|
|
1926
1965
|
}
|
|
1927
1966
|
hasEventBeforeFocus = false;
|
|
1928
1967
|
hasBlurredWindowRecently = false;
|
|
1929
1968
|
}
|
|
1930
1969
|
function handleWindowBlur() {
|
|
1970
|
+
if (ignoreFocusEvent) {
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1931
1973
|
hasEventBeforeFocus = false;
|
|
1932
1974
|
hasBlurredWindowRecently = true;
|
|
1933
1975
|
}
|
|
@@ -2026,6 +2068,7 @@ function isFocusVisible() {
|
|
|
2026
2068
|
}
|
|
2027
2069
|
function setInteractionModality(modality) {
|
|
2028
2070
|
currentModality = modality;
|
|
2071
|
+
currentPointerType = modality === "pointer" ? "mouse" : modality;
|
|
2029
2072
|
triggerChangeHandlers(modality, null);
|
|
2030
2073
|
}
|
|
2031
2074
|
function isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
@@ -2067,14 +2110,14 @@ function createFocusVisibleListener(handler, opts) {
|
|
|
2067
2110
|
};
|
|
2068
2111
|
}
|
|
2069
2112
|
function createFocusVisible(props = {}) {
|
|
2070
|
-
if (
|
|
2113
|
+
if (isServer2) {
|
|
2071
2114
|
return { isFocusVisible: () => false };
|
|
2072
2115
|
}
|
|
2073
2116
|
const { isTextInput, autoFocus } = props;
|
|
2074
|
-
const [isVisible, setIsVisible] =
|
|
2075
|
-
|
|
2117
|
+
const [isVisible, setIsVisible] = createSignal4(autoFocus || isFocusVisible());
|
|
2118
|
+
createEffect3(() => {
|
|
2076
2119
|
const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput });
|
|
2077
|
-
|
|
2120
|
+
onCleanup8(cleanup);
|
|
2078
2121
|
});
|
|
2079
2122
|
return { isFocusVisible: isVisible };
|
|
2080
2123
|
}
|
|
@@ -2082,16 +2125,16 @@ function createFocusVisible(props = {}) {
|
|
|
2082
2125
|
// src/interactions/createFocusRing.ts
|
|
2083
2126
|
function createFocusRing(props = {}) {
|
|
2084
2127
|
const { isTextInput = false, autoFocus = false, within = false } = props;
|
|
2085
|
-
const [isFocused, setIsFocused] =
|
|
2086
|
-
const [focusVisibleFlag, setFocusVisibleFlag] =
|
|
2128
|
+
const [isFocused, setIsFocused] = createSignal5(false);
|
|
2129
|
+
const [focusVisibleFlag, setFocusVisibleFlag] = createSignal5(
|
|
2087
2130
|
autoFocus || isFocusVisible()
|
|
2088
2131
|
);
|
|
2089
2132
|
const isFocusVisible3 = createMemo(() => isFocused() && focusVisibleFlag());
|
|
2090
|
-
|
|
2133
|
+
createEffect4(() => {
|
|
2091
2134
|
const cleanup = createFocusVisibleListener((visible) => {
|
|
2092
2135
|
setFocusVisibleFlag(visible);
|
|
2093
2136
|
}, { isTextInput });
|
|
2094
|
-
|
|
2137
|
+
onCleanup9(cleanup);
|
|
2095
2138
|
});
|
|
2096
2139
|
const onFocusChange = (focused) => {
|
|
2097
2140
|
setIsFocused(focused);
|
|
@@ -2110,6 +2153,9 @@ function createFocusRing(props = {}) {
|
|
|
2110
2153
|
focusProps: within ? focusWithinResult.focusWithinProps : focusResult.focusProps
|
|
2111
2154
|
};
|
|
2112
2155
|
}
|
|
2156
|
+
|
|
2157
|
+
// src/interactions/createHover.ts
|
|
2158
|
+
import { createSignal as createSignal6, createEffect as createEffect5, onCleanup as onCleanup10, createMemo as createMemo2 } from "solid-js";
|
|
2113
2159
|
var globalIgnoreEmulatedMouseEvents = false;
|
|
2114
2160
|
var hoverCount = 0;
|
|
2115
2161
|
function setGlobalIgnoreEmulatedMouseEvents() {
|
|
@@ -2150,7 +2196,7 @@ function setupGlobalTouchEvents() {
|
|
|
2150
2196
|
}
|
|
2151
2197
|
function createHover(props = {}) {
|
|
2152
2198
|
const getProps = () => access(props);
|
|
2153
|
-
const [isHovered, setIsHovered] =
|
|
2199
|
+
const [isHovered, setIsHovered] = createSignal6(false);
|
|
2154
2200
|
const { addGlobalListener, removeAllGlobalListeners } = createGlobalListeners();
|
|
2155
2201
|
let state2 = {
|
|
2156
2202
|
isHovered: false,
|
|
@@ -2158,11 +2204,11 @@ function createHover(props = {}) {
|
|
|
2158
2204
|
pointerType: "",
|
|
2159
2205
|
target: null
|
|
2160
2206
|
};
|
|
2161
|
-
|
|
2207
|
+
createEffect5(() => {
|
|
2162
2208
|
const cleanup = setupGlobalTouchEvents();
|
|
2163
|
-
|
|
2209
|
+
onCleanup10(cleanup);
|
|
2164
2210
|
});
|
|
2165
|
-
|
|
2211
|
+
createEffect5(() => {
|
|
2166
2212
|
const p = getProps();
|
|
2167
2213
|
if (p.isDisabled && state2.isHovered) {
|
|
2168
2214
|
triggerHoverEnd(state2.target, state2.pointerType);
|
|
@@ -2207,7 +2253,7 @@ function createHover(props = {}) {
|
|
|
2207
2253
|
p.onHoverChange?.(false);
|
|
2208
2254
|
setIsHovered(false);
|
|
2209
2255
|
}
|
|
2210
|
-
const hoverProps =
|
|
2256
|
+
const hoverProps = createMemo2(() => {
|
|
2211
2257
|
if (typeof PointerEvent !== "undefined") {
|
|
2212
2258
|
return {
|
|
2213
2259
|
onPointerEnter: (e) => {
|
|
@@ -2360,6 +2406,9 @@ function createButton(props = {}) {
|
|
|
2360
2406
|
isPressed
|
|
2361
2407
|
};
|
|
2362
2408
|
}
|
|
2409
|
+
|
|
2410
|
+
// src/button/createToggleButton.ts
|
|
2411
|
+
import { createSignal as createSignal7 } from "solid-js";
|
|
2363
2412
|
function getSelectedValue(isSelected) {
|
|
2364
2413
|
if (typeof isSelected === "function") {
|
|
2365
2414
|
return isSelected();
|
|
@@ -2368,7 +2417,7 @@ function getSelectedValue(isSelected) {
|
|
|
2368
2417
|
}
|
|
2369
2418
|
function createToggleButton(props = {}) {
|
|
2370
2419
|
const isControlled = props.isSelected !== void 0;
|
|
2371
|
-
const [uncontrolledSelected, setUncontrolledSelected] =
|
|
2420
|
+
const [uncontrolledSelected, setUncontrolledSelected] = createSignal7(
|
|
2372
2421
|
props.defaultSelected ?? false
|
|
2373
2422
|
);
|
|
2374
2423
|
const isSelected = () => {
|
|
@@ -2405,6 +2454,15 @@ function createToggleButton(props = {}) {
|
|
|
2405
2454
|
isSelected
|
|
2406
2455
|
};
|
|
2407
2456
|
}
|
|
2457
|
+
|
|
2458
|
+
// src/checkbox/createCheckbox.ts
|
|
2459
|
+
import { createEffect as createEffect7 } from "solid-js";
|
|
2460
|
+
|
|
2461
|
+
// src/toggle/index.ts
|
|
2462
|
+
import { createToggleState } from "@proyecto-viviana/solid-stately";
|
|
2463
|
+
|
|
2464
|
+
// src/toggle/createToggle.ts
|
|
2465
|
+
import { createEffect as createEffect6 } from "solid-js";
|
|
2408
2466
|
function createToggle(props, state2, ref) {
|
|
2409
2467
|
const getProps = () => access(props);
|
|
2410
2468
|
const isDisabled = () => getProps().isDisabled ?? false;
|
|
@@ -2490,11 +2548,13 @@ function createToggle(props, state2, ref) {
|
|
|
2490
2548
|
}
|
|
2491
2549
|
state2.setSelected(e.currentTarget.checked);
|
|
2492
2550
|
};
|
|
2493
|
-
|
|
2551
|
+
createEffect6(() => {
|
|
2494
2552
|
const p = getProps();
|
|
2495
2553
|
const hasChildren = p.children != null;
|
|
2496
2554
|
const hasAriaLabel = p["aria-label"] != null || p["aria-labelledby"] != null;
|
|
2497
|
-
if (!hasChildren && !hasAriaLabel && isDevEnv())
|
|
2555
|
+
if (!hasChildren && !hasAriaLabel && isDevEnv()) {
|
|
2556
|
+
console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
2557
|
+
}
|
|
2498
2558
|
});
|
|
2499
2559
|
const combinedIsPressed = () => isPressed() || isLabelPressed();
|
|
2500
2560
|
return {
|
|
@@ -2540,7 +2600,7 @@ function createCheckbox(props, state2, inputRef) {
|
|
|
2540
2600
|
isReadOnly,
|
|
2541
2601
|
isInvalid
|
|
2542
2602
|
} = toggleResult;
|
|
2543
|
-
|
|
2603
|
+
createEffect7(() => {
|
|
2544
2604
|
const input = inputRef();
|
|
2545
2605
|
const isIndeterminate = getProps().isIndeterminate;
|
|
2546
2606
|
if (input) {
|
|
@@ -2580,29 +2640,37 @@ function createCheckbox(props, state2, inputRef) {
|
|
|
2580
2640
|
isInvalid
|
|
2581
2641
|
};
|
|
2582
2642
|
}
|
|
2583
|
-
|
|
2584
|
-
|
|
2643
|
+
|
|
2644
|
+
// src/checkbox/index.ts
|
|
2645
|
+
import { createCheckboxGroupState } from "@proyecto-viviana/solid-stately";
|
|
2646
|
+
|
|
2647
|
+
// src/ssr/index.tsx
|
|
2648
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2649
|
+
import { createContext as createContext2, createEffect as createEffect8, createMemo as createMemo3, createSignal as createSignal8, onCleanup as onCleanup11, onMount as onMount2, useContext as useContext2, createUniqueId } from "solid-js";
|
|
2650
|
+
import { isServer as isServer3 } from "solid-js/web";
|
|
2651
|
+
var SSRContext = createContext2({
|
|
2652
|
+
isSSR: isServer3,
|
|
2585
2653
|
prefix: ""
|
|
2586
2654
|
});
|
|
2587
2655
|
function createIsSSR() {
|
|
2588
|
-
return
|
|
2656
|
+
return isServer3;
|
|
2589
2657
|
}
|
|
2590
|
-
var canUseDOM = !
|
|
2658
|
+
var canUseDOM = !isServer3;
|
|
2591
2659
|
function createId(defaultId) {
|
|
2592
2660
|
if (defaultId) {
|
|
2593
2661
|
return defaultId;
|
|
2594
2662
|
}
|
|
2595
|
-
const ctx =
|
|
2663
|
+
const ctx = useContext2(SSRContext);
|
|
2596
2664
|
const uniqueId = createUniqueId();
|
|
2597
2665
|
return ctx.prefix ? `solidaria-${ctx.prefix}-${uniqueId}` : `solidaria-${uniqueId}`;
|
|
2598
2666
|
}
|
|
2599
2667
|
function SSRProvider(props) {
|
|
2600
|
-
const parentContext =
|
|
2601
|
-
const value =
|
|
2602
|
-
isSSR:
|
|
2668
|
+
const parentContext = useContext2(SSRContext);
|
|
2669
|
+
const value = createMemo3(() => ({
|
|
2670
|
+
isSSR: isServer3,
|
|
2603
2671
|
prefix: props.prefix ? parentContext.prefix ? `${parentContext.prefix}-${props.prefix}` : props.prefix : parentContext.prefix
|
|
2604
2672
|
}));
|
|
2605
|
-
return createComponent(SSRContext.Provider, {
|
|
2673
|
+
return _$createComponent(SSRContext.Provider, {
|
|
2606
2674
|
get value() {
|
|
2607
2675
|
return value();
|
|
2608
2676
|
},
|
|
@@ -2612,11 +2680,11 @@ function SSRProvider(props) {
|
|
|
2612
2680
|
});
|
|
2613
2681
|
}
|
|
2614
2682
|
function createHydrationState() {
|
|
2615
|
-
if (
|
|
2683
|
+
if (isServer3) {
|
|
2616
2684
|
return () => true;
|
|
2617
2685
|
}
|
|
2618
|
-
const [isHydrating, setIsHydrating] =
|
|
2619
|
-
|
|
2686
|
+
const [isHydrating, setIsHydrating] = createSignal8(true);
|
|
2687
|
+
onMount2(() => {
|
|
2620
2688
|
setIsHydrating(false);
|
|
2621
2689
|
});
|
|
2622
2690
|
return isHydrating;
|
|
@@ -2625,22 +2693,22 @@ function useIsSSR() {
|
|
|
2625
2693
|
return createHydrationState();
|
|
2626
2694
|
}
|
|
2627
2695
|
function createBrowserEffect(fn) {
|
|
2628
|
-
if (
|
|
2696
|
+
if (isServer3) {
|
|
2629
2697
|
return;
|
|
2630
2698
|
}
|
|
2631
|
-
|
|
2699
|
+
createEffect8(() => {
|
|
2632
2700
|
const cleanup = fn();
|
|
2633
2701
|
if (typeof cleanup === "function") {
|
|
2634
|
-
|
|
2702
|
+
onCleanup11(cleanup);
|
|
2635
2703
|
}
|
|
2636
2704
|
});
|
|
2637
2705
|
}
|
|
2638
2706
|
function createBrowserValue(fn, fallback) {
|
|
2639
|
-
if (
|
|
2707
|
+
if (isServer3) {
|
|
2640
2708
|
return () => fallback;
|
|
2641
2709
|
}
|
|
2642
|
-
const [value, setValue] =
|
|
2643
|
-
|
|
2710
|
+
const [value, setValue] = createSignal8(fallback);
|
|
2711
|
+
onMount2(() => {
|
|
2644
2712
|
setValue(() => fn());
|
|
2645
2713
|
});
|
|
2646
2714
|
return value;
|
|
@@ -2718,7 +2786,11 @@ function createLabel(props) {
|
|
|
2718
2786
|
let labelledBy = ariaLabelledby;
|
|
2719
2787
|
if (label) {
|
|
2720
2788
|
labelledBy = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
|
|
2721
|
-
} else if (!ariaLabelledby && !ariaLabel && isDevEnv())
|
|
2789
|
+
} else if (!ariaLabelledby && !ariaLabel && isDevEnv()) {
|
|
2790
|
+
console.warn(
|
|
2791
|
+
"If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility"
|
|
2792
|
+
);
|
|
2793
|
+
}
|
|
2722
2794
|
return createLabels({
|
|
2723
2795
|
id,
|
|
2724
2796
|
"aria-label": ariaLabel,
|
|
@@ -2929,6 +3001,12 @@ function createCheckboxGroupItem(props, state2, inputRef) {
|
|
|
2929
3001
|
};
|
|
2930
3002
|
}
|
|
2931
3003
|
|
|
3004
|
+
// src/radio/index.ts
|
|
3005
|
+
import {
|
|
3006
|
+
createRadioGroupState,
|
|
3007
|
+
radioGroupSyncVersion as radioGroupSyncVersion2
|
|
3008
|
+
} from "@proyecto-viviana/solid-stately";
|
|
3009
|
+
|
|
2932
3010
|
// src/radio/createRadioGroup.ts
|
|
2933
3011
|
var radioGroupData = /* @__PURE__ */ new WeakMap();
|
|
2934
3012
|
function createRadioGroup(props, state2) {
|
|
@@ -3008,6 +3086,10 @@ function createRadioGroup(props, state2) {
|
|
|
3008
3086
|
}
|
|
3009
3087
|
};
|
|
3010
3088
|
}
|
|
3089
|
+
|
|
3090
|
+
// src/radio/createRadio.ts
|
|
3091
|
+
import { createEffect as createEffect9 } from "solid-js";
|
|
3092
|
+
import { radioGroupSyncVersion } from "@proyecto-viviana/solid-stately";
|
|
3011
3093
|
function createRadio(props, state2, ref) {
|
|
3012
3094
|
const getProps = () => access(props);
|
|
3013
3095
|
const isDisabled = () => getProps().isDisabled || state2.isDisabled;
|
|
@@ -3017,13 +3099,15 @@ function createRadio(props, state2, ref) {
|
|
|
3017
3099
|
const v = value();
|
|
3018
3100
|
return selected === v;
|
|
3019
3101
|
};
|
|
3020
|
-
|
|
3102
|
+
createEffect9(() => {
|
|
3021
3103
|
const p = getProps();
|
|
3022
3104
|
const hasChildren = p.children != null;
|
|
3023
3105
|
const hasAriaLabel = p["aria-label"] != null || p["aria-labelledby"] != null;
|
|
3024
|
-
if (!hasChildren && !hasAriaLabel && isDevEnv())
|
|
3106
|
+
if (!hasChildren && !hasAriaLabel && isDevEnv()) {
|
|
3107
|
+
console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
3108
|
+
}
|
|
3025
3109
|
});
|
|
3026
|
-
|
|
3110
|
+
createEffect9(() => {
|
|
3027
3111
|
const inputEl = ref();
|
|
3028
3112
|
if (!inputEl) return;
|
|
3029
3113
|
const syncVersion = radioGroupSyncVersion.get(state2);
|
|
@@ -3464,6 +3548,17 @@ function createSeparator(props = {}) {
|
|
|
3464
3548
|
};
|
|
3465
3549
|
}
|
|
3466
3550
|
|
|
3551
|
+
// src/toolbar/createToolbar.ts
|
|
3552
|
+
import {
|
|
3553
|
+
createSignal as createSignal10,
|
|
3554
|
+
onMount as onMount3,
|
|
3555
|
+
onCleanup as onCleanup13
|
|
3556
|
+
} from "solid-js";
|
|
3557
|
+
|
|
3558
|
+
// src/i18n/locale.tsx
|
|
3559
|
+
import { createComponent as _$createComponent2 } from "solid-js/web";
|
|
3560
|
+
import { createContext as createContext3, createEffect as createEffect10, createMemo as createMemo4, createSignal as createSignal9, onCleanup as onCleanup12, useContext as useContext3 } from "solid-js";
|
|
3561
|
+
|
|
3467
3562
|
// src/i18n/utils.ts
|
|
3468
3563
|
var RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
3469
3564
|
"Arab",
|
|
@@ -3524,11 +3619,16 @@ function createCacheKey(locale, options) {
|
|
|
3524
3619
|
}
|
|
3525
3620
|
|
|
3526
3621
|
// src/i18n/locale.tsx
|
|
3527
|
-
var localeSymbol =
|
|
3622
|
+
var localeSymbol = Symbol.for("solidaria.i18n.locale");
|
|
3528
3623
|
var currentLocale = null;
|
|
3529
3624
|
var listeners = /* @__PURE__ */ new Set();
|
|
3530
3625
|
function getDefaultLocale() {
|
|
3531
3626
|
let locale = typeof window !== "undefined" && window[localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
3627
|
+
try {
|
|
3628
|
+
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
3629
|
+
} catch {
|
|
3630
|
+
locale = "en-US";
|
|
3631
|
+
}
|
|
3532
3632
|
return {
|
|
3533
3633
|
locale,
|
|
3534
3634
|
direction: isRTL(locale) ? "rtl" : "ltr"
|
|
@@ -3540,13 +3640,13 @@ function updateLocale() {
|
|
|
3540
3640
|
listener(currentLocale);
|
|
3541
3641
|
}
|
|
3542
3642
|
}
|
|
3543
|
-
var I18nContext =
|
|
3643
|
+
var I18nContext = createContext3(null);
|
|
3544
3644
|
function createDefaultLocale() {
|
|
3545
3645
|
if (!currentLocale) {
|
|
3546
3646
|
currentLocale = getDefaultLocale();
|
|
3547
3647
|
}
|
|
3548
|
-
const [locale, setLocale] =
|
|
3549
|
-
|
|
3648
|
+
const [locale, setLocale] = createSignal9(currentLocale);
|
|
3649
|
+
createEffect10(() => {
|
|
3550
3650
|
if (typeof window === "undefined") {
|
|
3551
3651
|
return;
|
|
3552
3652
|
}
|
|
@@ -3554,7 +3654,7 @@ function createDefaultLocale() {
|
|
|
3554
3654
|
window.addEventListener("languagechange", updateLocale);
|
|
3555
3655
|
}
|
|
3556
3656
|
listeners.add(setLocale);
|
|
3557
|
-
|
|
3657
|
+
onCleanup12(() => {
|
|
3558
3658
|
listeners.delete(setLocale);
|
|
3559
3659
|
if (listeners.size === 0) {
|
|
3560
3660
|
window.removeEventListener("languagechange", updateLocale);
|
|
@@ -3564,13 +3664,13 @@ function createDefaultLocale() {
|
|
|
3564
3664
|
return locale;
|
|
3565
3665
|
}
|
|
3566
3666
|
function useLocale() {
|
|
3567
|
-
const context =
|
|
3667
|
+
const context = useContext3(I18nContext);
|
|
3568
3668
|
const defaultLocale = createDefaultLocale();
|
|
3569
3669
|
return context || defaultLocale;
|
|
3570
3670
|
}
|
|
3571
3671
|
function I18nProvider(props) {
|
|
3572
3672
|
const defaultLocale = createDefaultLocale();
|
|
3573
|
-
const locale =
|
|
3673
|
+
const locale = createMemo4(() => {
|
|
3574
3674
|
if (props.locale) {
|
|
3575
3675
|
return {
|
|
3576
3676
|
locale: props.locale,
|
|
@@ -3579,7 +3679,7 @@ function I18nProvider(props) {
|
|
|
3579
3679
|
}
|
|
3580
3680
|
return defaultLocale();
|
|
3581
3681
|
});
|
|
3582
|
-
return
|
|
3682
|
+
return _$createComponent2(I18nContext.Provider, {
|
|
3583
3683
|
value: locale,
|
|
3584
3684
|
get children() {
|
|
3585
3685
|
return props.children;
|
|
@@ -3658,6 +3758,11 @@ function numberFormatSignDisplayPolyfill(numberFormat, signDisplay, num) {
|
|
|
3658
3758
|
const negative = numberFormat.format(-processedNum);
|
|
3659
3759
|
const noSign = numberFormat.format(processedNum);
|
|
3660
3760
|
const minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
|
|
3761
|
+
if ([...minus].length !== 1) {
|
|
3762
|
+
console.warn(
|
|
3763
|
+
"solidaria i18n polyfill for NumberFormat signDisplay: Unsupported case"
|
|
3764
|
+
);
|
|
3765
|
+
}
|
|
3661
3766
|
const positive = negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
|
|
3662
3767
|
return positive;
|
|
3663
3768
|
} else {
|
|
@@ -3741,10 +3846,16 @@ var NumberFormatter = class {
|
|
|
3741
3846
|
return options;
|
|
3742
3847
|
}
|
|
3743
3848
|
};
|
|
3849
|
+
|
|
3850
|
+
// src/i18n/createNumberFormatter.ts
|
|
3851
|
+
import { createMemo as createMemo5 } from "solid-js";
|
|
3744
3852
|
function createNumberFormatter(options = {}) {
|
|
3745
3853
|
const locale = useLocale();
|
|
3746
|
-
return
|
|
3854
|
+
return createMemo5(() => new NumberFormatter(locale().locale, options));
|
|
3747
3855
|
}
|
|
3856
|
+
|
|
3857
|
+
// src/i18n/createDateFormatter.ts
|
|
3858
|
+
import { createMemo as createMemo6 } from "solid-js";
|
|
3748
3859
|
var dateFormatterCache = /* @__PURE__ */ new Map();
|
|
3749
3860
|
function getCachedDateFormatter(locale, options) {
|
|
3750
3861
|
const cacheKey = createCacheKey(locale, options);
|
|
@@ -3757,8 +3868,11 @@ function getCachedDateFormatter(locale, options) {
|
|
|
3757
3868
|
}
|
|
3758
3869
|
function createDateFormatter(options) {
|
|
3759
3870
|
const locale = useLocale();
|
|
3760
|
-
return
|
|
3871
|
+
return createMemo6(() => getCachedDateFormatter(locale().locale, options));
|
|
3761
3872
|
}
|
|
3873
|
+
|
|
3874
|
+
// src/i18n/createCollator.ts
|
|
3875
|
+
import { createMemo as createMemo7 } from "solid-js";
|
|
3762
3876
|
var collatorCache = /* @__PURE__ */ new Map();
|
|
3763
3877
|
function getCachedCollator(locale, options) {
|
|
3764
3878
|
const cacheKey = createCacheKey(locale, options);
|
|
@@ -3771,14 +3885,17 @@ function getCachedCollator(locale, options) {
|
|
|
3771
3885
|
}
|
|
3772
3886
|
function createCollator(options) {
|
|
3773
3887
|
const locale = useLocale();
|
|
3774
|
-
return
|
|
3888
|
+
return createMemo7(() => getCachedCollator(locale().locale, options));
|
|
3775
3889
|
}
|
|
3890
|
+
|
|
3891
|
+
// src/i18n/createFilter.ts
|
|
3892
|
+
import { createMemo as createMemo8 } from "solid-js";
|
|
3776
3893
|
function createFilter(options) {
|
|
3777
3894
|
const collator = createCollator({
|
|
3778
3895
|
usage: "search",
|
|
3779
3896
|
...options
|
|
3780
3897
|
});
|
|
3781
|
-
return
|
|
3898
|
+
return createMemo8(() => {
|
|
3782
3899
|
const coll = collator();
|
|
3783
3900
|
const startsWith = (str, substring) => {
|
|
3784
3901
|
if (substring.length === 0) {
|
|
@@ -3818,6 +3935,13 @@ function createFilter(options) {
|
|
|
3818
3935
|
};
|
|
3819
3936
|
});
|
|
3820
3937
|
}
|
|
3938
|
+
|
|
3939
|
+
// src/i18n/createStringFormatter.ts
|
|
3940
|
+
import {
|
|
3941
|
+
LocalizedStringDictionary,
|
|
3942
|
+
LocalizedStringFormatter
|
|
3943
|
+
} from "@internationalized/string";
|
|
3944
|
+
import { createMemo as createMemo9 } from "solid-js";
|
|
3821
3945
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
3822
3946
|
function getCachedDictionary(strings) {
|
|
3823
3947
|
let dictionary = cache.get(strings);
|
|
@@ -3828,12 +3952,12 @@ function getCachedDictionary(strings) {
|
|
|
3828
3952
|
return dictionary;
|
|
3829
3953
|
}
|
|
3830
3954
|
function createStringDictionary(strings, packageName) {
|
|
3831
|
-
return getCachedDictionary(strings);
|
|
3955
|
+
return packageName && LocalizedStringDictionary.getGlobalDictionaryForPackage(packageName) || getCachedDictionary(strings);
|
|
3832
3956
|
}
|
|
3833
3957
|
function createStringFormatter(strings, packageName) {
|
|
3834
3958
|
const localeAccessor = useLocale();
|
|
3835
|
-
const dictionary = createStringDictionary(strings);
|
|
3836
|
-
return
|
|
3959
|
+
const dictionary = createStringDictionary(strings, packageName);
|
|
3960
|
+
return createMemo9(() => new LocalizedStringFormatter(localeAccessor().locale, dictionary));
|
|
3837
3961
|
}
|
|
3838
3962
|
|
|
3839
3963
|
// src/toolbar/createToolbar.ts
|
|
@@ -3958,14 +4082,14 @@ function createFocusManager(ref) {
|
|
|
3958
4082
|
}
|
|
3959
4083
|
function createToolbar(props = {}) {
|
|
3960
4084
|
let toolbarRef;
|
|
3961
|
-
const [isInToolbar, setIsInToolbar] =
|
|
4085
|
+
const [isInToolbar, setIsInToolbar] = createSignal10(false);
|
|
3962
4086
|
let lastFocusedElement = null;
|
|
3963
4087
|
const locale = useLocale();
|
|
3964
4088
|
const orientation = () => access(props.orientation) ?? "horizontal";
|
|
3965
4089
|
const ariaLabel = () => access(props["aria-label"]);
|
|
3966
4090
|
const ariaLabelledby = () => access(props["aria-labelledby"]);
|
|
3967
4091
|
const focusManager = createFocusManager(() => toolbarRef);
|
|
3968
|
-
|
|
4092
|
+
onMount3(() => {
|
|
3969
4093
|
if (toolbarRef) {
|
|
3970
4094
|
const parentToolbar = toolbarRef.parentElement?.closest('[role="toolbar"]');
|
|
3971
4095
|
setIsInToolbar(!!parentToolbar);
|
|
@@ -4032,7 +4156,7 @@ function createToolbar(props = {}) {
|
|
|
4032
4156
|
toolbarRef = el;
|
|
4033
4157
|
el.addEventListener("keydown", onKeyDown, true);
|
|
4034
4158
|
el.addEventListener("focus", onFocus, true);
|
|
4035
|
-
|
|
4159
|
+
onCleanup13(() => {
|
|
4036
4160
|
el.removeEventListener("keydown", onKeyDown, true);
|
|
4037
4161
|
el.removeEventListener("focus", onFocus, true);
|
|
4038
4162
|
});
|
|
@@ -4056,6 +4180,13 @@ function createToolbar(props = {}) {
|
|
|
4056
4180
|
orientation
|
|
4057
4181
|
};
|
|
4058
4182
|
}
|
|
4183
|
+
|
|
4184
|
+
// src/autocomplete/createAutocomplete.ts
|
|
4185
|
+
import {
|
|
4186
|
+
createSignal as createSignal11,
|
|
4187
|
+
createEffect as createEffect11,
|
|
4188
|
+
onCleanup as onCleanup14
|
|
4189
|
+
} from "solid-js";
|
|
4059
4190
|
var AUTOCOMPLETE_FOCUS_EVENT = "autocomplete:focus";
|
|
4060
4191
|
var AUTOCOMPLETE_CLEAR_FOCUS_EVENT = "autocomplete:clearfocus";
|
|
4061
4192
|
function createAutocomplete(props, state2) {
|
|
@@ -4067,17 +4198,17 @@ function createAutocomplete(props, state2) {
|
|
|
4067
4198
|
disableVirtualFocus = false
|
|
4068
4199
|
} = props;
|
|
4069
4200
|
const collectionId = createId();
|
|
4070
|
-
const [shouldUseVirtualFocus] =
|
|
4201
|
+
const [shouldUseVirtualFocus] = createSignal11(!disableVirtualFocus);
|
|
4071
4202
|
let lastInputType = "";
|
|
4072
4203
|
const handleInput = (e) => {
|
|
4073
4204
|
const inputEvent = e;
|
|
4074
4205
|
lastInputType = inputEvent.inputType || "";
|
|
4075
4206
|
};
|
|
4076
|
-
|
|
4207
|
+
createEffect11(() => {
|
|
4077
4208
|
const input = inputRef();
|
|
4078
4209
|
if (input) {
|
|
4079
4210
|
input.addEventListener("input", handleInput);
|
|
4080
|
-
|
|
4211
|
+
onCleanup14(() => {
|
|
4081
4212
|
input.removeEventListener("input", handleInput);
|
|
4082
4213
|
});
|
|
4083
4214
|
}
|
|
@@ -4178,7 +4309,9 @@ function createAutocomplete(props, state2) {
|
|
|
4178
4309
|
if (!e.isTrusted) return;
|
|
4179
4310
|
const focusedNodeId = state2.focusedNodeId();
|
|
4180
4311
|
if (focusedNodeId) {
|
|
4181
|
-
document.getElementById(focusedNodeId);
|
|
4312
|
+
const item = document.getElementById(focusedNodeId);
|
|
4313
|
+
if (item) {
|
|
4314
|
+
}
|
|
4182
4315
|
}
|
|
4183
4316
|
};
|
|
4184
4317
|
const onBlur = (e) => {
|
|
@@ -4211,11 +4344,14 @@ function createAutocomplete(props, state2) {
|
|
|
4211
4344
|
filter: filterFn
|
|
4212
4345
|
};
|
|
4213
4346
|
}
|
|
4347
|
+
|
|
4348
|
+
// src/overlays/createPreventScroll.ts
|
|
4349
|
+
import { createEffect as createEffect12, onCleanup as onCleanup15 } from "solid-js";
|
|
4214
4350
|
var visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
4215
4351
|
var preventScrollCount = 0;
|
|
4216
4352
|
var restore;
|
|
4217
4353
|
function createPreventScroll(options = {}) {
|
|
4218
|
-
|
|
4354
|
+
createEffect12(() => {
|
|
4219
4355
|
const isDisabled = options.isDisabled;
|
|
4220
4356
|
if (isDisabled) {
|
|
4221
4357
|
return;
|
|
@@ -4228,7 +4364,7 @@ function createPreventScroll(options = {}) {
|
|
|
4228
4364
|
restore = preventScrollStandard();
|
|
4229
4365
|
}
|
|
4230
4366
|
}
|
|
4231
|
-
|
|
4367
|
+
onCleanup15(() => {
|
|
4232
4368
|
preventScrollCount--;
|
|
4233
4369
|
if (preventScrollCount === 0 && restore) {
|
|
4234
4370
|
restore();
|
|
@@ -4361,11 +4497,14 @@ function scrollIntoView(target) {
|
|
|
4361
4497
|
nextTarget = scrollableParent.parentElement;
|
|
4362
4498
|
}
|
|
4363
4499
|
}
|
|
4500
|
+
|
|
4501
|
+
// src/overlays/createOverlayTrigger.ts
|
|
4502
|
+
import { createEffect as createEffect13 } from "solid-js";
|
|
4364
4503
|
var onCloseMap = /* @__PURE__ */ new WeakMap();
|
|
4365
4504
|
function createOverlayTrigger(props, state2, ref) {
|
|
4366
4505
|
const propsAccessor = () => access(props);
|
|
4367
4506
|
const overlayId = createId();
|
|
4368
|
-
|
|
4507
|
+
createEffect13(() => {
|
|
4369
4508
|
const element = ref?.();
|
|
4370
4509
|
if (element) {
|
|
4371
4510
|
onCloseMap.set(element, state2.close);
|
|
@@ -4398,10 +4537,16 @@ function createOverlayTrigger(props, state2, ref) {
|
|
|
4398
4537
|
}
|
|
4399
4538
|
};
|
|
4400
4539
|
}
|
|
4540
|
+
|
|
4541
|
+
// src/overlays/createOverlay.ts
|
|
4542
|
+
import { createEffect as createEffect15, onCleanup as onCleanup17 } from "solid-js";
|
|
4543
|
+
|
|
4544
|
+
// src/overlays/createInteractOutside.ts
|
|
4545
|
+
import { createEffect as createEffect14, onCleanup as onCleanup16 } from "solid-js";
|
|
4401
4546
|
function createInteractOutside(props) {
|
|
4402
4547
|
let isPointerDown = false;
|
|
4403
4548
|
let ignoreEmulatedMouseEvents = false;
|
|
4404
|
-
|
|
4549
|
+
createEffect14(() => {
|
|
4405
4550
|
const { ref, onInteractOutside, onInteractOutsideStart, isDisabled } = props;
|
|
4406
4551
|
if (isDisabled) {
|
|
4407
4552
|
return;
|
|
@@ -4430,7 +4575,7 @@ function createInteractOutside(props) {
|
|
|
4430
4575
|
};
|
|
4431
4576
|
documentObject.addEventListener("pointerdown", onPointerDown, true);
|
|
4432
4577
|
documentObject.addEventListener("click", onClick, true);
|
|
4433
|
-
|
|
4578
|
+
onCleanup16(() => {
|
|
4434
4579
|
documentObject.removeEventListener("pointerdown", onPointerDown, true);
|
|
4435
4580
|
documentObject.removeEventListener("click", onClick, true);
|
|
4436
4581
|
});
|
|
@@ -4470,7 +4615,7 @@ function createInteractOutside(props) {
|
|
|
4470
4615
|
documentObject.addEventListener("mouseup", onMouseUp, true);
|
|
4471
4616
|
documentObject.addEventListener("touchstart", onTouchStart, true);
|
|
4472
4617
|
documentObject.addEventListener("touchend", onTouchEnd, true);
|
|
4473
|
-
|
|
4618
|
+
onCleanup16(() => {
|
|
4474
4619
|
documentObject.removeEventListener("mousedown", onMouseDown, true);
|
|
4475
4620
|
documentObject.removeEventListener("mouseup", onMouseUp, true);
|
|
4476
4621
|
documentObject.removeEventListener("touchstart", onTouchStart, true);
|
|
@@ -4510,11 +4655,11 @@ function createOverlay(props, ref) {
|
|
|
4510
4655
|
isKeyboardDismissDisabled = false,
|
|
4511
4656
|
shouldCloseOnInteractOutside
|
|
4512
4657
|
} = props;
|
|
4513
|
-
|
|
4658
|
+
createEffect15(() => {
|
|
4514
4659
|
if (isOpen && !visibleOverlays.includes(ref)) {
|
|
4515
4660
|
visibleOverlays.push(ref);
|
|
4516
4661
|
}
|
|
4517
|
-
|
|
4662
|
+
onCleanup17(() => {
|
|
4518
4663
|
const index = visibleOverlays.indexOf(ref);
|
|
4519
4664
|
if (index >= 0) {
|
|
4520
4665
|
visibleOverlays.splice(index, 1);
|
|
@@ -4713,11 +4858,22 @@ function keepVisible(element) {
|
|
|
4713
4858
|
};
|
|
4714
4859
|
}
|
|
4715
4860
|
}
|
|
4716
|
-
|
|
4717
|
-
|
|
4861
|
+
|
|
4862
|
+
// src/overlays/createModal.tsx
|
|
4863
|
+
import { template as _$template } from "solid-js/web";
|
|
4864
|
+
import { getNextElement as _$getNextElement } from "solid-js/web";
|
|
4865
|
+
import { runHydrationEvents as _$runHydrationEvents } from "solid-js/web";
|
|
4866
|
+
import { insert as _$insert } from "solid-js/web";
|
|
4867
|
+
import { spread as _$spread } from "solid-js/web";
|
|
4868
|
+
import { createComponent as _$createComponent3 } from "solid-js/web";
|
|
4869
|
+
import { createContext as createContext4, createSignal as createSignal12, useContext as useContext4, createEffect as createEffect16, onCleanup as onCleanup18 } from "solid-js";
|
|
4870
|
+
import { Portal } from "solid-js/web";
|
|
4871
|
+
import { isServer as isServer4 } from "solid-js/web";
|
|
4872
|
+
var _tmpl$ = /* @__PURE__ */ _$template(`<div data-overlay-container>`);
|
|
4873
|
+
var ModalContext = createContext4(null);
|
|
4718
4874
|
var ModalProvider = (props) => {
|
|
4719
|
-
const parent =
|
|
4720
|
-
const [modalCount, setModalCount] =
|
|
4875
|
+
const parent = useContext4(ModalContext);
|
|
4876
|
+
const [modalCount, setModalCount] = createSignal12(0);
|
|
4721
4877
|
const context = {
|
|
4722
4878
|
parent,
|
|
4723
4879
|
modalCount,
|
|
@@ -4734,7 +4890,7 @@ var ModalProvider = (props) => {
|
|
|
4734
4890
|
}
|
|
4735
4891
|
}
|
|
4736
4892
|
};
|
|
4737
|
-
return
|
|
4893
|
+
return _$createComponent3(ModalContext.Provider, {
|
|
4738
4894
|
value: context,
|
|
4739
4895
|
get children() {
|
|
4740
4896
|
return props.children;
|
|
@@ -4742,7 +4898,7 @@ var ModalProvider = (props) => {
|
|
|
4742
4898
|
});
|
|
4743
4899
|
};
|
|
4744
4900
|
function useModalProvider() {
|
|
4745
|
-
const context =
|
|
4901
|
+
const context = useContext4(ModalContext);
|
|
4746
4902
|
return {
|
|
4747
4903
|
modalProviderProps: {
|
|
4748
4904
|
get "aria-hidden"() {
|
|
@@ -4756,16 +4912,17 @@ var OverlayContainerDOM = (props) => {
|
|
|
4756
4912
|
modalProviderProps
|
|
4757
4913
|
} = useModalProvider();
|
|
4758
4914
|
return (() => {
|
|
4759
|
-
var _el$ = _tmpl$
|
|
4760
|
-
spread(_el$, modalProviderProps, false, true);
|
|
4761
|
-
insert(_el$, () => props.children);
|
|
4915
|
+
var _el$ = _$getNextElement(_tmpl$);
|
|
4916
|
+
_$spread(_el$, modalProviderProps, false, true);
|
|
4917
|
+
_$insert(_el$, () => props.children);
|
|
4918
|
+
_$runHydrationEvents();
|
|
4762
4919
|
return _el$;
|
|
4763
4920
|
})();
|
|
4764
4921
|
};
|
|
4765
4922
|
var OverlayProvider = (props) => {
|
|
4766
|
-
return
|
|
4923
|
+
return _$createComponent3(ModalProvider, {
|
|
4767
4924
|
get children() {
|
|
4768
|
-
return
|
|
4925
|
+
return _$createComponent3(OverlayContainerDOM, {
|
|
4769
4926
|
get children() {
|
|
4770
4927
|
return props.children;
|
|
4771
4928
|
}
|
|
@@ -4774,22 +4931,22 @@ var OverlayProvider = (props) => {
|
|
|
4774
4931
|
});
|
|
4775
4932
|
};
|
|
4776
4933
|
var OverlayContainer = (props) => {
|
|
4777
|
-
if (
|
|
4934
|
+
if (isServer4) {
|
|
4778
4935
|
return null;
|
|
4779
4936
|
}
|
|
4780
4937
|
const portalContainer = () => props.portalContainer ?? document.body;
|
|
4781
|
-
|
|
4938
|
+
createEffect16(() => {
|
|
4782
4939
|
const container = portalContainer();
|
|
4783
4940
|
if (container?.closest("[data-overlay-container]")) {
|
|
4784
4941
|
throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
4785
4942
|
}
|
|
4786
4943
|
});
|
|
4787
|
-
return
|
|
4944
|
+
return _$createComponent3(Portal, {
|
|
4788
4945
|
get mount() {
|
|
4789
4946
|
return portalContainer();
|
|
4790
4947
|
},
|
|
4791
4948
|
get children() {
|
|
4792
|
-
return
|
|
4949
|
+
return _$createComponent3(OverlayProvider, {
|
|
4793
4950
|
get children() {
|
|
4794
4951
|
return props.children;
|
|
4795
4952
|
}
|
|
@@ -4798,16 +4955,16 @@ var OverlayContainer = (props) => {
|
|
|
4798
4955
|
});
|
|
4799
4956
|
};
|
|
4800
4957
|
function createModal(options) {
|
|
4801
|
-
const context =
|
|
4958
|
+
const context = useContext4(ModalContext);
|
|
4802
4959
|
if (!context) {
|
|
4803
4960
|
throw new Error("Modal is not contained within a provider");
|
|
4804
4961
|
}
|
|
4805
|
-
|
|
4962
|
+
createEffect16(() => {
|
|
4806
4963
|
if (options?.isDisabled || !context.parent) {
|
|
4807
4964
|
return;
|
|
4808
4965
|
}
|
|
4809
4966
|
context.parent.addModal();
|
|
4810
|
-
|
|
4967
|
+
onCleanup18(() => {
|
|
4811
4968
|
if (context.parent) {
|
|
4812
4969
|
context.parent.removeModal();
|
|
4813
4970
|
}
|
|
@@ -4820,6 +4977,9 @@ function createModal(options) {
|
|
|
4820
4977
|
};
|
|
4821
4978
|
}
|
|
4822
4979
|
|
|
4980
|
+
// src/listbox/createListBox.ts
|
|
4981
|
+
import { createEffect as createEffect17, onCleanup as onCleanup19 } from "solid-js";
|
|
4982
|
+
|
|
4823
4983
|
// src/selection/createTypeSelect.ts
|
|
4824
4984
|
var TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
|
|
4825
4985
|
function getStringForKey(key) {
|
|
@@ -4913,10 +5073,15 @@ function createListBox(props, state2, _ref) {
|
|
|
4913
5073
|
const getProps = () => access(props);
|
|
4914
5074
|
const id = createId(getProps().id);
|
|
4915
5075
|
if (isDevEnv()) {
|
|
4916
|
-
getProps();
|
|
5076
|
+
const p = getProps();
|
|
5077
|
+
if (!p.label && !p["aria-label"] && !p["aria-labelledby"]) {
|
|
5078
|
+
console.warn(
|
|
5079
|
+
"[solidaria] A ListBox requires an aria-label or aria-labelledby attribute for accessibility."
|
|
5080
|
+
);
|
|
5081
|
+
}
|
|
4917
5082
|
}
|
|
4918
5083
|
const domProps = () => filterDOMProps(getProps(), { labelable: true });
|
|
4919
|
-
|
|
5084
|
+
createEffect17(() => {
|
|
4920
5085
|
const p = getProps();
|
|
4921
5086
|
listBoxData.set(state2, {
|
|
4922
5087
|
id,
|
|
@@ -4924,7 +5089,7 @@ function createListBox(props, state2, _ref) {
|
|
|
4924
5089
|
shouldSelectOnPressUp: p.shouldSelectOnPressUp,
|
|
4925
5090
|
shouldFocusOnHover: p.shouldFocusOnHover
|
|
4926
5091
|
});
|
|
4927
|
-
|
|
5092
|
+
onCleanup19(() => {
|
|
4928
5093
|
listBoxData.delete(state2);
|
|
4929
5094
|
});
|
|
4930
5095
|
});
|
|
@@ -5153,6 +5318,9 @@ function createOption(props, state2, _ref) {
|
|
|
5153
5318
|
isDisabled
|
|
5154
5319
|
};
|
|
5155
5320
|
}
|
|
5321
|
+
|
|
5322
|
+
// src/menu/createMenu.ts
|
|
5323
|
+
import { createEffect as createEffect18, onCleanup as onCleanup20 } from "solid-js";
|
|
5156
5324
|
var DEFAULT_PAGE_SIZE = 10;
|
|
5157
5325
|
function findNextNonDisabledKey(collection, currentKey, direction, isDisabled, wrap) {
|
|
5158
5326
|
const getNextKey2 = direction === "next" ? (key) => collection.getKeyAfter(key) : (key) => collection.getKeyBefore(key);
|
|
@@ -5177,17 +5345,22 @@ function createMenu(props, state2, ref) {
|
|
|
5177
5345
|
const getProps = () => access(props);
|
|
5178
5346
|
const id = createId(getProps().id);
|
|
5179
5347
|
if (isDevEnv()) {
|
|
5180
|
-
getProps();
|
|
5348
|
+
const p = getProps();
|
|
5349
|
+
if (!p.label && !p["aria-label"] && !p["aria-labelledby"]) {
|
|
5350
|
+
console.warn(
|
|
5351
|
+
"[solidaria] A Menu requires an aria-label or aria-labelledby attribute for accessibility."
|
|
5352
|
+
);
|
|
5353
|
+
}
|
|
5181
5354
|
}
|
|
5182
5355
|
const domProps = () => filterDOMProps(getProps(), { labelable: true });
|
|
5183
|
-
|
|
5356
|
+
createEffect18(() => {
|
|
5184
5357
|
const p = getProps();
|
|
5185
5358
|
menuData.set(state2, {
|
|
5186
5359
|
id,
|
|
5187
5360
|
onAction: p.onAction,
|
|
5188
5361
|
onClose: p.onClose
|
|
5189
5362
|
});
|
|
5190
|
-
|
|
5363
|
+
onCleanup20(() => {
|
|
5191
5364
|
menuData.delete(state2);
|
|
5192
5365
|
});
|
|
5193
5366
|
});
|
|
@@ -5522,6 +5695,9 @@ function createMenuTrigger(props, state2) {
|
|
|
5522
5695
|
}
|
|
5523
5696
|
};
|
|
5524
5697
|
}
|
|
5698
|
+
|
|
5699
|
+
// src/select/createSelect.ts
|
|
5700
|
+
import { createEffect as createEffect19, onCleanup as onCleanup21 } from "solid-js";
|
|
5525
5701
|
var selectData = /* @__PURE__ */ new WeakMap();
|
|
5526
5702
|
function getSelectData(state2) {
|
|
5527
5703
|
return selectData.get(state2);
|
|
@@ -5535,9 +5711,9 @@ function createSelect(props, state2, _ref) {
|
|
|
5535
5711
|
const descriptionId2 = `${id}-description`;
|
|
5536
5712
|
const errorMessageId = `${id}-error`;
|
|
5537
5713
|
const domProps = () => filterDOMProps(getProps(), { labelable: true });
|
|
5538
|
-
|
|
5714
|
+
createEffect19(() => {
|
|
5539
5715
|
selectData.set(state2, { id });
|
|
5540
|
-
|
|
5716
|
+
onCleanup21(() => {
|
|
5541
5717
|
selectData.delete(state2);
|
|
5542
5718
|
});
|
|
5543
5719
|
});
|
|
@@ -5773,6 +5949,21 @@ function createSelect(props, state2, _ref) {
|
|
|
5773
5949
|
selectedItem: state2.selectedItem
|
|
5774
5950
|
};
|
|
5775
5951
|
}
|
|
5952
|
+
|
|
5953
|
+
// src/select/createHiddenSelect.tsx
|
|
5954
|
+
import { template as _$template2 } from "solid-js/web";
|
|
5955
|
+
import { setProperty as _$setProperty } from "solid-js/web";
|
|
5956
|
+
import { effect as _$effect } from "solid-js/web";
|
|
5957
|
+
import { getNextElement as _$getNextElement2 } from "solid-js/web";
|
|
5958
|
+
import { runHydrationEvents as _$runHydrationEvents2 } from "solid-js/web";
|
|
5959
|
+
import { getNextMarker as _$getNextMarker } from "solid-js/web";
|
|
5960
|
+
import { insert as _$insert2 } from "solid-js/web";
|
|
5961
|
+
import { createComponent as _$createComponent4 } from "solid-js/web";
|
|
5962
|
+
import { spread as _$spread2 } from "solid-js/web";
|
|
5963
|
+
import { For, createEffect as createEffect21, onCleanup as onCleanup23 } from "solid-js";
|
|
5964
|
+
|
|
5965
|
+
// src/form/createFormValidation.ts
|
|
5966
|
+
import { createEffect as createEffect20, onCleanup as onCleanup22 } from "solid-js";
|
|
5776
5967
|
function getValidity(input) {
|
|
5777
5968
|
const validity = input.validity;
|
|
5778
5969
|
return {
|
|
@@ -5809,7 +6000,7 @@ function createFormValidation(props, state2, ref) {
|
|
|
5809
6000
|
const validationBehavior = () => props.validationBehavior ?? "aria";
|
|
5810
6001
|
const focus = () => props.focus;
|
|
5811
6002
|
let isIgnoredReset = false;
|
|
5812
|
-
|
|
6003
|
+
createEffect20(() => {
|
|
5813
6004
|
const input = ref();
|
|
5814
6005
|
if (validationBehavior() === "native" && input && !input.disabled) {
|
|
5815
6006
|
const realtimeValidation = state2.realtimeValidation();
|
|
@@ -5823,7 +6014,7 @@ function createFormValidation(props, state2, ref) {
|
|
|
5823
6014
|
}
|
|
5824
6015
|
}
|
|
5825
6016
|
});
|
|
5826
|
-
|
|
6017
|
+
createEffect20(() => {
|
|
5827
6018
|
const input = ref();
|
|
5828
6019
|
if (!input) {
|
|
5829
6020
|
return;
|
|
@@ -5864,7 +6055,7 @@ function createFormValidation(props, state2, ref) {
|
|
|
5864
6055
|
input.addEventListener("invalid", onInvalid);
|
|
5865
6056
|
input.addEventListener("change", onChange);
|
|
5866
6057
|
form?.addEventListener("reset", onReset);
|
|
5867
|
-
|
|
6058
|
+
onCleanup22(() => {
|
|
5868
6059
|
input.removeEventListener("invalid", onInvalid);
|
|
5869
6060
|
input.removeEventListener("change", onChange);
|
|
5870
6061
|
form?.removeEventListener("reset", onReset);
|
|
@@ -5876,12 +6067,12 @@ function createFormValidation(props, state2, ref) {
|
|
|
5876
6067
|
}
|
|
5877
6068
|
|
|
5878
6069
|
// src/select/createHiddenSelect.tsx
|
|
5879
|
-
var _tmpl$2 = /* @__PURE__ */
|
|
5880
|
-
var _tmpl$22 = /* @__PURE__ */
|
|
6070
|
+
var _tmpl$2 = /* @__PURE__ */ _$template2(`<div><label><!$><!/><select><option></option><!$><!/>`);
|
|
6071
|
+
var _tmpl$22 = /* @__PURE__ */ _$template2(`<option>`);
|
|
5881
6072
|
function createHiddenSelect(props) {
|
|
5882
6073
|
const getProps = () => access(props);
|
|
5883
6074
|
let selectRef;
|
|
5884
|
-
|
|
6075
|
+
createEffect21(() => {
|
|
5885
6076
|
const p = getProps();
|
|
5886
6077
|
if (!selectRef) return;
|
|
5887
6078
|
const form = selectRef.form;
|
|
@@ -5891,11 +6082,11 @@ function createHiddenSelect(props) {
|
|
|
5891
6082
|
p.state.setSelectedKey(defaultKey);
|
|
5892
6083
|
};
|
|
5893
6084
|
form.addEventListener("reset", handleReset);
|
|
5894
|
-
|
|
6085
|
+
onCleanup23(() => {
|
|
5895
6086
|
form.removeEventListener("reset", handleReset);
|
|
5896
6087
|
});
|
|
5897
6088
|
});
|
|
5898
|
-
|
|
6089
|
+
createEffect21(() => {
|
|
5899
6090
|
const p = getProps();
|
|
5900
6091
|
if (!selectRef || p.validationBehavior !== "native" || !p.validationState) return;
|
|
5901
6092
|
createFormValidation({
|
|
@@ -6004,25 +6195,29 @@ function HiddenSelect(props) {
|
|
|
6004
6195
|
const collection = () => props.state.collection();
|
|
6005
6196
|
const selectedKey = () => props.state.selectedKey();
|
|
6006
6197
|
return (() => {
|
|
6007
|
-
var _el$ = _tmpl$2
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6198
|
+
var _el$ = _$getNextElement2(_tmpl$2), _el$2 = _el$.firstChild, _el$7 = _el$2.firstChild, [_el$8, _co$2] = _$getNextMarker(_el$7.nextSibling), _el$3 = _el$8.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, [_el$6, _co$] = _$getNextMarker(_el$5.nextSibling);
|
|
6199
|
+
_$spread2(_el$, containerProps, false, true);
|
|
6200
|
+
_$insert2(_el$2, () => props.label, _el$8, _co$2);
|
|
6201
|
+
_$spread2(_el$3, selectProps, false, true);
|
|
6202
|
+
_$insert2(_el$3, _$createComponent4(For, {
|
|
6012
6203
|
get each() {
|
|
6013
6204
|
return Array.from(collection());
|
|
6014
6205
|
},
|
|
6015
6206
|
children: (item) => (() => {
|
|
6016
|
-
var _el$
|
|
6017
|
-
|
|
6018
|
-
effect(() => _el$
|
|
6019
|
-
effect(() => _el$
|
|
6020
|
-
return _el$
|
|
6207
|
+
var _el$9 = _$getNextElement2(_tmpl$22);
|
|
6208
|
+
_$insert2(_el$9, () => item.textValue);
|
|
6209
|
+
_$effect(() => _$setProperty(_el$9, "selected", item.key === selectedKey()));
|
|
6210
|
+
_$effect(() => _$setProperty(_el$9, "value", String(item.key)));
|
|
6211
|
+
return _el$9;
|
|
6021
6212
|
})()
|
|
6022
|
-
}),
|
|
6213
|
+
}), _el$6, _co$);
|
|
6214
|
+
_$runHydrationEvents2();
|
|
6023
6215
|
return _el$;
|
|
6024
6216
|
})();
|
|
6025
6217
|
}
|
|
6218
|
+
|
|
6219
|
+
// src/tabs/createTabs.ts
|
|
6220
|
+
import { createMemo as createMemo10, onMount as onMount4 } from "solid-js";
|
|
6026
6221
|
var tabListIds = /* @__PURE__ */ new WeakMap();
|
|
6027
6222
|
function getTabListId(state2) {
|
|
6028
6223
|
let id = tabListIds.get(state2);
|
|
@@ -6171,12 +6366,12 @@ function createTabList(props, state2) {
|
|
|
6171
6366
|
}
|
|
6172
6367
|
function createTab(props, state2, ref) {
|
|
6173
6368
|
const key = () => props.key;
|
|
6174
|
-
const isSelected =
|
|
6175
|
-
const isDisabled =
|
|
6369
|
+
const isSelected = createMemo10(() => state2.selectedKey() === key());
|
|
6370
|
+
const isDisabled = createMemo10(() => {
|
|
6176
6371
|
if (props.isDisabled) return true;
|
|
6177
6372
|
return state2.isKeyDisabled(key());
|
|
6178
6373
|
});
|
|
6179
|
-
const isFocused =
|
|
6374
|
+
const isFocused = createMemo10(() => state2.focusedKey() === key());
|
|
6180
6375
|
const { isFocusVisible: isFocusVisible3, focusProps } = createFocusRing();
|
|
6181
6376
|
const { isPressed, pressProps } = createPress({
|
|
6182
6377
|
get isDisabled() {
|
|
@@ -6218,8 +6413,8 @@ function createTab(props, state2, ref) {
|
|
|
6218
6413
|
const handleClick = (e) => {
|
|
6219
6414
|
callHandler(pressProps.onClick, e);
|
|
6220
6415
|
};
|
|
6221
|
-
|
|
6222
|
-
const cleanup =
|
|
6416
|
+
onMount4(() => {
|
|
6417
|
+
const cleanup = createMemo10(() => {
|
|
6223
6418
|
if (isFocused() && ref?.()) {
|
|
6224
6419
|
ref()?.focus();
|
|
6225
6420
|
}
|
|
@@ -6250,7 +6445,7 @@ function createTab(props, state2, ref) {
|
|
|
6250
6445
|
};
|
|
6251
6446
|
}
|
|
6252
6447
|
function createTabPanel(props, state2) {
|
|
6253
|
-
const isSelected =
|
|
6448
|
+
const isSelected = createMemo10(() => {
|
|
6254
6449
|
if (state2 === null) return true;
|
|
6255
6450
|
if (props.id === void 0) return false;
|
|
6256
6451
|
return state2.selectedKey() === props.id;
|
|
@@ -6384,6 +6579,9 @@ function createBreadcrumbItem(props = {}) {
|
|
|
6384
6579
|
isPressed
|
|
6385
6580
|
};
|
|
6386
6581
|
}
|
|
6582
|
+
|
|
6583
|
+
// src/numberfield/createNumberField.ts
|
|
6584
|
+
import { createMemo as createMemo11 } from "solid-js";
|
|
6387
6585
|
function createNumberField(props, state2, inputRef) {
|
|
6388
6586
|
const getProps = () => access(props);
|
|
6389
6587
|
const id = createId(getProps().id);
|
|
@@ -6413,7 +6611,7 @@ function createNumberField(props, state2, inputRef) {
|
|
|
6413
6611
|
if (typeof p.label === "string") return p.label;
|
|
6414
6612
|
return "value";
|
|
6415
6613
|
};
|
|
6416
|
-
const domProps =
|
|
6614
|
+
const domProps = createMemo11(
|
|
6417
6615
|
() => filterDOMProps(getProps(), { labelable: true })
|
|
6418
6616
|
);
|
|
6419
6617
|
const onInputChange = (e) => {
|
|
@@ -6697,6 +6895,9 @@ function createSearchField(props, state2, inputRef) {
|
|
|
6697
6895
|
}
|
|
6698
6896
|
};
|
|
6699
6897
|
}
|
|
6898
|
+
|
|
6899
|
+
// src/slider/createSlider.ts
|
|
6900
|
+
import { onCleanup as onCleanup24, onMount as onMount5 } from "solid-js";
|
|
6700
6901
|
function createSlider(props, state2, trackRef) {
|
|
6701
6902
|
const getProps = () => access(props);
|
|
6702
6903
|
const id = createId(getProps().id);
|
|
@@ -6829,12 +7030,12 @@ function createSlider(props, state2, trackRef) {
|
|
|
6829
7030
|
currentPointerId = null;
|
|
6830
7031
|
state2.setDragging(false);
|
|
6831
7032
|
};
|
|
6832
|
-
|
|
7033
|
+
onMount5(() => {
|
|
6833
7034
|
if (typeof document === "undefined") return;
|
|
6834
7035
|
document.addEventListener("pointermove", onDocumentPointerMove);
|
|
6835
7036
|
document.addEventListener("pointerup", onDocumentPointerUp);
|
|
6836
7037
|
document.addEventListener("pointercancel", onDocumentPointerUp);
|
|
6837
|
-
|
|
7038
|
+
onCleanup24(() => {
|
|
6838
7039
|
document.removeEventListener("pointermove", onDocumentPointerMove);
|
|
6839
7040
|
document.removeEventListener("pointerup", onDocumentPointerUp);
|
|
6840
7041
|
document.removeEventListener("pointercancel", onDocumentPointerUp);
|
|
@@ -6953,6 +7154,9 @@ function createTooltip(props = {}, state2) {
|
|
|
6953
7154
|
)
|
|
6954
7155
|
};
|
|
6955
7156
|
}
|
|
7157
|
+
|
|
7158
|
+
// src/tooltip/createTooltipTrigger.ts
|
|
7159
|
+
import { createEffect as createEffect22, onCleanup as onCleanup25 } from "solid-js";
|
|
6956
7160
|
var currentModality2 = null;
|
|
6957
7161
|
if (typeof document !== "undefined") {
|
|
6958
7162
|
document.addEventListener("keydown", () => {
|
|
@@ -6987,7 +7191,7 @@ function createTooltipTrigger(props, state2, ref) {
|
|
|
6987
7191
|
state2.close(immediate);
|
|
6988
7192
|
}
|
|
6989
7193
|
};
|
|
6990
|
-
|
|
7194
|
+
createEffect22(() => {
|
|
6991
7195
|
if (!state2.isOpen()) return;
|
|
6992
7196
|
const onKeyDown = (e) => {
|
|
6993
7197
|
const element = ref();
|
|
@@ -6999,7 +7203,7 @@ function createTooltipTrigger(props, state2, ref) {
|
|
|
6999
7203
|
}
|
|
7000
7204
|
};
|
|
7001
7205
|
document.addEventListener("keydown", onKeyDown, true);
|
|
7002
|
-
|
|
7206
|
+
onCleanup25(() => {
|
|
7003
7207
|
document.removeEventListener("keydown", onKeyDown, true);
|
|
7004
7208
|
});
|
|
7005
7209
|
});
|
|
@@ -7066,6 +7270,14 @@ function createTooltipTrigger(props, state2, ref) {
|
|
|
7066
7270
|
}
|
|
7067
7271
|
};
|
|
7068
7272
|
}
|
|
7273
|
+
|
|
7274
|
+
// src/combobox/createComboBox.ts
|
|
7275
|
+
import { createEffect as createEffect24, onCleanup as onCleanup27 } from "solid-js";
|
|
7276
|
+
import { isServer as isServer6 } from "solid-js/web";
|
|
7277
|
+
|
|
7278
|
+
// src/live-announcer/announce.ts
|
|
7279
|
+
import { createEffect as createEffect23 } from "solid-js";
|
|
7280
|
+
import { isServer as isServer5 } from "solid-js/web";
|
|
7069
7281
|
var LIVEREGION_TIMEOUT_DELAY = 7e3;
|
|
7070
7282
|
var LiveAnnouncer = class {
|
|
7071
7283
|
node = null;
|
|
@@ -7175,7 +7387,7 @@ function destroyAnnouncer() {
|
|
|
7175
7387
|
}
|
|
7176
7388
|
}
|
|
7177
7389
|
function useAnnouncer() {
|
|
7178
|
-
if (
|
|
7390
|
+
if (isServer5) {
|
|
7179
7391
|
return {
|
|
7180
7392
|
announce: () => {
|
|
7181
7393
|
},
|
|
@@ -7183,7 +7395,7 @@ function useAnnouncer() {
|
|
|
7183
7395
|
}
|
|
7184
7396
|
};
|
|
7185
7397
|
}
|
|
7186
|
-
|
|
7398
|
+
createEffect23(() => {
|
|
7187
7399
|
if (!liveAnnouncer) {
|
|
7188
7400
|
liveAnnouncer = new LiveAnnouncer();
|
|
7189
7401
|
}
|
|
@@ -7238,7 +7450,12 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7238
7450
|
const getProps = () => access(props);
|
|
7239
7451
|
const id = createId(getProps().id);
|
|
7240
7452
|
if (isDevEnv()) {
|
|
7241
|
-
getProps();
|
|
7453
|
+
const p = getProps();
|
|
7454
|
+
if (!p.label && !p["aria-label"] && !p["aria-labelledby"]) {
|
|
7455
|
+
console.warn(
|
|
7456
|
+
"[solidaria] A ComboBox requires a label, aria-label, or aria-labelledby attribute for accessibility."
|
|
7457
|
+
);
|
|
7458
|
+
}
|
|
7242
7459
|
}
|
|
7243
7460
|
let isPointerDownInsideListBox = false;
|
|
7244
7461
|
const inputId = `${id}-input`;
|
|
@@ -7246,7 +7463,7 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7246
7463
|
const listBoxId = `${id}-listbox`;
|
|
7247
7464
|
const descriptionId2 = `${id}-description`;
|
|
7248
7465
|
const errorMessageId = `${id}-error`;
|
|
7249
|
-
|
|
7466
|
+
createEffect24(() => {
|
|
7250
7467
|
if (typeof document === "undefined") return;
|
|
7251
7468
|
const handleGlobalPointerDown = (e) => {
|
|
7252
7469
|
const target = e.target;
|
|
@@ -7255,14 +7472,14 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7255
7472
|
}
|
|
7256
7473
|
};
|
|
7257
7474
|
document.addEventListener("pointerdown", handleGlobalPointerDown, true);
|
|
7258
|
-
|
|
7475
|
+
onCleanup27(() => {
|
|
7259
7476
|
document.removeEventListener("pointerdown", handleGlobalPointerDown, true);
|
|
7260
7477
|
});
|
|
7261
7478
|
});
|
|
7262
7479
|
const domProps = () => filterDOMProps(getProps(), { labelable: true });
|
|
7263
|
-
|
|
7480
|
+
createEffect24(() => {
|
|
7264
7481
|
comboBoxData.set(state2, { id });
|
|
7265
|
-
|
|
7482
|
+
onCleanup27(() => {
|
|
7266
7483
|
comboBoxData.delete(state2);
|
|
7267
7484
|
});
|
|
7268
7485
|
});
|
|
@@ -7287,13 +7504,13 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7287
7504
|
}
|
|
7288
7505
|
});
|
|
7289
7506
|
const isFocused = state2.isFocused;
|
|
7290
|
-
const stringFormatter = !
|
|
7507
|
+
const stringFormatter = !isServer6 ? createStringFormatter(comboBoxIntlStrings) : null;
|
|
7291
7508
|
let lastFocusedKey = null;
|
|
7292
7509
|
let lastSelectedKey = null;
|
|
7293
7510
|
let lastOptionCount = 0;
|
|
7294
7511
|
let lastIsOpen = false;
|
|
7295
|
-
|
|
7296
|
-
if (
|
|
7512
|
+
createEffect24(() => {
|
|
7513
|
+
if (isServer6 || !stringFormatter) return;
|
|
7297
7514
|
const focusedKey = state2.focusedKey();
|
|
7298
7515
|
const isOpen = state2.isOpen();
|
|
7299
7516
|
const collection = state2.collection();
|
|
@@ -7312,8 +7529,8 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7312
7529
|
}
|
|
7313
7530
|
lastFocusedKey = focusedKey;
|
|
7314
7531
|
});
|
|
7315
|
-
|
|
7316
|
-
if (
|
|
7532
|
+
createEffect24(() => {
|
|
7533
|
+
if (isServer6 || !stringFormatter) return;
|
|
7317
7534
|
const isOpen = state2.isOpen();
|
|
7318
7535
|
const collection = state2.collection();
|
|
7319
7536
|
const optionCount = getItemCount(collection);
|
|
@@ -7326,8 +7543,8 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7326
7543
|
lastOptionCount = optionCount;
|
|
7327
7544
|
lastIsOpen = isOpen;
|
|
7328
7545
|
});
|
|
7329
|
-
|
|
7330
|
-
if (
|
|
7546
|
+
createEffect24(() => {
|
|
7547
|
+
if (isServer6 || !stringFormatter) return;
|
|
7331
7548
|
const selectedKey = state2.selectedKey();
|
|
7332
7549
|
const selectedItem = state2.selectedItem();
|
|
7333
7550
|
if (isAppleDevice() && state2.isFocused() && selectedItem && selectedKey !== lastSelectedKey) {
|
|
@@ -7337,14 +7554,14 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7337
7554
|
}
|
|
7338
7555
|
lastSelectedKey = selectedKey;
|
|
7339
7556
|
});
|
|
7340
|
-
|
|
7341
|
-
if (
|
|
7557
|
+
createEffect24(() => {
|
|
7558
|
+
if (isServer6) return;
|
|
7342
7559
|
const isOpen = state2.isOpen();
|
|
7343
7560
|
const inputEl = inputRef();
|
|
7344
7561
|
const listBoxEl = listBoxRef?.();
|
|
7345
7562
|
if (isOpen && inputEl && listBoxEl) {
|
|
7346
7563
|
const cleanup = ariaHideOutside([inputEl, listBoxEl]);
|
|
7347
|
-
|
|
7564
|
+
onCleanup27(cleanup);
|
|
7348
7565
|
}
|
|
7349
7566
|
});
|
|
7350
7567
|
const { pressProps } = createPress({
|
|
@@ -7629,17 +7846,20 @@ function createComboBox(props, state2, inputRef, buttonRef, listBoxRef) {
|
|
|
7629
7846
|
selectedItem: state2.selectedItem
|
|
7630
7847
|
};
|
|
7631
7848
|
}
|
|
7849
|
+
|
|
7850
|
+
// src/dialog/createDialog.ts
|
|
7851
|
+
import { createEffect as createEffect25, createMemo as createMemo12, createSignal as createSignal13, createUniqueId as createUniqueId2, onCleanup as onCleanup28 } from "solid-js";
|
|
7632
7852
|
function createDialog(props, ref) {
|
|
7633
7853
|
const getProps = typeof props === "function" ? props : () => props;
|
|
7634
7854
|
const role = () => getProps().role ?? "dialog";
|
|
7635
|
-
const generatedTitleId =
|
|
7636
|
-
const [isRefocusing, setIsRefocusing] =
|
|
7637
|
-
const titleId =
|
|
7855
|
+
const generatedTitleId = createUniqueId2();
|
|
7856
|
+
const [isRefocusing, setIsRefocusing] = createSignal13(false);
|
|
7857
|
+
const titleId = createMemo12(() => {
|
|
7638
7858
|
const p = getProps();
|
|
7639
7859
|
if (p["aria-labelledby"]) return void 0;
|
|
7640
7860
|
return p["aria-label"] ? void 0 : generatedTitleId;
|
|
7641
7861
|
});
|
|
7642
|
-
|
|
7862
|
+
createEffect25(() => {
|
|
7643
7863
|
if (typeof document === "undefined") return;
|
|
7644
7864
|
const dialogEl = ref();
|
|
7645
7865
|
if (dialogEl && !dialogEl.contains(document.activeElement)) {
|
|
@@ -7652,12 +7872,12 @@ function createDialog(props, ref) {
|
|
|
7652
7872
|
setIsRefocusing(false);
|
|
7653
7873
|
}
|
|
7654
7874
|
}, 500);
|
|
7655
|
-
|
|
7875
|
+
onCleanup28(() => {
|
|
7656
7876
|
clearTimeout(timeout);
|
|
7657
7877
|
});
|
|
7658
7878
|
}
|
|
7659
7879
|
});
|
|
7660
|
-
const dialogProps =
|
|
7880
|
+
const dialogProps = createMemo12(() => {
|
|
7661
7881
|
const p = getProps();
|
|
7662
7882
|
return {
|
|
7663
7883
|
...filterDOMProps(p),
|
|
@@ -7676,7 +7896,7 @@ function createDialog(props, ref) {
|
|
|
7676
7896
|
}
|
|
7677
7897
|
};
|
|
7678
7898
|
});
|
|
7679
|
-
const titlePropsValue =
|
|
7899
|
+
const titlePropsValue = createMemo12(() => ({
|
|
7680
7900
|
id: titleId()
|
|
7681
7901
|
}));
|
|
7682
7902
|
return {
|
|
@@ -7684,13 +7904,16 @@ function createDialog(props, ref) {
|
|
|
7684
7904
|
titleProps: titlePropsValue
|
|
7685
7905
|
};
|
|
7686
7906
|
}
|
|
7907
|
+
|
|
7908
|
+
// src/toast/createToast.ts
|
|
7909
|
+
import { createMemo as createMemo13 } from "solid-js";
|
|
7687
7910
|
function createToast(props) {
|
|
7688
7911
|
const titleId = createId();
|
|
7689
7912
|
const descriptionId2 = createId();
|
|
7690
7913
|
const close = () => {
|
|
7691
7914
|
props.state.close(props.toast.key);
|
|
7692
7915
|
};
|
|
7693
|
-
const toastProps =
|
|
7916
|
+
const toastProps = createMemo13(() => ({
|
|
7694
7917
|
role: "alertdialog",
|
|
7695
7918
|
"aria-modal": "false",
|
|
7696
7919
|
"aria-labelledby": titleId,
|
|
@@ -7698,18 +7921,18 @@ function createToast(props) {
|
|
|
7698
7921
|
"data-animation": props.toast.animation,
|
|
7699
7922
|
"data-key": props.toast.key
|
|
7700
7923
|
}));
|
|
7701
|
-
const contentProps =
|
|
7924
|
+
const contentProps = createMemo13(() => ({
|
|
7702
7925
|
role: "alert",
|
|
7703
7926
|
"aria-atomic": "true",
|
|
7704
7927
|
"aria-live": "assertive"
|
|
7705
7928
|
}));
|
|
7706
|
-
const titleProps =
|
|
7929
|
+
const titleProps = createMemo13(() => ({
|
|
7707
7930
|
id: titleId
|
|
7708
7931
|
}));
|
|
7709
|
-
const descriptionProps =
|
|
7932
|
+
const descriptionProps = createMemo13(() => ({
|
|
7710
7933
|
id: descriptionId2
|
|
7711
7934
|
}));
|
|
7712
|
-
const closeButtonProps =
|
|
7935
|
+
const closeButtonProps = createMemo13(() => ({
|
|
7713
7936
|
"aria-label": "Close",
|
|
7714
7937
|
onClick: close
|
|
7715
7938
|
}));
|
|
@@ -7731,6 +7954,9 @@ function createToast(props) {
|
|
|
7731
7954
|
}
|
|
7732
7955
|
};
|
|
7733
7956
|
}
|
|
7957
|
+
|
|
7958
|
+
// src/toast/createToastRegion.ts
|
|
7959
|
+
import { createMemo as createMemo14 } from "solid-js";
|
|
7734
7960
|
function createToastRegion(props) {
|
|
7735
7961
|
const { hoverProps } = createHover({
|
|
7736
7962
|
onHoverStart: () => {
|
|
@@ -7750,7 +7976,7 @@ function createToastRegion(props) {
|
|
|
7750
7976
|
props.state.resumeAll();
|
|
7751
7977
|
}
|
|
7752
7978
|
};
|
|
7753
|
-
const regionProps =
|
|
7979
|
+
const regionProps = createMemo14(() => ({
|
|
7754
7980
|
...hoverProps,
|
|
7755
7981
|
role: "region",
|
|
7756
7982
|
"aria-label": props["aria-label"] ?? "Notifications",
|
|
@@ -7765,6 +7991,12 @@ function createToastRegion(props) {
|
|
|
7765
7991
|
};
|
|
7766
7992
|
}
|
|
7767
7993
|
|
|
7994
|
+
// src/popover/createPopover.ts
|
|
7995
|
+
import { createEffect as createEffect27, onCleanup as onCleanup30 } from "solid-js";
|
|
7996
|
+
|
|
7997
|
+
// src/popover/createOverlayPosition.ts
|
|
7998
|
+
import { createEffect as createEffect26, createSignal as createSignal14, onCleanup as onCleanup29 } from "solid-js";
|
|
7999
|
+
|
|
7768
8000
|
// src/popover/calculatePosition.ts
|
|
7769
8001
|
var AXIS = {
|
|
7770
8002
|
top: "top",
|
|
@@ -8217,9 +8449,13 @@ function calculatePosition(opts) {
|
|
|
8217
8449
|
// src/popover/createOverlayPosition.ts
|
|
8218
8450
|
var visualViewport2 = typeof document !== "undefined" ? window.visualViewport : null;
|
|
8219
8451
|
function translateRTL(position, direction) {
|
|
8452
|
+
if (direction === "rtl") {
|
|
8453
|
+
return position.replace("start", "right").replace("end", "left");
|
|
8454
|
+
}
|
|
8220
8455
|
return position.replace("start", "left").replace("end", "right");
|
|
8221
8456
|
}
|
|
8222
8457
|
function createOverlayPosition(props) {
|
|
8458
|
+
const direction = "ltr";
|
|
8223
8459
|
const arrowSize = () => props.arrowSize ?? 0;
|
|
8224
8460
|
const targetRef = () => props.targetRef();
|
|
8225
8461
|
const overlayRef = () => props.overlayRef();
|
|
@@ -8236,9 +8472,9 @@ function createOverlayPosition(props) {
|
|
|
8236
8472
|
const onClose = () => props.onClose;
|
|
8237
8473
|
const maxHeight = () => props.maxHeight;
|
|
8238
8474
|
const arrowBoundaryOffset = () => props.arrowBoundaryOffset ?? 0;
|
|
8239
|
-
const [position, setPosition] =
|
|
8475
|
+
const [position, setPosition] = createSignal14(null);
|
|
8240
8476
|
let lastScale = visualViewport2?.scale;
|
|
8241
|
-
|
|
8477
|
+
createEffect26(() => {
|
|
8242
8478
|
if (isOpen()) {
|
|
8243
8479
|
lastScale = visualViewport2?.scale;
|
|
8244
8480
|
}
|
|
@@ -8262,7 +8498,7 @@ function createOverlayPosition(props) {
|
|
|
8262
8498
|
overlay.style.maxHeight = (window.visualViewport?.height ?? window.innerHeight) + "px";
|
|
8263
8499
|
}
|
|
8264
8500
|
const result = calculatePosition({
|
|
8265
|
-
placement: translateRTL(placement()),
|
|
8501
|
+
placement: translateRTL(placement(), direction),
|
|
8266
8502
|
overlayNode,
|
|
8267
8503
|
targetNode,
|
|
8268
8504
|
scrollNode: scrollNode || overlayNode,
|
|
@@ -8288,40 +8524,51 @@ function createOverlayPosition(props) {
|
|
|
8288
8524
|
overlay.style.maxHeight = result.maxHeight != null ? result.maxHeight + "px" : "";
|
|
8289
8525
|
setPosition(result);
|
|
8290
8526
|
};
|
|
8291
|
-
|
|
8527
|
+
createEffect26(() => {
|
|
8528
|
+
shouldUpdatePosition();
|
|
8529
|
+
placement();
|
|
8292
8530
|
overlayRef();
|
|
8293
8531
|
targetRef();
|
|
8294
8532
|
arrowRef();
|
|
8295
8533
|
scrollRef();
|
|
8534
|
+
containerPadding();
|
|
8535
|
+
shouldFlip();
|
|
8536
|
+
boundaryElement();
|
|
8537
|
+
offset();
|
|
8538
|
+
crossOffset();
|
|
8539
|
+
isOpen();
|
|
8540
|
+
maxHeight();
|
|
8541
|
+
arrowBoundaryOffset();
|
|
8542
|
+
arrowSize();
|
|
8296
8543
|
updatePosition();
|
|
8297
8544
|
});
|
|
8298
|
-
|
|
8545
|
+
createEffect26(() => {
|
|
8299
8546
|
if (!isOpen()) return;
|
|
8300
8547
|
const handleResize = () => updatePosition();
|
|
8301
8548
|
window.addEventListener("resize", handleResize, false);
|
|
8302
|
-
|
|
8549
|
+
onCleanup29(() => {
|
|
8303
8550
|
window.removeEventListener("resize", handleResize, false);
|
|
8304
8551
|
});
|
|
8305
8552
|
});
|
|
8306
|
-
|
|
8553
|
+
createEffect26(() => {
|
|
8307
8554
|
const overlayNode = overlayRef();
|
|
8308
8555
|
if (!overlayNode || !isOpen()) return;
|
|
8309
8556
|
const resizeObserver = new ResizeObserver(() => updatePosition());
|
|
8310
8557
|
resizeObserver.observe(overlayNode);
|
|
8311
|
-
|
|
8558
|
+
onCleanup29(() => {
|
|
8312
8559
|
resizeObserver.disconnect();
|
|
8313
8560
|
});
|
|
8314
8561
|
});
|
|
8315
|
-
|
|
8562
|
+
createEffect26(() => {
|
|
8316
8563
|
const targetNode = targetRef();
|
|
8317
8564
|
if (!targetNode || !isOpen()) return;
|
|
8318
8565
|
const resizeObserver = new ResizeObserver(() => updatePosition());
|
|
8319
8566
|
resizeObserver.observe(targetNode);
|
|
8320
|
-
|
|
8567
|
+
onCleanup29(() => {
|
|
8321
8568
|
resizeObserver.disconnect();
|
|
8322
8569
|
});
|
|
8323
8570
|
});
|
|
8324
|
-
|
|
8571
|
+
createEffect26(() => {
|
|
8325
8572
|
if (!isOpen()) return;
|
|
8326
8573
|
let timeout;
|
|
8327
8574
|
let isResizing = false;
|
|
@@ -8340,13 +8587,13 @@ function createOverlayPosition(props) {
|
|
|
8340
8587
|
};
|
|
8341
8588
|
visualViewport2?.addEventListener("resize", onResize);
|
|
8342
8589
|
visualViewport2?.addEventListener("scroll", onScroll);
|
|
8343
|
-
|
|
8590
|
+
onCleanup29(() => {
|
|
8344
8591
|
visualViewport2?.removeEventListener("resize", onResize);
|
|
8345
8592
|
visualViewport2?.removeEventListener("scroll", onScroll);
|
|
8346
8593
|
clearTimeout(timeout);
|
|
8347
8594
|
});
|
|
8348
8595
|
});
|
|
8349
|
-
|
|
8596
|
+
createEffect26(() => {
|
|
8350
8597
|
const targetNode = targetRef();
|
|
8351
8598
|
const closeHandler = onClose();
|
|
8352
8599
|
if (!targetNode || !isOpen() || !closeHandler) return;
|
|
@@ -8358,7 +8605,7 @@ function createOverlayPosition(props) {
|
|
|
8358
8605
|
}
|
|
8359
8606
|
};
|
|
8360
8607
|
document.addEventListener("scroll", handleScroll, true);
|
|
8361
|
-
|
|
8608
|
+
onCleanup29(() => {
|
|
8362
8609
|
document.removeEventListener("scroll", handleScroll, true);
|
|
8363
8610
|
});
|
|
8364
8611
|
});
|
|
@@ -8421,7 +8668,7 @@ function createPopover(props, state2) {
|
|
|
8421
8668
|
createPreventScroll({
|
|
8422
8669
|
isDisabled: isNonModal() || !state2.isOpen()
|
|
8423
8670
|
});
|
|
8424
|
-
|
|
8671
|
+
createEffect27(() => {
|
|
8425
8672
|
if (state2.isOpen() && popoverRef()) {
|
|
8426
8673
|
const element = groupRef() ?? popoverRef();
|
|
8427
8674
|
if (!element) return;
|
|
@@ -8431,7 +8678,7 @@ function createPopover(props, state2) {
|
|
|
8431
8678
|
} else {
|
|
8432
8679
|
cleanup = ariaHideOutside([element], { shouldUseInert: true });
|
|
8433
8680
|
}
|
|
8434
|
-
|
|
8681
|
+
onCleanup30(() => {
|
|
8435
8682
|
cleanup?.();
|
|
8436
8683
|
});
|
|
8437
8684
|
}
|
|
@@ -8444,11 +8691,20 @@ function createPopover(props, state2) {
|
|
|
8444
8691
|
triggerAnchorPoint
|
|
8445
8692
|
};
|
|
8446
8693
|
}
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8694
|
+
|
|
8695
|
+
// src/focus/FocusScope.tsx
|
|
8696
|
+
import { template as _$template3 } from "solid-js/web";
|
|
8697
|
+
import { createComponent as _$createComponent5 } from "solid-js/web";
|
|
8698
|
+
import { getNextElement as _$getNextElement3 } from "solid-js/web";
|
|
8699
|
+
import { use as _$use } from "solid-js/web";
|
|
8700
|
+
import { memo as _$memo } from "solid-js/web";
|
|
8701
|
+
import { createContext as createContext5, useContext as useContext5, createEffect as createEffect28, onCleanup as onCleanup31, createSignal as createSignal15, onMount as onMount6 } from "solid-js";
|
|
8702
|
+
import { isServer as isServer7 } from "solid-js/web";
|
|
8703
|
+
var _tmpl$3 = /* @__PURE__ */ _$template3(`<span data-focus-scope-start hidden>`);
|
|
8704
|
+
var _tmpl$23 = /* @__PURE__ */ _$template3(`<span data-focus-scope-end hidden>`);
|
|
8705
|
+
var FocusScopeContext = createContext5(null);
|
|
8450
8706
|
function useFocusManager() {
|
|
8451
|
-
return
|
|
8707
|
+
return useContext5(FocusScopeContext)?.focusManager;
|
|
8452
8708
|
}
|
|
8453
8709
|
function isTabbable2(element) {
|
|
8454
8710
|
if (!isFocusable(element)) {
|
|
@@ -8489,12 +8745,12 @@ function getActiveElement4(doc) {
|
|
|
8489
8745
|
return activeElement;
|
|
8490
8746
|
}
|
|
8491
8747
|
var FocusScope = (props) => {
|
|
8492
|
-
if (
|
|
8493
|
-
return memo(() => props.children);
|
|
8748
|
+
if (isServer7) {
|
|
8749
|
+
return _$memo(() => props.children);
|
|
8494
8750
|
}
|
|
8495
8751
|
let startRef;
|
|
8496
8752
|
let endRef;
|
|
8497
|
-
const [scopeElements, setScopeElements] =
|
|
8753
|
+
const [scopeElements, setScopeElements] = createSignal15([]);
|
|
8498
8754
|
let nodeToRestore = null;
|
|
8499
8755
|
const focusManager = {
|
|
8500
8756
|
focusNext(opts = {}) {
|
|
@@ -8585,7 +8841,7 @@ var FocusScope = (props) => {
|
|
|
8585
8841
|
return null;
|
|
8586
8842
|
}
|
|
8587
8843
|
};
|
|
8588
|
-
|
|
8844
|
+
onMount6(() => {
|
|
8589
8845
|
if (!startRef || !endRef) return;
|
|
8590
8846
|
const nodes = [];
|
|
8591
8847
|
let node = startRef.nextSibling;
|
|
@@ -8597,7 +8853,7 @@ var FocusScope = (props) => {
|
|
|
8597
8853
|
}
|
|
8598
8854
|
setScopeElements(nodes);
|
|
8599
8855
|
});
|
|
8600
|
-
|
|
8856
|
+
onMount6(() => {
|
|
8601
8857
|
if (!props.restoreFocus) return;
|
|
8602
8858
|
const scopeDoc = startRef ? getOwnerDocument(startRef) : document;
|
|
8603
8859
|
const scopeActive = getActiveElement4(scopeDoc);
|
|
@@ -8608,7 +8864,7 @@ var FocusScope = (props) => {
|
|
|
8608
8864
|
}
|
|
8609
8865
|
nodeToRestore = topActive;
|
|
8610
8866
|
});
|
|
8611
|
-
|
|
8867
|
+
createEffect28(() => {
|
|
8612
8868
|
if (!props.autoFocus) return;
|
|
8613
8869
|
const scope = scopeElements();
|
|
8614
8870
|
if (scope.length === 0) return;
|
|
@@ -8618,7 +8874,7 @@ var FocusScope = (props) => {
|
|
|
8618
8874
|
focusManager.focusFirst();
|
|
8619
8875
|
}
|
|
8620
8876
|
});
|
|
8621
|
-
|
|
8877
|
+
createEffect28(() => {
|
|
8622
8878
|
if (!props.contain) return;
|
|
8623
8879
|
const scope = scopeElements();
|
|
8624
8880
|
if (scope.length === 0) return;
|
|
@@ -8658,42 +8914,47 @@ var FocusScope = (props) => {
|
|
|
8658
8914
|
};
|
|
8659
8915
|
doc.addEventListener("keydown", onKeyDown, true);
|
|
8660
8916
|
doc.addEventListener("focusin", onFocusIn, true);
|
|
8661
|
-
|
|
8917
|
+
onCleanup31(() => {
|
|
8662
8918
|
doc.removeEventListener("keydown", onKeyDown, true);
|
|
8663
8919
|
doc.removeEventListener("focusin", onFocusIn, true);
|
|
8664
8920
|
});
|
|
8665
8921
|
});
|
|
8666
|
-
|
|
8922
|
+
onCleanup31(() => {
|
|
8667
8923
|
if (props.restoreFocus && nodeToRestore && nodeToRestore.focus) {
|
|
8668
8924
|
const doc = getOwnerDocument(nodeToRestore);
|
|
8669
8925
|
const win = doc.defaultView ?? window;
|
|
8670
8926
|
win.requestAnimationFrame(() => {
|
|
8671
8927
|
if (nodeToRestore && doc.body.contains(nodeToRestore)) {
|
|
8928
|
+
;
|
|
8672
8929
|
nodeToRestore.focus();
|
|
8673
8930
|
}
|
|
8674
8931
|
});
|
|
8675
8932
|
}
|
|
8676
8933
|
});
|
|
8677
|
-
return
|
|
8934
|
+
return _$createComponent5(FocusScopeContext.Provider, {
|
|
8678
8935
|
value: {
|
|
8679
8936
|
focusManager,
|
|
8680
8937
|
scopeRef: scopeElements
|
|
8681
8938
|
},
|
|
8682
8939
|
get children() {
|
|
8683
8940
|
return [(() => {
|
|
8684
|
-
var _el$ = _tmpl$3
|
|
8941
|
+
var _el$ = _$getNextElement3(_tmpl$3);
|
|
8685
8942
|
var _ref$ = startRef;
|
|
8686
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : startRef = _el$;
|
|
8943
|
+
typeof _ref$ === "function" ? _$use(_ref$, _el$) : startRef = _el$;
|
|
8687
8944
|
return _el$;
|
|
8688
|
-
})(), memo(() => props.children), (() => {
|
|
8689
|
-
var _el$2 = _tmpl$23
|
|
8945
|
+
})(), _$memo(() => props.children), (() => {
|
|
8946
|
+
var _el$2 = _$getNextElement3(_tmpl$23);
|
|
8690
8947
|
var _ref$2 = endRef;
|
|
8691
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$2) : endRef = _el$2;
|
|
8948
|
+
typeof _ref$2 === "function" ? _$use(_ref$2, _el$2) : endRef = _el$2;
|
|
8692
8949
|
return _el$2;
|
|
8693
8950
|
})()];
|
|
8694
8951
|
}
|
|
8695
8952
|
});
|
|
8696
8953
|
};
|
|
8954
|
+
|
|
8955
|
+
// src/focus/createFocusRestore.ts
|
|
8956
|
+
import { onCleanup as onCleanup32, onMount as onMount7 } from "solid-js";
|
|
8957
|
+
import { isServer as isServer8 } from "solid-js/web";
|
|
8697
8958
|
var focusStack = [];
|
|
8698
8959
|
function pushFocusStack(element) {
|
|
8699
8960
|
focusStack.push(element);
|
|
@@ -8757,7 +9018,7 @@ function createFocusRestore(options = {}) {
|
|
|
8757
9018
|
onRestoreFailed,
|
|
8758
9019
|
preventScroll = true
|
|
8759
9020
|
} = options;
|
|
8760
|
-
if (
|
|
9021
|
+
if (isServer8) {
|
|
8761
9022
|
return {
|
|
8762
9023
|
restore: () => false,
|
|
8763
9024
|
getSavedElement: () => null,
|
|
@@ -8768,10 +9029,10 @@ function createFocusRestore(options = {}) {
|
|
|
8768
9029
|
};
|
|
8769
9030
|
}
|
|
8770
9031
|
let savedElement = null;
|
|
8771
|
-
|
|
9032
|
+
onMount7(() => {
|
|
8772
9033
|
saveCurrentFocus();
|
|
8773
9034
|
});
|
|
8774
|
-
|
|
9035
|
+
onCleanup32(() => {
|
|
8775
9036
|
if (restoreOnUnmount && savedElement) {
|
|
8776
9037
|
tryRestoreFocus(savedElement, {
|
|
8777
9038
|
maxRetries,
|
|
@@ -8832,6 +9093,10 @@ function createFocusRestore(options = {}) {
|
|
|
8832
9093
|
clear
|
|
8833
9094
|
};
|
|
8834
9095
|
}
|
|
9096
|
+
|
|
9097
|
+
// src/focus/createVirtualFocus.ts
|
|
9098
|
+
import { createSignal as createSignal16 } from "solid-js";
|
|
9099
|
+
import { isServer as isServer9 } from "solid-js/web";
|
|
8835
9100
|
var DEFAULT_PAGE_SIZE2 = 10;
|
|
8836
9101
|
function createVirtualFocus(options) {
|
|
8837
9102
|
const {
|
|
@@ -8845,7 +9110,7 @@ function createVirtualFocus(options) {
|
|
|
8845
9110
|
skipDisabled = true,
|
|
8846
9111
|
orientation = "vertical"
|
|
8847
9112
|
} = options;
|
|
8848
|
-
if (
|
|
9113
|
+
if (isServer9) {
|
|
8849
9114
|
const emptyAccessor = () => null;
|
|
8850
9115
|
return {
|
|
8851
9116
|
focusedKey: emptyAccessor,
|
|
@@ -8873,7 +9138,7 @@ function createVirtualFocus(options) {
|
|
|
8873
9138
|
getItemProps: (key) => ({ id: `item-${key}` })
|
|
8874
9139
|
};
|
|
8875
9140
|
}
|
|
8876
|
-
const [internalKey, setInternalKey] =
|
|
9141
|
+
const [internalKey, setInternalKey] = createSignal16(
|
|
8877
9142
|
defaultFocusedKey ?? null
|
|
8878
9143
|
);
|
|
8879
9144
|
const focusedKey = controlledFocusedKey ?? internalKey;
|
|
@@ -9017,6 +9282,10 @@ function createVirtualFocus(options) {
|
|
|
9017
9282
|
getItemProps
|
|
9018
9283
|
};
|
|
9019
9284
|
}
|
|
9285
|
+
|
|
9286
|
+
// src/focus/createAutoFocus.ts
|
|
9287
|
+
import { onCleanup as onCleanup34, onMount as onMount8 } from "solid-js";
|
|
9288
|
+
import { isServer as isServer10 } from "solid-js/web";
|
|
9020
9289
|
var autoFocusQueue = [];
|
|
9021
9290
|
var processingTimeout = null;
|
|
9022
9291
|
function processAutoFocusQueue() {
|
|
@@ -9083,7 +9352,7 @@ function createAutoFocus(ref, options = {}) {
|
|
|
9083
9352
|
onFocus,
|
|
9084
9353
|
onSkip
|
|
9085
9354
|
} = options;
|
|
9086
|
-
if (
|
|
9355
|
+
if (isServer10) {
|
|
9087
9356
|
return {
|
|
9088
9357
|
focus: () => {
|
|
9089
9358
|
},
|
|
@@ -9092,7 +9361,7 @@ function createAutoFocus(ref, options = {}) {
|
|
|
9092
9361
|
};
|
|
9093
9362
|
}
|
|
9094
9363
|
let canceled = false;
|
|
9095
|
-
|
|
9364
|
+
onMount8(() => {
|
|
9096
9365
|
if (!isEnabled || canceled) return;
|
|
9097
9366
|
queueAutoFocus({
|
|
9098
9367
|
ref,
|
|
@@ -9104,7 +9373,7 @@ function createAutoFocus(ref, options = {}) {
|
|
|
9104
9373
|
onSkip
|
|
9105
9374
|
});
|
|
9106
9375
|
});
|
|
9107
|
-
|
|
9376
|
+
onCleanup34(() => {
|
|
9108
9377
|
removeFromQueue(ref);
|
|
9109
9378
|
});
|
|
9110
9379
|
const focus = () => {
|
|
@@ -9137,11 +9406,14 @@ function clearAutoFocusQueue() {
|
|
|
9137
9406
|
function getAutoFocusQueueLength() {
|
|
9138
9407
|
return autoFocusQueue.length;
|
|
9139
9408
|
}
|
|
9409
|
+
|
|
9410
|
+
// src/disclosure/createDisclosure.ts
|
|
9411
|
+
import { createEffect as createEffect32 } from "solid-js";
|
|
9140
9412
|
function createDisclosure(props, state2, panelRef) {
|
|
9141
9413
|
const getProps = typeof props === "function" ? props : () => props;
|
|
9142
9414
|
const triggerId = createId();
|
|
9143
9415
|
const panelId = createId();
|
|
9144
|
-
|
|
9416
|
+
createEffect32(() => {
|
|
9145
9417
|
if (!canUseDOM) return;
|
|
9146
9418
|
const panel = panelRef();
|
|
9147
9419
|
if (!panel) return;
|
|
@@ -9186,8 +9458,11 @@ function createDisclosure(props, state2, panelRef) {
|
|
|
9186
9458
|
}
|
|
9187
9459
|
};
|
|
9188
9460
|
}
|
|
9461
|
+
|
|
9462
|
+
// src/disclosure/createDisclosureGroup.ts
|
|
9463
|
+
import { createMemo as createMemo15 } from "solid-js";
|
|
9189
9464
|
function createDisclosureGroup(props, state2) {
|
|
9190
|
-
const groupProps =
|
|
9465
|
+
const groupProps = createMemo15(() => ({
|
|
9191
9466
|
role: "group",
|
|
9192
9467
|
"aria-disabled": props.isDisabled || state2.isDisabled || void 0
|
|
9193
9468
|
}));
|
|
@@ -9218,6 +9493,9 @@ function createMeter(props = {}) {
|
|
|
9218
9493
|
}
|
|
9219
9494
|
};
|
|
9220
9495
|
}
|
|
9496
|
+
|
|
9497
|
+
// src/tag/createTagGroup.ts
|
|
9498
|
+
import { createEffect as createEffect33, onCleanup as onCleanup35 } from "solid-js";
|
|
9221
9499
|
var tagGroupData = /* @__PURE__ */ new WeakMap();
|
|
9222
9500
|
function getTagGroupData(state2) {
|
|
9223
9501
|
return tagGroupData.get(state2);
|
|
@@ -9240,13 +9518,13 @@ function createTagGroup(props, state2, _ref) {
|
|
|
9240
9518
|
},
|
|
9241
9519
|
labelElementType: "span"
|
|
9242
9520
|
});
|
|
9243
|
-
|
|
9521
|
+
createEffect33(() => {
|
|
9244
9522
|
const p = getProps();
|
|
9245
9523
|
tagGroupData.set(state2, {
|
|
9246
9524
|
id,
|
|
9247
9525
|
onRemove: p.onRemove
|
|
9248
9526
|
});
|
|
9249
|
-
|
|
9527
|
+
onCleanup35(() => {
|
|
9250
9528
|
tagGroupData.delete(state2);
|
|
9251
9529
|
});
|
|
9252
9530
|
});
|
|
@@ -9292,6 +9570,9 @@ function createTagGroup(props, state2, _ref) {
|
|
|
9292
9570
|
}
|
|
9293
9571
|
};
|
|
9294
9572
|
}
|
|
9573
|
+
|
|
9574
|
+
// src/tag/createTag.ts
|
|
9575
|
+
import { createMemo as createMemo16 } from "solid-js";
|
|
9295
9576
|
function createTag(props, state2, ref) {
|
|
9296
9577
|
const getProps = () => access(props);
|
|
9297
9578
|
const rowId = createId();
|
|
@@ -9299,14 +9580,14 @@ function createTag(props, state2, ref) {
|
|
|
9299
9580
|
const removeButtonId = createId();
|
|
9300
9581
|
const getData = () => getTagGroupData(state2);
|
|
9301
9582
|
const key = () => getProps().key;
|
|
9302
|
-
const isDisabled =
|
|
9583
|
+
const isDisabled = createMemo16(() => {
|
|
9303
9584
|
const p = getProps();
|
|
9304
9585
|
return p.isDisabled || state2.isDisabled(key());
|
|
9305
9586
|
});
|
|
9306
|
-
const isSelected =
|
|
9587
|
+
const isSelected = createMemo16(() => {
|
|
9307
9588
|
return state2.isSelected(key());
|
|
9308
9589
|
});
|
|
9309
|
-
const isFocused =
|
|
9590
|
+
const isFocused = createMemo16(() => {
|
|
9310
9591
|
return state2.focusedKey() === key();
|
|
9311
9592
|
});
|
|
9312
9593
|
const { pressProps, isPressed } = createPress({
|
|
@@ -9336,7 +9617,7 @@ function createTag(props, state2, ref) {
|
|
|
9336
9617
|
}
|
|
9337
9618
|
}
|
|
9338
9619
|
};
|
|
9339
|
-
const tabIndex =
|
|
9620
|
+
const tabIndex = createMemo16(() => {
|
|
9340
9621
|
if (isDisabled()) return -1;
|
|
9341
9622
|
if (isFocused() || state2.focusedKey() === null) {
|
|
9342
9623
|
return 0;
|
|
@@ -9344,7 +9625,7 @@ function createTag(props, state2, ref) {
|
|
|
9344
9625
|
return -1;
|
|
9345
9626
|
});
|
|
9346
9627
|
const domProps = () => filterDOMProps(getProps());
|
|
9347
|
-
const allowsRemoving =
|
|
9628
|
+
const allowsRemoving = createMemo16(() => {
|
|
9348
9629
|
const data = getData();
|
|
9349
9630
|
return !!data?.onRemove;
|
|
9350
9631
|
});
|
|
@@ -9397,12 +9678,15 @@ function createTag(props, state2, ref) {
|
|
|
9397
9678
|
}
|
|
9398
9679
|
};
|
|
9399
9680
|
}
|
|
9681
|
+
|
|
9682
|
+
// src/calendar/createCalendar.ts
|
|
9683
|
+
import { createMemo as createMemo17 } from "solid-js";
|
|
9400
9684
|
function createCalendar(props, state2) {
|
|
9401
9685
|
const getProps = () => access(props);
|
|
9402
9686
|
const id = createId(getProps().id);
|
|
9403
9687
|
const titleId = createId();
|
|
9404
|
-
const title =
|
|
9405
|
-
const prevButtonProps =
|
|
9688
|
+
const title = createMemo17(() => state2.title());
|
|
9689
|
+
const prevButtonProps = createMemo17(() => {
|
|
9406
9690
|
const p = getProps();
|
|
9407
9691
|
const isDisabled = p.isDisabled || state2.isDisabled();
|
|
9408
9692
|
return {
|
|
@@ -9416,7 +9700,7 @@ function createCalendar(props, state2) {
|
|
|
9416
9700
|
tabIndex: -1
|
|
9417
9701
|
};
|
|
9418
9702
|
});
|
|
9419
|
-
const nextButtonProps =
|
|
9703
|
+
const nextButtonProps = createMemo17(() => {
|
|
9420
9704
|
const p = getProps();
|
|
9421
9705
|
const isDisabled = p.isDisabled || state2.isDisabled();
|
|
9422
9706
|
return {
|
|
@@ -9430,11 +9714,11 @@ function createCalendar(props, state2) {
|
|
|
9430
9714
|
tabIndex: -1
|
|
9431
9715
|
};
|
|
9432
9716
|
});
|
|
9433
|
-
const titleProps =
|
|
9717
|
+
const titleProps = createMemo17(() => ({
|
|
9434
9718
|
id: titleId,
|
|
9435
9719
|
"aria-live": "polite"
|
|
9436
9720
|
}));
|
|
9437
|
-
const calendarProps =
|
|
9721
|
+
const calendarProps = createMemo17(() => {
|
|
9438
9722
|
const p = getProps();
|
|
9439
9723
|
return mergeProps(
|
|
9440
9724
|
{
|
|
@@ -9464,8 +9748,11 @@ function createCalendar(props, state2) {
|
|
|
9464
9748
|
}
|
|
9465
9749
|
};
|
|
9466
9750
|
}
|
|
9751
|
+
|
|
9752
|
+
// src/calendar/createCalendarGrid.ts
|
|
9753
|
+
import { createMemo as createMemo18, onMount as onMount9, onCleanup as onCleanup36 } from "solid-js";
|
|
9467
9754
|
function createCalendarGrid(_props, state2, ref) {
|
|
9468
|
-
const weekDays =
|
|
9755
|
+
const weekDays = createMemo18(() => state2.weekDays());
|
|
9469
9756
|
const handleKeyDown = (e) => {
|
|
9470
9757
|
if (state2.isDisabled()) return;
|
|
9471
9758
|
switch (e.key) {
|
|
@@ -9516,16 +9803,16 @@ function createCalendarGrid(_props, state2, ref) {
|
|
|
9516
9803
|
break;
|
|
9517
9804
|
}
|
|
9518
9805
|
};
|
|
9519
|
-
|
|
9806
|
+
onMount9(() => {
|
|
9520
9807
|
const element = ref?.();
|
|
9521
9808
|
if (element) {
|
|
9522
9809
|
element.addEventListener("keydown", handleKeyDown);
|
|
9523
|
-
|
|
9810
|
+
onCleanup36(() => {
|
|
9524
9811
|
element.removeEventListener("keydown", handleKeyDown);
|
|
9525
9812
|
});
|
|
9526
9813
|
}
|
|
9527
9814
|
});
|
|
9528
|
-
const gridProps =
|
|
9815
|
+
const gridProps = createMemo18(() => ({
|
|
9529
9816
|
role: "grid",
|
|
9530
9817
|
"aria-readonly": state2.isReadOnly() || void 0,
|
|
9531
9818
|
"aria-disabled": state2.isDisabled() || void 0,
|
|
@@ -9534,7 +9821,7 @@ function createCalendarGrid(_props, state2, ref) {
|
|
|
9534
9821
|
onBlur: () => state2.setFocused(false),
|
|
9535
9822
|
onKeyDown: handleKeyDown
|
|
9536
9823
|
}));
|
|
9537
|
-
const headerProps =
|
|
9824
|
+
const headerProps = createMemo18(() => ({
|
|
9538
9825
|
role: "row"
|
|
9539
9826
|
}));
|
|
9540
9827
|
return {
|
|
@@ -9550,6 +9837,9 @@ function createCalendarGrid(_props, state2, ref) {
|
|
|
9550
9837
|
};
|
|
9551
9838
|
}
|
|
9552
9839
|
|
|
9840
|
+
// src/calendar/createCalendarCell.ts
|
|
9841
|
+
import { createSignal as createSignal17, createMemo as createMemo19, onMount as onMount10 } from "solid-js";
|
|
9842
|
+
|
|
9553
9843
|
// ../../node_modules/.deno/@internationalized+date@3.10.1/node_modules/@internationalized/date/dist/utils.mjs
|
|
9554
9844
|
function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
|
|
9555
9845
|
return amount - numerator * Math.floor(amount / numerator);
|
|
@@ -9617,11 +9907,11 @@ var $3b62074eb05584b2$export$80ee6245ec4f29ec = class {
|
|
|
9617
9907
|
let jd0 = jd;
|
|
9618
9908
|
let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
|
|
9619
9909
|
let quadricent = Math.floor(depoch / 146097);
|
|
9620
|
-
let dqc = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);
|
|
9910
|
+
let dqc = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);
|
|
9621
9911
|
let cent = Math.floor(dqc / 36524);
|
|
9622
|
-
let dcent = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);
|
|
9912
|
+
let dcent = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);
|
|
9623
9913
|
let quad = Math.floor(dcent / 1461);
|
|
9624
|
-
let dquad = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);
|
|
9914
|
+
let dquad = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);
|
|
9625
9915
|
let yindex = Math.floor(dquad / 365);
|
|
9626
9916
|
let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
|
|
9627
9917
|
let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
|
|
@@ -9631,7 +9921,7 @@ var $3b62074eb05584b2$export$80ee6245ec4f29ec = class {
|
|
|
9631
9921
|
else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1;
|
|
9632
9922
|
let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
|
|
9633
9923
|
let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
|
|
9634
|
-
return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);
|
|
9924
|
+
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);
|
|
9635
9925
|
}
|
|
9636
9926
|
toJulianDay(date) {
|
|
9637
9927
|
return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
|
|
@@ -9672,7 +9962,7 @@ var $3b62074eb05584b2$export$80ee6245ec4f29ec = class {
|
|
|
9672
9962
|
|
|
9673
9963
|
// ../../node_modules/.deno/@internationalized+date@3.10.1/node_modules/@internationalized/date/dist/queries.mjs
|
|
9674
9964
|
function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) {
|
|
9675
|
-
b = ($11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
|
|
9965
|
+
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
|
|
9676
9966
|
return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
|
|
9677
9967
|
}
|
|
9678
9968
|
function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
|
|
@@ -9684,10 +9974,10 @@ function $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) {
|
|
|
9684
9974
|
return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone));
|
|
9685
9975
|
}
|
|
9686
9976
|
function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone) {
|
|
9687
|
-
return ($11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone);
|
|
9977
|
+
return (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone);
|
|
9688
9978
|
}
|
|
9689
9979
|
function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone) {
|
|
9690
|
-
return ($11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone));
|
|
9980
|
+
return (0, $11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone));
|
|
9691
9981
|
}
|
|
9692
9982
|
function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
|
|
9693
9983
|
return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
|
|
@@ -9706,8 +9996,8 @@ function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
|
|
|
9706
9996
|
|
|
9707
9997
|
// ../../node_modules/.deno/@internationalized+date@3.10.1/node_modules/@internationalized/date/dist/conversion.mjs
|
|
9708
9998
|
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
|
|
9709
|
-
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
9710
|
-
let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
|
|
9999
|
+
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10000
|
+
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
|
|
9711
10001
|
return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
|
|
9712
10002
|
}
|
|
9713
10003
|
function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
|
|
@@ -9718,7 +10008,7 @@ function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, se
|
|
|
9718
10008
|
}
|
|
9719
10009
|
function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
|
|
9720
10010
|
if (timeZone === "UTC") return 0;
|
|
9721
|
-
if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -6e4;
|
|
10011
|
+
if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -6e4;
|
|
9722
10012
|
let { year, month, day, hour, minute, second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
|
|
9723
10013
|
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
|
|
9724
10014
|
return utc - Math.floor(ms / 1e3) * 1e3;
|
|
@@ -9770,10 +10060,10 @@ function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
|
|
|
9770
10060
|
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
|
|
9771
10061
|
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
|
|
9772
10062
|
if (timeZone === "UTC") return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
9773
|
-
if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === "compatible") {
|
|
9774
|
-
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10063
|
+
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === "compatible") {
|
|
10064
|
+
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
9775
10065
|
let date2 = /* @__PURE__ */ new Date();
|
|
9776
|
-
let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
|
|
10066
|
+
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
|
|
9777
10067
|
date2.setFullYear(year, dateTime.month - 1, dateTime.day);
|
|
9778
10068
|
date2.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
|
|
9779
10069
|
return date2.getTime();
|
|
@@ -9817,20 +10107,20 @@ function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
|
|
|
9817
10107
|
let minute = date.getUTCMinutes();
|
|
9818
10108
|
let second = date.getUTCSeconds();
|
|
9819
10109
|
let millisecond = date.getUTCMilliseconds();
|
|
9820
|
-
return new ($35ea8db9cb2ccb90$export$d3b7288e7994edea)(year < 1 ? "BC" : "AD", year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
|
|
10110
|
+
return new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(year < 1 ? "BC" : "AD", year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
|
|
9821
10111
|
}
|
|
9822
10112
|
function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
|
|
9823
|
-
return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
|
|
10113
|
+
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
|
|
9824
10114
|
}
|
|
9825
10115
|
function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
9826
10116
|
let hour = 0, minute = 0, second = 0, millisecond = 0;
|
|
9827
10117
|
if ("timeZone" in date) ({ hour, minute, second, millisecond } = date);
|
|
9828
10118
|
else if ("hour" in date && !time) return date;
|
|
9829
10119
|
if (time) ({ hour, minute, second, millisecond } = time);
|
|
9830
|
-
return new ($35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
10120
|
+
return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
9831
10121
|
}
|
|
9832
10122
|
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
9833
|
-
if (($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
|
|
10123
|
+
if ((0, $14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
|
|
9834
10124
|
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
9835
10125
|
let copy = date.copy();
|
|
9836
10126
|
copy.calendar = calendar;
|
|
@@ -9838,11 +10128,11 @@ function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
|
9838
10128
|
copy.year = calendarDate.year;
|
|
9839
10129
|
copy.month = calendarDate.month;
|
|
9840
10130
|
copy.day = calendarDate.day;
|
|
9841
|
-
($735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
|
|
10131
|
+
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
|
|
9842
10132
|
return copy;
|
|
9843
10133
|
}
|
|
9844
10134
|
function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
|
|
9845
|
-
if (date instanceof ($35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
|
|
10135
|
+
if (date instanceof (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
|
|
9846
10136
|
if (date.timeZone === timeZone) return date;
|
|
9847
10137
|
return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
|
|
9848
10138
|
}
|
|
@@ -10069,21 +10359,21 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
|
|
|
10069
10359
|
function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
|
|
10070
10360
|
let ms;
|
|
10071
10361
|
if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
|
|
10072
|
-
let res2 = $735220c2d4774dd3$export$e16d8520af44a096(($11d87f3f76e88657$export$b21e0b124e224484)(dateTime), {
|
|
10362
|
+
let res2 = $735220c2d4774dd3$export$e16d8520af44a096((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), {
|
|
10073
10363
|
years: duration.years,
|
|
10074
10364
|
months: duration.months,
|
|
10075
10365
|
weeks: duration.weeks,
|
|
10076
10366
|
days: duration.days
|
|
10077
10367
|
});
|
|
10078
|
-
ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res2, dateTime.timeZone);
|
|
10368
|
+
ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res2, dateTime.timeZone);
|
|
10079
10369
|
} else
|
|
10080
|
-
ms = ($11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
10370
|
+
ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
10081
10371
|
ms += duration.milliseconds || 0;
|
|
10082
10372
|
ms += (duration.seconds || 0) * 1e3;
|
|
10083
10373
|
ms += (duration.minutes || 0) * 6e4;
|
|
10084
10374
|
ms += (duration.hours || 0) * 36e5;
|
|
10085
|
-
let res = ($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone);
|
|
10086
|
-
return ($11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar);
|
|
10375
|
+
let res = (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone);
|
|
10376
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar);
|
|
10087
10377
|
}
|
|
10088
10378
|
function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
|
|
10089
10379
|
return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
@@ -10098,26 +10388,26 @@ function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, opti
|
|
|
10098
10388
|
min = isPM ? 12 : 0;
|
|
10099
10389
|
max = isPM ? 23 : 11;
|
|
10100
10390
|
}
|
|
10101
|
-
let plainDateTime = ($11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
|
|
10102
|
-
let minDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
10391
|
+
let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
|
|
10392
|
+
let minDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
10103
10393
|
hour: min
|
|
10104
|
-
}), new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10394
|
+
}), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10105
10395
|
let minAbsolute = [
|
|
10106
|
-
($11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "earlier"),
|
|
10107
|
-
($11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "later")
|
|
10108
|
-
].filter((ms2) => ($11d87f3f76e88657$export$1b96692a1ba042ac)(ms2, dateTime.timeZone).day === minDate.day)[0];
|
|
10109
|
-
let maxDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
10396
|
+
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "earlier"),
|
|
10397
|
+
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "later")
|
|
10398
|
+
].filter((ms2) => (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms2, dateTime.timeZone).day === minDate.day)[0];
|
|
10399
|
+
let maxDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
10110
10400
|
hour: max
|
|
10111
|
-
}), new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10401
|
+
}), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10112
10402
|
let maxAbsolute = [
|
|
10113
|
-
($11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "earlier"),
|
|
10114
|
-
($11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "later")
|
|
10115
|
-
].filter((ms2) => ($11d87f3f76e88657$export$1b96692a1ba042ac)(ms2, dateTime.timeZone).day === maxDate.day).pop();
|
|
10116
|
-
let ms = ($11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
10403
|
+
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "earlier"),
|
|
10404
|
+
(0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "later")
|
|
10405
|
+
].filter((ms2) => (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms2, dateTime.timeZone).day === maxDate.day).pop();
|
|
10406
|
+
let ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
10117
10407
|
let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);
|
|
10118
10408
|
let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;
|
|
10119
10409
|
ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;
|
|
10120
|
-
return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10410
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10121
10411
|
}
|
|
10122
10412
|
case "minute":
|
|
10123
10413
|
case "second":
|
|
@@ -10127,26 +10417,40 @@ function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, opti
|
|
|
10127
10417
|
case "year":
|
|
10128
10418
|
case "month":
|
|
10129
10419
|
case "day": {
|
|
10130
|
-
let res = $735220c2d4774dd3$export$d52ced6badfb9a4c(($11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options);
|
|
10131
|
-
let ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);
|
|
10132
|
-
return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10420
|
+
let res = $735220c2d4774dd3$export$d52ced6badfb9a4c((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options);
|
|
10421
|
+
let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);
|
|
10422
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10133
10423
|
}
|
|
10134
10424
|
default:
|
|
10135
10425
|
throw new Error("Unsupported field " + field);
|
|
10136
10426
|
}
|
|
10137
10427
|
}
|
|
10138
10428
|
function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
|
|
10139
|
-
let plainDateTime = ($11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
|
|
10429
|
+
let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
|
|
10140
10430
|
let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
|
|
10141
10431
|
if (res.compare(plainDateTime) === 0) return dateTime;
|
|
10142
|
-
let ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);
|
|
10143
|
-
return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10432
|
+
let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);
|
|
10433
|
+
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
10144
10434
|
}
|
|
10435
|
+
|
|
10436
|
+
// ../../node_modules/.deno/@internationalized+date@3.10.1/node_modules/@internationalized/date/dist/string.mjs
|
|
10437
|
+
var $fae977aafc393c5c$var$requiredDurationTimeGroups = [
|
|
10438
|
+
"hours",
|
|
10439
|
+
"minutes",
|
|
10440
|
+
"seconds"
|
|
10441
|
+
];
|
|
10442
|
+
var $fae977aafc393c5c$var$requiredDurationGroups = [
|
|
10443
|
+
"years",
|
|
10444
|
+
"months",
|
|
10445
|
+
"weeks",
|
|
10446
|
+
"days",
|
|
10447
|
+
...$fae977aafc393c5c$var$requiredDurationTimeGroups
|
|
10448
|
+
];
|
|
10145
10449
|
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
|
|
10146
10450
|
return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
|
|
10147
10451
|
}
|
|
10148
10452
|
function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
|
|
10149
|
-
let gregorianDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10453
|
+
let gregorianDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
10150
10454
|
let year;
|
|
10151
10455
|
if (gregorianDate.era === "BC") year = gregorianDate.year === 1 ? "0000" : "-" + String(Math.abs(1 - gregorianDate.year)).padStart(6, "00");
|
|
10152
10456
|
else year = String(gregorianDate.year).padStart(4, "0");
|
|
@@ -10184,7 +10488,7 @@ function _class_private_field_init(obj, privateMap, value) {
|
|
|
10184
10488
|
|
|
10185
10489
|
// ../../node_modules/.deno/@internationalized+date@3.10.1/node_modules/@internationalized/date/dist/CalendarDate.mjs
|
|
10186
10490
|
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
10187
|
-
let calendar = typeof args[0] === "object" ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
10491
|
+
let calendar = typeof args[0] === "object" ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
10188
10492
|
let era;
|
|
10189
10493
|
if (typeof args[0] === "string") era = args.shift();
|
|
10190
10494
|
else {
|
|
@@ -10211,37 +10515,37 @@ var $35ea8db9cb2ccb90$export$99faa760c7908e4f = class _$35ea8db9cb2ccb90$export$
|
|
|
10211
10515
|
}
|
|
10212
10516
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
10213
10517
|
add(duration) {
|
|
10214
|
-
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
10518
|
+
return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
10215
10519
|
}
|
|
10216
10520
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
10217
10521
|
subtract(duration) {
|
|
10218
|
-
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
10522
|
+
return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
10219
10523
|
}
|
|
10220
10524
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
10221
10525
|
set(fields) {
|
|
10222
|
-
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
|
|
10526
|
+
return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
|
|
10223
10527
|
}
|
|
10224
10528
|
/**
|
|
10225
10529
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
10226
10530
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
10227
10531
|
*/
|
|
10228
10532
|
cycle(field, amount, options) {
|
|
10229
|
-
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
10533
|
+
return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
10230
10534
|
}
|
|
10231
10535
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
10232
10536
|
toDate(timeZone) {
|
|
10233
|
-
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
|
|
10537
|
+
return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
|
|
10234
10538
|
}
|
|
10235
10539
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
10236
10540
|
toString() {
|
|
10237
|
-
return ($fae977aafc393c5c$export$60dfd74aa96791bd)(this);
|
|
10541
|
+
return (0, $fae977aafc393c5c$export$60dfd74aa96791bd)(this);
|
|
10238
10542
|
}
|
|
10239
10543
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
10240
10544
|
compare(b) {
|
|
10241
|
-
return ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
10545
|
+
return (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
10242
10546
|
}
|
|
10243
10547
|
constructor(...args) {
|
|
10244
|
-
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
|
|
10548
|
+
(0, _class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
|
|
10245
10549
|
writable: true,
|
|
10246
10550
|
value: void 0
|
|
10247
10551
|
});
|
|
@@ -10251,7 +10555,7 @@ var $35ea8db9cb2ccb90$export$99faa760c7908e4f = class _$35ea8db9cb2ccb90$export$
|
|
|
10251
10555
|
this.year = year;
|
|
10252
10556
|
this.month = month;
|
|
10253
10557
|
this.day = day;
|
|
10254
|
-
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10558
|
+
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10255
10559
|
}
|
|
10256
10560
|
};
|
|
10257
10561
|
var $35ea8db9cb2ccb90$var$_type2 = /* @__PURE__ */ new WeakMap();
|
|
@@ -10263,15 +10567,15 @@ var $35ea8db9cb2ccb90$export$ca871e8dbb80966f = class _$35ea8db9cb2ccb90$export$
|
|
|
10263
10567
|
}
|
|
10264
10568
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
10265
10569
|
add(duration) {
|
|
10266
|
-
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
10570
|
+
return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
10267
10571
|
}
|
|
10268
10572
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
10269
10573
|
subtract(duration) {
|
|
10270
|
-
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
10574
|
+
return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
10271
10575
|
}
|
|
10272
10576
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
10273
10577
|
set(fields) {
|
|
10274
|
-
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
|
|
10578
|
+
return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)((0, $735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
|
|
10275
10579
|
}
|
|
10276
10580
|
/**
|
|
10277
10581
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -10283,27 +10587,27 @@ var $35ea8db9cb2ccb90$export$ca871e8dbb80966f = class _$35ea8db9cb2ccb90$export$
|
|
|
10283
10587
|
case "year":
|
|
10284
10588
|
case "month":
|
|
10285
10589
|
case "day":
|
|
10286
|
-
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
10590
|
+
return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
10287
10591
|
default:
|
|
10288
|
-
return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
10592
|
+
return (0, $735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
10289
10593
|
}
|
|
10290
10594
|
}
|
|
10291
10595
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
10292
10596
|
toDate(timeZone, disambiguation) {
|
|
10293
|
-
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
|
|
10597
|
+
return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
|
|
10294
10598
|
}
|
|
10295
10599
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
10296
10600
|
toString() {
|
|
10297
|
-
return ($fae977aafc393c5c$export$4223de14708adc63)(this);
|
|
10601
|
+
return (0, $fae977aafc393c5c$export$4223de14708adc63)(this);
|
|
10298
10602
|
}
|
|
10299
10603
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
10300
10604
|
compare(b) {
|
|
10301
|
-
let res = ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
10302
|
-
if (res === 0) return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, ($11d87f3f76e88657$export$b21e0b124e224484)(b));
|
|
10605
|
+
let res = (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
10606
|
+
if (res === 0) return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, (0, $11d87f3f76e88657$export$b21e0b124e224484)(b));
|
|
10303
10607
|
return res;
|
|
10304
10608
|
}
|
|
10305
10609
|
constructor(...args) {
|
|
10306
|
-
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
10610
|
+
(0, _class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
10307
10611
|
writable: true,
|
|
10308
10612
|
value: void 0
|
|
10309
10613
|
});
|
|
@@ -10317,7 +10621,7 @@ var $35ea8db9cb2ccb90$export$ca871e8dbb80966f = class _$35ea8db9cb2ccb90$export$
|
|
|
10317
10621
|
this.minute = args.shift() || 0;
|
|
10318
10622
|
this.second = args.shift() || 0;
|
|
10319
10623
|
this.millisecond = args.shift() || 0;
|
|
10320
|
-
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10624
|
+
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10321
10625
|
}
|
|
10322
10626
|
};
|
|
10323
10627
|
var $35ea8db9cb2ccb90$var$_type3 = /* @__PURE__ */ new WeakMap();
|
|
@@ -10329,30 +10633,30 @@ var $35ea8db9cb2ccb90$export$d3b7288e7994edea = class _$35ea8db9cb2ccb90$export$
|
|
|
10329
10633
|
}
|
|
10330
10634
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
10331
10635
|
add(duration) {
|
|
10332
|
-
return ($735220c2d4774dd3$export$96b1d28349274637)(this, duration);
|
|
10636
|
+
return (0, $735220c2d4774dd3$export$96b1d28349274637)(this, duration);
|
|
10333
10637
|
}
|
|
10334
10638
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
10335
10639
|
subtract(duration) {
|
|
10336
|
-
return ($735220c2d4774dd3$export$6814caac34ca03c7)(this, duration);
|
|
10640
|
+
return (0, $735220c2d4774dd3$export$6814caac34ca03c7)(this, duration);
|
|
10337
10641
|
}
|
|
10338
10642
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
10339
10643
|
set(fields, disambiguation) {
|
|
10340
|
-
return ($735220c2d4774dd3$export$31b5430eb18be4f8)(this, fields, disambiguation);
|
|
10644
|
+
return (0, $735220c2d4774dd3$export$31b5430eb18be4f8)(this, fields, disambiguation);
|
|
10341
10645
|
}
|
|
10342
10646
|
/**
|
|
10343
10647
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
10344
10648
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
10345
10649
|
*/
|
|
10346
10650
|
cycle(field, amount, options) {
|
|
10347
|
-
return ($735220c2d4774dd3$export$9a297d111fc86b79)(this, field, amount, options);
|
|
10651
|
+
return (0, $735220c2d4774dd3$export$9a297d111fc86b79)(this, field, amount, options);
|
|
10348
10652
|
}
|
|
10349
10653
|
/** Converts the date to a native JavaScript Date object. */
|
|
10350
10654
|
toDate() {
|
|
10351
|
-
return ($11d87f3f76e88657$export$83aac07b4c37b25)(this);
|
|
10655
|
+
return (0, $11d87f3f76e88657$export$83aac07b4c37b25)(this);
|
|
10352
10656
|
}
|
|
10353
10657
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
10354
10658
|
toString() {
|
|
10355
|
-
return ($fae977aafc393c5c$export$bf79f1ebf4b18792)(this);
|
|
10659
|
+
return (0, $fae977aafc393c5c$export$bf79f1ebf4b18792)(this);
|
|
10356
10660
|
}
|
|
10357
10661
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
10358
10662
|
toAbsoluteString() {
|
|
@@ -10360,10 +10664,10 @@ var $35ea8db9cb2ccb90$export$d3b7288e7994edea = class _$35ea8db9cb2ccb90$export$
|
|
|
10360
10664
|
}
|
|
10361
10665
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
10362
10666
|
compare(b) {
|
|
10363
|
-
return this.toDate().getTime() - ($11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
|
|
10667
|
+
return this.toDate().getTime() - (0, $11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
|
|
10364
10668
|
}
|
|
10365
10669
|
constructor(...args) {
|
|
10366
|
-
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type3, {
|
|
10670
|
+
(0, _class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type3, {
|
|
10367
10671
|
writable: true,
|
|
10368
10672
|
value: void 0
|
|
10369
10673
|
});
|
|
@@ -10381,7 +10685,7 @@ var $35ea8db9cb2ccb90$export$d3b7288e7994edea = class _$35ea8db9cb2ccb90$export$
|
|
|
10381
10685
|
this.minute = args.shift() || 0;
|
|
10382
10686
|
this.second = args.shift() || 0;
|
|
10383
10687
|
this.millisecond = args.shift() || 0;
|
|
10384
|
-
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10688
|
+
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
10385
10689
|
}
|
|
10386
10690
|
};
|
|
10387
10691
|
|
|
@@ -10502,18 +10806,18 @@ function $fb18d541ea1ad717$var$getResolvedHourCycle(locale, options) {
|
|
|
10502
10806
|
// src/calendar/createCalendarCell.ts
|
|
10503
10807
|
function createCalendarCell(props, state2, ref) {
|
|
10504
10808
|
const getProps = () => access(props);
|
|
10505
|
-
const [isPressed, setIsPressed] =
|
|
10809
|
+
const [isPressed, setIsPressed] = createSignal17(false);
|
|
10506
10810
|
const timeZone = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
|
|
10507
|
-
const date =
|
|
10508
|
-
const isSelected =
|
|
10509
|
-
const isFocused =
|
|
10510
|
-
const isDisabled =
|
|
10811
|
+
const date = createMemo19(() => getProps().date);
|
|
10812
|
+
const isSelected = createMemo19(() => state2.isSelected(date()));
|
|
10813
|
+
const isFocused = createMemo19(() => state2.isCellFocused(date()));
|
|
10814
|
+
const isDisabled = createMemo19(() => {
|
|
10511
10815
|
return getProps().isDisabled || state2.isCellDisabled(date());
|
|
10512
10816
|
});
|
|
10513
|
-
const isUnavailable =
|
|
10514
|
-
const isOutsideMonth =
|
|
10515
|
-
const isToday =
|
|
10516
|
-
const formattedDate =
|
|
10817
|
+
const isUnavailable = createMemo19(() => state2.isCellUnavailable(date()));
|
|
10818
|
+
const isOutsideMonth = createMemo19(() => state2.isOutsideVisibleRange(date()));
|
|
10819
|
+
const isToday = createMemo19(() => $14e0f24ef4ac5c92$export$629b0a497aa65267(date(), timeZone));
|
|
10820
|
+
const formattedDate = createMemo19(() => {
|
|
10517
10821
|
return date().day.toString();
|
|
10518
10822
|
});
|
|
10519
10823
|
const handlePointerDown = (e) => {
|
|
@@ -10531,18 +10835,18 @@ function createCalendarCell(props, state2, ref) {
|
|
|
10531
10835
|
const handlePointerUp = () => {
|
|
10532
10836
|
setIsPressed(false);
|
|
10533
10837
|
};
|
|
10534
|
-
|
|
10838
|
+
onMount10(() => {
|
|
10535
10839
|
const element = ref?.();
|
|
10536
10840
|
if (element && isFocused()) {
|
|
10537
10841
|
element.focus();
|
|
10538
10842
|
}
|
|
10539
10843
|
});
|
|
10540
|
-
const cellProps =
|
|
10844
|
+
const cellProps = createMemo19(() => ({
|
|
10541
10845
|
role: "gridcell",
|
|
10542
10846
|
"aria-disabled": isDisabled() || void 0,
|
|
10543
10847
|
"aria-selected": isSelected() || void 0
|
|
10544
10848
|
}));
|
|
10545
|
-
const buttonProps =
|
|
10849
|
+
const buttonProps = createMemo19(() => {
|
|
10546
10850
|
const d = date();
|
|
10547
10851
|
const formatter = new $fb18d541ea1ad717$export$ad991b66133851cf("en-US", {
|
|
10548
10852
|
weekday: "long",
|
|
@@ -10602,12 +10906,15 @@ function createCalendarCell(props, state2, ref) {
|
|
|
10602
10906
|
}
|
|
10603
10907
|
};
|
|
10604
10908
|
}
|
|
10909
|
+
|
|
10910
|
+
// src/calendar/createRangeCalendar.ts
|
|
10911
|
+
import { createMemo as createMemo20 } from "solid-js";
|
|
10605
10912
|
function createRangeCalendar(props, state2) {
|
|
10606
10913
|
const getProps = () => access(props);
|
|
10607
10914
|
const id = createId(getProps().id);
|
|
10608
10915
|
const titleId = createId();
|
|
10609
|
-
const title =
|
|
10610
|
-
const prevButtonProps =
|
|
10916
|
+
const title = createMemo20(() => state2.title());
|
|
10917
|
+
const prevButtonProps = createMemo20(() => {
|
|
10611
10918
|
const p = getProps();
|
|
10612
10919
|
const isDisabled = p.isDisabled || state2.isDisabled();
|
|
10613
10920
|
return {
|
|
@@ -10621,7 +10928,7 @@ function createRangeCalendar(props, state2) {
|
|
|
10621
10928
|
tabIndex: -1
|
|
10622
10929
|
};
|
|
10623
10930
|
});
|
|
10624
|
-
const nextButtonProps =
|
|
10931
|
+
const nextButtonProps = createMemo20(() => {
|
|
10625
10932
|
const p = getProps();
|
|
10626
10933
|
const isDisabled = p.isDisabled || state2.isDisabled();
|
|
10627
10934
|
return {
|
|
@@ -10635,11 +10942,11 @@ function createRangeCalendar(props, state2) {
|
|
|
10635
10942
|
tabIndex: -1
|
|
10636
10943
|
};
|
|
10637
10944
|
});
|
|
10638
|
-
const titleProps =
|
|
10945
|
+
const titleProps = createMemo20(() => ({
|
|
10639
10946
|
id: titleId,
|
|
10640
10947
|
"aria-live": "polite"
|
|
10641
10948
|
}));
|
|
10642
|
-
const calendarProps =
|
|
10949
|
+
const calendarProps = createMemo20(() => {
|
|
10643
10950
|
const p = getProps();
|
|
10644
10951
|
return mergeProps(
|
|
10645
10952
|
{
|
|
@@ -10669,22 +10976,25 @@ function createRangeCalendar(props, state2) {
|
|
|
10669
10976
|
}
|
|
10670
10977
|
};
|
|
10671
10978
|
}
|
|
10979
|
+
|
|
10980
|
+
// src/calendar/createRangeCalendarCell.ts
|
|
10981
|
+
import { createSignal as createSignal18, createMemo as createMemo21 } from "solid-js";
|
|
10672
10982
|
function createRangeCalendarCell(props, state2, _ref) {
|
|
10673
10983
|
const getProps = () => access(props);
|
|
10674
|
-
const [isPressed, setIsPressed] =
|
|
10984
|
+
const [isPressed, setIsPressed] = createSignal18(false);
|
|
10675
10985
|
const timeZone = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
|
|
10676
|
-
const date =
|
|
10677
|
-
const isSelected =
|
|
10678
|
-
const isSelectionStart =
|
|
10679
|
-
const isSelectionEnd =
|
|
10680
|
-
const isFocused =
|
|
10681
|
-
const isDisabled =
|
|
10986
|
+
const date = createMemo21(() => getProps().date);
|
|
10987
|
+
const isSelected = createMemo21(() => state2.isSelected(date()));
|
|
10988
|
+
const isSelectionStart = createMemo21(() => state2.isSelectionStart(date()));
|
|
10989
|
+
const isSelectionEnd = createMemo21(() => state2.isSelectionEnd(date()));
|
|
10990
|
+
const isFocused = createMemo21(() => state2.isCellFocused(date()));
|
|
10991
|
+
const isDisabled = createMemo21(() => {
|
|
10682
10992
|
return getProps().isDisabled || state2.isCellDisabled(date());
|
|
10683
10993
|
});
|
|
10684
|
-
const isUnavailable =
|
|
10685
|
-
const isOutsideMonth =
|
|
10686
|
-
const isToday =
|
|
10687
|
-
const formattedDate =
|
|
10994
|
+
const isUnavailable = createMemo21(() => state2.isCellUnavailable(date()));
|
|
10995
|
+
const isOutsideMonth = createMemo21(() => state2.isOutsideVisibleRange(date()));
|
|
10996
|
+
const isToday = createMemo21(() => $14e0f24ef4ac5c92$export$629b0a497aa65267(date(), timeZone));
|
|
10997
|
+
const formattedDate = createMemo21(() => {
|
|
10688
10998
|
return date().day.toString();
|
|
10689
10999
|
});
|
|
10690
11000
|
const handleClick = () => {
|
|
@@ -10705,12 +11015,12 @@ function createRangeCalendarCell(props, state2, _ref) {
|
|
|
10705
11015
|
state2.setFocusedDate(date());
|
|
10706
11016
|
}
|
|
10707
11017
|
};
|
|
10708
|
-
const cellProps =
|
|
11018
|
+
const cellProps = createMemo21(() => ({
|
|
10709
11019
|
role: "gridcell",
|
|
10710
11020
|
"aria-disabled": isDisabled() || void 0,
|
|
10711
11021
|
"aria-selected": isSelected() || void 0
|
|
10712
11022
|
}));
|
|
10713
|
-
const buttonProps =
|
|
11023
|
+
const buttonProps = createMemo21(() => {
|
|
10714
11024
|
const d = date();
|
|
10715
11025
|
const formatter = new $fb18d541ea1ad717$export$ad991b66133851cf("en-US", {
|
|
10716
11026
|
weekday: "long",
|
|
@@ -10775,6 +11085,9 @@ function createRangeCalendarCell(props, state2, _ref) {
|
|
|
10775
11085
|
}
|
|
10776
11086
|
};
|
|
10777
11087
|
}
|
|
11088
|
+
|
|
11089
|
+
// src/datepicker/createDateField.ts
|
|
11090
|
+
import { createMemo as createMemo22 } from "solid-js";
|
|
10778
11091
|
function createDateField(props, state2, _ref) {
|
|
10779
11092
|
const getProps = () => access(props);
|
|
10780
11093
|
const id = createId(getProps().id);
|
|
@@ -10806,8 +11119,8 @@ function createDateField(props, state2, _ref) {
|
|
|
10806
11119
|
}
|
|
10807
11120
|
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
10808
11121
|
};
|
|
10809
|
-
const segments =
|
|
10810
|
-
const fieldProps =
|
|
11122
|
+
const segments = createMemo22(() => state2.segments());
|
|
11123
|
+
const fieldProps = createMemo22(() => {
|
|
10811
11124
|
const p = getProps();
|
|
10812
11125
|
return mergeProps(labelFieldProps, {
|
|
10813
11126
|
id,
|
|
@@ -10819,13 +11132,13 @@ function createDateField(props, state2, _ref) {
|
|
|
10819
11132
|
"aria-describedby": getAriaDescribedBy()
|
|
10820
11133
|
});
|
|
10821
11134
|
});
|
|
10822
|
-
const inputProps =
|
|
11135
|
+
const inputProps = createMemo22(() => ({
|
|
10823
11136
|
role: "presentation"
|
|
10824
11137
|
}));
|
|
10825
|
-
const descriptionProps =
|
|
11138
|
+
const descriptionProps = createMemo22(() => ({
|
|
10826
11139
|
id: descriptionId2
|
|
10827
11140
|
}));
|
|
10828
|
-
const errorMessageProps =
|
|
11141
|
+
const errorMessageProps = createMemo22(() => ({
|
|
10829
11142
|
id: errorMessageId,
|
|
10830
11143
|
role: "alert"
|
|
10831
11144
|
}));
|
|
@@ -10850,12 +11163,15 @@ function createDateField(props, state2, _ref) {
|
|
|
10850
11163
|
}
|
|
10851
11164
|
};
|
|
10852
11165
|
}
|
|
11166
|
+
|
|
11167
|
+
// src/datepicker/createDateSegment.ts
|
|
11168
|
+
import { createSignal as createSignal19, createMemo as createMemo23 } from "solid-js";
|
|
10853
11169
|
function createDateSegment(props, state2, _ref) {
|
|
10854
11170
|
const getProps = () => access(props);
|
|
10855
|
-
const [isFocused, setIsFocused] =
|
|
10856
|
-
const [enteredKeys, setEnteredKeys] =
|
|
10857
|
-
const segment =
|
|
10858
|
-
const isEditable =
|
|
11171
|
+
const [isFocused, setIsFocused] = createSignal19(false);
|
|
11172
|
+
const [enteredKeys, setEnteredKeys] = createSignal19("");
|
|
11173
|
+
const segment = createMemo23(() => getProps().segment);
|
|
11174
|
+
const isEditable = createMemo23(() => {
|
|
10859
11175
|
const seg = segment();
|
|
10860
11176
|
return seg.isEditable && !state2.isDisabled() && !state2.isReadOnly();
|
|
10861
11177
|
});
|
|
@@ -10917,7 +11233,7 @@ function createDateSegment(props, state2, _ref) {
|
|
|
10917
11233
|
setEnteredKeys("");
|
|
10918
11234
|
state2.confirmPlaceholder();
|
|
10919
11235
|
};
|
|
10920
|
-
const segmentProps =
|
|
11236
|
+
const segmentProps = createMemo23(() => {
|
|
10921
11237
|
const seg = segment();
|
|
10922
11238
|
const type = seg.type;
|
|
10923
11239
|
if (type === "literal") {
|
|
@@ -10950,7 +11266,7 @@ function createDateSegment(props, state2, _ref) {
|
|
|
10950
11266
|
}
|
|
10951
11267
|
};
|
|
10952
11268
|
});
|
|
10953
|
-
const text =
|
|
11269
|
+
const text = createMemo23(() => {
|
|
10954
11270
|
const seg = segment();
|
|
10955
11271
|
return seg.isPlaceholder ? seg.placeholder : seg.text;
|
|
10956
11272
|
});
|
|
@@ -10996,6 +11312,9 @@ function getSegmentLabel(type) {
|
|
|
10996
11312
|
return "";
|
|
10997
11313
|
}
|
|
10998
11314
|
}
|
|
11315
|
+
|
|
11316
|
+
// src/datepicker/createTimeField.ts
|
|
11317
|
+
import { createMemo as createMemo24 } from "solid-js";
|
|
10999
11318
|
function createTimeField(props, state2, _ref) {
|
|
11000
11319
|
const getProps = () => access(props);
|
|
11001
11320
|
const id = createId(getProps().id);
|
|
@@ -11027,8 +11346,8 @@ function createTimeField(props, state2, _ref) {
|
|
|
11027
11346
|
}
|
|
11028
11347
|
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
11029
11348
|
};
|
|
11030
|
-
const segments =
|
|
11031
|
-
const fieldProps =
|
|
11349
|
+
const segments = createMemo24(() => state2.segments());
|
|
11350
|
+
const fieldProps = createMemo24(() => {
|
|
11032
11351
|
const p = getProps();
|
|
11033
11352
|
return mergeProps(labelFieldProps, {
|
|
11034
11353
|
id,
|
|
@@ -11040,13 +11359,13 @@ function createTimeField(props, state2, _ref) {
|
|
|
11040
11359
|
"aria-describedby": getAriaDescribedBy()
|
|
11041
11360
|
});
|
|
11042
11361
|
});
|
|
11043
|
-
const inputProps =
|
|
11362
|
+
const inputProps = createMemo24(() => ({
|
|
11044
11363
|
role: "presentation"
|
|
11045
11364
|
}));
|
|
11046
|
-
const descriptionProps =
|
|
11365
|
+
const descriptionProps = createMemo24(() => ({
|
|
11047
11366
|
id: descriptionId2
|
|
11048
11367
|
}));
|
|
11049
|
-
const errorMessageProps =
|
|
11368
|
+
const errorMessageProps = createMemo24(() => ({
|
|
11050
11369
|
id: errorMessageId,
|
|
11051
11370
|
role: "alert"
|
|
11052
11371
|
}));
|
|
@@ -11071,6 +11390,9 @@ function createTimeField(props, state2, _ref) {
|
|
|
11071
11390
|
}
|
|
11072
11391
|
};
|
|
11073
11392
|
}
|
|
11393
|
+
|
|
11394
|
+
// src/datepicker/createDatePicker.ts
|
|
11395
|
+
import { createMemo as createMemo25 } from "solid-js";
|
|
11074
11396
|
function createDatePicker(props, state2, overlayState, _calendarState) {
|
|
11075
11397
|
const getProps = () => access(props);
|
|
11076
11398
|
const id = createId(getProps().id);
|
|
@@ -11103,7 +11425,7 @@ function createDatePicker(props, state2, overlayState, _calendarState) {
|
|
|
11103
11425
|
}
|
|
11104
11426
|
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
11105
11427
|
};
|
|
11106
|
-
const groupProps =
|
|
11428
|
+
const groupProps = createMemo25(() => {
|
|
11107
11429
|
const p = getProps();
|
|
11108
11430
|
return mergeProps(labelFieldProps, {
|
|
11109
11431
|
id,
|
|
@@ -11112,12 +11434,12 @@ function createDatePicker(props, state2, overlayState, _calendarState) {
|
|
|
11112
11434
|
"aria-describedby": getAriaDescribedBy()
|
|
11113
11435
|
});
|
|
11114
11436
|
});
|
|
11115
|
-
const fieldProps =
|
|
11437
|
+
const fieldProps = createMemo25(() => ({
|
|
11116
11438
|
"aria-haspopup": "dialog",
|
|
11117
11439
|
"aria-expanded": overlayState.isOpen,
|
|
11118
11440
|
"aria-controls": overlayState.isOpen ? dialogId : void 0
|
|
11119
11441
|
}));
|
|
11120
|
-
const buttonProps =
|
|
11442
|
+
const buttonProps = createMemo25(() => {
|
|
11121
11443
|
const p = getProps();
|
|
11122
11444
|
const isDisabled = p.isDisabled || state2.isDisabled();
|
|
11123
11445
|
return {
|
|
@@ -11134,19 +11456,19 @@ function createDatePicker(props, state2, overlayState, _calendarState) {
|
|
|
11134
11456
|
}
|
|
11135
11457
|
};
|
|
11136
11458
|
});
|
|
11137
|
-
const dialogProps =
|
|
11459
|
+
const dialogProps = createMemo25(() => ({
|
|
11138
11460
|
id: dialogId,
|
|
11139
11461
|
role: "dialog",
|
|
11140
11462
|
"aria-modal": true,
|
|
11141
11463
|
"aria-label": "Calendar"
|
|
11142
11464
|
}));
|
|
11143
|
-
const calendarProps =
|
|
11465
|
+
const calendarProps = createMemo25(() => ({
|
|
11144
11466
|
"aria-label": "Calendar"
|
|
11145
11467
|
}));
|
|
11146
|
-
const descriptionProps =
|
|
11468
|
+
const descriptionProps = createMemo25(() => ({
|
|
11147
11469
|
id: descriptionId2
|
|
11148
11470
|
}));
|
|
11149
|
-
const errorMessageProps =
|
|
11471
|
+
const errorMessageProps = createMemo25(() => ({
|
|
11150
11472
|
id: errorMessageId,
|
|
11151
11473
|
role: "alert"
|
|
11152
11474
|
}));
|
|
@@ -11178,6 +11500,10 @@ function createDatePicker(props, state2, overlayState, _calendarState) {
|
|
|
11178
11500
|
};
|
|
11179
11501
|
}
|
|
11180
11502
|
|
|
11503
|
+
// src/grid/createGrid.ts
|
|
11504
|
+
import { createMemo as createMemo26, createSignal as createSignal20 } from "solid-js";
|
|
11505
|
+
import { createId as createId2 } from "@proyecto-viviana/solid-stately";
|
|
11506
|
+
|
|
11181
11507
|
// src/grid/GridKeyboardDelegate.ts
|
|
11182
11508
|
var GridKeyboardDelegate = class {
|
|
11183
11509
|
collection;
|
|
@@ -11500,9 +11826,9 @@ function getGridData(state2) {
|
|
|
11500
11826
|
return gridMap.get(state2);
|
|
11501
11827
|
}
|
|
11502
11828
|
function createGrid(props, state2, ref) {
|
|
11503
|
-
const id =
|
|
11504
|
-
const [_isFocused, setIsFocused] =
|
|
11505
|
-
const keyboardDelegate =
|
|
11829
|
+
const id = createId2(props().id);
|
|
11830
|
+
const [_isFocused, setIsFocused] = createSignal20(false);
|
|
11831
|
+
const keyboardDelegate = createMemo26(() => {
|
|
11506
11832
|
const p = props();
|
|
11507
11833
|
const s = state2();
|
|
11508
11834
|
if (p.keyboardDelegate) {
|
|
@@ -11529,7 +11855,7 @@ function createGrid(props, state2, ref) {
|
|
|
11529
11855
|
shouldSelectOnPressUp: p.shouldSelectOnPressUp
|
|
11530
11856
|
});
|
|
11531
11857
|
};
|
|
11532
|
-
|
|
11858
|
+
createMemo26(() => {
|
|
11533
11859
|
storeGridData();
|
|
11534
11860
|
});
|
|
11535
11861
|
const onKeyDown = (e) => {
|
|
@@ -11651,10 +11977,13 @@ function createGrid(props, state2, ref) {
|
|
|
11651
11977
|
setIsFocused(false);
|
|
11652
11978
|
}
|
|
11653
11979
|
};
|
|
11654
|
-
|
|
11655
|
-
props();
|
|
11980
|
+
createMemo26(() => {
|
|
11981
|
+
const p = props();
|
|
11982
|
+
if (!p["aria-label"] && !p["aria-labelledby"]) {
|
|
11983
|
+
console.warn("Grid: An aria-label or aria-labelledby prop is required for accessibility.");
|
|
11984
|
+
}
|
|
11656
11985
|
});
|
|
11657
|
-
const gridProps =
|
|
11986
|
+
const gridProps = createMemo26(() => {
|
|
11658
11987
|
const p = props();
|
|
11659
11988
|
const s = state2();
|
|
11660
11989
|
const baseProps = {
|
|
@@ -11681,19 +12010,22 @@ function createGrid(props, state2, ref) {
|
|
|
11681
12010
|
}
|
|
11682
12011
|
};
|
|
11683
12012
|
}
|
|
12013
|
+
|
|
12014
|
+
// src/grid/createGridRow.ts
|
|
12015
|
+
import { createMemo as createMemo27, createSignal as createSignal21 } from "solid-js";
|
|
11684
12016
|
function createGridRow(props, state2, _ref) {
|
|
11685
|
-
const [isPressed, setIsPressed] =
|
|
11686
|
-
const isSelected =
|
|
12017
|
+
const [isPressed, setIsPressed] = createSignal21(false);
|
|
12018
|
+
const isSelected = createMemo27(() => {
|
|
11687
12019
|
const s = state2();
|
|
11688
12020
|
const p = props();
|
|
11689
12021
|
return s.isSelected(p.key);
|
|
11690
12022
|
});
|
|
11691
|
-
const isDisabled =
|
|
12023
|
+
const isDisabled = createMemo27(() => {
|
|
11692
12024
|
const s = state2();
|
|
11693
12025
|
const p = props();
|
|
11694
12026
|
return s.isDisabled(p.key);
|
|
11695
12027
|
});
|
|
11696
|
-
const isFocused =
|
|
12028
|
+
const isFocused = createMemo27(() => {
|
|
11697
12029
|
const s = state2();
|
|
11698
12030
|
const p = props();
|
|
11699
12031
|
return s.focusedKey === p.key;
|
|
@@ -11750,7 +12082,7 @@ function createGridRow(props, state2, _ref) {
|
|
|
11750
12082
|
const onPointerUp = () => {
|
|
11751
12083
|
setIsPressed(false);
|
|
11752
12084
|
};
|
|
11753
|
-
const rowProps =
|
|
12085
|
+
const rowProps = createMemo27(() => {
|
|
11754
12086
|
const s = state2();
|
|
11755
12087
|
const p = props();
|
|
11756
12088
|
const baseProps = {
|
|
@@ -11784,9 +12116,12 @@ function createGridRow(props, state2, _ref) {
|
|
|
11784
12116
|
}
|
|
11785
12117
|
};
|
|
11786
12118
|
}
|
|
12119
|
+
|
|
12120
|
+
// src/grid/createGridCell.ts
|
|
12121
|
+
import { createMemo as createMemo28, createSignal as createSignal22 } from "solid-js";
|
|
11787
12122
|
function createGridCell(props, state2, _ref) {
|
|
11788
|
-
const [isPressed, setIsPressed] =
|
|
11789
|
-
const isSelected =
|
|
12123
|
+
const [isPressed, setIsPressed] = createSignal22(false);
|
|
12124
|
+
const isSelected = createMemo28(() => {
|
|
11790
12125
|
const s = state2();
|
|
11791
12126
|
const p = props();
|
|
11792
12127
|
const node = s.collection.getItem(p.key);
|
|
@@ -11795,7 +12130,7 @@ function createGridCell(props, state2, _ref) {
|
|
|
11795
12130
|
}
|
|
11796
12131
|
return false;
|
|
11797
12132
|
});
|
|
11798
|
-
const isDisabled =
|
|
12133
|
+
const isDisabled = createMemo28(() => {
|
|
11799
12134
|
const s = state2();
|
|
11800
12135
|
const p = props();
|
|
11801
12136
|
const node = s.collection.getItem(p.key);
|
|
@@ -11804,7 +12139,7 @@ function createGridCell(props, state2, _ref) {
|
|
|
11804
12139
|
}
|
|
11805
12140
|
return false;
|
|
11806
12141
|
});
|
|
11807
|
-
const isFocused =
|
|
12142
|
+
const isFocused = createMemo28(() => {
|
|
11808
12143
|
const s = state2();
|
|
11809
12144
|
const p = props();
|
|
11810
12145
|
return s.focusedKey === p.key;
|
|
@@ -11862,7 +12197,7 @@ function createGridCell(props, state2, _ref) {
|
|
|
11862
12197
|
const onPointerUp = () => {
|
|
11863
12198
|
setIsPressed(false);
|
|
11864
12199
|
};
|
|
11865
|
-
const cellProps =
|
|
12200
|
+
const cellProps = createMemo28(() => {
|
|
11866
12201
|
const s = state2();
|
|
11867
12202
|
const p = props();
|
|
11868
12203
|
const node = s.collection.getItem(p.key);
|
|
@@ -11909,6 +12244,10 @@ function createGridCell(props, state2, _ref) {
|
|
|
11909
12244
|
}
|
|
11910
12245
|
};
|
|
11911
12246
|
}
|
|
12247
|
+
|
|
12248
|
+
// src/table/createTable.ts
|
|
12249
|
+
import { createMemo as createMemo29, createEffect as createEffect34, on } from "solid-js";
|
|
12250
|
+
import { createId as createId3 } from "@proyecto-viviana/solid-stately";
|
|
11912
12251
|
var tableMap = /* @__PURE__ */ new WeakMap();
|
|
11913
12252
|
function getTableData(state2) {
|
|
11914
12253
|
return tableMap.get(state2);
|
|
@@ -11928,7 +12267,7 @@ function isRow(node) {
|
|
|
11928
12267
|
return node?.type === "item";
|
|
11929
12268
|
}
|
|
11930
12269
|
function createTable(props, state2, ref) {
|
|
11931
|
-
const id =
|
|
12270
|
+
const id = createId3(props().id);
|
|
11932
12271
|
const locale = useLocale();
|
|
11933
12272
|
let prevSortDescriptor = null;
|
|
11934
12273
|
let isFirstRender = true;
|
|
@@ -11945,10 +12284,10 @@ function createTable(props, state2, ref) {
|
|
|
11945
12284
|
focusMode: p.focusMode
|
|
11946
12285
|
});
|
|
11947
12286
|
};
|
|
11948
|
-
|
|
12287
|
+
createMemo29(() => {
|
|
11949
12288
|
storeTableData();
|
|
11950
12289
|
});
|
|
11951
|
-
|
|
12290
|
+
createEffect34(on(
|
|
11952
12291
|
() => state2().sortDescriptor,
|
|
11953
12292
|
(sortDescriptor) => {
|
|
11954
12293
|
if (isFirstRender) {
|
|
@@ -12248,10 +12587,13 @@ function createTable(props, state2, ref) {
|
|
|
12248
12587
|
s.setFocused(false);
|
|
12249
12588
|
}
|
|
12250
12589
|
};
|
|
12251
|
-
|
|
12252
|
-
props();
|
|
12590
|
+
createMemo29(() => {
|
|
12591
|
+
const p = props();
|
|
12592
|
+
if (!p["aria-label"] && !p["aria-labelledby"]) {
|
|
12593
|
+
console.warn("Table: An aria-label or aria-labelledby prop is required for accessibility.");
|
|
12594
|
+
}
|
|
12253
12595
|
});
|
|
12254
|
-
const gridProps =
|
|
12596
|
+
const gridProps = createMemo29(() => {
|
|
12255
12597
|
const p = props();
|
|
12256
12598
|
const s = state2();
|
|
12257
12599
|
const baseProps = {
|
|
@@ -12278,8 +12620,11 @@ function createTable(props, state2, ref) {
|
|
|
12278
12620
|
}
|
|
12279
12621
|
};
|
|
12280
12622
|
}
|
|
12623
|
+
|
|
12624
|
+
// src/table/createTableHeaderRow.ts
|
|
12625
|
+
import { createMemo as createMemo30 } from "solid-js";
|
|
12281
12626
|
function createTableHeaderRow(props, _state, _ref) {
|
|
12282
|
-
const rowProps =
|
|
12627
|
+
const rowProps = createMemo30(() => {
|
|
12283
12628
|
const p = props();
|
|
12284
12629
|
const node = p.node;
|
|
12285
12630
|
const baseProps = {
|
|
@@ -12296,9 +12641,12 @@ function createTableHeaderRow(props, _state, _ref) {
|
|
|
12296
12641
|
}
|
|
12297
12642
|
};
|
|
12298
12643
|
}
|
|
12644
|
+
|
|
12645
|
+
// src/table/createTableColumnHeader.ts
|
|
12646
|
+
import { createMemo as createMemo31, createSignal as createSignal23 } from "solid-js";
|
|
12299
12647
|
function createTableColumnHeader(props, state2, _ref) {
|
|
12300
|
-
const [_isPressed, setIsPressed] =
|
|
12301
|
-
const isFocused =
|
|
12648
|
+
const [_isPressed, setIsPressed] = createSignal23(false);
|
|
12649
|
+
const isFocused = createMemo31(() => {
|
|
12302
12650
|
const s = state2();
|
|
12303
12651
|
const p = props();
|
|
12304
12652
|
return s.focusedKey === p.node.key;
|
|
@@ -12329,7 +12677,7 @@ function createTableColumnHeader(props, state2, _ref) {
|
|
|
12329
12677
|
const onPointerUp = () => {
|
|
12330
12678
|
setIsPressed(false);
|
|
12331
12679
|
};
|
|
12332
|
-
const columnHeaderProps =
|
|
12680
|
+
const columnHeaderProps = createMemo31(() => {
|
|
12333
12681
|
const s = state2();
|
|
12334
12682
|
const p = props();
|
|
12335
12683
|
const node = p.node;
|
|
@@ -12372,19 +12720,22 @@ function createTableColumnHeader(props, state2, _ref) {
|
|
|
12372
12720
|
}
|
|
12373
12721
|
};
|
|
12374
12722
|
}
|
|
12723
|
+
|
|
12724
|
+
// src/table/createTableRow.ts
|
|
12725
|
+
import { createMemo as createMemo32, createSignal as createSignal24 } from "solid-js";
|
|
12375
12726
|
function createTableRow(props, state2, _ref) {
|
|
12376
|
-
const [isPressed, setIsPressed] =
|
|
12377
|
-
const isSelected =
|
|
12727
|
+
const [isPressed, setIsPressed] = createSignal24(false);
|
|
12728
|
+
const isSelected = createMemo32(() => {
|
|
12378
12729
|
const s = state2();
|
|
12379
12730
|
const p = props();
|
|
12380
12731
|
return s.isSelected(p.node.key);
|
|
12381
12732
|
});
|
|
12382
|
-
const isDisabled =
|
|
12733
|
+
const isDisabled = createMemo32(() => {
|
|
12383
12734
|
const s = state2();
|
|
12384
12735
|
const p = props();
|
|
12385
12736
|
return s.isDisabled(p.node.key);
|
|
12386
12737
|
});
|
|
12387
|
-
const isFocused =
|
|
12738
|
+
const isFocused = createMemo32(() => {
|
|
12388
12739
|
const s = state2();
|
|
12389
12740
|
const p = props();
|
|
12390
12741
|
return s.focusedKey === p.node.key;
|
|
@@ -12441,7 +12792,7 @@ function createTableRow(props, state2, _ref) {
|
|
|
12441
12792
|
const onPointerUp = () => {
|
|
12442
12793
|
setIsPressed(false);
|
|
12443
12794
|
};
|
|
12444
|
-
const rowProps =
|
|
12795
|
+
const rowProps = createMemo32(() => {
|
|
12445
12796
|
const s = state2();
|
|
12446
12797
|
const p = props();
|
|
12447
12798
|
const node = p.node;
|
|
@@ -12476,9 +12827,12 @@ function createTableRow(props, state2, _ref) {
|
|
|
12476
12827
|
}
|
|
12477
12828
|
};
|
|
12478
12829
|
}
|
|
12830
|
+
|
|
12831
|
+
// src/table/createTableCell.ts
|
|
12832
|
+
import { createMemo as createMemo33, createSignal as createSignal25 } from "solid-js";
|
|
12479
12833
|
function createTableCell(props, state2, _ref) {
|
|
12480
|
-
const [isPressed, setIsPressed] =
|
|
12481
|
-
const isDisabled =
|
|
12834
|
+
const [isPressed, setIsPressed] = createSignal25(false);
|
|
12835
|
+
const isDisabled = createMemo33(() => {
|
|
12482
12836
|
const s = state2();
|
|
12483
12837
|
const p = props();
|
|
12484
12838
|
const node = p.node;
|
|
@@ -12487,7 +12841,7 @@ function createTableCell(props, state2, _ref) {
|
|
|
12487
12841
|
}
|
|
12488
12842
|
return false;
|
|
12489
12843
|
});
|
|
12490
|
-
const isFocused =
|
|
12844
|
+
const isFocused = createMemo33(() => {
|
|
12491
12845
|
const s = state2();
|
|
12492
12846
|
const p = props();
|
|
12493
12847
|
return s.focusedKey === p.node.key;
|
|
@@ -12534,7 +12888,7 @@ function createTableCell(props, state2, _ref) {
|
|
|
12534
12888
|
const onPointerUp = () => {
|
|
12535
12889
|
setIsPressed(false);
|
|
12536
12890
|
};
|
|
12537
|
-
const gridCellProps =
|
|
12891
|
+
const gridCellProps = createMemo33(() => {
|
|
12538
12892
|
const s = state2();
|
|
12539
12893
|
const p = props();
|
|
12540
12894
|
const node = p.node;
|
|
@@ -12572,8 +12926,11 @@ function createTableCell(props, state2, _ref) {
|
|
|
12572
12926
|
}
|
|
12573
12927
|
};
|
|
12574
12928
|
}
|
|
12929
|
+
|
|
12930
|
+
// src/table/createTableRowGroup.ts
|
|
12931
|
+
import { createMemo as createMemo34 } from "solid-js";
|
|
12575
12932
|
function createTableRowGroup(props) {
|
|
12576
|
-
const rowGroupProps =
|
|
12933
|
+
const rowGroupProps = createMemo34(() => {
|
|
12577
12934
|
void props();
|
|
12578
12935
|
const baseProps = {
|
|
12579
12936
|
role: "rowgroup"
|
|
@@ -12586,14 +12943,18 @@ function createTableRowGroup(props) {
|
|
|
12586
12943
|
}
|
|
12587
12944
|
};
|
|
12588
12945
|
}
|
|
12946
|
+
|
|
12947
|
+
// src/table/createTableSelectionCheckbox.ts
|
|
12948
|
+
import { createMemo as createMemo35 } from "solid-js";
|
|
12949
|
+
import { createId as createId4 } from "@proyecto-viviana/solid-stately";
|
|
12589
12950
|
function createTableSelectionCheckbox(props, state2) {
|
|
12590
|
-
const checkboxId =
|
|
12591
|
-
const isSelected =
|
|
12951
|
+
const checkboxId = createId4();
|
|
12952
|
+
const isSelected = createMemo35(() => {
|
|
12592
12953
|
const s = state2();
|
|
12593
12954
|
const p = props();
|
|
12594
12955
|
return s.isSelected(p.key);
|
|
12595
12956
|
});
|
|
12596
|
-
const isDisabled =
|
|
12957
|
+
const isDisabled = createMemo35(() => {
|
|
12597
12958
|
const s = state2();
|
|
12598
12959
|
const p = props();
|
|
12599
12960
|
return s.isDisabled(p.key);
|
|
@@ -12605,7 +12966,7 @@ function createTableSelectionCheckbox(props, state2) {
|
|
|
12605
12966
|
s.toggleSelection(p.key);
|
|
12606
12967
|
}
|
|
12607
12968
|
};
|
|
12608
|
-
const checkboxProps =
|
|
12969
|
+
const checkboxProps = createMemo35(() => {
|
|
12609
12970
|
const baseProps = {
|
|
12610
12971
|
id: checkboxId,
|
|
12611
12972
|
type: "checkbox",
|
|
@@ -12622,23 +12983,26 @@ function createTableSelectionCheckbox(props, state2) {
|
|
|
12622
12983
|
}
|
|
12623
12984
|
};
|
|
12624
12985
|
}
|
|
12986
|
+
|
|
12987
|
+
// src/table/createTableSelectAllCheckbox.ts
|
|
12988
|
+
import { createMemo as createMemo36 } from "solid-js";
|
|
12625
12989
|
function createTableSelectAllCheckbox(state2) {
|
|
12626
|
-
const isSelectAll =
|
|
12990
|
+
const isSelectAll = createMemo36(() => {
|
|
12627
12991
|
const s = state2();
|
|
12628
12992
|
return s.selectedKeys === "all";
|
|
12629
12993
|
});
|
|
12630
|
-
const isEmpty =
|
|
12994
|
+
const isEmpty = createMemo36(() => {
|
|
12631
12995
|
const s = state2();
|
|
12632
12996
|
return s.collection.size === 0;
|
|
12633
12997
|
});
|
|
12634
|
-
const isIndeterminate =
|
|
12998
|
+
const isIndeterminate = createMemo36(() => {
|
|
12635
12999
|
const s = state2();
|
|
12636
13000
|
const selectedKeys = s.selectedKeys;
|
|
12637
13001
|
if (selectedKeys === "all") return false;
|
|
12638
13002
|
if (selectedKeys.size === 0) return false;
|
|
12639
13003
|
return selectedKeys.size < s.collection.size;
|
|
12640
13004
|
});
|
|
12641
|
-
const isDisabled =
|
|
13005
|
+
const isDisabled = createMemo36(() => {
|
|
12642
13006
|
const s = state2();
|
|
12643
13007
|
return s.selectionMode !== "multiple" || isEmpty();
|
|
12644
13008
|
});
|
|
@@ -12648,7 +13012,7 @@ function createTableSelectAllCheckbox(state2) {
|
|
|
12648
13012
|
s.toggleSelectAll();
|
|
12649
13013
|
}
|
|
12650
13014
|
};
|
|
12651
|
-
const checkboxProps =
|
|
13015
|
+
const checkboxProps = createMemo36(() => {
|
|
12652
13016
|
const s = state2();
|
|
12653
13017
|
const baseProps = {
|
|
12654
13018
|
type: "checkbox",
|
|
@@ -12668,12 +13032,16 @@ function createTableSelectAllCheckbox(state2) {
|
|
|
12668
13032
|
}
|
|
12669
13033
|
};
|
|
12670
13034
|
}
|
|
13035
|
+
|
|
13036
|
+
// src/gridlist/createGridList.ts
|
|
13037
|
+
import { createMemo as createMemo37 } from "solid-js";
|
|
13038
|
+
import { createId as createId5 } from "@proyecto-viviana/solid-stately";
|
|
12671
13039
|
var gridListDataMap = /* @__PURE__ */ new WeakMap();
|
|
12672
13040
|
function getGridListData(state2) {
|
|
12673
13041
|
return gridListDataMap.get(state2);
|
|
12674
13042
|
}
|
|
12675
13043
|
function createGridList(props, state2, _ref) {
|
|
12676
|
-
const gridListId = props().id ??
|
|
13044
|
+
const gridListId = props().id ?? createId5();
|
|
12677
13045
|
const gridListData = {
|
|
12678
13046
|
gridListId,
|
|
12679
13047
|
actions: {
|
|
@@ -12767,7 +13135,7 @@ function createGridList(props, state2, _ref) {
|
|
|
12767
13135
|
const s = state2();
|
|
12768
13136
|
s.setFocused(false);
|
|
12769
13137
|
};
|
|
12770
|
-
const gridProps =
|
|
13138
|
+
const gridProps = createMemo37(() => {
|
|
12771
13139
|
const p = props();
|
|
12772
13140
|
const s = state2();
|
|
12773
13141
|
const baseProps = {
|
|
@@ -12794,19 +13162,22 @@ function createGridList(props, state2, _ref) {
|
|
|
12794
13162
|
}
|
|
12795
13163
|
};
|
|
12796
13164
|
}
|
|
13165
|
+
|
|
13166
|
+
// src/gridlist/createGridListItem.ts
|
|
13167
|
+
import { createMemo as createMemo38, createSignal as createSignal26 } from "solid-js";
|
|
12797
13168
|
function createGridListItem(props, state2, _ref) {
|
|
12798
|
-
const [isPressed, setIsPressed] =
|
|
12799
|
-
const isSelected =
|
|
13169
|
+
const [isPressed, setIsPressed] = createSignal26(false);
|
|
13170
|
+
const isSelected = createMemo38(() => {
|
|
12800
13171
|
const s = state2();
|
|
12801
13172
|
const p = props();
|
|
12802
13173
|
return s.isSelected(p.node.key);
|
|
12803
13174
|
});
|
|
12804
|
-
const isDisabled =
|
|
13175
|
+
const isDisabled = createMemo38(() => {
|
|
12805
13176
|
const s = state2();
|
|
12806
13177
|
const p = props();
|
|
12807
13178
|
return s.isDisabled(p.node.key);
|
|
12808
13179
|
});
|
|
12809
|
-
const isFocused =
|
|
13180
|
+
const isFocused = createMemo38(() => {
|
|
12810
13181
|
const s = state2();
|
|
12811
13182
|
const p = props();
|
|
12812
13183
|
return s.focusedKey === p.node.key;
|
|
@@ -12882,7 +13253,7 @@ function createGridListItem(props, state2, _ref) {
|
|
|
12882
13253
|
const onPointerUp = () => {
|
|
12883
13254
|
setIsPressed(false);
|
|
12884
13255
|
};
|
|
12885
|
-
const rowProps =
|
|
13256
|
+
const rowProps = createMemo38(() => {
|
|
12886
13257
|
const s = state2();
|
|
12887
13258
|
const p = props();
|
|
12888
13259
|
const node = p.node;
|
|
@@ -12902,7 +13273,7 @@ function createGridListItem(props, state2, _ref) {
|
|
|
12902
13273
|
}
|
|
12903
13274
|
return baseProps;
|
|
12904
13275
|
});
|
|
12905
|
-
const gridCellProps =
|
|
13276
|
+
const gridCellProps = createMemo38(() => {
|
|
12906
13277
|
return {
|
|
12907
13278
|
role: "gridcell"
|
|
12908
13279
|
};
|
|
@@ -12925,14 +13296,18 @@ function createGridListItem(props, state2, _ref) {
|
|
|
12925
13296
|
}
|
|
12926
13297
|
};
|
|
12927
13298
|
}
|
|
13299
|
+
|
|
13300
|
+
// src/gridlist/createGridListSelectionCheckbox.ts
|
|
13301
|
+
import { createMemo as createMemo39 } from "solid-js";
|
|
13302
|
+
import { createId as createId6 } from "@proyecto-viviana/solid-stately";
|
|
12928
13303
|
function createGridListSelectionCheckbox(props, state2) {
|
|
12929
|
-
const checkboxId =
|
|
12930
|
-
const isSelected =
|
|
13304
|
+
const checkboxId = createId6();
|
|
13305
|
+
const isSelected = createMemo39(() => {
|
|
12931
13306
|
const s = state2();
|
|
12932
13307
|
const p = props();
|
|
12933
13308
|
return s.isSelected(p.key);
|
|
12934
13309
|
});
|
|
12935
|
-
const isDisabled =
|
|
13310
|
+
const isDisabled = createMemo39(() => {
|
|
12936
13311
|
const s = state2();
|
|
12937
13312
|
const p = props();
|
|
12938
13313
|
return s.isDisabled(p.key);
|
|
@@ -12944,7 +13319,7 @@ function createGridListSelectionCheckbox(props, state2) {
|
|
|
12944
13319
|
s.toggleSelection(p.key);
|
|
12945
13320
|
}
|
|
12946
13321
|
};
|
|
12947
|
-
const checkboxProps =
|
|
13322
|
+
const checkboxProps = createMemo39(() => {
|
|
12948
13323
|
const baseProps = {
|
|
12949
13324
|
id: checkboxId,
|
|
12950
13325
|
type: "checkbox",
|
|
@@ -12961,12 +13336,16 @@ function createGridListSelectionCheckbox(props, state2) {
|
|
|
12961
13336
|
}
|
|
12962
13337
|
};
|
|
12963
13338
|
}
|
|
13339
|
+
|
|
13340
|
+
// src/tree/createTree.ts
|
|
13341
|
+
import { createMemo as createMemo40 } from "solid-js";
|
|
13342
|
+
import { createId as createId7 } from "@proyecto-viviana/solid-stately";
|
|
12964
13343
|
var treeDataMap = /* @__PURE__ */ new WeakMap();
|
|
12965
13344
|
function getTreeData(state2) {
|
|
12966
13345
|
return treeDataMap.get(state2);
|
|
12967
13346
|
}
|
|
12968
13347
|
function createTree(props, state2, _ref) {
|
|
12969
|
-
const treeId = props().id ??
|
|
13348
|
+
const treeId = props().id ?? createId7();
|
|
12970
13349
|
const treeData = {
|
|
12971
13350
|
treeId,
|
|
12972
13351
|
actions: {
|
|
@@ -13111,7 +13490,7 @@ function createTree(props, state2, _ref) {
|
|
|
13111
13490
|
const s = state2();
|
|
13112
13491
|
s.setFocused(false);
|
|
13113
13492
|
};
|
|
13114
|
-
const treeProps =
|
|
13493
|
+
const treeProps = createMemo40(() => {
|
|
13115
13494
|
const p = props();
|
|
13116
13495
|
const s = state2();
|
|
13117
13496
|
const baseProps = {
|
|
@@ -13138,33 +13517,36 @@ function createTree(props, state2, _ref) {
|
|
|
13138
13517
|
}
|
|
13139
13518
|
};
|
|
13140
13519
|
}
|
|
13520
|
+
|
|
13521
|
+
// src/tree/createTreeItem.ts
|
|
13522
|
+
import { createMemo as createMemo41, createSignal as createSignal27 } from "solid-js";
|
|
13141
13523
|
function createTreeItem(props, state2, _ref) {
|
|
13142
|
-
const [isPressed, setIsPressed] =
|
|
13143
|
-
const isSelected =
|
|
13524
|
+
const [isPressed, setIsPressed] = createSignal27(false);
|
|
13525
|
+
const isSelected = createMemo41(() => {
|
|
13144
13526
|
const s = state2();
|
|
13145
13527
|
const p = props();
|
|
13146
13528
|
return s.isSelected(p.node.key);
|
|
13147
13529
|
});
|
|
13148
|
-
const isDisabled =
|
|
13530
|
+
const isDisabled = createMemo41(() => {
|
|
13149
13531
|
const s = state2();
|
|
13150
13532
|
const p = props();
|
|
13151
13533
|
return s.isDisabled(p.node.key);
|
|
13152
13534
|
});
|
|
13153
|
-
const isFocused =
|
|
13535
|
+
const isFocused = createMemo41(() => {
|
|
13154
13536
|
const s = state2();
|
|
13155
13537
|
const p = props();
|
|
13156
13538
|
return s.focusedKey === p.node.key;
|
|
13157
13539
|
});
|
|
13158
|
-
const isExpanded =
|
|
13540
|
+
const isExpanded = createMemo41(() => {
|
|
13159
13541
|
const s = state2();
|
|
13160
13542
|
const p = props();
|
|
13161
13543
|
return s.isExpanded(p.node.key);
|
|
13162
13544
|
});
|
|
13163
|
-
const isExpandable =
|
|
13545
|
+
const isExpandable = createMemo41(() => {
|
|
13164
13546
|
const p = props();
|
|
13165
13547
|
return p.node.isExpandable ?? false;
|
|
13166
13548
|
});
|
|
13167
|
-
const level =
|
|
13549
|
+
const level = createMemo41(() => {
|
|
13168
13550
|
const p = props();
|
|
13169
13551
|
return p.node.level;
|
|
13170
13552
|
});
|
|
@@ -13239,7 +13621,7 @@ function createTreeItem(props, state2, _ref) {
|
|
|
13239
13621
|
const onPointerUp = () => {
|
|
13240
13622
|
setIsPressed(false);
|
|
13241
13623
|
};
|
|
13242
|
-
const rowProps =
|
|
13624
|
+
const rowProps = createMemo41(() => {
|
|
13243
13625
|
const s = state2();
|
|
13244
13626
|
const p = props();
|
|
13245
13627
|
const node = p.node;
|
|
@@ -13262,7 +13644,7 @@ function createTreeItem(props, state2, _ref) {
|
|
|
13262
13644
|
}
|
|
13263
13645
|
return baseProps;
|
|
13264
13646
|
});
|
|
13265
|
-
const gridCellProps =
|
|
13647
|
+
const gridCellProps = createMemo41(() => {
|
|
13266
13648
|
return {
|
|
13267
13649
|
role: "gridcell"
|
|
13268
13650
|
};
|
|
@@ -13274,7 +13656,7 @@ function createTreeItem(props, state2, _ref) {
|
|
|
13274
13656
|
if (isDisabled()) return;
|
|
13275
13657
|
s.toggleKey(p.node.key);
|
|
13276
13658
|
};
|
|
13277
|
-
const expandButtonProps =
|
|
13659
|
+
const expandButtonProps = createMemo41(() => {
|
|
13278
13660
|
const baseProps = {
|
|
13279
13661
|
type: "button",
|
|
13280
13662
|
"aria-label": isExpanded() ? "Collapse" : "Expand",
|
|
@@ -13315,13 +13697,16 @@ function createTreeItem(props, state2, _ref) {
|
|
|
13315
13697
|
}
|
|
13316
13698
|
};
|
|
13317
13699
|
}
|
|
13700
|
+
|
|
13701
|
+
// src/tree/createTreeSelectionCheckbox.ts
|
|
13702
|
+
import { createMemo as createMemo42 } from "solid-js";
|
|
13318
13703
|
function createTreeSelectionCheckbox(props, state2) {
|
|
13319
|
-
const isSelected =
|
|
13704
|
+
const isSelected = createMemo42(() => {
|
|
13320
13705
|
const s = state2();
|
|
13321
13706
|
const p = props();
|
|
13322
13707
|
return s.isSelected(p.key);
|
|
13323
13708
|
});
|
|
13324
|
-
const isDisabled =
|
|
13709
|
+
const isDisabled = createMemo42(() => {
|
|
13325
13710
|
const s = state2();
|
|
13326
13711
|
const p = props();
|
|
13327
13712
|
return s.isDisabled(p.key);
|
|
@@ -13340,7 +13725,7 @@ function createTreeSelectionCheckbox(props, state2) {
|
|
|
13340
13725
|
const onClick = (e) => {
|
|
13341
13726
|
e.stopPropagation();
|
|
13342
13727
|
};
|
|
13343
|
-
const checkboxProps =
|
|
13728
|
+
const checkboxProps = createMemo42(() => {
|
|
13344
13729
|
const baseProps = {
|
|
13345
13730
|
type: "checkbox",
|
|
13346
13731
|
"aria-label": "Select",
|
|
@@ -13359,12 +13744,15 @@ function createTreeSelectionCheckbox(props, state2) {
|
|
|
13359
13744
|
}
|
|
13360
13745
|
};
|
|
13361
13746
|
}
|
|
13747
|
+
|
|
13748
|
+
// src/color/createColorSlider.ts
|
|
13749
|
+
import { createMemo as createMemo43 } from "solid-js";
|
|
13362
13750
|
function createColorSlider(props, state2, trackRef) {
|
|
13363
13751
|
const getProps = () => props();
|
|
13364
13752
|
const getState = () => state2();
|
|
13365
13753
|
const inputId = createId();
|
|
13366
13754
|
const labelId = createId();
|
|
13367
|
-
const channelName =
|
|
13755
|
+
const channelName = createMemo43(() => {
|
|
13368
13756
|
const p = getProps();
|
|
13369
13757
|
if (p.channelName) return p.channelName;
|
|
13370
13758
|
const s = getState();
|
|
@@ -13412,7 +13800,7 @@ function createColorSlider(props, state2, trackRef) {
|
|
|
13412
13800
|
e.stopPropagation();
|
|
13413
13801
|
}
|
|
13414
13802
|
};
|
|
13415
|
-
const trackProps =
|
|
13803
|
+
const trackProps = createMemo43(() => {
|
|
13416
13804
|
const s = getState();
|
|
13417
13805
|
return {
|
|
13418
13806
|
role: "presentation",
|
|
@@ -13424,7 +13812,7 @@ function createColorSlider(props, state2, trackRef) {
|
|
|
13424
13812
|
"data-disabled": s.isDisabled || void 0
|
|
13425
13813
|
};
|
|
13426
13814
|
});
|
|
13427
|
-
const thumbProps =
|
|
13815
|
+
const thumbProps = createMemo43(() => {
|
|
13428
13816
|
const s = getState();
|
|
13429
13817
|
const p = getProps();
|
|
13430
13818
|
const percent = s.getThumbPercent();
|
|
@@ -13441,7 +13829,7 @@ function createColorSlider(props, state2, trackRef) {
|
|
|
13441
13829
|
"data-disabled": s.isDisabled || p.isDisabled || void 0
|
|
13442
13830
|
};
|
|
13443
13831
|
});
|
|
13444
|
-
const inputProps =
|
|
13832
|
+
const inputProps = createMemo43(() => {
|
|
13445
13833
|
const s = getState();
|
|
13446
13834
|
const p = getProps();
|
|
13447
13835
|
return {
|
|
@@ -13481,13 +13869,13 @@ function createColorSlider(props, state2, trackRef) {
|
|
|
13481
13869
|
}
|
|
13482
13870
|
};
|
|
13483
13871
|
});
|
|
13484
|
-
const outputProps =
|
|
13872
|
+
const outputProps = createMemo43(() => {
|
|
13485
13873
|
return {
|
|
13486
13874
|
"aria-live": "off",
|
|
13487
13875
|
for: inputId
|
|
13488
13876
|
};
|
|
13489
13877
|
});
|
|
13490
|
-
const labelProps =
|
|
13878
|
+
const labelProps = createMemo43(() => {
|
|
13491
13879
|
return {
|
|
13492
13880
|
id: labelId,
|
|
13493
13881
|
for: inputId
|
|
@@ -13511,6 +13899,9 @@ function createColorSlider(props, state2, trackRef) {
|
|
|
13511
13899
|
}
|
|
13512
13900
|
};
|
|
13513
13901
|
}
|
|
13902
|
+
|
|
13903
|
+
// src/color/createColorArea.ts
|
|
13904
|
+
import { createMemo as createMemo44 } from "solid-js";
|
|
13514
13905
|
function createColorArea(props, state2, areaRef) {
|
|
13515
13906
|
const getProps = () => props();
|
|
13516
13907
|
const getState = () => state2();
|
|
@@ -13628,7 +14019,7 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13628
14019
|
e.stopPropagation();
|
|
13629
14020
|
}
|
|
13630
14021
|
};
|
|
13631
|
-
const colorAreaProps =
|
|
14022
|
+
const colorAreaProps = createMemo44(() => {
|
|
13632
14023
|
const s = getState();
|
|
13633
14024
|
const p = getProps();
|
|
13634
14025
|
return {
|
|
@@ -13647,7 +14038,7 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13647
14038
|
"data-disabled": s.isDisabled || p.isDisabled || void 0
|
|
13648
14039
|
};
|
|
13649
14040
|
});
|
|
13650
|
-
const gradientProps =
|
|
14041
|
+
const gradientProps = createMemo44(() => {
|
|
13651
14042
|
return {
|
|
13652
14043
|
role: "presentation",
|
|
13653
14044
|
style: {
|
|
@@ -13656,7 +14047,7 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13656
14047
|
}
|
|
13657
14048
|
};
|
|
13658
14049
|
});
|
|
13659
|
-
const thumbProps =
|
|
14050
|
+
const thumbProps = createMemo44(() => {
|
|
13660
14051
|
const s = getState();
|
|
13661
14052
|
const p = getProps();
|
|
13662
14053
|
const pos = s.getThumbPosition();
|
|
@@ -13673,7 +14064,7 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13673
14064
|
"data-disabled": s.isDisabled || p.isDisabled || void 0
|
|
13674
14065
|
};
|
|
13675
14066
|
});
|
|
13676
|
-
const xInputProps =
|
|
14067
|
+
const xInputProps = createMemo44(() => {
|
|
13677
14068
|
const s = getState();
|
|
13678
14069
|
const p = getProps();
|
|
13679
14070
|
const xRange = s.value.getChannelRange(s.xChannel);
|
|
@@ -13712,7 +14103,7 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13712
14103
|
}
|
|
13713
14104
|
};
|
|
13714
14105
|
});
|
|
13715
|
-
const yInputProps =
|
|
14106
|
+
const yInputProps = createMemo44(() => {
|
|
13716
14107
|
const s = getState();
|
|
13717
14108
|
const p = getProps();
|
|
13718
14109
|
const yRange = s.value.getChannelRange(s.yChannel);
|
|
@@ -13765,6 +14156,9 @@ function createColorArea(props, state2, areaRef) {
|
|
|
13765
14156
|
}
|
|
13766
14157
|
};
|
|
13767
14158
|
}
|
|
14159
|
+
|
|
14160
|
+
// src/color/createColorWheel.ts
|
|
14161
|
+
import { createMemo as createMemo45 } from "solid-js";
|
|
13768
14162
|
function createColorWheel(props, state2, wheelRef) {
|
|
13769
14163
|
const getProps = () => props();
|
|
13770
14164
|
const getState = () => state2();
|
|
@@ -13832,7 +14226,7 @@ function createColorWheel(props, state2, wheelRef) {
|
|
|
13832
14226
|
e.stopPropagation();
|
|
13833
14227
|
}
|
|
13834
14228
|
};
|
|
13835
|
-
const trackProps =
|
|
14229
|
+
const trackProps = createMemo45(() => {
|
|
13836
14230
|
const s = getState();
|
|
13837
14231
|
const p = getProps();
|
|
13838
14232
|
return {
|
|
@@ -13847,7 +14241,7 @@ function createColorWheel(props, state2, wheelRef) {
|
|
|
13847
14241
|
"data-disabled": s.isDisabled || p.isDisabled || void 0
|
|
13848
14242
|
};
|
|
13849
14243
|
});
|
|
13850
|
-
const thumbProps =
|
|
14244
|
+
const thumbProps = createMemo45(() => {
|
|
13851
14245
|
const s = getState();
|
|
13852
14246
|
const p = getProps();
|
|
13853
14247
|
const angle = s.getThumbAngle();
|
|
@@ -13868,7 +14262,7 @@ function createColorWheel(props, state2, wheelRef) {
|
|
|
13868
14262
|
"data-disabled": s.isDisabled || p.isDisabled || void 0
|
|
13869
14263
|
};
|
|
13870
14264
|
});
|
|
13871
|
-
const inputProps =
|
|
14265
|
+
const inputProps = createMemo45(() => {
|
|
13872
14266
|
const s = getState();
|
|
13873
14267
|
const p = getProps();
|
|
13874
14268
|
return {
|
|
@@ -13918,6 +14312,9 @@ function createColorWheel(props, state2, wheelRef) {
|
|
|
13918
14312
|
}
|
|
13919
14313
|
};
|
|
13920
14314
|
}
|
|
14315
|
+
|
|
14316
|
+
// src/color/createColorField.ts
|
|
14317
|
+
import { createMemo as createMemo46 } from "solid-js";
|
|
13921
14318
|
function createColorField(props, state2, _inputRef) {
|
|
13922
14319
|
const getProps = () => props();
|
|
13923
14320
|
const getState = () => state2();
|
|
@@ -13963,13 +14360,13 @@ function createColorField(props, state2, _inputRef) {
|
|
|
13963
14360
|
e.preventDefault();
|
|
13964
14361
|
}
|
|
13965
14362
|
};
|
|
13966
|
-
const labelProps =
|
|
14363
|
+
const labelProps = createMemo46(() => {
|
|
13967
14364
|
return {
|
|
13968
14365
|
id: labelId,
|
|
13969
14366
|
for: inputId
|
|
13970
14367
|
};
|
|
13971
14368
|
});
|
|
13972
|
-
const inputProps =
|
|
14369
|
+
const inputProps = createMemo46(() => {
|
|
13973
14370
|
const s = getState();
|
|
13974
14371
|
const p = getProps();
|
|
13975
14372
|
const channelLabel = s.channel && s.value ? s.value.getChannelName(s.channel, "en-US") : void 0;
|
|
@@ -14010,9 +14407,13 @@ function createColorField(props, state2, _inputRef) {
|
|
|
14010
14407
|
}
|
|
14011
14408
|
};
|
|
14012
14409
|
}
|
|
14410
|
+
|
|
14411
|
+
// src/color/createColorSwatch.ts
|
|
14412
|
+
import { createMemo as createMemo47 } from "solid-js";
|
|
14413
|
+
import { normalizeColor } from "@proyecto-viviana/solid-stately";
|
|
14013
14414
|
function createColorSwatch(props) {
|
|
14014
14415
|
const getProps = () => props();
|
|
14015
|
-
const swatchProps =
|
|
14416
|
+
const swatchProps = createMemo47(() => {
|
|
14016
14417
|
const p = getProps();
|
|
14017
14418
|
const color = normalizeColor(p.color);
|
|
14018
14419
|
const colorName = color.getColorName("en-US");
|
|
@@ -14032,6 +14433,10 @@ function createColorSwatch(props) {
|
|
|
14032
14433
|
};
|
|
14033
14434
|
}
|
|
14034
14435
|
|
|
14436
|
+
// src/dnd/createDrag.ts
|
|
14437
|
+
import { createMemo as createMemo48 } from "solid-js";
|
|
14438
|
+
import { createDragState } from "@proyecto-viviana/solid-stately";
|
|
14439
|
+
|
|
14035
14440
|
// src/dnd/utils.ts
|
|
14036
14441
|
var NATIVE_DRAG_TYPES = /* @__PURE__ */ new Set([
|
|
14037
14442
|
"text/plain",
|
|
@@ -14234,7 +14639,7 @@ function getGlobalAllowedDropOperations() {
|
|
|
14234
14639
|
|
|
14235
14640
|
// src/dnd/createDrag.ts
|
|
14236
14641
|
function createDrag(props) {
|
|
14237
|
-
const getProps =
|
|
14642
|
+
const getProps = createMemo48(() => props());
|
|
14238
14643
|
const state2 = createDragState(() => ({
|
|
14239
14644
|
getItems: getProps().getItems,
|
|
14240
14645
|
getAllowedDropOperations: getProps().getAllowedDropOperations,
|
|
@@ -14325,7 +14730,7 @@ function createDrag(props) {
|
|
|
14325
14730
|
state2.startDrag(rect.x + rect.width / 2, rect.y + rect.height / 2);
|
|
14326
14731
|
}
|
|
14327
14732
|
};
|
|
14328
|
-
const dragProps =
|
|
14733
|
+
const dragProps = createMemo48(() => {
|
|
14329
14734
|
const p = getProps();
|
|
14330
14735
|
if (p.isDisabled) {
|
|
14331
14736
|
return {
|
|
@@ -14344,7 +14749,7 @@ function createDrag(props) {
|
|
|
14344
14749
|
}
|
|
14345
14750
|
return baseProps;
|
|
14346
14751
|
});
|
|
14347
|
-
const dragButtonProps =
|
|
14752
|
+
const dragButtonProps = createMemo48(() => {
|
|
14348
14753
|
const p = getProps();
|
|
14349
14754
|
if (p.isDisabled) {
|
|
14350
14755
|
return {
|
|
@@ -14370,9 +14775,13 @@ function createDrag(props) {
|
|
|
14370
14775
|
}
|
|
14371
14776
|
};
|
|
14372
14777
|
}
|
|
14778
|
+
|
|
14779
|
+
// src/dnd/createDrop.ts
|
|
14780
|
+
import { createMemo as createMemo49 } from "solid-js";
|
|
14781
|
+
import { createDropState } from "@proyecto-viviana/solid-stately";
|
|
14373
14782
|
var DROP_ACTIVATE_TIMEOUT = 800;
|
|
14374
14783
|
function createDrop(props) {
|
|
14375
|
-
const getProps =
|
|
14784
|
+
const getProps = createMemo49(() => props());
|
|
14376
14785
|
const state2 = createDropState(() => ({
|
|
14377
14786
|
getDropOperation: getProps().getDropOperation,
|
|
14378
14787
|
onDropEnter: getProps().onDropEnter,
|
|
@@ -14556,7 +14965,7 @@ function createDrop(props) {
|
|
|
14556
14965
|
fireDropExit(e);
|
|
14557
14966
|
clearTimeout(dropActivateTimer);
|
|
14558
14967
|
};
|
|
14559
|
-
const dropProps =
|
|
14968
|
+
const dropProps = createMemo49(() => {
|
|
14560
14969
|
const p = getProps();
|
|
14561
14970
|
if (p.isDisabled) {
|
|
14562
14971
|
return {};
|
|
@@ -14569,7 +14978,7 @@ function createDrop(props) {
|
|
|
14569
14978
|
};
|
|
14570
14979
|
return baseProps;
|
|
14571
14980
|
});
|
|
14572
|
-
const dropButtonProps =
|
|
14981
|
+
const dropButtonProps = createMemo49(() => {
|
|
14573
14982
|
const p = getProps();
|
|
14574
14983
|
if (p.isDisabled) {
|
|
14575
14984
|
return {
|
|
@@ -14593,6 +15002,9 @@ function createDrop(props) {
|
|
|
14593
15002
|
}
|
|
14594
15003
|
};
|
|
14595
15004
|
}
|
|
15005
|
+
|
|
15006
|
+
// src/dnd/createDraggableCollection.ts
|
|
15007
|
+
import { createMemo as createMemo50, createEffect as createEffect35, onCleanup as onCleanup37 } from "solid-js";
|
|
14596
15008
|
var globalDraggingCollectionRef = null;
|
|
14597
15009
|
function setGlobalDraggingCollectionRef(ref) {
|
|
14598
15010
|
globalDraggingCollectionRef = ref;
|
|
@@ -14601,14 +15013,14 @@ function getGlobalDraggingCollectionRef() {
|
|
|
14601
15013
|
return globalDraggingCollectionRef;
|
|
14602
15014
|
}
|
|
14603
15015
|
function createDraggableCollection(options, state2) {
|
|
14604
|
-
const ref =
|
|
14605
|
-
|
|
15016
|
+
const ref = createMemo50(() => options.ref());
|
|
15017
|
+
createEffect35(() => {
|
|
14606
15018
|
const currentRef = ref();
|
|
14607
15019
|
if (state2.draggingKeys.size > 0 && globalDraggingCollectionRef !== currentRef) {
|
|
14608
15020
|
setGlobalDraggingCollectionRef(currentRef);
|
|
14609
15021
|
}
|
|
14610
15022
|
});
|
|
14611
|
-
|
|
15023
|
+
onCleanup37(() => {
|
|
14612
15024
|
if (globalDraggingCollectionRef === ref()) {
|
|
14613
15025
|
setGlobalDraggingCollectionRef(null);
|
|
14614
15026
|
}
|
|
@@ -14617,6 +15029,9 @@ function createDraggableCollection(options, state2) {
|
|
|
14617
15029
|
state: state2
|
|
14618
15030
|
};
|
|
14619
15031
|
}
|
|
15032
|
+
|
|
15033
|
+
// src/dnd/createDroppableCollection.ts
|
|
15034
|
+
import { createMemo as createMemo51, onCleanup as onCleanup38 } from "solid-js";
|
|
14620
15035
|
var globalDropCollectionRef = null;
|
|
14621
15036
|
function setGlobalDropCollectionRef(ref) {
|
|
14622
15037
|
globalDropCollectionRef = ref;
|
|
@@ -14625,7 +15040,7 @@ function getGlobalDropCollectionRef() {
|
|
|
14625
15040
|
return globalDropCollectionRef;
|
|
14626
15041
|
}
|
|
14627
15042
|
function createDroppableCollection(options, state2) {
|
|
14628
|
-
const getOptions =
|
|
15043
|
+
const getOptions = createMemo51(() => options());
|
|
14629
15044
|
let nextTarget = null;
|
|
14630
15045
|
let currentDropOperation = null;
|
|
14631
15046
|
const isInternalDropOperation = () => {
|
|
@@ -14757,13 +15172,13 @@ function createDroppableCollection(options, state2) {
|
|
|
14757
15172
|
}
|
|
14758
15173
|
}
|
|
14759
15174
|
};
|
|
14760
|
-
|
|
15175
|
+
onCleanup38(() => {
|
|
14761
15176
|
const ref = getOptions().ref();
|
|
14762
15177
|
if (globalDropCollectionRef === ref) {
|
|
14763
15178
|
setGlobalDropCollectionRef(null);
|
|
14764
15179
|
}
|
|
14765
15180
|
});
|
|
14766
|
-
const collectionProps =
|
|
15181
|
+
const collectionProps = createMemo51(() => {
|
|
14767
15182
|
const baseDropProps = drop.dropProps;
|
|
14768
15183
|
return {
|
|
14769
15184
|
...baseDropProps
|
|
@@ -14775,11 +15190,14 @@ function createDroppableCollection(options, state2) {
|
|
|
14775
15190
|
}
|
|
14776
15191
|
};
|
|
14777
15192
|
}
|
|
15193
|
+
|
|
15194
|
+
// src/dnd/createDraggableItem.ts
|
|
15195
|
+
import { createMemo as createMemo52 } from "solid-js";
|
|
14778
15196
|
function createDraggableItem(options, state2) {
|
|
14779
|
-
const getOptions =
|
|
15197
|
+
const getOptions = createMemo52(() => options());
|
|
14780
15198
|
let lastX = 0;
|
|
14781
15199
|
let lastY = 0;
|
|
14782
|
-
const isDragging =
|
|
15200
|
+
const isDragging = createMemo52(() => {
|
|
14783
15201
|
const key = getOptions().key;
|
|
14784
15202
|
return state2.draggingKeys.has(key);
|
|
14785
15203
|
});
|
|
@@ -14871,7 +15289,7 @@ function createDraggableItem(options, state2) {
|
|
|
14871
15289
|
state2.startDrag(keys, rect.x + rect.width / 2, rect.y + rect.height / 2);
|
|
14872
15290
|
}
|
|
14873
15291
|
};
|
|
14874
|
-
const dragProps =
|
|
15292
|
+
const dragProps = createMemo52(() => {
|
|
14875
15293
|
const opts = getOptions();
|
|
14876
15294
|
if (opts.isDisabled || state2.isDisabled) {
|
|
14877
15295
|
return {
|
|
@@ -14890,7 +15308,7 @@ function createDraggableItem(options, state2) {
|
|
|
14890
15308
|
}
|
|
14891
15309
|
return baseProps;
|
|
14892
15310
|
});
|
|
14893
|
-
const dragButtonProps =
|
|
15311
|
+
const dragButtonProps = createMemo52(() => {
|
|
14894
15312
|
const opts = getOptions();
|
|
14895
15313
|
if (opts.isDisabled || state2.isDisabled) {
|
|
14896
15314
|
return {
|
|
@@ -14916,9 +15334,12 @@ function createDraggableItem(options, state2) {
|
|
|
14916
15334
|
}
|
|
14917
15335
|
};
|
|
14918
15336
|
}
|
|
15337
|
+
|
|
15338
|
+
// src/dnd/createDroppableItem.ts
|
|
15339
|
+
import { createMemo as createMemo53 } from "solid-js";
|
|
14919
15340
|
function createDroppableItem(options, state2) {
|
|
14920
|
-
const getOptions =
|
|
14921
|
-
const isDropTarget =
|
|
15341
|
+
const getOptions = createMemo53(() => options());
|
|
15342
|
+
const isDropTarget = createMemo53(() => {
|
|
14922
15343
|
const { key } = getOptions();
|
|
14923
15344
|
const target = state2.target;
|
|
14924
15345
|
return target?.type === "item" && target.key === key;
|
|
@@ -15007,7 +15428,9 @@ function createDroppableItem(options, state2) {
|
|
|
15007
15428
|
const relatedTarget = e.relatedTarget;
|
|
15008
15429
|
const currentTarget = e.currentTarget;
|
|
15009
15430
|
if (!relatedTarget || !currentTarget.contains(relatedTarget)) {
|
|
15010
|
-
getOptions();
|
|
15431
|
+
const { key } = getOptions();
|
|
15432
|
+
if (state2.target?.type === "item" && state2.target.key === key) {
|
|
15433
|
+
}
|
|
15011
15434
|
}
|
|
15012
15435
|
};
|
|
15013
15436
|
const onDrop = (e) => {
|
|
@@ -15015,7 +15438,7 @@ function createDroppableItem(options, state2) {
|
|
|
15015
15438
|
e.stopPropagation();
|
|
15016
15439
|
clearTimeout(dropActivateTimer);
|
|
15017
15440
|
};
|
|
15018
|
-
const dropProps =
|
|
15441
|
+
const dropProps = createMemo53(() => {
|
|
15019
15442
|
const opts = getOptions();
|
|
15020
15443
|
if (opts.isDisabled) {
|
|
15021
15444
|
return {};
|
|
@@ -15036,6 +15459,9 @@ function createDroppableItem(options, state2) {
|
|
|
15036
15459
|
}
|
|
15037
15460
|
};
|
|
15038
15461
|
}
|
|
15462
|
+
|
|
15463
|
+
// src/landmark/createLandmark.ts
|
|
15464
|
+
import { createEffect as createEffect36, onCleanup as onCleanup39 } from "solid-js";
|
|
15039
15465
|
var LandmarkManager = class {
|
|
15040
15466
|
landmarks = [];
|
|
15041
15467
|
currentIndex = -1;
|
|
@@ -15098,7 +15524,12 @@ var LandmarkManager = class {
|
|
|
15098
15524
|
for (const [role, group] of roleGroups) {
|
|
15099
15525
|
if (group.length > 1) {
|
|
15100
15526
|
const labels = group.map((l) => l.label);
|
|
15101
|
-
new Set(labels.filter(Boolean));
|
|
15527
|
+
const uniqueLabels = new Set(labels.filter(Boolean));
|
|
15528
|
+
if (uniqueLabels.size < group.length) {
|
|
15529
|
+
console.warn(
|
|
15530
|
+
`Multiple landmarks with role "${role}" exist. Each should have a unique aria-label or aria-labelledby.`
|
|
15531
|
+
);
|
|
15532
|
+
}
|
|
15102
15533
|
}
|
|
15103
15534
|
}
|
|
15104
15535
|
}
|
|
@@ -15187,7 +15618,7 @@ function getLandmarkManager() {
|
|
|
15187
15618
|
return landmarkManager;
|
|
15188
15619
|
}
|
|
15189
15620
|
function createLandmark(props, ref) {
|
|
15190
|
-
|
|
15621
|
+
createEffect36(() => {
|
|
15191
15622
|
const element = ref();
|
|
15192
15623
|
if (!element) return;
|
|
15193
15624
|
const p = access(props);
|
|
@@ -15199,7 +15630,7 @@ function createLandmark(props, ref) {
|
|
|
15199
15630
|
};
|
|
15200
15631
|
const manager = getLandmarkManager();
|
|
15201
15632
|
manager.register(entry);
|
|
15202
|
-
|
|
15633
|
+
onCleanup39(() => {
|
|
15203
15634
|
manager.unregister(element);
|
|
15204
15635
|
});
|
|
15205
15636
|
});
|
|
@@ -15220,6 +15651,9 @@ function createLandmark(props, ref) {
|
|
|
15220
15651
|
function getLandmarkController() {
|
|
15221
15652
|
return getLandmarkManager().getController();
|
|
15222
15653
|
}
|
|
15654
|
+
|
|
15655
|
+
// src/visually-hidden/createVisuallyHidden.ts
|
|
15656
|
+
import { createMemo as createMemo54, createSignal as createSignal28 } from "solid-js";
|
|
15223
15657
|
var visuallyHiddenStyles = {
|
|
15224
15658
|
border: "0",
|
|
15225
15659
|
clip: "rect(0 0 0 0)",
|
|
@@ -15233,7 +15667,7 @@ var visuallyHiddenStyles = {
|
|
|
15233
15667
|
"white-space": "nowrap"
|
|
15234
15668
|
};
|
|
15235
15669
|
function createVisuallyHidden(props = {}) {
|
|
15236
|
-
const [isFocused, setIsFocused] =
|
|
15670
|
+
const [isFocused, setIsFocused] = createSignal28(false);
|
|
15237
15671
|
const isFocusable2 = () => access(props).isFocusable ?? false;
|
|
15238
15672
|
const style = () => access(props).style;
|
|
15239
15673
|
const { focusWithinProps } = createFocusWithin({
|
|
@@ -15242,7 +15676,7 @@ function createVisuallyHidden(props = {}) {
|
|
|
15242
15676
|
},
|
|
15243
15677
|
onFocusWithinChange: (val) => setIsFocused(val)
|
|
15244
15678
|
});
|
|
15245
|
-
const combinedStyles =
|
|
15679
|
+
const combinedStyles = createMemo54(() => {
|
|
15246
15680
|
if (isFocused()) {
|
|
15247
15681
|
return style() ?? {};
|
|
15248
15682
|
} else if (style()) {
|
|
@@ -15251,7 +15685,7 @@ function createVisuallyHidden(props = {}) {
|
|
|
15251
15685
|
return visuallyHiddenStyles;
|
|
15252
15686
|
}
|
|
15253
15687
|
});
|
|
15254
|
-
const visuallyHiddenProps =
|
|
15688
|
+
const visuallyHiddenProps = createMemo54(() => ({
|
|
15255
15689
|
...focusWithinProps,
|
|
15256
15690
|
style: combinedStyles()
|
|
15257
15691
|
}));
|
|
@@ -15259,8 +15693,11 @@ function createVisuallyHidden(props = {}) {
|
|
|
15259
15693
|
visuallyHiddenProps
|
|
15260
15694
|
};
|
|
15261
15695
|
}
|
|
15696
|
+
|
|
15697
|
+
// src/form/createFormReset.ts
|
|
15698
|
+
import { createEffect as createEffect37, onCleanup as onCleanup40 } from "solid-js";
|
|
15262
15699
|
function createFormReset(ref, defaultValue, onReset) {
|
|
15263
|
-
|
|
15700
|
+
createEffect37(() => {
|
|
15264
15701
|
const element = ref();
|
|
15265
15702
|
if (!element) return;
|
|
15266
15703
|
const form = element.form;
|
|
@@ -15269,10 +15706,208 @@ function createFormReset(ref, defaultValue, onReset) {
|
|
|
15269
15706
|
onReset(defaultValue);
|
|
15270
15707
|
};
|
|
15271
15708
|
form.addEventListener("reset", handleReset);
|
|
15272
|
-
|
|
15709
|
+
onCleanup40(() => {
|
|
15273
15710
|
form.removeEventListener("reset", handleReset);
|
|
15274
15711
|
});
|
|
15275
15712
|
});
|
|
15276
15713
|
}
|
|
15277
|
-
|
|
15278
|
-
|
|
15714
|
+
export {
|
|
15715
|
+
AUTOCOMPLETE_CLEAR_FOCUS_EVENT,
|
|
15716
|
+
AUTOCOMPLETE_FOCUS_EVENT,
|
|
15717
|
+
CUSTOM_DRAG_TYPE,
|
|
15718
|
+
DROP_EFFECT_TO_DROP_OPERATION,
|
|
15719
|
+
DROP_OPERATION,
|
|
15720
|
+
DROP_OPERATION_ALLOWED,
|
|
15721
|
+
DROP_OPERATION_TO_DROP_EFFECT,
|
|
15722
|
+
DragTypesImpl,
|
|
15723
|
+
EFFECT_ALLOWED,
|
|
15724
|
+
FocusScope,
|
|
15725
|
+
GENERIC_TYPE,
|
|
15726
|
+
GridKeyboardDelegate,
|
|
15727
|
+
HiddenSelect,
|
|
15728
|
+
I18nProvider,
|
|
15729
|
+
ModalProvider,
|
|
15730
|
+
NATIVE_DRAG_TYPES,
|
|
15731
|
+
NumberFormatter,
|
|
15732
|
+
OverlayContainer,
|
|
15733
|
+
OverlayProvider,
|
|
15734
|
+
SSRProvider,
|
|
15735
|
+
access,
|
|
15736
|
+
addWindowFocusTracking,
|
|
15737
|
+
announce,
|
|
15738
|
+
ariaHideOutside,
|
|
15739
|
+
calculatePosition,
|
|
15740
|
+
canUseDOM,
|
|
15741
|
+
checkboxGroupData,
|
|
15742
|
+
clearAnnouncer,
|
|
15743
|
+
clearAutoFocusQueue,
|
|
15744
|
+
clearFocusStack,
|
|
15745
|
+
createAutoFocus,
|
|
15746
|
+
createAutocomplete,
|
|
15747
|
+
createBreadcrumbItem,
|
|
15748
|
+
createBreadcrumbs,
|
|
15749
|
+
createBrowserEffect,
|
|
15750
|
+
createBrowserValue,
|
|
15751
|
+
createButton,
|
|
15752
|
+
createCalendar,
|
|
15753
|
+
createCalendarCell,
|
|
15754
|
+
createCalendarGrid,
|
|
15755
|
+
createCheckbox,
|
|
15756
|
+
createCheckboxGroup,
|
|
15757
|
+
createCheckboxGroupItem,
|
|
15758
|
+
createCheckboxGroupState,
|
|
15759
|
+
createCollator,
|
|
15760
|
+
createColorArea,
|
|
15761
|
+
createColorField,
|
|
15762
|
+
createColorSlider,
|
|
15763
|
+
createColorSwatch,
|
|
15764
|
+
createColorWheel,
|
|
15765
|
+
createComboBox,
|
|
15766
|
+
createDateField,
|
|
15767
|
+
createDateFormatter,
|
|
15768
|
+
createDatePicker,
|
|
15769
|
+
createDateSegment,
|
|
15770
|
+
createDefaultLocale,
|
|
15771
|
+
createDescription,
|
|
15772
|
+
createDialog,
|
|
15773
|
+
createDisclosure,
|
|
15774
|
+
createDisclosureGroup,
|
|
15775
|
+
createDrag,
|
|
15776
|
+
createDraggableCollection,
|
|
15777
|
+
createDraggableItem,
|
|
15778
|
+
createDrop,
|
|
15779
|
+
createDroppableCollection,
|
|
15780
|
+
createDroppableItem,
|
|
15781
|
+
createField,
|
|
15782
|
+
createFilter,
|
|
15783
|
+
createFocusRestore,
|
|
15784
|
+
createFocusRing,
|
|
15785
|
+
createFocusVisible,
|
|
15786
|
+
createFocusVisibleListener,
|
|
15787
|
+
createFocusable,
|
|
15788
|
+
createFormReset,
|
|
15789
|
+
createFormValidation,
|
|
15790
|
+
createGrid,
|
|
15791
|
+
createGridCell,
|
|
15792
|
+
createGridList,
|
|
15793
|
+
createGridListItem,
|
|
15794
|
+
createGridListSelectionCheckbox,
|
|
15795
|
+
createGridRow,
|
|
15796
|
+
createHiddenSelect,
|
|
15797
|
+
createHover,
|
|
15798
|
+
createHydrationState,
|
|
15799
|
+
createId,
|
|
15800
|
+
createInteractOutside,
|
|
15801
|
+
createIsSSR,
|
|
15802
|
+
createLabel,
|
|
15803
|
+
createLabels,
|
|
15804
|
+
createLandmark,
|
|
15805
|
+
createLink,
|
|
15806
|
+
createListBox,
|
|
15807
|
+
createLongPress,
|
|
15808
|
+
createMenu,
|
|
15809
|
+
createMenuItem,
|
|
15810
|
+
createMenuTrigger,
|
|
15811
|
+
createMeter,
|
|
15812
|
+
createModal,
|
|
15813
|
+
createMove,
|
|
15814
|
+
createNumberField,
|
|
15815
|
+
createNumberFormatter,
|
|
15816
|
+
createOption,
|
|
15817
|
+
createOverlay,
|
|
15818
|
+
createOverlayPosition,
|
|
15819
|
+
createOverlayTrigger,
|
|
15820
|
+
createPopover,
|
|
15821
|
+
createPress,
|
|
15822
|
+
createPreventScroll,
|
|
15823
|
+
createProgressBar,
|
|
15824
|
+
createRadio,
|
|
15825
|
+
createRadioGroup,
|
|
15826
|
+
createRadioGroupState,
|
|
15827
|
+
createRangeCalendar,
|
|
15828
|
+
createRangeCalendarCell,
|
|
15829
|
+
createSearchField,
|
|
15830
|
+
createSelect,
|
|
15831
|
+
createSeparator,
|
|
15832
|
+
createSlider,
|
|
15833
|
+
createSwitch,
|
|
15834
|
+
createTab,
|
|
15835
|
+
createTabList,
|
|
15836
|
+
createTabPanel,
|
|
15837
|
+
createTable,
|
|
15838
|
+
createTableCell,
|
|
15839
|
+
createTableColumnHeader,
|
|
15840
|
+
createTableHeaderRow,
|
|
15841
|
+
createTableRow,
|
|
15842
|
+
createTableRowGroup,
|
|
15843
|
+
createTableSelectAllCheckbox,
|
|
15844
|
+
createTableSelectionCheckbox,
|
|
15845
|
+
createTag,
|
|
15846
|
+
createTagGroup,
|
|
15847
|
+
createTextField,
|
|
15848
|
+
createTimeField,
|
|
15849
|
+
createToast,
|
|
15850
|
+
createToastRegion,
|
|
15851
|
+
createToggle,
|
|
15852
|
+
createToggleButton,
|
|
15853
|
+
createToggleState,
|
|
15854
|
+
createToolbar,
|
|
15855
|
+
createTooltip,
|
|
15856
|
+
createTooltipTrigger,
|
|
15857
|
+
createTree,
|
|
15858
|
+
createTreeItem,
|
|
15859
|
+
createTreeSelectionCheckbox,
|
|
15860
|
+
createTypeSelect,
|
|
15861
|
+
createVirtualFocus,
|
|
15862
|
+
createVisuallyHidden,
|
|
15863
|
+
destroyAnnouncer,
|
|
15864
|
+
filterDOMProps,
|
|
15865
|
+
getAutoFocusQueueLength,
|
|
15866
|
+
getComboBoxData,
|
|
15867
|
+
getDefaultLocale,
|
|
15868
|
+
getDocument,
|
|
15869
|
+
getFocusStackLength,
|
|
15870
|
+
getGlobalAllowedDropOperations,
|
|
15871
|
+
getGlobalDraggingCollectionRef,
|
|
15872
|
+
getGlobalDropCollectionRef,
|
|
15873
|
+
getGlobalDropEffect,
|
|
15874
|
+
getGridData,
|
|
15875
|
+
getGridListData,
|
|
15876
|
+
getLandmarkController,
|
|
15877
|
+
getListBoxData,
|
|
15878
|
+
getMenuData,
|
|
15879
|
+
getOwnerDocument2 as getOwnerDocument,
|
|
15880
|
+
getOwnerWindow2 as getOwnerWindow,
|
|
15881
|
+
getPortalContainer,
|
|
15882
|
+
getSelectData,
|
|
15883
|
+
getTableData,
|
|
15884
|
+
getTagGroupData,
|
|
15885
|
+
getTreeData,
|
|
15886
|
+
getTypes,
|
|
15887
|
+
getWindow,
|
|
15888
|
+
isAccessor,
|
|
15889
|
+
isDirectoryDropItem,
|
|
15890
|
+
isFileDropItem,
|
|
15891
|
+
isFocusVisible,
|
|
15892
|
+
isRTL,
|
|
15893
|
+
isTextDropItem,
|
|
15894
|
+
keepVisible,
|
|
15895
|
+
mergeProps,
|
|
15896
|
+
onCloseMap,
|
|
15897
|
+
popFocusStack,
|
|
15898
|
+
pushFocusStack,
|
|
15899
|
+
radioGroupData,
|
|
15900
|
+
readFromDataTransfer,
|
|
15901
|
+
setGlobalAllowedDropOperations,
|
|
15902
|
+
setGlobalDraggingCollectionRef,
|
|
15903
|
+
setGlobalDropCollectionRef,
|
|
15904
|
+
setGlobalDropEffect,
|
|
15905
|
+
useAnnouncer,
|
|
15906
|
+
useFocusManager,
|
|
15907
|
+
useIsSSR,
|
|
15908
|
+
useLocale,
|
|
15909
|
+
useModalProvider,
|
|
15910
|
+
visuallyHiddenStyles,
|
|
15911
|
+
writeToDataTransfer
|
|
15912
|
+
};
|
|
15913
|
+
//# sourceMappingURL=index.js.map
|