@poveste/controls 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/HstColor-DHgxKTkm.es.js +2405 -0
- package/dist/HstDate-Ct5Jp_ZD.es.js +4954 -0
- package/dist/{HstJson-Dz6cYiFP.es.js → HstJson-D83KEa9o.es.js} +2846 -2554
- package/dist/HstWrapper-Bm5H3_to.es.js +2835 -0
- package/dist/PopoverTrigger-BVAfE9fE.es.js +974 -0
- package/dist/VisuallyHiddenInput-0it-_FH2.es.js +183 -0
- package/dist/components/HstCopyIcon.story.vue.d.ts +2 -1
- package/dist/components/HstCopyIcon.vue.d.ts +3 -2
- package/dist/components/HstTooltip.vue.d.ts +39 -0
- package/dist/components/HstWrapper.vue.d.ts +10 -9
- package/dist/components/button/HstButton.story.vue.d.ts +2 -1
- package/dist/components/button/HstButton.vue.d.ts +6 -5
- package/dist/components/button/HstButtonGroup.story.vue.d.ts +2 -1
- package/dist/components/button/HstButtonGroup.vue.d.ts +3 -2
- package/dist/components/checkbox/CheckboxVisual.vue.d.ts +7 -0
- package/dist/components/checkbox/HstCheckbox.story.vue.d.ts +2 -1
- package/dist/components/checkbox/HstCheckbox.vue.d.ts +4 -3
- package/dist/components/checkbox/HstCheckboxList.story.vue.d.ts +2 -1
- package/dist/components/checkbox/HstCheckboxList.vue.d.ts +3 -2
- package/dist/components/checkbox/HstSimpleCheckbox.story.vue.d.ts +2 -1
- package/dist/components/checkbox/HstSimpleCheckbox.vue.d.ts +8 -7
- package/dist/components/color/HstColor.story.vue.d.ts +3 -0
- package/dist/components/color/HstColor.vue.d.ts +25 -0
- package/dist/components/colorselect/HstColorSelect.story.vue.d.ts +2 -1
- package/dist/components/colorselect/HstColorSelect.vue.d.ts +4 -3
- package/dist/components/date/HstDate.story.vue.d.ts +3 -0
- package/dist/components/date/HstDate.vue.d.ts +30 -0
- package/dist/components/date/iso.d.ts +5 -0
- package/dist/components/design-tokens/HstColorShades.story.vue.d.ts +2 -1
- package/dist/components/design-tokens/HstColorShades.vue.d.ts +3 -2
- package/dist/components/design-tokens/HstTokenGrid.story.vue.d.ts +2 -1
- package/dist/components/design-tokens/HstTokenGrid.vue.d.ts +3 -3
- package/dist/components/design-tokens/HstTokenList.story.vue.d.ts +2 -1
- package/dist/components/design-tokens/HstTokenList.vue.d.ts +3 -2
- package/dist/components/json/HstJson.story.vue.d.ts +2 -1
- package/dist/components/json/HstJson.vue.d.ts +3 -2
- package/dist/components/json/serialize.d.ts +10 -12
- package/dist/components/number/HstNumber.story.vue.d.ts +2 -1
- package/dist/components/number/HstNumber.vue.d.ts +4 -3
- package/dist/components/radio/HstRadio.story.vue.d.ts +2 -1
- package/dist/components/radio/HstRadio.vue.d.ts +3 -2
- package/dist/components/select/CustomSelect.vue.d.ts +4 -3
- package/dist/components/select/HstSelect.story.vue.d.ts +2 -1
- package/dist/components/select/HstSelect.vue.d.ts +3 -2
- package/dist/components/slider/HstSlider.story.vue.d.ts +2 -1
- package/dist/components/slider/HstSlider.vue.d.ts +3 -2
- package/dist/components/text/HstText.story.vue.d.ts +2 -1
- package/dist/components/text/HstText.vue.d.ts +4 -3
- package/dist/components/textarea/HstTextarea.story.vue.d.ts +2 -1
- package/dist/components/textarea/HstTextarea.vue.d.ts +4 -3
- package/dist/index.d.ts +332 -50
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +2179 -414
- package/dist/portal-target.d.ts +13 -0
- package/dist/style-standalone.css +126 -447
- package/dist/useKbd-DQM4Oqri.es.js +41 -0
- package/dist/useLocale-Dr4PRYn1.es.js +27 -0
- package/package.json +24 -22
- package/dist/HstWrapper-C557fRoN.es.js +0 -22
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,1677 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { C as e, D as t, O as n, _ as r, a as i, b as a, k as o, m as s, n as c, r as l, t as u, u as d, v as f } from "./HstWrapper-Bm5H3_to.es.js";
|
|
2
|
+
import { a as p, i as m, n as h, o as g, r as _, s as v, t as y } from "./PopoverTrigger-BVAfE9fE.es.js";
|
|
3
|
+
import { n as ee, r as b, t as x } from "./VisuallyHiddenInput-0it-_FH2.es.js";
|
|
4
|
+
import { t as te } from "./useKbd-DQM4Oqri.es.js";
|
|
5
|
+
import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createTextVNode as O, createVNode as k, defineAsyncComponent as A, defineComponent as j, getCurrentInstance as ne, guardReactiveProps as M, mergeProps as N, nextTick as P, normalizeClass as F, normalizeProps as I, normalizeStyle as L, onBeforeMount as re, onMounted as ie, onUnmounted as R, openBlock as z, ref as B, renderList as V, renderSlot as H, resolveDynamicComponent as U, shallowRef as ae, toDisplayString as W, toRefs as G, unref as K, useAttrs as oe, vModelText as se, watch as ce, withCtx as q, withDirectives as J, withKeys as Y, withMemo as le, withModifiers as X } from "@poveste/vendors/vue";
|
|
6
|
+
import { createEventHook as ue, useClipboard as de, useEventListener as fe, useLiveAnnouncer as pe, useVModel as Z } from "@poveste/vendors/vue-use";
|
|
7
|
+
import { Icon as me } from "@poveste/vendors/iconify";
|
|
8
|
+
//#region src/components/button/HstButton.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var he = ["data-color"], ge = /* @__PURE__ */ j({
|
|
9
10
|
name: "HstButton",
|
|
10
11
|
props: { color: {} },
|
|
11
12
|
setup(e) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
return (t, n) => (z(), E("button", {
|
|
14
|
+
class: "poveste-button",
|
|
15
|
+
"data-slot": "button",
|
|
16
|
+
"data-color": e.color ?? "default"
|
|
17
|
+
}, [H(t.$slots, "default")], 8, he));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs
|
|
22
|
+
function _e(e) {
|
|
23
|
+
return typeof e == "string" ? `'${e}'` : new ve().serialize(e);
|
|
24
|
+
}
|
|
25
|
+
var ve = /*@__PURE__*/ function() {
|
|
26
|
+
class e {
|
|
27
|
+
#e = /* @__PURE__ */ new Map();
|
|
28
|
+
compare(e, t) {
|
|
29
|
+
let n = typeof e, r = typeof t;
|
|
30
|
+
return n === "string" && r === "string" ? e.localeCompare(t) : n === "number" && r === "number" ? e - t : String.prototype.localeCompare.call(this.serialize(e, !0), this.serialize(t, !0));
|
|
31
|
+
}
|
|
32
|
+
serialize(e, t) {
|
|
33
|
+
if (e === null) return "null";
|
|
34
|
+
switch (typeof e) {
|
|
35
|
+
case "string": return t ? e : `'${e}'`;
|
|
36
|
+
case "bigint": return `${e}n`;
|
|
37
|
+
case "object": return this.$object(e);
|
|
38
|
+
case "function": return this.$function(e);
|
|
39
|
+
}
|
|
40
|
+
return String(e);
|
|
41
|
+
}
|
|
42
|
+
serializeObject(e) {
|
|
43
|
+
let t = Object.prototype.toString.call(e);
|
|
44
|
+
if (t !== "[object Object]") return this.serializeBuiltInType(t.length < 10 ? `unknown:${t}` : t.slice(8, -1), e);
|
|
45
|
+
let n = e.constructor, r = n === Object || n === void 0 ? "" : n.name;
|
|
46
|
+
if (r !== "" && globalThis[r] === n) return this.serializeBuiltInType(r, e);
|
|
47
|
+
if (typeof e.toJSON == "function") {
|
|
48
|
+
let t = e.toJSON();
|
|
49
|
+
return r + (typeof t == "object" && t ? this.$object(t) : `(${this.serialize(t)})`);
|
|
50
|
+
}
|
|
51
|
+
return this.serializeObjectEntries(r, Object.entries(e));
|
|
52
|
+
}
|
|
53
|
+
serializeBuiltInType(e, t) {
|
|
54
|
+
let n = this["$" + e];
|
|
55
|
+
if (n) return n.call(this, t);
|
|
56
|
+
if (typeof t?.entries == "function") return this.serializeObjectEntries(e, t.entries());
|
|
57
|
+
throw Error(`Cannot serialize ${e}`);
|
|
58
|
+
}
|
|
59
|
+
serializeObjectEntries(e, t) {
|
|
60
|
+
let n = Array.from(t).sort((e, t) => this.compare(e[0], t[0])), r = `${e}{`;
|
|
61
|
+
for (let e = 0; e < n.length; e++) {
|
|
62
|
+
let [t, i] = n[e];
|
|
63
|
+
r += `${this.serialize(t, !0)}:${this.serialize(i)}`, e < n.length - 1 && (r += ",");
|
|
64
|
+
}
|
|
65
|
+
return r + "}";
|
|
66
|
+
}
|
|
67
|
+
$object(e) {
|
|
68
|
+
let t = this.#e.get(e);
|
|
69
|
+
return t === void 0 && (this.#e.set(e, `#${this.#e.size}`), t = this.serializeObject(e), this.#e.set(e, t)), t;
|
|
70
|
+
}
|
|
71
|
+
$function(e) {
|
|
72
|
+
let t = Function.prototype.toString.call(e);
|
|
73
|
+
return t.slice(-15) === "[native code] }" ? `${e.name || ""}()[native]` : `${e.name}(${e.length})${t.replace(/\s*\n\s*/g, "")}`;
|
|
74
|
+
}
|
|
75
|
+
$Array(e) {
|
|
76
|
+
let t = "[";
|
|
77
|
+
for (let n = 0; n < e.length; n++) t += this.serialize(e[n]), n < e.length - 1 && (t += ",");
|
|
78
|
+
return t + "]";
|
|
79
|
+
}
|
|
80
|
+
$Date(e) {
|
|
81
|
+
try {
|
|
82
|
+
return `Date(${e.toISOString()})`;
|
|
83
|
+
} catch {
|
|
84
|
+
return "Date(null)";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
$ArrayBuffer(e) {
|
|
88
|
+
return `ArrayBuffer[${new Uint8Array(e).join(",")}]`;
|
|
89
|
+
}
|
|
90
|
+
$Set(e) {
|
|
91
|
+
return `Set${this.$Array(Array.from(e).sort((e, t) => this.compare(e, t)))}`;
|
|
92
|
+
}
|
|
93
|
+
$Map(e) {
|
|
94
|
+
return this.serializeObjectEntries("Map", e.entries());
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
for (let t of [
|
|
98
|
+
"Error",
|
|
99
|
+
"RegExp",
|
|
100
|
+
"URL"
|
|
101
|
+
]) e.prototype["$" + t] = function(e) {
|
|
102
|
+
return `${t}(${e})`;
|
|
103
|
+
};
|
|
104
|
+
for (let t of [
|
|
105
|
+
"Int8Array",
|
|
106
|
+
"Uint8Array",
|
|
107
|
+
"Uint8ClampedArray",
|
|
108
|
+
"Int16Array",
|
|
109
|
+
"Uint16Array",
|
|
110
|
+
"Int32Array",
|
|
111
|
+
"Uint32Array",
|
|
112
|
+
"Float32Array",
|
|
113
|
+
"Float64Array"
|
|
114
|
+
]) e.prototype["$" + t] = function(e) {
|
|
115
|
+
return `${t}[${e.join(",")}]`;
|
|
116
|
+
};
|
|
117
|
+
for (let t of ["BigInt64Array", "BigUint64Array"]) e.prototype["$" + t] = function(e) {
|
|
118
|
+
return `${t}[${e.join("n,")}${e.length > 0 ? "n" : ""}]`;
|
|
119
|
+
};
|
|
120
|
+
return e;
|
|
121
|
+
}();
|
|
122
|
+
function Q(e, t) {
|
|
123
|
+
return e === t || _e(e) === _e(t);
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/shared/arrays.js
|
|
127
|
+
function ye(e, t, n) {
|
|
128
|
+
let r = e.findIndex((e) => Q(e, t)), i = e.findIndex((e) => Q(e, n));
|
|
129
|
+
if (r === -1 || i === -1) return [];
|
|
130
|
+
let [a, o] = [r, i].sort((e, t) => e - t);
|
|
131
|
+
return e.slice(a, o + 1);
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/shared/isValueEqualOrExist.js
|
|
135
|
+
function be(e, n) {
|
|
136
|
+
return t(e) ? !1 : Array.isArray(e) ? e.some((e) => Q(e, n)) : Q(e, n);
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useForwardScopeId.js
|
|
140
|
+
function xe() {
|
|
141
|
+
let e = ne()?.vnode?.scopeId;
|
|
142
|
+
return e ? { [e]: "" } : {};
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useTypeahead.js
|
|
146
|
+
function Se(t) {
|
|
147
|
+
let n = e("", 1e3);
|
|
148
|
+
return {
|
|
149
|
+
search: n,
|
|
150
|
+
handleTypeaheadSearch: (e, r) => {
|
|
151
|
+
if (n.value += e, t) t(e);
|
|
152
|
+
else {
|
|
153
|
+
let e = v(), t = r.map((e) => ({
|
|
154
|
+
...e,
|
|
155
|
+
textValue: e.value?.textValue ?? e.ref.textContent?.trim() ?? ""
|
|
156
|
+
})), i = t.find((t) => t.ref === e), a = we(t.map((e) => e.textValue), n.value, i?.textValue), o = t.find((e) => e.textValue === a);
|
|
157
|
+
return o && o.ref.focus(), o?.ref;
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
resetTypeahead: () => {
|
|
161
|
+
n.value = "";
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function Ce(e, t) {
|
|
166
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
167
|
+
}
|
|
168
|
+
function we(e, t, n) {
|
|
169
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Ce(e, Math.max(i, 0));
|
|
170
|
+
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
171
|
+
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
|
|
172
|
+
return o === n ? void 0 : o;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useSingleOrMultipleValue.js
|
|
176
|
+
function Te({ type: e, defaultValue: t, modelValue: n }) {
|
|
177
|
+
let r = n || t;
|
|
178
|
+
return n !== void 0 || t !== void 0 ? Array.isArray(r) ? "multiple" : "single" : e ?? "single";
|
|
179
|
+
}
|
|
180
|
+
function Ee({ type: e, defaultValue: t, modelValue: n }) {
|
|
181
|
+
return e || Te({
|
|
182
|
+
type: e,
|
|
183
|
+
defaultValue: t,
|
|
184
|
+
modelValue: n
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function De({ type: e, defaultValue: t }) {
|
|
188
|
+
return t === void 0 ? e === "single" ? void 0 : [] : t;
|
|
189
|
+
}
|
|
190
|
+
function Oe(e, t) {
|
|
191
|
+
let n = C(() => Ee(e)), r = Z(e, "modelValue", t, {
|
|
192
|
+
defaultValue: De(e),
|
|
193
|
+
passive: e.modelValue === void 0,
|
|
194
|
+
deep: !0
|
|
195
|
+
});
|
|
196
|
+
function i(e) {
|
|
197
|
+
if (n.value === "single") r.value = Q(e, r.value) ? void 0 : e;
|
|
198
|
+
else {
|
|
199
|
+
let t = Array.isArray(r.value) ? [...r.value || []] : [r.value].filter(Boolean);
|
|
200
|
+
if (be(t, e)) {
|
|
201
|
+
let n = t.findIndex((t) => Q(t, e));
|
|
202
|
+
t.splice(n, 1);
|
|
203
|
+
} else t.push(e);
|
|
204
|
+
r.value = t;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
modelValue: r,
|
|
209
|
+
changeModelValue: i,
|
|
210
|
+
isSingle: C(() => n.value === "single")
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/Listbox/utils.js
|
|
215
|
+
function ke(e, t, n) {
|
|
216
|
+
return e === void 0 ? !1 : Array.isArray(e) ? e.some((e) => Ae(e, t, n)) : Ae(e, t, n);
|
|
217
|
+
}
|
|
218
|
+
function Ae(e, t, n) {
|
|
219
|
+
return e === void 0 || t === void 0 ? !1 : typeof e == "string" ? e === t : typeof n == "function" ? n(e, t) : typeof n == "string" ? e?.[n] === t?.[n] : Q(e, t);
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/RovingFocus/utils.js
|
|
223
|
+
var je = "rovingFocusGroup.onEntryFocus", Me = {
|
|
224
|
+
bubbles: !1,
|
|
225
|
+
cancelable: !0
|
|
226
|
+
}, Ne = {
|
|
227
|
+
ArrowLeft: "prev",
|
|
228
|
+
ArrowUp: "prev",
|
|
229
|
+
ArrowRight: "next",
|
|
230
|
+
ArrowDown: "next",
|
|
231
|
+
PageUp: "first",
|
|
232
|
+
Home: "first",
|
|
233
|
+
PageDown: "last",
|
|
234
|
+
End: "last"
|
|
235
|
+
};
|
|
236
|
+
function Pe(e, t) {
|
|
237
|
+
return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
|
|
238
|
+
}
|
|
239
|
+
function Fe(e, t, n) {
|
|
240
|
+
let r = Pe(e.key, n);
|
|
241
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return Ne[r];
|
|
242
|
+
}
|
|
243
|
+
function Ie(e, t = !1) {
|
|
244
|
+
let n = v();
|
|
245
|
+
for (let r of e) if (r === n || (r.focus({ preventScroll: t }), v() !== n)) return;
|
|
246
|
+
}
|
|
247
|
+
function Le(e, t) {
|
|
248
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/Listbox/ListboxRoot.js
|
|
252
|
+
var [Re, ze] = /*#__PURE__*/ o("ListboxRoot"), [Be, Ve] = /*#__PURE__*/ o("ListboxHighlightScroll"), He = /* @__PURE__ */ j({
|
|
253
|
+
__name: "ListboxRoot",
|
|
254
|
+
props: {
|
|
255
|
+
modelValue: {
|
|
256
|
+
type: null,
|
|
257
|
+
required: !1
|
|
258
|
+
},
|
|
259
|
+
defaultValue: {
|
|
260
|
+
type: null,
|
|
261
|
+
required: !1
|
|
262
|
+
},
|
|
263
|
+
multiple: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
required: !1
|
|
266
|
+
},
|
|
267
|
+
orientation: {
|
|
268
|
+
type: String,
|
|
269
|
+
required: !1,
|
|
270
|
+
default: "vertical"
|
|
271
|
+
},
|
|
272
|
+
dir: {
|
|
273
|
+
type: String,
|
|
274
|
+
required: !1
|
|
275
|
+
},
|
|
276
|
+
disabled: {
|
|
277
|
+
type: Boolean,
|
|
278
|
+
required: !1
|
|
279
|
+
},
|
|
280
|
+
selectionBehavior: {
|
|
281
|
+
type: String,
|
|
282
|
+
required: !1,
|
|
283
|
+
default: "toggle"
|
|
284
|
+
},
|
|
285
|
+
highlightOnHover: {
|
|
286
|
+
type: Boolean,
|
|
287
|
+
required: !1
|
|
288
|
+
},
|
|
289
|
+
by: {
|
|
290
|
+
type: [String, Function],
|
|
291
|
+
required: !1
|
|
292
|
+
},
|
|
293
|
+
asChild: {
|
|
294
|
+
type: Boolean,
|
|
295
|
+
required: !1
|
|
296
|
+
},
|
|
297
|
+
as: {
|
|
298
|
+
type: null,
|
|
299
|
+
required: !1
|
|
300
|
+
},
|
|
301
|
+
name: {
|
|
302
|
+
type: String,
|
|
303
|
+
required: !1
|
|
304
|
+
},
|
|
305
|
+
required: {
|
|
306
|
+
type: Boolean,
|
|
307
|
+
required: !1
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
emits: [
|
|
311
|
+
"update:modelValue",
|
|
312
|
+
"highlight",
|
|
313
|
+
"entryFocus",
|
|
314
|
+
"leave"
|
|
315
|
+
],
|
|
316
|
+
setup(e, { expose: t, emit: n }) {
|
|
317
|
+
let r = e, i = n, { multiple: o, highlightOnHover: s, orientation: c, disabled: l, selectionBehavior: u, dir: p } = G(r), { getItems: m, getItem: h } = ee({ isProvider: !0 }), { handleTypeaheadSearch: _ } = Se(), { primitiveElement: v, currentElement: y } = g(), S = te(), C = f(p), E = Be(null);
|
|
318
|
+
Ve({
|
|
319
|
+
suppressHighlightScroll: B(!1),
|
|
320
|
+
onHighlightScrollRequest: () => {}
|
|
321
|
+
});
|
|
322
|
+
let D = b(y), O = B(), k = B(!1), A = B(!0), j = Z(r, "modelValue", i, {
|
|
323
|
+
defaultValue: r.defaultValue ?? (o.value ? [] : void 0),
|
|
324
|
+
passive: r.modelValue === void 0,
|
|
325
|
+
deep: !0
|
|
326
|
+
});
|
|
327
|
+
function ne(e) {
|
|
328
|
+
if (k.value = !0, r.multiple) {
|
|
329
|
+
let t = Array.isArray(j.value) ? [...j.value] : [], n = t.findIndex((t) => Ae(t, e, r.by));
|
|
330
|
+
r.selectionBehavior === "toggle" ? (n === -1 ? t.push(e) : t.splice(n, 1), j.value = t) : (j.value = [e], O.value = e);
|
|
331
|
+
} else r.selectionBehavior === "toggle" && Ae(j.value, e, r.by) ? j.value = void 0 : j.value = e;
|
|
332
|
+
setTimeout(() => {
|
|
333
|
+
k.value = !1;
|
|
334
|
+
}, 1);
|
|
335
|
+
}
|
|
336
|
+
let M = B(null), N = B(null), F = B(!1), I = B(!1), L = ue(), re = ue(), ie = ue();
|
|
337
|
+
function R() {
|
|
338
|
+
return m().map((e) => e.ref).filter((e) => e.dataset.disabled !== "");
|
|
339
|
+
}
|
|
340
|
+
function V(e, t = !0, n) {
|
|
341
|
+
if (!e) return;
|
|
342
|
+
M.value = e;
|
|
343
|
+
let r = E?.suppressHighlightScroll.value ?? !1;
|
|
344
|
+
(n ?? A.value) && (r ? M.value.focus({ preventScroll: !0 }) : M.value.focus()), r ? E?.onHighlightScrollRequest(t ? () => {
|
|
345
|
+
let e = M.value;
|
|
346
|
+
e?.isConnected && e.scrollIntoView({ block: "nearest" });
|
|
347
|
+
} : void 0) : t && M.value.scrollIntoView({ block: "nearest" });
|
|
348
|
+
let a = h(e);
|
|
349
|
+
i("highlight", a);
|
|
350
|
+
}
|
|
351
|
+
function U(e) {
|
|
352
|
+
if (F.value) ie.trigger(e);
|
|
353
|
+
else {
|
|
354
|
+
let t = m().find((t) => Ae(t.value, e, r.by));
|
|
355
|
+
t && (M.value = t.ref, V(t.ref));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function ae(e) {
|
|
359
|
+
if (M.value && M.value.isConnected) {
|
|
360
|
+
if (e.ctrlKey || e.metaKey || e.altKey) return;
|
|
361
|
+
e.preventDefault(), e.stopPropagation(), I.value || M.value.click();
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function W(e) {
|
|
365
|
+
if (A.value) {
|
|
366
|
+
if (k.value = !0, F.value) re.trigger(e);
|
|
367
|
+
else {
|
|
368
|
+
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
369
|
+
if (t && e.key === "a" && o.value) {
|
|
370
|
+
let t = m(), n = t.map((e) => e.value);
|
|
371
|
+
j.value = [...n], e.preventDefault();
|
|
372
|
+
let r = t.at(-1);
|
|
373
|
+
r && V(r.ref);
|
|
374
|
+
} else if (!t) {
|
|
375
|
+
let t = _(e.key, m());
|
|
376
|
+
t && V(t);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
setTimeout(() => {
|
|
380
|
+
k.value = !1;
|
|
381
|
+
}, 1);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
function oe() {
|
|
385
|
+
I.value = !0;
|
|
386
|
+
}
|
|
387
|
+
function se() {
|
|
388
|
+
P(() => {
|
|
389
|
+
I.value = !1;
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
function J() {
|
|
393
|
+
P(() => {
|
|
394
|
+
X(new KeyboardEvent("keydown", { key: "PageUp" }));
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
function Y(e) {
|
|
398
|
+
let t = M.value;
|
|
399
|
+
t?.isConnected && (N.value = t), M.value = null, i("leave", e);
|
|
400
|
+
}
|
|
401
|
+
function le(e) {
|
|
402
|
+
let t = new CustomEvent("listbox.entryFocus", {
|
|
403
|
+
bubbles: !1,
|
|
404
|
+
cancelable: !0
|
|
405
|
+
});
|
|
406
|
+
if (e.currentTarget?.dispatchEvent(t), i("entryFocus", t), !t.defaultPrevented) {
|
|
407
|
+
if (N.value) V(N.value);
|
|
408
|
+
else {
|
|
409
|
+
let e = R()?.[0];
|
|
410
|
+
V(e);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function X(e) {
|
|
415
|
+
let t = Fe(e, c.value, C.value);
|
|
416
|
+
if (!t) return;
|
|
417
|
+
let n = R();
|
|
418
|
+
if (M.value) {
|
|
419
|
+
if (t === "last") n.reverse();
|
|
420
|
+
else if (t === "prev" || t === "next") {
|
|
421
|
+
t === "prev" && n.reverse();
|
|
422
|
+
let e = n.indexOf(M.value);
|
|
423
|
+
n = n.slice(e + 1);
|
|
424
|
+
}
|
|
425
|
+
de(e, n[0]);
|
|
426
|
+
}
|
|
427
|
+
if (n.length) {
|
|
428
|
+
let e = !M.value && t === "prev" ? n.length - 1 : 0;
|
|
429
|
+
V(n[e]);
|
|
430
|
+
}
|
|
431
|
+
if (F.value) return re.trigger(e);
|
|
432
|
+
}
|
|
433
|
+
function de(e, t) {
|
|
434
|
+
if (!F.value && r.selectionBehavior === "replace" && o.value && Array.isArray(j.value) && (!e.altKey && !e.ctrlKey && !e.metaKey || e.shiftKey) && e.shiftKey) {
|
|
435
|
+
let n = m().filter((e) => e.ref.dataset.disabled !== ""), r = n.find((e) => e.ref === t)?.value;
|
|
436
|
+
if (e.key === S.END ? r = n.at(-1)?.value : e.key === S.HOME && (r = n[0]?.value), !r || !O.value) return;
|
|
437
|
+
let i = ye(n.map((e) => e.value), O.value, r);
|
|
438
|
+
j.value = i;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
async function fe(e, t = !0) {
|
|
442
|
+
if (a) {
|
|
443
|
+
if (await P(), F.value) L.trigger({
|
|
444
|
+
event: e,
|
|
445
|
+
scroll: t
|
|
446
|
+
});
|
|
447
|
+
else {
|
|
448
|
+
let e = R(), n = e.find((e) => e.dataset.state === "checked"), r = t ? void 0 : !1;
|
|
449
|
+
n ? V(n, t, r) : e.length && V(e[0], t, r);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
let pe = !1;
|
|
454
|
+
return ce(j, () => {
|
|
455
|
+
if (!k.value) {
|
|
456
|
+
let e = pe;
|
|
457
|
+
pe = !0, P(() => {
|
|
458
|
+
fe(void 0, e);
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}, {
|
|
462
|
+
immediate: !0,
|
|
463
|
+
deep: !0
|
|
464
|
+
}), t({
|
|
465
|
+
highlightedElement: M,
|
|
466
|
+
highlightItem: U,
|
|
467
|
+
highlightFirstItem: J,
|
|
468
|
+
highlightSelected: fe,
|
|
469
|
+
getItems: m
|
|
470
|
+
}), ze({
|
|
471
|
+
modelValue: j,
|
|
472
|
+
onValueChange: ne,
|
|
473
|
+
multiple: o,
|
|
474
|
+
orientation: c,
|
|
475
|
+
dir: C,
|
|
476
|
+
disabled: l,
|
|
477
|
+
highlightOnHover: s,
|
|
478
|
+
highlightedElement: M,
|
|
479
|
+
isVirtual: F,
|
|
480
|
+
virtualFocusHook: L,
|
|
481
|
+
virtualKeydownHook: re,
|
|
482
|
+
virtualHighlightHook: ie,
|
|
483
|
+
by: r.by,
|
|
484
|
+
firstValue: O,
|
|
485
|
+
selectionBehavior: u,
|
|
486
|
+
focusable: A,
|
|
487
|
+
onLeave: Y,
|
|
488
|
+
onEnter: le,
|
|
489
|
+
changeHighlight: V,
|
|
490
|
+
onKeydownEnter: ae,
|
|
491
|
+
onKeydownNavigation: X,
|
|
492
|
+
onKeydownTypeAhead: W,
|
|
493
|
+
onCompositionStart: oe,
|
|
494
|
+
onCompositionEnd: se,
|
|
495
|
+
highlightFirstItem: J
|
|
496
|
+
}), (e, t) => (z(), w(K(d), {
|
|
497
|
+
ref_key: "primitiveElement",
|
|
498
|
+
ref: v,
|
|
499
|
+
as: e.as,
|
|
500
|
+
"as-child": e.asChild,
|
|
501
|
+
dir: K(C),
|
|
502
|
+
"data-disabled": K(l) ? "" : void 0,
|
|
503
|
+
onPointerleave: Y,
|
|
504
|
+
onFocusout: t[0] ||= async (e) => {
|
|
505
|
+
let t = e.relatedTarget || e.target;
|
|
506
|
+
await P(), M.value && K(y) && !K(y).contains(t) && Y(e);
|
|
507
|
+
}
|
|
508
|
+
}, {
|
|
509
|
+
default: q(() => [H(e.$slots, "default", { modelValue: K(j) }), K(D) && e.name ? (z(), w(K(x), {
|
|
510
|
+
key: 0,
|
|
511
|
+
name: e.name,
|
|
512
|
+
value: K(j),
|
|
513
|
+
disabled: K(l),
|
|
514
|
+
required: e.required
|
|
515
|
+
}, null, 8, [
|
|
516
|
+
"name",
|
|
517
|
+
"value",
|
|
518
|
+
"disabled",
|
|
519
|
+
"required"
|
|
520
|
+
])) : T("v-if", !0)]),
|
|
521
|
+
_: 3
|
|
522
|
+
}, 8, [
|
|
523
|
+
"as",
|
|
524
|
+
"as-child",
|
|
525
|
+
"dir",
|
|
526
|
+
"data-disabled"
|
|
527
|
+
]));
|
|
528
|
+
}
|
|
529
|
+
}), Ue = /* @__PURE__ */ j({
|
|
530
|
+
__name: "ListboxContent",
|
|
531
|
+
props: {
|
|
532
|
+
asChild: {
|
|
533
|
+
type: Boolean,
|
|
534
|
+
required: !1
|
|
535
|
+
},
|
|
536
|
+
as: {
|
|
537
|
+
type: null,
|
|
538
|
+
required: !1
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
setup(t) {
|
|
542
|
+
let { CollectionSlot: n } = ee(), r = Re(), i = e(!1, 10);
|
|
543
|
+
return (e, t) => (z(), w(K(n), null, {
|
|
544
|
+
default: q(() => [k(K(d), {
|
|
545
|
+
role: "listbox",
|
|
546
|
+
as: e.as,
|
|
547
|
+
"as-child": e.asChild,
|
|
548
|
+
tabindex: K(r).focusable.value ? K(r).highlightedElement.value ? "-1" : "0" : "-1",
|
|
549
|
+
"aria-orientation": K(r).orientation.value,
|
|
550
|
+
"aria-multiselectable": !!K(r).multiple.value,
|
|
551
|
+
"data-orientation": K(r).orientation.value,
|
|
552
|
+
onMousedown: t[0] ||= X((e) => i.value = !0, ["left"]),
|
|
553
|
+
onFocus: t[1] ||= (e) => {
|
|
554
|
+
K(i) || K(r).onEnter(e);
|
|
555
|
+
},
|
|
556
|
+
onKeydown: [
|
|
557
|
+
t[2] ||= Y((e) => {
|
|
558
|
+
(K(r).orientation.value !== "vertical" || e.key !== "ArrowLeft" && e.key !== "ArrowRight") && (K(r).orientation.value !== "horizontal" || e.key !== "ArrowUp" && e.key !== "ArrowDown") && (e.preventDefault(), K(r).focusable.value && K(r).onKeydownNavigation(e));
|
|
559
|
+
}, [
|
|
560
|
+
"down",
|
|
561
|
+
"up",
|
|
562
|
+
"left",
|
|
563
|
+
"right",
|
|
564
|
+
"home",
|
|
565
|
+
"end"
|
|
566
|
+
]),
|
|
567
|
+
Y(K(r).onKeydownEnter, ["enter"]),
|
|
568
|
+
K(r).onKeydownTypeAhead
|
|
569
|
+
]
|
|
570
|
+
}, {
|
|
571
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
572
|
+
_: 3
|
|
573
|
+
}, 8, [
|
|
574
|
+
"as",
|
|
575
|
+
"as-child",
|
|
576
|
+
"tabindex",
|
|
577
|
+
"aria-orientation",
|
|
578
|
+
"aria-multiselectable",
|
|
579
|
+
"data-orientation",
|
|
580
|
+
"onKeydown"
|
|
581
|
+
])]),
|
|
582
|
+
_: 3
|
|
583
|
+
}));
|
|
584
|
+
}
|
|
585
|
+
}), We = "listbox.select", [Ge, Ke] = /*#__PURE__*/ o("ListboxItem"), qe = /* @__PURE__ */ j({
|
|
586
|
+
__name: "ListboxItem",
|
|
587
|
+
props: {
|
|
588
|
+
value: {
|
|
589
|
+
type: null,
|
|
590
|
+
required: !0
|
|
591
|
+
},
|
|
592
|
+
disabled: {
|
|
593
|
+
type: Boolean,
|
|
594
|
+
required: !1
|
|
595
|
+
},
|
|
596
|
+
asChild: {
|
|
597
|
+
type: Boolean,
|
|
598
|
+
required: !1
|
|
599
|
+
},
|
|
600
|
+
as: {
|
|
601
|
+
type: null,
|
|
602
|
+
required: !1,
|
|
603
|
+
default: "div"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
emits: ["select"],
|
|
607
|
+
setup(e, { emit: t }) {
|
|
608
|
+
let i = e, a = t, o = s(void 0, "reka-listbox-item"), { CollectionItem: c } = ee(), { forwardRef: l, currentElement: u } = r(), f = Re(), p = C(() => u.value != null && u.value === f.highlightedElement.value), m = C(() => ke(f.modelValue.value, i.value, f.by)), h = C(() => f.disabled.value || i.disabled);
|
|
609
|
+
async function g(e) {
|
|
610
|
+
a("select", e), !e?.defaultPrevented && !h.value && e && (f.onValueChange(i.value), f.changeHighlight(u.value));
|
|
611
|
+
}
|
|
612
|
+
function _(e) {
|
|
613
|
+
let t = {
|
|
614
|
+
originalEvent: e,
|
|
615
|
+
value: i.value
|
|
616
|
+
};
|
|
617
|
+
n(We, g, t);
|
|
618
|
+
}
|
|
619
|
+
return Ke({ isSelected: m }), (e, t) => (z(), w(K(c), { value: e.value }, {
|
|
620
|
+
default: q(() => [le([
|
|
621
|
+
p.value,
|
|
622
|
+
m.value,
|
|
623
|
+
h.value,
|
|
624
|
+
K(f).focusable.value,
|
|
625
|
+
...Object.entries(e.$attrs).flat()
|
|
626
|
+
], () => k(K(d), N({ id: K(o) }, e.$attrs, {
|
|
627
|
+
ref: K(l),
|
|
628
|
+
role: "option",
|
|
629
|
+
tabindex: K(f).focusable.value ? p.value ? "0" : "-1" : -1,
|
|
630
|
+
"aria-selected": m.value,
|
|
631
|
+
as: e.as,
|
|
632
|
+
"as-child": e.asChild,
|
|
633
|
+
disabled: h.value ? "" : void 0,
|
|
634
|
+
"data-disabled": h.value ? "" : void 0,
|
|
635
|
+
"data-highlighted": p.value ? "" : void 0,
|
|
636
|
+
"data-state": m.value ? "checked" : "unchecked",
|
|
637
|
+
onClick: _,
|
|
638
|
+
onKeydown: Y(X(_, ["prevent"]), ["space"]),
|
|
639
|
+
onPointermove: t[0] ||= () => {
|
|
640
|
+
K(f).highlightedElement.value !== K(u) && K(f).highlightOnHover.value && K(f).changeHighlight(K(u), !1, !1);
|
|
641
|
+
}
|
|
642
|
+
}), {
|
|
643
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
644
|
+
_: 3
|
|
645
|
+
}, 16, [
|
|
646
|
+
"id",
|
|
647
|
+
"tabindex",
|
|
648
|
+
"aria-selected",
|
|
649
|
+
"as",
|
|
650
|
+
"as-child",
|
|
651
|
+
"disabled",
|
|
652
|
+
"data-disabled",
|
|
653
|
+
"data-highlighted",
|
|
654
|
+
"data-state",
|
|
655
|
+
"onKeydown"
|
|
656
|
+
]), t, 1)]),
|
|
657
|
+
_: 3
|
|
658
|
+
}, 8, ["value"]));
|
|
659
|
+
}
|
|
660
|
+
}), [Je, Ye] = /*#__PURE__*/ o("RovingFocusGroup"), Xe = /* @__PURE__ */ j({
|
|
661
|
+
__name: "RovingFocusGroup",
|
|
662
|
+
props: {
|
|
663
|
+
orientation: {
|
|
664
|
+
type: String,
|
|
665
|
+
required: !1,
|
|
666
|
+
default: void 0
|
|
667
|
+
},
|
|
668
|
+
dir: {
|
|
669
|
+
type: String,
|
|
670
|
+
required: !1
|
|
671
|
+
},
|
|
672
|
+
loop: {
|
|
673
|
+
type: Boolean,
|
|
674
|
+
required: !1,
|
|
675
|
+
default: !1
|
|
676
|
+
},
|
|
677
|
+
currentTabStopId: {
|
|
678
|
+
type: [String, null],
|
|
679
|
+
required: !1
|
|
680
|
+
},
|
|
681
|
+
defaultCurrentTabStopId: {
|
|
682
|
+
type: String,
|
|
683
|
+
required: !1
|
|
684
|
+
},
|
|
685
|
+
preventScrollOnEntryFocus: {
|
|
686
|
+
type: Boolean,
|
|
687
|
+
required: !1,
|
|
688
|
+
default: !1
|
|
689
|
+
},
|
|
690
|
+
asChild: {
|
|
691
|
+
type: Boolean,
|
|
692
|
+
required: !1
|
|
693
|
+
},
|
|
694
|
+
as: {
|
|
695
|
+
type: null,
|
|
696
|
+
required: !1
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
emits: ["entryFocus", "update:currentTabStopId"],
|
|
700
|
+
setup(e, { expose: t, emit: n }) {
|
|
701
|
+
let r = e, i = n, { loop: a, orientation: o, dir: s } = G(r), c = f(s), l = Z(r, "currentTabStopId", i, {
|
|
702
|
+
defaultValue: r.defaultCurrentTabStopId,
|
|
703
|
+
passive: r.currentTabStopId === void 0
|
|
704
|
+
}), u = B(!1), p = B(!1), m = B(0), { getItems: h, CollectionSlot: g } = ee({ isProvider: !0 });
|
|
705
|
+
function _(e) {
|
|
706
|
+
let t = !p.value;
|
|
707
|
+
if (e.currentTarget && e.target === e.currentTarget && t && !u.value) {
|
|
708
|
+
let t = new CustomEvent(je, Me);
|
|
709
|
+
if (e.currentTarget.dispatchEvent(t), i("entryFocus", t), !t.defaultPrevented) {
|
|
710
|
+
let e = h().map((e) => e.ref).filter((e) => e.dataset.disabled !== "");
|
|
711
|
+
Ie([
|
|
712
|
+
e.find((e) => e.getAttribute("data-active") === ""),
|
|
713
|
+
e.find((e) => e.getAttribute("data-highlighted") === ""),
|
|
714
|
+
e.find((e) => e.id === l.value),
|
|
715
|
+
...e
|
|
716
|
+
].filter(Boolean), r.preventScrollOnEntryFocus);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
p.value = !1;
|
|
720
|
+
}
|
|
721
|
+
function v() {
|
|
722
|
+
setTimeout(() => {
|
|
723
|
+
p.value = !1;
|
|
724
|
+
}, 1);
|
|
725
|
+
}
|
|
726
|
+
return t({ getItems: h }), Ye({
|
|
727
|
+
loop: a,
|
|
728
|
+
dir: c,
|
|
729
|
+
orientation: o,
|
|
730
|
+
currentTabStopId: l,
|
|
731
|
+
onItemFocus: (e) => {
|
|
732
|
+
l.value = e;
|
|
733
|
+
},
|
|
734
|
+
onItemShiftTab: () => {
|
|
735
|
+
u.value = !0;
|
|
736
|
+
},
|
|
737
|
+
onFocusableItemAdd: () => {
|
|
738
|
+
m.value++;
|
|
739
|
+
},
|
|
740
|
+
onFocusableItemRemove: () => {
|
|
741
|
+
m.value--;
|
|
742
|
+
}
|
|
743
|
+
}), (e, t) => (z(), w(K(g), null, {
|
|
744
|
+
default: q(() => [k(K(d), {
|
|
745
|
+
tabindex: u.value || m.value === 0 ? -1 : 0,
|
|
746
|
+
"data-orientation": K(o),
|
|
747
|
+
as: e.as,
|
|
748
|
+
"as-child": e.asChild,
|
|
749
|
+
dir: K(c),
|
|
750
|
+
style: { outline: "none" },
|
|
751
|
+
onMousedown: t[0] ||= (e) => p.value = !0,
|
|
752
|
+
onMouseup: v,
|
|
753
|
+
onFocus: _,
|
|
754
|
+
onBlur: t[1] ||= (e) => u.value = !1
|
|
755
|
+
}, {
|
|
756
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
757
|
+
_: 3
|
|
758
|
+
}, 8, [
|
|
759
|
+
"tabindex",
|
|
760
|
+
"data-orientation",
|
|
761
|
+
"as",
|
|
762
|
+
"as-child",
|
|
763
|
+
"dir"
|
|
764
|
+
])]),
|
|
765
|
+
_: 3
|
|
766
|
+
}));
|
|
767
|
+
}
|
|
768
|
+
}), Ze = /* @__PURE__ */ j({
|
|
769
|
+
__name: "RovingFocusItem",
|
|
770
|
+
props: {
|
|
771
|
+
tabStopId: {
|
|
772
|
+
type: String,
|
|
773
|
+
required: !1
|
|
774
|
+
},
|
|
775
|
+
focusable: {
|
|
776
|
+
type: Boolean,
|
|
777
|
+
required: !1,
|
|
778
|
+
default: !0
|
|
779
|
+
},
|
|
780
|
+
active: {
|
|
781
|
+
type: Boolean,
|
|
782
|
+
required: !1
|
|
783
|
+
},
|
|
784
|
+
allowShiftKey: {
|
|
785
|
+
type: Boolean,
|
|
786
|
+
required: !1
|
|
787
|
+
},
|
|
788
|
+
asChild: {
|
|
789
|
+
type: Boolean,
|
|
790
|
+
required: !1
|
|
791
|
+
},
|
|
792
|
+
as: {
|
|
793
|
+
type: null,
|
|
794
|
+
required: !1,
|
|
795
|
+
default: "span"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
setup(e) {
|
|
799
|
+
let t = e, n = Je(), r = s(), i = C(() => t.tabStopId || r), a = C(() => n.currentTabStopId.value === i.value), { getItems: o, CollectionItem: c } = ee();
|
|
800
|
+
ie(() => {
|
|
801
|
+
t.focusable && n.onFocusableItemAdd();
|
|
802
|
+
}), R(() => {
|
|
803
|
+
t.focusable && n.onFocusableItemRemove();
|
|
804
|
+
}), ce(() => t.focusable, (e, t) => {
|
|
805
|
+
e !== t && (e ? n.onFocusableItemAdd() : n.onFocusableItemRemove());
|
|
806
|
+
});
|
|
807
|
+
function l(e) {
|
|
808
|
+
if (e.key === "Tab" && e.shiftKey) {
|
|
809
|
+
n.onItemShiftTab();
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
if (e.target !== e.currentTarget) return;
|
|
813
|
+
let r = Fe(e, n.orientation.value, n.dir.value);
|
|
814
|
+
if (r !== void 0) {
|
|
815
|
+
if (e.metaKey || e.ctrlKey || e.altKey || !t.allowShiftKey && e.shiftKey) return;
|
|
816
|
+
e.preventDefault();
|
|
817
|
+
let i = [...o().map((e) => e.ref).filter((e) => e.dataset.disabled !== "")];
|
|
818
|
+
if (r === "last") i.reverse();
|
|
819
|
+
else if (r === "prev" || r === "next") {
|
|
820
|
+
r === "prev" && i.reverse();
|
|
821
|
+
let t = i.indexOf(e.currentTarget);
|
|
822
|
+
i = n.loop.value ? Le(i, t + 1) : i.slice(t + 1);
|
|
823
|
+
}
|
|
824
|
+
P(() => Ie(i));
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return (e, t) => (z(), w(K(c), null, {
|
|
828
|
+
default: q(() => [k(K(d), {
|
|
829
|
+
tabindex: a.value ? 0 : -1,
|
|
830
|
+
"data-orientation": K(n).orientation.value,
|
|
831
|
+
"data-active": e.active ? "" : void 0,
|
|
832
|
+
"data-disabled": e.focusable ? void 0 : "",
|
|
833
|
+
as: e.as,
|
|
834
|
+
"as-child": e.asChild,
|
|
835
|
+
onMousedown: t[0] ||= (t) => {
|
|
836
|
+
e.focusable ? K(n).onItemFocus(i.value) : t.preventDefault();
|
|
837
|
+
},
|
|
838
|
+
onFocus: t[1] ||= (e) => K(n).onItemFocus(i.value),
|
|
839
|
+
onKeydown: l
|
|
840
|
+
}, {
|
|
841
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
842
|
+
_: 3
|
|
843
|
+
}, 8, [
|
|
844
|
+
"tabindex",
|
|
845
|
+
"data-orientation",
|
|
846
|
+
"data-active",
|
|
847
|
+
"data-disabled",
|
|
848
|
+
"as",
|
|
849
|
+
"as-child"
|
|
850
|
+
])]),
|
|
851
|
+
_: 3
|
|
852
|
+
}));
|
|
853
|
+
}
|
|
854
|
+
}), [Qe, $e] = /*#__PURE__*/ o("CheckboxGroupRoot"), et = /* @__PURE__ */ j({
|
|
855
|
+
__name: "CheckboxGroupRoot",
|
|
856
|
+
props: {
|
|
857
|
+
defaultValue: {
|
|
858
|
+
type: Array,
|
|
859
|
+
required: !1
|
|
860
|
+
},
|
|
861
|
+
modelValue: {
|
|
862
|
+
type: Array,
|
|
863
|
+
required: !1
|
|
864
|
+
},
|
|
865
|
+
rovingFocus: {
|
|
866
|
+
type: Boolean,
|
|
867
|
+
required: !1,
|
|
868
|
+
default: !0
|
|
869
|
+
},
|
|
870
|
+
disabled: {
|
|
871
|
+
type: Boolean,
|
|
872
|
+
required: !1
|
|
873
|
+
},
|
|
874
|
+
as: {
|
|
875
|
+
type: null,
|
|
876
|
+
required: !1
|
|
877
|
+
},
|
|
878
|
+
asChild: {
|
|
879
|
+
type: Boolean,
|
|
880
|
+
required: !1
|
|
881
|
+
},
|
|
882
|
+
dir: {
|
|
883
|
+
type: String,
|
|
884
|
+
required: !1
|
|
885
|
+
},
|
|
886
|
+
orientation: {
|
|
887
|
+
type: String,
|
|
888
|
+
required: !1
|
|
889
|
+
},
|
|
890
|
+
loop: {
|
|
891
|
+
type: Boolean,
|
|
892
|
+
required: !1
|
|
893
|
+
},
|
|
894
|
+
name: {
|
|
895
|
+
type: String,
|
|
896
|
+
required: !1
|
|
897
|
+
},
|
|
898
|
+
required: {
|
|
899
|
+
type: Boolean,
|
|
900
|
+
required: !1
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
emits: ["update:modelValue"],
|
|
904
|
+
setup(e, { emit: t }) {
|
|
905
|
+
let n = e, r = t, { disabled: i, rovingFocus: a, dir: o } = G(n), s = f(o), { primitiveElement: c, currentElement: l } = g(), u = b(l), p = Z(n, "modelValue", r, {
|
|
906
|
+
defaultValue: n.defaultValue ?? [],
|
|
907
|
+
passive: n.modelValue === void 0
|
|
908
|
+
}), m = C(() => a.value ? {
|
|
909
|
+
loop: n.loop,
|
|
910
|
+
dir: s.value,
|
|
911
|
+
orientation: n.orientation
|
|
912
|
+
} : {});
|
|
913
|
+
return $e({
|
|
914
|
+
modelValue: p,
|
|
915
|
+
rovingFocus: a,
|
|
916
|
+
disabled: i
|
|
917
|
+
}), (e, t) => (z(), w(U(K(a) ? K(Xe) : K(d)), N({
|
|
918
|
+
ref_key: "primitiveElement",
|
|
919
|
+
ref: c,
|
|
920
|
+
as: e.as,
|
|
921
|
+
"as-child": e.asChild
|
|
922
|
+
}, m.value), {
|
|
923
|
+
default: q(() => [H(e.$slots, "default"), K(u) && e.name ? (z(), w(K(x), {
|
|
924
|
+
key: 0,
|
|
925
|
+
name: e.name,
|
|
926
|
+
value: K(p),
|
|
927
|
+
required: e.required
|
|
928
|
+
}, null, 8, [
|
|
929
|
+
"name",
|
|
930
|
+
"value",
|
|
931
|
+
"required"
|
|
932
|
+
])) : T("v-if", !0)]),
|
|
933
|
+
_: 3
|
|
934
|
+
}, 16, ["as", "as-child"]));
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
//#endregion
|
|
938
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/Checkbox/utils.js
|
|
939
|
+
function tt(e) {
|
|
940
|
+
return e === "indeterminate";
|
|
941
|
+
}
|
|
942
|
+
function nt(e) {
|
|
943
|
+
return tt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
944
|
+
}
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/Checkbox/CheckboxRoot.js
|
|
947
|
+
var [rt, it] = /*#__PURE__*/ o("CheckboxRoot"), at = /* @__PURE__ */ j({
|
|
948
|
+
inheritAttrs: !1,
|
|
949
|
+
__name: "CheckboxRoot",
|
|
950
|
+
props: {
|
|
951
|
+
defaultValue: {
|
|
952
|
+
type: null,
|
|
953
|
+
required: !1
|
|
954
|
+
},
|
|
955
|
+
modelValue: {
|
|
956
|
+
type: null,
|
|
957
|
+
required: !1,
|
|
958
|
+
default: void 0
|
|
959
|
+
},
|
|
960
|
+
disabled: {
|
|
961
|
+
type: Boolean,
|
|
962
|
+
required: !1
|
|
963
|
+
},
|
|
964
|
+
value: {
|
|
965
|
+
type: null,
|
|
966
|
+
required: !1,
|
|
967
|
+
default: "on"
|
|
968
|
+
},
|
|
969
|
+
id: {
|
|
970
|
+
type: String,
|
|
971
|
+
required: !1
|
|
972
|
+
},
|
|
973
|
+
trueValue: {
|
|
974
|
+
type: null,
|
|
975
|
+
required: !1,
|
|
976
|
+
default: () => !0
|
|
977
|
+
},
|
|
978
|
+
falseValue: {
|
|
979
|
+
type: null,
|
|
980
|
+
required: !1,
|
|
981
|
+
default: () => !1
|
|
982
|
+
},
|
|
983
|
+
asChild: {
|
|
984
|
+
type: Boolean,
|
|
985
|
+
required: !1
|
|
986
|
+
},
|
|
987
|
+
as: {
|
|
988
|
+
type: null,
|
|
989
|
+
required: !1,
|
|
990
|
+
default: "button"
|
|
991
|
+
},
|
|
992
|
+
name: {
|
|
993
|
+
type: String,
|
|
994
|
+
required: !1
|
|
995
|
+
},
|
|
996
|
+
required: {
|
|
997
|
+
type: Boolean,
|
|
998
|
+
required: !1
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
emits: ["update:modelValue"],
|
|
1002
|
+
setup(e, { emit: n }) {
|
|
1003
|
+
let i = e, a = n, { forwardRef: o, currentElement: s } = r(), c = Qe(null), l = Z(i, "modelValue", a, {
|
|
1004
|
+
defaultValue: i.defaultValue ?? i.falseValue,
|
|
1005
|
+
passive: i.modelValue === void 0
|
|
1006
|
+
}), u = C(() => c?.disabled.value || i.disabled), f = C(() => Q(l.value, i.trueValue)), p = C(() => t(c?.modelValue.value) ? l.value === "indeterminate" ? "indeterminate" : f.value : be(c.modelValue.value, i.value));
|
|
1007
|
+
function m() {
|
|
1008
|
+
if (t(c?.modelValue.value)) l.value === "indeterminate" ? l.value = i.trueValue : l.value = f.value ? i.falseValue : i.trueValue;
|
|
1009
|
+
else {
|
|
1010
|
+
let e = [...c.modelValue.value || []];
|
|
1011
|
+
if (be(e, i.value)) {
|
|
1012
|
+
let t = e.findIndex((e) => Q(e, i.value));
|
|
1013
|
+
e.splice(t, 1);
|
|
1014
|
+
} else e.push(i.value);
|
|
1015
|
+
c.modelValue.value = e;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
let h = b(s), g = xe(), _ = oe(), v = C(() => {
|
|
1019
|
+
if (!_["aria-label"]) return i.id && s.value ? document.querySelector(`[for="${i.id}"]`)?.innerText : void 0;
|
|
1020
|
+
});
|
|
1021
|
+
return it({
|
|
1022
|
+
disabled: u,
|
|
1023
|
+
state: p
|
|
1024
|
+
}), (e, t) => (z(), E(S, null, [(z(), w(U(K(c)?.rovingFocus.value ? K(Ze) : K(d)), N({
|
|
1025
|
+
...e.$attrs,
|
|
1026
|
+
...K(g)
|
|
1027
|
+
}, {
|
|
1028
|
+
id: e.id,
|
|
1029
|
+
ref: K(o),
|
|
1030
|
+
role: "checkbox",
|
|
1031
|
+
"as-child": e.asChild,
|
|
1032
|
+
as: e.as,
|
|
1033
|
+
type: e.as === "button" ? "button" : void 0,
|
|
1034
|
+
"aria-checked": K(tt)(p.value) ? "mixed" : p.value,
|
|
1035
|
+
"aria-required": e.required,
|
|
1036
|
+
"aria-label": e.$attrs["aria-label"] || v.value,
|
|
1037
|
+
"data-state": K(nt)(p.value),
|
|
1038
|
+
"data-disabled": u.value ? "" : void 0,
|
|
1039
|
+
disabled: u.value,
|
|
1040
|
+
focusable: K(c)?.rovingFocus.value ? !u.value : void 0,
|
|
1041
|
+
onKeydown: Y(X(() => {}, ["prevent"]), ["enter"]),
|
|
1042
|
+
onClick: m
|
|
1043
|
+
}), {
|
|
1044
|
+
default: q(() => [H(e.$slots, "default", {
|
|
1045
|
+
modelValue: K(l),
|
|
1046
|
+
state: p.value
|
|
1047
|
+
})]),
|
|
1048
|
+
_: 3
|
|
1049
|
+
}, 16, [
|
|
1050
|
+
"id",
|
|
1051
|
+
"as-child",
|
|
1052
|
+
"as",
|
|
1053
|
+
"type",
|
|
1054
|
+
"aria-checked",
|
|
1055
|
+
"aria-required",
|
|
1056
|
+
"aria-label",
|
|
1057
|
+
"data-state",
|
|
1058
|
+
"data-disabled",
|
|
1059
|
+
"disabled",
|
|
1060
|
+
"focusable",
|
|
1061
|
+
"onKeydown"
|
|
1062
|
+
])), K(h) && e.name && !K(c) ? (z(), w(K(x), N({
|
|
1063
|
+
key: 0,
|
|
1064
|
+
type: "checkbox",
|
|
1065
|
+
checked: !!p.value,
|
|
1066
|
+
name: e.name,
|
|
1067
|
+
value: e.value,
|
|
1068
|
+
disabled: u.value,
|
|
1069
|
+
required: e.required
|
|
1070
|
+
}, K(g)), null, 16, [
|
|
1071
|
+
"checked",
|
|
1072
|
+
"name",
|
|
1073
|
+
"value",
|
|
1074
|
+
"disabled",
|
|
1075
|
+
"required"
|
|
1076
|
+
])) : T("v-if", !0)], 64));
|
|
1077
|
+
}
|
|
1078
|
+
}), ot = /* @__PURE__ */ j({
|
|
1079
|
+
__name: "PopoverAnchor",
|
|
1080
|
+
props: {
|
|
1081
|
+
reference: {
|
|
1082
|
+
type: null,
|
|
1083
|
+
required: !1
|
|
1084
|
+
},
|
|
1085
|
+
asChild: {
|
|
1086
|
+
type: Boolean,
|
|
1087
|
+
required: !1
|
|
1088
|
+
},
|
|
1089
|
+
as: {
|
|
1090
|
+
type: null,
|
|
1091
|
+
required: !1
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
setup(e) {
|
|
1095
|
+
let t = e;
|
|
1096
|
+
r();
|
|
1097
|
+
let n = p();
|
|
1098
|
+
return re(() => {
|
|
1099
|
+
n.hasCustomAnchor.value = !0;
|
|
1100
|
+
}), R(() => {
|
|
1101
|
+
n.hasCustomAnchor.value = !1;
|
|
1102
|
+
}), (e, n) => (z(), w(K(i), I(M(t)), {
|
|
1103
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
1104
|
+
_: 3
|
|
1105
|
+
}, 16));
|
|
1106
|
+
}
|
|
1107
|
+
}), st = /* @__PURE__ */ j({
|
|
1108
|
+
__name: "Label",
|
|
1109
|
+
props: {
|
|
1110
|
+
for: {
|
|
1111
|
+
type: String,
|
|
1112
|
+
required: !1
|
|
1113
|
+
},
|
|
1114
|
+
asChild: {
|
|
1115
|
+
type: Boolean,
|
|
1116
|
+
required: !1
|
|
1117
|
+
},
|
|
1118
|
+
as: {
|
|
1119
|
+
type: null,
|
|
1120
|
+
required: !1,
|
|
1121
|
+
default: "label"
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
setup(e) {
|
|
1125
|
+
let t = e;
|
|
1126
|
+
return r(), (e, n) => (z(), w(K(d), N(t, { onMousedown: n[0] ||= (e) => {
|
|
1127
|
+
!e.defaultPrevented && e.detail > 1 && e.preventDefault();
|
|
1128
|
+
} }), {
|
|
1129
|
+
default: q(() => [H(e.$slots, "default")]),
|
|
1130
|
+
_: 3
|
|
1131
|
+
}, 16));
|
|
1132
|
+
}
|
|
1133
|
+
}), ct = "radio.select";
|
|
1134
|
+
function lt(e, t, r) {
|
|
1135
|
+
n(ct, r, {
|
|
1136
|
+
originalEvent: e,
|
|
1137
|
+
value: t
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
//#endregion
|
|
1141
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.5.43_typescript@6.0.3_/node_modules/reka-ui/dist/RadioGroup/Radio.js
|
|
1142
|
+
var ut = /* @__PURE__ */ j({
|
|
1143
|
+
inheritAttrs: !1,
|
|
1144
|
+
__name: "Radio",
|
|
1145
|
+
props: {
|
|
1146
|
+
id: {
|
|
1147
|
+
type: String,
|
|
1148
|
+
required: !1
|
|
1149
|
+
},
|
|
1150
|
+
value: {
|
|
1151
|
+
type: null,
|
|
1152
|
+
required: !1
|
|
1153
|
+
},
|
|
1154
|
+
disabled: {
|
|
1155
|
+
type: Boolean,
|
|
1156
|
+
required: !1,
|
|
1157
|
+
default: !1
|
|
1158
|
+
},
|
|
1159
|
+
checked: {
|
|
1160
|
+
type: Boolean,
|
|
1161
|
+
required: !1,
|
|
1162
|
+
default: void 0
|
|
1163
|
+
},
|
|
1164
|
+
asChild: {
|
|
1165
|
+
type: Boolean,
|
|
1166
|
+
required: !1
|
|
1167
|
+
},
|
|
1168
|
+
as: {
|
|
1169
|
+
type: null,
|
|
1170
|
+
required: !1,
|
|
1171
|
+
default: "button"
|
|
1172
|
+
},
|
|
1173
|
+
name: {
|
|
1174
|
+
type: String,
|
|
1175
|
+
required: !1
|
|
1176
|
+
},
|
|
1177
|
+
required: {
|
|
1178
|
+
type: Boolean,
|
|
1179
|
+
required: !1
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
emits: ["update:checked", "select"],
|
|
1183
|
+
setup(e, { emit: t }) {
|
|
1184
|
+
let n = e, i = t, a = Z(n, "checked", i, { passive: n.checked === void 0 }), { value: o } = G(n), { forwardRef: s, currentElement: c } = r(), l = b(c), u = xe(), f = C(() => n.id && c.value ? document.querySelector(`[for="${n.id}"]`)?.innerText : void 0);
|
|
1185
|
+
function p(e) {
|
|
1186
|
+
n.disabled || lt(e, n.value, (e) => {
|
|
1187
|
+
i("select", e), !e?.defaultPrevented && (a.value = !0, l.value && e.stopPropagation());
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
return (e, t) => (z(), E(S, null, [k(K(d), N({
|
|
1191
|
+
id: e.id,
|
|
1192
|
+
ref: K(s),
|
|
1193
|
+
role: "radio",
|
|
1194
|
+
type: e.as === "button" ? "button" : void 0,
|
|
1195
|
+
as: e.as,
|
|
1196
|
+
"aria-checked": K(a) ?? !1,
|
|
1197
|
+
"aria-label": f.value,
|
|
1198
|
+
"as-child": e.asChild,
|
|
1199
|
+
disabled: e.disabled ? "" : void 0,
|
|
1200
|
+
"data-state": K(a) ? "checked" : "unchecked",
|
|
1201
|
+
"data-disabled": e.disabled ? "" : void 0,
|
|
1202
|
+
value: K(o),
|
|
1203
|
+
required: e.required,
|
|
1204
|
+
name: e.name
|
|
1205
|
+
}, {
|
|
1206
|
+
...K(u),
|
|
1207
|
+
...e.$attrs
|
|
1208
|
+
}, { onClick: X(p, ["stop"]) }), {
|
|
1209
|
+
default: q(() => [H(e.$slots, "default", { checked: K(a) })]),
|
|
1210
|
+
_: 3
|
|
1211
|
+
}, 16, [
|
|
1212
|
+
"id",
|
|
1213
|
+
"type",
|
|
1214
|
+
"as",
|
|
1215
|
+
"aria-checked",
|
|
1216
|
+
"aria-label",
|
|
1217
|
+
"as-child",
|
|
1218
|
+
"disabled",
|
|
1219
|
+
"data-state",
|
|
1220
|
+
"data-disabled",
|
|
1221
|
+
"value",
|
|
1222
|
+
"required",
|
|
1223
|
+
"name"
|
|
1224
|
+
]), K(l) && e.name ? (z(), w(K(x), N({
|
|
1225
|
+
key: 0,
|
|
1226
|
+
type: "radio",
|
|
1227
|
+
tabindex: "-1",
|
|
1228
|
+
value: K(o),
|
|
1229
|
+
checked: !!K(a),
|
|
1230
|
+
name: e.name,
|
|
1231
|
+
disabled: e.disabled,
|
|
1232
|
+
required: e.required
|
|
1233
|
+
}, K(u)), null, 16, [
|
|
1234
|
+
"value",
|
|
1235
|
+
"checked",
|
|
1236
|
+
"name",
|
|
1237
|
+
"disabled",
|
|
1238
|
+
"required"
|
|
1239
|
+
])) : T("v-if", !0)], 64));
|
|
1240
|
+
}
|
|
1241
|
+
}), [dt, ft] = /*#__PURE__*/ o("RadioGroupRoot"), pt = /* @__PURE__ */ j({
|
|
1242
|
+
__name: "RadioGroupRoot",
|
|
1243
|
+
props: {
|
|
1244
|
+
modelValue: {
|
|
1245
|
+
type: null,
|
|
1246
|
+
required: !1
|
|
1247
|
+
},
|
|
1248
|
+
defaultValue: {
|
|
1249
|
+
type: null,
|
|
1250
|
+
required: !1
|
|
1251
|
+
},
|
|
1252
|
+
disabled: {
|
|
1253
|
+
type: Boolean,
|
|
1254
|
+
required: !1,
|
|
1255
|
+
default: !1
|
|
1256
|
+
},
|
|
1257
|
+
orientation: {
|
|
1258
|
+
type: String,
|
|
1259
|
+
required: !1,
|
|
1260
|
+
default: void 0
|
|
1261
|
+
},
|
|
1262
|
+
dir: {
|
|
1263
|
+
type: String,
|
|
1264
|
+
required: !1
|
|
1265
|
+
},
|
|
1266
|
+
loop: {
|
|
1267
|
+
type: Boolean,
|
|
1268
|
+
required: !1,
|
|
1269
|
+
default: !0
|
|
1270
|
+
},
|
|
1271
|
+
asChild: {
|
|
1272
|
+
type: Boolean,
|
|
1273
|
+
required: !1
|
|
1274
|
+
},
|
|
1275
|
+
as: {
|
|
1276
|
+
type: null,
|
|
1277
|
+
required: !1
|
|
1278
|
+
},
|
|
1279
|
+
name: {
|
|
1280
|
+
type: String,
|
|
1281
|
+
required: !1
|
|
1282
|
+
},
|
|
1283
|
+
required: {
|
|
1284
|
+
type: Boolean,
|
|
1285
|
+
required: !1,
|
|
1286
|
+
default: !1
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
emits: ["update:modelValue"],
|
|
1290
|
+
setup(e, { emit: t }) {
|
|
1291
|
+
let n = e, i = t, { forwardRef: a, currentElement: o } = r(), s = Z(n, "modelValue", i, {
|
|
1292
|
+
defaultValue: n.defaultValue,
|
|
1293
|
+
passive: n.modelValue === void 0
|
|
1294
|
+
}), { disabled: c, loop: l, orientation: u, name: p, required: m, dir: h } = G(n), g = f(h), _ = b(o);
|
|
1295
|
+
return ft({
|
|
1296
|
+
modelValue: s,
|
|
1297
|
+
changeModelValue: (e) => {
|
|
1298
|
+
s.value = e;
|
|
1299
|
+
},
|
|
1300
|
+
disabled: c,
|
|
1301
|
+
loop: l,
|
|
1302
|
+
orientation: u,
|
|
1303
|
+
name: p?.value,
|
|
1304
|
+
required: m
|
|
1305
|
+
}), (e, t) => (z(), w(K(Xe), {
|
|
1306
|
+
"as-child": "",
|
|
1307
|
+
orientation: K(u),
|
|
1308
|
+
dir: K(g),
|
|
1309
|
+
loop: K(l)
|
|
1310
|
+
}, {
|
|
1311
|
+
default: q(() => [k(K(d), {
|
|
1312
|
+
ref: K(a),
|
|
1313
|
+
role: "radiogroup",
|
|
1314
|
+
"data-disabled": K(c) ? "" : void 0,
|
|
1315
|
+
"as-child": e.asChild,
|
|
1316
|
+
as: e.as,
|
|
1317
|
+
"aria-orientation": K(u),
|
|
1318
|
+
"aria-required": K(m),
|
|
1319
|
+
dir: K(g)
|
|
1320
|
+
}, {
|
|
1321
|
+
default: q(() => [H(e.$slots, "default", { modelValue: K(s) }), K(_) && K(p) ? (z(), w(K(x), {
|
|
1322
|
+
key: 0,
|
|
1323
|
+
required: K(m),
|
|
1324
|
+
disabled: K(c),
|
|
1325
|
+
value: K(s),
|
|
1326
|
+
name: K(p)
|
|
1327
|
+
}, null, 8, [
|
|
1328
|
+
"required",
|
|
1329
|
+
"disabled",
|
|
1330
|
+
"value",
|
|
1331
|
+
"name"
|
|
1332
|
+
])) : T("v-if", !0)]),
|
|
1333
|
+
_: 3
|
|
1334
|
+
}, 8, [
|
|
1335
|
+
"data-disabled",
|
|
1336
|
+
"as-child",
|
|
1337
|
+
"as",
|
|
1338
|
+
"aria-orientation",
|
|
1339
|
+
"aria-required",
|
|
1340
|
+
"dir"
|
|
1341
|
+
])]),
|
|
1342
|
+
_: 3
|
|
1343
|
+
}, 8, [
|
|
1344
|
+
"orientation",
|
|
1345
|
+
"dir",
|
|
1346
|
+
"loop"
|
|
1347
|
+
]));
|
|
1348
|
+
}
|
|
1349
|
+
}), [mt, ht] = /*#__PURE__*/ o("RadioGroupItem"), gt = /* @__PURE__ */ j({
|
|
1350
|
+
inheritAttrs: !1,
|
|
1351
|
+
__name: "RadioGroupItem",
|
|
1352
|
+
props: {
|
|
1353
|
+
id: {
|
|
1354
|
+
type: String,
|
|
1355
|
+
required: !1
|
|
1356
|
+
},
|
|
1357
|
+
value: {
|
|
1358
|
+
type: null,
|
|
1359
|
+
required: !1
|
|
1360
|
+
},
|
|
1361
|
+
disabled: {
|
|
1362
|
+
type: Boolean,
|
|
1363
|
+
required: !1,
|
|
1364
|
+
default: !1
|
|
1365
|
+
},
|
|
1366
|
+
asChild: {
|
|
1367
|
+
type: Boolean,
|
|
1368
|
+
required: !1
|
|
1369
|
+
},
|
|
1370
|
+
as: {
|
|
1371
|
+
type: null,
|
|
1372
|
+
required: !1,
|
|
1373
|
+
default: "button"
|
|
1374
|
+
},
|
|
1375
|
+
name: {
|
|
1376
|
+
type: String,
|
|
1377
|
+
required: !1
|
|
1378
|
+
},
|
|
1379
|
+
required: {
|
|
1380
|
+
type: Boolean,
|
|
1381
|
+
required: !1
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
emits: ["select"],
|
|
1385
|
+
setup(e, { emit: t }) {
|
|
1386
|
+
let n = e, i = t, { forwardRef: a, currentElement: o } = r(), s = dt(), c = C(() => s.disabled.value || n.disabled), l = C(() => s.required.value || n.required), u = C(() => Q(s.modelValue?.value, n.value));
|
|
1387
|
+
ht({
|
|
1388
|
+
disabled: c,
|
|
1389
|
+
checked: u
|
|
1390
|
+
});
|
|
1391
|
+
let d = B(!1), f = [
|
|
1392
|
+
"ArrowUp",
|
|
1393
|
+
"ArrowDown",
|
|
1394
|
+
"ArrowLeft",
|
|
1395
|
+
"ArrowRight"
|
|
1396
|
+
];
|
|
1397
|
+
fe("keydown", (e) => {
|
|
1398
|
+
f.includes(e.key) && (d.value = !0);
|
|
1399
|
+
}), fe("keyup", () => {
|
|
1400
|
+
d.value = !1;
|
|
1401
|
+
});
|
|
1402
|
+
function p() {
|
|
1403
|
+
setTimeout(() => {
|
|
1404
|
+
d.value && o.value?.click();
|
|
1405
|
+
}, 0);
|
|
1406
|
+
}
|
|
1407
|
+
let m = xe();
|
|
1408
|
+
return (e, t) => (z(), w(K(Ze), {
|
|
1409
|
+
checked: u.value,
|
|
1410
|
+
disabled: c.value,
|
|
1411
|
+
"as-child": "",
|
|
1412
|
+
focusable: !c.value,
|
|
1413
|
+
active: u.value
|
|
1414
|
+
}, {
|
|
1415
|
+
default: q(() => [k(ut, N({
|
|
1416
|
+
...K(m),
|
|
1417
|
+
...e.$attrs,
|
|
1418
|
+
...n
|
|
1419
|
+
}, {
|
|
1420
|
+
ref: K(a),
|
|
1421
|
+
checked: u.value,
|
|
1422
|
+
required: l.value,
|
|
1423
|
+
disabled: c.value,
|
|
1424
|
+
"onUpdate:checked": t[0] ||= (t) => K(s).changeModelValue(e.value),
|
|
1425
|
+
onSelect: t[1] ||= (e) => i("select", e),
|
|
1426
|
+
onKeydown: t[2] ||= Y(X(() => {}, ["prevent"]), ["enter"]),
|
|
1427
|
+
onFocus: p
|
|
1428
|
+
}), {
|
|
1429
|
+
default: q(() => [H(e.$slots, "default", {
|
|
1430
|
+
checked: u.value,
|
|
1431
|
+
required: l.value,
|
|
1432
|
+
disabled: c.value
|
|
1433
|
+
})]),
|
|
1434
|
+
_: 3
|
|
1435
|
+
}, 16, [
|
|
1436
|
+
"checked",
|
|
1437
|
+
"required",
|
|
1438
|
+
"disabled"
|
|
1439
|
+
])]),
|
|
1440
|
+
_: 3
|
|
1441
|
+
}, 8, [
|
|
1442
|
+
"checked",
|
|
1443
|
+
"disabled",
|
|
1444
|
+
"focusable",
|
|
1445
|
+
"active"
|
|
1446
|
+
]));
|
|
1447
|
+
}
|
|
1448
|
+
}), [_t, vt] = /*#__PURE__*/ o("ToggleGroupRoot"), yt = /* @__PURE__ */ j({
|
|
1449
|
+
__name: "ToggleGroupRoot",
|
|
1450
|
+
props: {
|
|
1451
|
+
rovingFocus: {
|
|
1452
|
+
type: Boolean,
|
|
1453
|
+
required: !1,
|
|
1454
|
+
default: !0
|
|
1455
|
+
},
|
|
1456
|
+
disabled: {
|
|
1457
|
+
type: Boolean,
|
|
1458
|
+
required: !1,
|
|
1459
|
+
default: !1
|
|
1460
|
+
},
|
|
1461
|
+
orientation: {
|
|
1462
|
+
type: String,
|
|
1463
|
+
required: !1
|
|
1464
|
+
},
|
|
1465
|
+
dir: {
|
|
1466
|
+
type: String,
|
|
1467
|
+
required: !1
|
|
1468
|
+
},
|
|
1469
|
+
loop: {
|
|
1470
|
+
type: Boolean,
|
|
1471
|
+
required: !1,
|
|
1472
|
+
default: !0
|
|
1473
|
+
},
|
|
1474
|
+
asChild: {
|
|
1475
|
+
type: Boolean,
|
|
1476
|
+
required: !1
|
|
1477
|
+
},
|
|
1478
|
+
as: {
|
|
1479
|
+
type: null,
|
|
1480
|
+
required: !1
|
|
1481
|
+
},
|
|
1482
|
+
name: {
|
|
1483
|
+
type: String,
|
|
1484
|
+
required: !1
|
|
1485
|
+
},
|
|
1486
|
+
required: {
|
|
1487
|
+
type: Boolean,
|
|
1488
|
+
required: !1
|
|
1489
|
+
},
|
|
1490
|
+
type: {
|
|
1491
|
+
type: String,
|
|
1492
|
+
required: !1
|
|
1493
|
+
},
|
|
1494
|
+
modelValue: {
|
|
1495
|
+
type: null,
|
|
1496
|
+
required: !1
|
|
1497
|
+
},
|
|
1498
|
+
defaultValue: {
|
|
1499
|
+
type: null,
|
|
1500
|
+
required: !1
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
emits: ["update:modelValue"],
|
|
1504
|
+
setup(e, { emit: t }) {
|
|
1505
|
+
let n = e, i = t, { loop: a, rovingFocus: o, disabled: s, dir: c } = G(n), l = f(c), { forwardRef: u, currentElement: p } = r(), { modelValue: m, changeModelValue: h, isSingle: g } = Oe(n, i), _ = b(p);
|
|
1506
|
+
return vt({
|
|
1507
|
+
isSingle: g,
|
|
1508
|
+
modelValue: m,
|
|
1509
|
+
changeModelValue: h,
|
|
1510
|
+
dir: l,
|
|
1511
|
+
orientation: n.orientation,
|
|
1512
|
+
loop: a,
|
|
1513
|
+
rovingFocus: o,
|
|
1514
|
+
disabled: s
|
|
1515
|
+
}), (e, t) => (z(), w(U(K(o) ? K(Xe) : K(d)), {
|
|
1516
|
+
"as-child": "",
|
|
1517
|
+
orientation: K(o) ? e.orientation : void 0,
|
|
1518
|
+
dir: K(l),
|
|
1519
|
+
loop: K(o) ? K(a) : void 0
|
|
1520
|
+
}, {
|
|
1521
|
+
default: q(() => [k(K(d), {
|
|
1522
|
+
ref: K(u),
|
|
1523
|
+
role: "group",
|
|
1524
|
+
"as-child": e.asChild,
|
|
1525
|
+
as: e.as
|
|
1526
|
+
}, {
|
|
1527
|
+
default: q(() => [H(e.$slots, "default", { modelValue: K(m) }), K(_) && e.name ? (z(), w(x, {
|
|
1528
|
+
key: 0,
|
|
1529
|
+
name: e.name,
|
|
1530
|
+
required: e.required,
|
|
1531
|
+
value: K(m)
|
|
1532
|
+
}, null, 8, [
|
|
1533
|
+
"name",
|
|
1534
|
+
"required",
|
|
1535
|
+
"value"
|
|
1536
|
+
])) : T("v-if", !0)]),
|
|
1537
|
+
_: 3
|
|
1538
|
+
}, 8, ["as-child", "as"])]),
|
|
1539
|
+
_: 3
|
|
1540
|
+
}, 8, [
|
|
1541
|
+
"orientation",
|
|
1542
|
+
"dir",
|
|
1543
|
+
"loop"
|
|
1544
|
+
]));
|
|
1545
|
+
}
|
|
1546
|
+
}), bt = /* @__PURE__ */ j({
|
|
1547
|
+
inheritAttrs: !1,
|
|
1548
|
+
__name: "Toggle",
|
|
1549
|
+
props: {
|
|
1550
|
+
defaultValue: {
|
|
1551
|
+
type: Boolean,
|
|
1552
|
+
required: !1
|
|
1553
|
+
},
|
|
1554
|
+
modelValue: {
|
|
1555
|
+
type: [Boolean, null],
|
|
1556
|
+
required: !1,
|
|
1557
|
+
default: void 0
|
|
1558
|
+
},
|
|
1559
|
+
disabled: {
|
|
1560
|
+
type: Boolean,
|
|
1561
|
+
required: !1,
|
|
1562
|
+
default: !1
|
|
1563
|
+
},
|
|
1564
|
+
asChild: {
|
|
1565
|
+
type: Boolean,
|
|
1566
|
+
required: !1
|
|
1567
|
+
},
|
|
1568
|
+
as: {
|
|
1569
|
+
type: null,
|
|
1570
|
+
required: !1,
|
|
1571
|
+
default: "button"
|
|
1572
|
+
},
|
|
1573
|
+
name: {
|
|
1574
|
+
type: String,
|
|
1575
|
+
required: !1
|
|
1576
|
+
},
|
|
1577
|
+
required: {
|
|
1578
|
+
type: Boolean,
|
|
1579
|
+
required: !1
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
emits: ["update:modelValue"],
|
|
1583
|
+
setup(e, { emit: t }) {
|
|
1584
|
+
let n = e, i = t, { forwardRef: a, currentElement: o } = r(), s = xe(), c = _t(null), l = Z(n, "modelValue", i, {
|
|
1585
|
+
defaultValue: n.defaultValue,
|
|
1586
|
+
passive: n.modelValue === void 0
|
|
1587
|
+
});
|
|
1588
|
+
function u() {
|
|
1589
|
+
l.value = !l.value;
|
|
1590
|
+
}
|
|
1591
|
+
let f = C(() => l.value ? "on" : "off"), p = b(o);
|
|
1592
|
+
return (e, t) => (z(), E(S, null, [k(K(d), N({
|
|
1593
|
+
ref: K(a),
|
|
1594
|
+
type: e.as === "button" ? "button" : void 0,
|
|
1595
|
+
"as-child": n.asChild,
|
|
1596
|
+
as: e.as,
|
|
1597
|
+
"aria-pressed": K(l),
|
|
1598
|
+
"data-state": f.value,
|
|
1599
|
+
"data-disabled": e.disabled ? "" : void 0,
|
|
1600
|
+
disabled: e.disabled
|
|
1601
|
+
}, {
|
|
1602
|
+
...K(s),
|
|
1603
|
+
...e.$attrs
|
|
1604
|
+
}, { onClick: u }), {
|
|
1605
|
+
default: q(() => [H(e.$slots, "default", {
|
|
1606
|
+
modelValue: K(l),
|
|
1607
|
+
disabled: e.disabled,
|
|
1608
|
+
pressed: K(l),
|
|
1609
|
+
state: f.value
|
|
1610
|
+
})]),
|
|
1611
|
+
_: 3
|
|
1612
|
+
}, 16, [
|
|
1613
|
+
"type",
|
|
1614
|
+
"as-child",
|
|
1615
|
+
"as",
|
|
1616
|
+
"aria-pressed",
|
|
1617
|
+
"data-state",
|
|
1618
|
+
"data-disabled",
|
|
1619
|
+
"disabled"
|
|
1620
|
+
]), K(p) && e.name && !K(c) ? (z(), w(x, N({
|
|
1621
|
+
key: 0,
|
|
1622
|
+
type: "checkbox",
|
|
1623
|
+
name: e.name,
|
|
1624
|
+
value: K(l),
|
|
1625
|
+
required: e.required
|
|
1626
|
+
}, K(s)), null, 16, [
|
|
1627
|
+
"name",
|
|
1628
|
+
"value",
|
|
1629
|
+
"required"
|
|
1630
|
+
])) : T("v-if", !0)], 64));
|
|
1631
|
+
}
|
|
1632
|
+
}), xt = /* @__PURE__ */ j({
|
|
1633
|
+
__name: "ToggleGroupItem",
|
|
1634
|
+
props: {
|
|
1635
|
+
value: {
|
|
1636
|
+
type: null,
|
|
1637
|
+
required: !0
|
|
1638
|
+
},
|
|
1639
|
+
disabled: {
|
|
1640
|
+
type: Boolean,
|
|
1641
|
+
required: !1
|
|
1642
|
+
},
|
|
1643
|
+
asChild: {
|
|
1644
|
+
type: Boolean,
|
|
1645
|
+
required: !1
|
|
1646
|
+
},
|
|
1647
|
+
as: {
|
|
1648
|
+
type: null,
|
|
1649
|
+
required: !1,
|
|
1650
|
+
default: "button"
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
setup(e) {
|
|
1654
|
+
let t = e, n = _t(), i = C(() => n.disabled?.value || t.disabled), a = C(() => be(n.modelValue.value, t.value)), { forwardRef: o } = r(), s = xe();
|
|
1655
|
+
return (e, r) => (z(), w(U(K(n).rovingFocus.value ? K(Ze) : K(d)), N({ "as-child": "" }, K(n).rovingFocus.value ? {
|
|
1656
|
+
focusable: !i.value,
|
|
1657
|
+
active: a.value
|
|
1658
|
+
} : {}), {
|
|
1659
|
+
default: q(() => [k(K(bt), N({
|
|
1660
|
+
...K(s),
|
|
1661
|
+
...t
|
|
1662
|
+
}, {
|
|
1663
|
+
ref: K(o),
|
|
1664
|
+
disabled: i.value,
|
|
1665
|
+
"model-value": a.value,
|
|
1666
|
+
"onUpdate:modelValue": r[0] ||= (t) => K(n).changeModelValue(e.value)
|
|
1667
|
+
}), {
|
|
1668
|
+
default: q((t) => [H(e.$slots, "default", I(M(t)))]),
|
|
1669
|
+
_: 3
|
|
1670
|
+
}, 16, ["disabled", "model-value"])]),
|
|
1671
|
+
_: 3
|
|
1672
|
+
}, 16));
|
|
1673
|
+
}
|
|
1674
|
+
}), St = /* @__PURE__ */ j({
|
|
20
1675
|
name: "HstButtonGroup",
|
|
21
1676
|
props: {
|
|
22
1677
|
title: {},
|
|
@@ -24,43 +1679,81 @@ var k = /* @__PURE__ */ u({
|
|
|
24
1679
|
options: {}
|
|
25
1680
|
},
|
|
26
1681
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
1682
|
+
setup(e, { emit: t }) {
|
|
1683
|
+
let n = e, r = t, i = C(() => Array.isArray(n.options) ? n.options.map((e) => typeof e == "string" || typeof e == "number" ? {
|
|
29
1684
|
value: e,
|
|
30
1685
|
label: String(e)
|
|
31
|
-
} : e) : Object.
|
|
1686
|
+
} : e) : Object.entries(n.options).map(([e, t]) => ({
|
|
32
1687
|
value: e,
|
|
33
|
-
label:
|
|
1688
|
+
label: String(t)
|
|
34
1689
|
})));
|
|
35
|
-
function
|
|
36
|
-
|
|
1690
|
+
function a(e) {
|
|
1691
|
+
e != null && r("update:modelValue", e);
|
|
37
1692
|
}
|
|
38
|
-
return (
|
|
1693
|
+
return (t, n) => (z(), w(u, {
|
|
39
1694
|
tag: "div",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class: "poveste-button-group flex-nowrap items-center"
|
|
1695
|
+
title: e.title,
|
|
1696
|
+
class: "poveste-button-group"
|
|
43
1697
|
}, {
|
|
44
|
-
actions:
|
|
45
|
-
default:
|
|
46
|
-
|
|
47
|
-
class: "
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1698
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
1699
|
+
default: q(() => [k(K(yt), {
|
|
1700
|
+
type: "single",
|
|
1701
|
+
class: "poveste-button-group-options",
|
|
1702
|
+
"data-slot": "options",
|
|
1703
|
+
"model-value": e.modelValue ?? null,
|
|
1704
|
+
"onUpdate:modelValue": a
|
|
51
1705
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
54
|
-
|
|
1706
|
+
default: q(() => [(z(!0), E(S, null, V(i.value, ({ label: e, value: t }) => (z(), w(K(xt), {
|
|
1707
|
+
key: t,
|
|
1708
|
+
"as-child": "",
|
|
1709
|
+
value: t
|
|
1710
|
+
}, {
|
|
1711
|
+
default: q(() => [k(ge, {
|
|
1712
|
+
class: "poveste-button-group-option",
|
|
1713
|
+
"data-slot": "option"
|
|
1714
|
+
}, {
|
|
1715
|
+
default: q(() => [O(W(e), 1)]),
|
|
1716
|
+
_: 2
|
|
1717
|
+
}, 1024)]),
|
|
1718
|
+
_: 2
|
|
1719
|
+
}, 1032, ["value"]))), 128))]),
|
|
1720
|
+
_: 1
|
|
1721
|
+
}, 8, ["model-value"])]),
|
|
55
1722
|
_: 3
|
|
56
1723
|
}, 8, ["title"]));
|
|
57
1724
|
}
|
|
58
|
-
}),
|
|
1725
|
+
}), Ct = {
|
|
1726
|
+
class: "poveste-checkbox-visual",
|
|
1727
|
+
"data-slot": "visual"
|
|
1728
|
+
}, wt = {
|
|
59
1729
|
width: "16",
|
|
60
1730
|
height: "16",
|
|
61
1731
|
viewBox: "0 0 24 24",
|
|
62
|
-
class: "
|
|
63
|
-
|
|
1732
|
+
class: "poveste-checkbox-visual-check",
|
|
1733
|
+
"data-slot": "visual-check"
|
|
1734
|
+
}, Tt = ["stroke-dasharray", "stroke-dashoffset"], Et = /* @__PURE__ */ j({
|
|
1735
|
+
name: "CheckboxVisual",
|
|
1736
|
+
props: { modelValue: { type: Boolean } },
|
|
1737
|
+
setup(e) {
|
|
1738
|
+
let t = e, n = B(), r = B(0), i = C(() => +!!t.modelValue), a = C(() => (1 - i.value) * r.value), o = B(!1);
|
|
1739
|
+
return ce(() => t.modelValue, () => {
|
|
1740
|
+
o.value = !0;
|
|
1741
|
+
}), ce(n, () => {
|
|
1742
|
+
r.value = n.value?.getTotalLength?.() ?? 21.21;
|
|
1743
|
+
}), (e, t) => (z(), E("span", Ct, [t[0] ||= D("span", {
|
|
1744
|
+
class: "poveste-checkbox-visual-box",
|
|
1745
|
+
"data-slot": "visual-box"
|
|
1746
|
+
}, null, -1), (z(), E("svg", wt, [D("path", {
|
|
1747
|
+
ref_key: "path",
|
|
1748
|
+
ref: n,
|
|
1749
|
+
d: "m 4 12 l 5 5 l 10 -10",
|
|
1750
|
+
fill: "none",
|
|
1751
|
+
class: F(o.value ? "poveste-checkbox-visual-animated" : void 0),
|
|
1752
|
+
"stroke-dasharray": r.value,
|
|
1753
|
+
"stroke-dashoffset": a.value
|
|
1754
|
+
}, null, 10, Tt)]))]));
|
|
1755
|
+
}
|
|
1756
|
+
}), Dt = ["data-checked"], Ot = /* @__PURE__ */ j({
|
|
64
1757
|
name: "HstSimpleCheckbox",
|
|
65
1758
|
props: {
|
|
66
1759
|
modelValue: { type: Boolean },
|
|
@@ -68,30 +1761,25 @@ var k = /* @__PURE__ */ u({
|
|
|
68
1761
|
},
|
|
69
1762
|
emits: { "update:modelValue": (e) => !0 },
|
|
70
1763
|
setup(e, { emit: t }) {
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
fill: "none",
|
|
89
|
-
class: f(["stroke-white stroke-2 duration-200 ease-in-out", [p.value ? "transition-all" : "transition-none", { "delay-150": e.modelValue }]]),
|
|
90
|
-
"stroke-dasharray": l.value,
|
|
91
|
-
"stroke-dashoffset": d.value
|
|
92
|
-
}, null, 10, ae)]))], 2));
|
|
1764
|
+
let n = t;
|
|
1765
|
+
return (t, r) => e.withToggle ? (z(), w(K(at), {
|
|
1766
|
+
key: 0,
|
|
1767
|
+
"model-value": e.modelValue ?? !1,
|
|
1768
|
+
class: "poveste-simple-checkbox poveste-simple-checkbox-interactive",
|
|
1769
|
+
"data-slot": "box",
|
|
1770
|
+
"data-checked": e.modelValue ? "" : void 0,
|
|
1771
|
+
"onUpdate:modelValue": r[0] ||= (e) => n("update:modelValue", e === !0)
|
|
1772
|
+
}, {
|
|
1773
|
+
default: q(() => [k(Et, { "model-value": e.modelValue }, null, 8, ["model-value"])]),
|
|
1774
|
+
_: 1
|
|
1775
|
+
}, 8, ["model-value", "data-checked"])) : (z(), E("span", {
|
|
1776
|
+
key: 1,
|
|
1777
|
+
class: "poveste-simple-checkbox",
|
|
1778
|
+
"data-slot": "box",
|
|
1779
|
+
"data-checked": e.modelValue ? "" : void 0
|
|
1780
|
+
}, [k(Et, { "model-value": e.modelValue }, null, 8, ["model-value"])], 8, Dt));
|
|
93
1781
|
}
|
|
94
|
-
}),
|
|
1782
|
+
}), kt = /* @__PURE__ */ j({
|
|
95
1783
|
name: "HstCheckbox",
|
|
96
1784
|
props: {
|
|
97
1785
|
modelValue: { type: [
|
|
@@ -102,36 +1790,32 @@ var k = /* @__PURE__ */ u({
|
|
|
102
1790
|
title: {}
|
|
103
1791
|
},
|
|
104
1792
|
emits: { "update:modelValue": (e) => !0 },
|
|
105
|
-
setup(
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
o("update:modelValue", !a.modelValue);
|
|
113
|
-
}
|
|
114
|
-
let l = n(() => typeof a.modelValue == "string" ? a.modelValue !== "false" : a.modelValue);
|
|
115
|
-
return (n, i) => (h(), r(e, {
|
|
116
|
-
tag: "div",
|
|
117
|
-
role: "checkbox",
|
|
118
|
-
tabindex: "0",
|
|
119
|
-
"aria-checked": l.value,
|
|
120
|
-
class: "poveste-checkbox cursor-pointer items-center",
|
|
121
|
-
title: t.title,
|
|
122
|
-
onClick: i[0] ||= (e) => s(),
|
|
123
|
-
onKeydown: [i[1] ||= T(E((e) => s(), ["prevent"]), ["enter"]), i[2] ||= T(E((e) => s(), ["prevent"]), ["space"])]
|
|
1793
|
+
setup(e, { emit: t }) {
|
|
1794
|
+
let n = e, r = t, i = C(() => typeof n.modelValue == "string"), a = C(() => typeof n.modelValue == "string" ? n.modelValue !== "false" : n.modelValue ?? void 0);
|
|
1795
|
+
return (t, n) => (z(), w(u, {
|
|
1796
|
+
class: "poveste-checkbox",
|
|
1797
|
+
title: e.title
|
|
124
1798
|
}, {
|
|
125
|
-
actions:
|
|
126
|
-
default:
|
|
1799
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
1800
|
+
default: q(() => [k(K(at), {
|
|
1801
|
+
"model-value": i.value ? String(a.value) : a.value,
|
|
1802
|
+
"true-value": !i.value || "true",
|
|
1803
|
+
"false-value": i.value ? "false" : !1,
|
|
1804
|
+
class: "poveste-checkbox-box",
|
|
1805
|
+
"data-slot": "control",
|
|
1806
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
1807
|
+
}, {
|
|
1808
|
+
default: q(() => [k(Ot, { "model-value": a.value }, null, 8, ["model-value"])]),
|
|
1809
|
+
_: 1
|
|
1810
|
+
}, 8, [
|
|
1811
|
+
"model-value",
|
|
1812
|
+
"true-value",
|
|
1813
|
+
"false-value"
|
|
1814
|
+
])]),
|
|
127
1815
|
_: 3
|
|
128
|
-
}, 8, ["
|
|
1816
|
+
}, 8, ["title"]));
|
|
129
1817
|
}
|
|
130
|
-
}),
|
|
131
|
-
"for",
|
|
132
|
-
"onKeydown",
|
|
133
|
-
"onClick"
|
|
134
|
-
], le = /* @__PURE__ */ u({
|
|
1818
|
+
}), At = /* @__PURE__ */ j({
|
|
135
1819
|
name: "HstCheckboxList",
|
|
136
1820
|
props: {
|
|
137
1821
|
title: {},
|
|
@@ -139,29 +1823,38 @@ var k = /* @__PURE__ */ u({
|
|
|
139
1823
|
options: {}
|
|
140
1824
|
},
|
|
141
1825
|
emits: ["update:modelValue"],
|
|
142
|
-
setup(
|
|
143
|
-
let
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
title: i.title,
|
|
150
|
-
class: f(["poveste-checkbox-list cursor-text", n.$attrs.class]),
|
|
151
|
-
style: p(n.$attrs.style)
|
|
1826
|
+
setup(e, { emit: t }) {
|
|
1827
|
+
let n = e, r = t, i = C(() => Array.isArray(n.options) ? Object.fromEntries(n.options.map((e) => typeof e == "string" ? [e, e] : [e.value, e.label])) : n.options);
|
|
1828
|
+
return (t, n) => (z(), w(u, {
|
|
1829
|
+
tag: "div",
|
|
1830
|
+
title: e.title,
|
|
1831
|
+
class: F(["poveste-checkbox-list", t.$attrs.class]),
|
|
1832
|
+
style: L(t.$attrs.style)
|
|
152
1833
|
}, {
|
|
153
|
-
actions:
|
|
154
|
-
default:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1834
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
1835
|
+
default: q(() => [k(K(et), {
|
|
1836
|
+
"model-value": e.modelValue,
|
|
1837
|
+
class: "poveste-checkbox-list-options",
|
|
1838
|
+
"data-slot": "options",
|
|
1839
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
1840
|
+
}, {
|
|
1841
|
+
default: q(() => [(z(!0), E(S, null, V(i.value, (t, n) => (z(), w(K(st), {
|
|
1842
|
+
key: n,
|
|
1843
|
+
class: "poveste-checkbox-list-option",
|
|
1844
|
+
"data-slot": "option"
|
|
1845
|
+
}, {
|
|
1846
|
+
default: q(() => [k(K(at), {
|
|
1847
|
+
value: n,
|
|
1848
|
+
class: "poveste-checkbox-list-box",
|
|
1849
|
+
"data-slot": "control"
|
|
1850
|
+
}, {
|
|
1851
|
+
default: q(() => [k(Ot, { "model-value": e.modelValue.includes(n) }, null, 8, ["model-value"])]),
|
|
1852
|
+
_: 2
|
|
1853
|
+
}, 1032, ["value"]), O(" " + W(t), 1)]),
|
|
1854
|
+
_: 2
|
|
1855
|
+
}, 1024))), 128))]),
|
|
1856
|
+
_: 1
|
|
1857
|
+
}, 8, ["model-value"])]),
|
|
165
1858
|
_: 3
|
|
166
1859
|
}, 8, [
|
|
167
1860
|
"title",
|
|
@@ -169,7 +1862,7 @@ var k = /* @__PURE__ */ u({
|
|
|
169
1862
|
"style"
|
|
170
1863
|
]));
|
|
171
1864
|
}
|
|
172
|
-
}),
|
|
1865
|
+
}), jt = { class: "flex flex-row gap-1" }, Mt = ["value"], Nt = /* @__PURE__ */ j({
|
|
173
1866
|
name: "HstColorSelect",
|
|
174
1867
|
inheritAttrs: !1,
|
|
175
1868
|
props: {
|
|
@@ -177,15 +1870,15 @@ var k = /* @__PURE__ */ u({
|
|
|
177
1870
|
modelValue: {}
|
|
178
1871
|
},
|
|
179
1872
|
emits: { "update:modelValue": (e) => !0 },
|
|
180
|
-
setup(
|
|
181
|
-
let
|
|
182
|
-
get: () =>
|
|
1873
|
+
setup(e, { emit: t }) {
|
|
1874
|
+
let n = e, r = t, i = C({
|
|
1875
|
+
get: () => n.modelValue,
|
|
183
1876
|
set: (e) => {
|
|
184
|
-
|
|
1877
|
+
r("update:modelValue", e);
|
|
185
1878
|
}
|
|
186
1879
|
});
|
|
187
|
-
function
|
|
188
|
-
let n = !1, r, i = () => {
|
|
1880
|
+
function a(e, t = 15) {
|
|
1881
|
+
let n = !1, r = null, i = () => {
|
|
189
1882
|
r == null ? n = !1 : (e(...r), r = null, setTimeout(i, t));
|
|
190
1883
|
};
|
|
191
1884
|
return (...a) => {
|
|
@@ -196,31 +1889,31 @@ var k = /* @__PURE__ */ u({
|
|
|
196
1889
|
e(...a), n = !0, setTimeout(i, t);
|
|
197
1890
|
};
|
|
198
1891
|
}
|
|
199
|
-
let
|
|
200
|
-
|
|
1892
|
+
let o = a((e) => {
|
|
1893
|
+
r("update:modelValue", e);
|
|
201
1894
|
});
|
|
202
|
-
function
|
|
203
|
-
|
|
1895
|
+
function s(e) {
|
|
1896
|
+
o(e);
|
|
204
1897
|
}
|
|
205
|
-
return (
|
|
206
|
-
title:
|
|
207
|
-
class:
|
|
208
|
-
style:
|
|
1898
|
+
return (t, n) => (z(), w(u, {
|
|
1899
|
+
title: e.title,
|
|
1900
|
+
class: F(["poveste-select cursor-text items-center", t.$attrs.class]),
|
|
1901
|
+
style: L(t.$attrs.style)
|
|
209
1902
|
}, {
|
|
210
|
-
actions:
|
|
211
|
-
default:
|
|
212
|
-
...
|
|
1903
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
1904
|
+
default: q(() => [D("div", jt, [J(D("input", N({
|
|
1905
|
+
...t.$attrs,
|
|
213
1906
|
class: null,
|
|
214
1907
|
style: null
|
|
215
1908
|
}, {
|
|
216
|
-
"onUpdate:modelValue":
|
|
1909
|
+
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
217
1910
|
type: "text",
|
|
218
1911
|
class: "text-inherit bg-transparent w-full outline-none px-2 py-1 -my-1 border border-solid border-black/25 dark:border-white/25 focus:border-primary-500 dark:focus:border-primary-500 rounded-sm"
|
|
219
|
-
}), null, 16), [[
|
|
1912
|
+
}), null, 16), [[se, i.value]]), D("input", {
|
|
220
1913
|
type: "color",
|
|
221
|
-
value:
|
|
222
|
-
onInput:
|
|
223
|
-
}, null, 40,
|
|
1914
|
+
value: e.modelValue,
|
|
1915
|
+
onInput: n[1] ||= ((e) => s(e.target.value))
|
|
1916
|
+
}, null, 40, Mt)])]),
|
|
224
1917
|
_: 3
|
|
225
1918
|
}, 8, [
|
|
226
1919
|
"title",
|
|
@@ -228,31 +1921,36 @@ var k = /* @__PURE__ */ u({
|
|
|
228
1921
|
"style"
|
|
229
1922
|
]));
|
|
230
1923
|
}
|
|
231
|
-
}),
|
|
1924
|
+
}), $ = /* @__PURE__ */ j({
|
|
232
1925
|
name: "HstCopyIcon",
|
|
233
1926
|
props: { content: { type: [String, Function] } },
|
|
234
1927
|
setup(e) {
|
|
235
|
-
let t = e, { copy: n, copied: i } =
|
|
1928
|
+
let t = e, { copy: n, copied: r } = de(), { polite: i } = pe();
|
|
236
1929
|
async function a() {
|
|
237
1930
|
let e = typeof t.content == "function" ? await t.content() : t.content;
|
|
238
|
-
n(e);
|
|
1931
|
+
await n(e), r.value && i("Copied");
|
|
239
1932
|
}
|
|
240
|
-
return (e, t) =>
|
|
241
|
-
icon: "carbon:copy-file",
|
|
242
|
-
class: "w-4 h-4 opacity-50 hover:opacity-100 hover:text-primary-500 cursor-pointer",
|
|
243
|
-
onClick: t[0] ||= (e) => a()
|
|
244
|
-
}, null, 512)), [[b(D), {
|
|
1933
|
+
return (e, t) => (z(), w(c, {
|
|
245
1934
|
content: "Copied!",
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
1935
|
+
open: K(r),
|
|
1936
|
+
offset: 12
|
|
1937
|
+
}, {
|
|
1938
|
+
default: q(() => [D("button", {
|
|
1939
|
+
type: "button",
|
|
1940
|
+
"aria-label": "Copy",
|
|
1941
|
+
class: "flex p-0 bg-transparent border-0 text-inherit opacity-50 hover:opacity-100 focus-visible:opacity-100 hover:text-primary-500 cursor-pointer",
|
|
1942
|
+
onClick: t[0] ||= (e) => a()
|
|
1943
|
+
}, [k(K(me), {
|
|
1944
|
+
icon: "carbon:copy-file",
|
|
1945
|
+
class: "w-4 h-4"
|
|
1946
|
+
})])]),
|
|
1947
|
+
_: 1
|
|
1948
|
+
}, 8, ["open"]));
|
|
251
1949
|
}
|
|
252
|
-
}),
|
|
1950
|
+
}), Pt = {
|
|
253
1951
|
key: 0,
|
|
254
1952
|
class: "poveste-color-shades grid gap-4 grid-cols-[repeat(auto-fill,minmax(200px,1fr))] m-4"
|
|
255
|
-
},
|
|
1953
|
+
}, Ft = ["onMouseenter"], It = { class: "flex gap-1" }, Lt = { class: "my-0 truncate shrink" }, Rt = { class: "flex gap-1" }, zt = { class: "my-0 opacity-50 truncate shrink" }, Bt = /* @__PURE__ */ j({
|
|
256
1954
|
name: "HstColorShades",
|
|
257
1955
|
props: {
|
|
258
1956
|
shades: {},
|
|
@@ -260,117 +1958,129 @@ var k = /* @__PURE__ */ u({
|
|
|
260
1958
|
search: {}
|
|
261
1959
|
},
|
|
262
1960
|
setup(e) {
|
|
263
|
-
let
|
|
264
|
-
function
|
|
265
|
-
return Object.entries(e).reduce((e, [
|
|
266
|
-
let
|
|
1961
|
+
let t = e;
|
|
1962
|
+
function n(e, t = "") {
|
|
1963
|
+
return Object.entries(e).reduce((e, [r, i]) => {
|
|
1964
|
+
let a = t ? r === "DEFAULT" ? t : `${t}-${r}` : r, o = typeof i == "object" ? n(i, a) : { [a]: i };
|
|
267
1965
|
return {
|
|
268
1966
|
...e,
|
|
269
|
-
...
|
|
1967
|
+
...o
|
|
270
1968
|
};
|
|
271
1969
|
}, {});
|
|
272
1970
|
}
|
|
273
|
-
let
|
|
274
|
-
let e =
|
|
275
|
-
return Object.entries(
|
|
1971
|
+
let r = C(() => {
|
|
1972
|
+
let e = t.shades, r = t.getName, i = n(e);
|
|
1973
|
+
return Object.entries(i).map(([e, t]) => ({
|
|
276
1974
|
key: e,
|
|
277
|
-
color:
|
|
278
|
-
name:
|
|
1975
|
+
color: t,
|
|
1976
|
+
name: r ? r(e, t) : e
|
|
279
1977
|
}));
|
|
280
|
-
}),
|
|
281
|
-
let e =
|
|
282
|
-
if (
|
|
283
|
-
let
|
|
284
|
-
e = e.filter(({ name: e }) =>
|
|
1978
|
+
}), i = C(() => {
|
|
1979
|
+
let e = r.value;
|
|
1980
|
+
if (t.search) {
|
|
1981
|
+
let n = new RegExp(t.search, "i");
|
|
1982
|
+
e = e.filter(({ name: e }) => n.test(e));
|
|
285
1983
|
}
|
|
286
1984
|
return e;
|
|
287
|
-
}),
|
|
288
|
-
return (e,
|
|
289
|
-
key:
|
|
1985
|
+
}), a = B(null);
|
|
1986
|
+
return (e, t) => i.value.length ? (z(), E("div", Pt, [(z(!0), E(S, null, V(i.value, (n) => (z(), E("div", {
|
|
1987
|
+
key: n.key,
|
|
290
1988
|
class: "flex flex-col gap-2",
|
|
291
|
-
onMouseenter: (e) =>
|
|
292
|
-
onMouseleave:
|
|
293
|
-
}, [
|
|
1989
|
+
onMouseenter: (e) => a.value = n.key,
|
|
1990
|
+
onMouseleave: t[0] ||= (e) => a.value = null
|
|
1991
|
+
}, [H(e.$slots, "default", { color: n.color }, () => [D("div", {
|
|
294
1992
|
class: "rounded-full w-16 h-16",
|
|
295
|
-
style:
|
|
296
|
-
}, null, 4)]),
|
|
1993
|
+
style: L({ backgroundColor: n.color })
|
|
1994
|
+
}, null, 4)]), D("div", null, [D("div", It, [k(c, { content: n.name.length > 23 ? n.name : "" }, {
|
|
1995
|
+
default: q(() => [D("pre", Lt, W(n.name), 1)]),
|
|
1996
|
+
_: 2
|
|
1997
|
+
}, 1032, ["content"]), a.value === n.key ? (z(), w($, {
|
|
297
1998
|
key: 0,
|
|
298
|
-
content:
|
|
1999
|
+
content: n.name,
|
|
299
2000
|
class: "flex-none"
|
|
300
|
-
}, null, 8, ["content"])) :
|
|
2001
|
+
}, null, 8, ["content"])) : T("", !0)]), D("div", Rt, [k(c, { content: n.color.length > 23 ? n.color : "" }, {
|
|
2002
|
+
default: q(() => [D("pre", zt, W(n.color), 1)]),
|
|
2003
|
+
_: 2
|
|
2004
|
+
}, 1032, ["content"]), a.value === n.key ? (z(), w($, {
|
|
301
2005
|
key: 0,
|
|
302
|
-
content:
|
|
2006
|
+
content: n.color,
|
|
303
2007
|
class: "flex-none"
|
|
304
|
-
}, null, 8, ["content"])) :
|
|
2008
|
+
}, null, 8, ["content"])) : T("", !0)])])], 40, Ft))), 128))])) : T("", !0);
|
|
305
2009
|
}
|
|
306
|
-
}),
|
|
2010
|
+
}), Vt = ["onMouseenter"], Ht = { class: "flex gap-1" }, Ut = { class: "my-0 truncate shrink" }, Wt = { class: "flex gap-1" }, Gt = { class: "my-0 opacity-50 truncate shrink" }, Kt = /* @__PURE__ */ j({
|
|
307
2011
|
name: "HstTokenGrid",
|
|
308
2012
|
props: {
|
|
309
2013
|
tokens: {},
|
|
310
2014
|
colSize: { default: 180 },
|
|
311
|
-
getName: {
|
|
312
|
-
type: Function,
|
|
313
|
-
default: null
|
|
314
|
-
}
|
|
2015
|
+
getName: {}
|
|
315
2016
|
},
|
|
316
2017
|
setup(e) {
|
|
317
|
-
let
|
|
318
|
-
let e =
|
|
319
|
-
return Object.entries(e).map(([e,
|
|
2018
|
+
let t = e, n = C(() => {
|
|
2019
|
+
let e = t.tokens, n = t.getName;
|
|
2020
|
+
return Object.entries(e).map(([e, t]) => ({
|
|
320
2021
|
key: e,
|
|
321
|
-
name:
|
|
322
|
-
value: typeof
|
|
2022
|
+
name: n ? n(e, t) : e,
|
|
2023
|
+
value: typeof t == "number" ? t.toString() : t
|
|
323
2024
|
}));
|
|
324
|
-
}),
|
|
325
|
-
|
|
2025
|
+
}), r = C(() => `${t.colSize}px`), i = B(null);
|
|
2026
|
+
function a(e, t) {
|
|
2027
|
+
return typeof e != "string" && !Array.isArray(e) ? "" : e.length > t ? String(e) : "";
|
|
2028
|
+
}
|
|
2029
|
+
return (t, o) => (z(), E("div", {
|
|
326
2030
|
class: "poveste-token-grid bind-col-size grid gap-4 m-4",
|
|
327
|
-
style:
|
|
328
|
-
}, [(
|
|
329
|
-
key:
|
|
2031
|
+
style: L({ "--poveste-col-size": r.value })
|
|
2032
|
+
}, [(z(!0), E(S, null, V(n.value, (n) => (z(), E("div", {
|
|
2033
|
+
key: n.key,
|
|
330
2034
|
class: "flex flex-col gap-2",
|
|
331
|
-
onMouseenter: (e) =>
|
|
332
|
-
onMouseleave:
|
|
333
|
-
}, [
|
|
2035
|
+
onMouseenter: (e) => i.value = n.key,
|
|
2036
|
+
onMouseleave: o[0] ||= (e) => i.value = null
|
|
2037
|
+
}, [H(t.$slots, "default", { token: n }), D("div", null, [D("div", Ht, [k(c, { content: n.name.length > e.colSize / 8 ? n.name : "" }, {
|
|
2038
|
+
default: q(() => [D("pre", Ut, W(n.name), 1)]),
|
|
2039
|
+
_: 2
|
|
2040
|
+
}, 1032, ["content"]), i.value === n.key ? (z(), w($, {
|
|
334
2041
|
key: 0,
|
|
335
|
-
content:
|
|
2042
|
+
content: n.name,
|
|
336
2043
|
class: "flex-none"
|
|
337
|
-
}, null, 8, ["content"])) :
|
|
2044
|
+
}, null, 8, ["content"])) : T("", !0)]), D("div", Wt, [k(c, { content: a(n.value, e.colSize / 8) }, {
|
|
2045
|
+
default: q(() => [D("pre", Gt, W(n.value), 1)]),
|
|
2046
|
+
_: 2
|
|
2047
|
+
}, 1032, ["content"]), i.value === n.key ? (z(), w($, {
|
|
338
2048
|
key: 0,
|
|
339
|
-
content: typeof
|
|
2049
|
+
content: typeof n.value == "string" ? n.value : JSON.stringify(n.value),
|
|
340
2050
|
class: "flex-none"
|
|
341
|
-
}, null, 8, ["content"])) :
|
|
2051
|
+
}, null, 8, ["content"])) : T("", !0)])])], 40, Vt))), 128))], 4));
|
|
342
2052
|
}
|
|
343
|
-
}),
|
|
2053
|
+
}), qt = ["onMouseenter"], Jt = { class: "mx-4" }, Yt = { class: "flex gap-1" }, Xt = { class: "my-0 truncate shrink" }, Zt = { class: "flex gap-1" }, Qt = { class: "my-0 opacity-50 truncate shrink" }, $t = /* @__PURE__ */ j({
|
|
344
2054
|
name: "HstTokenList",
|
|
345
2055
|
props: {
|
|
346
2056
|
tokens: {},
|
|
347
2057
|
getName: { type: Function }
|
|
348
2058
|
},
|
|
349
2059
|
setup(e) {
|
|
350
|
-
let
|
|
351
|
-
let e =
|
|
352
|
-
return Object.entries(e).map(([e,
|
|
2060
|
+
let t = e, n = C(() => {
|
|
2061
|
+
let e = t.tokens, n = t.getName;
|
|
2062
|
+
return Object.entries(e).map(([e, t]) => ({
|
|
353
2063
|
key: e,
|
|
354
|
-
name:
|
|
355
|
-
value: typeof
|
|
2064
|
+
name: n ? n(e, t) : e,
|
|
2065
|
+
value: typeof t == "number" ? t.toString() : t
|
|
356
2066
|
}));
|
|
357
|
-
}),
|
|
358
|
-
return (e,
|
|
359
|
-
key:
|
|
2067
|
+
}), r = B(null);
|
|
2068
|
+
return (e, t) => (z(!0), E(S, null, V(n.value, (n) => (z(), E("div", {
|
|
2069
|
+
key: n.key,
|
|
360
2070
|
class: "poveste-token-list flex flex-col gap-2 my-8",
|
|
361
|
-
onMouseenter: (e) =>
|
|
362
|
-
onMouseleave:
|
|
363
|
-
}, [
|
|
2071
|
+
onMouseenter: (e) => r.value = n.key,
|
|
2072
|
+
onMouseleave: t[0] ||= (e) => r.value = null
|
|
2073
|
+
}, [H(e.$slots, "default", { token: n }), D("div", Jt, [D("div", Yt, [D("pre", Xt, W(n.name), 1), r.value === n.key ? (z(), w($, {
|
|
364
2074
|
key: 0,
|
|
365
|
-
content:
|
|
2075
|
+
content: n.name,
|
|
366
2076
|
class: "flex-none"
|
|
367
|
-
}, null, 8, ["content"])) :
|
|
2077
|
+
}, null, 8, ["content"])) : T("", !0)]), D("div", Zt, [D("pre", Qt, W(n.value), 1), r.value === n.key ? (z(), w($, {
|
|
368
2078
|
key: 0,
|
|
369
|
-
content: typeof
|
|
2079
|
+
content: typeof n.value == "string" ? n.value : JSON.stringify(n.value),
|
|
370
2080
|
class: "flex-none"
|
|
371
|
-
}, null, 8, ["content"])) :
|
|
2081
|
+
}, null, 8, ["content"])) : T("", !0)])])], 40, qt))), 128));
|
|
372
2082
|
}
|
|
373
|
-
}),
|
|
2083
|
+
}), en = /* @__PURE__ */ j({
|
|
374
2084
|
name: "HstNumber",
|
|
375
2085
|
inheritAttrs: !1,
|
|
376
2086
|
props: {
|
|
@@ -378,51 +2088,53 @@ var k = /* @__PURE__ */ u({
|
|
|
378
2088
|
modelValue: {}
|
|
379
2089
|
},
|
|
380
2090
|
emits: { "update:modelValue": (e) => !0 },
|
|
381
|
-
setup(
|
|
382
|
-
let
|
|
383
|
-
get: () =>
|
|
2091
|
+
setup(e, { emit: t }) {
|
|
2092
|
+
let n = e, r = t, i = C({
|
|
2093
|
+
get: () => n.modelValue,
|
|
384
2094
|
set: (e) => {
|
|
385
|
-
|
|
2095
|
+
r("update:modelValue", e);
|
|
386
2096
|
}
|
|
387
|
-
}),
|
|
388
|
-
function
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
let
|
|
392
|
-
function
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
function
|
|
396
|
-
let t = Number.parseFloat(
|
|
397
|
-
Number.isNaN(t) && (t = 1),
|
|
398
|
-
}
|
|
399
|
-
function
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
return
|
|
403
|
-
|
|
404
|
-
}), (
|
|
405
|
-
class:
|
|
406
|
-
title:
|
|
407
|
-
style:
|
|
408
|
-
|
|
409
|
-
|
|
2097
|
+
}), a = B();
|
|
2098
|
+
function o() {
|
|
2099
|
+
a.value?.focus(), a.value?.select();
|
|
2100
|
+
}
|
|
2101
|
+
let s = B(!1), c, l;
|
|
2102
|
+
function d(e) {
|
|
2103
|
+
s.value = !0, c = e.clientX, l = i.value ?? 0, window.addEventListener("mousemove", f), window.addEventListener("mouseup", p);
|
|
2104
|
+
}
|
|
2105
|
+
function f(e) {
|
|
2106
|
+
let t = Number.parseFloat(a.value?.step ?? "");
|
|
2107
|
+
Number.isNaN(t) && (t = 1), i.value = l + Math.round((e.clientX - c) / 10 / t) * t;
|
|
2108
|
+
}
|
|
2109
|
+
function p() {
|
|
2110
|
+
s.value = !1, window.removeEventListener("mousemove", f), window.removeEventListener("mouseup", p);
|
|
2111
|
+
}
|
|
2112
|
+
return R(() => {
|
|
2113
|
+
p();
|
|
2114
|
+
}), (t, n) => (z(), w(u, {
|
|
2115
|
+
class: F(["poveste-number", t.$attrs.class]),
|
|
2116
|
+
title: e.title,
|
|
2117
|
+
style: L(t.$attrs.style),
|
|
2118
|
+
"data-dragging": s.value ? "" : void 0,
|
|
2119
|
+
onClick: o,
|
|
2120
|
+
onMousedown: d
|
|
410
2121
|
}, {
|
|
411
|
-
actions:
|
|
412
|
-
default:
|
|
2122
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
2123
|
+
default: q(() => [J(D("input", N({
|
|
413
2124
|
ref_key: "input",
|
|
414
|
-
ref:
|
|
2125
|
+
ref: a
|
|
415
2126
|
}, {
|
|
416
|
-
...
|
|
2127
|
+
...t.$attrs,
|
|
417
2128
|
class: null,
|
|
418
2129
|
style: null
|
|
419
2130
|
}, {
|
|
420
|
-
"onUpdate:modelValue":
|
|
2131
|
+
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
421
2132
|
type: "number",
|
|
422
|
-
class:
|
|
2133
|
+
class: "poveste-number-input",
|
|
2134
|
+
"data-slot": "control"
|
|
423
2135
|
}), null, 16), [[
|
|
424
|
-
|
|
425
|
-
|
|
2136
|
+
se,
|
|
2137
|
+
i.value,
|
|
426
2138
|
void 0,
|
|
427
2139
|
{ number: !0 }
|
|
428
2140
|
]])]),
|
|
@@ -430,16 +2142,11 @@ var k = /* @__PURE__ */ u({
|
|
|
430
2142
|
}, 8, [
|
|
431
2143
|
"title",
|
|
432
2144
|
"class",
|
|
433
|
-
"style"
|
|
2145
|
+
"style",
|
|
2146
|
+
"data-dragging"
|
|
434
2147
|
]));
|
|
435
2148
|
}
|
|
436
|
-
}),
|
|
437
|
-
"id",
|
|
438
|
-
"name",
|
|
439
|
-
"value",
|
|
440
|
-
"checked",
|
|
441
|
-
"onChange"
|
|
442
|
-
], Ae = ["for", "onKeydown"], je = /* @__PURE__ */ u({
|
|
2149
|
+
}), tn = /* @__PURE__ */ j({
|
|
443
2150
|
name: "HstRadio",
|
|
444
2151
|
props: {
|
|
445
2152
|
title: {},
|
|
@@ -447,45 +2154,41 @@ var k = /* @__PURE__ */ u({
|
|
|
447
2154
|
options: {}
|
|
448
2155
|
},
|
|
449
2156
|
emits: ["update:modelValue"],
|
|
450
|
-
setup(
|
|
451
|
-
let
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
role: "group",
|
|
458
|
-
title: i.title,
|
|
459
|
-
class: f(["poveste-radio cursor-text", n.$attrs.class]),
|
|
460
|
-
style: p(n.$attrs.style)
|
|
2157
|
+
setup(e, { emit: t }) {
|
|
2158
|
+
let n = e, r = t, i = C(() => Array.isArray(n.options) ? Object.fromEntries(n.options.map((e) => typeof e == "string" ? [e, e] : [e.value, e.label])) : n.options);
|
|
2159
|
+
return (t, n) => (z(), w(u, {
|
|
2160
|
+
tag: "div",
|
|
2161
|
+
title: e.title,
|
|
2162
|
+
class: F(["poveste-radio", t.$attrs.class]),
|
|
2163
|
+
style: L(t.$attrs.style)
|
|
461
2164
|
}, {
|
|
462
|
-
actions:
|
|
463
|
-
default:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
},
|
|
2165
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
2166
|
+
default: q(() => [k(K(pt), {
|
|
2167
|
+
"model-value": e.modelValue ?? null,
|
|
2168
|
+
class: "poveste-radio-options",
|
|
2169
|
+
"data-slot": "options",
|
|
2170
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
2171
|
+
}, {
|
|
2172
|
+
default: q(() => [(z(!0), E(S, null, V(i.value, (e, t) => (z(), w(K(st), {
|
|
2173
|
+
key: t,
|
|
2174
|
+
class: "poveste-radio-option",
|
|
2175
|
+
"data-slot": "option"
|
|
2176
|
+
}, {
|
|
2177
|
+
default: q(() => [k(K(gt), {
|
|
2178
|
+
value: t,
|
|
2179
|
+
class: "poveste-radio-box",
|
|
2180
|
+
"data-slot": "control"
|
|
2181
|
+
}, {
|
|
2182
|
+
default: q(() => [...n[1] ||= [D("span", {
|
|
2183
|
+
class: "poveste-radio-dot",
|
|
2184
|
+
"data-slot": "dot"
|
|
2185
|
+
}, null, -1)]]),
|
|
2186
|
+
_: 1
|
|
2187
|
+
}, 8, ["value"]), O(" " + W(e), 1)]),
|
|
2188
|
+
_: 2
|
|
2189
|
+
}, 1024))), 128))]),
|
|
2190
|
+
_: 1
|
|
2191
|
+
}, 8, ["model-value"])]),
|
|
489
2192
|
_: 3
|
|
490
2193
|
}, 8, [
|
|
491
2194
|
"title",
|
|
@@ -493,39 +2196,82 @@ var k = /* @__PURE__ */ u({
|
|
|
493
2196
|
"style"
|
|
494
2197
|
]));
|
|
495
2198
|
}
|
|
496
|
-
}),
|
|
2199
|
+
}), nn = {
|
|
2200
|
+
type: "button",
|
|
2201
|
+
class: "poveste-select-trigger",
|
|
2202
|
+
"data-slot": "trigger"
|
|
2203
|
+
}, rn = {
|
|
2204
|
+
class: "poveste-select-label",
|
|
2205
|
+
"data-slot": "value"
|
|
2206
|
+
}, an = /* @__PURE__ */ j({
|
|
497
2207
|
name: "CustomSelect",
|
|
498
2208
|
props: {
|
|
499
2209
|
modelValue: {},
|
|
500
2210
|
options: {}
|
|
501
2211
|
},
|
|
502
2212
|
emits: ["update:modelValue"],
|
|
503
|
-
setup(e, { emit:
|
|
504
|
-
let
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
"
|
|
2213
|
+
setup(e, { emit: t }) {
|
|
2214
|
+
let n = e, r = t, i = B(!1), a = ae();
|
|
2215
|
+
ie(() => {
|
|
2216
|
+
a.value = l();
|
|
2217
|
+
});
|
|
2218
|
+
let o = C(() => Array.isArray(n.options) ? n.options.map((e) => typeof e == "string" || typeof e == "number" ? [e, String(e)] : [e.value, e.label]) : Object.entries(n.options)), s = C(() => o.value.find(([e]) => e === n.modelValue)?.[1]);
|
|
2219
|
+
function c(e) {
|
|
2220
|
+
e != null && (r("update:modelValue", e), i.value = !1);
|
|
2221
|
+
}
|
|
2222
|
+
return (t, n) => (z(), w(K(m), {
|
|
2223
|
+
open: i.value,
|
|
2224
|
+
"onUpdate:open": n[0] ||= (e) => i.value = e
|
|
511
2225
|
}, {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
2226
|
+
default: q(() => [k(K(y), { "as-child": "" }, {
|
|
2227
|
+
default: q(() => [D("button", nn, [D("span", rn, [H(t.$slots, "default", { label: s.value }, () => [O(W(s.value), 1)])]), k(K(me), {
|
|
2228
|
+
icon: "carbon:chevron-sort",
|
|
2229
|
+
class: "poveste-select-chevron"
|
|
2230
|
+
})])]),
|
|
2231
|
+
_: 3
|
|
2232
|
+
}), a.value ? (z(), w(K(h), {
|
|
2233
|
+
key: 0,
|
|
2234
|
+
to: a.value
|
|
516
2235
|
}, {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
2236
|
+
default: q(() => [k(K(_), {
|
|
2237
|
+
class: "poveste-select-popper",
|
|
2238
|
+
align: "start",
|
|
2239
|
+
"side-offset": 6,
|
|
2240
|
+
"collision-padding": 8
|
|
2241
|
+
}, {
|
|
2242
|
+
default: q(() => [k(K(He), {
|
|
2243
|
+
class: "poveste-select-options",
|
|
2244
|
+
"data-slot": "options",
|
|
2245
|
+
"selection-behavior": "replace",
|
|
2246
|
+
"highlight-on-hover": "",
|
|
2247
|
+
"model-value": e.modelValue,
|
|
2248
|
+
"onUpdate:modelValue": c
|
|
2249
|
+
}, {
|
|
2250
|
+
default: q(() => [k(K(Ue), {
|
|
2251
|
+
class: "poveste-select-list",
|
|
2252
|
+
"data-slot": "listbox"
|
|
2253
|
+
}, {
|
|
2254
|
+
default: q(() => [(z(!0), E(S, null, V(o.value, ([e, t]) => (z(), w(K(qe), {
|
|
2255
|
+
key: t,
|
|
2256
|
+
class: "poveste-select-option",
|
|
2257
|
+
"data-slot": "option",
|
|
2258
|
+
value: e
|
|
2259
|
+
}, {
|
|
2260
|
+
default: q(() => [O(W(t), 1)]),
|
|
2261
|
+
_: 2
|
|
2262
|
+
}, 1032, ["value"]))), 128))]),
|
|
2263
|
+
_: 1
|
|
2264
|
+
})]),
|
|
2265
|
+
_: 1
|
|
2266
|
+
}, 8, ["model-value"])]),
|
|
2267
|
+
_: 1
|
|
2268
|
+
})]),
|
|
2269
|
+
_: 1
|
|
2270
|
+
}, 8, ["to"])) : T("", !0)]),
|
|
525
2271
|
_: 3
|
|
526
|
-
}));
|
|
2272
|
+
}, 8, ["open"]));
|
|
527
2273
|
}
|
|
528
|
-
}),
|
|
2274
|
+
}), on = /* @__PURE__ */ j({
|
|
529
2275
|
name: "HstSelect",
|
|
530
2276
|
props: {
|
|
531
2277
|
title: {},
|
|
@@ -533,18 +2279,19 @@ var k = /* @__PURE__ */ u({
|
|
|
533
2279
|
options: {}
|
|
534
2280
|
},
|
|
535
2281
|
emits: ["update:modelValue"],
|
|
536
|
-
setup(
|
|
537
|
-
let
|
|
538
|
-
return (
|
|
539
|
-
title:
|
|
540
|
-
class:
|
|
541
|
-
|
|
2282
|
+
setup(e, { emit: t }) {
|
|
2283
|
+
let n = t;
|
|
2284
|
+
return (t, r) => (z(), w(u, {
|
|
2285
|
+
title: e.title,
|
|
2286
|
+
class: F(["poveste-select", t.$attrs.class]),
|
|
2287
|
+
"data-slot": "control",
|
|
2288
|
+
style: L(t.$attrs.style)
|
|
542
2289
|
}, {
|
|
543
|
-
actions:
|
|
544
|
-
default:
|
|
545
|
-
options:
|
|
546
|
-
"model-value":
|
|
547
|
-
"onUpdate:modelValue":
|
|
2290
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
2291
|
+
default: q(() => [k(an, {
|
|
2292
|
+
options: e.options,
|
|
2293
|
+
"model-value": e.modelValue,
|
|
2294
|
+
"onUpdate:modelValue": r[0] ||= (e) => n("update:modelValue", e)
|
|
548
2295
|
}, null, 8, ["options", "model-value"])]),
|
|
549
2296
|
_: 3
|
|
550
2297
|
}, 8, [
|
|
@@ -553,7 +2300,10 @@ var k = /* @__PURE__ */ u({
|
|
|
553
2300
|
"style"
|
|
554
2301
|
]));
|
|
555
2302
|
}
|
|
556
|
-
}),
|
|
2303
|
+
}), sn = {
|
|
2304
|
+
class: "poveste-slider-field",
|
|
2305
|
+
"data-slot": "field"
|
|
2306
|
+
}, cn = /* @__PURE__ */ j({
|
|
557
2307
|
name: "HstSlider",
|
|
558
2308
|
inheritAttrs: !1,
|
|
559
2309
|
props: {
|
|
@@ -563,51 +2313,55 @@ var k = /* @__PURE__ */ u({
|
|
|
563
2313
|
max: {}
|
|
564
2314
|
},
|
|
565
2315
|
emits: { "update:modelValue": (e) => !0 },
|
|
566
|
-
setup(
|
|
567
|
-
let
|
|
568
|
-
get: () =>
|
|
2316
|
+
setup(e, { emit: t }) {
|
|
2317
|
+
let n = e, r = t, i = B(!1), a = C({
|
|
2318
|
+
get: () => n.modelValue,
|
|
569
2319
|
set: (e) => {
|
|
570
|
-
|
|
2320
|
+
r("update:modelValue", e);
|
|
571
2321
|
}
|
|
572
|
-
}),
|
|
573
|
-
return (
|
|
574
|
-
class:
|
|
575
|
-
title:
|
|
576
|
-
style:
|
|
2322
|
+
}), o = C(() => ((n.modelValue ?? n.min) - n.min) / (n.max - n.min)), s = C(() => ({ "--_poveste-slider-fraction": String(o.value) }));
|
|
2323
|
+
return (t, n) => (z(), w(u, {
|
|
2324
|
+
class: F(["poveste-slider", t.$attrs.class]),
|
|
2325
|
+
title: e.title,
|
|
2326
|
+
style: L(t.$attrs.style)
|
|
577
2327
|
}, {
|
|
578
|
-
default:
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
2328
|
+
default: q(() => [D("div", sn, [
|
|
2329
|
+
n[3] ||= D("div", { class: "poveste-slider-track-area" }, [D("div", {
|
|
2330
|
+
class: "poveste-slider-track",
|
|
2331
|
+
"data-slot": "track"
|
|
2332
|
+
})], -1),
|
|
2333
|
+
J(D("input", N({
|
|
2334
|
+
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
2335
|
+
class: "poveste-slider-input",
|
|
2336
|
+
"data-slot": "control",
|
|
585
2337
|
type: "range"
|
|
586
2338
|
}, {
|
|
587
|
-
...
|
|
2339
|
+
...t.$attrs,
|
|
588
2340
|
class: null,
|
|
589
2341
|
style: null,
|
|
590
|
-
min:
|
|
591
|
-
max:
|
|
2342
|
+
min: e.min,
|
|
2343
|
+
max: e.max
|
|
592
2344
|
}, {
|
|
593
|
-
onMouseover:
|
|
594
|
-
onMouseleave:
|
|
2345
|
+
onMouseover: n[1] ||= (e) => i.value = !0,
|
|
2346
|
+
onMouseleave: n[2] ||= (e) => i.value = !1
|
|
595
2347
|
}), null, 16), [[
|
|
596
|
-
|
|
597
|
-
|
|
2348
|
+
se,
|
|
2349
|
+
a.value,
|
|
598
2350
|
void 0,
|
|
599
2351
|
{ number: !0 }
|
|
600
2352
|
]]),
|
|
601
|
-
|
|
2353
|
+
i.value ? (z(), w(c, {
|
|
602
2354
|
key: 0,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
2355
|
+
content: String(e.modelValue ?? ""),
|
|
2356
|
+
open: !0,
|
|
2357
|
+
offset: 16
|
|
2358
|
+
}, {
|
|
2359
|
+
default: q(() => [D("div", {
|
|
2360
|
+
class: "poveste-slider-tooltip-anchor",
|
|
2361
|
+
style: L(s.value)
|
|
2362
|
+
}, null, 4)]),
|
|
2363
|
+
_: 1
|
|
2364
|
+
}, 8, ["content"])) : T("", !0)
|
|
611
2365
|
])]),
|
|
612
2366
|
_: 1
|
|
613
2367
|
}, 8, [
|
|
@@ -616,35 +2370,37 @@ var k = /* @__PURE__ */ u({
|
|
|
616
2370
|
"style"
|
|
617
2371
|
]));
|
|
618
2372
|
}
|
|
619
|
-
}),
|
|
2373
|
+
}), ln = ["value"], un = /* @__PURE__ */ j({
|
|
620
2374
|
name: "HstText",
|
|
2375
|
+
inheritAttrs: !1,
|
|
621
2376
|
props: {
|
|
622
2377
|
title: {},
|
|
623
2378
|
modelValue: {}
|
|
624
2379
|
},
|
|
625
2380
|
emits: { "update:modelValue": (e) => !0 },
|
|
626
|
-
setup(
|
|
627
|
-
let
|
|
628
|
-
return (
|
|
629
|
-
title:
|
|
630
|
-
class:
|
|
631
|
-
style:
|
|
632
|
-
onClick:
|
|
2381
|
+
setup(e, { emit: t }) {
|
|
2382
|
+
let n = t, r = B();
|
|
2383
|
+
return (t, i) => (z(), w(u, {
|
|
2384
|
+
title: e.title,
|
|
2385
|
+
class: F(["poveste-text", t.$attrs.class]),
|
|
2386
|
+
style: L(t.$attrs.style),
|
|
2387
|
+
onClick: i[1] ||= (e) => r.value?.focus()
|
|
633
2388
|
}, {
|
|
634
|
-
actions:
|
|
635
|
-
default:
|
|
2389
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
2390
|
+
default: q(() => [D("input", N({
|
|
636
2391
|
ref_key: "input",
|
|
637
|
-
ref:
|
|
2392
|
+
ref: r
|
|
638
2393
|
}, {
|
|
639
|
-
...
|
|
2394
|
+
...t.$attrs,
|
|
640
2395
|
class: null,
|
|
641
2396
|
style: null
|
|
642
2397
|
}, {
|
|
643
2398
|
type: "text",
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
2399
|
+
class: "poveste-text-input",
|
|
2400
|
+
"data-slot": "control",
|
|
2401
|
+
value: e.modelValue,
|
|
2402
|
+
onInput: i[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
2403
|
+
}), null, 16, ln)]),
|
|
648
2404
|
_: 3
|
|
649
2405
|
}, 8, [
|
|
650
2406
|
"title",
|
|
@@ -652,7 +2408,7 @@ var k = /* @__PURE__ */ u({
|
|
|
652
2408
|
"style"
|
|
653
2409
|
]));
|
|
654
2410
|
}
|
|
655
|
-
}),
|
|
2411
|
+
}), dn = ["value"], fn = /* @__PURE__ */ j({
|
|
656
2412
|
name: "HstTextarea",
|
|
657
2413
|
inheritAttrs: !1,
|
|
658
2414
|
props: {
|
|
@@ -660,27 +2416,28 @@ var k = /* @__PURE__ */ u({
|
|
|
660
2416
|
modelValue: {}
|
|
661
2417
|
},
|
|
662
2418
|
emits: { "update:modelValue": (e) => !0 },
|
|
663
|
-
setup(
|
|
664
|
-
let
|
|
665
|
-
return (
|
|
666
|
-
title:
|
|
667
|
-
class:
|
|
668
|
-
style:
|
|
669
|
-
onClick:
|
|
2419
|
+
setup(e, { emit: t }) {
|
|
2420
|
+
let n = t, r = B();
|
|
2421
|
+
return (t, i) => (z(), w(u, {
|
|
2422
|
+
title: e.title,
|
|
2423
|
+
class: F(["poveste-textarea", t.$attrs.class]),
|
|
2424
|
+
style: L(t.$attrs.style),
|
|
2425
|
+
onClick: i[1] ||= (e) => r.value?.focus()
|
|
670
2426
|
}, {
|
|
671
|
-
actions:
|
|
672
|
-
default:
|
|
2427
|
+
actions: q(() => [H(t.$slots, "actions")]),
|
|
2428
|
+
default: q(() => [D("textarea", N({
|
|
673
2429
|
ref_key: "input",
|
|
674
|
-
ref:
|
|
2430
|
+
ref: r
|
|
675
2431
|
}, {
|
|
676
|
-
...
|
|
2432
|
+
...t.$attrs,
|
|
677
2433
|
class: null,
|
|
678
2434
|
style: null
|
|
679
2435
|
}, {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
2436
|
+
class: "poveste-textarea-input",
|
|
2437
|
+
"data-slot": "control",
|
|
2438
|
+
value: e.modelValue,
|
|
2439
|
+
onInput: i[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
2440
|
+
}), null, 16, dn)]),
|
|
684
2441
|
_: 3
|
|
685
2442
|
}, 8, [
|
|
686
2443
|
"title",
|
|
@@ -688,26 +2445,34 @@ var k = /* @__PURE__ */ u({
|
|
|
688
2445
|
"style"
|
|
689
2446
|
]));
|
|
690
2447
|
}
|
|
691
|
-
}),
|
|
2448
|
+
}), pn = ge, mn = St, hn = kt, gn = At, _n = un, vn = en, yn = cn, bn = fn, xn = on, Sn = Bt, Cn = $t, wn = Kt, Tn = $, En = c, Dn = tn, On = Object.assign(A(() => import("./HstJson-D83KEa9o.es.js")), {
|
|
692
2449
|
name: "HstJson",
|
|
693
2450
|
emits: ["update:modelValue"]
|
|
694
|
-
}),
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
2451
|
+
}), kn = Object.assign(A(() => import("./HstDate-Ct5Jp_ZD.es.js")), {
|
|
2452
|
+
name: "HstDate",
|
|
2453
|
+
emits: ["update:modelValue"]
|
|
2454
|
+
}), An = Object.assign(A(() => import("./HstColor-DHgxKTkm.es.js")), {
|
|
2455
|
+
name: "HstColor",
|
|
2456
|
+
emits: ["update:modelValue"]
|
|
2457
|
+
}), jn = Nt, Mn = {
|
|
2458
|
+
HstButton: pn,
|
|
2459
|
+
HstButtonGroup: mn,
|
|
2460
|
+
HstCheckbox: hn,
|
|
2461
|
+
HstCheckboxList: gn,
|
|
2462
|
+
HstText: _n,
|
|
2463
|
+
HstNumber: vn,
|
|
2464
|
+
HstSlider: yn,
|
|
2465
|
+
HstTextarea: bn,
|
|
2466
|
+
HstSelect: xn,
|
|
2467
|
+
HstRadio: Dn,
|
|
2468
|
+
HstColor: An,
|
|
2469
|
+
HstDate: kn,
|
|
2470
|
+
HstJson: On,
|
|
2471
|
+
HstColorShades: Sn,
|
|
2472
|
+
HstTokenList: Cn,
|
|
2473
|
+
HstTokenGrid: wn,
|
|
2474
|
+
HstCopyIcon: Tn,
|
|
2475
|
+
HstColorSelect: jn
|
|
711
2476
|
};
|
|
712
2477
|
//#endregion
|
|
713
|
-
export {
|
|
2478
|
+
export { pn as HstButton, mn as HstButtonGroup, hn as HstCheckbox, gn as HstCheckboxList, An as HstColor, jn as HstColorSelect, Sn as HstColorShades, Tn as HstCopyIcon, kn as HstDate, On as HstJson, vn as HstNumber, Dn as HstRadio, xn as HstSelect, yn as HstSlider, _n as HstText, bn as HstTextarea, wn as HstTokenGrid, Cn as HstTokenList, En as HstTooltip, ot as PopoverAnchor, _ as PopoverContent, h as PopoverPortal, m as PopoverRoot, y as PopoverTrigger, Mn as components, l as portalTarget };
|