@zeo-app/design-system 0.2.1 → 0.3.1

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.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as C, useRef as M, useCallback as B, useLayoutEffect as P, useEffect as I, createContext as V, useContext as W, useId as ee } from "react";
3
- import { createPortal as te } from "react-dom";
4
- const re = {
2
+ import { forwardRef as N, useState as z, useRef as O, useCallback as L, useLayoutEffect as ae, useEffect as T, useId as oe, createContext as Q, useContext as V } from "react";
3
+ import { createPortal as se } from "react-dom";
4
+ const le = {
5
5
  info: {
6
6
  container: "bg-blue-50 border-blue-200 text-blue-800",
7
7
  icon: "text-blue-500",
@@ -23,28 +23,28 @@ const re = {
23
23
  defaultIcon: "error"
24
24
  }
25
25
  };
26
- function Ae({
26
+ function Ge({
27
27
  variant: e = "info",
28
28
  title: t,
29
29
  children: r,
30
30
  onClose: a,
31
31
  icon: o,
32
32
  className: s = "",
33
- ...c
33
+ ...d
34
34
  }) {
35
- const i = re[e], m = o ?? i.defaultIcon;
35
+ const c = le[e], x = o ?? c.defaultIcon;
36
36
  return /* @__PURE__ */ l(
37
37
  "div",
38
38
  {
39
39
  role: "alert",
40
40
  className: [
41
41
  "flex gap-3 p-4 rounded-lg border",
42
- i.container,
42
+ c.container,
43
43
  s
44
44
  ].filter(Boolean).join(" "),
45
- ...c,
45
+ ...d,
46
46
  children: [
47
- /* @__PURE__ */ n("span", { className: `material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${i.icon}`, children: m }),
47
+ /* @__PURE__ */ n("span", { className: `material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${c.icon}`, children: x }),
48
48
  /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
49
49
  t && /* @__PURE__ */ n("p", { className: "font-semibold text-sm mb-0.5", children: t }),
50
50
  /* @__PURE__ */ n("div", { className: "text-sm leading-relaxed", children: r })
@@ -62,28 +62,28 @@ function Ae({
62
62
  }
63
63
  );
64
64
  }
65
- const ne = {
65
+ const ie = {
66
66
  xs: "w-6 h-6 text-[10px]",
67
67
  sm: "w-8 h-8 text-xs",
68
68
  md: "w-10 h-10 text-sm",
69
69
  lg: "w-12 h-12 text-base",
70
70
  xl: "w-16 h-16 text-lg"
71
- }, ae = {
71
+ }, ce = {
72
72
  xs: "w-1.5 h-1.5",
73
73
  sm: "w-2 h-2",
74
74
  md: "w-2.5 h-2.5",
75
75
  lg: "w-3 h-3",
76
76
  xl: "w-3.5 h-3.5"
77
- }, oe = {
77
+ }, de = {
78
78
  online: "bg-green-500",
79
79
  offline: "bg-gray-400",
80
80
  busy: "bg-red-500",
81
81
  away: "bg-yellow-400"
82
82
  };
83
- function se(e) {
83
+ function ue(e) {
84
84
  return e.split(" ").slice(0, 2).map((t) => t[0]).join("").toUpperCase();
85
85
  }
86
- function le(e) {
86
+ function fe(e) {
87
87
  const t = [
88
88
  "bg-orange-100 text-orange-700",
89
89
  "bg-blue-100 text-blue-700",
@@ -94,23 +94,23 @@ function le(e) {
94
94
  ], r = e.charCodeAt(0) % t.length;
95
95
  return t[r];
96
96
  }
97
- function He({
97
+ function Ue({
98
98
  src: e,
99
99
  alt: t = "",
100
100
  name: r,
101
101
  size: a = "md",
102
102
  status: o,
103
103
  className: s = "",
104
- ...c
104
+ ...d
105
105
  }) {
106
- return /* @__PURE__ */ l("div", { className: ["relative inline-flex shrink-0", s].filter(Boolean).join(" "), ...c, children: [
106
+ return /* @__PURE__ */ l("div", { className: ["relative inline-flex shrink-0", s].filter(Boolean).join(" "), ...d, children: [
107
107
  /* @__PURE__ */ n(
108
108
  "div",
109
109
  {
110
110
  className: [
111
111
  "rounded-full overflow-hidden flex items-center justify-center font-semibold",
112
- ne[a],
113
- !e && r ? le(r) : "bg-surface-container"
112
+ ie[a],
113
+ !e && r ? fe(r) : "bg-surface-container"
114
114
  ].filter(Boolean).join(" "),
115
115
  children: e ? /* @__PURE__ */ n(
116
116
  "img",
@@ -119,7 +119,7 @@ function He({
119
119
  alt: t || r,
120
120
  className: "w-full h-full object-cover"
121
121
  }
122
- ) : r ? se(r) : /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-on-surface-variant", style: { fontSize: "60%" }, children: "person" })
122
+ ) : r ? ue(r) : /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-on-surface-variant", style: { fontSize: "60%" }, children: "person" })
123
123
  }
124
124
  ),
125
125
  o && /* @__PURE__ */ n(
@@ -127,59 +127,59 @@ function He({
127
127
  {
128
128
  className: [
129
129
  "absolute bottom-0 right-0 rounded-full border-2 border-white",
130
- ae[a],
131
- oe[o]
130
+ ce[a],
131
+ de[o]
132
132
  ].filter(Boolean).join(" ")
133
133
  }
134
134
  )
135
135
  ] });
136
136
  }
137
- const ie = {
137
+ const me = {
138
138
  default: "bg-surface-container text-on-surface-variant",
139
139
  primary: "bg-orange-100 text-orange-700",
140
140
  success: "bg-green-100 text-green-700",
141
141
  warning: "bg-yellow-100 text-yellow-700",
142
142
  danger: "bg-red-100 text-red-700",
143
143
  info: "bg-blue-100 text-blue-700"
144
- }, ce = {
144
+ }, pe = {
145
145
  default: "bg-on-surface-variant",
146
146
  primary: "bg-orange-500",
147
147
  success: "bg-green-500",
148
148
  warning: "bg-yellow-500",
149
149
  danger: "bg-red-500",
150
150
  info: "bg-blue-500"
151
- }, de = {
151
+ }, xe = {
152
152
  sm: "px-2 py-0.5 text-xs gap-1",
153
153
  md: "px-2.5 py-1 text-xs gap-1.5"
154
154
  };
155
- function De({
155
+ function We({
156
156
  variant: e = "default",
157
157
  size: t = "md",
158
158
  dot: r = !1,
159
159
  icon: a,
160
160
  children: o,
161
161
  className: s = "",
162
- ...c
162
+ ...d
163
163
  }) {
164
164
  return /* @__PURE__ */ l(
165
165
  "span",
166
166
  {
167
167
  className: [
168
168
  "inline-flex items-center font-medium rounded-full",
169
- ie[e],
170
- de[t],
169
+ me[e],
170
+ xe[t],
171
171
  s
172
172
  ].filter(Boolean).join(" "),
173
- ...c,
173
+ ...d,
174
174
  children: [
175
- r && /* @__PURE__ */ n("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${ce[e]}` }),
175
+ r && /* @__PURE__ */ n("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${pe[e]}` }),
176
176
  a && !r && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[12px]", children: a }),
177
177
  o
178
178
  ]
179
179
  }
180
180
  );
181
181
  }
182
- function Ge({ items: e, className: t = "", ...r }) {
182
+ function qe({ items: e, className: t = "", ...r }) {
183
183
  return /* @__PURE__ */ n("nav", { "aria-label": "Breadcrumb", className: t, ...r, children: /* @__PURE__ */ n("ol", { className: "inline-flex items-center gap-1.5 text-sm flex-wrap", children: e.map((a, o) => {
184
184
  const s = o === e.length - 1;
185
185
  return /* @__PURE__ */ l("li", { className: "flex items-center gap-1.5", children: [
@@ -208,21 +208,21 @@ function Ge({ items: e, className: t = "", ...r }) {
208
208
  ] }, o);
209
209
  }) }) });
210
210
  }
211
- const ue = {
211
+ const he = {
212
212
  primary: "bg-zeo-orange text-white hover:bg-orange-700 active:bg-orange-800 focus:shadow-zeo-focus border-transparent",
213
213
  secondary: "bg-white text-on-surface border-outline-variant hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",
214
214
  ghost: "bg-transparent text-on-surface-variant border-transparent hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",
215
215
  danger: "bg-error text-on-error border-transparent hover:bg-red-700 active:bg-red-800 focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]",
216
216
  success: "bg-tertiary text-on-tertiary border-transparent hover:bg-green-800 active:bg-green-900 focus:shadow-[0_0_0_4px_rgba(0,108,73,0.15)]"
217
- }, fe = {
217
+ }, be = {
218
218
  sm: "px-3 py-1.5 text-sm gap-1.5 h-8",
219
219
  md: "px-4 py-2 text-sm gap-2 h-10",
220
220
  lg: "px-5 py-2.5 text-base gap-2 h-11"
221
- }, E = {
221
+ }, R = {
222
222
  sm: "text-[16px]",
223
223
  md: "text-[18px]",
224
224
  lg: "text-[20px]"
225
- }, me = N(
225
+ }, ge = N(
226
226
  ({
227
227
  variant: e = "primary",
228
228
  size: t = "md",
@@ -230,41 +230,41 @@ const ue = {
230
230
  iconLeft: a,
231
231
  iconRight: o,
232
232
  fullWidth: s = !1,
233
- disabled: c,
234
- children: i,
235
- className: m = "",
233
+ disabled: d,
234
+ children: c,
235
+ className: x = "",
236
236
  ...u
237
237
  }, f) => /* @__PURE__ */ l(
238
238
  "button",
239
239
  {
240
240
  ref: f,
241
- disabled: c || r,
241
+ disabled: d || r,
242
242
  className: [
243
243
  "inline-flex items-center justify-center font-medium rounded border transition-all duration-200 select-none",
244
244
  "focus:outline-none",
245
245
  "disabled:opacity-50 disabled:cursor-not-allowed",
246
- ue[e],
247
- fe[t],
246
+ he[e],
247
+ be[t],
248
248
  s ? "w-full" : "",
249
- m
249
+ x
250
250
  ].filter(Boolean).join(" "),
251
251
  ...u,
252
252
  children: [
253
253
  r ? /* @__PURE__ */ n(
254
254
  "span",
255
255
  {
256
- className: `material-symbols-outlined animate-spin ${E[t]}`,
256
+ className: `material-symbols-outlined animate-spin ${R[t]}`,
257
257
  children: "progress_activity"
258
258
  }
259
- ) : a && /* @__PURE__ */ n("span", { className: `material-symbols-outlined ${E[t]}`, children: a }),
260
- i,
261
- !r && o && /* @__PURE__ */ n("span", { className: `material-symbols-outlined ${E[t]}`, children: o })
259
+ ) : a && /* @__PURE__ */ n("span", { className: `material-symbols-outlined ${R[t]}`, children: a }),
260
+ c,
261
+ !r && o && /* @__PURE__ */ n("span", { className: `material-symbols-outlined ${R[t]}`, children: o })
262
262
  ]
263
263
  }
264
264
  )
265
265
  );
266
- me.displayName = "Button";
267
- function Ue({ children: e, attached: t = !1, className: r = "", ...a }) {
266
+ ge.displayName = "Button";
267
+ function Oe({ children: e, attached: t = !1, className: r = "", ...a }) {
268
268
  return /* @__PURE__ */ n(
269
269
  "div",
270
270
  {
@@ -279,17 +279,17 @@ function Ue({ children: e, attached: t = !1, className: r = "", ...a }) {
279
279
  }
280
280
  );
281
281
  }
282
- const pe = {
282
+ const we = {
283
283
  elevated: "bg-white shadow-theme-lg border border-surface-container-high",
284
284
  outlined: "bg-white border border-outline-variant",
285
285
  filled: "bg-surface-container-low border border-transparent"
286
- }, xe = {
286
+ }, ve = {
287
287
  none: "",
288
288
  sm: "p-4",
289
289
  md: "p-5",
290
290
  lg: "p-6"
291
291
  };
292
- function Ve({
292
+ function Ke({
293
293
  variant: e = "elevated",
294
294
  padding: t = "md",
295
295
  children: r,
@@ -301,15 +301,15 @@ function Ve({
301
301
  {
302
302
  className: [
303
303
  "rounded-xl overflow-hidden",
304
- pe[e],
304
+ we[e],
305
305
  a
306
306
  ].filter(Boolean).join(" "),
307
307
  ...o,
308
- children: /* @__PURE__ */ n("div", { className: xe[t], children: r })
308
+ children: /* @__PURE__ */ n("div", { className: ve[t], children: r })
309
309
  }
310
310
  );
311
311
  }
312
- function We({
312
+ function Je({
313
313
  title: e,
314
314
  subtitle: t,
315
315
  action: r,
@@ -335,7 +335,7 @@ function We({
335
335
  }
336
336
  );
337
337
  }
338
- function qe({ children: e, className: t = "", ...r }) {
338
+ function Qe({ children: e, className: t = "", ...r }) {
339
339
  return /* @__PURE__ */ n(
340
340
  "div",
341
341
  {
@@ -345,81 +345,81 @@ function qe({ children: e, className: t = "", ...r }) {
345
345
  }
346
346
  );
347
347
  }
348
- const _ = 8, G = 4;
349
- function Oe({ trigger: e, items: t, align: r = "right", className: a = "", ...o }) {
350
- const [s, c] = C(!1), [i, m] = C(null), u = M(null), f = M(null), p = B(() => {
351
- var k;
352
- const d = u.current;
353
- if (!d) return;
354
- const x = d.getBoundingClientRect(), h = (k = f.current) == null ? void 0 : k.getBoundingClientRect(), w = (h == null ? void 0 : h.width) ?? 180, b = (h == null ? void 0 : h.height) ?? 0, v = window.innerHeight - x.bottom, g = x.top, z = v < b + _ && g > v ? x.top - b - G : x.bottom + G, j = r === "right" ? x.right - w : x.left, L = window.innerWidth - w - _, T = Math.min(Math.max(j, _), Math.max(L, _));
355
- m({ top: z, left: T });
348
+ const _ = 8, K = 4;
349
+ function Ve({ trigger: e, items: t, align: r = "right", className: a = "", ...o }) {
350
+ const [s, d] = z(!1), [c, x] = z(null), u = O(null), f = O(null), h = L(() => {
351
+ var C;
352
+ const i = u.current;
353
+ if (!i) return;
354
+ const m = i.getBoundingClientRect(), p = (C = f.current) == null ? void 0 : C.getBoundingClientRect(), w = (p == null ? void 0 : p.width) ?? 180, b = (p == null ? void 0 : p.height) ?? 0, v = window.innerHeight - m.bottom, y = m.top, j = v < b + _ && y > v ? m.top - b - K : m.bottom + K, I = r === "right" ? m.right - w : m.left, E = window.innerWidth - w - _, M = Math.min(Math.max(I, _), Math.max(E, _));
355
+ x({ top: j, left: M });
356
356
  }, [r]);
357
- return P(() => {
358
- s && p();
359
- }, [s, p]), I(() => {
357
+ return ae(() => {
358
+ s && h();
359
+ }, [s, h]), T(() => {
360
360
  if (!s) return;
361
- const d = () => p();
362
- return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
363
- window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
361
+ const i = () => h();
362
+ return window.addEventListener("scroll", i, !0), window.addEventListener("resize", i), () => {
363
+ window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i);
364
364
  };
365
- }, [s, p]), I(() => {
366
- const d = (x) => {
367
- var v, g;
368
- const h = x.target, w = (v = u.current) == null ? void 0 : v.contains(h), b = (g = f.current) == null ? void 0 : g.contains(h);
369
- !w && !b && c(!1);
365
+ }, [s, h]), T(() => {
366
+ const i = (m) => {
367
+ var v, y;
368
+ const p = m.target, w = (v = u.current) == null ? void 0 : v.contains(p), b = (y = f.current) == null ? void 0 : y.contains(p);
369
+ !w && !b && d(!1);
370
370
  };
371
- return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
372
- }, []), I(() => {
373
- const d = (x) => {
374
- x.key === "Escape" && c(!1);
371
+ return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
372
+ }, []), T(() => {
373
+ const i = (m) => {
374
+ m.key === "Escape" && d(!1);
375
375
  };
376
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
376
+ return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
377
377
  }, []), /* @__PURE__ */ l("div", { ref: u, className: ["relative inline-block", a].filter(Boolean).join(" "), ...o, children: [
378
- /* @__PURE__ */ n("div", { onClick: () => c((d) => !d), children: e }),
379
- s && te(
378
+ /* @__PURE__ */ n("div", { onClick: () => d((i) => !i), children: e }),
379
+ s && se(
380
380
  /* @__PURE__ */ n(
381
381
  "div",
382
382
  {
383
383
  ref: f,
384
384
  className: "fixed z-[100] min-w-[180px] bg-white border border-surface-container-high rounded-xl shadow-theme-lg py-1",
385
385
  style: {
386
- top: (i == null ? void 0 : i.top) ?? 0,
387
- left: (i == null ? void 0 : i.left) ?? 0,
388
- visibility: i ? "visible" : "hidden"
386
+ top: (c == null ? void 0 : c.top) ?? 0,
387
+ left: (c == null ? void 0 : c.left) ?? 0,
388
+ visibility: c ? "visible" : "hidden"
389
389
  },
390
390
  role: "menu",
391
- children: t.map((d, x) => /* @__PURE__ */ l("div", { children: [
391
+ children: t.map((i, m) => /* @__PURE__ */ l("div", { children: [
392
392
  /* @__PURE__ */ l(
393
393
  "button",
394
394
  {
395
395
  role: "menuitem",
396
- disabled: d.disabled,
396
+ disabled: i.disabled,
397
397
  onClick: () => {
398
- var h;
399
- d.disabled || ((h = d.onClick) == null || h.call(d), c(!1));
398
+ var p;
399
+ i.disabled || ((p = i.onClick) == null || p.call(i), d(!1));
400
400
  },
401
401
  className: [
402
402
  "w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",
403
- d.danger ? "text-error hover:bg-red-50" : "text-on-surface hover:bg-surface-container-low",
404
- d.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
403
+ i.danger ? "text-error hover:bg-red-50" : "text-on-surface hover:bg-surface-container-low",
404
+ i.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
405
405
  ].filter(Boolean).join(" "),
406
406
  children: [
407
- d.icon && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px] opacity-70", children: d.icon }),
408
- d.label
407
+ i.icon && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px] opacity-70", children: i.icon }),
408
+ i.label
409
409
  ]
410
410
  }
411
411
  ),
412
- d.dividerAfter && /* @__PURE__ */ n("div", { className: "my-1 border-t border-surface-container-high" })
413
- ] }, x))
412
+ i.dividerAfter && /* @__PURE__ */ n("div", { className: "my-1 border-t border-surface-container-high" })
413
+ ] }, m))
414
414
  }
415
415
  ),
416
416
  document.body
417
417
  )
418
418
  ] });
419
419
  }
420
- const he = N(
421
- ({ label: e, hint: t, error: r, options: a, placeholder: o, disabled: s, className: c = "", id: i, ...m }, u) => {
422
- const f = i ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
420
+ const ye = N(
421
+ ({ label: e, hint: t, error: r, options: a, placeholder: o, disabled: s, className: d = "", id: c, ...x }, u) => {
422
+ const f = c ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
423
423
  return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
424
424
  e && /* @__PURE__ */ n("label", { htmlFor: f, className: "text-sm font-medium text-on-surface", children: e }),
425
425
  /* @__PURE__ */ l("div", { className: "relative", children: [
@@ -434,12 +434,12 @@ const he = N(
434
434
  "text-on-surface focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",
435
435
  r ? "border-error" : "border-outline-variant",
436
436
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
437
- c
437
+ d
438
438
  ].filter(Boolean).join(" "),
439
- ...m,
439
+ ...x,
440
440
  children: [
441
441
  o && /* @__PURE__ */ n("option", { value: "", disabled: !0, children: o }),
442
- a.map((p) => /* @__PURE__ */ n("option", { value: p.value, disabled: p.disabled, children: p.label }, p.value))
442
+ a.map((h) => /* @__PURE__ */ n("option", { value: h.value, disabled: h.disabled, children: h.label }, h.value))
443
443
  ]
444
444
  }
445
445
  ),
@@ -453,18 +453,18 @@ const he = N(
453
453
  ] });
454
454
  }
455
455
  );
456
- he.displayName = "Select";
457
- const be = N(
458
- ({ label: e, hint: t, error: r, disabled: a, className: o = "", id: s, rows: c = 4, ...i }, m) => {
456
+ ye.displayName = "Select";
457
+ const Ne = N(
458
+ ({ label: e, hint: t, error: r, disabled: a, className: o = "", id: s, rows: d = 4, ...c }, x) => {
459
459
  const u = s ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
460
460
  return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
461
461
  e && /* @__PURE__ */ n("label", { htmlFor: u, className: "text-sm font-medium text-on-surface", children: e }),
462
462
  /* @__PURE__ */ n(
463
463
  "textarea",
464
464
  {
465
- ref: m,
465
+ ref: x,
466
466
  id: u,
467
- rows: c,
467
+ rows: d,
468
468
  disabled: a,
469
469
  className: [
470
470
  "w-full bg-white border rounded px-3 py-2 text-sm resize-y transition-all duration-200",
@@ -474,7 +474,7 @@ const be = N(
474
474
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
475
475
  o
476
476
  ].filter(Boolean).join(" "),
477
- ...i
477
+ ...c
478
478
  }
479
479
  ),
480
480
  r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1", children: [
@@ -485,13 +485,13 @@ const be = N(
485
485
  ] });
486
486
  }
487
487
  );
488
- be.displayName = "Textarea";
489
- const ge = {
488
+ Ne.displayName = "Textarea";
489
+ const je = {
490
490
  square: "rounded-[2px]",
491
491
  rounded: "rounded-[4px]",
492
492
  circle: "rounded-full"
493
- }, we = N(
494
- ({ label: e, description: t, error: r, disabled: a, className: o = "", id: s, shape: c = "square", color: i = "#FF6B00", ...m }, u) => {
493
+ }, ke = N(
494
+ ({ label: e, description: t, error: r, disabled: a, className: o = "", id: s, shape: d = "square", color: c = "#FF6B00", ...x }, u) => {
495
495
  const f = s ?? `checkbox-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
496
496
  return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: [
497
497
  /* @__PURE__ */ l(
@@ -515,7 +515,7 @@ const ge = {
515
515
  "absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",
516
516
  o
517
517
  ].filter(Boolean).join(" "),
518
- ...m
518
+ ...x
519
519
  }
520
520
  ),
521
521
  /* @__PURE__ */ n(
@@ -525,9 +525,9 @@ const ge = {
525
525
  "w-4 h-4 border-2 border-outline-variant transition-colors pointer-events-none",
526
526
  "bg-white peer-checked:bg-[var(--cb-color)] peer-checked:border-[var(--cb-color)]",
527
527
  "peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--cb-color)]/30 peer-focus-visible:ring-offset-0",
528
- ge[c]
528
+ je[d]
529
529
  ].filter(Boolean).join(" "),
530
- style: { "--cb-color": i }
530
+ style: { "--cb-color": c }
531
531
  }
532
532
  ),
533
533
  /* @__PURE__ */ n(
@@ -566,14 +566,14 @@ const ge = {
566
566
  ] });
567
567
  }
568
568
  );
569
- we.displayName = "Checkbox";
570
- const ve = N(
571
- ({ label: e, description: t, disabled: r, className: a = "", id: o, ...s }, c) => {
572
- const i = o ?? `radio-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
569
+ ke.displayName = "Checkbox";
570
+ const Be = N(
571
+ ({ label: e, description: t, disabled: r, className: a = "", id: o, ...s }, d) => {
572
+ const c = o ?? `radio-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
573
573
  return /* @__PURE__ */ l(
574
574
  "label",
575
575
  {
576
- htmlFor: i,
576
+ htmlFor: c,
577
577
  className: [
578
578
  "flex items-start gap-3 cursor-pointer",
579
579
  r ? "opacity-50 cursor-not-allowed" : ""
@@ -582,9 +582,9 @@ const ve = N(
582
582
  /* @__PURE__ */ n(
583
583
  "input",
584
584
  {
585
- ref: c,
585
+ ref: d,
586
586
  type: "radio",
587
- id: i,
587
+ id: c,
588
588
  disabled: r,
589
589
  className: [
590
590
  "mt-0.5 w-4 h-4 border-outline-variant text-zeo-orange shrink-0",
@@ -604,14 +604,14 @@ const ve = N(
604
604
  );
605
605
  }
606
606
  );
607
- ve.displayName = "Radio";
608
- const ye = N(
609
- ({ label: e, description: t, disabled: r, className: a = "", id: o, ...s }, c) => {
610
- const i = o ?? `switch-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
607
+ Be.displayName = "Radio";
608
+ const Ce = N(
609
+ ({ label: e, description: t, disabled: r, className: a = "", id: o, ...s }, d) => {
610
+ const c = o ?? `switch-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
611
611
  return /* @__PURE__ */ l(
612
612
  "label",
613
613
  {
614
- htmlFor: i,
614
+ htmlFor: c,
615
615
  className: [
616
616
  "flex items-start gap-3 cursor-pointer select-none",
617
617
  r ? "opacity-50 cursor-not-allowed" : ""
@@ -621,9 +621,9 @@ const ye = N(
621
621
  /* @__PURE__ */ n(
622
622
  "input",
623
623
  {
624
- ref: c,
624
+ ref: d,
625
625
  type: "checkbox",
626
- id: i,
626
+ id: c,
627
627
  disabled: r,
628
628
  className: "sr-only peer",
629
629
  ...s
@@ -641,16 +641,22 @@ const ye = N(
641
641
  );
642
642
  }
643
643
  );
644
- ye.displayName = "Switch";
645
- const Ne = {
644
+ Ce.displayName = "Switch";
645
+ const ze = {
646
646
  sm: "px-3 py-1.5 text-sm h-8",
647
647
  md: "px-3 py-2 text-sm h-10",
648
648
  lg: "px-4 py-2.5 text-base h-11"
649
- }, U = {
649
+ }, J = {
650
650
  sm: "text-[16px]",
651
651
  md: "text-[18px]",
652
652
  lg: "text-[20px]"
653
- }, je = N(
653
+ };
654
+ function $e(e, t, r) {
655
+ if (e === "" || e === void 0 || e === null) return "";
656
+ const a = Number(e).toFixed(t);
657
+ return r ? `${a} ${r}` : a;
658
+ }
659
+ const _e = N(
654
660
  ({
655
661
  label: e,
656
662
  hint: t,
@@ -658,18 +664,51 @@ const Ne = {
658
664
  inputSize: a = "md",
659
665
  iconLeft: o,
660
666
  iconRight: s,
661
- onIconRightClick: c,
662
- disabled: i,
663
- className: m = "",
667
+ onIconRightClick: d,
668
+ disabled: c,
669
+ className: x = "",
664
670
  id: u,
665
- ...f
666
- }, p) => {
667
- const d = u ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
671
+ unit: f,
672
+ decimals: h,
673
+ onValueChange: i,
674
+ value: m,
675
+ defaultValue: p,
676
+ type: w,
677
+ step: b,
678
+ inputMode: v,
679
+ onChange: y,
680
+ onFocus: B,
681
+ onBlur: j,
682
+ ...I
683
+ }, E) => {
684
+ const M = oe(), C = u ?? (e ? e.toLowerCase().replace(/\s+/g, "-") : M), g = f !== void 0, F = h ?? 0, S = g && m !== void 0, [Z, P] = z(
685
+ typeof p == "number" ? p : ""
686
+ ), [H, G] = z(!1), [A, U] = z(""), $ = S ? m : Z, ee = g ? H ? A : $e($, F, f ?? "") : m, te = L(
687
+ (k) => {
688
+ g && (G(!0), U($ === "" ? "" : String($))), B == null || B(k);
689
+ },
690
+ [g, $, B]
691
+ ), re = L(
692
+ (k) => {
693
+ if (g) {
694
+ G(!1);
695
+ const W = parseFloat(A.replace(",", ".")), q = isNaN(W) ? "" : W;
696
+ S || P(q), i == null || i(q);
697
+ }
698
+ j == null || j(k);
699
+ },
700
+ [g, A, S, i, j]
701
+ ), ne = L(
702
+ (k) => {
703
+ g && U(k.target.value), y == null || y(k);
704
+ },
705
+ [g, y]
706
+ );
668
707
  return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
669
708
  e && /* @__PURE__ */ n(
670
709
  "label",
671
710
  {
672
- htmlFor: d,
711
+ htmlFor: C,
673
712
  className: "text-sm font-medium text-on-surface",
674
713
  children: e
675
714
  }
@@ -678,28 +717,37 @@ const Ne = {
678
717
  o && /* @__PURE__ */ n(
679
718
  "span",
680
719
  {
681
- className: `material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${U[a]}`,
720
+ className: `material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${J[a]}`,
682
721
  children: o
683
722
  }
684
723
  ),
685
724
  /* @__PURE__ */ n(
686
725
  "input",
687
726
  {
688
- ref: p,
689
- id: d,
690
- disabled: i,
727
+ ref: E,
728
+ id: C,
729
+ disabled: c,
730
+ type: g ? H ? "number" : "text" : w,
731
+ inputMode: g ? "decimal" : v,
732
+ value: g ? ee : m,
733
+ defaultValue: g ? void 0 : p,
734
+ step: g ? b ?? (F > 0 ? Math.pow(10, -F) : 1) : b,
735
+ onFocus: te,
736
+ onBlur: re,
737
+ onChange: ne,
691
738
  className: [
692
739
  "w-full bg-white border rounded transition-all duration-200",
693
740
  "text-on-surface placeholder:text-on-surface-variant",
694
741
  "focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",
695
742
  r ? "border-error focus:border-error focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]" : "border-outline-variant",
696
743
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
697
- Ne[a],
744
+ g ? "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" : "",
745
+ ze[a],
698
746
  o ? "pl-9" : "",
699
747
  s ? "pr-9" : "",
700
- m
748
+ x
701
749
  ].filter(Boolean).join(" "),
702
- ...f
750
+ ...I
703
751
  }
704
752
  ),
705
753
  s && /* @__PURE__ */ n(
@@ -707,10 +755,10 @@ const Ne = {
707
755
  {
708
756
  className: [
709
757
  "material-symbols-outlined absolute right-3 text-on-surface-variant",
710
- U[a],
711
- c ? "cursor-pointer hover:text-on-surface" : "pointer-events-none"
758
+ J[a],
759
+ d ? "cursor-pointer hover:text-on-surface" : "pointer-events-none"
712
760
  ].filter(Boolean).join(" "),
713
- onClick: c,
761
+ onClick: d,
714
762
  children: s
715
763
  }
716
764
  )
@@ -723,16 +771,16 @@ const Ne = {
723
771
  ] });
724
772
  }
725
773
  );
726
- je.displayName = "Input";
727
- const ke = {
774
+ _e.displayName = "Input";
775
+ const Le = {
728
776
  sm: "max-w-sm",
729
777
  md: "max-w-md",
730
778
  lg: "max-w-lg",
731
779
  xl: "max-w-2xl",
732
780
  full: "max-w-[calc(100vw-2rem)]"
733
781
  };
734
- function Ke({ open: e, onClose: t, size: r = "md", children: a }) {
735
- return I(() => {
782
+ function Xe({ open: e, onClose: t, size: r = "md", children: a }) {
783
+ return T(() => {
736
784
  if (!e) return;
737
785
  const o = (s) => {
738
786
  s.key === "Escape" && t();
@@ -758,7 +806,7 @@ function Ke({ open: e, onClose: t, size: r = "md", children: a }) {
758
806
  {
759
807
  className: [
760
808
  "relative w-full bg-white rounded-2xl shadow-theme-lg z-10 flex flex-col max-h-[90vh]",
761
- ke[r]
809
+ Le[r]
762
810
  ].filter(Boolean).join(" "),
763
811
  children: a
764
812
  }
@@ -767,7 +815,7 @@ function Ke({ open: e, onClose: t, size: r = "md", children: a }) {
767
815
  }
768
816
  ) : null;
769
817
  }
770
- function Je({ title: e, subtitle: t, onClose: r, className: a = "", ...o }) {
818
+ function Ye({ title: e, subtitle: t, onClose: r, className: a = "", ...o }) {
771
819
  return /* @__PURE__ */ l(
772
820
  "div",
773
821
  {
@@ -791,7 +839,7 @@ function Je({ title: e, subtitle: t, onClose: r, className: a = "", ...o }) {
791
839
  }
792
840
  );
793
841
  }
794
- function Qe({ children: e, className: t = "", ...r }) {
842
+ function Ze({ children: e, className: t = "", ...r }) {
795
843
  return /* @__PURE__ */ n(
796
844
  "div",
797
845
  {
@@ -801,7 +849,7 @@ function Qe({ children: e, className: t = "", ...r }) {
801
849
  }
802
850
  );
803
851
  }
804
- function Xe({ children: e, className: t = "", ...r }) {
852
+ function Pe({ children: e, className: t = "", ...r }) {
805
853
  return /* @__PURE__ */ n(
806
854
  "div",
807
855
  {
@@ -814,25 +862,25 @@ function Xe({ children: e, className: t = "", ...r }) {
814
862
  }
815
863
  );
816
864
  }
817
- function Be(e, t) {
865
+ function Te(e, t) {
818
866
  return t <= 7 ? Array.from({ length: t }, (r, a) => a + 1) : e <= 4 ? [1, 2, 3, 4, 5, "...", t] : e >= t - 3 ? [1, "...", t - 4, t - 3, t - 2, t - 1, t] : [1, "...", e - 1, e, e + 1, "...", t];
819
867
  }
820
- function Ye({
868
+ function et({
821
869
  currentPage: e,
822
870
  totalPages: t,
823
871
  totalItems: r,
824
872
  itemsPerPage: a = 10,
825
873
  onPageChange: o,
826
874
  variant: s = "full",
827
- className: c = "",
828
- ...i
875
+ className: d = "",
876
+ ...c
829
877
  }) {
830
- const m = Be(e, t), u = (e - 1) * a + 1, f = Math.min(e * a, r ?? e * a), p = "inline-flex items-center justify-center text-sm font-medium rounded transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-zeo-orange/30 disabled:opacity-40 disabled:cursor-not-allowed select-none", d = `${p} w-9 h-9`, x = "bg-zeo-orange text-white", h = "text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface", w = `${p} px-3 h-9 gap-1.5 border border-surface-container-high text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface`;
878
+ const x = Te(e, t), u = (e - 1) * a + 1, f = Math.min(e * a, r ?? e * a), h = "inline-flex items-center justify-center text-sm font-medium rounded transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-zeo-orange/30 disabled:opacity-40 disabled:cursor-not-allowed select-none", i = `${h} w-9 h-9`, m = "bg-zeo-orange text-white", p = "text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface", w = `${h} px-3 h-9 gap-1.5 border border-surface-container-high text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface`;
831
879
  return /* @__PURE__ */ l(
832
880
  "div",
833
881
  {
834
- className: ["flex items-center justify-between gap-4 flex-wrap", c].filter(Boolean).join(" "),
835
- ...i,
882
+ className: ["flex items-center justify-between gap-4 flex-wrap", d].filter(Boolean).join(" "),
883
+ ...c,
836
884
  children: [
837
885
  s === "full" && r !== void 0 && /* @__PURE__ */ l("p", { className: "text-sm text-on-surface-variant", children: [
838
886
  "Mostrando ",
@@ -852,20 +900,20 @@ function Ye({
852
900
  onClick: () => o(e - 1),
853
901
  disabled: e === 1,
854
902
  "aria-label": "Página anterior",
855
- className: s === "icon" ? d + " " + h : w,
903
+ className: s === "icon" ? i + " " + p : w,
856
904
  children: [
857
905
  /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_back" }),
858
906
  s === "text" && "Anterior"
859
907
  ]
860
908
  }
861
909
  ),
862
- m.map(
910
+ x.map(
863
911
  (b, v) => b === "..." ? /* @__PURE__ */ n("span", { className: "w-9 text-center text-sm text-on-surface-variant select-none", children: "…" }, `ellipsis-${v}`) : /* @__PURE__ */ n(
864
912
  "button",
865
913
  {
866
914
  onClick: () => o(b),
867
915
  "aria-current": e === b ? "page" : void 0,
868
- className: [d, e === b ? x : h].join(" "),
916
+ className: [i, e === b ? m : p].join(" "),
869
917
  children: b
870
918
  },
871
919
  b
@@ -877,7 +925,7 @@ function Ye({
877
925
  onClick: () => o(e + 1),
878
926
  disabled: e === t,
879
927
  "aria-label": "Próxima página",
880
- className: s === "icon" ? d + " " + h : w,
928
+ className: s === "icon" ? i + " " + p : w,
881
929
  children: [
882
930
  s === "text" && "Próxima",
883
931
  /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_forward" })
@@ -889,32 +937,32 @@ function Ye({
889
937
  }
890
938
  );
891
939
  }
892
- const Ce = {
940
+ const Ie = {
893
941
  xs: "h-1",
894
942
  sm: "h-1.5",
895
943
  md: "h-2",
896
944
  lg: "h-3"
897
- }, ze = {
945
+ }, Ee = {
898
946
  primary: "bg-zeo-orange",
899
947
  success: "bg-green-500",
900
948
  warning: "bg-amber-400",
901
949
  danger: "bg-red-500"
902
950
  };
903
- function Ze({
951
+ function tt({
904
952
  value: e,
905
953
  max: t = 100,
906
954
  size: r = "md",
907
955
  variant: a = "primary",
908
956
  label: o = "none",
909
957
  showPercent: s = !0,
910
- title: c,
911
- className: i = "",
912
- ...m
958
+ title: d,
959
+ className: c = "",
960
+ ...x
913
961
  }) {
914
962
  const u = Math.min(100, Math.max(0, e / t * 100)), f = `${Math.round(u)}%`;
915
- return /* @__PURE__ */ l("div", { className: ["flex flex-col gap-1.5", i].filter(Boolean).join(" "), ...m, children: [
916
- (c || o === "outside" && s) && /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2", children: [
917
- c && /* @__PURE__ */ n("span", { className: "text-sm font-medium text-on-surface", children: c }),
963
+ return /* @__PURE__ */ l("div", { className: ["flex flex-col gap-1.5", c].filter(Boolean).join(" "), ...x, children: [
964
+ (d || o === "outside" && s) && /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2", children: [
965
+ d && /* @__PURE__ */ n("span", { className: "text-sm font-medium text-on-surface", children: d }),
918
966
  o === "outside" && s && /* @__PURE__ */ n("span", { className: "text-sm font-semibold text-on-surface", children: f })
919
967
  ] }),
920
968
  /* @__PURE__ */ n(
@@ -924,13 +972,13 @@ function Ze({
924
972
  "aria-valuenow": e,
925
973
  "aria-valuemin": 0,
926
974
  "aria-valuemax": t,
927
- className: ["relative w-full bg-surface-container-high rounded-full overflow-hidden", Ce[r]].join(" "),
975
+ className: ["relative w-full bg-surface-container-high rounded-full overflow-hidden", Ie[r]].join(" "),
928
976
  children: /* @__PURE__ */ n(
929
977
  "div",
930
978
  {
931
979
  className: [
932
980
  "h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",
933
- ze[a]
981
+ Ee[a]
934
982
  ].join(" "),
935
983
  style: { width: `${u}%` },
936
984
  children: o === "inside" && s && u >= 20 && /* @__PURE__ */ n("span", { className: "text-[10px] font-bold text-white leading-none", children: f })
@@ -940,18 +988,18 @@ function Ze({
940
988
  )
941
989
  ] });
942
990
  }
943
- const $e = {
991
+ const Me = {
944
992
  xs: "w-3 h-3 border",
945
993
  sm: "w-4 h-4 border-2",
946
994
  md: "w-6 h-6 border-2",
947
995
  lg: "w-8 h-8 border-[3px]",
948
996
  xl: "w-12 h-12 border-4"
949
- }, _e = {
997
+ }, Fe = {
950
998
  primary: "border-orange-200 border-t-zeo-orange",
951
999
  secondary: "border-surface-container-high border-t-on-surface-variant",
952
1000
  white: "border-white/30 border-t-white"
953
1001
  };
954
- function Pe({
1002
+ function rt({
955
1003
  size: e = "md",
956
1004
  variant: t = "primary",
957
1005
  label: r = "Carregando...",
@@ -965,15 +1013,15 @@ function Pe({
965
1013
  "aria-label": r,
966
1014
  className: [
967
1015
  "inline-block rounded-full animate-spin",
968
- $e[e],
969
- _e[t],
1016
+ Me[e],
1017
+ Fe[t],
970
1018
  a
971
1019
  ].filter(Boolean).join(" "),
972
1020
  ...o
973
1021
  }
974
1022
  );
975
1023
  }
976
- function et({ children: e, className: t = "", ...r }) {
1024
+ function nt({ children: e, className: t = "", ...r }) {
977
1025
  return /* @__PURE__ */ n(
978
1026
  "div",
979
1027
  {
@@ -983,7 +1031,7 @@ function et({ children: e, className: t = "", ...r }) {
983
1031
  }
984
1032
  );
985
1033
  }
986
- function tt({ children: e, className: t = "", ...r }) {
1034
+ function at({ children: e, className: t = "", ...r }) {
987
1035
  return /* @__PURE__ */ n(
988
1036
  "thead",
989
1037
  {
@@ -993,7 +1041,7 @@ function tt({ children: e, className: t = "", ...r }) {
993
1041
  }
994
1042
  );
995
1043
  }
996
- function rt({ children: e, className: t = "", ...r }) {
1044
+ function ot({ children: e, className: t = "", ...r }) {
997
1045
  return /* @__PURE__ */ n(
998
1046
  "tbody",
999
1047
  {
@@ -1003,7 +1051,7 @@ function rt({ children: e, className: t = "", ...r }) {
1003
1051
  }
1004
1052
  );
1005
1053
  }
1006
- function nt({ selected: e = !1, children: t, className: r = "", ...a }) {
1054
+ function st({ selected: e = !1, children: t, className: r = "", ...a }) {
1007
1055
  return /* @__PURE__ */ n(
1008
1056
  "tr",
1009
1057
  {
@@ -1017,7 +1065,7 @@ function nt({ selected: e = !1, children: t, className: r = "", ...a }) {
1017
1065
  }
1018
1066
  );
1019
1067
  }
1020
- function at({
1068
+ function lt({
1021
1069
  sortable: e = !1,
1022
1070
  sorted: t = !1,
1023
1071
  onSort: r,
@@ -1048,7 +1096,7 @@ function at({
1048
1096
  }
1049
1097
  );
1050
1098
  }
1051
- function ot({ muted: e = !1, mono: t = !1, children: r, className: a = "", ...o }) {
1099
+ function it({ muted: e = !1, mono: t = !1, children: r, className: a = "", ...o }) {
1052
1100
  return /* @__PURE__ */ n(
1053
1101
  "td",
1054
1102
  {
@@ -1063,23 +1111,23 @@ function ot({ muted: e = !1, mono: t = !1, children: r, className: a = "", ...o
1063
1111
  }
1064
1112
  );
1065
1113
  }
1066
- const q = V(null);
1067
- function R() {
1068
- const e = W(q);
1114
+ const X = Q(null);
1115
+ function D() {
1116
+ const e = V(X);
1069
1117
  if (!e) throw new Error("Tab must be used inside Tabs");
1070
1118
  return e;
1071
1119
  }
1072
- const O = V({ stretch: !1 });
1073
- function st({ value: e, onChange: t, variant: r = "default", children: a }) {
1074
- return /* @__PURE__ */ n(q.Provider, { value: { active: e, onChange: t, variant: r }, children: /* @__PURE__ */ n("div", { className: r === "vertical" ? "flex gap-6" : "flex flex-col gap-4", children: a }) });
1120
+ const Y = Q({ stretch: !1 });
1121
+ function ct({ value: e, onChange: t, variant: r = "default", children: a }) {
1122
+ return /* @__PURE__ */ n(X.Provider, { value: { active: e, onChange: t, variant: r }, children: /* @__PURE__ */ n("div", { className: r === "vertical" ? "flex gap-6" : "flex flex-col gap-4", children: a }) });
1075
1123
  }
1076
- function lt({ children: e, className: t = "", stretch: r = !1, ...a }) {
1077
- const { variant: o } = R(), s = {
1124
+ function dt({ children: e, className: t = "", stretch: r = !1, ...a }) {
1125
+ const { variant: o } = D(), s = {
1078
1126
  default: r ? "flex gap-1 bg-surface-container-low rounded-lg p-1 w-full" : "flex gap-1 bg-surface-container-low rounded-lg p-1 w-fit",
1079
1127
  underline: "flex gap-0 border-b border-surface-container-high w-full",
1080
1128
  vertical: "flex flex-col gap-1 bg-surface-container-low rounded-lg p-1 w-48 shrink-0 h-fit"
1081
1129
  }[o];
1082
- return /* @__PURE__ */ n(O.Provider, { value: { stretch: r }, children: /* @__PURE__ */ n(
1130
+ return /* @__PURE__ */ n(Y.Provider, { value: { stretch: r }, children: /* @__PURE__ */ n(
1083
1131
  "div",
1084
1132
  {
1085
1133
  role: "tablist",
@@ -1089,12 +1137,12 @@ function lt({ children: e, className: t = "", stretch: r = !1, ...a }) {
1089
1137
  }
1090
1138
  ) });
1091
1139
  }
1092
- function it({ value: e, label: t, icon: r, badge: a, disabled: o = !1 }) {
1093
- const { active: s, onChange: c, variant: i } = R(), { stretch: m } = W(O), u = s === e, f = "inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none", p = "opacity-40 cursor-not-allowed pointer-events-none", d = m && i !== "vertical" ? "flex-1 justify-center" : "", x = {
1140
+ function ut({ value: e, label: t, icon: r, badge: a, disabled: o = !1 }) {
1141
+ const { active: s, onChange: d, variant: c } = D(), { stretch: x } = V(Y), u = s === e, f = "inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none", h = "opacity-40 cursor-not-allowed pointer-events-none", i = x && c !== "vertical" ? "flex-1 justify-center" : "", m = {
1094
1142
  default: u ? "bg-white text-on-surface shadow-sm rounded-md px-4 py-2" : "text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2",
1095
1143
  underline: u ? "text-zeo-orange border-b-2 border-zeo-orange px-4 py-2.5 -mb-px" : "text-on-surface-variant hover:text-on-surface border-b-2 border-transparent px-4 py-2.5 -mb-px",
1096
1144
  vertical: u ? "bg-white text-on-surface shadow-sm rounded-md px-4 py-2 w-full" : "text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2 w-full"
1097
- }[i];
1145
+ }[c];
1098
1146
  return /* @__PURE__ */ l(
1099
1147
  "button",
1100
1148
  {
@@ -1102,8 +1150,8 @@ function it({ value: e, label: t, icon: r, badge: a, disabled: o = !1 }) {
1102
1150
  "aria-selected": u,
1103
1151
  "aria-disabled": o,
1104
1152
  disabled: o,
1105
- onClick: () => !o && c(e),
1106
- className: [f, x, d, o ? p : ""].filter(Boolean).join(" "),
1153
+ onClick: () => !o && d(e),
1154
+ className: [f, m, i, o ? h : ""].filter(Boolean).join(" "),
1107
1155
  children: [
1108
1156
  r && /* @__PURE__ */ n(
1109
1157
  "span",
@@ -1125,8 +1173,8 @@ function it({ value: e, label: t, icon: r, badge: a, disabled: o = !1 }) {
1125
1173
  }
1126
1174
  );
1127
1175
  }
1128
- function ct({ value: e, children: t, className: r = "", stretch: a = !1 }) {
1129
- const { active: o } = R();
1176
+ function ft({ value: e, children: t, className: r = "", stretch: a = !1 }) {
1177
+ const { active: o } = D();
1130
1178
  return o !== e ? null : /* @__PURE__ */ n(
1131
1179
  "div",
1132
1180
  {
@@ -1136,7 +1184,7 @@ function ct({ value: e, children: t, className: r = "", stretch: a = !1 }) {
1136
1184
  }
1137
1185
  );
1138
1186
  }
1139
- const Ie = {
1187
+ const Se = {
1140
1188
  top: {
1141
1189
  wrapper: "bottom-full left-1/2 -translate-x-1/2 mb-2",
1142
1190
  arrow: "top-full left-1/2 -translate-x-1/2 border-t-4 border-x-4 border-x-transparent border-b-0"
@@ -1153,11 +1201,11 @@ const Ie = {
1153
1201
  wrapper: "left-full top-1/2 -translate-y-1/2 ml-2",
1154
1202
  arrow: "right-full top-1/2 -translate-y-1/2 border-r-4 border-y-4 border-y-transparent border-l-0"
1155
1203
  }
1156
- }, Le = {
1204
+ }, Ae = {
1157
1205
  dark: { tooltip: "bg-slate-800 text-white", arrow: "border-t-slate-800 border-r-slate-800 border-b-slate-800 border-l-slate-800" },
1158
1206
  light: { tooltip: "bg-white text-on-surface border border-surface-container-high shadow-theme-lg", arrow: "border-t-white border-r-white border-b-white border-l-white" }
1159
1207
  };
1160
- function dt({
1208
+ function mt({
1161
1209
  content: e,
1162
1210
  position: t = "top",
1163
1211
  variant: r = "dark",
@@ -1165,7 +1213,7 @@ function dt({
1165
1213
  className: o = "",
1166
1214
  ...s
1167
1215
  }) {
1168
- const c = Ie[t], i = Le[r];
1216
+ const d = Se[t], c = Ae[r];
1169
1217
  return /* @__PURE__ */ l("div", { className: ["relative inline-flex group", o].filter(Boolean).join(" "), ...s, children: [
1170
1218
  a,
1171
1219
  /* @__PURE__ */ l(
@@ -1176,139 +1224,50 @@ function dt({
1176
1224
  "absolute z-50 pointer-events-none",
1177
1225
  "opacity-0 group-hover:opacity-100 transition-opacity duration-150",
1178
1226
  "whitespace-nowrap text-xs font-medium px-2.5 py-1.5 rounded-lg",
1179
- c.wrapper,
1180
- i.tooltip
1227
+ d.wrapper,
1228
+ c.tooltip
1181
1229
  ].join(" "),
1182
1230
  children: [
1183
1231
  e,
1184
- /* @__PURE__ */ n("span", { className: ["absolute w-0 h-0", c.arrow, i.arrow].join(" ") })
1232
+ /* @__PURE__ */ n("span", { className: ["absolute w-0 h-0", d.arrow, c.arrow].join(" ") })
1185
1233
  ]
1186
1234
  }
1187
1235
  )
1188
1236
  ] });
1189
1237
  }
1190
- const Te = {
1191
- sm: "px-3 py-1.5 text-sm h-8",
1192
- md: "px-3 py-2 text-sm h-10",
1193
- lg: "px-4 py-2.5 text-base h-11"
1194
- };
1195
- function Fe(e, t, r) {
1196
- if (e === "" || e === void 0 || e === null) return "";
1197
- const a = Number(e).toFixed(t);
1198
- return r ? `${a} ${r}` : a;
1199
- }
1200
- const Ee = N(
1201
- ({
1202
- label: e,
1203
- hint: t,
1204
- error: r,
1205
- unit: a = "",
1206
- decimals: o = 0,
1207
- value: s,
1208
- defaultValue: c,
1209
- onChange: i,
1210
- disabled: m,
1211
- placeholder: u,
1212
- inputSize: f = "md",
1213
- id: p,
1214
- name: d,
1215
- min: x,
1216
- max: h,
1217
- step: w,
1218
- required: b,
1219
- className: v = ""
1220
- }, g) => {
1221
- const S = ee(), z = p ?? S, j = s !== void 0, [L, T] = C(
1222
- c !== void 0 ? c : ""
1223
- ), [k, A] = C(!1), [F, H] = C(""), K = M(null), $ = j ? s : L, J = k ? F : Fe($, o, a), Q = B(() => {
1224
- A(!0), H($ === "" ? "" : String($));
1225
- }, [$]), X = B(() => {
1226
- A(!1);
1227
- const y = parseFloat(F.replace(",", ".")), D = isNaN(y) ? "" : y;
1228
- j || T(D), i == null || i(D);
1229
- }, [F, j, i]), Y = B((y) => {
1230
- H(y.target.value);
1231
- }, []), Z = B(
1232
- (y) => {
1233
- K.current = y, typeof g == "function" ? g(y) : g && (g.current = y);
1234
- },
1235
- [g]
1236
- );
1237
- return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
1238
- e && /* @__PURE__ */ n("label", { htmlFor: z, className: "text-sm font-medium text-on-surface", children: e }),
1239
- /* @__PURE__ */ n(
1240
- "input",
1241
- {
1242
- ref: Z,
1243
- id: z,
1244
- name: d,
1245
- type: k ? "number" : "text",
1246
- inputMode: "decimal",
1247
- value: J,
1248
- placeholder: u,
1249
- disabled: m,
1250
- required: b,
1251
- min: x,
1252
- max: h,
1253
- step: w ?? (o > 0 ? Math.pow(10, -o) : 1),
1254
- onFocus: Q,
1255
- onBlur: X,
1256
- onChange: Y,
1257
- className: [
1258
- "w-full bg-white border rounded transition-all duration-200",
1259
- "text-on-surface placeholder:text-on-surface-variant",
1260
- "focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",
1261
- r ? "border-error focus:border-error focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]" : "border-outline-variant",
1262
- "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
1263
- "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
1264
- Te[f],
1265
- v
1266
- ].filter(Boolean).join(" ")
1267
- }
1268
- ),
1269
- r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1", children: [
1270
- /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
1271
- r
1272
- ] }),
1273
- !r && t && /* @__PURE__ */ n("p", { className: "text-xs text-on-surface-variant", children: t })
1274
- ] });
1275
- }
1276
- );
1277
- Ee.displayName = "UnitInput";
1278
1238
  export {
1279
- Ae as Alert,
1280
- He as Avatar,
1281
- De as Badge,
1282
- Ge as Breadcrumb,
1283
- me as Button,
1284
- Ue as ButtonGroup,
1285
- Ve as Card,
1286
- qe as CardFooter,
1287
- We as CardHeader,
1288
- we as Checkbox,
1289
- Oe as Dropdown,
1290
- je as Input,
1291
- Ke as Modal,
1292
- Qe as ModalBody,
1293
- Xe as ModalFooter,
1294
- Je as ModalHeader,
1295
- Ye as Pagination,
1296
- Ze as ProgressBar,
1297
- ve as Radio,
1298
- he as Select,
1299
- Pe as Spinner,
1300
- ye as Switch,
1301
- it as Tab,
1302
- lt as TabList,
1303
- ct as TabPanel,
1304
- et as Table,
1305
- rt as TableBody,
1306
- ot as TableCell,
1307
- tt as TableHead,
1308
- at as TableHeaderCell,
1309
- nt as TableRow,
1310
- st as Tabs,
1311
- be as Textarea,
1312
- dt as Tooltip,
1313
- Ee as UnitInput
1239
+ Ge as Alert,
1240
+ Ue as Avatar,
1241
+ We as Badge,
1242
+ qe as Breadcrumb,
1243
+ ge as Button,
1244
+ Oe as ButtonGroup,
1245
+ Ke as Card,
1246
+ Qe as CardFooter,
1247
+ Je as CardHeader,
1248
+ ke as Checkbox,
1249
+ Ve as Dropdown,
1250
+ _e as Input,
1251
+ Xe as Modal,
1252
+ Ze as ModalBody,
1253
+ Pe as ModalFooter,
1254
+ Ye as ModalHeader,
1255
+ et as Pagination,
1256
+ tt as ProgressBar,
1257
+ Be as Radio,
1258
+ ye as Select,
1259
+ rt as Spinner,
1260
+ Ce as Switch,
1261
+ ut as Tab,
1262
+ dt as TabList,
1263
+ ft as TabPanel,
1264
+ nt as Table,
1265
+ ot as TableBody,
1266
+ it as TableCell,
1267
+ at as TableHead,
1268
+ lt as TableHeaderCell,
1269
+ st as TableRow,
1270
+ ct as Tabs,
1271
+ Ne as Textarea,
1272
+ mt as Tooltip
1314
1273
  };