@codemonster-ru/vueforge 0.6.0 → 0.8.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/dist/index.ts.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as X, ref as N, computed as w, watch as le, resolveComponent as be, openBlock as g, createElementBlock as h, normalizeClass as C, renderSlot as k, Fragment as oe, createTextVNode as J, toDisplayString as M, createBlock as W, withCtx as I, createCommentVNode as _, createElementVNode as B, renderList as ge, withKeys as K, withModifiers as G, unref as U, createVNode as he, nextTick as de, onMounted as Re, onBeforeUnmount as Se, Teleport as Le, withDirectives as me, vShow as ye, reactive as Ve, createSlots as ze } from "vue";
1
+ import { defineComponent as K, ref as X, computed as w, watch as le, resolveComponent as be, openBlock as b, createElementBlock as m, normalizeClass as C, renderSlot as k, Fragment as oe, createTextVNode as ee, toDisplayString as H, createBlock as M, withCtx as Y, createCommentVNode as _, createElementVNode as B, renderList as he, withKeys as q, withModifiers as U, unref as J, createVNode as me, nextTick as ue, onMounted as Te, onBeforeUnmount as Re, Teleport as Se, withDirectives as ye, vShow as ke, reactive as Ve, createSlots as Le } from "vue";
2
2
  import { useRoute as We, useRouter as Me } from "vue-router";
