@jirawatpyk/aura-react 4.17.0 → 4.19.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.
@@ -32,11 +32,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
34
  Accordion: () => Accordion,
35
+ ActionBar: () => ActionBar,
35
36
  Alert: () => Alert,
36
37
  AppShell: () => AppShell,
37
38
  AuraProvider: () => AuraProvider,
38
39
  Avatar: () => Avatar,
39
40
  Badge: () => Badge,
41
+ BottomNav: () => BottomNav,
40
42
  Breadcrumb: () => Breadcrumb,
41
43
  Button: () => Button,
42
44
  Calendar: () => Calendar,
@@ -101,6 +103,7 @@ __export(index_exports, {
101
103
  parseTime: () => parseTime,
102
104
  statusTone: () => toneFor,
103
105
  toast: () => toast,
106
+ todayIn: () => todayIn,
104
107
  useAuraLocale: () => useAuraLocale,
105
108
  useBreakpoint: () => useBreakpoint,
106
109
  useColorScheme: () => useColorScheme,
@@ -328,6 +331,7 @@ var STRINGS = {
328
331
  },
329
332
  prevPage: "Previous page",
330
333
  nextPage: "Next page",
334
+ totals: "Totals",
331
335
  rowCount: function(c) {
332
336
  return n(c) + " rows";
333
337
  },
@@ -441,6 +445,7 @@ var STRINGS = {
441
445
  },
442
446
  prevPage: "\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
443
447
  nextPage: "\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",
448
+ totals: "\u0E23\u0E27\u0E21",
444
449
  rowCount: function(c) {
445
450
  return n(c) + " \u0E41\u0E16\u0E27";
446
451
  },
@@ -554,6 +559,7 @@ var STRINGS = {
554
559
  },
555
560
  prevPage: "F\xF6reg\xE5ende sida",
556
561
  nextPage: "N\xE4sta sida",
562
+ totals: "Summa",
557
563
  rowCount: function(c) {
558
564
  return nsv(c) + " rader";
559
565
  },
@@ -604,6 +610,7 @@ var LocaleContext = React3.createContext(null);
604
610
  function AuraProvider(props) {
605
611
  const outer = React3.useContext(LocaleContext);
606
612
  const density = props.density || outer && outer.density || null;
613
+ const timeZone = props.timeZone || outer && outer.timeZone || null;
607
614
  const value = React3.useMemo(
608
615
  function() {
609
616
  const base = props.locale && STRINGS[props.locale] || STRINGS.en;
@@ -612,10 +619,11 @@ function AuraProvider(props) {
612
619
  calendar: props.calendar || null,
613
620
  strings: props.strings ? Object.assign({}, base, props.strings) : base,
614
621
  linkComponent: props.linkComponent || null,
615
- density
622
+ density,
623
+ timeZone
616
624
  };
617
625
  },
618
- [props.locale, props.calendar, props.strings, props.linkComponent, density]
626
+ [props.locale, props.calendar, props.strings, props.linkComponent, density, timeZone]
619
627
  );
620
628
  return /* @__PURE__ */ React3.createElement(LocaleContext.Provider, { value }, props.density ? /* @__PURE__ */ React3.createElement("div", { className: "aura-density", "data-density": props.density }, props.children) : props.children);
621
629
  }
@@ -749,6 +757,7 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
749
757
  const pos = posState[0], setPos = posState[1];
750
758
  const items2 = props.items || [];
751
759
  const mounted = useMounted();
760
+ const Link = useLinkComponent(props.linkComponent);
752
761
  useIsoLayoutEffect(
753
762
  function() {
754
763
  const a = props.anchor, m = own.current;
@@ -809,6 +818,63 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
809
818
  }
810
819
  e.stopPropagation();
811
820
  }
821
+ function groupItems(list) {
822
+ const out = [];
823
+ list.forEach(function(it, i) {
824
+ const g = it.type === "radio" && it.group ? it.group : null;
825
+ const last = out[out.length - 1];
826
+ if (last && last.group === g && g !== null) last.items.push({ it, i });
827
+ else out.push({ group: g, items: [{ it, i }] });
828
+ });
829
+ return out;
830
+ }
831
+ function renderItem(it, i) {
832
+ if (it.separator) return /* @__PURE__ */ React6.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
833
+ const isRadio = it.type === "radio";
834
+ const isCheck = !isRadio && it.checked !== void 0;
835
+ const lead = isRadio ? /* @__PURE__ */ React6.createElement("span", { className: cx("aura-menu__radio", it.checked && "is-on") }) : isCheck ? /* @__PURE__ */ React6.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React6.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React6.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React6.createElement("span", { className: "aura-menu__blank" });
836
+ const body = [
837
+ /* @__PURE__ */ React6.createElement(React6.Fragment, { key: "l" }, lead),
838
+ /* @__PURE__ */ React6.createElement("span", { key: "t", className: "aura-menu__label" }, it.label),
839
+ it.hint ? /* @__PURE__ */ React6.createElement("span", { key: "h", className: "aura-menu__hint" }, it.hint) : null
840
+ ];
841
+ const cls = cx("aura-menu__item", it.tone === "danger" && "aura-menu__item--danger");
842
+ if (it.href && !it.disabled)
843
+ return /* @__PURE__ */ React6.createElement(
844
+ Link,
845
+ {
846
+ key: i,
847
+ href: it.href,
848
+ target: it.target,
849
+ rel: it.target === "_blank" ? "noreferrer" : void 0,
850
+ tabIndex: -1,
851
+ role: "menuitem",
852
+ className: cls,
853
+ onClick: function() {
854
+ if (it.onSelect) it.onSelect();
855
+ props.onClose(false);
856
+ }
857
+ },
858
+ body
859
+ );
860
+ return /* @__PURE__ */ React6.createElement(
861
+ "button",
862
+ {
863
+ key: i,
864
+ type: "button",
865
+ tabIndex: -1,
866
+ disabled: it.disabled,
867
+ role: isRadio ? "menuitemradio" : isCheck ? "menuitemcheckbox" : "menuitem",
868
+ "aria-checked": isRadio || isCheck ? !!it.checked : void 0,
869
+ className: cls,
870
+ onClick: function() {
871
+ if (it.onSelect) it.onSelect();
872
+ if (!it.keepOpen) props.onClose(true);
873
+ }
874
+ },
875
+ body
876
+ );
877
+ }
812
878
  const el = /* @__PURE__ */ React6.createElement(
813
879
  "div",
814
880
  {
@@ -819,28 +885,11 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
819
885
  onKeyDown,
820
886
  style: { top: pos ? pos.top : -9999, left: pos ? pos.left : -9999 }
821
887
  },
822
- items2.map(function(it, i) {
823
- if (it.separator) return /* @__PURE__ */ React6.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
824
- const isCheck = it.checked !== void 0;
825
- return /* @__PURE__ */ React6.createElement(
826
- "button",
827
- {
828
- key: i,
829
- type: "button",
830
- tabIndex: -1,
831
- disabled: it.disabled,
832
- role: isCheck ? "menuitemcheckbox" : "menuitem",
833
- "aria-checked": isCheck ? !!it.checked : void 0,
834
- className: "aura-menu__item",
835
- onClick: function() {
836
- it.onSelect();
837
- if (!it.keepOpen) props.onClose(true);
838
- }
839
- },
840
- isCheck ? /* @__PURE__ */ React6.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React6.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React6.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React6.createElement("span", { className: "aura-menu__blank" }),
841
- /* @__PURE__ */ React6.createElement("span", { className: "aura-menu__label" }, it.label),
842
- it.hint ? /* @__PURE__ */ React6.createElement("span", { className: "aura-menu__hint" }, it.hint) : null
843
- );
888
+ groupItems(items2).map(function(block, bi) {
889
+ const rendered = block.items.map(function(x) {
890
+ return renderItem(x.it, x.i);
891
+ });
892
+ return block.group ? /* @__PURE__ */ React6.createElement("div", { key: "g" + bi, role: "group", "aria-label": block.group, className: "aura-menu__group" }, rendered) : /* @__PURE__ */ React6.createElement(React6.Fragment, { key: "f" + bi }, rendered);
844
893
  })
845
894
  );
846
895
  return mounted ? (0, import_react_dom.createPortal)(el, document.body) : null;
@@ -869,6 +918,7 @@ var DropdownMenu = React7.forwardRef(function DropdownMenu2(props, ref) {
869
918
  anchor,
870
919
  label: props.label,
871
920
  items: props.items,
921
+ linkComponent: props.linkComponent,
872
922
  onClose: function(restore) {
873
923
  setAnchor(null);
874
924
  if (restore && typeof anchor.focus === "function") anchor.focus();
@@ -1678,6 +1728,16 @@ function parseDate(text) {
1678
1728
  const dt = new Date(y, mo - 1, d);
1679
1729
  return dt.getMonth() === mo - 1 && dt.getDate() === d ? toISO(dt) : null;
1680
1730
  }
1731
+ function todayIn(timeZone) {
1732
+ const now = /* @__PURE__ */ new Date();
1733
+ if (!timeZone) return toISO(now);
1734
+ return new Intl.DateTimeFormat("en-CA", {
1735
+ timeZone,
1736
+ year: "numeric",
1737
+ month: "2-digit",
1738
+ day: "2-digit"
1739
+ }).format(now);
1740
+ }
1681
1741
 
1682
1742
  // src/DatePicker.tsx
1683
1743
  function useFormatDate() {
@@ -1699,9 +1759,9 @@ function useFormatDate() {
1699
1759
  var Calendar = React17.forwardRef(function Calendar2(props, ref) {
1700
1760
  const ctx = useAuraLocale(), locale = props.locale || ctx.locale || "en", calendar = props.calendar || ctx.calendar || defaultCalendar(locale), tag = localeTag(locale, calendar);
1701
1761
  const weekStart = props.weekStartsOn == null ? locale === "sv" ? 1 : 0 : props.weekStartsOn;
1702
- let today = /* @__PURE__ */ new Date();
1703
- today = new Date(today.getFullYear(), today.getMonth(), today.getDate());
1704
- const min = fromISO(props.min), max = fromISO(props.max);
1762
+ const todayISO = props.today || todayIn(props.timeZone || ctx.timeZone);
1763
+ const today = fromISO(todayISO);
1764
+ const min = fromISO(props.min === "today" ? todayISO : props.min), max = fromISO(props.max === "today" ? todayISO : props.max);
1705
1765
  const start = fromISO(props.start), end = fromISO(props.end);
1706
1766
  const focusState = React17.useState(fromISO(props.focus) || start || today);
1707
1767
  const focusDate = focusState[0], setFocus = focusState[1];
@@ -2087,6 +2147,8 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2087
2147
  weekStartsOn: props.weekStartsOn,
2088
2148
  min: props.min,
2089
2149
  max: props.max,
2150
+ timeZone: props.timeZone,
2151
+ today: props.today,
2090
2152
  isDateDisabled: props.isDateDisabled,
2091
2153
  start: st[0],
2092
2154
  focus: st[0],
@@ -2203,6 +2265,8 @@ var DateRangePicker = React17.forwardRef(
2203
2265
  weekStartsOn: props.weekStartsOn,
2204
2266
  min: props.min,
2205
2267
  max: props.max,
2268
+ timeZone: props.timeZone,
2269
+ today: props.today,
2206
2270
  isDateDisabled: props.isDateDisabled,
2207
2271
  start: draft[0] || v.start,
2208
2272
  end: draft[0] ? null : v.end,
@@ -2277,11 +2341,19 @@ var Alert = React18.forwardRef(function Alert2(props, ref) {
2277
2341
  // src/Toaster.tsx
2278
2342
  var React19 = __toESM(require("react"), 1);
2279
2343
  var import_react_dom4 = require("react-dom");
2344
+ var MAX_VISIBLE = 3;
2280
2345
  var toastState = {
2281
2346
  list: [],
2347
+ queue: [],
2282
2348
  subs: [],
2283
2349
  n: 0
2284
2350
  };
2351
+ function promote() {
2352
+ while (toastState.list.length < MAX_VISIBLE && toastState.queue.length) {
2353
+ toastState.list = toastState.list.concat([toastState.queue[0]]);
2354
+ toastState.queue = toastState.queue.slice(1);
2355
+ }
2356
+ }
2285
2357
  function emitToasts() {
2286
2358
  toastState.subs.forEach(function(f) {
2287
2359
  f(toastState.list.slice());
@@ -2289,18 +2361,24 @@ function emitToasts() {
2289
2361
  }
2290
2362
  function show(opts) {
2291
2363
  const id = opts.id || "t" + ++toastState.n;
2292
- const at = toastState.list.findIndex(function(t) {
2364
+ const byId = function(t) {
2293
2365
  return t.id === id;
2294
- });
2366
+ };
2367
+ const at = toastState.list.findIndex(byId), queued = toastState.queue.findIndex(byId);
2368
+ const prev = at >= 0 ? toastState.list[at] : queued >= 0 ? toastState.queue[queued] : null;
2295
2369
  const entry = Object.assign({ tone: "info" }, opts, {
2296
2370
  id,
2297
2371
  loading: !!opts.loading,
2298
- rev: at >= 0 ? toastState.list[at].rev + 1 : 0
2372
+ rev: prev ? prev.rev + 1 : 0
2299
2373
  });
2300
2374
  if (at >= 0) {
2301
2375
  toastState.list = toastState.list.slice();
2302
2376
  toastState.list[at] = entry;
2303
- } else toastState.list = toastState.list.concat([entry]).slice(-3);
2377
+ } else if (queued >= 0) {
2378
+ toastState.queue = toastState.queue.slice();
2379
+ toastState.queue[queued] = entry;
2380
+ } else if (toastState.list.length < MAX_VISIBLE) toastState.list = toastState.list.concat([entry]);
2381
+ else toastState.queue = toastState.queue.concat([entry]);
2304
2382
  emitToasts();
2305
2383
  return id;
2306
2384
  }
@@ -2322,9 +2400,12 @@ toast.loading = function(title, opts) {
2322
2400
  );
2323
2401
  };
2324
2402
  toast.dismiss = function(id) {
2325
- toastState.list = toastState.list.filter(function(t) {
2403
+ const keep = function(t) {
2326
2404
  return t.id !== id;
2327
- });
2405
+ };
2406
+ toastState.list = toastState.list.filter(keep);
2407
+ toastState.queue = toastState.queue.filter(keep);
2408
+ promote();
2328
2409
  emitToasts();
2329
2410
  };
2330
2411
  function ToastItem(props) {
@@ -2883,8 +2964,8 @@ function Command(props) {
2883
2964
  "data-autofocus": "",
2884
2965
  type: "text",
2885
2966
  role: "combobox",
2886
- "aria-expanded": true,
2887
- "aria-controls": listId,
2967
+ "aria-expanded": flat.length > 0,
2968
+ "aria-controls": flat.length ? listId : void 0,
2888
2969
  "aria-autocomplete": "list",
2889
2970
  "aria-activedescendant": active >= 0 ? optId(active) : void 0,
2890
2971
  "aria-label": props.label || t.commandMenu,
@@ -2900,17 +2981,15 @@ function Command(props) {
2900
2981
  onKeyDown: onKey
2901
2982
  }
2902
2983
  ), /* @__PURE__ */ React25.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
2903
- /* @__PURE__ */ React25.createElement(
2984
+ /* @__PURE__ */ React25.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React25.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React25.createElement(Icon, { name: "loader-circle", className: "aura-spin" }), t.searching) : null, !flat.length ? props.loading ? null : /* @__PURE__ */ React25.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React25.createElement(
2904
2985
  "div",
2905
2986
  {
2906
- className: "aura-command__list",
2907
2987
  id: listId,
2908
2988
  role: "listbox",
2909
2989
  "aria-label": props.label || t.commandMenu,
2910
2990
  "aria-busy": props.loading || void 0
2911
2991
  },
2912
- props.loading ? /* @__PURE__ */ React25.createElement("div", { className: "aura-command__loading", role: "presentation" }, /* @__PURE__ */ React25.createElement(Icon, { name: "loader-circle", className: "aura-spin" }), t.searching) : null,
2913
- !flat.length ? props.loading ? null : /* @__PURE__ */ React25.createElement("div", { className: "aura-command__empty", role: "presentation" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : groups.map(function(g, gi) {
2992
+ groups.map(function(g, gi) {
2914
2993
  const gid = id + "-g" + gi;
2915
2994
  return /* @__PURE__ */ React25.createElement(
2916
2995
  "div",
@@ -2932,7 +3011,11 @@ function Command(props) {
2932
3011
  role: "option",
2933
3012
  "aria-selected": n2 === active,
2934
3013
  "aria-disabled": it.disabled || void 0,
2935
- className: cx("aura-command__item", n2 === active && "is-active", it.disabled && "is-disabled"),
3014
+ className: cx(
3015
+ "aura-command__item",
3016
+ n2 === active && "is-active",
3017
+ it.disabled && "is-disabled"
3018
+ ),
2936
3019
  onPointerDown: function(e) {
2937
3020
  e.preventDefault();
2938
3021
  },
@@ -2950,8 +3033,8 @@ function Command(props) {
2950
3033
  })
2951
3034
  );
2952
3035
  })
2953
- ),
2954
- /* @__PURE__ */ React25.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : props.loading === false && query ? t.results(flat.length) : ""),
3036
+ )),
3037
+ /* @__PURE__ */ React25.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat.length ? t.noMatches : props.loading === false && query ? t.results(flat.length) : ""),
2955
3038
  /* @__PURE__ */ React25.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React25.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
2956
3039
  )
2957
3040
  ),
@@ -3112,6 +3195,7 @@ var Drawer = React27.forwardRef(function Drawer2(props, ref) {
3112
3195
 
3113
3196
  // src/DataTable.tsx
3114
3197
  var React28 = __toESM(require("react"), 1);
3198
+ var import_react_dom8 = require("react-dom");
3115
3199
  var BP = { sm: 640, md: 768, lg: 1024, xl: 1280 };
3116
3200
  var DEFAULT_COLUMNS = [
3117
3201
  { key: "id", label: "ID", width: 96, mono: true },
@@ -3223,6 +3307,29 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
3223
3307
  return px != null && boxWidth[0] < px;
3224
3308
  }
3225
3309
  const scrollRef = React28.useRef(null);
3310
+ const tipState = React28.useState(null), tip = tipState[0], setTip = tipState[1];
3311
+ function showFull(e) {
3312
+ const el = e.target.closest ? e.target.closest(".aura-table__td, .aura-table__card-fields dd") : null;
3313
+ if (!el || el.scrollWidth <= el.clientWidth + 1 || el.querySelector("button, input, .aura-pill"))
3314
+ return setTip(null);
3315
+ const r = el.getBoundingClientRect();
3316
+ setTip({ text: (el.textContent || "").trim(), left: r.left, top: r.top });
3317
+ }
3318
+ function hideFull() {
3319
+ setTip(null);
3320
+ }
3321
+ const tipEl = tip && typeof document !== "undefined" ? (0, import_react_dom8.createPortal)(
3322
+ /* @__PURE__ */ React28.createElement(
3323
+ "div",
3324
+ {
3325
+ className: "aura-tooltip aura-tooltip--above",
3326
+ "aria-hidden": "true",
3327
+ style: { left: tip.left, top: tip.top - 6 }
3328
+ },
3329
+ tip.text
3330
+ ),
3331
+ document.body
3332
+ ) : null;
3226
3333
  const rowH = React28.useState(ROW_H_DEFAULT);
3227
3334
  const ROW_H = rowH[0];
3228
3335
  useIsoLayoutEffect(function() {
@@ -4091,7 +4198,7 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4091
4198
  return /* @__PURE__ */ React28.createElement("span", { key: c.key, className: "aura-table__card-actions" }, cellVal(c, r));
4092
4199
  })),
4093
4200
  rest.length ? /* @__PURE__ */ React28.createElement("dl", { className: "aura-table__card-fields" }, rest.map(function(c) {
4094
- return /* @__PURE__ */ React28.createElement("div", { key: c.key }, /* @__PURE__ */ React28.createElement("dt", null, c.label), /* @__PURE__ */ React28.createElement("dd", { className: c.mono ? "aura-table__mono" : void 0 }, cellVal(c, r)));
4201
+ return /* @__PURE__ */ React28.createElement("div", { key: c.key }, /* @__PURE__ */ React28.createElement("dt", null, c.label), /* @__PURE__ */ React28.createElement("dd", { className: cx(c.mono && "aura-table__mono", c.align === "end" && "is-end") }, cellVal(c, r)));
4095
4202
  })) : null
4096
4203
  );
4097
4204
  }));
@@ -4102,6 +4209,10 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4102
4209
  ref: wrapRefArg,
4103
4210
  "data-density": props.density,
4104
4211
  className: cx("aura-table aura-table--stacked", refreshing && "is-refreshing", props.className),
4212
+ onMouseOver: showFull,
4213
+ onMouseLeave: hideFull,
4214
+ onFocus: showFull,
4215
+ onBlur: hideFull,
4105
4216
  role: "region",
4106
4217
  "aria-label": props.label,
4107
4218
  "aria-busy": busy || void 0
@@ -4117,10 +4228,55 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4117
4228
  }
4118
4229
  ), /* @__PURE__ */ React28.createElement("span", null, nSel ? t.selectedCount(nSel) : t.selectAll)) : null,
4119
4230
  cardBody,
4120
- foot
4231
+ props.footer && rows.length && !loading ? /* @__PURE__ */ React28.createElement("div", { className: "aura-table__card aura-table__card--total", role: "group", "aria-label": t.totals }, /* @__PURE__ */ React28.createElement("dl", { className: "aura-table__card-fields" }, vis.filter(function(c) {
4232
+ return props.footer[c.key] != null;
4233
+ }).map(function(c) {
4234
+ return /* @__PURE__ */ React28.createElement("div", { key: c.key }, /* @__PURE__ */ React28.createElement("dt", null, c.label || t.totals), /* @__PURE__ */ React28.createElement("dd", { className: cx(c.mono && "aura-table__mono", c.align === "end" && "is-end") }, props.footer[c.key]));
4235
+ }))) : null,
4236
+ foot,
4237
+ tipEl
4121
4238
  );
4122
4239
  }
4123
4240
  if (stacked) return renderStacked(wrapMerged);
4241
+ const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */ React28.createElement(
4242
+ "div",
4243
+ {
4244
+ role: "row",
4245
+ "aria-rowindex": shownTotal + 2,
4246
+ "aria-label": t.totals,
4247
+ className: cx("aura-table__row aura-table__total", props.stickyFooter && "is-sticky"),
4248
+ style: rowStyle
4249
+ },
4250
+ /* @__PURE__ */ React28.createElement("span", { className: "aura-table__gutter", "aria-hidden": true }),
4251
+ selectable ? /* @__PURE__ */ React28.createElement("span", { className: cx("aura-table__sel", nPinned && "is-pinned"), "aria-hidden": true }) : null,
4252
+ vis.map(function(c, j) {
4253
+ const pin = isPinned(c);
4254
+ return /* @__PURE__ */ React28.createElement(
4255
+ "span",
4256
+ {
4257
+ key: c.key,
4258
+ role: "gridcell",
4259
+ "aria-colindex": j + (selectable ? 2 : 1),
4260
+ className: cx(
4261
+ "aura-table__td",
4262
+ c.mono && "aura-table__mono",
4263
+ c.align === "end" && "is-end",
4264
+ pin && "is-pinned",
4265
+ pin && j === nPinned - 1 && "is-pin-edge"
4266
+ ),
4267
+ style: cellStyle(c, j)
4268
+ },
4269
+ props.footer[c.key]
4270
+ );
4271
+ }),
4272
+ /* @__PURE__ */ React28.createElement(
4273
+ "span",
4274
+ {
4275
+ className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker"),
4276
+ "aria-hidden": true
4277
+ }
4278
+ )
4279
+ ) : null;
4124
4280
  const scrollStyle = {
4125
4281
  scrollPaddingLeft: "calc(var(--aura-space-6)" + selW + " + " + acc + "px)",
4126
4282
  scrollPaddingTop: ROW_H + "px"
@@ -4142,11 +4298,15 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4142
4298
  gridRef.current = el;
4143
4299
  },
4144
4300
  className: "aura-table__scroll",
4301
+ onMouseOver: showFull,
4302
+ onMouseLeave: hideFull,
4303
+ onFocus: showFull,
4304
+ onBlur: hideFull,
4145
4305
  style: scrollStyle,
4146
4306
  role: "grid",
4147
4307
  "aria-label": props.label,
4148
4308
  "aria-busy": busy || void 0,
4149
- "aria-rowcount": loading ? -1 : shownTotal + 1,
4309
+ "aria-rowcount": loading ? -1 : shownTotal + 1 + (totalRow ? 1 : 0),
4150
4310
  "aria-colcount": nCols,
4151
4311
  "aria-multiselectable": selectable || void 0,
4152
4312
  onKeyDown: onGridKey,
@@ -4160,7 +4320,8 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4160
4320
  }
4161
4321
  },
4162
4322
  /* @__PURE__ */ React28.createElement("div", { className: "aura-table__head", role: "row", "aria-rowindex": 1, style: rowStyle }, head),
4163
- body
4323
+ body,
4324
+ totalRow
4164
4325
  ),
4165
4326
  busy ? /* @__PURE__ */ React28.createElement("span", { className: "aura-sr-only", role: "status" }, t.loadingRows) : null,
4166
4327
  controls ? /* @__PURE__ */ React28.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React28.createElement(
@@ -4183,7 +4344,8 @@ var DataTable = React28.forwardRef(function DataTable2(props, ref) {
4183
4344
  label: menu.kind === "picker" ? t.columns : t.column(byKey[menu.key] && byKey[menu.key].label),
4184
4345
  items: menu.kind === "picker" ? pickerItems() : byKey[menu.key] ? columnMenuItems(byKey[menu.key]) : []
4185
4346
  }
4186
- ) : null
4347
+ ) : null,
4348
+ tipEl
4187
4349
  );
4188
4350
  if (!dual) return gridEl;
4189
4351
  return /* @__PURE__ */ React28.createElement("div", { ref: wrapMerged, className: "aura-table-dual", "data-stack-below": props.stackBelow }, renderStacked(void 0), gridEl);
@@ -4225,6 +4387,40 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
4225
4387
  const current2 = items2.filter(function(t) {
4226
4388
  return t.id === st[0];
4227
4389
  })[0] || items2[0];
4390
+ const Link = useLinkComponent(props.linkComponent);
4391
+ const asLinks = items2.length > 0 && items2.every(function(t) {
4392
+ return !!t.href;
4393
+ });
4394
+ if (asLinks)
4395
+ return /* @__PURE__ */ React30.createElement(
4396
+ "nav",
4397
+ {
4398
+ ref,
4399
+ "aria-label": props.label,
4400
+ className: cx("aura-tabs aura-tabs--links", props.className)
4401
+ },
4402
+ /* @__PURE__ */ React30.createElement("div", { className: "aura-tabs__list" }, items2.map(function(t) {
4403
+ const on = current2 && t.id === current2.id;
4404
+ const inner = [
4405
+ t.icon ? /* @__PURE__ */ React30.createElement(Icon, { key: "i", name: t.icon }) : null,
4406
+ t.label,
4407
+ t.count != null ? /* @__PURE__ */ React30.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
4408
+ ];
4409
+ return t.disabled ? /* @__PURE__ */ React30.createElement("span", { key: t.id, className: "aura-tab is-disabled", "aria-disabled": true }, inner) : /* @__PURE__ */ React30.createElement(
4410
+ Link,
4411
+ {
4412
+ key: t.id,
4413
+ href: t.href,
4414
+ className: cx("aura-tab", on && "is-active"),
4415
+ "aria-current": on ? "page" : void 0,
4416
+ onClick: function() {
4417
+ st[1](t.id);
4418
+ }
4419
+ },
4420
+ inner
4421
+ );
4422
+ }))
4423
+ );
4228
4424
  function go(i) {
4229
4425
  const enabled = items2.filter(function(t2) {
4230
4426
  return !t2.disabled;
@@ -4299,7 +4495,7 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
4299
4495
 
4300
4496
  // src/SideNav.tsx
4301
4497
  var React31 = __toESM(require("react"), 1);
4302
- var import_react_dom8 = require("react-dom");
4498
+ var import_react_dom9 = require("react-dom");
4303
4499
  function contains(it, id) {
4304
4500
  return !!id && !!it.children && it.children.some(function(c) {
4305
4501
  return c.id === id || contains(c, id);
@@ -4486,7 +4682,7 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
4486
4682
  }
4487
4683
  }
4488
4684
  )) : null,
4489
- tip && typeof document !== "undefined" ? (0, import_react_dom8.createPortal)(
4685
+ tip && typeof document !== "undefined" ? (0, import_react_dom9.createPortal)(
4490
4686
  /* @__PURE__ */ React31.createElement(
4491
4687
  "div",
4492
4688
  {
@@ -4670,7 +4866,7 @@ var AppShell = React38.forwardRef(function AppShell2(props, ref) {
4670
4866
  collapsed: false,
4671
4867
  collapsible: false
4672
4868
  }) : props.nav;
4673
- return /* @__PURE__ */ React38.createElement("div", { ref, className: cx("aura-shell", props.className) }, props.nav ? /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__nav" }, props.nav) : null, props.nav ? /* @__PURE__ */ React38.createElement(
4869
+ return /* @__PURE__ */ React38.createElement("div", { ref, className: cx("aura-shell", props.bottomNav && "aura-shell--bottomnav", props.className) }, props.nav ? /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__nav" }, props.nav) : null, props.nav ? /* @__PURE__ */ React38.createElement(
4674
4870
  Drawer,
4675
4871
  {
4676
4872
  open,
@@ -4695,13 +4891,95 @@ var AppShell = React38.forwardRef(function AppShell2(props, ref) {
4695
4891
  },
4696
4892
  "aria-expanded": open
4697
4893
  }
4698
- ) : null, /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__bar-content" }, props.header)) : null, /* @__PURE__ */ React38.createElement("main", { className: "aura-shell__content", id: props.mainId || "main" }, props.children)));
4894
+ ) : null, /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__bar-content" }, props.header)) : null, /* @__PURE__ */ React38.createElement("main", { className: "aura-shell__content", id: props.mainId || "main" }, props.children), props.bottomNav || null));
4699
4895
  });
4700
4896
 
4701
- // src/Surface.tsx
4897
+ // src/ActionBar.tsx
4702
4898
  var React39 = __toESM(require("react"), 1);
4703
- var h8 = React39.createElement;
4704
- var Surface = React39.forwardRef(function Surface2(props, ref) {
4899
+ var ActionBar = React39.forwardRef(function ActionBar2(props, ref) {
4900
+ const t = useStrings();
4901
+ const bulk = props.selected != null;
4902
+ const idle = bulk && !props.selected;
4903
+ const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
4904
+ const cameFrom = React39.useRef(null);
4905
+ const own = React39.useRef(null);
4906
+ function clear() {
4907
+ props.onClearSelection();
4908
+ setTimeout(function() {
4909
+ const back = cameFrom.current;
4910
+ const a = document.activeElement;
4911
+ if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
4912
+ }, 0);
4913
+ }
4914
+ return /* @__PURE__ */ React39.createElement(
4915
+ "div",
4916
+ {
4917
+ ref: function(el) {
4918
+ own.current = el;
4919
+ if (typeof ref === "function") ref(el);
4920
+ else if (ref) ref.current = el;
4921
+ },
4922
+ onFocus: function(e) {
4923
+ const from = e.relatedTarget;
4924
+ if (from && own.current && !own.current.contains(from)) cameFrom.current = from;
4925
+ },
4926
+ role: "region",
4927
+ "aria-label": props.label || t.actions,
4928
+ className: cx(
4929
+ "aura-actionbar",
4930
+ "aura-actionbar--" + (props.position || "viewport"),
4931
+ idle && "is-idle",
4932
+ props.className
4933
+ )
4934
+ },
4935
+ /* @__PURE__ */ React39.createElement("div", { className: "aura-actionbar__inner" }, /* @__PURE__ */ React39.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle ? /* @__PURE__ */ React39.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React39.createElement(Button, { variant: "ghost", size: "sm", onClick: clear }, t.clear()) : null, props.children) : null)
4936
+ );
4937
+ });
4938
+
4939
+ // src/BottomNav.tsx
4940
+ var React40 = __toESM(require("react"), 1);
4941
+ var BottomNav = React40.forwardRef(function BottomNav2(props, ref) {
4942
+ const t = useStrings();
4943
+ const Link = useLinkComponent(props.linkComponent);
4944
+ const st = useMaybeControlled(
4945
+ props.value,
4946
+ props.defaultValue,
4947
+ props.onChange
4948
+ );
4949
+ const active = st[0];
4950
+ const hide = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
4951
+ return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide), "aria-hidden": "true" }), /* @__PURE__ */ React40.createElement(
4952
+ "nav",
4953
+ {
4954
+ ref,
4955
+ className: cx("aura-bottomnav", "aura-bottomnav--" + hide, props.className),
4956
+ "aria-label": props.label || t.mainNav
4957
+ },
4958
+ /* @__PURE__ */ React40.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
4959
+ const on = active === it.id;
4960
+ const count = it.count != null && it.count > 0 ? it.count > 99 ? "99+" : String(it.count) : null;
4961
+ const common = {
4962
+ className: cx("aura-bottomnav__item", on && "is-active"),
4963
+ "aria-current": on ? "page" : void 0,
4964
+ onClick: function(e) {
4965
+ if (!it.href) e.preventDefault();
4966
+ st[1](it.id);
4967
+ }
4968
+ };
4969
+ const inner = [
4970
+ /* @__PURE__ */ React40.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React40.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React40.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React40.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
4971
+ /* @__PURE__ */ React40.createElement("span", { key: "l", className: "aura-bottomnav__label" }, it.label),
4972
+ count || it.badge && it.badgeLabel ? /* @__PURE__ */ React40.createElement("span", { key: "s", className: "aura-sr-only" }, " (" + (count || it.badgeLabel) + ")") : null
4973
+ ];
4974
+ return /* @__PURE__ */ React40.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React40.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React40.createElement("button", { type: "button", ...common }, inner));
4975
+ }))
4976
+ ));
4977
+ });
4978
+
4979
+ // src/Surface.tsx
4980
+ var React41 = __toESM(require("react"), 1);
4981
+ var h8 = React41.createElement;
4982
+ var Surface = React41.forwardRef(function Surface2(props, ref) {
4705
4983
  const t = props.texture || "mesh";
4706
4984
  const rest = omit(props, ["texture", "className", "children", "as"]);
4707
4985
  return h8(
@@ -4722,8 +5000,8 @@ var Surface = React39.forwardRef(function Surface2(props, ref) {
4722
5000
  });
4723
5001
 
4724
5002
  // src/Stat.tsx
4725
- var React40 = __toESM(require("react"), 1);
4726
- var Stat = React40.forwardRef(function Stat2(props, ref) {
5003
+ var React42 = __toESM(require("react"), 1);
5004
+ var Stat = React42.forwardRef(function Stat2(props, ref) {
4727
5005
  const ch = props.change;
4728
5006
  const dir = ch && (ch.direction || "flat");
4729
5007
  const tone2 = ch && (ch.tone || (dir === "up" ? "positive" : dir === "down" ? "negative" : "neutral"));
@@ -4732,7 +5010,7 @@ var Stat = React40.forwardRef(function Stat2(props, ref) {
4732
5010
  const numeric = typeof v === "number" || typeof v === "string" && /\d/.test(v) && /^[\s\d.,:+\-\u2212%()\u0E3F$\u20AC\u00A3\u00A5kKmMbB]+$/.test(v.replace(/\b[A-Z]{3}\b/g, ""));
4733
5011
  const Tag3 = props.href ? Link : props.onClick ? "button" : "div";
4734
5012
  const interactive = !!(props.href || props.onClick);
4735
- return /* @__PURE__ */ React40.createElement(
5013
+ return /* @__PURE__ */ React42.createElement(
4736
5014
  Tag3,
4737
5015
  {
4738
5016
  ref,
@@ -4742,15 +5020,15 @@ var Stat = React40.forwardRef(function Stat2(props, ref) {
4742
5020
  type: Tag3 === "button" ? "button" : void 0,
4743
5021
  "aria-busy": props.loading || void 0
4744
5022
  },
4745
- /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__head" }, /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React40.createElement(Icon, { name: props.icon })) : null),
4746
- props.loading ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React40.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React40.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
4747
- ch && !props.loading || props.caption ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React40.createElement("span", { className: cx("aura-stat__change", "is-" + tone2) }, /* @__PURE__ */ React40.createElement(Icon, { name: dir === "up" ? "trending-up" : dir === "down" ? "trending-down" : "minus", size: 14 }), /* @__PURE__ */ React40.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React40.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
5023
+ /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__head" }, /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React42.createElement(Icon, { name: props.icon })) : null),
5024
+ props.loading ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React42.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React42.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
5025
+ ch && !props.loading || props.caption ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React42.createElement("span", { className: cx("aura-stat__change", "is-" + tone2) }, /* @__PURE__ */ React42.createElement(Icon, { name: dir === "up" ? "trending-up" : dir === "down" ? "trending-down" : "minus", size: 14 }), /* @__PURE__ */ React42.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React42.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
4748
5026
  );
4749
5027
  });
4750
5028
 
4751
5029
  // src/TimePicker.tsx
4752
- var React41 = __toESM(require("react"), 1);
4753
- var import_react_dom9 = require("react-dom");
5030
+ var React43 = __toESM(require("react"), 1);
5031
+ var import_react_dom10 = require("react-dom");
4754
5032
 
4755
5033
  // src/text.ts
4756
5034
  function formatBytes(n2) {
@@ -4790,7 +5068,7 @@ function toMin(t) {
4790
5068
  function fromMin(n2) {
4791
5069
  return pad3(Math.floor(n2 / 60)) + ":" + pad3(n2 % 60);
4792
5070
  }
4793
- var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
5071
+ var TimePicker = React43.forwardRef(function TimePicker2(props, ref) {
4794
5072
  const t = useStrings();
4795
5073
  const auto = uid(), id = props.id || auto, listId = id + "-list";
4796
5074
  const st = useMaybeControlled(
@@ -4800,7 +5078,7 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4800
5078
  );
4801
5079
  const value = st[0];
4802
5080
  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;
4803
- const slots = React41.useMemo(
5081
+ const slots = React43.useMemo(
4804
5082
  function() {
4805
5083
  const out = [];
4806
5084
  for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
@@ -4812,12 +5090,12 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4812
5090
  const n2 = toMin(v);
4813
5091
  return n2 == null || n2 < lo || n2 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
4814
5092
  }
4815
- const openState = React41.useState(false), open = openState[0], setOpen = openState[1];
4816
- const editState = React41.useState(null), editing = editState[0], setEditing = editState[1];
4817
- const aState = React41.useState(0), active = aState[0], setActive = aState[1];
4818
- const errState = React41.useState(null);
4819
- const pos = React41.useState(null);
4820
- const boxRef = React41.useRef(null), inputRef = React41.useRef(null), listRef = React41.useRef(null), inputMerged = useMergedRef(ref, inputRef);
5093
+ const openState = React43.useState(false), open = openState[0], setOpen = openState[1];
5094
+ const editState = React43.useState(null), editing = editState[0], setEditing = editState[1];
5095
+ const aState = React43.useState(0), active = aState[0], setActive = aState[1];
5096
+ const errState = React43.useState(null);
5097
+ const pos = React43.useState(null);
5098
+ const boxRef = React43.useRef(null), inputRef = React43.useRef(null), listRef = React43.useRef(null), inputMerged = useMergedRef(ref, inputRef);
4821
5099
  const mounted = useMounted();
4822
5100
  function nearest(v) {
4823
5101
  const n2 = toMin(v);
@@ -4845,7 +5123,7 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4845
5123
  },
4846
5124
  [open]
4847
5125
  );
4848
- React41.useEffect(
5126
+ React43.useEffect(
4849
5127
  function() {
4850
5128
  if (!open) return;
4851
5129
  function outside(e) {
@@ -4867,7 +5145,7 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4867
5145
  },
4868
5146
  [open]
4869
5147
  );
4870
- React41.useEffect(
5148
+ React43.useEffect(
4871
5149
  function() {
4872
5150
  if (!open || !listRef.current) return;
4873
5151
  const el = listRef.current.querySelector('[data-idx="' + active + '"]');
@@ -4964,10 +5242,10 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4964
5242
  }
4965
5243
  }
4966
5244
  const error = errState[0] || props.error;
4967
- const list = open && mounted && pos[0] ? (0, import_react_dom9.createPortal)(
4968
- /* @__PURE__ */ React41.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React41.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
5245
+ const list = open && mounted && pos[0] ? (0, import_react_dom10.createPortal)(
5246
+ /* @__PURE__ */ React43.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React43.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
4969
5247
  const dis = blocked(s), sel = s === value;
4970
- return /* @__PURE__ */ React41.createElement(
5248
+ return /* @__PURE__ */ React43.createElement(
4971
5249
  "li",
4972
5250
  {
4973
5251
  key: s,
@@ -4992,13 +5270,13 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
4992
5270
  if (active !== i) setActive(i);
4993
5271
  }
4994
5272
  },
4995
- /* @__PURE__ */ React41.createElement("span", { className: "aura-combo__label" }, s),
4996
- sel ? /* @__PURE__ */ React41.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
5273
+ /* @__PURE__ */ React43.createElement("span", { className: "aura-combo__label" }, s),
5274
+ sel ? /* @__PURE__ */ React43.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
4997
5275
  );
4998
5276
  }))),
4999
5277
  document.body
5000
5278
  ) : null;
5001
- return /* @__PURE__ */ React41.createElement(
5279
+ return /* @__PURE__ */ React43.createElement(
5002
5280
  Field,
5003
5281
  {
5004
5282
  id,
@@ -5010,7 +5288,7 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
5010
5288
  disabled: props.disabled,
5011
5289
  className: props.className
5012
5290
  },
5013
- /* @__PURE__ */ React41.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React41.createElement(Icon, { name: "clock", className: "aura-input__icon" }), /* @__PURE__ */ React41.createElement(
5291
+ /* @__PURE__ */ React43.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React43.createElement(Icon, { name: "clock", className: "aura-input__icon" }), /* @__PURE__ */ React43.createElement(
5014
5292
  "input",
5015
5293
  {
5016
5294
  ref: inputMerged,
@@ -5050,7 +5328,7 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
5050
5328
  }, 0);
5051
5329
  }
5052
5330
  }
5053
- ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React41.createElement(
5331
+ ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React43.createElement(
5054
5332
  "button",
5055
5333
  {
5056
5334
  type: "button",
@@ -5063,8 +5341,8 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
5063
5341
  if (inputRef.current) inputRef.current.focus();
5064
5342
  }
5065
5343
  },
5066
- /* @__PURE__ */ React41.createElement(Icon, { name: "x" })
5067
- ) : null, /* @__PURE__ */ React41.createElement(
5344
+ /* @__PURE__ */ React43.createElement(Icon, { name: "x" })
5345
+ ) : null, /* @__PURE__ */ React43.createElement(
5068
5346
  "button",
5069
5347
  {
5070
5348
  type: "button",
@@ -5082,14 +5360,14 @@ var TimePicker = React41.forwardRef(function TimePicker2(props, ref) {
5082
5360
  }
5083
5361
  }
5084
5362
  },
5085
- /* @__PURE__ */ React41.createElement(Icon, { name: "chevron-down" })
5363
+ /* @__PURE__ */ React43.createElement(Icon, { name: "chevron-down" })
5086
5364
  )),
5087
5365
  list
5088
5366
  );
5089
5367
  });
5090
5368
 
5091
5369
  // src/FileUpload.tsx
5092
- var React42 = __toESM(require("react"), 1);
5370
+ var React44 = __toESM(require("react"), 1);
5093
5371
  function matches(file, accept) {
5094
5372
  if (!accept) return true;
5095
5373
  const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
@@ -5113,17 +5391,17 @@ function describeAccept(accept, t) {
5113
5391
  }).join(", ");
5114
5392
  }
5115
5393
  var seq = 0;
5116
- var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5394
+ var FileUpload = React44.forwardRef(function FileUpload2(props, ref) {
5117
5395
  const t = useStrings();
5118
5396
  const auto = uid(), id = props.id || auto;
5119
5397
  const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
5120
5398
  const items2 = st[0] || [];
5121
- const dragState = React42.useState(false), over = dragState[0];
5122
- const inputRef = React42.useRef(null), inputMerged = useMergedRef(ref, inputRef);
5123
- const urls = React42.useRef({});
5399
+ const dragState = React44.useState(false), over = dragState[0];
5400
+ const inputRef = React44.useRef(null), inputMerged = useMergedRef(ref, inputRef);
5401
+ const urls = React44.useRef({});
5124
5402
  const maxFiles = props.multiple ? props.maxFiles : 1;
5125
5403
  const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
5126
- React42.useEffect(function() {
5404
+ React44.useEffect(function() {
5127
5405
  return function() {
5128
5406
  Object.keys(urls.current).forEach(function(k) {
5129
5407
  URL.revokeObjectURL(urls.current[k]);
@@ -5174,7 +5452,7 @@ var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5174
5452
  if (inputRef.current) inputRef.current.focus();
5175
5453
  }
5176
5454
  const error = props.error;
5177
- return /* @__PURE__ */ React42.createElement(
5455
+ return /* @__PURE__ */ React44.createElement(
5178
5456
  Field,
5179
5457
  {
5180
5458
  id,
@@ -5186,7 +5464,7 @@ var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5186
5464
  disabled: props.disabled,
5187
5465
  className: props.className
5188
5466
  },
5189
- /* @__PURE__ */ React42.createElement(
5467
+ /* @__PURE__ */ React44.createElement(
5190
5468
  "div",
5191
5469
  {
5192
5470
  className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
@@ -5207,9 +5485,9 @@ var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5207
5485
  add(e.dataTransfer && e.dataTransfer.files);
5208
5486
  }
5209
5487
  },
5210
- /* @__PURE__ */ React42.createElement(Icon, { name: "cloud-upload", size: "lg", className: "aura-upload__icon" }),
5211
- /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
5212
- /* @__PURE__ */ React42.createElement(
5488
+ /* @__PURE__ */ React44.createElement(Icon, { name: "cloud-upload", size: "lg", className: "aura-upload__icon" }),
5489
+ /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
5490
+ /* @__PURE__ */ React44.createElement(
5213
5491
  "input",
5214
5492
  {
5215
5493
  ref: inputMerged,
@@ -5231,12 +5509,12 @@ var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5231
5509
  }
5232
5510
  }
5233
5511
  ),
5234
- /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
5235
- note ? /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
5512
+ /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
5513
+ note ? /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
5236
5514
  ),
5237
- items2.length ? /* @__PURE__ */ React42.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
5515
+ items2.length ? /* @__PURE__ */ React44.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
5238
5516
  const src = thumb(it);
5239
- return /* @__PURE__ */ React42.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React42.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React42.createElement(Icon, { name: /^image\//.test(it.type || "") ? "image" : "file", size: "md" })), /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__meta" }, /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React42.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Icon, { name: "circle-alert", size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Icon, { name: "circle-check", size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React42.createElement(
5517
+ return /* @__PURE__ */ React44.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React44.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React44.createElement(Icon, { name: /^image\//.test(it.type || "") ? "image" : "file", size: "md" })), /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__meta" }, /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React44.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(Icon, { name: "circle-alert", size: 12 }), it.error) : it.status === "uploading" ? t.uploading + (it.progress != null ? " " + Math.round(it.progress) + "%" : "") : it.status === "done" ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(Icon, { name: "circle-check", size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React44.createElement(
5240
5518
  "span",
5241
5519
  {
5242
5520
  className: "aura-upload__bar",
@@ -5246,8 +5524,8 @@ var FileUpload = React42.forwardRef(function FileUpload2(props, ref) {
5246
5524
  "aria-valuemax": 100,
5247
5525
  "aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
5248
5526
  },
5249
- /* @__PURE__ */ React42.createElement("span", { style: { width: (it.progress || 0) + "%" } })
5250
- ) : null), /* @__PURE__ */ React42.createElement(
5527
+ /* @__PURE__ */ React44.createElement("span", { style: { width: (it.progress || 0) + "%" } })
5528
+ ) : null), /* @__PURE__ */ React44.createElement(
5251
5529
  IconButton,
5252
5530
  {
5253
5531
  icon: "x",
@@ -5533,9 +5811,9 @@ function createTheme(opts) {
5533
5811
  }
5534
5812
 
5535
5813
  // src/ThemeStyle.tsx
5536
- var React43 = __toESM(require("react"), 1);
5814
+ var React45 = __toESM(require("react"), 1);
5537
5815
  function ThemeStyle(props) {
5538
- const css = React43.useMemo(
5816
+ const css = React45.useMemo(
5539
5817
  function() {
5540
5818
  return createTheme({ brand: props.brand, signal: props.signal, primary: props.primary, name: props.name }).css(
5541
5819
  props.selector
@@ -5543,11 +5821,11 @@ function ThemeStyle(props) {
5543
5821
  },
5544
5822
  [props.brand, props.signal, props.primary, props.name, props.selector]
5545
5823
  );
5546
- return /* @__PURE__ */ React43.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
5824
+ return /* @__PURE__ */ React45.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
5547
5825
  }
5548
5826
 
5549
5827
  // src/colorScheme.tsx
5550
- var React44 = __toESM(require("react"), 1);
5828
+ var React46 = __toESM(require("react"), 1);
5551
5829
 
5552
5830
  // src/colorSchemeScript.ts
5553
5831
  var DEFAULT_KEY = "aura-color-scheme";
@@ -5564,7 +5842,7 @@ function colorSchemeScript(options) {
5564
5842
 
5565
5843
  // src/colorScheme.tsx
5566
5844
  function ColorSchemeScript(props) {
5567
- return /* @__PURE__ */ React44.createElement(
5845
+ return /* @__PURE__ */ React46.createElement(
5568
5846
  "script",
5569
5847
  {
5570
5848
  "data-aura-color-scheme": "",
@@ -5589,7 +5867,7 @@ function apply(scheme) {
5589
5867
  function useColorScheme(options) {
5590
5868
  const key = options && options.storageKey || DEFAULT_KEY;
5591
5869
  const fallback = options && options.defaultScheme || "system";
5592
- const subscribe2 = React44.useCallback(
5870
+ const subscribe2 = React46.useCallback(
5593
5871
  function(cb) {
5594
5872
  const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
5595
5873
  function onSystem() {
@@ -5607,7 +5885,7 @@ function useColorScheme(options) {
5607
5885
  },
5608
5886
  [fallback]
5609
5887
  );
5610
- const snapshot = React44.useSyncExternalStore(
5888
+ const snapshot = React46.useSyncExternalStore(
5611
5889
  subscribe2,
5612
5890
  function() {
5613
5891
  const s = readScheme(fallback);
@@ -5618,7 +5896,7 @@ function useColorScheme(options) {
5618
5896
  }
5619
5897
  );
5620
5898
  const parts = snapshot.split("|");
5621
- const setScheme = React44.useCallback(
5899
+ const setScheme = React46.useCallback(
5622
5900
  function(next) {
5623
5901
  if (!valid(next)) return;
5624
5902
  try {
@@ -5637,11 +5915,11 @@ function ColorSchemeToggle(props) {
5637
5915
  const cs = useColorScheme(props);
5638
5916
  const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
5639
5917
  const label = props.label || t.colorScheme;
5640
- return /* @__PURE__ */ React44.createElement(
5918
+ return /* @__PURE__ */ React46.createElement(
5641
5919
  DropdownMenu,
5642
5920
  {
5643
5921
  label,
5644
- trigger: /* @__PURE__ */ React44.createElement(IconButton, { icon: cs.resolved === "dark" ? "moon" : "sun", label: label + ": " + names[cs.scheme] }),
5922
+ trigger: /* @__PURE__ */ React46.createElement(IconButton, { icon: cs.resolved === "dark" ? "moon" : "sun", label: label + ": " + names[cs.scheme] }),
5645
5923
  items: SCHEMES.map(function(s) {
5646
5924
  return {
5647
5925
  label: names[s],
@@ -5656,10 +5934,10 @@ function ColorSchemeToggle(props) {
5656
5934
  }
5657
5935
 
5658
5936
  // src/Badge.tsx
5659
- var React45 = __toESM(require("react"), 1);
5660
- var Badge = React45.forwardRef(function Badge2(props, ref) {
5937
+ var React47 = __toESM(require("react"), 1);
5938
+ var Badge = React47.forwardRef(function Badge2(props, ref) {
5661
5939
  const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
5662
- return /* @__PURE__ */ React45.createElement(
5940
+ return /* @__PURE__ */ React47.createElement(
5663
5941
  "span",
5664
5942
  {
5665
5943
  ...rest,
@@ -5672,19 +5950,19 @@ var Badge = React45.forwardRef(function Badge2(props, ref) {
5672
5950
  props.className
5673
5951
  )
5674
5952
  },
5675
- props.icon ? /* @__PURE__ */ React45.createElement(Icon, { name: props.icon, size: 12 }) : null,
5953
+ props.icon ? /* @__PURE__ */ React47.createElement(Icon, { name: props.icon, size: 12 }) : null,
5676
5954
  props.children
5677
5955
  );
5678
5956
  });
5679
5957
 
5680
5958
  // src/Progress.tsx
5681
- var React46 = __toESM(require("react"), 1);
5682
- var Progress = React46.forwardRef(function Progress2(props, ref) {
5959
+ var React48 = __toESM(require("react"), 1);
5960
+ var Progress = React48.forwardRef(function Progress2(props, ref) {
5683
5961
  const auto = uid(), id = props.id || auto;
5684
5962
  const max = props.max || 100, det = props.value != null;
5685
5963
  const pct = det ? Math.max(0, Math.min(100, props.value / max * 100)) : 0;
5686
5964
  const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
5687
- return /* @__PURE__ */ React46.createElement(
5965
+ return /* @__PURE__ */ React48.createElement(
5688
5966
  "div",
5689
5967
  {
5690
5968
  ref,
@@ -5695,8 +5973,8 @@ var Progress = React46.forwardRef(function Progress2(props, ref) {
5695
5973
  props.className
5696
5974
  )
5697
5975
  },
5698
- props.label || props.showValue && shown ? /* @__PURE__ */ React46.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React46.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React46.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React46.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
5699
- /* @__PURE__ */ React46.createElement(
5976
+ props.label || props.showValue && shown ? /* @__PURE__ */ React48.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React48.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React48.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React48.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
5977
+ /* @__PURE__ */ React48.createElement(
5700
5978
  "div",
5701
5979
  {
5702
5980
  className: cx("aura-progress__track", !det && "is-indeterminate"),
@@ -5708,21 +5986,21 @@ var Progress = React46.forwardRef(function Progress2(props, ref) {
5708
5986
  "aria-valuenow": det ? props.value : void 0,
5709
5987
  "aria-valuetext": det && props.valueLabel != null ? String(props.valueLabel) : void 0
5710
5988
  },
5711
- /* @__PURE__ */ React46.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 })
5989
+ /* @__PURE__ */ React48.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 })
5712
5990
  ),
5713
- props.hint ? /* @__PURE__ */ React46.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
5991
+ props.hint ? /* @__PURE__ */ React48.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
5714
5992
  );
5715
5993
  });
5716
5994
 
5717
5995
  // src/Skeleton.tsx
5718
- var React47 = __toESM(require("react"), 1);
5719
- var Skeleton = React47.forwardRef(function Skeleton2(props, ref) {
5996
+ var React49 = __toESM(require("react"), 1);
5997
+ var Skeleton = React49.forwardRef(function Skeleton2(props, ref) {
5720
5998
  const v = props.variant || "text";
5721
5999
  if (v === "text" && (props.lines || 1) > 1) {
5722
6000
  const n2 = props.lines, rows = [];
5723
6001
  for (let i = 0; i < n2; i++)
5724
- rows.push(/* @__PURE__ */ React47.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n2 - 1 ? "60%" : "100%" } }));
5725
- return /* @__PURE__ */ React47.createElement(
6002
+ rows.push(/* @__PURE__ */ React49.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n2 - 1 ? "60%" : "100%" } }));
6003
+ return /* @__PURE__ */ React49.createElement(
5726
6004
  "span",
5727
6005
  {
5728
6006
  ref,
@@ -5740,28 +6018,28 @@ var Skeleton = React47.forwardRef(function Skeleton2(props, ref) {
5740
6018
  if (v === "circle") {
5741
6019
  style.width = style.height = props.size || props.width || 40;
5742
6020
  }
5743
- return /* @__PURE__ */ React47.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
6021
+ return /* @__PURE__ */ React49.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
5744
6022
  });
5745
6023
 
5746
6024
  // src/EmptyState.tsx
5747
- var React48 = __toESM(require("react"), 1);
5748
- var EmptyState = React48.forwardRef(function EmptyState2(props, ref) {
6025
+ var React50 = __toESM(require("react"), 1);
6026
+ var EmptyState = React50.forwardRef(function EmptyState2(props, ref) {
5749
6027
  const HT = "h" + (props.headingLevel || 3);
5750
- return /* @__PURE__ */ React48.createElement(
6028
+ return /* @__PURE__ */ React50.createElement(
5751
6029
  "div",
5752
6030
  {
5753
6031
  ref,
5754
6032
  className: cx("aura-empty", props.size === "sm" && "is-sm", props.bordered && "is-bordered", props.className)
5755
6033
  },
5756
- /* @__PURE__ */ React48.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React48.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
5757
- /* @__PURE__ */ React48.createElement(HT, { className: "aura-empty__title" }, props.title),
5758
- props.description ? /* @__PURE__ */ React48.createElement("p", { className: "aura-empty__text" }, props.description) : null,
5759
- props.action ? /* @__PURE__ */ React48.createElement("div", { className: "aura-empty__action" }, props.action) : null
6034
+ /* @__PURE__ */ React50.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React50.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
6035
+ /* @__PURE__ */ React50.createElement(HT, { className: "aura-empty__title" }, props.title),
6036
+ props.description ? /* @__PURE__ */ React50.createElement("p", { className: "aura-empty__text" }, props.description) : null,
6037
+ props.action ? /* @__PURE__ */ React50.createElement("div", { className: "aura-empty__action" }, props.action) : null
5760
6038
  );
5761
6039
  });
5762
6040
 
5763
6041
  // src/Pagination.tsx
5764
- var React49 = __toESM(require("react"), 1);
6042
+ var React51 = __toESM(require("react"), 1);
5765
6043
  function pageList(page, count, sib) {
5766
6044
  let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
5767
6045
  if (page - sib <= 3) {
@@ -5781,7 +6059,7 @@ function pageList(page, count, sib) {
5781
6059
  if (count > 1) out.push(count);
5782
6060
  return out;
5783
6061
  }
5784
- var Pagination = React49.forwardRef(function Pagination2(props, ref) {
6062
+ var Pagination = React51.forwardRef(function Pagination2(props, ref) {
5785
6063
  const t = useStrings();
5786
6064
  const count = Math.max(1, props.pageCount || 1);
5787
6065
  const st = useMaybeControlled(props.page, props.defaultPage || 1, props.onChange);
@@ -5800,7 +6078,7 @@ var Pagination = React49.forwardRef(function Pagination2(props, ref) {
5800
6078
  },
5801
6079
  extra
5802
6080
  );
5803
- return link ? /* @__PURE__ */ React49.createElement(
6081
+ return link ? /* @__PURE__ */ React51.createElement(
5804
6082
  Link,
5805
6083
  {
5806
6084
  href: link(p),
@@ -5813,7 +6091,7 @@ var Pagination = React49.forwardRef(function Pagination2(props, ref) {
5813
6091
  ...common
5814
6092
  },
5815
6093
  label
5816
- ) : /* @__PURE__ */ React49.createElement(
6094
+ ) : /* @__PURE__ */ React51.createElement(
5817
6095
  "button",
5818
6096
  {
5819
6097
  type: "button",
@@ -5827,7 +6105,7 @@ var Pagination = React49.forwardRef(function Pagination2(props, ref) {
5827
6105
  }
5828
6106
  function arrow(p, icon, label, rel, disabled) {
5829
6107
  if (!link || disabled)
5830
- return /* @__PURE__ */ React49.createElement(
6108
+ return /* @__PURE__ */ React51.createElement(
5831
6109
  IconButton,
5832
6110
  {
5833
6111
  icon,
@@ -5838,7 +6116,7 @@ var Pagination = React49.forwardRef(function Pagination2(props, ref) {
5838
6116
  }
5839
6117
  }
5840
6118
  );
5841
- return /* @__PURE__ */ React49.createElement(
6119
+ return /* @__PURE__ */ React51.createElement(
5842
6120
  Link,
5843
6121
  {
5844
6122
  href: link(p),
@@ -5853,17 +6131,17 @@ var Pagination = React49.forwardRef(function Pagination2(props, ref) {
5853
6131
  }
5854
6132
  }
5855
6133
  },
5856
- /* @__PURE__ */ React49.createElement(Icon, { name: icon, size: "sm" })
6134
+ /* @__PURE__ */ React51.createElement(Icon, { name: icon, size: "sm" })
5857
6135
  );
5858
6136
  }
5859
- return /* @__PURE__ */ React49.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, "chevron-left", t.prevPage, "prev", page <= 1), /* @__PURE__ */ React49.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
5860
- return typeof p === "number" ? /* @__PURE__ */ React49.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React49.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
5861
- })), /* @__PURE__ */ React49.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, "chevron-right", t.nextPage, "next", page >= count));
6137
+ return /* @__PURE__ */ React51.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, "chevron-left", t.prevPage, "prev", page <= 1), /* @__PURE__ */ React51.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
6138
+ return typeof p === "number" ? /* @__PURE__ */ React51.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React51.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
6139
+ })), /* @__PURE__ */ React51.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, "chevron-right", t.nextPage, "next", page >= count));
5862
6140
  });
5863
6141
 
5864
6142
  // src/Accordion.tsx
5865
- var React50 = __toESM(require("react"), 1);
5866
- var Accordion = React50.forwardRef(function Accordion2(props, ref) {
6143
+ var React52 = __toESM(require("react"), 1);
6144
+ var Accordion = React52.forwardRef(function Accordion2(props, ref) {
5867
6145
  const auto = uid(), base = props.id || auto;
5868
6146
  const multiple = props.type === "multiple";
5869
6147
  const st = useMaybeControlled(
@@ -5901,9 +6179,9 @@ var Accordion = React50.forwardRef(function Accordion2(props, ref) {
5901
6179
  n2.focus();
5902
6180
  }
5903
6181
  }
5904
- return /* @__PURE__ */ React50.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
6182
+ return /* @__PURE__ */ React52.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
5905
6183
  const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
5906
- return /* @__PURE__ */ React50.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React50.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React50.createElement(
6184
+ return /* @__PURE__ */ React52.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React52.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React52.createElement(
5907
6185
  "button",
5908
6186
  {
5909
6187
  type: "button",
@@ -5915,16 +6193,16 @@ var Accordion = React50.forwardRef(function Accordion2(props, ref) {
5915
6193
  toggle(it.id);
5916
6194
  }
5917
6195
  },
5918
- it.icon ? /* @__PURE__ */ React50.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
5919
- /* @__PURE__ */ React50.createElement("span", { className: "aura-accordion__title" }, it.title, it.description ? /* @__PURE__ */ React50.createElement("span", { className: "aura-accordion__desc" }, it.description) : null),
5920
- /* @__PURE__ */ React50.createElement(Icon, { name: "chevron-down", className: "aura-accordion__chevron" })
5921
- )), /* @__PURE__ */ React50.createElement("div", { id: pid, role: "region", "aria-labelledby": bid, className: "aura-accordion__panel", hidden: !on }, it.content));
6196
+ it.icon ? /* @__PURE__ */ React52.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
6197
+ /* @__PURE__ */ React52.createElement("span", { className: "aura-accordion__title" }, it.title, it.description ? /* @__PURE__ */ React52.createElement("span", { className: "aura-accordion__desc" }, it.description) : null),
6198
+ /* @__PURE__ */ React52.createElement(Icon, { name: "chevron-down", className: "aura-accordion__chevron" })
6199
+ )), /* @__PURE__ */ React52.createElement("div", { id: pid, role: "region", "aria-labelledby": bid, className: "aura-accordion__panel", hidden: !on }, it.content));
5922
6200
  }));
5923
6201
  });
5924
6202
 
5925
6203
  // src/Popover.tsx
5926
- var React51 = __toESM(require("react"), 1);
5927
- var import_react_dom10 = require("react-dom");
6204
+ var React53 = __toESM(require("react"), 1);
6205
+ var import_react_dom11 = require("react-dom");
5928
6206
  function position(anchor, pop, placement) {
5929
6207
  const r = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.offsetHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
5930
6208
  let side = (placement || "bottom-start").split("-")[0], align = (placement || "bottom-start").split("-")[1] || "start";
@@ -5934,14 +6212,14 @@ function position(anchor, pop, placement) {
5934
6212
  const left = align === "end" ? r.right - pw : align === "center" ? r.left + r.width / 2 - pw / 2 : r.left;
5935
6213
  return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side };
5936
6214
  }
5937
- var Popover = React51.forwardRef(function Popover2(props, ref) {
6215
+ var Popover = React53.forwardRef(function Popover2(props, ref) {
5938
6216
  const t = useStrings();
5939
6217
  const density = useDensity();
5940
6218
  const auto = uid(), id = props.id || auto;
5941
6219
  const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
5942
6220
  const open = !!st[0];
5943
- const wrap = React51.useRef(null), pop = React51.useRef(null), popMerged = useMergedRef(ref, pop);
5944
- const pos = React51.useState(null), mounted = useMounted();
6221
+ const wrap = React53.useRef(null), pop = React53.useRef(null), popMerged = useMergedRef(ref, pop);
6222
+ const pos = React53.useState(null), mounted = useMounted();
5945
6223
  function trigger() {
5946
6224
  return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
5947
6225
  }
@@ -5968,7 +6246,7 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
5968
6246
  },
5969
6247
  [open, mounted, props.placement]
5970
6248
  );
5971
- React51.useEffect(
6249
+ React53.useEffect(
5972
6250
  function() {
5973
6251
  if (!open || !mounted) return;
5974
6252
  if (props.autoFocus !== false && pop.current) {
@@ -5987,9 +6265,9 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
5987
6265
  },
5988
6266
  [open, mounted]
5989
6267
  );
5990
- const child = React51.Children.only(props.trigger);
5991
- const panel = open && mounted ? (0, import_react_dom10.createPortal)(
5992
- /* @__PURE__ */ React51.createElement(
6268
+ const child = React53.Children.only(props.trigger);
6269
+ const panel = open && mounted ? (0, import_react_dom11.createPortal)(
6270
+ /* @__PURE__ */ React53.createElement(
5993
6271
  "div",
5994
6272
  {
5995
6273
  ref: popMerged,
@@ -6012,7 +6290,7 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
6012
6290
  } else trapTab(e, pop.current);
6013
6291
  }
6014
6292
  },
6015
- props.title ? /* @__PURE__ */ React51.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React51.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React51.createElement(
6293
+ props.title ? /* @__PURE__ */ React53.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React53.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React53.createElement(
6016
6294
  IconButton,
6017
6295
  {
6018
6296
  icon: "x",
@@ -6022,7 +6300,7 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
6022
6300
  }
6023
6301
  }
6024
6302
  )) : null,
6025
- /* @__PURE__ */ React51.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
6303
+ /* @__PURE__ */ React53.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
6026
6304
  close: function() {
6027
6305
  close(true);
6028
6306
  }
@@ -6030,7 +6308,7 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
6030
6308
  ),
6031
6309
  document.body
6032
6310
  ) : null;
6033
- return /* @__PURE__ */ React51.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React51.cloneElement(child, {
6311
+ return /* @__PURE__ */ React53.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React53.cloneElement(child, {
6034
6312
  onClick: function(e) {
6035
6313
  if (child.props.onClick) child.props.onClick(e);
6036
6314
  st[1](!open);
@@ -6042,7 +6320,7 @@ var Popover = React51.forwardRef(function Popover2(props, ref) {
6042
6320
  });
6043
6321
 
6044
6322
  // src/NumberField.tsx
6045
- var React52 = __toESM(require("react"), 1);
6323
+ var React54 = __toESM(require("react"), 1);
6046
6324
  function decimalsOf(n2) {
6047
6325
  const s = String(n2);
6048
6326
  const i = s.indexOf(".");
@@ -6053,7 +6331,7 @@ function parse(text) {
6053
6331
  if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
6054
6332
  return Number(s);
6055
6333
  }
6056
- var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6334
+ var NumberField = React54.forwardRef(function NumberField2(props, ref) {
6057
6335
  const t = useStrings();
6058
6336
  const auto = uid(), id = props.id || auto;
6059
6337
  const step = props.step || 1;
@@ -6064,7 +6342,7 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6064
6342
  props.onChange
6065
6343
  );
6066
6344
  const value = st[0], setValue = st[1];
6067
- const draftState = React52.useState(null), draft = draftState[0], setDraft = draftState[1];
6345
+ const draftState = React54.useState(null), draft = draftState[0], setDraft = draftState[1];
6068
6346
  function fmt2(n2) {
6069
6347
  if (n2 == null || isNaN(n2)) return "";
6070
6348
  return n2.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
@@ -6113,7 +6391,7 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6113
6391
  };
6114
6392
  const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
6115
6393
  const stepper = props.stepper !== false && !props.readOnly;
6116
- return /* @__PURE__ */ React52.createElement(
6394
+ return /* @__PURE__ */ React54.createElement(
6117
6395
  Field,
6118
6396
  {
6119
6397
  id,
@@ -6125,7 +6403,7 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6125
6403
  disabled: props.disabled,
6126
6404
  className: props.className
6127
6405
  },
6128
- /* @__PURE__ */ React52.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React52.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React52.createElement(
6406
+ /* @__PURE__ */ React54.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React54.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React54.createElement(
6129
6407
  "input",
6130
6408
  {
6131
6409
  ref,
@@ -6172,7 +6450,7 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6172
6450
  },
6173
6451
  onKeyDown
6174
6452
  }
6175
- ), props.suffix != null ? /* @__PURE__ */ React52.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React52.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React52.createElement(
6453
+ ), props.suffix != null ? /* @__PURE__ */ React54.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React54.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React54.createElement(
6176
6454
  "button",
6177
6455
  {
6178
6456
  type: "button",
@@ -6188,8 +6466,8 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6188
6466
  nudge(-step);
6189
6467
  }
6190
6468
  },
6191
- /* @__PURE__ */ React52.createElement(Icon, { name: "minus" })
6192
- ), /* @__PURE__ */ React52.createElement(
6469
+ /* @__PURE__ */ React54.createElement(Icon, { name: "minus" })
6470
+ ), /* @__PURE__ */ React54.createElement(
6193
6471
  "button",
6194
6472
  {
6195
6473
  type: "button",
@@ -6205,14 +6483,14 @@ var NumberField = React52.forwardRef(function NumberField2(props, ref) {
6205
6483
  nudge(step);
6206
6484
  }
6207
6485
  },
6208
- /* @__PURE__ */ React52.createElement(Icon, { name: "plus" })
6486
+ /* @__PURE__ */ React54.createElement(Icon, { name: "plus" })
6209
6487
  )) : null)
6210
6488
  );
6211
6489
  });
6212
6490
 
6213
6491
  // src/Stepper.tsx
6214
- var React53 = __toESM(require("react"), 1);
6215
- var Stepper = React53.forwardRef(function Stepper2(props, ref) {
6492
+ var React55 = __toESM(require("react"), 1);
6493
+ var Stepper = React55.forwardRef(function Stepper2(props, ref) {
6216
6494
  const t = useStrings();
6217
6495
  const steps = props.steps || [];
6218
6496
  let at = -1;
@@ -6222,26 +6500,26 @@ var Stepper = React53.forwardRef(function Stepper2(props, ref) {
6222
6500
  if (at < 0) at = 0;
6223
6501
  const vertical = props.orientation === "vertical";
6224
6502
  const cur = steps[at];
6225
- return /* @__PURE__ */ React53.createElement(
6503
+ return /* @__PURE__ */ React55.createElement(
6226
6504
  "nav",
6227
6505
  {
6228
6506
  ref,
6229
6507
  "aria-label": props.label,
6230
6508
  className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
6231
6509
  },
6232
- /* @__PURE__ */ React53.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
6510
+ /* @__PURE__ */ React55.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
6233
6511
  const state = i < at ? "done" : i === at ? "current" : "upcoming";
6234
- const marker = /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React53.createElement(Icon, { name: "check" }) : i + 1);
6235
- const text = /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__label" }, s.label, state === "done" ? /* @__PURE__ */ React53.createElement("span", { className: "aura-sr-only" }, ", " + t.stepDone) : null), s.description ? /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__desc" }, s.description) : null);
6512
+ const marker = /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React55.createElement(Icon, { name: "check" }) : i + 1);
6513
+ const text = /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__label" }, s.label, state === "done" ? /* @__PURE__ */ React55.createElement("span", { className: "aura-sr-only" }, ", " + t.stepDone) : null), s.description ? /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__desc" }, s.description) : null);
6236
6514
  const clickable = state === "done" && !!props.onStepClick;
6237
- return /* @__PURE__ */ React53.createElement(
6515
+ return /* @__PURE__ */ React55.createElement(
6238
6516
  "li",
6239
6517
  {
6240
6518
  key: s.id,
6241
6519
  className: cx("aura-stepper__item", "is-" + state),
6242
6520
  "aria-current": state === "current" ? "step" : void 0
6243
6521
  },
6244
- clickable ? /* @__PURE__ */ React53.createElement(
6522
+ clickable ? /* @__PURE__ */ React55.createElement(
6245
6523
  "button",
6246
6524
  {
6247
6525
  type: "button",
@@ -6252,19 +6530,19 @@ var Stepper = React53.forwardRef(function Stepper2(props, ref) {
6252
6530
  },
6253
6531
  marker,
6254
6532
  text
6255
- ) : /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__step" }, marker, text)
6533
+ ) : /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__step" }, marker, text)
6256
6534
  );
6257
6535
  })),
6258
- !vertical && cur ? /* @__PURE__ */ React53.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React53.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
6536
+ !vertical && cur ? /* @__PURE__ */ React55.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React55.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
6259
6537
  );
6260
6538
  });
6261
6539
 
6262
6540
  // src/SegmentedControl.tsx
6263
- var React54 = __toESM(require("react"), 1);
6541
+ var React56 = __toESM(require("react"), 1);
6264
6542
  function toOpt2(o) {
6265
6543
  return typeof o === "object" ? o : { value: o, label: o };
6266
6544
  }
6267
- var SegmentedControl = React54.forwardRef(
6545
+ var SegmentedControl = React56.forwardRef(
6268
6546
  function SegmentedControl2(props, ref) {
6269
6547
  const options = (props.options || []).map(toOpt2);
6270
6548
  const firstEnabled = options.filter(function(o) {
@@ -6277,7 +6555,7 @@ var SegmentedControl = React54.forwardRef(
6277
6555
  );
6278
6556
  const value = st[0], setValue = st[1];
6279
6557
  const auto = uid(), id = props.id || auto;
6280
- const refs = React54.useRef([]);
6558
+ const refs = React56.useRef([]);
6281
6559
  const selIdx = options.findIndex(function(o) {
6282
6560
  return o.value === value;
6283
6561
  });
@@ -6310,7 +6588,7 @@ var SegmentedControl = React54.forwardRef(
6310
6588
  move(options.length, -1);
6311
6589
  }
6312
6590
  }
6313
- return /* @__PURE__ */ React54.createElement(
6591
+ return /* @__PURE__ */ React56.createElement(
6314
6592
  "div",
6315
6593
  {
6316
6594
  ref,
@@ -6329,7 +6607,7 @@ var SegmentedControl = React54.forwardRef(
6329
6607
  options.map(function(o, i) {
6330
6608
  const on = o.value === value;
6331
6609
  const off = props.disabled || o.disabled;
6332
- return /* @__PURE__ */ React54.createElement(
6610
+ return /* @__PURE__ */ React56.createElement(
6333
6611
  "button",
6334
6612
  {
6335
6613
  key: o.value,
@@ -6351,8 +6629,8 @@ var SegmentedControl = React54.forwardRef(
6351
6629
  onKeyDown(e, i);
6352
6630
  }
6353
6631
  },
6354
- o.icon ? /* @__PURE__ */ React54.createElement(Icon, { name: o.icon }) : null,
6355
- o.iconOnly ? null : /* @__PURE__ */ React54.createElement("span", null, o.label)
6632
+ o.icon ? /* @__PURE__ */ React56.createElement(Icon, { name: o.icon }) : null,
6633
+ o.iconOnly ? null : /* @__PURE__ */ React56.createElement("span", null, o.label)
6356
6634
  );
6357
6635
  })
6358
6636
  );