@nightshadeui/components 0.0.0-stage → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/components/BaseMenu.vue.d.ts +314 -0
  2. package/dist/components/BaseMenu.vue.d.ts.map +1 -0
  3. package/dist/components/Btn.vue.d.ts +215 -0
  4. package/dist/components/Btn.vue.d.ts.map +1 -0
  5. package/dist/components/Bubble.vue.d.ts +42 -0
  6. package/dist/components/Bubble.vue.d.ts.map +1 -0
  7. package/dist/components/Checkbox.vue.d.ts +137 -0
  8. package/dist/components/Checkbox.vue.d.ts.map +1 -0
  9. package/dist/components/Chip.vue.d.ts +120 -0
  10. package/dist/components/Chip.vue.d.ts.map +1 -0
  11. package/dist/components/ContextMenu.vue.d.ts +479 -0
  12. package/dist/components/ContextMenu.vue.d.ts.map +1 -0
  13. package/dist/components/ContextPopup.vue.d.ts +142 -0
  14. package/dist/components/ContextPopup.vue.d.ts.map +1 -0
  15. package/dist/components/Filler.vue.d.ts +24 -0
  16. package/dist/components/Filler.vue.d.ts.map +1 -0
  17. package/dist/components/HGroup.vue.d.ts +57 -0
  18. package/dist/components/HGroup.vue.d.ts.map +1 -0
  19. package/dist/components/InputBase.vue.d.ts +196 -0
  20. package/dist/components/InputBase.vue.d.ts.map +1 -0
  21. package/dist/components/InputGroup.vue.d.ts +24 -0
  22. package/dist/components/InputGroup.vue.d.ts.map +1 -0
  23. package/dist/components/InputSelect.vue.d.ts +228 -0
  24. package/dist/components/InputSelect.vue.d.ts.map +1 -0
  25. package/dist/components/InputText.vue.d.ts +218 -0
  26. package/dist/components/InputText.vue.d.ts.map +1 -0
  27. package/dist/components/InputTextarea.vue.d.ts +218 -0
  28. package/dist/components/InputTextarea.vue.d.ts.map +1 -0
  29. package/dist/components/ModalOverlay.vue.d.ts +38 -0
  30. package/dist/components/ModalOverlay.vue.d.ts.map +1 -0
  31. package/dist/components/RouterBtn.vue.d.ts +229 -0
  32. package/dist/components/RouterBtn.vue.d.ts.map +1 -0
  33. package/dist/components/Slider.vue.d.ts +293 -0
  34. package/dist/components/Slider.vue.d.ts.map +1 -0
  35. package/dist/components/Tab.vue.d.ts +53 -0
  36. package/dist/components/Tab.vue.d.ts.map +1 -0
  37. package/dist/components/TabCap.vue.d.ts +33 -0
  38. package/dist/components/TabCap.vue.d.ts.map +1 -0
  39. package/dist/components/Toggle.vue.d.ts +138 -0
  40. package/dist/components/Toggle.vue.d.ts.map +1 -0
  41. package/dist/components/ToolPanel.vue.d.ts +48 -0
  42. package/dist/components/ToolPanel.vue.d.ts.map +1 -0
  43. package/dist/components/VGroup.vue.d.ts +48 -0
  44. package/dist/components/VGroup.vue.d.ts.map +1 -0
  45. package/dist/components/index.d.ts +24 -0
  46. package/dist/components/index.d.ts.map +1 -0
  47. package/dist/components.css +1 -0
  48. package/dist/components.mjs +1719 -0
  49. package/dist/glyphs/GlyphCheck.vue.d.ts +3 -0
  50. package/dist/glyphs/GlyphCheck.vue.d.ts.map +1 -0
  51. package/dist/glyphs/GlyphXmark.vue.d.ts +3 -0
  52. package/dist/glyphs/GlyphXmark.vue.d.ts.map +1 -0
  53. package/dist/glyphs/index.d.ts +4 -0
  54. package/dist/glyphs/index.d.ts.map +1 -0
  55. package/dist/helpers/props.d.ts +13 -0
  56. package/dist/helpers/props.d.ts.map +1 -0
  57. package/dist/index.d.ts +7 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/types/MenuItem.d.ts +13 -0
  60. package/dist/types/MenuItem.d.ts.map +1 -0
  61. package/dist/types/SelectOption.d.ts +6 -0
  62. package/dist/types/SelectOption.d.ts.map +1 -0
  63. package/package.json +36 -5
  64. package/src/components/BaseMenu.vue +173 -0
  65. package/src/components/Btn.vue +385 -0
  66. package/src/components/Bubble.vue +143 -0
  67. package/src/components/Checkbox.vue +256 -0
  68. package/src/components/Chip.vue +189 -0
  69. package/src/components/ContextMenu.vue +71 -0
  70. package/src/components/ContextPopup.vue +166 -0
  71. package/src/components/Filler.vue +43 -0
  72. package/src/components/HGroup.vue +74 -0
  73. package/src/components/InputBase.vue +278 -0
  74. package/src/components/InputGroup.vue +43 -0
  75. package/src/components/InputSelect.vue +180 -0
  76. package/src/components/InputText.vue +103 -0
  77. package/src/components/InputTextarea.vue +130 -0
  78. package/src/components/ModalOverlay.vue +74 -0
  79. package/src/components/RouterBtn.vue +52 -0
  80. package/src/components/Slider.vue +689 -0
  81. package/src/components/Tab.vue +129 -0
  82. package/src/components/TabCap.vue +46 -0
  83. package/src/components/Toggle.vue +238 -0
  84. package/src/components/ToolPanel.vue +83 -0
  85. package/src/components/VGroup.vue +68 -0
  86. package/src/components/index.ts +47 -0
  87. package/src/glyphs/GlyphCheck.vue +12 -0
  88. package/src/glyphs/GlyphXmark.vue +12 -0
  89. package/src/glyphs/index.ts +7 -0
  90. package/src/helpers/props.ts +60 -0
  91. package/src/index.ts +10 -0
  92. package/src/types/MenuItem.ts +12 -0
  93. package/src/types/SelectOption.ts +5 -0
  94. package/src/types.d.ts +6 -0
  95. package/README.md +0 -3
