@udixio/ui-react 2.9.7 → 2.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- var Ne = Object.defineProperty;
2
- var Ee = (t, e, n) => e in t ? Ne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
1
+ var Le = Object.defineProperty;
2
+ var Ee = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var R = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as m, jsxs as z, Fragment as ft } from "react/jsx-runtime";
5
5
  import { clsx as qt } from "clsx";
6
- import { extendTailwindMerge as Ie } from "tailwind-merge";
7
- import U, { useMemo as St, useState as H, useEffect as O, useRef as T, useLayoutEffect as Yt, isValidElement as wt, cloneElement as Nt, createContext as ke, useContext as zt, Children as Me, Fragment as Ce } from "react";
6
+ import { extendTailwindMerge as ke } from "tailwind-merge";
7
+ import U, { useMemo as St, useState as H, useEffect as O, useRef as T, useLayoutEffect as Yt, isValidElement as wt, cloneElement as Lt, createContext as Ie, useContext as zt, Children as Me, Fragment as Ce } from "react";
8
8
  import { motion as tt, AnimatePresence as ht, useScroll as Re, useMotionValueEvent as Bt, animate as $e } from "motion/react";
9
9
  import { createPortal as jt } from "react-dom";
10
10
  import { loader as We, defineConfig as De, FontPlugin as Ae, Variants as Be } from "@udixio/theme";
11
11
  import { TailwindPlugin as Kt } from "@udixio/tailwind";
12
12
  import He from "react-textarea-autosize";
