@jirawatpyk/aura-react 5.33.0 → 5.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,9 +80,11 @@ __export(index_exports, {
80
80
  Separator: () => Separator,
81
81
  SideNav: () => SideNav,
82
82
  Skeleton: () => Skeleton,
83
+ Sparkline: () => Sparkline,
83
84
  Stack: () => Stack,
84
85
  Stat: () => Stat,
85
86
  StatusPill: () => StatusPill,
87
+ StatusTile: () => StatusTile,
86
88
  Stepper: () => Stepper,
87
89
  Surface: () => Surface,
88
90
  Switch: () => Switch,
@@ -97,6 +99,7 @@ __export(index_exports, {
97
99
  Textarea: () => Textarea,
98
100
  Th: () => Th,
99
101
  ThemeStyle: () => ThemeStyle,
102
+ TileGrid: () => TileGrid,
100
103
  TimePicker: () => TimePicker,
101
104
  Toaster: () => Toaster,
102
105
  Tooltip: () => Tooltip,
@@ -189,9 +192,9 @@ function iconSvg(shapes, props, ref) {
189
192
  ...a11y
190
193
  },
191
194
  shapes.map(function(s, i) {
192
- const attrs = { key: i };
193
- for (const k in s[1]) attrs[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
194
- return h(s[0], attrs);
195
+ const attrs2 = { key: i };
196
+ for (const k in s[1]) attrs2[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
197
+ return h(s[0], attrs2);
195
198
  })
196
199
  );
197
200
  }
@@ -304,9 +307,9 @@ function compare(a, b) {
304
307
  return collator ? collator.compare(String(a), String(b)) : String(a).localeCompare(String(b));
305
308
  }
306
309
  var uid = React3.useId || function() {
307
- const r = React3.useRef(null);
308
- if (!r.current) r.current = "aura-" + Math.random().toString(36).slice(2, 9);
309
- return r.current;
310
+ const r2 = React3.useRef(null);
311
+ if (!r2.current) r2.current = "aura-" + Math.random().toString(36).slice(2, 9);
312
+ return r2.current;
310
313
  };
311
314
  var FOCUSABLE = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
312
315
  function noopSubscribe() {
@@ -344,10 +347,10 @@ function trapTab(e, container) {
344
347
  function useMergedRef(a, b) {
345
348
  return React3.useCallback(
346
349
  function(node) {
347
- [a, b].forEach(function(r) {
348
- if (!r) return;
349
- if (typeof r === "function") r(node);
350
- else r.current = node;
350
+ [a, b].forEach(function(r2) {
351
+ if (!r2) return;
352
+ if (typeof r2 === "function") r2(node);
353
+ else r2.current = node;
351
354
  });
352
355
  },
353
356
  [a, b]
@@ -572,6 +575,14 @@ var IconPanelLeftOpen = /* @__PURE__ */ defineIcon("panel-left-open", [
572
575
  ["path", { d: "M9 3v18" }],
573
576
  ["path", { d: "m14 9 3 3-3 3" }]
574
577
  ]);
578
+ var IconWrench = /* @__PURE__ */ defineIcon("wrench", [
579
+ [
580
+ "path",
581
+ {
582
+ d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z"
583
+ }
584
+ ]
585
+ ]);
575
586
 
576
587
  // src/display.tsx
577
588
  var h2 = React4.createElement;
@@ -911,11 +922,16 @@ var th = {
911
922
  pageN: function(p) {
912
923
  return "\u0E2B\u0E19\u0E49\u0E32 " + p;
913
924
  },
914
- progressReserved: function(v, r, max) {
915
- return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
925
+ progressReserved: function(v, r2, max) {
926
+ return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r2);
916
927
  },
917
928
  breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
918
929
  stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
930
+ statusDown: "\u0E25\u0E48\u0E21",
931
+ statusProblem: "\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32",
932
+ statusMaintenance: "\u0E1B\u0E34\u0E14\u0E1B\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E38\u0E07",
933
+ statusOk: "\u0E1B\u0E01\u0E15\u0E34",
934
+ statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
919
935
  accepts: function(list, max) {
920
936
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
921
937
  }
@@ -1042,11 +1058,16 @@ var sv = {
1042
1058
  pageN: function(p) {
1043
1059
  return "Sida " + p;
1044
1060
  },
1045
- progressReserved: function(v, r, max) {
1046
- return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
1061
+ progressReserved: function(v, r2, max) {
1062
+ return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r2) + " reserverade";
1047
1063
  },
1048
1064
  breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
1049
1065
  stepError: "har fel",
1066
+ statusDown: "Nere",
1067
+ statusProblem: "Problem",
1068
+ statusMaintenance: "Underh\xE5ll",
1069
+ statusOk: "OK",
1070
+ statusUnknown: "Ingen data",
1050
1071
  accepts: function(list, max) {
1051
1072
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
1052
1073
  }
@@ -1174,11 +1195,16 @@ var STRINGS = {
1174
1195
  pageN: function(p) {
1175
1196
  return "Page " + p;
1176
1197
  },
1177
- progressReserved: function(v, r, max) {
1178
- return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
1198
+ progressReserved: function(v, r2, max) {
1199
+ return n2(v) + " of " + n2(max) + " used, " + n2(r2) + " reserved";
1179
1200
  },
1180
1201
  breadcrumbMore: "Show the full path",
1181
1202
  stepError: "has errors",
1203
+ statusDown: "Down",
1204
+ statusProblem: "Problem",
1205
+ statusMaintenance: "Maintenance",
1206
+ statusOk: "OK",
1207
+ statusUnknown: "No data",
1182
1208
  accepts: function(list, max) {
1183
1209
  return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
1184
1210
  }
@@ -1350,6 +1376,11 @@ function source(t) {
1350
1376
  const tag = el.closest(".aura-tag");
1351
1377
  if (tag) s = tag.querySelector(".aura-tag__text[" + ATTR + "]");
1352
1378
  }
1379
+ if (!s) {
1380
+ const tile = el.closest(".aura-status-tile");
1381
+ const control = el.closest("a, button, input, select, textarea, [tabindex]");
1382
+ if (tile && (!control || control === tile)) s = tile.querySelector(".aura-status-tile__title[" + ATTR + "]");
1383
+ }
1353
1384
  if (!s || !s.getAttribute(ATTR) || !s.isConnected) return null;
1354
1385
  if (s.getAttribute("aria-expanded") === "true") return null;
1355
1386
  return s;
@@ -1360,11 +1391,11 @@ function place() {
1360
1391
  hide();
1361
1392
  return;
1362
1393
  }
1363
- const r = cur.getBoundingClientRect(), t = tip.getBoundingClientRect(), vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
1364
- let top = r.top - t.height - gap;
1365
- if (top < m && r.bottom + gap + t.height <= vh - m) top = r.bottom + gap;
1394
+ const r2 = cur.getBoundingClientRect(), t = tip.getBoundingClientRect(), vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
1395
+ let top = r2.top - t.height - gap;
1396
+ if (top < m && r2.bottom + gap + t.height <= vh - m) top = r2.bottom + gap;
1366
1397
  top = Math.max(m, Math.min(top, vh - t.height - m));
1367
- const left = Math.max(m, Math.min(r.left + r.width / 2 - t.width / 2, vw - t.width - m));
1398
+ const left = Math.max(m, Math.min(r2.left + r2.width / 2 - t.width / 2, vw - t.width - m));
1368
1399
  tip.style.top = top + "px";
1369
1400
  tip.style.left = left + "px";
1370
1401
  }
@@ -1538,9 +1569,9 @@ function makesBlock(s) {
1538
1569
  }
1539
1570
  function inView(el) {
1540
1571
  if (!el.isConnected) return false;
1541
- const r = el.getBoundingClientRect();
1542
- if (r.width === 0 && r.height === 0) return false;
1543
- let top = r.top, bottom = r.bottom, left = r.left, right = r.right;
1572
+ const r2 = el.getBoundingClientRect();
1573
+ if (r2.width === 0 && r2.height === 0) return false;
1574
+ let top = r2.top, bottom = r2.bottom, left = r2.left, right = r2.right;
1544
1575
  let pos = getComputedStyle(el).position;
1545
1576
  for (let p = el.parentElement; p && p !== document.body && p !== document.documentElement; p = p.parentElement) {
1546
1577
  const s = getComputedStyle(p);
@@ -1578,16 +1609,16 @@ var Menu = React9.forwardRef(function Menu2(props, ref) {
1578
1609
  function place2() {
1579
1610
  const a = props.anchor, m = own.current;
1580
1611
  if (!a || !m) return;
1581
- const r = a.getBoundingClientRect(), mh = m.scrollHeight, mw = m.offsetWidth, below2 = window.innerHeight - r.bottom - 12, above = r.top - 12;
1582
- let top = r.bottom + 4, maxHeight;
1612
+ const r2 = a.getBoundingClientRect(), mh = m.scrollHeight, mw = m.offsetWidth, below2 = window.innerHeight - r2.bottom - 12, above = r2.top - 12;
1613
+ let top = r2.bottom + 4, maxHeight;
1583
1614
  if (mh > below2) {
1584
- if (mh <= above) top = r.top - mh - 4;
1615
+ if (mh <= above) top = r2.top - mh - 4;
1585
1616
  else if (above > below2) {
1586
1617
  maxHeight = above;
1587
- top = r.top - above - 4;
1618
+ top = r2.top - above - 4;
1588
1619
  } else maxHeight = below2;
1589
1620
  }
1590
- const left = Math.max(8, Math.min(r.right - mw, window.innerWidth - mw - 8));
1621
+ const left = Math.max(8, Math.min(r2.right - mw, window.innerWidth - mw - 8));
1591
1622
  setPos(function(p) {
1592
1623
  return p && p.top === top && p.left === left && p.maxHeight === maxHeight ? p : { top, left, maxHeight };
1593
1624
  });
@@ -2051,9 +2082,9 @@ var HANDLED_KEYS = FORM_KEYS.concat([
2051
2082
  "size"
2052
2083
  ]);
2053
2084
  function pick(o, keys) {
2054
- const r = {};
2055
- for (const k of keys) if (k in o) r[k] = o[k];
2056
- return r;
2085
+ const r2 = {};
2086
+ for (const k of keys) if (k in o) r2[k] = o[k];
2087
+ return r2;
2057
2088
  }
2058
2089
  function readItems(el) {
2059
2090
  if (!el) return [];
@@ -2352,15 +2383,15 @@ var Select = React16.forwardRef(function Select2(props, ref) {
2352
2383
  function place2() {
2353
2384
  const t = trigRef.current && trigRef.current.parentElement;
2354
2385
  if (!t) return;
2355
- const r = t.getBoundingClientRect(), below2 = window.innerHeight - r.bottom - 8, above = r.top - 8, want = listRef.current ? listRef.current.scrollHeight : 320, up2 = below2 < Math.min(want, 200) && above > below2;
2356
- const lw = listRef.current ? Math.max(r.width, listRef.current.offsetWidth) : r.width;
2386
+ const r2 = t.getBoundingClientRect(), below2 = window.innerHeight - r2.bottom - 8, above = r2.top - 8, want = listRef.current ? listRef.current.scrollHeight : 320, up2 = below2 < Math.min(want, 200) && above > below2;
2387
+ const lw = listRef.current ? Math.max(r2.width, listRef.current.offsetWidth) : r2.width;
2357
2388
  const rtl = getComputedStyle(t).direction === "rtl";
2358
- const left = lw <= r.width ? r.left : Math.max(8, Math.min(rtl ? r.right - lw : r.left, window.innerWidth - lw - 8));
2389
+ const left = lw <= r2.width ? r2.left : Math.max(8, Math.min(rtl ? r2.right - lw : r2.left, window.innerWidth - lw - 8));
2359
2390
  pos[1]({
2360
2391
  left,
2361
- width: r.width,
2362
- top: up2 ? void 0 : r.bottom + 4,
2363
- bottom: up2 ? window.innerHeight - r.top + 4 : void 0,
2392
+ width: r2.width,
2393
+ top: up2 ? void 0 : r2.bottom + 4,
2394
+ bottom: up2 ? window.innerHeight - r2.top + 4 : void 0,
2364
2395
  maxHeight: Math.min(320, (up2 ? above : below2) - 4),
2365
2396
  rtl
2366
2397
  });
@@ -2555,10 +2586,10 @@ var Select = React16.forwardRef(function Select2(props, ref) {
2555
2586
  "aria-label": labelledBy ? void 0 : rest["aria-label"],
2556
2587
  className: "aura-combo__list"
2557
2588
  },
2558
- runs.map(function(r, n3) {
2559
- if (r.group === null) return /* @__PURE__ */ React16.createElement(React16.Fragment, { key: "r" + n3 }, r.items.map(option));
2589
+ runs.map(function(r2, n3) {
2590
+ if (r2.group === null) return /* @__PURE__ */ React16.createElement(React16.Fragment, { key: "r" + n3 }, r2.items.map(option));
2560
2591
  const gid = id + "-group-" + n3;
2561
- return /* @__PURE__ */ React16.createElement("div", { key: "r" + n3, role: "group", "aria-labelledby": gid }, /* @__PURE__ */ React16.createElement("div", { id: gid, className: "aura-select__group" }, r.group), r.items.map(option));
2592
+ return /* @__PURE__ */ React16.createElement("div", { key: "r" + n3, role: "group", "aria-labelledby": gid }, /* @__PURE__ */ React16.createElement("div", { id: gid, className: "aura-select__group" }, r2.group), r2.items.map(option));
2562
2593
  })
2563
2594
  )
2564
2595
  ),
@@ -3140,10 +3171,10 @@ function useCalendarPopover(boxRef) {
3140
3171
  const pos = React18.useState(null), popRef = React18.useRef(null), mounted = useMounted();
3141
3172
  function place2() {
3142
3173
  if (!boxRef.current) return;
3143
- const el = popRef.current, r = boxRef.current.getBoundingClientRect(), W = el ? el.offsetWidth : 320, H = el ? el.offsetHeight : 380;
3144
- const up2 = window.innerHeight - r.bottom < H + 12 && r.top > H + 12;
3145
- const left = Math.max(8, Math.min(r.left, window.innerWidth - W - 8));
3146
- pos[1](up2 ? { left, bottom: window.innerHeight - r.top + 4 } : { left, top: r.bottom + 4 });
3174
+ const el = popRef.current, r2 = boxRef.current.getBoundingClientRect(), W = el ? el.offsetWidth : 320, H = el ? el.offsetHeight : 380;
3175
+ const up2 = window.innerHeight - r2.bottom < H + 12 && r2.top > H + 12;
3176
+ const left = Math.max(8, Math.min(r2.left, window.innerWidth - W - 8));
3177
+ pos[1](up2 ? { left, bottom: window.innerHeight - r2.top + 4 } : { left, top: r2.bottom + 4 });
3147
3178
  }
3148
3179
  useIsoLayoutEffect(
3149
3180
  function() {
@@ -3389,10 +3420,10 @@ var DateRangePicker = React18.forwardRef(
3389
3420
  isDateDisabled: props.isDateDisabled
3390
3421
  };
3391
3422
  const o = { locale, calendar };
3392
- function show3(r) {
3393
- if (!r.start) return "";
3394
- if (!r.end) return formatDate(r.start, o) + " \u2013";
3395
- return formatDate(r.start, o) + " \u2013 " + formatDate(r.end, o);
3423
+ function show3(r2) {
3424
+ if (!r2.start) return "";
3425
+ if (!r2.end) return formatDate(r2.start, o) + " \u2013";
3426
+ return formatDate(r2.start, o) + " \u2013 " + formatDate(r2.end, o);
3396
3427
  }
3397
3428
  const bad = React18.useState(null);
3398
3429
  React18.useEffect(
@@ -3532,8 +3563,8 @@ var FilterDateRange = React19.forwardRef(
3532
3563
  draft[1](null);
3533
3564
  if (faceRef.current) faceRef.current.focus();
3534
3565
  }
3535
- function choose(r) {
3536
- if (r.start !== raw.start || r.end !== raw.end) st[1](r);
3566
+ function choose(r2) {
3567
+ if (r2.start !== raw.start || r2.end !== raw.end) st[1](r2);
3537
3568
  close();
3538
3569
  }
3539
3570
  function pick2(iso) {
@@ -3547,12 +3578,12 @@ var FilterDateRange = React19.forwardRef(
3547
3578
  }
3548
3579
  const isAny = !v.start || !v.end;
3549
3580
  const own = props["aria-label"] || void 0;
3550
- const attrs = {};
3581
+ const attrs2 = {};
3551
3582
  Object.keys(props).forEach(function(k) {
3552
3583
  if (k === "style" || /^(aria|data)-/.test(k) && k !== "aria-label")
3553
- attrs[k] = props[k];
3584
+ attrs2[k] = props[k];
3554
3585
  });
3555
- const presetBtn = function(label, r, on, key) {
3586
+ const presetBtn = function(label, r2, on, key) {
3556
3587
  return /* @__PURE__ */ React19.createElement(
3557
3588
  Button,
3558
3589
  {
@@ -3560,11 +3591,11 @@ var FilterDateRange = React19.forwardRef(
3560
3591
  size: "sm",
3561
3592
  variant: "ghost",
3562
3593
  touchHeight: true,
3563
- disabled: !!r.start && !!r.end && !(allowedDate(r.start, limits) && allowedDate(r.end, limits)),
3594
+ disabled: !!r2.start && !!r2.end && !(allowedDate(r2.start, limits) && allowedDate(r2.end, limits)),
3564
3595
  className: cx("aura-filterdate__preset", on && "is-selected"),
3565
3596
  "aria-pressed": on,
3566
3597
  onClick: function() {
3567
- choose(r);
3598
+ choose(r2);
3568
3599
  }
3569
3600
  },
3570
3601
  label
@@ -3629,7 +3660,7 @@ var FilterDateRange = React19.forwardRef(
3629
3660
  /* @__PURE__ */ React19.createElement(
3630
3661
  "button",
3631
3662
  {
3632
- ...attrs,
3663
+ ...attrs2,
3633
3664
  ref: setFace,
3634
3665
  id,
3635
3666
  type: "button",
@@ -3667,8 +3698,8 @@ var RadioGroup = React20.forwardRef(function RadioGroup2(props, ref) {
3667
3698
  function(el) {
3668
3699
  if (el)
3669
3700
  el.focus = function(opts) {
3670
- const r = el.querySelector('input[type="radio"]:checked') || el.querySelector('input[type="radio"]:not(:disabled)');
3671
- if (r) r.focus(opts);
3701
+ const r2 = el.querySelector('input[type="radio"]:checked') || el.querySelector('input[type="radio"]:not(:disabled)');
3702
+ if (r2) r2.focus(opts);
3672
3703
  };
3673
3704
  if (typeof ref === "function") ref(el);
3674
3705
  else if (ref) ref.current = el;
@@ -3834,14 +3865,14 @@ var Combobox = React22.forwardRef(
3834
3865
  }) : -1 : Math.min(active, shown.length - 1);
3835
3866
  function place2() {
3836
3867
  if (!boxRef.current) return;
3837
- const r = boxRef.current.getBoundingClientRect();
3838
- const maxH = 320, below2 = window.innerHeight - r.bottom - 8, up2 = below2 < 200 && r.top > below2;
3868
+ const r2 = boxRef.current.getBoundingClientRect();
3869
+ const maxH = 320, below2 = window.innerHeight - r2.bottom - 8, up2 = below2 < 200 && r2.top > below2;
3839
3870
  posState[1]({
3840
- left: r.left,
3841
- width: r.width,
3842
- top: up2 ? void 0 : r.bottom + 4,
3843
- bottom: up2 ? window.innerHeight - r.top + 4 : void 0,
3844
- maxHeight: Math.min(maxH, (up2 ? r.top : below2) - 8)
3871
+ left: r2.left,
3872
+ width: r2.width,
3873
+ top: up2 ? void 0 : r2.bottom + 4,
3874
+ bottom: up2 ? window.innerHeight - r2.top + 4 : void 0,
3875
+ maxHeight: Math.min(maxH, (up2 ? r2.top : below2) - 8)
3845
3876
  });
3846
3877
  }
3847
3878
  useIsoLayoutEffect(
@@ -4678,13 +4709,13 @@ var Tooltip = React27.forwardRef(function Tooltip2(props, ref) {
4678
4709
  }, []);
4679
4710
  function place2() {
4680
4711
  if (!anchor.current || !tip2.current) return;
4681
- const r = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
4712
+ const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
4682
4713
  const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
4683
4714
  let side = props.side || "top";
4684
- if (side === "top" && r.top - t.height - gap < m && r.bottom + gap + t.height <= vh - m) side = "bottom";
4685
- else if (side === "bottom" && r.bottom + gap + t.height > vh - m && r.top - t.height - gap >= m) side = "top";
4686
- else if (side === "left" && r.left - t.width - gap < m && r.right + gap + t.width <= vw - m) side = "right";
4687
- else if (side === "right" && r.right + gap + t.width > vw - m && r.left - t.width - gap >= m) side = "left";
4715
+ if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
4716
+ else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
4717
+ else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
4718
+ else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
4688
4719
  const clampX = function(x) {
4689
4720
  return Math.max(m, Math.min(x, vw - t.width - m));
4690
4721
  };
@@ -4693,12 +4724,12 @@ var Tooltip = React27.forwardRef(function Tooltip2(props, ref) {
4693
4724
  };
4694
4725
  let top, left;
4695
4726
  if (side === "top" || side === "bottom") {
4696
- top = clampY(side === "top" ? r.top - t.height - gap : r.bottom + gap);
4697
- left = clampX(r.left + r.width / 2 - t.width / 2);
4727
+ top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
4728
+ left = clampX(r2.left + r2.width / 2 - t.width / 2);
4698
4729
  } else {
4699
- left = side === "left" ? r.left - t.width - gap : r.right + gap;
4730
+ left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
4700
4731
  left = clampX(left);
4701
- top = clampY(r.top + r.height / 2 - t.height / 2);
4732
+ top = clampY(r2.top + r2.height / 2 - t.height / 2);
4702
4733
  }
4703
4734
  pos[1]({ top, left });
4704
4735
  }
@@ -5119,18 +5150,18 @@ function Command(props) {
5119
5150
  if (!g) groups.push(g = { name, items: [] });
5120
5151
  g.items.push(it);
5121
5152
  });
5122
- const flat2 = [];
5153
+ const flat3 = [];
5123
5154
  groups.forEach(function(g) {
5124
5155
  g.items.forEach(function(it) {
5125
- flat2.push(it);
5156
+ flat3.push(it);
5126
5157
  });
5127
5158
  });
5128
- const enabled = flat2.map(function(it, i2) {
5159
+ const enabled = flat3.map(function(it, i2) {
5129
5160
  return it.disabled ? -1 : i2;
5130
5161
  }).filter(function(i2) {
5131
5162
  return i2 >= 0;
5132
5163
  });
5133
- const byId = act[0] == null ? -1 : flat2.findIndex(function(it) {
5164
+ const byId = act[0] == null ? -1 : flat3.findIndex(function(it) {
5134
5165
  return it.id === act[0];
5135
5166
  });
5136
5167
  const active = enabled.indexOf(byId) >= 0 ? byId : enabled.length ? enabled[0] : -1;
@@ -5158,7 +5189,7 @@ function Command(props) {
5158
5189
  if (dir === "first") n3 = 0;
5159
5190
  else if (dir === "last") n3 = enabled.length - 1;
5160
5191
  else n3 = (at + dir + enabled.length) % enabled.length;
5161
- act[1](flat2[enabled[n3]].id);
5192
+ act[1](flat3[enabled[n3]].id);
5162
5193
  }
5163
5194
  function onKey(e) {
5164
5195
  if (e.key === "ArrowDown") {
@@ -5176,7 +5207,7 @@ function Command(props) {
5176
5207
  } else if (e.key === "Enter") {
5177
5208
  if (e.nativeEvent.isComposing || e.keyCode === 229) return;
5178
5209
  e.preventDefault();
5179
- if (active >= 0) run(flat2[active]);
5210
+ if (active >= 0) run(flat3[active]);
5180
5211
  }
5181
5212
  }
5182
5213
  if (!modal.ready) return null;
@@ -5210,8 +5241,8 @@ function Command(props) {
5210
5241
  "data-autofocus": "",
5211
5242
  type: "text",
5212
5243
  role: "combobox",
5213
- "aria-expanded": flat2.length > 0,
5214
- "aria-controls": flat2.length ? listId : void 0,
5244
+ "aria-expanded": flat3.length > 0,
5245
+ "aria-controls": flat3.length ? listId : void 0,
5215
5246
  "aria-autocomplete": "list",
5216
5247
  "aria-activedescendant": active >= 0 ? optId(active) : void 0,
5217
5248
  "aria-label": props.label || t.commandMenu,
@@ -5227,7 +5258,7 @@ function Command(props) {
5227
5258
  onKeyDown: onKey
5228
5259
  }
5229
5260
  ), /* @__PURE__ */ React31.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
5230
- /* @__PURE__ */ React31.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React31.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat2.length ? props.loading ? null : /* @__PURE__ */ React31.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React31.createElement(
5261
+ /* @__PURE__ */ React31.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React31.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat3.length ? props.loading ? null : /* @__PURE__ */ React31.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React31.createElement(
5231
5262
  "div",
5232
5263
  {
5233
5264
  id: listId,
@@ -5281,7 +5312,7 @@ function Command(props) {
5281
5312
  );
5282
5313
  })
5283
5314
  )),
5284
- /* @__PURE__ */ React31.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat2.length ? t.noMatches : props.loading === false && query ? t.results(flat2.length) : ""),
5315
+ /* @__PURE__ */ React31.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat3.length ? t.noMatches : props.loading === false && query ? t.results(flat3.length) : ""),
5285
5316
  /* @__PURE__ */ React31.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React31.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
5286
5317
  )
5287
5318
  ),
@@ -5528,13 +5559,13 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5528
5559
  const selState = useMaybeControlled(props.selected, props.defaultSelected || [], null);
5529
5560
  const onSel = React33.useRef(props.onSelectionChange);
5530
5561
  onSel.current = props.onSelectionChange;
5531
- const canSelect = function(r) {
5532
- return !!r && (!props.isRowSelectable || !!props.isRowSelectable(r));
5562
+ const canSelect = function(r2) {
5563
+ return !!r2 && (!props.isRowSelectable || !!props.isRowSelectable(r2));
5533
5564
  };
5534
5565
  const rejected = {};
5535
5566
  if (props.isRowSelectable)
5536
- rows.forEach(function(r) {
5537
- if (!canSelect(r)) rejected[String(r[rowKey])] = true;
5567
+ rows.forEach(function(r2) {
5568
+ if (!canSelect(r2)) rejected[String(r2[rowKey])] = true;
5538
5569
  });
5539
5570
  const selected = selState[0].filter(function(k) {
5540
5571
  return !rejected[String(k)];
@@ -5679,8 +5710,8 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5679
5710
  const el = e.target.closest ? e.target.closest(".aura-table__td") : null;
5680
5711
  if (!el || el.scrollWidth <= el.clientWidth + 1 || el.querySelector("button, input, .aura-pill"))
5681
5712
  return setTip(null);
5682
- const r = el.getBoundingClientRect();
5683
- setTip({ text: (el.textContent || "").trim(), left: r.left, top: r.top });
5713
+ const r2 = el.getBoundingClientRect();
5714
+ setTip({ text: (el.textContent || "").trim(), left: r2.left, top: r2.top });
5684
5715
  }
5685
5716
  function hideFull() {
5686
5717
  setTip(null);
@@ -5825,14 +5856,14 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5825
5856
  function() {
5826
5857
  if (manual || !sort || !sort.key || !byKey[sort.key]) return rows;
5827
5858
  const col = byKey[sort.key];
5828
- const val = col.sortValue || (col.pill ? function(r) {
5829
- return TONE_ORDER[col.tones && col.tones[r[col.key]] || toneFor(r[col.key])];
5830
- } : function(r) {
5831
- return r[col.key];
5859
+ const val = col.sortValue || (col.pill ? function(r2) {
5860
+ return TONE_ORDER[col.tones && col.tones[r2[col.key]] || toneFor(r2[col.key])];
5861
+ } : function(r2) {
5862
+ return r2[col.key];
5832
5863
  });
5833
5864
  const dir = sort.dir === "desc" ? -1 : 1;
5834
- return rows.map(function(r, i) {
5835
- return [r, i];
5865
+ return rows.map(function(r2, i) {
5866
+ return [r2, i];
5836
5867
  }).sort(function(a, b) {
5837
5868
  return compare(val(a[0]), val(b[0])) * dir || a[1] - b[1];
5838
5869
  }).map(function(p) {
@@ -5930,8 +5961,8 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5930
5961
  })
5931
5962
  );
5932
5963
  }
5933
- function rowLinkWrap(r, content) {
5934
- return rowHref ? /* @__PURE__ */ React33.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
5964
+ function rowLinkWrap(r2, content) {
5965
+ return rowHref ? /* @__PURE__ */ React33.createElement(Link, { href: rowHref(r2), className: "aura-table__row-link" }, content) : content;
5935
5966
  }
5936
5967
  const height = props.height || 0;
5937
5968
  const autoRows = props.rowHeight === "auto" && !height;
@@ -5986,9 +6017,9 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5986
6017
  },
5987
6018
  [stacked]
5988
6019
  );
5989
- function tabFor(r, c) {
5990
- if (!activeRendered) return r === 0 && c === ac ? 0 : -1;
5991
- return r === ar && c === acShown ? 0 : -1;
6020
+ function tabFor(r2, c) {
6021
+ if (!activeRendered) return r2 === 0 && c === ac ? 0 : -1;
6022
+ return r2 === ar && c === acShown ? 0 : -1;
5992
6023
  }
5993
6024
  React33.useEffect(function() {
5994
6025
  const p = pending.current;
@@ -6012,38 +6043,38 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6012
6043
  el.focus();
6013
6044
  }
6014
6045
  });
6015
- function focusCell(r, c, dir) {
6016
- r = Math.max(0, Math.min(r, lastR));
6046
+ function focusCell(r2, c, dir) {
6047
+ r2 = Math.max(0, Math.min(r2, lastR));
6017
6048
  c = Math.max(0, Math.min(c, nCols - 1));
6018
- if (stacked && r === 0 && nRows > 0 && (!(selectable && c === 0) || noCardSel)) r = 1;
6019
- if (gridRef.current && (r === T && hasTotal || stacked)) {
6049
+ if (stacked && r2 === 0 && nRows > 0 && (!(selectable && c === 0) || noCardSel)) r2 = 1;
6050
+ if (gridRef.current && (r2 === T && hasTotal || stacked)) {
6020
6051
  const shown2 = function(cc) {
6021
6052
  if (cardHidden[cc]) return false;
6022
- const e = gridRef.current.querySelector('[data-rc="' + r + ":" + cc + '"]');
6053
+ const e = gridRef.current.querySelector('[data-rc="' + r2 + ":" + cc + '"]');
6023
6054
  return !!e && e.getClientRects().length > 0;
6024
6055
  };
6025
6056
  c = nearestShown(c, dir || 1, shown2);
6026
6057
  }
6027
- activeState[1]({ r, c });
6028
- pending.current = { r, c };
6029
- if (virtual && hasTotal && r === T && !props.stickyFooter) {
6058
+ activeState[1]({ r: r2, c });
6059
+ pending.current = { r: r2, c };
6060
+ if (virtual && hasTotal && r2 === T && !props.stickyFooter) {
6030
6061
  const sc = scrollRef.current;
6031
6062
  sc.scrollTop = sc.scrollHeight;
6032
6063
  setScrollTop(sc.scrollTop);
6033
- } else if (virtual && r > 0 && r <= nRows) {
6034
- const sc = scrollRef.current, top = (r - 1) * ROW_H;
6064
+ } else if (virtual && r2 > 0 && r2 <= nRows) {
6065
+ const sc = scrollRef.current, top = (r2 - 1) * ROW_H;
6035
6066
  if (top < sc.scrollTop) sc.scrollTop = top;
6036
6067
  else if (top + ROW_H > sc.scrollTop + bodyH) sc.scrollTop = top + ROW_H - bodyH;
6037
6068
  setScrollTop(sc.scrollTop);
6038
6069
  }
6039
- const el = gridRef.current && gridRef.current.querySelector('[data-rc="' + r + ":" + c + '"]');
6070
+ const el = gridRef.current && gridRef.current.querySelector('[data-rc="' + r2 + ":" + c + '"]');
6040
6071
  if (el) {
6041
6072
  pending.current = null;
6042
6073
  el.focus();
6043
6074
  }
6044
6075
  }
6045
- const pageKeys = pageRows.filter(canSelect).map(function(r) {
6046
- return r[rowKey];
6076
+ const pageKeys = pageRows.filter(canSelect).map(function(r2) {
6077
+ return r2[rowKey];
6047
6078
  });
6048
6079
  const selSet = {};
6049
6080
  selected.forEach(function(k) {
@@ -6301,51 +6332,51 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6301
6332
  }
6302
6333
  return;
6303
6334
  }
6304
- const p = rc.split(":"), r = +p[0], c = +p[1], k = e.key, col = colAt(c);
6305
- const row = r > 0 && r <= nRows ? pageRows[r - 1] : null, isTotal = hasTotal && r === T;
6335
+ const p = rc.split(":"), r2 = +p[0], c = +p[1], k = e.key, col = colAt(c);
6336
+ const row = r2 > 0 && r2 <= nRows ? pageRows[r2 - 1] : null, isTotal = hasTotal && r2 === T;
6306
6337
  let handled = true;
6307
- if (r === 0 && col && e.altKey && (k === "ArrowLeft" || k === "ArrowRight") && canResize(col))
6338
+ if (r2 === 0 && col && e.altKey && (k === "ArrowLeft" || k === "ArrowRight") && canResize(col))
6308
6339
  setW(col, widthOf(col) + (k === "ArrowLeft" ? -1 : 1) * (e.shiftKey ? 48 : 16), true);
6309
- else if (r === 0 && col && e.ctrlKey && e.shiftKey && (k === "ArrowLeft" || k === "ArrowRight") && reorderable) {
6340
+ else if (r2 === 0 && col && e.ctrlKey && e.shiftKey && (k === "ArrowLeft" || k === "ArrowRight") && reorderable) {
6310
6341
  if (moveCol(col.key, k === "ArrowLeft" ? -1 : 1)) pending.current = { r: 0, key: col.key, c };
6311
- } else if (r === 0 && col && (e.altKey && k === "ArrowDown" || k === "ContextMenu" || e.shiftKey && k === "F10") && controls)
6342
+ } else if (r2 === 0 && col && (e.altKey && k === "ArrowDown" || k === "ContextMenu" || e.shiftKey && k === "F10") && controls)
6312
6343
  openMenu("col", col.key, target, { r: 0, c });
6313
- else if (k === "ArrowRight") focusCell(r, c + 1);
6314
- else if (k === "ArrowLeft") focusCell(r, c - 1, -1);
6344
+ else if (k === "ArrowRight") focusCell(r2, c + 1);
6345
+ else if (k === "ArrowLeft") focusCell(r2, c - 1, -1);
6315
6346
  else if (k === "ArrowDown") {
6316
- if (r < lastR) focusCell(r + 1, c);
6347
+ if (r2 < lastR) focusCell(r2 + 1, c);
6317
6348
  else if (pageSize && page < pageCount && goPage(page + 1, { r: 1, c })) activeState[1]({ r: 1, c });
6318
6349
  } else if (k === "ArrowUp") {
6319
- if (r > 1 || r === 1 && !(pageSize && page > 1)) focusCell(r - 1, c);
6320
- else if (r === 1 && goPage(page - 1, { r: pageSize, c })) activeState[1]({ r: pageSize, c });
6321
- } else if (k === "Home") focusCell(e.ctrlKey ? 1 : r, 0);
6322
- else if (k === "End") focusCell(e.ctrlKey ? lastR : r, nCols - 1, -1);
6350
+ if (r2 > 1 || r2 === 1 && !(pageSize && page > 1)) focusCell(r2 - 1, c);
6351
+ else if (r2 === 1 && goPage(page - 1, { r: pageSize, c })) activeState[1]({ r: pageSize, c });
6352
+ } else if (k === "Home") focusCell(e.ctrlKey ? 1 : r2, 0);
6353
+ else if (k === "End") focusCell(e.ctrlKey ? lastR : r2, nCols - 1, -1);
6323
6354
  else if (k === "PageDown") {
6324
6355
  if (pageSize) {
6325
6356
  if (goPage(page + 1, { r: 1, c })) activeState[1]({ r: 1, c });
6326
- } else focusCell(Math.min(lastR, r + visibleRows), c);
6357
+ } else focusCell(Math.min(lastR, r2 + visibleRows), c);
6327
6358
  } else if (k === "PageUp") {
6328
6359
  if (pageSize) {
6329
6360
  if (goPage(page - 1, { r: 1, c })) activeState[1]({ r: 1, c });
6330
- } else focusCell(Math.max(1, r - visibleRows), c);
6361
+ } else focusCell(Math.max(1, r2 - visibleRows), c);
6331
6362
  } else if (isTotal && (k === " " || k === "Enter" || k === "F2")) {
6332
6363
  handled = false;
6333
- } else if (k === "F2" && r > 0) {
6364
+ } else if (k === "F2" && r2 > 0) {
6334
6365
  const inner = target.querySelector("button, a[href], input, select, textarea");
6335
6366
  if (inner) inner.focus();
6336
6367
  else handled = false;
6337
6368
  } else if (k === " " || k === "Enter") {
6338
- if (r === 0 && !col && selectable && nRows) {
6369
+ if (r2 === 0 && !col && selectable && nRows) {
6339
6370
  if (pageKeys.length) toggleAll();
6340
- } else if (r === 0 && col && col.sortable && canSortAny) sortBy(col.key);
6341
- else if (r > 0 && k === " " && selectable) {
6371
+ } else if (r2 === 0 && col && col.sortable && canSortAny) sortBy(col.key);
6372
+ else if (r2 > 0 && k === " " && selectable) {
6342
6373
  if (canSelect(row) && !(stacked && noCardSel))
6343
6374
  toggle(row[rowKey], !selSet[row[rowKey]], { shiftKey: e.shiftKey, source: "keyboard" });
6344
- } else if (r > 0 && k === "Enter" && rowHref && !target.querySelector("button, a[href]:not(.aura-table__row-link), input, select, textarea"))
6375
+ } else if (r2 > 0 && k === "Enter" && rowHref && !target.querySelector("button, a[href]:not(.aura-table__row-link), input, select, textarea"))
6345
6376
  followRow(target.closest('[role="row"]'), e);
6346
- else if (r > 0 && k === "Enter" && target.querySelector("button, a[href], input, select, textarea"))
6377
+ else if (r2 > 0 && k === "Enter" && target.querySelector("button, a[href], input, select, textarea"))
6347
6378
  target.querySelector("button, a[href], input, select, textarea").focus();
6348
- else if (r > 0 && k === "Enter" && props.onRowActivate) props.onRowActivate(row);
6379
+ else if (r2 > 0 && k === "Enter" && props.onRowActivate) props.onRowActivate(row);
6349
6380
  else handled = false;
6350
6381
  } else handled = false;
6351
6382
  if (handled) {
@@ -6508,13 +6539,13 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6508
6539
  }
6509
6540
  )
6510
6541
  );
6511
- function cellContent(c, r) {
6512
- const v = r[c.key];
6513
- return c.render ? c.render(r) : c.pill ? /* @__PURE__ */ React33.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
6542
+ function cellContent(c, r2) {
6543
+ const v = r2[c.key];
6544
+ return c.render ? c.render(r2) : c.pill ? /* @__PURE__ */ React33.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
6514
6545
  }
6515
- function rowCells(r, i, k, isSel) {
6546
+ function rowCells(r2, i, k, isSel) {
6516
6547
  const ri = i + 1;
6517
- const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
6548
+ const selLabel = selectable && canSelect(r2) ? props.rowSelectLabel && props.rowSelectLabel(r2) || t.selectRow(k) : void 0;
6518
6549
  const cells = [/* @__PURE__ */ React33.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
6519
6550
  if (selectable)
6520
6551
  cells.push(
@@ -6527,7 +6558,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6527
6558
  className: cx("aura-table__sel", nPinned && "is-pinned"),
6528
6559
  tabIndex: tabFor(ri, 0),
6529
6560
  "data-rc": ri + ":0",
6530
- "aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
6561
+ "aria-label": canSelect(r2) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r2) : void 0,
6531
6562
  onFocus: function(e) {
6532
6563
  if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
6533
6564
  },
@@ -6535,7 +6566,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6535
6566
  shiftClick.current = e.shiftKey;
6536
6567
  }
6537
6568
  },
6538
- canSelect(r) ? /* @__PURE__ */ React33.createElement(
6569
+ canSelect(r2) ? /* @__PURE__ */ React33.createElement(
6539
6570
  Checkbox,
6540
6571
  {
6541
6572
  hideLabel: true,
@@ -6552,7 +6583,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6552
6583
  )
6553
6584
  );
6554
6585
  vis.forEach(function(c, j) {
6555
- const ci = j + (selectable ? 1 : 0), v = r[c.key], pin = isPinned(c);
6586
+ const ci = j + (selectable ? 1 : 0), v = r2[c.key], pin = isPinned(c);
6556
6587
  cells.push(
6557
6588
  /* @__PURE__ */ React33.createElement(
6558
6589
  "span",
@@ -6576,7 +6607,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6576
6607
  if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
6577
6608
  }
6578
6609
  },
6579
- autoRows ? /* @__PURE__ */ React33.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)) : j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
6610
+ autoRows ? /* @__PURE__ */ React33.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r2, cellContent(c, r2)) : cellContent(c, r2)) : j === 0 ? rowLinkWrap(r2, cellContent(c, r2)) : cellContent(c, r2)
6580
6611
  )
6581
6612
  );
6582
6613
  });
@@ -6674,8 +6705,8 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6674
6705
  /* @__PURE__ */ React33.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
6675
6706
  );
6676
6707
  for (let ri = start; ri < end; ri++) {
6677
- (function(r, i) {
6678
- const k = r[rowKey], isSel = !!selSet[k];
6708
+ (function(r2, i) {
6709
+ const k = r2[rowKey], isSel = !!selSet[k];
6679
6710
  bodyRows.push(
6680
6711
  /* @__PURE__ */ React33.createElement(
6681
6712
  "div",
@@ -6683,7 +6714,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6683
6714
  key: k,
6684
6715
  role: "row",
6685
6716
  "aria-rowindex": first + i + 2,
6686
- "aria-selected": selectable && canSelect(r) ? isSel : void 0,
6717
+ "aria-selected": selectable && canSelect(r2) ? isSel : void 0,
6687
6718
  className: cx(
6688
6719
  "aura-table__row",
6689
6720
  autoRows && "aura-table__row--auto",
@@ -6695,10 +6726,10 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6695
6726
  const el = e.target;
6696
6727
  if (el.closest && el.closest(".aura-check, button, a, input")) return;
6697
6728
  if (rowHref) followRow(e.currentTarget, e);
6698
- else if (props.onRowActivate) props.onRowActivate(r);
6729
+ else if (props.onRowActivate) props.onRowActivate(r2);
6699
6730
  }
6700
6731
  },
6701
- rowCells(r, i, k, isSel)
6732
+ rowCells(r2, i, k, isSel)
6702
6733
  )
6703
6734
  );
6704
6735
  })(pageRows[ri], ri);
@@ -7216,8 +7247,8 @@ var SideNav = React36.forwardRef(function SideNav2(props, ref) {
7216
7247
  function tipHandlers(label) {
7217
7248
  if (!collapsed) return {};
7218
7249
  function show3(e) {
7219
- const r = e.currentTarget.getBoundingClientRect();
7220
- setTip({ text: label, top: r.top + r.height / 2, left: r.right + 8 });
7250
+ const r2 = e.currentTarget.getBoundingClientRect();
7251
+ setTip({ text: label, top: r2.top + r2.height / 2, left: r2.right + 8 });
7221
7252
  }
7222
7253
  function hide2() {
7223
7254
  setTip(null);
@@ -7503,9 +7534,24 @@ var React39 = __toESM(require("react"), 1);
7503
7534
 
7504
7535
  // src/breakpoints.ts
7505
7536
  var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
7537
+ var ORDER = ["base", "sm", "md", "lg", "xl"];
7538
+ function respVars(prefix, value, map2) {
7539
+ const style = {};
7540
+ if (value == null) return style;
7541
+ if (typeof value !== "object") value = { base: value };
7542
+ let byBp = value, cur2;
7543
+ ORDER.forEach(function(k) {
7544
+ if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
7545
+ if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
7546
+ });
7547
+ return style;
7548
+ }
7549
+ var space = function(v) {
7550
+ return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
7551
+ };
7506
7552
 
7507
7553
  // src/responsive.tsx
7508
- var ORDER = ["base", "sm", "md", "lg", "xl"];
7554
+ var ORDER2 = ["base", "sm", "md", "lg", "xl"];
7509
7555
  function useBreakpoint() {
7510
7556
  return React39.useSyncExternalStore(subscribe, current, function() {
7511
7557
  return "lg";
@@ -7513,7 +7559,7 @@ function useBreakpoint() {
7513
7559
  }
7514
7560
  function current() {
7515
7561
  let w = window.innerWidth, bp = "base";
7516
- ORDER.slice(1).forEach(function(k) {
7562
+ ORDER2.slice(1).forEach(function(k) {
7517
7563
  if (w >= breakpoints[k]) bp = k;
7518
7564
  });
7519
7565
  return bp;
@@ -7528,23 +7574,9 @@ function useResponsive(value) {
7528
7574
  const bp = useBreakpoint();
7529
7575
  if (value == null || typeof value !== "object") return value;
7530
7576
  const map2 = value;
7531
- for (let i = ORDER.indexOf(bp); i >= 0; i--) if (map2[ORDER[i]] !== void 0) return map2[ORDER[i]];
7577
+ for (let i = ORDER2.indexOf(bp); i >= 0; i--) if (map2[ORDER2[i]] !== void 0) return map2[ORDER2[i]];
7532
7578
  return void 0;
7533
7579
  }
7534
- function respVars(prefix, value, map2) {
7535
- const style = {};
7536
- if (value == null) return style;
7537
- if (typeof value !== "object") value = { base: value };
7538
- let byBp = value, cur2;
7539
- ORDER.forEach(function(k) {
7540
- if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
7541
- if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
7542
- });
7543
- return style;
7544
- }
7545
- var space = function(v) {
7546
- return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
7547
- };
7548
7580
 
7549
7581
  // src/Stack.tsx
7550
7582
  var h5 = React40.createElement;
@@ -7582,14 +7614,14 @@ var Grid = React41.forwardRef(function Grid2(props, ref) {
7582
7614
  var React42 = __toESM(require("react"), 1);
7583
7615
  var h7 = React42.createElement;
7584
7616
  var Container = React42.forwardRef(function Container2(props, ref) {
7585
- const attrs = {};
7617
+ const attrs2 = {};
7586
7618
  Object.keys(props).forEach(function(k) {
7587
7619
  if (k === "id" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
7588
- attrs[k] = props[k];
7620
+ attrs2[k] = props[k];
7589
7621
  });
7590
7622
  return h7(
7591
7623
  props.as || "div",
7592
- Object.assign(attrs, {
7624
+ Object.assign(attrs2, {
7593
7625
  ref,
7594
7626
  className: cx(
7595
7627
  "aura-container",
@@ -7607,15 +7639,15 @@ var Container = React42.forwardRef(function Container2(props, ref) {
7607
7639
  var React43 = __toESM(require("react"), 1);
7608
7640
  var h8 = React43.createElement;
7609
7641
  var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7610
- const attrs = {};
7642
+ const attrs2 = {};
7611
7643
  Object.keys(props).forEach(function(k) {
7612
7644
  if (k === "id" || k === "lang" || k === "dir" || k === "role" || /^(aria|data)-/.test(k))
7613
- attrs[k] = props[k];
7645
+ attrs2[k] = props[k];
7614
7646
  });
7615
7647
  const level = props.headingLevel || 1;
7616
7648
  return h8(
7617
7649
  "div",
7618
- Object.assign(attrs, { ref, className: cx("aura-page-header", props.className), style: props.style }),
7650
+ Object.assign(attrs2, { ref, className: cx("aura-page-header", props.className), style: props.style }),
7619
7651
  h8(
7620
7652
  "div",
7621
7653
  { className: "aura-page-header__text" },
@@ -7628,39 +7660,401 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7628
7660
  );
7629
7661
  });
7630
7662
 
7631
- // src/AppShell.tsx
7663
+ // src/StatusTile.tsx
7664
+ var React45 = __toESM(require("react"), 1);
7665
+
7666
+ // src/tiles.tsx
7632
7667
  var React44 = __toESM(require("react"), 1);
7633
- var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7668
+ var h9 = React44.createElement;
7669
+ var STATUS_ICON = {
7670
+ down: IconCircleAlert,
7671
+ problem: IconTriangleAlert,
7672
+ maintenance: IconWrench,
7673
+ ok: IconCircleCheck,
7674
+ unknown: IconCircleDotDashed
7675
+ };
7676
+ var STATUS_TONE = {
7677
+ down: "danger",
7678
+ problem: "warning",
7679
+ maintenance: "accent",
7680
+ ok: "default",
7681
+ unknown: "default"
7682
+ };
7683
+ var STATUS_WORD = {
7684
+ down: "statusDown",
7685
+ problem: "statusProblem",
7686
+ maintenance: "statusMaintenance",
7687
+ ok: "statusOk",
7688
+ unknown: "statusUnknown"
7689
+ };
7690
+ function statusWord(status, t) {
7691
+ return String(t[STATUS_WORD[status]] || STATUS_WORD[status]);
7692
+ }
7693
+ function attrs(props) {
7694
+ const out = {};
7695
+ Object.keys(props).forEach(function(k) {
7696
+ if (k === "id" || k === "style" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
7697
+ out[k] = props[k];
7698
+ });
7699
+ return out;
7700
+ }
7701
+ var comma = h9("span", { className: "aura-status-tile__sep" }, ",");
7702
+ function statusTileElement(props, ref, Link, t, titleRef) {
7703
+ const status = STATUS_ICON[props.status] ? props.status : "unknown";
7704
+ if (status !== props.status)
7705
+ devWarnOnce(
7706
+ "status-tile-status-" + String(props.status),
7707
+ 'StatusTile status="' + String(props.status) + '" is not down, problem, maintenance, ok or unknown: it shows as unknown ("No data"). Map your value first.'
7708
+ );
7709
+ const valueTone = props.valueTone || STATUS_TONE[status];
7710
+ const word = props.statusLabel || statusWord(status, t);
7711
+ const markers = (props.markers || []).filter(Boolean);
7712
+ const has = function(v) {
7713
+ return v != null && v !== false && v !== "";
7714
+ };
7715
+ const hasValue = has(props.value), hasMeta = has(props.meta);
7716
+ const Tag3 = props.href ? Link : "div";
7717
+ return h9(
7718
+ Tag3,
7719
+ Object.assign(attrs(props), {
7720
+ ref,
7721
+ href: props.href,
7722
+ className: cx("aura-status-tile", "aura-status-tile--" + status, props.href && "is-interactive", props.className)
7723
+ }),
7724
+ h9(
7725
+ "span",
7726
+ { className: "aura-status-tile__head" },
7727
+ h9(Icon, { name: h9(STATUS_ICON[status]), size: 16, className: "aura-status-tile__icon" }),
7728
+ h9("span", { className: "aura-status-tile__title", ref: titleRef }, props.title, comma),
7729
+ h9("span", { className: "aura-sr-only" }, word + (hasValue || hasMeta || markers.length ? "," : "")),
7730
+ hasValue ? h9(
7731
+ "span",
7732
+ { className: cx("aura-status-tile__value", "is-" + valueTone) },
7733
+ props.value,
7734
+ hasMeta || markers.length ? comma : null
7735
+ ) : null
7736
+ ),
7737
+ hasMeta || markers.length ? h9(
7738
+ "span",
7739
+ { className: "aura-status-tile__foot" },
7740
+ hasMeta ? h9("span", { className: "aura-status-tile__meta" }, props.meta, markers.length ? comma : null) : null,
7741
+ markers.length ? h9(
7742
+ "span",
7743
+ { className: "aura-status-tile__markers" },
7744
+ markers.map(function(m, i) {
7745
+ return h9(
7746
+ "span",
7747
+ {
7748
+ key: i,
7749
+ className: cx("aura-status-tile__marker", "is-" + (m.tone || "neutral")),
7750
+ "data-aura-tip": m.label
7751
+ },
7752
+ h9(Icon, { name: m.icon, size: 14 }),
7753
+ h9("span", { className: "aura-sr-only" }, m.label + (i < markers.length - 1 ? "," : ""))
7754
+ );
7755
+ })
7756
+ ) : null
7757
+ ) : null
7758
+ );
7759
+ }
7760
+ var TileGrid = React44.forwardRef(function TileGrid2(props, ref) {
7761
+ const style = Object.assign(
7762
+ {},
7763
+ respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
7764
+ props.style
7765
+ );
7766
+ return h9(
7767
+ "ul",
7768
+ Object.assign(attrs(props), {
7769
+ ref,
7770
+ role: "list",
7771
+ className: cx("aura-grid-layout", "aura-tile-grid", props.className),
7772
+ style
7773
+ }),
7774
+ /* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
7775
+ flat(props.children).map(function(c, i) {
7776
+ return h9("li", { key: React44.isValidElement(c) && c.key != null ? c.key : i }, c);
7777
+ })
7778
+ );
7779
+ });
7780
+ function flat(children) {
7781
+ const out = [];
7782
+ React44.Children.toArray(children).forEach(function(c) {
7783
+ if (React44.isValidElement(c) && c.type === React44.Fragment)
7784
+ flat(c.props.children).forEach(function(x) {
7785
+ out.push(React44.isValidElement(x) ? React44.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
7786
+ });
7787
+ else if (c !== "") out.push(c);
7788
+ });
7789
+ return out;
7790
+ }
7791
+ var SIZES2 = { sm: [80, 24], md: [120, 32] };
7792
+ var PAD = 2;
7793
+ function r(n3) {
7794
+ return Math.round(n3 * 100) / 100;
7795
+ }
7796
+ function num(v) {
7797
+ return typeof v === "number" && isFinite(v) ? v : null;
7798
+ }
7799
+ var Sparkline = React44.forwardRef(function Sparkline2(props, ref) {
7800
+ const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
7801
+ const W = wh[0], H = wh[1];
7802
+ const data = (props.data || []).map(num);
7803
+ const n3 = data.length;
7804
+ const vals = data.filter(function(v) {
7805
+ return v != null;
7806
+ });
7807
+ let lo = num(props.min), hi = num(props.max);
7808
+ if (lo == null) lo = vals.length ? Math.min.apply(null, vals) : 0;
7809
+ if (hi == null) hi = vals.length ? Math.max.apply(null, vals) : 0;
7810
+ if (lo > hi) {
7811
+ const s = lo;
7812
+ lo = hi;
7813
+ hi = s;
7814
+ }
7815
+ const step = n3 > 1 ? (W - 2 * PAD) / (n3 - 1) : 0;
7816
+ const x = function(i) {
7817
+ return n3 > 1 ? PAD + i * step : W / 2;
7818
+ };
7819
+ const y = function(v) {
7820
+ if (hi === lo) return H / 2;
7821
+ const k = Math.max(0, Math.min(1, (v - lo) / (hi - lo)));
7822
+ return H - PAD - k * (H - 2 * PAD);
7823
+ };
7824
+ let d = "";
7825
+ const dots = [];
7826
+ data.forEach(function(v, i) {
7827
+ if (v == null) return;
7828
+ const prev = i > 0 && data[i - 1] != null, next = i < n3 - 1 && data[i + 1] != null;
7829
+ if (!prev && !next) dots.push(h9("circle", { key: "d" + i, cx: r(x(i)), cy: r(y(v)), r: 1.5 }));
7830
+ else d += (prev ? "L" : "M") + r(x(i)) + " " + r(y(v));
7831
+ });
7832
+ const mode = props.failures || "none";
7833
+ const fails = [];
7834
+ if (mode !== "none" && props.failed)
7835
+ data.forEach(function(_v, i) {
7836
+ if (!props.failed[i]) return;
7837
+ if (mode === "band") {
7838
+ const w = Math.max(2, step || W), left = Math.max(0, x(i) - w / 2), right = Math.min(W, x(i) + w / 2);
7839
+ fails.push(h9("rect", { key: "f" + i, x: r(left), y: 0, width: r(right - left), height: H }));
7840
+ } else
7841
+ fails.push(
7842
+ h9("rect", {
7843
+ key: "f" + i,
7844
+ x: r(Math.max(0, Math.min(W - 1.5, x(i) - 0.75))),
7845
+ y: H - 6,
7846
+ width: 1.5,
7847
+ height: 6
7848
+ })
7849
+ );
7850
+ });
7851
+ const named = !!props.label;
7852
+ return h9(
7853
+ "svg",
7854
+ Object.assign(attrs(props), {
7855
+ ref,
7856
+ className: cx("aura-sparkline", "is-" + (props.tone || "neutral"), props.className),
7857
+ width: W,
7858
+ height: H,
7859
+ viewBox: "0 0 " + W + " " + H,
7860
+ role: named ? "img" : void 0,
7861
+ "aria-label": named ? props.label : void 0,
7862
+ "aria-hidden": named ? void 0 : true,
7863
+ focusable: "false"
7864
+ }),
7865
+ fails.length && mode === "band" ? h9("g", { className: "aura-sparkline__band" }, fails) : null,
7866
+ d ? h9("path", { className: "aura-sparkline__line", d }) : null,
7867
+ dots.length ? h9("g", { className: "aura-sparkline__dots" }, dots) : null,
7868
+ fails.length && mode === "ticks" ? h9("g", { className: "aura-sparkline__ticks" }, fails) : null
7869
+ );
7870
+ });
7871
+
7872
+ // src/StatusTile.tsx
7873
+ var useIsoLayoutEffect2 = typeof window !== "undefined" ? React45.useLayoutEffect : React45.useEffect;
7874
+ var StatusTile = React45.forwardRef(function StatusTile2(props, ref) {
7875
+ const Link = useLinkComponent(props.linkComponent);
7876
+ const t = useStrings();
7877
+ useAutoTip();
7878
+ if (!props.href && (props["aria-label"] || props["aria-labelledby"]))
7879
+ devWarnOnce(
7880
+ "status-tile-label",
7881
+ "StatusTile `aria-label` needs `href`: without a link the tile is a plain box, where a name is not allowed."
7882
+ );
7883
+ const titleRef = React45.useRef(null);
7884
+ const check = React45.useCallback(function() {
7885
+ const el = titleRef.current;
7886
+ if (!el) return;
7887
+ const cut = el.scrollHeight > el.clientHeight + 1;
7888
+ const text2 = (el.textContent || "").replace(/,$/, "").trim();
7889
+ if (cut && text2) el.setAttribute("data-aura-tip", text2);
7890
+ else el.removeAttribute("data-aura-tip");
7891
+ }, []);
7892
+ useIsoLayoutEffect2(check, [props.title, check]);
7893
+ const linked = !!props.href;
7894
+ React45.useEffect(
7895
+ function() {
7896
+ const el = titleRef.current;
7897
+ if (!el) return;
7898
+ let live = true;
7899
+ const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(check) : null;
7900
+ const mo = typeof MutationObserver !== "undefined" ? new MutationObserver(check) : null;
7901
+ if (ro) ro.observe(el);
7902
+ if (mo) mo.observe(el, { characterData: true, childList: true, subtree: true });
7903
+ if (document.fonts && document.fonts.ready)
7904
+ document.fonts.ready.then(function() {
7905
+ if (live) check();
7906
+ });
7907
+ return function() {
7908
+ live = false;
7909
+ if (ro) ro.disconnect();
7910
+ if (mo) mo.disconnect();
7911
+ };
7912
+ },
7913
+ [check, linked]
7914
+ );
7915
+ return statusTileElement(props, ref, Link, t, titleRef);
7916
+ });
7917
+
7918
+ // src/AppShell.tsx
7919
+ var React47 = __toESM(require("react"), 1);
7920
+
7921
+ // src/scrollHide.ts
7922
+ var React46 = __toESM(require("react"), 1);
7923
+ var STEP = 8;
7924
+ function useHideOnScroll(enabled, el, media, from) {
7925
+ const st = React46.useState(false), hidden = st[0], setHidden = st[1];
7926
+ React46.useEffect(
7927
+ function() {
7928
+ if (!enabled || typeof window === "undefined") {
7929
+ setHidden(false);
7930
+ return;
7931
+ }
7932
+ const mq = window.matchMedia ? window.matchMedia(media) : null;
7933
+ let last = window.scrollY, lastH = window.innerHeight, resizedAt = -1e9, run = 0;
7934
+ let restore = null;
7935
+ function update() {
7936
+ if (restore) {
7937
+ const r2 = restore;
7938
+ if (performance.now() > r2.until || window.scrollY >= r2.y - 1) restore = null;
7939
+ else {
7940
+ restore = null;
7941
+ last = r2.y;
7942
+ window.scrollTo(window.scrollX, r2.y);
7943
+ return;
7944
+ }
7945
+ }
7946
+ const y = window.scrollY, dy = y - last;
7947
+ last = y;
7948
+ const node2 = el.current;
7949
+ if (mq && !mq.matches || y <= from || node2 && document.activeElement && node2.contains(document.activeElement)) {
7950
+ run = 0;
7951
+ setHidden(false);
7952
+ return;
7953
+ }
7954
+ if (window.innerHeight !== lastH || performance.now() - resizedAt < 150) {
7955
+ lastH = window.innerHeight;
7956
+ resizedAt = performance.now();
7957
+ run = 0;
7958
+ return;
7959
+ }
7960
+ if (y + window.innerHeight > document.documentElement.scrollHeight + 1) return;
7961
+ run = dy > 0 === run > 0 ? run + dy : dy;
7962
+ if (run > STEP) setHidden(true);
7963
+ else if (run < -STEP) setHidden(false);
7964
+ }
7965
+ let tabbing = false;
7966
+ function disarm() {
7967
+ restore = null;
7968
+ }
7969
+ function onKey(e) {
7970
+ if (e.key !== "Tab" && e.code !== "Tab") {
7971
+ if (e.key !== "Shift") restore = null;
7972
+ return;
7973
+ }
7974
+ tabbing = true;
7975
+ requestAnimationFrame(function() {
7976
+ tabbing = false;
7977
+ });
7978
+ }
7979
+ function reveal() {
7980
+ const n3 = el.current;
7981
+ if (n3 && n3.classList.contains("is-away")) {
7982
+ n3.classList.remove("is-away");
7983
+ if (tabbing) {
7984
+ if (window.scrollY < last) window.scrollTo(window.scrollX, last);
7985
+ else restore = { y: last, until: performance.now() + 400 };
7986
+ }
7987
+ }
7988
+ setHidden(false);
7989
+ }
7990
+ window.addEventListener("scroll", update, { passive: true });
7991
+ window.addEventListener("resize", update);
7992
+ document.addEventListener("keydown", onKey, true);
7993
+ window.addEventListener("wheel", disarm, { passive: true, capture: true });
7994
+ window.addEventListener("touchstart", disarm, { passive: true, capture: true });
7995
+ window.addEventListener("pointerdown", disarm, true);
7996
+ const node = el.current;
7997
+ if (node) node.addEventListener("focusin", reveal);
7998
+ if (mq && mq.addEventListener) mq.addEventListener("change", update);
7999
+ return function() {
8000
+ window.removeEventListener("scroll", update);
8001
+ window.removeEventListener("resize", update);
8002
+ document.removeEventListener("keydown", onKey, true);
8003
+ window.removeEventListener("wheel", disarm, true);
8004
+ window.removeEventListener("touchstart", disarm, true);
8005
+ window.removeEventListener("pointerdown", disarm, true);
8006
+ if (node) node.removeEventListener("focusin", reveal);
8007
+ if (mq && mq.removeEventListener) mq.removeEventListener("change", update);
8008
+ };
8009
+ },
8010
+ [enabled, el, media, from]
8011
+ );
8012
+ return enabled && hidden;
8013
+ }
8014
+
8015
+ // src/AppShell.tsx
8016
+ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
7634
8017
  const t = useStrings();
7635
8018
  const bp = useBreakpoint();
7636
8019
  const wide = bp === "lg" || bp === "xl";
7637
- const st = React44.useState(false), open = st[0], setOpen = st[1];
7638
- React44.useEffect(
8020
+ const st = React47.useState(false), open = st[0], setOpen = st[1];
8021
+ React47.useEffect(
7639
8022
  function() {
7640
8023
  if (wide) setOpen(false);
7641
8024
  },
7642
8025
  [wide]
7643
8026
  );
7644
- const navEl = props.nav && React44.isValidElement(props.nav) ? props.nav : null;
8027
+ const navEl = props.nav && React47.isValidElement(props.nav) ? props.nav : null;
7645
8028
  const shared = !!navEl && navEl.props.value === void 0 && (navEl.props.defaultValue !== void 0 || navEl.props.sections !== void 0 || navEl.props.items !== void 0);
7646
- const navState = React44.useState(navEl ? navEl.props.defaultValue : void 0);
8029
+ const navState = React47.useState(navEl ? navEl.props.defaultValue : void 0);
7647
8030
  function onNav(id) {
7648
8031
  if (shared) navState[1](id);
7649
8032
  if (navEl && navEl.props.onChange) navEl.props.onChange(id);
7650
8033
  }
7651
- const rootRef = React44.useRef(null);
7652
- const barRef = React44.useRef(null);
8034
+ const rootRef = React47.useRef(null);
8035
+ const barRef = React47.useRef(null);
7653
8036
  const mergedRef = useMergedRef(ref, rootRef);
7654
8037
  const hasBar = !!(props.header || props.nav);
7655
- const barH = React44.useState(null);
8038
+ const barH = React47.useState(null);
8039
+ const away = useHideOnScroll(!!props.headerHideOnScroll && hasBar, barRef, "(max-width: 1023.98px)", barH[0] || 56);
8040
+ const awayRef = React47.useRef(away);
8041
+ awayRef.current = away;
8042
+ useIsoLayoutEffect(
8043
+ function() {
8044
+ const root = rootRef.current, bar = barRef.current;
8045
+ if (!root || !bar) return;
8046
+ root.style.setProperty("--aura-shell-bar-height", away ? "0px" : bar.getBoundingClientRect().height + "px");
8047
+ },
8048
+ [away]
8049
+ );
7656
8050
  useIsoLayoutEffect(
7657
8051
  function() {
7658
8052
  const root = rootRef.current, bar = barRef.current;
7659
8053
  if (!root || !bar) return;
7660
8054
  function sync() {
7661
- const h10 = bar.getBoundingClientRect().height;
7662
- root.style.setProperty("--aura-shell-bar-height", h10 + "px");
7663
- if (h10 > 0) barH[1](Math.round(h10));
8055
+ const h11 = bar.getBoundingClientRect().height;
8056
+ root.style.setProperty("--aura-shell-bar-height", awayRef.current ? "0px" : h11 + "px");
8057
+ if (h11 > 0) barH[1](Math.round(h11));
7664
8058
  }
7665
8059
  sync();
7666
8060
  const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(sync);
@@ -7672,8 +8066,8 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7672
8066
  },
7673
8067
  [hasBar]
7674
8068
  );
7675
- const deskNav = navEl && shared ? React44.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
7676
- const drawerNav = navEl ? React44.cloneElement(navEl, {
8069
+ const deskNav = navEl && shared ? React47.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
8070
+ const drawerNav = navEl ? React47.cloneElement(navEl, {
7677
8071
  value: shared ? navState[0] : navEl.props.value,
7678
8072
  onChange: function(id) {
7679
8073
  onNav(id);
@@ -7688,7 +8082,7 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7688
8082
  collapsed: false,
7689
8083
  collapsible: false
7690
8084
  }) : props.nav;
7691
- return /* @__PURE__ */ React44.createElement(
8085
+ return /* @__PURE__ */ React47.createElement(
7692
8086
  "div",
7693
8087
  {
7694
8088
  ref: mergedRef,
@@ -7703,8 +8097,8 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7703
8097
  props.className
7704
8098
  )
7705
8099
  },
7706
- props.nav ? /* @__PURE__ */ React44.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
7707
- props.nav ? /* @__PURE__ */ React44.createElement(
8100
+ props.nav ? /* @__PURE__ */ React47.createElement("div", { className: "aura-shell__nav" }, deskNav) : null,
8101
+ props.nav ? /* @__PURE__ */ React47.createElement(
7708
8102
  Drawer,
7709
8103
  {
7710
8104
  open,
@@ -7721,20 +8115,22 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7721
8115
  },
7722
8116
  drawerNav
7723
8117
  ) : null,
7724
- /* @__PURE__ */ React44.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React44.createElement(
8118
+ /* @__PURE__ */ React47.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React47.createElement(
7725
8119
  "header",
7726
8120
  {
7727
8121
  ref: barRef,
7728
8122
  className: cx(
7729
8123
  "aura-shell__bar",
7730
- (!props.header || props.headerHideFrom === "lg") && "aura-shell__bar--menu-only"
8124
+ (!props.header || props.headerHideFrom === "lg") && "aura-shell__bar--menu-only",
8125
+ props.headerHideOnScroll && "aura-shell__bar--hides",
8126
+ away && "is-away"
7731
8127
  )
7732
8128
  },
7733
- props.nav ? /* @__PURE__ */ React44.createElement(
8129
+ props.nav ? /* @__PURE__ */ React47.createElement(
7734
8130
  IconButton,
7735
8131
  {
7736
8132
  className: "aura-shell__menu",
7737
- icon: /* @__PURE__ */ React44.createElement(IconMenu, null),
8133
+ icon: /* @__PURE__ */ React47.createElement(IconMenu, null),
7738
8134
  label: props.menuLabel || t.openNav,
7739
8135
  size: "md",
7740
8136
  onClick: function() {
@@ -7743,8 +8139,8 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7743
8139
  "aria-expanded": open
7744
8140
  }
7745
8141
  ) : null,
7746
- /* @__PURE__ */ React44.createElement("div", { className: "aura-shell__bar-content" }, props.header)
7747
- ) : null, /* @__PURE__ */ React44.createElement(
8142
+ /* @__PURE__ */ React47.createElement("div", { className: "aura-shell__bar-content" }, props.header)
8143
+ ) : null, /* @__PURE__ */ React47.createElement(
7748
8144
  "main",
7749
8145
  {
7750
8146
  className: cx("aura-shell__content", props.contentPadding === false && "is-flush"),
@@ -7757,17 +8153,17 @@ var AppShell = React44.forwardRef(function AppShell2(props, ref) {
7757
8153
  });
7758
8154
 
7759
8155
  // src/ActionBar.tsx
7760
- var React45 = __toESM(require("react"), 1);
7761
- var ActionBar = React45.forwardRef(function ActionBar2(props, ref) {
8156
+ var React48 = __toESM(require("react"), 1);
8157
+ var ActionBar = React48.forwardRef(function ActionBar2(props, ref) {
7762
8158
  const t = useStrings();
7763
8159
  const bulk = props.selected != null;
7764
8160
  const idle = bulk && !props.selected;
7765
8161
  const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
7766
- const hasStart = React45.Children.toArray(props.start).some(function(c) {
8162
+ const hasStart = React48.Children.toArray(props.start).some(function(c) {
7767
8163
  return c !== "";
7768
8164
  });
7769
- const cameFrom = React45.useRef(null);
7770
- const own = React45.useRef(null);
8165
+ const cameFrom = React48.useRef(null);
8166
+ const own = React48.useRef(null);
7771
8167
  function clear() {
7772
8168
  props.onClearSelection();
7773
8169
  setTimeout(function() {
@@ -7776,7 +8172,7 @@ var ActionBar = React45.forwardRef(function ActionBar2(props, ref) {
7776
8172
  if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
7777
8173
  }, 0);
7778
8174
  }
7779
- return /* @__PURE__ */ React45.createElement(
8175
+ return /* @__PURE__ */ React48.createElement(
7780
8176
  "div",
7781
8177
  {
7782
8178
  ref: function(el) {
@@ -7790,6 +8186,7 @@ var ActionBar = React45.forwardRef(function ActionBar2(props, ref) {
7790
8186
  },
7791
8187
  role: "region",
7792
8188
  "aria-label": props.label || t.actions,
8189
+ "data-aura-hide-bottomnav": props.hidesBottomNav && !idle ? "" : void 0,
7793
8190
  className: cx(
7794
8191
  "aura-actionbar",
7795
8192
  "aura-actionbar--" + (props.position || "viewport"),
@@ -7797,16 +8194,16 @@ var ActionBar = React45.forwardRef(function ActionBar2(props, ref) {
7797
8194
  props.className
7798
8195
  )
7799
8196
  },
7800
- /* @__PURE__ */ React45.createElement("div", { className: cx("aura-actionbar__inner", hasStart && "has-start") }, /* @__PURE__ */ React45.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle && hasStart ? /* @__PURE__ */ React45.createElement("div", { className: "aura-actionbar__start" }, props.start) : null, !idle ? /* @__PURE__ */ React45.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React45.createElement(Button, { variant: "ghost", size: "sm", touchHeight: props.touchHeight, onClick: clear }, t.clear()) : null, props.children) : null)
8197
+ /* @__PURE__ */ React48.createElement("div", { className: cx("aura-actionbar__inner", hasStart && "has-start") }, /* @__PURE__ */ React48.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle && hasStart ? /* @__PURE__ */ React48.createElement("div", { className: "aura-actionbar__start" }, props.start) : null, !idle ? /* @__PURE__ */ React48.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React48.createElement(Button, { variant: "ghost", size: "sm", touchHeight: props.touchHeight, onClick: clear }, t.clear()) : null, props.children) : null)
7801
8198
  );
7802
8199
  });
7803
8200
 
7804
8201
  // src/Separator.tsx
7805
- var React46 = __toESM(require("react"), 1);
7806
- var Separator = React46.forwardRef(function Separator2(props, ref) {
8202
+ var React49 = __toESM(require("react"), 1);
8203
+ var Separator = React49.forwardRef(function Separator2(props, ref) {
7807
8204
  const vertical = props.orientation === "vertical";
7808
8205
  const decorative = props.decorative !== false;
7809
- return /* @__PURE__ */ React46.createElement(
8206
+ return /* @__PURE__ */ React49.createElement(
7810
8207
  "div",
7811
8208
  {
7812
8209
  ref,
@@ -7819,14 +8216,14 @@ var Separator = React46.forwardRef(function Separator2(props, ref) {
7819
8216
  });
7820
8217
 
7821
8218
  // src/Table.tsx
7822
- var React47 = __toESM(require("react"), 1);
7823
- var StackLabels = React47.createContext(null);
7824
- var ColumnIndex = React47.createContext(-1);
7825
- function flat(children) {
8219
+ var React50 = __toESM(require("react"), 1);
8220
+ var StackLabels = React50.createContext(null);
8221
+ var ColumnIndex = React50.createContext(-1);
8222
+ function flat2(children) {
7826
8223
  const out = [];
7827
- React47.Children.toArray(children).forEach(function(c) {
7828
- if (React47.isValidElement(c) && c.type === React47.Fragment)
7829
- out.push.apply(out, flat(c.props.children));
8224
+ React50.Children.toArray(children).forEach(function(c) {
8225
+ if (React50.isValidElement(c) && c.type === React50.Fragment)
8226
+ out.push.apply(out, flat2(c.props.children));
7830
8227
  else out.push(c);
7831
8228
  });
7832
8229
  return out;
@@ -7839,7 +8236,7 @@ function text(node) {
7839
8236
  });
7840
8237
  return parts.length ? parts.join("") : void 0;
7841
8238
  }
7842
- if (React47.isValidElement(node)) {
8239
+ if (React50.isValidElement(node)) {
7843
8240
  const p = node.props;
7844
8241
  if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
7845
8242
  return text(p.children);
@@ -7848,14 +8245,14 @@ function text(node) {
7848
8245
  }
7849
8246
  function headerLabels(children) {
7850
8247
  let out = [];
7851
- flat(children).forEach(function(c) {
7852
- if (out.length || !React47.isValidElement(c) || c.type !== THead) return;
7853
- const row = flat(c.props.children).find(function(r) {
7854
- return React47.isValidElement(r);
8248
+ flat2(children).forEach(function(c) {
8249
+ if (out.length || !React50.isValidElement(c) || c.type !== THead) return;
8250
+ const row = flat2(c.props.children).find(function(r2) {
8251
+ return React50.isValidElement(r2);
7855
8252
  });
7856
8253
  if (!row) return;
7857
- flat(row.props.children).forEach(function(cell) {
7858
- if (!React47.isValidElement(cell)) return;
8254
+ flat2(row.props.children).forEach(function(cell) {
8255
+ if (!React50.isValidElement(cell)) return;
7859
8256
  const p = cell.props;
7860
8257
  const t = text(p.children);
7861
8258
  const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
@@ -7865,7 +8262,7 @@ function headerLabels(children) {
7865
8262
  });
7866
8263
  return out;
7867
8264
  }
7868
- var Table = React47.forwardRef(function Table2(props, ref) {
8265
+ var Table = React50.forwardRef(function Table2(props, ref) {
7869
8266
  const {
7870
8267
  caption,
7871
8268
  captionHidden,
@@ -7895,12 +8292,12 @@ var Table = React47.forwardRef(function Table2(props, ref) {
7895
8292
  "tbl-stack-labels",
7896
8293
  "Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
7897
8294
  );
7898
- const outer = React47.useContext(StackLabels);
8295
+ const outer = React50.useContext(StackLabels);
7899
8296
  const pageDensity = useDensity();
7900
8297
  const capId = uid();
7901
- const wrap = React47.useRef(null);
7902
- const sc = React47.useState(false), scrolls = sc[0];
7903
- const wide = React47.useState(false);
8298
+ const wrap = React50.useRef(null);
8299
+ const sc = React50.useState(false), scrolls = sc[0];
8300
+ const wide = React50.useState(false);
7904
8301
  useIsoLayoutEffect(function() {
7905
8302
  const el = wrap.current;
7906
8303
  if (!el || typeof ResizeObserver === "undefined") return;
@@ -7917,7 +8314,7 @@ var Table = React47.forwardRef(function Table2(props, ref) {
7917
8314
  ro.disconnect();
7918
8315
  };
7919
8316
  }, []);
7920
- const table = /* @__PURE__ */ React47.createElement(
8317
+ const table = /* @__PURE__ */ React50.createElement(
7921
8318
  "div",
7922
8319
  {
7923
8320
  ref: wrap,
@@ -7941,7 +8338,7 @@ var Table = React47.forwardRef(function Table2(props, ref) {
7941
8338
  "aria-labelledby": scrolls ? caption != null ? capId : rest["aria-labelledby"] : void 0,
7942
8339
  "aria-label": scrolls && caption == null ? rest["aria-label"] : void 0
7943
8340
  },
7944
- /* @__PURE__ */ React47.createElement(
8341
+ /* @__PURE__ */ React50.createElement(
7945
8342
  "table",
7946
8343
  {
7947
8344
  ref,
@@ -7957,11 +8354,11 @@ var Table = React47.forwardRef(function Table2(props, ref) {
7957
8354
  role: stackBelow ? "table" : void 0,
7958
8355
  ...rest
7959
8356
  },
7960
- caption != null ? /* @__PURE__ */ React47.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
7961
- labels ? /* @__PURE__ */ React47.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React47.createElement(StackLabels.Provider, { value: null }, children) : children
8357
+ caption != null ? /* @__PURE__ */ React50.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
8358
+ labels ? /* @__PURE__ */ React50.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React50.createElement(StackLabels.Provider, { value: null }, children) : children
7962
8359
  )
7963
8360
  );
7964
- return cards ? /* @__PURE__ */ React47.createElement(
8361
+ return cards ? /* @__PURE__ */ React50.createElement(
7965
8362
  "div",
7966
8363
  {
7967
8364
  className: cx(
@@ -7974,10 +8371,10 @@ var Table = React47.forwardRef(function Table2(props, ref) {
7974
8371
  ) : table;
7975
8372
  });
7976
8373
  function section(tag, cls) {
7977
- const C = React47.forwardRef(function TableSection(props, ref) {
8374
+ const C = React50.forwardRef(function TableSection(props, ref) {
7978
8375
  const { className, ...rest } = props;
7979
- const stacked = React47.useContext(StackLabels) != null;
7980
- return React47.createElement(
8376
+ const stacked = React50.useContext(StackLabels) != null;
8377
+ return React50.createElement(
7981
8378
  tag,
7982
8379
  Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
7983
8380
  );
@@ -7990,14 +8387,14 @@ var TBody = section("tbody", "aura-tbl__body");
7990
8387
  TBody.displayName = "TBody";
7991
8388
  var TFoot = section("tfoot", "aura-tbl__foot");
7992
8389
  TFoot.displayName = "TFoot";
7993
- var Tr = React47.forwardRef(function Tr2(props, ref) {
8390
+ var Tr = React50.forwardRef(function Tr2(props, ref) {
7994
8391
  const { className, children, ...rest } = props;
7995
- const stacked = React47.useContext(StackLabels) != null;
8392
+ const stacked = React50.useContext(StackLabels) != null;
7996
8393
  let col = 0;
7997
- return /* @__PURE__ */ React47.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat(children).map(function(c) {
8394
+ return /* @__PURE__ */ React50.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
7998
8395
  const at = col;
7999
- if (React47.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
8000
- return /* @__PURE__ */ React47.createElement(ColumnIndex.Provider, { key: React47.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
8396
+ if (React50.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
8397
+ return /* @__PURE__ */ React50.createElement(ColumnIndex.Provider, { key: React50.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
8001
8398
  }) : children);
8002
8399
  });
8003
8400
  function cellClass(base, p) {
@@ -8011,10 +8408,10 @@ function cellClass(base, p) {
8011
8408
  p.className
8012
8409
  );
8013
8410
  }
8014
- var Th = React47.forwardRef(function Th2(props, ref) {
8411
+ var Th = React50.forwardRef(function Th2(props, ref) {
8015
8412
  const { align, numeric, mono, className, scope, label, card, ...rest } = props;
8016
- const stacked = React47.useContext(StackLabels) != null;
8017
- return /* @__PURE__ */ React47.createElement(
8413
+ const stacked = React50.useContext(StackLabels) != null;
8414
+ return /* @__PURE__ */ React50.createElement(
8018
8415
  "th",
8019
8416
  {
8020
8417
  ref,
@@ -8026,12 +8423,12 @@ var Th = React47.forwardRef(function Th2(props, ref) {
8026
8423
  }
8027
8424
  );
8028
8425
  });
8029
- var Td = React47.forwardRef(function Td2(props, ref) {
8426
+ var Td = React50.forwardRef(function Td2(props, ref) {
8030
8427
  const { align, numeric, mono, className, scope, label, card, ...rest } = props;
8031
- const labels = React47.useContext(StackLabels), col = React47.useContext(ColumnIndex);
8428
+ const labels = React50.useContext(StackLabels), col = React50.useContext(ColumnIndex);
8032
8429
  const slot = labels && (card === "title" || card === "action") ? card : void 0;
8033
8430
  const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
8034
- return /* @__PURE__ */ React47.createElement(
8431
+ return /* @__PURE__ */ React50.createElement(
8035
8432
  "td",
8036
8433
  {
8037
8434
  ref,
@@ -8045,8 +8442,8 @@ var Td = React47.forwardRef(function Td2(props, ref) {
8045
8442
  });
8046
8443
 
8047
8444
  // src/BottomNav.tsx
8048
- var React48 = __toESM(require("react"), 1);
8049
- var BottomNav = React48.forwardRef(function BottomNav2(props, ref) {
8445
+ var React51 = __toESM(require("react"), 1);
8446
+ var BottomNav = React51.forwardRef(function BottomNav2(props, ref) {
8050
8447
  const t = useStrings();
8051
8448
  const Link = useLinkComponent(props.linkComponent);
8052
8449
  const st = useMaybeControlled(
@@ -8056,14 +8453,36 @@ var BottomNav = React48.forwardRef(function BottomNav2(props, ref) {
8056
8453
  );
8057
8454
  const active = st[0];
8058
8455
  const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
8059
- return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React48.createElement(
8456
+ const own = React51.useRef(null);
8457
+ const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
8458
+ const away = useHideOnScroll(
8459
+ !!props.hideOnScroll,
8460
+ own,
8461
+ hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
8462
+ 64
8463
+ );
8464
+ const setRef = React51.useCallback(
8465
+ function(el) {
8466
+ own.current = el;
8467
+ if (typeof ref === "function") ref(el);
8468
+ else if (ref) ref.current = el;
8469
+ },
8470
+ [ref]
8471
+ );
8472
+ return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React51.createElement(
8060
8473
  "nav",
8061
8474
  {
8062
- ref,
8063
- className: cx("aura-bottomnav", "aura-bottomnav--" + hide2, props.className),
8475
+ ref: setRef,
8476
+ className: cx(
8477
+ "aura-bottomnav",
8478
+ "aura-bottomnav--" + hide2,
8479
+ props.hideOnScroll && "aura-bottomnav--hides",
8480
+ away && "is-away",
8481
+ props.className
8482
+ ),
8064
8483
  "aria-label": props.label || t.mainNav
8065
8484
  },
8066
- /* @__PURE__ */ React48.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
8485
+ /* @__PURE__ */ React51.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
8067
8486
  if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
8068
8487
  devWarnOnce(
8069
8488
  "bottomnav-label-" + it.id,
@@ -8084,23 +8503,23 @@ var BottomNav = React48.forwardRef(function BottomNav2(props, ref) {
8084
8503
  }
8085
8504
  };
8086
8505
  const inner = [
8087
- /* @__PURE__ */ React48.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React48.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React48.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React48.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
8088
- it.ariaLabel ? /* @__PURE__ */ React48.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
8089
- /* @__PURE__ */ React48.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
8090
- suffix && !it.ariaLabel ? /* @__PURE__ */ React48.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
8506
+ /* @__PURE__ */ React51.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React51.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React51.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React51.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
8507
+ it.ariaLabel ? /* @__PURE__ */ React51.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
8508
+ /* @__PURE__ */ React51.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
8509
+ suffix && !it.ariaLabel ? /* @__PURE__ */ React51.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
8091
8510
  ];
8092
- return /* @__PURE__ */ React48.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React48.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React48.createElement("button", { type: "button", ...common }, inner));
8511
+ return /* @__PURE__ */ React51.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React51.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React51.createElement("button", { type: "button", ...common }, inner));
8093
8512
  }))
8094
8513
  ));
8095
8514
  });
8096
8515
 
8097
8516
  // src/Surface.tsx
8098
- var React49 = __toESM(require("react"), 1);
8099
- var h9 = React49.createElement;
8100
- var Surface = React49.forwardRef(function Surface2(props, ref) {
8517
+ var React52 = __toESM(require("react"), 1);
8518
+ var h10 = React52.createElement;
8519
+ var Surface = React52.forwardRef(function Surface2(props, ref) {
8101
8520
  const t = props.texture || "mesh";
8102
8521
  const rest = omit(props, ["texture", "className", "children", "as"]);
8103
- return h9(
8522
+ return h10(
8104
8523
  props.as || "div",
8105
8524
  Object.assign({}, rest, {
8106
8525
  ref,
@@ -8118,14 +8537,14 @@ var Surface = React49.forwardRef(function Surface2(props, ref) {
8118
8537
  });
8119
8538
 
8120
8539
  // src/Stat.tsx
8121
- var React50 = __toESM(require("react"), 1);
8122
- var Stat = React50.forwardRef(function Stat2(props, ref) {
8540
+ var React53 = __toESM(require("react"), 1);
8541
+ var Stat = React53.forwardRef(function Stat2(props, ref) {
8123
8542
  const Link = useLinkComponent(props.linkComponent);
8124
8543
  return statElement(props, ref, Link);
8125
8544
  });
8126
8545
 
8127
8546
  // src/TimePicker.tsx
8128
- var React51 = __toESM(require("react"), 1);
8547
+ var React54 = __toESM(require("react"), 1);
8129
8548
  var import_react_dom12 = require("react-dom");
8130
8549
 
8131
8550
  // src/text.ts
@@ -8167,7 +8586,7 @@ function toMin(t) {
8167
8586
  function fromMin(n3) {
8168
8587
  return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
8169
8588
  }
8170
- var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8589
+ var TimePicker = React54.forwardRef(function TimePicker2(props, ref) {
8171
8590
  const t = useStrings();
8172
8591
  const auto = uid(), id = props.id || auto, listId = id + "-list";
8173
8592
  const st = useMaybeControlled(
@@ -8177,7 +8596,7 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8177
8596
  );
8178
8597
  const value = st[0];
8179
8598
  const step = props.step || 30, lo = toMin(props.min) != null ? toMin(props.min) : 0, hi = toMin(props.max) != null ? toMin(props.max) : 24 * 60 - 1;
8180
- const slots = React51.useMemo(
8599
+ const slots = React54.useMemo(
8181
8600
  function() {
8182
8601
  const out = [];
8183
8602
  for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
@@ -8189,12 +8608,12 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8189
8608
  const n3 = toMin(v);
8190
8609
  return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
8191
8610
  }
8192
- const openState = React51.useState(false), open = openState[0], setOpen = openState[1];
8193
- const editState = React51.useState(null), editing = editState[0], setEditing = editState[1];
8194
- const aState = React51.useState(0), active = aState[0], setActive = aState[1];
8195
- const errState = React51.useState(null);
8196
- const pos = React51.useState(null);
8197
- const boxRef = React51.useRef(null), inputRef = React51.useRef(null), listRef = React51.useRef(null), inputMerged = useMergedRef(ref, inputRef);
8611
+ const openState = React54.useState(false), open = openState[0], setOpen = openState[1];
8612
+ const editState = React54.useState(null), editing = editState[0], setEditing = editState[1];
8613
+ const aState = React54.useState(0), active = aState[0], setActive = aState[1];
8614
+ const errState = React54.useState(null);
8615
+ const pos = React54.useState(null);
8616
+ const boxRef = React54.useRef(null), inputRef = React54.useRef(null), listRef = React54.useRef(null), inputMerged = useMergedRef(ref, inputRef);
8198
8617
  const mounted = useMounted();
8199
8618
  function nearest(v) {
8200
8619
  const n3 = toMin(v);
@@ -8207,13 +8626,13 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8207
8626
  }
8208
8627
  function place2() {
8209
8628
  if (!boxRef.current) return;
8210
- const r = boxRef.current.getBoundingClientRect(), below2 = window.innerHeight - r.bottom - 8, up2 = below2 < 200 && r.top > below2;
8629
+ const r2 = boxRef.current.getBoundingClientRect(), below2 = window.innerHeight - r2.bottom - 8, up2 = below2 < 200 && r2.top > below2;
8211
8630
  pos[1]({
8212
- left: r.left,
8213
- width: Math.max(r.width, 160),
8214
- top: up2 ? void 0 : r.bottom + 4,
8215
- bottom: up2 ? window.innerHeight - r.top + 4 : void 0,
8216
- maxHeight: Math.min(280, (up2 ? r.top : below2) - 8)
8631
+ left: r2.left,
8632
+ width: Math.max(r2.width, 160),
8633
+ top: up2 ? void 0 : r2.bottom + 4,
8634
+ bottom: up2 ? window.innerHeight - r2.top + 4 : void 0,
8635
+ maxHeight: Math.min(280, (up2 ? r2.top : below2) - 8)
8217
8636
  });
8218
8637
  }
8219
8638
  useIsoLayoutEffect(
@@ -8222,7 +8641,7 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8222
8641
  },
8223
8642
  [open]
8224
8643
  );
8225
- React51.useEffect(
8644
+ React54.useEffect(
8226
8645
  function() {
8227
8646
  if (!open) return;
8228
8647
  function outside(e) {
@@ -8244,7 +8663,7 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8244
8663
  },
8245
8664
  [open]
8246
8665
  );
8247
- React51.useEffect(
8666
+ React54.useEffect(
8248
8667
  function() {
8249
8668
  if (!open || !listRef.current) return;
8250
8669
  const el = listRef.current.querySelector('[data-idx="' + active + '"]');
@@ -8343,9 +8762,9 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8343
8762
  }
8344
8763
  const error = errState[0] || props.error;
8345
8764
  const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
8346
- /* @__PURE__ */ React51.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React51.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
8765
+ /* @__PURE__ */ React54.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React54.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
8347
8766
  const dis = blocked(s), sel = s === value;
8348
- return /* @__PURE__ */ React51.createElement(
8767
+ return /* @__PURE__ */ React54.createElement(
8349
8768
  "li",
8350
8769
  {
8351
8770
  key: s,
@@ -8370,13 +8789,13 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8370
8789
  if (active !== i) setActive(i);
8371
8790
  }
8372
8791
  },
8373
- /* @__PURE__ */ React51.createElement("span", { className: "aura-combo__label" }, s),
8374
- sel ? /* @__PURE__ */ React51.createElement(Icon, { name: /* @__PURE__ */ React51.createElement(IconCheck, null), className: "aura-combo__check" }) : null
8792
+ /* @__PURE__ */ React54.createElement("span", { className: "aura-combo__label" }, s),
8793
+ sel ? /* @__PURE__ */ React54.createElement(Icon, { name: /* @__PURE__ */ React54.createElement(IconCheck, null), className: "aura-combo__check" }) : null
8375
8794
  );
8376
8795
  }))),
8377
8796
  document.body
8378
8797
  ) : null;
8379
- return /* @__PURE__ */ React51.createElement(
8798
+ return /* @__PURE__ */ React54.createElement(
8380
8799
  Field,
8381
8800
  {
8382
8801
  id,
@@ -8388,7 +8807,7 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8388
8807
  disabled: props.disabled,
8389
8808
  className: props.className
8390
8809
  },
8391
- /* @__PURE__ */ React51.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React51.createElement(Icon, { name: /* @__PURE__ */ React51.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React51.createElement(
8810
+ /* @__PURE__ */ React54.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React54.createElement(Icon, { name: /* @__PURE__ */ React54.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React54.createElement(
8392
8811
  "input",
8393
8812
  {
8394
8813
  ref: inputMerged,
@@ -8428,7 +8847,7 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8428
8847
  }, 0);
8429
8848
  }
8430
8849
  }
8431
- ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React51.createElement(
8850
+ ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React54.createElement(
8432
8851
  "button",
8433
8852
  {
8434
8853
  type: "button",
@@ -8441,8 +8860,8 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8441
8860
  if (inputRef.current) inputRef.current.focus();
8442
8861
  }
8443
8862
  },
8444
- /* @__PURE__ */ React51.createElement(Icon, { name: /* @__PURE__ */ React51.createElement(IconX, null) })
8445
- ) : null, /* @__PURE__ */ React51.createElement(
8863
+ /* @__PURE__ */ React54.createElement(Icon, { name: /* @__PURE__ */ React54.createElement(IconX, null) })
8864
+ ) : null, /* @__PURE__ */ React54.createElement(
8446
8865
  "button",
8447
8866
  {
8448
8867
  type: "button",
@@ -8460,14 +8879,14 @@ var TimePicker = React51.forwardRef(function TimePicker2(props, ref) {
8460
8879
  }
8461
8880
  }
8462
8881
  },
8463
- /* @__PURE__ */ React51.createElement(Icon, { name: /* @__PURE__ */ React51.createElement(IconChevronDown, null) })
8882
+ /* @__PURE__ */ React54.createElement(Icon, { name: /* @__PURE__ */ React54.createElement(IconChevronDown, null) })
8464
8883
  )),
8465
8884
  list
8466
8885
  );
8467
8886
  });
8468
8887
 
8469
8888
  // src/FileUpload.tsx
8470
- var React52 = __toESM(require("react"), 1);
8889
+ var React55 = __toESM(require("react"), 1);
8471
8890
  function matches(file, accept) {
8472
8891
  if (!accept) return true;
8473
8892
  const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
@@ -8491,24 +8910,24 @@ function describeAccept(accept, t) {
8491
8910
  }).join(", ");
8492
8911
  }
8493
8912
  var seq = 0;
8494
- var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8913
+ var FileUpload = React55.forwardRef(function FileUpload2(props, ref) {
8495
8914
  const t = useStrings();
8496
8915
  const auto = uid(), id = props.id || auto;
8497
8916
  const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
8498
8917
  const items2 = st[0] || [];
8499
- const dragState = React52.useState(false), over = dragState[0];
8500
- const inputRef = React52.useRef(null), inputMerged = useMergedRef(ref, inputRef);
8501
- const urls = React52.useRef({});
8918
+ const dragState = React55.useState(false), over = dragState[0];
8919
+ const inputRef = React55.useRef(null), inputMerged = useMergedRef(ref, inputRef);
8920
+ const urls = React55.useRef({});
8502
8921
  const maxFiles = props.multiple ? props.maxFiles : 1;
8503
8922
  const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
8504
- React52.useEffect(function() {
8923
+ React55.useEffect(function() {
8505
8924
  return function() {
8506
8925
  Object.keys(urls.current).forEach(function(k) {
8507
8926
  URL.revokeObjectURL(urls.current[k]);
8508
8927
  });
8509
8928
  };
8510
8929
  }, []);
8511
- React52.useEffect(
8930
+ React55.useEffect(
8512
8931
  function() {
8513
8932
  const el = inputRef.current;
8514
8933
  if (!el || !props.name || typeof DataTransfer === "undefined") return;
@@ -8568,7 +8987,7 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8568
8987
  if (inputRef.current) inputRef.current.focus();
8569
8988
  }
8570
8989
  const error = props.error;
8571
- return /* @__PURE__ */ React52.createElement(
8990
+ return /* @__PURE__ */ React55.createElement(
8572
8991
  Field,
8573
8992
  {
8574
8993
  id,
@@ -8580,7 +8999,7 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8580
8999
  disabled: props.disabled,
8581
9000
  className: props.className
8582
9001
  },
8583
- /* @__PURE__ */ React52.createElement(
9002
+ /* @__PURE__ */ React55.createElement(
8584
9003
  "div",
8585
9004
  {
8586
9005
  className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
@@ -8601,9 +9020,9 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8601
9020
  add(e.dataTransfer && e.dataTransfer.files);
8602
9021
  }
8603
9022
  },
8604
- /* @__PURE__ */ React52.createElement(Icon, { name: /* @__PURE__ */ React52.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
8605
- /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
8606
- /* @__PURE__ */ React52.createElement(
9023
+ /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
9024
+ /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
9025
+ /* @__PURE__ */ React55.createElement(
8607
9026
  "input",
8608
9027
  {
8609
9028
  ref: inputMerged,
@@ -8625,12 +9044,12 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8625
9044
  }
8626
9045
  }
8627
9046
  ),
8628
- /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
8629
- note ? /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
9047
+ /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
9048
+ note ? /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
8630
9049
  ),
8631
- items2.length ? /* @__PURE__ */ React52.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
9050
+ items2.length ? /* @__PURE__ */ React55.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
8632
9051
  const src = thumb(it);
8633
- return /* @__PURE__ */ React52.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React52.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React52.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React52.createElement(IconImage, null) : /* @__PURE__ */ React52.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React52.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React52.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(Icon, { name: /* @__PURE__ */ React52.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(Icon, { name: /* @__PURE__ */ React52.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React52.createElement(
9052
+ return /* @__PURE__ */ React55.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React55.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React55.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React55.createElement(IconImage, null) : /* @__PURE__ */ React55.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React55.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React55.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React55.createElement(
8634
9053
  "span",
8635
9054
  {
8636
9055
  className: "aura-upload__bar",
@@ -8640,11 +9059,11 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8640
9059
  "aria-valuemax": 100,
8641
9060
  "aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
8642
9061
  },
8643
- /* @__PURE__ */ React52.createElement("span", { style: { width: (it.progress || 0) + "%" } })
8644
- ) : null), /* @__PURE__ */ React52.createElement(
9062
+ /* @__PURE__ */ React55.createElement("span", { style: { width: (it.progress || 0) + "%" } })
9063
+ ) : null), /* @__PURE__ */ React55.createElement(
8645
9064
  IconButton,
8646
9065
  {
8647
- icon: /* @__PURE__ */ React52.createElement(IconX, null),
9066
+ icon: /* @__PURE__ */ React55.createElement(IconX, null),
8648
9067
  label: t.remove(it.name),
8649
9068
  onClick: function() {
8650
9069
  remove(it);
@@ -8657,14 +9076,14 @@ var FileUpload = React52.forwardRef(function FileUpload2(props, ref) {
8657
9076
 
8658
9077
  // src/theme.ts
8659
9078
  function hexToRgb(hex) {
8660
- let h10 = String(hex).trim().replace("#", "");
8661
- if (h10.length === 3)
8662
- h10 = h10.split("").map(function(c) {
9079
+ let h11 = String(hex).trim().replace("#", "");
9080
+ if (h11.length === 3)
9081
+ h11 = h11.split("").map(function(c) {
8663
9082
  return c + c;
8664
9083
  }).join("");
8665
- if (!/^[0-9a-f]{6}$/i.test(h10)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
9084
+ if (!/^[0-9a-f]{6}$/i.test(h11)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
8666
9085
  return [0, 2, 4].map(function(i) {
8667
- return parseInt(h10.slice(i, i + 2), 16) / 255;
9086
+ return parseInt(h11.slice(i, i + 2), 16) / 255;
8668
9087
  });
8669
9088
  }
8670
9089
  function rgbToHex(rgb) {
@@ -8680,10 +9099,10 @@ function delin(c) {
8680
9099
  return c <= 31308e-7 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
8681
9100
  }
8682
9101
  function rgbToOklch(rgb) {
8683
- const r = lin(rgb[0]), g = lin(rgb[1]), b = lin(rgb[2]);
8684
- const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
8685
- const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
8686
- const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
9102
+ const r2 = lin(rgb[0]), g = lin(rgb[1]), b = lin(rgb[2]);
9103
+ const l = Math.cbrt(0.4122214708 * r2 + 0.5363325363 * g + 0.0514459929 * b);
9104
+ const m = Math.cbrt(0.2119034982 * r2 + 0.6806995451 * g + 0.1073969566 * b);
9105
+ const s = Math.cbrt(0.0883024619 * r2 + 0.2817188376 * g + 0.6299787005 * b);
8687
9106
  const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
8688
9107
  const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
8689
9108
  const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
@@ -8843,13 +9262,13 @@ function createTheme(opts) {
8843
9262
  D["card-shadow-creative"] = "8px 8px 0px " + shadowDark;
8844
9263
  const checks = [];
8845
9264
  function check(theme, fg, bg, target, fgHex, bgHex) {
8846
- const r = contrast(fgHex, bgHex);
9265
+ const r2 = contrast(fgHex, bgHex);
8847
9266
  checks.push({
8848
9267
  theme,
8849
9268
  pair: fg + " on " + bg,
8850
- ratio: Math.round(r * 100) / 100,
9269
+ ratio: Math.round(r2 * 100) / 100,
8851
9270
  target,
8852
- pass: r >= target - 5e-3
9271
+ pass: r2 >= target - 5e-3
8853
9272
  });
8854
9273
  }
8855
9274
  [
@@ -8960,9 +9379,9 @@ function createTheme(opts) {
8960
9379
  }
8961
9380
 
8962
9381
  // src/ThemeStyle.tsx
8963
- var React53 = __toESM(require("react"), 1);
9382
+ var React56 = __toESM(require("react"), 1);
8964
9383
  function ThemeStyle(props) {
8965
- const css = React53.useMemo(
9384
+ const css = React56.useMemo(
8966
9385
  function() {
8967
9386
  try {
8968
9387
  return createTheme({
@@ -8979,11 +9398,11 @@ function ThemeStyle(props) {
8979
9398
  [props.brand, props.signal, props.primary, props.name, props.selector]
8980
9399
  );
8981
9400
  if (css === null) return null;
8982
- return /* @__PURE__ */ React53.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
9401
+ return /* @__PURE__ */ React56.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
8983
9402
  }
8984
9403
 
8985
9404
  // src/colorScheme.tsx
8986
- var React54 = __toESM(require("react"), 1);
9405
+ var React57 = __toESM(require("react"), 1);
8987
9406
 
8988
9407
  // src/colorSchemeScript.ts
8989
9408
  var DEFAULT_KEY = "aura-color-scheme";
@@ -9000,7 +9419,7 @@ function colorSchemeScript(options) {
9000
9419
 
9001
9420
  // src/colorScheme.tsx
9002
9421
  function ColorSchemeScript(props) {
9003
- return /* @__PURE__ */ React54.createElement(
9422
+ return /* @__PURE__ */ React57.createElement(
9004
9423
  "script",
9005
9424
  {
9006
9425
  "data-aura-color-scheme": "",
@@ -9025,7 +9444,7 @@ function apply(scheme) {
9025
9444
  function useColorScheme(options) {
9026
9445
  const key = options && options.storageKey || DEFAULT_KEY;
9027
9446
  const fallback = options && options.defaultScheme || "system";
9028
- const subscribe2 = React54.useCallback(
9447
+ const subscribe2 = React57.useCallback(
9029
9448
  function(cb) {
9030
9449
  const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
9031
9450
  function onSystem() {
@@ -9047,7 +9466,7 @@ function useColorScheme(options) {
9047
9466
  },
9048
9467
  [fallback, key]
9049
9468
  );
9050
- const snapshot = React54.useSyncExternalStore(
9469
+ const snapshot = React57.useSyncExternalStore(
9051
9470
  subscribe2,
9052
9471
  function() {
9053
9472
  const s = readScheme(fallback);
@@ -9058,7 +9477,7 @@ function useColorScheme(options) {
9058
9477
  }
9059
9478
  );
9060
9479
  const parts = snapshot.split("|");
9061
- const setScheme = React54.useCallback(
9480
+ const setScheme = React57.useCallback(
9062
9481
  function(next) {
9063
9482
  if (!valid(next)) return;
9064
9483
  try {
@@ -9077,14 +9496,14 @@ function ColorSchemeToggle(props) {
9077
9496
  const cs = useColorScheme(props);
9078
9497
  const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
9079
9498
  const label = props.label || t.colorScheme;
9080
- return /* @__PURE__ */ React54.createElement(
9499
+ return /* @__PURE__ */ React57.createElement(
9081
9500
  DropdownMenu,
9082
9501
  {
9083
9502
  label,
9084
- trigger: /* @__PURE__ */ React54.createElement(
9503
+ trigger: /* @__PURE__ */ React57.createElement(
9085
9504
  IconButton,
9086
9505
  {
9087
- icon: cs.resolved === "dark" ? /* @__PURE__ */ React54.createElement(IconMoon, null) : /* @__PURE__ */ React54.createElement(IconSun, null),
9506
+ icon: cs.resolved === "dark" ? /* @__PURE__ */ React57.createElement(IconMoon, null) : /* @__PURE__ */ React57.createElement(IconSun, null),
9088
9507
  label: label + ": " + names[cs.scheme]
9089
9508
  }
9090
9509
  ),
@@ -9102,14 +9521,14 @@ function ColorSchemeToggle(props) {
9102
9521
  }
9103
9522
 
9104
9523
  // src/Badge.tsx
9105
- var React55 = __toESM(require("react"), 1);
9106
- var Badge = React55.forwardRef(function Badge2(props, ref) {
9524
+ var React58 = __toESM(require("react"), 1);
9525
+ var Badge = React58.forwardRef(function Badge2(props, ref) {
9107
9526
  return badgeElement(props, ref);
9108
9527
  });
9109
9528
 
9110
9529
  // src/Progress.tsx
9111
- var React56 = __toESM(require("react"), 1);
9112
- var Progress = React56.forwardRef(function Progress2(props, ref) {
9530
+ var React59 = __toESM(require("react"), 1);
9531
+ var Progress = React59.forwardRef(function Progress2(props, ref) {
9113
9532
  const t = useStrings();
9114
9533
  const auto = uid(), id = props.id || auto;
9115
9534
  const max = props.max || 100, det = props.value != null;
@@ -9118,7 +9537,7 @@ var Progress = React56.forwardRef(function Progress2(props, ref) {
9118
9537
  const spct = sec ? Math.max(0, Math.min(100 - pct, sec / max * 100)) : 0;
9119
9538
  const valueText = props.valueText != null ? props.valueText : props.valueLabel != null ? String(props.valueLabel) : sec ? t.progressReserved(props.value, sec, max) : void 0;
9120
9539
  const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
9121
- return /* @__PURE__ */ React56.createElement(
9540
+ return /* @__PURE__ */ React59.createElement(
9122
9541
  "div",
9123
9542
  {
9124
9543
  ref,
@@ -9129,8 +9548,8 @@ var Progress = React56.forwardRef(function Progress2(props, ref) {
9129
9548
  props.className
9130
9549
  )
9131
9550
  },
9132
- props.label || props.showValue && shown ? /* @__PURE__ */ React56.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React56.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React56.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React56.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
9133
- /* @__PURE__ */ React56.createElement(
9551
+ props.label || props.showValue && shown ? /* @__PURE__ */ React59.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React59.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React59.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React59.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
9552
+ /* @__PURE__ */ React59.createElement(
9134
9553
  "div",
9135
9554
  {
9136
9555
  className: cx("aura-progress__track", !det && "is-indeterminate"),
@@ -9142,8 +9561,8 @@ var Progress = React56.forwardRef(function Progress2(props, ref) {
9142
9561
  "aria-valuenow": det ? props.value : void 0,
9143
9562
  "aria-valuetext": det ? valueText : void 0
9144
9563
  },
9145
- /* @__PURE__ */ React56.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
9146
- sec ? /* @__PURE__ */ React56.createElement(
9564
+ /* @__PURE__ */ React59.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
9565
+ sec ? /* @__PURE__ */ React59.createElement(
9147
9566
  "span",
9148
9567
  {
9149
9568
  className: "aura-progress__bar aura-progress__bar--reserved",
@@ -9151,19 +9570,19 @@ var Progress = React56.forwardRef(function Progress2(props, ref) {
9151
9570
  }
9152
9571
  ) : null
9153
9572
  ),
9154
- props.hint ? /* @__PURE__ */ React56.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
9573
+ props.hint ? /* @__PURE__ */ React59.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
9155
9574
  );
9156
9575
  });
9157
9576
 
9158
9577
  // src/Skeleton.tsx
9159
- var React57 = __toESM(require("react"), 1);
9160
- var Skeleton = React57.forwardRef(function Skeleton2(props, ref) {
9578
+ var React60 = __toESM(require("react"), 1);
9579
+ var Skeleton = React60.forwardRef(function Skeleton2(props, ref) {
9161
9580
  const v = props.variant || "text";
9162
9581
  if (v === "text" && (props.lines || 1) > 1) {
9163
9582
  const n3 = props.lines, rows = [];
9164
9583
  for (let i = 0; i < n3; i++)
9165
- rows.push(/* @__PURE__ */ React57.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
9166
- return /* @__PURE__ */ React57.createElement(
9584
+ rows.push(/* @__PURE__ */ React60.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
9585
+ return /* @__PURE__ */ React60.createElement(
9167
9586
  "span",
9168
9587
  {
9169
9588
  ref,
@@ -9181,17 +9600,17 @@ var Skeleton = React57.forwardRef(function Skeleton2(props, ref) {
9181
9600
  if (v === "circle") {
9182
9601
  style.width = style.height = props.size || props.width || 40;
9183
9602
  }
9184
- return /* @__PURE__ */ React57.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
9603
+ return /* @__PURE__ */ React60.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
9185
9604
  });
9186
9605
 
9187
9606
  // src/EmptyState.tsx
9188
- var React58 = __toESM(require("react"), 1);
9189
- var EmptyState = React58.forwardRef(function EmptyState2(props, ref) {
9607
+ var React61 = __toESM(require("react"), 1);
9608
+ var EmptyState = React61.forwardRef(function EmptyState2(props, ref) {
9190
9609
  return emptyStateElement(props, ref);
9191
9610
  });
9192
9611
 
9193
9612
  // src/Pagination.tsx
9194
- var React59 = __toESM(require("react"), 1);
9613
+ var React62 = __toESM(require("react"), 1);
9195
9614
  function pageList(page, count, sib) {
9196
9615
  let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
9197
9616
  if (page - sib <= 3) {
@@ -9211,7 +9630,7 @@ function pageList(page, count, sib) {
9211
9630
  if (count > 1) out.push(count);
9212
9631
  return out;
9213
9632
  }
9214
- var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9633
+ var Pagination = React62.forwardRef(function Pagination2(props, ref) {
9215
9634
  const t = useStrings();
9216
9635
  useAutoTip();
9217
9636
  const count = Math.max(1, props.pageCount || 1);
@@ -9231,7 +9650,7 @@ var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9231
9650
  },
9232
9651
  extra
9233
9652
  );
9234
- return link ? /* @__PURE__ */ React59.createElement(
9653
+ return link ? /* @__PURE__ */ React62.createElement(
9235
9654
  Link,
9236
9655
  {
9237
9656
  href: link(p),
@@ -9244,7 +9663,7 @@ var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9244
9663
  ...common
9245
9664
  },
9246
9665
  label
9247
- ) : /* @__PURE__ */ React59.createElement(
9666
+ ) : /* @__PURE__ */ React62.createElement(
9248
9667
  "button",
9249
9668
  {
9250
9669
  type: "button",
@@ -9258,7 +9677,7 @@ var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9258
9677
  }
9259
9678
  function arrow(p, icon, label, rel, disabled) {
9260
9679
  if (!link || disabled)
9261
- return /* @__PURE__ */ React59.createElement(
9680
+ return /* @__PURE__ */ React62.createElement(
9262
9681
  IconButton,
9263
9682
  {
9264
9683
  icon,
@@ -9269,7 +9688,7 @@ var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9269
9688
  }
9270
9689
  }
9271
9690
  );
9272
- return /* @__PURE__ */ React59.createElement(
9691
+ return /* @__PURE__ */ React62.createElement(
9273
9692
  Link,
9274
9693
  {
9275
9694
  href: link(p),
@@ -9284,17 +9703,17 @@ var Pagination = React59.forwardRef(function Pagination2(props, ref) {
9284
9703
  }
9285
9704
  }
9286
9705
  },
9287
- /* @__PURE__ */ React59.createElement(Icon, { name: icon, size: "sm" })
9706
+ /* @__PURE__ */ React62.createElement(Icon, { name: icon, size: "sm" })
9288
9707
  );
9289
9708
  }
9290
- return /* @__PURE__ */ React59.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React59.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React59.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
9291
- return typeof p === "number" ? /* @__PURE__ */ React59.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React59.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
9292
- })), /* @__PURE__ */ React59.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React59.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
9709
+ return /* @__PURE__ */ React62.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React62.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React62.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
9710
+ return typeof p === "number" ? /* @__PURE__ */ React62.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React62.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
9711
+ })), /* @__PURE__ */ React62.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React62.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
9293
9712
  });
9294
9713
 
9295
9714
  // src/Accordion.tsx
9296
- var React60 = __toESM(require("react"), 1);
9297
- var Accordion = React60.forwardRef(function Accordion2(props, ref) {
9715
+ var React63 = __toESM(require("react"), 1);
9716
+ var Accordion = React63.forwardRef(function Accordion2(props, ref) {
9298
9717
  const auto = uid(), base = props.id || auto;
9299
9718
  const multiple = props.type === "multiple";
9300
9719
  const st = useMaybeControlled(
@@ -9332,9 +9751,9 @@ var Accordion = React60.forwardRef(function Accordion2(props, ref) {
9332
9751
  n3.focus();
9333
9752
  }
9334
9753
  }
9335
- return /* @__PURE__ */ React60.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
9754
+ return /* @__PURE__ */ React63.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
9336
9755
  const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
9337
- return /* @__PURE__ */ React60.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React60.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React60.createElement(
9756
+ return /* @__PURE__ */ React63.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React63.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React63.createElement(
9338
9757
  "button",
9339
9758
  {
9340
9759
  type: "button",
@@ -9347,10 +9766,10 @@ var Accordion = React60.forwardRef(function Accordion2(props, ref) {
9347
9766
  toggle(it.id);
9348
9767
  }
9349
9768
  },
9350
- it.icon ? /* @__PURE__ */ React60.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
9351
- /* @__PURE__ */ React60.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React60.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React60.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
9352
- /* @__PURE__ */ React60.createElement(Icon, { name: /* @__PURE__ */ React60.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
9353
- )), /* @__PURE__ */ React60.createElement(
9769
+ it.icon ? /* @__PURE__ */ React63.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
9770
+ /* @__PURE__ */ React63.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React63.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React63.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
9771
+ /* @__PURE__ */ React63.createElement(Icon, { name: /* @__PURE__ */ React63.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
9772
+ )), /* @__PURE__ */ React63.createElement(
9354
9773
  "div",
9355
9774
  {
9356
9775
  id: pid,
@@ -9365,33 +9784,33 @@ var Accordion = React60.forwardRef(function Accordion2(props, ref) {
9365
9784
  });
9366
9785
 
9367
9786
  // src/Popover.tsx
9368
- var React61 = __toESM(require("react"), 1);
9787
+ var React64 = __toESM(require("react"), 1);
9369
9788
  var import_react_dom13 = require("react-dom");
9370
9789
  function position(anchor, pop, placement) {
9371
- const r = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
9790
+ const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
9372
9791
  let side = (placement || "bottom-start").split("-")[0], align = (placement || "bottom-start").split("-")[1] || "start";
9373
- if (side === "bottom" && r.bottom + gap + ph > vh - 8 && r.top - gap - ph > 8) side = "top";
9374
- else if (side === "top" && r.top - gap - ph < 8 && r.bottom + gap + ph < vh - 8) side = "bottom";
9375
- const below2 = vh - r.bottom - gap - 8, above = r.top - gap - 8;
9792
+ if (side === "bottom" && r2.bottom + gap + ph > vh - 8 && r2.top - gap - ph > 8) side = "top";
9793
+ else if (side === "top" && r2.top - gap - ph < 8 && r2.bottom + gap + ph < vh - 8) side = "bottom";
9794
+ const below2 = vh - r2.bottom - gap - 8, above = r2.top - gap - 8;
9376
9795
  let maxHeight;
9377
9796
  if (ph > below2 && ph > above) {
9378
9797
  side = above > below2 ? "top" : "bottom";
9379
9798
  maxHeight = Math.max(120, side === "top" ? above : below2);
9380
9799
  }
9381
- const h10 = maxHeight ? Math.min(ph, maxHeight) : ph;
9382
- const top = side === "top" ? r.top - gap - h10 : r.bottom + gap;
9383
- const left = align === "end" ? r.right - pw : align === "center" ? r.left + r.width / 2 - pw / 2 : r.left;
9800
+ const h11 = maxHeight ? Math.min(ph, maxHeight) : ph;
9801
+ const top = side === "top" ? r2.top - gap - h11 : r2.bottom + gap;
9802
+ const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
9384
9803
  return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
9385
9804
  }
9386
- var Popover = React61.forwardRef(function Popover2(props, ref) {
9805
+ var Popover = React64.forwardRef(function Popover2(props, ref) {
9387
9806
  const t = useStrings();
9388
9807
  const density = useDensity();
9389
9808
  const auto = uid(), id = props.id || auto;
9390
9809
  const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
9391
9810
  const open = !!st[0];
9392
- const wrap = React61.useRef(null), pop = React61.useRef(null), popMerged = useMergedRef(ref, pop);
9393
- const pos = React61.useState(null), mounted = useMounted();
9394
- const inTree = React61.useRef(false);
9811
+ const wrap = React64.useRef(null), pop = React64.useRef(null), popMerged = useMergedRef(ref, pop);
9812
+ const pos = React64.useState(null), mounted = useMounted();
9813
+ const inTree = React64.useRef(false);
9395
9814
  function trigger() {
9396
9815
  return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
9397
9816
  }
@@ -9418,7 +9837,7 @@ var Popover = React61.forwardRef(function Popover2(props, ref) {
9418
9837
  },
9419
9838
  [open, mounted, props.placement]
9420
9839
  );
9421
- React61.useEffect(
9840
+ React64.useEffect(
9422
9841
  function() {
9423
9842
  if (!open || !mounted) return;
9424
9843
  if (props.autoFocus !== false && pop.current) {
@@ -9443,9 +9862,9 @@ var Popover = React61.forwardRef(function Popover2(props, ref) {
9443
9862
  },
9444
9863
  [open, mounted]
9445
9864
  );
9446
- const child = React61.Children.only(props.trigger);
9865
+ const child = React64.Children.only(props.trigger);
9447
9866
  const panel = open && mounted ? (0, import_react_dom13.createPortal)(
9448
- /* @__PURE__ */ React61.createElement(
9867
+ /* @__PURE__ */ React64.createElement(
9449
9868
  "div",
9450
9869
  {
9451
9870
  ref: popMerged,
@@ -9475,17 +9894,17 @@ var Popover = React61.forwardRef(function Popover2(props, ref) {
9475
9894
  } else trapTab(e, pop.current);
9476
9895
  }
9477
9896
  },
9478
- props.title ? /* @__PURE__ */ React61.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React61.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React61.createElement(
9897
+ props.title ? /* @__PURE__ */ React64.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React64.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React64.createElement(
9479
9898
  IconButton,
9480
9899
  {
9481
- icon: /* @__PURE__ */ React61.createElement(IconX, null),
9900
+ icon: /* @__PURE__ */ React64.createElement(IconX, null),
9482
9901
  label: t.close,
9483
9902
  onClick: function() {
9484
9903
  close(true);
9485
9904
  }
9486
9905
  }
9487
9906
  )) : null,
9488
- /* @__PURE__ */ React61.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
9907
+ /* @__PURE__ */ React64.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
9489
9908
  close: function() {
9490
9909
  close(true);
9491
9910
  }
@@ -9493,7 +9912,7 @@ var Popover = React61.forwardRef(function Popover2(props, ref) {
9493
9912
  ),
9494
9913
  document.body
9495
9914
  ) : null;
9496
- return /* @__PURE__ */ React61.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React61.cloneElement(child, {
9915
+ return /* @__PURE__ */ React64.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React64.cloneElement(child, {
9497
9916
  onClick: function(e) {
9498
9917
  if (child.props.onClick) child.props.onClick(e);
9499
9918
  st[1](!open);
@@ -9505,7 +9924,7 @@ var Popover = React61.forwardRef(function Popover2(props, ref) {
9505
9924
  });
9506
9925
 
9507
9926
  // src/NumberField.tsx
9508
- var React62 = __toESM(require("react"), 1);
9927
+ var React65 = __toESM(require("react"), 1);
9509
9928
  function decimalsOf(n3) {
9510
9929
  const s = String(n3);
9511
9930
  const i = s.indexOf(".");
@@ -9518,7 +9937,7 @@ function parse(text2) {
9518
9937
  if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
9519
9938
  return Number(s);
9520
9939
  }
9521
- var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9940
+ var NumberField = React65.forwardRef(function NumberField2(props, ref) {
9522
9941
  const t = useStrings();
9523
9942
  const auto = uid(), id = props.id || auto;
9524
9943
  const step = props.step || 1;
@@ -9529,7 +9948,7 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9529
9948
  props.onChange
9530
9949
  );
9531
9950
  const value = st[0], setValue = st[1];
9532
- const draftState = React62.useState(null), draft = draftState[0], setDraft = draftState[1];
9951
+ const draftState = React65.useState(null), draft = draftState[0], setDraft = draftState[1];
9533
9952
  function fmt2(n3) {
9534
9953
  if (n3 == null || isNaN(n3)) return "";
9535
9954
  return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
@@ -9578,7 +9997,7 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9578
9997
  };
9579
9998
  const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
9580
9999
  const stepper = props.stepper !== false && !props.readOnly;
9581
- return /* @__PURE__ */ React62.createElement(
10000
+ return /* @__PURE__ */ React65.createElement(
9582
10001
  Field,
9583
10002
  {
9584
10003
  id,
@@ -9590,7 +10009,7 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9590
10009
  disabled: props.disabled,
9591
10010
  className: props.className
9592
10011
  },
9593
- /* @__PURE__ */ React62.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React62.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React62.createElement(
10012
+ /* @__PURE__ */ React65.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React65.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React65.createElement(
9594
10013
  "input",
9595
10014
  {
9596
10015
  ref,
@@ -9637,7 +10056,7 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9637
10056
  },
9638
10057
  onKeyDown
9639
10058
  }
9640
- ), props.suffix != null ? /* @__PURE__ */ React62.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React62.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React62.createElement(
10059
+ ), props.suffix != null ? /* @__PURE__ */ React65.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React65.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React65.createElement(
9641
10060
  "button",
9642
10061
  {
9643
10062
  type: "button",
@@ -9653,8 +10072,8 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9653
10072
  nudge(-step);
9654
10073
  }
9655
10074
  },
9656
- /* @__PURE__ */ React62.createElement(Icon, { name: /* @__PURE__ */ React62.createElement(IconMinus, null) })
9657
- ), /* @__PURE__ */ React62.createElement(
10075
+ /* @__PURE__ */ React65.createElement(Icon, { name: /* @__PURE__ */ React65.createElement(IconMinus, null) })
10076
+ ), /* @__PURE__ */ React65.createElement(
9658
10077
  "button",
9659
10078
  {
9660
10079
  type: "button",
@@ -9670,14 +10089,14 @@ var NumberField = React62.forwardRef(function NumberField2(props, ref) {
9670
10089
  nudge(step);
9671
10090
  }
9672
10091
  },
9673
- /* @__PURE__ */ React62.createElement(Icon, { name: /* @__PURE__ */ React62.createElement(IconPlus, null) })
10092
+ /* @__PURE__ */ React65.createElement(Icon, { name: /* @__PURE__ */ React65.createElement(IconPlus, null) })
9674
10093
  )) : null)
9675
10094
  );
9676
10095
  });
9677
10096
 
9678
10097
  // src/Stepper.tsx
9679
- var React63 = __toESM(require("react"), 1);
9680
- var Stepper = React63.forwardRef(function Stepper2(props, ref) {
10098
+ var React66 = __toESM(require("react"), 1);
10099
+ var Stepper = React66.forwardRef(function Stepper2(props, ref) {
9681
10100
  const t = useStrings();
9682
10101
  const idBase = uid();
9683
10102
  const steps = props.steps || [];
@@ -9688,22 +10107,22 @@ var Stepper = React63.forwardRef(function Stepper2(props, ref) {
9688
10107
  if (at < 0) at = 0;
9689
10108
  const vertical = props.orientation === "vertical";
9690
10109
  const cur2 = steps[at];
9691
- return /* @__PURE__ */ React63.createElement(
10110
+ return /* @__PURE__ */ React66.createElement(
9692
10111
  "nav",
9693
10112
  {
9694
10113
  ref,
9695
10114
  "aria-label": props.label,
9696
10115
  className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
9697
10116
  },
9698
- /* @__PURE__ */ React63.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
10117
+ /* @__PURE__ */ React66.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
9699
10118
  const state = i < at ? "done" : i === at ? "current" : "upcoming";
9700
10119
  const error = s.status === "error";
9701
- const marker = /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React63.createElement(Icon, { name: /* @__PURE__ */ React63.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React63.createElement(Icon, { name: /* @__PURE__ */ React63.createElement(IconCheck, null) }) : i + 1);
10120
+ const marker = /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconCheck, null) }) : i + 1);
9702
10121
  const note = error ? t.stepError : state === "done" ? t.stepDone : "";
9703
10122
  const clickable = state === "done" && !!props.onStepClick;
9704
10123
  const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
9705
10124
  const descId = idBase + "-step-" + i;
9706
- const text2 = /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React63.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React63.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React63.createElement(
10125
+ const text2 = /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React66.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React66.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React66.createElement(
9707
10126
  "span",
9708
10127
  {
9709
10128
  className: "aura-stepper__desc",
@@ -9712,14 +10131,14 @@ var Stepper = React63.forwardRef(function Stepper2(props, ref) {
9712
10131
  },
9713
10132
  s.description
9714
10133
  ) : null);
9715
- return /* @__PURE__ */ React63.createElement(
10134
+ return /* @__PURE__ */ React66.createElement(
9716
10135
  "li",
9717
10136
  {
9718
10137
  key: s.id,
9719
10138
  className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
9720
10139
  "aria-current": state === "current" ? "step" : void 0
9721
10140
  },
9722
- clickable ? /* @__PURE__ */ React63.createElement(
10141
+ clickable ? /* @__PURE__ */ React66.createElement(
9723
10142
  "button",
9724
10143
  {
9725
10144
  type: "button",
@@ -9731,19 +10150,19 @@ var Stepper = React63.forwardRef(function Stepper2(props, ref) {
9731
10150
  },
9732
10151
  marker,
9733
10152
  text2
9734
- ) : /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__step" }, marker, text2)
10153
+ ) : /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__step" }, marker, text2)
9735
10154
  );
9736
10155
  })),
9737
- !vertical && cur2 ? /* @__PURE__ */ React63.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React63.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
10156
+ !vertical && cur2 ? /* @__PURE__ */ React66.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React66.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
9738
10157
  );
9739
10158
  });
9740
10159
 
9741
10160
  // src/SegmentedControl.tsx
9742
- var React64 = __toESM(require("react"), 1);
10161
+ var React67 = __toESM(require("react"), 1);
9743
10162
  function toOpt2(o) {
9744
10163
  return typeof o === "object" ? o : { value: o, label: o };
9745
10164
  }
9746
- var SegmentedControl = React64.forwardRef(
10165
+ var SegmentedControl = React67.forwardRef(
9747
10166
  function SegmentedControl2(props, ref) {
9748
10167
  const options = (props.options || []).map(toOpt2);
9749
10168
  useAutoTip();
@@ -9757,7 +10176,7 @@ var SegmentedControl = React64.forwardRef(
9757
10176
  );
9758
10177
  const value = st[0], setValue = st[1];
9759
10178
  const auto = uid(), id = props.id || auto;
9760
- const refs = React64.useRef([]);
10179
+ const refs = React67.useRef([]);
9761
10180
  const selIdx = options.findIndex(function(o) {
9762
10181
  return o.value === value;
9763
10182
  });
@@ -9790,7 +10209,7 @@ var SegmentedControl = React64.forwardRef(
9790
10209
  move(options.length, -1);
9791
10210
  }
9792
10211
  }
9793
- return /* @__PURE__ */ React64.createElement(
10212
+ return /* @__PURE__ */ React67.createElement(
9794
10213
  "div",
9795
10214
  {
9796
10215
  ref,
@@ -9809,7 +10228,7 @@ var SegmentedControl = React64.forwardRef(
9809
10228
  options.map(function(o, i) {
9810
10229
  const on = o.value === value;
9811
10230
  const off = props.disabled || o.disabled;
9812
- return /* @__PURE__ */ React64.createElement(
10231
+ return /* @__PURE__ */ React67.createElement(
9813
10232
  "button",
9814
10233
  {
9815
10234
  key: o.value,
@@ -9831,8 +10250,8 @@ var SegmentedControl = React64.forwardRef(
9831
10250
  onKeyDown(e, i);
9832
10251
  }
9833
10252
  },
9834
- o.icon ? /* @__PURE__ */ React64.createElement(Icon, { name: o.icon }) : null,
9835
- o.iconOnly ? null : /* @__PURE__ */ React64.createElement("span", null, o.label)
10253
+ o.icon ? /* @__PURE__ */ React67.createElement(Icon, { name: o.icon }) : null,
10254
+ o.iconOnly ? null : /* @__PURE__ */ React67.createElement("span", null, o.label)
9836
10255
  );
9837
10256
  })
9838
10257
  );