@threadlabs/looma 0.19.1 → 0.21.0
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/trigger.js +9 -4
- package/components/ui-affordance-scope/ui-affordance-scope.html +1 -1
- package/components/ui-avatar/ui-avatar.html +6 -6
- package/components/ui-avatar-group/ui-avatar-group.html +3 -3
- package/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/components/ui-badge/ui-badge.html +3 -3
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +1 -1
- package/components/ui-breadcrumbs/ui-breadcrumbs.html +1 -1
- package/components/ui-button/ui-button.html +17 -16
- package/components/ui-callout/ui-callout.html +1 -1
- package/components/ui-card/ui-card.html +5 -4
- package/components/ui-checkbox/ui-checkbox.html +11 -7
- package/components/ui-cluster/ui-cluster.html +4 -4
- package/components/ui-combobox/ui-combobox.html +299 -74
- package/components/ui-combobox/ui-combobox.js +21 -20
- package/components/ui-container/ui-container.html +2 -2
- package/components/ui-context-menu/ui-context-menu.html +17 -5
- package/components/ui-cover/ui-cover.html +1 -1
- package/components/ui-description-list/ui-description-list.html +3 -3
- package/components/ui-dialog/ui-dialog.html +15 -7
- package/components/ui-disclosure/ui-disclosure.html +17 -8
- package/components/ui-editable/ui-editable.html +20 -9
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +6 -6
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +6 -6
- package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +1 -1
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +6 -6
- package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +1 -1
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +2 -2
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +33 -13
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +107 -29
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +5 -5
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +48 -22
- package/components/ui-floating-action-button/ui-floating-action-button.html +1 -1
- package/components/ui-grid/ui-grid.html +2 -2
- package/components/ui-icon/ui-icon.html +13 -4
- package/components/ui-icon-button/ui-icon-button.html +6 -6
- package/components/ui-input/ui-input.html +28 -6
- package/components/ui-list/ui-list.html +5 -4
- package/components/ui-list-item/ui-list-item.html +2 -2
- package/components/ui-listbox/ui-listbox.html +31 -16
- package/components/ui-menu/ui-menu.html +18 -5
- package/components/ui-menu-group/ui-menu-group.html +1 -1
- package/components/ui-menu-item/ui-menu-item.html +14 -9
- package/components/ui-meter/ui-meter.html +7 -7
- package/components/ui-nav-item/ui-nav-item.html +10 -9
- package/components/ui-page-header/ui-page-header.html +1 -1
- package/components/ui-popover/ui-popover.html +14 -5
- package/components/ui-radio/ui-radio.html +7 -3
- package/components/ui-radio-group/ui-radio-group.html +12 -4
- package/components/ui-reel/ui-reel.html +3 -3
- package/components/ui-scroll-area/ui-scroll-area.html +1 -1
- package/components/ui-search-result-row/ui-search-result-row.html +1 -1
- package/components/ui-search-shell/ui-search-shell.html +7 -3
- package/components/ui-section/ui-section.html +3 -3
- package/components/ui-select/ui-select.html +2 -2
- package/components/ui-separator/ui-separator.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +13 -6
- package/components/ui-spinner/ui-spinner.html +5 -5
- package/components/ui-stack/ui-stack.html +3 -3
- package/components/ui-status-message/ui-status-message.html +5 -5
- package/components/ui-switch/ui-switch.html +16 -3
- package/components/ui-switcher/ui-switcher.html +3 -3
- package/components/ui-table/ui-table.html +1 -1
- package/components/ui-tabs/ui-tabs.html +14 -9
- package/components/ui-text/ui-text.html +6 -6
- package/components/ui-textarea/ui-textarea.html +10 -2
- package/components/ui-toast/ui-toast.html +8 -4
- package/components/ui-toast-region/ui-toast-region.html +27 -7
- package/components/ui-tooltip/ui-tooltip.html +16 -7
- package/components/ui-tree/ui-tree.html +30 -7
- package/components/ui-tree-item/ui-tree-item.html +21 -17
- package/dist/index.js +1 -1
- package/editor/table-overlay.d.ts +1 -1
- package/package.json +3 -3
- 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 +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-combobox.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-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-insert-table-grid.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-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-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.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-page-header.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 +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.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-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-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/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +5 -1
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +3 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +4 -3
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +3 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -1
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +2 -1
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +4 -7
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +6 -4
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +3 -2
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +6 -2
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +4 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -1
- package/vanilla/UiCombobox.d.ts +3 -2
- package/vanilla/UiCombobox.js +8 -2
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -1
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +3 -2
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +4 -5
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +4 -7
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +2 -1
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +4 -2
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +4 -2
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +1 -1
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +5 -2
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +3 -1
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +6 -2
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +4 -7
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +2 -1
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +2 -2
- package/vanilla/UiEditorTableOverlay.d.ts +12 -2
- package/vanilla/UiEditorTableOverlay.js +2 -2
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +2 -2
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -1
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -1
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +6 -1
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +4 -3
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +4 -3
- package/vanilla/UiInput.d.ts +5 -4
- package/vanilla/UiInput.js +16 -13
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +5 -1
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +4 -2
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +5 -1
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +3 -2
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +3 -2
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +2 -1
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +6 -2
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +2 -2
- package/vanilla/UiNavItem.d.ts +2 -2
- package/vanilla/UiNavItem.js +11 -5
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +8 -5
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +3 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +4 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +3 -2
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +2 -1
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +3 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +6 -1
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +6 -2
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +5 -2
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +3 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +3 -7
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +3 -2
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -1
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +4 -2
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +4 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +3 -2
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +3 -2
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +4 -2
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +13 -2
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +3 -3
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +4 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +3 -2
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +3 -2
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +5 -1
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +3 -2
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +8 -4
- package/vue/UiActionBar.vue +33 -2
- package/vue/UiAffordanceScope.d.ts +23 -8
- package/vue/UiAffordanceScope.vue +90 -17
- package/vue/UiAvatar.d.ts +77 -19
- package/vue/UiAvatar.vue +151 -31
- package/vue/UiAvatarGroup.d.ts +50 -13
- package/vue/UiAvatarGroup.vue +121 -23
- package/vue/UiBadge.d.ts +32 -10
- package/vue/UiBadge.vue +104 -17
- package/vue/UiBreadcrumbItem.d.ts +14 -6
- package/vue/UiBreadcrumbItem.vue +82 -15
- package/vue/UiBreadcrumbs.d.ts +14 -6
- package/vue/UiBreadcrumbs.vue +78 -10
- package/vue/UiButton.d.ts +122 -27
- package/vue/UiButton.vue +288 -64
- package/vue/UiCallout.d.ts +14 -6
- package/vue/UiCallout.vue +84 -16
- package/vue/UiCard.d.ts +41 -12
- package/vue/UiCard.vue +149 -25
- package/vue/UiCheckbox.d.ts +85 -28
- package/vue/UiCheckbox.vue +173 -43
- package/vue/UiCluster.d.ts +41 -7
- package/vue/UiCluster.vue +122 -13
- package/vue/UiCombobox.d.ts +303 -110
- package/vue/UiCombobox.vue +723 -412
- package/vue/UiContainer.d.ts +23 -5
- package/vue/UiContainer.vue +89 -9
- package/vue/UiContextMenu.d.ts +38 -23
- package/vue/UiContextMenu.vue +113 -38
- package/vue/UiCover.d.ts +14 -6
- package/vue/UiCover.vue +76 -12
- package/vue/UiDescriptionItem.d.ts +14 -6
- package/vue/UiDescriptionItem.vue +78 -11
- package/vue/UiDescriptionList.d.ts +32 -9
- package/vue/UiDescriptionList.vue +106 -16
- package/vue/UiDialog.d.ts +89 -30
- package/vue/UiDialog.vue +168 -38
- package/vue/UiDisclosure.d.ts +70 -27
- package/vue/UiDisclosure.vue +149 -36
- package/vue/UiEditable.d.ts +119 -41
- package/vue/UiEditable.vue +220 -62
- package/vue/UiEditorInsertTableGrid.d.ts +46 -17
- package/vue/UiEditorInsertTableGrid.vue +215 -40
- package/vue/UiEditorMentionMenu.d.ts +128 -41
- package/vue/UiEditorMentionMenu.vue +211 -37
- package/vue/UiEditorMentionMenuItem.d.ts +32 -10
- package/vue/UiEditorMentionMenuItem.vue +98 -17
- package/vue/UiEditorSlashMenu.d.ts +110 -37
- package/vue/UiEditorSlashMenu.vue +189 -31
- package/vue/UiEditorSlashMenuGroup.d.ts +14 -6
- package/vue/UiEditorSlashMenuGroup.vue +80 -12
- package/vue/UiEditorSlashMenuItem.d.ts +50 -14
- package/vue/UiEditorSlashMenuItem.vue +120 -23
- package/vue/UiEditorTableContextMenu.d.ts +64 -20
- package/vue/UiEditorTableContextMenu.vue +326 -91
- package/vue/UiEditorTableOverlay.d.ts +170 -44
- package/vue/UiEditorTableOverlay.vue +420 -149
- package/vue/UiEditorTableToolbar.d.ts +64 -20
- package/vue/UiEditorTableToolbar.vue +344 -107
- package/vue/UiEditorToolbar.d.ts +14 -6
- package/vue/UiEditorToolbar.vue +79 -15
- package/vue/UiFloatingActionButton.d.ts +32 -10
- package/vue/UiFloatingActionButton.vue +96 -18
- package/vue/UiFormField.d.ts +32 -10
- package/vue/UiFormField.vue +99 -19
- package/vue/UiGrid.d.ts +32 -6
- package/vue/UiGrid.vue +95 -11
- package/vue/UiIcon.d.ts +14 -6
- package/vue/UiIcon.vue +99 -14
- package/vue/UiIconButton.d.ts +77 -19
- package/vue/UiIconButton.vue +176 -39
- package/vue/UiInput.d.ts +50 -19
- package/vue/UiInput.vue +326 -33
- package/vue/UiInputGroup.d.ts +14 -6
- package/vue/UiInputGroup.vue +79 -15
- package/vue/UiList.d.ts +41 -12
- package/vue/UiList.vue +125 -22
- package/vue/UiListItem.d.ts +23 -8
- package/vue/UiListItem.vue +88 -16
- package/vue/UiListbox.d.ts +86 -27
- package/vue/UiListbox.vue +272 -64
- package/vue/UiMenu.d.ts +69 -33
- package/vue/UiMenu.vue +142 -38
- package/vue/UiMenuGroup.d.ts +14 -6
- package/vue/UiMenuGroup.vue +80 -11
- package/vue/UiMenuItem.d.ts +61 -25
- package/vue/UiMenuItem.vue +174 -45
- package/vue/UiMeter.d.ts +68 -18
- package/vue/UiMeter.vue +215 -41
- package/vue/UiNavItem.d.ts +50 -11
- package/vue/UiNavItem.vue +163 -29
- package/vue/UiPageHeader.d.ts +14 -6
- package/vue/UiPageHeader.vue +75 -12
- package/vue/UiPopover.d.ts +43 -21
- package/vue/UiPopover.vue +147 -27
- package/vue/UiRadio.d.ts +67 -24
- package/vue/UiRadio.vue +147 -36
- package/vue/UiRadioGroup.d.ts +79 -29
- package/vue/UiRadioGroup.vue +162 -41
- package/vue/UiReel.d.ts +32 -6
- package/vue/UiReel.vue +97 -11
- package/vue/UiScrollArea.d.ts +14 -6
- package/vue/UiScrollArea.vue +83 -14
- package/vue/UiSearchResultRow.d.ts +23 -8
- package/vue/UiSearchResultRow.vue +86 -16
- package/vue/UiSearchShell.d.ts +48 -19
- package/vue/UiSearchShell.vue +120 -26
- package/vue/UiSection.d.ts +32 -10
- package/vue/UiSection.vue +103 -17
- package/vue/UiSelect.d.ts +59 -17
- package/vue/UiSelect.vue +140 -29
- package/vue/UiSeparator.d.ts +14 -6
- package/vue/UiSeparator.vue +80 -9
- package/vue/UiSidebar.d.ts +95 -31
- package/vue/UiSidebar.vue +172 -39
- package/vue/UiSpinner.d.ts +23 -8
- package/vue/UiSpinner.vue +115 -24
- package/vue/UiStack.d.ts +32 -6
- package/vue/UiStack.vue +107 -11
- package/vue/UiStatusMessage.d.ts +32 -10
- package/vue/UiStatusMessage.vue +109 -19
- package/vue/UiSwitch.d.ts +67 -24
- package/vue/UiSwitch.vue +147 -36
- package/vue/UiSwitcher.d.ts +41 -7
- package/vue/UiSwitcher.vue +118 -15
- package/vue/UiTable.d.ts +23 -8
- package/vue/UiTable.vue +91 -17
- package/vue/UiTabs.d.ts +66 -23
- package/vue/UiTabs.vue +230 -44
- package/vue/UiText.d.ts +68 -18
- package/vue/UiText.vue +308 -48
- package/vue/UiTextarea.d.ts +84 -21
- package/vue/UiTextarea.vue +172 -38
- package/vue/UiToast.d.ts +28 -13
- package/vue/UiToast.vue +103 -24
- package/vue/UiToastRegion.d.ts +29 -14
- package/vue/UiToastRegion.vue +202 -47
- package/vue/UiTooltip.d.ts +81 -31
- package/vue/UiTooltip.vue +192 -37
- package/vue/UiTopBar.vue +33 -2
- package/vue/UiTree.d.ts +72 -29
- package/vue/UiTree.vue +170 -49
- package/vue/UiTreeItem.d.ts +136 -35
- package/vue/UiTreeItem.vue +227 -61
- package/vue/chunks/UiActionBar.js +16 -3
- package/vue/chunks/UiAffordanceScope.js +66 -11
- package/vue/chunks/UiAvatar.js +121 -20
- package/vue/chunks/UiAvatarGroup.js +94 -15
- package/vue/chunks/UiBadge.js +82 -10
- package/vue/chunks/UiBreadcrumbItem.js +43 -9
- package/vue/chunks/UiBreadcrumbs.js +41 -5
- package/vue/chunks/UiButton.js +237 -51
- package/vue/chunks/UiCallout.js +53 -11
- package/vue/chunks/UiCard.js +145 -18
- package/vue/chunks/UiCheckbox.js +130 -30
- package/vue/chunks/UiCluster.js +99 -12
- package/vue/chunks/UiCombobox.js +545 -162
- package/vue/chunks/UiContainer.js +65 -7
- package/vue/chunks/UiContextMenu.js +56 -11
- package/vue/chunks/UiCover.js +41 -6
- package/vue/chunks/UiDescriptionItem.js +39 -4
- package/vue/chunks/UiDescriptionList.js +80 -10
- package/vue/chunks/UiDialog.js +125 -18
- package/vue/chunks/UiDisclosure.js +102 -17
- package/vue/chunks/UiEditable.js +154 -29
- package/vue/chunks/UiEditorInsertTableGrid.js +154 -31
- package/vue/chunks/UiEditorMentionMenu.js +221 -18
- package/vue/chunks/UiEditorMentionMenuItem.js +64 -7
- package/vue/chunks/UiEditorSlashMenu.js +201 -14
- package/vue/chunks/UiEditorSlashMenuGroup.js +43 -9
- package/vue/chunks/UiEditorSlashMenuItem.js +80 -14
- package/vue/chunks/UiEditorTableContextMenu.js +220 -49
- package/vue/chunks/UiEditorTableOverlay.js +390 -85
- package/vue/chunks/UiEditorTableToolbar.js +248 -71
- package/vue/chunks/UiEditorToolbar.js +44 -10
- package/vue/chunks/UiFloatingActionButton.js +57 -9
- package/vue/chunks/UiFormField.js +63 -12
- package/vue/chunks/UiGrid.js +80 -9
- package/vue/chunks/UiIcon.js +73 -16
- package/vue/chunks/UiIconButton.js +126 -28
- package/vue/chunks/UiInput.js +328 -22
- package/vue/chunks/UiInputGroup.js +44 -10
- package/vue/chunks/UiList.js +104 -15
- package/vue/chunks/UiListItem.js +57 -8
- package/vue/chunks/UiListbox.js +208 -49
- package/vue/chunks/UiMenu.js +88 -15
- package/vue/chunks/UiMenuGroup.js +41 -5
- package/vue/chunks/UiMenuItem.js +111 -32
- package/vue/chunks/UiMeter.js +166 -36
- package/vue/chunks/UiNavItem.js +133 -37
- package/vue/chunks/UiPageHeader.js +41 -6
- package/vue/chunks/UiPopover.js +81 -11
- package/vue/chunks/UiRadio.js +115 -24
- package/vue/chunks/UiRadioGroup.js +108 -19
- package/vue/chunks/UiReel.js +81 -10
- package/vue/chunks/UiScrollArea.js +47 -10
- package/vue/chunks/UiSearchResultRow.js +47 -8
- package/vue/chunks/UiSearchShell.js +84 -24
- package/vue/chunks/UiSection.js +77 -10
- package/vue/chunks/UiSelect.js +108 -20
- package/vue/chunks/UiSeparator.js +41 -5
- package/vue/chunks/UiSidebar.js +136 -20
- package/vue/chunks/UiSpinner.js +64 -19
- package/vue/chunks/UiStack.js +87 -10
- package/vue/chunks/UiStatusMessage.js +82 -12
- package/vue/chunks/UiSwitch.js +115 -24
- package/vue/chunks/UiSwitcher.js +103 -15
- package/vue/chunks/UiTable.js +63 -11
- package/vue/chunks/UiTabs.js +170 -30
- package/vue/chunks/UiText.js +365 -38
- package/vue/chunks/UiTextarea.js +132 -26
- package/vue/chunks/UiToast.js +70 -12
- package/vue/chunks/UiToastRegion.js +154 -33
- package/vue/chunks/UiTooltip.js +124 -16
- package/vue/chunks/UiTopBar.js +16 -3
- package/vue/chunks/UiTree.js +107 -15
- package/vue/chunks/UiTreeItem.js +167 -43
- package/vue/chunks/control.js +171 -0
- package/vue/chunks/host.js +170 -27
- package/vue/chunks/props.js +477 -0
- package/vue/components.css +1192 -1192
- package/vue/editor/index.js +58 -15
- package/vue/editor/primitives.d.ts +52 -2
- package/vue/host.ts +370 -39
package/vue/UiCombobox.vue
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.12 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
computed,
|
|
5
|
+
defineComponent,
|
|
6
|
+
getCurrentInstance,
|
|
7
|
+
h,
|
|
8
|
+
ref,
|
|
9
|
+
useTemplateRef,
|
|
10
|
+
watchSyncEffect,
|
|
11
|
+
} from 'vue'
|
|
12
|
+
import type { PropType, VNode } from 'vue'
|
|
13
|
+
import { vBindControl } from './control'
|
|
5
14
|
import { createDispatch, useComponentHost } from './host'
|
|
15
|
+
import { checkedProp } from './props'
|
|
6
16
|
import UiBadge from './UiBadge.vue'
|
|
7
17
|
import UiTooltip from './UiTooltip.vue'
|
|
8
18
|
|
|
9
19
|
defineOptions({ inheritAttrs: false })
|
|
10
20
|
|
|
11
|
-
const props =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
allowCreate: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
23
|
+
allowFreeText: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
24
|
+
clearable: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
25
|
+
disabled: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
26
|
+
disclosure: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
27
|
+
filter: { type: null as unknown as PropType<'label' | 'none' | null>, default: 'label' },
|
|
28
|
+
help: { type: null as unknown as PropType<string | null>, default: '' },
|
|
29
|
+
invalid: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
30
|
+
items: {
|
|
31
|
+
type: null as unknown as PropType<
|
|
22
32
|
readonly ({
|
|
23
33
|
readonly id: string
|
|
24
34
|
readonly value: string
|
|
@@ -31,57 +41,342 @@ const props = withDefaults(
|
|
|
31
41
|
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
32
42
|
readonly color?: string
|
|
33
43
|
}
|
|
34
|
-
})[]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
loading?: boolean
|
|
38
|
-
multiple?: boolean
|
|
39
|
-
name?: string
|
|
40
|
-
openOnFocus?: boolean
|
|
41
|
-
placeholder?: string
|
|
42
|
-
query?: string
|
|
43
|
-
readonly?: boolean
|
|
44
|
-
required?: boolean
|
|
45
|
-
selectedValues?: readonly (string)[]
|
|
46
|
-
size?: 'sm' | 'md' | 'lg'
|
|
47
|
-
tokenSeparators?: readonly (string)[]
|
|
48
|
-
value?: string | null
|
|
49
|
-
}>(),
|
|
50
|
-
{
|
|
51
|
-
allowCreate: false,
|
|
52
|
-
allowFreeText: false,
|
|
53
|
-
clearable: false,
|
|
54
|
-
disabled: false,
|
|
55
|
-
disclosure: false,
|
|
56
|
-
filter: 'label',
|
|
57
|
-
help: '',
|
|
58
|
-
invalid: false,
|
|
59
|
-
label: '',
|
|
60
|
-
labelVisibility: 'visible',
|
|
61
|
-
loading: false,
|
|
62
|
-
multiple: false,
|
|
63
|
-
name: '',
|
|
64
|
-
openOnFocus: false,
|
|
65
|
-
placeholder: '',
|
|
66
|
-
readonly: false,
|
|
67
|
-
required: false,
|
|
68
|
-
size: 'md',
|
|
44
|
+
})[] | null
|
|
45
|
+
>,
|
|
46
|
+
default: null,
|
|
69
47
|
},
|
|
70
|
-
|
|
48
|
+
label: { type: null as unknown as PropType<string | null>, default: '' },
|
|
49
|
+
labelVisibility: {
|
|
50
|
+
type: null as unknown as PropType<'visible' | 'sr-only' | null>,
|
|
51
|
+
default: 'visible',
|
|
52
|
+
},
|
|
53
|
+
loading: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
54
|
+
multiple: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
55
|
+
name: { type: null as unknown as PropType<string | null>, default: '' },
|
|
56
|
+
openOnFocus: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
57
|
+
placeholder: { type: null as unknown as PropType<string | null>, default: '' },
|
|
58
|
+
query: { type: null as unknown as PropType<string | null>, default: null },
|
|
59
|
+
readonly: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
60
|
+
required: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
61
|
+
selectedValues: { type: null as unknown as PropType<readonly (string)[] | null>, default: null },
|
|
62
|
+
size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null>, default: 'md' },
|
|
63
|
+
tokenSeparators: { type: null as unknown as PropType<readonly (string)[] | null>, default: null },
|
|
64
|
+
value: { type: null as unknown as PropType<string | null>, default: null },
|
|
65
|
+
})
|
|
66
|
+
const checkedProps = computed(() => ({
|
|
67
|
+
allowCreate: checkedProp<boolean>(
|
|
68
|
+
props['allowCreate'],
|
|
69
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
70
|
+
false,
|
|
71
|
+
'allowCreate',
|
|
72
|
+
undefined,
|
|
73
|
+
undefined,
|
|
74
|
+
) as boolean,
|
|
75
|
+
allowFreeText: checkedProp<boolean>(
|
|
76
|
+
props['allowFreeText'],
|
|
77
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
78
|
+
false,
|
|
79
|
+
'allowFreeText',
|
|
80
|
+
undefined,
|
|
81
|
+
undefined,
|
|
82
|
+
) as boolean,
|
|
83
|
+
clearable: checkedProp<boolean>(
|
|
84
|
+
props['clearable'],
|
|
85
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
86
|
+
false,
|
|
87
|
+
'clearable',
|
|
88
|
+
undefined,
|
|
89
|
+
undefined,
|
|
90
|
+
) as boolean,
|
|
91
|
+
disabled: checkedProp<boolean>(
|
|
92
|
+
props['disabled'],
|
|
93
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
94
|
+
false,
|
|
95
|
+
'disabled',
|
|
96
|
+
undefined,
|
|
97
|
+
undefined,
|
|
98
|
+
) as boolean,
|
|
99
|
+
disclosure: checkedProp<boolean>(
|
|
100
|
+
props['disclosure'],
|
|
101
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
102
|
+
false,
|
|
103
|
+
'disclosure',
|
|
104
|
+
undefined,
|
|
105
|
+
undefined,
|
|
106
|
+
) as boolean,
|
|
107
|
+
filter: checkedProp<'label' | 'none'>(
|
|
108
|
+
props['filter'],
|
|
109
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
110
|
+
false,
|
|
111
|
+
'filter',
|
|
112
|
+
undefined,
|
|
113
|
+
['label', 'none'],
|
|
114
|
+
) as 'label' | 'none',
|
|
115
|
+
help: checkedProp<string>(
|
|
116
|
+
props['help'],
|
|
117
|
+
{ kind: 'terminal', name: 'string' },
|
|
118
|
+
false,
|
|
119
|
+
'help',
|
|
120
|
+
undefined,
|
|
121
|
+
undefined,
|
|
122
|
+
) as string,
|
|
123
|
+
invalid: checkedProp<boolean>(
|
|
124
|
+
props['invalid'],
|
|
125
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
126
|
+
false,
|
|
127
|
+
'invalid',
|
|
128
|
+
undefined,
|
|
129
|
+
undefined,
|
|
130
|
+
) as boolean,
|
|
131
|
+
items: checkedProp<
|
|
132
|
+
readonly ({
|
|
133
|
+
readonly id: string
|
|
134
|
+
readonly value: string
|
|
135
|
+
readonly label: string
|
|
136
|
+
readonly group?: string
|
|
137
|
+
readonly disabled?: boolean
|
|
138
|
+
readonly description?: string
|
|
139
|
+
readonly tag?: {
|
|
140
|
+
readonly label: string
|
|
141
|
+
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
142
|
+
readonly color?: string
|
|
143
|
+
}
|
|
144
|
+
})[]
|
|
145
|
+
>(
|
|
146
|
+
props['items'],
|
|
147
|
+
{
|
|
148
|
+
kind: 'list',
|
|
149
|
+
item: {
|
|
150
|
+
kind: 'object',
|
|
151
|
+
fields: [
|
|
152
|
+
{ name: 'id', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
153
|
+
{ name: 'value', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
154
|
+
{ name: 'label', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
155
|
+
{ name: 'group', type: { kind: 'terminal', name: 'string' }, optional: true },
|
|
156
|
+
{ name: 'disabled', type: { kind: 'terminal', name: 'boolean' }, optional: true },
|
|
157
|
+
{ name: 'description', type: { kind: 'terminal', name: 'string' }, optional: true },
|
|
158
|
+
{
|
|
159
|
+
name: 'tag',
|
|
160
|
+
type: {
|
|
161
|
+
kind: 'object',
|
|
162
|
+
fields: [{
|
|
163
|
+
name: 'label',
|
|
164
|
+
type: { kind: 'terminal', name: 'string' },
|
|
165
|
+
optional: false,
|
|
166
|
+
}, {
|
|
167
|
+
name: 'tone',
|
|
168
|
+
type: {
|
|
169
|
+
kind: 'constrained',
|
|
170
|
+
base: { kind: 'terminal', name: 'keyword' },
|
|
171
|
+
values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
172
|
+
},
|
|
173
|
+
optional: true,
|
|
174
|
+
}, { name: 'color', type: { kind: 'terminal', name: 'string' }, optional: true }],
|
|
175
|
+
open: false,
|
|
176
|
+
},
|
|
177
|
+
optional: true,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
open: false,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
false,
|
|
184
|
+
'items',
|
|
185
|
+
undefined,
|
|
186
|
+
undefined,
|
|
187
|
+
),
|
|
188
|
+
label: checkedProp<string>(
|
|
189
|
+
props['label'],
|
|
190
|
+
{ kind: 'terminal', name: 'string' },
|
|
191
|
+
false,
|
|
192
|
+
'label',
|
|
193
|
+
undefined,
|
|
194
|
+
undefined,
|
|
195
|
+
) as string,
|
|
196
|
+
labelVisibility: checkedProp<'visible' | 'sr-only'>(
|
|
197
|
+
props['labelVisibility'],
|
|
198
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
199
|
+
false,
|
|
200
|
+
'labelVisibility',
|
|
201
|
+
undefined,
|
|
202
|
+
['visible', 'sr-only'],
|
|
203
|
+
) as 'visible' | 'sr-only',
|
|
204
|
+
loading: checkedProp<boolean>(
|
|
205
|
+
props['loading'],
|
|
206
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
207
|
+
false,
|
|
208
|
+
'loading',
|
|
209
|
+
undefined,
|
|
210
|
+
undefined,
|
|
211
|
+
) as boolean,
|
|
212
|
+
multiple: checkedProp<boolean>(
|
|
213
|
+
props['multiple'],
|
|
214
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
215
|
+
false,
|
|
216
|
+
'multiple',
|
|
217
|
+
undefined,
|
|
218
|
+
undefined,
|
|
219
|
+
) as boolean,
|
|
220
|
+
name: checkedProp<string>(
|
|
221
|
+
props['name'],
|
|
222
|
+
{ kind: 'terminal', name: 'string' },
|
|
223
|
+
false,
|
|
224
|
+
'name',
|
|
225
|
+
undefined,
|
|
226
|
+
undefined,
|
|
227
|
+
) as string,
|
|
228
|
+
openOnFocus: checkedProp<boolean>(
|
|
229
|
+
props['openOnFocus'],
|
|
230
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
231
|
+
false,
|
|
232
|
+
'openOnFocus',
|
|
233
|
+
undefined,
|
|
234
|
+
undefined,
|
|
235
|
+
) as boolean,
|
|
236
|
+
placeholder: checkedProp<string>(
|
|
237
|
+
props['placeholder'],
|
|
238
|
+
{ kind: 'terminal', name: 'string' },
|
|
239
|
+
false,
|
|
240
|
+
'placeholder',
|
|
241
|
+
undefined,
|
|
242
|
+
undefined,
|
|
243
|
+
) as string,
|
|
244
|
+
query: checkedProp<string>(
|
|
245
|
+
props['query'],
|
|
246
|
+
{ kind: 'terminal', name: 'string' },
|
|
247
|
+
false,
|
|
248
|
+
'query',
|
|
249
|
+
undefined,
|
|
250
|
+
undefined,
|
|
251
|
+
),
|
|
252
|
+
readonly: checkedProp<boolean>(
|
|
253
|
+
props['readonly'],
|
|
254
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
255
|
+
false,
|
|
256
|
+
'readonly',
|
|
257
|
+
undefined,
|
|
258
|
+
undefined,
|
|
259
|
+
) as boolean,
|
|
260
|
+
required: checkedProp<boolean>(
|
|
261
|
+
props['required'],
|
|
262
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
263
|
+
false,
|
|
264
|
+
'required',
|
|
265
|
+
undefined,
|
|
266
|
+
undefined,
|
|
267
|
+
) as boolean,
|
|
268
|
+
selectedValues: checkedProp<readonly (string)[]>(
|
|
269
|
+
props['selectedValues'],
|
|
270
|
+
{ kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
271
|
+
false,
|
|
272
|
+
'selectedValues',
|
|
273
|
+
undefined,
|
|
274
|
+
undefined,
|
|
275
|
+
),
|
|
276
|
+
size: checkedProp<'sm' | 'md' | 'lg'>(
|
|
277
|
+
props['size'],
|
|
278
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
279
|
+
false,
|
|
280
|
+
'size',
|
|
281
|
+
undefined,
|
|
282
|
+
['sm', 'md', 'lg'],
|
|
283
|
+
) as 'sm' | 'md' | 'lg',
|
|
284
|
+
tokenSeparators: checkedProp<readonly (string)[]>(
|
|
285
|
+
props['tokenSeparators'],
|
|
286
|
+
{ kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
287
|
+
false,
|
|
288
|
+
'tokenSeparators',
|
|
289
|
+
undefined,
|
|
290
|
+
undefined,
|
|
291
|
+
),
|
|
292
|
+
value: checkedProp<string>(
|
|
293
|
+
props['value'],
|
|
294
|
+
{ kind: 'terminal', name: 'string' },
|
|
295
|
+
false,
|
|
296
|
+
'value',
|
|
297
|
+
undefined,
|
|
298
|
+
undefined,
|
|
299
|
+
),
|
|
300
|
+
}))
|
|
301
|
+
void checkedProps.value
|
|
302
|
+
watchSyncEffect(() => {
|
|
303
|
+
void checkedProps.value
|
|
304
|
+
})
|
|
305
|
+
function nativeAttrs(attrs: Record<string, unknown>): Record<string, unknown> {
|
|
306
|
+
const names = Object.keys(attrs)
|
|
307
|
+
if (!names.some((name) => Object.hasOwn(Object.prototype, name))) return attrs
|
|
308
|
+
return Object.fromEntries(names.map((name) => [
|
|
309
|
+
Object.hasOwn(Object.prototype, name)
|
|
310
|
+
? name === '__proto__' ? '__Proto__' : name[0]!.toUpperCase() + name.slice(1)
|
|
311
|
+
: name,
|
|
312
|
+
attrs[name],
|
|
313
|
+
]))
|
|
314
|
+
}
|
|
315
|
+
const KeyedFailure = defineComponent({
|
|
316
|
+
props: { error: { type: null, required: true } },
|
|
317
|
+
setup(props) {
|
|
318
|
+
return () => {
|
|
319
|
+
throw props.error
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
})
|
|
323
|
+
const KeyedBoundary = defineComponent({
|
|
324
|
+
setup(_props, { slots }) {
|
|
325
|
+
let last: VNode[] = []
|
|
326
|
+
return () => {
|
|
327
|
+
try {
|
|
328
|
+
last = slots.default?.() ?? []
|
|
329
|
+
return last
|
|
330
|
+
} catch (error) {
|
|
331
|
+
if (
|
|
332
|
+
!(error instanceof Error)
|
|
333
|
+
|| (error as Error & { diagnostic?: { code?: string } }).diagnostic?.code !== 'HR004'
|
|
334
|
+
) throw error
|
|
335
|
+
if (typeof window === 'undefined') throw error
|
|
336
|
+
return [...last, h(KeyedFailure, { error })]
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
})
|
|
341
|
+
const componentInstance = getCurrentInstance()
|
|
342
|
+
function reflectedProp(
|
|
343
|
+
name: string,
|
|
344
|
+
kebab: string,
|
|
345
|
+
value: unknown,
|
|
346
|
+
fallback: string | undefined,
|
|
347
|
+
bound: boolean,
|
|
348
|
+
separator?: string,
|
|
349
|
+
): string | undefined {
|
|
350
|
+
const incoming = componentInstance?.vnode.props
|
|
351
|
+
if (
|
|
352
|
+
!bound
|
|
353
|
+
&& (incoming === null || incoming === undefined
|
|
354
|
+
|| (!Object.hasOwn(incoming, name) && !Object.hasOwn(incoming, kebab)))
|
|
355
|
+
) return fallback
|
|
356
|
+
if (value === null || value === undefined) return undefined
|
|
357
|
+
return Array.isArray(value) && separator !== undefined
|
|
358
|
+
? value.join(separator)
|
|
359
|
+
: typeof value === 'object'
|
|
360
|
+
? JSON.stringify(value)
|
|
361
|
+
: String(value)
|
|
362
|
+
}
|
|
363
|
+
const hydrationInstance = getCurrentInstance()
|
|
71
364
|
const emit = defineEmits<{
|
|
72
365
|
'update:query': [value: string]
|
|
73
366
|
'update:selectedValues': [value: readonly (string)[]]
|
|
74
|
-
'update:value': [value: string
|
|
367
|
+
'update:value': [value: string]
|
|
75
368
|
'query-change': [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
369
|
+
event: CustomEvent<
|
|
370
|
+
{
|
|
371
|
+
readonly query: string
|
|
372
|
+
readonly display: string
|
|
373
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
374
|
+
}
|
|
375
|
+
>,
|
|
81
376
|
]
|
|
82
377
|
'value-change': [
|
|
83
|
-
|
|
84
|
-
|
|
378
|
+
event: CustomEvent<
|
|
379
|
+
{
|
|
85
380
|
readonly value: string | null
|
|
86
381
|
readonly query: string
|
|
87
382
|
readonly option: {
|
|
@@ -100,7 +395,11 @@ const emit = defineEmits<{
|
|
|
100
395
|
readonly kind: 'selection' | 'clear' | 'free-entry' | 'create'
|
|
101
396
|
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
102
397
|
}
|
|
103
|
-
|
|
398
|
+
>,
|
|
399
|
+
]
|
|
400
|
+
'items-change': [
|
|
401
|
+
event: CustomEvent<
|
|
402
|
+
readonly ({
|
|
104
403
|
readonly id: string
|
|
105
404
|
readonly value: string
|
|
106
405
|
readonly label: string
|
|
@@ -112,66 +411,73 @@ const emit = defineEmits<{
|
|
|
112
411
|
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
113
412
|
readonly color?: string
|
|
114
413
|
}
|
|
115
|
-
})[]
|
|
414
|
+
})[]
|
|
415
|
+
>,
|
|
116
416
|
]
|
|
117
417
|
'free-entry': [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
readonly
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
readonly group?: string
|
|
126
|
-
readonly disabled?: boolean
|
|
127
|
-
readonly description?: string
|
|
128
|
-
readonly tag?: {
|
|
418
|
+
event: CustomEvent<
|
|
419
|
+
{
|
|
420
|
+
readonly value: string | null
|
|
421
|
+
readonly query: string
|
|
422
|
+
readonly option: {
|
|
423
|
+
readonly id: string
|
|
424
|
+
readonly value: string
|
|
129
425
|
readonly label: string
|
|
130
|
-
readonly
|
|
131
|
-
readonly
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
426
|
+
readonly group?: string
|
|
427
|
+
readonly disabled?: boolean
|
|
428
|
+
readonly description?: string
|
|
429
|
+
readonly tag?: {
|
|
430
|
+
readonly label: string
|
|
431
|
+
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
432
|
+
readonly color?: string
|
|
433
|
+
}
|
|
434
|
+
} | null
|
|
435
|
+
readonly kind: 'selection' | 'clear' | 'free-entry' | 'create'
|
|
436
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
437
|
+
}
|
|
438
|
+
>,
|
|
137
439
|
]
|
|
138
440
|
'create-entry': [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
readonly
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
readonly group?: string
|
|
147
|
-
readonly disabled?: boolean
|
|
148
|
-
readonly description?: string
|
|
149
|
-
readonly tag?: {
|
|
441
|
+
event: CustomEvent<
|
|
442
|
+
{
|
|
443
|
+
readonly value: string | null
|
|
444
|
+
readonly query: string
|
|
445
|
+
readonly option: {
|
|
446
|
+
readonly id: string
|
|
447
|
+
readonly value: string
|
|
150
448
|
readonly label: string
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
449
|
+
readonly group?: string
|
|
450
|
+
readonly disabled?: boolean
|
|
451
|
+
readonly description?: string
|
|
452
|
+
readonly tag?: {
|
|
453
|
+
readonly label: string
|
|
454
|
+
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
455
|
+
readonly color?: string
|
|
456
|
+
}
|
|
457
|
+
} | null
|
|
458
|
+
readonly kind: 'selection' | 'clear' | 'free-entry' | 'create'
|
|
459
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
460
|
+
}
|
|
461
|
+
>,
|
|
158
462
|
]
|
|
159
463
|
'validation-change': [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
readonly
|
|
166
|
-
readonly
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
464
|
+
event: CustomEvent<
|
|
465
|
+
{
|
|
466
|
+
readonly status: 'pristine' | 'pending' | 'valid' | 'warning' | 'error'
|
|
467
|
+
readonly touched: boolean
|
|
468
|
+
readonly dirty: boolean
|
|
469
|
+
readonly issues:
|
|
470
|
+
readonly ({
|
|
471
|
+
readonly message: string
|
|
472
|
+
readonly path?: readonly (unknown)[]
|
|
473
|
+
readonly severity?: 'error' | 'warning'
|
|
474
|
+
})[]
|
|
475
|
+
readonly output?: unknown
|
|
476
|
+
}
|
|
477
|
+
>,
|
|
172
478
|
]
|
|
173
479
|
'options-change': [
|
|
174
|
-
|
|
480
|
+
event: CustomEvent<
|
|
175
481
|
readonly ({
|
|
176
482
|
readonly id: string
|
|
177
483
|
readonly value: string
|
|
@@ -184,54 +490,63 @@ const emit = defineEmits<{
|
|
|
184
490
|
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
185
491
|
readonly color?: string
|
|
186
492
|
}
|
|
187
|
-
})[]
|
|
493
|
+
})[]
|
|
494
|
+
>,
|
|
188
495
|
]
|
|
189
496
|
'add-item': [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
readonly
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
readonly group?: string
|
|
196
|
-
readonly disabled?: boolean
|
|
197
|
-
readonly description?: string
|
|
198
|
-
readonly tag?: {
|
|
497
|
+
event: CustomEvent<
|
|
498
|
+
{
|
|
499
|
+
readonly item: {
|
|
500
|
+
readonly id: string
|
|
501
|
+
readonly value: string
|
|
199
502
|
readonly label: string
|
|
200
|
-
readonly
|
|
201
|
-
readonly
|
|
503
|
+
readonly group?: string
|
|
504
|
+
readonly disabled?: boolean
|
|
505
|
+
readonly description?: string
|
|
506
|
+
readonly tag?: {
|
|
507
|
+
readonly label: string
|
|
508
|
+
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
509
|
+
readonly color?: string
|
|
510
|
+
}
|
|
202
511
|
}
|
|
512
|
+
readonly index: number
|
|
513
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
203
514
|
}
|
|
204
|
-
|
|
205
|
-
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
206
|
-
},
|
|
515
|
+
>,
|
|
207
516
|
]
|
|
208
517
|
'remove-item': [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
readonly
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
readonly group?: string
|
|
215
|
-
readonly disabled?: boolean
|
|
216
|
-
readonly description?: string
|
|
217
|
-
readonly tag?: {
|
|
518
|
+
event: CustomEvent<
|
|
519
|
+
{
|
|
520
|
+
readonly item: {
|
|
521
|
+
readonly id: string
|
|
522
|
+
readonly value: string
|
|
218
523
|
readonly label: string
|
|
219
|
-
readonly
|
|
220
|
-
readonly
|
|
524
|
+
readonly group?: string
|
|
525
|
+
readonly disabled?: boolean
|
|
526
|
+
readonly description?: string
|
|
527
|
+
readonly tag?: {
|
|
528
|
+
readonly label: string
|
|
529
|
+
readonly tone?: 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'
|
|
530
|
+
readonly color?: string
|
|
531
|
+
}
|
|
221
532
|
}
|
|
533
|
+
readonly index: number
|
|
534
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
222
535
|
}
|
|
223
|
-
|
|
224
|
-
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
225
|
-
},
|
|
536
|
+
>,
|
|
226
537
|
]
|
|
227
538
|
'create-item': [
|
|
228
|
-
|
|
539
|
+
event: CustomEvent<
|
|
540
|
+
{ readonly query: string; readonly trigger: 'keyboard' | 'pointer' | 'programmatic' }
|
|
541
|
+
>,
|
|
229
542
|
]
|
|
230
543
|
'selected-values-change': [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
544
|
+
event: CustomEvent<
|
|
545
|
+
{
|
|
546
|
+
readonly selectedValues: readonly (string)[]
|
|
547
|
+
readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
|
|
548
|
+
}
|
|
549
|
+
>,
|
|
235
550
|
]
|
|
236
551
|
}>()
|
|
237
552
|
|
|
@@ -319,15 +634,50 @@ const createIndex = ref(0)
|
|
|
319
634
|
const message = ref('')
|
|
320
635
|
const statusText = ref('')
|
|
321
636
|
const validationStatus = ref('pristine')
|
|
637
|
+
let guardedPrevious: any
|
|
638
|
+
const guarded = computed(() => {
|
|
639
|
+
if (
|
|
640
|
+
!(internalItems.value?.['0'] == null
|
|
641
|
+
|| (typeof internalItems.value?.['0'] === 'object' && internalItems.value?.['0'] !== null
|
|
642
|
+
&& !Array.isArray(internalItems.value?.['0'])))
|
|
643
|
+
) return guardedPrevious
|
|
644
|
+
return guardedPrevious = checkedProps.value.required
|
|
645
|
+
&& !(checkedProps.value.multiple && internalItems.value[0])
|
|
646
|
+
})
|
|
647
|
+
let guardedBindingPrevious: any
|
|
648
|
+
const guardedBinding = computed(() => {
|
|
649
|
+
if (
|
|
650
|
+
!(selected.value == null || (typeof selected.value === 'string' || selected.value === null))
|
|
651
|
+
) return guardedBindingPrevious
|
|
652
|
+
return guardedBindingPrevious = checkedProps.value.disabled || checkedProps.value.readonly
|
|
653
|
+
|| (!raw.value && (checkedProps.value.multiple || selected.value === null))
|
|
654
|
+
})
|
|
655
|
+
const hydrationNode = hydrationInstance?.vnode.el
|
|
656
|
+
if (
|
|
657
|
+
typeof window !== 'undefined' && hydrationNode != null
|
|
658
|
+
&& (!(hydrationNode instanceof Element) || hydrationNode.localName !== ('div'))
|
|
659
|
+
) {
|
|
660
|
+
throw Object.assign(
|
|
661
|
+
new Error('HR005: Server markup for <ui-combobox> has an incompatible root.'),
|
|
662
|
+
{
|
|
663
|
+
name: 'HtmlDiagnosticError',
|
|
664
|
+
diagnostic: Object.freeze({
|
|
665
|
+
code: 'HR005',
|
|
666
|
+
message: 'Server markup for <ui-combobox> has an incompatible root.',
|
|
667
|
+
}),
|
|
668
|
+
},
|
|
669
|
+
)
|
|
670
|
+
}
|
|
322
671
|
|
|
323
672
|
/** The values the styles' :host-state() rules test. */
|
|
324
673
|
const hostState = computed(() =>
|
|
325
674
|
[
|
|
326
|
-
|
|
675
|
+
checkedProps.value.size && 'size',
|
|
676
|
+
checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`,
|
|
327
677
|
validationStatus.value && 'validationStatus',
|
|
328
678
|
`validationStatus=${encodeURIComponent(validationStatus.value)}`,
|
|
329
|
-
|
|
330
|
-
|
|
679
|
+
checkedProps.value.invalid && 'invalid',
|
|
680
|
+
checkedProps.value.multiple && 'multiple',
|
|
331
681
|
].filter(Boolean).join(' ')
|
|
332
682
|
)
|
|
333
683
|
|
|
@@ -340,137 +690,6 @@ const isQueryChangeDetail = (detail: unknown): boolean =>
|
|
|
340
690
|
|| (detail as Record<string, unknown>)['trigger'] === 'programmatic')
|
|
341
691
|
&& Object.keys(detail as object).every((key) => ['query', 'display', 'trigger'].includes(key))
|
|
342
692
|
const isValueChangeDetail = (detail: unknown): boolean =>
|
|
343
|
-
(detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
344
|
-
&& (typeof (detail as Record<string, unknown>)['value'] === 'string'
|
|
345
|
-
|| (detail as Record<string, unknown>)['value'] === null)
|
|
346
|
-
&& typeof (detail as Record<string, unknown>)['query'] === 'string'
|
|
347
|
-
&& (((detail as Record<string, unknown>)['option'] !== null
|
|
348
|
-
&& typeof (detail as Record<string, unknown>)['option'] === 'object'
|
|
349
|
-
&& !Array.isArray((detail as Record<string, unknown>)['option'])
|
|
350
|
-
&& typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['id']
|
|
351
|
-
=== 'string'
|
|
352
|
-
&& typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['value']
|
|
353
|
-
=== 'string'
|
|
354
|
-
&& typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['label']
|
|
355
|
-
=== 'string'
|
|
356
|
-
&& (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['group']
|
|
357
|
-
=== undefined
|
|
358
|
-
|| typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
359
|
-
'group'
|
|
360
|
-
] === 'string')
|
|
361
|
-
&& (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['disabled']
|
|
362
|
-
=== undefined
|
|
363
|
-
|| typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
364
|
-
'disabled'
|
|
365
|
-
] === 'boolean')
|
|
366
|
-
&& (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['description']
|
|
367
|
-
=== undefined
|
|
368
|
-
|| typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
369
|
-
'description'
|
|
370
|
-
] === 'string')
|
|
371
|
-
&& (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['tag']
|
|
372
|
-
=== undefined
|
|
373
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['tag']
|
|
374
|
-
!== null
|
|
375
|
-
&& typeof ((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
376
|
-
'tag'
|
|
377
|
-
] === 'object'
|
|
378
|
-
&& !Array.isArray(
|
|
379
|
-
((detail as Record<string, unknown>)['option'] as Record<string, unknown>)['tag'],
|
|
380
|
-
)
|
|
381
|
-
&& typeof (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
382
|
-
'tag'
|
|
383
|
-
] as Record<string, unknown>)['label'] === 'string'
|
|
384
|
-
&& ((((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
385
|
-
'tag'
|
|
386
|
-
] as Record<string, unknown>)['tone'] === undefined
|
|
387
|
-
|| ((((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
388
|
-
'tag'
|
|
389
|
-
] as Record<string, unknown>)['tone'] === 'neutral'
|
|
390
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
391
|
-
'tag'
|
|
392
|
-
] as Record<string, unknown>)['tone'] === 'accent'
|
|
393
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
394
|
-
'tag'
|
|
395
|
-
] as Record<string, unknown>)['tone'] === 'info'
|
|
396
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
397
|
-
'tag'
|
|
398
|
-
] as Record<string, unknown>)['tone'] === 'success'
|
|
399
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
400
|
-
'tag'
|
|
401
|
-
] as Record<string, unknown>)['tone'] === 'warning'
|
|
402
|
-
|| (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
403
|
-
'tag'
|
|
404
|
-
] as Record<string, unknown>)['tone'] === 'danger'))
|
|
405
|
-
&& ((((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
406
|
-
'tag'
|
|
407
|
-
] as Record<string, unknown>)['color'] === undefined
|
|
408
|
-
|| typeof (((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
409
|
-
'tag'
|
|
410
|
-
] as Record<string, unknown>)['color'] === 'string')
|
|
411
|
-
&& Object.keys(
|
|
412
|
-
((detail as Record<string, unknown>)['option'] as Record<string, unknown>)[
|
|
413
|
-
'tag'
|
|
414
|
-
] as object,
|
|
415
|
-
).every((key) => ['label', 'tone', 'color'].includes(key))))
|
|
416
|
-
&& Object.keys((detail as Record<string, unknown>)['option'] as object).every((key) =>
|
|
417
|
-
['id', 'value', 'label', 'group', 'disabled', 'description', 'tag'].includes(key)
|
|
418
|
-
)) || (detail as Record<string, unknown>)['option'] === null)
|
|
419
|
-
&& ((detail as Record<string, unknown>)['kind'] === 'selection'
|
|
420
|
-
|| (detail as Record<string, unknown>)['kind'] === 'clear'
|
|
421
|
-
|| (detail as Record<string, unknown>)['kind'] === 'free-entry'
|
|
422
|
-
|| (detail as Record<string, unknown>)['kind'] === 'create')
|
|
423
|
-
&& ((detail as Record<string, unknown>)['trigger'] === 'keyboard'
|
|
424
|
-
|| (detail as Record<string, unknown>)['trigger'] === 'pointer'
|
|
425
|
-
|| (detail as Record<string, unknown>)['trigger'] === 'programmatic')
|
|
426
|
-
&& Object.keys(detail as object).every((key) =>
|
|
427
|
-
['value', 'query', 'option', 'kind', 'trigger'].includes(key)
|
|
428
|
-
))
|
|
429
|
-
|| (Array.isArray(detail)
|
|
430
|
-
&& (detail as unknown[]).every((
|
|
431
|
-
item: unknown,
|
|
432
|
-
) => (item !== null && typeof item === 'object' && !Array.isArray(item)
|
|
433
|
-
&& typeof (item as Record<string, unknown>)['id'] === 'string'
|
|
434
|
-
&& typeof (item as Record<string, unknown>)['value'] === 'string'
|
|
435
|
-
&& typeof (item as Record<string, unknown>)['label'] === 'string'
|
|
436
|
-
&& ((item as Record<string, unknown>)['group'] === undefined
|
|
437
|
-
|| typeof (item as Record<string, unknown>)['group'] === 'string')
|
|
438
|
-
&& ((item as Record<string, unknown>)['disabled'] === undefined
|
|
439
|
-
|| typeof (item as Record<string, unknown>)['disabled'] === 'boolean')
|
|
440
|
-
&& ((item as Record<string, unknown>)['description'] === undefined
|
|
441
|
-
|| typeof (item as Record<string, unknown>)['description'] === 'string')
|
|
442
|
-
&& ((item as Record<string, unknown>)['tag'] === undefined
|
|
443
|
-
|| ((item as Record<string, unknown>)['tag'] !== null
|
|
444
|
-
&& typeof (item as Record<string, unknown>)['tag'] === 'object'
|
|
445
|
-
&& !Array.isArray((item as Record<string, unknown>)['tag'])
|
|
446
|
-
&& typeof ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['label']
|
|
447
|
-
=== 'string'
|
|
448
|
-
&& (((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
449
|
-
=== undefined
|
|
450
|
-
|| (((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
451
|
-
=== 'neutral'
|
|
452
|
-
|| ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
453
|
-
=== 'accent'
|
|
454
|
-
|| ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
455
|
-
=== 'info'
|
|
456
|
-
|| ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
457
|
-
=== 'success'
|
|
458
|
-
|| ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
459
|
-
=== 'warning'
|
|
460
|
-
|| ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['tone']
|
|
461
|
-
=== 'danger'))
|
|
462
|
-
&& (((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['color']
|
|
463
|
-
=== undefined
|
|
464
|
-
|| typeof ((item as Record<string, unknown>)['tag'] as Record<string, unknown>)['color']
|
|
465
|
-
=== 'string')
|
|
466
|
-
&& Object.keys((item as Record<string, unknown>)['tag'] as object).every((key) =>
|
|
467
|
-
['label', 'tone', 'color'].includes(key)
|
|
468
|
-
)))
|
|
469
|
-
&& Object.keys(item as object).every((key) =>
|
|
470
|
-
['id', 'value', 'label', 'group', 'disabled', 'description', 'tag'].includes(key)
|
|
471
|
-
))
|
|
472
|
-
))
|
|
473
|
-
const isFreeEntryDetail = (detail: unknown): boolean =>
|
|
474
693
|
detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
475
694
|
&& (typeof (detail as Record<string, unknown>)['value'] === 'string'
|
|
476
695
|
|| (detail as Record<string, unknown>)['value'] === null)
|
|
@@ -555,37 +774,7 @@ const isFreeEntryDetail = (detail: unknown): boolean =>
|
|
|
555
774
|
&& Object.keys(detail as object).every((key) =>
|
|
556
775
|
['value', 'query', 'option', 'kind', 'trigger'].includes(key)
|
|
557
776
|
)
|
|
558
|
-
const
|
|
559
|
-
detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
560
|
-
&& ((detail as Record<string, unknown>)['status'] === 'pristine'
|
|
561
|
-
|| (detail as Record<string, unknown>)['status'] === 'pending'
|
|
562
|
-
|| (detail as Record<string, unknown>)['status'] === 'valid'
|
|
563
|
-
|| (detail as Record<string, unknown>)['status'] === 'warning'
|
|
564
|
-
|| (detail as Record<string, unknown>)['status'] === 'error')
|
|
565
|
-
&& typeof (detail as Record<string, unknown>)['touched'] === 'boolean'
|
|
566
|
-
&& typeof (detail as Record<string, unknown>)['dirty'] === 'boolean'
|
|
567
|
-
&& (Array.isArray((detail as Record<string, unknown>)['issues'])
|
|
568
|
-
&& ((detail as Record<string, unknown>)['issues'] as unknown[]).every((
|
|
569
|
-
item: unknown,
|
|
570
|
-
) => (item !== null && typeof item === 'object' && !Array.isArray(item)
|
|
571
|
-
&& typeof (item as Record<string, unknown>)['message'] === 'string'
|
|
572
|
-
&& ((item as Record<string, unknown>)['path'] === undefined
|
|
573
|
-
|| (Array.isArray((item as Record<string, unknown>)['path'])
|
|
574
|
-
&& ((item as Record<string, unknown>)['path'] as unknown[]).every((item: unknown) =>
|
|
575
|
-
true
|
|
576
|
-
)))
|
|
577
|
-
&& ((item as Record<string, unknown>)['severity'] === undefined
|
|
578
|
-
|| ((item as Record<string, unknown>)['severity'] === 'error'
|
|
579
|
-
|| (item as Record<string, unknown>)['severity'] === 'warning'))
|
|
580
|
-
&& Object.keys(item as object).every((key) =>
|
|
581
|
-
['message', 'path', 'severity'].includes(key)
|
|
582
|
-
))
|
|
583
|
-
))
|
|
584
|
-
&& ((detail as Record<string, unknown>)['output'] === undefined || true)
|
|
585
|
-
&& Object.keys(detail as object).every((key) =>
|
|
586
|
-
['status', 'touched', 'dirty', 'issues', 'output'].includes(key)
|
|
587
|
-
)
|
|
588
|
-
const isOptionsChangeDetail = (detail: unknown): boolean =>
|
|
777
|
+
const isItemsChangeDetail = (detail: unknown): boolean =>
|
|
589
778
|
Array.isArray(detail)
|
|
590
779
|
&& (detail as unknown[]).every((
|
|
591
780
|
item: unknown,
|
|
@@ -630,6 +819,36 @@ const isOptionsChangeDetail = (detail: unknown): boolean =>
|
|
|
630
819
|
['id', 'value', 'label', 'group', 'disabled', 'description', 'tag'].includes(key)
|
|
631
820
|
))
|
|
632
821
|
)
|
|
822
|
+
const isValidationChangeDetail = (detail: unknown): boolean =>
|
|
823
|
+
detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
824
|
+
&& ((detail as Record<string, unknown>)['status'] === 'pristine'
|
|
825
|
+
|| (detail as Record<string, unknown>)['status'] === 'pending'
|
|
826
|
+
|| (detail as Record<string, unknown>)['status'] === 'valid'
|
|
827
|
+
|| (detail as Record<string, unknown>)['status'] === 'warning'
|
|
828
|
+
|| (detail as Record<string, unknown>)['status'] === 'error')
|
|
829
|
+
&& typeof (detail as Record<string, unknown>)['touched'] === 'boolean'
|
|
830
|
+
&& typeof (detail as Record<string, unknown>)['dirty'] === 'boolean'
|
|
831
|
+
&& (Array.isArray((detail as Record<string, unknown>)['issues'])
|
|
832
|
+
&& ((detail as Record<string, unknown>)['issues'] as unknown[]).every((
|
|
833
|
+
item: unknown,
|
|
834
|
+
) => (item !== null && typeof item === 'object' && !Array.isArray(item)
|
|
835
|
+
&& typeof (item as Record<string, unknown>)['message'] === 'string'
|
|
836
|
+
&& ((item as Record<string, unknown>)['path'] === undefined
|
|
837
|
+
|| (Array.isArray((item as Record<string, unknown>)['path'])
|
|
838
|
+
&& ((item as Record<string, unknown>)['path'] as unknown[]).every((item: unknown) =>
|
|
839
|
+
true
|
|
840
|
+
)))
|
|
841
|
+
&& ((item as Record<string, unknown>)['severity'] === undefined
|
|
842
|
+
|| ((item as Record<string, unknown>)['severity'] === 'error'
|
|
843
|
+
|| (item as Record<string, unknown>)['severity'] === 'warning'))
|
|
844
|
+
&& Object.keys(item as object).every((key) =>
|
|
845
|
+
['message', 'path', 'severity'].includes(key)
|
|
846
|
+
))
|
|
847
|
+
))
|
|
848
|
+
&& ((detail as Record<string, unknown>)['output'] === undefined || true)
|
|
849
|
+
&& Object.keys(detail as object).every((key) =>
|
|
850
|
+
['status', 'touched', 'dirty', 'issues', 'output'].includes(key)
|
|
851
|
+
)
|
|
633
852
|
const isAddItemDetail = (detail: unknown): boolean =>
|
|
634
853
|
detail !== null && typeof detail === 'object' && !Array.isArray(detail)
|
|
635
854
|
&& ((detail as Record<string, unknown>)['item'] !== null
|
|
@@ -727,10 +946,11 @@ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) =>
|
|
|
727
946
|
checks: {
|
|
728
947
|
'query-change': isQueryChangeDetail,
|
|
729
948
|
'value-change': isValueChangeDetail,
|
|
730
|
-
'
|
|
731
|
-
'
|
|
949
|
+
'items-change': isItemsChangeDetail,
|
|
950
|
+
'free-entry': isValueChangeDetail,
|
|
951
|
+
'create-entry': isValueChangeDetail,
|
|
732
952
|
'validation-change': isValidationChangeDetail,
|
|
733
|
-
'options-change':
|
|
953
|
+
'options-change': isItemsChangeDetail,
|
|
734
954
|
'add-item': isAddItemDetail,
|
|
735
955
|
'remove-item': isAddItemDetail,
|
|
736
956
|
'create-item': isCreateItemDetail,
|
|
@@ -739,10 +959,14 @@ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) =>
|
|
|
739
959
|
modeled: ['query', 'selectedValues', 'value'],
|
|
740
960
|
})
|
|
741
961
|
|
|
742
|
-
const { host, ready } = useComponentHost(
|
|
962
|
+
const { host, ready } = useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
743
963
|
root,
|
|
744
964
|
dispatch,
|
|
745
|
-
|
|
965
|
+
controllerSource: {
|
|
966
|
+
specifier: '../components/ui-combobox/ui-combobox.js',
|
|
967
|
+
definition: './components/ui-combobox/ui-combobox.html',
|
|
968
|
+
},
|
|
969
|
+
props: checkedProps,
|
|
746
970
|
refs: {
|
|
747
971
|
field: fieldElement,
|
|
748
972
|
input: inputElement,
|
|
@@ -774,86 +998,165 @@ const { host, ready } = useComponentHost(controllerModule.default, {
|
|
|
774
998
|
|
|
775
999
|
defineExpose({
|
|
776
1000
|
validate: async (...args: unknown[]) => {
|
|
777
|
-
await ready()
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
)
|
|
1001
|
+
const controllerModule = await ready()
|
|
1002
|
+
if (controllerModule === undefined) {
|
|
1003
|
+
throw new TypeError('Controller method `validate` is not ready for <ui-combobox>.')
|
|
1004
|
+
}
|
|
1005
|
+
const method = Reflect.get(controllerModule, 'validate')
|
|
1006
|
+
if (typeof method !== 'function') {
|
|
1007
|
+
throw Object.assign(new Error('HJ003: Controller does not export method `validate`.'), {
|
|
1008
|
+
name: 'HtmlDiagnosticError',
|
|
1009
|
+
diagnostic: Object.freeze({
|
|
1010
|
+
code: 'HJ003',
|
|
1011
|
+
message: 'Controller does not export method `validate`.',
|
|
1012
|
+
}),
|
|
1013
|
+
})
|
|
1014
|
+
}
|
|
1015
|
+
return method(host, ...args)
|
|
782
1016
|
},
|
|
783
1017
|
focusInput: async (...args: unknown[]) => {
|
|
784
|
-
await ready()
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
)
|
|
1018
|
+
const controllerModule = await ready()
|
|
1019
|
+
if (controllerModule === undefined) {
|
|
1020
|
+
throw new TypeError('Controller method `focusInput` is not ready for <ui-combobox>.')
|
|
1021
|
+
}
|
|
1022
|
+
const method = Reflect.get(controllerModule, 'focusInput')
|
|
1023
|
+
if (typeof method !== 'function') {
|
|
1024
|
+
throw Object.assign(new Error('HJ003: Controller does not export method `focusInput`.'), {
|
|
1025
|
+
name: 'HtmlDiagnosticError',
|
|
1026
|
+
diagnostic: Object.freeze({
|
|
1027
|
+
code: 'HJ003',
|
|
1028
|
+
message: 'Controller does not export method `focusInput`.',
|
|
1029
|
+
}),
|
|
1030
|
+
})
|
|
1031
|
+
}
|
|
1032
|
+
return method(host, ...args)
|
|
789
1033
|
},
|
|
790
1034
|
})
|
|
1035
|
+
|
|
1036
|
+
function text(value: unknown): string {
|
|
1037
|
+
if (Array.isArray(value)) return value.map(text).join(' ')
|
|
1038
|
+
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
function uniqueKeys<T>(
|
|
1042
|
+
items: readonly T[],
|
|
1043
|
+
keyOf: (
|
|
1044
|
+
item: T,
|
|
1045
|
+
index: number,
|
|
1046
|
+
loop: { index: number; first: boolean; last: boolean; count: number },
|
|
1047
|
+
) => unknown,
|
|
1048
|
+
): readonly T[] {
|
|
1049
|
+
const seen = new Set<unknown>()
|
|
1050
|
+
for (let index = 0; index < items.length; index += 1) {
|
|
1051
|
+
const key = keyOf(items[index]!, index, {
|
|
1052
|
+
index,
|
|
1053
|
+
first: index === 0,
|
|
1054
|
+
last: index === items.length - 1,
|
|
1055
|
+
count: items.length,
|
|
1056
|
+
})
|
|
1057
|
+
if (seen.has(key)) {
|
|
1058
|
+
const message = `A keyed list produced duplicate key \`${text(key)}\`.`
|
|
1059
|
+
throw Object.assign(new Error(`HR004: ${message}`), {
|
|
1060
|
+
name: 'HtmlDiagnosticError',
|
|
1061
|
+
diagnostic: Object.freeze({ code: 'HR004', message }),
|
|
1062
|
+
})
|
|
1063
|
+
}
|
|
1064
|
+
seen.add(key)
|
|
1065
|
+
}
|
|
1066
|
+
return items
|
|
1067
|
+
}
|
|
791
1068
|
</script>
|
|
792
1069
|
|
|
793
1070
|
<template>
|
|
794
1071
|
<div
|
|
795
1072
|
data-component="ui-combobox"
|
|
796
|
-
v-bind="$attrs"
|
|
1073
|
+
v-bind="nativeAttrs($attrs)"
|
|
1074
|
+
:data-allow-create="reflectedProp('allowCreate', 'allow-create', checkedProps.allowCreate, undefined, false)"
|
|
1075
|
+
:data-allow-free-text="reflectedProp('allowFreeText', 'allow-free-text', checkedProps.allowFreeText, undefined, false)"
|
|
1076
|
+
:data-clearable="reflectedProp('clearable', 'clearable', checkedProps.clearable, undefined, false)"
|
|
1077
|
+
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
1078
|
+
:data-disclosure="reflectedProp('disclosure', 'disclosure', checkedProps.disclosure, undefined, false)"
|
|
1079
|
+
:data-filter="reflectedProp('filter', 'filter', checkedProps.filter, undefined, false)"
|
|
1080
|
+
:data-help="reflectedProp('help', 'help', checkedProps.help, undefined, false)"
|
|
1081
|
+
:data-invalid="reflectedProp('invalid', 'invalid', checkedProps.invalid, undefined, false)"
|
|
1082
|
+
:data-items="reflectedProp('items', 'items', checkedProps.items, undefined, false)"
|
|
1083
|
+
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
1084
|
+
:data-label-visibility="reflectedProp('labelVisibility', 'label-visibility', checkedProps.labelVisibility, undefined, false)"
|
|
1085
|
+
:data-loading="reflectedProp('loading', 'loading', checkedProps.loading, undefined, false)"
|
|
1086
|
+
:data-multiple="reflectedProp('multiple', 'multiple', checkedProps.multiple, undefined, false)"
|
|
1087
|
+
:data-name="reflectedProp('name', 'name', checkedProps.name, undefined, false)"
|
|
1088
|
+
:data-open-on-focus="reflectedProp('openOnFocus', 'open-on-focus', checkedProps.openOnFocus, undefined, false)"
|
|
1089
|
+
:data-placeholder="reflectedProp('placeholder', 'placeholder', checkedProps.placeholder, undefined, false)"
|
|
1090
|
+
:data-query="reflectedProp('query', 'query', checkedProps.query, undefined, false)"
|
|
1091
|
+
:data-readonly="reflectedProp('readonly', 'readonly', checkedProps.readonly, undefined, false)"
|
|
1092
|
+
:data-required="reflectedProp('required', 'required', checkedProps.required, undefined, false)"
|
|
1093
|
+
:data-selected-values="reflectedProp('selectedValues', 'selected-values', checkedProps.selectedValues, undefined, false)"
|
|
1094
|
+
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
1095
|
+
:data-token-separators="reflectedProp('tokenSeparators', 'token-separators', checkedProps.tokenSeparators, undefined, false)"
|
|
1096
|
+
:data-value="reflectedProp('value', 'value', checkedProps.value, undefined, false)"
|
|
797
1097
|
:data-ui-combobox-state="hostState || undefined"
|
|
798
1098
|
ref="root"
|
|
799
1099
|
>
|
|
800
|
-
<label
|
|
801
|
-
|
|
1100
|
+
<label
|
|
1101
|
+
:for="`${uid}-input`"
|
|
1102
|
+
:class="{ 'sr-only': checkedProps.labelVisibility === 'sr-only' }"
|
|
1103
|
+
>{{ checkedProps.label }}
|
|
1104
|
+
<template v-if="checkedProps.required">
|
|
802
1105
|
*</template></label>
|
|
803
1106
|
<div class="control">
|
|
804
1107
|
<div class="field" ref="field">
|
|
805
1108
|
<div class="entry">
|
|
806
1109
|
<slot name="start" />
|
|
807
|
-
<template v-if="multiple"><button
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
1110
|
+
<template v-if="checkedProps.multiple"><KeyedBoundary><button
|
|
1111
|
+
v-for="(item, index) in uniqueKeys(internalItems, (item, index, loop) => item.id)"
|
|
1112
|
+
:key="item.id"
|
|
1113
|
+
class="item"
|
|
1114
|
+
type="button"
|
|
1115
|
+
tabindex="-1"
|
|
1116
|
+
:data-index="index"
|
|
1117
|
+
:disabled="checkedProps.disabled || checkedProps.readonly || item.disabled"
|
|
1118
|
+
:aria-label="`${item.label}, press Delete or Backspace to remove`"
|
|
1119
|
+
>
|
|
1120
|
+
<slot :name="`item-${item.id}`"><UiBadge>{{ item.label }}</UiBadge></slot>
|
|
1121
|
+
</button></KeyedBoundary></template>
|
|
819
1122
|
<input
|
|
820
1123
|
role="combobox"
|
|
821
1124
|
aria-autocomplete="list"
|
|
822
1125
|
autocomplete="off"
|
|
1126
|
+
v-bind-control="{ tag: 'input', name: 'value', value: display, nativeProperty: true, defaultValue: '' }"
|
|
823
1127
|
:id="`${uid}-input`"
|
|
824
1128
|
:aria-controls="`${uid}-listbox`"
|
|
825
1129
|
:aria-expanded="expanded"
|
|
826
|
-
:aria-invalid="invalid || validationStatus === 'error'"
|
|
827
|
-
:aria-busy="loading || validationStatus === 'pending'"
|
|
828
|
-
:
|
|
829
|
-
:
|
|
830
|
-
:
|
|
831
|
-
:
|
|
832
|
-
:required="required && !(multiple && internalItems[0])"
|
|
1130
|
+
:aria-invalid="checkedProps.invalid || validationStatus === 'error'"
|
|
1131
|
+
:aria-busy="checkedProps.loading || validationStatus === 'pending'"
|
|
1132
|
+
:placeholder="checkedProps.placeholder ?? undefined"
|
|
1133
|
+
:disabled="checkedProps.disabled ?? undefined"
|
|
1134
|
+
:readonly="checkedProps.readonly ?? undefined"
|
|
1135
|
+
:required="guarded"
|
|
833
1136
|
ref="input"
|
|
834
1137
|
>
|
|
835
1138
|
</div>
|
|
836
1139
|
<input
|
|
837
|
-
v-if="name && !multiple"
|
|
1140
|
+
v-if="checkedProps.name && !checkedProps.multiple"
|
|
838
1141
|
type="hidden"
|
|
839
|
-
:name="name"
|
|
840
|
-
:value="submitted"
|
|
841
|
-
:disabled="disabled"
|
|
1142
|
+
:name="checkedProps.name ?? undefined"
|
|
1143
|
+
:value.attr="submitted"
|
|
1144
|
+
:disabled="checkedProps.disabled ?? undefined"
|
|
842
1145
|
>
|
|
843
|
-
<template v-if="name && multiple"><input
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1146
|
+
<template v-if="checkedProps.name && checkedProps.multiple"><KeyedBoundary><input
|
|
1147
|
+
v-for="item in uniqueKeys(internalItems, (item, index, loop) => item.id)"
|
|
1148
|
+
:key="item.id"
|
|
1149
|
+
type="hidden"
|
|
1150
|
+
:name="checkedProps.name ?? undefined"
|
|
1151
|
+
:value.attr="item.value"
|
|
1152
|
+
:disabled="checkedProps.disabled ?? undefined"
|
|
1153
|
+
></KeyedBoundary></template>
|
|
851
1154
|
<button
|
|
852
|
-
v-if="clearable"
|
|
1155
|
+
v-if="checkedProps.clearable"
|
|
853
1156
|
type="button"
|
|
854
1157
|
data-combobox-action="clear"
|
|
855
1158
|
aria-label="Clear"
|
|
856
|
-
:disabled="
|
|
1159
|
+
:disabled="guardedBinding"
|
|
857
1160
|
>
|
|
858
1161
|
<svg
|
|
859
1162
|
class="affordance-icon"
|
|
@@ -868,13 +1171,13 @@ defineExpose({
|
|
|
868
1171
|
</svg>
|
|
869
1172
|
</button>
|
|
870
1173
|
<button
|
|
871
|
-
v-if="disclosure"
|
|
1174
|
+
v-if="checkedProps.disclosure"
|
|
872
1175
|
type="button"
|
|
873
1176
|
data-combobox-action="disclosure"
|
|
874
1177
|
tabindex="-1"
|
|
875
1178
|
aria-label="Show suggestions"
|
|
876
1179
|
:aria-controls="`${uid}-listbox`"
|
|
877
|
-
:disabled="disabled || readonly"
|
|
1180
|
+
:disabled="checkedProps.disabled || checkedProps.readonly"
|
|
878
1181
|
>
|
|
879
1182
|
<svg
|
|
880
1183
|
class="affordance-icon"
|
|
@@ -891,12 +1194,12 @@ defineExpose({
|
|
|
891
1194
|
</button>
|
|
892
1195
|
</div>
|
|
893
1196
|
<button
|
|
894
|
-
v-if="help"
|
|
1197
|
+
v-if="checkedProps.help"
|
|
895
1198
|
class="help"
|
|
896
1199
|
type="button"
|
|
897
1200
|
aria-label="Help"
|
|
898
1201
|
:id="`${uid}-help`"
|
|
899
|
-
:disabled="disabled"
|
|
1202
|
+
:disabled="checkedProps.disabled ?? undefined"
|
|
900
1203
|
>
|
|
901
1204
|
<svg
|
|
902
1205
|
class="help-icon"
|
|
@@ -914,66 +1217,69 @@ defineExpose({
|
|
|
914
1217
|
</svg>
|
|
915
1218
|
</button>
|
|
916
1219
|
</div>
|
|
917
|
-
<UiTooltip
|
|
918
|
-
help
|
|
919
|
-
|
|
1220
|
+
<UiTooltip
|
|
1221
|
+
v-if="checkedProps.help"
|
|
1222
|
+
trigger="click"
|
|
1223
|
+
:id="`${uid}-help-text`"
|
|
1224
|
+
:for="`${uid}-help`"
|
|
1225
|
+
>{{ checkedProps.help }}</UiTooltip>
|
|
920
1226
|
<div class="popup" :hidden="!expanded" ref="popup">
|
|
921
1227
|
<div
|
|
922
1228
|
role="listbox"
|
|
923
1229
|
:id="`${uid}-listbox`"
|
|
924
|
-
:aria-label="`${label} suggestions`"
|
|
925
|
-
:aria-busy="loading"
|
|
1230
|
+
:aria-label="`${checkedProps.label ?? ''} suggestions`"
|
|
1231
|
+
:aria-busy="checkedProps.loading ?? undefined"
|
|
926
1232
|
ref="listbox"
|
|
927
1233
|
>
|
|
928
|
-
<div
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
>
|
|
934
|
-
<div v-if="group.name" class="group">{{ group.name }}</div>
|
|
935
|
-
<div
|
|
936
|
-
v-for="row in group.rows"
|
|
937
|
-
:key="row.id"
|
|
938
|
-
class="option"
|
|
939
|
-
role="option"
|
|
940
|
-
data-ui-choice-option=""
|
|
941
|
-
:data-multiple="multiple ? '' : undefined"
|
|
942
|
-
:id="`${uid}-option-${row.index}`"
|
|
943
|
-
:aria-selected="row.selected"
|
|
944
|
-
:aria-disabled="row.disabled"
|
|
945
|
-
:data-index="row.index"
|
|
946
|
-
:aria-labelledby="row.labelledBy ?? undefined"
|
|
947
|
-
:aria-describedby="row.detail ?? undefined"
|
|
948
|
-
:class="{ active: row.index === active }"
|
|
1234
|
+
<KeyedBoundary><div
|
|
1235
|
+
v-for="group in uniqueKeys(groups, (group, indexLoop, loop) => group.name)"
|
|
1236
|
+
:key="group.name"
|
|
1237
|
+
:role="group.role"
|
|
1238
|
+
:aria-label="group.label ?? undefined"
|
|
949
1239
|
>
|
|
950
|
-
<
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1240
|
+
<div v-if="group.name" class="group">{{ group.name }}</div>
|
|
1241
|
+
<KeyedBoundary><div
|
|
1242
|
+
v-for="row in uniqueKeys(group.rows, (row, indexLoop2, loop) => row.id)"
|
|
1243
|
+
:key="row.id"
|
|
1244
|
+
class="option"
|
|
1245
|
+
role="option"
|
|
1246
|
+
data-ui-choice-option=""
|
|
1247
|
+
:data-multiple="checkedProps.multiple ? '' : undefined"
|
|
1248
|
+
:id="`${uid}-option-${row.index}`"
|
|
1249
|
+
:aria-selected="row.selected"
|
|
1250
|
+
:aria-disabled="row.disabled"
|
|
1251
|
+
:data-index="row.index"
|
|
1252
|
+
:aria-labelledby="row.labelledBy ?? undefined"
|
|
1253
|
+
:aria-describedby="row.detail ?? undefined"
|
|
1254
|
+
:class="{ active: row.index === active }"
|
|
1255
|
+
>
|
|
1256
|
+
<slot :name="`option-${row.id}`"><span v-if="row.detail" class="detail"><span
|
|
1257
|
+
class="line"
|
|
1258
|
+
><span class="primary" :id="`${uid}-option-${row.index}-label`">{{
|
|
1259
|
+
row.label
|
|
1260
|
+
}}</span>
|
|
1261
|
+
<UiBadge
|
|
1262
|
+
v-if="row.tag"
|
|
1263
|
+
:tone="row.tag?.tone"
|
|
1264
|
+
:style="{ '--ui-badge-color': row.tag?.color ?? undefined }"
|
|
1265
|
+
><span :id="`${uid}-option-${row.index}-tag`">{{
|
|
1266
|
+
row.tag?.label
|
|
1267
|
+
}}</span></UiBadge></span>
|
|
1268
|
+
<span
|
|
1269
|
+
v-if="row.description"
|
|
1270
|
+
class="description"
|
|
1271
|
+
:id="`${uid}-option-${row.index}-description`"
|
|
1272
|
+
>{{ row.description }}</span></span>
|
|
1273
|
+
<span v-if="!row.detail" class="primary">{{ row.label }}</span></slot>
|
|
1274
|
+
</div></KeyedBoundary>
|
|
1275
|
+
</div></KeyedBoundary>
|
|
970
1276
|
<div
|
|
971
1277
|
v-if="creatable"
|
|
972
1278
|
class="option"
|
|
973
1279
|
role="option"
|
|
974
1280
|
data-ui-choice-option=""
|
|
975
1281
|
aria-selected="false"
|
|
976
|
-
:data-multiple="multiple ? '' : undefined"
|
|
1282
|
+
:data-multiple="checkedProps.multiple ? '' : undefined"
|
|
977
1283
|
:id="`${uid}-option-${createIndex}`"
|
|
978
1284
|
:data-index="createIndex"
|
|
979
1285
|
:class="{ active: createIndex === active }"
|
|
@@ -981,14 +1287,19 @@ defineExpose({
|
|
|
981
1287
|
{{ `Create “${raw}”` }}
|
|
982
1288
|
</div>
|
|
983
1289
|
<div v-if="message" class="message">{{ message }}</div>
|
|
984
|
-
<div
|
|
1290
|
+
<div
|
|
1291
|
+
v-if="!checkedProps.loading && !(rows[0]) && !creatable && !lookupError"
|
|
1292
|
+
class="message"
|
|
1293
|
+
>
|
|
985
1294
|
<slot name="empty">No suggestions.</slot>
|
|
986
1295
|
</div>
|
|
987
1296
|
</div>
|
|
988
1297
|
<slot name="footer" />
|
|
989
1298
|
</div>
|
|
990
1299
|
<div class="message" :id="`${uid}-validation`" :hidden="!validation.issues.length">
|
|
991
|
-
<div v-for="(issue,
|
|
1300
|
+
<div v-for="(issue, indexLoop3) in validation.issues" :key="indexLoop3">
|
|
1301
|
+
{{ issue.message }}
|
|
1302
|
+
</div>
|
|
992
1303
|
</div>
|
|
993
1304
|
<div class="sr-only" role="status" aria-live="polite" aria-atomic="true">{{ statusText }}</div>
|
|
994
1305
|
<div class="authored-options" hidden="" aria-hidden="true" ref="options"><slot /></div>
|