@wirecore/wirelayer-vue 0.7.0 → 0.9.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.
Files changed (92) hide show
  1. package/dist/{Checkbox-D175nhKK.js → Checkbox-DS2qfQK1.js} +2 -8
  2. package/dist/ContextMenu-CBE9YnDW.js +2321 -0
  3. package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
  4. package/dist/Input-C5dyvZfJ.js +183 -0
  5. package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
  6. package/dist/{Select-Bd2Vpr7G.js → Select-q8FUIWLi.js} +141 -124
  7. package/dist/Tree-B-0NXpUq.js +839 -0
  8. package/dist/components/Alert/Alert.vue.d.ts +5 -3
  9. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  10. package/dist/components/Avatar/Avatar.vue.d.ts +2 -0
  11. package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -1
  12. package/dist/components/Card/Card.vue.d.ts +2 -0
  13. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  14. package/dist/components/Checkbox/Checkbox.vue.d.ts +26 -23
  15. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  16. package/dist/components/Code/Code.vue.d.ts +21 -0
  17. package/dist/components/Code/Code.vue.d.ts.map +1 -0
  18. package/dist/components/Combobox/Combobox.vue.d.ts +9 -1
  19. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
  21. package/dist/components/ContextMenu/ContextMenu.vue.d.ts +18 -2
  22. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  23. package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
  24. package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
  25. package/dist/components/Dialog/DialogContent.vue.d.ts +12 -1
  26. package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
  27. package/dist/components/Dialog/context.d.ts +3 -1
  28. package/dist/components/Dialog/context.d.ts.map +1 -1
  29. package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
  30. package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
  31. package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
  32. package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
  33. package/dist/components/Input/Input.vue.d.ts +3 -1
  34. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  35. package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
  36. package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
  37. package/dist/components/Menu/Menu.vue.d.ts +9 -1
  38. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  39. package/dist/components/Menu/state.d.ts +22 -0
  40. package/dist/components/Menu/state.d.ts.map +1 -1
  41. package/dist/components/NativeSelect/NativeSelect.vue.d.ts +31 -19
  42. package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
  43. package/dist/components/NumberInput/NumberInput.vue.d.ts +27 -20
  44. package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
  45. package/dist/components/Panel/Panel.vue.d.ts +1 -1
  46. package/dist/components/PasswordInput/PasswordInput.vue.d.ts +9 -3
  47. package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
  48. package/dist/components/Popover/Popover.vue.d.ts +1 -1
  49. package/dist/components/Progress/Progress.vue.d.ts +14 -0
  50. package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
  51. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +32 -26
  52. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  53. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
  54. package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
  55. package/dist/components/RadioGroup/context.d.ts +4 -0
  56. package/dist/components/RadioGroup/context.d.ts.map +1 -0
  57. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +31 -22
  58. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  59. package/dist/components/Select/Select.vue.d.ts +21 -7
  60. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  61. package/dist/components/Stepper/Stepper.vue.d.ts +2 -0
  62. package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
  63. package/dist/components/Tabs/Tabs.vue.d.ts +6 -3
  64. package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
  65. package/dist/components/Tabs/TabsTrigger.vue.d.ts +6 -0
  66. package/dist/components/Tabs/TabsTrigger.vue.d.ts.map +1 -1
  67. package/dist/components/Tabs/context.d.ts +4 -0
  68. package/dist/components/Tabs/context.d.ts.map +1 -0
  69. package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
  70. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  71. package/dist/components/Wizard/Wizard.vue.d.ts +10 -2
  72. package/dist/components/Wizard/Wizard.vue.d.ts.map +1 -1
  73. package/dist/composables/index.d.ts +1 -1
  74. package/dist/composables/index.d.ts.map +1 -1
  75. package/dist/composables/media.d.ts +8 -1
  76. package/dist/composables/media.d.ts.map +1 -1
  77. package/dist/data-table.js +4 -4
  78. package/dist/editor.js +1 -1
  79. package/dist/form.js +2 -2
  80. package/dist/index.d.ts +6 -3
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +2751 -2649
  83. package/dist/pdf.js +3 -3
  84. package/dist/sources/Code.css +2 -0
  85. package/dist/utils/text-field.d.ts +16 -0
  86. package/dist/utils/text-field.d.ts.map +1 -0
  87. package/llms-full.txt +117 -27
  88. package/llms.txt +6 -4
  89. package/package.json +3 -3
  90. package/dist/ContextMenu-BEOEyUa6.js +0 -2235
  91. package/dist/Input-Cn5q0yVE.js +0 -181
  92. package/dist/Tree-fd9LXqgZ.js +0 -792
