@threadlabs/looma 0.50.2 → 0.51.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/components/shared/binding-inputs.js +5 -0
- package/components/shared/calendar-model.js +84 -0
- package/components/shared/date-input-segments.js +25 -0
- package/components/shared/date-navigation.js +35 -0
- package/components/shared/date-picker.js +38 -0
- package/components/shared/date-range.js +61 -0
- package/components/shared/date-time.js +273 -0
- package/components/shared/external-value.js +12 -0
- package/components/shared/form-reset.js +1 -1
- package/components/shared/icons.js +2 -0
- package/components/shared/initial-field-value.js +14 -0
- package/components/shared/input-segments.js +190 -0
- package/components/shared/prepared-module.js +19 -0
- package/components/ui-button/ui-button.html +31 -10
- package/components/ui-calendar/calendar-source.js +34 -0
- package/components/ui-calendar/ui-calendar.html +221 -0
- package/components/ui-calendar/ui-calendar.js +185 -0
- package/components/ui-cluster/ui-cluster.html +5 -2
- package/components/ui-date-field/ui-date-field.html +143 -0
- package/components/ui-date-field/ui-date-field.js +258 -0
- package/components/ui-date-picker/ui-date-picker.html +213 -0
- package/components/ui-date-picker/ui-date-picker.js +153 -0
- package/components/ui-date-range-picker/ui-date-range-picker.html +202 -0
- package/components/ui-date-range-picker/ui-date-range-picker.js +224 -0
- package/components/ui-file-input/files.js +15 -0
- package/components/ui-file-input/ui-file-input.html +79 -0
- package/components/ui-file-input/ui-file-input.js +108 -0
- package/components/ui-form-field/ui-form-field.js +2 -2
- package/components/ui-grid/ui-grid.html +74 -5
- package/components/ui-icon/ui-icon.html +8 -0
- package/components/ui-icon-button/ui-icon-button.html +22 -7
- package/components/ui-input/ui-input.html +10 -1
- package/components/ui-input/ui-input.js +11 -5
- package/components/ui-input-group/ui-input-group.html +2 -2
- package/components/ui-input-group/ui-input-group.js +6 -5
- package/components/ui-popover/ui-popover.html +2 -0
- package/components/ui-popover/ui-popover.js +5 -1
- package/components/ui-select/ui-select.html +8 -3
- package/components/ui-time-field/ui-time-field.html +62 -0
- package/components/ui-time-field/ui-time-field.js +21 -0
- package/components/ui-time-picker/time-options.js +25 -0
- package/components/ui-time-picker/ui-time-picker.html +160 -0
- package/components/ui-time-picker/ui-time-picker.js +132 -0
- package/dist/index.js +68 -61
- package/docs/README.md +2 -2
- package/docs/catalog.json +14346 -6343
- package/docs/documentation.css +1 -1
- package/docs/framework-examples.mjs +13 -2
- package/docs/site.mjs +1 -1
- package/editor/components.css +62 -29
- package/editor/icons.d.ts +2 -0
- package/editor/index.js +602 -141
- package/package.json +6 -4
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +19 -7
- package/styles/ui-calendar.css +1 -0
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card-group.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +4 -1
- package/styles/ui-color-picker.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-compact-content.css +1 -1
- package/styles/ui-compact-editor.css +1 -1
- package/styles/ui-compact-mark.css +1 -1
- package/styles/ui-compact-node.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-curve-editor.css +1 -1
- package/styles/ui-cycle-button.css +1 -1
- package/styles/ui-date-field.css +1 -0
- package/styles/ui-date-picker.css +1 -0
- package/styles/ui-date-range-picker.css +1 -0
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-footnote-editor.css +1 -1
- package/styles/ui-editor-formatting-tools.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-surface.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-editor.css +1 -1
- package/styles/ui-file-input.css +1 -0
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +44 -1
- package/styles/ui-icon-button.css +19 -5
- package/styles/ui-icon.css +5 -1
- package/styles/ui-image.css +1 -1
- package/styles/ui-input-group.css +3 -3
- package/styles/ui-input.css +1 -1
- package/styles/ui-light-editor.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-number-input.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-pagination.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +9 -4
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-site-header.css +19 -19
- package/styles/ui-skeleton.css +1 -1
- package/styles/ui-slider.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-time-field.css +1 -0
- package/styles/ui-time-picker.css +1 -0
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/tokens.css +4 -0
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +1 -1
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +1 -1
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +1 -1
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +1 -1
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +1 -1
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +1 -1
- package/vanilla/UiButton.d.ts +2 -1
- package/vanilla/UiButton.js +128 -108
- package/vanilla/UiCalendar.d.ts +50 -0
- package/vanilla/UiCalendar.js +477 -0
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +1 -1
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiCardGroup.d.ts +1 -1
- package/vanilla/UiCardGroup.js +1 -1
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +1 -1
- package/vanilla/UiCluster.d.ts +2 -2
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiColorPicker.d.ts +1 -1
- package/vanilla/UiColorPicker.js +1 -1
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +1 -1
- package/vanilla/UiCompactContent.d.ts +1 -1
- package/vanilla/UiCompactContent.js +1 -1
- package/vanilla/UiCompactEditor.d.ts +1 -1
- package/vanilla/UiCompactEditor.js +1 -1
- package/vanilla/UiCompactMark.d.ts +1 -1
- package/vanilla/UiCompactMark.js +1 -1
- package/vanilla/UiCompactNode.d.ts +1 -1
- package/vanilla/UiCompactNode.js +1 -1
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +1 -1
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +1 -1
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +1 -1
- package/vanilla/UiCurveEditor.d.ts +1 -1
- package/vanilla/UiCurveEditor.js +1 -1
- package/vanilla/UiCycleButton.d.ts +1 -1
- package/vanilla/UiCycleButton.js +1 -1
- package/vanilla/UiDateField.d.ts +52 -0
- package/vanilla/UiDateField.js +208 -0
- package/vanilla/UiDatePicker.d.ts +63 -0
- package/vanilla/UiDatePicker.js +360 -0
- package/vanilla/UiDateRangePicker.d.ts +60 -0
- package/vanilla/UiDateRangePicker.js +418 -0
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +1 -1
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +1 -1
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +1 -1
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +1 -1
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +1 -1
- package/vanilla/UiEditor.d.ts +1 -1
- package/vanilla/UiEditor.js +1 -1
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +1 -1
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +1 -1
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +1 -1
- package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
- package/vanilla/UiEditorFootnoteEditor.js +1 -1
- package/vanilla/UiEditorFormattingTools.d.ts +1 -1
- package/vanilla/UiEditorFormattingTools.js +1 -1
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +1 -1
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +1 -1
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +1 -1
- package/vanilla/UiEditorLinkForm.d.ts +1 -1
- package/vanilla/UiEditorLinkForm.js +1 -1
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +1 -1
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +1 -1
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +1 -1
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +1 -1
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +1 -1
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +1 -1
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +1 -1
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +1 -1
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +1 -1
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +1 -1
- package/vanilla/UiFileInput.d.ts +36 -0
- package/vanilla/UiFileInput.js +209 -0
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +1 -1
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +1 -1
- package/vanilla/UiGrid.d.ts +7 -2
- package/vanilla/UiGrid.js +85 -19
- package/vanilla/UiIcon.d.ts +2 -1
- package/vanilla/UiIcon.js +10 -10
- package/vanilla/UiIconButton.d.ts +2 -2
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +1 -1
- package/vanilla/UiInput.d.ts +2 -1
- package/vanilla/UiInput.js +11 -11
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +1 -1
- package/vanilla/UiLightEditor.d.ts +1 -1
- package/vanilla/UiLightEditor.js +1 -1
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +1 -1
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +1 -1
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +1 -1
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +1 -1
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +1 -1
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +1 -1
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +1 -1
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +1 -1
- package/vanilla/UiNumberInput.d.ts +1 -1
- package/vanilla/UiNumberInput.js +1 -1
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +1 -1
- package/vanilla/UiPagination.d.ts +1 -1
- package/vanilla/UiPagination.js +1 -1
- package/vanilla/UiPopover.d.ts +2 -1
- package/vanilla/UiPopover.js +4 -4
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +1 -1
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +1 -1
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +1 -1
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +1 -1
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +1 -1
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +1 -1
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +1 -1
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +1 -1
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +1 -1
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +1 -1
- package/vanilla/UiSiteHeader.d.ts +1 -1
- package/vanilla/UiSiteHeader.js +1 -1
- package/vanilla/UiSkeleton.d.ts +1 -1
- package/vanilla/UiSkeleton.js +1 -1
- package/vanilla/UiSlider.d.ts +1 -1
- package/vanilla/UiSlider.js +1 -1
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +1 -1
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +1 -1
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +1 -1
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +1 -1
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +1 -1
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +1 -1
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +1 -1
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +1 -1
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +1 -1
- package/vanilla/UiTimeField.d.ts +42 -0
- package/vanilla/UiTimeField.js +112 -0
- package/vanilla/UiTimePicker.d.ts +48 -0
- package/vanilla/UiTimePicker.js +372 -0
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +1 -1
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +1 -1
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +1 -1
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +1 -1
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +1 -1
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +1 -1
- package/vanilla/index.js +7 -0
package/editor/index.js
CHANGED
|
@@ -10,9 +10,9 @@ import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
|
10
10
|
import { DOMSerializer } from "@tiptap/pm/model";
|
|
11
11
|
import { closeHistory } from "@tiptap/pm/history";
|
|
12
12
|
import { createLowlight } from "lowlight";
|
|
13
|
-
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bell, Bold, BookUser, Braces, Calculator, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, CodeXml, Columns3, Compass, CreditCard, Ellipsis, Eraser, ExternalLink, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, History, Image, Info, Italic, LayoutDashboard, Lightbulb, Link, List, ListOrdered, ListTodo, LoaderCircle, Menu, Merge, MessageSquareWarning, Minus, Monitor, Moon, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Paperclip, Pencil, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Search, Settings, Slash, Split, Strikethrough, Sun, Superscript, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, Unlink, UserRound, Users, X } from "lucide";
|
|
13
|
+
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bell, Bold, BookUser, Braces, Calculator, CalendarDays, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, Clock, CodeXml, Columns3, Compass, CreditCard, Ellipsis, Eraser, ExternalLink, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, History, Image, Info, Italic, LayoutDashboard, Lightbulb, Link, List, ListOrdered, ListTodo, LoaderCircle, Menu, Merge, MessageSquareWarning, Minus, Monitor, Moon, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Paperclip, Pencil, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Search, Settings, Slash, Split, Strikethrough, Sun, Superscript, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, Unlink, UserRound, Users, X } from "lucide";
|
|
14
14
|
import { componentRegistry } from "@nextwebwg/html-next/runtime";
|
|
15
|
-
import { IndexedList, NONCONFORMING, READY_INPUT, UNRESOLVED_INPUT, acceptProps, activateModule, armElement, attachGeneratedController, awaitInput, buildTemplate, checkBoolean, checkConstrained, checkFormat, checkInteger, checkNumber, checkObject, checkSelected, checkString, clearRegion, computedCycle, defineComponent, detailCheck, dispatchDeclared, dispose, evaluateInput, fillSlot, formatOf, generatedInputs, hostState, inputRead, keywordFormat, manageProps, notifyPropertySet, project, readIndex, readMember, readonlyView, readsChanged, rec, recordValue, replaceRoot, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, writeUrlAttribute } from "@nextwebwg/html-next/generated-runtime";
|
|
15
|
+
import { IndexedList, NONCONFORMING, READY_INPUT, UNRESOLVED_INPUT, acceptProps, activateModule, armElement, attachGeneratedController, awaitInput, buildTemplate, checkBoolean, checkConstrained, checkFormat, checkInteger, checkList, checkNumber, checkObject, checkSelected, checkString, clearRegion, computedCycle, defineComponent, detailCheck, dispatchDeclared, dispose, evaluateInput, fillSlot, formatOf, generatedInputs, hostState, inputRead, keywordFormat, manageProps, notifyPropertySet, project, readIndex, readMember, readonlyView, readsChanged, rec, recordValue, replaceRoot, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, writeUrlAttribute } from "@nextwebwg/html-next/generated-runtime";
|
|
16
16
|
//#region \0rolldown/runtime.js
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -45,10 +45,12 @@ var LOOMA_ICONS = {
|
|
|
45
45
|
"unlink": Unlink,
|
|
46
46
|
braces: Braces,
|
|
47
47
|
calculator: Calculator,
|
|
48
|
+
calendar: CalendarDays,
|
|
48
49
|
check: Check,
|
|
49
50
|
"circle-check": CircleCheck,
|
|
50
51
|
"circle-dot": CircleDot,
|
|
51
52
|
"circle-x": CircleX,
|
|
53
|
+
clock: Clock,
|
|
52
54
|
"chevron-down": ChevronDown,
|
|
53
55
|
"chevron-left": ChevronLeft,
|
|
54
56
|
"chevron-right": ChevronRight,
|
|
@@ -2566,6 +2568,7 @@ var A$3 = [
|
|
|
2566
2568
|
"data-ui-button-prop-pending",
|
|
2567
2569
|
"data-ui-button-prop-preset",
|
|
2568
2570
|
"data-ui-button-prop-rel",
|
|
2571
|
+
"data-ui-button-prop-selected",
|
|
2569
2572
|
"data-ui-button-prop-shape",
|
|
2570
2573
|
"data-ui-button-prop-size",
|
|
2571
2574
|
"data-ui-button-prop-square",
|
|
@@ -2576,6 +2579,7 @@ var A$3 = [
|
|
|
2576
2579
|
"data-ui-button-prop-variant",
|
|
2577
2580
|
"data-appearance",
|
|
2578
2581
|
"data-tone",
|
|
2582
|
+
"data-selected",
|
|
2579
2583
|
"href",
|
|
2580
2584
|
"target",
|
|
2581
2585
|
"rel",
|
|
@@ -2599,6 +2603,7 @@ var A$3 = [
|
|
|
2599
2603
|
"data-ui-button-prop-pending",
|
|
2600
2604
|
"data-ui-button-prop-preset",
|
|
2601
2605
|
"data-ui-button-prop-rel",
|
|
2606
|
+
"data-ui-button-prop-selected",
|
|
2602
2607
|
"data-ui-button-prop-shape",
|
|
2603
2608
|
"data-ui-button-prop-size",
|
|
2604
2609
|
"data-ui-button-prop-square",
|
|
@@ -2609,6 +2614,7 @@ var A$3 = [
|
|
|
2609
2614
|
"data-ui-button-prop-variant",
|
|
2610
2615
|
"data-appearance",
|
|
2611
2616
|
"data-tone",
|
|
2617
|
+
"data-selected",
|
|
2612
2618
|
"type",
|
|
2613
2619
|
"disabled",
|
|
2614
2620
|
"aria-disabled",
|
|
@@ -2630,6 +2636,7 @@ var A$3 = [
|
|
|
2630
2636
|
"data-ui-button-prop-pending",
|
|
2631
2637
|
"data-ui-button-prop-preset",
|
|
2632
2638
|
"data-ui-button-prop-rel",
|
|
2639
|
+
"data-ui-button-prop-selected",
|
|
2633
2640
|
"data-ui-button-prop-shape",
|
|
2634
2641
|
"data-ui-button-prop-size",
|
|
2635
2642
|
"data-ui-button-prop-square",
|
|
@@ -2640,6 +2647,7 @@ var A$3 = [
|
|
|
2640
2647
|
"data-ui-button-prop-variant",
|
|
2641
2648
|
"data-appearance",
|
|
2642
2649
|
"data-tone",
|
|
2650
|
+
"data-selected",
|
|
2643
2651
|
"href",
|
|
2644
2652
|
"target",
|
|
2645
2653
|
"rel",
|
|
@@ -2663,6 +2671,7 @@ var A$3 = [
|
|
|
2663
2671
|
"data-ui-button-prop-pending",
|
|
2664
2672
|
"data-ui-button-prop-preset",
|
|
2665
2673
|
"data-ui-button-prop-rel",
|
|
2674
|
+
"data-ui-button-prop-selected",
|
|
2666
2675
|
"data-ui-button-prop-shape",
|
|
2667
2676
|
"data-ui-button-prop-size",
|
|
2668
2677
|
"data-ui-button-prop-square",
|
|
@@ -2673,6 +2682,7 @@ var A$3 = [
|
|
|
2673
2682
|
"data-ui-button-prop-variant",
|
|
2674
2683
|
"data-appearance",
|
|
2675
2684
|
"data-tone",
|
|
2685
|
+
"data-selected",
|
|
2676
2686
|
"type",
|
|
2677
2687
|
"disabled",
|
|
2678
2688
|
"aria-disabled",
|
|
@@ -2751,6 +2761,14 @@ var D$18 = {
|
|
|
2751
2761
|
j: 0,
|
|
2752
2762
|
m: "s"
|
|
2753
2763
|
},
|
|
2764
|
+
"selected": {
|
|
2765
|
+
"required": false,
|
|
2766
|
+
"default": false,
|
|
2767
|
+
c: checkBoolean,
|
|
2768
|
+
t: "boolean",
|
|
2769
|
+
j: 0,
|
|
2770
|
+
m: "b"
|
|
2771
|
+
},
|
|
2754
2772
|
"shape": {
|
|
2755
2773
|
"required": false,
|
|
2756
2774
|
"values": ["rounded", "pill"],
|
|
@@ -2867,6 +2885,7 @@ function createUiButton(options = {}, html) {
|
|
|
2867
2885
|
null,
|
|
2868
2886
|
null,
|
|
2869
2887
|
null,
|
|
2888
|
+
null,
|
|
2870
2889
|
null
|
|
2871
2890
|
];
|
|
2872
2891
|
let B = acceptProps(void 0, D$18, S$18.n, v, componentProps, [], html);
|
|
@@ -2883,14 +2902,15 @@ function createUiButton(options = {}, html) {
|
|
|
2883
2902
|
if (j === 6) return awaitInput(B, "pending", true);
|
|
2884
2903
|
if (j === 7) return awaitInput(B, "preset", true);
|
|
2885
2904
|
if (j === 8) return awaitInput(B, "rel", true);
|
|
2886
|
-
if (j === 9) return awaitInput(B, "
|
|
2887
|
-
if (j === 10) return awaitInput(B, "
|
|
2888
|
-
if (j === 11) return awaitInput(B, "
|
|
2889
|
-
if (j === 12) return awaitInput(B, "
|
|
2890
|
-
if (j === 13) return awaitInput(B, "
|
|
2891
|
-
if (j === 14) return awaitInput(B, "
|
|
2892
|
-
if (j === 15) return awaitInput(B, "
|
|
2893
|
-
if (j === 16) return awaitInput(B, "
|
|
2905
|
+
if (j === 9) return awaitInput(B, "selected", true);
|
|
2906
|
+
if (j === 10) return awaitInput(B, "shape", true);
|
|
2907
|
+
if (j === 11) return awaitInput(B, "size", true);
|
|
2908
|
+
if (j === 12) return awaitInput(B, "square", true);
|
|
2909
|
+
if (j === 13) return awaitInput(B, "stretch", true);
|
|
2910
|
+
if (j === 14) return awaitInput(B, "target", true);
|
|
2911
|
+
if (j === 15) return awaitInput(B, "tone", true);
|
|
2912
|
+
if (j === 16) return awaitInput(B, "type", true);
|
|
2913
|
+
if (j === 17) return awaitInput(B, "variant", true);
|
|
2894
2914
|
return v[j] === void 0 ? UNRESOLVED_INPUT : READY_INPUT;
|
|
2895
2915
|
};
|
|
2896
2916
|
const X = {
|
|
@@ -2902,7 +2922,7 @@ function createUiButton(options = {}, html) {
|
|
|
2902
2922
|
};
|
|
2903
2923
|
const ke = [];
|
|
2904
2924
|
const K = [() => readIndex({
|
|
2905
|
-
"none": inputRead(v[
|
|
2925
|
+
"none": inputRead(v[17], inputStatus(17)),
|
|
2906
2926
|
"primary": "solid",
|
|
2907
2927
|
"standard": "solid",
|
|
2908
2928
|
"quiet": "ghost",
|
|
@@ -2916,8 +2936,8 @@ function createUiButton(options = {}, html) {
|
|
|
2916
2936
|
], [
|
|
2917
2937
|
readIndex({
|
|
2918
2938
|
"true": "danger",
|
|
2919
|
-
"false": inputRead(v[
|
|
2920
|
-
}, textCall("concat", [inputRead(v[
|
|
2939
|
+
"false": inputRead(v[15], inputStatus(15))
|
|
2940
|
+
}, textCall("concat", [inputRead(v[17], inputStatus(17)) === "danger"])),
|
|
2921
2941
|
"accent",
|
|
2922
2942
|
"neutral",
|
|
2923
2943
|
"neutral",
|
|
@@ -3093,6 +3113,7 @@ function createUiButton(options = {}, html) {
|
|
|
3093
3113
|
v6: void 0,
|
|
3094
3114
|
v7: void 0,
|
|
3095
3115
|
v8: void 0,
|
|
3116
|
+
v9: void 0,
|
|
3096
3117
|
a1: t1,
|
|
3097
3118
|
e0: t1.nextSibling,
|
|
3098
3119
|
b0: void 0,
|
|
@@ -3113,65 +3134,70 @@ function createUiButton(options = {}, html) {
|
|
|
3113
3134
|
return r;
|
|
3114
3135
|
};
|
|
3115
3136
|
const p0 = (r, c, d) => {
|
|
3116
|
-
if (c &
|
|
3137
|
+
if (c & 1073873024) {
|
|
3117
3138
|
const x0 = g(0);
|
|
3118
3139
|
const s0 = toAttribute(x0, "data-appearance");
|
|
3119
3140
|
if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
|
|
3120
3141
|
}
|
|
3121
|
-
if (c &
|
|
3142
|
+
if (c & 1073905792) {
|
|
3122
3143
|
const x1 = g(1);
|
|
3123
3144
|
if (x1 !== NONCONFORMING) {
|
|
3124
3145
|
const s1 = toAttribute(x1, "data-tone");
|
|
3125
3146
|
if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
|
|
3126
3147
|
}
|
|
3127
3148
|
}
|
|
3149
|
+
if (c & 512) {
|
|
3150
|
+
const x2 = v[9];
|
|
3151
|
+
const s2 = toAttribute(x2, "data-selected");
|
|
3152
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-selected", r.v2 = s2);
|
|
3153
|
+
}
|
|
3128
3154
|
if (c & 1073741944) {
|
|
3129
|
-
const
|
|
3155
|
+
const x3 = readIndex({
|
|
3130
3156
|
"true": null,
|
|
3131
3157
|
"false": v[4]
|
|
3132
3158
|
}, textCall("concat", [truthy(v[3]) || truthy(v[5]) || truthy(v[6])]));
|
|
3133
|
-
if (
|
|
3134
|
-
const
|
|
3135
|
-
if (
|
|
3159
|
+
if (x3 !== NONCONFORMING) {
|
|
3160
|
+
const s3 = toAttribute(x3, "href");
|
|
3161
|
+
if (s3 !== r.v3) writeUrlAttribute(r.n, "href", r.v3 = s3);
|
|
3136
3162
|
}
|
|
3137
3163
|
}
|
|
3138
|
-
if (c &
|
|
3139
|
-
const
|
|
3140
|
-
const
|
|
3141
|
-
if (
|
|
3164
|
+
if (c & 16384) {
|
|
3165
|
+
const x4 = v[14];
|
|
3166
|
+
const s4 = toAttribute(x4, "target");
|
|
3167
|
+
if (s4 !== r.v4) writeAttribute(r.n, "target", r.v4 = s4);
|
|
3142
3168
|
}
|
|
3143
3169
|
if (c & 256) {
|
|
3144
|
-
const
|
|
3145
|
-
const
|
|
3146
|
-
if (
|
|
3170
|
+
const x5 = v[8];
|
|
3171
|
+
const s5 = toAttribute(x5, "rel");
|
|
3172
|
+
if (s5 !== r.v5) writeAttribute(r.n, "rel", r.v5 = s5);
|
|
3147
3173
|
}
|
|
3148
3174
|
if (c & 1073741928) {
|
|
3149
|
-
const
|
|
3175
|
+
const x6 = readIndex({
|
|
3150
3176
|
"true": "true",
|
|
3151
3177
|
"false": null
|
|
3152
3178
|
}, textCall("concat", [truthy(v[3]) || truthy(v[5]) || truthy(v[6])]));
|
|
3153
|
-
if (
|
|
3154
|
-
const
|
|
3155
|
-
if (
|
|
3179
|
+
if (x6 !== NONCONFORMING) {
|
|
3180
|
+
const s6 = toAttribute(x6, "aria-disabled");
|
|
3181
|
+
if (s6 !== r.v6) writeAttribute(r.n, "aria-disabled", r.v6 = s6);
|
|
3156
3182
|
}
|
|
3157
3183
|
}
|
|
3158
3184
|
if (c & 96) {
|
|
3159
|
-
const
|
|
3160
|
-
const
|
|
3161
|
-
if (
|
|
3185
|
+
const x7 = truthy(v[5]) || truthy(v[6]);
|
|
3186
|
+
const s7 = toAttribute(x7, "aria-busy");
|
|
3187
|
+
if (s7 !== r.v7) writeAttribute(r.n, "aria-busy", r.v7 = s7);
|
|
3162
3188
|
}
|
|
3163
3189
|
if (c & 1073741928) {
|
|
3164
|
-
const
|
|
3190
|
+
const x8 = readIndex({
|
|
3165
3191
|
"true": "0",
|
|
3166
3192
|
"false": null
|
|
3167
3193
|
}, textCall("concat", [(truthy(v[5]) || truthy(v[6])) && !truthy(v[3])]));
|
|
3168
|
-
if (
|
|
3169
|
-
const
|
|
3170
|
-
if (
|
|
3194
|
+
if (x8 !== NONCONFORMING) {
|
|
3195
|
+
const s8 = toAttribute(x8, "tabindex");
|
|
3196
|
+
if (s8 !== r.v8) writeAttribute(r.n, "tabindex", r.v8 = s8);
|
|
3171
3197
|
}
|
|
3172
3198
|
}
|
|
3173
|
-
if (c &
|
|
3174
|
-
const
|
|
3199
|
+
if (c & 15460) {
|
|
3200
|
+
const s9 = hostState([
|
|
3175
3201
|
"align",
|
|
3176
3202
|
"stretch",
|
|
3177
3203
|
"size",
|
|
@@ -3181,14 +3207,14 @@ function createUiButton(options = {}, html) {
|
|
|
3181
3207
|
"pending"
|
|
3182
3208
|
], [
|
|
3183
3209
|
v[2],
|
|
3184
|
-
v[
|
|
3185
|
-
v[10],
|
|
3186
|
-
v[9],
|
|
3210
|
+
v[13],
|
|
3187
3211
|
v[11],
|
|
3212
|
+
v[10],
|
|
3213
|
+
v[12],
|
|
3188
3214
|
v[5],
|
|
3189
3215
|
v[6]
|
|
3190
3216
|
]);
|
|
3191
|
-
if (
|
|
3217
|
+
if (s9 !== r.v9) writeAttribute(r.n, "data-ui-button-state", (r.v9 = s9) === "" ? null : s9);
|
|
3192
3218
|
}
|
|
3193
3219
|
if (c & 96 && !(truthy(v[5]) || truthy(v[6])) !== !r.b0) {
|
|
3194
3220
|
if (r.b0) {
|
|
@@ -3251,6 +3277,7 @@ function createUiButton(options = {}, html) {
|
|
|
3251
3277
|
v4: void 0,
|
|
3252
3278
|
v5: void 0,
|
|
3253
3279
|
v6: void 0,
|
|
3280
|
+
v7: void 0,
|
|
3254
3281
|
a1: t1,
|
|
3255
3282
|
e0: t1.nextSibling,
|
|
3256
3283
|
b0: void 0,
|
|
@@ -3271,45 +3298,50 @@ function createUiButton(options = {}, html) {
|
|
|
3271
3298
|
return r;
|
|
3272
3299
|
};
|
|
3273
3300
|
const p6 = (r, c, d) => {
|
|
3274
|
-
if (c &
|
|
3301
|
+
if (c & 1073873024) {
|
|
3275
3302
|
const x0 = g(0);
|
|
3276
3303
|
const s0 = toAttribute(x0, "data-appearance");
|
|
3277
3304
|
if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
|
|
3278
3305
|
}
|
|
3279
|
-
if (c &
|
|
3306
|
+
if (c & 1073905792) {
|
|
3280
3307
|
const x1 = g(1);
|
|
3281
3308
|
if (x1 !== NONCONFORMING) {
|
|
3282
3309
|
const s1 = toAttribute(x1, "data-tone");
|
|
3283
3310
|
if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
|
|
3284
3311
|
}
|
|
3285
3312
|
}
|
|
3286
|
-
if (c &
|
|
3287
|
-
const x2 = v[
|
|
3288
|
-
const s2 = toAttribute(x2, "
|
|
3289
|
-
if (s2 !== r.v2) writeAttribute(r.n, "
|
|
3313
|
+
if (c & 512) {
|
|
3314
|
+
const x2 = v[9];
|
|
3315
|
+
const s2 = toAttribute(x2, "data-selected");
|
|
3316
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-selected", r.v2 = s2);
|
|
3317
|
+
}
|
|
3318
|
+
if (c & 1073807360) {
|
|
3319
|
+
const x3 = v[16];
|
|
3320
|
+
const s3 = toAttribute(x3, "type");
|
|
3321
|
+
if (s3 !== r.v3) writeAttribute(r.n, "type", r.v3 = s3);
|
|
3290
3322
|
}
|
|
3291
3323
|
if (c & 8) {
|
|
3292
|
-
const
|
|
3293
|
-
const
|
|
3294
|
-
if (
|
|
3324
|
+
const x4 = v[3];
|
|
3325
|
+
const s4 = toAttribute(x4, "disabled");
|
|
3326
|
+
if (s4 !== r.v4) writeAttribute(r.n, "disabled", r.v4 = s4);
|
|
3295
3327
|
}
|
|
3296
3328
|
if (c & 1073741920) {
|
|
3297
|
-
const
|
|
3329
|
+
const x5 = readIndex({
|
|
3298
3330
|
"true": "true",
|
|
3299
3331
|
"false": null
|
|
3300
3332
|
}, textCall("concat", [truthy(v[5]) || truthy(v[6])]));
|
|
3301
|
-
if (
|
|
3302
|
-
const
|
|
3303
|
-
if (
|
|
3333
|
+
if (x5 !== NONCONFORMING) {
|
|
3334
|
+
const s5 = toAttribute(x5, "aria-disabled");
|
|
3335
|
+
if (s5 !== r.v5) writeAttribute(r.n, "aria-disabled", r.v5 = s5);
|
|
3304
3336
|
}
|
|
3305
3337
|
}
|
|
3306
3338
|
if (c & 96) {
|
|
3307
|
-
const
|
|
3308
|
-
const
|
|
3309
|
-
if (
|
|
3339
|
+
const x6 = truthy(v[5]) || truthy(v[6]);
|
|
3340
|
+
const s6 = toAttribute(x6, "aria-busy");
|
|
3341
|
+
if (s6 !== r.v6) writeAttribute(r.n, "aria-busy", r.v6 = s6);
|
|
3310
3342
|
}
|
|
3311
|
-
if (c &
|
|
3312
|
-
const
|
|
3343
|
+
if (c & 15460) {
|
|
3344
|
+
const s7 = hostState([
|
|
3313
3345
|
"align",
|
|
3314
3346
|
"stretch",
|
|
3315
3347
|
"size",
|
|
@@ -3319,14 +3351,14 @@ function createUiButton(options = {}, html) {
|
|
|
3319
3351
|
"pending"
|
|
3320
3352
|
], [
|
|
3321
3353
|
v[2],
|
|
3322
|
-
v[
|
|
3323
|
-
v[10],
|
|
3324
|
-
v[9],
|
|
3354
|
+
v[13],
|
|
3325
3355
|
v[11],
|
|
3356
|
+
v[10],
|
|
3357
|
+
v[12],
|
|
3326
3358
|
v[5],
|
|
3327
3359
|
v[6]
|
|
3328
3360
|
]);
|
|
3329
|
-
if (
|
|
3361
|
+
if (s7 !== r.v7) writeAttribute(r.n, "data-ui-button-state", (r.v7 = s7) === "" ? null : s7);
|
|
3330
3362
|
}
|
|
3331
3363
|
if (c & 96 && !(truthy(v[5]) || truthy(v[6])) !== !r.b0) {
|
|
3332
3364
|
if (r.b0) {
|
|
@@ -3389,6 +3421,7 @@ function createUiButton(options = {}, html) {
|
|
|
3389
3421
|
v6: void 0,
|
|
3390
3422
|
v7: void 0,
|
|
3391
3423
|
v8: void 0,
|
|
3424
|
+
v9: void 0,
|
|
3392
3425
|
a1: t0,
|
|
3393
3426
|
e0: t0.nextSibling,
|
|
3394
3427
|
b0: void 0,
|
|
@@ -3405,65 +3438,70 @@ function createUiButton(options = {}, html) {
|
|
|
3405
3438
|
return r;
|
|
3406
3439
|
};
|
|
3407
3440
|
const p12 = (r, c, d) => {
|
|
3408
|
-
if (c &
|
|
3441
|
+
if (c & 1073873024) {
|
|
3409
3442
|
const x0 = g(0);
|
|
3410
3443
|
const s0 = toAttribute(x0, "data-appearance");
|
|
3411
3444
|
if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
|
|
3412
3445
|
}
|
|
3413
|
-
if (c &
|
|
3446
|
+
if (c & 1073905792) {
|
|
3414
3447
|
const x1 = g(1);
|
|
3415
3448
|
if (x1 !== NONCONFORMING) {
|
|
3416
3449
|
const s1 = toAttribute(x1, "data-tone");
|
|
3417
3450
|
if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
|
|
3418
3451
|
}
|
|
3419
3452
|
}
|
|
3453
|
+
if (c & 512) {
|
|
3454
|
+
const x2 = v[9];
|
|
3455
|
+
const s2 = toAttribute(x2, "data-selected");
|
|
3456
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-selected", r.v2 = s2);
|
|
3457
|
+
}
|
|
3420
3458
|
if (c & 1073741944) {
|
|
3421
|
-
const
|
|
3459
|
+
const x3 = readIndex({
|
|
3422
3460
|
"true": null,
|
|
3423
3461
|
"false": v[4]
|
|
3424
3462
|
}, textCall("concat", [truthy(v[3]) || truthy(v[5]) || truthy(v[6])]));
|
|
3425
|
-
if (
|
|
3426
|
-
const
|
|
3427
|
-
if (
|
|
3463
|
+
if (x3 !== NONCONFORMING) {
|
|
3464
|
+
const s3 = toAttribute(x3, "href");
|
|
3465
|
+
if (s3 !== r.v3) writeUrlAttribute(r.n, "href", r.v3 = s3);
|
|
3428
3466
|
}
|
|
3429
3467
|
}
|
|
3430
|
-
if (c &
|
|
3431
|
-
const
|
|
3432
|
-
const
|
|
3433
|
-
if (
|
|
3468
|
+
if (c & 16384) {
|
|
3469
|
+
const x4 = v[14];
|
|
3470
|
+
const s4 = toAttribute(x4, "target");
|
|
3471
|
+
if (s4 !== r.v4) writeAttribute(r.n, "target", r.v4 = s4);
|
|
3434
3472
|
}
|
|
3435
3473
|
if (c & 256) {
|
|
3436
|
-
const
|
|
3437
|
-
const
|
|
3438
|
-
if (
|
|
3474
|
+
const x5 = v[8];
|
|
3475
|
+
const s5 = toAttribute(x5, "rel");
|
|
3476
|
+
if (s5 !== r.v5) writeAttribute(r.n, "rel", r.v5 = s5);
|
|
3439
3477
|
}
|
|
3440
3478
|
if (c & 1073741928) {
|
|
3441
|
-
const
|
|
3479
|
+
const x6 = readIndex({
|
|
3442
3480
|
"true": "true",
|
|
3443
3481
|
"false": null
|
|
3444
3482
|
}, textCall("concat", [truthy(v[3]) || truthy(v[5]) || truthy(v[6])]));
|
|
3445
|
-
if (
|
|
3446
|
-
const
|
|
3447
|
-
if (
|
|
3483
|
+
if (x6 !== NONCONFORMING) {
|
|
3484
|
+
const s6 = toAttribute(x6, "aria-disabled");
|
|
3485
|
+
if (s6 !== r.v6) writeAttribute(r.n, "aria-disabled", r.v6 = s6);
|
|
3448
3486
|
}
|
|
3449
3487
|
}
|
|
3450
3488
|
if (c & 96) {
|
|
3451
|
-
const
|
|
3452
|
-
const
|
|
3453
|
-
if (
|
|
3489
|
+
const x7 = truthy(v[5]) || truthy(v[6]);
|
|
3490
|
+
const s7 = toAttribute(x7, "aria-busy");
|
|
3491
|
+
if (s7 !== r.v7) writeAttribute(r.n, "aria-busy", r.v7 = s7);
|
|
3454
3492
|
}
|
|
3455
3493
|
if (c & 1073741928) {
|
|
3456
|
-
const
|
|
3494
|
+
const x8 = readIndex({
|
|
3457
3495
|
"true": "0",
|
|
3458
3496
|
"false": null
|
|
3459
3497
|
}, textCall("concat", [(truthy(v[5]) || truthy(v[6])) && !truthy(v[3])]));
|
|
3460
|
-
if (
|
|
3461
|
-
const
|
|
3462
|
-
if (
|
|
3498
|
+
if (x8 !== NONCONFORMING) {
|
|
3499
|
+
const s8 = toAttribute(x8, "tabindex");
|
|
3500
|
+
if (s8 !== r.v8) writeAttribute(r.n, "tabindex", r.v8 = s8);
|
|
3463
3501
|
}
|
|
3464
3502
|
}
|
|
3465
|
-
if (c &
|
|
3466
|
-
const
|
|
3503
|
+
if (c & 15460) {
|
|
3504
|
+
const s9 = hostState([
|
|
3467
3505
|
"align",
|
|
3468
3506
|
"stretch",
|
|
3469
3507
|
"size",
|
|
@@ -3473,14 +3511,14 @@ function createUiButton(options = {}, html) {
|
|
|
3473
3511
|
"pending"
|
|
3474
3512
|
], [
|
|
3475
3513
|
v[2],
|
|
3476
|
-
v[
|
|
3477
|
-
v[10],
|
|
3478
|
-
v[9],
|
|
3514
|
+
v[13],
|
|
3479
3515
|
v[11],
|
|
3516
|
+
v[10],
|
|
3517
|
+
v[12],
|
|
3480
3518
|
v[5],
|
|
3481
3519
|
v[6]
|
|
3482
3520
|
]);
|
|
3483
|
-
if (
|
|
3521
|
+
if (s9 !== r.v9) writeAttribute(r.n, "data-ui-button-state", (r.v9 = s9) === "" ? null : s9);
|
|
3484
3522
|
}
|
|
3485
3523
|
if (c & 96 && !(truthy(v[5]) || truthy(v[6])) !== !r.b0) {
|
|
3486
3524
|
if (r.b0) {
|
|
@@ -3531,6 +3569,7 @@ function createUiButton(options = {}, html) {
|
|
|
3531
3569
|
v4: void 0,
|
|
3532
3570
|
v5: void 0,
|
|
3533
3571
|
v6: void 0,
|
|
3572
|
+
v7: void 0,
|
|
3534
3573
|
a1: t0,
|
|
3535
3574
|
e0: t0.nextSibling,
|
|
3536
3575
|
b0: void 0,
|
|
@@ -3547,45 +3586,50 @@ function createUiButton(options = {}, html) {
|
|
|
3547
3586
|
return r;
|
|
3548
3587
|
};
|
|
3549
3588
|
const p16 = (r, c, d) => {
|
|
3550
|
-
if (c &
|
|
3589
|
+
if (c & 1073873024) {
|
|
3551
3590
|
const x0 = g(0);
|
|
3552
3591
|
const s0 = toAttribute(x0, "data-appearance");
|
|
3553
3592
|
if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
|
|
3554
3593
|
}
|
|
3555
|
-
if (c &
|
|
3594
|
+
if (c & 1073905792) {
|
|
3556
3595
|
const x1 = g(1);
|
|
3557
3596
|
if (x1 !== NONCONFORMING) {
|
|
3558
3597
|
const s1 = toAttribute(x1, "data-tone");
|
|
3559
3598
|
if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
|
|
3560
3599
|
}
|
|
3561
3600
|
}
|
|
3562
|
-
if (c &
|
|
3563
|
-
const x2 = v[
|
|
3564
|
-
const s2 = toAttribute(x2, "
|
|
3565
|
-
if (s2 !== r.v2) writeAttribute(r.n, "
|
|
3601
|
+
if (c & 512) {
|
|
3602
|
+
const x2 = v[9];
|
|
3603
|
+
const s2 = toAttribute(x2, "data-selected");
|
|
3604
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-selected", r.v2 = s2);
|
|
3605
|
+
}
|
|
3606
|
+
if (c & 1073807360) {
|
|
3607
|
+
const x3 = v[16];
|
|
3608
|
+
const s3 = toAttribute(x3, "type");
|
|
3609
|
+
if (s3 !== r.v3) writeAttribute(r.n, "type", r.v3 = s3);
|
|
3566
3610
|
}
|
|
3567
3611
|
if (c & 8) {
|
|
3568
|
-
const
|
|
3569
|
-
const
|
|
3570
|
-
if (
|
|
3612
|
+
const x4 = v[3];
|
|
3613
|
+
const s4 = toAttribute(x4, "disabled");
|
|
3614
|
+
if (s4 !== r.v4) writeAttribute(r.n, "disabled", r.v4 = s4);
|
|
3571
3615
|
}
|
|
3572
3616
|
if (c & 1073741920) {
|
|
3573
|
-
const
|
|
3617
|
+
const x5 = readIndex({
|
|
3574
3618
|
"true": "true",
|
|
3575
3619
|
"false": null
|
|
3576
3620
|
}, textCall("concat", [truthy(v[5]) || truthy(v[6])]));
|
|
3577
|
-
if (
|
|
3578
|
-
const
|
|
3579
|
-
if (
|
|
3621
|
+
if (x5 !== NONCONFORMING) {
|
|
3622
|
+
const s5 = toAttribute(x5, "aria-disabled");
|
|
3623
|
+
if (s5 !== r.v5) writeAttribute(r.n, "aria-disabled", r.v5 = s5);
|
|
3580
3624
|
}
|
|
3581
3625
|
}
|
|
3582
3626
|
if (c & 96) {
|
|
3583
|
-
const
|
|
3584
|
-
const
|
|
3585
|
-
if (
|
|
3627
|
+
const x6 = truthy(v[5]) || truthy(v[6]);
|
|
3628
|
+
const s6 = toAttribute(x6, "aria-busy");
|
|
3629
|
+
if (s6 !== r.v6) writeAttribute(r.n, "aria-busy", r.v6 = s6);
|
|
3586
3630
|
}
|
|
3587
|
-
if (c &
|
|
3588
|
-
const
|
|
3631
|
+
if (c & 15460) {
|
|
3632
|
+
const s7 = hostState([
|
|
3589
3633
|
"align",
|
|
3590
3634
|
"stretch",
|
|
3591
3635
|
"size",
|
|
@@ -3595,14 +3639,14 @@ function createUiButton(options = {}, html) {
|
|
|
3595
3639
|
"pending"
|
|
3596
3640
|
], [
|
|
3597
3641
|
v[2],
|
|
3598
|
-
v[
|
|
3599
|
-
v[10],
|
|
3600
|
-
v[9],
|
|
3642
|
+
v[13],
|
|
3601
3643
|
v[11],
|
|
3644
|
+
v[10],
|
|
3645
|
+
v[12],
|
|
3602
3646
|
v[5],
|
|
3603
3647
|
v[6]
|
|
3604
3648
|
]);
|
|
3605
|
-
if (
|
|
3649
|
+
if (s7 !== r.v7) writeAttribute(r.n, "data-ui-button-state", (r.v7 = s7) === "" ? null : s7);
|
|
3606
3650
|
}
|
|
3607
3651
|
if (c & 96 && !(truthy(v[5]) || truthy(v[6])) !== !r.b0) {
|
|
3608
3652
|
if (r.b0) {
|
|
@@ -3656,7 +3700,7 @@ function createUiButton(options = {}, html) {
|
|
|
3656
3700
|
R = M[a](element, d);
|
|
3657
3701
|
return;
|
|
3658
3702
|
}
|
|
3659
|
-
if (c &
|
|
3703
|
+
if (c & 1073873040) {
|
|
3660
3704
|
const t = g(0) === "card" && v[4] !== null ? 0 : g(0) === "card" ? 1 : v[4] !== null ? 2 : 3;
|
|
3661
3705
|
if (t !== a) {
|
|
3662
3706
|
dispose(R);
|
|
@@ -3686,6 +3730,7 @@ defineComponent("ui-button", createUiButton, [
|
|
|
3686
3730
|
"pending",
|
|
3687
3731
|
"preset",
|
|
3688
3732
|
"rel",
|
|
3733
|
+
"selected",
|
|
3689
3734
|
"shape",
|
|
3690
3735
|
"size",
|
|
3691
3736
|
"square",
|
|
@@ -4744,6 +4789,7 @@ var D$16 = {
|
|
|
4744
4789
|
"required": false,
|
|
4745
4790
|
"values": [
|
|
4746
4791
|
"none",
|
|
4792
|
+
"xs",
|
|
4747
4793
|
"s",
|
|
4748
4794
|
"m",
|
|
4749
4795
|
"l"
|
|
@@ -4970,7 +5016,7 @@ function connect$9(host) {
|
|
|
4970
5016
|
};
|
|
4971
5017
|
const wire = () => {
|
|
4972
5018
|
const label = element.querySelector("[slot=\"label\"], label");
|
|
4973
|
-
const selector = "[data-ui-field-control], input:not([type=hidden]), textarea, select";
|
|
5019
|
+
const selector = "[data-ui-field-control]:not([hidden]), input:not([type=hidden]):not([hidden]), textarea:not([hidden]), select:not([hidden])";
|
|
4974
5020
|
const target = label?.getAttribute("for") ? element.ownerDocument.getElementById(label.getAttribute("for")) : null;
|
|
4975
5021
|
const input = (target && element.contains(target) ? target.matches(selector) ? target : target.querySelector(selector) : null) ?? element.querySelector(selector);
|
|
4976
5022
|
const helpRegion = element.querySelector(":scope > .help");
|
|
@@ -5022,7 +5068,8 @@ function connect$9(host) {
|
|
|
5022
5068
|
"aria-describedby",
|
|
5023
5069
|
"slot",
|
|
5024
5070
|
"id",
|
|
5025
|
-
"role"
|
|
5071
|
+
"role",
|
|
5072
|
+
"hidden"
|
|
5026
5073
|
]
|
|
5027
5074
|
});
|
|
5028
5075
|
const stop = host.effect(() => {
|
|
@@ -5323,6 +5370,14 @@ var S$14 = {
|
|
|
5323
5370
|
var D$14 = {
|
|
5324
5371
|
g: "ui-icon",
|
|
5325
5372
|
props: {
|
|
5373
|
+
"directional": {
|
|
5374
|
+
"required": false,
|
|
5375
|
+
"default": false,
|
|
5376
|
+
c: checkBoolean,
|
|
5377
|
+
t: "boolean",
|
|
5378
|
+
j: 0,
|
|
5379
|
+
m: "b"
|
|
5380
|
+
},
|
|
5326
5381
|
"name": {
|
|
5327
5382
|
"required": false,
|
|
5328
5383
|
"default": "",
|
|
@@ -5359,6 +5414,7 @@ function createUiIcon(options = {}, html) {
|
|
|
5359
5414
|
const v = [
|
|
5360
5415
|
void 0,
|
|
5361
5416
|
null,
|
|
5417
|
+
null,
|
|
5362
5418
|
null
|
|
5363
5419
|
];
|
|
5364
5420
|
const B = acceptProps(element, D$14, S$14.n, v, componentProps, [], html);
|
|
@@ -5368,8 +5424,9 @@ function createUiIcon(options = {}, html) {
|
|
|
5368
5424
|
g(j);
|
|
5369
5425
|
return CS[j] ?? UNRESOLVED_INPUT;
|
|
5370
5426
|
}
|
|
5371
|
-
if (j === 1) return awaitInput(B, "
|
|
5372
|
-
if (j === 2) return awaitInput(B, "
|
|
5427
|
+
if (j === 1) return awaitInput(B, "directional", true);
|
|
5428
|
+
if (j === 2) return awaitInput(B, "name", true);
|
|
5429
|
+
if (j === 3) return awaitInput(B, "tone", true);
|
|
5373
5430
|
return v[j] === void 0 ? UNRESOLVED_INPUT : READY_INPUT;
|
|
5374
5431
|
};
|
|
5375
5432
|
const X = {
|
|
@@ -5516,6 +5573,52 @@ function createUiIcon(options = {}, html) {
|
|
|
5516
5573
|
"d": "M8 18h.01"
|
|
5517
5574
|
}
|
|
5518
5575
|
],
|
|
5576
|
+
"calendar": [
|
|
5577
|
+
{
|
|
5578
|
+
"tag": "path",
|
|
5579
|
+
"d": "M8 2v4"
|
|
5580
|
+
},
|
|
5581
|
+
{
|
|
5582
|
+
"tag": "path",
|
|
5583
|
+
"d": "M16 2v4"
|
|
5584
|
+
},
|
|
5585
|
+
{
|
|
5586
|
+
"tag": "rect",
|
|
5587
|
+
"width": "18",
|
|
5588
|
+
"height": "18",
|
|
5589
|
+
"x": "3",
|
|
5590
|
+
"y": "4",
|
|
5591
|
+
"rx": "2"
|
|
5592
|
+
},
|
|
5593
|
+
{
|
|
5594
|
+
"tag": "path",
|
|
5595
|
+
"d": "M3 10h18"
|
|
5596
|
+
},
|
|
5597
|
+
{
|
|
5598
|
+
"tag": "path",
|
|
5599
|
+
"d": "M8 14h.01"
|
|
5600
|
+
},
|
|
5601
|
+
{
|
|
5602
|
+
"tag": "path",
|
|
5603
|
+
"d": "M12 14h.01"
|
|
5604
|
+
},
|
|
5605
|
+
{
|
|
5606
|
+
"tag": "path",
|
|
5607
|
+
"d": "M16 14h.01"
|
|
5608
|
+
},
|
|
5609
|
+
{
|
|
5610
|
+
"tag": "path",
|
|
5611
|
+
"d": "M8 18h.01"
|
|
5612
|
+
},
|
|
5613
|
+
{
|
|
5614
|
+
"tag": "path",
|
|
5615
|
+
"d": "M12 18h.01"
|
|
5616
|
+
},
|
|
5617
|
+
{
|
|
5618
|
+
"tag": "path",
|
|
5619
|
+
"d": "M16 18h.01"
|
|
5620
|
+
}
|
|
5621
|
+
],
|
|
5519
5622
|
"check": [{
|
|
5520
5623
|
"tag": "path",
|
|
5521
5624
|
"d": "M20 6 9 17l-5-5"
|
|
@@ -5568,6 +5671,15 @@ function createUiIcon(options = {}, html) {
|
|
|
5568
5671
|
"d": "m9 9 6 6"
|
|
5569
5672
|
}
|
|
5570
5673
|
],
|
|
5674
|
+
"clock": [{
|
|
5675
|
+
"tag": "path",
|
|
5676
|
+
"d": "M12 6v6l4 2"
|
|
5677
|
+
}, {
|
|
5678
|
+
"tag": "circle",
|
|
5679
|
+
"cx": "12",
|
|
5680
|
+
"cy": "12",
|
|
5681
|
+
"r": "10"
|
|
5682
|
+
}],
|
|
5571
5683
|
"code-xml": [
|
|
5572
5684
|
{
|
|
5573
5685
|
"tag": "path",
|
|
@@ -6576,7 +6688,7 @@ function createUiIcon(options = {}, html) {
|
|
|
6576
6688
|
"tag": "path",
|
|
6577
6689
|
"d": "m6 6 12 12"
|
|
6578
6690
|
}]
|
|
6579
|
-
}, inputRead(v[
|
|
6691
|
+
}, inputRead(v[2], inputStatus(2)))];
|
|
6580
6692
|
const g = (j) => {
|
|
6581
6693
|
const i = j - 0;
|
|
6582
6694
|
if (ke[i] === X.e) return v[j];
|
|
@@ -6780,11 +6892,11 @@ function createUiIcon(options = {}, html) {
|
|
|
6780
6892
|
}
|
|
6781
6893
|
};
|
|
6782
6894
|
const p0 = (r, c, d) => {
|
|
6783
|
-
if (c &
|
|
6784
|
-
const s0 = hostState(["tone"], [v[
|
|
6895
|
+
if (c & 10) {
|
|
6896
|
+
const s0 = hostState(["tone", "directional"], [v[3], v[1]]);
|
|
6785
6897
|
if (s0 !== r.v0) writeAttribute(r.n, "data-ui-icon-state", (r.v0 = s0) === "" ? null : s0);
|
|
6786
6898
|
}
|
|
6787
|
-
if (c &
|
|
6899
|
+
if (c & 1073741828) r.L0.update(g(0), d, c);
|
|
6788
6900
|
};
|
|
6789
6901
|
const t0 = element.firstChild.nextSibling.firstChild;
|
|
6790
6902
|
const R = {
|
|
@@ -6797,7 +6909,11 @@ function createUiIcon(options = {}, html) {
|
|
|
6797
6909
|
manageProps(I);
|
|
6798
6910
|
return element;
|
|
6799
6911
|
}
|
|
6800
|
-
defineComponent("ui-icon", createUiIcon, [
|
|
6912
|
+
defineComponent("ui-icon", createUiIcon, [
|
|
6913
|
+
"directional",
|
|
6914
|
+
"name",
|
|
6915
|
+
"tone"
|
|
6916
|
+
]);
|
|
6801
6917
|
//#endregion
|
|
6802
6918
|
//#region components/ui-icon-button/ui-icon-button.js
|
|
6803
6919
|
var ui_icon_button_exports = /* @__PURE__ */ __exportAll({ connect: () => connect$8 });
|
|
@@ -6940,6 +7056,7 @@ var D$13 = {
|
|
|
6940
7056
|
"size": {
|
|
6941
7057
|
"required": false,
|
|
6942
7058
|
"values": [
|
|
7059
|
+
"xs",
|
|
6943
7060
|
"sm",
|
|
6944
7061
|
"md",
|
|
6945
7062
|
"lg"
|
|
@@ -8639,6 +8756,7 @@ function connect$5(host) {
|
|
|
8639
8756
|
let surface = null;
|
|
8640
8757
|
let lastFor;
|
|
8641
8758
|
let lastPlacement;
|
|
8759
|
+
let lastTrigger;
|
|
8642
8760
|
let lastOpen;
|
|
8643
8761
|
let lastExternalOpen = Boolean(host.props.open.value);
|
|
8644
8762
|
host.state.internalOpen = lastExternalOpen;
|
|
@@ -8677,14 +8795,16 @@ function connect$5(host) {
|
|
|
8677
8795
|
const setup = () => {
|
|
8678
8796
|
const nextFor = String(host.props.for.value ?? "");
|
|
8679
8797
|
const nextPlacement = String(host.props.placement.value ?? "bottom-start");
|
|
8680
|
-
|
|
8798
|
+
const nextTrigger = host.props.trigger.value;
|
|
8799
|
+
if (surface && nextFor === lastFor && nextPlacement === lastPlacement && nextTrigger === lastTrigger && (!nextFor || anchor === document.getElementById(nextFor))) return;
|
|
8681
8800
|
lastFor = nextFor;
|
|
8682
8801
|
lastPlacement = nextPlacement;
|
|
8802
|
+
lastTrigger = nextTrigger;
|
|
8683
8803
|
surface?.destroy();
|
|
8684
8804
|
releaseAnchor();
|
|
8685
8805
|
anchor = ids.get(nextFor);
|
|
8686
8806
|
if (anchor) anchorExpanded = anchor.getAttribute("aria-expanded");
|
|
8687
|
-
anchor?.addEventListener("click", onAnchorClick);
|
|
8807
|
+
if (nextTrigger !== "manual") anchor?.addEventListener("click", onAnchorClick);
|
|
8688
8808
|
surface = createAnchoredSurface(element, {
|
|
8689
8809
|
anchor,
|
|
8690
8810
|
placement: nextPlacement,
|
|
@@ -8890,6 +9010,15 @@ var D$9 = {
|
|
|
8890
9010
|
t: "keyword",
|
|
8891
9011
|
j: 0,
|
|
8892
9012
|
m: ["p", formatOf(keywordFormat)]
|
|
9013
|
+
},
|
|
9014
|
+
"trigger": {
|
|
9015
|
+
"required": false,
|
|
9016
|
+
"values": ["click", "manual"],
|
|
9017
|
+
"default": "click",
|
|
9018
|
+
c: checkFormat("keyword", keywordFormat),
|
|
9019
|
+
t: "keyword",
|
|
9020
|
+
j: 0,
|
|
9021
|
+
m: ["p", formatOf(keywordFormat)]
|
|
8893
9022
|
}
|
|
8894
9023
|
}
|
|
8895
9024
|
};
|
|
@@ -8909,6 +9038,7 @@ function createUiPopover(options = {}, html) {
|
|
|
8909
9038
|
null,
|
|
8910
9039
|
null,
|
|
8911
9040
|
null,
|
|
9041
|
+
null,
|
|
8912
9042
|
null
|
|
8913
9043
|
];
|
|
8914
9044
|
const B = acceptProps(element, D$9, S$9.n, v, componentProps, [], html);
|
|
@@ -8965,7 +9095,8 @@ defineComponent("ui-popover", createUiPopover, [
|
|
|
8965
9095
|
"for",
|
|
8966
9096
|
"open",
|
|
8967
9097
|
"placement",
|
|
8968
|
-
"size"
|
|
9098
|
+
"size",
|
|
9099
|
+
"trigger"
|
|
8969
9100
|
]);
|
|
8970
9101
|
//#endregion
|
|
8971
9102
|
//#region vanilla/UiStack.js
|
|
@@ -11354,7 +11485,9 @@ function afterFormReset(control, callback) {
|
|
|
11354
11485
|
const document = control.ownerDocument;
|
|
11355
11486
|
let timer;
|
|
11356
11487
|
const onReset = (event) => {
|
|
11357
|
-
if (event.target === control.form) timer = setTimeout(
|
|
11488
|
+
if (event.target === control.form) timer = setTimeout(() => {
|
|
11489
|
+
if (!event.defaultPrevented) callback();
|
|
11490
|
+
});
|
|
11358
11491
|
};
|
|
11359
11492
|
document.addEventListener("reset", onReset);
|
|
11360
11493
|
return () => {
|
|
@@ -12333,19 +12466,316 @@ defineComponent("ui-disclosure", createUiDisclosure, [
|
|
|
12333
12466
|
"variant"
|
|
12334
12467
|
]);
|
|
12335
12468
|
//#endregion
|
|
12469
|
+
//#region components/shared/input-segments.js
|
|
12470
|
+
/** Give one native text input editable blocks, literal navigation and continuous code entry. */
|
|
12471
|
+
function inputSegments(input, readSegments, readInitialValue) {
|
|
12472
|
+
let connected = true;
|
|
12473
|
+
let composing = false;
|
|
12474
|
+
let internal = false;
|
|
12475
|
+
let continued = -1;
|
|
12476
|
+
let skipped = "";
|
|
12477
|
+
let expectedValue = input.value;
|
|
12478
|
+
let entering = false;
|
|
12479
|
+
const undo = [];
|
|
12480
|
+
const redo = [];
|
|
12481
|
+
const configuration = () => {
|
|
12482
|
+
if (input.value !== expectedValue) {
|
|
12483
|
+
undo.length = 0;
|
|
12484
|
+
redo.length = 0;
|
|
12485
|
+
continued = -1;
|
|
12486
|
+
skipped = "";
|
|
12487
|
+
expectedValue = input.value;
|
|
12488
|
+
}
|
|
12489
|
+
if (input.type !== "text" && input.type !== "tel" && input.type !== "search") return null;
|
|
12490
|
+
const parts = readSegments() ?? [];
|
|
12491
|
+
if (!parts.some((part) => part.placeholder)) return null;
|
|
12492
|
+
return parts.map((part) => typeof part.literal === "string" ? { literal: part.literal } : {
|
|
12493
|
+
length: [...part.placeholder].length,
|
|
12494
|
+
accepts: new RegExp(`^(?:${part.pattern ?? "."})$`, "u")
|
|
12495
|
+
});
|
|
12496
|
+
};
|
|
12497
|
+
const layout = (parts, text = input.value) => {
|
|
12498
|
+
const blocks = [];
|
|
12499
|
+
let offset = 0;
|
|
12500
|
+
for (let index = 0; index < parts.length; index++) {
|
|
12501
|
+
const part = parts[index];
|
|
12502
|
+
if (part.literal !== void 0) {
|
|
12503
|
+
if (offset < text.length) {
|
|
12504
|
+
if (!text.startsWith(part.literal, offset)) return null;
|
|
12505
|
+
offset += part.literal.length;
|
|
12506
|
+
}
|
|
12507
|
+
continue;
|
|
12508
|
+
}
|
|
12509
|
+
const start = offset;
|
|
12510
|
+
let value = "";
|
|
12511
|
+
const nextLiteral = parts[index + 1]?.literal;
|
|
12512
|
+
while (offset < text.length && [...value].length < part.length && !(nextLiteral && text.startsWith(nextLiteral, offset))) {
|
|
12513
|
+
const character = String.fromCodePoint(text.codePointAt(offset));
|
|
12514
|
+
if (!part.accepts.test(character)) break;
|
|
12515
|
+
value += character;
|
|
12516
|
+
offset += character.length;
|
|
12517
|
+
}
|
|
12518
|
+
blocks.push({
|
|
12519
|
+
...part,
|
|
12520
|
+
value,
|
|
12521
|
+
start,
|
|
12522
|
+
end: offset,
|
|
12523
|
+
index
|
|
12524
|
+
});
|
|
12525
|
+
}
|
|
12526
|
+
return offset === text.length ? blocks : null;
|
|
12527
|
+
};
|
|
12528
|
+
const snapshot = () => ({
|
|
12529
|
+
value: input.value,
|
|
12530
|
+
start: input.selectionStart,
|
|
12531
|
+
end: input.selectionEnd
|
|
12532
|
+
});
|
|
12533
|
+
const select = (block) => input.setSelectionRange(block.start, block.end);
|
|
12534
|
+
const announce = (inputType) => {
|
|
12535
|
+
expectedValue = input.value;
|
|
12536
|
+
internal = true;
|
|
12537
|
+
input.dispatchEvent(new InputEvent("input", {
|
|
12538
|
+
bubbles: true,
|
|
12539
|
+
inputType
|
|
12540
|
+
}));
|
|
12541
|
+
internal = false;
|
|
12542
|
+
};
|
|
12543
|
+
const entryText = (parts, blocks, active) => {
|
|
12544
|
+
const lastFilled = blocks.findLastIndex((block) => block.value);
|
|
12545
|
+
const last = blocks[Math.max(active, lastFilled)].index;
|
|
12546
|
+
let index = 0;
|
|
12547
|
+
return parts.slice(0, last + 1).map((part) => part.literal ?? blocks[index++].value).join("");
|
|
12548
|
+
};
|
|
12549
|
+
const render = (parts, blocks, active, inputType) => {
|
|
12550
|
+
undo.push(snapshot());
|
|
12551
|
+
redo.length = 0;
|
|
12552
|
+
input.value = blocks.every((block) => !block.value) && !inputType.startsWith("insert") ? "" : entryText(parts, blocks, active);
|
|
12553
|
+
const next = layout(parts);
|
|
12554
|
+
if (next?.[active]) select(next[active]);
|
|
12555
|
+
announce(inputType);
|
|
12556
|
+
};
|
|
12557
|
+
const activeBlock = (blocks) => {
|
|
12558
|
+
if (continued >= 0 && input.selectionStart === input.selectionEnd && blocks[continued]?.end === input.selectionStart) return continued;
|
|
12559
|
+
const exact = blocks.findIndex((block) => block.start === input.selectionStart);
|
|
12560
|
+
if (exact >= 0) return exact;
|
|
12561
|
+
const containing = blocks.findIndex((block) => input.selectionStart < block.end);
|
|
12562
|
+
return containing >= 0 ? containing : blocks.length - 1;
|
|
12563
|
+
};
|
|
12564
|
+
const focus = (force = false) => {
|
|
12565
|
+
continued = -1;
|
|
12566
|
+
skipped = "";
|
|
12567
|
+
if (input.disabled || input.readOnly || force !== true && input.value && input.selectionStart === 0 && input.selectionEnd === input.value.length) return;
|
|
12568
|
+
const parts = configuration();
|
|
12569
|
+
const blocks = parts && layout(parts);
|
|
12570
|
+
if (blocks?.length) select(blocks[0]);
|
|
12571
|
+
};
|
|
12572
|
+
const down = () => {
|
|
12573
|
+
entering = input.ownerDocument.activeElement !== input;
|
|
12574
|
+
};
|
|
12575
|
+
const reselect = () => focus(true);
|
|
12576
|
+
const pointer = () => {
|
|
12577
|
+
if (entering) {
|
|
12578
|
+
entering = false;
|
|
12579
|
+
if (input.selectionStart === input.selectionEnd) focus(true);
|
|
12580
|
+
return;
|
|
12581
|
+
}
|
|
12582
|
+
const parts = configuration();
|
|
12583
|
+
const blocks = parts && layout(parts);
|
|
12584
|
+
if (!blocks || input.selectionStart !== input.selectionEnd) return;
|
|
12585
|
+
continued = -1;
|
|
12586
|
+
skipped = "";
|
|
12587
|
+
select(blocks[activeBlock(blocks)]);
|
|
12588
|
+
};
|
|
12589
|
+
const insert = (parts, blocks, data, inputType) => {
|
|
12590
|
+
let active = activeBlock(blocks);
|
|
12591
|
+
const block = blocks[active];
|
|
12592
|
+
const nextLiteral = parts[block.index + 1]?.literal ?? "";
|
|
12593
|
+
if (nextLiteral.includes(data) && data) {
|
|
12594
|
+
if (skipped === data) {
|
|
12595
|
+
skipped = "";
|
|
12596
|
+
return;
|
|
12597
|
+
}
|
|
12598
|
+
continued = -1;
|
|
12599
|
+
if (blocks[active + 1]) {
|
|
12600
|
+
if (entryText(parts, blocks, active + 1) !== input.value) render(parts, blocks, active + 1, inputType);
|
|
12601
|
+
else select(blocks[active + 1]);
|
|
12602
|
+
}
|
|
12603
|
+
return;
|
|
12604
|
+
}
|
|
12605
|
+
if (skipped === data) {
|
|
12606
|
+
skipped = "";
|
|
12607
|
+
return;
|
|
12608
|
+
}
|
|
12609
|
+
if (!block.accepts.test(data)) return;
|
|
12610
|
+
if (input.selectionStart === 0 && input.selectionEnd === input.value.length && blocks.length > 1) {
|
|
12611
|
+
blocks.forEach((part) => {
|
|
12612
|
+
part.value = "";
|
|
12613
|
+
});
|
|
12614
|
+
active = 0;
|
|
12615
|
+
}
|
|
12616
|
+
const target = blocks[active];
|
|
12617
|
+
target.value = (continued !== active || input.selectionStart !== input.selectionEnd ? "" : target.value) + data;
|
|
12618
|
+
if ([...target.value].length > target.length) return;
|
|
12619
|
+
const complete = [...target.value].length === target.length;
|
|
12620
|
+
const next = complete && blocks[active + 1] ? active + 1 : active;
|
|
12621
|
+
render(parts, blocks, next, inputType);
|
|
12622
|
+
const positions = layout(parts);
|
|
12623
|
+
if (next === active && positions) input.setSelectionRange(positions[active].end, positions[active].end);
|
|
12624
|
+
continued = next === active ? active : -1;
|
|
12625
|
+
skipped = complete ? nextLiteral : "";
|
|
12626
|
+
};
|
|
12627
|
+
const before = (event) => {
|
|
12628
|
+
if (composing || event.isComposing || input.disabled || input.readOnly) return;
|
|
12629
|
+
const parts = configuration();
|
|
12630
|
+
let blocks = parts && layout(parts);
|
|
12631
|
+
if (!blocks) return;
|
|
12632
|
+
if (event.inputType === "insertText" && event.data && [...event.data].length > 1) {
|
|
12633
|
+
event.preventDefault();
|
|
12634
|
+
undo.push(snapshot());
|
|
12635
|
+
redo.length = 0;
|
|
12636
|
+
input.value = event.data;
|
|
12637
|
+
input.setSelectionRange(input.value.length, input.value.length);
|
|
12638
|
+
announce(event.inputType);
|
|
12639
|
+
continued = -1;
|
|
12640
|
+
skipped = "";
|
|
12641
|
+
} else if (event.inputType === "insertText" && event.data && [...event.data].length === 1) {
|
|
12642
|
+
event.preventDefault();
|
|
12643
|
+
insert(parts, blocks, event.data, event.inputType);
|
|
12644
|
+
} else if (["deleteContentBackward", "deleteContentForward"].includes(event.inputType)) {
|
|
12645
|
+
event.preventDefault();
|
|
12646
|
+
const all = input.selectionStart === 0 && input.selectionEnd === input.value.length;
|
|
12647
|
+
let active = activeBlock(blocks);
|
|
12648
|
+
if (all) blocks.forEach((block) => {
|
|
12649
|
+
block.value = "";
|
|
12650
|
+
});
|
|
12651
|
+
else if (event.inputType === "deleteContentBackward") {
|
|
12652
|
+
if (!blocks[active].value && active > 0) active--;
|
|
12653
|
+
blocks[active].value = continued === active && input.selectionStart === input.selectionEnd ? [...blocks[active].value].slice(0, -1).join("") : "";
|
|
12654
|
+
} else blocks[active].value = "";
|
|
12655
|
+
render(parts, blocks, active, event.inputType);
|
|
12656
|
+
continued = -1;
|
|
12657
|
+
skipped = "";
|
|
12658
|
+
}
|
|
12659
|
+
};
|
|
12660
|
+
const key = (event) => {
|
|
12661
|
+
if (event.isComposing || input.disabled || input.readOnly) return;
|
|
12662
|
+
const parts = configuration();
|
|
12663
|
+
const blocks = parts && layout(parts);
|
|
12664
|
+
if (!blocks) return;
|
|
12665
|
+
const modifier = event.ctrlKey || event.metaKey;
|
|
12666
|
+
if (modifier && ["z", "y"].includes(event.key.toLowerCase())) {
|
|
12667
|
+
const forward = event.key.toLowerCase() === "y" || event.shiftKey;
|
|
12668
|
+
const from = forward ? redo : undo, to = forward ? undo : redo;
|
|
12669
|
+
if (!from.length) return;
|
|
12670
|
+
event.preventDefault();
|
|
12671
|
+
to.push(snapshot());
|
|
12672
|
+
const previous = from.pop();
|
|
12673
|
+
input.value = previous.value;
|
|
12674
|
+
input.setSelectionRange(previous.start, previous.end);
|
|
12675
|
+
continued = -1;
|
|
12676
|
+
skipped = "";
|
|
12677
|
+
announce(forward ? "historyRedo" : "historyUndo");
|
|
12678
|
+
} else if (!modifier && !event.altKey && !event.shiftKey && [
|
|
12679
|
+
"ArrowLeft",
|
|
12680
|
+
"ArrowRight",
|
|
12681
|
+
"Home",
|
|
12682
|
+
"End"
|
|
12683
|
+
].includes(event.key)) {
|
|
12684
|
+
event.preventDefault();
|
|
12685
|
+
const active = activeBlock(blocks);
|
|
12686
|
+
const next = event.key === "Home" ? 0 : event.key === "End" ? blocks.length - 1 : Math.max(0, Math.min(blocks.length - 1, active + (event.key === "ArrowLeft" ? -1 : 1)));
|
|
12687
|
+
select(blocks[next]);
|
|
12688
|
+
continued = -1;
|
|
12689
|
+
skipped = "";
|
|
12690
|
+
}
|
|
12691
|
+
};
|
|
12692
|
+
const paste = (event) => {
|
|
12693
|
+
const parts = configuration();
|
|
12694
|
+
const blocks = parts && layout(parts);
|
|
12695
|
+
const text = event.clipboardData?.getData("text");
|
|
12696
|
+
if (!blocks || !text || parts.some((part) => part.literal) || input.disabled || input.readOnly) return;
|
|
12697
|
+
if (input.selectionStart === 0 && input.selectionEnd === input.value.length) return;
|
|
12698
|
+
if ([...text].some((character) => !blocks[0].accepts.test(character))) return;
|
|
12699
|
+
event.preventDefault();
|
|
12700
|
+
const active = activeBlock(blocks);
|
|
12701
|
+
let characters = [...text];
|
|
12702
|
+
for (let index = active; index < blocks.length && characters.length; index++) blocks[index].value = characters.splice(0, blocks[index].length).join("");
|
|
12703
|
+
render(parts, blocks, Math.min(blocks.length - 1, active + [...text].length), "insertFromPaste");
|
|
12704
|
+
continued = -1;
|
|
12705
|
+
skipped = "";
|
|
12706
|
+
};
|
|
12707
|
+
const native = () => {
|
|
12708
|
+
if (!internal) {
|
|
12709
|
+
undo.length = 0;
|
|
12710
|
+
redo.length = 0;
|
|
12711
|
+
continued = -1;
|
|
12712
|
+
skipped = "";
|
|
12713
|
+
expectedValue = input.value;
|
|
12714
|
+
}
|
|
12715
|
+
};
|
|
12716
|
+
const start = () => {
|
|
12717
|
+
composing = true;
|
|
12718
|
+
};
|
|
12719
|
+
const end = () => {
|
|
12720
|
+
composing = false;
|
|
12721
|
+
native();
|
|
12722
|
+
};
|
|
12723
|
+
const events = {
|
|
12724
|
+
focus,
|
|
12725
|
+
"select-first-segment": reselect,
|
|
12726
|
+
pointerdown: down,
|
|
12727
|
+
click: pointer,
|
|
12728
|
+
beforeinput: before,
|
|
12729
|
+
keydown: key,
|
|
12730
|
+
paste,
|
|
12731
|
+
input: native,
|
|
12732
|
+
compositionstart: start,
|
|
12733
|
+
compositionend: end
|
|
12734
|
+
};
|
|
12735
|
+
for (const [name, listener] of Object.entries(events)) input.addEventListener(name, listener);
|
|
12736
|
+
queueMicrotask(() => {
|
|
12737
|
+
if (connected && input.ownerDocument.activeElement === input && input.value === String(readInitialValue() ?? input.defaultValue)) focus();
|
|
12738
|
+
});
|
|
12739
|
+
return () => {
|
|
12740
|
+
connected = false;
|
|
12741
|
+
for (const [name, listener] of Object.entries(events)) input.removeEventListener(name, listener);
|
|
12742
|
+
};
|
|
12743
|
+
}
|
|
12744
|
+
//#endregion
|
|
12745
|
+
//#region components/shared/external-value.js
|
|
12746
|
+
var observed = /* @__PURE__ */ new WeakMap();
|
|
12747
|
+
/** Compare external inputs across connections; live edits remain in the renderer's state. */
|
|
12748
|
+
function externalValueTracker(instance, options = {}) {
|
|
12749
|
+
if (!observed.has(instance) && Object.hasOwn(options, "initialValue")) observed.set(instance, options.initialValue);
|
|
12750
|
+
return (value) => {
|
|
12751
|
+
const known = observed.has(instance);
|
|
12752
|
+
const previous = observed.get(instance);
|
|
12753
|
+
observed.set(instance, value);
|
|
12754
|
+
return !known || !Object.is(previous, value);
|
|
12755
|
+
};
|
|
12756
|
+
}
|
|
12757
|
+
//#endregion
|
|
12336
12758
|
//#region components/ui-input/ui-input.js
|
|
12337
12759
|
var ui_input_exports = /* @__PURE__ */ __exportAll({ connect: () => connect$1 });
|
|
12760
|
+
/** Retain native edits between external value changes, including the first browser connection. */
|
|
12338
12761
|
function connect$1(host) {
|
|
12339
|
-
|
|
12762
|
+
const input = host.element;
|
|
12763
|
+
const changed = externalValueTracker(input, { initialValue: host.props.value.value });
|
|
12764
|
+
const stopSegments = inputSegments(input, () => host.props.segments.value, () => host.props.value.value);
|
|
12765
|
+
const stop = host.effect(() => {
|
|
12340
12766
|
const value = host.props.value.value;
|
|
12767
|
+
const replace = changed(value);
|
|
12341
12768
|
if (value === void 0 || value === null) return;
|
|
12342
|
-
const input = host.element;
|
|
12343
12769
|
const text = String(value);
|
|
12344
12770
|
input.defaultValue = text;
|
|
12345
|
-
if (input.value === text) return;
|
|
12771
|
+
if (!replace || input.value === text) return;
|
|
12346
12772
|
if (input.type === "number" && input.value !== "" && Number(input.value) === Number(value)) return;
|
|
12347
12773
|
input.value = text;
|
|
12348
12774
|
});
|
|
12775
|
+
return () => {
|
|
12776
|
+
stop();
|
|
12777
|
+
stopSegments();
|
|
12778
|
+
};
|
|
12349
12779
|
}
|
|
12350
12780
|
//#endregion
|
|
12351
12781
|
//#region vanilla/UiInput.js
|
|
@@ -12392,6 +12822,35 @@ var D$3 = {
|
|
|
12392
12822
|
j: 0,
|
|
12393
12823
|
m: "b"
|
|
12394
12824
|
},
|
|
12825
|
+
"segments": {
|
|
12826
|
+
"required": false,
|
|
12827
|
+
c: checkList(checkObject([
|
|
12828
|
+
[
|
|
12829
|
+
"placeholder",
|
|
12830
|
+
checkString,
|
|
12831
|
+
true
|
|
12832
|
+
],
|
|
12833
|
+
[
|
|
12834
|
+
"pattern",
|
|
12835
|
+
checkString,
|
|
12836
|
+
true
|
|
12837
|
+
],
|
|
12838
|
+
[
|
|
12839
|
+
"literal",
|
|
12840
|
+
checkString,
|
|
12841
|
+
true
|
|
12842
|
+
]
|
|
12843
|
+
], false)),
|
|
12844
|
+
j: 1,
|
|
12845
|
+
m: ["l", ["o", [
|
|
12846
|
+
"placeholder",
|
|
12847
|
+
"s",
|
|
12848
|
+
"pattern",
|
|
12849
|
+
"s",
|
|
12850
|
+
"literal",
|
|
12851
|
+
"s"
|
|
12852
|
+
]]]
|
|
12853
|
+
},
|
|
12395
12854
|
"size": {
|
|
12396
12855
|
"required": false,
|
|
12397
12856
|
"values": [
|
|
@@ -12561,17 +13020,18 @@ function createUiInput(options = {}, html) {
|
|
|
12561
13020
|
null,
|
|
12562
13021
|
null,
|
|
12563
13022
|
null,
|
|
13023
|
+
null,
|
|
12564
13024
|
null
|
|
12565
13025
|
];
|
|
12566
13026
|
const B = acceptProps(element, D$3, S$3.n, v, componentProps, [], html);
|
|
12567
13027
|
const p0 = (r, c, d) => {
|
|
12568
|
-
if (c &
|
|
12569
|
-
const x0 = v[
|
|
13028
|
+
if (c & 1073741888) {
|
|
13029
|
+
const x0 = v[6];
|
|
12570
13030
|
const s0 = toAttribute(x0, "type");
|
|
12571
13031
|
if (s0 !== r.v0) writeAttribute(r.n, "type", r.v0 = s0);
|
|
12572
13032
|
}
|
|
12573
|
-
if (c &
|
|
12574
|
-
const x1 = checkSelected(S$3, v[
|
|
13033
|
+
if (c & 1073742016) {
|
|
13034
|
+
const x1 = checkSelected(S$3, v[7], v[6], [
|
|
12575
13035
|
[
|
|
12576
13036
|
"text",
|
|
12577
13037
|
"s",
|
|
@@ -12652,7 +13112,7 @@ function createUiInput(options = {}, html) {
|
|
|
12652
13112
|
"z",
|
|
12653
13113
|
"Reference `value` must satisfy null."
|
|
12654
13114
|
]
|
|
12655
|
-
], "expression:$value:value") ? v[
|
|
13115
|
+
], "expression:$value:value") ? v[7] : NONCONFORMING;
|
|
12656
13116
|
if (x1 !== NONCONFORMING) {
|
|
12657
13117
|
const s1 = toAttribute(x1, "value");
|
|
12658
13118
|
if (s1 !== r.v1) writeAttribute(r.n, "value", r.v1 = s1);
|
|
@@ -12678,8 +13138,8 @@ function createUiInput(options = {}, html) {
|
|
|
12678
13138
|
const s5 = toAttribute(x5, "aria-invalid");
|
|
12679
13139
|
if (s5 !== r.v5) writeAttribute(r.n, "aria-invalid", r.v5 = s5);
|
|
12680
13140
|
}
|
|
12681
|
-
if (c &
|
|
12682
|
-
const s6 = hostState(["size"], [v[
|
|
13141
|
+
if (c & 32) {
|
|
13142
|
+
const s6 = hostState(["size"], [v[5]]);
|
|
12683
13143
|
if (s6 !== r.v6) writeAttribute(r.n, "data-ui-input-state", (r.v6 = s6) === "" ? null : s6);
|
|
12684
13144
|
}
|
|
12685
13145
|
};
|
|
@@ -12703,6 +13163,7 @@ defineComponent("ui-input", createUiInput, [
|
|
|
12703
13163
|
"invalid",
|
|
12704
13164
|
"readonly",
|
|
12705
13165
|
"required",
|
|
13166
|
+
"segments",
|
|
12706
13167
|
"size",
|
|
12707
13168
|
"type",
|
|
12708
13169
|
"value"
|