@threadlabs/looma 0.21.5 → 0.22.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/ui-affordance-scope/ui-affordance-scope.html +1 -1
- package/components/ui-avatar/ui-avatar.html +4 -4
- package/components/ui-avatar-group/ui-avatar-group.html +14 -4
- package/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/components/ui-button/ui-button.html +10 -7
- package/components/ui-checkbox/ui-checkbox.html +1 -1
- package/components/ui-combobox/ui-combobox.html +18 -18
- package/components/ui-context-menu/ui-context-menu.html +1 -1
- package/components/ui-dialog/ui-dialog.html +2 -2
- package/components/ui-disclosure/ui-disclosure.html +4 -4
- package/components/ui-editable/ui-editable.html +3 -3
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +5 -5
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +5 -5
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +3 -3
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +3 -7
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +6 -6
- package/components/ui-listbox/ui-listbox.html +6 -6
- package/components/ui-menu/ui-menu.html +1 -1
- package/components/ui-menu-item/ui-menu-item.html +1 -1
- package/components/ui-popover/ui-popover.html +1 -1
- package/components/ui-radio/ui-radio.html +1 -1
- package/components/ui-radio-group/ui-radio-group.html +1 -1
- package/components/ui-search-shell/ui-search-shell.html +1 -1
- package/components/ui-sidebar/ui-sidebar.html +2 -2
- package/components/ui-switch/ui-switch.html +1 -1
- package/components/ui-switcher/ui-switcher.html +1 -1
- package/components/ui-tabs/ui-tabs.html +2 -2
- package/components/ui-toast-region/ui-toast-region.html +1 -1
- package/components/ui-tooltip/ui-tooltip.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +4 -4
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +10 -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 +11 -7
- 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 +1 -1
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +2 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +2 -2
- package/vanilla/UiAvatarGroup.js +2 -2
- 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 +1 -1
- package/vanilla/UiButton.js +1 -1
- 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/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +1 -1
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +2 -2
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +1 -1
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +1 -1
- 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 +2 -2
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +2 -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 +2 -2
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +2 -2
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +1 -1
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- 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/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +2 -2
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- 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 +1 -1
- 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 +1 -1
- package/vanilla/UiGrid.js +1 -1
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +1 -1
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +1 -1
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.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 +2 -2
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +2 -2
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +1 -1
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- 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/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +1 -1
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +1 -1
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +2 -2
- 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/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +1 -1
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +2 -2
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +2 -2
- 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 +2 -2
- package/vue/UiActionBar.vue +1 -1
- package/vue/UiAffordanceScope.vue +25 -7
- package/vue/UiAvatar.vue +125 -30
- package/vue/UiAvatarGroup.d.ts +4 -4
- package/vue/UiAvatarGroup.vue +79 -24
- package/vue/UiBadge.vue +34 -8
- package/vue/UiBreadcrumbItem.vue +15 -4
- package/vue/UiBreadcrumbs.vue +14 -4
- package/vue/UiButton.vue +133 -49
- package/vue/UiCallout.vue +16 -4
- package/vue/UiCard.vue +46 -10
- package/vue/UiCheckbox.d.ts +5 -5
- package/vue/UiCheckbox.vue +73 -19
- package/vue/UiCluster.vue +39 -10
- package/vue/UiCombobox.d.ts +5 -5
- package/vue/UiCombobox.vue +317 -78
- package/vue/UiContainer.vue +23 -6
- package/vue/UiContextMenu.vue +24 -7
- package/vue/UiCover.vue +16 -4
- package/vue/UiDescriptionItem.vue +14 -4
- package/vue/UiDescriptionList.vue +33 -8
- package/vue/UiDialog.vue +79 -26
- package/vue/UiDisclosure.vue +101 -38
- package/vue/UiEditable.d.ts +3 -3
- package/vue/UiEditable.vue +107 -27
- package/vue/UiEditorInsertTableGrid.vue +47 -11
- package/vue/UiEditorMentionMenu.vue +99 -20
- package/vue/UiEditorMentionMenuItem.vue +29 -8
- package/vue/UiEditorSlashMenu.vue +85 -16
- package/vue/UiEditorSlashMenuGroup.vue +14 -4
- package/vue/UiEditorSlashMenuItem.vue +43 -12
- package/vue/UiEditorTableContextMenu.d.ts +1 -1
- package/vue/UiEditorTableContextMenu.vue +95 -19
- package/vue/UiEditorTableOverlay.vue +91 -7
- package/vue/UiEditorTableToolbar.vue +105 -16
- package/vue/UiEditorToolbar.vue +15 -4
- package/vue/UiFloatingActionButton.vue +31 -8
- package/vue/UiFormField.d.ts +1 -1
- package/vue/UiFormField.vue +31 -8
- package/vue/UiGrid.vue +30 -8
- package/vue/UiIcon.vue +15 -4
- package/vue/UiIconButton.vue +70 -24
- package/vue/UiInput.vue +114 -39
- package/vue/UiInputGroup.vue +15 -4
- package/vue/UiList.vue +47 -16
- package/vue/UiListItem.vue +24 -6
- package/vue/UiListbox.d.ts +3 -3
- package/vue/UiListbox.vue +72 -24
- package/vue/UiMenu.vue +55 -15
- package/vue/UiMenuGroup.vue +14 -4
- package/vue/UiMenuItem.d.ts +4 -4
- package/vue/UiMenuItem.vue +77 -27
- package/vue/UiMeter.vue +65 -16
- package/vue/UiNavItem.vue +48 -24
- package/vue/UiPageHeader.vue +16 -4
- package/vue/UiPopover.vue +46 -21
- package/vue/UiRadio.d.ts +4 -4
- package/vue/UiRadio.vue +58 -15
- package/vue/UiRadioGroup.d.ts +3 -3
- package/vue/UiRadioGroup.vue +66 -17
- package/vue/UiReel.d.ts +1 -1
- package/vue/UiReel.vue +31 -8
- package/vue/UiScrollArea.vue +16 -4
- package/vue/UiSearchResultRow.vue +23 -6
- package/vue/UiSearchShell.vue +38 -11
- package/vue/UiSection.vue +33 -8
- package/vue/UiSelect.d.ts +1 -1
- package/vue/UiSelect.vue +45 -20
- package/vue/UiSeparator.vue +16 -4
- package/vue/UiSidebar.d.ts +2 -2
- package/vue/UiSidebar.vue +86 -22
- package/vue/UiSpinner.vue +23 -6
- package/vue/UiStack.vue +31 -8
- package/vue/UiStatusMessage.vue +32 -8
- package/vue/UiSwitch.d.ts +4 -4
- package/vue/UiSwitch.vue +57 -15
- package/vue/UiSwitcher.vue +41 -17
- package/vue/UiTable.vue +24 -6
- package/vue/UiTabs.vue +60 -14
- package/vue/UiText.vue +98 -35
- package/vue/UiTextarea.d.ts +1 -1
- package/vue/UiTextarea.vue +67 -26
- package/vue/UiToast.vue +24 -6
- package/vue/UiToastRegion.vue +41 -13
- package/vue/UiTooltip.d.ts +1 -1
- package/vue/UiTooltip.vue +85 -30
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTree.vue +56 -14
- package/vue/UiTreeItem.d.ts +3 -3
- package/vue/UiTreeItem.vue +147 -36
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +34 -7
- package/vue/chunks/UiAvatar.js +141 -21
- package/vue/chunks/UiAvatarGroup.js +83 -12
- package/vue/chunks/UiBadge.js +57 -19
- package/vue/chunks/UiBreadcrumbItem.js +19 -6
- package/vue/chunks/UiBreadcrumbs.js +19 -6
- package/vue/chunks/UiButton.js +194 -42
- package/vue/chunks/UiCallout.js +27 -13
- package/vue/chunks/UiCard.js +83 -25
- package/vue/chunks/UiCheckbox.js +104 -17
- package/vue/chunks/UiCluster.js +70 -25
- package/vue/chunks/UiCombobox.js +441 -46
- package/vue/chunks/UiContainer.js +36 -11
- package/vue/chunks/UiContextMenu.js +33 -7
- package/vue/chunks/UiCover.js +20 -6
- package/vue/chunks/UiDescriptionItem.js +18 -5
- package/vue/chunks/UiDescriptionList.js +54 -17
- package/vue/chunks/UiDialog.js +115 -23
- package/vue/chunks/UiDisclosure.js +110 -24
- package/vue/chunks/UiEditable.js +146 -18
- package/vue/chunks/UiEditorInsertTableGrid.js +65 -10
- package/vue/chunks/UiEditorMentionMenu.js +210 -14
- package/vue/chunks/UiEditorMentionMenuItem.js +43 -8
- package/vue/chunks/UiEditorSlashMenu.js +186 -12
- package/vue/chunks/UiEditorSlashMenuGroup.js +19 -6
- package/vue/chunks/UiEditorSlashMenuItem.js +65 -10
- package/vue/chunks/UiEditorTableContextMenu.js +116 -16
- package/vue/chunks/UiEditorTableOverlay.js +188 -7
- package/vue/chunks/UiEditorTableToolbar.js +125 -16
- package/vue/chunks/UiEditorToolbar.js +19 -6
- package/vue/chunks/UiFloatingActionButton.js +43 -8
- package/vue/chunks/UiFormField.js +43 -8
- package/vue/chunks/UiGrid.js +52 -18
- package/vue/chunks/UiIcon.js +19 -6
- package/vue/chunks/UiIconButton.js +107 -21
- package/vue/chunks/UiInput.js +309 -30
- package/vue/chunks/UiInputGroup.js +19 -6
- package/vue/chunks/UiList.js +62 -10
- package/vue/chunks/UiListItem.js +33 -7
- package/vue/chunks/UiListbox.js +105 -13
- package/vue/chunks/UiMenu.js +79 -11
- package/vue/chunks/UiMenuGroup.js +19 -6
- package/vue/chunks/UiMenuItem.js +93 -28
- package/vue/chunks/UiMeter.js +96 -19
- package/vue/chunks/UiNavItem.js +74 -17
- package/vue/chunks/UiPageHeader.js +20 -6
- package/vue/chunks/UiPopover.js +58 -21
- package/vue/chunks/UiRadio.js +82 -15
- package/vue/chunks/UiRadioGroup.js +89 -12
- package/vue/chunks/UiReel.js +53 -18
- package/vue/chunks/UiScrollArea.js +20 -6
- package/vue/chunks/UiSearchResultRow.js +32 -7
- package/vue/chunks/UiSearchShell.js +55 -9
- package/vue/chunks/UiSection.js +49 -12
- package/vue/chunks/UiSelect.js +68 -13
- package/vue/chunks/UiSeparator.js +20 -6
- package/vue/chunks/UiSidebar.js +123 -19
- package/vue/chunks/UiSpinner.js +33 -7
- package/vue/chunks/UiStack.js +59 -24
- package/vue/chunks/UiStatusMessage.js +53 -16
- package/vue/chunks/UiSwitch.js +82 -15
- package/vue/chunks/UiSwitcher.js +70 -25
- package/vue/chunks/UiTable.js +33 -7
- package/vue/chunks/UiTabs.js +81 -11
- package/vue/chunks/UiText.js +169 -58
- package/vue/chunks/UiTextarea.js +101 -16
- package/vue/chunks/UiToast.js +39 -13
- package/vue/chunks/UiToastRegion.js +41 -14
- package/vue/chunks/UiTooltip.js +113 -30
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +82 -15
- package/vue/chunks/UiTreeItem.js +184 -22
- package/vue/chunks/props.js +271 -35
- package/vue/components.css +1209 -1198
- package/vue/host.ts +6 -6
package/vue/UiCombobox.vue
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import {
|
|
4
4
|
computed,
|
|
5
5
|
defineComponent,
|
|
6
6
|
getCurrentInstance,
|
|
7
7
|
h,
|
|
8
|
+
provide,
|
|
8
9
|
ref,
|
|
9
10
|
useTemplateRef,
|
|
10
11
|
watchSyncEffect,
|
|
@@ -12,12 +13,231 @@ import {
|
|
|
12
13
|
import type { PropType, VNode } from 'vue'
|
|
13
14
|
import { vBindControl } from './control'
|
|
14
15
|
import { createDispatch, useComponentHost } from './host'
|
|
15
|
-
import { checkedProp } from './props'
|
|
16
|
+
import { checkedProp, vPropValidity } from './props'
|
|
16
17
|
import UiBadge from './UiBadge.vue'
|
|
17
18
|
import UiTooltip from './UiTooltip.vue'
|
|
18
19
|
|
|
19
20
|
defineOptions({ inheritAttrs: false })
|
|
20
21
|
|
|
22
|
+
const propValidityContract = {
|
|
23
|
+
props: {
|
|
24
|
+
allowCreate: {
|
|
25
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
26
|
+
required: false,
|
|
27
|
+
target: { attribute: 'allowcreate' },
|
|
28
|
+
description:
|
|
29
|
+
'Offers the current query as a new option, reported as create-item. When nothing else matches, the offer is highlighted, so Enter creates it; with nothing\n highlighted, Enter in multiple mode commits the typed text as a token separator does.',
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
allowFreeText: {
|
|
33
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
34
|
+
required: false,
|
|
35
|
+
target: { attribute: 'allowfreetext' },
|
|
36
|
+
description: 'Allows values that do not match an authored option.',
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
clearable: {
|
|
40
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
41
|
+
required: false,
|
|
42
|
+
target: { attribute: 'clearable' },
|
|
43
|
+
description:
|
|
44
|
+
'Adds a clear button to the field that empties the input and clears the selection, reported as value-change with kind "clear". It is disabled when there is\n nothing to clear. In multiple mode it clears only the typed text; chosen items stay.',
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
49
|
+
required: false,
|
|
50
|
+
target: { attribute: 'disabled' },
|
|
51
|
+
description:
|
|
52
|
+
'Disables the input and every button in the field: the chosen-item badges, the clear and disclosure buttons, and the help button. The list closes and cannot\n be opened, the value cannot be cleared, and a named combobox submits nothing with its form.',
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
55
|
+
disclosure: {
|
|
56
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
57
|
+
required: false,
|
|
58
|
+
target: { attribute: 'disclosure' },
|
|
59
|
+
description:
|
|
60
|
+
'Adds a chevron button that opens and closes the full, unfiltered list of options, for users who would rather browse than type. ArrowDown opens the same\n list with or without it.',
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
filter: {
|
|
64
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
65
|
+
required: false,
|
|
66
|
+
target: { attribute: 'filter' },
|
|
67
|
+
description:
|
|
68
|
+
'How the list narrows as the user types. label lists the options whose label contains the typed text, ignoring case. none lists every authored option, for\n options already narrowed elsewhere, such as a server search, so a result that matched on data other than its label still shows. Leaving the field still\n commits an option whose label matches the text, or the only one listed.',
|
|
69
|
+
values: ['label', 'none'],
|
|
70
|
+
default: 'label',
|
|
71
|
+
},
|
|
72
|
+
help: {
|
|
73
|
+
type: { kind: 'terminal', name: 'string' },
|
|
74
|
+
required: false,
|
|
75
|
+
target: { attribute: 'help' },
|
|
76
|
+
description:
|
|
77
|
+
'Help text for the field. When set, a help button appears beside the field and opens a tooltip with this text; while it is open, the input is described by\n it.',
|
|
78
|
+
default: '',
|
|
79
|
+
},
|
|
80
|
+
invalid: {
|
|
81
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
82
|
+
required: false,
|
|
83
|
+
target: { attribute: 'invalid' },
|
|
84
|
+
description:
|
|
85
|
+
'Exposes an externally validated error on the input and field. It remains until the consumer clears it, independently of native validation.',
|
|
86
|
+
default: false,
|
|
87
|
+
},
|
|
88
|
+
items: {
|
|
89
|
+
type: {
|
|
90
|
+
kind: 'list',
|
|
91
|
+
item: {
|
|
92
|
+
kind: 'object',
|
|
93
|
+
fields: [
|
|
94
|
+
{ name: 'id', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
95
|
+
{ name: 'value', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
96
|
+
{ name: 'label', type: { kind: 'terminal', name: 'string' }, optional: false },
|
|
97
|
+
{ name: 'group', type: { kind: 'terminal', name: 'string' }, optional: true },
|
|
98
|
+
{ name: 'disabled', type: { kind: 'terminal', name: 'boolean' }, optional: true },
|
|
99
|
+
{ name: 'description', type: { kind: 'terminal', name: 'string' }, optional: true },
|
|
100
|
+
{
|
|
101
|
+
name: 'tag',
|
|
102
|
+
type: {
|
|
103
|
+
kind: 'object',
|
|
104
|
+
fields: [{
|
|
105
|
+
name: 'label',
|
|
106
|
+
type: { kind: 'terminal', name: 'string' },
|
|
107
|
+
optional: false,
|
|
108
|
+
}, {
|
|
109
|
+
name: 'tone',
|
|
110
|
+
type: {
|
|
111
|
+
kind: 'constrained',
|
|
112
|
+
base: { kind: 'terminal', name: 'keyword' },
|
|
113
|
+
values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
114
|
+
},
|
|
115
|
+
optional: true,
|
|
116
|
+
}, { name: 'color', type: { kind: 'terminal', name: 'string' }, optional: true }],
|
|
117
|
+
open: false,
|
|
118
|
+
},
|
|
119
|
+
optional: true,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
open: false,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
required: false,
|
|
126
|
+
target: { attribute: 'items' },
|
|
127
|
+
description:
|
|
128
|
+
'The selected items in multiple mode, as JSON; a named combobox submits each one\'s value. A form reset returns to these items, or to authored selected\n options when unset.',
|
|
129
|
+
},
|
|
130
|
+
label: {
|
|
131
|
+
type: { kind: 'terminal', name: 'string' },
|
|
132
|
+
required: false,
|
|
133
|
+
target: { attribute: 'label' },
|
|
134
|
+
description:
|
|
135
|
+
'The field\'s label, tied to its input and shown above it; required adds an asterisk. It also names the suggestion list. Pair it with\n labelVisibility="sr-only" when the context already labels the field visibly.',
|
|
136
|
+
default: '',
|
|
137
|
+
},
|
|
138
|
+
labelVisibility: {
|
|
139
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
140
|
+
required: false,
|
|
141
|
+
target: { attribute: 'labelvisibility' },
|
|
142
|
+
description:
|
|
143
|
+
'visible shows the label above the field; sr-only hides it visually but keeps it as the input\'s accessible name. Use sr-only only when the surrounding\n layout already makes the field\'s purpose clear.',
|
|
144
|
+
values: ['visible', 'sr-only'],
|
|
145
|
+
default: 'visible',
|
|
146
|
+
},
|
|
147
|
+
loading: {
|
|
148
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
149
|
+
required: false,
|
|
150
|
+
target: { attribute: 'aria-busy' },
|
|
151
|
+
description:
|
|
152
|
+
'Marks the suggestion list busy while the consumer loads options. It announces loading and suppresses the empty state and create offer until cleared.',
|
|
153
|
+
default: false,
|
|
154
|
+
},
|
|
155
|
+
multiple: {
|
|
156
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
157
|
+
required: false,
|
|
158
|
+
target: { attribute: 'data-multiple' },
|
|
159
|
+
description:
|
|
160
|
+
'Lets the user choose several options. Each choice becomes a removable badge before the input, the list stays open between picks, and choosing a checked\n option removes it. items-change then reports the whole list of items, and selected-values-change the list of their values; use selectedValues or items,\n not value, in this mode.',
|
|
161
|
+
default: false,
|
|
162
|
+
},
|
|
163
|
+
name: {
|
|
164
|
+
type: { kind: 'terminal', name: 'string' },
|
|
165
|
+
required: false,
|
|
166
|
+
target: { attribute: 'name' },
|
|
167
|
+
description:
|
|
168
|
+
'The form field name the combobox submits its value under, never the label shown in the field. Single mode sends one entry: the selected option\'s value, the\n typed text when allowFreeText is set and no option is selected, or an empty string. Multiple mode sends one entry per chosen item\'s value, and nothing\n when none is chosen. A disabled combobox sends nothing.',
|
|
169
|
+
default: '',
|
|
170
|
+
},
|
|
171
|
+
openOnFocus: {
|
|
172
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
173
|
+
required: false,
|
|
174
|
+
target: { attribute: 'openonfocus' },
|
|
175
|
+
description: 'Opens suggestions when the input receives focus, before typing.',
|
|
176
|
+
default: false,
|
|
177
|
+
},
|
|
178
|
+
placeholder: {
|
|
179
|
+
type: { kind: 'terminal', name: 'string' },
|
|
180
|
+
required: false,
|
|
181
|
+
target: { attribute: 'placeholder' },
|
|
182
|
+
description:
|
|
183
|
+
'Hint text shown in the empty input, as on a native input. It disappears as the user types, so it never replaces label.',
|
|
184
|
+
default: '',
|
|
185
|
+
},
|
|
186
|
+
query: {
|
|
187
|
+
type: { kind: 'terminal', name: 'string' },
|
|
188
|
+
required: false,
|
|
189
|
+
target: { attribute: 'query' },
|
|
190
|
+
description:
|
|
191
|
+
'The input\'s text, when the consumer controls it. Once set, the consumer owns the text: typing reports query-change, and the input returns to query unless\n query is updated to match. Leave it unset to let the combobox manage its own text, showing the chosen option\'s label.',
|
|
192
|
+
},
|
|
193
|
+
readonly: {
|
|
194
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
195
|
+
required: false,
|
|
196
|
+
target: { attribute: 'readonly' },
|
|
197
|
+
description:
|
|
198
|
+
'Shows the current value without letting it change: the text can be selected but not edited, the list does not open, and the clear, disclosure, and badge\n remove buttons are disabled. A named combobox still submits its value.',
|
|
199
|
+
default: false,
|
|
200
|
+
},
|
|
201
|
+
required: {
|
|
202
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
203
|
+
required: false,
|
|
204
|
+
target: { attribute: 'required' },
|
|
205
|
+
description:
|
|
206
|
+
'Requires a value: adds an asterisk to the label, marks the input required for native form validation, and makes validation report "A value is required."\n when the field is left empty. In multiple mode a chosen item satisfies it, whatever is left in the input.',
|
|
207
|
+
default: false,
|
|
208
|
+
},
|
|
209
|
+
selectedValues: {
|
|
210
|
+
type: { kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
211
|
+
required: false,
|
|
212
|
+
target: { attribute: 'selectedvalues' },
|
|
213
|
+
description:
|
|
214
|
+
'The selected option values in multiple mode, when the consumer controls the selection. Without it or items, authored options with selected set the initial\n selection. Once set, the consumer owns it: each value shows as a badge with its authored option\'s label, adding or removing one reports\n selected-values-change with the new list, and the badges follow selectedValues, not the user, unless it is updated to match. Setting it reports nothing.\n It takes precedence over items; leave it unset to let the combobox keep its own selection.',
|
|
215
|
+
},
|
|
216
|
+
size: {
|
|
217
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
218
|
+
required: false,
|
|
219
|
+
target: { attribute: 'size' },
|
|
220
|
+
description:
|
|
221
|
+
'Field height, padding, and type size, matching Button\'s sizes so a field and a button of one size share a row. sm is the small control height (2rem by\n default) with smaller text, for compact rows such as a table row or a filter bar; md is the standard control height; lg is taller with roomier padding.\n Under a coarse pointer, sm grows to the 44px touch minimum and keeps body-size text. The label keeps its size.',
|
|
222
|
+
values: ['sm', 'md', 'lg'],
|
|
223
|
+
default: 'md',
|
|
224
|
+
},
|
|
225
|
+
tokenSeparators: {
|
|
226
|
+
type: { kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
227
|
+
required: false,
|
|
228
|
+
target: { attribute: 'tokenseparators' },
|
|
229
|
+
description:
|
|
230
|
+
'Keys that commit the typed text in multiple mode, as KeyboardEvent key values such as "," or ";". The text is added as the option whose label matches it,\n ignoring case, or with allowCreate is reported as create-item; otherwise it stays in the input.',
|
|
231
|
+
},
|
|
232
|
+
value: {
|
|
233
|
+
type: { kind: 'terminal', name: 'string' },
|
|
234
|
+
required: false,
|
|
235
|
+
target: { attribute: 'value' },
|
|
236
|
+
description:
|
|
237
|
+
'The selected value in single mode, which a named combobox submits with its form. The field shows the matching option\'s label, and a form reset returns to\n this value. In a strict combobox, typing a search does not change the selection; leaving with no match restores its label. If omitted, the first authored\n option with selected sets the initial value.',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
}
|
|
21
241
|
const props = defineProps({
|
|
22
242
|
allowCreate: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
23
243
|
allowFreeText: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -69,64 +289,48 @@ const checkedProps = computed(() => ({
|
|
|
69
289
|
{ kind: 'terminal', name: 'boolean' },
|
|
70
290
|
false,
|
|
71
291
|
'allowCreate',
|
|
72
|
-
undefined,
|
|
73
|
-
undefined,
|
|
74
292
|
) as boolean,
|
|
75
293
|
allowFreeText: checkedProp<boolean>(
|
|
76
294
|
props['allowFreeText'],
|
|
77
295
|
{ kind: 'terminal', name: 'boolean' },
|
|
78
296
|
false,
|
|
79
297
|
'allowFreeText',
|
|
80
|
-
undefined,
|
|
81
|
-
undefined,
|
|
82
298
|
) as boolean,
|
|
83
299
|
clearable: checkedProp<boolean>(
|
|
84
300
|
props['clearable'],
|
|
85
301
|
{ kind: 'terminal', name: 'boolean' },
|
|
86
302
|
false,
|
|
87
303
|
'clearable',
|
|
88
|
-
undefined,
|
|
89
|
-
undefined,
|
|
90
304
|
) as boolean,
|
|
91
305
|
disabled: checkedProp<boolean>(
|
|
92
306
|
props['disabled'],
|
|
93
307
|
{ kind: 'terminal', name: 'boolean' },
|
|
94
308
|
false,
|
|
95
309
|
'disabled',
|
|
96
|
-
undefined,
|
|
97
|
-
undefined,
|
|
98
310
|
) as boolean,
|
|
99
311
|
disclosure: checkedProp<boolean>(
|
|
100
312
|
props['disclosure'],
|
|
101
313
|
{ kind: 'terminal', name: 'boolean' },
|
|
102
314
|
false,
|
|
103
315
|
'disclosure',
|
|
104
|
-
undefined,
|
|
105
|
-
undefined,
|
|
106
316
|
) as boolean,
|
|
107
317
|
filter: checkedProp<'label' | 'none'>(
|
|
108
318
|
props['filter'],
|
|
109
319
|
{ kind: 'terminal', name: 'keyword' },
|
|
110
320
|
false,
|
|
111
321
|
'filter',
|
|
112
|
-
undefined,
|
|
113
|
-
['label', 'none'],
|
|
114
322
|
) as 'label' | 'none',
|
|
115
323
|
help: checkedProp<string>(
|
|
116
324
|
props['help'],
|
|
117
325
|
{ kind: 'terminal', name: 'string' },
|
|
118
326
|
false,
|
|
119
327
|
'help',
|
|
120
|
-
undefined,
|
|
121
|
-
undefined,
|
|
122
328
|
) as string,
|
|
123
329
|
invalid: checkedProp<boolean>(
|
|
124
330
|
props['invalid'],
|
|
125
331
|
{ kind: 'terminal', name: 'boolean' },
|
|
126
332
|
false,
|
|
127
333
|
'invalid',
|
|
128
|
-
undefined,
|
|
129
|
-
undefined,
|
|
130
334
|
) as boolean,
|
|
131
335
|
items: checkedProp<
|
|
132
336
|
readonly ({
|
|
@@ -182,121 +386,81 @@ const checkedProps = computed(() => ({
|
|
|
182
386
|
},
|
|
183
387
|
false,
|
|
184
388
|
'items',
|
|
185
|
-
undefined,
|
|
186
|
-
undefined,
|
|
187
389
|
),
|
|
188
390
|
label: checkedProp<string>(
|
|
189
391
|
props['label'],
|
|
190
392
|
{ kind: 'terminal', name: 'string' },
|
|
191
393
|
false,
|
|
192
394
|
'label',
|
|
193
|
-
undefined,
|
|
194
|
-
undefined,
|
|
195
395
|
) as string,
|
|
196
396
|
labelVisibility: checkedProp<'visible' | 'sr-only'>(
|
|
197
397
|
props['labelVisibility'],
|
|
198
398
|
{ kind: 'terminal', name: 'keyword' },
|
|
199
399
|
false,
|
|
200
400
|
'labelVisibility',
|
|
201
|
-
undefined,
|
|
202
|
-
['visible', 'sr-only'],
|
|
203
401
|
) as 'visible' | 'sr-only',
|
|
204
402
|
loading: checkedProp<boolean>(
|
|
205
403
|
props['loading'],
|
|
206
404
|
{ kind: 'terminal', name: 'boolean' },
|
|
207
405
|
false,
|
|
208
406
|
'loading',
|
|
209
|
-
undefined,
|
|
210
|
-
undefined,
|
|
211
407
|
) as boolean,
|
|
212
408
|
multiple: checkedProp<boolean>(
|
|
213
409
|
props['multiple'],
|
|
214
410
|
{ kind: 'terminal', name: 'boolean' },
|
|
215
411
|
false,
|
|
216
412
|
'multiple',
|
|
217
|
-
undefined,
|
|
218
|
-
undefined,
|
|
219
413
|
) as boolean,
|
|
220
414
|
name: checkedProp<string>(
|
|
221
415
|
props['name'],
|
|
222
416
|
{ kind: 'terminal', name: 'string' },
|
|
223
417
|
false,
|
|
224
418
|
'name',
|
|
225
|
-
undefined,
|
|
226
|
-
undefined,
|
|
227
419
|
) as string,
|
|
228
420
|
openOnFocus: checkedProp<boolean>(
|
|
229
421
|
props['openOnFocus'],
|
|
230
422
|
{ kind: 'terminal', name: 'boolean' },
|
|
231
423
|
false,
|
|
232
424
|
'openOnFocus',
|
|
233
|
-
undefined,
|
|
234
|
-
undefined,
|
|
235
425
|
) as boolean,
|
|
236
426
|
placeholder: checkedProp<string>(
|
|
237
427
|
props['placeholder'],
|
|
238
428
|
{ kind: 'terminal', name: 'string' },
|
|
239
429
|
false,
|
|
240
430
|
'placeholder',
|
|
241
|
-
undefined,
|
|
242
|
-
undefined,
|
|
243
431
|
) as string,
|
|
244
|
-
query: checkedProp<string>(
|
|
245
|
-
props['query'],
|
|
246
|
-
{ kind: 'terminal', name: 'string' },
|
|
247
|
-
false,
|
|
248
|
-
'query',
|
|
249
|
-
undefined,
|
|
250
|
-
undefined,
|
|
251
|
-
),
|
|
432
|
+
query: checkedProp<string>(props['query'], { kind: 'terminal', name: 'string' }, false, 'query'),
|
|
252
433
|
readonly: checkedProp<boolean>(
|
|
253
434
|
props['readonly'],
|
|
254
435
|
{ kind: 'terminal', name: 'boolean' },
|
|
255
436
|
false,
|
|
256
437
|
'readonly',
|
|
257
|
-
undefined,
|
|
258
|
-
undefined,
|
|
259
438
|
) as boolean,
|
|
260
439
|
required: checkedProp<boolean>(
|
|
261
440
|
props['required'],
|
|
262
441
|
{ kind: 'terminal', name: 'boolean' },
|
|
263
442
|
false,
|
|
264
443
|
'required',
|
|
265
|
-
undefined,
|
|
266
|
-
undefined,
|
|
267
444
|
) as boolean,
|
|
268
445
|
selectedValues: checkedProp<readonly (string)[]>(
|
|
269
446
|
props['selectedValues'],
|
|
270
447
|
{ kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
271
448
|
false,
|
|
272
449
|
'selectedValues',
|
|
273
|
-
undefined,
|
|
274
|
-
undefined,
|
|
275
450
|
),
|
|
276
451
|
size: checkedProp<'sm' | 'md' | 'lg'>(
|
|
277
452
|
props['size'],
|
|
278
453
|
{ kind: 'terminal', name: 'keyword' },
|
|
279
454
|
false,
|
|
280
455
|
'size',
|
|
281
|
-
undefined,
|
|
282
|
-
['sm', 'md', 'lg'],
|
|
283
456
|
) as 'sm' | 'md' | 'lg',
|
|
284
457
|
tokenSeparators: checkedProp<readonly (string)[]>(
|
|
285
458
|
props['tokenSeparators'],
|
|
286
459
|
{ kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
287
460
|
false,
|
|
288
461
|
'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
462
|
),
|
|
463
|
+
value: checkedProp<string>(props['value'], { kind: 'terminal', name: 'string' }, false, 'value'),
|
|
300
464
|
}))
|
|
301
465
|
void checkedProps.value
|
|
302
466
|
watchSyncEffect(() => {
|
|
@@ -591,7 +755,7 @@ const rows = ref<
|
|
|
591
755
|
}
|
|
592
756
|
}[]
|
|
593
757
|
>([])
|
|
594
|
-
const active = ref
|
|
758
|
+
const active = ref(-1)
|
|
595
759
|
const helpOpen = ref(false)
|
|
596
760
|
const lookupError = ref('')
|
|
597
761
|
const validation = ref<
|
|
@@ -636,22 +800,94 @@ const statusText = ref('')
|
|
|
636
800
|
const validationStatus = ref('pristine')
|
|
637
801
|
let guardedPrevious: any
|
|
638
802
|
const guarded = computed(() => {
|
|
803
|
+
if (!(expanded.value == null || typeof expanded.value === 'boolean')) return guardedPrevious
|
|
804
|
+
return guardedPrevious = expanded.value
|
|
805
|
+
})
|
|
806
|
+
let guardedBindingPrevious: any
|
|
807
|
+
const guardedBinding = computed(() => {
|
|
808
|
+
if (!(validationStatus.value == null || typeof validationStatus.value === 'string')) {
|
|
809
|
+
return guardedBindingPrevious
|
|
810
|
+
}
|
|
811
|
+
return guardedBindingPrevious = checkedProps.value.invalid || validationStatus.value === 'error'
|
|
812
|
+
})
|
|
813
|
+
let guardedBinding2Previous: any
|
|
814
|
+
const guardedBinding2 = computed(() => {
|
|
815
|
+
if (!(validationStatus.value == null || typeof validationStatus.value === 'string')) {
|
|
816
|
+
return guardedBinding2Previous
|
|
817
|
+
}
|
|
818
|
+
return guardedBinding2Previous = checkedProps.value.loading
|
|
819
|
+
|| validationStatus.value === 'pending'
|
|
820
|
+
})
|
|
821
|
+
let guardedBinding3Previous: any
|
|
822
|
+
const guardedBinding3 = computed(() => {
|
|
639
823
|
if (
|
|
640
824
|
!(internalItems.value?.['0'] == null
|
|
641
825
|
|| (typeof internalItems.value?.['0'] === 'object' && internalItems.value?.['0'] !== null
|
|
642
826
|
&& !Array.isArray(internalItems.value?.['0'])))
|
|
643
|
-
) return
|
|
644
|
-
return
|
|
827
|
+
) return guardedBinding3Previous
|
|
828
|
+
return guardedBinding3Previous = checkedProps.value.required
|
|
645
829
|
&& !(checkedProps.value.multiple && internalItems.value[0])
|
|
646
830
|
})
|
|
647
|
-
let
|
|
648
|
-
const
|
|
831
|
+
let guardedBinding4Previous: any
|
|
832
|
+
const guardedBinding4 = computed(() => {
|
|
833
|
+
if (!(submitted.value == null || typeof submitted.value === 'string')) {
|
|
834
|
+
return guardedBinding4Previous
|
|
835
|
+
}
|
|
836
|
+
return guardedBinding4Previous = submitted.value
|
|
837
|
+
})
|
|
838
|
+
let guardedBinding5Previous: any
|
|
839
|
+
const guardedBinding5 = computed(() => {
|
|
649
840
|
if (
|
|
650
|
-
!(
|
|
651
|
-
|
|
652
|
-
return
|
|
841
|
+
!((raw.value == null || typeof raw.value === 'string')
|
|
842
|
+
&& (selected.value == null || typeof selected.value === 'string'))
|
|
843
|
+
) return guardedBinding5Previous
|
|
844
|
+
return guardedBinding5Previous = checkedProps.value.disabled || checkedProps.value.readonly
|
|
653
845
|
|| (!raw.value && (checkedProps.value.multiple || selected.value === null))
|
|
654
846
|
})
|
|
847
|
+
let guardedBinding6Previous: any
|
|
848
|
+
const guardedBinding6 = computed(() => {
|
|
849
|
+
if (!(expanded.value == null || typeof expanded.value === 'boolean')) {
|
|
850
|
+
return guardedBinding6Previous
|
|
851
|
+
}
|
|
852
|
+
return guardedBinding6Previous = !expanded.value
|
|
853
|
+
})
|
|
854
|
+
let guardedBinding7Previous: any
|
|
855
|
+
const guardedBinding7 = computed(() => {
|
|
856
|
+
if (!(createIndex.value == null || Number.isInteger(createIndex.value))) {
|
|
857
|
+
return guardedBinding7Previous
|
|
858
|
+
}
|
|
859
|
+
return guardedBinding7Previous = createIndex.value
|
|
860
|
+
})
|
|
861
|
+
let guardedBinding8Previous: any
|
|
862
|
+
const guardedBinding8 = computed(() => {
|
|
863
|
+
if (!(message.value == null || typeof message.value === 'string')) return guardedBinding8Previous
|
|
864
|
+
return guardedBinding8Previous = message.value
|
|
865
|
+
})
|
|
866
|
+
let guardedBinding9Previous: any
|
|
867
|
+
const guardedBinding9 = computed(() => {
|
|
868
|
+
if (!(statusText.value == null || typeof statusText.value === 'string')) {
|
|
869
|
+
return guardedBinding9Previous
|
|
870
|
+
}
|
|
871
|
+
return guardedBinding9Previous = statusText.value
|
|
872
|
+
})
|
|
873
|
+
provide('html-next:ui-combobox:internalItems', internalItems)
|
|
874
|
+
provide('html-next:ui-combobox:raw', raw)
|
|
875
|
+
provide('html-next:ui-combobox:display', display)
|
|
876
|
+
provide('html-next:ui-combobox:selected', selected)
|
|
877
|
+
provide('html-next:ui-combobox:expanded', expanded)
|
|
878
|
+
provide('html-next:ui-combobox:rows', rows)
|
|
879
|
+
provide('html-next:ui-combobox:active', active)
|
|
880
|
+
provide('html-next:ui-combobox:helpOpen', helpOpen)
|
|
881
|
+
provide('html-next:ui-combobox:lookupError', lookupError)
|
|
882
|
+
provide('html-next:ui-combobox:validation', validation)
|
|
883
|
+
provide('html-next:ui-combobox:uid', uid)
|
|
884
|
+
provide('html-next:ui-combobox:submitted', submitted)
|
|
885
|
+
provide('html-next:ui-combobox:groups', groups)
|
|
886
|
+
provide('html-next:ui-combobox:creatable', creatable)
|
|
887
|
+
provide('html-next:ui-combobox:createIndex', createIndex)
|
|
888
|
+
provide('html-next:ui-combobox:message', message)
|
|
889
|
+
provide('html-next:ui-combobox:statusText', statusText)
|
|
890
|
+
provide('html-next:ui-combobox:validationStatus', validationStatus)
|
|
655
891
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
656
892
|
if (
|
|
657
893
|
typeof window !== 'undefined' && hydrationNode != null
|
|
@@ -1071,6 +1307,7 @@ function uniqueKeys<T>(
|
|
|
1071
1307
|
<div
|
|
1072
1308
|
data-component="ui-combobox"
|
|
1073
1309
|
v-bind="nativeAttrs($attrs)"
|
|
1310
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
1074
1311
|
:data-allow-create="reflectedProp('allowCreate', 'allow-create', checkedProps.allowCreate, undefined, false)"
|
|
1075
1312
|
:data-allow-free-text="reflectedProp('allowFreeText', 'allow-free-text', checkedProps.allowFreeText, undefined, false)"
|
|
1076
1313
|
:data-clearable="reflectedProp('clearable', 'clearable', checkedProps.clearable, undefined, false)"
|
|
@@ -1126,13 +1363,13 @@ function uniqueKeys<T>(
|
|
|
1126
1363
|
v-bind-control="{ tag: 'input', name: 'value', value: display, nativeProperty: true, defaultValue: '' }"
|
|
1127
1364
|
:id="`${uid}-input`"
|
|
1128
1365
|
:aria-controls="`${uid}-listbox`"
|
|
1129
|
-
:aria-expanded="
|
|
1130
|
-
:aria-invalid="
|
|
1131
|
-
:aria-busy="
|
|
1366
|
+
:aria-expanded="guarded"
|
|
1367
|
+
:aria-invalid="guardedBinding"
|
|
1368
|
+
:aria-busy="guardedBinding2"
|
|
1132
1369
|
:placeholder="checkedProps.placeholder ?? undefined"
|
|
1133
1370
|
:disabled="checkedProps.disabled ?? undefined"
|
|
1134
1371
|
:readonly="checkedProps.readonly ?? undefined"
|
|
1135
|
-
:required="
|
|
1372
|
+
:required="guardedBinding3"
|
|
1136
1373
|
ref="input"
|
|
1137
1374
|
>
|
|
1138
1375
|
</div>
|
|
@@ -1140,7 +1377,7 @@ function uniqueKeys<T>(
|
|
|
1140
1377
|
v-if="checkedProps.name && !checkedProps.multiple"
|
|
1141
1378
|
type="hidden"
|
|
1142
1379
|
:name="checkedProps.name ?? undefined"
|
|
1143
|
-
:value.attr="
|
|
1380
|
+
:value.attr="guardedBinding4"
|
|
1144
1381
|
:disabled="checkedProps.disabled ?? undefined"
|
|
1145
1382
|
>
|
|
1146
1383
|
<template v-if="checkedProps.name && checkedProps.multiple"><KeyedBoundary><input
|
|
@@ -1156,7 +1393,7 @@ function uniqueKeys<T>(
|
|
|
1156
1393
|
type="button"
|
|
1157
1394
|
data-combobox-action="clear"
|
|
1158
1395
|
aria-label="Clear"
|
|
1159
|
-
:disabled="
|
|
1396
|
+
:disabled="guardedBinding5"
|
|
1160
1397
|
>
|
|
1161
1398
|
<svg
|
|
1162
1399
|
class="affordance-icon"
|
|
@@ -1223,7 +1460,7 @@ function uniqueKeys<T>(
|
|
|
1223
1460
|
:id="`${uid}-help-text`"
|
|
1224
1461
|
:for="`${uid}-help`"
|
|
1225
1462
|
>{{ checkedProps.help }}</UiTooltip>
|
|
1226
|
-
<div class="popup" :hidden="
|
|
1463
|
+
<div class="popup" :hidden="guardedBinding6" ref="popup">
|
|
1227
1464
|
<div
|
|
1228
1465
|
role="listbox"
|
|
1229
1466
|
:id="`${uid}-listbox`"
|
|
@@ -1281,12 +1518,12 @@ function uniqueKeys<T>(
|
|
|
1281
1518
|
aria-selected="false"
|
|
1282
1519
|
:data-multiple="checkedProps.multiple ? '' : undefined"
|
|
1283
1520
|
:id="`${uid}-option-${createIndex}`"
|
|
1284
|
-
:data-index="
|
|
1521
|
+
:data-index="guardedBinding7"
|
|
1285
1522
|
:class="{ active: createIndex === active }"
|
|
1286
1523
|
>
|
|
1287
1524
|
{{ `Create “${raw}”` }}
|
|
1288
1525
|
</div>
|
|
1289
|
-
<div v-if="message" class="message">{{
|
|
1526
|
+
<div v-if="message" class="message">{{ guardedBinding8 }}</div>
|
|
1290
1527
|
<div
|
|
1291
1528
|
v-if="!checkedProps.loading && !(rows[0]) && !creatable && !lookupError"
|
|
1292
1529
|
class="message"
|
|
@@ -1301,7 +1538,9 @@ function uniqueKeys<T>(
|
|
|
1301
1538
|
{{ issue.message }}
|
|
1302
1539
|
</div>
|
|
1303
1540
|
</div>
|
|
1304
|
-
<div class="sr-only" role="status" aria-live="polite" aria-atomic="true">
|
|
1541
|
+
<div class="sr-only" role="status" aria-live="polite" aria-atomic="true">
|
|
1542
|
+
{{ guardedBinding9 }}
|
|
1543
|
+
</div>
|
|
1305
1544
|
<div class="authored-options" hidden="" aria-hidden="true" ref="options"><slot /></div>
|
|
1306
1545
|
</div>
|
|
1307
1546
|
</template>
|
package/vue/UiContainer.vue
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
<!-- Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.15 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import { computed, getCurrentInstance, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
|
-
import { checkedProp } from './props'
|
|
5
|
+
import { checkedProp, vPropValidity } from './props'
|
|
6
6
|
|
|
7
7
|
defineOptions({ inheritAttrs: false })
|
|
8
8
|
|
|
9
|
+
const propValidityContract = {
|
|
10
|
+
props: {
|
|
11
|
+
gutters: {
|
|
12
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
13
|
+
required: false,
|
|
14
|
+
target: { attribute: 'gutters' },
|
|
15
|
+
description:
|
|
16
|
+
'Inline padding on both sides, which keeps content off the edges of a narrow screen: s is 0.75rem, m is 1rem (also the default), and l is 1.5rem.',
|
|
17
|
+
values: ['s', 'm', 'l'],
|
|
18
|
+
},
|
|
19
|
+
measure: {
|
|
20
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
21
|
+
required: false,
|
|
22
|
+
target: { attribute: 'measure' },
|
|
23
|
+
description:
|
|
24
|
+
'The container\'s maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The\n container centres itself when its parent is wider. The --ui-container-measure custom property, set on the container itself, overrides it; set on an\n ancestor, it does nothing.',
|
|
25
|
+
values: ['narrow', 'wide'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
9
29
|
const props = defineProps({
|
|
10
30
|
gutters: { type: null as unknown as PropType<'s' | 'm' | 'l' | null>, default: null },
|
|
11
31
|
measure: { type: null as unknown as PropType<'narrow' | 'wide' | null>, default: null },
|
|
@@ -16,16 +36,12 @@ const checkedProps = computed(() => ({
|
|
|
16
36
|
{ kind: 'terminal', name: 'keyword' },
|
|
17
37
|
false,
|
|
18
38
|
'gutters',
|
|
19
|
-
undefined,
|
|
20
|
-
['s', 'm', 'l'],
|
|
21
39
|
),
|
|
22
40
|
measure: checkedProp<'narrow' | 'wide'>(
|
|
23
41
|
props['measure'],
|
|
24
42
|
{ kind: 'terminal', name: 'keyword' },
|
|
25
43
|
false,
|
|
26
44
|
'measure',
|
|
27
|
-
undefined,
|
|
28
|
-
['narrow', 'wide'],
|
|
29
45
|
),
|
|
30
46
|
}))
|
|
31
47
|
void checkedProps.value
|
|
@@ -100,6 +116,7 @@ const hostState = computed(() =>
|
|
|
100
116
|
<div
|
|
101
117
|
data-component="ui-container"
|
|
102
118
|
v-bind="nativeAttrs($attrs)"
|
|
119
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...checkedProps } }"
|
|
103
120
|
:data-gutters="reflectedProp('gutters', 'gutters', checkedProps.gutters, undefined, false)"
|
|
104
121
|
:data-measure="reflectedProp('measure', 'measure', checkedProps.measure, undefined, false)"
|
|
105
122
|
:data-ui-container-state="hostState || undefined"
|