@fabio.caffarello/react-design-system 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ var h = (e, a) => {
22
22
  var re = (e, a, r) => G(e, typeof a != "symbol" ? a + "" : a, r);
23
23
  import { jsx as l, jsxs as v, Fragment as Z } from "react/jsx-runtime";
24
24
  import * as A from "react";
25
- import ce, { memo as M, forwardRef as z } from "react";
25
+ import ce, { memo as M, forwardRef as F } from "react";
26
26
  import { clsx as he } from "clsx";
27
27
  import { twMerge as ye } from "tailwind-merge";
28
28
  import { cva as ve } from "class-variance-authority";
@@ -313,7 +313,7 @@ const J = {
313
313
  caption: E.create("xs", "normal", "normal"),
314
314
  button: E.create("base", "normal", "medium")
315
315
  };
316
- function F(e) {
316
+ function D(e) {
317
317
  const a = J[e];
318
318
  return `${a.fontSize.tailwind} ${a.lineHeight.tailwind} ${a.fontWeight.tailwind}`;
319
319
  }
@@ -471,7 +471,7 @@ const L = (e, a) => {
471
471
  }
472
472
  }
473
473
  ), Ee = M(
474
- z(function(b, p) {
474
+ F(function(b, p) {
475
475
  var m = b, {
476
476
  variant: a = "neutral",
477
477
  size: r = "md",
@@ -547,7 +547,7 @@ function Ae(e) {
547
547
  d = !0;
548
548
  const T = N;
549
549
  let k = "child" in T.props ? T.props.child : T.props.children;
550
- ie(k) && typeof q == "function" && (k = q(k._payload)), o = Fe(T, k), p.push((S = o == null ? void 0 : o.props) == null ? void 0 : S.children);
550
+ ie(k) && typeof q == "function" && (k = q(k._payload)), o = De(T, k), p.push((S = o == null ? void 0 : o.props) == null ? void 0 : S.children);
551
551
  } else
552
552
  p.push(N);
553
553
  }), o ? o = A.cloneElement(o, void 0, p) : (
@@ -565,7 +565,7 @@ function Ae(e) {
565
565
  );
566
566
  return i;
567
567
  }
568
- const x = ze(c, (g = o.props) != null ? g : {});
568
+ const x = Fe(c, (g = o.props) != null ? g : {});
569
569
  return o.type !== A.Fragment && (x.ref = t ? m : b), A.cloneElement(o, x);
570
570
  });
571
571
  return a.displayName = `${e}.Slot`, a;
@@ -576,14 +576,14 @@ function Le(e) {
576
576
  const a = (r) => "child" in r ? r.children(r.child) : r.children;
577
577
  return a.displayName = `${e}.Slottable`, a.__radixId = ue, a;
578
578
  }
579
- var De = /* @__PURE__ */ Le("Slottable"), Fe = (e, a) => {
579
+ var ze = /* @__PURE__ */ Le("Slottable"), De = (e, a) => {
580
580
  if ("child" in e.props) {
581
581
  const r = e.props.child;
582
582
  return A.isValidElement(r) ? A.cloneElement(r, void 0, e.props.children(r.props.children)) : null;
583
583
  }
584
584
  return A.isValidElement(a) ? a : null;
585
585
  };
586
- function ze(e, a) {
586
+ function Fe(e, a) {
587
587
  const r = f({}, a);
588
588
  for (const t in a) {
589
589
  const i = e[t], c = a[t];
@@ -678,7 +678,7 @@ const Pe = L(
678
678
  "inline-flex",
679
679
  "items-center",
680
680
  "justify-center",
681
- F("button").split(" ")[2] || "font-medium",
681
+ D("button").split(" ")[2] || "font-medium",
682
682
  // Extract font-medium
683
683
  $("md"),
684
684
  "transition-colors",
@@ -844,8 +844,8 @@ function X({
844
844
  ) : null;
845
845
  }
846
846
  const Ie = M(
847
- z(function(k, T) {
848
- var D = k, {
847
+ F(function(k, T) {
848
+ var z = k, {
849
849
  variant: a = "primary",
850
850
  size: r = "md",
851
851
  isLoading: t = !1,
@@ -860,7 +860,7 @@ const Ie = M(
860
860
  disabled: u = !1,
861
861
  children: g,
862
862
  "aria-label": N
863
- } = D, S = h(D, [
863
+ } = z, S = h(z, [
864
864
  "variant",
865
865
  "size",
866
866
  "isLoading",
@@ -892,7 +892,7 @@ const Ie = M(
892
892
  }, Q ? { type: Q } : {}), S);
893
893
  return b ? /* @__PURE__ */ v(R, y(f({ ref: T }, ee), { children: [
894
894
  o && /* @__PURE__ */ l(X, { position: "left", children: o }),
895
- /* @__PURE__ */ l(De, { children: g }),
895
+ /* @__PURE__ */ l(ze, { children: g }),
896
896
  d && /* @__PURE__ */ l(X, { position: "right", children: d })
897
897
  ] })) : /* @__PURE__ */ l(R, y(f({ ref: T }, ee), { children: t ? /* @__PURE__ */ v(Z, { children: [
898
898
  me,
@@ -995,7 +995,7 @@ const le = L(
995
995
  disabled: !1
996
996
  }
997
997
  }
998
- ), We = z(function(a, r) {
998
+ ), We = F(function(a, r) {
999
999
  const {
1000
1000
  children: t,
1001
1001
  variant: i = "default",
@@ -1030,7 +1030,7 @@ const le = L(
1030
1030
  children: t
1031
1031
  }
1032
1032
  );
1033
- const { onRemove: N, onClick: S, count: T } = a, k = S !== void 0, D = k && !d, R = (V) => {
1033
+ const { onRemove: N, onClick: S, count: T } = a, k = S !== void 0, z = k && !d, R = (V) => {
1034
1034
  d || (V.key === "Enter" || V.key === " ") && (V.preventDefault(), S == null || S());
1035
1035
  }, B = T !== void 0, P = o || i === "filled", I = B ? /* @__PURE__ */ l(
1036
1036
  "span",
@@ -1072,7 +1072,7 @@ const le = L(
1072
1072
  disabled: d,
1073
1073
  "aria-pressed": o ? !0 : void 0,
1074
1074
  "aria-label": b || U,
1075
- tabIndex: m !== void 0 ? m : D ? 0 : void 0,
1075
+ tabIndex: m !== void 0 ? m : z ? 0 : void 0,
1076
1076
  className: n(
1077
1077
  "flex-1",
1078
1078
  "bg-transparent",
@@ -1141,7 +1141,10 @@ const Ue = L(
1141
1141
  "bg-surface-secondary-subtle",
1142
1142
  "text-fg-brand-secondary-emphasis",
1143
1143
  "border-line-secondary"
1144
- )
1144
+ ),
1145
+ // Categorical data-viz tone — fuchsia soft-wash, sibling to the
1146
+ // chart palette. Not a status; distinct from secondary (brand violet).
1147
+ dataviz: n("bg-dataviz-bg", "text-dataviz-dark", "border-dataviz")
1145
1148
  },
1146
1149
  size: {
1147
1150
  sm: n(
@@ -1161,7 +1164,7 @@ const Ue = L(
1161
1164
  defaultVariants: { tone: "neutral", size: "md" }
1162
1165
  }
1163
1166
  ), Ke = M(
1164
- z(function(b, p) {
1167
+ F(function(b, p) {
1165
1168
  var m = b, {
1166
1169
  label: a,
1167
1170
  source: r,
@@ -1349,7 +1352,7 @@ function Xe({
1349
1352
  }) {
1350
1353
  const c = n(
1351
1354
  s("xs", "mt"),
1352
- F("caption"),
1355
+ D("caption"),
1353
1356
  e && "text-fg-error",
1354
1357
  a && "text-fg-success",
1355
1358
  !e && !a && "text-fg-secondary"
@@ -1364,7 +1367,7 @@ function Xe({
1364
1367
  }
1365
1368
  );
1366
1369
  }
1367
- const Ge = z(
1370
+ const Ge = F(
1368
1371
  function(T, S) {
1369
1372
  var k = T, {
1370
1373
  id: a,
@@ -1398,8 +1401,8 @@ const Ge = z(
1398
1401
  typeof process != "undefined" && process.env.NODE_ENV !== "production" && r && !a && console.warn(
1399
1402
  "[InputBase] `label` was provided without an `id`. The <label> cannot bind to the input (InputBase does not auto-generate an id — that needs a client hook). Pass an `id`, or use the interactive `Input` which auto-generates one."
1400
1403
  );
1401
- const D = t ? "error" : i ? "success" : "default", R = t && a ? `${a}-error` : void 0, B = c && a ? `${a}-helper` : void 0, P = o === "sm" ? "h-4 w-4" : o === "lg" ? "h-5 w-5" : "h-4 w-4", I = o === "sm" ? "top-2" : o === "lg" ? "top-3.5" : "top-2.5", U = n(
1402
- qe({ variant: d, size: o, state: D }),
1404
+ const z = t ? "error" : i ? "success" : "default", R = t && a ? `${a}-error` : void 0, B = c && a ? `${a}-helper` : void 0, P = o === "sm" ? "h-4 w-4" : o === "lg" ? "h-5 w-5" : "h-4 w-4", I = o === "sm" ? "top-2" : o === "lg" ? "top-3.5" : "top-2.5", U = n(
1405
+ qe({ variant: d, size: o, state: z }),
1403
1406
  // Icon padding — `pl-9` / `pr-9` aren't on the spacing scale (no
1404
1407
  // semantic key for 36px) so they stay raw at the `sm` size; md/lg use
1405
1408
  // the getter. Mirrors the original Input contract.
@@ -1408,7 +1411,7 @@ const Ge = z(
1408
1411
  x
1409
1412
  ), V = n(
1410
1413
  "block",
1411
- F("label"),
1414
+ D("label"),
1412
1415
  s("xs", "mb"),
1413
1416
  u && "opacity-50"
1414
1417
  );
@@ -1483,7 +1486,7 @@ const Ye = n(
1483
1486
  "after:font-normal"
1484
1487
  )
1485
1488
  }, Je = M(
1486
- z(function(o, c) {
1489
+ F(function(o, c) {
1487
1490
  var d = o, { variant: a = "default", className: r = "", children: t } = d, i = h(d, ["variant", "className", "children"]);
1488
1491
  const p = n(
1489
1492
  Ye,
@@ -1584,7 +1587,7 @@ const ea = L("w-full", {
1584
1587
  defaultVariants: {
1585
1588
  variant: "primary"
1586
1589
  }
1587
- }), aa = z(function(x, m) {
1590
+ }), aa = F(function(x, m) {
1588
1591
  var u = x, {
1589
1592
  value: a,
1590
1593
  max: r = 100,
@@ -1882,9 +1885,9 @@ function ia(b, p) {
1882
1885
  u = "p";
1883
1886
  break;
1884
1887
  }
1885
- return e === "heading" ? x.push(F("h2")) : e === "body" || e === "paragraph" ? x.push(F("body")) : e === "bodySmall" ? x.push(F("bodySmall")) : e === "bodyLarge" ? x.push(F("bodyLarge")) : e === "caption" ? x.push(F("caption")) : e === "label" ? x.push(F("label")) : x.push(F("body")), a && x.push("font-bold"), r && x.push("italic"), x.push(sa[c][o]), /* @__PURE__ */ l(u, f({ ref: p, className: n(...x, t) }, d));
1888
+ return e === "heading" ? x.push(D("h2")) : e === "body" || e === "paragraph" ? x.push(D("body")) : e === "bodySmall" ? x.push(D("bodySmall")) : e === "bodyLarge" ? x.push(D("bodyLarge")) : e === "caption" ? x.push(D("caption")) : e === "label" ? x.push(D("label")) : x.push(D("body")), a && x.push("font-bold"), r && x.push("italic"), x.push(sa[c][o]), /* @__PURE__ */ l(u, f({ ref: p, className: n(...x, t) }, d));
1886
1889
  }
1887
- const H = z(ia), la = {
1890
+ const H = F(ia), la = {
1888
1891
  sm: "max-w-screen-sm",
1889
1892
  md: "max-w-screen-md",
1890
1893
  lg: "max-w-screen-lg",
@@ -2191,8 +2194,8 @@ function ba(b) {
2191
2194
  role: g,
2192
2195
  tabIndex: N,
2193
2196
  onClick: t,
2194
- onKeyDown: u ? (D) => {
2195
- u && (D.key === "Enter" || D.key === " ") && (D.preventDefault(), t == null || t());
2197
+ onKeyDown: u ? (z) => {
2198
+ u && (z.key === "Enter" || z.key === " ") && (z.preventDefault(), t == null || t());
2196
2199
  } : void 0,
2197
2200
  "aria-label": i,
2198
2201
  "aria-labelledby": c
@@ -2390,7 +2393,7 @@ const xa = L(
2390
2393
  }, ya = {
2391
2394
  start: "justify-start",
2392
2395
  center: "justify-center"
2393
- }, va = z(
2396
+ }, va = F(
2394
2397
  function(N, g) {
2395
2398
  var S = N, {
2396
2399
  kicker: a,
@@ -2782,7 +2785,7 @@ const ka = L(n("flex items-center", "border-b"), {
2782
2785
  $("full"),
2783
2786
  s("xs", "px"),
2784
2787
  "bg-surface-muted text-fg-secondary text-xs"
2785
- ), Ta = z(
2788
+ ), Ta = F(
2786
2789
  function(b, p) {
2787
2790
  var m = b, {
2788
2791
  items: a,