bitboss-ui 2.1.118 → 2.1.119

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 (183) hide show
  1. package/dist/ai/BbSelectPopover.md +2 -0
  2. package/dist/index109.js +9 -9
  3. package/dist/index110.js +165 -163
  4. package/dist/index118.js +1 -1
  5. package/dist/index124.js +3 -3
  6. package/dist/index126.js +13 -13
  7. package/dist/index134.js +1 -1
  8. package/dist/index136.js +5 -5
  9. package/dist/index138.js +1 -1
  10. package/dist/index14.js +1 -1
  11. package/dist/index140.js +2 -2
  12. package/dist/index144.js +1 -1
  13. package/dist/index146.js +2 -2
  14. package/dist/index149.js +2 -2
  15. package/dist/index16.js +3 -3
  16. package/dist/index18.js +3 -3
  17. package/dist/index20.js +9 -9
  18. package/dist/index22.js +14 -14
  19. package/dist/index222.js +138 -2
  20. package/dist/index223.js +2 -138
  21. package/dist/index224.js +34 -5
  22. package/dist/index225.js +2 -8
  23. package/dist/index226.js +2 -2
  24. package/dist/index227.js +2 -2
  25. package/dist/index228.js +13 -3
  26. package/dist/index229.js +5 -7
  27. package/dist/index230.js +8 -2
  28. package/dist/index231.js +4 -86
  29. package/dist/index232.js +22 -0
  30. package/dist/index233.js +8 -28
  31. package/dist/index234.js +2 -16
  32. package/dist/index235.js +4 -51
  33. package/dist/index236.js +3 -18
  34. package/dist/index237.js +11 -3
  35. package/dist/index238.js +3 -12
  36. package/dist/index239.js +2 -18
  37. package/dist/index24.js +10 -10
  38. package/dist/index240.js +18 -4
  39. package/dist/index241.js +22 -7
  40. package/dist/index242.js +12 -13
  41. package/dist/index243.js +50 -12
  42. package/dist/index244.js +18 -135
  43. package/dist/index245.js +14 -0
  44. package/dist/index246.js +17 -4
  45. package/dist/index247.js +29 -22
  46. package/dist/index248.js +18 -4
  47. package/dist/index249.js +12 -19
  48. package/dist/index250.js +129 -28
  49. package/dist/index252.js +33 -9
  50. package/dist/index253.js +106 -20
  51. package/dist/index254.js +6 -188
  52. package/dist/index255.js +2 -3
  53. package/dist/index256.js +106 -5
  54. package/dist/index258.js +100 -5
  55. package/dist/index26.js +3 -3
  56. package/dist/index260.js +3 -5
  57. package/dist/index261.js +3 -2
  58. package/dist/index262.js +5 -6
  59. package/dist/index263.js +5 -268
  60. package/dist/index264.js +5 -52
  61. package/dist/index265.js +5 -52
  62. package/dist/index266.js +6 -32
  63. package/dist/index267.js +6 -58
  64. package/dist/index268.js +267 -52
  65. package/dist/index269.js +52 -5
  66. package/dist/index270.js +52 -5
  67. package/dist/index271.js +32 -5
  68. package/dist/index272.js +60 -3
  69. package/dist/index273.js +25 -9
  70. package/dist/index274.js +2 -33
  71. package/dist/index275.js +7 -28
  72. package/dist/index276.js +9 -0
  73. package/dist/index277.js +4 -11
  74. package/dist/index278.js +9 -18
  75. package/dist/index279.js +9 -12
  76. package/dist/index28.js +1 -1
  77. package/dist/index280.js +20 -105
  78. package/dist/index282.js +81 -95
  79. package/dist/index284.js +3 -107
  80. package/dist/index285.js +6 -2
  81. package/dist/index286.js +16 -7
  82. package/dist/index287.js +373 -7
  83. package/dist/index289.js +7 -6
  84. package/dist/index290.js +5 -3
  85. package/dist/index291.js +5 -6
  86. package/dist/index292.js +5 -16
  87. package/dist/index293.js +5 -2
  88. package/dist/index294.js +51 -7
  89. package/dist/index295.js +67 -23
  90. package/dist/index296.js +188 -3
  91. package/dist/index297.js +3 -10
  92. package/dist/index298.js +8 -2
  93. package/dist/index299.js +23 -67
  94. package/dist/index30.js +3 -3
  95. package/dist/index300.js +25 -370
  96. package/dist/index302.js +7 -3
  97. package/dist/index303.js +2 -17
  98. package/dist/index304.js +3 -28
  99. package/dist/index305.js +3 -4
  100. package/dist/index306.js +3 -7
  101. package/dist/index307.js +1 -1
  102. package/dist/index308.js +27 -3
  103. package/dist/index309.js +17 -3
  104. package/dist/index310.js +4 -280
  105. package/dist/index311.js +3 -2
  106. package/dist/index312.js +277 -13
  107. package/dist/index313.js +2 -2
  108. package/dist/index314.js +9 -9
  109. package/dist/index316.js +12 -23
  110. package/dist/index318.js +27 -2
  111. package/dist/index319.js +2 -2
  112. package/dist/index32.js +2 -2
  113. package/dist/index320.js +1 -1
  114. package/dist/index321.js +1 -1
  115. package/dist/index322.js +1 -1
  116. package/dist/index323.js +4 -0
  117. package/dist/index324.js +2 -7
  118. package/dist/index325.js +5 -3
  119. package/dist/index326.js +5 -125
  120. package/dist/index327.js +719 -2
  121. package/dist/index328.js +366 -15
  122. package/dist/index329.js +57 -2
  123. package/dist/index331.js +7 -2
  124. package/dist/index332.js +1 -1
  125. package/dist/index333.js +125 -3
  126. package/dist/index334.js +2 -2
  127. package/dist/index335.js +15 -5
  128. package/dist/index336.js +2 -719
  129. package/dist/index337.js +19 -366
  130. package/dist/index338.js +2 -57
  131. package/dist/index339.js +2 -5
  132. package/dist/index34.js +8 -8
  133. package/dist/index340.js +3 -5
  134. package/dist/index341.js +67 -2
  135. package/dist/index342.js +40 -40
  136. package/dist/index343.js +3 -67
  137. package/dist/index344.js +5 -6
  138. package/dist/index345.js +2 -2
  139. package/dist/index346.js +7 -3
  140. package/dist/index349.js +1 -1
  141. package/dist/index350.js +1 -1
  142. package/dist/index351.js +91 -33
  143. package/dist/index352.js +222 -123
  144. package/dist/index353.js +198 -396
  145. package/dist/index354.js +255 -18
  146. package/dist/index355.js +37 -0
  147. package/dist/index356.js +121 -85
  148. package/dist/index357.js +378 -114
  149. package/dist/index358.js +18 -196
  150. package/dist/index36.js +4 -4
  151. package/dist/index360.js +2 -228
  152. package/dist/index361.js +1 -1
  153. package/dist/index362.js +134 -2
  154. package/dist/index366.js +1 -1
  155. package/dist/index38.js +21 -21
  156. package/dist/index40.js +7 -7
  157. package/dist/index42.js +2 -2
  158. package/dist/index44.js +8 -8
  159. package/dist/index46.js +6 -6
  160. package/dist/index50.js +2 -2
  161. package/dist/index54.js +1 -1
  162. package/dist/index56.js +1 -1
  163. package/dist/index58.js +2 -2
  164. package/dist/index60.js +2 -2
  165. package/dist/index62.js +5 -5
  166. package/dist/index68.js +1 -1
  167. package/dist/index74.js +4 -4
  168. package/dist/index82.js +6 -6
  169. package/dist/index84.js +1 -1
  170. package/dist/index86.js +2 -2
  171. package/dist/index88.js +3 -3
  172. package/dist/index90.js +1 -1
  173. package/dist/index93.js +3 -3
  174. package/dist/index95.js +2 -2
  175. package/dist/index97.js +5 -5
  176. package/dist/index99.js +1 -1
  177. package/package.json +2 -2
  178. package/dist/index257.js +0 -7
  179. package/dist/index259.js +0 -7
  180. package/dist/index288.js +0 -27
  181. package/dist/index330.js +0 -21
  182. package/dist/index359.js +0 -261
  183. /package/dist/{index251.js → index281.js} +0 -0
