@jirawatpyk/aura-react 5.51.0 → 5.52.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.
@@ -92,6 +92,7 @@ __export(index_exports, {
92
92
  TFoot: () => TFoot,
93
93
  THead: () => THead,
94
94
  Table: () => Table,
95
+ TableSkeleton: () => TableSkeleton,
95
96
  Tabs: () => Tabs,
96
97
  Tag: () => Tag,
97
98
  Td: () => Td,
@@ -5950,7 +5951,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
5950
5951
  );
5951
5952
  for (let i = 0; i < els.length; i++) if (els[i].tabIndex !== -1) els[i].tabIndex = -1;
5952
5953
  });
5953
- function widthOf(c) {
5954
+ function widthOf2(c) {
5954
5955
  return widths[c.key] != null ? widths[c.key] : c.width;
5955
5956
  }
5956
5957
  const order = orderState[0].filter(function(k) {
@@ -6024,11 +6025,11 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6024
6025
  return p === "field" || p === "wide";
6025
6026
  });
6026
6027
  const hasFlex = vis.some(function(c) {
6027
- return widthOf(c) == null;
6028
+ return widthOf2(c) == null;
6028
6029
  });
6029
6030
  let fixedSum = 0, hideTerms = "";
6030
6031
  vis.forEach(function(c) {
6031
- const w = widthOf(c) != null ? widthOf(c) : c.minWidth || FLEX_MIN, lv = hideLevel(c);
6032
+ const w = widthOf2(c) != null ? widthOf2(c) : c.minWidth || FLEX_MIN, lv = hideLevel(c);
6032
6033
  if (lv && boxWidth[0] == null) hideTerms += " + " + w + "px * var(--aura-h" + lv + "-on, 1)";
6033
6034
  else fixedSum += w;
6034
6035
  });
@@ -6037,7 +6038,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6037
6038
  if (isPinned(c)) {
6038
6039
  pinOffsets[c.key] = acc;
6039
6040
  const lv = hideLevel(c);
6040
- acc += " + " + widthOf(c) + "px" + (lv && boxWidth[0] == null ? " * var(--aura-h" + lv + "-on, 1)" : "");
6041
+ acc += " + " + widthOf2(c) + "px" + (lv && boxWidth[0] == null ? " * var(--aura-h" + lv + "-on, 1)" : "");
6041
6042
  }
6042
6043
  });
