neatkit 0.4.1 → 0.4.2

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,19 +1,68 @@
1
1
  "use client";
2
2
  import { jsx as a, jsxs as O, Fragment as je } from "react/jsx-runtime";
3
- import { forwardRef as g, useState as $, createElement as Ae, isValidElement as Ze, Fragment as _e, createContext as qe, useContext as Ne, useRef as D, useCallback as W, useEffect as q, Children as ln, useLayoutEffect as $e, useId as Le, cloneElement as Pe, useReducer as xn, useMemo as Me, version as jn } from "react";
3
+ import { forwardRef as g, useState as $, createElement as Ae, isValidElement as Ze, Fragment as _e, createContext as qe, useContext as Ne, useRef as D, useCallback as W, useEffect as q, Children as ln, useLayoutEffect as $e, useId as Le, cloneElement as Pe, useReducer as In, useMemo as Me, version as jn } from "react";
4
4
  import { createPortal as Zn } from "react-dom";
5
5
  const qn = 36, Cn = [2, 4, 8, 12, 16, 24, 32, 48], dn = {
6
6
  sm: 768,
7
7
  md: 960,
8
8
  lg: 1440,
9
9
  xl: 1920
10
+ }, mr = {
11
+ color: {
12
+ accent: {
13
+ default: "var(--nk-accent)",
14
+ soft: "var(--nk-accent-soft)",
15
+ subtle: "var(--nk-accent-subtle)"
16
+ },
17
+ background: "var(--nk-color-background)",
18
+ surface: "var(--nk-color-surface)",
19
+ text: {
20
+ default: "var(--nk-color-text)",
21
+ muted: "var(--nk-color-text-muted)"
22
+ },
23
+ border: "var(--nk-color-border)",
24
+ emphasis: {
25
+ fill: "var(--nk-color-emphasis-fill)",
26
+ fillForeground: "var(--nk-color-emphasis-fill-foreground)"
27
+ },
28
+ info: {
29
+ foreground: "var(--nk-color-info-foreground)",
30
+ fill: "var(--nk-color-info-fill)",
31
+ fillForeground: "var(--nk-color-info-fill-foreground)"
32
+ },
33
+ success: {
34
+ foreground: "var(--nk-color-success-foreground)",
35
+ fill: "var(--nk-color-success-fill)",
36
+ fillForeground: "var(--nk-color-success-fill-foreground)"
37
+ },
38
+ warning: {
39
+ foreground: "var(--nk-color-warning-foreground)",
40
+ fill: "var(--nk-color-warning-fill)",
41
+ fillForeground: "var(--nk-color-warning-fill-foreground)"
42
+ },
43
+ danger: {
44
+ foreground: "var(--nk-color-danger-foreground)",
45
+ fill: "var(--nk-color-danger-fill)",
46
+ fillForeground: "var(--nk-color-danger-fill-foreground)"
47
+ }
48
+ },
49
+ radius: {
50
+ small: "var(--nk-radius-small)",
51
+ medium: "var(--nk-radius-medium)",
52
+ large: "var(--nk-radius-large)"
53
+ },
54
+ shadow: {
55
+ subtle: "var(--nk-shadow-subtle)",
56
+ medium: "var(--nk-shadow-medium)",
57
+ strong: "var(--nk-shadow-strong)"
58
+ }
10
59
  };
11
60
  ({
12
61
  ...Object.fromEntries(
13
62
  Cn.map((n) => [`--nk-space-${n}`, `${n}px`])
14
63
  )
15
64
  });