@@ -0,0 +1,14 @@
1
+ import { hash as e } from "./index238.js";
2
+ import { debouncedWatch as s } from "./index222.js";
3
+ const n = (o, c, h) => {
4
+ s(
5
+ o,
6
+ (r, t) => {
7
+ e(r) !== e(t) && c(r, t);
8
+ },
9
+ h
10
+ );
11
+ };
12
+ export {
13
+ n as useHashedWatcher
14
+ };
package/dist/index246.js CHANGED
@@ -1,6 +1,19 @@
1
- function e(n) {
2
- return n ? n instanceof HTMLElement ? n : typeof n == "object" && "$el" in n && n.$el instanceof HTMLElement ? n.$el : typeof n == "object" && "el" in n && n.el instanceof HTMLElement ? n.el : null : null;
3
- }
1
+ import { computed as u, unref as a } from "vue";
2
+ import { hash as d } from "./index238.js";
3
+ const p = ({
4
+ items: m,
5
+ key: e
6
+ }) => {
7
+ const n = (t) => e ? String(t[e]) : d(t), o = u(() => {
8
+ const t = {}, s = Array.from(a(m) ?? []);
9
+ for (let r = 0; r < s.length; r++) {
10
+ const c = s[r];
11
+ t[n(c)] = c;
12
+ }
13
+ return t;
14
+ });
15
+ return { data: o, get: (t) => o.value[n(t)] };
16
+ };
4
17
  export {
5
- e as extractDomContainer
18
+ p as useIndexById
6
19
  };