@@ -0,0 +1,1719 @@
1
+ import { openBlock as a, createBlock as v, resolveDynamicComponent as $, normalizeClass as h, withCtx as m, renderSlot as p, createElementBlock as d, createCommentVNode as b, toDisplayString as P, resolveComponent as g, Fragment as w, renderList as F, createElementVNode as c, Transition as G, Teleport as R, withModifiers as B, normalizeStyle as j, mergeProps as C, createVNode as A } from "vue";
2
+ function U(e) {
3
+ return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
4
+ }
5
+ function D(e, t) {
6
+ return Object.prototype.hasOwnProperty.call(e, t);
7
+ }
8
+ function q(e, t) {
9
+ const r = e?.$?.vnode?.props || {}, n = D(r, t) ? t : U(t);
10
+ return D(r, n) && r[n] !== void 0;
11
+ }
12
+ const y = {
13
+ inject: {
14
+ $nightshade: {
15
+ default: null
16
+ }
17
+ },
18
+ computed: {
19
+ resolvedProps() {
20
+ return H(this, this.$options);
21
+ }
22
+ }
23
+ };
24
+ function H(e, t) {
25
+ const r = {}, n = t?.props || {}, s = Object.keys(n), o = e?.$nightshade?.defaults || {};
26
+ for (const i of s) {
27
+ if (q(e, i)) {
28
+ r[i] = e.$props[i];
29
+ continue;
30
+ }
31
+ if (D(o, i)) {
32
+ r[i] = o[i];
33
+ continue;
34
+ }
35
+ r[i] = e.$props[i];
36
+ }
37
+ return r;
38
+ }
39
+ function I(e, t) {
40
+ const r = {}, n = e?.resolvedProps || H(e, e?.$options), s = Object.keys(t.props || {});
41
+ for (const o of s)
42
+ r[o] = n[o];
43
+ return r;
44
+ }
45
+ const f = (e, t) => {
46
+ const r = e.__vccOpts || e;
47
+ for (const [n, s] of t)
48
+ r[n] = s;
49
+ return r;
50
+ }, X = {
51
+ mixins: [y],
52
+ props: {
53
+ tagName: { type: String, default: "button" },
54
+ href: { type: String },
55
+ label: { type: String },
56
+ title: { type: String },
57
+ tone: { type: String },
58
+ size: { type: String },
59
+ flat: { type: Boolean, default: !1 },
60
+ outline: { type: Boolean, default: !1 },
61
+ round: { type: Boolean, default: !1 },
62
+ translucent: { type: Boolean, default: !1 },
63
+ ghost: { type: Boolean, default: !1 },
64
+ block: { type: Boolean, default: !1 },
65
+ square: { type: Boolean, default: !1 },
66
+ disabled: { type: Boolean, default: !1 },
67
+ forceFocus: { type: Boolean, default: !1 },
68
+ forceHover: { type: Boolean, default: !1 },
69
+ forceActive: { type: Boolean, default: !1 },
70
+ icon: { type: String },
71
+ iconPos: { type: String, default: "left" },
72
+ hoverOverrides: { type: Object },
73
+ activeOverrides: { type: Object },
74
+ focusOverrides: { type: Object }
75
+ },
76
+ data() {
77
+ return {
78
+ hover: !1,
79
+ active: !1,
80
+ focus: !1,
81
+ blocked: !1
82
+ };
83
+ },
84
+ computed: {
85
+ isButton() {
86
+ return this.resolvedProps.tagName === "button";
87
+ },
88
+ inactive() {
89
+ return this.resolvedProps.disabled || this.blocked;
90
+ },
91
+ baseStyle() {
92
+ const { resolvedProps: e } = this;
93
+ return {
94
+ tone: e.tone,
95
+ size: e.size,
96
+ flat: e.flat,
97
+ outline: e.outline,
98
+ round: e.round,
99
+ translucent: e.translucent,
100
+ ghost: e.ghost
101
+ };
102
+ },
103
+ effectiveStyle() {
104
+ const {
105
+ baseStyle: e,
106
+ hoverOverrides: t = {},
107
+ activeOverrides: r = {},
108
+ focusOverrides: n = {},
109
+ active: s,
110
+ hover: o,
111
+ focus: i,
112
+ resolvedProps: l
113
+ } = this, { forceActive: u, forceHover: k, forceFocus: z } = l, T = Object.assign({}, e);
114
+ return (s || u) && Object.assign(T, r), (o || k) && Object.assign(T, t), (i || z) && Object.assign(T, n), T;
115
+ }
116
+ },
117
+ methods: {
118
+ /** Only a `<button>` ignores clicks when disabled: stop them on any other tag (links, router links). */
119
+ onClickCapture(e) {
120
+ this.inactive && (e.preventDefault(), e.stopImmediatePropagation());
121
+ }
122
+ }
123
+ }, W = {
124
+ key: 0,
125
+ class: "Label"
126
+ };
127
+ function Y(e, t, r, n, s, o) {
128
+ return a(), v($(e.resolvedProps.tagName), {
129
+ ref: "button",
130
+ class: h(["Btn InputElement", [
131
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
132
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
133
+ `Btn-iconPos-${e.resolvedProps.iconPos}`,
134
+ {
135
+ "Btn-ghost": o.effectiveStyle.ghost,
136
+ "Btn-round": o.effectiveStyle.round,
137
+ "Btn-outline": o.effectiveStyle.outline,
138
+ "Btn-flat": o.effectiveStyle.flat,
139
+ "Btn-translucent": o.effectiveStyle.translucent && !o.effectiveStyle.ghost,
140
+ "Btn-square": e.resolvedProps.square,
141
+ "Btn-block": e.resolvedProps.block,
142
+ "Btn-disabled": o.inactive,
143
+ "Btn-forceFocus": e.resolvedProps.forceFocus,
144
+ "Btn-forceHover": e.resolvedProps.forceHover,
145
+ "Btn-forceActive": e.resolvedProps.forceActive
146
+ }
147
+ ]]),
148
+ disabled: o.isButton ? o.inactive : void 0,
149
+ "aria-disabled": !o.isButton && o.inactive ? "true" : void 0,
150
+ tabindex: !o.isButton && o.inactive ? -1 : void 0,
151
+ title: e.resolvedProps.title ?? e.resolvedProps.label,
152
+ href: o.inactive ? void 0 : e.resolvedProps.href,
153
+ onClickCapture: o.onClickCapture,
154
+ onMouseenter: t[0] || (t[0] = (i) => s.hover = !0),
155
+ onMouseleave: t[1] || (t[1] = (i) => s.hover = !1),
156
+ onMousedown: t[2] || (t[2] = (i) => s.active = !0),
157
+ onMouseup: t[3] || (t[3] = (i) => s.active = !1),
158
+ onMouseout: t[4] || (t[4] = (i) => s.active = !1),
159
+ onFocusin: t[5] || (t[5] = (i) => s.focus = !0),
160
+ onFocusout: t[6] || (t[6] = (i) => s.focus = !1)
161
+ }, {
162
+ default: m(() => [
163
+ p(e.$slots, "before", {
164
+ hover: s.hover,
165
+ active: s.active,
166
+ focus: s.focus,
167
+ blocked: s.blocked
168
+ }, void 0, !0),
169
+ p(e.$slots, "default", {
170
+ hover: s.hover,
171
+ active: s.active,
172
+ focus: s.focus,
173
+ blocked: s.blocked
174
+ }, () => [
175
+ e.resolvedProps.icon ? (a(), d("i", {
176
+ key: 0,
177
+ class: h([e.resolvedProps.icon, "Icon"])
178
+ }, null, 2)) : b("", !0),
179
+ p(e.$slots, "label", {
180
+ hover: s.hover,
181
+ active: s.active,
182
+ focus: s.focus,
183
+ blocked: s.blocked
184
+ }, () => [
185
+ e.resolvedProps.label ? (a(), d("span", W, P(e.resolvedProps.label), 1)) : b("", !0)
186
+ ], !0)
187
+ ], !0),
188
+ p(e.$slots, "after", {
189
+ hover: s.hover,
190
+ active: s.active,
191
+ focus: s.focus,
192
+ blocked: s.blocked
193
+ }, void 0, !0)
194
+ ]),
195
+ _: 3
196
+ }, 40, ["class", "disabled", "aria-disabled", "tabindex", "title", "href", "onClickCapture"]);
197
+ }
198
+ const E = /* @__PURE__ */ f(X, [["render", Y], ["__scopeId", "data-v-d6869d7b"]]), Z = {
199
+ mixins: [y],
200
+ props: {
201
+ tagName: { type: String, default: "div" },
202
+ align: { type: String, default: "stretch" },
203
+ justify: { type: String },
204
+ gap: { type: String, default: "2" }
205
+ }
206
+ };
207
+ function J(e, t, r, n, s, o) {
208
+ return a(), v($(e.resolvedProps.tagName), {
209
+ class: h(["VGroup", [
210
+ `VGroup-align-${e.resolvedProps.align}`,
211
+ `VGroup-justify-${e.resolvedProps.justify}`,
212
+ `VGroup-gap-${e.resolvedProps.gap}`
213
+ ]])
214
+ }, {
215
+ default: m(() => [
216
+ p(e.$slots, "default", {}, void 0, !0)
217
+ ]),
218
+ _: 3
219
+ }, 8, ["class"]);
220
+ }
221
+ const N = /* @__PURE__ */ f(Z, [["render", J], ["__scopeId", "data-v-232c0628"]]), Q = {
222
+ components: {
223
+ Btn: E,
224
+ VGroup: N
225
+ },
226
+ mixins: [y],
227
+ props: {
228
+ items: { type: Array, default: () => [] },
229
+ size: { type: String },
230
+ round: { type: Boolean, default: !1 },
231
+ autoFocus: { type: Boolean, default: !1 }
232
+ },
233
+ emits: [
234
+ "activate"
235
+ ],
236
+ mounted() {
237
+ this.resolvedProps.autoFocus && this.$nextTick(() => {
238
+ const e = this.getFocusableEls()[0];
239
+ e && e.focus();
240
+ });
241
+ },
242
+ methods: {
243
+ getItemType(e) {
244
+ return e.type || "normal";
245
+ },
246
+ getFocusableEls() {
247
+ return Array.from(this.$el.querySelectorAll(".Item:not(:disabled)"));
248
+ },
249
+ onKeyDown(e) {
250
+ if (e.key === "ArrowUp" || e.key === "ArrowDown") {
251
+ e.preventDefault();
252
+ const t = this.getFocusableEls();
253
+ if (!t.length)
254
+ return;
255
+ const r = document.activeElement;
256
+ let n = t.findIndex((s) => s === r || s.contains(r));
257
+ e.key === "ArrowDown" ? n = (n + 1) % t.length : n = (n + t.length - 1) % t.length, t[n]?.focus();
258
+ }
259
+ },
260
+ onItemClick(e, t) {
261
+ e.disabled || (typeof e.activate == "function" && e.activate(), this.$emit("activate", e, t));
262
+ }
263
+ }
264
+ }, x = {
265
+ key: 0,
266
+ class: "Header"
267
+ }, ee = {
268
+ key: 1,
269
+ class: "Separator"
270
+ }, te = { class: "Title" }, oe = {
271
+ key: 0,
272
+ class: "CheckIcon"
273
+ };
274
+ function se(e, t, r, n, s, o) {
275
+ const i = g("Btn"), l = g("VGroup");
276
+ return a(), v(l, {
277
+ class: h(["BaseMenu", [
278
+ e.resolvedProps.size && `input-size-${e.resolvedProps.size}`
279
+ ]]),
280
+ onKeydown: o.onKeyDown
281
+ }, {
282
+ default: m(() => [
283
+ (a(!0), d(w, null, F(r.items, (u, k) => (a(), d(w, { key: k }, [
284
+ o.getItemType(u) === "header" ? (a(), d("div", x, P(u.title), 1)) : b("", !0),
285
+ o.getItemType(u) === "separator" ? (a(), d("div", ee)) : b("", !0),
286
+ o.getItemType(u) === "normal" ? (a(), v(i, {
287
+ key: 2,
288
+ class: h(["Item", {
289
+ "Item-checked": u.checked
290
+ }]),
291
+ tone: u.tone,
292
+ size: e.resolvedProps.size,
293
+ round: e.resolvedProps.round,
294
+ flat: !0,
295
+ ghost: u.ghost ?? !0,
296
+ outline: u.outline,
297
+ disabled: u.disabled,
298
+ icon: u.icon,
299
+ onClick: (z) => o.onItemClick(u, z)
300
+ }, {
301
+ label: m(() => [
302
+ c("div", te, P(u.title), 1)
303
+ ]),
304
+ after: m(() => [
305
+ u.checked ? (a(), d("span", oe, " ✓ ")) : b("", !0)
306
+ ]),
307
+ _: 2
308
+ }, 1032, ["class", "tone", "size", "round", "ghost", "outline", "disabled", "icon", "onClick"])) : b("", !0)
309
+ ], 64))), 128))
310
+ ]),
311
+ _: 1
312
+ }, 8, ["class", "onKeydown"]);
313
+ }
314
+ const O = /* @__PURE__ */ f(Q, [["render", se], ["__scopeId", "data-v-92b75163"]]), re = {
315
+ mixins: [y],
316
+ props: {
317
+ dir: { type: String, default: "bottom" },
318
+ align: { type: String, default: "start" },
319
+ arrowShown: { type: Boolean, default: !0 }
320
+ }
321
+ }, ne = {
322
+ key: 0,
323
+ class: "Arrow"
324
+ }, le = { class: "Body" };
325
+ function ie(e, t, r, n, s, o) {
326
+ return a(), v(G, {
327
+ name: "fade-" + e.resolvedProps.dir,
328
+ appear: ""
329
+ }, {
330
+ default: m(() => [
331
+ c("div", {
332
+ class: h(["Bubble", [
333
+ `Bubble-${e.resolvedProps.dir}`,
334
+ `Bubble-${e.resolvedProps.align}`
335
+ ]])
336
+ }, [
337
+ e.resolvedProps.arrowShown ? (a(), d("div", ne)) : b("", !0),
338
+ c("div", le, [
339
+ p(e.$slots, "default", {}, void 0, !0)
340
+ ])
341
+ ], 2)
342
+ ]),
343
+ _: 3
344
+ }, 8, ["name"]);
345
+ }
346
+ const L = /* @__PURE__ */ f(re, [["render", ie], ["__scopeId", "data-v-99b7c1c3"]]), ae = {}, ue = {
347
+ viewBox: "0 0 32 32",
348
+ fill: "none",
349
+ stroke: "currentColor",
350
+ "stroke-width": "3.2",
351
+ "stroke-linecap": "round",
352
+ "stroke-linejoin": "round",
353
+ "aria-hidden": "true"
354
+ };
355
+ function de(e, t) {
356
+ return a(), d("svg", ue, [...t[0] || (t[0] = [
357
+ c("path", { d: "M7 17L13 23L25 10" }, null, -1)
358
+ ])]);
359
+ }
360
+ const pe = /* @__PURE__ */ f(ae, [["render", de]]), fe = {}, ce = {
361
+ viewBox: "0 0 32 32",
362
+ fill: "none",
363
+ stroke: "currentColor",
364
+ "stroke-width": "3",
365
+ "stroke-linecap": "round",
366
+ "stroke-linejoin": "round",
367
+ "aria-hidden": "true"
368
+ };
369
+ function ve(e, t) {
370
+ return a(), d("svg", ce, [...t[0] || (t[0] = [
371
+ c("path", { d: "M10 10L22 22M22 10L10 22" }, null, -1)
372
+ ])]);
373
+ }
374
+ const ye = /* @__PURE__ */ f(fe, [["render", ve]]), he = {
375
+ mixins: [y],
376
+ props: {
377
+ mark: { type: String, default: "check" },
378
+ modelValue: { type: Boolean },
379
+ disabled: { type: Boolean },
380
+ tone: { type: String },
381
+ activeTone: { type: String },
382
+ size: { type: String },
383
+ round: { type: Boolean, default: !1 },
384
+ flat: { type: Boolean, default: !1 },
385
+ outline: { type: Boolean, default: !1 },
386
+ forceFocus: { type: Boolean, default: !1 },
387
+ forceHover: { type: Boolean, default: !1 },
388
+ focusOverrides: { type: Object },
389
+ hoverOverrides: { type: Object }
390
+ },
391
+ emits: [
392
+ "update:modelValue"
393
+ ],
394
+ data() {
395
+ return {
396
+ hover: !1,
397
+ focus: !1
398
+ };
399
+ },
400
+ computed: {
401
+ markComponent() {
402
+ return this.resolvedProps.mark === "check" ? pe : this.resolvedProps.mark === "xmark" ? ye : null;
403
+ },
404
+ isActive() {
405
+ return !!this.resolvedProps.modelValue;
406
+ },
407
+ baseStyle() {
408
+ const { resolvedProps: e } = this;
409
+ return {
410
+ tone: (this.isActive ? e.activeTone : e.tone) ?? e.tone,
411
+ size: e.size,
412
+ round: e.round,
413
+ outline: e.outline,
414
+ flat: e.flat
415
+ };
416
+ },
417
+ effectiveStyle() {
418
+ const {
419
+ baseStyle: e,
420
+ hoverOverrides: t = {},
421
+ focusOverrides: r = {},
422
+ hover: n,
423
+ focus: s,
424
+ resolvedProps: o
425
+ } = this, { forceHover: i, forceFocus: l } = o, u = Object.assign({}, e);
426
+ return (n || i) && Object.assign(u, t), (s || l) && Object.assign(u, r), u;
427
+ }
428
+ },
429
+ methods: {
430
+ onChange(e) {
431
+ this.$emit("update:modelValue", e.target.checked);
432
+ }
433
+ }
434
+ }, me = ["tabindex"], be = {
435
+ key: 1,
436
+ class: "Mark"
437
+ }, ge = ["checked", "disabled"];
438
+ function Pe(e, t, r, n, s, o) {
439
+ return a(), d("label", {
440
+ class: h(["Checkbox InputElement", [
441
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
442
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
443
+ `Checkbox-mark-${e.resolvedProps.mark}`,
444
+ {
445
+ "Checkbox-active": !!e.resolvedProps.modelValue,
446
+ "Checkbox-outline": o.effectiveStyle.outline,
447
+ "Checkbox-round": o.effectiveStyle.round,
448
+ "Checkbox-flat": o.effectiveStyle.flat,
449
+ "Checkbox-disabled": e.resolvedProps.disabled,
450
+ "Checkbox-forceFocus": e.resolvedProps.forceFocus,
451
+ "Checkbox-forceHover": e.resolvedProps.forceHover
452
+ }
453
+ ]]),
454
+ tabindex: e.resolvedProps.disabled ? -1 : 0,
455
+ onMouseenter: t[1] || (t[1] = (i) => s.hover = !0),
456
+ onMouseleave: t[2] || (t[2] = (i) => s.hover = !1),
457
+ onFocusin: t[3] || (t[3] = (i) => s.focus = !0),
458
+ onFocusout: t[4] || (t[4] = (i) => s.focus = !1)
459
+ }, [
460
+ e.resolvedProps.modelValue ? p(e.$slots, "active", { key: 0 }, () => [
461
+ o.markComponent ? (a(), v($(o.markComponent), {
462
+ key: 0,
463
+ class: "Mark MarkGlyph"
464
+ })) : (a(), d("div", be))
465
+ ], !0) : b("", !0),
466
+ e.resolvedProps.modelValue ? b("", !0) : p(e.$slots, "inactive", { key: 1 }, void 0, !0),
467
+ c("input", {
468
+ type: "checkbox",
469
+ checked: e.resolvedProps.modelValue,
470
+ disabled: e.resolvedProps.disabled,
471
+ onChange: t[0] || (t[0] = (...i) => o.onChange && o.onChange(...i))
472
+ }, null, 40, ge)
473
+ ], 42, me);
474
+ }
475
+ const Se = /* @__PURE__ */ f(he, [["render", Pe], ["__scopeId", "data-v-fd0a45d1"]]), $e = {
476
+ mixins: [y],
477
+ props: {
478
+ tagName: { type: String, default: "button" },
479
+ label: { type: String },
480
+ icon: { type: String },
481
+ tone: { type: String },
482
+ size: { type: String },
483
+ flat: { type: Boolean, default: !1 },
484
+ outline: { type: Boolean, default: !1 },
485
+ round: { type: Boolean, default: !1 },
486
+ translucent: { type: Boolean, default: !1 },
487
+ disabled: { type: Boolean, default: !1 },
488
+ forceFocus: { type: Boolean, default: !1 },
489
+ forceHover: { type: Boolean, default: !1 }
490
+ },
491
+ computed: {
492
+ effectiveStyle() {
493
+ const { resolvedProps: e } = this;
494
+ return {
495
+ tone: e.tone,
496
+ size: e.size,
497
+ flat: e.flat,
498
+ outline: e.outline,
499
+ round: e.round,
500
+ translucent: e.translucent
501
+ };
502
+ }
503
+ }
504
+ }, ke = {
505
+ key: 1,
506
+ class: "Label"
507
+ };
508
+ function Be(e, t, r, n, s, o) {
509
+ return a(), v($(e.resolvedProps.tagName), {
510
+ class: h(["Chip InputElement", [
511
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
512
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
513
+ {
514
+ "Chip-round": o.effectiveStyle.round,
515
+ "Chip-outline": o.effectiveStyle.outline,
516
+ "Chip-flat": o.effectiveStyle.flat,
517
+ "Chip-translucent": o.effectiveStyle.translucent,
518
+ "Chip-disabled": e.resolvedProps.disabled,
519
+ "Chip-forceFocus": e.resolvedProps.forceFocus,
520
+ "Chip-forceHover": e.resolvedProps.forceHover
521
+ }
522
+ ]]),
523
+ disabled: e.resolvedProps.disabled
524
+ }, {
525
+ default: m(() => [
526
+ p(e.$slots, "before", {}, void 0, !0),
527
+ p(e.$slots, "default", {}, () => [
528
+ e.resolvedProps.icon ? (a(), d("i", {
529
+ key: 0,
530
+ class: h([e.resolvedProps.icon, "Icon"])
531
+ }, null, 2)) : b("", !0),
532
+ e.resolvedProps.label ? (a(), d("span", ke, P(e.resolvedProps.label), 1)) : b("", !0)
533
+ ], !0),
534
+ p(e.$slots, "after", {}, void 0, !0)
535
+ ]),
536
+ _: 3
537
+ }, 8, ["class", "disabled"]);
538
+ }
539
+ const we = /* @__PURE__ */ f($e, [["render", Be], ["__scopeId", "data-v-2d8b8114"]]), Te = {
540
+ mixins: [y],
541
+ props: {
542
+ overlayEnabled: { type: Boolean, default: !0 },
543
+ overlayShown: { type: Boolean, default: !0 }
544
+ },
545
+ emits: ["hide"],
546
+ mounted() {
547
+ window.addEventListener("keydown", this.onKeyDown);
548
+ },
549
+ beforeUnmount() {
550
+ window.removeEventListener("keydown", this.onKeyDown);
551
+ },
552
+ methods: {
553
+ hide() {
554
+ this.$emit("hide");
555
+ },
556
+ onKeyDown(e) {
557
+ e.key === "Escape" && (e.preventDefault(), this.hide());
558
+ }
559
+ }
560
+ };
561
+ function Ce(e, t, r, n, s, o) {
562
+ return a(), v(R, { to: "#overlays" }, [
563
+ c("div", {
564
+ class: h(["ModalOverlay", {
565
+ "ModalOverlay-enabled": e.resolvedProps.overlayEnabled,
566
+ "ModalOverlay-shown": e.resolvedProps.overlayShown
567
+ }]),
568
+ onClick: t[0] || (t[0] = B((...i) => o.hide && o.hide(...i), ["stop"]))
569
+ }, [
570
+ p(e.$slots, "default", {}, void 0, !0)
571
+ ], 2)
572
+ ]);
573
+ }
574
+ const _ = /* @__PURE__ */ f(Te, [["render", Ce], ["__scopeId", "data-v-f1088f36"]]), Ie = {
575
+ components: {
576
+ ModalOverlay: _
577
+ },
578
+ mixins: [y],
579
+ props: {
580
+ dir: { type: String, default: "v" },
581
+ align: { type: String, default: "auto" },
582
+ anchorRef: { type: String },
583
+ anchorDir: { type: String, default: "middle" },
584
+ overlayEnabled: { type: Boolean, default: !0 },
585
+ overlayShown: { type: Boolean, default: !0 },
586
+ arrowShown: { type: Boolean, default: !0 }
587
+ },
588
+ emits: ["hide", "mouseenter", "mouseleave", "ready"],
589
+ data() {
590
+ return {
591
+ pos: { x: 0, y: 0 },
592
+ actualDir: "bottom",
593
+ actualAlign: "start",
594
+ ready: !1
595
+ };
596
+ },
597
+ computed: {
598
+ bubbleStyle() {
599
+ const { x: e, y: t } = this.pos;
600
+ return {
601
+ left: `${e}px`,
602
+ top: `${t}px`,
603
+ "pointer-events": "auto"
604
+ };
605
+ }
606
+ },
607
+ mounted() {
608
+ this.$nextTick(() => this.calcPos()), window.addEventListener("resize", this.onResize);
609
+ },
610
+ beforeUnmount() {
611
+ window.removeEventListener("resize", this.onResize);
612
+ },
613
+ methods: {
614
+ hide() {
615
+ this.$emit("hide");
616
+ },
617
+ calcPos() {
618
+ const e = this.getAnchorEl();
619
+ e && (this.pos = this.getAnchorPoint(e, this.resolvedProps.anchorDir), this.calcDirAlign(), this.ready = !0, this.$nextTick(() => this.$emit("ready")));
620
+ },
621
+ calcDirAlign() {
622
+ const e = this.pos.y < window.innerHeight * 0.5, t = this.pos.x < window.innerWidth * 0.5, { align: r, dir: n } = this.resolvedProps;
623
+ r === "auto" ? ["top", "bottom", "v"].includes(n) ? this.actualAlign = t ? "start" : "end" : this.actualAlign = e ? "start" : "end" : this.actualAlign = r, n === "v" ? this.actualDir = e ? "bottom" : "top" : n === "h" ? this.actualDir = t ? "right" : "left" : this.actualDir = n;
624
+ },
625
+ getAnchorEl() {
626
+ if (this.resolvedProps.anchorRef) {
627
+ const e = this.findRef(this.$parent, this.resolvedProps.anchorRef);
628
+ if (e)
629
+ return e;
630
+ }
631
+ return this.$el.parentElement;
632
+ },
633
+ findRef(e, t) {
634
+ if (!e)
635
+ return null;
636
+ const r = e.$refs[t];
637
+ if (r) {
638
+ const n = r.$el ?? r;
639
+ if (n instanceof HTMLElement)
640
+ return n;
641
+ }
642
+ return e.$parent ? this.findRef(e.$parent, t) : null;
643
+ },
644
+ getAnchorPoint(e, t) {
645
+ const { top: r, left: n, width: s, height: o } = e.getBoundingClientRect();
646
+ switch (t) {
647
+ case "left":
648
+ return { x: n, y: r + o * 0.5 };
649
+ case "right":
650
+ return { x: n + s, y: r + o * 0.5 };
651
+ case "top":
652
+ return { x: n + s * 0.5, y: r };
653
+ case "bottom":
654
+ return { x: n + s * 0.5, y: r + o };
655
+ default:
656
+ return { x: n + s * 0.5, y: r + o * 0.5 };
657
+ }
658
+ },
659
+ onResize() {
660
+ this.calcPos();
661
+ }
662
+ }
663
+ };
664
+ function ze(e, t, r, n, s, o) {
665
+ const i = g("Bubble"), l = g("ModalOverlay");
666
+ return a(), v(l, {
667
+ overlayEnabled: e.resolvedProps.overlayEnabled,
668
+ overlayShown: e.resolvedProps.overlayShown,
669
+ onHide: o.hide
670
+ }, {
671
+ default: m(() => [
672
+ s.ready ? (a(), v(i, {
673
+ key: 0,
674
+ dir: s.actualDir,
675
+ align: s.actualAlign,
676
+ style: j(o.bubbleStyle),
677
+ arrowShown: e.resolvedProps.arrowShown,
678
+ onMouseenter: t[0] || (t[0] = (u) => e.$emit("mouseenter")),
679
+ onMouseleave: t[1] || (t[1] = (u) => e.$emit("mouseleave")),
680
+ onClick: t[2] || (t[2] = B(() => {
681
+ }, ["stop"]))
682
+ }, {
683
+ default: m(() => [
684
+ p(e.$slots, "default")
685
+ ]),
686
+ _: 3
687
+ }, 8, ["dir", "align", "style", "arrowShown"])) : b("", !0)
688
+ ]),
689
+ _: 3
690
+ }, 8, ["overlayEnabled", "overlayShown", "onHide"]);
691
+ }
692
+ const V = /* @__PURE__ */ f(Ie, [["render", ze]]), Oe = {
693
+ components: {
694
+ ContextPopup: V,
695
+ BaseMenu: O
696
+ },
697
+ mixins: [y],
698
+ inheritAttrs: !1,
699
+ props: {
700
+ ...V.props,
701
+ ...O.props,
702
+ autoFocus: { type: Boolean, default: !0 }
703
+ },
704
+ emits: [
705
+ ...V.emits || [],
706
+ ...O.emits || []
707
+ ],
708
+ computed: {
709
+ contextPopupProps() {
710
+ return I(this, V);
711
+ },
712
+ baseMenuProps() {
713
+ return I(this, O);
714
+ }
715
+ },
716
+ methods: {
717
+ hide() {
718
+ this.$refs.popup?.hide();
719
+ },
720
+ onActivate(e, t) {
721
+ this.$emit("activate", e, t);
722
+ }
723
+ }
724
+ };
725
+ function Ve(e, t, r, n, s, o) {
726
+ const i = g("BaseMenu"), l = g("ContextPopup");
727
+ return a(), v(l, C({ ref: "popup" }, o.contextPopupProps, {
728
+ onHide: t[0] || (t[0] = (u) => e.$emit("hide")),
729
+ onMouseenter: t[1] || (t[1] = (u) => e.$emit("mouseenter")),
730
+ onMouseleave: t[2] || (t[2] = (u) => e.$emit("mouseleave")),
731
+ onReady: t[3] || (t[3] = (u) => e.$emit("ready"))
732
+ }), {
733
+ default: m(() => [
734
+ A(i, C({ class: "ContextMenu" }, { ...o.baseMenuProps, ...e.$attrs }, { onActivate: o.onActivate }), null, 16, ["onActivate"])
735
+ ]),
736
+ _: 1
737
+ }, 16);
738
+ }
739
+ const Fe = /* @__PURE__ */ f(Oe, [["render", Ve]]), Ee = {
740
+ mixins: [y],
741
+ props: {
742
+ fill: { type: String, default: "none" }
743
+ }
744
+ };
745
+ function Me(e, t, r, n, s, o) {
746
+ return a(), d("div", {
747
+ class: h(["Filler", [
748
+ `Filler-${e.resolvedProps.fill}`
749
+ ]])
750
+ }, null, 2);
751
+ }
752
+ const Ae = /* @__PURE__ */ f(Ee, [["render", Me], ["__scopeId", "data-v-e6acedec"]]), je = {
753
+ mixins: [y],
754
+ props: {
755
+ tagName: { type: String, default: "div" },
756
+ align: { type: String, default: "center" },
757
+ justify: { type: String },
758
+ gap: { type: String, default: "1" },
759
+ wrap: { type: Boolean, default: !1 }
760
+ }
761
+ };
762
+ function De(e, t, r, n, s, o) {
763
+ return a(), v($(e.resolvedProps.tagName), {
764
+ class: h(["HGroup", [
765
+ `HGroup-align-${e.resolvedProps.align}`,
766
+ `HGroup-justify-${e.resolvedProps.justify}`,
767
+ `HGroup-gap-${e.resolvedProps.gap}`,
768
+ {
769
+ "HGroup-wrap": e.resolvedProps.wrap
770
+ }
771
+ ]])
772
+ }, {
773
+ default: m(() => [
774
+ p(e.$slots, "default", {}, void 0, !0)
775
+ ]),
776
+ _: 3
777
+ }, 8, ["class"]);
778
+ }
779
+ const He = /* @__PURE__ */ f(je, [["render", De], ["__scopeId", "data-v-64030310"]]), Ne = {
780
+ mixins: [y],
781
+ props: {
782
+ tagName: { type: String, default: "div" },
783
+ dir: { type: String, default: "top" },
784
+ label: { type: String },
785
+ size: { type: String },
786
+ tone: { type: String }
787
+ },
788
+ computed: {
789
+ orientation() {
790
+ const { dir: e } = this.resolvedProps;
791
+ return e === "top" || e === "bottom" ? "h" : "v";
792
+ }
793
+ }
794
+ }, Le = { class: "Content" }, _e = ["title"];
795
+ function Ke(e, t, r, n, s, o) {
796
+ const i = g("TabCap");
797
+ return a(), v($(e.resolvedProps.tagName), {
798
+ class: h(["Tab", [
799
+ e.resolvedProps.tone && `tone-${e.resolvedProps.tone}`,
800
+ e.resolvedProps.size && `input-size-${e.resolvedProps.size}`,
801
+ `Tab-${e.resolvedProps.dir}`,
802
+ `Tab-${o.orientation}`
803
+ ]])
804
+ }, {
805
+ default: m(() => [
806
+ A(i, {
807
+ class: "TabCap",
808
+ dir: e.resolvedProps.dir,
809
+ type: "start"
810
+ }, null, 8, ["dir"]),
811
+ c("div", Le, [
812
+ p(e.$slots, "default", {}, () => [
813
+ e.resolvedProps.label ? (a(), d("div", {
814
+ key: 0,
815
+ class: "TabLabel",
816
+ title: e.resolvedProps.label
817
+ }, P(e.resolvedProps.label), 9, _e)) : b("", !0)
818
+ ], !0)
819
+ ]),
820
+ A(i, {
821
+ class: "TabCap",
822
+ dir: e.resolvedProps.dir,
823
+ type: "end"
824
+ }, null, 8, ["dir"])
825
+ ]),
826
+ _: 3
827
+ }, 8, ["class"]);
828
+ }
829
+ const K = /* @__PURE__ */ f(Ne, [["render", Ke], ["__scopeId", "data-v-fb4c513d"]]), Ge = {
830
+ components: {
831
+ Tab: K
832
+ },
833
+ mixins: [y],
834
+ props: {
835
+ tagName: { default: "label" },
836
+ tone: { type: String },
837
+ label: { type: String },
838
+ labelStyle: { type: String, default: "inline" },
839
+ size: { type: String },
840
+ fixedHeight: { type: Boolean, default: !0 },
841
+ flat: { type: Boolean, default: !1 },
842
+ round: { type: Boolean, default: !1 },
843
+ outline: { type: Boolean, default: !1 },
844
+ disabled: { type: Boolean, default: !1 },
845
+ forceFocus: { type: Boolean, default: !1 },
846
+ forceHover: { type: Boolean, default: !1 },
847
+ hoverOverrides: { type: Object },
848
+ focusOverrides: { type: Object }
849
+ },
850
+ data() {
851
+ return {
852
+ hover: !1,
853
+ focus: !1
854
+ };
855
+ },
856
+ computed: {
857
+ baseStyle() {
858
+ const { resolvedProps: e } = this;
859
+ return {
860
+ tone: e.tone,
861
+ size: e.size,
862
+ flat: e.flat,
863
+ round: e.round,
864
+ outline: e.outline,
865
+ labelStyle: e.labelStyle
866
+ };
867
+ },
868
+ effectiveStyle() {
869
+ const {
870
+ baseStyle: e,
871
+ hoverOverrides: t = {},
872
+ focusOverrides: r = {},
873
+ hover: n,
874
+ focus: s,
875
+ resolvedProps: o
876
+ } = this, { forceHover: i, forceFocus: l } = o, u = Object.assign({}, e);
877
+ return (n || i) && Object.assign(u, t), (s || l) && Object.assign(u, r), u;
878
+ }
879
+ }
880
+ }, Re = {
881
+ key: 1,
882
+ class: "Label TextLabel"
883
+ }, Ue = {
884
+ key: 2,
885
+ class: "Label InlineLabel"
886
+ }, qe = { class: "InputElement Container" };
887
+ function Xe(e, t, r, n, s, o) {
888
+ const i = g("Tab");
889
+ return a(), v($(e.resolvedProps.tagName), {
890
+ class: h(["InputBase", [
891
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
892
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
893
+ {
894
+ "InputBase-fixedHeight": e.resolvedProps.fixedHeight,
895
+ "InputBase-flat": o.effectiveStyle.flat,
896
+ "InputBase-round": o.effectiveStyle.round,
897
+ "InputBase-disabled": e.resolvedProps.disabled,
898
+ "InputBase-forceFocus": e.resolvedProps.forceFocus,
899
+ "InputBase-forceHover": e.resolvedProps.forceHover
900
+ }
901
+ ]]),
902
+ onMouseenter: t[0] || (t[0] = (l) => s.hover = !0),
903
+ onMouseleave: t[1] || (t[1] = (l) => s.hover = !1),
904
+ onFocusin: t[2] || (t[2] = (l) => s.focus = !0),
905
+ onFocusout: t[3] || (t[3] = (l) => s.focus = !1)
906
+ }, {
907
+ default: m(() => [
908
+ e.resolvedProps.label ? (a(), d(w, { key: 0 }, [
909
+ e.resolvedProps.labelStyle === "tab" ? (a(), v(i, {
910
+ key: 0,
911
+ class: "Label TabLabel",
912
+ label: e.resolvedProps.label,
913
+ tone: o.effectiveStyle.tone
914
+ }, null, 8, ["label", "tone"])) : b("", !0),
915
+ e.resolvedProps.labelStyle === "text" ? (a(), d("div", Re, P(e.resolvedProps.label), 1)) : b("", !0),
916
+ e.resolvedProps.labelStyle === "inline" ? (a(), d("div", Ue, P(e.resolvedProps.label), 1)) : b("", !0)
917
+ ], 64)) : b("", !0),
918
+ c("div", qe, [
919
+ p(e.$slots, "default", {}, void 0, !0)
920
+ ])
921
+ ]),
922
+ _: 3
923
+ }, 40, ["class"]);
924
+ }
925
+ const S = /* @__PURE__ */ f(Ge, [["render", Xe], ["__scopeId", "data-v-273a40fd"]]), We = {
926
+ mixins: [y],
927
+ props: {
928
+ tagName: { type: String, default: "div" }
929
+ }
930
+ };
931
+ function Ye(e, t, r, n, s, o) {
932
+ return a(), v($(e.resolvedProps.tagName), { class: "InputGroup" }, {
933
+ default: m(() => [
934
+ p(e.$slots, "default", {}, void 0, !0)
935
+ ]),
936
+ _: 3
937
+ });
938
+ }
939
+ const Ze = /* @__PURE__ */ f(We, [["render", Ye], ["__scopeId", "data-v-c0fbdcc0"]]), Je = {
940
+ components: {
941
+ InputBase: S
942
+ },
943
+ mixins: [y],
944
+ props: {
945
+ ...S.props,
946
+ tagName: { type: String, default: "label" },
947
+ modelValue: { type: [String, Number] },
948
+ options: {
949
+ type: Array,
950
+ default: () => []
951
+ },
952
+ autoFocus: { type: Boolean },
953
+ readonly: { type: Boolean }
954
+ },
955
+ emits: [
956
+ "focus",
957
+ "blur",
958
+ "input",
959
+ "change",
960
+ "update:modelValue"
961
+ ],
962
+ computed: {
963
+ inputBaseProps() {
964
+ return I(this, S);
965
+ },
966
+ hasGroupedOptions() {
967
+ return this.resolvedProps.options.some((e) => e?.group);
968
+ },
969
+ groupedOptions() {
970
+ const e = [{
971
+ label: "",
972
+ options: []
973
+ }];
974
+ for (const t of this.resolvedProps.options) {
975
+ const r = t?.group ?? "", n = e.find((s) => s.label === r);
976
+ n ? n.options.push(t) : e.push({
977
+ label: r,
978
+ options: [t]
979
+ });
980
+ }
981
+ return e;
982
+ }
983
+ },
984
+ mounted() {
985
+ this.resolvedProps.autoFocus && this.$refs.input?.focus();
986
+ },
987
+ methods: {
988
+ onInput(e) {
989
+ this.$emit("input", e);
990
+ },
991
+ onChange(e) {
992
+ if (this.resolvedProps.readonly) {
993
+ e.target.value = this.resolvedProps.modelValue;
994
+ return;
995
+ }
996
+ this.$emit("change", e), this.$emit("update:modelValue", e.target.value);
997
+ },
998
+ optionLabel(e) {
999
+ return String(e?.label ?? e?.value ?? "");
1000
+ },
1001
+ optionKey(e) {
1002
+ return `${e?.group ?? ""}:${String(e?.value ?? "")}`;
1003
+ },
1004
+ onBaseClick(e) {
1005
+ const t = this.$refs.input;
1006
+ e.target !== t && (e.preventDefault(), typeof t.showPicker == "function" ? t.showPicker() : t.click());
1007
+ }
1008
+ }
1009
+ }, Qe = ["value", "disabled", "aria-readonly"], xe = ["label"], et = ["value"], tt = ["value"];
1010
+ function ot(e, t, r, n, s, o) {
1011
+ const i = g("InputBase");
1012
+ return a(), v(i, C({ class: "InputSelect" }, o.inputBaseProps, {
1013
+ onClick: t[4] || (t[4] = (l) => o.onBaseClick(l))
1014
+ }), {
1015
+ default: m(() => [
1016
+ p(e.$slots, "before", {}, void 0, !0),
1017
+ c("select", {
1018
+ ref: "input",
1019
+ value: e.resolvedProps.modelValue,
1020
+ disabled: e.resolvedProps.disabled,
1021
+ "aria-readonly": e.resolvedProps.readonly,
1022
+ onInput: t[0] || (t[0] = (l) => o.onInput(l)),
1023
+ onChange: t[1] || (t[1] = (l) => o.onChange(l)),
1024
+ onFocus: t[2] || (t[2] = (l) => e.$emit("focus", l)),
1025
+ onBlur: t[3] || (t[3] = (l) => e.$emit("blur", l))
1026
+ }, [
1027
+ o.hasGroupedOptions ? (a(!0), d(w, { key: 0 }, F(o.groupedOptions, (l) => (a(), d("optgroup", {
1028
+ key: l.label,
1029
+ label: l.label
1030
+ }, [
1031
+ (a(!0), d(w, null, F(l.options, (u) => (a(), d("option", {
1032
+ key: o.optionKey(u),
1033
+ value: u.value
1034
+ }, P(o.optionLabel(u)), 9, et))), 128))
1035
+ ], 8, xe))), 128)) : (a(!0), d(w, { key: 1 }, F(e.resolvedProps.options, (l) => (a(), d("option", {
1036
+ key: o.optionKey(l),
1037
+ value: l.value
1038
+ }, P(o.optionLabel(l)), 9, tt))), 128))
1039
+ ], 40, Qe),
1040
+ p(e.$slots, "after", {}, void 0, !0)
1041
+ ]),
1042
+ _: 3
1043
+ }, 16);
1044
+ }
1045
+ const st = /* @__PURE__ */ f(Je, [["render", ot], ["__scopeId", "data-v-f10cecb8"]]), rt = {
1046
+ components: {
1047
+ InputBase: S
1048
+ },
1049
+ mixins: [y],
1050
+ props: {
1051
+ ...S.props,
1052
+ tagName: { type: String, default: "label" },
1053
+ modelValue: { type: [String, Number] },
1054
+ type: { type: String },
1055
+ placeholder: { type: String },
1056
+ min: { type: Number },
1057
+ max: { type: Number },
1058
+ step: { type: Number },
1059
+ autoFocus: { type: Boolean },
1060
+ readonly: { type: Boolean }
1061
+ },
1062
+ emits: [
1063
+ "focus",
1064
+ "blur",
1065
+ "input",
1066
+ "update:modelValue"
1067
+ ],
1068
+ computed: {
1069
+ inputBaseProps() {
1070
+ return I(this, S);
1071
+ }
1072
+ },
1073
+ mounted() {
1074
+ this.resolvedProps.autoFocus && this.$refs.input?.focus();
1075
+ },
1076
+ methods: {
1077
+ onInput(e) {
1078
+ this.$emit("input", e), this.$emit("update:modelValue", e.target.value);
1079
+ }
1080
+ }
1081
+ }, nt = ["value", "type", "placeholder", "readonly", "disabled", "min", "max", "step"];
1082
+ function lt(e, t, r, n, s, o) {
1083
+ const i = g("InputBase");
1084
+ return a(), v(i, C({ class: "InputText" }, o.inputBaseProps), {
1085
+ default: m(() => [
1086
+ p(e.$slots, "before", {}, void 0, !0),
1087
+ c("input", {
1088
+ ref: "input",
1089
+ value: e.resolvedProps.modelValue,
1090
+ type: e.resolvedProps.type,
1091
+ placeholder: e.resolvedProps.placeholder,
1092
+ readonly: e.resolvedProps.readonly,
1093
+ disabled: e.resolvedProps.disabled,
1094
+ min: e.resolvedProps.min,
1095
+ max: e.resolvedProps.max,
1096
+ step: e.resolvedProps.step,
1097
+ autocomplete: "off",
1098
+ onInput: t[0] || (t[0] = (l) => o.onInput(l)),
1099
+ onFocus: t[1] || (t[1] = (l) => e.$emit("focus", l)),
1100
+ onBlur: t[2] || (t[2] = (l) => e.$emit("blur", l))
1101
+ }, null, 40, nt),
1102
+ p(e.$slots, "after", {}, void 0, !0)
1103
+ ]),
1104
+ _: 3
1105
+ }, 16);
1106
+ }
1107
+ const it = /* @__PURE__ */ f(rt, [["render", lt], ["__scopeId", "data-v-799a626e"]]), at = {
1108
+ components: {
1109
+ InputBase: S
1110
+ },
1111
+ mixins: [y],
1112
+ props: {
1113
+ ...S.props,
1114
+ tagName: { type: String, default: "label" },
1115
+ modelValue: { type: String },
1116
+ placeholder: { type: String },
1117
+ rows: { type: Number },
1118
+ autoSize: { type: Boolean, default: !0 },
1119
+ autoFocus: { type: Boolean },
1120
+ readonly: { type: Boolean }
1121
+ },
1122
+ emits: [
1123
+ "focus",
1124
+ "blur",
1125
+ "input",
1126
+ "update:modelValue"
1127
+ ],
1128
+ computed: {
1129
+ inputBaseProps() {
1130
+ return I(this, S);
1131
+ }
1132
+ },
1133
+ watch: {
1134
+ modelValue: {
1135
+ handler() {
1136
+ const e = this.$refs.input;
1137
+ this.resolvedProps.autoSize && e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
1138
+ }
1139
+ }
1140
+ },
1141
+ mounted() {
1142
+ this.$nextTick(() => {
1143
+ const e = this.$refs.input;
1144
+ this.resolvedProps.autoFocus && e.focus(), this.resolvedProps.autoSize && (e.style.height = e.scrollHeight + "px", e.style.overflowY = "hidden");
1145
+ });
1146
+ },
1147
+ methods: {
1148
+ onInput(e) {
1149
+ this.$emit("input", e), this.$emit("update:modelValue", e.target.value);
1150
+ }
1151
+ }
1152
+ }, ut = ["value", "placeholder", "readonly", "disabled", "rows"];
1153
+ function dt(e, t, r, n, s, o) {
1154
+ const i = g("InputBase");
1155
+ return a(), v(i, C({ class: "InputTextarea" }, o.inputBaseProps, { fixedHeight: !1 }), {
1156
+ default: m(() => [
1157
+ p(e.$slots, "before", {}, void 0, !0),
1158
+ c("textarea", {
1159
+ ref: "input",
1160
+ value: e.resolvedProps.modelValue,
1161
+ placeholder: e.resolvedProps.placeholder,
1162
+ readonly: e.resolvedProps.readonly,
1163
+ disabled: e.resolvedProps.disabled,
1164
+ rows: e.resolvedProps.rows,
1165
+ resize: "none",
1166
+ autocomplete: "off",
1167
+ onInput: t[0] || (t[0] = (l) => o.onInput(l)),
1168
+ onFocus: t[1] || (t[1] = (l) => e.$emit("focus", l)),
1169
+ onBlur: t[2] || (t[2] = (l) => e.$emit("blur", l))
1170
+ }, null, 40, ut),
1171
+ p(e.$slots, "after", {}, void 0, !0)
1172
+ ]),
1173
+ _: 3
1174
+ }, 16);
1175
+ }
1176
+ const pt = /* @__PURE__ */ f(at, [["render", dt], ["__scopeId", "data-v-963c7073"]]), ft = {
1177
+ components: {
1178
+ Btn: E
1179
+ },
1180
+ mixins: [y],
1181
+ props: {
1182
+ ...E.props,
1183
+ to: { required: !0 },
1184
+ baseProps: { type: Object },
1185
+ activeProps: { type: Object },
1186
+ exactActiveProps: { type: Object }
1187
+ },
1188
+ methods: {
1189
+ actualProps(e, t) {
1190
+ return {
1191
+ ...I(this, E),
1192
+ ...this.resolvedProps.baseProps,
1193
+ ...e ? this.resolvedProps.activeProps : {},
1194
+ ...t ? this.resolvedProps.exactActiveProps : {}
1195
+ };
1196
+ }
1197
+ }
1198
+ };
1199
+ function ct(e, t, r, n, s, o) {
1200
+ const i = g("Btn"), l = g("RouterLink");
1201
+ return a(), v(l, {
1202
+ to: e.resolvedProps.to,
1203
+ custom: ""
1204
+ }, {
1205
+ default: m(({ href: u, navigate: k, isActive: z, isExactActive: T }) => [
1206
+ A(i, C({
1207
+ tagName: "a",
1208
+ href: u
1209
+ }, o.actualProps(z, T), { onClick: k }), null, 16, ["href", "onClick"])
1210
+ ]),
1211
+ _: 1
1212
+ }, 8, ["to"]);
1213
+ }
1214
+ const vt = /* @__PURE__ */ f(ft, [["render", ct]]);
1215
+ function M(e, t, r) {
1216
+ return Math.max(t, Math.min(r, e));
1217
+ }
1218
+ function yt(e, t, r) {
1219
+ if (!r)
1220
+ return e;
1221
+ const n = Math.round((e - t) / r);
1222
+ return t + n * r;
1223
+ }
1224
+ const ht = {
1225
+ components: {
1226
+ Bubble: L
1227
+ },
1228
+ mixins: [y],
1229
+ props: {
1230
+ tagName: { type: String, default: "div" },
1231
+ modelValue: { type: Number },
1232
+ min: { type: Number, default: 0 },
1233
+ max: { type: Number, default: 100 },
1234
+ step: { type: Number, default: 1 },
1235
+ tone: { type: String },
1236
+ size: { type: String },
1237
+ round: { type: Boolean, default: !1 },
1238
+ flat: { type: Boolean, default: !1 },
1239
+ outline: { type: Boolean, default: !1 },
1240
+ translucent: { type: Boolean, default: !1 },
1241
+ disabled: { type: Boolean },
1242
+ forceFocus: { type: Boolean, default: !1 },
1243
+ forceHover: { type: Boolean, default: !1 },
1244
+ focusOverrides: { type: Object },
1245
+ hoverOverrides: { type: Object },
1246
+ tooltip: { type: String, default: "off" },
1247
+ formatTooltip: { type: Function },
1248
+ tooltipTone: { type: String, default: "inverse" },
1249
+ scale: { type: Array },
1250
+ formatScale: { type: Function },
1251
+ tickStyle: { type: Function },
1252
+ snapThreshold: { type: Number },
1253
+ fillStyle: {
1254
+ type: String,
1255
+ default: "track",
1256
+ validator: (e) => ["track", "inset", "none"].includes(e)
1257
+ }
1258
+ },
1259
+ emits: [
1260
+ "update:modelValue"
1261
+ ],
1262
+ data() {
1263
+ return {
1264
+ hover: !1,
1265
+ focus: !1,
1266
+ dragging: !1,
1267
+ valuePulse: !1,
1268
+ valuePulseTimer: null,
1269
+ tooltipEditing: !1,
1270
+ tooltipDraft: ""
1271
+ };
1272
+ },
1273
+ computed: {
1274
+ currentValue() {
1275
+ const { modelValue: e, min: t } = this.resolvedProps;
1276
+ return e == null ? t : Number(e);
1277
+ },
1278
+ ratio() {
1279
+ const { min: e, max: t } = this.resolvedProps, r = t - e;
1280
+ return r ? (this.clampedValue - e) / r : 0;
1281
+ },
1282
+ clampedValue() {
1283
+ const { min: e, max: t } = this.resolvedProps;
1284
+ return M(this.currentValue, e, t);
1285
+ },
1286
+ scaleTicks() {
1287
+ const { scale: e, min: t, max: r } = this.resolvedProps;
1288
+ return e?.length ? e.filter((n) => n >= t && n <= r) : [];
1289
+ },
1290
+ tooltipShown() {
1291
+ const { tooltip: e } = this.resolvedProps;
1292
+ return e === "visible" ? !0 : e !== "dynamic" ? !1 : this.hover || this.dragging || this.focus || this.valuePulse || this.tooltipEditing;
1293
+ },
1294
+ tooltipText() {
1295
+ return this.formatValue(this.clampedValue, this.resolvedProps.formatTooltip);
1296
+ },
1297
+ baseStyle() {
1298
+ const { resolvedProps: e } = this;
1299
+ return {
1300
+ tone: e.tone,
1301
+ size: e.size,
1302
+ round: e.round,
1303
+ outline: e.outline,
1304
+ flat: e.flat,
1305
+ translucent: e.translucent
1306
+ };
1307
+ },
1308
+ effectiveStyle() {
1309
+ const {
1310
+ baseStyle: e,
1311
+ hoverOverrides: t = {},
1312
+ focusOverrides: r = {},
1313
+ hover: n,
1314
+ focus: s,
1315
+ resolvedProps: o
1316
+ } = this, { forceHover: i, forceFocus: l } = o, u = Object.assign({}, e);
1317
+ return (n || i) && Object.assign(u, t), (s || l) && Object.assign(u, r), u;
1318
+ }
1319
+ },
1320
+ watch: {
1321
+ clampedValue() {
1322
+ this.resolvedProps.tooltip === "dynamic" && (this.valuePulse = !0, clearTimeout(this.valuePulseTimer), this.valuePulseTimer = setTimeout(() => {
1323
+ this.valuePulse = !1;
1324
+ }, 1e3));
1325
+ }
1326
+ },
1327
+ beforeUnmount() {
1328
+ clearTimeout(this.valuePulseTimer), this.stopDrag();
1329
+ },
1330
+ methods: {
1331
+ snap(e) {
1332
+ const { scale: t, snapThreshold: r } = this.resolvedProps;
1333
+ if (!t?.length || r == null)
1334
+ return e;
1335
+ let n = null, s = 1 / 0;
1336
+ for (const o of t) {
1337
+ const i = Math.abs(o - e);
1338
+ i <= r && i < s && (s = i, n = o);
1339
+ }
1340
+ return n ?? e;
1341
+ },
1342
+ normalize(e) {
1343
+ const { min: t, max: r, step: n } = this.resolvedProps;
1344
+ return this.snap(yt(M(e, t, r), t, n));
1345
+ },
1346
+ valueFromClientX(e) {
1347
+ const t = this.$refs.trackArea, r = this.$refs.knob;
1348
+ if (!t || !r)
1349
+ return this.clampedValue;
1350
+ const n = t.getBoundingClientRect(), s = r.getBoundingClientRect(), o = n.width - s.width, i = e - n.left - s.width / 2, l = o ? M(i / o, 0, 1) : 0, { min: u, max: k } = this.resolvedProps;
1351
+ return this.normalize(u + l * (k - u));
1352
+ },
1353
+ setValue(e) {
1354
+ const t = this.normalize(e);
1355
+ t !== this.currentValue && this.$emit("update:modelValue", t);
1356
+ },
1357
+ setPreciseValue(e) {
1358
+ const { min: t, max: r } = this.resolvedProps, n = M(e, t, r);
1359
+ n !== this.currentValue && this.$emit("update:modelValue", n);
1360
+ },
1361
+ tickElementStyle(e) {
1362
+ const { min: t, max: r, tickStyle: n } = this.resolvedProps, s = r - t, o = s ? (e - t) / s : 0;
1363
+ return Object.assign(
1364
+ { "--Slider-ratio": o },
1365
+ n?.(e)
1366
+ );
1367
+ },
1368
+ scaleLabel(e) {
1369
+ return this.formatValue(e, this.resolvedProps.formatScale);
1370
+ },
1371
+ formatValue(e, t) {
1372
+ return t ? t(e) : String(e);
1373
+ },
1374
+ onPointerDown(e) {
1375
+ this.resolvedProps.disabled || e.button !== 0 || (this.dragging = !0, this.setValue(this.valueFromClientX(e.clientX)), window.addEventListener("pointermove", this.onPointerMove, { passive: !1 }), window.addEventListener("pointerup", this.onPointerUp), window.addEventListener("pointercancel", this.onPointerUp), this.$refs.hitArea?.setPointerCapture(e.pointerId));
1376
+ },
1377
+ onPointerMove(e) {
1378
+ this.dragging && (e.preventDefault(), this.setValue(this.valueFromClientX(e.clientX)));
1379
+ },
1380
+ onPointerUp(e) {
1381
+ if (!this.dragging)
1382
+ return;
1383
+ this.dragging = !1, this.stopDrag();
1384
+ const t = this.$refs.hitArea;
1385
+ t?.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId);
1386
+ },
1387
+ stopDrag() {
1388
+ window.removeEventListener("pointermove", this.onPointerMove), window.removeEventListener("pointerup", this.onPointerUp), window.removeEventListener("pointercancel", this.onPointerUp);
1389
+ },
1390
+ startTooltipEdit() {
1391
+ this.resolvedProps.disabled || (this.tooltipEditing = !0, this.tooltipDraft = String(this.clampedValue), this.$nextTick(() => {
1392
+ const e = this.$refs.tooltipInput;
1393
+ e?.focus(), e?.select();
1394
+ }));
1395
+ },
1396
+ onTooltipDraftInput(e) {
1397
+ this.tooltipDraft = e.target.value;
1398
+ },
1399
+ commitTooltipEdit() {
1400
+ if (!this.tooltipEditing)
1401
+ return;
1402
+ const e = Number(this.tooltipDraft);
1403
+ this.tooltipDraft !== "" && !Number.isNaN(e) && this.setPreciseValue(e), this.tooltipEditing = !1;
1404
+ },
1405
+ onTooltipInputKeydown(e) {
1406
+ if (e.key === "Enter") {
1407
+ e.preventDefault(), this.$refs.tooltipInput?.blur();
1408
+ return;
1409
+ }
1410
+ e.key === "Escape" && (e.preventDefault(), this.tooltipEditing = !1);
1411
+ },
1412
+ onKeydown(e) {
1413
+ if (this.resolvedProps.disabled)
1414
+ return;
1415
+ const { min: t, max: r, step: n } = this.resolvedProps, s = {
1416
+ ArrowLeft: -n,
1417
+ ArrowDown: -n,
1418
+ ArrowRight: n,
1419
+ ArrowUp: n
1420
+ }[e.key];
1421
+ if (s) {
1422
+ e.preventDefault(), this.setValue(this.clampedValue + s);
1423
+ return;
1424
+ }
1425
+ e.key === "Home" && (e.preventDefault(), this.setValue(t)), e.key === "End" && (e.preventDefault(), this.setValue(r));
1426
+ }
1427
+ }
1428
+ }, mt = {
1429
+ ref: "hitArea",
1430
+ class: "HitArea"
1431
+ }, bt = {
1432
+ ref: "trackArea",
1433
+ class: "TrackArea"
1434
+ }, gt = {
1435
+ ref: "rail",
1436
+ class: "Track"
1437
+ }, Pt = {
1438
+ ref: "knob",
1439
+ class: "Knob"
1440
+ }, St = { class: "TooltipContent" }, $t = ["value", "min", "max"], kt = {
1441
+ key: 0,
1442
+ class: "Scale"
1443
+ }, Bt = ["data-value"], wt = { class: "Label" };
1444
+ function Tt(e, t, r, n, s, o) {
1445
+ const i = g("Bubble");
1446
+ return a(), v($(e.resolvedProps.tagName), {
1447
+ class: h(["Slider InputElement", [
1448
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
1449
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
1450
+ {
1451
+ "Slider-outline": o.effectiveStyle.outline,
1452
+ "Slider-round": o.effectiveStyle.round,
1453
+ "Slider-flat": o.effectiveStyle.flat,
1454
+ "Slider-translucent": o.effectiveStyle.translucent,
1455
+ "Slider-disabled": e.resolvedProps.disabled,
1456
+ "Slider-forceFocus": e.resolvedProps.forceFocus,
1457
+ "Slider-forceHover": e.resolvedProps.forceHover,
1458
+ "Slider-dragging": s.dragging
1459
+ }
1460
+ ]]),
1461
+ role: "slider",
1462
+ "aria-valuemin": e.resolvedProps.min,
1463
+ "aria-valuemax": e.resolvedProps.max,
1464
+ "aria-valuenow": o.currentValue,
1465
+ "aria-disabled": e.resolvedProps.disabled || void 0,
1466
+ tabindex: e.resolvedProps.disabled ? -1 : 0,
1467
+ style: j({ "--Slider-ratio": o.ratio }),
1468
+ onPointerdown: o.onPointerDown,
1469
+ onKeydown: o.onKeydown,
1470
+ onMouseenter: t[7] || (t[7] = (l) => s.hover = !0),
1471
+ onMouseleave: t[8] || (t[8] = (l) => s.hover = !1),
1472
+ onFocusin: t[9] || (t[9] = (l) => s.focus = !0),
1473
+ onFocusout: t[10] || (t[10] = (l) => s.focus = !1)
1474
+ }, {
1475
+ default: m(() => [
1476
+ c("div", mt, null, 512),
1477
+ c("div", bt, [
1478
+ c("div", gt, [
1479
+ c("div", {
1480
+ class: h(["Fill", `Slider-fill-${r.fillStyle}`])
1481
+ }, null, 2)
1482
+ ], 512),
1483
+ c("div", Pt, [
1484
+ o.tooltipShown ? (a(), v(i, {
1485
+ key: 0,
1486
+ class: h(`Tooltip tone-${e.resolvedProps.tooltipTone}`),
1487
+ dir: "top",
1488
+ align: "center",
1489
+ onPointerdown: t[6] || (t[6] = B(() => {
1490
+ }, ["stop"]))
1491
+ }, {
1492
+ default: m(() => [
1493
+ c("div", St, [
1494
+ s.tooltipEditing ? (a(), d("input", {
1495
+ key: 1,
1496
+ ref: "tooltipInput",
1497
+ class: "TooltipInput",
1498
+ type: "number",
1499
+ value: s.tooltipDraft,
1500
+ min: e.resolvedProps.min,
1501
+ max: e.resolvedProps.max,
1502
+ step: "any",
1503
+ onInput: t[1] || (t[1] = (...l) => o.onTooltipDraftInput && o.onTooltipDraftInput(...l)),
1504
+ onKeydown: t[2] || (t[2] = B((...l) => o.onTooltipInputKeydown && o.onTooltipInputKeydown(...l), ["stop"])),
1505
+ onBlur: t[3] || (t[3] = (...l) => o.commitTooltipEdit && o.commitTooltipEdit(...l)),
1506
+ onClick: t[4] || (t[4] = B(() => {
1507
+ }, ["stop"])),
1508
+ onPointerdown: t[5] || (t[5] = B(() => {
1509
+ }, ["stop"]))
1510
+ }, null, 40, $t)) : (a(), d("div", {
1511
+ key: 0,
1512
+ class: "TooltipBody",
1513
+ onClick: t[0] || (t[0] = B((...l) => o.startTooltipEdit && o.startTooltipEdit(...l), ["stop"]))
1514
+ }, P(o.tooltipText), 1))
1515
+ ])
1516
+ ]),
1517
+ _: 1
1518
+ }, 8, ["class"])) : b("", !0)
1519
+ ], 512)
1520
+ ], 512),
1521
+ o.scaleTicks.length ? (a(), d("div", kt, [
1522
+ (a(!0), d(w, null, F(o.scaleTicks, (l) => (a(), d("div", {
1523
+ key: l,
1524
+ class: "Tick",
1525
+ "data-value": l,
1526
+ style: j(o.tickElementStyle(l))
1527
+ }, [
1528
+ t[11] || (t[11] = c("div", { class: "Mark" }, null, -1)),
1529
+ c("div", wt, P(o.scaleLabel(l)), 1)
1530
+ ], 12, Bt))), 128))
1531
+ ])) : b("", !0)
1532
+ ]),
1533
+ _: 1
1534
+ }, 40, ["class", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "tabindex", "style", "onPointerdown", "onKeydown"]);
1535
+ }
1536
+ const Ct = /* @__PURE__ */ f(ht, [["render", Tt], ["__scopeId", "data-v-d96fd04f"]]), It = {
1537
+ mixins: [y],
1538
+ props: {
1539
+ dir: { type: String, default: "top" },
1540
+ type: { type: String, default: "start" }
1541
+ }
1542
+ };
1543
+ function zt(e, t, r, n, s, o) {
1544
+ return a(), d("svg", {
1545
+ class: h(["TabCap", [
1546
+ `TabCap-${e.resolvedProps.dir}`,
1547
+ `TabCap-${e.resolvedProps.type}`
1548
+ ]]),
1549
+ viewBox: "0 0 32 32",
1550
+ preserveAspectRatio: "none"
1551
+ }, [...t[0] || (t[0] = [
1552
+ c("path", { d: "M0 32 C 16 32 16 0 32 0 L 32 32 z" }, null, -1)
1553
+ ])], 2);
1554
+ }
1555
+ const Ot = /* @__PURE__ */ f(It, [["render", zt], ["__scopeId", "data-v-697fbd68"]]), Vt = {
1556
+ mixins: [y],
1557
+ props: {
1558
+ modelValue: { type: Boolean },
1559
+ disabled: { type: Boolean },
1560
+ tone: { type: String },
1561
+ activeTone: { type: String },
1562
+ size: { type: String },
1563
+ round: { type: Boolean, default: !1 },
1564
+ flat: { type: Boolean, default: !1 },
1565
+ outline: { type: Boolean, default: !1 },
1566
+ translucent: { type: Boolean, default: !1 },
1567
+ forceFocus: { type: Boolean, default: !1 },
1568
+ forceHover: { type: Boolean, default: !1 },
1569
+ focusOverrides: { type: Object },
1570
+ hoverOverrides: { type: Object }
1571
+ },
1572
+ emits: [
1573
+ "update:modelValue"
1574
+ ],
1575
+ data() {
1576
+ return {
1577
+ hover: !1,
1578
+ focus: !1
1579
+ };
1580
+ },
1581
+ computed: {
1582
+ isActive() {
1583
+ return !!this.resolvedProps.modelValue;
1584
+ },
1585
+ baseStyle() {
1586
+ const { resolvedProps: e } = this;
1587
+ return {
1588
+ tone: (this.isActive ? e.activeTone : e.tone) ?? e.tone,
1589
+ size: e.size,
1590
+ round: e.round,
1591
+ outline: e.outline,
1592
+ flat: e.flat,
1593
+ translucent: e.translucent
1594
+ };
1595
+ },
1596
+ effectiveStyle() {
1597
+ const {
1598
+ baseStyle: e,
1599
+ hoverOverrides: t = {},
1600
+ focusOverrides: r = {},
1601
+ hover: n,
1602
+ focus: s,
1603
+ resolvedProps: o
1604
+ } = this, { forceHover: i, forceFocus: l } = o, u = Object.assign({}, e);
1605
+ return (n || i) && Object.assign(u, t), (s || l) && Object.assign(u, r), u;
1606
+ }
1607
+ },
1608
+ methods: {
1609
+ onChange(e) {
1610
+ this.$emit("update:modelValue", e.target.checked);
1611
+ }
1612
+ }
1613
+ }, Ft = ["tabindex"], Et = ["checked", "disabled"];
1614
+ function Mt(e, t, r, n, s, o) {
1615
+ return a(), d("label", {
1616
+ class: h(["Toggle InputElement", [
1617
+ o.effectiveStyle.tone && `tone-${o.effectiveStyle.tone}`,
1618
+ o.effectiveStyle.size && `input-size-${o.effectiveStyle.size}`,
1619
+ {
1620
+ "Toggle-active": !!r.modelValue,
1621
+ "Toggle-outline": o.effectiveStyle.outline,
1622
+ "Toggle-round": o.effectiveStyle.round,
1623
+ "Toggle-flat": o.effectiveStyle.flat,
1624
+ "Toggle-translucent": o.effectiveStyle.translucent,
1625
+ "Toggle-disabled": e.resolvedProps.disabled,
1626
+ "Toggle-forceFocus": e.resolvedProps.forceFocus,
1627
+ "Toggle-forceHover": e.resolvedProps.forceHover
1628
+ }
1629
+ ]]),
1630
+ tabindex: e.resolvedProps.disabled ? -1 : 0,
1631
+ onMouseenter: t[1] || (t[1] = (i) => s.hover = !0),
1632
+ onMouseleave: t[2] || (t[2] = (i) => s.hover = !1),
1633
+ onFocusin: t[3] || (t[3] = (i) => s.focus = !0),
1634
+ onFocusout: t[4] || (t[4] = (i) => s.focus = !1)
1635
+ }, [
1636
+ c("input", {
1637
+ type: "checkbox",
1638
+ checked: e.resolvedProps.modelValue,
1639
+ disabled: e.resolvedProps.disabled,
1640
+ onChange: t[0] || (t[0] = (...i) => o.onChange && o.onChange(...i))
1641
+ }, null, 40, Et)
1642
+ ], 42, Ft);
1643
+ }
1644
+ const At = /* @__PURE__ */ f(Vt, [["render", Mt], ["__scopeId", "data-v-384b58cc"]]), jt = {
1645
+ mixins: [y],
1646
+ props: {
1647
+ size: { type: String },
1648
+ flat: { type: Boolean, default: !1 },
1649
+ outline: { type: Boolean, default: !1 },
1650
+ round: { type: Boolean, default: !1 }
1651
+ }
1652
+ };
1653
+ function Dt(e, t, r, n, s, o) {
1654
+ return a(), d("div", {
1655
+ class: h(["ToolPanel", [
1656
+ e.resolvedProps.size && `ToolPanel-size-${e.resolvedProps.size}`,
1657
+ e.resolvedProps.size && `input-size-${e.resolvedProps.size}`,
1658
+ {
1659
+ "ToolPanel-flat": e.resolvedProps.flat,
1660
+ "ToolPanel-outline": e.resolvedProps.outline,
1661
+ "ToolPanel-round": e.resolvedProps.round
1662
+ }
1663
+ ]])
1664
+ }, [
1665
+ p(e.$slots, "default", {}, void 0, !0)
1666
+ ], 2);
1667
+ }
1668
+ const Ht = /* @__PURE__ */ f(jt, [["render", Dt], ["__scopeId", "data-v-9e5d1a90"]]), Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1669
+ __proto__: null,
1670
+ BaseMenu: O,
1671
+ Btn: E,
1672
+ Bubble: L,
1673
+ Checkbox: Se,
1674
+ Chip: we,
1675
+ ContextMenu: Fe,
1676
+ ContextPopup: V,
1677
+ Filler: Ae,
1678
+ HGroup: He,
1679
+ InputBase: S,
1680
+ InputGroup: Ze,
1681
+ InputSelect: st,
1682
+ InputText: it,
1683
+ InputTextarea: pt,
1684
+ ModalOverlay: _,
1685
+ RouterBtn: vt,
1686
+ Slider: Ct,
1687
+ Tab: K,
1688
+ TabCap: Ot,
1689
+ Toggle: At,
1690
+ ToolPanel: Ht,
1691
+ VGroup: N
1692
+ }, Symbol.toStringTag, { value: "Module" }));
1693
+ export {
1694
+ O as BaseMenu,
1695
+ E as Btn,
1696
+ L as Bubble,
1697
+ Se as Checkbox,
1698
+ we as Chip,
1699
+ Fe as ContextMenu,
1700
+ V as ContextPopup,
1701
+ Ae as Filler,
1702
+ pe as GlyphCheck,
1703
+ ye as GlyphXmark,
1704
+ He as HGroup,
1705
+ S as InputBase,
1706
+ Ze as InputGroup,
1707
+ st as InputSelect,
1708
+ it as InputText,
1709
+ pt as InputTextarea,
1710
+ _ as ModalOverlay,
1711
+ vt as RouterBtn,
1712
+ Ct as Slider,
1713
+ K as Tab,
1714
+ Ot as TabCap,
1715
+ At as Toggle,
1716
+ Ht as ToolPanel,
1717
+ N as VGroup,
1718
+ Lt as standardComponents
1719
+ };