@agilys-system/design-system 1.0.7 → 1.0.9

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.
@@ -1,45 +1,45 @@
1
- import { jsxs as C, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as E, createElement as Ne, useId as fe, useRef as ze, useState as Ce, useEffect as ae } from "react";
1
+ import { jsxs as _, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as E, createElement as Ne, useId as be, useRef as ze, useState as Ce, useEffect as ae } from "react";
3
3
  import { createPortal as _e } from "react-dom";
4
- function be(e) {
4
+ function fe(e) {
5
5
  var t, r, n = "";
6
6
  if (typeof e == "string" || typeof e == "number") n += e;
7
7
  else if (typeof e == "object") if (Array.isArray(e)) {
8
8
  var s = e.length;
9
- for (t = 0; t < s; t++) e[t] && (r = be(e[t])) && (n && (n += " "), n += r);
9
+ for (t = 0; t < s; t++) e[t] && (r = fe(e[t])) && (n && (n += " "), n += r);
10
10
  } else for (r in e) e[r] && (n && (n += " "), n += r);
11
11
  return n;
12
12
  }
13
- function ge() {
14
- for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = be(e)) && (n && (n += " "), n += t);
13
+ function me() {
14
+ for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = fe(e)) && (n && (n += " "), n += t);
15
15
  return n;
16
16
  }
