@zeo-app/design-system 0.1.0 → 0.2.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,6 +1,7 @@
1
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as x, useState as k, useRef as z, useEffect as w, createContext as $, useContext as _ } from "react";
3
- const T = {
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 = {
4
5
  info: {
5
6
  container: "bg-blue-50 border-blue-200 text-blue-800",
6
7
  icon: "text-blue-500",
@@ -22,67 +23,67 @@ const T = {
22
23
  defaultIcon: "error"
23
24
  }
24
25
  };
25
- function le({
26
+ function Ae({
26
27
  variant: e = "info",
27
28
  title: t,
28
29
  children: r,
29
- onClose: n,
30
+ onClose: a,
30
31
  icon: o,
31
- className: l = "",
32
+ className: s = "",
32
33
  ...c
33
34
  }) {
34
- const d = T[e], i = o ?? d.defaultIcon;
35
- return /* @__PURE__ */ s(
35
+ const i = re[e], m = o ?? i.defaultIcon;
36
+ return /* @__PURE__ */ l(
36
37
  "div",
37
38
  {
38
39
  role: "alert",
39
40
  className: [
40
41
  "flex gap-3 p-4 rounded-lg border",
41
- d.container,
42
- l
42
+ i.container,
43
+ s
43
44
  ].filter(Boolean).join(" "),
44
45
  ...c,
45
46
  children: [
46
- /* @__PURE__ */ a("span", { className: `material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${d.icon}`, children: i }),
47
- /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
48
- t && /* @__PURE__ */ a("p", { className: "font-semibold text-sm mb-0.5", children: t }),
49
- /* @__PURE__ */ a("div", { className: "text-sm leading-relaxed", children: r })
47
+ /* @__PURE__ */ n("span", { className: `material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${i.icon}`, children: m }),
48
+ /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
49
+ t && /* @__PURE__ */ n("p", { className: "font-semibold text-sm mb-0.5", children: t }),
50
+ /* @__PURE__ */ n("div", { className: "text-sm leading-relaxed", children: r })
50
51
  ] }),
51
- n && /* @__PURE__ */ a(
52
+ a && /* @__PURE__ */ n(
52
53
  "button",
53
54
  {
54
- onClick: n,
55
+ onClick: a,
55
56
  className: "shrink-0 opacity-70 hover:opacity-100 transition-opacity",
56
57
  "aria-label": "Fechar alerta",
57
- children: /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px]", children: "close" })
58
+ children: /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px]", children: "close" })
58
59
  }
59
60
  )
60
61
  ]
61
62
  }
62
63
  );
63
64
  }
64
- const F = {
65
+ const ne = {
65
66
  xs: "w-6 h-6 text-[10px]",
66
67
  sm: "w-8 h-8 text-xs",
67
68
  md: "w-10 h-10 text-sm",
68
69
  lg: "w-12 h-12 text-base",
69
70
  xl: "w-16 h-16 text-lg"
70
- }, I = {
71
+ }, ae = {
71
72
  xs: "w-1.5 h-1.5",
72
73
  sm: "w-2 h-2",
73
74
  md: "w-2.5 h-2.5",
74
75
  lg: "w-3 h-3",
75
76
  xl: "w-3.5 h-3.5"
76
- }, L = {
77
+ }, oe = {
77
78
  online: "bg-green-500",
78
79
  offline: "bg-gray-400",
79
80
  busy: "bg-red-500",
80
81
  away: "bg-yellow-400"
81
82
  };
82
- function E(e) {
83
+ function se(e) {
83
84
  return e.split(" ").slice(0, 2).map((t) => t[0]).join("").toUpperCase();
84
85
  }
85
- function S(e) {
86
+ function le(e) {
86
87
  const t = [
87
88
  "bg-orange-100 text-orange-700",
88
89
  "bg-blue-100 text-blue-700",
@@ -93,147 +94,147 @@ function S(e) {
93
94
  ], r = e.charCodeAt(0) % t.length;
94
95
  return t[r];
95
96
  }
96
- function ie({
97
+ function He({
97
98
  src: e,
98
99
  alt: t = "",
99
100
  name: r,
100
- size: n = "md",
101
+ size: a = "md",
101
102
  status: o,
102
- className: l = "",
103
+ className: s = "",
103
104
  ...c
104
105
  }) {
105
- return /* @__PURE__ */ s("div", { className: ["relative inline-flex shrink-0", l].filter(Boolean).join(" "), ...c, children: [
106
- /* @__PURE__ */ a(
106
+ return /* @__PURE__ */ l("div", { className: ["relative inline-flex shrink-0", s].filter(Boolean).join(" "), ...c, children: [
107
+ /* @__PURE__ */ n(
107
108
  "div",
108
109
  {
109
110
  className: [
110
111
  "rounded-full overflow-hidden flex items-center justify-center font-semibold",
111
- F[n],
112
- !e && r ? S(r) : "bg-surface-container"
112
+ ne[a],
113
+ !e && r ? le(r) : "bg-surface-container"
113
114
  ].filter(Boolean).join(" "),
114
- children: e ? /* @__PURE__ */ a(
115
+ children: e ? /* @__PURE__ */ n(
115
116
  "img",
116
117
  {
117
118
  src: e,
118
119
  alt: t || r,
119
120
  className: "w-full h-full object-cover"
120
121
  }
121
- ) : r ? E(r) : /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-on-surface-variant", style: { fontSize: "60%" }, children: "person" })
122
+ ) : r ? se(r) : /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-on-surface-variant", style: { fontSize: "60%" }, children: "person" })
122
123
  }
123
124
  ),
124
- o && /* @__PURE__ */ a(
125
+ o && /* @__PURE__ */ n(
125
126
  "span",
126
127
  {
127
128
  className: [
128
129
  "absolute bottom-0 right-0 rounded-full border-2 border-white",
129
- I[n],
130
- L[o]
130
+ ae[a],
131
+ oe[o]
131
132
  ].filter(Boolean).join(" ")
132
133
  }
133
134
  )
134
135
  ] });
135
136
  }
136
- const M = {
137
+ const ie = {
137
138
  default: "bg-surface-container text-on-surface-variant",
138
139
  primary: "bg-orange-100 text-orange-700",
139
140
  success: "bg-green-100 text-green-700",
140
141
  warning: "bg-yellow-100 text-yellow-700",
141
142
  danger: "bg-red-100 text-red-700",
142
143
  info: "bg-blue-100 text-blue-700"
143
- }, A = {
144
+ }, ce = {
144
145
  default: "bg-on-surface-variant",
145
146
  primary: "bg-orange-500",
146
147
  success: "bg-green-500",
147
148
  warning: "bg-yellow-500",
148
149
  danger: "bg-red-500",
149
150
  info: "bg-blue-500"
150
- }, D = {
151
+ }, de = {
151
152
  sm: "px-2 py-0.5 text-xs gap-1",
152
153
  md: "px-2.5 py-1 text-xs gap-1.5"
153
154
  };
154
- function ce({
155
+ function De({
155
156
  variant: e = "default",
156
157
  size: t = "md",
157
158
  dot: r = !1,
158
- icon: n,
159
+ icon: a,
159
160
  children: o,
160
- className: l = "",
161
+ className: s = "",
161
162
  ...c
162
163
  }) {
163
- return /* @__PURE__ */ s(
164
+ return /* @__PURE__ */ l(
164
165
  "span",
165
166
  {
166
167
  className: [
167
168
  "inline-flex items-center font-medium rounded-full",
168
- M[e],
169
- D[t],
170
- l
169
+ ie[e],
170
+ de[t],
171
+ s
171
172
  ].filter(Boolean).join(" "),
172
173
  ...c,
173
174
  children: [
174
- r && /* @__PURE__ */ a("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${A[e]}` }),
175
- n && !r && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[12px]", children: n }),
175
+ r && /* @__PURE__ */ n("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${ce[e]}` }),
176
+ a && !r && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[12px]", children: a }),
176
177
  o
177
178
  ]
178
179
  }
179
180
  );
180
181
  }
181
- function de({ items: e, className: t = "", ...r }) {
182
- return /* @__PURE__ */ a("nav", { "aria-label": "Breadcrumb", className: t, ...r, children: /* @__PURE__ */ a("ol", { className: "inline-flex items-center gap-1.5 text-sm flex-wrap", children: e.map((n, o) => {
183
- const l = o === e.length - 1;
184
- return /* @__PURE__ */ s("li", { className: "flex items-center gap-1.5", children: [
185
- o > 0 && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[16px] text-on-surface-variant select-none", children: "chevron_right" }),
186
- l ? /* @__PURE__ */ s(
182
+ function Ge({ items: e, className: t = "", ...r }) {
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
+ const s = o === e.length - 1;
185
+ return /* @__PURE__ */ l("li", { className: "flex items-center gap-1.5", children: [
186
+ o > 0 && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[16px] text-on-surface-variant select-none", children: "chevron_right" }),
187
+ s ? /* @__PURE__ */ l(
187
188
  "span",
188
189
  {
189
190
  "aria-current": "page",
190
191
  className: "font-semibold text-on-surface flex items-center gap-1",
191
192
  children: [
192
- n.icon && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px] leading-none", children: n.icon }),
193
- n.label
193
+ a.icon && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px] leading-none", children: a.icon }),
194
+ a.label
194
195
  ]
195
196
  }
196
- ) : /* @__PURE__ */ s(
197
+ ) : /* @__PURE__ */ l(
197
198
  "a",
198
199
  {
199
- href: n.href ?? "#",
200
+ href: a.href ?? "#",
200
201
  className: "text-on-surface-variant hover:text-zeo-orange transition-colors flex items-center gap-1",
201
202
  children: [
202
- n.icon && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px] leading-none", children: n.icon }),
203
- n.label
203
+ a.icon && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px] leading-none", children: a.icon }),
204
+ a.label
204
205
  ]
205
206
  }
206
207
  )
207
208
  ] }, o);
208
209
  }) }) });
209
210
  }
210
- const H = {
211
+ const ue = {
211
212
  primary: "bg-zeo-orange text-white hover:bg-orange-700 active:bg-orange-800 focus:shadow-zeo-focus border-transparent",
212
213
  secondary: "bg-white text-on-surface border-outline-variant hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",
213
214
  ghost: "bg-transparent text-on-surface-variant border-transparent hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",
214
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)]",
215
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)]"
216
- }, R = {
217
+ }, fe = {
217
218
  sm: "px-3 py-1.5 text-sm gap-1.5 h-8",
218
219
  md: "px-4 py-2 text-sm gap-2 h-10",
219
220
  lg: "px-5 py-2.5 text-base gap-2 h-11"
220
- }, g = {
221
+ }, E = {
221
222
  sm: "text-[16px]",
222
223
  md: "text-[18px]",
223
224
  lg: "text-[20px]"
224
- }, q = x(
225
+ }, me = N(
225
226
  ({
226
227
  variant: e = "primary",
227
228
  size: t = "md",
228
229
  loading: r = !1,
229
- iconLeft: n,
230
+ iconLeft: a,
230
231
  iconRight: o,
231
- fullWidth: l = !1,
232
+ fullWidth: s = !1,
232
233
  disabled: c,
233
- children: d,
234
- className: i = "",
234
+ children: i,
235
+ className: m = "",
235
236
  ...u
236
- }, f) => /* @__PURE__ */ s(
237
+ }, f) => /* @__PURE__ */ l(
237
238
  "button",
238
239
  {
239
240
  ref: f,
@@ -242,29 +243,29 @@ const H = {
242
243
  "inline-flex items-center justify-center font-medium rounded border transition-all duration-200 select-none",
243
244
  "focus:outline-none",
244
245
  "disabled:opacity-50 disabled:cursor-not-allowed",
245
- H[e],
246
- R[t],
247
- l ? "w-full" : "",
248
- i
246
+ ue[e],
247
+ fe[t],
248
+ s ? "w-full" : "",
249
+ m
249
250
  ].filter(Boolean).join(" "),
250
251
  ...u,
251
252
  children: [
252
- r ? /* @__PURE__ */ a(
253
+ r ? /* @__PURE__ */ n(
253
254
  "span",
254
255
  {
255
- className: `material-symbols-outlined animate-spin ${g[t]}`,
256
+ className: `material-symbols-outlined animate-spin ${E[t]}`,
256
257
  children: "progress_activity"
257
258
  }
258
- ) : n && /* @__PURE__ */ a("span", { className: `material-symbols-outlined ${g[t]}`, children: n }),
259
- d,
260
- !r && o && /* @__PURE__ */ a("span", { className: `material-symbols-outlined ${g[t]}`, children: o })
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 })
261
262
  ]
262
263
  }
263
264
  )
264
265
  );
265
- q.displayName = "Button";
266
- function ue({ children: e, attached: t = !1, className: r = "", ...n }) {
267
- return /* @__PURE__ */ a(
266
+ me.displayName = "Button";
267
+ function Ue({ children: e, attached: t = !1, className: r = "", ...a }) {
268
+ return /* @__PURE__ */ n(
268
269
  "div",
269
270
  {
270
271
  role: "group",
@@ -273,69 +274,69 @@ function ue({ children: e, attached: t = !1, className: r = "", ...n }) {
273
274
  t ? "[&>button]:rounded-none [&>button:first-child]:rounded-l [&>button:last-child]:rounded-r [&>button:not(:first-child)]:-ml-px" : "gap-2",
274
275
  r
275
276
  ].filter(Boolean).join(" "),
276
- ...n,
277
+ ...a,
277
278
  children: e
278
279
  }
279
280
  );
280
281
  }
281
- const G = {
282
+ const pe = {
282
283
  elevated: "bg-white shadow-theme-lg border border-surface-container-high",
283
284
  outlined: "bg-white border border-outline-variant",
284
285
  filled: "bg-surface-container-low border border-transparent"
285
- }, K = {
286
+ }, xe = {
286
287
  none: "",
287
288
  sm: "p-4",
288
289
  md: "p-5",
289
290
  lg: "p-6"
290
291
  };
291
- function fe({
292
+ function Ve({
292
293
  variant: e = "elevated",
293
294
  padding: t = "md",
294
295
  children: r,
295
- className: n = "",
296
+ className: a = "",
296
297
  ...o
297
298
  }) {
298
- return /* @__PURE__ */ a(
299
+ return /* @__PURE__ */ n(
299
300
  "div",
300
301
  {
301
302
  className: [
302
303
  "rounded-xl overflow-hidden",
303
- G[e],
304
- n
304
+ pe[e],
305
+ a
305
306
  ].filter(Boolean).join(" "),
306
307
  ...o,
307
- children: /* @__PURE__ */ a("div", { className: K[t], children: r })
308
+ children: /* @__PURE__ */ n("div", { className: xe[t], children: r })
308
309
  }
309
310
  );
310
311
  }
311
- function me({
312
+ function We({
312
313
  title: e,
313
314
  subtitle: t,
314
315
  action: r,
315
- icon: n,
316
+ icon: a,
316
317
  className: o = "",
317
- ...l
318
+ ...s
318
319
  }) {
319
- return /* @__PURE__ */ s(
320
+ return /* @__PURE__ */ l(
320
321
  "div",
321
322
  {
322
323
  className: ["flex items-start justify-between gap-4 pb-4", o].filter(Boolean).join(" "),
323
- ...l,
324
+ ...s,
324
325
  children: [
325
- /* @__PURE__ */ s("div", { className: "flex items-center gap-3 min-w-0", children: [
326
- n && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-on-surface-variant text-[24px] shrink-0", children: n }),
327
- /* @__PURE__ */ s("div", { className: "min-w-0", children: [
328
- /* @__PURE__ */ a("h3", { className: "text-base font-semibold text-on-surface truncate", children: e }),
329
- t && /* @__PURE__ */ a("p", { className: "text-sm text-on-surface-variant mt-0.5", children: t })
326
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-3 min-w-0", children: [
327
+ a && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-on-surface-variant text-[24px] shrink-0", children: a }),
328
+ /* @__PURE__ */ l("div", { className: "min-w-0", children: [
329
+ /* @__PURE__ */ n("h3", { className: "text-base font-semibold text-on-surface truncate", children: e }),
330
+ t && /* @__PURE__ */ n("p", { className: "text-sm text-on-surface-variant mt-0.5", children: t })
330
331
  ] })
331
332
  ] }),
332
- r && /* @__PURE__ */ a("div", { className: "shrink-0", children: r })
333
+ r && /* @__PURE__ */ n("div", { className: "shrink-0", children: r })
333
334
  ]
334
335
  }
335
336
  );
336
337
  }
337
- function xe({ children: e, className: t = "", ...r }) {
338
- return /* @__PURE__ */ a(
338
+ function qe({ children: e, className: t = "", ...r }) {
339
+ return /* @__PURE__ */ n(
339
340
  "div",
340
341
  {
341
342
  className: ["flex items-center justify-end gap-3 pt-4 border-t border-surface-container-high", t].filter(Boolean).join(" "),
@@ -344,67 +345,90 @@ function xe({ children: e, className: t = "", ...r }) {
344
345
  }
345
346
  );
346
347
  }
347
- function pe({ trigger: e, items: t, align: r = "right", className: n = "", ...o }) {
348
- const [l, c] = k(!1), d = z(null);
349
- return w(() => {
350
- const i = (u) => {
351
- d.current && !d.current.contains(u.target) && c(!1);
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 });
356
+ }, [r]);
357
+ return P(() => {
358
+ s && p();
359
+ }, [s, p]), I(() => {
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);
352
364
  };
353
- return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
354
- }, []), w(() => {
355
- const i = (u) => {
356
- u.key === "Escape" && c(!1);
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);
357
370
  };
358
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
359
- }, []), /* @__PURE__ */ s("div", { ref: d, className: ["relative inline-block", n].filter(Boolean).join(" "), ...o, children: [
360
- /* @__PURE__ */ a("div", { onClick: () => c((i) => !i), children: e }),
361
- l && /* @__PURE__ */ a(
362
- "div",
363
- {
364
- className: [
365
- "absolute z-40 mt-2 min-w-[180px] bg-white border border-surface-container-high rounded-xl shadow-theme-lg py-1",
366
- r === "right" ? "right-0" : "left-0"
367
- ].join(" "),
368
- role: "menu",
369
- children: t.map((i, u) => /* @__PURE__ */ s("div", { children: [
370
- /* @__PURE__ */ s(
371
- "button",
372
- {
373
- role: "menuitem",
374
- disabled: i.disabled,
375
- onClick: () => {
376
- var f;
377
- i.disabled || ((f = i.onClick) == null || f.call(i), c(!1));
378
- },
379
- className: [
380
- "w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",
381
- i.danger ? "text-error hover:bg-red-50" : "text-on-surface hover:bg-surface-container-low",
382
- i.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
383
- ].filter(Boolean).join(" "),
384
- children: [
385
- i.icon && /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px] opacity-70", children: i.icon }),
386
- i.label
387
- ]
388
- }
389
- ),
390
- i.dividerAfter && /* @__PURE__ */ a("div", { className: "my-1 border-t border-surface-container-high" })
391
- ] }, u))
392
- }
371
+ return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
372
+ }, []), I(() => {
373
+ const d = (x) => {
374
+ x.key === "Escape" && c(!1);
375
+ };
376
+ return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
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(
380
+ /* @__PURE__ */ n(
381
+ "div",
382
+ {
383
+ ref: f,
384
+ className: "fixed z-[100] min-w-[180px] bg-white border border-surface-container-high rounded-xl shadow-theme-lg py-1",
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"
389
+ },
390
+ role: "menu",
391
+ children: t.map((d, x) => /* @__PURE__ */ l("div", { children: [
392
+ /* @__PURE__ */ l(
393
+ "button",
394
+ {
395
+ role: "menuitem",
396
+ disabled: d.disabled,
397
+ onClick: () => {
398
+ var h;
399
+ d.disabled || ((h = d.onClick) == null || h.call(d), c(!1));
400
+ },
401
+ className: [
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"
405
+ ].filter(Boolean).join(" "),
406
+ children: [
407
+ d.icon && /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px] opacity-70", children: d.icon }),
408
+ d.label
409
+ ]
410
+ }
411
+ ),
412
+ d.dividerAfter && /* @__PURE__ */ n("div", { className: "my-1 border-t border-surface-container-high" })
413
+ ] }, x))
414
+ }
415
+ ),
416
+ document.body
393
417
  )
394
418
  ] });
395
419
  }
396
- const O = x(
397
- ({ label: e, hint: t, error: r, options: n, placeholder: o, disabled: l, className: c = "", id: d, ...i }, u) => {
398
- const f = d ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
399
- return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
400
- e && /* @__PURE__ */ a("label", { htmlFor: f, className: "text-sm font-medium text-on-surface", children: e }),
401
- /* @__PURE__ */ s("div", { className: "relative", children: [
402
- /* @__PURE__ */ s(
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, "-"));
423
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
424
+ e && /* @__PURE__ */ n("label", { htmlFor: f, className: "text-sm font-medium text-on-surface", children: e }),
425
+ /* @__PURE__ */ l("div", { className: "relative", children: [
426
+ /* @__PURE__ */ l(
403
427
  "select",
404
428
  {
405
429
  ref: u,
406
430
  id: f,
407
- disabled: l,
431
+ disabled: s,
408
432
  className: [
409
433
  "w-full appearance-none bg-white border rounded px-3 py-2 text-sm pr-9 transition-all duration-200",
410
434
  "text-on-surface focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",
@@ -412,36 +436,36 @@ const O = x(
412
436
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
413
437
  c
414
438
  ].filter(Boolean).join(" "),
415
- ...i,
439
+ ...m,
416
440
  children: [
417
- o && /* @__PURE__ */ a("option", { value: "", disabled: !0, children: o }),
418
- n.map((m) => /* @__PURE__ */ a("option", { value: m.value, disabled: m.disabled, children: m.label }, m.value))
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))
419
443
  ]
420
444
  }
421
445
  ),
422
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined absolute right-3 top-1/2 -translate-y-1/2 text-[18px] text-on-surface-variant pointer-events-none", children: "expand_more" })
446
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined absolute right-3 top-1/2 -translate-y-1/2 text-[18px] text-on-surface-variant pointer-events-none", children: "expand_more" })
423
447
  ] }),
424
- r && /* @__PURE__ */ s("p", { className: "text-xs text-error flex items-center gap-1", children: [
425
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
448
+ r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1", children: [
449
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
426
450
  r
427
451
  ] }),
428
- !r && t && /* @__PURE__ */ a("p", { className: "text-xs text-on-surface-variant", children: t })
452
+ !r && t && /* @__PURE__ */ n("p", { className: "text-xs text-on-surface-variant", children: t })
429
453
  ] });
430
454
  }
431
455
  );
432
- O.displayName = "Select";
433
- const U = x(
434
- ({ label: e, hint: t, error: r, disabled: n, className: o = "", id: l, rows: c = 4, ...d }, i) => {
435
- const u = l ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
436
- return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
437
- e && /* @__PURE__ */ a("label", { htmlFor: u, className: "text-sm font-medium text-on-surface", children: e }),
438
- /* @__PURE__ */ a(
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) => {
459
+ const u = s ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
460
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
461
+ e && /* @__PURE__ */ n("label", { htmlFor: u, className: "text-sm font-medium text-on-surface", children: e }),
462
+ /* @__PURE__ */ n(
439
463
  "textarea",
440
464
  {
441
- ref: i,
465
+ ref: m,
442
466
  id: u,
443
467
  rows: c,
444
- disabled: n,
468
+ disabled: a,
445
469
  className: [
446
470
  "w-full bg-white border rounded px-3 py-2 text-sm resize-y transition-all duration-200",
447
471
  "text-on-surface placeholder:text-on-surface-variant",
@@ -450,241 +474,278 @@ const U = x(
450
474
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
451
475
  o
452
476
  ].filter(Boolean).join(" "),
453
- ...d
477
+ ...i
454
478
  }
455
479
  ),
456
- r && /* @__PURE__ */ s("p", { className: "text-xs text-error flex items-center gap-1", children: [
457
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
480
+ r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1", children: [
481
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
458
482
  r
459
483
  ] }),
460
- !r && t && /* @__PURE__ */ a("p", { className: "text-xs text-on-surface-variant", children: t })
484
+ !r && t && /* @__PURE__ */ n("p", { className: "text-xs text-on-surface-variant", children: t })
461
485
  ] });
462
486
  }
463
487
  );
464
- U.displayName = "Textarea";
465
- const V = x(
466
- ({ label: e, description: t, error: r, disabled: n, className: o = "", id: l, ...c }, d) => {
467
- const i = l ?? `checkbox-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
468
- return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
469
- /* @__PURE__ */ s(
488
+ be.displayName = "Textarea";
489
+ const ge = {
490
+ square: "rounded-[2px]",
491
+ rounded: "rounded-[4px]",
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) => {
495
+ const f = s ?? `checkbox-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
496
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: [
497
+ /* @__PURE__ */ l(
470
498
  "label",
471
499
  {
472
- htmlFor: i,
500
+ htmlFor: f,
473
501
  className: [
474
502
  "flex items-start gap-3 cursor-pointer",
475
- n ? "opacity-50 cursor-not-allowed" : ""
503
+ a ? "opacity-50 cursor-not-allowed" : ""
476
504
  ].filter(Boolean).join(" "),
477
505
  children: [
478
- /* @__PURE__ */ a(
479
- "input",
480
- {
481
- ref: d,
482
- type: "checkbox",
483
- id: i,
484
- disabled: n,
485
- className: [
486
- "mt-0.5 w-4 h-4 rounded border-outline-variant text-zeo-orange shrink-0",
487
- "focus:ring-2 focus:ring-zeo-orange/30 focus:ring-offset-0",
488
- "disabled:cursor-not-allowed",
489
- o
490
- ].filter(Boolean).join(" "),
491
- ...c
492
- }
493
- ),
494
- e && /* @__PURE__ */ s("span", { className: "flex flex-col", children: [
495
- /* @__PURE__ */ a("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
496
- t && /* @__PURE__ */ a("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
506
+ /* @__PURE__ */ l("div", { className: "relative mt-0.5 shrink-0 w-4 h-4", children: [
507
+ /* @__PURE__ */ n(
508
+ "input",
509
+ {
510
+ ref: u,
511
+ type: "checkbox",
512
+ id: f,
513
+ disabled: a,
514
+ className: [
515
+ "absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",
516
+ o
517
+ ].filter(Boolean).join(" "),
518
+ ...m
519
+ }
520
+ ),
521
+ /* @__PURE__ */ n(
522
+ "div",
523
+ {
524
+ className: [
525
+ "w-4 h-4 border-2 border-outline-variant transition-colors pointer-events-none",
526
+ "bg-white peer-checked:bg-[var(--cb-color)] peer-checked:border-[var(--cb-color)]",
527
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--cb-color)]/30 peer-focus-visible:ring-offset-0",
528
+ ge[c]
529
+ ].filter(Boolean).join(" "),
530
+ style: { "--cb-color": i }
531
+ }
532
+ ),
533
+ /* @__PURE__ */ n(
534
+ "svg",
535
+ {
536
+ viewBox: "0 0 12 10",
537
+ width: "10",
538
+ height: "8",
539
+ fill: "none",
540
+ "aria-hidden": "true",
541
+ className: "absolute inset-0 m-auto pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity",
542
+ children: /* @__PURE__ */ n(
543
+ "polyline",
544
+ {
545
+ points: "1,5 4.5,8.5 11,1.5",
546
+ stroke: "white",
547
+ strokeWidth: "2",
548
+ strokeLinecap: "round",
549
+ strokeLinejoin: "round"
550
+ }
551
+ )
552
+ }
553
+ )
554
+ ] }),
555
+ e && /* @__PURE__ */ l("span", { className: "flex flex-col", children: [
556
+ /* @__PURE__ */ n("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
557
+ t && /* @__PURE__ */ n("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
497
558
  ] })
498
559
  ]
499
560
  }
500
561
  ),
501
- r && /* @__PURE__ */ s("p", { className: "text-xs text-error flex items-center gap-1 ml-7", children: [
502
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
562
+ r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1 ml-7", children: [
563
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
503
564
  r
504
565
  ] })
505
566
  ] });
506
567
  }
507
568
  );
508
- V.displayName = "Checkbox";
509
- const J = x(
510
- ({ label: e, description: t, disabled: r, className: n = "", id: o, ...l }, c) => {
511
- const d = o ?? `radio-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
512
- return /* @__PURE__ */ s(
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, "-")}`;
573
+ return /* @__PURE__ */ l(
513
574
  "label",
514
575
  {
515
- htmlFor: d,
576
+ htmlFor: i,
516
577
  className: [
517
578
  "flex items-start gap-3 cursor-pointer",
518
579
  r ? "opacity-50 cursor-not-allowed" : ""
519
580
  ].filter(Boolean).join(" "),
520
581
  children: [
521
- /* @__PURE__ */ a(
582
+ /* @__PURE__ */ n(
522
583
  "input",
523
584
  {
524
585
  ref: c,
525
586
  type: "radio",
526
- id: d,
587
+ id: i,
527
588
  disabled: r,
528
589
  className: [
529
590
  "mt-0.5 w-4 h-4 border-outline-variant text-zeo-orange shrink-0",
530
591
  "focus:ring-2 focus:ring-zeo-orange/30 focus:ring-offset-0",
531
592
  "disabled:cursor-not-allowed",
532
- n
593
+ a
533
594
  ].filter(Boolean).join(" "),
534
- ...l
595
+ ...s
535
596
  }
536
597
  ),
537
- e && /* @__PURE__ */ s("span", { className: "flex flex-col", children: [
538
- /* @__PURE__ */ a("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
539
- t && /* @__PURE__ */ a("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
598
+ e && /* @__PURE__ */ l("span", { className: "flex flex-col", children: [
599
+ /* @__PURE__ */ n("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
600
+ t && /* @__PURE__ */ n("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
540
601
  ] })
541
602
  ]
542
603
  }
543
604
  );
544
605
  }
545
606
  );
546
- J.displayName = "Radio";
547
- const Q = x(
548
- ({ label: e, description: t, disabled: r, className: n = "", id: o, ...l }, c) => {
549
- const d = o ?? `switch-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`;
550
- return /* @__PURE__ */ s(
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, "-")}`;
611
+ return /* @__PURE__ */ l(
551
612
  "label",
552
613
  {
553
- htmlFor: d,
614
+ htmlFor: i,
554
615
  className: [
555
616
  "flex items-start gap-3 cursor-pointer select-none",
556
617
  r ? "opacity-50 cursor-not-allowed" : ""
557
618
  ].filter(Boolean).join(" "),
558
619
  children: [
559
- /* @__PURE__ */ s("div", { className: "relative mt-0.5 shrink-0", children: [
560
- /* @__PURE__ */ a(
620
+ /* @__PURE__ */ l("div", { className: "relative mt-0.5 shrink-0", children: [
621
+ /* @__PURE__ */ n(
561
622
  "input",
562
623
  {
563
624
  ref: c,
564
625
  type: "checkbox",
565
- id: d,
626
+ id: i,
566
627
  disabled: r,
567
628
  className: "sr-only peer",
568
- ...l
629
+ ...s
569
630
  }
570
631
  ),
571
- /* @__PURE__ */ a("div", { className: "w-10 h-6 bg-surface-container-high rounded-full peer-checked:bg-zeo-orange transition-colors duration-200 peer-focus:ring-2 peer-focus:ring-zeo-orange/30" }),
572
- /* @__PURE__ */ a("div", { className: "absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow transition-transform duration-200 peer-checked:translate-x-4" })
632
+ /* @__PURE__ */ n("div", { className: "w-10 h-6 bg-surface-container-high rounded-full peer-checked:bg-zeo-orange transition-colors duration-200 peer-focus:ring-2 peer-focus:ring-zeo-orange/30" }),
633
+ /* @__PURE__ */ n("div", { className: "absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow transition-transform duration-200 peer-checked:translate-x-4" })
573
634
  ] }),
574
- e && /* @__PURE__ */ s("span", { className: "flex flex-col", children: [
575
- /* @__PURE__ */ a("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
576
- t && /* @__PURE__ */ a("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
635
+ e && /* @__PURE__ */ l("span", { className: "flex flex-col", children: [
636
+ /* @__PURE__ */ n("span", { className: "text-sm font-medium text-on-surface leading-tight", children: e }),
637
+ t && /* @__PURE__ */ n("span", { className: "text-xs text-on-surface-variant mt-0.5", children: t })
577
638
  ] })
578
639
  ]
579
640
  }
580
641
  );
581
642
  }
582
643
  );
583
- Q.displayName = "Switch";
584
- const W = {
644
+ ye.displayName = "Switch";
645
+ const Ne = {
585
646
  sm: "px-3 py-1.5 text-sm h-8",
586
647
  md: "px-3 py-2 text-sm h-10",
587
648
  lg: "px-4 py-2.5 text-base h-11"
588
- }, y = {
649
+ }, U = {
589
650
  sm: "text-[16px]",
590
651
  md: "text-[18px]",
591
652
  lg: "text-[20px]"
592
- }, X = x(
653
+ }, je = N(
593
654
  ({
594
655
  label: e,
595
656
  hint: t,
596
657
  error: r,
597
- inputSize: n = "md",
658
+ inputSize: a = "md",
598
659
  iconLeft: o,
599
- iconRight: l,
660
+ iconRight: s,
600
661
  onIconRightClick: c,
601
- disabled: d,
602
- className: i = "",
662
+ disabled: i,
663
+ className: m = "",
603
664
  id: u,
604
665
  ...f
605
- }, m) => {
606
- const p = u ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
607
- return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
608
- e && /* @__PURE__ */ a(
666
+ }, p) => {
667
+ const d = u ?? (e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-"));
668
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
669
+ e && /* @__PURE__ */ n(
609
670
  "label",
610
671
  {
611
- htmlFor: p,
672
+ htmlFor: d,
612
673
  className: "text-sm font-medium text-on-surface",
613
674
  children: e
614
675
  }
615
676
  ),
616
- /* @__PURE__ */ s("div", { className: "relative flex items-center", children: [
617
- o && /* @__PURE__ */ a(
677
+ /* @__PURE__ */ l("div", { className: "relative flex items-center", children: [
678
+ o && /* @__PURE__ */ n(
618
679
  "span",
619
680
  {
620
- className: `material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${y[n]}`,
681
+ className: `material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${U[a]}`,
621
682
  children: o
622
683
  }
623
684
  ),
624
- /* @__PURE__ */ a(
685
+ /* @__PURE__ */ n(
625
686
  "input",
626
687
  {
627
- ref: m,
628
- id: p,
629
- disabled: d,
688
+ ref: p,
689
+ id: d,
690
+ disabled: i,
630
691
  className: [
631
692
  "w-full bg-white border rounded transition-all duration-200",
632
693
  "text-on-surface placeholder:text-on-surface-variant",
633
694
  "focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",
634
695
  r ? "border-error focus:border-error focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]" : "border-outline-variant",
635
696
  "disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",
636
- W[n],
697
+ Ne[a],
637
698
  o ? "pl-9" : "",
638
- l ? "pr-9" : "",
639
- i
699
+ s ? "pr-9" : "",
700
+ m
640
701
  ].filter(Boolean).join(" "),
641
702
  ...f
642
703
  }
643
704
  ),
644
- l && /* @__PURE__ */ a(
705
+ s && /* @__PURE__ */ n(
645
706
  "span",
646
707
  {
647
708
  className: [
648
709
  "material-symbols-outlined absolute right-3 text-on-surface-variant",
649
- y[n],
710
+ U[a],
650
711
  c ? "cursor-pointer hover:text-on-surface" : "pointer-events-none"
651
712
  ].filter(Boolean).join(" "),
652
713
  onClick: c,
653
- children: l
714
+ children: s
654
715
  }
655
716
  )
656
717
  ] }),
657
- r && /* @__PURE__ */ s("p", { className: "text-xs text-error flex items-center gap-1", children: [
658
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
718
+ r && /* @__PURE__ */ l("p", { className: "text-xs text-error flex items-center gap-1", children: [
719
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[14px]", children: "error" }),
659
720
  r
660
721
  ] }),
661
- !r && t && /* @__PURE__ */ a("p", { className: "text-xs text-on-surface-variant", children: t })
722
+ !r && t && /* @__PURE__ */ n("p", { className: "text-xs text-on-surface-variant", children: t })
662
723
  ] });
663
724
  }
664
725
  );
665
- X.displayName = "Input";
666
- const Y = {
726
+ je.displayName = "Input";
727
+ const ke = {
667
728
  sm: "max-w-sm",
668
729
  md: "max-w-md",
669
730
  lg: "max-w-lg",
670
731
  xl: "max-w-2xl",
671
732
  full: "max-w-[calc(100vw-2rem)]"
672
733
  };
673
- function he({ open: e, onClose: t, size: r = "md", children: n }) {
674
- return w(() => {
734
+ function Ke({ open: e, onClose: t, size: r = "md", children: a }) {
735
+ return I(() => {
675
736
  if (!e) return;
676
- const o = (l) => {
677
- l.key === "Escape" && t();
737
+ const o = (s) => {
738
+ s.key === "Escape" && t();
678
739
  };
679
740
  return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
680
- }, [e, t]), e ? /* @__PURE__ */ s(
741
+ }, [e, t]), e ? /* @__PURE__ */ l(
681
742
  "div",
682
743
  {
683
744
  className: "fixed inset-0 z-50 flex items-center justify-center p-4",
684
745
  "aria-modal": "true",
685
746
  role: "dialog",
686
747
  children: [
687
- /* @__PURE__ */ a(
748
+ /* @__PURE__ */ n(
688
749
  "div",
689
750
  {
690
751
  className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
@@ -692,46 +753,46 @@ function he({ open: e, onClose: t, size: r = "md", children: n }) {
692
753
  "aria-hidden": "true"
693
754
  }
694
755
  ),
695
- /* @__PURE__ */ a(
756
+ /* @__PURE__ */ n(
696
757
  "div",
697
758
  {
698
759
  className: [
699
760
  "relative w-full bg-white rounded-2xl shadow-theme-lg z-10 flex flex-col max-h-[90vh]",
700
- Y[r]
761
+ ke[r]
701
762
  ].filter(Boolean).join(" "),
702
- children: n
763
+ children: a
703
764
  }
704
765
  )
705
766
  ]
706
767
  }
707
768
  ) : null;
708
769
  }
709
- function be({ title: e, subtitle: t, onClose: r, className: n = "", ...o }) {
710
- return /* @__PURE__ */ s(
770
+ function Je({ title: e, subtitle: t, onClose: r, className: a = "", ...o }) {
771
+ return /* @__PURE__ */ l(
711
772
  "div",
712
773
  {
713
- className: ["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high", n].filter(Boolean).join(" "),
774
+ className: ["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high", a].filter(Boolean).join(" "),
714
775
  ...o,
715
776
  children: [
716
- /* @__PURE__ */ s("div", { children: [
717
- /* @__PURE__ */ a("h2", { className: "text-lg font-semibold text-on-surface", children: e }),
718
- t && /* @__PURE__ */ a("p", { className: "text-sm text-on-surface-variant mt-0.5", children: t })
777
+ /* @__PURE__ */ l("div", { children: [
778
+ /* @__PURE__ */ n("h2", { className: "text-lg font-semibold text-on-surface", children: e }),
779
+ t && /* @__PURE__ */ n("p", { className: "text-sm text-on-surface-variant mt-0.5", children: t })
719
780
  ] }),
720
- r && /* @__PURE__ */ a(
781
+ r && /* @__PURE__ */ n(
721
782
  "button",
722
783
  {
723
784
  onClick: r,
724
785
  className: "p-1 text-on-surface-variant hover:text-on-surface hover:bg-surface-container-low rounded-lg transition-all -mt-1 -mr-1",
725
786
  "aria-label": "Fechar modal",
726
- children: /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[20px]", children: "close" })
787
+ children: /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[20px]", children: "close" })
727
788
  }
728
789
  )
729
790
  ]
730
791
  }
731
792
  );
732
793
  }
733
- function ge({ children: e, className: t = "", ...r }) {
734
- return /* @__PURE__ */ a(
794
+ function Qe({ children: e, className: t = "", ...r }) {
795
+ return /* @__PURE__ */ n(
735
796
  "div",
736
797
  {
737
798
  className: ["p-6 overflow-y-auto flex-1", t].filter(Boolean).join(" "),
@@ -740,8 +801,8 @@ function ge({ children: e, className: t = "", ...r }) {
740
801
  }
741
802
  );
742
803
  }
743
- function we({ children: e, className: t = "", ...r }) {
744
- return /* @__PURE__ */ a(
804
+ function Xe({ children: e, className: t = "", ...r }) {
805
+ return /* @__PURE__ */ n(
745
806
  "div",
746
807
  {
747
808
  className: [
@@ -753,73 +814,73 @@ function we({ children: e, className: t = "", ...r }) {
753
814
  }
754
815
  );
755
816
  }
756
- function Z(e, t) {
757
- return t <= 7 ? Array.from({ length: t }, (r, n) => n + 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];
817
+ function Be(e, t) {
818
+ 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];
758
819
  }
759
- function ve({
820
+ function Ye({
760
821
  currentPage: e,
761
822
  totalPages: t,
762
823
  totalItems: r,
763
- itemsPerPage: n = 10,
824
+ itemsPerPage: a = 10,
764
825
  onPageChange: o,
765
- variant: l = "full",
826
+ variant: s = "full",
766
827
  className: c = "",
767
- ...d
828
+ ...i
768
829
  }) {
769
- const i = Z(e, t), u = (e - 1) * n + 1, f = Math.min(e * n, r ?? e * n), m = "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", p = `${m} w-9 h-9`, C = "bg-zeo-orange text-white", b = "text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface", N = `${m} 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`;
770
- return /* @__PURE__ */ s(
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`;
831
+ return /* @__PURE__ */ l(
771
832
  "div",
772
833
  {
773
834
  className: ["flex items-center justify-between gap-4 flex-wrap", c].filter(Boolean).join(" "),
774
- ...d,
835
+ ...i,
775
836
  children: [
776
- l === "full" && r !== void 0 && /* @__PURE__ */ s("p", { className: "text-sm text-on-surface-variant", children: [
837
+ s === "full" && r !== void 0 && /* @__PURE__ */ l("p", { className: "text-sm text-on-surface-variant", children: [
777
838
  "Mostrando ",
778
- /* @__PURE__ */ s("strong", { children: [
839
+ /* @__PURE__ */ l("strong", { children: [
779
840
  u,
780
841
  "–",
781
842
  f
782
843
  ] }),
783
844
  " de ",
784
- /* @__PURE__ */ a("strong", { children: r }),
845
+ /* @__PURE__ */ n("strong", { children: r }),
785
846
  " itens"
786
847
  ] }),
787
- /* @__PURE__ */ s("div", { className: "flex items-center gap-1 ml-auto", children: [
788
- /* @__PURE__ */ s(
848
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-1 ml-auto", children: [
849
+ /* @__PURE__ */ l(
789
850
  "button",
790
851
  {
791
852
  onClick: () => o(e - 1),
792
853
  disabled: e === 1,
793
854
  "aria-label": "Página anterior",
794
- className: l === "icon" ? p + " " + b : N,
855
+ className: s === "icon" ? d + " " + h : w,
795
856
  children: [
796
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_back" }),
797
- l === "text" && "Anterior"
857
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_back" }),
858
+ s === "text" && "Anterior"
798
859
  ]
799
860
  }
800
861
  ),
801
- i.map(
802
- (h, B) => h === "..." ? /* @__PURE__ */ a("span", { className: "w-9 text-center text-sm text-on-surface-variant select-none", children: "…" }, `ellipsis-${B}`) : /* @__PURE__ */ a(
862
+ m.map(
863
+ (b, v) => b === "..." ? /* @__PURE__ */ n("span", { className: "w-9 text-center text-sm text-on-surface-variant select-none", children: "…" }, `ellipsis-${v}`) : /* @__PURE__ */ n(
803
864
  "button",
804
865
  {
805
- onClick: () => o(h),
806
- "aria-current": e === h ? "page" : void 0,
807
- className: [p, e === h ? C : b].join(" "),
808
- children: h
866
+ onClick: () => o(b),
867
+ "aria-current": e === b ? "page" : void 0,
868
+ className: [d, e === b ? x : h].join(" "),
869
+ children: b
809
870
  },
810
- h
871
+ b
811
872
  )
812
873
  ),
813
- /* @__PURE__ */ s(
874
+ /* @__PURE__ */ l(
814
875
  "button",
815
876
  {
816
877
  onClick: () => o(e + 1),
817
878
  disabled: e === t,
818
879
  "aria-label": "Próxima página",
819
- className: l === "icon" ? p + " " + b : N,
880
+ className: s === "icon" ? d + " " + h : w,
820
881
  children: [
821
- l === "text" && "Próxima",
822
- /* @__PURE__ */ a("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_forward" })
882
+ s === "text" && "Próxima",
883
+ /* @__PURE__ */ n("span", { className: "material-symbols-outlined text-[18px]", children: "arrow_forward" })
823
884
  ]
824
885
  }
825
886
  )
@@ -828,102 +889,102 @@ function ve({
828
889
  }
829
890
  );
830
891
  }
831
- const P = {
892
+ const Ce = {
832
893
  xs: "h-1",
833
894
  sm: "h-1.5",
834
895
  md: "h-2",
835
896
  lg: "h-3"
836
- }, ee = {
897
+ }, ze = {
837
898
  primary: "bg-zeo-orange",
838
899
  success: "bg-green-500",
839
900
  warning: "bg-amber-400",
840
901
  danger: "bg-red-500"
841
902
  };
842
- function Ne({
903
+ function Ze({
843
904
  value: e,
844
905
  max: t = 100,
845
906
  size: r = "md",
846
- variant: n = "primary",
907
+ variant: a = "primary",
847
908
  label: o = "none",
848
- showPercent: l = !0,
909
+ showPercent: s = !0,
849
910
  title: c,
850
- className: d = "",
851
- ...i
911
+ className: i = "",
912
+ ...m
852
913
  }) {
853
914
  const u = Math.min(100, Math.max(0, e / t * 100)), f = `${Math.round(u)}%`;
854
- return /* @__PURE__ */ s("div", { className: ["flex flex-col gap-1.5", d].filter(Boolean).join(" "), ...i, children: [
855
- (c || o === "outside" && l) && /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2", children: [
856
- c && /* @__PURE__ */ a("span", { className: "text-sm font-medium text-on-surface", children: c }),
857
- o === "outside" && l && /* @__PURE__ */ a("span", { className: "text-sm font-semibold text-on-surface", children: f })
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 }),
918
+ o === "outside" && s && /* @__PURE__ */ n("span", { className: "text-sm font-semibold text-on-surface", children: f })
858
919
  ] }),
859
- /* @__PURE__ */ a(
920
+ /* @__PURE__ */ n(
860
921
  "div",
861
922
  {
862
923
  role: "progressbar",
863
924
  "aria-valuenow": e,
864
925
  "aria-valuemin": 0,
865
926
  "aria-valuemax": t,
866
- className: ["relative w-full bg-surface-container-high rounded-full overflow-hidden", P[r]].join(" "),
867
- children: /* @__PURE__ */ a(
927
+ className: ["relative w-full bg-surface-container-high rounded-full overflow-hidden", Ce[r]].join(" "),
928
+ children: /* @__PURE__ */ n(
868
929
  "div",
869
930
  {
870
931
  className: [
871
932
  "h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",
872
- ee[n]
933
+ ze[a]
873
934
  ].join(" "),
874
935
  style: { width: `${u}%` },
875
- children: o === "inside" && l && u >= 20 && /* @__PURE__ */ a("span", { className: "text-[10px] font-bold text-white leading-none", children: f })
936
+ children: o === "inside" && s && u >= 20 && /* @__PURE__ */ n("span", { className: "text-[10px] font-bold text-white leading-none", children: f })
876
937
  }
877
938
  )
878
939
  }
879
940
  )
880
941
  ] });
881
942
  }
882
- const te = {
943
+ const $e = {
883
944
  xs: "w-3 h-3 border",
884
945
  sm: "w-4 h-4 border-2",
885
946
  md: "w-6 h-6 border-2",
886
947
  lg: "w-8 h-8 border-[3px]",
887
948
  xl: "w-12 h-12 border-4"
888
- }, re = {
949
+ }, _e = {
889
950
  primary: "border-orange-200 border-t-zeo-orange",
890
951
  secondary: "border-surface-container-high border-t-on-surface-variant",
891
952
  white: "border-white/30 border-t-white"
892
953
  };
893
- function ye({
954
+ function Pe({
894
955
  size: e = "md",
895
956
  variant: t = "primary",
896
957
  label: r = "Carregando...",
897
- className: n = "",
958
+ className: a = "",
898
959
  ...o
899
960
  }) {
900
- return /* @__PURE__ */ a(
961
+ return /* @__PURE__ */ n(
901
962
  "span",
902
963
  {
903
964
  role: "status",
904
965
  "aria-label": r,
905
966
  className: [
906
967
  "inline-block rounded-full animate-spin",
907
- te[e],
908
- re[t],
909
- n
968
+ $e[e],
969
+ _e[t],
970
+ a
910
971
  ].filter(Boolean).join(" "),
911
972
  ...o
912
973
  }
913
974
  );
914
975
  }
915
- function je({ children: e, className: t = "", ...r }) {
916
- return /* @__PURE__ */ a(
976
+ function et({ children: e, className: t = "", ...r }) {
977
+ return /* @__PURE__ */ n(
917
978
  "div",
918
979
  {
919
980
  className: ["overflow-x-auto rounded-xl border border-surface-container-high shadow-sm", t].filter(Boolean).join(" "),
920
981
  ...r,
921
- children: /* @__PURE__ */ a("table", { className: "w-full text-sm", children: e })
982
+ children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: e })
922
983
  }
923
984
  );
924
985
  }
925
- function Ce({ children: e, className: t = "", ...r }) {
926
- return /* @__PURE__ */ a(
986
+ function tt({ children: e, className: t = "", ...r }) {
987
+ return /* @__PURE__ */ n(
927
988
  "thead",
928
989
  {
929
990
  className: ["bg-surface-container-low border-b border-surface-container-high", t].filter(Boolean).join(" "),
@@ -932,8 +993,8 @@ function Ce({ children: e, className: t = "", ...r }) {
932
993
  }
933
994
  );
934
995
  }
935
- function Be({ children: e, className: t = "", ...r }) {
936
- return /* @__PURE__ */ a(
996
+ function rt({ children: e, className: t = "", ...r }) {
997
+ return /* @__PURE__ */ n(
937
998
  "tbody",
938
999
  {
939
1000
  className: ["bg-white divide-y divide-surface-container-high", t].filter(Boolean).join(" "),
@@ -942,8 +1003,8 @@ function Be({ children: e, className: t = "", ...r }) {
942
1003
  }
943
1004
  );
944
1005
  }
945
- function ke({ selected: e = !1, children: t, className: r = "", ...n }) {
946
- return /* @__PURE__ */ a(
1006
+ function nt({ selected: e = !1, children: t, className: r = "", ...a }) {
1007
+ return /* @__PURE__ */ n(
947
1008
  "tr",
948
1009
  {
949
1010
  className: [
@@ -951,20 +1012,20 @@ function ke({ selected: e = !1, children: t, className: r = "", ...n }) {
951
1012
  e ? "bg-orange-50/40" : "",
952
1013
  r
953
1014
  ].filter(Boolean).join(" "),
954
- ...n,
1015
+ ...a,
955
1016
  children: t
956
1017
  }
957
1018
  );
958
1019
  }
959
- function ze({
1020
+ function at({
960
1021
  sortable: e = !1,
961
1022
  sorted: t = !1,
962
1023
  onSort: r,
963
- children: n,
1024
+ children: a,
964
1025
  className: o = "",
965
- ...l
1026
+ ...s
966
1027
  }) {
967
- return /* @__PURE__ */ a(
1028
+ return /* @__PURE__ */ n(
968
1029
  "th",
969
1030
  {
970
1031
  className: [
@@ -973,10 +1034,10 @@ function ze({
973
1034
  o
974
1035
  ].filter(Boolean).join(" "),
975
1036
  onClick: e ? r : void 0,
976
- ...l,
977
- children: /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
978
- n,
979
- e && /* @__PURE__ */ a(
1037
+ ...s,
1038
+ children: /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1", children: [
1039
+ a,
1040
+ e && /* @__PURE__ */ n(
980
1041
  "span",
981
1042
  {
982
1043
  className: `material-symbols-outlined text-[14px] ${t ? "text-zeo-orange" : "opacity-40"}`,
@@ -987,87 +1048,95 @@ function ze({
987
1048
  }
988
1049
  );
989
1050
  }
990
- function $e({ muted: e = !1, mono: t = !1, children: r, className: n = "", ...o }) {
991
- return /* @__PURE__ */ a(
1051
+ function ot({ muted: e = !1, mono: t = !1, children: r, className: a = "", ...o }) {
1052
+ return /* @__PURE__ */ n(
992
1053
  "td",
993
1054
  {
994
1055
  className: [
995
1056
  "px-4 py-3",
996
1057
  e ? "text-on-surface-variant" : "text-on-surface",
997
1058
  t ? "font-mono text-xs" : "",
998
- n
1059
+ a
999
1060
  ].filter(Boolean).join(" "),
1000
1061
  ...o,
1001
1062
  children: r
1002
1063
  }
1003
1064
  );
1004
1065
  }
1005
- const j = $(null);
1006
- function v() {
1007
- const e = _(j);
1066
+ const q = V(null);
1067
+ function R() {
1068
+ const e = W(q);
1008
1069
  if (!e) throw new Error("Tab must be used inside Tabs");
1009
1070
  return e;
1010
1071
  }
1011
- function _e({ value: e, onChange: t, variant: r = "default", children: n }) {
1012
- return /* @__PURE__ */ a(j.Provider, { value: { active: e, onChange: t, variant: r }, children: /* @__PURE__ */ a("div", { className: r === "vertical" ? "flex gap-6" : "flex flex-col gap-4", children: n }) });
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 }) });
1013
1075
  }
1014
- function Te({ children: e, className: t = "", ...r }) {
1015
- const { variant: n } = v(), o = {
1016
- default: "flex gap-1 bg-surface-container-low rounded-lg p-1 w-fit",
1076
+ function lt({ children: e, className: t = "", stretch: r = !1, ...a }) {
1077
+ const { variant: o } = R(), s = {
1078
+ 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",
1017
1079
  underline: "flex gap-0 border-b border-surface-container-high w-full",
1018
1080
  vertical: "flex flex-col gap-1 bg-surface-container-low rounded-lg p-1 w-48 shrink-0 h-fit"
1019
- }[n];
1020
- return /* @__PURE__ */ a(
1081
+ }[o];
1082
+ return /* @__PURE__ */ n(O.Provider, { value: { stretch: r }, children: /* @__PURE__ */ n(
1021
1083
  "div",
1022
1084
  {
1023
1085
  role: "tablist",
1024
- className: [o, t].filter(Boolean).join(" "),
1025
- ...r,
1086
+ className: [s, t].filter(Boolean).join(" "),
1087
+ ...a,
1026
1088
  children: e
1027
1089
  }
1028
- );
1090
+ ) });
1029
1091
  }
1030
- function Fe({ value: e, label: t, icon: r, badge: n, disabled: o = !1 }) {
1031
- const { active: l, onChange: c, variant: d } = v(), i = l === e, u = "inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none", f = "opacity-40 cursor-not-allowed pointer-events-none", m = {
1032
- default: i ? "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",
1033
- underline: i ? "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",
1034
- vertical: i ? "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"
1035
- }[d];
1036
- return /* @__PURE__ */ s(
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 = {
1094
+ 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
+ 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
+ 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];
1098
+ return /* @__PURE__ */ l(
1037
1099
  "button",
1038
1100
  {
1039
1101
  role: "tab",
1040
- "aria-selected": i,
1102
+ "aria-selected": u,
1041
1103
  "aria-disabled": o,
1042
1104
  disabled: o,
1043
1105
  onClick: () => !o && c(e),
1044
- className: [u, m, o ? f : ""].filter(Boolean).join(" "),
1106
+ className: [f, x, d, o ? p : ""].filter(Boolean).join(" "),
1045
1107
  children: [
1046
- r && /* @__PURE__ */ a(
1108
+ r && /* @__PURE__ */ n(
1047
1109
  "span",
1048
1110
  {
1049
1111
  className: "material-symbols-outlined text-[18px]",
1050
- style: i ? { fontVariationSettings: "'FILL' 1" } : void 0,
1112
+ style: u ? { fontVariationSettings: "'FILL' 1" } : void 0,
1051
1113
  children: r
1052
1114
  }
1053
1115
  ),
1054
1116
  t,
1055
- n !== void 0 && /* @__PURE__ */ a(
1117
+ a !== void 0 && /* @__PURE__ */ n(
1056
1118
  "span",
1057
1119
  {
1058
- className: `text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${i ? "bg-zeo-orange text-white" : "bg-surface-container-high text-on-surface-variant"}`,
1059
- children: n
1120
+ className: `text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${u ? "bg-zeo-orange text-white" : "bg-surface-container-high text-on-surface-variant"}`,
1121
+ children: a
1060
1122
  }
1061
1123
  )
1062
1124
  ]
1063
1125
  }
1064
1126
  );
1065
1127
  }
1066
- function Ie({ value: e, children: t, className: r = "" }) {
1067
- const { active: n } = v();
1068
- return n !== e ? null : /* @__PURE__ */ a("div", { role: "tabpanel", className: r, children: t });
1128
+ function ct({ value: e, children: t, className: r = "", stretch: a = !1 }) {
1129
+ const { active: o } = R();
1130
+ return o !== e ? null : /* @__PURE__ */ n(
1131
+ "div",
1132
+ {
1133
+ role: "tabpanel",
1134
+ className: [a ? "flex-1" : "", r].filter(Boolean).join(" "),
1135
+ children: t
1136
+ }
1137
+ );
1069
1138
  }
1070
- const ae = {
1139
+ const Ie = {
1071
1140
  top: {
1072
1141
  wrapper: "bottom-full left-1/2 -translate-x-1/2 mb-2",
1073
1142
  arrow: "top-full left-1/2 -translate-x-1/2 border-t-4 border-x-4 border-x-transparent border-b-0"
@@ -1084,22 +1153,22 @@ const ae = {
1084
1153
  wrapper: "left-full top-1/2 -translate-y-1/2 ml-2",
1085
1154
  arrow: "right-full top-1/2 -translate-y-1/2 border-r-4 border-y-4 border-y-transparent border-l-0"
1086
1155
  }
1087
- }, ne = {
1156
+ }, Le = {
1088
1157
  dark: { tooltip: "bg-slate-800 text-white", arrow: "border-t-slate-800 border-r-slate-800 border-b-slate-800 border-l-slate-800" },
1089
1158
  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" }
1090
1159
  };
1091
- function Le({
1160
+ function dt({
1092
1161
  content: e,
1093
1162
  position: t = "top",
1094
1163
  variant: r = "dark",
1095
- children: n,
1164
+ children: a,
1096
1165
  className: o = "",
1097
- ...l
1166
+ ...s
1098
1167
  }) {
1099
- const c = ae[t], d = ne[r];
1100
- return /* @__PURE__ */ s("div", { className: ["relative inline-flex group", o].filter(Boolean).join(" "), ...l, children: [
1101
- n,
1102
- /* @__PURE__ */ s(
1168
+ const c = Ie[t], i = Le[r];
1169
+ return /* @__PURE__ */ l("div", { className: ["relative inline-flex group", o].filter(Boolean).join(" "), ...s, children: [
1170
+ a,
1171
+ /* @__PURE__ */ l(
1103
1172
  "div",
1104
1173
  {
1105
1174
  role: "tooltip",
@@ -1108,49 +1177,138 @@ function Le({
1108
1177
  "opacity-0 group-hover:opacity-100 transition-opacity duration-150",
1109
1178
  "whitespace-nowrap text-xs font-medium px-2.5 py-1.5 rounded-lg",
1110
1179
  c.wrapper,
1111
- d.tooltip
1180
+ i.tooltip
1112
1181
  ].join(" "),
1113
1182
  children: [
1114
1183
  e,
1115
- /* @__PURE__ */ a("span", { className: ["absolute w-0 h-0", c.arrow, d.arrow].join(" ") })
1184
+ /* @__PURE__ */ n("span", { className: ["absolute w-0 h-0", c.arrow, i.arrow].join(" ") })
1116
1185
  ]
1117
1186
  }
1118
1187
  )
1119
1188
  ] });
1120
1189
  }
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";
1121
1278
  export {
1122
- le as Alert,
1123
- ie as Avatar,
1124
- ce as Badge,
1125
- de as Breadcrumb,
1126
- q as Button,
1127
- ue as ButtonGroup,
1128
- fe as Card,
1129
- xe as CardFooter,
1130
- me as CardHeader,
1131
- V as Checkbox,
1132
- pe as Dropdown,
1133
- X as Input,
1134
- he as Modal,
1135
- ge as ModalBody,
1136
- we as ModalFooter,
1137
- be as ModalHeader,
1138
- ve as Pagination,
1139
- Ne as ProgressBar,
1140
- J as Radio,
1141
- O as Select,
1142
- ye as Spinner,
1143
- Q as Switch,
1144
- Fe as Tab,
1145
- Te as TabList,
1146
- Ie as TabPanel,
1147
- je as Table,
1148
- Be as TableBody,
1149
- $e as TableCell,
1150
- Ce as TableHead,
1151
- ze as TableHeaderCell,
1152
- ke as TableRow,
1153
- _e as Tabs,
1154
- U as Textarea,
1155
- Le as Tooltip
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
1156
1314
  };