package/dist/index247.js CHANGED
@@ -1,25 +1,32 @@
1
- const i = (t) => {
2
- const n = t.toString().replace(/\.0+$/, "").replace(/\.$/, "");
3
- return parseFloat(n) || 0;
4
- };
5
- function s(t) {
6
- if (typeof t == "number")
7
- return {
8
- value: i(t),
9
- unit: "px"
10
- };
11
- if (typeof t == "string") {
12
- const r = /^(-?\d*\.?\d+)([a-zA-Z%]*)?$/, e = t.match(r);
13
- if (e) {
14
- const [, n, o = "px"] = e, a = parseFloat(n);
15
- return {
16
- value: i(a),
17
- unit: o
18
- };
1
+ import { computed as s, unref as v, ref as c } from "vue";
2
+ import { useDebounceFn as m } from "./index222.js";
3
+ const y = (o) => {
4
+ const e = s(() => v(o.items)), t = c([]), r = c(0);
5
+ let a = 0;
6
+ const u = async (...i) => {
7
+ if (Array.isArray(e.value)) {
8
+ t.value = e.value;
9
+ return;
10
+ }
11
+ if (typeof e.value != "function") return;
12
+ const f = ++a;
13
+ r.value++;
14
+ try {
15
+ const n = await e.value(...i);
16
+ f === a && (t.value = n);
17
+ } catch (n) {
18
+ console.error(n);
19
+ } finally {
20
+ r.value--;
19
21
  }
20
- }
21
- throw new Error(`Invalid width: ${t}`);
22
- }
22
+ }, l = m(u, o.debounce || 0);
23
+ return {
24
+ getter: u,
25
+ debouncedGetter: l,
26
+ items: t,
27
+ loading: s(() => r.value > 0)
28
+ };
29
+ };
23
30
  export {
24
- s as parseWidthString
31
+ y as useItemsGetter
25
32
  };
package/dist/index248.js CHANGED
@@ -1,6 +1,20 @@
1
- function e(t) {
2
- return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(t);
3
- }
1
+ import { isNotNil as v } from "./index150.js";
2
+ import { computed as t, toValue as h, ref as u, onServerPrefetch as m, onBeforeMount as p } from "vue";
3
+ const g = ({
4
+ fn: i,
5
+ trigger: n = !1,
6
+ multiple: s,
7
+ currentValue: r
8
+ }) => {
9
+ const f = t(() => s ? !!r?.length : v(r)), o = t(
10
+ () => !!h(n) || f.value
11
+ ), l = u(!1), e = u(!1), c = t(() => o.value || e.value), a = async () => {
12
+ l.value || e.value || (l.value = !0, await i(!0), l.value = !1, e.value = !0);
13
+ };
14
+ return o.value && (m(a), p(async () => {
15
+ e.value || await a();
16
+ })), { isPrefilling: l, hasPrefilled: e, canLoad: c, prefill: a };
17
+ };
4
18
  export {
5
- e as isHex
19
+ g as usePrefill
6
20
  };
package/dist/index249.js CHANGED
@@ -1,22 +1,15 @@
1
- import { MaskInput as r } from "./index254.js";
2
- const u = /* @__PURE__ */ new WeakMap(), p = (a, n) => {
3
- if (a.arg == null || a.instance == null) return;
4
- const s = "setup" in a.instance.$.type;
5
- a.arg in a.instance ? a.instance[a.arg] = n : s && console.warn("Maska: please expose `%s` using defineExpose", a.arg);
6
- }, k = (a, n) => {
7
- var s;
8
- const t = a instanceof HTMLInputElement ? a : a.querySelector("input");
9
- if (t == null || t?.type === "file") return;
10
- let e = {};
11
- if (n.value != null && (e = typeof n.value == "string" ? { mask: n.value } : { ...n.value }), n.arg != null) {
12
- const l = (o) => {
13
- const i = n.modifiers.unmasked ? o.unmasked : n.modifiers.completed ? o.completed : o.masked;
14
- p(n, i);
15
- };
16
- e.onMaska = e.onMaska == null ? l : Array.isArray(e.onMaska) ? [...e.onMaska, l] : [e.onMaska, l];
17
- }
18
- u.has(t) ? (s = u.get(t)) == null || s.update(e) : u.set(t, new r(t, e));
1
+ import { ref as c, watch as f, toValue as u } from "vue";
2
+ const p = (e, { initialValue: r = !1, nextValue: o = !0 } = {}) => {
3
+ const t = c(r);
4
+ if (r) return t;
5
+ const n = f(
6
+ () => u(e),
7
+ (s) => {
8
+ s && (t.value = o, n());
9
+ }
10
+ );
11
+ return t;
19
12
  };
20
13
  export {
21
- k as vMaska
14
+ p as useUntil
22
15
  };
package/dist/index250.js CHANGED
@@ -1,36 +1,137 @@
1
- import { defineComponent as a, resolveComponent as o, createBlock as u, openBlock as l, resolveDynamicComponent as m, unref as c, withCtx as p, renderSlot as f } from "vue";
2
- import { _config as e } from "./index4.js";
3
- import { useLogger as i } from "./index241.js";
4
- import { useFrameworkDetection as k } from "./index147.js";
5
- const y = /* @__PURE__ */ a({
6
- __name: "RouterComponent",
7
- setup(g) {
8
- const { isInertia: r, isNuxt: s } = k();
9
- let t;
10
- if (r) {
11
- if (t = o(e.inertiaLinkName), typeof t == "string") {
12
- const { warn: n } = i();
13
- n(
14
- `Inertia link component "${e.inertiaLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.inertiaLinkName}" or set bitboss-ui config key "inertiaLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
15
- );
1
+ import { defineComponent as V, mergeModels as L, useModel as T, ref as c, computed as a, watch as F, onMounted as S, createBlock as N, openBlock as w, resolveDynamicComponent as U, mergeProps as g, unref as y, withModifiers as h, withCtx as X, createElementVNode as j, createElementBlock as q, createCommentVNode as z, renderSlot as I, nextTick as O } from "vue";
2
+ import { useCancelableFunction as R } from "./index355.js";
3
+ import { useUntil as G } from "./index249.js";
4
+ import { extractDomContainer as x } from "./index235.js";
5
+ import { waitFor as H } from "./index254.js";
6
+ import { arrow as J, useFloating as K } from "./index356.js";
7
+ import { flip as Q, offset as W, shift as Y, hide as Z, autoUpdate as ee } from "./index357.js";
8
+ const oe = {
9
+ key: 0,
10
+ class: "bb-common-popover__bubble"
11
+ }, ue = /* @__PURE__ */ V({
12
+ __name: "CommonPopover",
13
+ props: /* @__PURE__ */ L({
14
+ arrowPadding: {},
15
+ eager: { type: Boolean },
16
+ offset: {},
17
+ padding: { default: 0 },
18
+ placement: {},
19
+ transitionDuration: { default: 250 },
20
+ anchor: {},
21
+ boundary: {},
22
+ dialog: { type: Boolean },
23
+ hideArrow: { type: Boolean },
24
+ tag: { default: "span" },
25
+ flip: { type: Boolean, default: !0 }
26
+ }, {
27
+ modelValue: { type: Boolean, default: !1 },
28
+ modelModifiers: {}
29
+ }),
30
+ emits: ["update:modelValue"],
31
+ setup(m) {
32
+ const o = m, r = T(m, "modelValue"), u = c(r.value), C = a(() => o.dialog ? "dialog" : "span"), t = c(), f = c(), _ = a(() => {
33
+ const e = o.anchor;
34
+ return e && typeof e == "object" && "getBoundingClientRect" in e && !(e instanceof Element) ? e : x(e);
35
+ }), B = G(r, { initialValue: o.eager }), P = a(() => {
36
+ if (o.boundary)
37
+ return typeof o.boundary == "string" ? document.querySelector(o.boundary) ?? void 0 : x(o.boundary) ?? void 0;
38
+ }), k = a(() => {
39
+ const e = P.value;
40
+ return [
41
+ ...o.flip ? [Q(e ? { boundary: e } : void 0)] : [],
42
+ W(o.offset),
43
+ Y({ padding: o.padding, ...e ? { boundary: e } : {} }),
44
+ Z(),
45
+ ...o.hideArrow ? [] : [
46
+ J({
47
+ element: f,
48
+ padding: o.arrowPadding
49
+ })
50
+ ]
51
+ ];
52
+ }), { floatingStyles: E, placement: M, middlewareData: d, update: v } = K(
53
+ _,
54
+ t,
55
+ {
56
+ placement: o.placement,
57
+ whileElementsMounted: ee,
58
+ middleware: k,
59
+ strategy: "fixed"
16
60
  }
17
- } else if (s) {
18
- if (t = o(e.nuxtLinkName), typeof t == "string") {
19
- const { warn: n } = i();
20
- n(
21
- `Nuxt link component "${e.nuxtLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.nuxtLinkName}" or set bitboss-ui config key "nuxtLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
22
- );
61
+ ), { execute: b } = R(
62
+ ({ signal: e }, n) => new Promise((i) => {
63
+ let l;
64
+ const s = () => {
65
+ l && clearTimeout(l);
66
+ };
67
+ e.addEventListener("abort", s), n ? (A(), v(), H(() => !!t.value).then(() => {
68
+ u.value = !0, e.removeEventListener("abort", s), i(void 0);
69
+ })) : (u.value = !1, l = setTimeout(() => {
70
+ O(() => {
71
+ t.value && (o.dialog ? t.value.close() : t.value.hidePopover()), e.removeEventListener("abort", s), v(), i(void 0);
72
+ });
73
+ }, o.transitionDuration));
74
+ })
75
+ ), A = () => {
76
+ if (!t.value) return;
77
+ if (!o.dialog) return t.value.showPopover();
78
+ t.value.showModal();
79
+ };
80
+ F(r, b), S(() => {
81
+ r.value && b(r.value);
82
+ });
83
+ const $ = a(() => {
84
+ const e = r.value ? void 0 : -1, n = d.value.arrow?.x, i = o.hideArrow || n == null ? "50%" : `${Math.round(n)}px`, l = o.dialog ? void 0 : "manual";
85
+ return {
86
+ style: {
87
+ ...E.value,
88
+ "--transition-duration": `${o.transitionDuration}ms`,
89
+ "--page-padding": `${o.padding}px`,
90
+ "--arrow-offset-x": i
91
+ },
92
+ popover: l,
93
+ tabindex: e
94
+ };
95
+ }), D = a(() => {
96
+ if (d.value.arrow) {
97
+ const { x: e, y: n } = d.value.arrow;
98
+ return {
99
+ style: {
100
+ left: `${e}px`,
101
+ top: `${n}px`
102
+ }
103
+ };
23
104
  }
24
- } else
25
- t = "router-link";
26
- return (n, d) => (l(), u(m(c(t)), null, {
27
- default: p(() => [
28
- f(n.$slots, "default")
105
+ }), p = () => {
106
+ r.value = !1;
107
+ };
108
+ return (e, n) => (w(), N(U(C.value), g({
109
+ ref_key: "wrapper",
110
+ ref: t,
111
+ class: ["bb-common-popover", {
112
+ "bb-common-popover--open": u.value,
113
+ "bb-common-popover--no-arrow": e.hideArrow,
114
+ [`bb-common-popover--${y(M)}`]: !0
115
+ }]
116
+ }, $.value, {
117
+ onClick: h(p, ["self", "stop"]),
118
+ onContextmenu: h(p, ["self", "stop", "prevent"]),
119
+ onClose: p
120
+ }), {
121
+ default: X(() => [
122
+ j("span", g({
123
+ ref_key: "bubblearrow",
124
+ ref: f,
125
+ class: "bb-common-popover__arrow"
126
+ }, D.value), null, 16),
127
+ y(B) ? (w(), q("span", oe, [
128
+ I(e.$slots, "default")
129
+ ])) : z("", !0)
29
130
  ]),
30
131
  _: 3
31
- }));
132
+ }, 16, ["class"]));
32
133
  }
33
134
  });
34
135
  export {
35
- y as default
136
+ ue as default
36
137
  };
package/dist/index252.js CHANGED
@@ -1,11 +1,35 @@
1
- import { get as o } from "./index277.js";
2
- const e = () => ({
3
- getItemValue(n, f) {
4
- if (typeof f > "u") return n;
5
- if (typeof f == "function") return f(n);
6
- if (typeof f == "string") return o(n, f);
7
- }
8
- });
1
+ import { createElementBlock as e, openBlock as t, createElementVNode as o } from "vue";
2
+ /* empty css */
3
+ import n from "./index331.js";
4
+ const l = {}, s = {
5
+ class: "bb-error-icon",
6
+ fill: "none",
7
+ viewBox: "0 0 20 20",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function i(c, r) {
11
+ return t(), e("svg", s, r[0] || (r[0] = [
12
+ o("path", {
13
+ d: "M9.99422 18.3333C14.5966 18.3333 18.3276 14.6024 18.3276 9.99999C18.3276 5.39762 14.5966 1.66666 9.99422 1.66666C5.39185 1.66666 1.66089 5.39762 1.66089 9.99999C1.66089 14.6024 5.39185 18.3333 9.99422 18.3333Z",
14
+ fill: "currentColor"
15
+ }, null, -1),
16
+ o("path", {
17
+ d: "M9.99414 6.66666V9.99999",
18
+ stroke: "white",
19
+ "stroke-linecap": "round",
20
+ "stroke-linejoin": "round",
21
+ "stroke-width": "2"
22
+ }, null, -1),
23
+ o("path", {
24
+ d: "M9.99414 13.3333H10.0025",
25
+ stroke: "white",
26
+ "stroke-linecap": "round",
27
+ "stroke-linejoin": "round",
28
+ "stroke-width": "2"
29
+ }, null, -1)
30
+ ]));
31
+ }
32
+ const a = /* @__PURE__ */ n(l, [["render", i]]);
9
33
  export {
10
- e as useItemValue
34
+ a as default
11
35
  };
package/dist/index253.js CHANGED
@@ -1,23 +1,109 @@
1
- function i(e, o) {
2
- const l = {}, u = e.length;
3
- for (let n = 0; n < u; n++) {
4
- const s = e[n];
5
- let f;
6
- if (typeof o == "function")
7
- f = o(s, n, e);
8
- else {
9
- const t = s[o];
10
- if (typeof t == "string" || typeof t == "number" || typeof t == "symbol")
11
- f = t;
12
- else
13
- throw new Error(
14
- `Property "${String(o)}" must be of type string, number, or symbol`
15
- );
16
- }
17
- l[f] = s;
1
+ import { defineComponent as r, ref as g, createBlock as l, openBlock as d, withCtx as i, renderSlot as s, normalizeProps as p, guardReactiveProps as a } from "vue";
2
+ import m from "./index353.js";
3
+ import f from "./index354.js";
4
+ const y = /* @__PURE__ */ r({
5
+ __name: "ListBox",
6
+ props: {
7
+ compact: { type: Boolean },
8
+ options: {},
9
+ groups: {},
10
+ headerHeight: {},
11
+ open: { type: Boolean },
12
+ loading: { type: Boolean },
13
+ multiple: { type: Boolean },
14
+ transitionDuration: {},
15
+ loadingText: {},
16
+ noDataText: {},
17
+ optionHeight: {}
18
+ },
19
+ emits: ["option:selected", "option:unselected", "focused:change"],
20
+ setup(h, { expose: u }) {
21
+ const t = g();
22
+ return u({
23
+ focusNext: () => t.value?.focusNext(),
24
+ focusPrevious: () => t.value?.focusPrevious(),
25
+ focusFirst: () => t.value?.focusFirst(),
26
+ focusFirstSelected: () => t.value?.focusFirstSelected(),
27
+ focusLast: () => t.value?.focusLast(),
28
+ focusLastSelected: () => t.value?.focusLastSelected(),
29
+ blur: () => t.value?.blur(),
30
+ confirmOption: () => t.value?.confirmOption(),
31
+ focusByHash: (o) => t.value?.focusByHash(o),
32
+ getHighlighted: () => t.value?.getHighlighted(),
33
+ getActiveDescendantId: () => t.value?.getActiveDescendantId()
34
+ }), (o, n) => o.groups ? (d(), l(f, {
35
+ key: 0,
36
+ ref_key: "child",
37
+ ref: t,
38
+ compact: o.compact,
39
+ groups: o.groups,
40
+ "header-height": o.headerHeight,
41
+ loading: o.loading,
42
+ "loading-text": o.loadingText,
43
+ multiple: o.multiple,
44
+ "no-data-text": o.noDataText,
45
+ open: o.open,
46
+ "option-height": o.optionHeight,
47
+ "transition-duration": o.transitionDuration,
48
+ "onOption:selected": n[0] || (n[0] = (e) => o.$emit("option:selected", e)),
49
+ "onOption:unselected": n[1] || (n[1] = (e) => o.$emit("option:unselected", e)),
50
+ "onFocused:change": n[2] || (n[2] = (e) => o.$emit("focused:change", e))
51
+ }, {
52
+ "options:prepend": i(() => [
53
+ s(o.$slots, "options:prepend")
54
+ ]),
55
+ loading: i(() => [
56
+ s(o.$slots, "loading")
57
+ ]),
58
+ "no-data": i(() => [
59
+ s(o.$slots, "no-data")
60
+ ]),
61
+ "options:append": i(() => [
62
+ s(o.$slots, "options:append")
63
+ ]),
64
+ option: i((e) => [
65
+ s(o.$slots, "option", p(a(e)))
66
+ ]),
67
+ group: i((e) => [
68
+ s(o.$slots, "group", p(a(e)))
69
+ ]),
70
+ _: 3
71
+ }, 8, ["compact", "groups", "header-height", "loading", "loading-text", "multiple", "no-data-text", "open", "option-height", "transition-duration"])) : (d(), l(m, {
72
+ key: 1,
73
+ ref_key: "child",
74
+ ref: t,
75
+ compact: o.compact,
76
+ loading: o.loading,
77
+ "loading-text": o.loadingText,
78
+ multiple: o.multiple,
79
+ "no-data-text": o.noDataText,
80
+ open: o.open,
81
+ options: o.options ?? [],
82
+ "option-height": o.optionHeight,
83
+ "transition-duration": o.transitionDuration,
84
+ "onOption:selected": n[3] || (n[3] = (e) => o.$emit("option:selected", e)),
85
+ "onOption:unselected": n[4] || (n[4] = (e) => o.$emit("option:unselected", e)),
86
+ "onFocused:change": n[5] || (n[5] = (e) => o.$emit("focused:change", e))
87
+ }, {
88
+ "options:prepend": i(() => [
89
+ s(o.$slots, "options:prepend")
90
+ ]),
91
+ loading: i(() => [
92
+ s(o.$slots, "loading")
93
+ ]),
94
+ "no-data": i(() => [
95
+ s(o.$slots, "no-data")
96
+ ]),
97
+ "options:append": i(() => [
98
+ s(o.$slots, "options:append")
99
+ ]),
100
+ option: i((e) => [
101
+ s(o.$slots, "option", p(a(e)))
102
+ ]),
103
+ _: 3
104
+ }, 8, ["compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "option-height", "transition-duration"]));
18
105
  }
19
- return l;
20
- }
106
+ });
21
107
  export {
22
- i as indexBy
108
+ y as default
23
109
  };