16
- function mr(n) {
65
+ function gr(n) {
17
66
  if (typeof n != "number" || !Number.isFinite(n))
18
67
  throw new RangeError("Cell amount must be a finite number.");
19
68
  const t = n * qn;
@@ -21,7 +70,7 @@ function mr(n) {
21
70
  throw new RangeError("Calculated cell value must be finite.");
22
71
  return t;
23
72
  }
24
- function gr(n) {
73
+ function wr(n) {
25
74
  if (!Cn.some((t) => t === n))
26
75
  throw new RangeError(`Unsupported spacing size: ${String(n)}.`);
27
76
  return n;
@@ -31,7 +80,7 @@ function Ce(n) {
31
80
  throw new RangeError(`Unsupported breakpoint: ${String(n)}.`);
32
81
  return dn[n];
33
82
  }
34
- function wr(n) {
83
+ function br(n) {
35
84
  if (typeof n != "number" || !Number.isFinite(n))
36
85
  throw new RangeError("Pixel value must be a finite number.");
37
86
  return `${n}px`;
@@ -47,7 +96,7 @@ const He = g(function(t, e) {
47
96
  children: o
48
97
  }
49
98
  );
50
- }), br = g(function(t, e) {
99
+ }), kr = g(function(t, e) {
51
100
  const {
52
101
  children: o,
53
102
  className: i,
@@ -93,7 +142,7 @@ const yr = g(function(t, e) {
93
142
  size: l = 32,
94
143
  style: s,
95
144
  ...u
96
- } = t, [f, d] = $(), c = !!r && r !== f, p = (o == null ? void 0 : o.trim()) ?? "", v = $n(p), m = typeof l == "number" ? `${l}px` : l, x = p ? { "aria-label": p, role: "img" } : { "aria-hidden": !0, role: void 0 };
145
+ } = t, [f, d] = $(), c = !!r && r !== f, p = (o == null ? void 0 : o.trim()) ?? "", v = $n(p), m = typeof l == "number" ? `${l}px` : l, I = p ? { "aria-label": p, role: "img" } : { "aria-hidden": !0, role: void 0 };
97
146
  function b() {
98
147
  d(r);
99
148
  }
@@ -101,7 +150,7 @@ const yr = g(function(t, e) {
101
150
  "div",
102
151
  {
103
152
  ...u,
104
- ...c ? void 0 : x,
153
+ ...c ? void 0 : I,
105
154
  ref: e,
106
155
  className: ["nk-avatar", i].filter(Boolean).join(" "),
107
156
  "data-palette": Gn(v),
@@ -118,7 +167,7 @@ const yr = g(function(t, e) {
118
167
  ) : /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-avatar__initial", children: v })
119
168
  }
120
169
  );
121
- }), kr = g(function(t, e) {
170
+ }), xr = g(function(t, e) {
122
171
  const {
123
172
  children: o,
124
173
  className: i,
@@ -749,7 +798,7 @@ const yr = g(function(t, e) {
749
798
  )
750
799
  }
751
800
  );
752
- }), yt = g(function(t, e) {
801
+ }), kt = g(function(t, e) {
753
802
  const { height: o = 14, width: i = 14, ...r } = t;
754
803
  return /* @__PURE__ */ a(
755
804
  "svg",
@@ -770,7 +819,7 @@ const yr = g(function(t, e) {
770
819
  )
771
820
  }
772
821
  );
773
- }), kt = g(function(t, e) {
822
+ }), yt = g(function(t, e) {
774
823
  const { height: o = 14, width: i = 14, ...r } = t;
775
824
  return /* @__PURE__ */ O(
776
825
  "svg",
@@ -797,7 +846,7 @@ const yr = g(function(t, e) {
797
846
  ]
798
847
  }
799
848
  );
800
- }), It = g(function(t, e) {
849
+ }), xt = g(function(t, e) {
801
850
  const { height: o = 14, width: i = 14, ...r } = t;
802
851
  return /* @__PURE__ */ a(
803
852
  "svg",
@@ -820,7 +869,7 @@ const yr = g(function(t, e) {
820
869
  )
821
870
  }
822
871
  );
823
- }), xt = g(function(t, e) {
872
+ }), It = g(function(t, e) {
824
873
  const { height: o = 14, width: i = 14, ...r } = t;
825
874
  return /* @__PURE__ */ a(
826
875
  "svg",
@@ -1169,7 +1218,7 @@ const yr = g(function(t, e) {
1169
1218
  mail: Ct,
1170
1219
  github: gt,
1171
1220
  globe: wt,
1172
- linkedin: xt,
1221
+ linkedin: It,
1173
1222
  reddit: Et,
1174
1223
  exit: ht,
1175
1224
  camera: et,
@@ -1202,10 +1251,10 @@ const yr = g(function(t, e) {
1202
1251
  folder: vt,
1203
1252
  file: pt,
1204
1253
  tag: Vt,
1205
- key: It,
1254
+ key: xt,
1206
1255
  git: mt,
1207
- home: yt,
1208
- info: kt,
1256
+ home: kt,
1257
+ info: yt,
1209
1258
  warning: Ot
1210
1259
  }, me = g(function(t, e) {
1211
1260
  const {
@@ -1278,13 +1327,13 @@ const ze = g(function(t, e) {
1278
1327
  onKeyDown: p,
1279
1328
  onMouseMove: v,
1280
1329
  role: m,
1281
- shape: x,
1330
+ shape: I,
1282
1331
  tabIndex: b,
1283
1332
  textAlignment: w = "center",
1284
1333
  tone: M,
1285
1334
  variant: _ = "primary",
1286
1335
  ...R
1287
- } = t, k = o ?? "button", C = l || d, I = !!u && !rn(i), N = k === "a" && "href" in R && typeof R.href == "string", T = typeof k == "string" && k !== "button" && !N, z = (P) => {
1336
+ } = t, y = o ?? "button", C = l || d, x = !!u && !rn(i), N = y === "a" && "href" in R && typeof R.href == "string", T = typeof y == "string" && y !== "button" && !N, z = (P) => {
1288
1337
  if (C) {
1289
1338
  P.preventDefault(), P.stopPropagation();
1290
1339
  return;
@@ -1298,12 +1347,12 @@ const ze = g(function(t, e) {
1298
1347
  }, H = (P) => {
1299
1348
  const A = p;
1300
1349
  A == null || A(P), !(P.defaultPrevented || C || !T || P.key !== "Enter" && P.key !== " ") && (P.preventDefault(), P.currentTarget.click());
1301
- }, E = k === "button" ? {
1350
+ }, E = y === "button" ? {
1302
1351
  disabled: C,
1303
1352
  type: R.type ?? "button"
1304
- } : { "aria-disabled": C || void 0 }, U = N && C ? { href: void 0 } : void 0, S = N && C ? m ?? "link" : T ? m ?? "button" : m, y = k === "button" ? b : N && C ? void 0 : C ? -1 : T ? b ?? 0 : b;
1353
+ } : { "aria-disabled": C || void 0 }, U = N && C ? { href: void 0 } : void 0, S = N && C ? m ?? "link" : T ? m ?? "button" : m, k = y === "button" ? b : N && C ? void 0 : C ? -1 : T ? b ?? 0 : b;
1305
1354
  return Ae(
1306
- k,
1355
+ y,
1307
1356
  {
1308
1357
  ...R,
1309
1358
  ...E,
@@ -1312,15 +1361,15 @@ const ze = g(function(t, e) {
1312
1361
  "aria-busy": d || void 0,
1313
1362
  className: ["nk-button", r].filter(Boolean).join(" "),
1314
1363
  "data-full-width": s || void 0,
1315
- "data-icon-only": I || void 0,
1316
- "data-shape": x,
1364
+ "data-icon-only": x || void 0,
1365
+ "data-shape": I,
1317
1366
  "data-tone": M,
1318
1367
  "data-variant": _,
1319
1368
  onClick: z,
1320
1369
  onKeyDown: T ? H : p,
1321
1370
  onMouseMove: Z,
1322
1371
  role: S,
1323
- tabIndex: y
1372
+ tabIndex: k
1324
1373
  },
1325
1374
  /* @__PURE__ */ O(je, { children: [
1326
1375
  /* @__PURE__ */ O(
@@ -1404,7 +1453,7 @@ function Ft() {
1404
1453
  return Ne(_n);
1405
1454
  }
1406
1455
  const Wt = g(function(t, e) {
1407
- var I;
1456
+ var x;
1408
1457
  const {
1409
1458
  "aria-invalid": o,
1410
1459
  checked: i,
@@ -1418,8 +1467,8 @@ const Wt = g(function(t, e) {
1418
1467
  required: p = !1,
1419
1468
  style: v,
1420
1469
  value: m = "on",
1421
- ...x
1422
- } = t, b = Ft(), w = String(m), M = (b == null ? void 0 : b.value) !== void 0, _ = u || !!(b != null && b.disabled), R = !!(b != null && b.required && !b.hasSelection && b.validationValue === w), k = f || he(o);
1470
+ ...I
1471
+ } = t, b = Ft(), w = String(m), M = (b == null ? void 0 : b.value) !== void 0, _ = u || !!(b != null && b.disabled), R = !!(b != null && b.required && !b.hasSelection && b.validationValue === w), y = f || he(o);
1423
1472
  function C(N) {
1424
1473
  c == null || c(N), N.defaultPrevented || b == null || b.handleChange(N);
1425
1474
  }
@@ -1428,16 +1477,16 @@ const Wt = g(function(t, e) {
1428
1477
  {
1429
1478
  className: ["nk-checkbox", l].filter(Boolean).join(" "),
1430
1479
  "data-disabled": _ || void 0,
1431
- "data-invalid": k || void 0,
1480
+ "data-invalid": y || void 0,
1432
1481
  style: v,
1433
1482
  children: [
1434
1483
  /* @__PURE__ */ a(
1435
1484
  "input",
1436
1485
  {
1437
- ...x,
1486
+ ...I,
1438
1487
  ref: e,
1439
1488
  "aria-invalid": ge(f, o),
1440
- checked: b ? M ? (I = b.value) == null ? void 0 : I.includes(w) : void 0 : i,
1489
+ checked: b ? M ? (x = b.value) == null ? void 0 : x.includes(w) : void 0 : i,
1441
1490
  className: "nk-checkbox__control",
1442
1491
  defaultChecked: b && !M ? b.defaultValue.includes(w) : s,
1443
1492
  disabled: _,
@@ -1521,16 +1570,16 @@ const qt = g(
1521
1570
  required: p = !1,
1522
1571
  value: v,
1523
1572
  ...m
1524
- } = t, x = D(null), [b, w] = $(l), M = v !== void 0, _ = M ? v : b, R = u || he(o), k = jt(i), C = s ? [] : k.filter((y) => !y.disabled).map((y) => y.value), I = new Set(C), N = _.some(
1525
- (y) => I.has(y)
1526
- ), T = C[0], z = k.find(
1527
- (y) => !y.disabled && y.value === T
1573
+ } = t, I = D(null), [b, w] = $(l), M = v !== void 0, _ = M ? v : b, R = u || he(o), y = jt(i), C = s ? [] : y.filter((k) => !k.disabled).map((k) => k.value), x = new Set(C), N = _.some(
1574
+ (k) => x.has(k)
1575
+ ), T = C[0], z = y.find(
1576
+ (k) => !k.disabled && k.value === T
1528
1577
  ), Z = l.some(
1529
- (y) => I.has(y)
1578
+ (k) => x.has(k)
1530
1579
  ), H = !!(z != null && z.required), E = W(
1531
- (y) => Zt(
1532
- y,
1533
- x,
1580
+ (k) => Zt(
1581
+ k,
1582
+ I,
1534
1583
  e
1535
1584
  ),
1536
1585
  [e]
@@ -1538,16 +1587,16 @@ const qt = g(
1538
1587
  q(() => {
1539
1588
  var V;
1540
1589
  if (M) return;
1541
- const y = (V = x.current) == null ? void 0 : V.querySelector(
1590
+ const k = (V = I.current) == null ? void 0 : V.querySelector(
1542
1591
  'input[type="checkbox"]'
1543
- ), P = y instanceof HTMLInputElement ? y.form : null;
1592
+ ), P = k instanceof HTMLInputElement ? k.form : null;
1544
1593
  if (!P) return;
1545
1594
  const A = P.getRootNode();
1546
1595
  function B(j) {
1547
1596
  var ee;
1548
1597
  if (j.target !== P || j.defaultPrevented) return;
1549
1598
  const te = Array.from(
1550
- ((ee = x.current) == null ? void 0 : ee.querySelectorAll(
1599
+ ((ee = I.current) == null ? void 0 : ee.querySelectorAll(
1551
1600
  'input[type="checkbox"]'
1552
1601
  )) ?? []
1553
1602
  ).find(
@@ -1565,12 +1614,12 @@ const qt = g(
1565
1614
  H,
1566
1615
  T
1567
1616
  ]);
1568
- function U(y) {
1617
+ function U(k) {
1569
1618
  if (!M) {
1570
- const P = y.currentTarget.value, A = y.currentTarget.checked;
1619
+ const P = k.currentTarget.value, A = k.currentTarget.checked;
1571
1620
  w((B) => A ? [.../* @__PURE__ */ new Set([...B, P])] : B.filter((V) => V !== P));
1572
1621
  }
1573
- d == null || d(y);
1622
+ d == null || d(k);
1574
1623
  }
1575
1624
  const S = {
1576
1625
  defaultValue: l,
@@ -1699,7 +1748,7 @@ function eo(n, t) {
1699
1748
  (d = o.current) == null || d.disconnect(), o.current = null;
1700
1749
  }), [u, t]), { rootReference: f, innerWidth: r };
1701
1750
  }
1702
- const xr = g(
1751
+ const Cr = g(
1703
1752
  function(t, e) {
1704
1753
  const {
1705
1754
  accent: o,
@@ -1713,7 +1762,7 @@ const xr = g(
1713
1762
  style: c,
1714
1763
  theme: p = "light",
1715
1764
  ...v
1716
- } = t, { rootReference: m, innerWidth: x } = eo(
1765
+ } = t, { rootReference: m, innerWidth: I } = eo(
1717
1766
  e,
1718
1767
  s
1719
1768
  ), b = i ?? "div", w = o !== void 0 ? { ...c, "--nk-accent": o } : c;
@@ -1734,13 +1783,13 @@ const xr = g(
1734
1783
  "div",
1735
1784
  {
1736
1785
  className: "nk-content__inner",
1737
- style: x === void 0 ? void 0 : { width: `${x}px` }
1786
+ style: I === void 0 ? void 0 : { width: `${I}px` }
1738
1787
  },
1739
1788
  r
1740
1789
  )
1741
1790
  );
1742
1791
  }
1743
- ), Cr = g(function(t, e) {
1792
+ ), Pr = g(function(t, e) {
1744
1793
  const {
1745
1794
  "aria-hidden": o,
1746
1795
  "aria-label": i,
@@ -1786,7 +1835,7 @@ function un(...n) {
1786
1835
  ), e = [...new Set(t)];
1787
1836
  return e.length > 0 ? e.join(" ") : void 0;
1788
1837
  }
1789
- const Pr = g(function(t, e) {
1838
+ const _r = g(function(t, e) {
1790
1839
  const {
1791
1840
  children: o,
1792
1841
  className: i,
@@ -1797,20 +1846,20 @@ const Pr = g(function(t, e) {
1797
1846
  orientation: f = "vertical",
1798
1847
  required: d = !1,
1799
1848
  ...c
1800
- } = t, p = Le(), v = o.props.id ?? `${p}-control`, m = `${p}-label`, x = `${p}-description`, b = `${p}-error`, w = Je(u), M = Je(r), _ = Je(s), R = Ln(o.type), k = R !== void 0, C = l || !!o.props.disabled, I = d || !!o.props.required, N = I && (R == null ? void 0 : R.requiredCommunication) === "label", T = un(
1849
+ } = t, p = Le(), v = o.props.id ?? `${p}-control`, m = `${p}-label`, I = `${p}-description`, b = `${p}-error`, w = Je(u), M = Je(r), _ = Je(s), R = Ln(o.type), y = R !== void 0, C = l || !!o.props.disabled, x = d || !!o.props.required, N = x && (R == null ? void 0 : R.requiredCommunication) === "label", T = un(
1801
1850
  o.props["aria-describedby"],
1802
- M ? x : void 0,
1851
+ M ? I : void 0,
1803
1852
  _ ? b : void 0
1804
1853
  ), z = un(
1805
1854
  w ? m : void 0,
1806
1855
  o.props["aria-labelledby"]
1807
- ), Z = I ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-field__required", children: "*" }) : null, H = N ? /* @__PURE__ */ a("span", { className: "nk-field__required-text", children: ", select at least one" }) : null, E = Pe(o, {
1856
+ ), Z = x ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-field__required", children: "*" }) : null, H = N ? /* @__PURE__ */ a("span", { className: "nk-field__required-text", children: ", select at least one" }) : null, E = Pe(o, {
1808
1857
  "aria-describedby": T,
1809
1858
  "aria-invalid": _ ? !0 : o.props["aria-invalid"],
1810
1859
  "aria-labelledby": z,
1811
1860
  disabled: C || void 0,
1812
1861
  id: v,
1813
- required: I || void 0
1862
+ required: x || void 0
1814
1863
  });
1815
1864
  return /* @__PURE__ */ O(
1816
1865
  "div",
@@ -1822,9 +1871,9 @@ const Pr = g(function(t, e) {
1822
1871
  "data-has-label": w || void 0,
1823
1872
  "data-invalid": _ || void 0,
1824
1873
  "data-orientation": f,
1825
- "data-required": I || void 0,
1874
+ "data-required": x || void 0,
1826
1875
  children: [
1827
- w && k ? /* @__PURE__ */ O(
1876
+ w && y ? /* @__PURE__ */ O(
1828
1877
  fe,
1829
1878
  {
1830
1879
  as: "span",
@@ -1839,7 +1888,7 @@ const Pr = g(function(t, e) {
1839
1888
  ]
1840
1889
  }
1841
1890
  ) : null,
1842
- w && !k ? /* @__PURE__ */ O(
1891
+ w && !y ? /* @__PURE__ */ O(
1843
1892
  fe,
1844
1893
  {
1845
1894
  as: "label",
@@ -1861,7 +1910,7 @@ const Pr = g(function(t, e) {
1861
1910
  {
1862
1911
  as: "p",
1863
1912
  className: "nk-field__description",
1864
- id: x,
1913
+ id: I,
1865
1914
  size: "caption",
1866
1915
  tone: "muted",
1867
1916
  children: r
@@ -1901,7 +1950,7 @@ function to(n) {
1901
1950
  )) == null ? void 0 : e.set;
1902
1951
  t ? t.call(n, "") : n.value = "";
1903
1952
  }
1904
- const _r = g(function(t, e) {
1953
+ const Nr = g(function(t, e) {
1905
1954
  const {
1906
1955
  "aria-busy": o,
1907
1956
  "aria-invalid": i,
@@ -1915,12 +1964,12 @@ const _r = g(function(t, e) {
1915
1964
  loading: p = !1,
1916
1965
  onChange: v,
1917
1966
  readOnly: m = !1,
1918
- style: x,
1967
+ style: I,
1919
1968
  trailing: b,
1920
1969
  type: w = "text",
1921
1970
  value: M,
1922
1971
  ..._
1923
- } = t, R = Le(), k = D(null), [C, I] = $(
1972
+ } = t, R = Le(), y = D(null), [C, x] = $(
1924
1973
  en(s)
1925
1974
  ), [N, T] = $(!1);
1926
1975
  q(() => {
@@ -1929,16 +1978,16 @@ const _r = g(function(t, e) {
1929
1978
  const z = W(
1930
1979
  (K) => no(
1931
1980
  K,
1932
- k,
1981
+ y,
1933
1982
  e
1934
1983
  ),
1935
1984
  [e]
1936
- ), Z = f ?? `${R}-control`, H = u || p, E = d || he(i), U = M !== void 0 ? en(M) : C, S = w === "password" && N ? "text" : w, y = ge(d, i), P = l && U && !m && !H, A = w === "password" && !p, B = P || A, V = fn(c), j = fn(b) || B;
1985
+ ), Z = f ?? `${R}-control`, H = u || p, E = d || he(i), U = M !== void 0 ? en(M) : C, S = w === "password" && N ? "text" : w, k = ge(d, i), P = l && U && !m && !H, A = w === "password" && !p, B = P || A, V = fn(c), j = fn(b) || B;
1937
1986
  function te(K) {
1938
- M === void 0 && I(en(K.currentTarget.value)), v == null || v(K);
1987
+ M === void 0 && x(en(K.currentTarget.value)), v == null || v(K);
1939
1988
  }
1940
1989
  function ee() {
1941
- const K = k.current;
1990
+ const K = y.current;
1942
1991
  K && (to(K), K.dispatchEvent(new Event("input", { bubbles: !0 })), K.focus());
1943
1992
  }
1944
1993
  function X() {
@@ -1956,7 +2005,7 @@ const _r = g(function(t, e) {
1956
2005
  "data-read-only": m || void 0,
1957
2006
  "data-has-trailing-action": B || void 0,
1958
2007
  "data-trailing": j || void 0,
1959
- style: x,
2008
+ style: I,
1960
2009
  children: [
1961
2010
  V ? /* @__PURE__ */ a("span", { className: "nk-input__leading", children: c }) : null,
1962
2011
  /* @__PURE__ */ a(
@@ -1965,7 +2014,7 @@ const _r = g(function(t, e) {
1965
2014
  ..._,
1966
2015
  ref: z,
1967
2016
  "aria-busy": p ? !0 : o,
1968
- "aria-invalid": y,
2017
+ "aria-invalid": k,
1969
2018
  className: "nk-input__control",
1970
2019
  defaultValue: s,
1971
2020
  disabled: H,
@@ -2095,7 +2144,7 @@ function mn(n) {
2095
2144
  n.listeners.forEach((t) => t());
2096
2145
  }
2097
2146
  function Ke(n, t) {
2098
- const e = D(Symbol("nk-overlay-layer")), [, o] = xn((s) => s + 1, 0);
2147
+ const e = D(Symbol("nk-overlay-layer")), [, o] = In((s) => s + 1, 0);
2099
2148
  q(() => {
2100
2149
  if (!n || !t) return;
2101
2150
  const s = Be(t), u = () => o();
@@ -2266,30 +2315,30 @@ function Sn(n) {
2266
2315
  var _, R;
2267
2316
  if (!t || !o) return;
2268
2317
  const c = o.ownerDocument, p = (_ = c.defaultView) == null ? void 0 : _.HTMLElement, v = (R = c.defaultView) == null ? void 0 : R.Node, m = p && c.activeElement instanceof p ? c.activeElement : null;
2269
- let x = !0;
2318
+ let I = !0;
2270
2319
  function b() {
2271
- const k = i == null ? void 0 : i.current;
2272
- (k && nn(
2320
+ const y = i == null ? void 0 : i.current;
2321
+ (y && nn(
2273
2322
  o,
2274
2323
  u.current,
2275
- k
2276
- ) ? k : bn(
2324
+ y
2325
+ ) ? y : bn(
2277
2326
  o,
2278
2327
  u.current
2279
2328
  )[0] ?? o).focus({ preventScroll: !0 });
2280
2329
  }
2281
- function w(k) {
2282
- if (k.key !== "Tab" || !wn(c, r))
2330
+ function w(y) {
2331
+ if (y.key !== "Tab" || !wn(c, r))
2283
2332
  return;
2284
2333
  const C = bn(
2285
2334
  o,
2286
2335
  u.current
2287
2336
  );
2288
2337
  if (C.length === 0) {
2289
- k.preventDefault(), o == null || o.focus({ preventScroll: !0 });
2338
+ y.preventDefault(), o == null || o.focus({ preventScroll: !0 });
2290
2339
  return;
2291
2340
  }
2292
- const I = C[0], N = C[C.length - 1], T = c.activeElement, z = nn(
2341
+ const x = C[0], N = C[C.length - 1], T = c.activeElement, z = nn(
2293
2342
  o,
2294
2343
  u.current,
2295
2344
  T
@@ -2297,22 +2346,22 @@ function Sn(n) {
2297
2346
  (E) => E === T
2298
2347
  ) && (T === o || T === (i == null ? void 0 : i.current));
2299
2348
  if (!z || H) {
2300
- k.preventDefault(), (k.shiftKey ? N : I).focus();
2349
+ y.preventDefault(), (y.shiftKey ? N : x).focus();
2301
2350
  return;
2302
2351
  }
2303
- k.shiftKey && T === I ? (k.preventDefault(), N.focus()) : !k.shiftKey && T === N && (k.preventDefault(), I.focus());
2352
+ y.shiftKey && T === x ? (y.preventDefault(), N.focus()) : !y.shiftKey && T === N && (y.preventDefault(), x.focus());
2304
2353
  }
2305
- function M(k) {
2306
- wn(c, r) && v && k.target instanceof v && !nn(
2354
+ function M(y) {
2355
+ wn(c, r) && v && y.target instanceof v && !nn(
2307
2356
  o,
2308
2357
  u.current,
2309
- k.target
2358
+ y.target
2310
2359
  ) && b();
2311
2360
  }
2312
2361
  return c.addEventListener("keydown", w, !0), c.addEventListener("focusin", M, !0), e && Promise.resolve().then(() => {
2313
- x && b();
2362
+ I && b();
2314
2363
  }), () => {
2315
- x = !1, c.removeEventListener("keydown", w, !0), c.removeEventListener("focusin", M, !0), l && (m != null && m.isConnected) && so(m);
2364
+ I = !1, c.removeEventListener("keydown", w, !0), c.removeEventListener("focusin", M, !0), l && (m != null && m.isConnected) && so(m);
2316
2365
  };
2317
2366
  }, [
2318
2367
  t,
@@ -2402,12 +2451,12 @@ function wo(n) {
2402
2451
  ownerDocument: p,
2403
2452
  presenceState: v,
2404
2453
  restoreFocus: m = !0,
2405
- role: x = "dialog",
2454
+ role: I = "dialog",
2406
2455
  style: b,
2407
2456
  title: w,
2408
2457
  trapFocus: M = !0,
2409
2458
  ..._
2410
- } = n, R = D(null), k = D(null), C = Ne(Oe), I = `${Le()}-title`, [N, T] = $(null), z = Ke(!0, p), Z = Me(() => [R], []), H = !!(w != null && w.trim()), E = u ?? (H ? k : void 0), U = e ?? (t === void 0 && H ? I : void 0), S = W(
2459
+ } = n, R = D(null), y = D(null), C = Ne(Oe), x = `${Le()}-title`, [N, T] = $(null), z = Ke(!0, p), Z = Me(() => [R], []), H = !!(w != null && w.trim()), E = u ?? (H ? y : void 0), U = e ?? (t === void 0 && H ? x : void 0), S = W(
2411
2460
  (V) => {
2412
2461
  go(V, R, s), T(V);
2413
2462
  },
@@ -2416,7 +2465,7 @@ function wo(n) {
2416
2465
  $e(() => {
2417
2466
  N && (N.inert = !c);
2418
2467
  }, [N, c]);
2419
- const y = W(() => {
2468
+ const k = W(() => {
2420
2469
  d == null || d("escape");
2421
2470
  }, [d]), P = W(() => {
2422
2471
  d == null || d("outside");
@@ -2427,7 +2476,7 @@ function wo(n) {
2427
2476
  dismissOnEscape: l,
2428
2477
  dismissOnPointerDownOutside: l,
2429
2478
  layerId: z.id,
2430
- onEscapeDismiss: y,
2479
+ onEscapeDismiss: k,
2431
2480
  onPointerDownOutsideDismiss: P,
2432
2481
  ownerDocument: p
2433
2482
  });
@@ -2473,7 +2522,7 @@ function wo(n) {
2473
2522
  "aria-modal": c ? "true" : void 0,
2474
2523
  className: ["nk-modal", i].filter(Boolean).join(" "),
2475
2524
  "data-state": v,
2476
- role: c ? x : void 0,
2525
+ role: c ? I : void 0,
2477
2526
  style: b,
2478
2527
  tabIndex: -1,
2479
2528
  children: [
@@ -2483,8 +2532,8 @@ function wo(n) {
2483
2532
  {
2484
2533
  as: "h2",
2485
2534
  className: "nk-modal__title",
2486
- id: I,
2487
- ref: k,
2535
+ id: x,
2536
+ ref: y,
2488
2537
  size: "subtitle",
2489
2538
  tabIndex: -1,
2490
2539
  weight: "semibold",
@@ -2502,7 +2551,7 @@ function wo(n) {
2502
2551
  }
2503
2552
  );
2504
2553
  }
2505
- const Nr = g(function(t, e) {
2554
+ const Lr = g(function(t, e) {
2506
2555
  const { open: o } = t, i = D(t);
2507
2556
  o && (i.current = t);
2508
2557
  const r = o ? t : i.current, { portalContainer: l } = r, s = Ye(o), u = (l == null ? void 0 : l.ownerDocument) ?? (typeof document > "u" ? null : document);
@@ -2523,20 +2572,20 @@ function Rn(n) {
2523
2572
  function De(n, t) {
2524
2573
  typeof n == "function" ? n(t) : n && (n.current = t);
2525
2574
  }
2526
- const yo = 12, ko = {
2575
+ const ko = 12, yo = {
2527
2576
  bottom: "top",
2528
2577
  left: "right",
2529
2578
  right: "left",
2530
2579
  top: "bottom"
2531
2580
  };
2532
- function yn(n, t) {
2533
- const e = Math.min(yo, t / 2);
2581
+ function kn(n, t) {
2582
+ const e = Math.min(ko, t / 2);
2534
2583
  return Math.min(Math.max(e, n), t - e);
2535
2584
  }
2536
- function Io(n) {
2537
- return ko[n];
2585
+ function xo(n) {
2586
+ return yo[n];
2538
2587
  }
2539
- function xo(n, t) {
2588
+ function Io(n, t) {
2540
2589
  return t === "left" || t === "right" ? n.width : n.height;
2541
2590
  }
2542
2591
  function Co(n, t, e, o, i, r) {
@@ -2545,7 +2594,7 @@ function Co(n, t, e, o, i, r) {
2545
2594
  left: e.left - t * 2,
2546
2595
  right: i - e.right - t * 2,
2547
2596
  top: e.top - t * 2
2548
- }, s = Io(n), u = xo(o, n), f = l[n] < u && l[s] > l[n] ? s : n;
2597
+ }, s = xo(n), u = Io(o, n), f = l[n] < u && l[s] > l[n] ? s : n;
2549
2598
  let d = e.left + (e.width - o.width) / 2, c = e.top + (e.height - o.height) / 2;
2550
2599
  return f === "top" ? c = e.top - o.height - t : f === "bottom" ? c = e.bottom + t : f === "left" ? d = e.left - o.width - t : d = e.right + t, d = Math.min(
2551
2600
  Math.max(t, d),
@@ -2553,10 +2602,10 @@ function Co(n, t, e, o, i, r) {
2553
2602
  ), c = Math.min(
2554
2603
  Math.max(t, c),
2555
2604
  Math.max(t, r - t - o.height)
2556
- ), { arrowOffset: f === "top" || f === "bottom" ? yn(
2605
+ ), { arrowOffset: f === "top" || f === "bottom" ? kn(
2557
2606
  e.left + e.width / 2 - d,
2558
2607
  o.width
2559
- ) : yn(
2608
+ ) : kn(
2560
2609
  e.top + e.height / 2 - c,
2561
2610
  o.height
2562
2611
  ), left: d, placement: f, top: c };
@@ -2575,12 +2624,12 @@ function Tn(n, t, e, o) {
2575
2624
  u.getPropertyValue("--nk-space-8")
2576
2625
  ), d = Number.isFinite(f) ? f : Po;
2577
2626
  function c() {
2578
- const m = e == null ? void 0 : e.getBoundingClientRect(), x = o == null ? void 0 : o.getBoundingClientRect();
2579
- !m || !x || r(Co(
2627
+ const m = e == null ? void 0 : e.getBoundingClientRect(), I = o == null ? void 0 : o.getBoundingClientRect();
2628
+ !m || !I || r(Co(
2580
2629
  t,
2581
2630
  d,
2582
2631
  m,
2583
- x,
2632
+ I,
2584
2633
  s.innerWidth,
2585
2634
  s.innerHeight
2586
2635
  ));
@@ -2615,7 +2664,7 @@ function Eo(n) {
2615
2664
  function So(n) {
2616
2665
  return n === "grid" || n === "listbox" || n === "menu" || n === "tree" ? n : "dialog";
2617
2666
  }
2618
- const Lr = g(function(t, e) {
2667
+ const Mr = g(function(t, e) {
2619
2668
  const {
2620
2669
  "aria-label": o,
2621
2670
  "aria-labelledby": i,
@@ -2629,21 +2678,21 @@ const Lr = g(function(t, e) {
2629
2678
  initialFocusReference: p,
2630
2679
  onEscapeKeyDown: v,
2631
2680
  onOpenChange: m,
2632
- onPointerDownOutside: x,
2681
+ onPointerDownOutside: I,
2633
2682
  open: b,
2634
2683
  placement: w = "bottom",
2635
2684
  portalContainer: M,
2636
2685
  restoreFocus: _ = !0,
2637
2686
  role: R = "dialog",
2638
- style: k,
2687
+ style: y,
2639
2688
  tabIndex: C,
2640
- trapFocus: I = !1,
2689
+ trapFocus: x = !1,
2641
2690
  trigger: N,
2642
2691
  ...T
2643
2692
  } = t;
2644
2693
  if (N.type === _e)
2645
2694
  throw new Error("Popover requires a single non-Fragment trigger");
2646
- const z = Le(), Z = Ne(Oe), H = `${z}-popover`, E = N.props, U = Rn(N), S = E.id ?? `${z}-trigger`, y = c || E.disabled === !0 || E["aria-disabled"] === !0 || E["aria-disabled"] === "true", P = b !== void 0, [A, B] = $(d), V = P ? b : A, j = Ye(V), te = D(null), ee = D(null), X = D("programmatic"), K = D(null), ce = D(V), pe = D(null), [be, Ee] = xn(
2695
+ const z = Le(), Z = Ne(Oe), H = `${z}-popover`, E = N.props, U = Rn(N), S = E.id ?? `${z}-trigger`, k = c || E.disabled === !0 || E["aria-disabled"] === !0 || E["aria-disabled"] === "true", P = b !== void 0, [A, B] = $(d), V = P ? b : A, j = Ye(V), te = D(null), ee = D(null), X = D("programmatic"), K = D(null), ce = D(V), pe = D(null), [be, Ee] = In(
2647
2696
  (F) => F + 1,
2648
2697
  0
2649
2698
  ), [G, ne] = $(null), [le, re] = $(null), Y = (M == null ? void 0 : M.ownerDocument) ?? (G == null ? void 0 : G.ownerDocument) ?? (typeof document > "u" ? null : document), ve = Ke(j.present, Y), ie = Me(
@@ -2654,7 +2703,7 @@ const Lr = g(function(t, e) {
2654
2703
  w,
2655
2704
  G,
2656
2705
  le
2657
- ), ye = W(
2706
+ ), ke = W(
2658
2707
  (F) => {
2659
2708
  Lo(
2660
2709
  F,
@@ -2681,14 +2730,14 @@ const Lr = g(function(t, e) {
2681
2730
  de(!1, "escape");
2682
2731
  }, [de]), Te = W(() => {
2683
2732
  de(!1, "outside");
2684
- }, [de]), ke = W((F) => {
2733
+ }, [de]), ye = W((F) => {
2685
2734
  var Ve;
2686
- if (x == null || x(F), F.defaultPrevented) return;
2735
+ if (I == null || I(F), F.defaultPrevented) return;
2687
2736
  const J = (Ve = Y == null ? void 0 : Y.defaultView) == null ? void 0 : Ve.HTMLElement;
2688
2737
  pe.current = J ? F.composedPath().find(
2689
- (Ie) => Ie instanceof J && Ie.tabIndex >= 0
2738
+ (xe) => xe instanceof J && xe.tabIndex >= 0
2690
2739
  ) ?? F.target : F.target;
2691
- }, [x, Y]);
2740
+ }, [I, Y]);
2692
2741
  Ue({
2693
2742
  active: V,
2694
2743
  boundaries: ie,
@@ -2697,12 +2746,12 @@ const Lr = g(function(t, e) {
2697
2746
  layerId: ve.id,
2698
2747
  onEscapeDismiss: Re,
2699
2748
  onEscapeKeyDown: v,
2700
- onPointerDownOutside: ke,
2749
+ onPointerDownOutside: ye,
2701
2750
  onPointerDownOutsideDismiss: Te,
2702
2751
  ownerDocument: Y
2703
2752
  });
2704
2753
  const h = Sn({
2705
- active: V && I,
2754
+ active: V && x,
2706
2755
  autoFocus: r,
2707
2756
  container: le,
2708
2757
  initialFocusReference: p,
@@ -2710,7 +2759,7 @@ const Lr = g(function(t, e) {
2710
2759
  restoreFocus: _
2711
2760
  });
2712
2761
  q(() => {
2713
- if (!V || I || !r || !le) return;
2762
+ if (!V || x || !r || !le) return;
2714
2763
  let F = !0;
2715
2764
  return Promise.resolve().then(() => {
2716
2765
  if (!F) return;
@@ -2719,7 +2768,7 @@ const Lr = g(function(t, e) {
2719
2768
  }), () => {
2720
2769
  F = !1;
2721
2770
  };
2722
- }, [r, p, V, le, I]), q(() => {
2771
+ }, [r, p, V, le, x]), q(() => {
2723
2772
  var cn;
2724
2773
  const F = ce.current;
2725
2774
  ce.current = V;
@@ -2728,22 +2777,22 @@ const Lr = g(function(t, e) {
2728
2777
  X.current = "programmatic", pe.current = null;
2729
2778
  return;
2730
2779
  }
2731
- const Ie = Y == null ? void 0 : Y.activeElement, Xe = pe.current, Qe = (cn = Y == null ? void 0 : Y.defaultView) == null ? void 0 : cn.HTMLElement, zn = Ve === "outside" && Qe && Xe instanceof Qe && Ie instanceof Qe && (Xe === Ie || Xe.contains(Ie));
2732
- F && !I && _ && !zn && (G == null || G.focus({ preventScroll: !0 })), pe.current = null;
2780
+ const xe = Y == null ? void 0 : Y.activeElement, Xe = pe.current, Qe = (cn = Y == null ? void 0 : Y.defaultView) == null ? void 0 : cn.HTMLElement, zn = Ve === "outside" && Qe && Xe instanceof Qe && xe instanceof Qe && (Xe === xe || Xe.contains(xe));
2781
+ F && !x && _ && !zn && (G == null || G.focus({ preventScroll: !0 })), pe.current = null;
2733
2782
  }, [
2734
2783
  be,
2735
2784
  P,
2736
2785
  V,
2737
2786
  Y,
2738
2787
  _,
2739
- I,
2788
+ x,
2740
2789
  G
2741
2790
  ]), q(() => {
2742
2791
  c && V && de(!1, "programmatic");
2743
2792
  }, [c, V, de]);
2744
2793
  function L(F) {
2745
2794
  var J;
2746
- if (y) {
2795
+ if (k) {
2747
2796
  F.preventDefault(), F.stopPropagation();
2748
2797
  return;
2749
2798
  }
@@ -2751,24 +2800,24 @@ const Lr = g(function(t, e) {
2751
2800
  }
2752
2801
  function Q(F) {
2753
2802
  var J;
2754
- (J = E.onKeyDown) == null || J.call(E, F), !(F.defaultPrevented || y || Eo(F.currentTarget) || F.key !== "Enter" && F.key !== " ") && (F.preventDefault(), F.currentTarget.click());
2803
+ (J = E.onKeyDown) == null || J.call(E, F), !(F.defaultPrevented || k || Eo(F.currentTarget) || F.key !== "Enter" && F.key !== " ") && (F.preventDefault(), F.currentTarget.click());
2755
2804
  }
2756
2805
  if (c) return N;
2757
- const oe = typeof N.type == "string", ae = oe ? N.type : null, ue = ae === "a" && typeof E.href == "string", we = oe && !(ae === "button" || ae === "input" || ae === "select" || ae === "summary" || ae === "textarea" || ue), sn = ue && y, Wn = Pe(
2806
+ const oe = typeof N.type == "string", ae = oe ? N.type : null, ue = ae === "a" && typeof E.href == "string", we = oe && !(ae === "button" || ae === "input" || ae === "select" || ae === "summary" || ae === "textarea" || ue), sn = ue && k, Wn = Pe(
2758
2807
  N,
2759
2808
  {
2760
2809
  "aria-controls": V ? Mo(E["aria-controls"], H) : E["aria-controls"],
2761
2810
  "aria-expanded": V,
2762
2811
  "aria-haspopup": E["aria-haspopup"] ?? So(R),
2763
- "aria-disabled": y ? !0 : E["aria-disabled"],
2812
+ "aria-disabled": k ? !0 : E["aria-disabled"],
2764
2813
  className: [E.className, "nk-popover__trigger"].filter(Boolean).join(" "),
2765
2814
  href: sn ? void 0 : E.href,
2766
2815
  id: S,
2767
2816
  onClick: L,
2768
2817
  onKeyDown: oe ? Q : E.onKeyDown,
2769
- ref: ye,
2818
+ ref: ke,
2770
2819
  role: E.role ?? (sn ? "link" : we ? "button" : void 0),
2771
- tabIndex: y ? -1 : E.tabIndex ?? (we ? 0 : void 0)
2820
+ tabIndex: k ? -1 : E.tabIndex ?? (we ? 0 : void 0)
2772
2821
  }
2773
2822
  );
2774
2823
  return /* @__PURE__ */ O(je, { children: [
@@ -2776,7 +2825,7 @@ const Lr = g(function(t, e) {
2776
2825
  /* @__PURE__ */ a(
2777
2826
  Oe.Provider,
2778
2827
  {
2779
- value: V && I ? h : Z,
2828
+ value: V && x ? h : Z,
2780
2829
  children: j.present && Y ? /* @__PURE__ */ a(Ge, { container: M, inheritFrom: G, children: /* @__PURE__ */ O(
2781
2830
  He,
2782
2831
  {
@@ -2791,13 +2840,13 @@ const Lr = g(function(t, e) {
2791
2840
  id: H,
2792
2841
  role: V ? R : void 0,
2793
2842
  style: se ? {
2794
- ...k,
2843
+ ...y,
2795
2844
  "--nk-popover-arrow-offset": `${se.arrowOffset}px`,
2796
2845
  left: se.left,
2797
2846
  top: se.top,
2798
2847
  zIndex: ve.zIndex
2799
2848
  } : {
2800
- ...k,
2849
+ ...y,
2801
2850
  visibility: "hidden",
2802
2851
  zIndex: ve.zIndex
2803
2852
  },
@@ -2825,7 +2874,7 @@ function Vo(n) {
2825
2874
  Math.max(Ro, Math.trunc(n))
2826
2875
  ) : Vn;
2827
2876
  }
2828
- function xe(n, t, e) {
2877
+ function Ie(n, t, e) {
2829
2878
  return (t === "numeric" ? n.replace(/[^0-9]/g, "") : n.replace(/[^0-9a-z]/gi, "").toUpperCase()).slice(0, e);
2830
2879
  }
2831
2880
  function Ao(n, t, e) {
@@ -2858,17 +2907,17 @@ function Bo(n) {
2858
2907
  onSelect: c,
2859
2908
  readOnly: p,
2860
2909
  value: v
2861
- } = n, m = Vo(i), x = xe(
2910
+ } = n, m = Vo(i), I = Ie(
2862
2911
  t,
2863
2912
  r,
2864
2913
  m
2865
2914
  ), b = D(null), [w, M] = $(
2866
- x
2867
- ), [_, R] = $(0), k = v !== void 0, C = xe(
2868
- k ? v : w,
2915
+ I
2916
+ ), [_, R] = $(0), y = v !== void 0, C = Ie(
2917
+ y ? v : w,
2869
2918
  r,
2870
2919
  m
2871
- ), I = W(
2920
+ ), x = W(
2872
2921
  (S) => Ao(
2873
2922
  S,
2874
2923
  b,
@@ -2877,71 +2926,71 @@ function Bo(n) {
2877
2926
  [o]
2878
2927
  );
2879
2928
  q(() => {
2880
- !k && w !== C && M(C);
2881
- }, [k, C, w]), q(() => {
2929
+ !y && w !== C && M(C);
2930
+ }, [y, C, w]), q(() => {
2882
2931
  var A;
2883
- if (k) return;
2932
+ if (y) return;
2884
2933
  const S = (A = b.current) == null ? void 0 : A.form;
2885
2934
  if (!S) return;
2886
- const y = S.getRootNode();
2935
+ const k = S.getRootNode();
2887
2936
  function P(B) {
2888
- B.target !== S || B.defaultPrevented || (M(x), R(0));
2937
+ B.target !== S || B.defaultPrevented || (M(I), R(0));
2889
2938
  }
2890
- return y.addEventListener("reset", P), () => y.removeEventListener("reset", P);
2891
- }, [k, x]);
2939
+ return k.addEventListener("reset", P), () => k.removeEventListener("reset", P);
2940
+ }, [y, I]);
2892
2941
  function N(S) {
2893
- const y = S.selectionStart ?? C.length;
2894
- return Math.min(m - 1, Math.max(0, y));
2942
+ const k = S.selectionStart ?? C.length;
2943
+ return Math.min(m - 1, Math.max(0, k));
2895
2944
  }
2896
2945
  function T(S) {
2897
- const y = S.currentTarget, P = y.selectionStart ?? y.value.length, A = xe(y.value, r, m), B = xe(
2898
- y.value.slice(0, P),
2946
+ const k = S.currentTarget, P = k.selectionStart ?? k.value.length, A = Ie(k.value, r, m), B = Ie(
2947
+ k.value.slice(0, P),
2899
2948
  r,
2900
2949
  m
2901
2950
  ).length;
2902
- y.value = A, k || M(A), l == null || l(S), A.length === m && A !== C && (s == null || s(A));
2951
+ k.value = A, y || M(A), l == null || l(S), A.length === m && A !== C && (s == null || s(A));
2903
2952
  const V = Math.min(m - 1, B);
2904
- R(V), y.setSelectionRange(
2953
+ R(V), k.setSelectionRange(
2905
2954
  V,
2906
2955
  Math.min(V + 1, A.length)
2907
2956
  );
2908
2957
  }
2909
2958
  function z(S) {
2910
2959
  if (d == null || d(S), S.defaultPrevented || e || p) return;
2911
- const y = xe(
2960
+ const k = Ie(
2912
2961
  S.clipboardData.getData("text"),
2913
2962
  r,
2914
2963
  m
2915
2964
  );
2916
- if (S.preventDefault(), y.length === 0) return;
2917
- const P = S.currentTarget, A = P.selectionStart ?? C.length, B = P.selectionEnd ?? A, V = y.length === m ? y : xe(
2918
- C.slice(0, A) + y + C.slice(B),
2965
+ if (S.preventDefault(), k.length === 0) return;
2966
+ const P = S.currentTarget, A = P.selectionStart ?? C.length, B = P.selectionEnd ?? A, V = k.length === m ? k : Ie(
2967
+ C.slice(0, A) + k + C.slice(B),
2919
2968
  r,
2920
2969
  m
2921
- ), j = y.length === m ? m : Math.min(m, A + y.length);
2970
+ ), j = k.length === m ? m : Math.min(m, A + k.length);
2922
2971
  Oo(P, V), P.setSelectionRange(j, j), P.dispatchEvent(new Event("input", { bubbles: !0 }));
2923
2972
  }
2924
2973
  function Z(S) {
2925
2974
  if (f == null || f(S), S.defaultPrevented || S.key !== "ArrowLeft" && S.key !== "ArrowRight") return;
2926
2975
  S.preventDefault();
2927
- const y = S.key === "ArrowLeft" ? -1 : 1, P = Math.min(
2976
+ const k = S.key === "ArrowLeft" ? -1 : 1, P = Math.min(
2928
2977
  m - 1,
2929
- Math.max(0, N(S.currentTarget) + y)
2978
+ Math.max(0, N(S.currentTarget) + k)
2930
2979
  );
2931
2980
  R(P), tn(S.currentTarget, P, m);
2932
2981
  }
2933
2982
  function H(S) {
2934
2983
  u == null || u(S);
2935
- const y = Math.min(m - 1, C.length);
2936
- R(y), tn(S.currentTarget, y, m);
2984
+ const k = Math.min(m - 1, C.length);
2985
+ R(k), tn(S.currentTarget, k, m);
2937
2986
  }
2938
2987
  function E(S) {
2939
2988
  c == null || c(S), R(N(S.currentTarget));
2940
2989
  }
2941
- function U(S, y) {
2990
+ function U(S, k) {
2942
2991
  if (S.preventDefault(), e) return;
2943
2992
  const P = b.current;
2944
- P && (R(y), tn(P, y, m));
2993
+ P && (R(k), tn(P, k, m));
2945
2994
  }
2946
2995
  return {
2947
2996
  activeIndex: _,
@@ -2951,12 +3000,12 @@ function Bo(n) {
2951
3000
  handlePaste: z,
2952
3001
  handleSelect: E,
2953
3002
  handleSlotPointerDown: U,
2954
- inputCallbackReference: I,
3003
+ inputCallbackReference: x,
2955
3004
  length: m,
2956
3005
  renderedValue: C
2957
3006
  };
2958
3007
  }
2959
- const Mr = g(function(t, e) {
3008
+ const Er = g(function(t, e) {
2960
3009
  const {
2961
3010
  "aria-invalid": o,
2962
3011
  autoCapitalize: i,
@@ -2970,15 +3019,15 @@ const Mr = g(function(t, e) {
2970
3019
  mode: p = "numeric",
2971
3020
  onChange: v,
2972
3021
  onComplete: m,
2973
- onFocus: x,
3022
+ onFocus: I,
2974
3023
  onKeyDown: b,
2975
3024
  onPaste: w,
2976
3025
  onSelect: M,
2977
3026
  readOnly: _ = !1,
2978
3027
  style: R,
2979
- value: k,
3028
+ value: y,
2980
3029
  wrap: C = !1,
2981
- ...I
3030
+ ...x
2982
3031
  } = t, {
2983
3032
  activeIndex: N,
2984
3033
  handleChange: T,
@@ -2988,7 +3037,7 @@ const Mr = g(function(t, e) {
2988
3037
  handleSelect: E,
2989
3038
  handleSlotPointerDown: U,
2990
3039
  inputCallbackReference: S,
2991
- length: y,
3040
+ length: k,
2992
3041
  renderedValue: P
2993
3042
  } = Bo({
2994
3043
  defaultValue: u,
@@ -2998,15 +3047,15 @@ const Mr = g(function(t, e) {
2998
3047
  mode: p,
2999
3048
  onChange: v,
3000
3049
  onComplete: m,
3001
- onFocus: x,
3050
+ onFocus: I,
3002
3051
  onKeyDown: b,
3003
3052
  onPaste: w,
3004
3053
  onSelect: M,
3005
3054
  readOnly: _,
3006
- value: k
3007
- }), A = d || he(o), B = !C && y >= 6 && y % 2 === 0, V = y / 2, j = {
3055
+ value: y
3056
+ }), A = d || he(o), B = !C && k >= 6 && k % 2 === 0, V = k / 2, j = {
3008
3057
  ...R,
3009
- "--nk-pin-input-columns": Math.ceil(y / 2)
3058
+ "--nk-pin-input-columns": Math.ceil(k / 2)
3010
3059
  };
3011
3060
  return /* @__PURE__ */ O(
3012
3061
  "span",
@@ -3021,7 +3070,7 @@ const Mr = g(function(t, e) {
3021
3070
  /* @__PURE__ */ a(
3022
3071
  "input",
3023
3072
  {
3024
- ...I,
3073
+ ...x,
3025
3074
  ref: S,
3026
3075
  "aria-invalid": ge(d, o),
3027
3076
  autoCapitalize: i ?? (p === "alphanumeric" ? "characters" : "off"),
@@ -3029,21 +3078,21 @@ const Mr = g(function(t, e) {
3029
3078
  className: "nk-pin-input__control",
3030
3079
  disabled: f,
3031
3080
  inputMode: p === "numeric" ? "numeric" : "text",
3032
- maxLength: y,
3033
- minLength: y,
3081
+ maxLength: k,
3082
+ minLength: k,
3034
3083
  onChange: T,
3035
3084
  onFocus: z,
3036
3085
  onKeyDown: Z,
3037
3086
  onPaste: H,
3038
3087
  onSelect: E,
3039
- pattern: p === "numeric" ? `[0-9]{${y}}` : `[0-9A-Za-z]{${y}}`,
3088
+ pattern: p === "numeric" ? `[0-9]{${k}}` : `[0-9A-Za-z]{${k}}`,
3040
3089
  readOnly: _,
3041
3090
  spellCheck: !1,
3042
3091
  type: "text",
3043
3092
  value: P
3044
3093
  }
3045
3094
  ),
3046
- /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-pin-input__slots", children: Array.from({ length: y }, (te, ee) => /* @__PURE__ */ O("span", { className: "nk-pin-input__slot-group", children: [
3095
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "nk-pin-input__slots", children: Array.from({ length: k }, (te, ee) => /* @__PURE__ */ O("span", { className: "nk-pin-input__slot-group", children: [
3047
3096
  B && ee === V ? /* @__PURE__ */ a("span", { className: "nk-pin-input__separator", children: "-" }) : null,
3048
3097
  /* @__PURE__ */ a(
3049
3098
  "span",
@@ -3068,7 +3117,7 @@ function Do() {
3068
3117
  function Ho(n, t, e) {
3069
3118
  t.current = n, typeof e == "function" ? e(n) : e && (e.current = n);
3070
3119
  }
3071
- const Er = g(function(t, e) {
3120
+ const Sr = g(function(t, e) {
3072
3121
  const {
3073
3122
  children: o,
3074
3123
  className: i,
@@ -3077,16 +3126,16 @@ const Er = g(function(t, e) {
3077
3126
  value: s,
3078
3127
  ...u
3079
3128
  } = t, f = Do(), d = D(null), c = f.disabled || r, p = f.value !== void 0, v = f.value === s, m = W(
3080
- (x) => Ho(
3081
- x,
3129
+ (I) => Ho(
3130
+ I,
3082
3131
  d,
3083
3132
  e
3084
3133
  ),
3085
3134
  [e]
3086
3135
  );
3087
3136
  return q(() => {
3088
- var x;
3089
- !p && c && ((x = d.current) != null && x.checked) && (d.current.checked = !1);
3137
+ var I;
3138
+ !p && c && ((I = d.current) != null && I.checked) && (d.current.checked = !1);
3090
3139
  }, [p, c]), /* @__PURE__ */ O(
3091
3140
  "label",
3092
3141
  {
@@ -3130,7 +3179,7 @@ const Er = g(function(t, e) {
3130
3179
  required: p = !1,
3131
3180
  value: v,
3132
3181
  ...m
3133
- } = t, x = u || he(o), b = {
3182
+ } = t, I = u || he(o), b = {
3134
3183
  defaultValue: l,
3135
3184
  disabled: s,
3136
3185
  name: f,
@@ -3148,7 +3197,7 @@ const Er = g(function(t, e) {
3148
3197
  "aria-required": p || void 0,
3149
3198
  className: ["nk-radio-group", r].filter(Boolean).join(" "),
3150
3199
  "data-disabled": s || void 0,
3151
- "data-invalid": x || void 0,
3200
+ "data-invalid": I || void 0,
3152
3201
  "data-orientation": c,
3153
3202
  role: "radiogroup",
3154
3203
  children: i
@@ -3241,9 +3290,9 @@ function qo(n, t, e) {
3241
3290
  function s() {
3242
3291
  const d = t == null ? void 0 : t.getBoundingClientRect();
3243
3292
  if (!d) return;
3244
- const c = 8, p = 4, v = l.innerHeight - d.bottom - p - c, m = d.top - p - c, x = v < 160 && m > v, b = Math.max(
3293
+ const c = 8, p = 4, v = l.innerHeight - d.bottom - p - c, m = d.top - p - c, I = v < 160 && m > v, b = Math.max(
3245
3294
  72,
3246
- x ? m : v
3295
+ I ? m : v
3247
3296
  ), w = e == null ? void 0 : e.getBoundingClientRect(), M = Math.max(
3248
3297
  d.width,
3249
3298
  (w == null ? void 0 : w.width) ?? d.width
@@ -3253,7 +3302,7 @@ function qo(n, t, e) {
3253
3302
  c,
3254
3303
  l.innerWidth - c - M
3255
3304
  )
3256
- ), R = x ? Math.max(
3305
+ ), R = I ? Math.max(
3257
3306
  c,
3258
3307
  d.top - p - Math.min(
3259
3308
  (w == null ? void 0 : w.height) ?? b,
@@ -3290,22 +3339,22 @@ function $o(n) {
3290
3339
  onSelect: p,
3291
3340
  options: v,
3292
3341
  ownerDocument: m,
3293
- position: x,
3342
+ position: I,
3294
3343
  selectedValue: b,
3295
3344
  state: w,
3296
3345
  triggerReference: M
3297
- } = n, _ = D(null), R = Ke(!0, m), k = Me(
3346
+ } = n, _ = D(null), R = Ke(!0, m), y = Me(
3298
3347
  () => [M, _],
3299
3348
  [M]
3300
3349
  ), C = W(
3301
- (I) => {
3302
- _.current = I, l(I);
3350
+ (x) => {
3351
+ _.current = x, l(x);
3303
3352
  },
3304
3353
  [l]
3305
3354
  );
3306
3355
  return Ue({
3307
3356
  active: t,
3308
- boundaries: k,
3357
+ boundaries: y,
3309
3358
  dismissOnEscape: e,
3310
3359
  dismissOnPointerDownOutside: o,
3311
3360
  layerId: R.id,
@@ -3324,42 +3373,42 @@ function $o(n) {
3324
3373
  id: `${r}-listbox`,
3325
3374
  ref: C,
3326
3375
  role: "listbox",
3327
- style: x ? {
3328
- left: x.left,
3329
- maxHeight: x.maxHeight,
3330
- minWidth: x.minWidth,
3331
- top: x.top,
3376
+ style: I ? {
3377
+ left: I.left,
3378
+ maxHeight: I.maxHeight,
3379
+ minWidth: I.minWidth,
3380
+ top: I.top,
3332
3381
  zIndex: R.zIndex
3333
3382
  } : { visibility: "hidden", zIndex: R.zIndex },
3334
- children: v.map((I, N) => /* @__PURE__ */ O(
3383
+ children: v.map((x, N) => /* @__PURE__ */ O(
3335
3384
  "div",
3336
3385
  {
3337
- "aria-disabled": I.disabled || void 0,
3338
- "aria-selected": I.value === b,
3386
+ "aria-disabled": x.disabled || void 0,
3387
+ "aria-selected": x.value === b,
3339
3388
  className: "nk-select__option",
3340
3389
  "data-highlighted": N === i || void 0,
3341
- "data-selected": I.value === b || void 0,
3390
+ "data-selected": x.value === b || void 0,
3342
3391
  id: `${r}-option-${N}`,
3343
3392
  onPointerDown: (T) => {
3344
- T.preventDefault(), I.disabled || p(I);
3393
+ T.preventDefault(), x.disabled || p(x);
3345
3394
  },
3346
3395
  onPointerMove: () => {
3347
- I.disabled || f(N);
3396
+ x.disabled || f(N);
3348
3397
  },
3349
3398
  role: "option",
3350
3399
  children: [
3351
- I.icon ? /* @__PURE__ */ a(me, { type: I.icon }) : null,
3352
- /* @__PURE__ */ a("span", { className: "nk-select__option-label", children: I.label }),
3353
- I.value === b ? /* @__PURE__ */ a(me, { className: "nk-select__check", type: "checkmark" }) : null
3400
+ x.icon ? /* @__PURE__ */ a(me, { type: x.icon }) : null,
3401
+ /* @__PURE__ */ a("span", { className: "nk-select__option-label", children: x.label }),
3402
+ x.value === b ? /* @__PURE__ */ a(me, { className: "nk-select__check", type: "checkmark" }) : null
3354
3403
  ]
3355
3404
  },
3356
- I.value
3405
+ x.value
3357
3406
  ))
3358
3407
  }
3359
3408
  );
3360
3409
  }
3361
3410
  function Go(n) {
3362
- var ke;
3411
+ var ye;
3363
3412
  const {
3364
3413
  "aria-invalid": t,
3365
3414
  className: e,
@@ -3375,27 +3424,27 @@ function Go(n) {
3375
3424
  name: p,
3376
3425
  onChange: v,
3377
3426
  onClick: m,
3378
- onEscapeKeyDown: x,
3427
+ onEscapeKeyDown: I,
3379
3428
  onKeyDown: b,
3380
3429
  onOpenChange: w,
3381
3430
  onPointerDownOutside: M,
3382
3431
  options: _,
3383
3432
  placeholder: R,
3384
- portalContainer: k,
3433
+ portalContainer: y,
3385
3434
  required: C = !1,
3386
- style: I,
3435
+ style: x,
3387
3436
  value: N,
3388
3437
  width: T,
3389
3438
  ...z
3390
3439
  } = n;
3391
3440
  zo(_);
3392
- const Z = Le(), H = d ?? Z, E = D(null), U = D(null), S = D(null), y = D(""), [P, A] = $(null), [B, V] = $(!1), [j, te] = $(-1), [ee, X] = $(r), K = N !== void 0, ce = K ? N : ee, pe = _.find(
3441
+ const Z = Le(), H = d ?? Z, E = D(null), U = D(null), S = D(null), k = D(""), [P, A] = $(null), [B, V] = $(!1), [j, te] = $(-1), [ee, X] = $(r), K = N !== void 0, ce = K ? N : ee, pe = _.find(
3393
3442
  (h) => h.value === ce
3394
- ), be = c || he(t), Ee = ge(c, t), G = Ye(B), ne = (k == null ? void 0 : k.ownerDocument) ?? ((ke = E.current) == null ? void 0 : ke.ownerDocument) ?? (typeof document > "u" ? null : document), le = qo(
3443
+ ), be = c || he(t), Ee = ge(c, t), G = Ye(B), ne = (y == null ? void 0 : y.ownerDocument) ?? ((ye = E.current) == null ? void 0 : ye.ownerDocument) ?? (typeof document > "u" ? null : document), le = qo(
3395
3444
  G.present,
3396
3445
  E.current,
3397
3446
  P
3398
- ), re = T === void 0 ? I : { ...I, width: T }, Y = s ?? pe, ve = W(
3447
+ ), re = T === void 0 ? x : { ...x, width: T }, Y = s ?? pe, ve = W(
3399
3448
  (h) => {
3400
3449
  jo(
3401
3450
  h,
@@ -3413,7 +3462,7 @@ function Go(n) {
3413
3462
  te(
3414
3463
  L >= 0 ? L : on(_, Q, h)
3415
3464
  ), ie(!0);
3416
- }, [_, ce, ie]), ye = W((h) => {
3465
+ }, [_, ce, ie]), ke = W((h) => {
3417
3466
  var L;
3418
3467
  h.disabled || (K || X(h.value), ie(!1), (L = E.current) == null || L.focus(), v == null || v(h.value));
3419
3468
  }, [K, v, ie]), Se = W(() => {
@@ -3448,7 +3497,7 @@ function Go(n) {
3448
3497
  if (h.key === "Enter" || h.key === " ") {
3449
3498
  h.preventDefault();
3450
3499
  const L = _[j];
3451
- B && L ? ye(L) : B || se();
3500
+ B && L ? ke(L) : B || se();
3452
3501
  return;
3453
3502
  }
3454
3503
  if (h.key === "Tab") {
@@ -3458,13 +3507,13 @@ function Go(n) {
3458
3507
  if (h.key.length === 1 && !h.altKey && !h.ctrlKey && !h.metaKey) {
3459
3508
  const L = h.currentTarget.ownerDocument.defaultView;
3460
3509
  if (!L) return;
3461
- const Q = h.key.toLocaleLowerCase(), oe = y.current + Q, ae = Array.from(oe).every((Fe) => Fe === Q);
3462
- y.current = ae ? Q : oe, S.current !== null && L.clearTimeout(S.current), S.current = L.setTimeout(() => {
3463
- y.current = "", S.current = null;
3510
+ const Q = h.key.toLocaleLowerCase(), oe = k.current + Q, ae = Array.from(oe).every((Fe) => Fe === Q);
3511
+ k.current = ae ? Q : oe, S.current !== null && L.clearTimeout(S.current), S.current = L.setTimeout(() => {
3512
+ k.current = "", S.current = null;
3464
3513
  }, 500);
3465
3514
  const ue = Wo(
3466
3515
  _,
3467
- y.current,
3516
+ k.current,
3468
3517
  j
3469
3518
  );
3470
3519
  ue >= 0 && (h.preventDefault(), B || ie(!0), te(ue));
@@ -3574,7 +3623,7 @@ function Go(n) {
3574
3623
  G.present && ne ? /* @__PURE__ */ a(
3575
3624
  Ge,
3576
3625
  {
3577
- container: k,
3626
+ container: y,
3578
3627
  inheritFrom: E.current,
3579
3628
  children: /* @__PURE__ */ a(
3580
3629
  $o,
@@ -3586,11 +3635,11 @@ function Go(n) {
3586
3635
  id: H,
3587
3636
  listboxReference: A,
3588
3637
  onEscapeDismiss: Se,
3589
- onEscapeKeyDown: x,
3638
+ onEscapeKeyDown: I,
3590
3639
  onHighlight: te,
3591
3640
  onOutsideDismiss: de,
3592
3641
  onPointerDownOutside: M,
3593
- onSelect: ye,
3642
+ onSelect: ke,
3594
3643
  options: _,
3595
3644
  ownerDocument: ne,
3596
3645
  position: le,
@@ -3605,7 +3654,7 @@ function Go(n) {
3605
3654
  }
3606
3655
  );
3607
3656
  }
3608
- const Sr = g(function(t, e) {
3657
+ const Rr = g(function(t, e) {
3609
3658
  const { options: o } = t;
3610
3659
  return o !== void 0 ? /* @__PURE__ */ a(
3611
3660
  Go,
@@ -3620,7 +3669,7 @@ const Sr = g(function(t, e) {
3620
3669
  forwardedReference: e
3621
3670
  }
3622
3671
  );
3623
- }), Rr = g(function(t, e) {
3672
+ }), Tr = g(function(t, e) {
3624
3673
  const {
3625
3674
  "aria-hidden": o = !0,
3626
3675
  className: i,
@@ -3641,7 +3690,7 @@ const Sr = g(function(t, e) {
3641
3690
  style: { ...s, width: u, height: r }
3642
3691
  }
3643
3692
  );
3644
- }), Tr = g(function(t, e) {
3693
+ }), Vr = g(function(t, e) {
3645
3694
  const {
3646
3695
  "aria-invalid": o,
3647
3696
  className: i,
@@ -3674,13 +3723,13 @@ const Sr = g(function(t, e) {
3674
3723
  }
3675
3724
  );
3676
3725
  }), Ko = 500, On = qe(null);
3677
- function Vr(n) {
3726
+ function Ar(n) {
3678
3727
  const { children: t, delay: e = Ko } = n, o = Me(() => ({
3679
3728
  delay: e
3680
3729
  }), [e]);
3681
3730
  return /* @__PURE__ */ a(On.Provider, { value: o, children: t });
3682
3731
  }
3683
- const Bn = 500, kn = 100;
3732
+ const Bn = 500, yn = 100;
3684
3733
  function Uo(n, t, e, o) {
3685
3734
  t.current = n, De(e, n), De(o, n);
3686
3735
  }
@@ -3709,21 +3758,21 @@ const Qo = g(function(t, e) {
3709
3758
  throw new Error("Tooltip content must not be empty");
3710
3759
  if (o.type === _e)
3711
3760
  throw new Error("Tooltip requires a single non-Fragment trigger");
3712
- const x = `${Le()}-tooltip`, b = Ne(On), w = o.props, M = Rn(o), _ = D(null), R = D(null), k = D(f), C = D(!1), I = D(null), N = D(null), T = D(null), z = D(!1), Z = D(!1), H = D(!1), E = D(!1), [U, S] = $(null), [y, P] = $(null), [A, B] = $(!1);
3713
- k.current = f;
3761
+ const I = `${Le()}-tooltip`, b = Ne(On), w = o.props, M = Rn(o), _ = D(null), R = D(null), y = D(f), C = D(!1), x = D(null), N = D(null), T = D(null), z = D(!1), Z = D(!1), H = D(!1), E = D(!1), [U, S] = $(null), [k, P] = $(null), [A, B] = $(!1);
3762
+ y.current = f;
3714
3763
  const V = Yo(
3715
3764
  u ?? (b == null ? void 0 : b.delay) ?? Bn
3716
3765
  ), j = Ye(A), te = (p == null ? void 0 : p.ownerDocument) ?? (U == null ? void 0 : U.ownerDocument) ?? (typeof document > "u" ? null : document), ee = Ke(j.present, te), X = Tn(
3717
3766
  j.present,
3718
3767
  c,
3719
3768
  U,
3720
- y
3769
+ k
3721
3770
  ), K = Me(
3722
3771
  () => [_, R],
3723
3772
  []
3724
3773
  ), ce = Xo(
3725
3774
  w["aria-describedby"],
3726
- x
3775
+ I
3727
3776
  ), pe = A && j.present ? ce : w["aria-describedby"], be = W(
3728
3777
  (h) => {
3729
3778
  Uo(
@@ -3740,8 +3789,8 @@ const Qo = g(function(t, e) {
3740
3789
  },
3741
3790
  []
3742
3791
  ), G = W(() => {
3743
- const h = I.current;
3744
- h && h.ownerWindow.clearTimeout(h.timerId), I.current = null;
3792
+ const h = x.current;
3793
+ h && h.ownerWindow.clearTimeout(h.timerId), x.current = null;
3745
3794
  }, []), ne = W(() => {
3746
3795
  const h = N.current;
3747
3796
  h && h.ownerWindow.clearTimeout(h.timerId), N.current = null;
@@ -3779,9 +3828,9 @@ const Qo = g(function(t, e) {
3779
3828
  const h = (Q = _.current) == null ? void 0 : Q.ownerDocument.defaultView;
3780
3829
  if (!h) return;
3781
3830
  const L = h.setTimeout(() => {
3782
- I.current = null, k.current || re(!0);
3831
+ x.current = null, y.current || re(!0);
3783
3832
  }, V);
3784
- I.current = { ownerWindow: h, timerId: L };
3833
+ x.current = { ownerWindow: h, timerId: L };
3785
3834
  }, [ne, G, V, re]);
3786
3835
  function ie(h) {
3787
3836
  var L;
@@ -3795,19 +3844,19 @@ const Qo = g(function(t, e) {
3795
3844
  var L;
3796
3845
  (L = w.onBlur) == null || L.call(w, h), !h.currentTarget.contains(h.relatedTarget) && (Z.current = !1, G(), Y(0));
3797
3846
  }
3798
- function ye(h) {
3847
+ function ke(h) {
3799
3848
  var L;
3800
3849
  (L = w.onMouseEnter) == null || L.call(w, h), H.current = !0, ve();
3801
3850
  }
3802
3851
  function Se(h) {
3803
3852
  var L;
3804
- (L = w.onMouseLeave) == null || L.call(w, h), H.current = !1, G(), Y(kn);
3853
+ (L = w.onMouseLeave) == null || L.call(w, h), H.current = !1, G(), Y(yn);
3805
3854
  }
3806
3855
  function de() {
3807
3856
  E.current = !0, ne();
3808
3857
  }
3809
3858
  function Re() {
3810
- E.current = !1, Y(kn);
3859
+ E.current = !1, Y(yn);
3811
3860
  }
3812
3861
  function Te(h) {
3813
3862
  var oe, ae;
@@ -3843,14 +3892,14 @@ const Qo = g(function(t, e) {
3843
3892
  o,
3844
3893
  { ref: be }
3845
3894
  );
3846
- const ke = Pe(
3895
+ const ye = Pe(
3847
3896
  o,
3848
3897
  {
3849
3898
  "aria-describedby": pe,
3850
3899
  className: [w.className, "nk-tooltip__trigger", i].filter(Boolean).join(" "),
3851
3900
  onBlur: se,
3852
3901
  onFocus: ie,
3853
- onMouseEnter: ye,
3902
+ onMouseEnter: ke,
3854
3903
  onMouseLeave: Se,
3855
3904
  onPointerDown: Te,
3856
3905
  ref: be,
@@ -3858,7 +3907,7 @@ const Qo = g(function(t, e) {
3858
3907
  }
3859
3908
  );
3860
3909
  return /* @__PURE__ */ O(je, { children: [
3861
- ke,
3910
+ ye,
3862
3911
  j.present && te ? /* @__PURE__ */ a(
3863
3912
  Ge,
3864
3913
  {
@@ -3872,7 +3921,7 @@ const Qo = g(function(t, e) {
3872
3921
  className: ["nk-tooltip", l].filter(Boolean).join(" "),
3873
3922
  "data-placement": (X == null ? void 0 : X.placement) ?? c,
3874
3923
  "data-state": j.state === "closing" ? "closing" : "open",
3875
- id: x,
3924
+ id: I,
3876
3925
  onMouseEnter: de,
3877
3926
  onMouseLeave: Re,
3878
3927
  role: "tooltip",
@@ -4045,9 +4094,9 @@ const ir = g(
4045
4094
  rel: c,
4046
4095
  target: p,
4047
4096
  ...v
4048
- } = t, m = D(null), x = l !== void 0 || f !== void 0, b = (u == null ? void 0 : u.trim()) || (l !== void 0 ? "Open row" : "Activate row");
4049
- function w(k) {
4050
- m.current = k;
4097
+ } = t, m = D(null), I = l !== void 0 || f !== void 0, b = (u == null ? void 0 : u.trim()) || (l !== void 0 ? "Open row" : "Activate row");
4098
+ function w(y) {
4099
+ m.current = y;
4051
4100
  }
4052
4101
  const M = l !== void 0 ? {
4053
4102
  kind: "link",
@@ -4067,28 +4116,28 @@ const ir = g(
4067
4116
  onClick: f,
4068
4117
  reference: w
4069
4118
  } : void 0, _ = M ? rr(o, M) : { content: o };
4070
- function R(k) {
4071
- if (k.defaultPrevented) return;
4072
- const C = k.target;
4073
- if (!(C instanceof Element) || nr(C, k.currentTarget)) return;
4074
- const I = m.current;
4075
- if (!I) return;
4076
- const N = I.ownerDocument.defaultView;
4119
+ function R(y) {
4120
+ if (y.defaultPrevented) return;
4121
+ const C = y.target;
4122
+ if (!(C instanceof Element) || nr(C, y.currentTarget)) return;
4123
+ const x = m.current;
4124
+ if (!x) return;
4125
+ const N = x.ownerDocument.defaultView;
4077
4126
  if (!N) {
4078
- I.click();
4127
+ x.click();
4079
4128
  return;
4080
4129
  }
4081
- I.dispatchEvent(new N.MouseEvent("click", {
4082
- altKey: k.altKey,
4130
+ x.dispatchEvent(new N.MouseEvent("click", {
4131
+ altKey: y.altKey,
4083
4132
  bubbles: !0,
4084
- button: k.button,
4085
- buttons: k.buttons,
4133
+ button: y.button,
4134
+ buttons: y.buttons,
4086
4135
  cancelable: !0,
4087
- clientX: k.clientX,
4088
- clientY: k.clientY,
4089
- ctrlKey: k.ctrlKey,
4090
- metaKey: k.metaKey,
4091
- shiftKey: k.shiftKey
4136
+ clientX: y.clientX,
4137
+ clientY: y.clientY,
4138
+ ctrlKey: y.ctrlKey,
4139
+ metaKey: y.metaKey,
4140
+ shiftKey: y.shiftKey
4092
4141
  }));
4093
4142
  }
4094
4143
  return /* @__PURE__ */ a(
@@ -4097,8 +4146,8 @@ const ir = g(
4097
4146
  ...v,
4098
4147
  ref: e,
4099
4148
  className: ["nk-table__row", i].filter(Boolean).join(" "),
4100
- "data-interactive": x || void 0,
4101
- onClick: x ? R : void 0,
4149
+ "data-interactive": I || void 0,
4150
+ onClick: I ? R : void 0,
4102
4151
  children: _.content
4103
4152
  }
4104
4153
  );
@@ -4147,7 +4196,7 @@ const ir = g(
4147
4196
  truncate: u,
4148
4197
  value: f,
4149
4198
  ...d
4150
- } = t, { rowTrigger: c, ...p } = d, v = tr(f, i, l), m = u === void 0 ? void 0 : { maxWidth: u }, x = s ?? (u === void 0 ? void 0 : or(v));
4199
+ } = t, { rowTrigger: c, ...p } = d, v = tr(f, i, l), m = u === void 0 ? void 0 : { maxWidth: u }, I = s ?? (u === void 0 ? void 0 : or(v));
4151
4200
  return /* @__PURE__ */ O(
4152
4201
  "td",
4153
4202
  {
@@ -4155,7 +4204,7 @@ const ir = g(
4155
4204
  ref: e,
4156
4205
  className: ["nk-table__cell", r].filter(Boolean).join(" "),
4157
4206
  "data-align": o,
4158
- title: x,
4207
+ title: I,
4159
4208
  children: [
4160
4209
  (c == null ? void 0 : c.kind) === "link" && c.linkProperties ? /* @__PURE__ */ a(
4161
4210
  "a",
@@ -4232,7 +4281,7 @@ const ir = g(
4232
4281
  containerClassName: l,
4233
4282
  scrollContainerLabel: s,
4234
4283
  ...u
4235
- } = t, f = D(null), d = D(null), [c, p] = $(!1), [v, m] = $(!1), x = s ?? (o ? `${o} scroll area` : "Scrollable table"), b = W(
4284
+ } = t, f = D(null), d = D(null), [c, p] = $(!1), [v, m] = $(!1), I = s ?? (o ? `${o} scroll area` : "Scrollable table"), b = W(
4236
4285
  (M) => {
4237
4286
  d.current = M, De(e, M);
4238
4287
  },
@@ -4241,17 +4290,17 @@ const ir = g(
4241
4290
  q(() => {
4242
4291
  const M = f.current, _ = d.current;
4243
4292
  if (!M || !_) return;
4244
- const R = M, k = _;
4293
+ const R = M, y = _;
4245
4294
  function C() {
4246
4295
  const z = R.scrollWidth > R.clientWidth;
4247
4296
  p(z), z || m(!1);
4248
4297
  }
4249
4298
  C();
4250
- const I = R.ownerDocument.defaultView;
4251
- I == null || I.addEventListener("resize", C);
4252
- const N = I == null ? void 0 : I.ResizeObserver, T = N ? new N(C) : void 0;
4253
- return T == null || T.observe(R), T == null || T.observe(k), () => {
4254
- I == null || I.removeEventListener("resize", C), T == null || T.disconnect();
4299
+ const x = R.ownerDocument.defaultView;
4300
+ x == null || x.addEventListener("resize", C);
4301
+ const N = x == null ? void 0 : x.ResizeObserver, T = N ? new N(C) : void 0;
4302
+ return T == null || T.observe(R), T == null || T.observe(y), () => {
4303
+ x == null || x.removeEventListener("resize", C), T == null || T.disconnect();
4255
4304
  };
4256
4305
  }, []);
4257
4306
  function w(M) {
@@ -4261,7 +4310,7 @@ const ir = g(
4261
4310
  "div",
4262
4311
  {
4263
4312
  ref: f,
4264
- "aria-label": c ? x : void 0,
4313
+ "aria-label": c ? I : void 0,
4265
4314
  className: ["nk-table__container", l].filter(Boolean).join(" "),
4266
4315
  "data-scrolled": v || void 0,
4267
4316
  onScroll: w,
@@ -4279,7 +4328,7 @@ const ir = g(
4279
4328
  )
4280
4329
  }
4281
4330
  );
4282
- }), Ar = Object.assign(fr, {
4331
+ }), Or = Object.assign(fr, {
4283
4332
  Action: dr,
4284
4333
  ActionCell: ur,
4285
4334
  ActionHeaderCell: cr,
@@ -4290,10 +4339,10 @@ const ir = g(
4290
4339
  Head: ir,
4291
4340
  Row: sr
4292
4341
  });
4293
- function In(n) {
4342
+ function xn(n) {
4294
4343
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : 1;
4295
4344
  }
4296
- const Or = g(
4345
+ const Br = g(
4297
4346
  function(t, e) {
4298
4347
  const {
4299
4348
  "aria-invalid": o,
@@ -4306,9 +4355,9 @@ const Or = g(
4306
4355
  rows: d,
4307
4356
  style: c,
4308
4357
  ...p
4309
- } = t, v = In(d ?? s ?? 3), x = `calc(${In(s ?? d ?? 3) * 1.25}em + var(--nk-text-area-padding) * 2 + var(--nk-text-area-border-width) * 2)`, b = {
4358
+ } = t, v = xn(d ?? s ?? 3), I = `calc(${xn(s ?? d ?? 3) * 1.25}em + var(--nk-text-area-padding) * 2 + var(--nk-text-area-border-width) * 2)`, b = {
4310
4359
  ...c,
4311
- "--nk-text-area-min-height": x
4360
+ "--nk-text-area-min-height": I
4312
4361
  };
4313
4362
  return /* @__PURE__ */ a(
4314
4363
  "textarea",
@@ -4328,34 +4377,35 @@ const Or = g(
4328
4377
  }
4329
4378
  );
4330
4379
  export {
4331
- br as Alert,
4380
+ kr as Alert,
4332
4381
  yr as Avatar,
4333
- kr as Badge,
4382
+ xr as Badge,
4334
4383
  ze as Button,
4335
4384
  Ir as Card,
4336
4385
  Wt as Checkbox,
4337
4386
  qt as CheckboxGroup,
4338
- xr as Content,
4339
- Cr as Divider,
4340
- Pr as Field,
4387
+ Cr as Content,
4388
+ Pr as Divider,
4389
+ _r as Field,
4341
4390
  me as Icon,
4342
- _r as Input,
4343
- Nr as Modal,
4344
- Mr as PinInput,
4345
- Lr as Popover,
4346
- Er as Radio,
4391
+ Nr as Input,
4392
+ Lr as Modal,
4393
+ Er as PinInput,
4394
+ Mr as Popover,
4395
+ Sr as Radio,
4347
4396
  Fo as RadioGroup,
4348
- Sr as Select,
4349
- Rr as Skeleton,
4397
+ Rr as Select,
4398
+ Tr as Skeleton,
4350
4399
  Pn as Spinner,
4351
- Tr as Switch,
4352
- Ar as Table,
4400
+ Vr as Switch,
4401
+ Or as Table,
4353
4402
  fe as Text,
4354
- Or as TextArea,
4403
+ Br as TextArea,
4355
4404
  Qo as Tooltip,
4356
- Vr as TooltipProvider,
4405
+ Ar as TooltipProvider,
4357
4406
  Ce as breakpoint,
4358
- mr as cell,
4359
- wr as px,
4360
- gr as space
4407
+ gr as cell,
4408
+ br as px,
4409
+ wr as space,
4410
+ mr as tokens
4361
4411
  };