13
- const Gt = Ie({
13
+ const Gt = ke({
14
14
  override: {
15
15
  classGroups: {
16
16
  "text-color": [
@@ -204,10 +204,13 @@ const Jt = ({
204
204
  isInteractive: e
205
205
  }) => ({
206
206
  card: v(
207
- "group/card rounded-xl overflow-hidden z-10",
207
+ " rounded-xl overflow-hidden ",
208
208
  t === "outlined" && "bg-surface border border-outline-variant",
209
209
  t === "elevated" && "bg-surface-container-low shadow-1",
210
- t === "filled" && "bg-surface-container-highest"
210
+ t === "filled" && "bg-surface-container-highest",
211
+ {
212
+ "group/card": e
213
+ }
211
214
  )
212
215
  }), or = nt("card", Zt), Te = et(
213
216
  "card",
@@ -736,7 +739,7 @@ const Jt = ({
736
739
  me
737
740
  ), pe = () => ({
738
741
  tabPanel: v("")
739
- }), Lr = nt(
742
+ }), Nr = nt(
740
743
  "tabPanel",
741
744
  pe
742
745
  ), rn = et(
@@ -834,7 +837,7 @@ const Jt = ({
834
837
  s == "filled" && " pb-2 pt-6",
835
838
  s == "outlined" && "py-4 relative z-10"
836
839
  )
837
- }), Nr = nt(
840
+ }), Lr = nt(
838
841
  "textField",
839
842
  ye
840
843
  ), sn = et(
@@ -1194,8 +1197,8 @@ const dn = ({
1194
1197
  });
1195
1198
  O(() => {
1196
1199
  if (!i.current) return;
1197
- const A = new ResizeObserver((I) => {
1198
- for (const P of I)
1200
+ const A = new ResizeObserver((k) => {
1201
+ for (const P of k)
1199
1202
  P.target === i.current && d({
1200
1203
  width: P.contentRect.width,
1201
1204
  height: P.contentRect.height
@@ -1224,13 +1227,13 @@ const dn = ({
1224
1227
  }), g = T(null);
1225
1228
  g.current || (g.current = un(
1226
1229
  l,
1227
- (A, I) => {
1228
- !f.current || !h.current || !i.current || (I === (e === "horizontal" ? "x" : "y") && (c == null || c(A)), s && (e === "horizontal" && I === "x" && s({
1230
+ (A, k) => {
1231
+ !f.current || !h.current || !i.current || (k === (e === "horizontal" ? "x" : "y") && (c == null || c(A)), s && (e === "horizontal" && k === "x" && s({
1229
1232
  scrollProgress: A,
1230
1233
  scroll: A * (h.current.width - i.current.clientWidth),
1231
1234
  scrollTotal: h.current.width - i.current.clientWidth,
1232
1235
  scrollVisible: f.current.width
1233
- }), e === "vertical" && I === "y" && s({
1236
+ }), e === "vertical" && k === "y" && s({
1234
1237
  scrollProgress: A,
1235
1238
  scroll: A * (h.current.height - i.current.clientHeight),
1236
1239
  scrollTotal: h.current.height - i.current.clientHeight,
@@ -1238,20 +1241,20 @@ const dn = ({
1238
1241
  })));
1239
1242
  }
1240
1243
  ));
1241
- const W = (A, I) => {
1242
- g.current && g.current(A, I);
1244
+ const W = (A, k) => {
1245
+ g.current && g.current(A, k);
1243
1246
  };
1244
1247
  O(() => {
1245
1248
  y.width && W(x.get(), "x"), y.height && W(C.get(), "y");
1246
1249
  }, [y]), O(() => {
1247
- const A = i.current, I = u.current;
1248
- if (!A || !I || typeof o != "number") return;
1250
+ const A = i.current, k = u.current;
1251
+ if (!A || !k || typeof o != "number") return;
1249
1252
  const P = (X, Y, K) => Math.min(K, Math.max(Y, X));
1250
1253
  if (e === "horizontal") {
1251
- const X = Math.max(0, (n ?? I.scrollWidth) - A.clientWidth);
1254
+ const X = Math.max(0, (n ?? k.scrollWidth) - A.clientWidth);
1252
1255
  A.scrollLeft = P(o * X, 0, X);
1253
1256
  } else {
1254
- const X = Math.max(0, (n ?? I.scrollHeight) - A.clientHeight);
1257
+ const X = Math.max(0, (n ?? k.scrollHeight) - A.clientHeight);
1255
1258
  A.scrollTop = P(o * X, 0, X);
1256
1259
  }
1257
1260
  }, [o, e, n]), Bt(x, "change", (A) => {
@@ -1268,7 +1271,7 @@ const dn = ({
1268
1271
  scrollVisible: e == "vertical" ? f.current.height : f.current.width
1269
1272
  }), p(!0));
1270
1273
  }, [f, h, s]), h.current = b(), f.current = w();
1271
- const [S, E] = H(!1), k = cn({
1274
+ const [S, E] = H(!1), I = cn({
1272
1275
  isDragging: S,
1273
1276
  children: t,
1274
1277
  className: r,
@@ -1277,15 +1280,15 @@ const dn = ({
1277
1280
  scrollSize: n,
1278
1281
  draggable: a,
1279
1282
  throttleDuration: l
1280
- }), [$, L] = H(0), [V, N] = H(0), J = (A) => {
1283
+ }), [$, N] = H(0), [V, L] = H(0), J = (A) => {
1281
1284
  if (!a) return;
1282
- const I = i.current;
1283
- if (!I || $ == null) return;
1284
- const X = (A.pageX - I.offsetLeft - $) * 1.5;
1285
- I.scrollLeft = V - X;
1285
+ const k = i.current;
1286
+ if (!k || $ == null) return;
1287
+ const X = (A.pageX - k.offsetLeft - $) * 1.5;
1288
+ k.scrollLeft = V - X;
1286
1289
  }, j = (A) => {
1287
- const I = i.current;
1288
- I && (E(!0), L(A.pageX - I.offsetLeft), N(I.scrollLeft));
1290
+ const k = i.current;
1291
+ k && (E(!0), N(A.pageX - k.offsetLeft), L(k.scrollLeft));
1289
1292
  }, Q = (A) => {
1290
1293
  S && (A.preventDefault(), J(A));
1291
1294
  }, D = () => {
@@ -1300,7 +1303,7 @@ const dn = ({
1300
1303
  }, []), O(() => {
1301
1304
  const A = i.current;
1302
1305
  if (!A) return;
1303
- const I = (P) => {
1306
+ const k = (P) => {
1304
1307
  var st, M, G, rt;
1305
1308
  const X = P.detail, Y = i.current;
1306
1309
  if (!Y || !X) return;
@@ -1334,13 +1337,13 @@ const dn = ({
1334
1337
  Y.scrollTop = Math.min(ct, Math.max(0, X.scroll));
1335
1338
  }
1336
1339
  };
1337
- return A.addEventListener("udx:customScroll:set", I), () => {
1338
- A.removeEventListener("udx:customScroll:set", I);
1340
+ return A.addEventListener("udx:customScroll:set", k), () => {
1341
+ A.removeEventListener("udx:customScroll:set", k);
1339
1342
  };
1340
1343
  }, [e]), /* @__PURE__ */ z(
1341
1344
  "div",
1342
1345
  {
1343
- className: k.customScroll,
1346
+ className: I.customScroll,
1344
1347
  ref: i,
1345
1348
  onMouseDown: j,
1346
1349
  onMouseMove: Q,
@@ -1348,7 +1351,7 @@ const dn = ({
1348
1351
  onMouseLeave: B,
1349
1352
  onDragStart: q,
1350
1353
  onScroll: (A) => {
1351
- S || (L(null), E(!0), Z.current && clearTimeout(Z.current), Z.current = setTimeout(() => {
1354
+ S || (N(null), E(!0), Z.current && clearTimeout(Z.current), Z.current = setTimeout(() => {
1352
1355
  E(!1);
1353
1356
  }, 1e3));
1354
1357
  },
@@ -1358,7 +1361,7 @@ const dn = ({
1358
1361
  {
1359
1362
  ref: u,
1360
1363
  style: e === "vertical" ? { height: ((at = f == null ? void 0 : f.current) == null ? void 0 : at.height) ?? "100%" } : { width: ((ut = f == null ? void 0 : f.current) == null ? void 0 : ut.width) ?? "100%" },
1361
- className: k.track,
1364
+ className: I.track,
1362
1365
  children: t
1363
1366
  }
1364
1367
  ),
@@ -1658,7 +1661,7 @@ var wn = class {
1658
1661
  // @ts-ignore: this will be deprecated in the future
1659
1662
  __experimental__naiveDimensions: S = !1,
1660
1663
  naiveDimensions: E = S,
1661
- stopInertiaOnNavigate: k = !1
1664
+ stopInertiaOnNavigate: I = !1
1662
1665
  } = {}) {
1663
1666
  R(this, "_isScrolling", !1);
1664
1667
  // true when scroll is animating
@@ -1857,7 +1860,7 @@ var wn = class {
1857
1860
  autoToggle: F,
1858
1861
  allowNestedScroll: p,
1859
1862
  naiveDimensions: E,
1860
- stopInertiaOnNavigate: k
1863
+ stopInertiaOnNavigate: I
1861
1864
  }, this.dimensions = new wn(t, e, { autoResize: b }), this.updateClassName(), this.targetScroll = this.animatedScroll = this.actualScroll, this.options.wrapper.addEventListener("scroll", this.onNativeScroll, !1), this.options.wrapper.addEventListener("scrollend", this.onScrollEnd, {
1862
1865
  capture: !0
1863
1866
  }), (this.options.anchors || this.options.stopInertiaOnNavigate) && this.options.wrapper.addEventListener(
@@ -2162,7 +2165,7 @@ var wn = class {
2162
2165
  this.rootElement.className = this.rootElement.className.replace(/lenis(-\w+)?/g, "").trim();
2163
2166
  }
2164
2167
  };
2165
- const Ir = ({
2168
+ const kr = ({
2166
2169
  transition: t = 1.2,
2167
2170
  easing: e,
2168
2171
  orientation: n = "vertical",
@@ -2206,10 +2209,10 @@ const Ir = ({
2206
2209
  });
2207
2210
  return O(() => {
2208
2211
  if (r.current && n !== "state-layer") {
2209
- const i = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", u = r.current.closest(
2210
- `.${i}:not(.${i} .${i})`
2212
+ const u = (n.includes("[") ? "group/" + n.split("[")[1].split("]")[0] : "group").replace(/\//g, "\\/"), y = r.current.closest(
2213
+ `.${u}:not(.${u} .${u})`
2211
2214
  );
2212
- a.current = u;
2215
+ a.current = y;
2213
2216
  }
2214
2217
  o(!0);
2215
2218
  }, []), /* @__PURE__ */ m(
@@ -2235,7 +2238,7 @@ const Ir = ({
2235
2238
  }), Sn = et(
2236
2239
  "stateLayer",
2237
2240
  xn
2238
- ), Ln = ({
2241
+ ), Nn = ({
2239
2242
  targetRef: t,
2240
2243
  children: e
2241
2244
  }) => {
@@ -2264,10 +2267,10 @@ const Ir = ({
2264
2267
  };
2265
2268
  }, [t]), n ? jt(/* @__PURE__ */ m("div", { style: n, children: e }), document.body) : null;
2266
2269
  };
2267
- function Nn(t) {
2270
+ function Ln(t) {
2268
2271
  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t);
2269
2272
  }
2270
- const kr = ({
2273
+ const Ir = ({
2271
2274
  config: t,
2272
2275
  throttleDelay: e = 100,
2273
2276
  // Délai par défaut de 300ms
@@ -2305,7 +2308,7 @@ const kr = ({
2305
2308
  };
2306
2309
  }, [t, e, r]);
2307
2310
  const y = async (d) => {
2308
- if (typeof d.sourceColor == "string" && !Nn(d.sourceColor))
2311
+ if (typeof d.sourceColor == "string" && !Ln(d.sourceColor))
2309
2312
  throw new Error("Invalid hex color");
2310
2313
  if (!r)
2311
2314
  return;
@@ -2327,7 +2330,7 @@ function En() {
2327
2330
  }
2328
2331
  return !1;
2329
2332
  }
2330
- function In() {
2333
+ function kn() {
2331
2334
  return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2332
2335
  }
2333
2336
  function Dt(t) {
@@ -2362,7 +2365,7 @@ function Ct(t = document, e) {
2362
2365
  )
2363
2366
  ).filter((s) => Dt(s));
2364
2367
  }
2365
- function kn(t = document, e) {
2368
+ function In(t = document, e) {
2366
2369
  const n = Array.from(
2367
2370
  t.querySelectorAll(`[class*="${e}-"]`)
2368
2371
  ), s = /* @__PURE__ */ new Set([
@@ -2412,7 +2415,7 @@ function _t(t, e) {
2412
2415
  }
2413
2416
  function be(t = {}) {
2414
2417
  const { prefix: e = "anim", once: n = !0 } = t;
2415
- if (In())
2418
+ if (kn())
2416
2419
  return () => {
2417
2420
  };
2418
2421
  const s = En(), r = /* @__PURE__ */ new WeakSet();
@@ -2433,7 +2436,7 @@ function be(t = {}) {
2433
2436
  },
2434
2437
  { threshold: Cn }
2435
2438
  ), i = (h) => {
2436
- const f = kn(h || document, e);
2439
+ const f = In(h || document, e);
2437
2440
  for (const b of f)
2438
2441
  r.has(b) || (r.add(b), c.observe(b), _t(b, e));
2439
2442
  };
@@ -2524,9 +2527,9 @@ const xe = ({
2524
2527
  O(() => {
2525
2528
  S(d);
2526
2529
  }, [d]), w = { duration: 0.3, ...w };
2527
- const E = (L) => {
2528
- e && L.preventDefault(), y ? (S(!p), y(!p)) : u && u(L);
2529
- }, k = Pe({
2530
+ const E = (N) => {
2531
+ e && N.preventDefault(), y ? (S(!p), y(!p)) : u && u(N);
2532
+ }, I = Pe({
2530
2533
  allowShapeTransformation: b,
2531
2534
  size: f,
2532
2535
  disableTextMargins: a,
@@ -2544,25 +2547,25 @@ const xe = ({
2544
2547
  activated: p,
2545
2548
  label: r,
2546
2549
  children: r
2547
- }), $ = n ? /* @__PURE__ */ m(dt, { icon: n, className: k.icon }) : /* @__PURE__ */ m(ft, {});
2550
+ }), $ = n ? /* @__PURE__ */ m(dt, { icon: n, className: I.icon }) : /* @__PURE__ */ m(ft, {});
2548
2551
  return /* @__PURE__ */ z(
2549
2552
  g,
2550
2553
  {
2551
2554
  ref: F,
2552
2555
  href: s,
2553
- className: k.button,
2556
+ className: I.button,
2554
2557
  ...x,
2555
2558
  onClick: E,
2556
2559
  disabled: e,
2557
2560
  "aria-pressed": y ? p : void 0,
2558
2561
  style: { transition: w.duration + "s" },
2559
2562
  children: [
2560
- /* @__PURE__ */ m("div", { className: k.touchTarget }),
2563
+ /* @__PURE__ */ m("div", { className: I.touchTarget }),
2561
2564
  /* @__PURE__ */ m(
2562
2565
  yt,
2563
2566
  {
2564
2567
  style: { transition: w.duration + "s" },
2565
- className: k.stateLayer,
2568
+ className: I.stateLayer,
2566
2569
  colorName: v(
2567
2570
  t === "filled" && {
2568
2571
  "on-surface-variant": !p && !!y,
@@ -2623,7 +2626,7 @@ const xe = ({
2623
2626
  )
2624
2627
  }
2625
2628
  ),
2626
- /* @__PURE__ */ m("span", { className: k.label, children: r }),
2629
+ /* @__PURE__ */ m("span", { className: I.label, children: r }),
2627
2630
  o === "right" && $
2628
2631
  ]
2629
2632
  }
@@ -2714,37 +2717,37 @@ const xe = ({
2714
2717
  scrollSensitivity: y,
2715
2718
  onMetricsChange: i
2716
2719
  }), x = U.Children.toArray(n).filter(
2717
- (I) => U.isValidElement(I) && I.type === $n
2720
+ (k) => U.isValidElement(k) && k.type === $n
2718
2721
  ), g = T(null), [W, F] = H(
2719
2722
  {}
2720
- ), [p, S] = H(null), E = T(0), k = T(null), $ = () => {
2723
+ ), [p, S] = H(null), E = T(0), I = T(null), $ = () => {
2721
2724
  var pt, bt;
2722
2725
  if (!g.current || !f.current || (p == null ? void 0 : p.scrollProgress) === void 0)
2723
2726
  return [];
2724
- const I = (p == null ? void 0 : p.scrollVisible) ?? ((pt = f.current) == null ? void 0 : pt.clientWidth) ?? 0;
2727
+ const k = (p == null ? void 0 : p.scrollVisible) ?? ((pt = f.current) == null ? void 0 : pt.clientWidth) ?? 0;
2725
2728
  function P(_, it) {
2726
2729
  return _.map((lt, xt) => {
2727
- const kt = (lt - it) / Math.abs(_[1] - _[0]);
2730
+ const It = (lt - it) / Math.abs(_[1] - _[0]);
2728
2731
  return {
2729
2732
  itemScrollXCenter: lt,
2730
- relativeIndex: kt,
2733
+ relativeIndex: It,
2731
2734
  index: xt,
2732
2735
  width: 0
2733
2736
  };
2734
2737
  });
2735
2738
  }
2736
2739
  const X = x.map((_, it) => {
2737
- if (!L[it].current || !g.current) return 0;
2740
+ if (!N[it].current || !g.current) return 0;
2738
2741
  const xt = it / (x.length - 1);
2739
2742
  return vt(xt, [0, 1], [0, 1]);
2740
2743
  }), Y = P(
2741
2744
  X,
2742
2745
  (p == null ? void 0 : p.scrollProgress) ?? 0
2743
2746
  ).sort((_, it) => _.index - it.index);
2744
- let K = (((bt = f.current) == null ? void 0 : bt.clientWidth) ?? I) + o + l[0] + o;
2747
+ let K = (((bt = f.current) == null ? void 0 : bt.clientWidth) ?? k) + o + l[0] + o;
2745
2748
  const st = Y.sort((_, it) => Math.abs(_.relativeIndex) - Math.abs(it.relativeIndex)).map((_, it) => {
2746
2749
  if (!(K <= 0)) {
2747
- if (it == 0 && N(_.index), _.width = vt(
2750
+ if (it == 0 && L(_.index), _.width = vt(
2748
2751
  K - o,
2749
2752
  [l[0], l[1]],
2750
2753
  [l[0], l[1]]
@@ -2763,41 +2766,41 @@ const xe = ({
2763
2766
  M.forEach((_, it) => {
2764
2767
  const lt = M[it + 1];
2765
2768
  if (!lt) return;
2766
- const xt = 1 - (Math.abs(_.relativeIndex) - Math.abs(lt == null ? void 0 : lt.relativeIndex)), kt = vt(
2769
+ const xt = 1 - (Math.abs(_.relativeIndex) - Math.abs(lt == null ? void 0 : lt.relativeIndex)), It = vt(
2767
2770
  xt,
2768
2771
  [0, 2],
2769
2772
  [_.width + K, lt.width]
2770
2773
  );
2771
- K += _.width, _.width = kt, K -= _.width;
2774
+ K += _.width, _.width = It, K -= _.width;
2772
2775
  });
2773
2776
  const rt = st.length / 2, ct = vt(
2774
2777
  Math.abs(G[0].relativeIndex),
2775
2778
  [G[0].index == 0 ? 0 : rt - 1, rt],
2776
2779
  [0, 1]
2777
- ), It = vt(ct, [0, 1], [0, 1]) * -(l[0] + o);
2778
- return w(It), Object.fromEntries(
2780
+ ), kt = vt(ct, [0, 1], [0, 1]) * -(l[0] + o);
2781
+ return w(kt), Object.fromEntries(
2779
2782
  st.map((_) => [_.index, _.width])
2780
2783
  );
2781
- }, L = T([]).current, [V, N] = H(0);
2784
+ }, N = T([]).current, [V, L] = H(0);
2782
2785
  O(() => {
2783
2786
  c && c(V);
2784
2787
  }, [V]), O(() => {
2785
2788
  typeof u == "number" && x.length > 0 && u !== V && Q(u);
2786
2789
  }, [u, x.length]), O(() => {
2787
2790
  j(V);
2788
- }, [V]), L.length !== x.length && x.forEach((I, P) => {
2789
- L[P] || (L[P] = U.createRef());
2791
+ }, [V]), N.length !== x.length && x.forEach((k, P) => {
2792
+ N[P] || (N[P] = U.createRef());
2790
2793
  });
2791
- const [J, j] = H(0), Q = (I, P = {}) => {
2794
+ const [J, j] = H(0), Q = (k, P = {}) => {
2792
2795
  if (!x.length) return 0;
2793
- const X = L[I];
2796
+ const X = N[k];
2794
2797
  if (!X || !X.current || !g.current) return 0;
2795
2798
  const Y = vt(
2796
- I / Math.max(1, x.length - 1),
2799
+ k / Math.max(1, x.length - 1),
2797
2800
  [0, 1],
2798
2801
  [0, 1]
2799
2802
  );
2800
- return j(I), g.current.dispatchEvent(
2803
+ return j(k), g.current.dispatchEvent(
2801
2804
  new CustomEvent("udx:customScroll:set", {
2802
2805
  bubbles: !0,
2803
2806
  detail: {
@@ -2807,17 +2810,17 @@ const xe = ({
2807
2810
  }
2808
2811
  })
2809
2812
  ), Y;
2810
- }, D = x.map((I, P) => {
2813
+ }, D = x.map((k, P) => {
2811
2814
  var st;
2812
- const X = (st = I.props) == null ? void 0 : st.onClick, Y = (M) => {
2815
+ const X = (st = k.props) == null ? void 0 : st.onClick, Y = (M) => {
2813
2816
  X == null || X(M);
2814
2817
  }, K = () => j(P);
2815
2818
  return U.cloneElement(
2816
- I,
2819
+ k,
2817
2820
  {
2818
2821
  width: W[P],
2819
2822
  outputRange: l,
2820
- ref: L[P],
2823
+ ref: N[P],
2821
2824
  key: P,
2822
2825
  index: P,
2823
2826
  role: "option",
@@ -2827,12 +2830,12 @@ const xe = ({
2827
2830
  onFocus: K
2828
2831
  }
2829
2832
  );
2830
- }), B = (I) => {
2833
+ }), B = (k) => {
2831
2834
  var P;
2832
- if (I.scrollTotal > 0) {
2833
- (P = k.current) == null || P.stop();
2834
- const X = E.current ?? 0, Y = I.scrollProgress ?? 0;
2835
- k.current = $e(X, Y, {
2835
+ if (k.scrollTotal > 0) {
2836
+ (P = I.current) == null || P.stop();
2837
+ const X = E.current ?? 0, Y = k.scrollProgress ?? 0;
2838
+ I.current = $e(X, Y, {
2836
2839
  // Spring tuning to add a bit of inertia and smoothness
2837
2840
  type: "spring",
2838
2841
  stiffness: 260,
@@ -2840,14 +2843,14 @@ const xe = ({
2840
2843
  mass: 0.6,
2841
2844
  restDelta: 5e-4,
2842
2845
  onUpdate: (K) => {
2843
- E.current = K, S({ ...I, scrollProgress: K });
2846
+ E.current = K, S({ ...k, scrollProgress: K });
2844
2847
  }
2845
2848
  });
2846
2849
  }
2847
2850
  };
2848
2851
  O(() => {
2849
- const I = $();
2850
- F(I);
2852
+ const k = $();
2853
+ F(k);
2851
2854
  }, [p]);
2852
2855
  const q = T(i);
2853
2856
  O(() => {
@@ -2856,21 +2859,21 @@ const xe = ({
2856
2859
  const Z = T(null);
2857
2860
  O(() => {
2858
2861
  var it;
2859
- const I = q.current;
2860
- if (!I || !(f != null && f.current)) return;
2862
+ const k = q.current;
2863
+ if (!k || !(f != null && f.current)) return;
2861
2864
  const P = x.length;
2862
2865
  if (P <= 0) return;
2863
2866
  const X = ((it = f.current) == null ? void 0 : it.clientWidth) ?? 0, Y = l[1], K = E.current ?? (p == null ? void 0 : p.scrollProgress) ?? 0, st = (X + o) / (Y + o), M = Math.max(1, Math.floor(st)), G = Math.max(1, Math.round(M * (2 / 3))), rt = Math.min(
2864
2867
  Math.max(0, V),
2865
2868
  Math.max(0, P - 1)
2866
- ), ct = rt > 0, It = rt < P - 1, pt = {
2869
+ ), ct = rt > 0, kt = rt < P - 1, pt = {
2867
2870
  total: P,
2868
2871
  selectedIndex: rt,
2869
2872
  visibleApprox: st,
2870
2873
  visibleFull: M,
2871
2874
  stepHalf: G,
2872
2875
  canPrev: ct,
2873
- canNext: It,
2876
+ canNext: kt,
2874
2877
  scrollProgress: K,
2875
2878
  viewportWidth: X,
2876
2879
  itemMaxWidth: Y,
@@ -2884,49 +2887,49 @@ const xe = ({
2884
2887
  break;
2885
2888
  }
2886
2889
  }
2887
- _ && (Z.current = pt, I(pt));
2890
+ _ && (Z.current = pt, k(pt));
2888
2891
  }, [f, x.length, V, p, o, l]), O(() => () => {
2889
- var I;
2890
- (I = k.current) == null || I.stop();
2892
+ var k;
2893
+ (k = I.current) == null || k.stop();
2891
2894
  }, []);
2892
2895
  const [at, ut] = H(0);
2893
2896
  Yt(() => {
2894
- let I = l[1];
2895
- p && I > p.scrollVisible && (I = p.scrollVisible);
2896
- const P = (I + o) * D.length / y;
2897
+ let k = l[1];
2898
+ p && k > p.scrollVisible && (k = p.scrollVisible);
2899
+ const P = (k + o) * D.length / y;
2897
2900
  ut(P);
2898
- }, [f, L, p]);
2899
- const A = (I) => {
2901
+ }, [f, N, p]);
2902
+ const A = (k) => {
2900
2903
  if (!x.length) return;
2901
2904
  const P = J ?? V;
2902
- switch (I.key) {
2905
+ switch (k.key) {
2903
2906
  case "ArrowLeft":
2904
- I.preventDefault(), Q(Math.max(0, P - 1));
2907
+ k.preventDefault(), Q(Math.max(0, P - 1));
2905
2908
  break;
2906
2909
  case "ArrowRight":
2907
- I.preventDefault(), Q(Math.min(x.length - 1, P + 1));
2910
+ k.preventDefault(), Q(Math.min(x.length - 1, P + 1));
2908
2911
  break;
2909
2912
  case "Home":
2910
- I.preventDefault(), Q(0);
2913
+ k.preventDefault(), Q(0);
2911
2914
  break;
2912
2915
  case "End":
2913
- I.preventDefault(), Q(x.length - 1);
2916
+ k.preventDefault(), Q(x.length - 1);
2914
2917
  break;
2915
2918
  case "Enter":
2916
2919
  case " ":
2917
- I.preventDefault(), Q(P);
2920
+ k.preventDefault(), Q(P);
2918
2921
  break;
2919
2922
  }
2920
2923
  };
2921
2924
  return O(() => {
2922
- const I = f.current;
2923
- if (!I) return;
2925
+ const k = f.current;
2926
+ if (!k) return;
2924
2927
  const P = (X) => {
2925
2928
  const Y = X.detail;
2926
2929
  Y && typeof Y.index == "number" && Q(Y.index);
2927
2930
  };
2928
- return I.addEventListener("udx:carousel:centerIndex", P), () => {
2929
- I.removeEventListener(
2931
+ return k.addEventListener("udx:carousel:centerIndex", P), () => {
2932
+ k.removeEventListener(
2930
2933
  "udx:carousel:centerIndex",
2931
2934
  P
2932
2935
  );
@@ -2978,11 +2981,11 @@ var Wn = {
2978
2981
  prefix: "fas",
2979
2982
  iconName: "check",
2980
2983
  icon: [448, 512, [10003, 10004], "f00c", "M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]
2981
- }, Lt = {
2984
+ }, Nt = {
2982
2985
  prefix: "fas",
2983
2986
  iconName: "xmark",
2984
2987
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
2985
- }, An = Lt, Bn = {
2988
+ }, An = Nt, Bn = {
2986
2989
  prefix: "fas",
2987
2990
  iconName: "bars",
2988
2991
  icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
@@ -3013,20 +3016,20 @@ const Xt = ({
3013
3016
  throw new Error(
3014
3017
  "Chip component requires either a label prop or children content"
3015
3018
  );
3016
- const W = s ? "a" : "button", F = T(null), p = i || F, [S, E] = U.useState(c), [k, $] = U.useState(!1), [L, V] = H(x && y), [N, J] = U.useState(!1), [j, Q] = U.useState(
3019
+ const W = s ? "a" : "button", F = T(null), p = i || F, [S, E] = U.useState(c), [I, $] = U.useState(!1), [N, V] = H(x && y), [L, J] = U.useState(!1), [j, Q] = U.useState(
3017
3020
  typeof r == "string" ? r : ""
3018
3021
  ), D = U.useRef(null);
3019
3022
  O(() => {
3020
3023
  E(c);
3021
3024
  }, [c]), O(() => {
3022
- if (x && V(x), y && k) {
3025
+ if (x && V(x), y && I) {
3023
3026
  const M = setTimeout(() => {
3024
- g != null && g.draggable && N || V(!0);
3027
+ g != null && g.draggable && L || V(!0);
3025
3028
  }, 1e3);
3026
3029
  return () => clearTimeout(M);
3027
- } else k || V(!1);
3028
- }, [k, y, N, g, j]), O(() => {
3029
- if (L) {
3030
+ } else I || V(!1);
3031
+ }, [I, y, L, g, j]), O(() => {
3032
+ if (N) {
3030
3033
  Q(typeof r == "string" ? r : "");
3031
3034
  const M = K.current || D.current;
3032
3035
  if (M) {
@@ -3037,7 +3040,7 @@ const Xt = ({
3037
3040
  rt == null || rt.removeAllRanges(), rt == null || rt.addRange(G);
3038
3041
  }
3039
3042
  }
3040
- }, [L]), w = { duration: 0.3, ...w };
3043
+ }, [N]), w = { duration: 0.3, ...w };
3041
3044
  const B = (M) => {
3042
3045
  e && M.preventDefault(), o ? (E(!S), o(!S)) : l && l(M);
3043
3046
  }, q = !!o || !!u || !!l || !!s || !!y;
@@ -3047,7 +3050,7 @@ const Xt = ({
3047
3050
  onBlur: at,
3048
3051
  onKeyDown: ut,
3049
3052
  onDragStart: A,
3050
- onDragEnd: I,
3053
+ onDragEnd: k,
3051
3054
  onDoubleClick: P,
3052
3055
  ...X
3053
3056
  } = g ?? {}, Y = Xe({
@@ -3063,10 +3066,10 @@ const Xt = ({
3063
3066
  label: r,
3064
3067
  isInteractive: q,
3065
3068
  children: r,
3066
- isFocused: k,
3067
- isDragging: N,
3069
+ isFocused: I,
3070
+ isDragging: L,
3068
3071
  onEditCommit: h,
3069
- isEditing: L
3072
+ isEditing: N
3070
3073
  }), K = T(null), st = () => {
3071
3074
  const M = (j ?? "").trim();
3072
3075
  if (!M) {
@@ -3084,17 +3087,17 @@ const Xt = ({
3084
3087
  className: Y.chip,
3085
3088
  ...X,
3086
3089
  onClick: (M) => {
3087
- L || B(M);
3090
+ N || B(M);
3088
3091
  },
3089
3092
  draggable: !e && !!(g != null && g.draggable),
3090
3093
  onDragStart: (M) => {
3091
3094
  !e && (g != null && g.draggable) && J(!0), A == null || A(M);
3092
3095
  },
3093
3096
  onDragEnd: (M) => {
3094
- g != null && g.draggable && J(!1), I == null || I(M);
3097
+ g != null && g.draggable && J(!1), k == null || k(M);
3095
3098
  },
3096
3099
  onDoubleClick: (M) => {
3097
- !e && y && !L && (d == null || d(), M.preventDefault(), M.stopPropagation()), P == null || P(M);
3100
+ !e && y && !N && (d == null || d(), M.preventDefault(), M.stopPropagation()), P == null || P(M);
3098
3101
  },
3099
3102
  onFocus: (M) => {
3100
3103
  q && $(!0), Z == null || Z(M);
@@ -3104,11 +3107,11 @@ const Xt = ({
3104
3107
  },
3105
3108
  onKeyDown: (M) => {
3106
3109
  const G = M.key;
3107
- if (!e && L) {
3110
+ if (!e && N) {
3108
3111
  G === "Enter" ? (M.preventDefault(), st()) : G === "Escape" ? (M.preventDefault(), f == null || f()) : u && (j == null ? void 0 : j.trim()) === "" && (G === "Backspace" || G === "Delete" || G === "Del") && (M.preventDefault(), M.stopPropagation(), u());
3109
3112
  return;
3110
3113
  }
3111
- if (!e && k) {
3114
+ if (!e && I) {
3112
3115
  if (y && !o && (G === "F2" || G === "Enter")) {
3113
3116
  M.preventDefault(), d == null || d();
3114
3117
  return;
@@ -3126,7 +3129,7 @@ const Xt = ({
3126
3129
  "aria-pressed": o ? S : void 0,
3127
3130
  style: { transition: w.duration + "s" },
3128
3131
  children: [
3129
- q && !e && !L && /* @__PURE__ */ m(
3132
+ q && !e && !N && /* @__PURE__ */ m(
3130
3133
  yt,
3131
3134
  {
3132
3135
  style: { transition: w.duration + "s" },
@@ -3143,7 +3146,7 @@ const Xt = ({
3143
3146
  "span",
3144
3147
  {
3145
3148
  ref: K,
3146
- contentEditable: !!y && !!L,
3149
+ contentEditable: !!y && !!N,
3147
3150
  suppressContentEditableWarning: !0,
3148
3151
  className: Y.label,
3149
3152
  role: y ? "textbox" : void 0,
@@ -3153,22 +3156,22 @@ const Xt = ({
3153
3156
  Q(G), b == null || b(G);
3154
3157
  },
3155
3158
  onBlur: (M) => {
3156
- y && L && st();
3159
+ y && N && st();
3157
3160
  },
3158
3161
  onKeyDown: (M) => {
3159
- if (y && L && M.key === "Enter") {
3162
+ if (y && N && M.key === "Enter") {
3160
3163
  M.preventDefault(), M.stopPropagation(), st();
3161
3164
  return;
3162
3165
  }
3163
- y && L && M.key === "Escape" && (M.preventDefault(), M.stopPropagation(), f == null || f());
3166
+ y && N && M.key === "Escape" && (M.preventDefault(), M.stopPropagation(), f == null || f());
3164
3167
  },
3165
3168
  children: r
3166
3169
  }
3167
3170
  ),
3168
- u && !L && /* @__PURE__ */ m(
3171
+ u && !N && /* @__PURE__ */ m(
3169
3172
  dt,
3170
3173
  {
3171
- icon: Lt,
3174
+ icon: Nt,
3172
3175
  className: Y.trailingIcon,
3173
3176
  onMouseDown: (M) => {
3174
3177
  M.preventDefault(), M.stopPropagation();
@@ -3239,7 +3242,7 @@ const Wr = ({
3239
3242
  [a, l]
3240
3243
  ), b = U.useCallback(
3241
3244
  (p) => {
3242
- f((S) => S.filter((E, k) => k !== p));
3245
+ f((S) => S.filter((E, I) => I !== p));
3243
3246
  },
3244
3247
  [f]
3245
3248
  ), w = Ue({
@@ -3252,8 +3255,8 @@ const Wr = ({
3252
3255
  h.current = !0;
3253
3256
  const S = {
3254
3257
  label: p
3255
- }, E = y(S), k = [...l, S];
3256
- a == null || a(k), requestAnimationFrame(() => {
3258
+ }, E = y(S), I = [...l, S];
3259
+ a == null || a(I), requestAnimationFrame(() => {
3257
3260
  g(E), h.current = !1;
3258
3261
  });
3259
3262
  },
@@ -3268,8 +3271,8 @@ const Wr = ({
3268
3271
  if (S !== -1) {
3269
3272
  const E = d.current[S];
3270
3273
  (p = E == null ? void 0 : E.focus) == null || p.call(E);
3271
- const k = o.current, $ = E.offsetLeft + E.offsetWidth / 2 - k.offsetWidth / 2;
3272
- k.scrollTo({ left: $, behavior: "smooth" });
3274
+ const I = o.current, $ = E.offsetLeft + E.offsetWidth / 2 - I.offsetWidth / 2;
3275
+ I.scrollTo({ left: $, behavior: "smooth" });
3273
3276
  }
3274
3277
  }
3275
3278
  }, [x, l, y]);
@@ -3291,52 +3294,52 @@ const Wr = ({
3291
3294
  onKeyDown: (p) => {
3292
3295
  var V;
3293
3296
  if (t !== "input") return;
3294
- const S = p.key, k = p.target === p.currentTarget;
3297
+ const S = p.key, I = p.target === p.currentTarget;
3295
3298
  if (!c) return;
3296
- const $ = document.activeElement, L = d.current.findIndex(
3297
- (N) => N === $
3299
+ const $ = document.activeElement, N = d.current.findIndex(
3300
+ (L) => L === $
3298
3301
  );
3299
3302
  if (S === "ArrowLeft") {
3300
3303
  p.preventDefault();
3301
- const N = L > 0 ? L - 1 : l.length - 1, J = y(l[N]);
3304
+ const L = N > 0 ? N - 1 : l.length - 1, J = y(l[L]);
3302
3305
  g(J);
3303
3306
  return;
3304
3307
  }
3305
3308
  if (S === "ArrowRight") {
3306
3309
  p.preventDefault();
3307
- const N = L >= 0 ? (L + 1) % Math.max(1, l.length) : 0, J = y(l[N]);
3310
+ const L = N >= 0 ? (N + 1) % Math.max(1, l.length) : 0, J = y(l[L]);
3308
3311
  g(J);
3309
3312
  return;
3310
3313
  }
3311
3314
  if (S === "Home") {
3312
3315
  p.preventDefault();
3313
- const N = y(l[0]);
3314
- g(N);
3316
+ const L = y(l[0]);
3317
+ g(L);
3315
3318
  return;
3316
3319
  }
3317
3320
  if (S === "End") {
3318
3321
  p.preventDefault();
3319
- const N = y(l[l.length - 1]);
3320
- g(N);
3322
+ const L = y(l[l.length - 1]);
3323
+ g(L);
3321
3324
  return;
3322
3325
  }
3323
- if (k && S === "Backspace") {
3326
+ if (I && S === "Backspace") {
3324
3327
  if (p.preventDefault(), l.length > 0) {
3325
- const N = d.current[l.length - 1];
3326
- (V = N == null ? void 0 : N.focus) == null || V.call(N);
3328
+ const L = d.current[l.length - 1];
3329
+ (V = L == null ? void 0 : L.focus) == null || V.call(L);
3327
3330
  }
3328
3331
  return;
3329
3332
  }
3330
3333
  },
3331
3334
  children: [
3332
3335
  l.map((p, S) => {
3333
- const E = y(p), k = t === "input", $ = k ? {
3336
+ const E = y(p), I = t === "input", $ = I ? {
3334
3337
  editable: !0,
3335
3338
  editing: x === E,
3336
- onEditCommit: (L) => {
3339
+ onEditCommit: (N) => {
3337
3340
  i(!0), f(
3338
3341
  (V) => V.map(
3339
- (N, J) => J === S ? { ...N, label: L } : N
3342
+ (L, J) => J === S ? { ...L, label: N } : L
3340
3343
  )
3341
3344
  );
3342
3345
  },
@@ -3345,9 +3348,9 @@ const Wr = ({
3345
3348
  },
3346
3349
  onChange: () => {
3347
3350
  if (d.current.length == S + 1) {
3348
- const L = o.current;
3351
+ const N = o.current;
3349
3352
  requestAnimationFrame(() => {
3350
- L.scrollTo({ left: L.scrollWidth, behavior: "smooth" });
3353
+ N.scrollTo({ left: N.scrollWidth, behavior: "smooth" });
3351
3354
  });
3352
3355
  }
3353
3356
  }
@@ -3355,7 +3358,7 @@ const Wr = ({
3355
3358
  return /* @__PURE__ */ m(
3356
3359
  Xt,
3357
3360
  {
3358
- ref: (L) => d.current[S] = L,
3361
+ ref: (N) => d.current[S] = N,
3359
3362
  label: p.label ?? "",
3360
3363
  icon: p.icon,
3361
3364
  activated: p.activated,
@@ -3364,15 +3367,15 @@ const Wr = ({
3364
3367
  href: p.href,
3365
3368
  draggable: s,
3366
3369
  ...$,
3367
- onToggle: p.activated === void 0 ? void 0 : (L) => f(
3370
+ onToggle: p.activated === void 0 ? void 0 : (N) => f(
3368
3371
  (V) => V.map(
3369
- (N, J) => J === S ? { ...N, activated: L } : N
3372
+ (L, J) => J === S ? { ...L, activated: N } : L
3370
3373
  )
3371
3374
  ),
3372
3375
  onBlur: () => {
3373
3376
  x === E && g(null);
3374
3377
  },
3375
- onRemove: k ? () => {
3378
+ onRemove: I ? () => {
3376
3379
  i(!0), b(S);
3377
3380
  } : void 0
3378
3381
  },
@@ -3428,7 +3431,7 @@ const Wr = ({
3428
3431
  ]
3429
3432
  }
3430
3433
  );
3431
- }, Le = ({
3434
+ }, Ne = ({
3432
3435
  variant: t = "plain",
3433
3436
  buttons: e,
3434
3437
  className: n,
@@ -3447,13 +3450,13 @@ const Wr = ({
3447
3450
  Array.isArray(i) || (i = [i]), e && !Array.isArray(e) && (e = [e]);
3448
3451
  const d = T(null), h = o || d, [f, b] = H(null), [w] = H(gt()), [C, x] = H(!1), g = T(null), W = T(null);
3449
3452
  O(() => {
3450
- const N = (J) => {
3453
+ const L = (J) => {
3451
3454
  b(J.detail);
3452
3455
  };
3453
- return document.addEventListener("tooltip-update", N), () => {
3456
+ return document.addEventListener("tooltip-update", L), () => {
3454
3457
  document.removeEventListener(
3455
3458
  "tooltip-update",
3456
- N
3459
+ L
3457
3460
  );
3458
3461
  };
3459
3462
  }, []), O(() => {
@@ -3468,46 +3471,46 @@ const Wr = ({
3468
3471
  }, [f, w]);
3469
3472
  const F = () => {
3470
3473
  if (i.includes("hover")) {
3471
- const N = new CustomEvent("tooltip-update", { detail: w });
3472
- document.dispatchEvent(N);
3474
+ const L = new CustomEvent("tooltip-update", { detail: w });
3475
+ document.dispatchEvent(L);
3473
3476
  }
3474
3477
  }, p = () => {
3475
3478
  if (i.includes("hover")) {
3476
- const N = new CustomEvent("tooltip-update", { detail: null });
3477
- document.dispatchEvent(N);
3479
+ const L = new CustomEvent("tooltip-update", { detail: null });
3480
+ document.dispatchEvent(L);
3478
3481
  }
3479
3482
  }, S = () => {
3480
3483
  if (i.includes("click")) {
3481
- const N = new CustomEvent("tooltip-update", {
3484
+ const L = new CustomEvent("tooltip-update", {
3482
3485
  detail: C ? null : w
3483
3486
  });
3484
- document.dispatchEvent(N);
3487
+ document.dispatchEvent(L);
3485
3488
  }
3486
3489
  }, E = () => {
3487
3490
  if (i.includes("focus")) {
3488
- const N = new CustomEvent("tooltip-update", { detail: w });
3489
- document.dispatchEvent(N);
3491
+ const L = new CustomEvent("tooltip-update", { detail: w });
3492
+ document.dispatchEvent(L);
3490
3493
  }
3491
- }, k = () => {
3494
+ }, I = () => {
3492
3495
  if (i.includes("focus")) {
3493
- const N = new CustomEvent("tooltip-update", { detail: null });
3494
- document.dispatchEvent(N);
3496
+ const L = new CustomEvent("tooltip-update", { detail: null });
3497
+ document.dispatchEvent(L);
3495
3498
  }
3496
3499
  };
3497
3500
  O(() => {
3498
3501
  if (h != null && h.current) {
3499
- const N = h.current;
3500
- return N.addEventListener("mouseenter", F), N.addEventListener("mouseleave", p), N.addEventListener("click", S), N.addEventListener("focus", E), N.addEventListener("blur", k), () => {
3501
- N.removeEventListener("mouseenter", F), N.removeEventListener("mouseleave", p), N.removeEventListener("click", S), N.removeEventListener("focus", E), N.removeEventListener("blur", k);
3502
+ const L = h.current;
3503
+ return L.addEventListener("mouseenter", F), L.addEventListener("mouseleave", p), L.addEventListener("click", S), L.addEventListener("focus", E), L.addEventListener("blur", I), () => {
3504
+ L.removeEventListener("mouseenter", F), L.removeEventListener("mouseleave", p), L.removeEventListener("click", S), L.removeEventListener("focus", E), L.removeEventListener("blur", I);
3502
3505
  };
3503
3506
  }
3504
3507
  }, [h, i, w, C]);
3505
- const $ = !o && wt(s) ? Nt(s, { ref: d }) : s;
3508
+ const $ = !o && wt(s) ? Lt(s, { ref: d }) : s;
3506
3509
  if (!l && typeof window < "u" && h != null && h.current && !l) {
3507
- const N = h.current.getBoundingClientRect(), J = window.innerWidth, j = window.innerHeight, Q = N.left / J, D = N.top / j;
3510
+ const L = h.current.getBoundingClientRect(), J = window.innerWidth, j = window.innerHeight, Q = L.left / J, D = L.top / j;
3508
3511
  t === "plain" ? Q < 1 / 3 ? l = "right" : Q > 2 / 3 ? l = "left" : l = D > 0.5 ? "top" : "bottom" : Q < 1 / 2 && D < 1 / 2 ? l = "bottom-right" : Q > 1 / 2 && D < 1 / 2 ? l = "bottom-left" : Q > 1 / 2 && D > 1 / 2 ? l = "top-left" : Q < 1 / 2 && D > 1 / 2 && (l = "top-right");
3509
3512
  }
3510
- const L = on({
3513
+ const N = on({
3511
3514
  variant: t,
3512
3515
  buttons: e,
3513
3516
  className: n,
@@ -3529,7 +3532,7 @@ const Wr = ({
3529
3532
  };
3530
3533
  return /* @__PURE__ */ z(ft, { children: [
3531
3534
  $,
3532
- /* @__PURE__ */ m(ht, { children: C && /* @__PURE__ */ m(Ln, { targetRef: h, children: /* @__PURE__ */ m(
3535
+ /* @__PURE__ */ m(ht, { children: C && /* @__PURE__ */ m(Nn, { targetRef: h, children: /* @__PURE__ */ m(
3533
3536
  tt.div,
3534
3537
  {
3535
3538
  initial: "close",
@@ -3537,19 +3540,19 @@ const Wr = ({
3537
3540
  animate: "open",
3538
3541
  transition: { duration: u.duration },
3539
3542
  exit: "close",
3540
- className: L.toolTip,
3543
+ className: N.toolTip,
3541
3544
  ...y,
3542
3545
  onMouseEnter: F,
3543
3546
  onMouseLeave: p,
3544
- children: /* @__PURE__ */ z("div", { className: L.container, children: [
3545
- r && /* @__PURE__ */ m("div", { className: L.subHead, children: r }),
3546
- /* @__PURE__ */ m("div", { className: L.supportingText, children: a }),
3547
- e && /* @__PURE__ */ m("div", { className: L.actions, children: Array.isArray(e) && e.map((N, J) => /* @__PURE__ */ m(
3547
+ children: /* @__PURE__ */ z("div", { className: N.container, children: [
3548
+ r && /* @__PURE__ */ m("div", { className: N.subHead, children: r }),
3549
+ /* @__PURE__ */ m("div", { className: N.supportingText, children: a }),
3550
+ e && /* @__PURE__ */ m("div", { className: N.actions, children: Array.isArray(e) && e.map((L, J) => /* @__PURE__ */ m(
3548
3551
  xe,
3549
3552
  {
3550
3553
  size: "small",
3551
3554
  variant: "text",
3552
- ...N
3555
+ ...L
3553
3556
  },
3554
3557
  J
3555
3558
  )) })
@@ -3623,7 +3626,7 @@ const Wr = ({
3623
3626
  className: h.fab,
3624
3627
  children: [
3625
3628
  /* @__PURE__ */ m(
3626
- Le,
3629
+ Ne,
3627
3630
  {
3628
3631
  trigger: o ? null : void 0,
3629
3632
  text: e,
@@ -3711,7 +3714,7 @@ const Wr = ({
3711
3714
  size: i,
3712
3715
  children: r,
3713
3716
  ...x
3714
- }), E = T(null), k = d || E;
3717
+ }), E = T(null), I = d || E;
3715
3718
  return w = { duration: 0.3, ...w }, /* @__PURE__ */ z(
3716
3719
  p,
3717
3720
  {
@@ -3723,12 +3726,12 @@ const Wr = ({
3723
3726
  ...x,
3724
3727
  title: void 0,
3725
3728
  onClick: F,
3726
- ref: k,
3729
+ ref: I,
3727
3730
  children: [
3728
3731
  /* @__PURE__ */ m(
3729
- Le,
3732
+ Ne,
3730
3733
  {
3731
- targetRef: k,
3734
+ targetRef: I,
3732
3735
  trigger: n ? null : void 0,
3733
3736
  text: s
3734
3737
  }
@@ -3781,10 +3784,10 @@ const Wr = ({
3781
3784
  ...h
3782
3785
  }) => {
3783
3786
  c = { duration: 0.3, ease: "easeInOut", ...c };
3784
- const f = T(null), b = o || f, w = typeof u == "boolean", [C, x] = H(y), g = w ? u : C, W = (L) => {
3785
- w || x(L), d == null || d(L);
3787
+ const f = T(null), b = o || f, w = typeof u == "boolean", [C, x] = H(y), g = w ? u : C, W = (N) => {
3788
+ w || x(N), d == null || d(N);
3786
3789
  }, F = U.Children.toArray(i).filter(
3787
- (L) => U.isValidElement(L) && L.type === xe
3790
+ (N) => U.isValidElement(N) && N.type === xe
3788
3791
  ), p = ze({
3789
3792
  href: r,
3790
3793
  icon: a,
@@ -3796,7 +3799,7 @@ const Wr = ({
3796
3799
  transition: c,
3797
3800
  children: e,
3798
3801
  open: g
3799
- }), S = tt.create($t), E = tt.create(Et), k = (L) => /* @__PURE__ */ m(
3802
+ }), S = tt.create($t), E = tt.create(Et), I = (N) => /* @__PURE__ */ m(
3800
3803
  S,
3801
3804
  {
3802
3805
  icon: a,
@@ -3815,15 +3818,15 @@ const Wr = ({
3815
3818
  background: { duration: c.duration, ease: "easeInOut" },
3816
3819
  ...c
3817
3820
  },
3818
- ...L
3821
+ ...N
3819
3822
  }
3820
3823
  ), [$] = H(gt());
3821
3824
  return /* @__PURE__ */ z("div", { className: p.fabMenu, ref: b, ...h, children: [
3822
3825
  /* @__PURE__ */ m(ht, { children: g && /* @__PURE__ */ m("div", { className: p.actions, role: "menu", "aria-hidden": !g, children: (() => {
3823
- const L = F.length;
3824
- return F.map((V, N) => {
3826
+ const N = F.length;
3827
+ return F.map((V, L) => {
3825
3828
  V.props;
3826
- const J = L - 1 - N, j = ((c == null ? void 0 : c.delay) ?? 0) + J * 0.06, Q = {
3829
+ const J = N - 1 - L, j = ((c == null ? void 0 : c.delay) ?? 0) + J * 0.06, Q = {
3827
3830
  open: {
3828
3831
  overflow: "visible",
3829
3832
  opacity: 1,
@@ -3860,7 +3863,7 @@ const Wr = ({
3860
3863
  children: U.cloneElement(
3861
3864
  V,
3862
3865
  {
3863
- key: N,
3866
+ key: L,
3864
3867
  shape: "rounded",
3865
3868
  variant: "filled",
3866
3869
  className: () => ({
@@ -3882,11 +3885,11 @@ const Wr = ({
3882
3885
  );
3883
3886
  });
3884
3887
  })() }) }),
3885
- k({
3888
+ I({
3886
3889
  className: "invisible pointer-events-none"
3887
3890
  }),
3888
3891
  /* @__PURE__ */ z("div", { className: "absolute right-0 top-0", children: [
3889
- !g && k({
3892
+ !g && I({
3890
3893
  className: "",
3891
3894
  layout: !0,
3892
3895
  layoutId: "fab-menu" + $
@@ -3958,7 +3961,7 @@ const Wr = ({
3958
3961
  }, d = (D = !1) => D ? l : l == 1 / 0 ? o[(o == null ? void 0 : o.length) - 1].value : l, h = (D = !1) => D ? a : a == -1 / 0 ? o[0].value : a, f = (D) => {
3959
3962
  const B = h(!1);
3960
3963
  return (d(!1) - B) * D / 100 + B;
3961
- }, [b, w] = H(!1), C = T(null), x = c || C, [g, W] = H(r), [F, p] = H(y(r)), [S, E] = H(!1), k = (D) => {
3964
+ }, [b, w] = H(!1), C = T(null), x = c || C, [g, W] = H(r), [F, p] = H(y(r)), [S, E] = H(!1), I = (D) => {
3962
3965
  E(!0), w(!0), V(D);
3963
3966
  }, $ = () => {
3964
3967
  E(!1), w(!1);
@@ -3966,7 +3969,7 @@ const Wr = ({
3966
3969
  O(() => (S ? (window.addEventListener("mouseup", $), window.addEventListener("mousemove", V), window.addEventListener("touchend", $), window.addEventListener("touchmove", V)) : (window.removeEventListener("mouseup", $), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", $), window.removeEventListener("touchmove", V)), () => {
3967
3970
  window.removeEventListener("mouseup", $), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", $), window.removeEventListener("touchmove", V);
3968
3971
  }), [S]);
3969
- const L = Je({
3972
+ const N = Je({
3970
3973
  className: t,
3971
3974
  isChanging: b,
3972
3975
  marks: o,
@@ -3981,9 +3984,9 @@ const Wr = ({
3981
3984
  const B = x == null ? void 0 : x.current;
3982
3985
  if (B) {
3983
3986
  const q = B.getBoundingClientRect().left, at = ((D.type === "touchmove" || D.type === "touchstart" ? D.touches[0].clientX : D.clientX) - q) / B.offsetWidth * 100;
3984
- N({ percent: at });
3987
+ L({ percent: at });
3985
3988
  }
3986
- }, N = ({
3989
+ }, L = ({
3987
3990
  percent: D,
3988
3991
  value: B
3989
3992
  }) => {
@@ -4029,18 +4032,18 @@ const Wr = ({
4029
4032
  switch (D.key) {
4030
4033
  case "ArrowRight":
4031
4034
  if (n)
4032
- N({ value: g + n });
4035
+ L({ value: g + n });
4033
4036
  else if (o) {
4034
4037
  const B = o.find((q) => q.value > g);
4035
- B && N({ value: B.value });
4038
+ B && L({ value: B.value });
4036
4039
  }
4037
4040
  break;
4038
4041
  case "ArrowLeft":
4039
4042
  if (n)
4040
- N({ value: g - n });
4043
+ L({ value: g - n });
4041
4044
  else if (o) {
4042
4045
  const B = o.slice(0).reverse().find((q, Z, at) => g === 1 / 0 ? Z === 1 : q.value < g);
4043
- B && N({ value: B.value });
4046
+ B && L({ value: B.value });
4044
4047
  }
4045
4048
  break;
4046
4049
  default:
@@ -4052,20 +4055,20 @@ const Wr = ({
4052
4055
  "aria-valuemax": d(!0),
4053
4056
  "aria-valuenow": g,
4054
4057
  "aria-valuetext": g.toString(),
4055
- className: L.slider,
4056
- onMouseDown: k,
4058
+ className: N.slider,
4059
+ onMouseDown: I,
4057
4060
  onClick: V,
4058
4061
  ref: x,
4059
- onTouchStart: k,
4062
+ onTouchStart: I,
4060
4063
  onDragStart: (D) => D.preventDefault(),
4061
4064
  ...u,
4062
4065
  children: [
4063
4066
  /* @__PURE__ */ m("input", { type: "hidden", name: s, value: g }),
4064
- /* @__PURE__ */ m("div", { className: L.activeTrack, style: { flex: F / 100 } }),
4065
- /* @__PURE__ */ m("div", { className: L.handle, children: /* @__PURE__ */ m(ht, { children: b && /* @__PURE__ */ m(
4067
+ /* @__PURE__ */ m("div", { className: N.activeTrack, style: { flex: F / 100 } }),
4068
+ /* @__PURE__ */ m("div", { className: N.handle, children: /* @__PURE__ */ m(ht, { children: b && /* @__PURE__ */ m(
4066
4069
  tt.div,
4067
4070
  {
4068
- className: L.valueIndicator,
4071
+ className: N.valueIndicator,
4069
4072
  initial: "hidden",
4070
4073
  animate: "visible",
4071
4074
  exit: "hidden",
@@ -4085,7 +4088,7 @@ const Wr = ({
4085
4088
  /* @__PURE__ */ m(
4086
4089
  "div",
4087
4090
  {
4088
- className: L.inactiveTrack,
4091
+ className: N.inactiveTrack,
4089
4092
  style: { flex: 1 - F / 100 }
4090
4093
  }
4091
4094
  ),
@@ -4099,7 +4102,7 @@ const Wr = ({
4099
4102
  return at <= F - Z ? q = !0 : at >= F + Z && (q = !1), /* @__PURE__ */ m(
4100
4103
  "div",
4101
4104
  {
4102
- className: v(L.dot, {
4105
+ className: v(N.dot, {
4103
4106
  "bg-primary-container": q != null && q,
4104
4107
  "bg-primary": q != null && !q
4105
4108
  }),
@@ -4124,7 +4127,7 @@ const Wr = ({
4124
4127
  extended: a,
4125
4128
  divider: l,
4126
4129
  onExtendedChange: o,
4127
- closeIcon: c = Lt,
4130
+ closeIcon: c = Nt,
4128
4131
  transition: i,
4129
4132
  ...u
4130
4133
  }) => {
@@ -4216,7 +4219,7 @@ const Wr = ({
4216
4219
  message: t,
4217
4220
  className: e,
4218
4221
  duration: n,
4219
- closeIcon: s = Lt,
4222
+ closeIcon: s = Nt,
4220
4223
  onClose: r,
4221
4224
  ...a
4222
4225
  }) => {
@@ -4407,7 +4410,7 @@ const Wr = ({
4407
4410
  ]
4408
4411
  }
4409
4412
  );
4410
- }, At = ke(null), Fr = ({
4413
+ }, At = Ie(null), Fr = ({
4411
4414
  variant: t = "primary",
4412
4415
  onTabSelected: e,
4413
4416
  children: n,
@@ -4545,7 +4548,7 @@ const Wr = ({
4545
4548
  showSupportingText: w = !1,
4546
4549
  ...C
4547
4550
  }) => {
4548
- const [x, g] = H(b ?? ""), [W, F] = H(!1), [p, S] = H(!1), [E, k] = H(
4551
+ const [x, g] = H(b ?? ""), [W, F] = H(!1), [p, S] = H(!1), [E, I] = H(
4549
4552
  w
4550
4553
  );
4551
4554
  O(() => {
@@ -4553,15 +4556,15 @@ const Wr = ({
4553
4556
  }, [b]), O(() => {
4554
4557
  n != null && n.length ? S(!0) : S(!1);
4555
4558
  }, [n]), O(() => {
4556
- w ? k(w) : c != null && c.length ? k(!0) : k(!1);
4559
+ w ? I(w) : c != null && c.length ? I(!0) : I(!1);
4557
4560
  }, [E, c]), O(() => {
4558
4561
  W && S(!1);
4559
4562
  }, [W]);
4560
- const $ = U.useRef(null), L = () => {
4563
+ const $ = U.useRef(null), N = () => {
4561
4564
  $.current && !W && $.current.focus();
4562
4565
  }, V = () => {
4563
4566
  F(!0);
4564
- }, N = (q) => {
4567
+ }, L = (q) => {
4565
4568
  const Z = q.target.value;
4566
4569
  g(Z), S(!1), typeof f == "function" && f(Z);
4567
4570
  }, J = () => {
@@ -4601,7 +4604,7 @@ const Wr = ({
4601
4604
  break;
4602
4605
  }
4603
4606
  return /* @__PURE__ */ z("div", { className: j.textField, ...C, children: [
4604
- /* @__PURE__ */ z("fieldset", { onClick: L, className: j.content, children: [
4607
+ /* @__PURE__ */ z("fieldset", { onClick: N, className: j.content, children: [
4605
4608
  /* @__PURE__ */ m("div", { className: j.stateLayer }),
4606
4609
  u && /* @__PURE__ */ m("div", { className: j.leadingIcon, children: U.isValidElement(u) ? u : /* @__PURE__ */ m(dt, { className: "w-5 h-5", icon: u }) }),
4607
4610
  !(!W && !x.length || t == "filled") && /* @__PURE__ */ m(
@@ -4655,7 +4658,7 @@ const Wr = ({
4655
4658
  {
4656
4659
  ref: $,
4657
4660
  value: x,
4658
- onChange: N,
4661
+ onChange: L,
4659
4662
  className: j.input,
4660
4663
  id: a,
4661
4664
  name: a,
@@ -4772,7 +4775,7 @@ const Wr = ({
4772
4775
  }, [l]);
4773
4776
  const S = r ? "a" : "button", E = ($) => {
4774
4777
  o && o(c ?? null), e && e($);
4775
- }, k = Xn({
4778
+ }, I = Xn({
4776
4779
  isExtended: h,
4777
4780
  extendedOnly: w,
4778
4781
  className: t,
@@ -4801,7 +4804,7 @@ const Wr = ({
4801
4804
  "aria-selected": F,
4802
4805
  ref: W,
4803
4806
  href: r,
4804
- className: k.navigationRailItem,
4807
+ className: I.navigationRailItem,
4805
4808
  onClick: E,
4806
4809
  style: { transition: d.duration + "s", ...b },
4807
4810
  children: [
@@ -4812,13 +4815,13 @@ const Wr = ({
4812
4815
  transition: s == "horizontal" ? d.duration + `s, gap ${d.duration / 2}s ${d.duration - d.duration / 2}s` : d.duration + `s, gap ${d.duration / 3}s ${d.duration - d.duration / 3}s`
4813
4816
  },
4814
4817
  transition: d,
4815
- className: k.container,
4818
+ className: I.container,
4816
4819
  children: [
4817
4820
  /* @__PURE__ */ m(
4818
4821
  yt,
4819
4822
  {
4820
4823
  style: { transition: d.duration + "s" },
4821
- className: k.stateLayer,
4824
+ className: I.stateLayer,
4822
4825
  colorName: v({
4823
4826
  "on-surface": !F,
4824
4827
  "on-secondary-container": F
@@ -4830,7 +4833,7 @@ const Wr = ({
4830
4833
  dt,
4831
4834
  {
4832
4835
  icon: F ? f : a,
4833
- className: k.icon
4836
+ className: I.icon
4834
4837
  }
4835
4838
  ),
4836
4839
  /* @__PURE__ */ m(ht, { children: s == "horizontal" && (() => {
@@ -4840,7 +4843,7 @@ const Wr = ({
4840
4843
  transition: {
4841
4844
  ...d
4842
4845
  }
4843
- }, L = {
4846
+ }, N = {
4844
4847
  width: "auto",
4845
4848
  opacity: 1,
4846
4849
  transition: {
@@ -4855,9 +4858,9 @@ const Wr = ({
4855
4858
  tt.span,
4856
4859
  {
4857
4860
  initial: $,
4858
- animate: L,
4861
+ animate: N,
4859
4862
  exit: $,
4860
- className: k.label,
4863
+ className: I.label,
4861
4864
  children: n
4862
4865
  }
4863
4866
  );
@@ -4875,7 +4878,7 @@ const Wr = ({
4875
4878
  duration: 0
4876
4879
  }
4877
4880
  }
4878
- }, L = {
4881
+ }, N = {
4879
4882
  height: "auto",
4880
4883
  opacity: 1,
4881
4884
  transition: {
@@ -4889,10 +4892,10 @@ const Wr = ({
4889
4892
  return /* @__PURE__ */ m(
4890
4893
  tt.span,
4891
4894
  {
4892
- initial: L,
4893
- animate: L,
4895
+ initial: N,
4896
+ animate: N,
4894
4897
  exit: $,
4895
- className: k.label,
4898
+ className: I.label,
4896
4899
  transition: d,
4897
4900
  children: n
4898
4901
  }
@@ -4935,7 +4938,7 @@ const Wr = ({
4935
4938
  label: "Open menu"
4936
4939
  },
4937
4940
  opened: {
4938
- icon: Lt,
4941
+ icon: Nt,
4939
4942
  label: "Close menu"
4940
4943
  }
4941
4944
  },
@@ -4947,17 +4950,17 @@ const Wr = ({
4947
4950
  const [d, h] = H(null), [f, b] = H(a);
4948
4951
  let w;
4949
4952
  r == 0 || r != null ? w = r : w = d;
4950
- const C = y || h, x = T(null), g = (k) => {
4951
- e == null || e(k);
4953
+ const C = y || h, x = T(null), g = (I) => {
4954
+ e == null || e(I);
4952
4955
  };
4953
- function W(k) {
4956
+ function W(I) {
4954
4957
  const $ = [];
4955
- return Me.forEach(k, (L) => {
4956
- wt(L) && L.type === Ce ? $.push(...W(L.props.children)) : $.push(L);
4958
+ return Me.forEach(I, (N) => {
4959
+ wt(N) && N.type === Ce ? $.push(...W(N.props.children)) : $.push(N);
4957
4960
  }), $;
4958
4961
  }
4959
4962
  const F = W(n), p = F.filter(
4960
- (k) => wt(k) && k.type === $t
4963
+ (I) => wt(I) && I.type === $t
4961
4964
  ), S = zn({
4962
4965
  children: n,
4963
4966
  onItemSelected: e,
@@ -4993,19 +4996,19 @@ const Wr = ({
4993
4996
  icon: f ? o.opened.icon : o == null ? void 0 : o.closed.icon
4994
4997
  }
4995
4998
  ),
4996
- p.length > 0 && Nt(p[0], {
4999
+ p.length > 0 && Lt(p[0], {
4997
5000
  transition: u,
4998
5001
  isExtended: f,
4999
5002
  className: "!shadow-none mx-5 " + p[0].props.className
5000
5003
  })
5001
5004
  ] }),
5002
5005
  /* @__PURE__ */ m("div", { className: S.segments, children: (() => {
5003
- let k = 0;
5004
- return F.map(($) => wt($) && $.type === qn ? Nt(
5006
+ let I = 0;
5007
+ return F.map(($) => wt($) && $.type === qn ? Lt(
5005
5008
  $,
5006
5009
  {
5007
- key: k,
5008
- index: k++,
5010
+ key: I,
5011
+ index: I++,
5009
5012
  // Utilise et incrémente le compteur dédié
5010
5013
  variant: f ? "horizontal" : "vertical",
5011
5014
  selectedItem: w,
@@ -5015,7 +5018,7 @@ const Wr = ({
5015
5018
  extendedOnly: E.current,
5016
5019
  isExtended: f
5017
5020
  }
5018
- ) : wt($) && $.type === $t ? null : wt($) && $.type === Un ? (E.current = !0, f ? Nt($, {}) : null) : $);
5021
+ ) : wt($) && $.type === $t ? null : wt($) && $.type === Un ? (E.current = !0, f ? Lt($, {}) : null) : $);
5019
5022
  })() }),
5020
5023
  /* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
5021
5024
  ]
@@ -5050,19 +5053,19 @@ export {
5050
5053
  an as RippleEffect,
5051
5054
  Br as SideSheet,
5052
5055
  Ar as Slider,
5053
- Ir as SmoothScroll,
5056
+ kr as SmoothScroll,
5054
5057
  Hr as Snackbar,
5055
5058
  yt as State,
5056
5059
  Or as Switch,
5057
- Ln as SyncedFixedWrapper,
5060
+ Nn as SyncedFixedWrapper,
5058
5061
  Tn as Tab,
5059
5062
  Pr as TabGroup,
5060
5063
  Vn as TabPanel,
5061
5064
  Tr as TabPanels,
5062
5065
  Fr as Tabs,
5063
5066
  Vr as TextField,
5064
- kr as ThemeProvider,
5065
- Le as ToolTip,
5067
+ Ir as ThemeProvider,
5068
+ Ne as ToolTip,
5066
5069
  Cr as animateOnScroll,
5067
5070
  ir as buttonStyle,
5068
5071
  or as cardStyle,
@@ -5091,11 +5094,11 @@ export {
5091
5094
  vr as sliderStyle,
5092
5095
  wr as snackbarStyle,
5093
5096
  gr as switchStyle,
5094
- Lr as tabPanelStyle,
5097
+ Nr as tabPanelStyle,
5095
5098
  Sr as tabPanelsStyle,
5096
5099
  br as tabStyle,
5097
5100
  xr as tabsStyle,
5098
- Nr as textFieldStyle,
5101
+ Lr as textFieldStyle,
5099
5102
  Er as toolStyle,
5100
5103
  Pe as useButtonStyle,
5101
5104
  Te as useCardStyle,