6043
6044
  if (vis.filter(function(c) {
@@ -6051,7 +6052,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6051
6052
  const gutterR = controls ? "var(--aura-space-12)" : "var(--aura-space-6)";
6052
6053
  const rowMinWidth = "calc(" + fixedSum + "px" + hideTerms + " + var(--aura-space-6) + " + gutterR + selW + ")";
6053
6054
  function cellStyle(c, i) {
6054
- const w = widthOf(c), s = {};
6055
+ const w = widthOf2(c), s = {};
6055
6056
  if (w == null) {
6056
6057
  const g = typeof c.grow === "number" && c.grow >= 0 && isFinite(c.grow) ? c.grow : 1;
6057
6058
  s["--aura-cell-flex"] = g + " 1 0";
@@ -6366,7 +6367,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6366
6367
  e.preventDefault();
6367
6368
  e.stopPropagation();
6368
6369
  resizing.current = true;
6369
- let x0 = e.clientX, w0 = widthOf(c), last = w0;
6370
+ let x0 = e.clientX, w0 = widthOf2(c), last = w0;
6370
6371
  const el = e.currentTarget;
6371
6372
  el.classList.add("is-dragging");
6372
6373
  document.body.style.cursor = "col-resize";
@@ -6550,7 +6551,7 @@ var DataTableImpl = React33.forwardRef(function DataTable(props, ref) {
6550
6551
  const row = r2 > 0 && r2 <= nRows ? pageRows[r2 - 1] : null, isTotal = hasTotal && r2 === T;
6551
6552
  let handled = true;
6552
6553
  if (r2 === 0 && col && e.altKey && (k === "ArrowLeft" || k === "ArrowRight") && canResize(col))
6553
- setW(col, widthOf(col) + (k === "ArrowLeft" ? -1 : 1) * (e.shiftKey ? 48 : 16), true);
6554
+ setW(col, widthOf2(col) + (k === "ArrowLeft" ? -1 : 1) * (e.shiftKey ? 48 : 16), true);
6554
6555
  else if (r2 === 0 && col && e.ctrlKey && e.shiftKey && (k === "ArrowLeft" || k === "ArrowRight") && reorderable) {
6555
6556
  if (moveCol(col.key, k === "ArrowLeft" ? -1 : 1)) pending.current = { r: 0, key: col.key, c };
6556
6557
  } else if (r2 === 0 && col && (e.altKey && k === "ArrowDown" || k === "ContextMenu" || e.shiftKey && k === "F10") && controls)
@@ -8368,9 +8369,9 @@ var AppShell = React48.forwardRef(function AppShell2(props, ref) {
8368
8369
  const root = rootRef.current, bar = barRef.current;
8369
8370
  if (!root || !bar) return;
8370
8371
  function sync() {
8371
- const h11 = bar.getBoundingClientRect().height;
8372
- root.style.setProperty("--aura-shell-bar-height", awayRef.current || !pinned(bar) ? "0px" : h11 + "px");
8373
- if (h11 > 0) barH[1](Math.round(h11));
8372
+ const h12 = bar.getBoundingClientRect().height;
8373
+ root.style.setProperty("--aura-shell-bar-height", awayRef.current || !pinned(bar) ? "0px" : h12 + "px");
8374
+ if (h12 > 0) barH[1](Math.round(h12));
8374
8375
  }
8375
8376
  sync();
8376
8377
  const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(sync);
@@ -8537,13 +8538,176 @@ var Separator = React50.forwardRef(function Separator2(props, ref) {
8537
8538
  });
8538
8539
 
8539
8540
  // src/Table.tsx
8541
+ var React52 = __toESM(require("react"), 1);
8542
+
8543
+ // src/TableSkeleton.tsx
8540
8544
  var React51 = __toESM(require("react"), 1);
8541
- var StackLabels = React51.createContext(null);
8542
- var ColumnIndex = React51.createContext(-1);
8545
+ var h10 = React51.createElement;
8546
+ function inertProps() {
8547
+ return { inert: parseInt(React51.version, 10) >= 19 ? true : "", "aria-hidden": true };
8548
+ }
8549
+ function widthOf(w) {
8550
+ return w == null || w === "" ? void 0 : typeof w === "number" ? w + "px" : w;
8551
+ }
8552
+ function skeletonColgroup(cols) {
8553
+ return h10(
8554
+ "colgroup",
8555
+ null,
8556
+ cols.map(function(c, i) {
8557
+ const w = widthOf(c.width);
8558
+ return h10("col", { key: i, style: w ? { width: w } : void 0 });
8559
+ })
8560
+ );
8561
+ }
8562
+ function placeholder(c) {
8563
+ const s = c.skeleton || {};
8564
+ if (s.kind === "pill") return h10("span", { className: "aura-skel aura-skel--pill" });
8565
+ if (s.kind === "action") return h10("span", { className: cx("aura-skel aura-skel--action", s.touch && "is-touch") });
8566
+ if (s.lines === 2)
8567
+ return h10(
8568
+ "span",
8569
+ { className: "aura-skel-lines" },
8570
+ h10("span", { className: "aura-skel aura-skel--text", style: { width: "100%" } }),
8571
+ h10("span", { className: "aura-skel aura-skel--text", style: { width: "60%" } })
8572
+ );
8573
+ return h10("span", { className: "aura-skel aura-skel--text", style: { width: "80%" } });
8574
+ }
8575
+ function cellCls(base, c) {
8576
+ const align = c.align || (c.numeric ? "end" : void 0);
8577
+ return cx(base, align === "end" && "is-end", align === "center" && "is-center", c.numeric && "is-numeric");
8578
+ }
8579
+ function skeletonBody(cols, n3, stacked) {
8580
+ const rows = [];
8581
+ for (let r2 = 0; r2 < n3; r2++)
8582
+ rows.push(
8583
+ h10(
8584
+ "tr",
8585
+ { key: r2, className: "aura-tbl__row aura-tbl__row--skeleton", role: stacked ? "row" : void 0 },
8586
+ cols.map(function(c, i) {
8587
+ const slot = stacked && (c.card === "title" || c.card === "action") ? c.card : void 0;
8588
+ return h10(
8589
+ "td",
8590
+ {
8591
+ key: i,
8592
+ className: cellCls("aura-tbl__td", c),
8593
+ role: stacked ? "cell" : void 0,
8594
+ "data-label": stacked && !slot && c.label ? c.label : void 0,
8595
+ "data-card": slot
8596
+ },
8597
+ placeholder(c)
8598
+ );
8599
+ })
8600
+ )
8601
+ );
8602
+ return h10(
8603
+ "tbody",
8604
+ { key: "aura-skeleton", className: "aura-tbl__body", role: stacked ? "rowgroup" : void 0 },
8605
+ rows
8606
+ );
8607
+ }
8608
+ function tableWrapClass(p) {
8609
+ return cx(
8610
+ "aura-tbl-wrap",
8611
+ p.stackBelow && "is-stackable",
8612
+ p.bordered === false && "is-flush",
8613
+ p.bleed && "aura-bleed-frame",
8614
+ p.bleed && !p.cards && "aura-bleed",
8615
+ p.bleed && p.bleedEnd && !p.cards && "aura-bleed-end"
8616
+ );
8617
+ }
8618
+ function tableClass(p) {
8619
+ return cx(
8620
+ "aura-tbl",
8621
+ p.stackBelow && "aura-tbl--stack-" + p.stackBelow,
8622
+ (p.align === "middle" || p.rowHeight === "density" && p.align !== "top") && "aura-tbl--middle",
8623
+ p.rowHeight === "density" && "aura-tbl--row-density",
8624
+ p.cards && "aura-tbl--cards",
8625
+ p.className
8626
+ );
8627
+ }
8628
+ function cardsFrame(el, p) {
8629
+ return p.cards ? h10(
8630
+ "div",
8631
+ {
8632
+ className: cx(
8633
+ "aura-tbl-cards aura-tbl-cards--" + p.stackBelow,
8634
+ p.bleed && "aura-bleed",
8635
+ p.bleed && p.bleedEnd && "aura-bleed-end"
8636
+ )
8637
+ },
8638
+ el
8639
+ ) : el;
8640
+ }
8641
+ function TableSkeleton(props) {
8642
+ const cols = props.columns || [];
8643
+ const n3 = props.rows != null ? Math.max(0, props.rows) : 5;
8644
+ const stacked = !!props.stackBelow;
8645
+ const cards = stacked && props.stackStyle === "cards";
8646
+ const head = h10(
8647
+ "thead",
8648
+ { className: "aura-tbl__head", role: stacked ? "rowgroup" : void 0 },
8649
+ h10(
8650
+ "tr",
8651
+ { className: "aura-tbl__row", role: stacked ? "row" : void 0 },
8652
+ cols.map(function(c, i) {
8653
+ return h10(
8654
+ "th",
8655
+ { key: i, scope: "col", className: cellCls("aura-tbl__th", c), role: stacked ? "columnheader" : void 0 },
8656
+ c.label
8657
+ );
8658
+ })
8659
+ )
8660
+ );
8661
+ const table = h10(
8662
+ "div",
8663
+ Object.assign(
8664
+ {
8665
+ className: tableWrapClass({
8666
+ stackBelow: props.stackBelow,
8667
+ bordered: props.bordered,
8668
+ bleed: props.bleed,
8669
+ bleedEnd: props.bleedEnd,
8670
+ cards
8671
+ }),
8672
+ "data-density": props.density || "comfortable"
8673
+ },
8674
+ inertProps()
8675
+ ),
8676
+ h10(
8677
+ "table",
8678
+ {
8679
+ className: cx(
8680
+ tableClass({
8681
+ stackBelow: props.stackBelow,
8682
+ align: props.align,
8683
+ rowHeight: props.rowHeight,
8684
+ cards,
8685
+ className: props.className
8686
+ }),
8687
+ "aura-tbl--skeleton"
8688
+ ),
8689
+ role: stacked ? "table" : void 0
8690
+ },
8691
+ skeletonColgroup(cols),
8692
+ head,
8693
+ skeletonBody(cols, n3, stacked)
8694
+ )
8695
+ );
8696
+ return cardsFrame(table, {
8697
+ stackBelow: props.stackBelow,
8698
+ bleed: props.bleed,
8699
+ bleedEnd: props.bleedEnd,
8700
+ cards
8701
+ });
8702
+ }
8703
+
8704
+ // src/Table.tsx
8705
+ var StackLabels = React52.createContext(null);
8706
+ var ColumnIndex = React52.createContext(-1);
8543
8707
  function flat2(children) {
8544
8708
  const out = [];
8545
- React51.Children.toArray(children).forEach(function(c) {
8546
- if (React51.isValidElement(c) && c.type === React51.Fragment)
8709
+ React52.Children.toArray(children).forEach(function(c) {
8710
+ if (React52.isValidElement(c) && c.type === React52.Fragment)
8547
8711
  out.push.apply(out, flat2(c.props.children));
8548
8712
  else out.push(c);
8549
8713
  });
@@ -8557,7 +8721,7 @@ function text(node) {
8557
8721
  });
8558
8722
  return parts.length ? parts.join("") : void 0;
8559
8723
  }
8560
- if (React51.isValidElement(node)) {
8724
+ if (React52.isValidElement(node)) {
8561
8725
  const p = node.props;
8562
8726
  if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
8563
8727
  return text(p.children);
@@ -8567,13 +8731,13 @@ function text(node) {
8567
8731
  function headerLabels(children) {
8568
8732
  let out = [];
8569
8733
  flat2(children).forEach(function(c) {
8570
- if (out.length || !React51.isValidElement(c) || c.type !== THead) return;
8734
+ if (out.length || !React52.isValidElement(c) || c.type !== THead) return;
8571
8735
  const row = flat2(c.props.children).find(function(r2) {
8572
- return React51.isValidElement(r2);
8736
+ return React52.isValidElement(r2);
8573
8737
  });
8574
8738
  if (!row) return;
8575
8739
  flat2(row.props.children).forEach(function(cell) {
8576
- if (!React51.isValidElement(cell)) return;
8740
+ if (!React52.isValidElement(cell)) return;
8577
8741
  const p = cell.props;
8578
8742
  const t = text(p.children);
8579
8743
  const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
@@ -8583,7 +8747,34 @@ function headerLabels(children) {
8583
8747
  });
8584
8748
  return out;
8585
8749
  }
8586
- var Table = React51.forwardRef(function Table2(props, ref) {
8750
+ function headerColumns(children) {
8751
+ const out = [];
8752
+ flat2(children).forEach(function(c) {
8753
+ if (out.length || !React52.isValidElement(c) || c.type !== THead) return;
8754
+ const row = flat2(c.props.children).find(function(r2) {
8755
+ return React52.isValidElement(r2);
8756
+ });
8757
+ if (!row) return;
8758
+ flat2(row.props.children).forEach(function(cell) {
8759
+ if (!React52.isValidElement(cell)) return;
8760
+ const p = cell.props;
8761
+ const t = text(p.children);
8762
+ const style = p.style;
8763
+ const span = Math.max(1, Number(p.colSpan) || 1);
8764
+ for (let i = 0; i < span; i++)
8765
+ out.push({
8766
+ label: p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0,
8767
+ width: span > 1 ? void 0 : p.skeletonWidth != null ? p.skeletonWidth : p.width != null ? p.width : style && style.width,
8768
+ align: p.align,
8769
+ numeric: p.numeric,
8770
+ card: p.card,
8771
+ skeleton: p.skeleton
8772
+ });
8773
+ });
8774
+ });
8775
+ return out;
8776
+ }
8777
+ var Table = React52.forwardRef(function Table2(props, ref) {
8587
8778
  const {
8588
8779
  caption,
8589
8780
  captionHidden,
@@ -8597,10 +8788,24 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8597
8788
  maxHeight,
8598
8789
  stackStyle,
8599
8790
  rowHeight,
8791
+ loading,
8792
+ loadingRows,
8600
8793
  className,
8601
8794
  children,
8602
8795
  ...rest
8603
8796
  } = props;
8797
+ const skeletonCols = loading ? headerColumns(children) : null;
8798
+ if (skeletonCols && !skeletonCols.length)
8799
+ devWarnOnce(
8800
+ "tbl-loading-cols",
8801
+ "Table loading: no THead > Tr > Th found among its children, so there are no columns to draw. Put the THead directly inside Table (a function call, not your own component)."
8802
+ );
8803
+ const shownChildren = skeletonCols ? [
8804
+ flat2(children).filter(function(c) {
8805
+ return React52.isValidElement(c) && c.type === THead;
8806
+ }),
8807
+ skeletonBody(skeletonCols, loadingRows != null ? Math.max(0, loadingRows) : 5, !!stackBelow)
8808
+ ] : children;
8604
8809
  const cards = !!stackBelow && stackStyle === "cards";
8605
8810
  if (maxHeight != null && caption == null && !rest["aria-label"] && !rest["aria-labelledby"])
8606
8811
  devWarnOnce(
@@ -8613,12 +8818,12 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8613
8818
  "tbl-stack-labels",
8614
8819
  "Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
8615
8820
  );
8616
- const outer = React51.useContext(StackLabels);
8821
+ const outer = React52.useContext(StackLabels);
8617
8822
  const pageDensity = useDensity();
8618
8823
  const capId = uid();
8619
- const wrap = React51.useRef(null);
8620
- const sc = React51.useState(false), scrolls = sc[0];
8621
- const wide = React51.useState(false);
8824
+ const wrap = React52.useRef(null);
8825
+ const sc = React52.useState(false), scrolls = sc[0];
8826
+ const wide = React52.useState(false);
8622
8827
  useIsoLayoutEffect(function() {
8623
8828
  const el = wrap.current;
8624
8829
  if (!el || typeof ResizeObserver === "undefined") return;
@@ -8635,7 +8840,7 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8635
8840
  ro.disconnect();
8636
8841
  };
8637
8842
  }, []);
8638
- const table = /* @__PURE__ */ React51.createElement(
8843
+ const table = /* @__PURE__ */ React52.createElement(
8639
8844
  "div",
8640
8845
  {
8641
8846
  ref: wrap,
@@ -8654,12 +8859,13 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8654
8859
  ),
8655
8860
  style: maxHeight != null ? { maxHeight: typeof maxHeight === "number" ? maxHeight + "px" : maxHeight } : void 0,
8656
8861
  "data-density": density || pageDensity,
8657
- tabIndex: scrolls ? 0 : void 0,
8658
- role: scrolls && (caption != null || rest["aria-label"] || rest["aria-labelledby"]) ? "region" : void 0,
8659
- "aria-labelledby": scrolls ? caption != null ? capId : rest["aria-labelledby"] : void 0,
8660
- "aria-label": scrolls && caption == null ? rest["aria-label"] : void 0
8862
+ ...loading ? inertProps() : null,
8863
+ tabIndex: scrolls && !loading ? 0 : void 0,
8864
+ role: scrolls && !loading && (caption != null || rest["aria-label"] || rest["aria-labelledby"]) ? "region" : void 0,
8865
+ "aria-labelledby": scrolls && !loading ? caption != null ? capId : rest["aria-labelledby"] : void 0,
8866
+ "aria-label": scrolls && !loading && caption == null ? rest["aria-label"] : void 0
8661
8867
  },
8662
- /* @__PURE__ */ React51.createElement(
8868
+ /* @__PURE__ */ React52.createElement(
8663
8869
  "table",
8664
8870
  {
8665
8871
  ref,
@@ -8670,16 +8876,18 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8670
8876
  (align === "middle" || rowHeight === "density" && align !== "top") && "aura-tbl--middle",
8671
8877
  rowHeight === "density" && "aura-tbl--row-density",
8672
8878
  cards && "aura-tbl--cards",
8879
+ loading && "aura-tbl--skeleton",
8673
8880
  className
8674
8881
  ),
8675
8882
  role: stackBelow ? "table" : void 0,
8676
8883
  ...rest
8677
8884
  },
8678
- caption != null ? /* @__PURE__ */ React51.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
8679
- labels ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React51.createElement(StackLabels.Provider, { value: null }, children) : children
8885
+ caption != null ? /* @__PURE__ */ React52.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
8886
+ skeletonCols ? skeletonColgroup(skeletonCols) : null,
8887
+ labels ? /* @__PURE__ */ React52.createElement(StackLabels.Provider, { value: labels }, shownChildren) : outer ? /* @__PURE__ */ React52.createElement(StackLabels.Provider, { value: null }, shownChildren) : shownChildren
8680
8888
  )
8681
8889
  );
8682
- return cards ? /* @__PURE__ */ React51.createElement(
8890
+ return cards ? /* @__PURE__ */ React52.createElement(
8683
8891
  "div",
8684
8892
  {
8685
8893
  className: cx(
@@ -8692,10 +8900,10 @@ var Table = React51.forwardRef(function Table2(props, ref) {
8692
8900
  ) : table;
8693
8901
  });
8694
8902
  function section(tag, cls) {
8695
- const C = React51.forwardRef(function TableSection(props, ref) {
8903
+ const C = React52.forwardRef(function TableSection(props, ref) {
8696
8904
  const { className, ...rest } = props;
8697
- const stacked = React51.useContext(StackLabels) != null;
8698
- return React51.createElement(
8905
+ const stacked = React52.useContext(StackLabels) != null;
8906
+ return React52.createElement(
8699
8907
  tag,
8700
8908
  Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
8701
8909
  );
@@ -8708,14 +8916,14 @@ var TBody = section("tbody", "aura-tbl__body");
8708
8916
  TBody.displayName = "TBody";
8709
8917
  var TFoot = section("tfoot", "aura-tbl__foot");
8710
8918
  TFoot.displayName = "TFoot";
8711
- var Tr = React51.forwardRef(function Tr2(props, ref) {
8919
+ var Tr = React52.forwardRef(function Tr2(props, ref) {
8712
8920
  const { className, children, ...rest } = props;
8713
- const stacked = React51.useContext(StackLabels) != null;
8921
+ const stacked = React52.useContext(StackLabels) != null;
8714
8922
  let col = 0;
8715
- return /* @__PURE__ */ React51.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
8923
+ return /* @__PURE__ */ React52.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat2(children).map(function(c) {
8716
8924
  const at = col;
8717
- if (React51.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
8718
- return /* @__PURE__ */ React51.createElement(ColumnIndex.Provider, { key: React51.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
8925
+ if (React52.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
8926
+ return /* @__PURE__ */ React52.createElement(ColumnIndex.Provider, { key: React52.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
8719
8927
  }) : children);
8720
8928
  });
8721
8929
  function cellClass(base, p) {
@@ -8729,10 +8937,10 @@ function cellClass(base, p) {
8729
8937
  p.className
8730
8938
  );
8731
8939
  }
8732
- var Th = React51.forwardRef(function Th2(props, ref) {
8733
- const { align, numeric, mono, className, scope, label, card, ...rest } = props;
8734
- const stacked = React51.useContext(StackLabels) != null;
8735
- return /* @__PURE__ */ React51.createElement(
8940
+ var Th = React52.forwardRef(function Th2(props, ref) {
8941
+ const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, ...rest } = props;
8942
+ const stacked = React52.useContext(StackLabels) != null;
8943
+ return /* @__PURE__ */ React52.createElement(
8736
8944
  "th",
8737
8945
  {
8738
8946
  ref,
@@ -8744,12 +8952,12 @@ var Th = React51.forwardRef(function Th2(props, ref) {
8744
8952
  }
8745
8953
  );
8746
8954
  });
8747
- var Td = React51.forwardRef(function Td2(props, ref) {
8748
- const { align, numeric, mono, className, scope, label, card, ...rest } = props;
8749
- const labels = React51.useContext(StackLabels), col = React51.useContext(ColumnIndex);
8955
+ var Td = React52.forwardRef(function Td2(props, ref) {
8956
+ const { align, numeric, mono, className, scope, label, card, skeleton, skeletonWidth, ...rest } = props;
8957
+ const labels = React52.useContext(StackLabels), col = React52.useContext(ColumnIndex);
8750
8958
  const slot = labels && (card === "title" || card === "action") ? card : void 0;
8751
8959
  const shown = labels && !slot ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
8752
- return /* @__PURE__ */ React51.createElement(
8960
+ return /* @__PURE__ */ React52.createElement(
8753
8961
  "td",
8754
8962
  {
8755
8963
  ref,
@@ -8763,8 +8971,8 @@ var Td = React51.forwardRef(function Td2(props, ref) {
8763
8971
  });
8764
8972
 
8765
8973
  // src/BottomNav.tsx
8766
- var React52 = __toESM(require("react"), 1);
8767
- var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8974
+ var React53 = __toESM(require("react"), 1);
8975
+ var BottomNav = React53.forwardRef(function BottomNav2(props, ref) {
8768
8976
  const t = useStrings();
8769
8977
  const Link = useLinkComponent(props.linkComponent);
8770
8978
  const st = useMaybeControlled(
@@ -8774,7 +8982,7 @@ var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8774
8982
  );
8775
8983
  const active = st[0];
8776
8984
  const hide2 = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
8777
- const own = React52.useRef(null);
8985
+ const own = React53.useRef(null);
8778
8986
  const hf = props.hideFrom === false ? null : props.hideFrom || "lg";
8779
8987
  const away = useHideOnScroll(
8780
8988
  !!props.hideOnScroll,
@@ -8782,7 +8990,7 @@ var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8782
8990
  hf ? "(max-width: " + (breakpoints[hf] - 0.02) + "px)" : "all",
8783
8991
  64
8784
8992
  );
8785
- const setRef = React52.useCallback(
8993
+ const setRef = React53.useCallback(
8786
8994
  function(el) {
8787
8995
  own.current = el;
8788
8996
  if (typeof ref === "function") ref(el);
@@ -8790,7 +8998,7 @@ var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8790
8998
  },
8791
8999
  [ref]
8792
9000
  );
8793
- return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React52.createElement(
9001
+ return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide2), "aria-hidden": "true" }), /* @__PURE__ */ React53.createElement(
8794
9002
  "nav",
8795
9003
  {
8796
9004
  ref: setRef,
@@ -8803,7 +9011,7 @@ var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8803
9011
  ),
8804
9012
  "aria-label": props.label || t.mainNav
8805
9013
  },
8806
- /* @__PURE__ */ React52.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
9014
+ /* @__PURE__ */ React53.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
8807
9015
  if (it.ariaLabel && typeof it.label === "string" && it.ariaLabel.toLowerCase().indexOf(it.label.toLowerCase()) < 0)
8808
9016
  devWarnOnce(
8809
9017
  "bottomnav-label-" + it.id,
@@ -8824,23 +9032,23 @@ var BottomNav = React52.forwardRef(function BottomNav2(props, ref) {
8824
9032
  }
8825
9033
  };
8826
9034
  const inner = [
8827
- /* @__PURE__ */ React52.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React52.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React52.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React52.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
8828
- it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
8829
- /* @__PURE__ */ React52.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
8830
- suffix && !it.ariaLabel ? /* @__PURE__ */ React52.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
9035
+ /* @__PURE__ */ React53.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React53.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React53.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React53.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
9036
+ it.ariaLabel ? /* @__PURE__ */ React53.createElement("span", { key: "n", className: "aura-sr-only" }, it.ariaLabel + suffix) : null,
9037
+ /* @__PURE__ */ React53.createElement("span", { key: "l", className: "aura-bottomnav__label", "aria-hidden": it.ariaLabel ? true : void 0 }, it.label),
9038
+ suffix && !it.ariaLabel ? /* @__PURE__ */ React53.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
8831
9039
  ];
8832
- return /* @__PURE__ */ React52.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React52.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React52.createElement("button", { type: "button", ...common }, inner));
9040
+ return /* @__PURE__ */ React53.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React53.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React53.createElement("button", { type: "button", ...common }, inner));
8833
9041
  }))
8834
9042
  ));
8835
9043
  });
8836
9044
 
8837
9045
  // src/Surface.tsx
8838
- var React53 = __toESM(require("react"), 1);
8839
- var h10 = React53.createElement;
8840
- var Surface = React53.forwardRef(function Surface2(props, ref) {
9046
+ var React54 = __toESM(require("react"), 1);
9047
+ var h11 = React54.createElement;
9048
+ var Surface = React54.forwardRef(function Surface2(props, ref) {
8841
9049
  const t = props.texture || "mesh";
8842
9050
  const rest = omit(props, ["texture", "className", "children", "as"]);
8843
- return h10(
9051
+ return h11(
8844
9052
  props.as || "div",
8845
9053
  Object.assign({}, rest, {
8846
9054
  ref,
@@ -8858,14 +9066,14 @@ var Surface = React53.forwardRef(function Surface2(props, ref) {
8858
9066
  });
8859
9067
 
8860
9068
  // src/Stat.tsx
8861
- var React54 = __toESM(require("react"), 1);
8862
- var Stat = React54.forwardRef(function Stat2(props, ref) {
9069
+ var React55 = __toESM(require("react"), 1);
9070
+ var Stat = React55.forwardRef(function Stat2(props, ref) {
8863
9071
  const Link = useLinkComponent(props.linkComponent);
8864
9072
  return statElement(props, ref, Link);
8865
9073
  });
8866
9074
 
8867
9075
  // src/TimePicker.tsx
8868
- var React55 = __toESM(require("react"), 1);
9076
+ var React56 = __toESM(require("react"), 1);
8869
9077
  var import_react_dom12 = require("react-dom");
8870
9078
 
8871
9079
  // src/text.ts
@@ -8907,7 +9115,7 @@ function toMin(t) {
8907
9115
  function fromMin(n3) {
8908
9116
  return pad3(Math.floor(n3 / 60)) + ":" + pad3(n3 % 60);
8909
9117
  }
8910
- var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9118
+ var TimePicker = React56.forwardRef(function TimePicker2(props, ref) {
8911
9119
  const t = useStrings();
8912
9120
  const auto = uid(), id = props.id || auto, listId = id + "-list";
8913
9121
  const st = useMaybeControlled(
@@ -8917,7 +9125,7 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
8917
9125
  );
8918
9126
  const value = st[0];
8919
9127
  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;
8920
- const slots = React55.useMemo(
9128
+ const slots = React56.useMemo(
8921
9129
  function() {
8922
9130
  const out = [];
8923
9131
  for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
@@ -8929,12 +9137,12 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
8929
9137
  const n3 = toMin(v);
8930
9138
  return n3 == null || n3 < lo || n3 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
8931
9139
  }
8932
- const openState = React55.useState(false), open = openState[0], setOpen = openState[1];
8933
- const editState = React55.useState(null), editing = editState[0], setEditing = editState[1];
8934
- const aState = React55.useState(0), active = aState[0], setActive = aState[1];
8935
- const errState = React55.useState(null);
8936
- const pos = React55.useState(null);
8937
- const boxRef = React55.useRef(null), inputRef = React55.useRef(null), listRef = React55.useRef(null), inputMerged = useMergedRef(ref, inputRef);
9140
+ const openState = React56.useState(false), open = openState[0], setOpen = openState[1];
9141
+ const editState = React56.useState(null), editing = editState[0], setEditing = editState[1];
9142
+ const aState = React56.useState(0), active = aState[0], setActive = aState[1];
9143
+ const errState = React56.useState(null);
9144
+ const pos = React56.useState(null);
9145
+ const boxRef = React56.useRef(null), inputRef = React56.useRef(null), listRef = React56.useRef(null), inputMerged = useMergedRef(ref, inputRef);
8938
9146
  const mounted = useMounted();
8939
9147
  function nearest(v) {
8940
9148
  const n3 = toMin(v);
@@ -8962,7 +9170,7 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
8962
9170
  },
8963
9171
  [open]
8964
9172
  );
8965
- React55.useEffect(
9173
+ React56.useEffect(
8966
9174
  function() {
8967
9175
  if (!open) return;
8968
9176
  function outside(e) {
@@ -8984,7 +9192,7 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
8984
9192
  },
8985
9193
  [open]
8986
9194
  );
8987
- React55.useEffect(
9195
+ React56.useEffect(
8988
9196
  function() {
8989
9197
  if (!open || !listRef.current) return;
8990
9198
  const el = listRef.current.querySelector('[data-idx="' + active + '"]');
@@ -9083,9 +9291,9 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9083
9291
  }
9084
9292
  const error = errState[0] || props.error;
9085
9293
  const list = open && mounted && pos[0] ? (0, import_react_dom12.createPortal)(
9086
- /* @__PURE__ */ React55.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React55.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
9294
+ /* @__PURE__ */ React56.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React56.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
9087
9295
  const dis = blocked(s), sel = s === value;
9088
- return /* @__PURE__ */ React55.createElement(
9296
+ return /* @__PURE__ */ React56.createElement(
9089
9297
  "li",
9090
9298
  {
9091
9299
  key: s,
@@ -9110,13 +9318,13 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9110
9318
  if (active !== i) setActive(i);
9111
9319
  }
9112
9320
  },
9113
- /* @__PURE__ */ React55.createElement("span", { className: "aura-combo__label" }, s),
9114
- sel ? /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconCheck, null), className: "aura-combo__check" }) : null
9321
+ /* @__PURE__ */ React56.createElement("span", { className: "aura-combo__label" }, s),
9322
+ sel ? /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCheck, null), className: "aura-combo__check" }) : null
9115
9323
  );
9116
9324
  }))),
9117
9325
  document.body
9118
9326
  ) : null;
9119
- return /* @__PURE__ */ React55.createElement(
9327
+ return /* @__PURE__ */ React56.createElement(
9120
9328
  Field,
9121
9329
  {
9122
9330
  id,
@@ -9128,7 +9336,7 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9128
9336
  disabled: props.disabled,
9129
9337
  className: cx(touchClass(props.touchHeight), props.className)
9130
9338
  },
9131
- /* @__PURE__ */ React55.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React55.createElement(
9339
+ /* @__PURE__ */ React56.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconClock, null), className: "aura-input__icon" }), /* @__PURE__ */ React56.createElement(
9132
9340
  "input",
9133
9341
  {
9134
9342
  ref: inputMerged,
@@ -9168,7 +9376,7 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9168
9376
  }, 0);
9169
9377
  }
9170
9378
  }
9171
- ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React55.createElement(
9379
+ ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React56.createElement(
9172
9380
  "button",
9173
9381
  {
9174
9382
  type: "button",
@@ -9181,8 +9389,8 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9181
9389
  if (inputRef.current) inputRef.current.focus();
9182
9390
  }
9183
9391
  },
9184
- /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconX, null) })
9185
- ) : null, /* @__PURE__ */ React55.createElement(
9392
+ /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconX, null) })
9393
+ ) : null, /* @__PURE__ */ React56.createElement(
9186
9394
  "button",
9187
9395
  {
9188
9396
  type: "button",
@@ -9200,14 +9408,14 @@ var TimePicker = React55.forwardRef(function TimePicker2(props, ref) {
9200
9408
  }
9201
9409
  }
9202
9410
  },
9203
- /* @__PURE__ */ React55.createElement(Icon, { name: /* @__PURE__ */ React55.createElement(IconChevronDown, null) })
9411
+ /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconChevronDown, null) })
9204
9412
  )),
9205
9413
  list
9206
9414
  );
9207
9415
  });
9208
9416
 
9209
9417
  // src/FileUpload.tsx
9210
- var React56 = __toESM(require("react"), 1);
9418
+ var React57 = __toESM(require("react"), 1);
9211
9419
  function matches(file, accept) {
9212
9420
  if (!accept) return true;
9213
9421
  const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
@@ -9231,24 +9439,24 @@ function describeAccept(accept, t) {
9231
9439
  }).join(", ");
9232
9440
  }
9233
9441
  var seq = 0;
9234
- var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9442
+ var FileUpload = React57.forwardRef(function FileUpload2(props, ref) {
9235
9443
  const t = useStrings();
9236
9444
  const auto = uid(), id = props.id || auto;
9237
9445
  const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
9238
9446
  const items2 = st[0] || [];
9239
- const dragState = React56.useState(false), over = dragState[0];
9240
- const inputRef = React56.useRef(null), inputMerged = useMergedRef(ref, inputRef);
9241
- const urls = React56.useRef({});
9447
+ const dragState = React57.useState(false), over = dragState[0];
9448
+ const inputRef = React57.useRef(null), inputMerged = useMergedRef(ref, inputRef);
9449
+ const urls = React57.useRef({});
9242
9450
  const maxFiles = props.multiple ? props.maxFiles : 1;
9243
9451
  const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
9244
- React56.useEffect(function() {
9452
+ React57.useEffect(function() {
9245
9453
  return function() {
9246
9454
  Object.keys(urls.current).forEach(function(k) {
9247
9455
  URL.revokeObjectURL(urls.current[k]);
9248
9456
  });
9249
9457
  };
9250
9458
  }, []);
9251
- React56.useEffect(
9459
+ React57.useEffect(
9252
9460
  function() {
9253
9461
  const el = inputRef.current;
9254
9462
  if (!el || !props.name || typeof DataTransfer === "undefined") return;
@@ -9308,7 +9516,7 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9308
9516
  if (inputRef.current) inputRef.current.focus();
9309
9517
  }
9310
9518
  const error = props.error;
9311
- return /* @__PURE__ */ React56.createElement(
9519
+ return /* @__PURE__ */ React57.createElement(
9312
9520
  Field,
9313
9521
  {
9314
9522
  id,
@@ -9320,7 +9528,7 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9320
9528
  disabled: props.disabled,
9321
9529
  className: props.className
9322
9530
  },
9323
- /* @__PURE__ */ React56.createElement(
9531
+ /* @__PURE__ */ React57.createElement(
9324
9532
  "div",
9325
9533
  {
9326
9534
  className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
@@ -9341,9 +9549,9 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9341
9549
  add(e.dataTransfer && e.dataTransfer.files);
9342
9550
  }
9343
9551
  },
9344
- /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
9345
- /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
9346
- /* @__PURE__ */ React56.createElement(
9552
+ /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconCloudUpload, null), size: "lg", className: "aura-upload__icon" }),
9553
+ /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
9554
+ /* @__PURE__ */ React57.createElement(
9347
9555
  "input",
9348
9556
  {
9349
9557
  ref: inputMerged,
@@ -9365,12 +9573,12 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9365
9573
  }
9366
9574
  }
9367
9575
  ),
9368
- /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
9369
- note ? /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
9576
+ /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
9577
+ note ? /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
9370
9578
  ),
9371
- items2.length ? /* @__PURE__ */ React56.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
9579
+ items2.length ? /* @__PURE__ */ React57.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
9372
9580
  const src = thumb(it);
9373
- return /* @__PURE__ */ React56.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React56.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React56.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React56.createElement(IconImage, null) : /* @__PURE__ */ React56.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React56.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React56.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(Icon, { name: /* @__PURE__ */ React56.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React56.createElement(
9581
+ return /* @__PURE__ */ React57.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React57.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React57.createElement(Icon, { name: /^image\//.test(it.type || "") ? /* @__PURE__ */ React57.createElement(IconImage, null) : /* @__PURE__ */ React57.createElement(IconFile, null), size: "md" })), /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React57.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React57.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconCircleAlert, null), size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(Icon, { name: /* @__PURE__ */ React57.createElement(IconCircleCheck, null), size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React57.createElement(
9374
9582
  "span",
9375
9583
  {
9376
9584
  className: "aura-upload__bar",
@@ -9380,11 +9588,11 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9380
9588
  "aria-valuemax": 100,
9381
9589
  "aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
9382
9590
  },
9383
- /* @__PURE__ */ React56.createElement("span", { style: { width: (it.progress || 0) + "%" } })
9384
- ) : null), /* @__PURE__ */ React56.createElement(
9591
+ /* @__PURE__ */ React57.createElement("span", { style: { width: (it.progress || 0) + "%" } })
9592
+ ) : null), /* @__PURE__ */ React57.createElement(
9385
9593
  IconButton,
9386
9594
  {
9387
- icon: /* @__PURE__ */ React56.createElement(IconX, null),
9595
+ icon: /* @__PURE__ */ React57.createElement(IconX, null),
9388
9596
  label: t.remove(it.name),
9389
9597
  onClick: function() {
9390
9598
  remove(it);
@@ -9397,14 +9605,14 @@ var FileUpload = React56.forwardRef(function FileUpload2(props, ref) {
9397
9605
 
9398
9606
  // src/theme.ts
9399
9607
  function hexToRgb(hex) {
9400
- let h11 = String(hex).trim().replace("#", "");
9401
- if (h11.length === 3)
9402
- h11 = h11.split("").map(function(c) {
9608
+ let h12 = String(hex).trim().replace("#", "");
9609
+ if (h12.length === 3)
9610
+ h12 = h12.split("").map(function(c) {
9403
9611
  return c + c;
9404
9612
  }).join("");
9405
- if (!/^[0-9a-f]{6}$/i.test(h11)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
9613
+ if (!/^[0-9a-f]{6}$/i.test(h12)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
9406
9614
  return [0, 2, 4].map(function(i) {
9407
- return parseInt(h11.slice(i, i + 2), 16) / 255;
9615
+ return parseInt(h12.slice(i, i + 2), 16) / 255;
9408
9616
  });
9409
9617
  }
9410
9618
  function rgbToHex(rgb) {
@@ -9700,9 +9908,9 @@ function createTheme(opts) {
9700
9908
  }
9701
9909
 
9702
9910
  // src/ThemeStyle.tsx
9703
- var React57 = __toESM(require("react"), 1);
9911
+ var React58 = __toESM(require("react"), 1);
9704
9912
  function ThemeStyle(props) {
9705
- const css = React57.useMemo(
9913
+ const css = React58.useMemo(
9706
9914
  function() {
9707
9915
  try {
9708
9916
  return createTheme({
@@ -9719,11 +9927,11 @@ function ThemeStyle(props) {
9719
9927
  [props.brand, props.signal, props.primary, props.name, props.selector]
9720
9928
  );
9721
9929
  if (css === null) return null;
9722
- return /* @__PURE__ */ React57.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
9930
+ return /* @__PURE__ */ React58.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
9723
9931
  }
9724
9932
 
9725
9933
  // src/colorScheme.tsx
9726
- var React58 = __toESM(require("react"), 1);
9934
+ var React59 = __toESM(require("react"), 1);
9727
9935
 
9728
9936
  // src/colorSchemeScript.ts
9729
9937
  var DEFAULT_KEY = "aura-color-scheme";
@@ -9740,7 +9948,7 @@ function colorSchemeScript(options) {
9740
9948
 
9741
9949
  // src/colorScheme.tsx
9742
9950
  function ColorSchemeScript(props) {
9743
- return /* @__PURE__ */ React58.createElement(
9951
+ return /* @__PURE__ */ React59.createElement(
9744
9952
  "script",
9745
9953
  {
9746
9954
  "data-aura-color-scheme": "",
@@ -9765,7 +9973,7 @@ function apply(scheme) {
9765
9973
  function useColorScheme(options) {
9766
9974
  const key = options && options.storageKey || DEFAULT_KEY;
9767
9975
  const fallback = options && options.defaultScheme || "system";
9768
- const subscribe2 = React58.useCallback(
9976
+ const subscribe2 = React59.useCallback(
9769
9977
  function(cb) {
9770
9978
  const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
9771
9979
  function onSystem() {
@@ -9787,7 +9995,7 @@ function useColorScheme(options) {
9787
9995
  },
9788
9996
  [fallback, key]
9789
9997
  );
9790
- const snapshot = React58.useSyncExternalStore(
9998
+ const snapshot = React59.useSyncExternalStore(
9791
9999
  subscribe2,
9792
10000
  function() {
9793
10001
  const s = readScheme(fallback);
@@ -9798,7 +10006,7 @@ function useColorScheme(options) {
9798
10006
  }
9799
10007
  );
9800
10008
  const parts = snapshot.split("|");
9801
- const setScheme = React58.useCallback(
10009
+ const setScheme = React59.useCallback(
9802
10010
  function(next) {
9803
10011
  if (!valid(next)) return;
9804
10012
  try {
@@ -9817,14 +10025,14 @@ function ColorSchemeToggle(props) {
9817
10025
  const cs = useColorScheme(props);
9818
10026
  const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
9819
10027
  const label = props.label || t.colorScheme;
9820
- return /* @__PURE__ */ React58.createElement(
10028
+ return /* @__PURE__ */ React59.createElement(
9821
10029
  DropdownMenu,
9822
10030
  {
9823
10031
  label,
9824
- trigger: /* @__PURE__ */ React58.createElement(
10032
+ trigger: /* @__PURE__ */ React59.createElement(
9825
10033
  IconButton,
9826
10034
  {
9827
- icon: cs.resolved === "dark" ? /* @__PURE__ */ React58.createElement(IconMoon, null) : /* @__PURE__ */ React58.createElement(IconSun, null),
10035
+ icon: cs.resolved === "dark" ? /* @__PURE__ */ React59.createElement(IconMoon, null) : /* @__PURE__ */ React59.createElement(IconSun, null),
9828
10036
  label: label + ": " + names[cs.scheme]
9829
10037
  }
9830
10038
  ),
@@ -9842,14 +10050,14 @@ function ColorSchemeToggle(props) {
9842
10050
  }
9843
10051
 
9844
10052
  // src/Badge.tsx
9845
- var React59 = __toESM(require("react"), 1);
9846
- var Badge = React59.forwardRef(function Badge2(props, ref) {
10053
+ var React60 = __toESM(require("react"), 1);
10054
+ var Badge = React60.forwardRef(function Badge2(props, ref) {
9847
10055
  return badgeElement(props, ref);
9848
10056
  });
9849
10057
 
9850
10058
  // src/Progress.tsx
9851
- var React60 = __toESM(require("react"), 1);
9852
- var Progress = React60.forwardRef(function Progress2(props, ref) {
10059
+ var React61 = __toESM(require("react"), 1);
10060
+ var Progress = React61.forwardRef(function Progress2(props, ref) {
9853
10061
  const t = useStrings();
9854
10062
  const auto = uid(), id = props.id || auto;
9855
10063
  const max = props.max || 100, det = props.value != null;
@@ -9858,7 +10066,7 @@ var Progress = React60.forwardRef(function Progress2(props, ref) {
9858
10066
  const spct = sec ? Math.max(0, Math.min(100 - pct, sec / max * 100)) : 0;
9859
10067
  const valueText = props.valueText != null ? props.valueText : props.valueLabel != null ? String(props.valueLabel) : sec ? t.progressReserved(props.value, sec, max) : void 0;
9860
10068
  const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
9861
- return /* @__PURE__ */ React60.createElement(
10069
+ return /* @__PURE__ */ React61.createElement(
9862
10070
  "div",
9863
10071
  {
9864
10072
  ref,
@@ -9869,8 +10077,8 @@ var Progress = React60.forwardRef(function Progress2(props, ref) {
9869
10077
  props.className
9870
10078
  )
9871
10079
  },
9872
- props.label || props.showValue && shown ? /* @__PURE__ */ React60.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React60.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React60.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React60.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
9873
- /* @__PURE__ */ React60.createElement(
10080
+ props.label || props.showValue && shown ? /* @__PURE__ */ React61.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React61.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React61.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React61.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
10081
+ /* @__PURE__ */ React61.createElement(
9874
10082
  "div",
9875
10083
  {
9876
10084
  className: cx("aura-progress__track", !det && "is-indeterminate"),
@@ -9882,8 +10090,8 @@ var Progress = React60.forwardRef(function Progress2(props, ref) {
9882
10090
  "aria-valuenow": det ? props.value : void 0,
9883
10091
  "aria-valuetext": det ? valueText : void 0
9884
10092
  },
9885
- /* @__PURE__ */ React60.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
9886
- sec ? /* @__PURE__ */ React60.createElement(
10093
+ /* @__PURE__ */ React61.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 }),
10094
+ sec ? /* @__PURE__ */ React61.createElement(
9887
10095
  "span",
9888
10096
  {
9889
10097
  className: "aura-progress__bar aura-progress__bar--reserved",
@@ -9891,19 +10099,19 @@ var Progress = React60.forwardRef(function Progress2(props, ref) {
9891
10099
  }
9892
10100
  ) : null
9893
10101
  ),
9894
- props.hint ? /* @__PURE__ */ React60.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
10102
+ props.hint ? /* @__PURE__ */ React61.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
9895
10103
  );
9896
10104
  });
9897
10105
 
9898
10106
  // src/Skeleton.tsx
9899
- var React61 = __toESM(require("react"), 1);
9900
- var Skeleton = React61.forwardRef(function Skeleton2(props, ref) {
10107
+ var React62 = __toESM(require("react"), 1);
10108
+ var Skeleton = React62.forwardRef(function Skeleton2(props, ref) {
9901
10109
  const v = props.variant || "text";
9902
10110
  if (v === "text" && (props.lines || 1) > 1) {
9903
10111
  const n3 = props.lines, rows = [];
9904
10112
  for (let i = 0; i < n3; i++)
9905
- rows.push(/* @__PURE__ */ React61.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
9906
- return /* @__PURE__ */ React61.createElement(
10113
+ rows.push(/* @__PURE__ */ React62.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n3 - 1 ? "60%" : "100%" } }));
10114
+ return /* @__PURE__ */ React62.createElement(
9907
10115
  "span",
9908
10116
  {
9909
10117
  ref,
@@ -9921,17 +10129,17 @@ var Skeleton = React61.forwardRef(function Skeleton2(props, ref) {
9921
10129
  if (v === "circle") {
9922
10130
  style.width = style.height = props.size || props.width || 40;
9923
10131
  }
9924
- return /* @__PURE__ */ React61.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
10132
+ return /* @__PURE__ */ React62.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
9925
10133
  });
9926
10134
 
9927
10135
  // src/EmptyState.tsx
9928
- var React62 = __toESM(require("react"), 1);
9929
- var EmptyState = React62.forwardRef(function EmptyState2(props, ref) {
10136
+ var React63 = __toESM(require("react"), 1);
10137
+ var EmptyState = React63.forwardRef(function EmptyState2(props, ref) {
9930
10138
  return emptyStateElement(props, ref);
9931
10139
  });
9932
10140
 
9933
10141
  // src/Pagination.tsx
9934
- var React63 = __toESM(require("react"), 1);
10142
+ var React64 = __toESM(require("react"), 1);
9935
10143
  function pageList(page, count, sib) {
9936
10144
  let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
9937
10145
  if (page - sib <= 3) {
@@ -9951,7 +10159,7 @@ function pageList(page, count, sib) {
9951
10159
  if (count > 1) out.push(count);
9952
10160
  return out;
9953
10161
  }
9954
- var Pagination = React63.forwardRef(function Pagination2(props, ref) {
10162
+ var Pagination = React64.forwardRef(function Pagination2(props, ref) {
9955
10163
  const t = useStrings();
9956
10164
  useAutoTip();
9957
10165
  const count = Math.max(1, props.pageCount || 1);
@@ -9971,7 +10179,7 @@ var Pagination = React63.forwardRef(function Pagination2(props, ref) {
9971
10179
  },
9972
10180
  extra
9973
10181
  );
9974
- return link ? /* @__PURE__ */ React63.createElement(
10182
+ return link ? /* @__PURE__ */ React64.createElement(
9975
10183
  Link,
9976
10184
  {
9977
10185
  href: link(p),
@@ -9984,7 +10192,7 @@ var Pagination = React63.forwardRef(function Pagination2(props, ref) {
9984
10192
  ...common
9985
10193
  },
9986
10194
  label
9987
- ) : /* @__PURE__ */ React63.createElement(
10195
+ ) : /* @__PURE__ */ React64.createElement(
9988
10196
  "button",
9989
10197
  {
9990
10198
  type: "button",
@@ -9998,7 +10206,7 @@ var Pagination = React63.forwardRef(function Pagination2(props, ref) {
9998
10206
  }
9999
10207
  function arrow(p, icon, label, rel, disabled) {
10000
10208
  if (!link || disabled)
10001
- return /* @__PURE__ */ React63.createElement(
10209
+ return /* @__PURE__ */ React64.createElement(
10002
10210
  IconButton,
10003
10211
  {
10004
10212
  icon,
@@ -10009,7 +10217,7 @@ var Pagination = React63.forwardRef(function Pagination2(props, ref) {
10009
10217
  }
10010
10218
  }
10011
10219
  );
10012
- return /* @__PURE__ */ React63.createElement(
10220
+ return /* @__PURE__ */ React64.createElement(
10013
10221
  Link,
10014
10222
  {
10015
10223
  href: link(p),
@@ -10024,17 +10232,17 @@ var Pagination = React63.forwardRef(function Pagination2(props, ref) {
10024
10232
  }
10025
10233
  }
10026
10234
  },
10027
- /* @__PURE__ */ React63.createElement(Icon, { name: icon, size: "sm" })
10235
+ /* @__PURE__ */ React64.createElement(Icon, { name: icon, size: "sm" })
10028
10236
  );
10029
10237
  }
10030
- return /* @__PURE__ */ React63.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React63.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React63.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
10031
- return typeof p === "number" ? /* @__PURE__ */ React63.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React63.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
10032
- })), /* @__PURE__ */ React63.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React63.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
10238
+ return /* @__PURE__ */ React64.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React64.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React64.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
10239
+ return typeof p === "number" ? /* @__PURE__ */ React64.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React64.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
10240
+ })), /* @__PURE__ */ React64.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React64.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
10033
10241
  });
10034
10242
 
10035
10243
  // src/Accordion.tsx
10036
- var React64 = __toESM(require("react"), 1);
10037
- var Accordion = React64.forwardRef(function Accordion2(props, ref) {
10244
+ var React65 = __toESM(require("react"), 1);
10245
+ var Accordion = React65.forwardRef(function Accordion2(props, ref) {
10038
10246
  const auto = uid(), base = props.id || auto;
10039
10247
  const multiple = props.type === "multiple";
10040
10248
  const st = useMaybeControlled(
@@ -10072,9 +10280,9 @@ var Accordion = React64.forwardRef(function Accordion2(props, ref) {
10072
10280
  n3.focus();
10073
10281
  }
10074
10282
  }
10075
- return /* @__PURE__ */ React64.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
10283
+ return /* @__PURE__ */ React65.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
10076
10284
  const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
10077
- return /* @__PURE__ */ React64.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React64.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React64.createElement(
10285
+ return /* @__PURE__ */ React65.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React65.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React65.createElement(
10078
10286
  "button",
10079
10287
  {
10080
10288
  type: "button",
@@ -10087,10 +10295,10 @@ var Accordion = React64.forwardRef(function Accordion2(props, ref) {
10087
10295
  toggle(it.id);
10088
10296
  }
10089
10297
  },
10090
- it.icon ? /* @__PURE__ */ React64.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
10091
- /* @__PURE__ */ React64.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React64.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React64.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
10092
- /* @__PURE__ */ React64.createElement(Icon, { name: /* @__PURE__ */ React64.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
10093
- )), /* @__PURE__ */ React64.createElement(
10298
+ it.icon ? /* @__PURE__ */ React65.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
10299
+ /* @__PURE__ */ React65.createElement("span", { className: "aura-accordion__title" }, /* @__PURE__ */ React65.createElement("span", { id: it.description ? bid + "-title" : void 0 }, it.title), it.description ? /* @__PURE__ */ React65.createElement("span", { className: "aura-accordion__desc", id: bid + "-desc", "aria-hidden": true }, it.description) : null),
10300
+ /* @__PURE__ */ React65.createElement(Icon, { name: /* @__PURE__ */ React65.createElement(IconChevronDown, null), className: "aura-accordion__chevron" })
10301
+ )), /* @__PURE__ */ React65.createElement(
10094
10302
  "div",
10095
10303
  {
10096
10304
  id: pid,
@@ -10105,7 +10313,7 @@ var Accordion = React64.forwardRef(function Accordion2(props, ref) {
10105
10313
  });
10106
10314
 
10107
10315
  // src/Popover.tsx
10108
- var React65 = __toESM(require("react"), 1);
10316
+ var React66 = __toESM(require("react"), 1);
10109
10317
  var import_react_dom13 = require("react-dom");
10110
10318
  function position(anchor, pop, placement) {
10111
10319
  const r2 = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
@@ -10118,20 +10326,20 @@ function position(anchor, pop, placement) {
10118
10326
  side = above > below2 ? "top" : "bottom";
10119
10327
  maxHeight = Math.max(120, side === "top" ? above : below2);
10120
10328
  }
10121
- const h11 = maxHeight ? Math.min(ph, maxHeight) : ph;
10122
- const top = side === "top" ? r2.top - gap - h11 : r2.bottom + gap;
10329
+ const h12 = maxHeight ? Math.min(ph, maxHeight) : ph;
10330
+ const top = side === "top" ? r2.top - gap - h12 : r2.bottom + gap;
10123
10331
  const left = align === "end" ? r2.right - pw : align === "center" ? r2.left + r2.width / 2 - pw / 2 : r2.left;
10124
10332
  return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
10125
10333
  }
10126
- var Popover = React65.forwardRef(function Popover2(props, ref) {
10334
+ var Popover = React66.forwardRef(function Popover2(props, ref) {
10127
10335
  const t = useStrings();
10128
10336
  const density = useDensity();
10129
10337
  const auto = uid(), id = props.id || auto;
10130
10338
  const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
10131
10339
  const open = !!st[0];
10132
- const wrap = React65.useRef(null), pop = React65.useRef(null), popMerged = useMergedRef(ref, pop);
10133
- const pos = React65.useState(null), mounted = useMounted();
10134
- const inTree = React65.useRef(false);
10340
+ const wrap = React66.useRef(null), pop = React66.useRef(null), popMerged = useMergedRef(ref, pop);
10341
+ const pos = React66.useState(null), mounted = useMounted();
10342
+ const inTree = React66.useRef(false);
10135
10343
  function trigger() {
10136
10344
  return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
10137
10345
  }
@@ -10158,7 +10366,7 @@ var Popover = React65.forwardRef(function Popover2(props, ref) {
10158
10366
  },
10159
10367
  [open, mounted, props.placement]
10160
10368
  );
10161
- React65.useEffect(
10369
+ React66.useEffect(
10162
10370
  function() {
10163
10371
  if (!open || !mounted) return;
10164
10372
  if (props.autoFocus !== false && pop.current) {
@@ -10183,9 +10391,9 @@ var Popover = React65.forwardRef(function Popover2(props, ref) {
10183
10391
  },
10184
10392
  [open, mounted]
10185
10393
  );
10186
- const child = React65.Children.only(props.trigger);
10394
+ const child = React66.Children.only(props.trigger);
10187
10395
  const panel = open && mounted ? (0, import_react_dom13.createPortal)(
10188
- /* @__PURE__ */ React65.createElement(
10396
+ /* @__PURE__ */ React66.createElement(
10189
10397
  "div",
10190
10398
  {
10191
10399
  ref: popMerged,
@@ -10215,17 +10423,17 @@ var Popover = React65.forwardRef(function Popover2(props, ref) {
10215
10423
  } else trapTab(e, pop.current);
10216
10424
  }
10217
10425
  },
10218
- props.title ? /* @__PURE__ */ React65.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React65.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React65.createElement(
10426
+ props.title ? /* @__PURE__ */ React66.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React66.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React66.createElement(
10219
10427
  IconButton,
10220
10428
  {
10221
- icon: /* @__PURE__ */ React65.createElement(IconX, null),
10429
+ icon: /* @__PURE__ */ React66.createElement(IconX, null),
10222
10430
  label: t.close,
10223
10431
  onClick: function() {
10224
10432
  close(true);
10225
10433
  }
10226
10434
  }
10227
10435
  )) : null,
10228
- /* @__PURE__ */ React65.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
10436
+ /* @__PURE__ */ React66.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
10229
10437
  close: function() {
10230
10438
  close(true);
10231
10439
  }
@@ -10233,7 +10441,7 @@ var Popover = React65.forwardRef(function Popover2(props, ref) {
10233
10441
  ),
10234
10442
  document.body
10235
10443
  ) : null;
10236
- return /* @__PURE__ */ React65.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React65.cloneElement(child, {
10444
+ return /* @__PURE__ */ React66.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React66.cloneElement(child, {
10237
10445
  onClick: function(e) {
10238
10446
  if (child.props.onClick) child.props.onClick(e);
10239
10447
  st[1](!open);
@@ -10245,7 +10453,7 @@ var Popover = React65.forwardRef(function Popover2(props, ref) {
10245
10453
  });
10246
10454
 
10247
10455
  // src/NumberField.tsx
10248
- var React66 = __toESM(require("react"), 1);
10456
+ var React67 = __toESM(require("react"), 1);
10249
10457
  function decimalsOf(n3) {
10250
10458
  const s = String(n3);
10251
10459
  const i = s.indexOf(".");
@@ -10258,7 +10466,7 @@ function parse(text2) {
10258
10466
  if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
10259
10467
  return Number(s);
10260
10468
  }
10261
- var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10469
+ var NumberField = React67.forwardRef(function NumberField2(props, ref) {
10262
10470
  const t = useStrings();
10263
10471
  const auto = uid(), id = props.id || auto;
10264
10472
  const step = props.step || 1;
@@ -10269,7 +10477,7 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10269
10477
  props.onChange
10270
10478
  );
10271
10479
  const value = st[0], setValue = st[1];
10272
- const draftState = React66.useState(null), draft = draftState[0], setDraft = draftState[1];
10480
+ const draftState = React67.useState(null), draft = draftState[0], setDraft = draftState[1];
10273
10481
  function fmt2(n3) {
10274
10482
  if (n3 == null || isNaN(n3)) return "";
10275
10483
  return n3.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
@@ -10318,7 +10526,7 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10318
10526
  };
10319
10527
  const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
10320
10528
  const stepper = props.stepper !== false && !props.readOnly;
10321
- return /* @__PURE__ */ React66.createElement(
10529
+ return /* @__PURE__ */ React67.createElement(
10322
10530
  Field,
10323
10531
  {
10324
10532
  id,
@@ -10330,7 +10538,7 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10330
10538
  disabled: props.disabled,
10331
10539
  className: cx(touchClass(props.touchHeight), props.className)
10332
10540
  },
10333
- /* @__PURE__ */ React66.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React66.createElement(
10541
+ /* @__PURE__ */ React67.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React67.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React67.createElement(
10334
10542
  "input",
10335
10543
  {
10336
10544
  ref,
@@ -10377,7 +10585,7 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10377
10585
  },
10378
10586
  onKeyDown
10379
10587
  }
10380
- ), props.suffix != null ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React66.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React66.createElement(
10588
+ ), props.suffix != null ? /* @__PURE__ */ React67.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React67.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React67.createElement(
10381
10589
  "button",
10382
10590
  {
10383
10591
  type: "button",
@@ -10393,8 +10601,8 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10393
10601
  nudge(-step);
10394
10602
  }
10395
10603
  },
10396
- /* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconMinus, null) })
10397
- ), /* @__PURE__ */ React66.createElement(
10604
+ /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconMinus, null) })
10605
+ ), /* @__PURE__ */ React67.createElement(
10398
10606
  "button",
10399
10607
  {
10400
10608
  type: "button",
@@ -10410,14 +10618,14 @@ var NumberField = React66.forwardRef(function NumberField2(props, ref) {
10410
10618
  nudge(step);
10411
10619
  }
10412
10620
  },
10413
- /* @__PURE__ */ React66.createElement(Icon, { name: /* @__PURE__ */ React66.createElement(IconPlus, null) })
10621
+ /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconPlus, null) })
10414
10622
  )) : null)
10415
10623
  );
10416
10624
  });
10417
10625
 
10418
10626
  // src/Stepper.tsx
10419
- var React67 = __toESM(require("react"), 1);
10420
- var Stepper = React67.forwardRef(function Stepper2(props, ref) {
10627
+ var React68 = __toESM(require("react"), 1);
10628
+ var Stepper = React68.forwardRef(function Stepper2(props, ref) {
10421
10629
  const t = useStrings();
10422
10630
  const idBase = uid();
10423
10631
  const steps = props.steps || [];
@@ -10428,22 +10636,22 @@ var Stepper = React67.forwardRef(function Stepper2(props, ref) {
10428
10636
  if (at < 0) at = 0;
10429
10637
  const vertical = props.orientation === "vertical";
10430
10638
  const cur2 = steps[at];
10431
- return /* @__PURE__ */ React67.createElement(
10639
+ return /* @__PURE__ */ React68.createElement(
10432
10640
  "nav",
10433
10641
  {
10434
10642
  ref,
10435
10643
  "aria-label": props.label,
10436
10644
  className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
10437
10645
  },
10438
- /* @__PURE__ */ React67.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
10646
+ /* @__PURE__ */ React68.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
10439
10647
  const state = i < at ? "done" : i === at ? "current" : "upcoming";
10440
10648
  const error = s.status === "error";
10441
- const marker = /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React67.createElement(Icon, { name: /* @__PURE__ */ React67.createElement(IconCheck, null) }) : i + 1);
10649
+ const marker = /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React68.createElement(Icon, { name: /* @__PURE__ */ React68.createElement(IconCheck, null) }) : i + 1);
10442
10650
  const note = error ? t.stepError : state === "done" ? t.stepDone : "";
10443
10651
  const clickable = state === "done" && !!props.onStepClick;
10444
10652
  const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
10445
10653
  const descId = idBase + "-step-" + i;
10446
- const text2 = /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React67.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React67.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React67.createElement(
10654
+ const text2 = /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__text" }, named ? /* @__PURE__ */ React68.createElement("span", { className: "aura-sr-only" }, String(s.label) + (note ? ", " + note : "")) : null, /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__label", "aria-hidden": named ? true : void 0 }, s.label, note && !named ? /* @__PURE__ */ React68.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React68.createElement(
10447
10655
  "span",
10448
10656
  {
10449
10657
  className: "aura-stepper__desc",
@@ -10452,14 +10660,14 @@ var Stepper = React67.forwardRef(function Stepper2(props, ref) {
10452
10660
  },
10453
10661
  s.description
10454
10662
  ) : null);
10455
- return /* @__PURE__ */ React67.createElement(
10663
+ return /* @__PURE__ */ React68.createElement(
10456
10664
  "li",
10457
10665
  {
10458
10666
  key: s.id,
10459
10667
  className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
10460
10668
  "aria-current": state === "current" ? "step" : void 0
10461
10669
  },
10462
- clickable ? /* @__PURE__ */ React67.createElement(
10670
+ clickable ? /* @__PURE__ */ React68.createElement(
10463
10671
  "button",
10464
10672
  {
10465
10673
  type: "button",
@@ -10471,19 +10679,19 @@ var Stepper = React67.forwardRef(function Stepper2(props, ref) {
10471
10679
  },
10472
10680
  marker,
10473
10681
  text2
10474
- ) : /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__step" }, marker, text2)
10682
+ ) : /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__step" }, marker, text2)
10475
10683
  );
10476
10684
  })),
10477
- !vertical && cur2 ? /* @__PURE__ */ React67.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React67.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
10685
+ !vertical && cur2 ? /* @__PURE__ */ React68.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur2.status === "error" ? /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React68.createElement("span", { className: "aura-stepper__compact-label" }, cur2.label)) : null
10478
10686
  );
10479
10687
  });
10480
10688
 
10481
10689
  // src/SegmentedControl.tsx
10482
- var React68 = __toESM(require("react"), 1);
10690
+ var React69 = __toESM(require("react"), 1);
10483
10691
  function toOpt2(o) {
10484
10692
  return typeof o === "object" ? o : { value: o, label: o };
10485
10693
  }
10486
- var SegmentedControl = React68.forwardRef(
10694
+ var SegmentedControl = React69.forwardRef(
10487
10695
  function SegmentedControl2(props, ref) {
10488
10696
  const options = (props.options || []).map(toOpt2);
10489
10697
  useAutoTip();
@@ -10497,7 +10705,7 @@ var SegmentedControl = React68.forwardRef(
10497
10705
  );
10498
10706
  const value = st[0], setValue = st[1];
10499
10707
  const auto = uid(), id = props.id || auto;
10500
- const refs = React68.useRef([]);
10708
+ const refs = React69.useRef([]);
10501
10709
  const selIdx = options.findIndex(function(o) {
10502
10710
  return o.value === value;
10503
10711
  });
@@ -10530,7 +10738,7 @@ var SegmentedControl = React68.forwardRef(
10530
10738
  move(options.length, -1);
10531
10739
  }
10532
10740
  }
10533
- return /* @__PURE__ */ React68.createElement(
10741
+ return /* @__PURE__ */ React69.createElement(
10534
10742
  "div",
10535
10743
  {
10536
10744
  ref,
@@ -10550,7 +10758,7 @@ var SegmentedControl = React68.forwardRef(
10550
10758
  options.map(function(o, i) {
10551
10759
  const on = o.value === value;
10552
10760
  const off = props.disabled || o.disabled;
10553
- return /* @__PURE__ */ React68.createElement(
10761
+ return /* @__PURE__ */ React69.createElement(
10554
10762
  "button",
10555
10763
  {
10556
10764
  key: o.value,
@@ -10572,8 +10780,8 @@ var SegmentedControl = React68.forwardRef(
10572
10780
  onKeyDown(e, i);
10573
10781
  }
10574
10782
  },
10575
- o.icon ? /* @__PURE__ */ React68.createElement(Icon, { name: o.icon }) : null,
10576
- o.iconOnly ? null : /* @__PURE__ */ React68.createElement("span", null, o.label)
10783
+ o.icon ? /* @__PURE__ */ React69.createElement(Icon, { name: o.icon }) : null,
10784
+ o.iconOnly ? null : /* @__PURE__ */ React69.createElement("span", null, o.label)
10577
10785
  );
10578
10786
  })
10579
10787
  );