@@ -1,7 +1,7 @@
1
1
  import { a as e, n as t } from "./recipes-BlM9aKyt.js";
2
2
  import { t as n } from "./attrs-KNjeRUCf.js";
3
3
  import { a as r, n as i, r as a } from "./Highlight-uwptdaUw.js";
4
- import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as ee, normalizeClass as y, normalizeProps as b, onBeforeUnmount as te, onMounted as x, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, useAttrs as k, useId as ne, watch as A, withCtx as j } from "vue";
4
+ import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as ee, normalizeClass as y, normalizeProps as b, onBeforeUnmount as x, onMounted as S, openBlock as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useAttrs as te, useId as ne, watch as A, withCtx as j } from "vue";
5
5
  import { Check as M, ChevronDown as re, LoaderCircle as N, X as ie } from "@lucide/vue";
6
6
  import { controlIds as ae, select as oe, spinner as P } from "@wirecore/wirelayer-recipes";
7
7
  import { useFieldContext as se } from "@ark-ui/vue/field";
@@ -22,24 +22,24 @@ var I = [
22
22
  classes: {}
23
23
  },
24
24
  setup(n) {
25
- let r = e(), i = n, a = t("spinner", P, () => i.classes), o = k(), s = c(() => a({ size: i.size })), l = c(() => Math.min(100, Math.max(0, i.value ?? 0))), u = 2 * Math.PI * 9;
26
- return (e, t) => n.value === void 0 ? (S(), d("span", v({ key: 1 }, {
27
- ...O(o),
28
- class: s.value.base({ class: y(O(o).class) })
29
- }, { role: "status" }), [h(O(N), {
25
+ let r = e(), i = n, a = t("spinner", P, () => i.classes), o = te(), s = c(() => a({ size: i.size })), l = c(() => Math.min(100, Math.max(0, i.value ?? 0))), u = 2 * Math.PI * 9;
26
+ return (e, t) => n.value === void 0 ? (C(), d("span", v({ key: 1 }, {
27
+ ...k(o),
28
+ class: s.value.base({ class: y(k(o).class) })
29
+ }, { role: "status" }), [h(k(N), {
30
30
  class: y(s.value.icon()),
31
31
  "aria-hidden": "true"
32
- }, null, 8, ["class"]), f("span", { class: y(s.value.label()) }, D(n.label ?? O(r).common.loading), 3)], 16)) : (S(), d("span", v({ key: 0 }, {
33
- ...O(o),
34
- class: s.value.base({ class: y(O(o).class) })
32
+ }, null, 8, ["class"]), f("span", { class: y(s.value.label()) }, O(n.label ?? k(r).common.loading), 3)], 16)) : (C(), d("span", v({ key: 0 }, {
33
+ ...k(o),
34
+ class: s.value.base({ class: y(k(o).class) })
35
35
  }, {
36
36
  role: "progressbar",
37
- "aria-label": n.label ?? O(r).common.loading,
37
+ "aria-label": n.label ?? k(r).common.loading,
38
38
  "aria-valuemin": "0",
39
39
  "aria-valuemax": "100",
40
40
  "aria-valuenow": l.value,
41
41
  "aria-valuetext": `${Math.round(l.value)} %`
42
- }), [(S(), d("svg", {
42
+ }), [(C(), d("svg", {
43
43
  class: y(s.value.ring()),
44
44
  viewBox: "0 0 24 24",
45
45
  "aria-hidden": "true"
@@ -70,51 +70,51 @@ var I = [
70
70
  draggable: { type: Boolean }
71
71
  },
72
72
  setup(e) {
73
- return (t, n) => (S(), l(E(e.parts.Item), {
73
+ return (t, n) => (C(), l(D(e.parts.Item), {
74
74
  item: e.option,
75
75
  class: y(e.classes.item),
76
76
  "data-description": e.option.description ? "" : void 0,
77
77
  draggable: e.draggable && !e.option.disabled ? "true" : void 0
78
78
  }, {
79
79
  default: j(() => [
80
- e.checkbox ? (S(), l(E(e.parts.ItemContext), { key: 0 }, {
80
+ e.checkbox ? (C(), l(D(e.parts.ItemContext), { key: 0 }, {
81
81
  default: j((t) => [f("span", {
82
82
  class: y(e.classes.check),
83
83
  "data-state": t.selected ? "checked" : "unchecked",
84
84
  "aria-hidden": "true"
85
- }, [t.selected ? (S(), l(O(M), {
85
+ }, [t.selected ? (C(), l(k(M), {
86
86
  key: 0,
87
87
  class: y(e.classes.checkIcon)
88
88
  }, null, 8, ["class"])) : u("", !0)], 10, z)]),
89
89
  _: 1
90
90
  })) : u("", !0),
91
- t.$slots.item ? (S(), l(E(e.parts.ItemContext), { key: 1 }, {
92
- default: j((n) => [T(t.$slots, "item", {
91
+ t.$slots.item ? (C(), l(D(e.parts.ItemContext), { key: 1 }, {
92
+ default: j((n) => [E(t.$slots, "item", {
93
93
  item: e.option.item,
94
94
  selected: n.selected,
95
95
  highlighted: n.highlighted,
96
96
  disabled: n.disabled
97
97
  })]),
98
98
  _: 3
99
- })) : (S(), d(o, { key: 2 }, [e.option.icon ? (S(), l(E(e.option.icon), {
99
+ })) : (C(), d(o, { key: 2 }, [e.option.icon ? (C(), l(D(e.option.icon), {
100
100
  key: 0,
101
101
  class: y(e.classes.icon),
102
102
  "aria-hidden": "true"
103
- }, null, 8, ["class"])) : u("", !0), e.option.description ? (S(), d("span", {
103
+ }, null, 8, ["class"])) : u("", !0), e.option.description ? (C(), d("span", {
104
104
  key: 1,
105
105
  class: y(e.classes.itemBody)
106
- }, [(S(), l(E(e.parts.ItemText), { class: y(e.classes.itemText) }, {
107
- default: j(() => [m(D(e.option.label), 1)]),
106
+ }, [(C(), l(D(e.parts.ItemText), { class: y(e.classes.itemText) }, {
107
+ default: j(() => [m(O(e.option.label), 1)]),
108
108
  _: 1
109
- }, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) }, D(e.option.description), 3)], 2)) : (S(), l(E(e.parts.ItemText), {
109
+ }, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) }, O(e.option.description), 3)], 2)) : (C(), l(D(e.parts.ItemText), {
110
110
  key: 2,
111
111
  class: y(e.classes.itemText)
112
112
  }, {
113
- default: j(() => [m(D(e.option.label), 1)]),
113
+ default: j(() => [m(O(e.option.label), 1)]),
114
114
  _: 1
115
115
  }, 8, ["class"]))], 64)),
116
- !e.checkbox && !e.noIndicator ? (S(), l(E(e.parts.ItemIndicator), { key: 3 }, {
117
- default: j(() => [h(O(M), {
116
+ !e.checkbox && !e.noIndicator ? (C(), l(D(e.parts.ItemIndicator), { key: 3 }, {
117
+ default: j(() => [h(k(M), {
118
118
  class: y(e.classes.itemIndicator),
119
119
  "aria-hidden": "true"
120
120
  }, null, 8, ["class"])]),
@@ -137,13 +137,13 @@ var I = [
137
137
  },
138
138
  emits: ["load"],
139
139
  setup(e, { emit: t }) {
140
- let n = e, r = t, i = C(null), a;
140
+ let n = e, r = t, i = w(null), a;
141
141
  function o() {
142
142
  a?.disconnect(), n.active && i.value && typeof IntersectionObserver < "u" && (a = new IntersectionObserver((e) => {
143
143
  e.some((e) => e.isIntersecting) && r("load");
144
144
  }), a.observe(i.value));
145
145
  }
146
- return x(o), A(() => [n.active, n.count], o), te(() => a?.disconnect()), (e, t) => (S(), d("div", {
146
+ return S(o), A(() => [n.active, n.count], o), x(() => a?.disconnect()), (e, t) => (C(), d("div", {
147
147
  ref_key: "element",
148
148
  ref: i,
149
149
  "aria-hidden": "true"
@@ -166,8 +166,8 @@ var I = [
166
166
  emits: ["loadMore"],
167
167
  setup(e, { emit: t }) {
168
168
  let n = t;
169
- return (t, r) => (S(), d(o, null, [
170
- (S(!0), d(o, null, w(e.groups, (n, r) => (S(), d(o, { key: n.label ?? `#${r}` }, [n.label === void 0 ? (S(!0), d(o, { key: 1 }, w(n.options, (n) => (S(), l(B, {
169
+ return (t, r) => (C(), d(o, null, [
170
+ (C(!0), d(o, null, T(e.groups, (n, r) => (C(), d(o, { key: n.label ?? `#${r}` }, [n.label === void 0 ? (C(!0), d(o, { key: 1 }, T(n.options, (n) => (C(), l(B, {
171
171
  key: n.key,
172
172
  parts: e.parts,
173
173
  option: n,
@@ -177,7 +177,7 @@ var I = [
177
177
  draggable: e.draggable
178
178
  }, p({ _: 2 }, [t.$slots.item ? {
179
179
  name: "item",
180
- fn: j((e) => [T(t.$slots, "item", v({ ref_for: !0 }, e))]),
180
+ fn: j((e) => [E(t.$slots, "item", v({ ref_for: !0 }, e))]),
181
181
  key: "0"
182
182
  } : void 0]), 1032, [
183
183
  "parts",
@@ -186,14 +186,14 @@ var I = [
186
186
  "checkbox",
187
187
  "no-indicator",
188
188
  "draggable"
189
- ]))), 128)) : (S(), l(E(e.parts.ItemGroup), {
189
+ ]))), 128)) : (C(), l(D(e.parts.ItemGroup), {
190
190
  key: 0,
191
191
  class: y(e.classes.group)
192
192
  }, {
193
- default: j(() => [(S(), l(E(e.parts.ItemGroupLabel), { class: y(e.classes.groupLabel) }, {
194
- default: j(() => [m(D(n.label), 1)]),
193
+ default: j(() => [(C(), l(D(e.parts.ItemGroupLabel), { class: y(e.classes.groupLabel) }, {
194
+ default: j(() => [m(O(n.label), 1)]),
195
195
  _: 2
196
- }, 1032, ["class"])), (S(!0), d(o, null, w(n.options, (n) => (S(), l(B, {
196
+ }, 1032, ["class"])), (C(!0), d(o, null, T(n.options, (n) => (C(), l(B, {
197
197
  key: n.key,
198
198
  parts: e.parts,
199
199
  option: n,
@@ -203,7 +203,7 @@ var I = [
203
203
  draggable: e.draggable
204
204
  }, p({ _: 2 }, [t.$slots.item ? {
205
205
  name: "item",
206
- fn: j((e) => [T(t.$slots, "item", v({ ref_for: !0 }, e))]),
206
+ fn: j((e) => [E(t.$slots, "item", v({ ref_for: !0 }, e))]),
207
207
  key: "0"
208
208
  } : void 0]), 1032, [
209
209
  "parts",
@@ -215,20 +215,20 @@ var I = [
215
215
  ]))), 128))]),
216
216
  _: 2
217
217
  }, 1032, ["class"]))], 64))), 128)),
218
- e.emptyText !== void 0 && !e.loading && !e.groups.length ? (S(), d("div", {
218
+ e.emptyText !== void 0 && !e.loading && !e.groups.length ? (C(), d("div", {
219
219
  key: 0,
220
220
  role: "option",
221
221
  "aria-disabled": "true",
222
222
  class: y(e.classes.empty)
223
- }, D(e.emptyText), 3)) : u("", !0),
224
- e.loading ? (S(), d("div", {
223
+ }, O(e.emptyText), 3)) : u("", !0),
224
+ e.loading ? (C(), d("div", {
225
225
  key: 1,
226
226
  class: y(e.classes.loading)
227
- }, [h(O(N), {
227
+ }, [h(k(N), {
228
228
  class: y(e.classes.loadingIcon),
229
229
  "aria-hidden": "true"
230
- }, null, 8, ["class"]), m(" " + D(e.loadingText), 1)], 2)) : u("", !0),
231
- e.hasMore ? (S(), l(V, {
230
+ }, null, 8, ["class"]), m(" " + O(e.loadingText), 1)], 2)) : u("", !0),
231
+ e.hasMore ? (C(), l(V, {
232
232
  key: 2,
233
233
  class: y(e.classes.sentinel),
234
234
  active: !e.loading,
@@ -255,6 +255,7 @@ var I = [
255
255
  items: {},
256
256
  modelValue: { default: void 0 },
257
257
  defaultValue: { default: void 0 },
258
+ emptyValue: { default: void 0 },
258
259
  placeholder: {},
259
260
  disabled: {
260
261
  type: Boolean,
@@ -287,54 +288,60 @@ var I = [
287
288
  minSearchLength: {},
288
289
  pageSize: {},
289
290
  standalone: { type: Boolean },
291
+ open: {
292
+ type: Boolean,
293
+ default: void 0
294
+ },
295
+ stopKeyPropagation: { type: Boolean },
290
296
  id: {},
291
297
  classes: {}
292
298
  },
293
299
  emits: [
294
300
  "update:modelValue",
295
301
  "filterChange",
296
- "loadMore"
302
+ "loadMore",
303
+ "update:open"
297
304
  ],
298
- setup(g, { emit: te }) {
299
- let w = e(), M = g, P = t("select", oe, () => M.classes), I = te, L = k(), R = c(() => n(L)), z = c(() => P({
305
+ setup(g, { emit: x }) {
306
+ let T = e(), M = g, P = t("select", oe, () => M.classes), I = x, L = te(), R = c(() => n(L)), z = c(() => P({
300
307
  size: M.size,
301
308
  clearable: M.clearable
302
- })), B = w.select, V = c(() => ({
309
+ })), B = T.select, V = c(() => ({
303
310
  itemValue: M.itemValue,
304
311
  itemLabel: M.itemLabel,
305
312
  itemDisabled: M.itemDisabled,
306
313
  itemGroup: M.itemGroup,
307
314
  itemKeywords: M.itemKeywords,
308
315
  valueKey: M.valueKey
309
- })), U = C(""), W = r({
316
+ })), U = w(""), W = r({
310
317
  items: () => M.items,
311
318
  source: () => M.dataSource,
312
319
  accessors: () => V.value,
313
320
  pageSize: () => M.pageSize,
314
321
  minSearchLength: () => M.minSearchLength
315
- }), { options: de, groups: G, ordered: K } = i(() => W.items.value, () => V.value, () => M.filter && !M.manualFilter && !M.dataSource ? U.value : ""), q = c(() => [...de.value, ...W.resolvedOptions.value]), { selected: J, keys: Y, commit: X, commitKeys: fe } = a({
322
+ }), { options: de, groups: G, ordered: K } = i(() => W.items.value, () => V.value, () => M.filter && !M.manualFilter && !M.dataSource ? U.value : ""), q = c(() => [...de.value, ...W.resolvedOptions.value]), J = (e) => M.emptyValue !== void 0 && e === M.emptyValue ? null : e, { selected: Y, keys: X, commit: Z, commitKeys: fe } = a({
316
323
  multiple: !1,
317
- model: () => M.modelValue,
318
- defaultValue: M.defaultValue,
324
+ model: () => J(M.modelValue),
325
+ defaultValue: J(M.defaultValue),
319
326
  accessors: () => V.value,
320
327
  items: q,
321
- emit: (e) => I("update:modelValue", e),
328
+ emit: (e) => I("update:modelValue", e === null ? M.emptyValue ?? null : e),
322
329
  check: {
323
330
  component: "Select",
324
331
  ready: () => !M.dataSource && !M.loading && M.items.length > 0
325
332
  }
326
333
  });
327
- x(() => W.resolve(Y.value, q.value)), A(Y, (e) => W.resolve(e, q.value));
328
- let Z = c(() => M.loading || W.loading.value), Q = c(() => M.hasMore || W.hasMore.value);
329
- function pe() {
334
+ S(() => W.resolve(X.value, q.value)), A(X, (e) => W.resolve(e, q.value));
335
+ let Q = c(() => M.loading || W.loading.value), pe = c(() => M.hasMore || W.hasMore.value);
336
+ function me() {
330
337
  M.dataSource ? W.loadMore() : I("loadMore");
331
338
  }
332
- let $ = c(() => J.value[0]), me = c(() => ce({
339
+ let $ = c(() => Y.value[0]), he = c(() => ce({
333
340
  items: K.value,
334
341
  itemToString: (e) => e.label,
335
342
  itemToValue: (e) => e.key,
336
343
  isItemDisabled: (e) => e.disabled
337
- })), he = ne(), ge = c(() => M.emptyText ?? W.emptyText.value ?? (U.value ? w.common.noResults : w.common.empty)), _e = c(() => ({
344
+ })), ge = ne(), _e = c(() => M.emptyText ?? W.emptyText.value ?? (U.value ? T.common.noResults : T.common.empty)), ve = c(() => ({
338
345
  item: z.value.item(),
339
346
  itemText: z.value.itemText(),
340
347
  icon: z.value.icon(),
@@ -348,69 +355,77 @@ var I = [
348
355
  sentinel: z.value.sentinel(),
349
356
  empty: z.value.empty()
350
357
  }));
351
- function ve(e) {
352
- X([]), e.focus();
353
- }
354
358
  function ye(e) {
355
- M.clearable && J.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), X([]));
359
+ Z([]), e.focus();
356
360
  }
357
- function be(e, t) {
361
+ function be(e) {
362
+ M.stopKeyPropagation && e.key === "Enter" && e.stopPropagation(), M.clearable && Y.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), Z([]));
363
+ }
364
+ function xe(e, t) {
358
365
  U.value = t.target.value, I("filterChange", U.value), M.dataSource && W.search(U.value), !(M.manualFilter || M.dataSource) && ee(() => {
359
366
  let t = K.value.find((e) => !e.disabled);
360
367
  t && e.setHighlightValue(t.key);
361
368
  });
362
369
  }
363
- function xe(e) {
370
+ function Se(e) {
364
371
  (e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
365
372
  }
366
- function Se(e) {
367
- e && W.open(), !e && U.value && (U.value = "", I("filterChange", ""), M.dataSource && W.search(""));
373
+ function Ce(e) {
374
+ M.stopKeyPropagation && [
375
+ "Enter",
376
+ "Escape",
377
+ "Tab"
378
+ ].includes(e.key) && e.stopPropagation();
379
+ }
380
+ function we(e) {
381
+ I("update:open", e), e && W.open(), !e && U.value && (U.value = "", I("filterChange", ""), M.dataSource && W.search(""));
368
382
  }
369
- let Ce = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, we = {
383
+ let Te = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, Ee = {
370
384
  sameWidth: !0,
371
385
  gutter: 4
372
- }, Te = se(), Ee = c(() => ae(M.id, "trigger", {
373
- label: Te?.value.ids.label,
374
- hiddenSelect: Te?.value.ids.control
386
+ }, De = se(), Oe = c(() => ae(M.id, "trigger", {
387
+ label: De?.value.ids.label,
388
+ hiddenSelect: De?.value.ids.control
375
389
  }, M.standalone));
376
- return (e, t) => (S(), l(O(F).Root, v({
390
+ return (e, t) => (C(), l(k(F).Root, v({
377
391
  class: z.value.base({ class: R.value.className }),
378
392
  style: R.value.style,
379
- collection: me.value,
380
- "model-value": O(Y),
393
+ collection: he.value,
394
+ "model-value": k(X),
381
395
  disabled: g.disabled,
382
396
  invalid: g.invalid,
383
397
  required: g.required,
384
398
  name: g.name,
385
- positioning: we,
386
- composite: !g.filter
387
- }, Ee.value, {
399
+ positioning: Ee,
400
+ composite: !g.filter,
401
+ open: g.open
402
+ }, Oe.value, {
388
403
  "lazy-mount": "",
389
404
  "unmount-on-exit": "",
390
- onValueChange: t[0] ||= (e) => O(fe)(e.value, e.items),
391
- onOpenChange: t[1] ||= (e) => Se(e.open)
405
+ onValueChange: t[0] ||= (e) => k(fe)(e.value, e.items),
406
+ onOpenChange: t[1] ||= (e) => we(e.open)
392
407
  }), {
393
408
  default: j(() => [
394
- h(O(F).Control, b(_(g.clearable ? { class: z.value.control() } : {})), {
395
- default: j(() => [h(O(F).Trigger, v(R.value.rest, {
409
+ h(k(F).Control, b(_(g.clearable ? { class: z.value.control() } : {})), {
410
+ default: j(() => [h(k(F).Trigger, v(R.value.rest, {
396
411
  class: z.value.trigger(),
397
412
  "aria-busy": g.loading || void 0,
398
- onKeydown: ye
413
+ onKeydown: be
399
414
  }), {
400
- default: j(() => [f("span", { class: y(z.value.value()) }, [e.$slots.value && $.value ? T(e.$slots, "value", { item: $.value.item }, void 0, void 0, 0) : (S(), d(o, { key: 1 }, [$.value?.icon ? (S(), l(E($.value.icon), {
415
+ default: j(() => [f("span", { class: y(z.value.value()) }, [e.$slots.value && $.value ? E(e.$slots, "value", { item: $.value.item }, void 0, void 0, 0) : (C(), d(o, { key: 1 }, [$.value?.icon ? (C(), l(D($.value.icon), {
401
416
  key: 0,
402
417
  class: y(z.value.icon()),
403
418
  "aria-hidden": "true"
404
- }, null, 8, ["class"])) : u("", !0), h(O(F).ValueText, { placeholder: g.placeholder ?? O(w).common.placeholder }, p({ _: 2 }, [$.value ? {
419
+ }, null, 8, ["class"])) : u("", !0), h(k(F).ValueText, { placeholder: g.placeholder ?? k(T).common.placeholder }, p({ _: 2 }, [$.value ? {
405
420
  name: "default",
406
- fn: j(() => [m(D($.value.label), 1)]),
421
+ fn: j(() => [m(O($.value.label), 1)]),
407
422
  key: "0"
408
- } : void 0]), 1032, ["placeholder"])], 64))], 2), h(O(F).Indicator, { class: y(z.value.indicator()) }, {
409
- default: j(() => [g.loading ? (S(), l(O(N), {
423
+ } : void 0]), 1032, ["placeholder"])], 64))], 2), h(k(F).Indicator, { class: y(z.value.indicator()) }, {
424
+ default: j(() => [g.loading ? (C(), l(k(N), {
410
425
  key: 0,
411
426
  class: y(z.value.spinner()),
412
427
  "aria-hidden": "true"
413
- }, null, 8, ["class"])) : (S(), l(O(re), {
428
+ }, null, 8, ["class"])) : (C(), l(k(re), {
414
429
  key: 1,
415
430
  class: y(z.value.indicatorIcon()),
416
431
  "aria-hidden": "true"
@@ -418,15 +433,15 @@ var I = [
418
433
  _: 1
419
434
  }, 8, ["class"])]),
420
435
  _: 3
421
- }, 16, ["class", "aria-busy"]), g.clearable ? (S(), l(O(F).Context, { key: 0 }, {
422
- default: j((e) => [$.value && !e.disabled ? (S(), d("button", {
436
+ }, 16, ["class", "aria-busy"]), g.clearable ? (C(), l(k(F).Context, { key: 0 }, {
437
+ default: j((e) => [$.value && !e.disabled ? (C(), d("button", {
423
438
  key: 0,
424
439
  type: "button",
425
440
  tabindex: "-1",
426
441
  class: y(z.value.clear()),
427
- "aria-label": O(B).clear,
428
- onClick: (t) => ve(e)
429
- }, [h(O(ie), {
442
+ "aria-label": k(B).clear,
443
+ onClick: (t) => ye(e)
444
+ }, [h(k(ie), {
430
445
  class: y(z.value.clearIcon()),
431
446
  "aria-hidden": "true"
432
447
  }, null, 8, ["class"])], 10, le)) : u("", !0)]),
@@ -434,13 +449,14 @@ var I = [
434
449
  })) : u("", !0)]),
435
450
  _: 3
436
451
  }, 16),
437
- (S(), l(s, { to: "body" }, [h(O(F).Positioner, null, {
438
- default: j(() => [h(O(F).Content, {
452
+ (C(), l(s, { to: "body" }, [h(k(F).Positioner, null, {
453
+ default: j(() => [h(k(F).Content, {
439
454
  class: y(z.value.content()),
440
- "aria-busy": Z.value || void 0,
441
- "aria-label": g.filter ? R.value.rest["aria-label"] : void 0
455
+ "aria-busy": Q.value || void 0,
456
+ "aria-label": g.filter ? R.value.rest["aria-label"] : void 0,
457
+ onKeydown: Ce
442
458
  }, {
443
- default: j(() => [g.filter ? (S(), d(o, { key: 0 }, [f("div", { class: y(z.value.header()) }, [h(O(F).Context, null, {
459
+ default: j(() => [g.filter ? (C(), d(o, { key: 0 }, [f("div", { class: y(z.value.header()) }, [h(k(F).Context, null, {
444
460
  default: j((e) => [f("input", {
445
461
  type: "text",
446
462
  role: "combobox",
@@ -448,32 +464,32 @@ var I = [
448
464
  "aria-autocomplete": "list",
449
465
  "aria-expanded": "true",
450
466
  "data-autofocus": "",
451
- "aria-controls": O(he),
452
- "aria-activedescendant": Ce(e),
453
- "aria-label": O(B).filter,
454
- placeholder: O(w).combobox.search,
467
+ "aria-controls": k(ge),
468
+ "aria-activedescendant": Te(e),
469
+ "aria-label": k(B).filter,
470
+ placeholder: k(T).combobox.search,
455
471
  value: U.value,
456
472
  class: y(z.value.search()),
457
- onInput: (t) => be(e, t),
458
- onKeydown: xe
473
+ onInput: (t) => xe(e, t),
474
+ onKeydown: Se
459
475
  }, null, 42, ue)]),
460
476
  _: 1
461
- })], 2), h(O(F).List, {
462
- id: O(he),
477
+ })], 2), h(k(F).List, {
478
+ id: k(ge),
463
479
  class: y(z.value.list())
464
480
  }, {
465
481
  default: j(() => [h(H, {
466
- parts: O(F),
467
- groups: O(G),
468
- classes: _e.value,
469
- loading: Z.value,
470
- "loading-text": g.loadingText ?? O(w).common.loading,
471
- "has-more": Q.value,
472
- "empty-text": ge.value,
473
- onLoadMore: pe
482
+ parts: k(F),
483
+ groups: k(G),
484
+ classes: ve.value,
485
+ loading: Q.value,
486
+ "loading-text": g.loadingText ?? k(T).common.loading,
487
+ "has-more": pe.value,
488
+ "empty-text": _e.value,
489
+ onLoadMore: me
474
490
  }, p({ _: 2 }, [e.$slots.item ? {
475
491
  name: "item",
476
- fn: j((t) => [T(e.$slots, "item", b(_(t)))]),
492
+ fn: j((t) => [E(e.$slots, "item", b(_(t)))]),
477
493
  key: "0"
478
494
  } : void 0]), 1032, [
479
495
  "parts",
@@ -485,19 +501,19 @@ var I = [
485
501
  "empty-text"
486
502
  ])]),
487
503
  _: 3
488
- }, 8, ["id", "class"])], 64)) : (S(), l(H, {
504
+ }, 8, ["id", "class"])], 64)) : (C(), l(H, {
489
505
  key: 1,
490
- parts: O(F),
491
- groups: O(G),
492
- classes: _e.value,
493
- loading: Z.value,
494
- "loading-text": g.loadingText ?? O(w).common.loading,
495
- "has-more": Q.value,
496
- "empty-text": ge.value,
497
- onLoadMore: pe
506
+ parts: k(F),
507
+ groups: k(G),
508
+ classes: ve.value,
509
+ loading: Q.value,
510
+ "loading-text": g.loadingText ?? k(T).common.loading,
511
+ "has-more": pe.value,
512
+ "empty-text": _e.value,
513
+ onLoadMore: me
498
514
  }, p({ _: 2 }, [e.$slots.item ? {
499
515
  name: "item",
500
- fn: j((t) => [T(e.$slots, "item", b(_(t)))]),
516
+ fn: j((t) => [E(e.$slots, "item", b(_(t)))]),
501
517
  key: "0"
502
518
  } : void 0]), 1032, [
503
519
  "parts",
@@ -516,12 +532,12 @@ var I = [
516
532
  ])]),
517
533
  _: 3
518
534
  })])),
519
- h(O(F).HiddenSelect),
520
- g.dataSource ? (S(), d("span", {
535
+ h(k(F).HiddenSelect),
536
+ g.dataSource ? (C(), d("span", {
521
537
  key: 0,
522
538
  role: "status",
523
539
  class: y(z.value.status())
524
- }, D(O(W).announcement.value), 3)) : u("", !0)
540
+ }, O(k(W).announcement.value), 3)) : u("", !0)
525
541
  ]),
526
542
  _: 3
527
543
  }, 16, [
@@ -533,7 +549,8 @@ var I = [
533
549
  "invalid",
534
550
  "required",
535
551
  "name",
536
- "composite"
552
+ "composite",
553
+ "open"
537
554
  ]));
538
555
  }
539
556
  });