17
- const ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, le = ge, H = (e, t) => (r) => {
17
+ const ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, le = me, H = (e, t) => (r) => {
18
18
  var n;
19
19
  if ((t == null ? void 0 : t.variants) == null) return le(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
20
20
  const { variants: s, defaultVariants: o } = t, i = Object.keys(s).map((c) => {
21
- const p = r == null ? void 0 : r[c], m = o == null ? void 0 : o[c];
21
+ const p = r == null ? void 0 : r[c], g = o == null ? void 0 : o[c];
22
22
  if (p === null) return null;
23
- const b = ie(p) || ie(m);
24
- return s[c][b];
23
+ const f = ie(p) || ie(g);
24
+ return s[c][f];
25
25
  }), a = r && Object.entries(r).reduce((c, p) => {
26
- let [m, b] = p;
27
- return b === void 0 || (c[m] = b), c;
26
+ let [g, f] = p;
27
+ return f === void 0 || (c[g] = f), c;
28
28
  }, {}), u = t == null || (n = t.compoundVariants) === null || n === void 0 ? void 0 : n.reduce((c, p) => {
29
- let { class: m, className: b, ...z } = p;
29
+ let { class: g, className: f, ...z } = p;
30
30
  return Object.entries(z).every((k) => {
31
- let [g, f] = k;
32
- return Array.isArray(f) ? f.includes({
31
+ let [m, b] = k;
32
+ return Array.isArray(b) ? b.includes({
33
33
  ...o,
34
34
  ...a
35
- }[g]) : {
35
+ }[m]) : {
36
36
  ...o,
37
37
  ...a
38
- }[g] === f;
38
+ }[m] === b;
39
39
  }) ? [
40
40
  ...c,
41
- m,
42
- b
41
+ g,
42
+ f
43
43
  ] : c;
44
44
  }, []);
45
45
  return le(e, i, u, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
@@ -51,18 +51,18 @@ const ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, le = ge, H
51
51
  return {
52
52
  getClassGroupId: (i) => {
53
53
  const a = i.split(te);
54
- return a[0] === "" && a.length !== 1 && a.shift(), me(a, t) || Me(i);
54
+ return a[0] === "" && a.length !== 1 && a.shift(), ge(a, t) || Me(i);
55
55
  },
56
56
  getConflictingClassGroupIds: (i, a) => {
57
57
  const u = r[i] || [];
58
58
  return a && n[i] ? [...u, ...n[i]] : u;
59
59
  }
60
60
  };
61
- }, me = (e, t) => {
61
+ }, ge = (e, t) => {
62
62
  var i;
63
63
  if (e.length === 0)
64
64
  return t.classGroupId;
65
- const r = e[0], n = t.nextPart.get(r), s = n ? me(e.slice(1), n) : void 0;
65
+ const r = e[0], n = t.nextPart.get(r), s = n ? ge(e.slice(1), n) : void 0;
66
66
  if (s)
67
67
  return s;
68
68
  if (t.validators.length === 0)
@@ -151,27 +151,27 @@ const ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, le = ge, H
151
151
  experimentalParseClassName: r
152
152
  } = e, n = t.length === 1, s = t[0], o = t.length, i = (a) => {
153
153
  const u = [];
154
- let c = 0, p = 0, m;
155
- for (let f = 0; f < a.length; f++) {
156
- let v = a[f];
154
+ let c = 0, p = 0, g;
155
+ for (let b = 0; b < a.length; b++) {
156
+ let v = a[b];
157
157
  if (c === 0) {
158
- if (v === s && (n || a.slice(f, f + o) === t)) {
159
- u.push(a.slice(p, f)), p = f + o;
158
+ if (v === s && (n || a.slice(b, b + o) === t)) {
159
+ u.push(a.slice(p, b)), p = b + o;
160
160
  continue;
161
161
  }
162
162
  if (v === "/") {
163
- m = f;
163
+ g = b;
164
164
  continue;
165
165
  }
166
166
  }
167
167
  v === "[" ? c++ : v === "]" && c--;
168
168
  }
169
- const b = u.length === 0 ? a : a.substring(p), z = b.startsWith(he), k = z ? b.substring(1) : b, g = m && m > p ? m - p : void 0;
169
+ const f = u.length === 0 ? a : a.substring(p), z = f.startsWith(he), k = z ? f.substring(1) : f, m = g && g > p ? g - p : void 0;
170
170
  return {
171
171
  modifiers: u,
172
172
  hasImportantModifier: z,
173
173
  baseClassName: k,
174
- maybePostfixModifierPosition: g
174
+ maybePostfixModifierPosition: m
175
175
  };
176
176
  };
177
177
  return r ? (a) => r({
@@ -200,27 +200,27 @@ const ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, le = ge, H
200
200
  for (let u = i.length - 1; u >= 0; u -= 1) {
201
201
  const c = i[u], {
202
202
  modifiers: p,
203
- hasImportantModifier: m,
204
- baseClassName: b,
203
+ hasImportantModifier: g,
204
+ baseClassName: f,
205
205
  maybePostfixModifierPosition: z
206
206
  } = r(c);
207
- let k = !!z, g = n(k ? b.substring(0, z) : b);
208
- if (!g) {
207
+ let k = !!z, m = n(k ? f.substring(0, z) : f);
208
+ if (!m) {
209
209
  if (!k) {
210
210
  a = c + (a.length > 0 ? " " + a : a);
211
211
  continue;
212
212
  }
213
- if (g = n(b), !g) {
213
+ if (m = n(f), !m) {
214
214
  a = c + (a.length > 0 ? " " + a : a);
215
215
  continue;
216
216
  }
217
217
  k = !1;
218
218
  }
219
- const f = Ve(p).join(":"), v = m ? f + he : f, N = v + g;
219
+ const b = Ve(p).join(":"), v = g ? b + he : b, N = v + m;
220
220
  if (o.includes(N))
221
221
  continue;
222
222
  o.push(N);
223
- const M = s(g, k);
223
+ const M = s(m, k);
224
224
  for (let j = 0; j < M.length; ++j) {
225
225
  const L = M[j];
226
226
  o.push(v + L);
@@ -246,7 +246,7 @@ const xe = (e) => {
246
246
  function Be(e, ...t) {
247
247
  let r, n, s, o = i;
248
248
  function i(u) {
249
- const c = t.reduce((p, m) => m(p), e());
249
+ const c = t.reduce((p, g) => g(p), e());
250
250
  return r = Ge(c), n = r.cache.get, s = r.cache.set, o = a, a(u);
251
251
  }
252
252
  function a(u) {
@@ -272,7 +272,7 @@ const h = (e) => {
272
272
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
273
273
  Ue.test(e) && !Fe.test(e)
274
274
  ), ve = () => !1, tt = (e) => He.test(e), rt = (e) => qe.test(e), nt = () => {
275
- const e = h("colors"), t = h("spacing"), r = h("blur"), n = h("brightness"), s = h("borderColor"), o = h("borderRadius"), i = h("borderSpacing"), a = h("borderWidth"), u = h("contrast"), c = h("grayscale"), p = h("hueRotate"), m = h("invert"), b = h("gap"), z = h("gradientColorStops"), k = h("gradientColorStopPositions"), g = h("inset"), f = h("margin"), v = h("opacity"), N = h("padding"), M = h("saturate"), j = h("scale"), L = h("sepia"), q = h("skew"), w = h("space"), _ = h("translate"), T = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], P = () => ["auto", d, t], y = () => [d, t], re = () => ["", R, V], J = () => ["auto", W, d], ne = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", d], se = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], I = () => [W, d];
275
+ const e = h("colors"), t = h("spacing"), r = h("blur"), n = h("brightness"), s = h("borderColor"), o = h("borderRadius"), i = h("borderSpacing"), a = h("borderWidth"), u = h("contrast"), c = h("grayscale"), p = h("hueRotate"), g = h("invert"), f = h("gap"), z = h("gradientColorStops"), k = h("gradientColorStopPositions"), m = h("inset"), b = h("margin"), v = h("opacity"), N = h("padding"), M = h("saturate"), j = h("scale"), L = h("sepia"), q = h("skew"), w = h("space"), S = h("translate"), T = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], P = () => ["auto", d, t], y = () => [d, t], re = () => ["", R, V], J = () => ["auto", W, d], ne = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", d], se = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], I = () => [W, d];
276
276
  return {
277
277
  cacheSize: 500,
278
278
  separator: ":",
@@ -449,63 +449,63 @@ const h = (e) => {
449
449
  * @see https://tailwindcss.com/docs/top-right-bottom-left
450
450
  */
451
451
  inset: [{
452
- inset: [g]
452
+ inset: [m]
453
453
  }],
454
454
  /**
455
455
  * Right / Left
456
456
  * @see https://tailwindcss.com/docs/top-right-bottom-left
457
457
  */
458
458
  "inset-x": [{
459
- "inset-x": [g]
459
+ "inset-x": [m]
460
460
  }],
461
461
  /**
462
462
  * Top / Bottom
463
463
  * @see https://tailwindcss.com/docs/top-right-bottom-left
464
464
  */
465
465
  "inset-y": [{
466
- "inset-y": [g]
466
+ "inset-y": [m]
467
467
  }],
468
468
  /**
469
469
  * Start
470
470
  * @see https://tailwindcss.com/docs/top-right-bottom-left
471
471
  */
472
472
  start: [{
473
- start: [g]
473
+ start: [m]
474
474
  }],
475
475
  /**
476
476
  * End
477
477
  * @see https://tailwindcss.com/docs/top-right-bottom-left
478
478
  */
479
479
  end: [{
480
- end: [g]
480
+ end: [m]
481
481
  }],
482
482
  /**
483
483
  * Top
484
484
  * @see https://tailwindcss.com/docs/top-right-bottom-left
485
485
  */
486
486
  top: [{
487
- top: [g]
487
+ top: [m]
488
488
  }],
489
489
  /**
490
490
  * Right
491
491
  * @see https://tailwindcss.com/docs/top-right-bottom-left
492
492
  */
493
493
  right: [{
494
- right: [g]
494
+ right: [m]
495
495
  }],
496
496
  /**
497
497
  * Bottom
498
498
  * @see https://tailwindcss.com/docs/top-right-bottom-left
499
499
  */
500
500
  bottom: [{
501
- bottom: [g]
501
+ bottom: [m]
502
502
  }],
503
503
  /**
504
504
  * Left
505
505
  * @see https://tailwindcss.com/docs/top-right-bottom-left
506
506
  */
507
507
  left: [{
508
- left: [g]
508
+ left: [m]
509
509
  }],
510
510
  /**
511
511
  * Visibility
@@ -655,21 +655,21 @@ const h = (e) => {
655
655
  * @see https://tailwindcss.com/docs/gap
656
656
  */
657
657
  gap: [{
658
- gap: [b]
658
+ gap: [f]
659
659
  }],
660
660
  /**
661
661
  * Gap X
662
662
  * @see https://tailwindcss.com/docs/gap
663
663
  */
664
664
  "gap-x": [{
665
- "gap-x": [b]
665
+ "gap-x": [f]
666
666
  }],
667
667
  /**
668
668
  * Gap Y
669
669
  * @see https://tailwindcss.com/docs/gap
670
670
  */
671
671
  "gap-y": [{
672
- "gap-y": [b]
672
+ "gap-y": [f]
673
673
  }],
674
674
  /**
675
675
  * Justify Content
@@ -803,63 +803,63 @@ const h = (e) => {
803
803
  * @see https://tailwindcss.com/docs/margin
804
804
  */
805
805
  m: [{
806
- m: [f]
806
+ m: [b]
807
807
  }],
808
808
  /**
809
809
  * Margin X
810
810
  * @see https://tailwindcss.com/docs/margin
811
811
  */
812
812
  mx: [{
813
- mx: [f]
813
+ mx: [b]
814
814
  }],
815
815
  /**
816
816
  * Margin Y
817
817
  * @see https://tailwindcss.com/docs/margin
818
818
  */
819
819
  my: [{
820
- my: [f]
820
+ my: [b]
821
821
  }],
822
822
  /**
823
823
  * Margin Start
824
824
  * @see https://tailwindcss.com/docs/margin
825
825
  */
826
826
  ms: [{
827
- ms: [f]
827
+ ms: [b]
828
828
  }],
829
829
  /**
830
830
  * Margin End
831
831
  * @see https://tailwindcss.com/docs/margin
832
832
  */
833
833
  me: [{
834
- me: [f]
834
+ me: [b]
835
835
  }],
836
836
  /**
837
837
  * Margin Top
838
838
  * @see https://tailwindcss.com/docs/margin
839
839
  */
840
840
  mt: [{
841
- mt: [f]
841
+ mt: [b]
842
842
  }],
843
843
  /**
844
844
  * Margin Right
845
845
  * @see https://tailwindcss.com/docs/margin
846
846
  */
847
847
  mr: [{
848
- mr: [f]
848
+ mr: [b]
849
849
  }],
850
850
  /**
851
851
  * Margin Bottom
852
852
  * @see https://tailwindcss.com/docs/margin
853
853
  */
854
854
  mb: [{
855
- mb: [f]
855
+ mb: [b]
856
856
  }],
857
857
  /**
858
858
  * Margin Left
859
859
  * @see https://tailwindcss.com/docs/margin
860
860
  */
861
861
  ml: [{
862
- ml: [f]
862
+ ml: [b]
863
863
  }],
864
864
  /**
865
865
  * Space Between X
@@ -1731,7 +1731,7 @@ const h = (e) => {
1731
1731
  * @see https://tailwindcss.com/docs/invert
1732
1732
  */
1733
1733
  invert: [{
1734
- invert: [m]
1734
+ invert: [g]
1735
1735
  }],
1736
1736
  /**
1737
1737
  * Saturate
@@ -1795,7 +1795,7 @@ const h = (e) => {
1795
1795
  * @see https://tailwindcss.com/docs/backdrop-invert
1796
1796
  */
1797
1797
  "backdrop-invert": [{
1798
- "backdrop-invert": [m]
1798
+ "backdrop-invert": [g]
1799
1799
  }],
1800
1800
  /**
1801
1801
  * Backdrop Opacity
@@ -1938,14 +1938,14 @@ const h = (e) => {
1938
1938
  * @see https://tailwindcss.com/docs/translate
1939
1939
  */
1940
1940
  "translate-x": [{
1941
- "translate-x": [_]
1941
+ "translate-x": [S]
1942
1942
  }],
1943
1943
  /**
1944
1944
  * Translate Y
1945
1945
  * @see https://tailwindcss.com/docs/translate
1946
1946
  */
1947
1947
  "translate-y": [{
1948
- "translate-y": [_]
1948
+ "translate-y": [S]
1949
1949
  }],
1950
1950
  /**
1951
1951
  * Skew X
@@ -2302,7 +2302,7 @@ const h = (e) => {
2302
2302
  };
2303
2303
  }, ot = /* @__PURE__ */ Be(nt);
2304
2304
  function x(...e) {
2305
- return ot(ge(e));
2305
+ return ot(me(e));
2306
2306
  }
2307
2307
  const st = H(
2308
2308
  "inline-flex items-center justify-center gap-2 rounded-lg font-sans font-normal transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-agilys-primary disabled:pointer-events-none disabled:opacity-50",
@@ -2341,7 +2341,7 @@ const st = H(
2341
2341
  ...u
2342
2342
  }, c) => {
2343
2343
  const p = r === "icon";
2344
- return /* @__PURE__ */ C(
2344
+ return /* @__PURE__ */ _(
2345
2345
  "button",
2346
2346
  {
2347
2347
  ref: c,
@@ -2350,7 +2350,7 @@ const st = H(
2350
2350
  "aria-busy": s,
2351
2351
  ...u,
2352
2352
  children: [
2353
- s && /* @__PURE__ */ C(
2353
+ s && /* @__PURE__ */ _(
2354
2354
  "svg",
2355
2355
  {
2356
2356
  className: "size-[18px] animate-spin",
@@ -2388,8 +2388,56 @@ const st = H(
2388
2388
  }
2389
2389
  );
2390
2390
  at.displayName = "Button";
2391
- const it = H(
2392
- "inline-flex items-center justify-center h-6 font-sans text-sm font-normal leading-6 whitespace-nowrap",
2391
+ const it = H("font-sans text-gray-900", {
2392
+ variants: {
2393
+ variant: {
2394
+ h1: "text-3xl leading-tight font-bold",
2395
+ h2: "text-2xl leading-tight font-bold",
2396
+ h3: "text-xl leading-snug font-semibold",
2397
+ h4: "text-lg leading-snug font-semibold",
2398
+ h5: "text-base leading-snug font-medium",
2399
+ h6: "text-sm leading-snug font-medium",
2400
+ body: "text-sm leading-relaxed font-normal",
2401
+ bodySm: "text-xs leading-relaxed font-normal",
2402
+ caption: "text-[11px] leading-normal font-normal"
2403
+ },
2404
+ weight: {
2405
+ regular: "font-normal",
2406
+ medium: "font-medium",
2407
+ semibold: "font-semibold",
2408
+ bold: "font-bold"
2409
+ }
2410
+ },
2411
+ defaultVariants: {
2412
+ variant: "body"
2413
+ }
2414
+ }), lt = {
2415
+ h1: "h1",
2416
+ h2: "h2",
2417
+ h3: "h3",
2418
+ h4: "h4",
2419
+ h5: "h5",
2420
+ h6: "h6",
2421
+ body: "p",
2422
+ bodySm: "p",
2423
+ caption: "span"
2424
+ }, C = E(
2425
+ ({ className: e, variant: t = "body", weight: r, as: n, children: s, ...o }, i) => {
2426
+ const a = n ?? lt[t ?? "body"];
2427
+ return Ne(
2428
+ a,
2429
+ {
2430
+ ref: i,
2431
+ className: x(it({ variant: t, weight: r }), e),
2432
+ ...o
2433
+ },
2434
+ s
2435
+ );
2436
+ }
2437
+ );
2438
+ C.displayName = "Text";
2439
+ const ct = H(
2440
+ "inline-flex items-center justify-center h-6 whitespace-nowrap",
2393
2441
  {
2394
2442
  variants: {
2395
2443
  variant: {
@@ -2418,95 +2466,58 @@ const it = H(
2418
2466
  status: "default"
2419
2467
  }
2420
2468
  }
2421
- ), lt = {
2469
+ ), dt = {
2422
2470
  default: "bg-agilys-primary",
2423
2471
  success: "bg-success-60",
2424
2472
  alert: "bg-warning-accent",
2425
2473
  error: "bg-danger-60"
2426
- }, ct = E(
2427
- ({ className: e, variant: t = "filled", status: r = "default", children: n, ...s }, o) => /* @__PURE__ */ C(
2474
+ }, ut = E(
2475
+ ({ className: e, variant: t = "filled", status: r = "default", children: n, ...s }, o) => /* @__PURE__ */ _(
2428
2476
  "span",
2429
2477
  {
2430
2478
  ref: o,
2431
- className: x(it({ variant: t, status: r }), e),
2479
+ className: x(ct({ variant: t, status: r }), e),
2432
2480
  ...s,
2433
2481
  children: [
2434
2482
  t === "dot" && /* @__PURE__ */ l(
2435
2483
  "span",
2436
2484
  {
2437
- className: x("size-2 shrink-0 rounded-full", lt[r ?? "default"]),
2485
+ className: x("size-2 shrink-0 rounded-full", dt[r ?? "default"]),
2438
2486
  "aria-hidden": "true"
2439
2487
  }
2440
2488
  ),
2441
- n
2489
+ /* @__PURE__ */ l(C, { as: "span", variant: "body", className: "text-inherit", children: n })
2442
2490
  ]
2443
2491
  }
2444
2492
  )
2445
2493
  );
2446
- ct.displayName = "Badge";
2447
- const dt = H("font-sans text-gray-900", {
2448
- variants: {
2449
- variant: {
2450
- h1: "text-3xl leading-tight font-bold",
2451
- h2: "text-2xl leading-tight font-bold",
2452
- h3: "text-xl leading-snug font-semibold",
2453
- h4: "text-lg leading-snug font-semibold",
2454
- h5: "text-base leading-snug font-medium",
2455
- h6: "text-sm leading-snug font-medium",
2456
- body: "text-sm leading-relaxed font-normal",
2457
- bodySm: "text-xs leading-relaxed font-normal",
2458
- caption: "text-[11px] leading-normal font-normal"
2459
- },
2460
- weight: {
2461
- regular: "font-normal",
2462
- medium: "font-medium",
2463
- semibold: "font-semibold",
2464
- bold: "font-bold"
2465
- }
2466
- },
2467
- defaultVariants: {
2468
- variant: "body"
2469
- }
2470
- }), ut = {
2471
- h1: "h1",
2472
- h2: "h2",
2473
- h3: "h3",
2474
- h4: "h4",
2475
- h5: "h5",
2476
- h6: "h6",
2477
- body: "p",
2478
- bodySm: "p",
2479
- caption: "span"
2480
- }, S = E(
2481
- ({ className: e, variant: t = "body", weight: r, as: n, children: s, ...o }, i) => {
2482
- const a = n ?? ut[t ?? "body"];
2483
- return Ne(
2484
- a,
2485
- {
2486
- ref: i,
2487
- className: x(dt({ variant: t, weight: r }), e),
2488
- ...o
2489
- },
2490
- s
2491
- );
2492
- }
2493
- );
2494
- S.displayName = "Typography";
2494
+ ut.displayName = "Badge";
2495
2495
  function pt(e, t) {
2496
- return t.split(".").reduce((r, n) => r == null ? void 0 : r[n], e);
2496
+ return t.split(".").reduce(
2497
+ (r, n) => r == null ? void 0 : r[n],
2498
+ e
2499
+ );
2497
2500
  }
2498
- function ft(e, t) {
2501
+ function bt(e, t) {
2499
2502
  if (t.callback) return t.callback(e);
2500
2503
  if (!t.key) return null;
2501
2504
  const r = pt(e, t.key);
2502
- return r == null || r === "" ? null : /* @__PURE__ */ l(S, { as: "span", variant: "body", className: "truncate text-neutral-text-primary", children: r });
2505
+ return r == null || r === "" ? null : /* @__PURE__ */ l(
2506
+ C,
2507
+ {
2508
+ as: "span",
2509
+ variant: "body",
2510
+ className: "truncate text-neutral-text-primary",
2511
+ children: r
2512
+ }
2513
+ );
2503
2514
  }
2504
2515
  const we = {
2505
2516
  left: "text-left justify-start",
2506
2517
  center: "text-center justify-center",
2507
2518
  right: "text-right justify-end"
2508
2519
  }, D = E(
2509
- ({ className: e, ...t }, r) => /* @__PURE__ */ C("span", { className: "relative inline-flex size-5 shrink-0 items-center justify-center", children: [
2520
+ ({ className: e, ...t }, r) => /* @__PURE__ */ _("span", { className: "relative inline-flex size-5 shrink-0 items-center justify-center", children: [
2510
2521
  /* @__PURE__ */ l(
2511
2522
  "input",
2512
2523
  {
@@ -2541,7 +2552,7 @@ const we = {
2541
2552
  ] })
2542
2553
  );
2543
2554
  D.displayName = "TableCheckbox";
2544
- function bt({ className: e }) {
2555
+ function ft({ className: e }) {
2545
2556
  return /* @__PURE__ */ l(
2546
2557
  "svg",
2547
2558
  {
@@ -2567,9 +2578,12 @@ const ee = E(
2567
2578
  "th",
2568
2579
  {
2569
2580
  ref: a,
2570
- className: x("border-b border-neutral-divider-secondary px-5 py-2", e),
2581
+ className: x(
2582
+ "border-b border-neutral-divider-secondary px-5 py-2",
2583
+ e
2584
+ ),
2571
2585
  ...i,
2572
- children: /* @__PURE__ */ C(
2586
+ children: /* @__PURE__ */ _(
2573
2587
  "span",
2574
2588
  {
2575
2589
  className: x(
@@ -2580,7 +2594,7 @@ const ee = E(
2580
2594
  onClick: r ? s : void 0,
2581
2595
  children: [
2582
2596
  /* @__PURE__ */ l(
2583
- S,
2597
+ C,
2584
2598
  {
2585
2599
  as: "span",
2586
2600
  variant: "bodySm",
@@ -2589,7 +2603,7 @@ const ee = E(
2589
2603
  children: o
2590
2604
  }
2591
2605
  ),
2592
- r && /* @__PURE__ */ l(bt, { className: x(n && "text-agilys-primary") })
2606
+ r && /* @__PURE__ */ l(ft, { className: x(n && "text-agilys-primary") })
2593
2607
  ]
2594
2608
  }
2595
2609
  )
@@ -2607,12 +2621,21 @@ function ue({
2607
2621
  "td",
2608
2622
  {
2609
2623
  onClick: n,
2610
- className: x("border-b border-neutral-divider-secondary px-5 py-3", t),
2611
- children: /* @__PURE__ */ l("span", { className: x("flex items-center gap-2", we[e ?? "left"]), children: r })
2624
+ className: x(
2625
+ "border-b border-neutral-divider-secondary px-5 py-3",
2626
+ t
2627
+ ),
2628
+ children: /* @__PURE__ */ l(
2629
+ C,
2630
+ {
2631
+ className: x("flex items-center gap-2", we[e ?? "left"]),
2632
+ children: r
2633
+ }
2634
+ )
2612
2635
  }
2613
2636
  );
2614
2637
  }
2615
- function gt(e, t, r) {
2638
+ function mt(e, t, r) {
2616
2639
  if (typeof r == "function") return r(e);
2617
2640
  const n = e;
2618
2641
  return r ? n[r] ?? t : n.id ?? t;
@@ -2629,18 +2652,18 @@ function Mt({
2629
2652
  onSelectionChange: u,
2630
2653
  sortKey: c,
2631
2654
  sortDirection: p,
2632
- onSortChange: m,
2633
- onRowClick: b,
2655
+ onSortChange: g,
2656
+ onRowClick: f,
2634
2657
  shadow: z = !1,
2635
2658
  border: k = !0,
2636
- className: g,
2637
- ...f
2659
+ className: m,
2660
+ ...b
2638
2661
  }) {
2639
- const v = e.length + (i ? 1 : 0), N = a ?? [], M = t.map((w, _) => gt(w, _, r)), j = M.length > 0 && M.every((w) => N.includes(w)), L = () => {
2662
+ const v = e.length + (i ? 1 : 0), N = a ?? [], M = t.map((w, S) => mt(w, S, r)), j = M.length > 0 && M.every((w) => N.includes(w)), L = () => {
2640
2663
  u && u(j ? [] : M);
2641
2664
  }, q = (w) => {
2642
2665
  u && u(
2643
- N.includes(w) ? N.filter((_) => _ !== w) : [...N, w]
2666
+ N.includes(w) ? N.filter((S) => S !== w) : [...N, w]
2644
2667
  );
2645
2668
  };
2646
2669
  return /* @__PURE__ */ l(
@@ -2651,59 +2674,110 @@ function Mt({
2651
2674
  k && "border border-neutral-divider-secondary",
2652
2675
  z && "shadow-[0px_0px_2px_0px_rgba(66,74,98,0.04),0px_3px_8px_0px_rgba(66,74,98,0.09)]"
2653
2676
  ),
2654
- children: /* @__PURE__ */ C("table", { className: x("w-full border-collapse font-sans", g), ...f, children: [
2655
- /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ C("tr", { children: [
2656
- i && /* @__PURE__ */ l(ee, { align: "center", className: "w-11", children: /* @__PURE__ */ l(D, { checked: j, onChange: L, "aria-label": "Selecionar todas as linhas" }) }),
2657
- e.map((w, _) => /* @__PURE__ */ l(
2658
- ee,
2659
- {
2660
- align: w.align,
2661
- sortable: !!w.key && !!m,
2662
- sorted: w.key && c === w.key ? p : !1,
2663
- onSort: () => w.key && (m == null ? void 0 : m(w.key)),
2664
- children: w.label
2665
- },
2666
- w.key ?? `column-${_}`
2667
- ))
2668
- ] }) }),
2669
- /* @__PURE__ */ l("tbody", { children: n ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { colSpan: v, className: "border-b border-neutral-divider-secondary bg-neutral-surface-lightest px-5 py-6", children: /* @__PURE__ */ l(S, { as: "p", variant: "body", className: "w-full text-center text-neutral-text-secondary", children: s }) }) }) : t.length === 0 ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { colSpan: v, className: "border-b border-neutral-divider-secondary bg-neutral-surface-lightest px-5 py-6", children: /* @__PURE__ */ l(S, { as: "p", variant: "body", className: "w-full text-center text-neutral-text-secondary", children: o }) }) }) : t.map((w, _) => {
2670
- const T = M[_];
2671
- return /* @__PURE__ */ C(
2672
- "tr",
2673
- {
2674
- onClick: b ? () => b(w) : void 0,
2675
- className: x(
2676
- _ % 2 === 0 ? "bg-neutral-surface-lightest" : "bg-white",
2677
- b && "cursor-pointer"
2678
- ),
2679
- children: [
2680
- i && /* @__PURE__ */ l(ue, { align: "center", onClick: (A) => A.stopPropagation(), children: /* @__PURE__ */ l(
2681
- D,
2677
+ children: /* @__PURE__ */ _(
2678
+ "table",
2679
+ {
2680
+ className: x("w-full border-collapse font-sans", m),
2681
+ ...b,
2682
+ children: [
2683
+ /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ _("tr", { children: [
2684
+ i && /* @__PURE__ */ l(ee, { align: "center", className: "w-11", children: /* @__PURE__ */ l(
2685
+ D,
2686
+ {
2687
+ checked: j,
2688
+ onChange: L,
2689
+ "aria-label": "Selecionar todas as linhas"
2690
+ }
2691
+ ) }),
2692
+ e.map((w, S) => /* @__PURE__ */ l(
2693
+ ee,
2694
+ {
2695
+ align: w.align,
2696
+ sortable: !!w.key && !!g,
2697
+ sorted: w.key && c === w.key ? p : !1,
2698
+ onSort: () => w.key && (g == null ? void 0 : g(w.key)),
2699
+ children: w.label
2700
+ },
2701
+ w.key ?? `column-${S}`
2702
+ ))
2703
+ ] }) }),
2704
+ /* @__PURE__ */ l("tbody", { children: n ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l(
2705
+ "td",
2706
+ {
2707
+ colSpan: v,
2708
+ className: "border-b border-neutral-divider-secondary bg-neutral-surface-lightest px-5 py-6",
2709
+ children: /* @__PURE__ */ l(
2710
+ C,
2682
2711
  {
2683
- checked: N.includes(T),
2684
- onChange: () => q(T),
2685
- "aria-label": "Selecionar linha"
2712
+ as: "p",
2713
+ variant: "body",
2714
+ className: "w-full text-center text-neutral-text-secondary",
2715
+ children: s
2686
2716
  }
2687
- ) }),
2688
- e.map((A, P) => /* @__PURE__ */ l(
2689
- ue,
2717
+ )
2718
+ }
2719
+ ) }) : t.length === 0 ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l(
2720
+ "td",
2721
+ {
2722
+ colSpan: v,
2723
+ className: "border-b border-neutral-divider-secondary bg-neutral-surface-lightest px-5 py-6",
2724
+ children: /* @__PURE__ */ l(
2725
+ C,
2690
2726
  {
2691
- align: A.align,
2692
- className: A.className,
2693
- children: ft(w, A)
2694
- },
2695
- A.key ?? `column-${P}`
2696
- ))
2697
- ]
2698
- },
2699
- T
2700
- );
2701
- }) })
2702
- ] })
2727
+ as: "p",
2728
+ variant: "body",
2729
+ className: "w-full text-center text-neutral-text-secondary",
2730
+ children: o
2731
+ }
2732
+ )
2733
+ }
2734
+ ) }) : t.map((w, S) => {
2735
+ const T = M[S];
2736
+ return /* @__PURE__ */ _(
2737
+ "tr",
2738
+ {
2739
+ onClick: f ? () => f(w) : void 0,
2740
+ className: x(
2741
+ S % 2 === 0 ? "bg-neutral-surface-lightest" : "bg-white",
2742
+ f && "cursor-pointer"
2743
+ ),
2744
+ children: [
2745
+ i && /* @__PURE__ */ l(
2746
+ ue,
2747
+ {
2748
+ align: "center",
2749
+ onClick: (A) => A.stopPropagation(),
2750
+ children: /* @__PURE__ */ l(
2751
+ D,
2752
+ {
2753
+ checked: N.includes(T),
2754
+ onChange: () => q(T),
2755
+ "aria-label": "Selecionar linha"
2756
+ }
2757
+ )
2758
+ }
2759
+ ),
2760
+ e.map((A, P) => /* @__PURE__ */ l(
2761
+ ue,
2762
+ {
2763
+ align: A.align,
2764
+ className: A.className,
2765
+ children: bt(w, A)
2766
+ },
2767
+ A.key ?? `column-${P}`
2768
+ ))
2769
+ ]
2770
+ },
2771
+ T
2772
+ );
2773
+ }) })
2774
+ ]
2775
+ }
2776
+ )
2703
2777
  }
2704
2778
  );
2705
2779
  }
2706
- const mt = H(
2780
+ const gt = H(
2707
2781
  "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-neutral-surface-lightest font-sans font-medium text-neutral-text-secondary",
2708
2782
  {
2709
2783
  variants: {
@@ -2730,8 +2804,8 @@ const xt = {
2730
2804
  }, ke = E(
2731
2805
  ({ className: e, size: t, src: r, alt: n = "", name: s, ...o }, i) => {
2732
2806
  const a = t ?? "md";
2733
- return /* @__PURE__ */ l("span", { ref: i, className: x(mt({ size: t }), e), ...o, children: r ? /* @__PURE__ */ l("img", { src: r, alt: n, className: "size-full object-cover" }) : s && /* @__PURE__ */ l(
2734
- S,
2807
+ return /* @__PURE__ */ l("span", { ref: i, className: x(gt({ size: t }), e), ...o, children: r ? /* @__PURE__ */ l("img", { src: r, alt: n, className: "size-full object-cover" }) : s && /* @__PURE__ */ l(
2808
+ C,
2735
2809
  {
2736
2810
  as: "span",
2737
2811
  variant: xt[a],
@@ -2750,12 +2824,12 @@ function jt({
2750
2824
  size: n = "md",
2751
2825
  className: s
2752
2826
  }) {
2753
- return /* @__PURE__ */ C("div", { className: x("flex min-w-0 items-center gap-2", s), children: [
2827
+ return /* @__PURE__ */ _("div", { className: x("flex min-w-0 items-center gap-2", s), children: [
2754
2828
  /* @__PURE__ */ l(ke, { src: e, name: t, size: n }),
2755
- /* @__PURE__ */ C("div", { className: "flex min-w-0 flex-col", children: [
2756
- /* @__PURE__ */ l(S, { as: "span", variant: "body", className: "truncate", children: t }),
2829
+ /* @__PURE__ */ _("div", { className: "flex min-w-0 flex-col", children: [
2830
+ /* @__PURE__ */ l(C, { as: "span", variant: "body", className: "truncate", children: t }),
2757
2831
  r && /* @__PURE__ */ l(
2758
- S,
2832
+ C,
2759
2833
  {
2760
2834
  as: "span",
2761
2835
  variant: "bodySm",
@@ -2802,7 +2876,7 @@ const vt = E(
2802
2876
  const a = yt(e, t, n), u = (c) => {
2803
2877
  c < 1 || c > t || c === e || r(c);
2804
2878
  };
2805
- return /* @__PURE__ */ C(
2879
+ return /* @__PURE__ */ _(
2806
2880
  "nav",
2807
2881
  {
2808
2882
  ref: i,
@@ -2826,7 +2900,7 @@ const vt = E(
2826
2900
  "span",
2827
2901
  {
2828
2902
  className: "inline-flex size-9 shrink-0 items-center justify-center text-neutral-text-secondary",
2829
- children: /* @__PURE__ */ l(S, { as: "span", variant: "bodySm", className: "text-inherit", children: "…" })
2903
+ children: /* @__PURE__ */ l(C, { as: "span", variant: "bodySm", className: "text-inherit", children: "…" })
2830
2904
  },
2831
2905
  `ellipsis-${p}`
2832
2906
  ) : /* @__PURE__ */ l(
@@ -2839,7 +2913,7 @@ const vt = E(
2839
2913
  "inline-flex size-9 shrink-0 items-center justify-center rounded-lg transition-colors",
2840
2914
  c === e ? "bg-neutral-surface-selected text-agilys-primary" : "text-neutral-text-secondary hover:bg-neutral-surface-lightest"
2841
2915
  ),
2842
- children: /* @__PURE__ */ l(S, { as: "span", variant: "bodySm", weight: "medium", className: "text-inherit", children: c })
2916
+ children: /* @__PURE__ */ l(C, { as: "span", variant: "bodySm", weight: "medium", className: "text-inherit", children: c })
2843
2917
  },
2844
2918
  c
2845
2919
  )
@@ -2887,17 +2961,10 @@ const wt = H(
2887
2961
  id: u,
2888
2962
  ...c
2889
2963
  }, p) => {
2890
- const m = fe(), b = u ?? m, z = typeof i == "string" ? i : i == null ? void 0 : i.message, k = !!z, g = `${b}-error`;
2891
- return /* @__PURE__ */ C("div", { className: x("flex w-full min-w-0 flex-col gap-1.5", t), children: [
2892
- r && /* @__PURE__ */ l(
2893
- "label",
2894
- {
2895
- htmlFor: b,
2896
- className: "font-sans text-sm font-normal leading-6 text-neutral-text-primary",
2897
- children: r
2898
- }
2899
- ),
2900
- /* @__PURE__ */ C(
2964
+ const g = be(), f = u ?? g, z = typeof i == "string" ? i : i == null ? void 0 : i.message, k = !!z, m = `${f}-error`;
2965
+ return /* @__PURE__ */ _("div", { className: x("flex w-full min-w-0 flex-col gap-1.5", t), children: [
2966
+ r && /* @__PURE__ */ l(C, { as: "label", htmlFor: f, variant: "body", className: "text-neutral-text-primary", children: r }),
2967
+ /* @__PURE__ */ _(
2901
2968
  "div",
2902
2969
  {
2903
2970
  className: x(
@@ -2917,10 +2984,10 @@ const wt = H(
2917
2984
  "input",
2918
2985
  {
2919
2986
  ref: p,
2920
- id: b,
2987
+ id: f,
2921
2988
  disabled: a,
2922
2989
  "aria-invalid": k || void 0,
2923
- "aria-describedby": k ? g : void 0,
2990
+ "aria-describedby": k ? m : void 0,
2924
2991
  className: x(
2925
2992
  "w-full min-w-0 flex-1 bg-transparent font-sans text-base leading-6 text-neutral-text-primary placeholder:text-neutral-secondary focus:outline-none disabled:cursor-not-allowed",
2926
2993
  e
@@ -2942,7 +3009,7 @@ const wt = H(
2942
3009
  ]
2943
3010
  }
2944
3011
  ),
2945
- k && /* @__PURE__ */ l("span", { id: g, role: "alert", className: "font-sans text-xs leading-normal text-danger-60", children: z })
3012
+ k && /* @__PURE__ */ l(C, { as: "span", id: m, role: "alert", variant: "caption", className: "text-danger-60", children: z })
2946
3013
  ] });
2947
3014
  }
2948
3015
  );
@@ -2971,17 +3038,17 @@ const zt = E(
2971
3038
  contentClassName: u,
2972
3039
  ...c
2973
3040
  }, p) => {
2974
- const m = fe(), b = ze(null), [z, k] = Ce(!1);
3041
+ const g = be(), f = ze(null), [z, k] = Ce(!1);
2975
3042
  return ae(() => k(!0), []), ae(() => {
2976
3043
  var v;
2977
3044
  if (!e) return;
2978
- const g = document.body.style.overflow;
2979
- document.body.style.overflow = "hidden", (v = b.current) == null || v.focus();
2980
- const f = (N) => {
3045
+ const m = document.body.style.overflow;
3046
+ document.body.style.overflow = "hidden", (v = f.current) == null || v.focus();
3047
+ const b = (N) => {
2981
3048
  N.key === "Escape" && t();
2982
3049
  };
2983
- return document.addEventListener("keydown", f), () => {
2984
- document.body.style.overflow = g, document.removeEventListener("keydown", f);
3050
+ return document.addEventListener("keydown", b), () => {
3051
+ document.body.style.overflow = m, document.removeEventListener("keydown", b);
2985
3052
  };
2986
3053
  }, [e, t]), !e || !z ? null : _e(
2987
3054
  /* @__PURE__ */ l(
@@ -2989,14 +3056,14 @@ const zt = E(
2989
3056
  {
2990
3057
  className: "fixed inset-0 z-50 flex items-center justify-center overflow-y-auto bg-black/40 p-4",
2991
3058
  onClick: o ? t : void 0,
2992
- children: /* @__PURE__ */ C(
3059
+ children: /* @__PURE__ */ _(
2993
3060
  "div",
2994
3061
  {
2995
3062
  ref: p,
2996
3063
  role: "dialog",
2997
3064
  "aria-modal": "true",
2998
- "aria-labelledby": r ? m : void 0,
2999
- onClick: (g) => g.stopPropagation(),
3065
+ "aria-labelledby": r ? g : void 0,
3066
+ onClick: (m) => m.stopPropagation(),
3000
3067
  className: x(
3001
3068
  "relative flex w-full min-w-0 max-w-lg flex-col gap-6 rounded-xl bg-[#fcfcfc] p-6 shadow-[0px_0px_2px_0px_rgba(34,34,34,0.08)] sm:p-8",
3002
3069
  a
@@ -3006,7 +3073,7 @@ const zt = E(
3006
3073
  i && /* @__PURE__ */ l(
3007
3074
  "button",
3008
3075
  {
3009
- ref: b,
3076
+ ref: f,
3010
3077
  type: "button",
3011
3078
  onClick: t,
3012
3079
  "aria-label": "Fechar",
@@ -3015,10 +3082,10 @@ const zt = E(
3015
3082
  }
3016
3083
  ),
3017
3084
  r && /* @__PURE__ */ l("div", { className: "pr-8", children: /* @__PURE__ */ l(
3018
- S,
3085
+ C,
3019
3086
  {
3020
3087
  as: "h2",
3021
- id: m,
3088
+ id: g,
3022
3089
  variant: "h4",
3023
3090
  weight: "medium",
3024
3091
  className: "text-neutral-text-primary",
@@ -3049,7 +3116,7 @@ zt.displayName = "Modal";
3049
3116
  export {
3050
3117
  ke as Avatar,
3051
3118
  jt as AvatarColumn,
3052
- ct as Badge,
3119
+ ut as Badge,
3053
3120
  at as Button,
3054
3121
  kt as Input,
3055
3122
  zt as Modal,
@@ -3058,12 +3125,12 @@ export {
3058
3125
  ue as TableCell,
3059
3126
  D as TableCheckbox,
3060
3127
  ee as TableHeadCell,
3061
- S as Typography,
3062
- mt as avatarVariants,
3063
- it as badgeVariants,
3128
+ C as Text,
3129
+ gt as avatarVariants,
3130
+ ct as badgeVariants,
3064
3131
  st as buttonVariants,
3065
3132
  x as cn,
3066
3133
  wt as inputVariants,
3067
- dt as typographyVariants
3134
+ it as textVariants
3068
3135
  };
3069
3136
  //# sourceMappingURL=agilys-design-system.js.map