@theh0n/ui 1.1.1 → 1.1.4

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as C, ref as z, computed as _, openBlock as i, createElementBlock as c, normalizeClass as k, Fragment as K, renderList as ae, createElementVNode as p, renderSlot as b, toDisplayString as $, createCommentVNode as m, createVNode as A, Transition as R, withCtx as E, withDirectives as re, vShow as le, watch as V, shallowRef as G, createBlock as w, Teleport as P, unref as v, normalizeStyle as B, resolveDynamicComponent as M, normalizeProps as ce, mergeProps as j, createTextVNode as L, onMounted as Q, onUnmounted as ue, withModifiers as D } from "vue";
2
- import './index.css';const U = {
1
+ import { defineComponent as I, ref as O, computed as y, openBlock as l, createElementBlock as u, normalizeClass as k, Fragment as Z, renderList as ae, createElementVNode as m, renderSlot as C, toDisplayString as x, createCommentVNode as b, createVNode as A, Transition as q, withCtx as H, withDirectives as he, vShow as ve, watch as E, shallowRef as ie, createBlock as V, Teleport as J, unref as _, normalizeStyle as R, resolveDynamicComponent as K, normalizeProps as me, mergeProps as X, createTextVNode as j, onMounted as G, onUnmounted as ye, withModifiers as F, onBeforeUnmount as pe, nextTick as ge } from "vue";
2
+ import './index.css';const te = {
3
3
  colors: {
4
4
  primary: "#171f2a",
5
5
  secondary: "#202a38",
@@ -18,21 +18,21 @@ import './index.css';const U = {
18
18
  fontFamily: '"Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif',
19
19
  focusRingColor: "rgba(79, 70, 229, 0.4)"
20
20
  };
21
- function de(e) {
21
+ function _e(e) {
22
22
  if (!e)
23
- return Z(U);
24
- const n = Z(U);
25
- return X(n, e);
23
+ return ne(te);
24
+ const n = ne(te);
25
+ return le(n, e);
26
26
  }
27
- function fe(e) {
27
+ function be(e) {
28
28
  if (typeof window > "u" || typeof document > "u")
29
29
  return;
30
- const n = document.documentElement, t = he(e);
31
- Object.entries(t).forEach(([s, o]) => {
32
- n.style.setProperty(s, o);
30
+ const n = document.documentElement, t = ke(e);
31
+ Object.entries(t).forEach(([r, o]) => {
32
+ n.style.setProperty(r, o);
33
33
  });
34
34
  }
35
- function he(e) {
35
+ function ke(e) {
36
36
  return {
37
37
  "--h0n-primary": e.colors.primary,
38
38
  "--h0n-secondary": e.colors.secondary,
@@ -49,28 +49,28 @@ function he(e) {
49
49
  "--h0n-focus-ring": e.focusRingColor
50
50
  };
51
51
  }
52
- function X(e, n) {
52
+ function le(e, n) {
53
53
  const t = Array.isArray(e) ? [...e] : { ...e };
54
- return n && Object.entries(n).forEach(([s, o]) => {
54
+ return n && Object.entries(n).forEach(([r, o]) => {
55
55
  if (o === void 0)
56
56
  return;
57
- const h = e[s];
58
- J(h) && J(o) ? t[s] = X(
59
- h,
57
+ const v = e[r];
58
+ oe(v) && oe(o) ? t[r] = le(
59
+ v,
60
60
  o
61
- ) : t[s] = o;
61
+ ) : t[r] = o;
62
62
  }), t;
63
63
  }
64
- function Z(e) {
64
+ function ne(e) {
65
65
  return JSON.parse(JSON.stringify(e));
66
66
  }
67
- function J(e) {
67
+ function oe(e) {
68
68
  return Object.prototype.toString.call(e) === "[object Object]";
69
69
  }
70
- const ye = ["disabled", "aria-expanded", "aria-controls", "onClick"], pe = { class: "h0n-ui-accordion__title" }, ve = { class: "h0n-ui-accordion__title-text" }, me = {
70
+ const $e = ["disabled", "aria-expanded", "aria-controls", "onClick"], we = { class: "h0n-ui-accordion__title" }, Ce = { class: "h0n-ui-accordion__title-text" }, xe = {
71
71
  key: 0,
72
72
  class: "h0n-ui-accordion__badge"
73
- }, _e = ["id", "aria-label"], ge = { class: "h0n-ui-accordion__body-inner" }, be = { key: 0 }, $e = /* @__PURE__ */ C({
73
+ }, Oe = ["id", "aria-label"], Ie = { class: "h0n-ui-accordion__body-inner" }, Se = { key: 0 }, Be = /* @__PURE__ */ I({
74
74
  __name: "Accordion",
75
75
  props: {
76
76
  items: { default: () => [] },
@@ -81,90 +81,90 @@ const ye = ["disabled", "aria-expanded", "aria-controls", "onClick"], pe = { cla
81
81
  },
82
82
  emits: ["update:modelValue", "toggle"],
83
83
  setup(e, { emit: n }) {
84
- const t = e, s = n;
84
+ const t = e, r = n;
85
85
  function o(a) {
86
86
  return a == null ? [] : Array.isArray(a) ? t.multiple ? a : a.slice(0, 1) : [a];
87
87
  }
88
- const h = z(o(t.defaultOpen)), u = _(
89
- () => t.modelValue !== void 0 ? o(t.modelValue) : h.value
90
- ), l = _(() => new Set(u.value));
88
+ const v = O(o(t.defaultOpen)), f = y(
89
+ () => t.modelValue !== void 0 ? o(t.modelValue) : v.value
90
+ ), h = y(() => new Set(f.value));
91
91
  function d(a) {
92
- return l.value.has(a);
92
+ return h.value.has(a);
93
93
  }
94
- function r(a) {
95
- t.modelValue === void 0 && (h.value = a), s("update:modelValue", t.multiple ? a : a[0] ?? null);
94
+ function c(a) {
95
+ t.modelValue === void 0 && (v.value = a), r("update:modelValue", t.multiple ? a : a[0] ?? null);
96
96
  }
97
- function g(a) {
98
- const y = [...u.value];
97
+ function p(a) {
98
+ const i = [...f.value];
99
99
  if (t.multiple) {
100
- const x = new Set(y);
101
- x.has(a) ? x.delete(a) : x.add(a);
102
- const ie = Array.from(x);
103
- r(ie), s("toggle", { id: a, open: x.has(a) });
100
+ const w = new Set(i);
101
+ w.has(a) ? w.delete(a) : w.add(a);
102
+ const B = Array.from(w);
103
+ c(B), r("toggle", { id: a, open: w.has(a) });
104
104
  return;
105
105
  }
106
- const f = y[0] === a;
107
- r(f ? [] : [a]), s("toggle", { id: a, open: !f });
106
+ const s = i[0] === a;
107
+ c(s ? [] : [a]), r("toggle", { id: a, open: !s });
108
108
  }
109
- function N(a) {
109
+ function S(a) {
110
110
  return `h0n-ui-accordion-body-${String(a)}`;
111
111
  }
112
- function F(a) {
112
+ function T(a) {
113
113
  return a.querySelector(".h0n-ui-accordion__body-inner");
114
114
  }
115
- function ee(a) {
116
- const y = a, f = F(y);
117
- f && (y.style.height = "0px", y.style.opacity = "0", requestAnimationFrame(() => {
118
- y.style.height = `${f.scrollHeight}px`, y.style.opacity = "1";
115
+ function L(a) {
116
+ const i = a, s = T(i);
117
+ s && (i.style.height = "0px", i.style.opacity = "0", requestAnimationFrame(() => {
118
+ i.style.height = `${s.scrollHeight}px`, i.style.opacity = "1";
119
119
  }));
120
120
  }
121
- function te(a) {
122
- const y = a;
123
- y.style.height = "auto", y.style.opacity = "";
121
+ function P(a) {
122
+ const i = a;
123
+ i.style.height = "auto", i.style.opacity = "";
124
124
  }
125
- function ne(a) {
126
- const y = a, f = F(y);
127
- f && (y.style.height = `${f.scrollHeight}px`, y.style.opacity = "1", y.offsetHeight, requestAnimationFrame(() => {
128
- y.style.height = "0px", y.style.opacity = "0";
125
+ function D(a) {
126
+ const i = a, s = T(i);
127
+ s && (i.style.height = `${s.scrollHeight}px`, i.style.opacity = "1", i.offsetHeight, requestAnimationFrame(() => {
128
+ i.style.height = "0px", i.style.opacity = "0";
129
129
  }));
130
130
  }
131
- function oe(a) {
132
- const y = a;
133
- y.style.height = "", y.style.opacity = "";
131
+ function g(a) {
132
+ const i = a;
133
+ i.style.height = "", i.style.opacity = "";
134
134
  }
135
- return (a, y) => (i(), c("div", {
135
+ return (a, i) => (l(), u("div", {
136
136
  class: k(["h0n-ui-accordion", { "is-compact": e.compact }])
137
137
  }, [
138
- (i(!0), c(K, null, ae(e.items, (f) => (i(), c("div", {
139
- key: f.id,
138
+ (l(!0), u(Z, null, ae(e.items, (s) => (l(), u("div", {
139
+ key: s.id,
140
140
  class: k(["h0n-ui-accordion__item", {
141
- "is-open": d(f.id),
142
- "is-disabled": !!f.disabled
141
+ "is-open": d(s.id),
142
+ "is-disabled": !!s.disabled
143
143
  }])
144
144
  }, [
145
- p("button", {
145
+ m("button", {
146
146
  class: "h0n-ui-accordion__header",
147
147
  type: "button",
148
- disabled: f.disabled,
149
- "aria-expanded": d(f.id) ? "true" : "false",
150
- "aria-controls": N(f.id),
151
- onClick: (se) => g(f.id)
148
+ disabled: s.disabled,
149
+ "aria-expanded": d(s.id) ? "true" : "false",
150
+ "aria-controls": S(s.id),
151
+ onClick: ($) => p(s.id)
152
152
  }, [
153
- p("span", pe, [
154
- b(a.$slots, "header", {
155
- item: f,
156
- open: d(f.id)
153
+ m("span", we, [
154
+ C(a.$slots, "header", {
155
+ item: s,
156
+ open: d(s.id)
157
157
  }, () => [
158
- p("span", ve, $(f.title), 1),
159
- f.badge ? (i(), c("span", me, $(f.badge), 1)) : m("", !0)
158
+ m("span", Ce, x(s.title), 1),
159
+ s.badge ? (l(), u("span", xe, x(s.badge), 1)) : b("", !0)
160
160
  ])
161
161
  ]),
162
- y[0] || (y[0] = p("svg", {
162
+ i[0] || (i[0] = m("svg", {
163
163
  class: "h0n-ui-accordion__chevron",
164
164
  viewBox: "0 0 20 20",
165
165
  "aria-hidden": "true"
166
166
  }, [
167
- p("path", {
167
+ m("path", {
168
168
  d: "M5 7.5L10 12.5L15 7.5",
169
169
  fill: "none",
170
170
  stroke: "currentColor",
@@ -173,31 +173,31 @@ const ye = ["disabled", "aria-expanded", "aria-controls", "onClick"], pe = { cla
173
173
  "stroke-linejoin": "round"
174
174
  })
175
175
  ], -1))
176
- ], 8, ye),
177
- A(R, {
176
+ ], 8, $e),
177
+ A(q, {
178
178
  name: "h0n-ui-accordion",
179
- onEnter: ee,
180
- onAfterEnter: te,
181
- onLeave: ne,
182
- onAfterLeave: oe
179
+ onEnter: L,
180
+ onAfterEnter: P,
181
+ onLeave: D,
182
+ onAfterLeave: g
183
183
  }, {
184
- default: E(() => [
185
- re(p("div", {
184
+ default: H(() => [
185
+ he(m("div", {
186
186
  class: "h0n-ui-accordion__body",
187
- id: N(f.id),
187
+ id: S(s.id),
188
188
  role: "region",
189
- "aria-label": f.title
189
+ "aria-label": s.title
190
190
  }, [
191
- p("div", ge, [
192
- b(a.$slots, "body", {
193
- item: f,
194
- open: d(f.id)
191
+ m("div", Ie, [
192
+ C(a.$slots, "body", {
193
+ item: s,
194
+ open: d(s.id)
195
195
  }, () => [
196
- f.body ? (i(), c("p", be, $(f.body), 1)) : m("", !0)
196
+ s.body ? (l(), u("p", Se, x(s.body), 1)) : b("", !0)
197
197
  ])
198
198
  ])
199
- ], 8, _e), [
200
- [le, d(f.id)]
199
+ ], 8, Oe), [
200
+ [ve, d(s.id)]
201
201
  ])
202
202
  ]),
203
203
  _: 2
@@ -206,64 +206,64 @@ const ye = ["disabled", "aria-expanded", "aria-controls", "onClick"], pe = { cla
206
206
  ], 2));
207
207
  }
208
208
  });
209
- function q() {
209
+ function Q() {
210
210
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : Date.now().toString(36) + Math.random().toString(36).slice(2, 10);
211
211
  }
212
- const W = 1e4, O = z([]);
213
- function H() {
214
- const e = _(() => O.value.at(-1) ?? null);
215
- function n(l) {
216
- return O.value.findIndex((d) => d.id === l);
212
+ const se = 1e4, z = O([]);
213
+ function N() {
214
+ const e = y(() => z.value.at(-1) ?? null);
215
+ function n(h) {
216
+ return z.value.findIndex((d) => d.id === h);
217
217
  }
218
- function t(l) {
219
- const d = n(l);
220
- return d === -1 ? W : W + d * 2;
218
+ function t(h) {
219
+ const d = n(h);
220
+ return d === -1 ? se : se + d * 2;
221
221
  }
222
- function s(l) {
223
- return t(l) + 1;
222
+ function r(h) {
223
+ return t(h) + 1;
224
224
  }
225
- function o(l) {
226
- const d = l.id ?? q();
227
- return h(d), O.value.push({
225
+ function o(h) {
226
+ const d = h.id ?? Q();
227
+ return v(d), z.value.push({
228
228
  showOverlay: !0,
229
229
  closeOnOverlay: !0,
230
230
  closeOnEsc: !0,
231
- ...l,
231
+ ...h,
232
232
  id: d
233
233
  }), d;
234
234
  }
235
- function h(l) {
236
- const d = n(l);
237
- d !== -1 && O.value.splice(d, 1);
235
+ function v(h) {
236
+ const d = n(h);
237
+ d !== -1 && z.value.splice(d, 1);
238
238
  }
239
- function u() {
239
+ function f() {
240
240
  e.value?.onRequestClose?.();
241
241
  }
242
- return V(
243
- () => O.value.length,
244
- (l) => {
245
- document.documentElement.classList.toggle("no-scroll", l > 0);
242
+ return E(
243
+ () => z.value.length,
244
+ (h) => {
245
+ document.documentElement.classList.toggle("no-scroll", h > 0);
246
246
  },
247
247
  { immediate: !0 }
248
248
  ), {
249
- stack: O,
249
+ stack: z,
250
250
  top: e,
251
251
  push: o,
252
- remove: h,
253
- requestCloseTop: u,
252
+ remove: v,
253
+ requestCloseTop: f,
254
254
  getBackdropZIndex: t,
255
- getContentZIndex: s
255
+ getContentZIndex: r
256
256
  };
257
257
  }
258
- const I = G(null);
259
- let T = null;
260
- function ke() {
261
- const e = H();
262
- function n(s) {
258
+ const M = ie(null);
259
+ let W = null;
260
+ function Re() {
261
+ const e = N();
262
+ function n(r) {
263
263
  return new Promise((o) => {
264
- const h = q();
265
- T = o, I.value = { ...s, id: h }, e.push({
266
- id: h,
264
+ const v = Q();
265
+ W = o, M.value = { ...r, id: v }, e.push({
266
+ id: v,
267
267
  showOverlay: !0,
268
268
  closeOnOverlay: !0,
269
269
  closeOnEsc: !0,
@@ -271,67 +271,67 @@ function ke() {
271
271
  });
272
272
  });
273
273
  }
274
- function t(s) {
275
- if (!I.value) return;
276
- const o = I.value.id;
277
- I.value = null, e.remove(o), T?.(s), T = null;
274
+ function t(r) {
275
+ if (!M.value) return;
276
+ const o = M.value.id;
277
+ M.value = null, e.remove(o), W?.(r), W = null;
278
278
  }
279
279
  return {
280
- active: I,
280
+ active: M,
281
281
  open: n,
282
282
  close: t
283
283
  };
284
284
  }
285
- const Ce = {
285
+ const Te = {
286
286
  class: "h0n-alert",
287
287
  role: "dialog",
288
288
  "aria-modal": "true"
289
- }, Oe = {
289
+ }, Le = {
290
290
  key: 0,
291
291
  class: "h0n-alert__header"
292
- }, we = { class: "h0n-alert__title" }, xe = { class: "h0n-alert__body" }, Ie = { key: 1 }, Se = /* @__PURE__ */ C({
292
+ }, ze = { class: "h0n-alert__title" }, Ee = { class: "h0n-alert__body" }, Ve = { key: 1 }, Ae = /* @__PURE__ */ I({
293
293
  __name: "Alert",
294
294
  setup(e) {
295
- const { active: n, close: t } = ke(), { getContentZIndex: s } = H(), o = () => t(!0), h = () => t(!1), u = () => t(!0), l = _(() => n.value?.type === "info"), d = _(
296
- () => n.value ? s(n.value.id) : void 0
295
+ const { active: n, close: t } = Re(), { getContentZIndex: r } = N(), o = () => t(!0), v = () => t(!1), f = () => t(!0), h = y(() => n.value?.type === "info"), d = y(
296
+ () => n.value ? r(n.value.id) : void 0
297
297
  );
298
- return (r, g) => (i(), w(P, { to: "body" }, [
299
- A(R, {
298
+ return (c, p) => (l(), V(J, { to: "body" }, [
299
+ A(q, {
300
300
  name: "h0n-alert-scale",
301
301
  appear: ""
302
302
  }, {
303
- default: E(() => [
304
- v(n) ? (i(), c("div", {
303
+ default: H(() => [
304
+ _(n) ? (l(), u("div", {
305
305
  key: 0,
306
306
  class: "h0n-alert-layer",
307
- style: B({ zIndex: d.value })
307
+ style: R({ zIndex: d.value })
308
308
  }, [
309
- p("section", Ce, [
310
- v(n).title || r.$slots.header ? (i(), c("header", Oe, [
311
- b(r.$slots, "header", {}, () => [
312
- p("h4", we, $(v(n).title), 1)
309
+ m("section", Te, [
310
+ _(n).title || c.$slots.header ? (l(), u("header", Le, [
311
+ C(c.$slots, "header", {}, () => [
312
+ m("h4", ze, x(_(n).title), 1)
313
313
  ], !0)
314
- ])) : m("", !0),
315
- p("div", xe, [
316
- v(n).component ? (i(), w(M(v(n).component), ce(j({ key: 0 }, v(n).props)), null, 16)) : v(n).message ? (i(), c("p", Ie, $(v(n).message), 1)) : m("", !0)
314
+ ])) : b("", !0),
315
+ m("div", Ee, [
316
+ _(n).component ? (l(), V(K(_(n).component), me(X({ key: 0 }, _(n).props)), null, 16)) : _(n).message ? (l(), u("p", Ve, x(_(n).message), 1)) : b("", !0)
317
317
  ]),
318
- p("footer", {
319
- class: k(["h0n-alert__actions", { "is-single": l.value }])
318
+ m("footer", {
319
+ class: k(["h0n-alert__actions", { "is-single": h.value }])
320
320
  }, [
321
- l.value ? (i(), c("button", {
321
+ h.value ? (l(), u("button", {
322
322
  key: 0,
323
323
  class: "h0n-alert__btn h0n-alert__btn--primary",
324
324
  type: "button",
325
- onClick: u
326
- }, " Ok ")) : (i(), c(K, { key: 1 }, [
327
- p("button", {
325
+ onClick: f
326
+ }, " Ok ")) : (l(), u(Z, { key: 1 }, [
327
+ m("button", {
328
328
  class: "h0n-alert__btn is-danger",
329
329
  type: "button",
330
- onClick: h
330
+ onClick: v
331
331
  }, " Cancel "),
332
- p("button", {
332
+ m("button", {
333
333
  class: k(["h0n-alert__btn h0n-alert__btn--primary", {
334
- "is-danger": v(n).type === "danger"
334
+ "is-danger": _(n).type === "danger"
335
335
  }]),
336
336
  type: "button",
337
337
  onClick: o
@@ -339,18 +339,18 @@ const Ce = {
339
339
  ], 64))
340
340
  ], 2)
341
341
  ])
342
- ], 4)) : m("", !0)
342
+ ], 4)) : b("", !0)
343
343
  ]),
344
344
  _: 3
345
345
  })
346
346
  ]));
347
347
  }
348
- }), Be = (e, n) => {
348
+ }), He = (e, n) => {
349
349
  const t = e.__vccOpts || e;
350
- for (const [s, o] of n)
351
- t[s] = o;
350
+ for (const [r, o] of n)
351
+ t[r] = o;
352
352
  return t;
353
- }, ze = /* @__PURE__ */ Be(Se, [["__scopeId", "data-v-290cad87"]]), Y = /* @__PURE__ */ C({
353
+ }, Pe = /* @__PURE__ */ He(Ae, [["__scopeId", "data-v-290cad87"]]), re = /* @__PURE__ */ I({
354
354
  __name: "Spinner",
355
355
  props: {
356
356
  size: {},
@@ -358,26 +358,26 @@ const Ce = {
358
358
  },
359
359
  setup(e) {
360
360
  const t = e.size ?? "md";
361
- return (s, o) => (i(), c("div", {
362
- class: k(["h0n-ui-spinner", [`h0n-ui-spinner--${v(t)}`, e.color]]),
361
+ return (r, o) => (l(), u("div", {
362
+ class: k(["h0n-ui-spinner", [`h0n-ui-spinner--${_(t)}`, e.color]]),
363
363
  role: "status",
364
364
  "aria-label": "Loading"
365
365
  }, null, 2));
366
366
  }
367
- }), Ae = ["type", "disabled", "aria-busy"], Ee = {
367
+ }), De = ["type", "disabled", "aria-busy"], Me = {
368
368
  key: 0,
369
369
  class: "h0n-ui-btn__icon h0n-ui-btn__icon--left"
370
- }, He = {
370
+ }, Ue = {
371
371
  key: 1,
372
372
  class: "h0n-ui-btn__label"
373
- }, Le = {
373
+ }, qe = {
374
374
  key: 2,
375
375
  class: "h0n-ui-btn__spinner",
376
376
  "aria-hidden": "true"
377
- }, Re = {
377
+ }, Ne = {
378
378
  key: 3,
379
379
  class: "h0n-ui-btn__icon h0n-ui-btn__icon--right"
380
- }, De = /* @__PURE__ */ C({
380
+ }, je = /* @__PURE__ */ I({
381
381
  __name: "Button",
382
382
  props: {
383
383
  text: {},
@@ -394,74 +394,74 @@ const Ce = {
394
394
  },
395
395
  emits: ["click", "done", "error"],
396
396
  setup(e, { emit: n }) {
397
- const t = e, s = n, o = z(!1), h = _(() => t.loading !== void 0), u = _(
398
- () => h.value ? !!t.loading : o.value
397
+ const t = e, r = n, o = O(!1), v = y(() => t.loading !== void 0), f = y(
398
+ () => v.value ? !!t.loading : o.value
399
399
  );
400
- function l(r) {
401
- h.value || (o.value = r);
400
+ function h(c) {
401
+ v.value || (o.value = c);
402
402
  }
403
- async function d(r) {
404
- if (!(t.disabled || u.value) && (s("click", r), !!t.action))
403
+ async function d(c) {
404
+ if (!(t.disabled || f.value) && (r("click", c), !!t.action))
405
405
  try {
406
- l(!0), await t.action(), s("done");
407
- } catch (g) {
408
- s("error", g);
406
+ h(!0), await t.action(), r("done");
407
+ } catch (p) {
408
+ r("error", p);
409
409
  } finally {
410
- l(!1);
410
+ h(!1);
411
411
  }
412
412
  }
413
- return (r, g) => (i(), c("button", {
413
+ return (c, p) => (l(), u("button", {
414
414
  class: k(["h0n-ui-btn", [
415
415
  `h0n-ui-btn--${e.variant}`,
416
416
  `h0n-ui-btn--${e.size}`,
417
417
  `h0n-ui-btn--text-${e.position}`,
418
418
  {
419
- "h0n-ui-btn--loading": u.value,
419
+ "h0n-ui-btn--loading": f.value,
420
420
  "h0n-ui-btn--pill": e.pill,
421
421
  "h0n-ui-btn--radius": e.border,
422
422
  "h0n-ui-btn--block": e.block
423
423
  }
424
424
  ]]),
425
425
  type: e.type,
426
- disabled: e.disabled || u.value,
427
- "aria-busy": u.value ? "true" : void 0,
426
+ disabled: e.disabled || f.value,
427
+ "aria-busy": f.value ? "true" : void 0,
428
428
  onClick: d
429
429
  }, [
430
- r.$slots.left && !u.value ? (i(), c("span", Ee, [
431
- b(r.$slots, "left")
432
- ])) : m("", !0),
433
- u.value ? (i(), c("span", Le, [
434
- A(Y, { size: "sm" })
435
- ])) : (i(), c("span", He, [
436
- b(r.$slots, "default", {}, () => [
437
- L($(e.text), 1)
430
+ c.$slots.left && !f.value ? (l(), u("span", Me, [
431
+ C(c.$slots, "left")
432
+ ])) : b("", !0),
433
+ f.value ? (l(), u("span", qe, [
434
+ A(re, { size: "sm" })
435
+ ])) : (l(), u("span", Ue, [
436
+ C(c.$slots, "default", {}, () => [
437
+ j(x(e.text), 1)
438
438
  ])
439
439
  ])),
440
- r.$slots.right && !u.value ? (i(), c("span", Re, [
441
- b(r.$slots, "right")
442
- ])) : m("", !0)
443
- ], 10, Ae));
440
+ c.$slots.right && !f.value ? (l(), u("span", Ne, [
441
+ C(c.$slots, "right")
442
+ ])) : b("", !0)
443
+ ], 10, De));
444
444
  }
445
- }), Te = { class: "h0n-ui-card" }, Ve = {
445
+ }), Fe = { class: "h0n-ui-card" }, We = {
446
446
  key: 0,
447
447
  class: "h0n-ui-card--title"
448
- }, Pe = /* @__PURE__ */ C({
448
+ }, Ze = /* @__PURE__ */ I({
449
449
  __name: "Card",
450
450
  props: {
451
451
  title: {}
452
452
  },
453
453
  setup(e) {
454
- return (n, t) => (i(), c("section", Te, [
455
- e.title ? (i(), c("p", Ve, $(e.title), 1)) : m("", !0),
456
- b(n.$slots, "default")
454
+ return (n, t) => (l(), u("section", Fe, [
455
+ e.title ? (l(), u("p", We, x(e.title), 1)) : b("", !0),
456
+ C(n.$slots, "default")
457
457
  ]));
458
458
  }
459
- }), S = G(null);
460
- function Me() {
461
- const e = H();
462
- function n(s) {
463
- const o = q();
464
- S.value = { ...s, id: o }, e.push({
459
+ }), U = ie(null);
460
+ function Je() {
461
+ const e = N();
462
+ function n(r) {
463
+ const o = Q();
464
+ U.value = { ...r, id: o }, e.push({
465
465
  id: o,
466
466
  showOverlay: !0,
467
467
  closeOnOverlay: !0,
@@ -470,83 +470,140 @@ function Me() {
470
470
  });
471
471
  }
472
472
  function t() {
473
- S.value && (e.remove(S.value.id), S.value = null);
473
+ U.value && (e.remove(U.value.id), U.value = null);
474
474
  }
475
475
  return {
476
- active: S,
476
+ active: U,
477
477
  open: n,
478
478
  close: t
479
479
  };
480
480
  }
481
- const je = { class: "content-title-dialog" }, qe = {
481
+ const Ke = { class: "content-title-dialog" }, Xe = {
482
482
  key: 0,
483
483
  class: "title-dialog"
484
- }, Ne = { class: "h0n-dialog-content" }, Fe = /* @__PURE__ */ C({
484
+ }, Ge = {
485
+ key: 0,
486
+ class: "h0n-dialog-bg-hero"
487
+ }, Qe = { class: "h0n-dialog-content" }, Ye = /* @__PURE__ */ I({
485
488
  __name: "Dialog",
486
489
  setup(e) {
487
- const { active: n, close: t } = Me(), { getContentZIndex: s } = H(), o = z("bottom");
488
- V(
490
+ const { active: n, close: t } = Je(), { getContentZIndex: r } = N(), o = O("bottom");
491
+ E(
489
492
  () => n.value?.side,
490
- (l) => {
491
- l && (o.value = l);
493
+ (g) => {
494
+ g && (o.value = g);
492
495
  },
493
496
  { immediate: !0 }
494
497
  );
495
- const h = _(() => `h0n-slide-${o.value}`), u = _(
496
- () => n.value ? s(n.value.id) : void 0
497
- );
498
- return (l, d) => (i(), w(P, { to: "body" }, [
499
- A(R, {
500
- name: h.value,
498
+ const v = y(() => `h0n-slide-${o.value}`), f = y(
499
+ () => n.value ? r(n.value.id) : void 0
500
+ ), h = y(() => n.value?.backgroundUrl?.trim() ?? ""), d = O(""), c = /* @__PURE__ */ new Set();
501
+ let p = 0;
502
+ const S = y(() => h.value.length > 0), T = y(
503
+ () => d.value.length > 0
504
+ ), L = (g) => new Promise((a) => {
505
+ setTimeout(a, g);
506
+ }), P = (g) => new Promise((a, i) => {
507
+ const s = new Image();
508
+ s.decoding = "async", s.fetchPriority = "low", s.onload = async () => {
509
+ try {
510
+ typeof s.decode == "function" && await s.decode();
511
+ } catch {
512
+ }
513
+ a();
514
+ }, s.onerror = () => {
515
+ i(new Error("Failed to load dialog background image"));
516
+ }, s.src = g;
517
+ }), D = y(() => T.value ? {
518
+ "--h0n-dialog-bg-image": `url("${d.value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`
519
+ } : void 0);
520
+ return E(
521
+ h,
522
+ async (g, a, i) => {
523
+ const s = ++p;
524
+ let $ = !1;
525
+ if (i(() => {
526
+ $ = !0;
527
+ }), d.value = "", !!g) {
528
+ if (c.has(g)) {
529
+ d.value = g;
530
+ return;
531
+ }
532
+ if (await L(140), !($ || s !== p))
533
+ try {
534
+ if (await P(g), $ || s !== p) return;
535
+ c.add(g), d.value = g;
536
+ } catch {
537
+ if ($ || s !== p) return;
538
+ d.value = "";
539
+ }
540
+ }
541
+ },
542
+ { immediate: !0 }
543
+ ), (g, a) => (l(), V(J, { to: "body" }, [
544
+ A(q, {
545
+ name: v.value,
501
546
  appear: ""
502
547
  }, {
503
- default: E(() => [
504
- v(n) ? (i(), c("div", {
548
+ default: H(() => [
549
+ _(n) ? (l(), u("div", {
505
550
  key: 0,
506
551
  class: k(["h0n-dialog-layer", `is-${o.value}`]),
507
- style: B({ zIndex: u.value })
552
+ style: R({ zIndex: f.value })
508
553
  }, [
509
- p("section", {
510
- class: k(["h0n-dialog-panel", `is-${v(n).side}`])
554
+ m("section", {
555
+ class: k(["h0n-dialog-panel", [
556
+ `is-${_(n).side}`,
557
+ { "has-background-image": S.value }
558
+ ]]),
559
+ style: R(D.value)
511
560
  }, [
512
- p("header", {
513
- class: k(["h0n-dialog-header", `is-${v(n).side}`])
561
+ m("header", {
562
+ class: k(["h0n-dialog-header", [
563
+ `is-${_(n).side}`,
564
+ { "has-background-image": S.value }
565
+ ]])
514
566
  }, [
515
- p("div", je, [
516
- v(n).title ? (i(), c("p", qe, $(v(n).title), 1)) : m("", !0),
517
- b(l.$slots, "dialogHeader")
567
+ m("div", Ke, [
568
+ _(n).title ? (l(), u("p", Xe, x(_(n).title), 1)) : b("", !0),
569
+ C(g.$slots, "dialogHeader")
518
570
  ]),
519
- p("button", {
571
+ m("button", {
520
572
  class: "h0n-dialog-close",
521
- onClick: d[0] || (d[0] = (r) => v(t)())
573
+ onClick: a[0] || (a[0] = (i) => _(t)())
522
574
  }, " x ")
523
575
  ], 2),
524
- p("div", Ne, [
525
- (i(), w(M(v(n).component), j(v(n).props, { onClose: v(t) }), null, 16, ["onClose"]))
576
+ S.value ? (l(), u("div", Ge, [
577
+ m("div", {
578
+ class: k(["h0n-dialog-bg-image", { "is-loaded": T.value }])
579
+ }, null, 2)
580
+ ])) : b("", !0),
581
+ m("div", Qe, [
582
+ (l(), V(K(_(n).component), X(_(n).props, { onClose: _(t) }), null, 16, ["onClose"]))
526
583
  ])
527
- ], 2)
528
- ], 6)) : m("", !0)
584
+ ], 6)
585
+ ], 6)) : b("", !0)
529
586
  ]),
530
587
  _: 3
531
588
  }, 8, ["name"])
532
589
  ]));
533
590
  }
534
- }), Ue = { class: "h0n-ui-menu-item__left" }, Ze = {
591
+ }), et = { class: "h0n-ui-menu-item__left" }, tt = {
535
592
  key: 0,
536
593
  class: "h0n-ui-menu-item__icon"
537
- }, Je = { class: "h0n-ui-menu-item__text" }, We = {
594
+ }, nt = { class: "h0n-ui-menu-item__text" }, ot = {
538
595
  key: 0,
539
596
  class: "h0n-ui-menu-item__desc"
540
- }, Ke = {
597
+ }, st = {
541
598
  key: 0,
542
599
  class: "h0n-ui-menu-item__right"
543
- }, Ge = {
600
+ }, at = {
544
601
  key: 0,
545
602
  class: "h0n-ui-menu-item__right-text"
546
- }, Qe = {
603
+ }, it = {
547
604
  key: 0,
548
605
  class: "h0n-ui-menu-item__chevron"
549
- }, Xe = /* @__PURE__ */ C({
606
+ }, lt = /* @__PURE__ */ I({
550
607
  __name: "Menu",
551
608
  props: {
552
609
  title: {},
@@ -561,60 +618,60 @@ const je = { class: "content-title-dialog" }, qe = {
561
618
  },
562
619
  emits: ["click"],
563
620
  setup(e, { emit: n }) {
564
- const t = e, s = n, o = _(() => !!t.to), h = _(() => t.as ?? (o.value ? "a" : "div")), u = _(() => t.chevron !== void 0 ? t.chevron : o.value), l = _(() => t.disabled ? {
621
+ const t = e, r = n, o = y(() => !!t.to), v = y(() => t.as ?? (o.value ? "a" : "div")), f = y(() => t.chevron !== void 0 ? t.chevron : o.value), h = y(() => t.disabled ? {
565
622
  role: "button",
566
623
  tabindex: -1
567
624
  } : t.as ? t.to ? { to: t.to } : {} : o.value ? { href: "#" } : { role: "button", tabindex: 0 });
568
- function d(r) {
625
+ function d(c) {
569
626
  if (t.disabled) {
570
- r.preventDefault(), r.stopPropagation();
627
+ c.preventDefault(), c.stopPropagation();
571
628
  return;
572
629
  }
573
- !t.as && o.value && r.preventDefault(), s("click", r);
630
+ !t.as && o.value && c.preventDefault(), r("click", c);
574
631
  }
575
- return (r, g) => (i(), w(M(h.value), j({ class: "h0n-ui-menu-item" }, l.value, {
632
+ return (c, p) => (l(), V(K(v.value), X({ class: "h0n-ui-menu-item" }, h.value, {
576
633
  "aria-disabled": e.disabled || void 0,
577
634
  onClick: d
578
635
  }), {
579
- default: E(() => [
580
- p("div", Ue, [
581
- r.$slots.icon || e.icon ? (i(), c("div", Ze, [
582
- b(r.$slots, "icon", {}, () => [
583
- L($(e.icon), 1)
636
+ default: H(() => [
637
+ m("div", et, [
638
+ c.$slots.icon || e.icon ? (l(), u("div", tt, [
639
+ C(c.$slots, "icon", {}, () => [
640
+ j(x(e.icon), 1)
584
641
  ])
585
- ])) : m("", !0),
586
- p("div", Je, [
587
- p("p", {
642
+ ])) : b("", !0),
643
+ m("div", nt, [
644
+ m("p", {
588
645
  class: k(["h0n-ui-menu-item__title", { "is-danger": e.danger }])
589
646
  }, [
590
- b(r.$slots, "title", {}, () => [
591
- L($(e.title), 1)
647
+ C(c.$slots, "title", {}, () => [
648
+ j(x(e.title), 1)
592
649
  ])
593
650
  ], 2),
594
- e.description || r.$slots.description ? (i(), c("p", We, [
595
- b(r.$slots, "description", {}, () => [
596
- L($(e.description), 1)
651
+ e.description || c.$slots.description ? (l(), u("p", ot, [
652
+ C(c.$slots, "description", {}, () => [
653
+ j(x(e.description), 1)
597
654
  ])
598
- ])) : m("", !0)
655
+ ])) : b("", !0)
599
656
  ])
600
657
  ]),
601
- e.right || r.$slots.right || u.value ? (i(), c("div", Ke, [
602
- b(r.$slots, "right", {}, () => [
603
- e.right ? (i(), c("p", Ge, $(e.right), 1)) : m("", !0)
658
+ e.right || c.$slots.right || f.value ? (l(), u("div", st, [
659
+ C(c.$slots, "right", {}, () => [
660
+ e.right ? (l(), u("p", at, x(e.right), 1)) : b("", !0)
604
661
  ]),
605
- u.value ? (i(), c("span", Qe, "›")) : m("", !0)
606
- ])) : m("", !0)
662
+ f.value ? (l(), u("span", it, "›")) : b("", !0)
663
+ ])) : b("", !0)
607
664
  ]),
608
665
  _: 3
609
666
  }, 16, ["aria-disabled"]));
610
667
  }
611
- }), Ye = {
668
+ }), rt = {
612
669
  key: 0,
613
670
  class: "h0n-ui-image__loader"
614
- }, et = {
671
+ }, ct = {
615
672
  key: 1,
616
673
  class: "h0n-ui-image__error"
617
- }, tt = ["src"], nt = ["src", "alt"], ot = /* @__PURE__ */ C({
674
+ }, ut = ["src"], dt = ["src", "alt"], ft = /* @__PURE__ */ I({
618
675
  __name: "Image",
619
676
  props: {
620
677
  src: {},
@@ -625,110 +682,244 @@ const je = { class: "content-title-dialog" }, qe = {
625
682
  radius: {}
626
683
  },
627
684
  setup(e) {
628
- const n = e, t = z("loading");
629
- function s() {
685
+ const n = e, t = O("loading");
686
+ function r() {
630
687
  t.value = "loading";
631
- const u = new Image();
632
- u.src = n.src, u.onload = () => {
688
+ const f = new Image();
689
+ f.src = n.src, f.onload = () => {
633
690
  t.value = "loaded";
634
- }, u.onerror = () => {
691
+ }, f.onerror = () => {
635
692
  t.value = "error";
636
693
  };
637
694
  }
638
- Q(() => {
695
+ G(() => {
639
696
  if (n.lazy && "IntersectionObserver" in window) {
640
- const u = new IntersectionObserver(([l]) => {
641
- l.isIntersecting && (s(), u.disconnect());
697
+ const f = new IntersectionObserver(([h]) => {
698
+ h.isIntersecting && (r(), f.disconnect());
642
699
  });
643
- u.observe(document.body);
700
+ f.observe(document.body);
644
701
  } else
645
- s();
646
- }), V(() => n.src, s);
647
- const o = _(() => ({
702
+ r();
703
+ }), E(() => n.src, r);
704
+ const o = y(() => ({
648
705
  borderRadius: typeof n.radius == "number" ? `${n.radius}px` : n.radius
649
- })), h = _(() => ({
706
+ })), v = y(() => ({
650
707
  objectFit: n.fit
651
708
  }));
652
- return (u, l) => (i(), c("div", {
709
+ return (f, h) => (l(), u("div", {
653
710
  class: k(["h0n-ui-image", t.value]),
654
- style: B(o.value)
711
+ style: R(o.value)
655
712
  }, [
656
- t.value === "loading" ? (i(), c("div", Ye)) : t.value === "error" ? (i(), c("div", et, [
657
- e.fallback ? (i(), c("img", {
713
+ t.value === "loading" ? (l(), u("div", rt)) : t.value === "error" ? (l(), u("div", ct, [
714
+ e.fallback ? (l(), u("img", {
658
715
  key: 0,
659
716
  src: e.fallback
660
- }, null, 8, tt)) : m("", !0)
661
- ])) : (i(), c("img", {
717
+ }, null, 8, ut)) : b("", !0)
718
+ ])) : (l(), u("img", {
662
719
  key: 2,
663
720
  src: e.src,
664
721
  alt: e.alt,
665
- style: B(h.value),
722
+ style: R(v.value),
666
723
  draggable: "false"
667
- }, null, 12, nt))
724
+ }, null, 12, dt))
668
725
  ], 6));
669
726
  }
670
- }), st = /* @__PURE__ */ C({
727
+ }), ht = /* @__PURE__ */ I({
671
728
  __name: "Overlay",
672
729
  setup(e) {
673
- const { top: n, getBackdropZIndex: t, requestCloseTop: s } = H(), o = _(() => !!n.value && n.value.showOverlay !== !1), h = _(() => {
730
+ const { top: n, getBackdropZIndex: t, requestCloseTop: r } = N(), o = y(() => !!n.value && n.value.showOverlay !== !1), v = y(() => {
674
731
  if (n.value?.id)
675
732
  return t(n.value.id);
676
733
  });
677
- function u() {
734
+ function f() {
678
735
  }
679
- function l(r) {
680
- const g = n.value;
681
- !g || g.closeOnOverlay === !1 || s();
736
+ function h(c) {
737
+ const p = n.value;
738
+ !p || p.closeOnOverlay === !1 || r();
682
739
  }
683
- function d(r) {
684
- const g = n.value;
685
- !g || g.closeOnEsc === !1 || r.key === "Escape" && s();
740
+ function d(c) {
741
+ const p = n.value;
742
+ !p || p.closeOnEsc === !1 || c.key === "Escape" && r();
686
743
  }
687
- return Q(() => window.addEventListener("keydown", d)), ue(() => window.removeEventListener("keydown", d)), (r, g) => (i(), w(P, { to: "body" }, [
688
- A(R, { name: "h0n-ui-fade" }, {
689
- default: E(() => [
690
- o.value ? (i(), c("div", {
744
+ return G(() => window.addEventListener("keydown", d)), ye(() => window.removeEventListener("keydown", d)), (c, p) => (l(), V(J, { to: "body" }, [
745
+ A(q, { name: "h0n-ui-fade" }, {
746
+ default: H(() => [
747
+ o.value ? (l(), u("div", {
691
748
  key: 0,
692
749
  class: "h0n-ui-overlay",
693
- style: B({ zIndex: h.value }),
694
- onPointerdown: D(u, ["self", "prevent", "stop"]),
695
- onPointerup: D(u, ["self", "prevent", "stop"]),
696
- onClick: D(l, ["self", "prevent", "stop"])
697
- }, null, 36)) : m("", !0)
750
+ style: R({ zIndex: v.value }),
751
+ onPointerdown: F(f, ["self", "prevent", "stop"]),
752
+ onPointerup: F(f, ["self", "prevent", "stop"]),
753
+ onClick: F(h, ["self", "prevent", "stop"])
754
+ }, null, 36)) : b("", !0)
698
755
  ]),
699
756
  _: 1
700
757
  })
701
758
  ]));
702
759
  }
760
+ }), vt = /* @__PURE__ */ I({
761
+ __name: "Skeleton",
762
+ props: {
763
+ width: { default: "100%" },
764
+ height: { default: 12 },
765
+ radius: { default: 8 },
766
+ variant: { default: "rect" },
767
+ animated: { type: Boolean, default: !0 }
768
+ },
769
+ setup(e) {
770
+ const n = e, t = (o) => typeof o == "number" ? `${o}px` : o, r = y(() => {
771
+ const o = {
772
+ width: t(n.width),
773
+ height: t(n.height),
774
+ borderRadius: t(n.radius)
775
+ };
776
+ return n.variant === "circle" ? { ...o, borderRadius: "999px" } : n.variant === "round" ? { ...o, borderRadius: "14px" } : o;
777
+ });
778
+ return (o, v) => (l(), u("div", {
779
+ class: k(["h0n-skeleton", { "is-animated": e.animated }]),
780
+ style: R(r.value)
781
+ }, null, 6));
782
+ }
783
+ }), mt = { class: "h0n-tabs" }, yt = ["onClick"], pt = { class: "h0n-tabs__label" }, gt = {
784
+ key: 0,
785
+ class: "h0n-tabs__content"
786
+ }, _t = /* @__PURE__ */ I({
787
+ __name: "Tabs",
788
+ props: {
789
+ modelValue: {},
790
+ tabs: {}
791
+ },
792
+ emits: ["update:modelValue"],
793
+ setup(e, { emit: n }) {
794
+ const t = e, r = n, o = y(
795
+ () => t.tabs.findIndex((i) => i.value === t.modelValue)
796
+ ), v = O(null), f = O(null), h = O(0), d = O(0), c = O("forward");
797
+ let p = 0;
798
+ const S = () => {
799
+ L("auto");
800
+ }, T = () => {
801
+ const i = f.value;
802
+ return i ? i.querySelector(".h0n-tabs__tab.is-active") : null;
803
+ }, L = async (i = "smooth") => {
804
+ const s = ++p;
805
+ if (await ge(), s !== p) return;
806
+ const $ = f.value, w = T(), B = v.value;
807
+ if (!w || !$) {
808
+ h.value = 0, d.value = 0;
809
+ return;
810
+ }
811
+ const ce = w.querySelector(".h0n-tabs__label") ?? w, ue = $.getBoundingClientRect(), Y = ce.getBoundingClientRect();
812
+ if (h.value = Y.left - ue.left, d.value = Y.width, !B) return;
813
+ const de = w.offsetLeft + w.offsetWidth / 2 - B.clientWidth / 2, fe = Math.max(B.scrollWidth - B.clientWidth, 0), ee = Math.min(Math.max(de, 0), fe);
814
+ Math.abs(B.scrollLeft - ee) < 1 || B.scrollTo({
815
+ left: ee,
816
+ behavior: i
817
+ });
818
+ }, P = y(() => ({
819
+ left: "0px",
820
+ width: `${d.value}px`,
821
+ transform: `translateX(${h.value}px)`
822
+ }));
823
+ E(
824
+ () => o.value,
825
+ (i, s) => {
826
+ if (s === void 0 || s === -1 || i === -1) {
827
+ c.value = "forward";
828
+ return;
829
+ }
830
+ c.value = i >= s ? "forward" : "backward";
831
+ }
832
+ );
833
+ const D = y(
834
+ () => c.value === "forward" ? "h0n-tabs-slide-left" : "h0n-tabs-slide-right"
835
+ ), g = y(
836
+ () => t.tabs.length > 0 && t.tabs.length <= 3
837
+ ), a = (i) => {
838
+ r("update:modelValue", i);
839
+ };
840
+ return G(() => {
841
+ L("auto"), window.addEventListener("resize", S);
842
+ }), pe(() => {
843
+ p++, window.removeEventListener("resize", S);
844
+ }), E(
845
+ () => [t.modelValue, t.tabs.length],
846
+ () => {
847
+ L();
848
+ }
849
+ ), (i, s) => (l(), u("div", mt, [
850
+ m("div", {
851
+ ref_key: "scrollerRef",
852
+ ref: v,
853
+ class: "h0n-tabs__scroller"
854
+ }, [
855
+ m("div", {
856
+ ref_key: "listRef",
857
+ ref: f,
858
+ class: k(["h0n-tabs__list", { "is-even": g.value }])
859
+ }, [
860
+ (l(!0), u(Z, null, ae(e.tabs, ($, w) => (l(), u("button", {
861
+ key: `${String($.value)}-${w}`,
862
+ class: k(["h0n-tabs__tab", { "is-active": $.value === e.modelValue }]),
863
+ type: "button",
864
+ onClick: (B) => a($.value)
865
+ }, [
866
+ m("span", pt, x($.label), 1)
867
+ ], 10, yt))), 128)),
868
+ m("span", {
869
+ class: "h0n-tabs__indicator",
870
+ style: R(P.value)
871
+ }, null, 4)
872
+ ], 2)
873
+ ], 512),
874
+ i.$slots.default ? (l(), u("div", gt, [
875
+ A(q, {
876
+ name: D.value,
877
+ mode: "out-in"
878
+ }, {
879
+ default: H(() => [
880
+ (l(), u("div", {
881
+ key: e.modelValue,
882
+ class: "h0n-tabs__panel"
883
+ }, [
884
+ C(i.$slots, "default", { activeTab: e.modelValue })
885
+ ]))
886
+ ]),
887
+ _: 3
888
+ }, 8, ["name"])
889
+ ])) : b("", !0)
890
+ ]));
891
+ }
703
892
  });
704
- function it(e) {
705
- const n = at(e);
893
+ function bt(e) {
894
+ const n = kt(e);
706
895
  return {
707
896
  install(t) {
708
- t.component("H0Accordion", $e), t.component("H0Alert", ze), t.component("H0Button", De), t.component("H0Card", Pe), t.component("H0Dialog", Fe), t.component("H0Spinner", Y), t.component("H0Menu", Xe), t.component("H0Image", ot), t.component("H0Overlay", st), fe(n.theme);
897
+ t.component("H0Accordion", Be), t.component("H0Alert", Pe), t.component("H0Button", je), t.component("H0Card", Ze), t.component("H0Dialog", Ye), t.component("H0Spinner", re), t.component("H0Menu", lt), t.component("H0Image", ft), t.component("H0Overlay", ht), t.component("H0Skeleton", vt), t.component("H0Tabs", _t), be(n.theme);
709
898
  }
710
899
  };
711
900
  }
712
- const lt = it();
713
- function at(e) {
901
+ const Ct = bt();
902
+ function kt(e) {
714
903
  return {
715
904
  autoRegisterComponents: e?.autoRegisterComponents ?? !0,
716
- theme: de(e?.theme)
905
+ theme: _e(e?.theme)
717
906
  };
718
907
  }
719
908
  export {
720
- $e as Accordion,
721
- ze as Alert,
722
- De as Button,
723
- Pe as Card,
724
- Fe as Dialog,
725
- ot as Image,
726
- Xe as Menu,
727
- st as Overlay,
728
- Y as Spinner,
729
- it as createH0NPlugin,
730
- lt as h0nUi,
731
- H as useOverlayStack,
732
- ke as useWebAlert,
733
- Me as useWebDialog
909
+ Be as Accordion,
910
+ Pe as Alert,
911
+ je as Button,
912
+ Ze as Card,
913
+ Ye as Dialog,
914
+ ft as Image,
915
+ lt as Menu,
916
+ ht as Overlay,
917
+ vt as Skeleton,
918
+ re as Spinner,
919
+ _t as Tabs,
920
+ bt as createH0NPlugin,
921
+ Ct as h0nUi,
922
+ N as useOverlayStack,
923
+ Re as useWebAlert,
924
+ Je as useWebDialog
734
925
  };