@threadlabs/looma 0.5.1 → 0.5.2
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/README.md +1 -1
- package/components/ui-button/ui-button.html +13 -0
- package/components/ui-combobox/ui-combobox.html +12 -4
- package/components/ui-dialog/ui-dialog.html +13 -0
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +1 -1
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +6 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +20 -4
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +8 -4
- package/components/ui-form-field/ui-form-field.html +18 -7
- package/components/ui-icon/ui-icon.html +5 -1
- package/components/ui-icon-button/ui-icon-button.html +30 -0
- package/components/ui-popover/ui-popover.js +10 -2
- package/components/ui-search-shell/ui-search-shell.html +7 -0
- package/components/ui-search-shell/ui-search-shell.js +9 -0
- package/components/ui-tabs/ui-tabs.html +1 -1
- package/components/ui-toast-region/ui-toast-region.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- 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-button.css +11 -1
- package/styles/ui-callout.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-dialog.css +18 -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.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 +24 -10
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +36 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.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-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +11 -2
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +10 -2
- package/styles/ui-tree.css +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 +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -2
- package/vanilla/UiButton.d.ts +3 -1
- package/vanilla/UiButton.js +3 -3
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +2 -2
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +3 -3
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -2
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- 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 +3 -3
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +3 -3
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +3 -3
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +3 -3
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +3 -3
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -2
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -2
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +15 -6
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +2 -2
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +3 -3
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +2 -2
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +2 -2
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- 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 +2 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +2 -2
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +2 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +2 -2
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -2
- 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/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +3 -3
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +2 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +3 -3
- 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 +2 -2
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +2 -2
- package/vue/UiAffordanceScope.d.ts +2 -2
- package/vue/UiAffordanceScope.vue +92 -73
- package/vue/UiAvatar.d.ts +7 -7
- package/vue/UiAvatar.vue +145 -105
- package/vue/UiAvatarGroup.d.ts +4 -4
- package/vue/UiAvatarGroup.vue +134 -118
- package/vue/UiBadge.d.ts +4 -4
- package/vue/UiBadge.vue +113 -114
- package/vue/UiButton.d.ts +10 -6
- package/vue/UiButton.vue +289 -248
- package/vue/UiCallout.d.ts +2 -2
- package/vue/UiCallout.vue +154 -87
- package/vue/UiCheckbox.d.ts +14 -10
- package/vue/UiCheckbox.vue +228 -162
- package/vue/UiCluster.d.ts +2 -2
- package/vue/UiCluster.vue +53 -60
- package/vue/UiCombobox.d.ts +36 -32
- package/vue/UiCombobox.vue +1005 -416
- package/vue/UiContainer.d.ts +2 -2
- package/vue/UiContainer.vue +48 -51
- package/vue/UiContextMenu.d.ts +6 -4
- package/vue/UiContextMenu.vue +205 -116
- package/vue/UiDialog.d.ts +11 -9
- package/vue/UiDialog.vue +287 -212
- package/vue/UiDisclosure.d.ts +8 -6
- package/vue/UiDisclosure.vue +248 -159
- package/vue/UiEditable.d.ts +16 -12
- package/vue/UiEditable.vue +325 -205
- package/vue/UiEditorInsertTableGrid.d.ts +8 -8
- package/vue/UiEditorInsertTableGrid.vue +216 -157
- package/vue/UiEditorMentionMenu.d.ts +9 -9
- package/vue/UiEditorMentionMenu.vue +265 -222
- package/vue/UiEditorSlashMenu.d.ts +7 -7
- package/vue/UiEditorSlashMenu.vue +286 -240
- package/vue/UiEditorTableContextMenu.d.ts +5 -5
- package/vue/UiEditorTableContextMenu.vue +306 -193
- package/vue/UiEditorTableOverlay.d.ts +2 -2
- package/vue/UiEditorTableOverlay.vue +609 -369
- package/vue/UiEditorTableToolbar.d.ts +7 -7
- package/vue/UiEditorTableToolbar.vue +443 -268
- package/vue/UiEditorToolbar.d.ts +2 -2
- package/vue/UiEditorToolbar.vue +134 -121
- package/vue/UiFloatingActionButton.d.ts +6 -6
- package/vue/UiFloatingActionButton.vue +100 -99
- package/vue/UiFormField.d.ts +6 -6
- package/vue/UiFormField.vue +112 -80
- package/vue/UiGrid.d.ts +2 -2
- package/vue/UiGrid.vue +51 -57
- package/vue/UiIcon.d.ts +2 -2
- package/vue/UiIcon.vue +118 -89
- package/vue/UiIconButton.d.ts +11 -11
- package/vue/UiIconButton.vue +283 -217
- package/vue/UiInput.d.ts +9 -9
- package/vue/UiInput.vue +153 -127
- package/vue/UiMenu.d.ts +8 -6
- package/vue/UiMenu.vue +217 -143
- package/vue/UiMenuItem.d.ts +4 -4
- package/vue/UiMenuItem.vue +52 -46
- package/vue/UiPopover.d.ts +8 -6
- package/vue/UiPopover.vue +197 -137
- package/vue/UiRadio.d.ts +14 -10
- package/vue/UiRadio.vue +183 -117
- package/vue/UiRadioGroup.d.ts +14 -12
- package/vue/UiRadioGroup.vue +172 -111
- package/vue/UiReel.d.ts +3 -3
- package/vue/UiReel.vue +77 -77
- package/vue/UiSearchResultRow.d.ts +4 -4
- package/vue/UiSearchResultRow.vue +124 -115
- package/vue/UiSearchShell.d.ts +10 -8
- package/vue/UiSearchShell.vue +245 -176
- package/vue/UiSelect.d.ts +9 -9
- package/vue/UiSelect.vue +162 -134
- package/vue/UiSeparator.d.ts +2 -2
- package/vue/UiSeparator.vue +22 -27
- package/vue/UiSidebar.d.ts +20 -18
- package/vue/UiSidebar.vue +312 -224
- package/vue/UiStack.d.ts +3 -3
- package/vue/UiStack.vue +64 -70
- package/vue/UiSwitch.d.ts +12 -8
- package/vue/UiSwitch.vue +218 -150
- package/vue/UiSwitcher.d.ts +3 -3
- package/vue/UiSwitcher.vue +73 -75
- package/vue/UiTabs.d.ts +10 -8
- package/vue/UiTabs.vue +251 -210
- package/vue/UiTextarea.d.ts +11 -11
- package/vue/UiTextarea.vue +155 -128
- package/vue/UiToastRegion.d.ts +10 -8
- package/vue/UiToastRegion.vue +261 -198
- package/vue/UiTooltip.d.ts +14 -12
- package/vue/UiTooltip.vue +241 -177
- package/vue/UiTopBar.vue +51 -42
- package/vue/UiTree.d.ts +8 -6
- package/vue/UiTree.vue +157 -70
- package/vue/UiTreeItem.d.ts +24 -22
- package/vue/UiTreeItem.vue +456 -339
- package/vue/chunks/UiAffordanceScope.js +9 -16
- package/vue/chunks/UiAvatar.js +23 -29
- package/vue/chunks/UiAvatarGroup.js +16 -39
- package/vue/chunks/UiBadge.js +3 -12
- package/vue/chunks/UiButton.js +15 -18
- package/vue/chunks/UiCallout.js +8 -17
- package/vue/chunks/UiCheckbox.js +37 -40
- package/vue/chunks/UiCluster.js +3 -12
- package/vue/chunks/UiCombobox.js +224 -266
- package/vue/chunks/UiContainer.js +3 -12
- package/vue/chunks/UiContextMenu.js +39 -34
- package/vue/chunks/UiDialog.js +36 -39
- package/vue/chunks/UiDisclosure.js +43 -48
- package/vue/chunks/UiEditable.js +55 -57
- package/vue/chunks/UiEditorInsertTableGrid.js +55 -73
- package/vue/chunks/UiEditorMentionMenu.js +40 -81
- package/vue/chunks/UiEditorSlashMenu.js +28 -52
- package/vue/chunks/UiEditorTableContextMenu.js +32 -56
- package/vue/chunks/UiEditorTableOverlay.js +58 -82
- package/vue/chunks/UiEditorTableToolbar.js +61 -85
- package/vue/chunks/UiEditorToolbar.js +4 -13
- package/vue/chunks/UiFloatingActionButton.js +7 -21
- package/vue/chunks/UiFormField.js +15 -12
- package/vue/chunks/UiGrid.js +3 -12
- package/vue/chunks/UiIcon.js +20 -43
- package/vue/chunks/UiIconButton.js +16 -28
- package/vue/chunks/UiInput.js +20 -25
- package/vue/chunks/UiMenu.js +29 -33
- package/vue/chunks/UiMenuItem.js +4 -10
- package/vue/chunks/UiPopover.js +28 -29
- package/vue/chunks/UiRadio.js +36 -39
- package/vue/chunks/UiRadioGroup.js +30 -34
- package/vue/chunks/UiReel.js +6 -15
- package/vue/chunks/UiSearchResultRow.js +6 -19
- package/vue/chunks/UiSearchShell.js +25 -28
- package/vue/chunks/UiSelect.js +20 -23
- package/vue/chunks/UiSeparator.js +2 -8
- package/vue/chunks/UiSidebar.js +39 -44
- package/vue/chunks/UiStack.js +6 -15
- package/vue/chunks/UiSwitch.js +35 -38
- package/vue/chunks/UiSwitcher.js +6 -15
- package/vue/chunks/UiTabs.js +47 -85
- package/vue/chunks/UiTextarea.js +21 -26
- package/vue/chunks/UiToastRegion.js +38 -72
- package/vue/chunks/UiTooltip.js +34 -35
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +20 -15
- package/vue/chunks/UiTreeItem.js +85 -102
- package/vue/components.css +3994 -3801
package/vue/chunks/UiCombobox.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { t as UiBadge_default } from "./UiBadge.js";
|
|
3
3
|
import { t as UiTooltip_default } from "./UiTooltip.js";
|
|
4
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, shallowRef, toDisplayString, watchEffect, withCtx } from "vue";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, shallowRef, toDisplayString, useTemplateRef, watchEffect, withCtx } from "vue";
|
|
5
5
|
import * as controllerModule from "@threadlabs/looma/components/ui-combobox/ui-combobox.js";
|
|
6
6
|
//#region .build/vue/UiCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = ["data-ui-combobox-state"];
|
|
8
8
|
var _hoisted_2 = ["for"];
|
|
9
|
-
var _hoisted_3 =
|
|
9
|
+
var _hoisted_3 = {
|
|
10
|
+
class: "field",
|
|
11
|
+
ref: "field"
|
|
12
|
+
};
|
|
13
|
+
var _hoisted_4 = [
|
|
10
14
|
"data-index",
|
|
11
15
|
"disabled",
|
|
12
16
|
"aria-label"
|
|
13
17
|
];
|
|
14
|
-
var
|
|
18
|
+
var _hoisted_5 = [
|
|
15
19
|
"id",
|
|
16
20
|
"aria-controls",
|
|
17
21
|
"aria-expanded",
|
|
@@ -24,44 +28,50 @@ var _hoisted_4 = [
|
|
|
24
28
|
"readonly",
|
|
25
29
|
"required"
|
|
26
30
|
];
|
|
27
|
-
var
|
|
31
|
+
var _hoisted_6 = {
|
|
28
32
|
key: 1,
|
|
29
33
|
type: "button",
|
|
30
34
|
"data-combobox-action": "clear",
|
|
31
35
|
"aria-label": "Clear"
|
|
32
36
|
};
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
+
var _hoisted_7 = ["id", "disabled"];
|
|
38
|
+
var _hoisted_8 = ["aria-controls"];
|
|
39
|
+
var _hoisted_9 = ["hidden"];
|
|
40
|
+
var _hoisted_10 = [
|
|
37
41
|
"id",
|
|
38
42
|
"aria-label",
|
|
39
43
|
"aria-busy"
|
|
40
44
|
];
|
|
41
|
-
var
|
|
42
|
-
var
|
|
45
|
+
var _hoisted_11 = ["role", "aria-label"];
|
|
46
|
+
var _hoisted_12 = {
|
|
43
47
|
key: 0,
|
|
44
48
|
class: "group"
|
|
45
49
|
};
|
|
46
|
-
var
|
|
50
|
+
var _hoisted_13 = [
|
|
47
51
|
"id",
|
|
48
52
|
"aria-selected",
|
|
49
53
|
"aria-disabled",
|
|
50
54
|
"data-index"
|
|
51
55
|
];
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
56
|
+
var _hoisted_14 = { class: "primary" };
|
|
57
|
+
var _hoisted_15 = ["id", "data-index"];
|
|
58
|
+
var _hoisted_16 = {
|
|
55
59
|
key: 1,
|
|
56
60
|
class: "message"
|
|
57
61
|
};
|
|
58
|
-
var
|
|
59
|
-
var
|
|
62
|
+
var _hoisted_17 = ["id", "hidden"];
|
|
63
|
+
var _hoisted_18 = {
|
|
60
64
|
class: "sr-only",
|
|
61
65
|
role: "status",
|
|
62
66
|
"aria-live": "polite",
|
|
63
67
|
"aria-atomic": "true"
|
|
64
68
|
};
|
|
69
|
+
var _hoisted_19 = {
|
|
70
|
+
class: "authored-options",
|
|
71
|
+
hidden: "",
|
|
72
|
+
"aria-hidden": "true",
|
|
73
|
+
ref: "options"
|
|
74
|
+
};
|
|
65
75
|
//#endregion
|
|
66
76
|
//#region .build/vue/UiCombobox.vue
|
|
67
77
|
var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -69,23 +79,23 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
69
79
|
__name: "UiCombobox",
|
|
70
80
|
props: {
|
|
71
81
|
allowCreate: {
|
|
72
|
-
type:
|
|
82
|
+
type: Boolean,
|
|
73
83
|
default: false
|
|
74
84
|
},
|
|
75
85
|
allowFreeText: {
|
|
76
|
-
type:
|
|
86
|
+
type: Boolean,
|
|
77
87
|
default: false
|
|
78
88
|
},
|
|
79
89
|
clearable: {
|
|
80
|
-
type:
|
|
90
|
+
type: Boolean,
|
|
81
91
|
default: false
|
|
82
92
|
},
|
|
83
93
|
disabled: {
|
|
84
|
-
type:
|
|
94
|
+
type: Boolean,
|
|
85
95
|
default: false
|
|
86
96
|
},
|
|
87
97
|
disclosure: {
|
|
88
|
-
type:
|
|
98
|
+
type: Boolean,
|
|
89
99
|
default: false
|
|
90
100
|
},
|
|
91
101
|
help: { default: "" },
|
|
@@ -93,18 +103,18 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
93
103
|
label: { default: "" },
|
|
94
104
|
labelVisibility: { default: "visible" },
|
|
95
105
|
multiple: {
|
|
96
|
-
type:
|
|
106
|
+
type: Boolean,
|
|
97
107
|
default: false
|
|
98
108
|
},
|
|
99
109
|
name: { default: "" },
|
|
100
110
|
placeholder: { default: "" },
|
|
101
111
|
query: {},
|
|
102
112
|
readonly: {
|
|
103
|
-
type:
|
|
113
|
+
type: Boolean,
|
|
104
114
|
default: false
|
|
105
115
|
},
|
|
106
116
|
required: {
|
|
107
|
-
type:
|
|
117
|
+
type: Boolean,
|
|
108
118
|
default: false
|
|
109
119
|
},
|
|
110
120
|
size: { default: "md" },
|
|
@@ -112,6 +122,8 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
112
122
|
value: {}
|
|
113
123
|
},
|
|
114
124
|
emits: [
|
|
125
|
+
"update:query",
|
|
126
|
+
"update:value",
|
|
115
127
|
"query-change",
|
|
116
128
|
"value-change",
|
|
117
129
|
"free-entry",
|
|
@@ -123,134 +135,90 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
123
135
|
"create-item"
|
|
124
136
|
],
|
|
125
137
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
126
|
-
const hn = {
|
|
127
|
-
t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
|
|
128
|
-
n: (v) => typeof v === "number" && v === v ? v : void 0,
|
|
129
|
-
op: (op, a, b) => {
|
|
130
|
-
const x = hn.n(a), y = hn.n(b);
|
|
131
|
-
if (x === void 0 || y === void 0) return void 0;
|
|
132
|
-
switch (op) {
|
|
133
|
-
case "<": return x < y;
|
|
134
|
-
case "<=": return x <= y;
|
|
135
|
-
case ">": return x > y;
|
|
136
|
-
case ">=": return x >= y;
|
|
137
|
-
case "+": return x + y;
|
|
138
|
-
case "-": return x - y;
|
|
139
|
-
case "*": return x * y;
|
|
140
|
-
case "/": return x / y;
|
|
141
|
-
case "%": return x % y;
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
|
|
145
|
-
attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
|
|
146
|
-
enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v),
|
|
147
|
-
call: (fn, ...args) => {
|
|
148
|
-
if (fn === "format") {
|
|
149
|
-
let index = 1;
|
|
150
|
-
return typeof args[0] === "string" ? args[0].replace(/%s/g, () => index < args.length ? hn.text(args[index++]) : "%s") : void 0;
|
|
151
|
-
}
|
|
152
|
-
const n = args.map(hn.n);
|
|
153
|
-
if (n.some((value) => value === void 0)) return void 0;
|
|
154
|
-
const v = n;
|
|
155
|
-
switch (fn) {
|
|
156
|
-
case "abs": return v.length === 1 ? Math.abs(v[0]) : void 0;
|
|
157
|
-
case "round": return v.length === 1 ? Math.round(v[0]) : void 0;
|
|
158
|
-
case "min": return v.length > 0 ? Math.min(...v) : void 0;
|
|
159
|
-
case "max": return v.length > 0 ? Math.max(...v) : void 0;
|
|
160
|
-
case "clamp": return v.length === 3 ? Math.min(Math.max(v[0], v[1]), v[2]) : void 0;
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
shape: (items, where, sort, limit) => {
|
|
164
|
-
let list = Array.isArray(items) ? items.slice() : [];
|
|
165
|
-
if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
|
|
166
|
-
if (sort.length > 0) {
|
|
167
|
-
const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
|
|
168
|
-
const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
|
|
169
|
-
list.sort((a, b) => {
|
|
170
|
-
for (const key of sort) {
|
|
171
|
-
const descending = key.startsWith("-");
|
|
172
|
-
const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
|
|
173
|
-
if (order !== 0) return descending ? -order : order;
|
|
174
|
-
}
|
|
175
|
-
return 0;
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
138
|
const props = __props;
|
|
182
139
|
const emit = __emit;
|
|
183
140
|
const root = ref(null);
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
141
|
+
const fieldElement = useTemplateRef("field");
|
|
142
|
+
const inputElement = useTemplateRef("input");
|
|
143
|
+
const popupElement = useTemplateRef("popup");
|
|
144
|
+
const listboxElement = useTemplateRef("listbox");
|
|
145
|
+
const optionsElement = useTemplateRef("options");
|
|
146
|
+
const raw = ref("");
|
|
147
|
+
const display = ref("");
|
|
148
|
+
const selected = ref(null);
|
|
149
|
+
const expanded = ref(false);
|
|
150
|
+
const rows = ref([]);
|
|
151
|
+
const active = ref(-1);
|
|
152
|
+
const loading = ref(false);
|
|
153
|
+
const helpOpen = ref(false);
|
|
154
|
+
const lookupError = ref("");
|
|
155
|
+
const validation = ref({
|
|
156
|
+
status: "pristine",
|
|
157
|
+
touched: false,
|
|
158
|
+
dirty: false,
|
|
159
|
+
issues: []
|
|
199
160
|
});
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
161
|
+
const uid = ref("");
|
|
162
|
+
const groups = ref([]);
|
|
163
|
+
const creatable = ref(false);
|
|
164
|
+
const createIndex = ref(0);
|
|
165
|
+
const message = ref("");
|
|
166
|
+
const statusText = ref("");
|
|
167
|
+
const validationStatus = ref("pristine");
|
|
168
|
+
/** The values the styles' :host-state() rules test. */
|
|
169
|
+
const hostState = computed(() => [
|
|
170
|
+
props.size && `size size=${props.size}`,
|
|
171
|
+
validationStatus.value && "validationStatus",
|
|
172
|
+
`validationStatus=${encodeURIComponent(validationStatus.value)}`,
|
|
173
|
+
props.multiple && "multiple"
|
|
174
|
+
].filter(Boolean).join(" "));
|
|
207
175
|
/** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
|
|
208
|
-
|
|
176
|
+
function dispatch(name, detail) {
|
|
209
177
|
const declared = {
|
|
210
178
|
"query-change": {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
179
|
+
bubbles: true,
|
|
180
|
+
composed: true,
|
|
181
|
+
cancelable: false
|
|
214
182
|
},
|
|
215
183
|
"value-change": {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
184
|
+
bubbles: true,
|
|
185
|
+
composed: true,
|
|
186
|
+
cancelable: false
|
|
219
187
|
},
|
|
220
188
|
"free-entry": {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
189
|
+
bubbles: true,
|
|
190
|
+
composed: true,
|
|
191
|
+
cancelable: false
|
|
224
192
|
},
|
|
225
193
|
"create-entry": {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
194
|
+
bubbles: true,
|
|
195
|
+
composed: true,
|
|
196
|
+
cancelable: false
|
|
229
197
|
},
|
|
230
198
|
"validation-change": {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
199
|
+
bubbles: true,
|
|
200
|
+
composed: true,
|
|
201
|
+
cancelable: false
|
|
234
202
|
},
|
|
235
203
|
"options-change": {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
204
|
+
bubbles: true,
|
|
205
|
+
composed: true,
|
|
206
|
+
cancelable: false
|
|
239
207
|
},
|
|
240
208
|
"add-item": {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
209
|
+
bubbles: true,
|
|
210
|
+
composed: true,
|
|
211
|
+
cancelable: false
|
|
244
212
|
},
|
|
245
213
|
"remove-item": {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
214
|
+
bubbles: true,
|
|
215
|
+
composed: true,
|
|
216
|
+
cancelable: false
|
|
249
217
|
},
|
|
250
218
|
"create-item": {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
219
|
+
bubbles: true,
|
|
220
|
+
composed: true,
|
|
221
|
+
cancelable: false
|
|
254
222
|
}
|
|
255
223
|
};
|
|
256
224
|
const checks = {
|
|
@@ -347,112 +315,104 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
347
315
|
"create-item": (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["query"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => ["query", "trigger"].includes(key))
|
|
348
316
|
};
|
|
349
317
|
if (detail !== void 0 && checks[name] !== void 0 && !checks[name](detail)) throw new TypeError(`HR002: Event \`${name}\` detail does not satisfy its declared type.`);
|
|
350
|
-
emit
|
|
318
|
+
const emitEvent = emit;
|
|
319
|
+
emitEvent(name, detail);
|
|
320
|
+
if (detail !== null && typeof detail === "object" && "query" in detail) emitEvent("update:query", detail["query"]);
|
|
321
|
+
if (detail !== null && typeof detail === "object" && "value" in detail) emitEvent("update:value", detail["value"]);
|
|
351
322
|
return root.value?.dispatchEvent(new CustomEvent(name, {
|
|
352
323
|
bubbles: true,
|
|
353
324
|
composed: true,
|
|
354
325
|
...declared[name],
|
|
355
326
|
detail
|
|
356
327
|
})) ?? true;
|
|
357
|
-
}
|
|
358
|
-
/** The resolved values the styles' :host-state() rules test. */
|
|
359
|
-
const hostState = computed(() => [
|
|
360
|
-
"size",
|
|
361
|
-
"validationStatus",
|
|
362
|
-
"multiple"
|
|
363
|
-
].flatMap((name) => {
|
|
364
|
-
const value = read(name);
|
|
365
|
-
const tokens = hn.t(value) ? [name] : [];
|
|
366
|
-
if (typeof value === "string" || typeof value === "number") tokens.push(`${name}=${encodeURIComponent(String(value))}`);
|
|
367
|
-
return tokens;
|
|
368
|
-
}).join(" "));
|
|
328
|
+
}
|
|
369
329
|
function read(name) {
|
|
370
|
-
if (name === "raw") return
|
|
371
|
-
if (name === "display") return
|
|
372
|
-
if (name === "selected") return
|
|
373
|
-
if (name === "expanded") return
|
|
374
|
-
if (name === "rows") return
|
|
375
|
-
if (name === "active") return
|
|
376
|
-
if (name === "loading") return
|
|
377
|
-
if (name === "helpOpen") return
|
|
378
|
-
if (name === "lookupError") return
|
|
379
|
-
if (name === "validation") return
|
|
380
|
-
if (name === "uid") return
|
|
381
|
-
if (name === "groups") return
|
|
382
|
-
if (name === "creatable") return
|
|
383
|
-
if (name === "createIndex") return
|
|
384
|
-
if (name === "message") return
|
|
385
|
-
if (name === "statusText") return
|
|
386
|
-
if (name === "validationStatus") return
|
|
330
|
+
if (name === "raw") return raw.value;
|
|
331
|
+
if (name === "display") return display.value;
|
|
332
|
+
if (name === "selected") return selected.value;
|
|
333
|
+
if (name === "expanded") return expanded.value;
|
|
334
|
+
if (name === "rows") return rows.value;
|
|
335
|
+
if (name === "active") return active.value;
|
|
336
|
+
if (name === "loading") return loading.value;
|
|
337
|
+
if (name === "helpOpen") return helpOpen.value;
|
|
338
|
+
if (name === "lookupError") return lookupError.value;
|
|
339
|
+
if (name === "validation") return validation.value;
|
|
340
|
+
if (name === "uid") return uid.value;
|
|
341
|
+
if (name === "groups") return groups.value;
|
|
342
|
+
if (name === "creatable") return creatable.value;
|
|
343
|
+
if (name === "createIndex") return createIndex.value;
|
|
344
|
+
if (name === "message") return message.value;
|
|
345
|
+
if (name === "statusText") return statusText.value;
|
|
346
|
+
if (name === "validationStatus") return validationStatus.value;
|
|
387
347
|
return props[name];
|
|
388
348
|
}
|
|
389
349
|
function write(name, value) {
|
|
390
350
|
if (name === "raw") {
|
|
391
|
-
|
|
351
|
+
raw.value = value;
|
|
392
352
|
return true;
|
|
393
353
|
}
|
|
394
354
|
if (name === "display") {
|
|
395
|
-
|
|
355
|
+
display.value = value;
|
|
396
356
|
return true;
|
|
397
357
|
}
|
|
398
358
|
if (name === "selected") {
|
|
399
|
-
|
|
359
|
+
selected.value = value;
|
|
400
360
|
return true;
|
|
401
361
|
}
|
|
402
362
|
if (name === "expanded") {
|
|
403
|
-
|
|
363
|
+
expanded.value = value;
|
|
404
364
|
return true;
|
|
405
365
|
}
|
|
406
366
|
if (name === "rows") {
|
|
407
|
-
|
|
367
|
+
rows.value = value;
|
|
408
368
|
return true;
|
|
409
369
|
}
|
|
410
370
|
if (name === "active") {
|
|
411
|
-
|
|
371
|
+
active.value = value;
|
|
412
372
|
return true;
|
|
413
373
|
}
|
|
414
374
|
if (name === "loading") {
|
|
415
|
-
|
|
375
|
+
loading.value = value;
|
|
416
376
|
return true;
|
|
417
377
|
}
|
|
418
378
|
if (name === "helpOpen") {
|
|
419
|
-
|
|
379
|
+
helpOpen.value = value;
|
|
420
380
|
return true;
|
|
421
381
|
}
|
|
422
382
|
if (name === "lookupError") {
|
|
423
|
-
|
|
383
|
+
lookupError.value = value;
|
|
424
384
|
return true;
|
|
425
385
|
}
|
|
426
386
|
if (name === "validation") {
|
|
427
|
-
|
|
387
|
+
validation.value = value;
|
|
428
388
|
return true;
|
|
429
389
|
}
|
|
430
390
|
if (name === "uid") {
|
|
431
|
-
|
|
391
|
+
uid.value = value;
|
|
432
392
|
return true;
|
|
433
393
|
}
|
|
434
394
|
if (name === "groups") {
|
|
435
|
-
|
|
395
|
+
groups.value = value;
|
|
436
396
|
return true;
|
|
437
397
|
}
|
|
438
398
|
if (name === "creatable") {
|
|
439
|
-
|
|
399
|
+
creatable.value = value;
|
|
440
400
|
return true;
|
|
441
401
|
}
|
|
442
402
|
if (name === "createIndex") {
|
|
443
|
-
|
|
403
|
+
createIndex.value = value;
|
|
444
404
|
return true;
|
|
445
405
|
}
|
|
446
406
|
if (name === "message") {
|
|
447
|
-
|
|
407
|
+
message.value = value;
|
|
448
408
|
return true;
|
|
449
409
|
}
|
|
450
410
|
if (name === "statusText") {
|
|
451
|
-
|
|
411
|
+
statusText.value = value;
|
|
452
412
|
return true;
|
|
453
413
|
}
|
|
454
414
|
if (name === "validationStatus") {
|
|
455
|
-
|
|
415
|
+
validationStatus.value = value;
|
|
456
416
|
return true;
|
|
457
417
|
}
|
|
458
418
|
throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
|
|
@@ -466,7 +426,23 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
466
426
|
get: (_target, name) => typeof name === "string" ? read(name) : void 0,
|
|
467
427
|
set: (_target, name, value) => typeof name === "string" && write(name, value)
|
|
468
428
|
}),
|
|
469
|
-
refs
|
|
429
|
+
refs: {
|
|
430
|
+
get field() {
|
|
431
|
+
return fieldElement.value;
|
|
432
|
+
},
|
|
433
|
+
get input() {
|
|
434
|
+
return inputElement.value;
|
|
435
|
+
},
|
|
436
|
+
get popup() {
|
|
437
|
+
return popupElement.value;
|
|
438
|
+
},
|
|
439
|
+
get listbox() {
|
|
440
|
+
return listboxElement.value;
|
|
441
|
+
},
|
|
442
|
+
get options() {
|
|
443
|
+
return optionsElement.value;
|
|
444
|
+
}
|
|
445
|
+
},
|
|
470
446
|
elements: new Proxy({}, { get: (_target, name) => {
|
|
471
447
|
if (typeof name !== "string" || root.value === null) return void 0;
|
|
472
448
|
return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
|
|
@@ -533,50 +509,43 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
533
509
|
ref: root
|
|
534
510
|
}), [
|
|
535
511
|
createElementVNode("label", {
|
|
536
|
-
for:
|
|
537
|
-
class: normalizeClass({ "sr-only":
|
|
538
|
-
}, [createTextVNode(toDisplayString(
|
|
539
|
-
createElementVNode("div",
|
|
540
|
-
class: "field",
|
|
541
|
-
ref: (element) => {
|
|
542
|
-
refs["field"] = element;
|
|
543
|
-
}
|
|
544
|
-
}, [
|
|
512
|
+
for: `${uid.value}-input`,
|
|
513
|
+
class: normalizeClass({ "sr-only": __props.labelVisibility === "sr-only" })
|
|
514
|
+
}, [createTextVNode(toDisplayString(__props.label) + " ", 1), __props.required ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" *")], 64)) : createCommentVNode("v-if", true)], 10, _hoisted_2),
|
|
515
|
+
createElementVNode("div", _hoisted_3, [
|
|
545
516
|
renderSlot(_ctx.$slots, "start", {}, void 0, true),
|
|
546
|
-
|
|
517
|
+
__props.multiple ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.items, (item, index) => {
|
|
547
518
|
return openBlock(), createElementBlock("button", {
|
|
548
|
-
key: item
|
|
519
|
+
key: item.id,
|
|
549
520
|
class: "item",
|
|
550
521
|
type: "button",
|
|
551
522
|
tabindex: "-1",
|
|
552
|
-
"data-index":
|
|
553
|
-
disabled:
|
|
554
|
-
"aria-label":
|
|
555
|
-
}, [renderSlot(_ctx.$slots,
|
|
556
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
523
|
+
"data-index": index,
|
|
524
|
+
disabled: __props.disabled || __props.readonly || item.disabled,
|
|
525
|
+
"aria-label": `${item.label}, press Delete or Backspace to remove`
|
|
526
|
+
}, [renderSlot(_ctx.$slots, `item-${item.id}`, {}, () => [createVNode(UiBadge_default, null, {
|
|
527
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
557
528
|
_: 2
|
|
558
|
-
}, 1024)], true)], 8,
|
|
529
|
+
}, 1024)], true)], 8, _hoisted_4);
|
|
559
530
|
}), 128)) : createCommentVNode("v-if", true),
|
|
560
531
|
createElementVNode("input", {
|
|
561
532
|
role: "combobox",
|
|
562
533
|
"aria-autocomplete": "list",
|
|
563
534
|
autocomplete: "off",
|
|
564
|
-
id:
|
|
565
|
-
"aria-controls":
|
|
566
|
-
"aria-expanded":
|
|
567
|
-
"aria-invalid":
|
|
568
|
-
"aria-busy":
|
|
569
|
-
".value":
|
|
570
|
-
placeholder:
|
|
571
|
-
name:
|
|
572
|
-
disabled:
|
|
573
|
-
readonly:
|
|
574
|
-
required:
|
|
575
|
-
ref:
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}, null, 40, _hoisted_4),
|
|
579
|
-
hn.t(props.clearable) ? (openBlock(), createElementBlock("button", _hoisted_5, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
|
|
535
|
+
id: `${uid.value}-input`,
|
|
536
|
+
"aria-controls": `${uid.value}-listbox`,
|
|
537
|
+
"aria-expanded": expanded.value,
|
|
538
|
+
"aria-invalid": validationStatus.value === "error",
|
|
539
|
+
"aria-busy": validationStatus.value === "pending",
|
|
540
|
+
".value": display.value,
|
|
541
|
+
placeholder: __props.placeholder,
|
|
542
|
+
name: __props.name,
|
|
543
|
+
disabled: __props.disabled,
|
|
544
|
+
readonly: __props.readonly,
|
|
545
|
+
required: __props.required,
|
|
546
|
+
ref: "input"
|
|
547
|
+
}, null, 40, _hoisted_5),
|
|
548
|
+
__props.clearable ? (openBlock(), createElementBlock("button", _hoisted_6, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
|
|
580
549
|
class: "affordance-icon",
|
|
581
550
|
"aria-hidden": "true",
|
|
582
551
|
viewBox: "0 0 24 24",
|
|
@@ -585,20 +554,20 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
585
554
|
"stroke-width": "2",
|
|
586
555
|
"stroke-linecap": "round"
|
|
587
556
|
}, [createElementVNode("path", { d: "M7 7l10 10M17 7 7 17" })], -1)])])) : createCommentVNode("v-if", true),
|
|
588
|
-
|
|
557
|
+
__props.help ? (openBlock(), createElementBlock("button", {
|
|
589
558
|
key: 2,
|
|
590
559
|
type: "button",
|
|
591
560
|
"aria-label": "Help",
|
|
592
|
-
id:
|
|
593
|
-
disabled:
|
|
594
|
-
}, [..._cache[1] || (_cache[1] = [createElementVNode("span", { "aria-hidden": "true" }, "?", -1)])], 8,
|
|
595
|
-
|
|
561
|
+
id: `${uid.value}-help`,
|
|
562
|
+
disabled: __props.disabled
|
|
563
|
+
}, [..._cache[1] || (_cache[1] = [createElementVNode("span", { "aria-hidden": "true" }, "?", -1)])], 8, _hoisted_7)) : createCommentVNode("v-if", true),
|
|
564
|
+
__props.disclosure ? (openBlock(), createElementBlock("button", {
|
|
596
565
|
key: 3,
|
|
597
566
|
type: "button",
|
|
598
567
|
"data-combobox-action": "disclosure",
|
|
599
568
|
tabindex: "-1",
|
|
600
569
|
"aria-label": "Show suggestions",
|
|
601
|
-
"aria-controls":
|
|
570
|
+
"aria-controls": `${uid.value}-listbox`
|
|
602
571
|
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
603
572
|
class: "affordance-icon",
|
|
604
573
|
"aria-hidden": "true",
|
|
@@ -608,77 +577,66 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
608
577
|
"stroke-width": "2.25",
|
|
609
578
|
"stroke-linecap": "round",
|
|
610
579
|
"stroke-linejoin": "round"
|
|
611
|
-
}, [createElementVNode("path", { d: "m6 9 6 6 6-6" })], -1)])], 8,
|
|
580
|
+
}, [createElementVNode("path", { d: "m6 9 6 6 6-6" })], -1)])], 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
612
581
|
], 512),
|
|
613
|
-
|
|
582
|
+
__props.help ? (openBlock(), createBlock(UiTooltip_default, {
|
|
614
583
|
key: 0,
|
|
615
|
-
id:
|
|
616
|
-
for:
|
|
584
|
+
id: `${uid.value}-help-text`,
|
|
585
|
+
for: `${uid.value}-help`
|
|
617
586
|
}, {
|
|
618
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
587
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.help), 1)]),
|
|
619
588
|
_: 1
|
|
620
589
|
}, 8, ["id", "for"])) : createCommentVNode("v-if", true),
|
|
621
590
|
createElementVNode("div", {
|
|
622
591
|
class: "popup",
|
|
623
|
-
hidden:
|
|
624
|
-
ref:
|
|
625
|
-
refs["popup"] = element;
|
|
626
|
-
}
|
|
592
|
+
hidden: !expanded.value,
|
|
593
|
+
ref: "popup"
|
|
627
594
|
}, [createElementVNode("div", {
|
|
628
595
|
role: "listbox",
|
|
629
|
-
id:
|
|
630
|
-
"aria-label":
|
|
631
|
-
"aria-busy":
|
|
632
|
-
ref:
|
|
633
|
-
refs["listbox"] = element;
|
|
634
|
-
}
|
|
596
|
+
id: `${uid.value}-listbox`,
|
|
597
|
+
"aria-label": `${__props.label} suggestions`,
|
|
598
|
+
"aria-busy": loading.value,
|
|
599
|
+
ref: "listbox"
|
|
635
600
|
}, [
|
|
636
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
601
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group) => {
|
|
637
602
|
return openBlock(), createElementBlock("div", {
|
|
638
|
-
key: group
|
|
639
|
-
role:
|
|
640
|
-
"aria-label":
|
|
641
|
-
}, [
|
|
603
|
+
key: group.name,
|
|
604
|
+
role: group.role,
|
|
605
|
+
"aria-label": group.label ?? void 0
|
|
606
|
+
}, [group.name ? (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(group.name), 1)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(group.rows, (row) => {
|
|
642
607
|
return openBlock(), createElementBlock("div", {
|
|
643
|
-
key: row
|
|
644
|
-
class: normalizeClass(["option", {
|
|
608
|
+
key: row.id,
|
|
609
|
+
class: normalizeClass(["option", { active: row.index === active.value }]),
|
|
645
610
|
role: "option",
|
|
646
|
-
id:
|
|
647
|
-
"aria-selected":
|
|
648
|
-
"aria-disabled":
|
|
649
|
-
"data-index":
|
|
650
|
-
}, [renderSlot(_ctx.$slots,
|
|
651
|
-
}), 128))], 8,
|
|
611
|
+
id: `${uid.value}-option-${row.index}`,
|
|
612
|
+
"aria-selected": row.value === selected.value,
|
|
613
|
+
"aria-disabled": row.disabled,
|
|
614
|
+
"data-index": row.index
|
|
615
|
+
}, [renderSlot(_ctx.$slots, `option-${row.id}`, {}, () => [createElementVNode("span", _hoisted_14, toDisplayString(row.label), 1)], true)], 10, _hoisted_13);
|
|
616
|
+
}), 128))], 8, _hoisted_11);
|
|
652
617
|
}), 128)),
|
|
653
|
-
|
|
618
|
+
creatable.value ? (openBlock(), createElementBlock("div", {
|
|
654
619
|
key: 0,
|
|
655
|
-
class: normalizeClass(["option", {
|
|
620
|
+
class: normalizeClass(["option", { active: createIndex.value === active.value }]),
|
|
656
621
|
role: "option",
|
|
657
622
|
"aria-selected": "false",
|
|
658
|
-
id:
|
|
659
|
-
"data-index":
|
|
660
|
-
}, toDisplayString(
|
|
661
|
-
|
|
662
|
-
], 8,
|
|
623
|
+
id: `${uid.value}-option-${createIndex.value}`,
|
|
624
|
+
"data-index": createIndex.value
|
|
625
|
+
}, toDisplayString(`Create “${raw.value}”`), 11, _hoisted_15)) : createCommentVNode("v-if", true),
|
|
626
|
+
message.value ? (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString(message.value), 1)) : createCommentVNode("v-if", true)
|
|
627
|
+
], 8, _hoisted_10), renderSlot(_ctx.$slots, "footer", {}, void 0, true)], 8, _hoisted_9),
|
|
663
628
|
createElementVNode("div", {
|
|
664
629
|
class: "message",
|
|
665
|
-
id:
|
|
666
|
-
hidden:
|
|
667
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
668
|
-
return openBlock(), createElementBlock("div", { key: index }, toDisplayString(
|
|
669
|
-
}), 128))], 8,
|
|
670
|
-
createElementVNode("div",
|
|
671
|
-
createElementVNode("div", {
|
|
672
|
-
class: "authored-options",
|
|
673
|
-
hidden: "",
|
|
674
|
-
"aria-hidden": "true",
|
|
675
|
-
ref: (element) => {
|
|
676
|
-
refs["options"] = element;
|
|
677
|
-
}
|
|
678
|
-
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 512)
|
|
630
|
+
id: `${uid.value}-validation`,
|
|
631
|
+
hidden: !validation.value.issues.length
|
|
632
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(validation.value.issues, (issue, index) => {
|
|
633
|
+
return openBlock(), createElementBlock("div", { key: index }, toDisplayString(issue.message), 1);
|
|
634
|
+
}), 128))], 8, _hoisted_17),
|
|
635
|
+
createElementVNode("div", _hoisted_18, toDisplayString(statusText.value), 1),
|
|
636
|
+
createElementVNode("div", _hoisted_19, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 512)
|
|
679
637
|
], 16, _hoisted_1);
|
|
680
638
|
};
|
|
681
639
|
}
|
|
682
|
-
}), [["__scopeId", "data-v-
|
|
640
|
+
}), [["__scopeId", "data-v-7eb73ca2"]]);
|
|
683
641
|
//#endregion
|
|
684
642
|
export { UiCombobox_default as t };
|