3
- import { CmIcon as Z } from "@codemonster-ru/vueiconify";
4
- const He = ["href", "aria-disabled", "tabindex"], ke = /* @__PURE__ */ X({
3
+ import { CmIcon as Q } from "@codemonster-ru/vueiconify";
4
+ const He = ["href", "aria-disabled", "tabindex"], Ce = /* @__PURE__ */ K({
5
5
  __name: "link",
6
6
  props: {
7
7
  to: { default: void 0 },
@@ -15,12 +15,12 @@ const He = ["href", "aria-disabled", "tabindex"], ke = /* @__PURE__ */ X({
15
15
  },
16
16
  emits: ["click", "active", "update:active", "onActive"],
17
17
  setup(t, { emit: e }) {
18
- const r = e, o = t, n = We(), c = Me(), s = N(null), i = w(() => o.href ?? o.url), l = w(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = w(() => o.to), d = w(() => o.to ? c.resolve(o.to) : null), a = w(() => {
18
+ const r = e, o = t, n = We(), c = Me(), s = X(null), i = w(() => o.href ?? o.url), l = w(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = w(() => o.to), d = w(() => o.to ? c.resolve(o.to) : null), a = w(() => {
19
19
  if (l.value !== "router-link")
20
20
  return !1;
21
21
  const p = d.value;
22
22
  return p ? p.name ? n.matched.some(({ name: y }) => y === p.name) : p.fullPath ? n.fullPath === p.fullPath : n.path === p.path : !1;
23
- }), v = w(() => o.active === void 0 ? a.value : o.active), f = (p) => {
23
+ }), f = w(() => o.active === void 0 ? a.value : o.active), v = (p) => {
24
24
  if (!o.disabled) {
25
25
  r("click", p);
26
26
  return;
@@ -30,33 +30,33 @@ const He = ["href", "aria-disabled", "tabindex"], ke = /* @__PURE__ */ X({
30
30
  return le(a, (p) => {
31
31
  p && (r("active"), r("onActive")), r("update:active", p);
32
32
  }), (p, y) => {
33
- const m = be("router-link");
34
- return l.value === "a" ? (g(), h("a", {
33
+ const h = be("router-link");
34
+ return l.value === "a" ? (b(), m("a", {
35
35
  key: 0,
36
36
  href: i.value,
37
- class: C(["vf-link", { "vf-link_active": v.value, "vf-link_disabled": p.disabled }]),
37
+ class: C(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": p.disabled }]),
38
38
  "aria-disabled": p.disabled,
39
39
  tabindex: p.disabled ? -1 : void 0,
40
- onClick: f
40
+ onClick: v
41
41
  }, [
42
- p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (g(), h(oe, { key: 1 }, [
43
- J(M(p.label), 1)
42
+ p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (b(), m(oe, { key: 1 }, [
43
+ ee(H(p.label), 1)
44
44
  ], 64))
45
- ], 10, He)) : (g(), W(m, {
45
+ ], 10, He)) : (b(), M(h, {
46
46
  key: 1,
47
47
  ref_key: "link",
48
48
  ref: s,
49
49
  to: u.value,
50
- class: C(["vf-link", { "vf-link_active": v.value }]),
50
+ class: C(["vf-link", { "vf-link_active": f.value }]),
51
51
  "aria-disabled": p.disabled,
52
52
  tabindex: p.disabled ? -1 : void 0,
53
53
  "active-class": "vf-link_partially-active",
54
54
  "exact-active-class": "vf-link_active",
55
- onClick: f
55
+ onClick: v
56
56
  }, {
57
- default: I(() => [
58
- p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (g(), h(oe, { key: 1 }, [
59
- J(M(p.label), 1)
57
+ default: Y(() => [
58
+ p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (b(), m(oe, { key: 1 }, [
59
+ ee(H(p.label), 1)
60
60
  ], 64))
61
61
  ]),
62
62
  _: 3
@@ -74,37 +74,37 @@ const He = ["href", "aria-disabled", "tabindex"], ke = /* @__PURE__ */ X({
74
74
  }, De = {
75
75
  key: 1,
76
76
  class: "vf-card__header"
77
- }, Ne = {
77
+ }, je = {
78
78
  key: 2,
79
79
  class: "vf-card__body"
80
- }, Ie = {
80
+ }, Ne = {
81
81
  key: 3,
82
82
  class: "vf-card__footer"
83
83
  };
84
- function je(t, e) {
85
- return g(), h("div", Pe, [
86
- t.$slots.default ? (g(), h("div", Ae, [
84
+ function Xe(t, e) {
85
+ return b(), m("div", Pe, [
86
+ t.$slots.default ? (b(), m("div", Ae, [
87
87
  k(t.$slots, "default")
88
88
  ])) : _("", !0),
89
- t.$slots.header ? (g(), h("div", De, [
89
+ t.$slots.header ? (b(), m("div", De, [
90
90
  k(t.$slots, "header")
91
91
  ])) : _("", !0),
92
- t.$slots.body ? (g(), h("div", Ne, [
92
+ t.$slots.body ? (b(), m("div", je, [
93
93
  k(t.$slots, "body")
94
94
  ])) : _("", !0),
95
- t.$slots.footer ? (g(), h("div", Ie, [
95
+ t.$slots.footer ? (b(), m("div", Ne, [
96
96
  k(t.$slots, "footer")
97
97
  ])) : _("", !0)
98
98
  ]);
99
99
  }
100
- const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
100
+ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
101
101
  class: "vf-menu__list",
102
102
  role: "menu"
103
103
  }, Ke = {
104
104
  key: 1,
105
105
  class: "vf-menu__separator",
106
106
  role: "separator"
107
- }, Ge = ["aria-expanded", "onClick", "onKeydown"], io = /* @__PURE__ */ X({
107
+ }, Ge = ["aria-expanded", "onClick", "onKeydown"], co = /* @__PURE__ */ K({
108
108
  name: "VfMenu",
109
109
  __name: "menu",
110
110
  props: {
@@ -113,7 +113,7 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
113
113
  },
114
114
  emits: ["active", "onActive"],
115
115
  setup(t, { emit: e }) {
116
- const r = e, o = t, n = N([]), c = (d, a) => `${d.label ?? d.to ?? d.href ?? d.url ?? "item"}_${a.toString()}`, s = (d) => d.to ? "router-link" : "a", i = (d) => d.map((a) => ({
116
+ const r = e, o = t, n = X([]), c = (d, a) => `${d.label ?? d.to ?? d.href ?? d.url ?? "item"}_${a.toString()}`, s = (d) => d.to ? "router-link" : "a", i = (d) => d.map((a) => ({
117
117
  ...a,
118
118
  items: a.items ? i(a.items) : void 0
119
119
  })), l = (d) => {
@@ -122,9 +122,9 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
122
122
  }), d.subMenuVisible = !d.subMenuVisible) : Object.prototype.hasOwnProperty.call(d, "command") && typeof d.command == "function" && d.command();
123
123
  }, u = (d) => {
124
124
  var a;
125
- for (const v in n.value) {
126
- const f = n.value[v];
127
- Object.prototype.hasOwnProperty.call(f, "items") && ((a = f.items) != null && a.some((p) => p === d) ? (f.active = !0, f.subMenuVisible = !0) : (f.active = !1, f.subMenuVisible = !1));
125
+ for (const f in n.value) {
126
+ const v = n.value[f];
127
+ Object.prototype.hasOwnProperty.call(v, "items") && ((a = v.items) != null && a.some((p) => p === d) ? (v.active = !0, v.subMenuVisible = !0) : (v.active = !1, v.subMenuVisible = !1));
128
128
  }
129
129
  r("active", d), r("onActive", d);
130
130
  };
@@ -135,65 +135,65 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
135
135
  },
136
136
  { deep: !0, immediate: !0 }
137
137
  ), (d, a) => {
138
- const v = be("VfMenu");
139
- return g(), h("div", {
138
+ const f = be("VfMenu");
139
+ return b(), m("div", {
140
140
  class: C(["vf-menu", `vf-menu_${d.orientation}`])
141
141
  }, [
142
- B("ul", Ye, [
143
- (g(!0), h(oe, null, ge(n.value, (f, p) => (g(), h("li", {
144
- key: c(f, p),
142
+ B("ul", Ie, [
143
+ (b(!0), m(oe, null, he(n.value, (v, p) => (b(), m("li", {
144
+ key: c(v, p),
145
145
  class: "vf-menu__item",
146
146
  role: "none"
147
147
  }, [
148
- d.$slots[c(f, p)] ? k(d.$slots, c(f, p), {
148
+ d.$slots[c(v, p)] ? k(d.$slots, c(v, p), {
149
149
  key: 0,
150
- item: { ...f, class: "vf-menu__link" }
151
- }) : f.separator ? (g(), h("hr", Ke)) : f.items && f.items.length ? (g(), h(oe, { key: 2 }, [
150
+ item: { ...v, class: "vf-menu__link" }
151
+ }) : v.separator ? (b(), m("hr", Ke)) : v.items && v.items.length ? (b(), m(oe, { key: 2 }, [
152
152
  B("div", {
153
- class: C(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
153
+ class: C(["vf-menu__parent", { "vf-menu__parent_active": v.active }]),
154
154
  role: "menuitem",
155
155
  tabindex: "0",
156
- "aria-expanded": f.subMenuVisible ? "true" : "false",
157
- onClick: (y) => l(f),
156
+ "aria-expanded": v.subMenuVisible ? "true" : "false",
157
+ onClick: (y) => l(v),
158
158
  onKeydown: [
159
- K(G((y) => l(f), ["prevent"]), ["enter"]),
160
- K(G((y) => l(f), ["prevent"]), ["space"])
159
+ q(U((y) => l(v), ["prevent"]), ["enter"]),
160
+ q(U((y) => l(v), ["prevent"]), ["space"])
161
161
  ]
162
162
  }, [
163
- f.icon ? (g(), W(U(Z), {
163
+ v.icon ? (b(), M(J(Q), {
164
164
  key: 0,
165
- icon: f.icon,
165
+ icon: v.icon,
166
166
  class: "vf-menu__icon"
167
167
  }, null, 8, ["icon"])) : _("", !0),
168
- J(" " + M(f.label) + " ", 1),
169
- he(U(Z), { icon: "chevronDown" })
168
+ ee(" " + H(v.label) + " ", 1),
169
+ me(J(Q), { icon: "chevronDown" })
170
170
  ], 42, Ge),
171
- f.items ? (g(), W(v, {
171
+ v.items ? (b(), M(f, {
172
172
  key: 0,
173
- items: f.items,
174
- class: C(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
173
+ items: v.items,
174
+ class: C(["vf-menu__submenu", { "vf-menu__submenu_visible": v.subMenuVisible }]),
175
175
  onOnActive: u
176
176
  }, null, 8, ["items", "class"])) : _("", !0)
177
- ], 64)) : (g(), W(ke, {
177
+ ], 64)) : (b(), M(Ce, {
178
178
  key: 3,
179
- to: f.to,
180
- href: f.href ?? f.url,
181
- as: s(f),
179
+ to: v.to,
180
+ href: v.href ?? v.url,
181
+ as: s(v),
182
182
  class: "vf-menu__link",
183
- active: f.active,
184
- disabled: f.disabled,
183
+ active: v.active,
184
+ disabled: v.disabled,
185
185
  role: "menuitem",
186
- "aria-disabled": f.disabled ? "true" : "false",
187
- onClick: (y) => l(f),
188
- onActive: (y) => u(f)
186
+ "aria-disabled": v.disabled ? "true" : "false",
187
+ onClick: (y) => l(v),
188
+ onActive: (y) => u(v)
189
189
  }, {
190
- default: I(() => [
191
- f.icon ? (g(), W(U(Z), {
190
+ default: Y(() => [
191
+ v.icon ? (b(), M(J(Q), {
192
192
  key: 0,
193
- icon: f.icon,
193
+ icon: v.icon,
194
194
  class: "vf-menu__icon"
195
195
  }, null, 8, ["icon"])) : _("", !0),
196
- J(" " + M(f.label), 1)
196
+ ee(" " + H(v.label), 1)
197
197
  ]),
198
198
  _: 2
199
199
  }, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
@@ -202,7 +202,7 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
202
202
  ], 2);
203
203
  };
204
204
  }
205
- }), qe = ["type", "disabled"], co = /* @__PURE__ */ X({
205
+ }), qe = ["type", "disabled"], uo = /* @__PURE__ */ K({
206
206
  __name: "button",
207
207
  props: {
208
208
  to: { default: void 0 },
@@ -225,33 +225,33 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
225
225
  let d = ["vf-button", `vf-button_${e.severity}`];
226
226
  return ["top", "bottom"].includes(e.iconPos) && d.push("vf-button_vertical"), e.variant === "text" && d.push("vf-button_text"), e.variant === "outlined" && d.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && d.push(`vf-button_${e.size}`), (e.loading || e.disabled) && d.push("vf-button_disabled"), e.rounded && d.push("vf-button_rounded"), d;
227
227
  }), l = w(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = w(() => ["vf-button__label"]);
228
- return (d, a) => n.value ? (g(), h("button", {
228
+ return (d, a) => n.value ? (b(), m("button", {
229
229
  key: 0,
230
230
  type: c.value,
231
231
  class: C(i.value),
232
232
  disabled: e.loading || e.disabled
233
233
  }, [
234
- e.icon && !e.loading ? (g(), W(U(Z), {
234
+ e.icon && !e.loading ? (b(), M(J(Q), {
235
235
  key: 0,
236
236
  icon: e.icon,
237
237
  class: C(l.value)
238
238
  }, null, 8, ["icon", "class"])) : _("", !0),
239
- e.loading ? (g(), W(U(Z), {
239
+ e.loading ? (b(), M(J(Q), {
240
240
  key: 1,
241
241
  icon: "circleNotch",
242
242
  class: C(l.value),
243
243
  spin: ""
244
244
  }, null, 8, ["class"])) : _("", !0),
245
- d.$slots.default ? (g(), h("span", {
245
+ d.$slots.default ? (b(), m("span", {
246
246
  key: 2,
247
247
  class: C(u.value)
248
248
  }, [
249
249
  k(d.$slots, "default")
250
- ], 2)) : d.label ? (g(), h("span", {
250
+ ], 2)) : d.label ? (b(), m("span", {
251
251
  key: 3,
252
252
  class: C(u.value)
253
- }, M(d.label), 3)) : _("", !0)
254
- ], 10, qe)) : (g(), W(ke, {
253
+ }, H(d.label), 3)) : _("", !0)
254
+ ], 10, qe)) : (b(), M(Ce, {
255
255
  key: 1,
256
256
  to: e.to,
257
257
  href: e.href ?? e.url,
@@ -259,21 +259,21 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
259
259
  class: C(i.value),
260
260
  disabled: e.loading || e.disabled
261
261
  }, {
262
- default: I(() => [
263
- e.icon ? (g(), W(U(Z), {
262
+ default: Y(() => [
263
+ e.icon ? (b(), M(J(Q), {
264
264
  key: 0,
265
265
  icon: e.icon,
266
266
  class: C(l.value)
267
267
  }, null, 8, ["icon", "class"])) : _("", !0),
268
- d.$slots.default ? (g(), h("span", {
268
+ d.$slots.default ? (b(), m("span", {
269
269
  key: 1,
270
270
  class: C(u.value)
271
271
  }, [
272
272
  k(d.$slots, "default")
273
- ], 2)) : d.label ? (g(), h("span", {
273
+ ], 2)) : d.label ? (b(), m("span", {
274
274
  key: 2,
275
275
  class: C(u.value)
276
- }, M(d.label), 3)) : _("", !0)
276
+ }, H(d.label), 3)) : _("", !0)
277
277
  ]),
278
278
  _: 3
279
279
  }, 8, ["to", "href", "as", "class", "disabled"]));
@@ -284,7 +284,7 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
284
284
  }, Ze = ["type", "value", "placeholder", "disabled", "readonly"], Je = {
285
285
  key: 1,
286
286
  class: "vf-input__suffix"
287
- }, uo = /* @__PURE__ */ X({
287
+ }, fo = /* @__PURE__ */ K({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -304,10 +304,10 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
304
304
  const d = u.target;
305
305
  r("update:modelValue", d.value), r("input", u);
306
306
  }, s = (u) => r("change", u), i = (u) => r("focus", u), l = (u) => r("blur", u);
307
- return (u, d) => (g(), h("div", {
307
+ return (u, d) => (b(), m("div", {
308
308
  class: C(n.value)
309
309
  }, [
310
- u.$slots.prefix ? (g(), h("span", Ue, [
310
+ u.$slots.prefix ? (b(), m("span", Ue, [
311
311
  k(u.$slots, "prefix")
312
312
  ])) : _("", !0),
313
313
  B("input", {
@@ -322,12 +322,12 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
322
322
  onFocus: i,
323
323
  onBlur: l
324
324
  }, null, 40, Ze),
325
- u.$slots.suffix ? (g(), h("span", Je, [
325
+ u.$slots.suffix ? (b(), m("span", Je, [
326
326
  k(u.$slots, "suffix")
327
327
  ])) : _("", !0)
328
328
  ], 2));
329
329
  }
330
- }), ue = [
330
+ }), fe = [
331
331
  "top",
332
332
  "top-start",
333
333
  "top-end",
@@ -340,7 +340,7 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
340
340
  "left",
341
341
  "left-start",
342
342
  "left-end"
343
- ], P = (t) => {
343
+ ], A = (t) => {
344
344
  if (t == null || !(t instanceof HTMLElement))
345
345
  return null;
346
346
  if (typeof window < "u") {
@@ -348,13 +348,13 @@ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
348
348
  if (/(auto|scroll|overlay)/.test(r))
349
349
  return t;
350
350
  }
351
- return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : P(t.parentNode);
351
+ return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : A(t.parentNode);
352
352
  };
353
353
  function Qe(t) {
354
354
  return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
355
355
  }
356
- const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y = (t, e) => et(t, e) === "fixed", R = (t, e, r = {}) => {
357
- const o = t.getBoundingClientRect(), n = e ? e.offsetParent : null, c = e ? Y(r, e) : !1;
356
+ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G = (t, e) => et(t, e) === "fixed", T = (t, e, r = {}) => {
357
+ const o = t.getBoundingClientRect(), n = e ? e.offsetParent : null, c = e ? G(r, e) : !1;
358
358
  if (n && !c) {
359
359
  const s = n.getBoundingClientRect(), i = n.scrollLeft, l = n.scrollTop;
360
360
  return {
@@ -370,52 +370,52 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
370
370
  width: o.width,
371
371
  height: o.height
372
372
  };
373
- }, j = (t, e) => {
373
+ }, I = (t, e) => {
374
374
  var r;
375
375
  return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
376
- }, Ce = (t, e) => !!j(t, e), tt = (t) => {
377
- const e = P(t);
376
+ }, we = (t, e) => !!I(t, e), tt = (t) => {
377
+ const e = A(t);
378
378
  let r = "";
379
379
  return e !== null && ((e.dataset.scrollTop === void 0 || e.scrollTop === +e.dataset.scrollTop) && (e.dataset.scrollTop = "0"), (e.dataset.scrollLeft === void 0 || e.scrollLeft === +e.dataset.scrollLeft) && (e.dataset.scrollLeft = "0"), e.scrollTop > +e.dataset.scrollTop ? r = "bottom" : e.scrollTop < +e.dataset.scrollTop ? r = "top" : e.scrollLeft > +e.dataset.scrollLeft ? r = "right" : e.scrollLeft < +e.dataset.scrollLeft && (r = "left"), e.dataset.scrollTop = e.scrollTop <= 0 ? "0" : e.scrollTop.toString(), e.dataset.scrollLeft = e.scrollLeft <= 0 ? "0" : e.scrollLeft.toString()), r;
380
- }, ot = (t) => t.scrollLeft + t.clientWidth, rt = (t) => t.scrollTop + t.clientHeight, L = (t, e, r = null, o = {}, n) => {
381
- if (r === null && typeof window < "u" && Y(o, e))
380
+ }, ot = (t) => t.scrollLeft + t.clientWidth, rt = (t) => t.scrollTop + t.clientHeight, V = (t, e, r = null, o = {}, n) => {
381
+ if (r === null && typeof window < "u" && G(o, e))
382
382
  return t;
383
383
  let c = 0;
384
384
  if (r === null) {
385
- const s = P(e);
385
+ const s = A(e);
386
386
  c = s ? s.scrollTop : 0;
387
387
  }
388
388
  return t - c;
389
- }, V = (t, e, r = null, o = {}, n) => {
389
+ }, L = (t, e, r = null, o = {}, n) => {
390
390
  let c;
391
- if (r === null && typeof window < "u" && Y(o, e))
391
+ if (r === null && typeof window < "u" && G(o, e))
392
392
  c = window.innerWidth;
393
393
  else if (r === null) {
394
- const s = P(e);
394
+ const s = A(e);
395
395
  c = s ? ot(s) : 0;
396
396
  } else
397
397
  c = r.getBoundingClientRect().width;
398
398
  return -(t + e.clientWidth - c);
399
- }, O = (t, e, r = null, o = {}, n) => {
399
+ }, E = (t, e, r = null, o = {}, n) => {
400
400
  let c;
401
- if (r === null && typeof window < "u" && Y(o, e))
401
+ if (r === null && typeof window < "u" && G(o, e))
402
402
  c = window.innerHeight;
403
403
  else if (r === null) {
404
- const s = P(e);
404
+ const s = A(e);
405
405
  c = s ? rt(s) : 0;
406
406
  } else
407
407
  c = r.getBoundingClientRect().height;
408
408
  return -(t + e.clientHeight - c);
409
- }, z = (t, e, r = null, o = {}, n) => {
410
- if (r === null && typeof window < "u" && Y(o, e))
409
+ }, W = (t, e, r = null, o = {}, n) => {
410
+ if (r === null && typeof window < "u" && G(o, e))
411
411
  return t;
412
412
  let c = 0;
413
413
  if (r === null) {
414
- const s = P(e);
414
+ const s = A(e);
415
415
  c = s ? s.scrollLeft : 0;
416
416
  }
417
417
  return t - c;
418
- }, fe = ({
418
+ }, ve = ({
419
419
  options: t,
420
420
  primaryX: e,
421
421
  primaryY: r,
@@ -424,7 +424,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
424
424
  reference: c,
425
425
  scrollDirection: s
426
426
  }) => {
427
- const i = ae(c, o, n, t), l = j(t, "offset");
427
+ const i = ae(c, o, n, t), l = I(t, "offset");
428
428
  if (l) {
429
429
  const u = l.fn({
430
430
  x: i.x,
@@ -463,16 +463,16 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
463
463
  x: e,
464
464
  y: r,
465
465
  placement: i
466
- }, v = {
466
+ }, f = {
467
467
  ...o,
468
468
  middleware: (d = o.middleware) == null ? void 0 : d.filter((x) => x.name !== "shift")
469
- }, f = (t == null ? void 0 : t.placements) ?? ue, p = !(t != null && t.placements), y = p ? ue : f;
470
- let m = !1;
471
- const Q = (x) => {
472
- if (m)
469
+ }, v = (t == null ? void 0 : t.placements) ?? fe, p = !(t != null && t.placements), y = p ? fe : v;
470
+ let h = !1;
471
+ const R = (x) => {
472
+ if (h)
473
473
  return;
474
- const $ = fe({
475
- options: v,
474
+ const F = ve({
475
+ options: f,
476
476
  primaryX: n,
477
477
  primaryY: c,
478
478
  floating: s,
@@ -480,50 +480,50 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
480
480
  reference: l,
481
481
  scrollDirection: u
482
482
  });
483
- $ && (a.x = $.x, a.y = $.y, a.placement = $.placement, m = !0);
484
- }, ee = $t(l, s, v);
485
- if (!p && f.includes(i) && Q(i), m || y.forEach(Q), !m) {
486
- const x = f.reduce(
487
- ($, H) => {
488
- const A = fe({
489
- options: v,
483
+ F && (a.x = F.x, a.y = F.y, a.placement = F.placement, h = !0);
484
+ }, D = Ft(l, s, f);
485
+ if (!p && v.includes(i) && R(i), h || y.forEach(R), !h) {
486
+ const x = v.reduce(
487
+ (F, O) => {
488
+ const j = ve({
489
+ options: f,
490
490
  primaryX: n,
491
491
  primaryY: c,
492
492
  floating: s,
493
- placement: H,
493
+ placement: O,
494
494
  reference: l,
495
495
  scrollDirection: u
496
496
  });
497
- if (!A)
498
- return $;
499
- const S = te(H), D = ee[S];
500
- return !$ || D > $.space ? { result: A, space: D } : $;
497
+ if (!j)
498
+ return F;
499
+ const S = te(O), N = D[S];
500
+ return !F || N > F.space ? { result: j, space: N } : F;
501
501
  },
502
502
  null
503
503
  );
504
- x && (a.x = x.result.x, a.y = x.result.y, a.placement = x.result.placement, m = !0);
504
+ x && (a.x = x.result.x, a.y = x.result.y, a.placement = x.result.placement, h = !0);
505
505
  }
506
- if (!m && f.length > 0) {
506
+ if (!h && v.length > 0) {
507
507
  const x = te(i);
508
- let $ = x, H = ee[x];
509
- f.forEach((q) => {
510
- const b = te(q), F = ee[b];
511
- F > H && (H = F, $ = b);
508
+ let F = x, O = D[x];
509
+ v.forEach((Z) => {
510
+ const g = te(Z), $ = D[g];
511
+ $ > O && (O = $, F = g);
512
512
  });
513
- const A = Ft($, i, f), S = ae(l, s, A, v), D = j(v, "offset");
514
- if (D) {
515
- const q = D.fn({
513
+ const j = $t(F, i, v), S = ae(l, s, j, f), N = I(f, "offset");
514
+ if (N) {
515
+ const Z = N.fn({
516
516
  x: S.x,
517
517
  y: S.y,
518
- options: v,
518
+ options: f,
519
519
  primaryX: n,
520
520
  primaryY: c,
521
521
  floating: s,
522
- placement: A,
522
+ placement: j,
523
523
  reference: l,
524
524
  scrollDirection: u
525
525
  });
526
- S.x = q.x, S.y = q.y;
526
+ S.x = Z.x, S.y = Z.y;
527
527
  }
528
528
  a.x = S.x, a.y = S.y, a.placement = S.placement;
529
529
  }
@@ -533,32 +533,32 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
533
533
  var c, s, i;
534
534
  let l = 0;
535
535
  o.startsWith("right") ? l = -2 : o.startsWith("left") && (l = t);
536
- const u = j(e, "arrow"), d = j(e, "shift");
536
+ const u = I(e, "arrow"), d = I(e, "shift");
537
537
  if (u) {
538
538
  const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
539
539
  o.startsWith("right") ? l -= a.width / 2 : o.startsWith("left") && (l += a.width / 2);
540
540
  }
541
- if (Ce(e, "shift") && u) {
542
- let a = null, v = 0;
541
+ if (we(e, "shift") && u) {
542
+ let a = null, f = 0;
543
543
  d && (a = (s = d.params) == null ? void 0 : s.parent);
544
- const f = (i = u.params) == null ? void 0 : i.arrow;
545
- v = f.getBoundingClientRect().width / 2, v += it(f), v -= t, o.startsWith("right") ? V(r - l, n, a, e) <= t ? V(r, n, a, e) > 0 ? l = t - V(r, n, a, e) : l = t : z(r - l - v, n, a, e) <= t && (z(r - l - v, n, a, e) >= 0 ? (l = -2 - (z(r - l - v, n, a, e) + t), a && (l = -2)) : l = -2) : o.startsWith("left") ? V(r - l + v, n, a, e) <= t ? (l = t + V(r - v, n, a, e), l <= t && (l = t)) : z(r - l, n, a, e) <= t && (l = -2 + z(r, n, a, e), l <= -2 && (l = -2)) : V(r - l, n, a, e) <= t ? V(r - l, n, a, e) <= t && V(r, n, a, e) > 0 ? l = t - V(r, n, a, e) : l = t : z(r - l, n, a, e) <= t && (z(r - l, n, a, e) <= t && z(r, n, a, e) > 0 ? l = -(t - z(r, n, a, e)) : l = -2);
544
+ const v = (i = u.params) == null ? void 0 : i.arrow;
545
+ f = v.getBoundingClientRect().width / 2, f += it(v), f -= t, o.startsWith("right") ? L(r - l, n, a, e) <= t ? L(r, n, a, e) > 0 ? l = t - L(r, n, a, e) : l = t : W(r - l - f, n, a, e) <= t && (W(r - l - f, n, a, e) >= 0 ? (l = -2 - (W(r - l - f, n, a, e) + t), a && (l = -2)) : l = -2) : o.startsWith("left") ? L(r - l + f, n, a, e) <= t ? (l = t + L(r - f, n, a, e), l <= t && (l = t)) : W(r - l, n, a, e) <= t && (l = -2 + W(r, n, a, e), l <= -2 && (l = -2)) : L(r - l, n, a, e) <= t ? L(r - l, n, a, e) <= t && L(r, n, a, e) > 0 ? l = t - L(r, n, a, e) : l = t : W(r - l, n, a, e) <= t && (W(r - l, n, a, e) <= t && W(r, n, a, e) > 0 ? l = -(t - W(r, n, a, e)) : l = -2);
546
546
  }
547
547
  return l;
548
548
  }, at = (t, e, r, o, n) => {
549
549
  var c, s, i;
550
550
  let l = 0;
551
551
  o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -2);
552
- const u = j(e, "arrow"), d = j(e, "shift");
552
+ const u = I(e, "arrow"), d = I(e, "shift");
553
553
  if (u) {
554
554
  const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
555
555
  o.startsWith("top") ? l += a.height / 2 : o.startsWith("bottom") && (l -= a.height / 2);
556
556
  }
557
- if (Ce(e, "shift") && u) {
558
- let a = null, v = 0;
557
+ if (we(e, "shift") && u) {
558
+ let a = null, f = 0;
559
559
  d && (a = (s = d.params) == null ? void 0 : s.parent);
560
- const f = (i = u.params) == null ? void 0 : i.arrow;
561
- v = f.getBoundingClientRect().height / 2, v += ct(f), v -= t, o.startsWith("top") ? L(r - l, n, a, e) <= t ? L(r, n, a, e) >= 0 ? l = -(t - L(r, n, a, e)) : l = -2 : O(r - l + v, n, a, e) <= t && (l = t + O(r - v, n, a, e), l <= t && (l = t)) : o.startsWith("bottom") ? L(r - l - v, n, a, e) <= t ? L(r - l - v, n, a, e) >= 0 ? (l = -2 - (L(r - l - v, n, a, e) + t), a && (l = -2)) : l = -2 : O(r - l, n, a, e) <= t && (O(r, n, a, e) >= 0 ? l = t - O(r, n, a, e) : l = t) : L(r - l, n, a, e) <= t ? L(r - l, n, a, e) >= 0 ? l = -(t - L(r - l, n, a, e)) : l = -2 : O(r - l, n, a, e) <= t && (O(r - l, n, a, e) >= 0 ? l = t - O(r - l, n, a, e) : l = t);
560
+ const v = (i = u.params) == null ? void 0 : i.arrow;
561
+ f = v.getBoundingClientRect().height / 2, f += dt(v), f -= t, o.startsWith("top") ? V(r - l, n, a, e) <= t ? V(r, n, a, e) >= 0 ? l = -(t - V(r, n, a, e)) : l = -2 : E(r - l + f, n, a, e) <= t && (l = t + E(r - f, n, a, e), l <= t && (l = t)) : o.startsWith("bottom") ? V(r - l - f, n, a, e) <= t ? V(r - l - f, n, a, e) >= 0 ? (l = -2 - (V(r - l - f, n, a, e) + t), a && (l = -2)) : l = -2 : E(r - l, n, a, e) <= t && (E(r, n, a, e) >= 0 ? l = t - E(r, n, a, e) : l = t) : V(r - l, n, a, e) <= t ? V(r - l, n, a, e) >= 0 ? l = -(t - V(r - l, n, a, e)) : l = -2 : E(r - l, n, a, e) <= t && (E(r - l, n, a, e) >= 0 ? l = t - E(r - l, n, a, e) : l = t);
562
562
  }
563
563
  return l;
564
564
  }, st = (t) => ({
@@ -577,8 +577,8 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
577
577
  y: r - at(t, o, c, i, s),
578
578
  placement: i
579
579
  })
580
- }), it = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, ct = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, dt = (t, e) => {
581
- const r = P(t), o = [];
580
+ }), it = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, dt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, ct = (t, e) => {
581
+ const r = A(t), o = [];
582
582
  if (r !== null) {
583
583
  const n = () => e();
584
584
  r.addEventListener("scroll", n, !1), o.push(() => r.removeEventListener("scroll", n, !1));
@@ -593,84 +593,84 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
593
593
  }
594
594
  return () => o.forEach((n) => n());
595
595
  }, ut = (t, e, r = {}) => {
596
- const o = R(t, e, r);
596
+ const o = T(t, e, r);
597
597
  return {
598
598
  x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
599
599
  y: o.top - e.getBoundingClientRect().height,
600
600
  placement: "top"
601
601
  };
602
602
  }, ft = (t, e, r = {}) => {
603
- const o = R(t, e, r);
603
+ const o = T(t, e, r);
604
604
  return {
605
605
  x: o.left,
606
606
  y: o.top - e.getBoundingClientRect().height,
607
607
  placement: "top-start"
608
608
  };
609
609
  }, vt = (t, e, r = {}) => {
610
- const o = R(t, e, r);
610
+ const o = T(t, e, r);
611
611
  return {
612
612
  x: o.left - e.getBoundingClientRect().width + o.width,
613
613
  y: o.top - e.getBoundingClientRect().height,
614
614
  placement: "top-end"
615
615
  };
616
616
  }, pt = (t, e, r = {}) => {
617
- const o = R(t, e, r);
617
+ const o = T(t, e, r);
618
618
  return {
619
619
  x: o.left + o.width,
620
620
  y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
621
621
  placement: "right"
622
622
  };
623
- }, bt = (t, e, r = {}) => {
624
- const o = R(t, e, r);
623
+ }, gt = (t, e, r = {}) => {
624
+ const o = T(t, e, r);
625
625
  return {
626
626
  x: o.left + o.width,
627
627
  y: o.top,
628
628
  placement: "right-start"
629
629
  };
630
- }, gt = (t, e, r = {}) => {
631
- const o = R(t, e, r);
630
+ }, bt = (t, e, r = {}) => {
631
+ const o = T(t, e, r);
632
632
  return {
633
633
  x: o.left + o.width,
634
634
  y: o.top + o.height - e.getBoundingClientRect().height,
635
635
  placement: "right-end"
636
636
  };
637
637
  }, ht = (t, e, r = {}) => {
638
- const o = R(t, e, r);
638
+ const o = T(t, e, r);
639
639
  return {
640
640
  x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
641
641
  y: o.top + o.height,
642
642
  placement: "bottom"
643
643
  };
644
644
  }, mt = (t, e, r = {}) => {
645
- const o = R(t, e, r);
645
+ const o = T(t, e, r);
646
646
  return {
647
647
  x: o.left,
648
648
  y: o.top + o.height,
649
649
  placement: "bottom-start"
650
650
  };
651
651
  }, yt = (t, e, r = {}) => {
652
- const o = R(t, e, r);
652
+ const o = T(t, e, r);
653
653
  return {
654
654
  x: o.left - e.getBoundingClientRect().width + o.width,
655
655
  y: o.top + o.height,
656
656
  placement: "bottom-end"
657
657
  };
658
658
  }, kt = (t, e, r = {}) => {
659
- const o = R(t, e, r);
659
+ const o = T(t, e, r);
660
660
  return {
661
661
  x: o.left - e.getBoundingClientRect().width,
662
662
  y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
663
663
  placement: "left"
664
664
  };
665
665
  }, Ct = (t, e, r = {}) => {
666
- const o = R(t, e, r);
666
+ const o = T(t, e, r);
667
667
  return {
668
668
  x: o.left - e.getBoundingClientRect().width,
669
669
  y: o.top,
670
670
  placement: "left-start"
671
671
  };
672
672
  }, wt = (t, e, r = {}) => {
673
- const o = R(t, e, r);
673
+ const o = T(t, e, r);
674
674
  return {
675
675
  x: o.left - e.getBoundingClientRect().width,
676
676
  y: o.top + o.height - e.getBoundingClientRect().height,
@@ -687,9 +687,9 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
687
687
  case "right":
688
688
  return pt(t, e, o);
689
689
  case "right-start":
690
- return bt(t, e, o);
691
- case "right-end":
692
690
  return gt(t, e, o);
691
+ case "right-end":
692
+ return bt(t, e, o);
693
693
  case "bottom":
694
694
  return ht(t, e, o);
695
695
  case "bottom-start":
@@ -710,24 +710,24 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
710
710
  };
711
711
  }
712
712
  }, _t = (t, e, r, o = {}) => {
713
- if (Y(o, e)) {
713
+ if (G(o, e)) {
714
714
  if (typeof window > "u")
715
715
  return !0;
716
- const a = t.x, v = t.y, f = a + e.clientWidth, p = v + e.clientHeight;
717
- return a >= 0 && v >= 0 && f <= window.innerWidth && p <= window.innerHeight;
716
+ const a = t.x, f = t.y, v = a + e.clientWidth, p = f + e.clientHeight;
717
+ return a >= 0 && f >= 0 && v <= window.innerWidth && p <= window.innerHeight;
718
718
  }
719
- if (P(r) !== null)
720
- return L(t.y, e, null, o) > 0 && V(t.x, e, null, o) > 0 && O(t.y, e, null, o) > 0 && z(t.x, e, null, o) > 0;
719
+ if (A(r) !== null)
720
+ return V(t.y, e, null, o) > 0 && L(t.x, e, null, o) > 0 && E(t.y, e, null, o) > 0 && W(t.x, e, null, o) > 0;
721
721
  if (typeof window > "u")
722
722
  return !0;
723
723
  const n = window.innerWidth, c = window.innerHeight, s = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
724
724
  if (s) {
725
- const a = s.getBoundingClientRect(), v = a.left + t.x, f = a.top + t.y, p = v + e.clientWidth, y = f + e.clientHeight;
726
- return v >= 0 && f >= 0 && p <= n && y <= c;
725
+ const a = s.getBoundingClientRect(), f = a.left + t.x, v = a.top + t.y, p = f + e.clientWidth, y = v + e.clientHeight;
726
+ return f >= 0 && v >= 0 && p <= n && y <= c;
727
727
  }
728
728
  const i = t.x, l = t.y, u = i + e.clientWidth, d = l + e.clientHeight;
729
729
  return i >= 0 && l >= 0 && u <= n && d <= c;
730
- }, te = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Ft = (t, e, r) => te(e) === t && r.includes(e) ? e : r.find((o) => te(o) === t) ?? r[0], $t = (t, e, r = {}) => {
730
+ }, te = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", $t = (t, e, r) => te(e) === t && r.includes(e) ? e : r.find((o) => te(o) === t) ?? r[0], Ft = (t, e, r = {}) => {
731
731
  if (typeof window > "u")
732
732
  return {
733
733
  top: 0,
@@ -735,7 +735,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
735
735
  bottom: 0,
736
736
  left: 0
737
737
  };
738
- const o = Y(r, e) ? null : P(t), n = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
738
+ const o = G(r, e) ? null : A(t), n = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
739
739
  top: 0,
740
740
  left: 0,
741
741
  right: window.innerWidth,
@@ -758,7 +758,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
758
758
  i.x = l.x, i.y = l.y, i.placement = l.placement;
759
759
  const u = i.x, d = i.y, a = tt(t);
760
760
  (n = r.middleware) == null || n.forEach((y) => {
761
- const m = y.fn({
761
+ const h = y.fn({
762
762
  x: i.x,
763
763
  y: i.y,
764
764
  options: r,
@@ -769,17 +769,17 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
769
769
  reference: t,
770
770
  scrollDirection: a
771
771
  });
772
- i.x = m.x, i.y = m.y, i.placement = m.placement, y.name === "arrow" && (m.baseX = m.x, m.baseY = m.y, m.x = m.arrowX ?? m.x, m.y = m.arrowY ?? m.y), i.middlewareData[y.name] = m;
772
+ i.x = h.x, i.y = h.y, i.placement = h.placement, y.name === "arrow" && (h.baseX = h.x, h.baseY = h.y, h.x = h.arrowX ?? h.x, h.y = h.arrowY ?? h.y), i.middlewareData[y.name] = h;
773
773
  });
774
- const v = ae(t, e, i.placement, r), f = j(r, "offset"), p = f ? (c = f.params) == null ? void 0 : c.value : 0;
775
- if (Number.isFinite(i.x) || (i.x = v.x), !Number.isFinite(i.y))
776
- if (Y(r, e)) {
777
- const y = t.getBoundingClientRect(), m = e.getBoundingClientRect().height;
778
- i.placement.startsWith("top") ? i.y = y.top - m - p : i.placement.startsWith("bottom") ? i.y = y.bottom + p : i.y = v.y;
774
+ const f = ae(t, e, i.placement, r), v = I(r, "offset"), p = v ? (c = v.params) == null ? void 0 : c.value : 0;
775
+ if (Number.isFinite(i.x) || (i.x = f.x), !Number.isFinite(i.y))
776
+ if (G(r, e)) {
777
+ const y = t.getBoundingClientRect(), h = e.getBoundingClientRect().height;
778
+ i.placement.startsWith("top") ? i.y = y.top - h - p : i.placement.startsWith("bottom") ? i.y = y.bottom + p : i.y = f.y;
779
779
  } else
780
- i.y = v.y;
780
+ i.y = f.y;
781
781
  o(i);
782
- }), xt = ["disabled", "aria-expanded", "onKeydown"], Tt = ["data-placement"], Rt = ["disabled", "aria-selected", "onClick"], fo = /* @__PURE__ */ X({
782
+ }), xt = ["disabled", "aria-expanded", "onKeydown"], zt = ["data-placement"], Tt = ["disabled", "aria-selected", "onClick"], vo = /* @__PURE__ */ K({
783
783
  __name: "select",
784
784
  props: {
785
785
  modelValue: { default: void 0 },
@@ -793,110 +793,110 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
793
793
  emits: ["update:modelValue", "change", "focus", "blur"],
794
794
  setup(t, { emit: e }) {
795
795
  let r = 0;
796
- const o = e, n = t, c = N(null), s = N(null), i = N(null), l = N(!1), u = N("bottom"), d = N("bottom"), a = `vf-select-panel-${++r}`;
797
- let v = null;
798
- const f = w(() => n.options.map((b) => ({
799
- label: b[n.optionLabel],
800
- value: b[n.optionValue],
801
- disabled: b.disabled
802
- }))), p = w(() => f.value.find((b) => b.value === n.modelValue)), y = w(() => {
803
- var b;
804
- return ((b = p.value) == null ? void 0 : b.label) ?? "";
805
- }), m = w(() => {
806
- const b = ["vf-select", l.value ? "vf-select_open" : ""];
807
- return n.size !== "normal" && b.push(`vf-select_${n.size}`), n.disabled && b.push("vf-select_disabled"), b.filter(Boolean);
808
- }), Q = (b) => b.value === n.modelValue, ee = (b) => {
809
- b.disabled || (o("update:modelValue", b.value), o("change", b.value), H());
810
- }, x = (b) => o("focus", b), $ = (b) => o("blur", b), H = () => {
796
+ const o = e, n = t, c = X(null), s = X(null), i = X(null), l = X(!1), u = X("bottom"), d = X("bottom"), a = `vf-select-panel-${++r}`;
797
+ let f = null;
798
+ const v = w(() => n.options.map((g) => ({
799
+ label: g[n.optionLabel],
800
+ value: g[n.optionValue],
801
+ disabled: g.disabled
802
+ }))), p = w(() => v.value.find((g) => g.value === n.modelValue)), y = w(() => {
803
+ var g;
804
+ return ((g = p.value) == null ? void 0 : g.label) ?? "";
805
+ }), h = w(() => {
806
+ const g = ["vf-select", l.value ? "vf-select_open" : ""];
807
+ return n.size !== "normal" && g.push(`vf-select_${n.size}`), n.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
808
+ }), R = (g) => g.value === n.modelValue, D = (g) => {
809
+ g.disabled || (o("update:modelValue", g.value), o("change", g.value), O());
810
+ }, x = (g) => o("focus", g), F = (g) => o("blur", g), O = () => {
811
811
  l.value = !1, u.value = "bottom", d.value = "bottom";
812
- }, A = () => {
812
+ }, j = () => {
813
813
  n.disabled || (l.value = !l.value, l.value && (u.value = "bottom", d.value = "bottom"));
814
814
  }, S = async () => {
815
- var b, F;
816
- l.value || (l.value = !0, await de()), (F = (b = i.value) == null ? void 0 : b.querySelector(".vf-select__option:not(.is-disabled)")) == null || F.focus();
817
- }, D = (b) => {
818
- var T;
815
+ var g, $;
816
+ l.value || (l.value = !0, await ue()), ($ = (g = i.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || $.focus();
817
+ }, N = (g) => {
818
+ var z;
819
819
  if (!l.value || !c.value)
820
820
  return;
821
- const F = b.target;
822
- c.value.contains(F) || (T = i.value) != null && T.contains(F) || H();
823
- }, q = () => {
821
+ const $ = g.target;
822
+ c.value.contains($) || (z = i.value) != null && z.contains($) || O();
823
+ }, Z = () => {
824
824
  if (!s.value || !i.value)
825
825
  return;
826
- const b = s.value, F = i.value, T = async () => {
826
+ const g = s.value, $ = i.value, z = async () => {
827
827
  const {
828
828
  x: Be,
829
829
  y: xe,
830
- placement: Te
831
- } = await Bt(b, F, {
830
+ placement: ze
831
+ } = await Bt(g, $, {
832
832
  placement: u.value,
833
833
  strategy: "fixed",
834
834
  middleware: [st(2), nt({ placements: ["bottom", "top"] })]
835
835
  });
836
- d.value = Te ?? u.value, F.style.minWidth = `${b.getBoundingClientRect().width}px`, F.style.left = `${Be}px`, F.style.top = `${xe}px`;
836
+ d.value = ze ?? u.value, $.style.minWidth = `${g.getBoundingClientRect().width}px`, $.style.left = `${Be}px`, $.style.top = `${xe}px`;
837
837
  }, re = async () => {
838
- await T();
839
- }, $e = dt(b, () => {
838
+ await z();
839
+ }, Fe = ct(g, () => {
840
840
  re();
841
841
  }), ne = () => {
842
842
  re();
843
843
  };
844
- document.addEventListener("scroll", ne, !0), window.addEventListener("resize", ne, !1), v = {
844
+ document.addEventListener("scroll", ne, !0), window.addEventListener("resize", ne, !1), f = {
845
845
  update: re,
846
846
  destroy: () => {
847
- $e(), document.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne, !1);
847
+ Fe(), document.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne, !1);
848
848
  }
849
- }, v.update();
849
+ }, f.update();
850
850
  };
851
- return le(l, async (b) => {
852
- if (!b) {
853
- v && (v.destroy(), v = null);
851
+ return le(l, async (g) => {
852
+ if (!g) {
853
+ f && (f.destroy(), f = null);
854
854
  return;
855
855
  }
856
- await de(), v || q(), v == null || v.update();
856
+ await ue(), f || Z(), f == null || f.update();
857
857
  }), le(
858
858
  () => n.options,
859
859
  () => {
860
- v == null || v.update();
860
+ f == null || f.update();
861
861
  },
862
862
  { deep: !0 }
863
- ), Re(() => {
864
- document.addEventListener("click", D);
865
- }), Se(() => {
866
- document.removeEventListener("click", D), v == null || v.destroy(), v = null;
867
- }), (b, F) => (g(), h("div", {
863
+ ), Te(() => {
864
+ document.addEventListener("click", N);
865
+ }), Re(() => {
866
+ document.removeEventListener("click", N), f == null || f.destroy(), f = null;
867
+ }), (g, $) => (b(), m("div", {
868
868
  ref_key: "root",
869
869
  ref: c,
870
- class: C(m.value)
870
+ class: C(h.value)
871
871
  }, [
872
872
  B("button", {
873
873
  ref_key: "trigger",
874
874
  ref: s,
875
875
  class: "vf-select__control",
876
876
  type: "button",
877
- disabled: b.disabled,
877
+ disabled: g.disabled,
878
878
  "aria-expanded": l.value,
879
879
  "aria-controls": a,
880
880
  "aria-haspopup": "listbox",
881
- onClick: A,
881
+ onClick: j,
882
882
  onKeydown: [
883
- K(G(S, ["prevent"]), ["down"]),
884
- K(G(A, ["prevent"]), ["enter"]),
885
- K(G(H, ["prevent"]), ["esc"])
883
+ q(U(S, ["prevent"]), ["down"]),
884
+ q(U(j, ["prevent"]), ["enter"]),
885
+ q(U(O, ["prevent"]), ["esc"])
886
886
  ],
887
887
  onFocus: x,
888
- onBlur: $
888
+ onBlur: F
889
889
  }, [
890
890
  B("span", {
891
891
  class: C(["vf-select__label", { "vf-select__label_placeholder": !y.value }])
892
- }, M(y.value || b.placeholder), 3),
893
- F[0] || (F[0] = B("span", {
892
+ }, H(y.value || g.placeholder), 3),
893
+ $[0] || ($[0] = B("span", {
894
894
  class: "vf-select__chevron",
895
895
  "aria-hidden": "true"
896
896
  }, "▾", -1))
897
897
  ], 40, xt),
898
- (g(), W(Le, { to: "body" }, [
899
- me(B("div", {
898
+ (b(), M(Se, { to: "body" }, [
899
+ ye(B("div", {
900
900
  id: a,
901
901
  ref_key: "panel",
902
902
  ref: i,
@@ -904,25 +904,25 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
904
904
  role: "listbox",
905
905
  "data-placement": d.value
906
906
  }, [
907
- (g(!0), h(oe, null, ge(f.value, (T) => (g(), h("button", {
908
- key: T.value,
909
- class: C(["vf-select__option", { "is-active": Q(T), "is-disabled": T.disabled }]),
907
+ (b(!0), m(oe, null, he(v.value, (z) => (b(), m("button", {
908
+ key: z.value,
909
+ class: C(["vf-select__option", { "is-active": R(z), "is-disabled": z.disabled }]),
910
910
  type: "button",
911
911
  role: "option",
912
- disabled: T.disabled,
913
- "aria-selected": Q(T),
914
- onClick: (re) => ee(T)
915
- }, M(T.label), 11, Rt))), 128))
916
- ], 8, Tt), [
917
- [ye, l.value]
912
+ disabled: z.disabled,
913
+ "aria-selected": R(z),
914
+ onClick: (re) => D(z)
915
+ }, H(z.label), 11, Tt))), 128))
916
+ ], 8, zt), [
917
+ [ke, l.value]
918
918
  ])
919
919
  ]))
920
920
  ], 2));
921
921
  }
922
- }), St = ["checked", "disabled"], Lt = {
922
+ }), Rt = ["checked", "disabled"], St = {
923
923
  key: 0,
924
924
  class: "vf-checkbox__label"
925
- }, vo = /* @__PURE__ */ X({
925
+ }, po = /* @__PURE__ */ K({
926
926
  __name: "checkbox",
927
927
  props: {
928
928
  modelValue: { type: Boolean, default: !1 },
@@ -938,7 +938,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
938
938
  const i = s.target;
939
939
  r("update:modelValue", i.checked), r("change", s);
940
940
  };
941
- return (s, i) => (g(), h("label", {
941
+ return (s, i) => (b(), m("label", {
942
942
  class: C(n.value)
943
943
  }, [
944
944
  B("input", {
@@ -947,19 +947,19 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
947
947
  checked: s.modelValue,
948
948
  disabled: s.disabled,
949
949
  onChange: c
950
- }, null, 40, St),
950
+ }, null, 40, Rt),
951
951
  i[0] || (i[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
952
- s.label || s.$slots.default ? (g(), h("span", Lt, [
952
+ s.label || s.$slots.default ? (b(), m("span", St, [
953
953
  k(s.$slots, "default", {}, () => [
954
- J(M(s.label), 1)
954
+ ee(H(s.label), 1)
955
955
  ])
956
956
  ])) : _("", !0)
957
957
  ], 2));
958
958
  }
959
- }), Vt = ["checked", "disabled"], zt = {
959
+ }), Vt = ["checked", "disabled"], Lt = {
960
960
  key: 0,
961
961
  class: "vf-switch__label"
962
- }, po = /* @__PURE__ */ X({
962
+ }, go = /* @__PURE__ */ K({
963
963
  __name: "switch",
964
964
  props: {
965
965
  modelValue: { type: Boolean, default: !1 },
@@ -975,7 +975,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
975
975
  const i = s.target;
976
976
  r("update:modelValue", i.checked), r("change", s);
977
977
  };
978
- return (s, i) => (g(), h("label", {
978
+ return (s, i) => (b(), m("label", {
979
979
  class: C(n.value)
980
980
  }, [
981
981
  B("input", {
@@ -988,14 +988,14 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
988
988
  i[0] || (i[0] = B("span", { class: "vf-switch__track" }, [
989
989
  B("span", { class: "vf-switch__thumb" })
990
990
  ], -1)),
991
- s.label || s.$slots.default ? (g(), h("span", zt, [
991
+ s.label || s.$slots.default ? (b(), m("span", Lt, [
992
992
  k(s.$slots, "default", {}, () => [
993
- J(M(s.label), 1)
993
+ ee(H(s.label), 1)
994
994
  ])
995
995
  ])) : _("", !0)
996
996
  ], 2));
997
997
  }
998
- }), Wt = { class: "vf-popover" }, Mt = ["aria-expanded", "onKeydown"], bo = /* @__PURE__ */ X({
998
+ }), Wt = { class: "vf-popover" }, Mt = ["aria-expanded", "onKeydown"], bo = /* @__PURE__ */ K({
999
999
  __name: "popover",
1000
1000
  emits: ["click", "onClick"],
1001
1001
  setup(t, { expose: e, emit: r }) {
@@ -1004,7 +1004,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1004
1004
  const s = `vf-popover-panel-${++c}`, i = () => n.visible = !0, l = () => n.visible = !1, u = () => n.visible = !n.visible, d = () => {
1005
1005
  u(), o("click"), o("onClick");
1006
1006
  };
1007
- return e({ show: i, hide: l, toggle: u }), (a, v) => (g(), h("div", Wt, [
1007
+ return e({ show: i, hide: l, toggle: u }), (a, f) => (b(), m("div", Wt, [
1008
1008
  B("div", {
1009
1009
  class: "vf-popover__button",
1010
1010
  role: "button",
@@ -1014,31 +1014,31 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1014
1014
  "aria-controls": s,
1015
1015
  onClick: d,
1016
1016
  onKeydown: [
1017
- K(G(d, ["prevent"]), ["enter"]),
1018
- K(G(d, ["prevent"]), ["space"])
1017
+ q(U(d, ["prevent"]), ["enter"]),
1018
+ q(U(d, ["prevent"]), ["space"])
1019
1019
  ]
1020
1020
  }, [
1021
1021
  k(a.$slots, "button")
1022
1022
  ], 40, Mt),
1023
- me(he(Xe, {
1023
+ ye(me(Ye, {
1024
1024
  id: s,
1025
1025
  class: "vf-popover__wrapper"
1026
- }, ze({
1027
- default: I(() => [
1028
- v[0] || (v[0] = B("div", { class: "vf-popover__arrow" }, null, -1))
1026
+ }, Le({
1027
+ default: Y(() => [
1028
+ f[0] || (f[0] = B("div", { class: "vf-popover__arrow" }, null, -1))
1029
1029
  ]),
1030
1030
  _: 2
1031
1031
  }, [
1032
1032
  a.$slots.default ? {
1033
1033
  name: "default",
1034
- fn: I(() => [
1034
+ fn: Y(() => [
1035
1035
  k(a.$slots, "default")
1036
1036
  ]),
1037
1037
  key: "0"
1038
1038
  } : void 0,
1039
1039
  a.$slots.header || a.$slots.popoverHeader ? {
1040
1040
  name: "header",
1041
- fn: I(() => [
1041
+ fn: Y(() => [
1042
1042
  k(a.$slots, "header"),
1043
1043
  a.$slots.header ? _("", !0) : k(a.$slots, "popoverHeader", { key: 0 })
1044
1044
  ]),
@@ -1046,7 +1046,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1046
1046
  } : void 0,
1047
1047
  a.$slots.body || a.$slots.popoverBody ? {
1048
1048
  name: "body",
1049
- fn: I(() => [
1049
+ fn: Y(() => [
1050
1050
  k(a.$slots, "body"),
1051
1051
  a.$slots.body ? _("", !0) : k(a.$slots, "popoverBody", { key: 0 })
1052
1052
  ]),
@@ -1054,21 +1054,21 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1054
1054
  } : void 0,
1055
1055
  a.$slots.footer || a.$slots.popoverFooter ? {
1056
1056
  name: "footer",
1057
- fn: I(() => [
1057
+ fn: Y(() => [
1058
1058
  k(a.$slots, "footer"),
1059
1059
  a.$slots.footer ? _("", !0) : k(a.$slots, "popoverFooter", { key: 0 })
1060
1060
  ]),
1061
1061
  key: "3"
1062
1062
  } : void 0
1063
1063
  ]), 1536), [
1064
- [ye, n.visible]
1064
+ [ke, n.visible]
1065
1065
  ])
1066
1066
  ]));
1067
1067
  }
1068
1068
  }), Ht = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Ot = (t) => {
1069
1069
  const e = t.replace(/([A-Z])/g, "-$1");
1070
1070
  return e.charAt(0).toUpperCase() + e.slice(1);
1071
- }, Et = (t) => t.filter((e) => !Ht.includes(e)).map((e) => Ot(e)).join("-").toLowerCase(), Pt = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), ie = (t) => {
1071
+ }, Et = (t) => t.filter((e) => !Ht.includes(e)).map((e) => Ot(e)).join("-").toLowerCase(), ie = (t) => t.join("."), Pt = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), de = (t) => {
1072
1072
  if (!Pt(t))
1073
1073
  return null;
1074
1074
  if (t.length === 4) {
@@ -1076,14 +1076,14 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1076
1076
  return `#${e}${e}${r}${r}${o}${o}`;
1077
1077
  }
1078
1078
  return t.toLowerCase();
1079
- }, we = (t) => {
1080
- const e = ie(t);
1079
+ }, _e = (t) => {
1080
+ const e = de(t);
1081
1081
  if (!e)
1082
1082
  return [0, 0, 0];
1083
1083
  const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, n = r >> 8 & 255, c = r & 255;
1084
1084
  return [o, n, c];
1085
- }, ve = (t) => {
1086
- const [e, r, o] = we(t);
1085
+ }, pe = (t) => {
1086
+ const [e, r, o] = _e(t);
1087
1087
  return `${e}, ${r}, ${o}`;
1088
1088
  }, At = (t, e, r) => {
1089
1089
  const o = t / 255, n = e / 255, c = r / 255, s = Math.max(o, n, c), i = Math.min(o, n, c), l = s - i;
@@ -1108,22 +1108,14 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1108
1108
  const o = e / 100, n = r / 100, c = (1 - Math.abs(2 * n - 1)) * o, s = c * (1 - Math.abs(t / 60 % 2 - 1)), i = n - c / 2;
1109
1109
  let l = 0, u = 0, d = 0;
1110
1110
  t >= 0 && t < 60 ? (l = c, u = s, d = 0) : t >= 60 && t < 120 ? (l = s, u = c, d = 0) : t >= 120 && t < 180 ? (l = 0, u = c, d = s) : t >= 180 && t < 240 ? (l = 0, u = s, d = c) : t >= 240 && t < 300 ? (l = s, u = 0, d = c) : (l = c, u = 0, d = s);
1111
- const a = Math.round((l + i) * 255), v = Math.round((u + i) * 255), f = Math.round((d + i) * 255);
1112
- return [a, v, f];
1113
- }, Nt = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, It = (t, e, r) => Math.min(r, Math.max(e, t)), jt = (t, e) => {
1114
- const r = ie(t);
1111
+ const a = Math.round((l + i) * 255), f = Math.round((u + i) * 255), v = Math.round((d + i) * 255);
1112
+ return [a, f, v];
1113
+ }, jt = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, Nt = (t, e, r) => Math.min(r, Math.max(e, t)), Xt = (t, e) => {
1114
+ const r = de(t);
1115
1115
  if (!r)
1116
1116
  return t;
1117
- const [o, n, c] = we(r), [s, i, l] = At(o, n, c), d = (e - 5) * 7, a = It(l + d, 0, 100), [v, f, p] = Dt(s, i, a);
1118
- return Nt(v, f, p);
1119
- }, Xt = (t) => {
1120
- if (typeof document > "u")
1121
- return null;
1122
- const e = document.getElementById(t);
1123
- if (e && e.tagName.toLowerCase() === "style")
1124
- return e;
1125
- const r = document.createElement("style");
1126
- return r.id = t, document.head.appendChild(r), r;
1117
+ const [o, n, c] = _e(r), [s, i, l] = At(o, n, c), d = (e - 5) * 7, a = Nt(l + d, 0, 100), [f, v, p] = Dt(s, i, a);
1118
+ return jt(f, v, p);
1127
1119
  }, se = (t) => !!t && typeof t == "object" && !Array.isArray(t), ce = (t, e) => {
1128
1120
  if (!e)
1129
1121
  return { ...t };
@@ -1133,7 +1125,7 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1133
1125
  se(c) && se(n) ? r[o] = ce(c, n) : r[o] = n;
1134
1126
  }
1135
1127
  return r;
1136
- }, _e = (t) => {
1128
+ }, Yt = (t) => {
1137
1129
  if (!t)
1138
1130
  return null;
1139
1131
  if (se(t) && "preset" in t) {
@@ -1142,69 +1134,96 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y =
1142
1134
  preset: e.preset ?? {},
1143
1135
  overrides: e.overrides,
1144
1136
  selector: e.selector,
1145
- darkSelector: e.darkSelector
1137
+ darkSelector: e.darkSelector,
1138
+ strict: e.strict
1146
1139
  };
1147
1140
  }
1148
1141
  return { preset: t };
1149
- }, Yt = (t) => {
1150
- const e = [], r = [], o = (n, c) => {
1151
- if (!(!n || typeof n != "object"))
1152
- for (const s in n) {
1153
- const i = n[s], l = c.concat([s]);
1154
- if (i && typeof i == "object") {
1155
- o(i, l);
1142
+ }, It = (t) => {
1143
+ const e = [], r = [], o = [], n = [], c = (l) => o.push(l), s = (l) => n.push(l), i = (l, u) => {
1144
+ if (!(!l || typeof l != "object"))
1145
+ for (const d in l) {
1146
+ const a = l[d], f = u.concat([d]);
1147
+ if (se(a)) {
1148
+ i(a, f);
1156
1149
  continue;
1157
1150
  }
1158
- if (typeof i != "string")
1151
+ if (a && typeof a == "object") {
1152
+ s(`Theme value "${ie(f)}" is not a plain object or string and will be ignored.`);
1159
1153
  continue;
1160
- const d = l.includes("colorScheme") && l.includes("dark") ? r : e, a = Et(l);
1161
- if (d.push(`--vf-${a}: ${i}`), l.includes("colors")) {
1162
- const v = ie(i);
1163
- if (!v)
1154
+ }
1155
+ if (typeof a != "string") {
1156
+ s(`Theme value "${ie(f)}" is not a string and will be ignored.`);
1157
+ continue;
1158
+ }
1159
+ const p = f.includes("colorScheme") && f.includes("dark") ? r : e, y = Et(f);
1160
+ if (p.push(`--vf-${y}: ${a}`), f.includes("colors")) {
1161
+ const h = de(a);
1162
+ if (!h) {
1163
+ c(
1164
+ `Theme color "${ie(f)}" is not hex. Shade variables will not be generated for it.`
1165
+ );
1164
1166
  continue;
1165
- if (d.push(`--vf-${a}-rgb: ${ve(v)}`), s !== "white")
1166
- for (let f = 1; f < 10; ++f) {
1167
- const p = jt(v, f);
1168
- d.push(`--vf-${a}-${f}00: ${p}`), d.push(`--vf-${a}-${f}00-rgb: ${ve(p)}`);
1167
+ }
1168
+ if (p.push(`--vf-${y}-rgb: ${pe(h)}`), d !== "white")
1169
+ for (let R = 1; R < 10; ++R) {
1170
+ const D = Xt(h, R);
1171
+ p.push(`--vf-${y}-${R}00: ${D}`), p.push(`--vf-${y}-${R}00-rgb: ${pe(D)}`);
1169
1172
  }
1170
1173
  }
1171
1174
  }
1172
1175
  };
1173
- return o(t, []), { baseVars: e, darkVars: r };
1174
- }, Kt = (t, e, r) => {
1175
- const { baseVars: o, darkVars: n } = Yt(t), c = Xt("vueforge-theme");
1176
- if (!c)
1176
+ return i(t, []), { baseVars: e, darkVars: r, warnings: o, errors: n };
1177
+ }, Kt = (t) => {
1178
+ if (typeof document > "u")
1179
+ return null;
1180
+ const e = document.getElementById(t);
1181
+ if (e && e.tagName.toLowerCase() === "style")
1182
+ return e;
1183
+ const r = document.createElement("style");
1184
+ return r.id = t, document.head.appendChild(r), r;
1185
+ }, Gt = (t) => ({
1186
+ selector: t.selector ?? ":root",
1187
+ darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1188
+ }), qt = (t, e, r, o) => {
1189
+ const { baseVars: n, darkVars: c, warnings: s, errors: i } = It(t), l = Kt("vueforge-theme");
1190
+ if (!l)
1177
1191
  return;
1178
- const s = [];
1179
- o.length && s.push(`${e} { ${o.join(";")} }`), n.length && s.push(`${r} { ${n.join(";")} }`), c.textContent = s.join(`
1192
+ if (i.length) {
1193
+ if (o)
1194
+ throw new Error(`[VueForge] ${i.join(" ")}`);
1195
+ for (const d of i)
1196
+ console.warn(`[VueForge] ${d}`);
1197
+ }
1198
+ if (s.length)
1199
+ for (const d of s)
1200
+ console.warn(`[VueForge] ${d}`);
1201
+ const u = [];
1202
+ n.length && u.push(`${e} { ${n.join(";")} }`), c.length && u.push(`${r} { ${c.join(";")} }`), l.textContent = u.join(`
1180
1203
  `);
1181
1204
  };
1182
- let E = null;
1183
- const Gt = (t) => ({
1184
- selector: t.selector ?? ":root",
1185
- darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1186
- }), Fe = (t) => {
1187
- const e = _e(t);
1205
+ let P = null;
1206
+ const $e = (t) => {
1207
+ const e = Yt(t);
1188
1208
  if (!e)
1189
1209
  return;
1190
1210
  const r = ce(e.preset, e.overrides), { selector: o, darkSelector: n } = Gt(e);
1191
- E = { ...e }, Kt(r, o, n);
1192
- }, go = (t) => {
1193
- if (!E)
1211
+ P = { ...e }, qt(r, o, n, e.strict);
1212
+ }, ho = (t) => {
1213
+ if (!P)
1194
1214
  return;
1195
- const e = t.overrides === void 0 ? E.overrides : ce(E.overrides ?? {}, t.overrides ?? {}), r = {
1196
- preset: t.preset ?? E.preset,
1215
+ const e = t.overrides === void 0 ? P.overrides : ce(P.overrides ?? {}, t.overrides ?? {}), r = {
1216
+ preset: t.preset ?? P.preset,
1197
1217
  overrides: e,
1198
- selector: t.selector ?? E.selector,
1199
- darkSelector: t.darkSelector ?? E.darkSelector
1218
+ selector: t.selector ?? P.selector,
1219
+ darkSelector: t.darkSelector ?? P.darkSelector
1200
1220
  };
1201
- Fe(r);
1202
- }, ho = () => E ? { ...E } : null, mo = {
1221
+ $e(r);
1222
+ }, mo = () => P ? { ...P } : null, yo = {
1203
1223
  install(t, e = {}) {
1204
- const r = _e(e.theme);
1205
- r && Fe(r);
1224
+ e.theme && $e(e.theme);
1206
1225
  }
1207
- }, pe = {
1226
+ }, ge = {
1208
1227
  colors: {
1209
1228
  white: "#ffffff",
1210
1229
  green: "#0cbc87",
@@ -1216,6 +1235,36 @@ const Gt = (t) => ({
1216
1235
  gray: "#adb5bd"
1217
1236
  },
1218
1237
  borderWidth: "1px",
1238
+ controls: {
1239
+ height: "2rem",
1240
+ paddingY: "0.25rem",
1241
+ paddingX: "0.6rem"
1242
+ },
1243
+ radii: {
1244
+ sm: "4px",
1245
+ md: "6px",
1246
+ lg: "10px"
1247
+ },
1248
+ typography: {
1249
+ fontSize: "1rem",
1250
+ lineHeight: "1.4"
1251
+ },
1252
+ states: {
1253
+ disabledOpacity: "0.6",
1254
+ focusRingShadow: "0 0 0 3px rgba(var(--vf-blue-600-rgb), 0.12)"
1255
+ },
1256
+ sizes: {
1257
+ sm: {
1258
+ fontSize: "0.875rem",
1259
+ paddingY: "0.2rem",
1260
+ paddingX: "0.5rem"
1261
+ },
1262
+ lg: {
1263
+ fontSize: "1.125rem",
1264
+ paddingY: "0.5rem",
1265
+ paddingX: "1rem"
1266
+ }
1267
+ },
1219
1268
  colorScheme: {
1220
1269
  light: {
1221
1270
  bgColor: "#ffffff",
@@ -1236,19 +1285,19 @@ const Gt = (t) => ({
1236
1285
  dividerColor: "#2e2e32"
1237
1286
  }
1238
1287
  }
1239
- }, qt = {
1240
- fontSize: "1rem",
1241
- padding: "6px 10px",
1242
- borderRadius: "6px",
1288
+ }, Ut = {
1289
+ fontSize: "var(--vf-typography-font-size)",
1290
+ padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1291
+ borderRadius: "var(--vf-radii-md)",
1243
1292
  roundedBorderRadius: "2rem",
1244
1293
  iconGap: "6px",
1245
1294
  small: {
1246
- fontSize: "0.875rem",
1247
- padding: "4px 8px"
1295
+ fontSize: "var(--vf-sizes-sm-font-size)",
1296
+ padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)"
1248
1297
  },
1249
1298
  large: {
1250
- fontSize: "1.125rem",
1251
- padding: "4px 8px"
1299
+ fontSize: "var(--vf-sizes-lg-font-size)",
1300
+ padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)"
1252
1301
  },
1253
1302
  colorScheme: {
1254
1303
  light: {
@@ -1378,34 +1427,35 @@ const Gt = (t) => ({
1378
1427
  }
1379
1428
  }
1380
1429
  }
1381
- }, Ut = {
1430
+ }, Zt = {
1382
1431
  padding: "12px",
1383
1432
  borderColor: "var(--vf-border-color)",
1384
- borderRadius: "6px"
1385
- }, Zt = {}, Jt = {
1433
+ borderRadius: "var(--vf-radii-md)"
1434
+ }, Jt = {}, Qt = {
1386
1435
  gap: "0.5rem",
1387
- fontSize: "1rem",
1388
- padding: "0.5rem 0.75rem",
1389
- borderRadius: "6px",
1436
+ fontSize: "var(--vf-typography-font-size)",
1437
+ padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1438
+ borderRadius: "var(--vf-radii-md)",
1390
1439
  borderColor: "var(--vf-border-color)",
1391
1440
  backgroundColor: "var(--vf-bg-color)",
1392
1441
  textColor: "var(--vf-text-color)",
1393
1442
  placeholderColor: "var(--vf-secondary-text-color)",
1394
1443
  focusBorderColor: "var(--vf-blue-600)",
1444
+ focusRingShadow: "var(--vf-states-focus-ring-shadow)",
1395
1445
  hoverBorderColor: "var(--vf-blue-500)",
1396
- disabledOpacity: "0.6",
1446
+ disabledOpacity: "var(--vf-states-disabled-opacity)",
1397
1447
  small: {
1398
- padding: "0.375rem 0.5rem",
1399
- fontSize: "0.875rem"
1448
+ padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
1449
+ fontSize: "var(--vf-sizes-sm-font-size)"
1400
1450
  },
1401
1451
  large: {
1402
- padding: "0.625rem 0.875rem",
1403
- fontSize: "1.125rem"
1452
+ padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1453
+ fontSize: "var(--vf-sizes-lg-font-size)"
1404
1454
  }
1405
- }, Qt = {
1455
+ }, eo = {
1406
1456
  hoverColor: "var(--vf-blue)",
1407
1457
  activeColor: "var(--vf-blue)"
1408
- }, eo = {
1458
+ }, to = {
1409
1459
  iconGap: "6px",
1410
1460
  submenuOffset: "12px",
1411
1461
  separatorThickness: "1px",
@@ -1425,45 +1475,45 @@ const Gt = (t) => ({
1425
1475
  marginBottom: "0.5rem",
1426
1476
  marginLeft: "0.5rem"
1427
1477
  }
1428
- }, to = {
1429
- backgroundColor: "var(--vf-bg-color)"
1430
1478
  }, oo = {
1479
+ backgroundColor: "var(--vf-bg-color)"
1480
+ }, ro = {
1431
1481
  minWidth: "12rem",
1432
- fontSize: "1rem",
1482
+ fontSize: "var(--vf-typography-font-size)",
1433
1483
  controlGap: "0.75rem",
1434
1484
  chevronSize: "0.9em",
1435
- padding: "0.5rem 0.75rem",
1436
- borderRadius: "6px",
1485
+ padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1486
+ borderRadius: "var(--vf-radii-md)",
1437
1487
  borderColor: "var(--vf-border-color)",
1438
1488
  backgroundColor: "var(--vf-bg-color)",
1439
1489
  textColor: "var(--vf-text-color)",
1440
1490
  focusBorderColor: "var(--vf-blue-600)",
1441
1491
  hoverBorderColor: "var(--vf-blue-500)",
1442
- disabledOpacity: "0.6",
1492
+ disabledOpacity: "var(--vf-states-disabled-opacity)",
1443
1493
  panelBackgroundColor: "var(--vf-bg-color)",
1444
1494
  panelBorderColor: "var(--vf-border-color)",
1445
1495
  panelPadding: "0.35rem",
1446
1496
  panelMaxHeight: "16rem",
1447
1497
  panelRadiusOffset: "2px",
1448
1498
  panelShadow: "0 10px 30px rgba(0, 0, 0, 0.12)",
1449
- focusRingShadow: "0 0 0 3px rgba(var(--vf-blue-600-rgb), 0.12)",
1499
+ focusRingShadow: "var(--vf-states-focus-ring-shadow)",
1450
1500
  optionPadding: "0.5rem 0.6rem",
1451
- optionBorderRadius: "6px",
1501
+ optionBorderRadius: "var(--vf-radii-md)",
1452
1502
  optionHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
1453
1503
  optionActiveBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
1454
1504
  optionActiveTextColor: "var(--vf-text-color)",
1455
1505
  small: {
1456
- padding: "0.375rem 0.5rem",
1457
- fontSize: "0.875rem"
1506
+ padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
1507
+ fontSize: "var(--vf-sizes-sm-font-size)"
1458
1508
  },
1459
1509
  large: {
1460
- padding: "0.625rem 0.875rem",
1461
- fontSize: "1.125rem"
1510
+ padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1511
+ fontSize: "var(--vf-sizes-lg-font-size)"
1462
1512
  }
1463
- }, ro = {
1513
+ }, no = {
1464
1514
  size: "1rem",
1465
1515
  gap: "0.5rem",
1466
- borderRadius: "4px",
1516
+ borderRadius: "var(--vf-radii-sm)",
1467
1517
  checkBorderRadius: "2px",
1468
1518
  borderColor: "var(--vf-border-color)",
1469
1519
  backgroundColor: "var(--vf-bg-color)",
@@ -1471,8 +1521,8 @@ const Gt = (t) => ({
1471
1521
  checkedBorderColor: "var(--vf-blue)",
1472
1522
  checkColor: "#ffffff",
1473
1523
  textColor: "var(--vf-text-color)",
1474
- disabledOpacity: "0.6"
1475
- }, no = {
1524
+ disabledOpacity: "var(--vf-states-disabled-opacity)"
1525
+ }, lo = {
1476
1526
  width: "2.25rem",
1477
1527
  height: "1.25rem",
1478
1528
  thumbSize: "1rem",
@@ -1483,36 +1533,36 @@ const Gt = (t) => ({
1483
1533
  checkedBackgroundColor: "var(--vf-blue)",
1484
1534
  thumbColor: "#ffffff",
1485
1535
  textColor: "var(--vf-text-color)",
1486
- disabledOpacity: "0.6"
1487
- }, yo = {
1488
- ...pe,
1536
+ disabledOpacity: "var(--vf-states-disabled-opacity)"
1537
+ }, ko = {
1538
+ ...ge,
1489
1539
  components: {
1490
- base: pe,
1491
- button: qt,
1492
- card: Ut,
1493
- codeBlock: Zt,
1494
- input: Jt,
1495
- link: Qt,
1496
- menu: eo,
1497
- popover: to,
1498
- select: oo,
1499
- checkbox: ro,
1500
- switch: no
1540
+ base: ge,
1541
+ button: Ut,
1542
+ card: Zt,
1543
+ codeBlock: Jt,
1544
+ input: Qt,
1545
+ link: eo,
1546
+ menu: to,
1547
+ popover: oo,
1548
+ select: ro,
1549
+ checkbox: no,
1550
+ switch: lo
1501
1551
  }
1502
1552
  };
1503
1553
  export {
1504
- co as Button,
1505
- Xe as Card,
1506
- vo as Checkbox,
1507
- yo as DefaultTheme,
1508
- uo as Input,
1509
- ke as Link,
1510
- io as Menu,
1554
+ uo as Button,
1555
+ Ye as Card,
1556
+ po as Checkbox,
1557
+ ko as DefaultTheme,
1558
+ fo as Input,
1559
+ Ce as Link,
1560
+ co as Menu,
1511
1561
  bo as Popover,
1512
- fo as Select,
1513
- po as Switch,
1514
- mo as VueForge,
1515
- ho as getTheme,
1516
- Fe as setTheme,
1517
- go as updateTheme
1562
+ vo as Select,
1563
+ go as Switch,
1564
+ yo as VueForge,
1565
+ mo as getTheme,
1566
+ $e as setTheme,
1567
+ ho as updateTheme
1518
1568
  };