@jirawatpyk/aura-react 5.7.3 → 5.8.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.
@@ -100,6 +100,7 @@ __export(index_exports, {
100
100
  Tr: () => Tr,
101
101
  brandScale: () => scale,
102
102
  breakpoints: () => breakpoints,
103
+ buttonClass: () => buttonClass,
103
104
  colorSchemeScript: () => colorSchemeScript,
104
105
  comboboxFilter: () => defaultFilter,
105
106
  contrast: () => contrast,
@@ -122,10 +123,9 @@ __export(index_exports, {
122
123
  module.exports = __toCommonJS(index_exports);
123
124
 
124
125
  // src/Icon.tsx
125
- var React2 = __toESM(require("react"), 1);
126
-
127
- // src/internal.tsx
128
126
  var React = __toESM(require("react"), 1);
127
+
128
+ // src/classes.ts
129
129
  function cx() {
130
130
  return Array.prototype.filter.call(arguments, Boolean).join(" ");
131
131
  }
@@ -136,18 +136,73 @@ function omit(src, keys) {
136
136
  out[k] = src[k];
137
137
  return out;
138
138
  }
139
+ var TONES = ["neutral", "accent", "success", "warning", "danger"];
140
+ function tone(t) {
141
+ return TONES.indexOf(t) >= 0 ? t : "neutral";
142
+ }
143
+
144
+ // src/Icon.tsx
145
+ var h = React.createElement;
146
+ var ICONS = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]], "server": [["rect", { "width": "20", "height": "8", "x": "2", "y": "2", "rx": "2", "ry": "2" }], ["rect", { "width": "20", "height": "8", "x": "2", "y": "14", "rx": "2", "ry": "2" }], ["line", { "x1": "6", "x2": "6.01", "y1": "6", "y2": "6" }], ["line", { "x1": "6", "x2": "6.01", "y1": "18", "y2": "18" }]], "globe": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { "d": "M2 12h20" }]], "activity": [["path", { "d": "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]], "shield-alert": [["path", { "d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { "d": "M12 8v4" }], ["path", { "d": "M12 16h.01" }]], "phone": [["path", { "d": "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]], "wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]] };
147
+ var SIZES = { sm: 16, md: 20, lg: 24 };
148
+ var Icon = React.forwardRef(function Icon2(props, ref) {
149
+ const size = SIZES[props.size] || props.size || 16;
150
+ if (React.isValidElement(props.name)) {
151
+ return /* @__PURE__ */ React.createElement(
152
+ "span",
153
+ {
154
+ className: cx("aura-icon", "aura-icon--custom", props.className),
155
+ style: { width: size, height: size, ["--aura-icon-stroke"]: props.strokeWidth || 2 },
156
+ ...props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true }
157
+ },
158
+ props.name
159
+ );
160
+ }
161
+ const shapes = ICONS[props.name];
162
+ if (!shapes) return null;
163
+ const a11y = props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true, focusable: "false" };
164
+ return /* @__PURE__ */ React.createElement(
165
+ "svg",
166
+ {
167
+ ref,
168
+ xmlns: "http://www.w3.org/2000/svg",
169
+ width: size,
170
+ height: size,
171
+ viewBox: "0 0 24 24",
172
+ fill: "none",
173
+ stroke: "currentColor",
174
+ strokeWidth: props.strokeWidth || 2,
175
+ strokeLinecap: "round",
176
+ strokeLinejoin: "round",
177
+ className: cx("aura-icon", props.className),
178
+ ...a11y
179
+ },
180
+ shapes.map(function(s, i) {
181
+ const attrs = { key: i };
182
+ for (const k in s[1]) attrs[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
183
+ return h(s[0], attrs);
184
+ })
185
+ );
186
+ });
187
+ var iconNames = Object.keys(ICONS);
188
+
189
+ // src/Button.tsx
190
+ var React5 = __toESM(require("react"), 1);
191
+
192
+ // src/internal.tsx
193
+ var React2 = __toESM(require("react"), 1);
139
194
  function useMaybeControlled(value, initial, onChange) {
140
- const s = React.useState(initial);
141
- const wasSet = React.useState(value !== void 0);
195
+ const s = React2.useState(initial);
196
+ const wasSet = React2.useState(value !== void 0);
142
197
  if (value !== void 0 && !wasSet[0]) wasSet[1](true);
143
198
  else if (value === void 0 && wasSet[0]) {
144
199
  wasSet[1](false);
145
200
  s[1](initial);
146
201
  }
147
202
  const controlled = value !== void 0;
148
- const latest = React.useRef({ controlled, onChange, set: s[1] });
203
+ const latest = React2.useRef({ controlled, onChange, set: s[1] });
149
204
  latest.current = { controlled, onChange, set: s[1] };
150
- const set = React.useCallback(function(next) {
205
+ const set = React2.useCallback(function(next) {
151
206
  const l = latest.current;
152
207
  if (!l.controlled) l.set(next);
153
208
  if (l.onChange) l.onChange(next);
@@ -162,8 +217,8 @@ function compare(a, b) {
162
217
  if (typeof a === "number" && typeof b === "number") return a - b;
163
218
  return collator ? collator.compare(String(a), String(b)) : String(a).localeCompare(String(b));
164
219
  }
165
- var uid = React.useId || function() {
166
- const r = React.useRef(null);
220
+ var uid = React2.useId || function() {
221
+ const r = React2.useRef(null);
167
222
  if (!r.current) r.current = "aura-" + Math.random().toString(36).slice(2, 9);
168
223
  return r.current;
169
224
  };
@@ -179,9 +234,9 @@ function no() {
179
234
  return false;
180
235
  }
181
236
  function useMounted() {
182
- return React.useSyncExternalStore(noopSubscribe, yes, no);
237
+ return React2.useSyncExternalStore(noopSubscribe, yes, no);
183
238
  }
184
- var useIsoLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
239
+ var useIsoLayoutEffect = typeof window !== "undefined" ? React2.useLayoutEffect : React2.useEffect;
185
240
  function trapTab(e, container) {
186
241
  if (e.key !== "Tab" || !container) return;
187
242
  const list = Array.prototype.filter.call(
@@ -201,7 +256,7 @@ function trapTab(e, container) {
201
256
  }
202
257
  }
203
258
  function useMergedRef(a, b) {
204
- return React.useCallback(
259
+ return React2.useCallback(
205
260
  function(node) {
206
261
  [a, b].forEach(function(r) {
207
262
  if (!r) return;
@@ -212,10 +267,6 @@ function useMergedRef(a, b) {
212
267
  [a, b]
213
268
  );
214
269
  }
215
- var TONES = ["neutral", "accent", "success", "warning", "danger"];
216
- function tone(t) {
217
- return TONES.indexOf(t) >= 0 ? t : "neutral";
218
- }
219
270
  var warned = {};
220
271
  function plainClick(e) {
221
272
  return !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey;
@@ -233,56 +284,138 @@ function devWarnOnce(key, message) {
233
284
  console.warn("[AURA] " + message);
234
285
  }
235
286
 
236
- // src/Icon.tsx
237
- var h = React2.createElement;
238
- var ICONS = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]], "server": [["rect", { "width": "20", "height": "8", "x": "2", "y": "2", "rx": "2", "ry": "2" }], ["rect", { "width": "20", "height": "8", "x": "2", "y": "14", "rx": "2", "ry": "2" }], ["line", { "x1": "6", "x2": "6.01", "y1": "6", "y2": "6" }], ["line", { "x1": "6", "x2": "6.01", "y1": "18", "y2": "18" }]], "globe": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { "d": "M2 12h20" }]], "activity": [["path", { "d": "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]], "shield-alert": [["path", { "d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { "d": "M12 8v4" }], ["path", { "d": "M12 16h.01" }]], "phone": [["path", { "d": "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]], "wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]] };
239
- var SIZES = { sm: 16, md: 20, lg: 24 };
240
- var Icon = React2.forwardRef(function Icon2(props, ref) {
241
- const size = SIZES[props.size] || props.size || 16;
242
- if (React2.isValidElement(props.name)) {
243
- return /* @__PURE__ */ React2.createElement(
244
- "span",
245
- {
246
- className: cx("aura-icon", "aura-icon--custom", props.className),
247
- style: { width: size, height: size, ["--aura-icon-stroke"]: props.strokeWidth || 2 },
248
- ...props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true }
249
- },
250
- props.name
251
- );
252
- }
253
- const shapes = ICONS[props.name];
254
- if (!shapes) return null;
255
- const a11y = props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true, focusable: "false" };
256
- return /* @__PURE__ */ React2.createElement(
257
- "svg",
287
+ // src/display.tsx
288
+ var React3 = __toESM(require("react"), 1);
289
+
290
+ // src/status.ts
291
+ var TONE_WORDS = {
292
+ ready: ["ready", "done", "complete", "completed", "approved", "live", "passed"],
293
+ progress: ["in progress", "in review", "review", "syncing", "running", "pending"],
294
+ warning: ["warning", "problem", "degraded", "at risk"],
295
+ blocked: ["blocked", "failed", "error", "rejected", "on hold", "cancelled"]
296
+ };
297
+ function toneFor(status) {
298
+ const s = String(status == null ? "" : status).trim().toLowerCase();
299
+ for (const t in TONE_WORDS) if (TONE_WORDS[t].indexOf(s) >= 0) return t;
300
+ return "neutral";
301
+ }
302
+ var TONE_ORDER = { neutral: 0, progress: 1, ready: 2, warning: 3, blocked: 4 };
303
+
304
+ // src/display.tsx
305
+ var h2 = React3.createElement;
306
+ var ALERT_ICON = {
307
+ info: "info",
308
+ success: "circle-check",
309
+ warning: "triangle-alert",
310
+ danger: "circle-alert"
311
+ };
312
+ function alertElement(props, ref, close) {
313
+ const tone2 = props.tone || "info";
314
+ const rest = omit(props, ["tone", "title", "children", "action", "onDismiss", "className", "role", "icon"]);
315
+ return /* @__PURE__ */ React3.createElement(
316
+ "div",
258
317
  {
318
+ ...rest,
259
319
  ref,
260
- xmlns: "http://www.w3.org/2000/svg",
261
- width: size,
262
- height: size,
263
- viewBox: "0 0 24 24",
264
- fill: "none",
265
- stroke: "currentColor",
266
- strokeWidth: props.strokeWidth || 2,
267
- strokeLinecap: "round",
268
- strokeLinejoin: "round",
269
- className: cx("aura-icon", props.className),
270
- ...a11y
320
+ className: cx("aura-alert", "aura-alert--" + tone2, props.className),
321
+ role: props.role || (tone2 === "danger" || tone2 === "warning" ? "alert" : "status")
271
322
  },
272
- shapes.map(function(s, i) {
273
- const attrs = { key: i };
274
- for (const k in s[1]) attrs[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
275
- return h(s[0], attrs);
276
- })
323
+ /* @__PURE__ */ React3.createElement(Icon, { name: props.icon || ALERT_ICON[tone2], className: "aura-alert__icon" }),
324
+ /* @__PURE__ */ React3.createElement("div", { className: "aura-alert__body" }, props.title ? /* @__PURE__ */ React3.createElement("p", { className: "aura-alert__title" }, props.title) : null, props.children ? /* @__PURE__ */ React3.createElement("div", { className: "aura-alert__text" }, props.children) : null, props.action ? /* @__PURE__ */ React3.createElement("div", { className: "aura-alert__action" }, props.action) : null),
325
+ close
277
326
  );
278
- });
279
- var iconNames = Object.keys(ICONS);
280
-
281
- // src/Button.tsx
282
- var React4 = __toESM(require("react"), 1);
327
+ }
328
+ function cardElement(props, ref) {
329
+ const creative = props.variant === "creative";
330
+ const rest = omit(props, [
331
+ "title",
332
+ "description",
333
+ "actions",
334
+ "footer",
335
+ "children",
336
+ "variant",
337
+ "headingLevel",
338
+ "interactive",
339
+ "as",
340
+ "className",
341
+ "titleId"
342
+ ]);
343
+ return h2(
344
+ props.as || "section",
345
+ Object.assign({}, rest, {
346
+ ref,
347
+ className: cx(
348
+ "aura-card",
349
+ creative && "aura-card--creative",
350
+ props.interactive && "is-interactive",
351
+ props.className
352
+ ),
353
+ /* A titled card is labelled by its title; otherwise the caller's aria-labelledby stays (5.8). */
354
+ "aria-labelledby": props.title && props.titleId ? props.titleId : props["aria-labelledby"]
355
+ }),
356
+ props.title || props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React3.createElement("div", { className: "aura-card__heading" }, props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
357
+ props.children ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__body" }, props.children) : null,
358
+ props.footer ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__foot" }, props.footer) : null
359
+ );
360
+ }
361
+ var PILL_ICON = {
362
+ neutral: "circle",
363
+ progress: "circle-dot-dashed",
364
+ ready: "circle-check",
365
+ warning: "triangle-alert",
366
+ blocked: "ban"
367
+ };
368
+ function statusPillElement(props, ref) {
369
+ const tone2 = props.tone || toneFor(props.children);
370
+ const rest = omit(props, ["tone", "className", "children"]);
371
+ return /* @__PURE__ */ React3.createElement("span", { ...rest, ref, className: cx("aura-pill", "aura-pill--" + tone2, props.className) }, /* @__PURE__ */ React3.createElement(Icon, { name: PILL_ICON[tone2] || "circle", size: 12 }), props.children);
372
+ }
373
+ function badgeElement(props, ref) {
374
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
375
+ return /* @__PURE__ */ React3.createElement(
376
+ "span",
377
+ {
378
+ ...rest,
379
+ ref,
380
+ className: cx(
381
+ "aura-badge",
382
+ "aura-badge--" + tone(props.tone),
383
+ props.variant === "solid" && "is-solid",
384
+ props.variant === "outline" && "is-outline",
385
+ props.className
386
+ )
387
+ },
388
+ props.icon ? /* @__PURE__ */ React3.createElement(Icon, { name: props.icon, size: 12 }) : null,
389
+ props.children
390
+ );
391
+ }
392
+ function emptyStateElement(props, ref) {
393
+ const HT = "h" + (props.headingLevel || 3);
394
+ return /* @__PURE__ */ React3.createElement(
395
+ "div",
396
+ {
397
+ ref,
398
+ className: cx("aura-empty", props.size === "sm" && "is-sm", props.bordered && "is-bordered", props.className)
399
+ },
400
+ /* @__PURE__ */ React3.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React3.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
401
+ /* @__PURE__ */ React3.createElement(HT, { className: "aura-empty__title" }, props.title),
402
+ props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-empty__text" }, props.description) : null,
403
+ props.action ? /* @__PURE__ */ React3.createElement("div", { className: "aura-empty__action" }, props.action) : null
404
+ );
405
+ }
406
+ function buttonClass(opts = {}) {
407
+ return cx(
408
+ "aura-btn",
409
+ "aura-btn--" + (opts.variant || "primary"),
410
+ opts.size === "sm" && "aura-btn--sm",
411
+ opts.fullWidth && "aura-btn--full",
412
+ opts.loading && "is-loading",
413
+ opts.className
414
+ );
415
+ }
283
416
 
284
417
  // src/locale.tsx
285
- var React3 = __toESM(require("react"), 1);
418
+ var React4 = __toESM(require("react"), 1);
286
419
 
287
420
  // src/strings.ts
288
421
  var n = function(x) {
@@ -658,12 +791,12 @@ var STRINGS = {
658
791
  };
659
792
 
660
793
  // src/locale.tsx
661
- var LocaleContext = React3.createContext(null);
794
+ var LocaleContext = React4.createContext(null);
662
795
  function AuraProvider(props) {
663
- const outer = React3.useContext(LocaleContext);
796
+ const outer = React4.useContext(LocaleContext);
664
797
  const density = props.density || outer && outer.density || null;
665
798
  const timeZone = props.timeZone || outer && outer.timeZone || null;
666
- const value = React3.useMemo(
799
+ const value = React4.useMemo(
667
800
  function() {
668
801
  const own = !!props.locale || !outer || !outer.locale;
669
802
  const base = own ? props.locale && STRINGS[props.locale] || STRINGS.en : outer.strings;
@@ -678,17 +811,17 @@ function AuraProvider(props) {
678
811
  },
679
812
  [props.locale, props.calendar, props.strings, props.linkComponent, density, timeZone, outer]
680
813
  );
681
- return /* @__PURE__ */ React3.createElement(LocaleContext.Provider, { value }, props.density ? /* @__PURE__ */ React3.createElement("div", { className: "aura-density", "data-density": props.density }, props.children) : props.children);
814
+ return /* @__PURE__ */ React4.createElement(LocaleContext.Provider, { value }, props.density ? /* @__PURE__ */ React4.createElement("div", { className: "aura-density", "data-density": props.density }, props.children) : props.children);
682
815
  }
683
816
  function useAuraLocale() {
684
- return React3.useContext(LocaleContext) || { locale: null, calendar: null, strings: STRINGS.en };
817
+ return React4.useContext(LocaleContext) || { locale: null, calendar: null, strings: STRINGS.en };
685
818
  }
686
819
  function useLinkComponent(own) {
687
- const ctx = React3.useContext(LocaleContext);
820
+ const ctx = React4.useContext(LocaleContext);
688
821
  return own || ctx && ctx.linkComponent || "a";
689
822
  }
690
823
  function useDensity() {
691
- const ctx = React3.useContext(LocaleContext);
824
+ const ctx = React4.useContext(LocaleContext);
692
825
  return ctx && ctx.density || void 0;
693
826
  }
694
827
  function useStrings() {
@@ -712,7 +845,7 @@ function ButtonLink(props, ref, Link) {
712
845
  "size"
713
846
  ]);
714
847
  const Tag3 = disabled ? "a" : Link;
715
- return /* @__PURE__ */ React4.createElement(
848
+ return /* @__PURE__ */ React5.createElement(
716
849
  Tag3,
717
850
  {
718
851
  ...rest,
@@ -721,21 +854,20 @@ function ButtonLink(props, ref, Link) {
721
854
  role: disabled ? "link" : void 0,
722
855
  "aria-disabled": disabled || void 0,
723
856
  tabIndex: disabled ? -1 : props.tabIndex,
724
- className: cx(
725
- "aura-btn",
726
- "aura-btn--" + variant,
727
- props.size === "sm" && "aura-btn--sm",
728
- props.fullWidth && "aura-btn--full",
729
- props.className
730
- ),
857
+ className: buttonClass({
858
+ variant,
859
+ size: props.size,
860
+ fullWidth: props.fullWidth,
861
+ className: props.className
862
+ }),
731
863
  onClick: disabled ? void 0 : props.onClick
732
864
  },
733
- props.icon ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon }) : null,
865
+ props.icon ? /* @__PURE__ */ React5.createElement(Icon, { name: props.icon }) : null,
734
866
  props.children,
735
- props.iconRight ? /* @__PURE__ */ React4.createElement(Icon, { name: props.iconRight }) : null
867
+ props.iconRight ? /* @__PURE__ */ React5.createElement(Icon, { name: props.iconRight }) : null
736
868
  );
737
869
  }
738
- var Button = React4.forwardRef(
870
+ var Button = React5.forwardRef(
739
871
  function Button2(all, ref) {
740
872
  const Link = useLinkComponent(all.linkComponent);
741
873
  if (typeof all.href === "string") {
@@ -756,38 +888,37 @@ var Button = React4.forwardRef(
756
888
  "fullWidth",
757
889
  "size"
758
890
  ]);
759
- return /* @__PURE__ */ React4.createElement(
891
+ return /* @__PURE__ */ React5.createElement(
760
892
  "button",
761
893
  {
762
894
  ...rest,
763
895
  ref,
764
896
  type: props.type || "button",
765
- className: cx(
766
- "aura-btn",
767
- "aura-btn--" + variant,
768
- props.size === "sm" && "aura-btn--sm",
769
- props.fullWidth && "aura-btn--full",
770
- loading && "is-loading",
771
- props.className
772
- ),
897
+ className: buttonClass({
898
+ variant,
899
+ size: props.size,
900
+ fullWidth: props.fullWidth,
901
+ loading,
902
+ className: props.className
903
+ }),
773
904
  "aria-busy": loading || void 0,
774
905
  "aria-disabled": loading || void 0,
775
906
  onClick: loading ? function(e) {
776
907
  e.preventDefault();
777
908
  } : props.onClick
778
909
  },
779
- loading ? /* @__PURE__ */ React4.createElement(Icon, { name: "loader-circle", className: "aura-spin" }) : props.icon ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon }) : null,
910
+ loading ? /* @__PURE__ */ React5.createElement(Icon, { name: "loader-circle", className: "aura-spin" }) : props.icon ? /* @__PURE__ */ React5.createElement(Icon, { name: props.icon }) : null,
780
911
  props.children,
781
- props.iconRight && !loading ? /* @__PURE__ */ React4.createElement(Icon, { name: props.iconRight }) : null
912
+ props.iconRight && !loading ? /* @__PURE__ */ React5.createElement(Icon, { name: props.iconRight }) : null
782
913
  );
783
914
  }
784
915
  );
785
916
 
786
917
  // src/IconButton.tsx
787
- var React5 = __toESM(require("react"), 1);
788
- var IconButton = React5.forwardRef(function IconButton2(props, ref) {
918
+ var React6 = __toESM(require("react"), 1);
919
+ var IconButton = React6.forwardRef(function IconButton2(props, ref) {
789
920
  const rest = omit(props, ["icon", "label", "className", "size", "tone"]);
790
- return /* @__PURE__ */ React5.createElement(
921
+ return /* @__PURE__ */ React6.createElement(
791
922
  "button",
792
923
  {
793
924
  ...rest,
@@ -797,16 +928,16 @@ var IconButton = React5.forwardRef(function IconButton2(props, ref) {
797
928
  title: props.label,
798
929
  className: cx("aura-icon-btn", props.tone === "danger" && "aura-icon-btn--danger", props.className)
799
930
  },
800
- /* @__PURE__ */ React5.createElement(Icon, { name: props.icon, size: props.size || "sm" })
931
+ /* @__PURE__ */ React6.createElement(Icon, { name: props.icon, size: props.size || "sm" })
801
932
  );
802
933
  });
803
934
 
804
935
  // src/Menu.tsx
805
- var React6 = __toESM(require("react"), 1);
936
+ var React7 = __toESM(require("react"), 1);
806
937
  var import_react_dom = require("react-dom");
807
- var Menu = React6.forwardRef(function Menu2(props, ref) {
808
- const own = React6.useRef(null), merged = useMergedRef(ref, own);
809
- const posState = React6.useState(null);
938
+ var Menu = React7.forwardRef(function Menu2(props, ref) {
939
+ const own = React7.useRef(null), merged = useMergedRef(ref, own);
940
+ const posState = React7.useState(null);
810
941
  const pos = posState[0], setPos = posState[1];
811
942
  const items2 = props.items || [];
812
943
  const mounted = useMounted();
@@ -831,8 +962,8 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
831
962
  },
832
963
  [props.anchor, mounted, hasHeader]
833
964
  );
834
- const hadHeader = React6.useRef(hasHeader);
835
- React6.useEffect(
965
+ const hadHeader = React7.useRef(hasHeader);
966
+ React7.useEffect(
836
967
  function() {
837
968
  if (hadHeader.current === hasHeader) return;
838
969
  hadHeader.current = hasHeader;
@@ -844,7 +975,7 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
844
975
  },
845
976
  [hasHeader]
846
977
  );
847
- React6.useEffect(
978
+ React7.useEffect(
848
979
  function() {
849
980
  if (!mounted) return;
850
981
  const first = own.current && own.current.querySelector('[role^="menuitem"]:not([disabled])');
@@ -906,18 +1037,18 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
906
1037
  return out;
907
1038
  }
908
1039
  function renderItem(it, i) {
909
- if (it.separator) return /* @__PURE__ */ React6.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
1040
+ if (it.separator) return /* @__PURE__ */ React7.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
910
1041
  const isRadio = it.type === "radio";
911
1042
  const isCheck = !isRadio && it.checked !== void 0;
912
- 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" });
1043
+ const lead = isRadio ? /* @__PURE__ */ React7.createElement("span", { className: cx("aura-menu__radio", it.checked && "is-on") }) : isCheck ? /* @__PURE__ */ React7.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React7.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React7.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React7.createElement("span", { className: "aura-menu__blank" });
913
1044
  const body = [
914
- /* @__PURE__ */ React6.createElement(React6.Fragment, { key: "l" }, lead),
915
- /* @__PURE__ */ React6.createElement("span", { key: "t", className: "aura-menu__label" }, it.label),
916
- it.hint ? /* @__PURE__ */ React6.createElement("span", { key: "h", className: "aura-menu__hint" }, it.hint) : null
1045
+ /* @__PURE__ */ React7.createElement(React7.Fragment, { key: "l" }, lead),
1046
+ /* @__PURE__ */ React7.createElement("span", { key: "t", className: "aura-menu__label" }, it.label),
1047
+ it.hint ? /* @__PURE__ */ React7.createElement("span", { key: "h", className: "aura-menu__hint" }, it.hint) : null
917
1048
  ];
918
1049
  const cls = cx("aura-menu__item", it.tone === "danger" && "aura-menu__item--danger");
919
1050
  if (it.href && !it.disabled)
920
- return /* @__PURE__ */ React6.createElement(
1051
+ return /* @__PURE__ */ React7.createElement(
921
1052
  Link,
922
1053
  {
923
1054
  key: i,
@@ -934,7 +1065,7 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
934
1065
  },
935
1066
  body
936
1067
  );
937
- return /* @__PURE__ */ React6.createElement(
1068
+ return /* @__PURE__ */ React7.createElement(
938
1069
  "button",
939
1070
  {
940
1071
  key: i,
@@ -961,9 +1092,9 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
961
1092
  const rendered = block.items.map(function(x) {
962
1093
  return renderItem(x.it, x.i);
963
1094
  });
964
- 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);
1095
+ return block.group ? /* @__PURE__ */ React7.createElement("div", { key: "g" + bi, role: "group", "aria-label": block.group, className: "aura-menu__group" }, rendered) : /* @__PURE__ */ React7.createElement(React7.Fragment, { key: "f" + bi }, rendered);
965
1096
  });
966
- const el = hasHeader ? /* @__PURE__ */ React6.createElement("div", { ref: merged, className: "aura-menu has-header", onKeyDown, style }, /* @__PURE__ */ React6.createElement(
1097
+ const el = hasHeader ? /* @__PURE__ */ React7.createElement("div", { ref: merged, className: "aura-menu has-header", onKeyDown, style }, /* @__PURE__ */ React7.createElement(
967
1098
  "div",
968
1099
  {
969
1100
  className: "aura-menu__header",
@@ -973,18 +1104,18 @@ var Menu = React6.forwardRef(function Menu2(props, ref) {
973
1104
  }
974
1105
  },
975
1106
  props.header
976
- ), /* @__PURE__ */ React6.createElement("div", { role: "menu", "aria-label": props.label, "aria-describedby": headerId, className: "aura-menu__list" }, list)) : /* @__PURE__ */ React6.createElement("div", { ref: merged, role: "menu", "aria-label": props.label, className: "aura-menu", onKeyDown, style }, list);
1107
+ ), /* @__PURE__ */ React7.createElement("div", { role: "menu", "aria-label": props.label, "aria-describedby": headerId, className: "aura-menu__list" }, list)) : /* @__PURE__ */ React7.createElement("div", { ref: merged, role: "menu", "aria-label": props.label, className: "aura-menu", onKeyDown, style }, list);
977
1108
  return mounted ? (0, import_react_dom.createPortal)(el, document.body) : null;
978
1109
  });
979
1110
 
980
1111
  // src/DropdownMenu.tsx
981
- var React7 = __toESM(require("react"), 1);
982
- var DropdownMenu = React7.forwardRef(function DropdownMenu2(props, ref) {
983
- const st = React7.useState(null), anchor = st[0], setAnchor = st[1];
984
- const wrap = React7.useRef(null), wrapMerged = useMergedRef(ref, wrap);
985
- const child = React7.Children.only(props.trigger);
986
- const menuRef = React7.useRef(null), toLast = React7.useRef(false);
987
- React7.useEffect(
1112
+ var React8 = __toESM(require("react"), 1);
1113
+ var DropdownMenu = React8.forwardRef(function DropdownMenu2(props, ref) {
1114
+ const st = React8.useState(null), anchor = st[0], setAnchor = st[1];
1115
+ const wrap = React8.useRef(null), wrapMerged = useMergedRef(ref, wrap);
1116
+ const child = React8.Children.only(props.trigger);
1117
+ const menuRef = React8.useRef(null), toLast = React8.useRef(false);
1118
+ React8.useEffect(
988
1119
  function() {
989
1120
  if (!anchor || !toLast.current || !menuRef.current) return;
990
1121
  toLast.current = false;
@@ -1005,7 +1136,7 @@ var DropdownMenu = React7.forwardRef(function DropdownMenu2(props, ref) {
1005
1136
  setAnchor(wrap.current.querySelector('button, [role="button"], a') || wrap.current);
1006
1137
  }
1007
1138
  }
1008
- return /* @__PURE__ */ React7.createElement("span", { ref: wrapMerged, className: "aura-dropdown", onKeyDown }, React7.cloneElement(child, { onClick: toggle, "aria-haspopup": "menu", "aria-expanded": anchor ? true : false }), anchor ? /* @__PURE__ */ React7.createElement(
1139
+ return /* @__PURE__ */ React8.createElement("span", { ref: wrapMerged, className: "aura-dropdown", onKeyDown }, React8.cloneElement(child, { onClick: toggle, "aria-haspopup": "menu", "aria-expanded": anchor ? true : false }), anchor ? /* @__PURE__ */ React8.createElement(
1009
1140
  Menu,
1010
1141
  {
1011
1142
  ref: menuRef,
@@ -1023,13 +1154,13 @@ var DropdownMenu = React7.forwardRef(function DropdownMenu2(props, ref) {
1023
1154
  });
1024
1155
 
1025
1156
  // src/Checkbox.tsx
1026
- var React8 = __toESM(require("react"), 1);
1027
- var Checkbox = React8.forwardRef(function Checkbox2(props, ref) {
1028
- const own = React8.useRef(null), merged = useMergedRef(ref, own);
1157
+ var React9 = __toESM(require("react"), 1);
1158
+ var Checkbox = React9.forwardRef(function Checkbox2(props, ref) {
1159
+ const own = React9.useRef(null), merged = useMergedRef(ref, own);
1029
1160
  const st = useMaybeControlled(props.checked, !!props.defaultChecked, props.onChange);
1030
1161
  const on = !!st[0];
1031
1162
  const auto = uid();
1032
- React8.useEffect(function() {
1163
+ React9.useEffect(function() {
1033
1164
  if (own.current) own.current.indeterminate = !!props.indeterminate;
1034
1165
  });
1035
1166
  const rest = omit(props, [
@@ -1045,15 +1176,15 @@ var Checkbox = React8.forwardRef(function Checkbox2(props, ref) {
1045
1176
  "tabIndex",
1046
1177
  "disabled"
1047
1178
  ]);
1048
- const text = props.children;
1049
- const labelled = text != null && text !== "";
1179
+ const text2 = props.children;
1180
+ const labelled = text2 != null && text2 !== "";
1050
1181
  if (!labelled && props.label && !props.hideLabel)
1051
1182
  devWarnOnce(
1052
1183
  "checkbox-label",
1053
1184
  "Checkbox `label` is only the accessible name: it is not shown. In 6.0 it will be shown beside the box, like Switch and TextField. For visible text now pass it as children; for a bare box (a table row) add `hideLabel`."
1054
1185
  );
1055
1186
  const descId = props.description ? (props.id || auto) + "-desc" : void 0;
1056
- return /* @__PURE__ */ React8.createElement(
1187
+ return /* @__PURE__ */ React9.createElement(
1057
1188
  "label",
1058
1189
  {
1059
1190
  className: cx("aura-check", labelled && "aura-check--labelled", props.disabled && "is-disabled", props.className),
@@ -1061,7 +1192,7 @@ var Checkbox = React8.forwardRef(function Checkbox2(props, ref) {
1061
1192
  e.stopPropagation();
1062
1193
  }
1063
1194
  },
1064
- /* @__PURE__ */ React8.createElement(
1195
+ /* @__PURE__ */ React9.createElement(
1065
1196
  "input",
1066
1197
  {
1067
1198
  ...rest,
@@ -1078,62 +1209,38 @@ var Checkbox = React8.forwardRef(function Checkbox2(props, ref) {
1078
1209
  }
1079
1210
  }
1080
1211
  ),
1081
- /* @__PURE__ */ React8.createElement("span", { className: "aura-check__box", "aria-hidden": true }, props.indeterminate ? /* @__PURE__ */ React8.createElement(Icon, { name: "minus", size: 12, strokeWidth: 3 }) : on ? /* @__PURE__ */ React8.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null),
1082
- !labelled && props.description ? /* @__PURE__ */ React8.createElement("span", { className: "aura-sr-only", id: descId }, props.description) : null,
1083
- labelled ? /* @__PURE__ */ React8.createElement("span", { className: "aura-check__text" }, /* @__PURE__ */ React8.createElement("span", { className: "aura-check__label" }, text), props.description ? /* @__PURE__ */ React8.createElement("span", { className: "aura-check__desc", id: descId }, props.description) : null) : null
1212
+ /* @__PURE__ */ React9.createElement("span", { className: "aura-check__box", "aria-hidden": true }, props.indeterminate ? /* @__PURE__ */ React9.createElement(Icon, { name: "minus", size: 12, strokeWidth: 3 }) : on ? /* @__PURE__ */ React9.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null),
1213
+ !labelled && props.description ? /* @__PURE__ */ React9.createElement("span", { className: "aura-sr-only", id: descId }, props.description) : null,
1214
+ labelled ? /* @__PURE__ */ React9.createElement("span", { className: "aura-check__text" }, /* @__PURE__ */ React9.createElement("span", { className: "aura-check__label" }, text2), props.description ? /* @__PURE__ */ React9.createElement("span", { className: "aura-check__desc", id: descId }, props.description) : null) : null
1084
1215
  );
1085
1216
  });
1086
1217
 
1087
1218
  // src/StatusPill.tsx
1088
- var React9 = __toESM(require("react"), 1);
1089
-
1090
- // src/status.ts
1091
- var TONE_WORDS = {
1092
- ready: ["ready", "done", "complete", "completed", "approved", "live", "passed"],
1093
- progress: ["in progress", "in review", "review", "syncing", "running", "pending"],
1094
- warning: ["warning", "problem", "degraded", "at risk"],
1095
- blocked: ["blocked", "failed", "error", "rejected", "on hold", "cancelled"]
1096
- };
1097
- function toneFor(status) {
1098
- const s = String(status == null ? "" : status).trim().toLowerCase();
1099
- for (const t in TONE_WORDS) if (TONE_WORDS[t].indexOf(s) >= 0) return t;
1100
- return "neutral";
1101
- }
1102
- var TONE_ORDER = { neutral: 0, progress: 1, ready: 2, warning: 3, blocked: 4 };
1103
-
1104
- // src/StatusPill.tsx
1105
- var TONE_ICON = {
1106
- neutral: "circle",
1107
- progress: "circle-dot-dashed",
1108
- ready: "circle-check",
1109
- warning: "triangle-alert",
1110
- blocked: "ban"
1111
- };
1112
- var StatusPill = React9.forwardRef(function StatusPill2(props, ref) {
1113
- const tone2 = props.tone || toneFor(props.children);
1114
- return /* @__PURE__ */ React9.createElement("span", { ref, className: cx("aura-pill", "aura-pill--" + tone2, props.className) }, /* @__PURE__ */ React9.createElement(Icon, { name: TONE_ICON[tone2] || "circle", size: 12 }), props.children);
1219
+ var React10 = __toESM(require("react"), 1);
1220
+ var StatusPill = React10.forwardRef(function StatusPill2(props, ref) {
1221
+ return statusPillElement(props, ref);
1115
1222
  });
1116
1223
 
1117
1224
  // src/Field.tsx
1118
- var React10 = __toESM(require("react"), 1);
1119
- var h2 = React10.createElement;
1120
- var Field = React10.forwardRef(function Field2(props, ref) {
1225
+ var React11 = __toESM(require("react"), 1);
1226
+ var h3 = React11.createElement;
1227
+ var Field = React11.forwardRef(function Field2(props, ref) {
1121
1228
  const t = useStrings();
1122
- return /* @__PURE__ */ React10.createElement(
1229
+ return /* @__PURE__ */ React11.createElement(
1123
1230
  "div",
1124
1231
  {
1125
1232
  ref,
1126
1233
  className: cx("aura-field", props.error && "is-invalid", props.disabled && "is-disabled", props.className)
1127
1234
  },
1128
- props.label ? h2(
1235
+ props.label ? h3(
1129
1236
  props.labelAs || "label",
1130
1237
  { className: "aura-field__label", htmlFor: props.labelAs ? void 0 : props.id, id: props.labelId },
1131
1238
  props.label,
1132
- props.required ? /* @__PURE__ */ React10.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *") : null,
1133
- props.optional ? /* @__PURE__ */ React10.createElement("span", { className: "aura-field__opt" }, " (" + t.optional + ")") : null
1239
+ props.required ? /* @__PURE__ */ React11.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *") : null,
1240
+ props.optional ? /* @__PURE__ */ React11.createElement("span", { className: "aura-field__opt" }, " (" + t.optional + ")") : null
1134
1241
  ) : null,
1135
1242
  props.children,
1136
- props.error ? /* @__PURE__ */ React10.createElement("p", { className: "aura-field__error", id: props.id + "-error" }, /* @__PURE__ */ React10.createElement(Icon, { name: "circle-alert", size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React10.createElement("p", { className: "aura-field__hint", id: props.id + "-hint" }, props.hint) : null
1243
+ props.error ? /* @__PURE__ */ React11.createElement("p", { className: "aura-field__error", id: props.id + "-error" }, /* @__PURE__ */ React11.createElement(Icon, { name: "circle-alert", size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React11.createElement("p", { className: "aura-field__hint", id: props.id + "-hint" }, props.hint) : null
1137
1244
  );
1138
1245
  });
1139
1246
  function describedBy(id, p) {
@@ -1154,11 +1261,11 @@ var FIELD_KEYS = [
1154
1261
  ];
1155
1262
 
1156
1263
  // src/TextField.tsx
1157
- var React11 = __toESM(require("react"), 1);
1158
- var TextField = React11.forwardRef(function TextField2(props, ref) {
1264
+ var React12 = __toESM(require("react"), 1);
1265
+ var TextField = React12.forwardRef(function TextField2(props, ref) {
1159
1266
  const auto = uid(), id = props.id || auto;
1160
1267
  const rest = omit(props, FIELD_KEYS);
1161
- return /* @__PURE__ */ React11.createElement(
1268
+ return /* @__PURE__ */ React12.createElement(
1162
1269
  Field,
1163
1270
  {
1164
1271
  id,
@@ -1170,7 +1277,7 @@ var TextField = React11.forwardRef(function TextField2(props, ref) {
1170
1277
  disabled: props.disabled,
1171
1278
  className: props.className
1172
1279
  },
1173
- /* @__PURE__ */ React11.createElement("div", { className: cx("aura-input", props.icon && "has-icon", props.suffix && "has-suffix") }, props.icon ? /* @__PURE__ */ React11.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null, /* @__PURE__ */ React11.createElement(
1280
+ /* @__PURE__ */ React12.createElement("div", { className: cx("aura-input", props.icon && "has-icon", props.suffix && "has-suffix") }, props.icon ? /* @__PURE__ */ React12.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null, /* @__PURE__ */ React12.createElement(
1174
1281
  "input",
1175
1282
  {
1176
1283
  type: "text",
@@ -1183,16 +1290,16 @@ var TextField = React11.forwardRef(function TextField2(props, ref) {
1183
1290
  "aria-invalid": props.error ? true : rest["aria-invalid"],
1184
1291
  "aria-describedby": [describedBy(id, props), rest["aria-describedby"]].filter(Boolean).join(" ") || void 0
1185
1292
  }
1186
- ), props.suffix ? /* @__PURE__ */ React11.createElement("span", { className: "aura-input__suffix" }, props.suffix) : null)
1293
+ ), props.suffix ? /* @__PURE__ */ React12.createElement("span", { className: "aura-input__suffix" }, props.suffix) : null)
1187
1294
  );
1188
1295
  });
1189
1296
 
1190
1297
  // src/Textarea.tsx
1191
- var React12 = __toESM(require("react"), 1);
1192
- var Textarea = React12.forwardRef(function Textarea2(props, ref) {
1298
+ var React13 = __toESM(require("react"), 1);
1299
+ var Textarea = React13.forwardRef(function Textarea2(props, ref) {
1193
1300
  const auto = uid(), id = props.id || auto;
1194
1301
  const rest = omit(props, FIELD_KEYS);
1195
- return /* @__PURE__ */ React12.createElement(
1302
+ return /* @__PURE__ */ React13.createElement(
1196
1303
  Field,
1197
1304
  {
1198
1305
  id,
@@ -1204,7 +1311,7 @@ var Textarea = React12.forwardRef(function Textarea2(props, ref) {
1204
1311
  disabled: props.disabled,
1205
1312
  className: props.className
1206
1313
  },
1207
- /* @__PURE__ */ React12.createElement(
1314
+ /* @__PURE__ */ React13.createElement(
1208
1315
  "textarea",
1209
1316
  {
1210
1317
  rows: 4,
@@ -1222,9 +1329,9 @@ var Textarea = React12.forwardRef(function Textarea2(props, ref) {
1222
1329
  });
1223
1330
 
1224
1331
  // src/Select.tsx
1225
- var React13 = __toESM(require("react"), 1);
1332
+ var React14 = __toESM(require("react"), 1);
1226
1333
  var import_react_dom2 = require("react-dom");
1227
- var h3 = React13.createElement;
1334
+ var h4 = React14.createElement;
1228
1335
  var FORM_KEYS = ["name", "form", "value", "defaultValue", "disabled", "autoComplete", "onInput", "onInvalid"];
1229
1336
  var HANDLED_KEYS = FORM_KEYS.concat([
1230
1337
  "onChange",
@@ -1269,23 +1376,23 @@ function initialLabel(props) {
1269
1376
  if (hit) return { label: hit.label, empty: false };
1270
1377
  return { label: props.placeholder || "", empty: true };
1271
1378
  }
1272
- var Select = React13.forwardRef(function Select2(props, ref) {
1379
+ var Select = React14.forwardRef(function Select2(props, ref) {
1273
1380
  const auto = uid(), id = props.id || auto;
1274
1381
  const rest = omit(props, FIELD_KEYS.concat(["children"]));
1275
1382
  const opts = (props.options || []).map(function(o) {
1276
1383
  const v = typeof o === "object" ? o : { value: o, label: o };
1277
- return /* @__PURE__ */ React13.createElement("option", { key: v.value, value: v.value, disabled: v.disabled }, v.label);
1384
+ return /* @__PURE__ */ React14.createElement("option", { key: v.value, value: v.value, disabled: v.disabled }, v.label);
1278
1385
  });
1279
1386
  if (props.placeholder)
1280
1387
  opts.unshift(
1281
- /* @__PURE__ */ React13.createElement("option", { key: "__ph", value: "", disabled: true }, props.placeholder)
1388
+ /* @__PURE__ */ React14.createElement("option", { key: "__ph", value: "", disabled: true }, props.placeholder)
1282
1389
  );
1283
1390
  const extra = props.value === void 0 && props.defaultValue === void 0 && props.placeholder ? { defaultValue: "" } : {};
1284
1391
  const native = !!props.multiple || props.size != null && props.size > 1;
1285
1392
  const mounted = useMounted();
1286
1393
  const live = !native && mounted;
1287
1394
  const density = useDensity();
1288
- React13.useEffect(function() {
1395
+ React14.useEffect(function() {
1289
1396
  if (props.label || props["aria-label"] || props["aria-labelledby"] || props.title) return;
1290
1397
  if (document.querySelector('label[for="' + id.replace(/["\\]/g, "\\$&") + '"]')) return;
1291
1398
  devWarnOnce(
@@ -1293,16 +1400,16 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1293
1400
  "Select needs a label, aria-label or aria-labelledby: screen readers announce it with no name."
1294
1401
  );
1295
1402
  }, []);
1296
- const selRef = React13.useRef(null), trigRef = React13.useRef(null), listRef = React13.useRef(null);
1297
- const shown = React13.useState(function() {
1403
+ const selRef = React14.useRef(null), trigRef = React14.useRef(null), listRef = React14.useRef(null);
1404
+ const shown = React14.useState(function() {
1298
1405
  return initialLabel(props);
1299
1406
  });
1300
- const openState = React13.useState(false), open = openState[0];
1301
- const activeState = React13.useState(-1), active = activeState[0];
1302
- const items2 = React13.useState([]);
1303
- const pos = React13.useState(null);
1304
- const typed = React13.useRef({ text: "", at: 0 });
1305
- const sync = React13.useCallback(function() {
1407
+ const openState = React14.useState(false), open = openState[0];
1408
+ const activeState = React14.useState(-1), active = activeState[0];
1409
+ const items2 = React14.useState([]);
1410
+ const pos = React14.useState(null);
1411
+ const typed = React14.useRef({ text: "", at: 0 });
1412
+ const sync = React14.useCallback(function() {
1306
1413
  const el = selRef.current;
1307
1414
  if (!el) return;
1308
1415
  const o = el.selectedIndex >= 0 ? el.options[el.selectedIndex] : null;
@@ -1311,7 +1418,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1311
1418
  return cur.label === next.label && cur.empty === next.empty ? cur : next;
1312
1419
  });
1313
1420
  }, []);
1314
- const hook = React13.useCallback(
1421
+ const hook = React14.useCallback(
1315
1422
  function(el) {
1316
1423
  selRef.current = el;
1317
1424
  if (!el || native || el.__auraHooked) return;
@@ -1348,7 +1455,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1348
1455
  [native, sync]
1349
1456
  );
1350
1457
  const selMerged = useMergedRef(ref, hook);
1351
- React13.useEffect(
1458
+ React14.useEffect(
1352
1459
  function() {
1353
1460
  const f = selRef.current && selRef.current.form;
1354
1461
  if (!f || native) return;
@@ -1362,8 +1469,8 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1362
1469
  },
1363
1470
  [native, sync]
1364
1471
  );
1365
- const focusedOnce = React13.useRef(false);
1366
- React13.useEffect(
1472
+ const focusedOnce = React14.useRef(false);
1473
+ React14.useEffect(
1367
1474
  function() {
1368
1475
  if (!live || focusedOnce.current || !trigRef.current) return;
1369
1476
  focusedOnce.current = true;
@@ -1528,7 +1635,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1528
1635
  },
1529
1636
  [open]
1530
1637
  );
1531
- React13.useEffect(
1638
+ React14.useEffect(
1532
1639
  function() {
1533
1640
  if (!open || !listRef.current || active < 0) return;
1534
1641
  const el = listRef.current.querySelector('[data-idx="' + active + '"]');
@@ -1537,7 +1644,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1537
1644
  [open, active, pos[0] != null]
1538
1645
  );
1539
1646
  const described = [describedBy(id, props), rest["aria-describedby"]].filter(Boolean).join(" ") || void 0;
1540
- const field = (child) => /* @__PURE__ */ React13.createElement(
1647
+ const field = (child) => /* @__PURE__ */ React14.createElement(
1541
1648
  Field,
1542
1649
  {
1543
1650
  id,
@@ -1554,7 +1661,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1554
1661
  );
1555
1662
  if (!live)
1556
1663
  return field(
1557
- /* @__PURE__ */ React13.createElement("div", { className: cx("aura-input aura-select", props.icon && "has-icon") }, props.icon ? /* @__PURE__ */ React13.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null, h3(
1664
+ /* @__PURE__ */ React14.createElement("div", { className: cx("aura-input aura-select", props.icon && "has-icon") }, props.icon ? /* @__PURE__ */ React14.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null, h4(
1558
1665
  "select",
1559
1666
  Object.assign(extra, rest, {
1560
1667
  ref: native ? ref : selMerged,
@@ -1566,7 +1673,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1566
1673
  }),
1567
1674
  opts,
1568
1675
  props.children
1569
- ), /* @__PURE__ */ React13.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }))
1676
+ ), /* @__PURE__ */ React14.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }))
1570
1677
  );
1571
1678
  const listId = id + "-list", labelId = id + "-label";
1572
1679
  const optId = function(i) {
@@ -1576,7 +1683,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1576
1683
  const selIndex = selRef.current ? selRef.current.selectedIndex : -1;
1577
1684
  const option = function(it) {
1578
1685
  const sel = selIndex === it.index;
1579
- return /* @__PURE__ */ React13.createElement(
1686
+ return /* @__PURE__ */ React14.createElement(
1580
1687
  "div",
1581
1688
  {
1582
1689
  key: it.index,
@@ -1601,8 +1708,8 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1601
1708
  choose(it);
1602
1709
  }
1603
1710
  },
1604
- /* @__PURE__ */ React13.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React13.createElement("span", { className: "aura-combo__label" }, it.label)),
1605
- sel ? /* @__PURE__ */ React13.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
1711
+ /* @__PURE__ */ React14.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React14.createElement("span", { className: "aura-combo__label" }, it.label)),
1712
+ sel ? /* @__PURE__ */ React14.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
1606
1713
  );
1607
1714
  };
1608
1715
  const runs = [];
@@ -1613,7 +1720,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1613
1720
  else runs.push({ group: it.group, items: [it] });
1614
1721
  });
1615
1722
  const popup = open ? (0, import_react_dom2.createPortal)(
1616
- /* @__PURE__ */ React13.createElement(
1723
+ /* @__PURE__ */ React14.createElement(
1617
1724
  "div",
1618
1725
  {
1619
1726
  ref: listRef,
@@ -1627,7 +1734,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1627
1734
  maxHeight: pos[0].maxHeight
1628
1735
  } : { left: -9999, top: -9999 }
1629
1736
  },
1630
- /* @__PURE__ */ React13.createElement(
1737
+ /* @__PURE__ */ React14.createElement(
1631
1738
  "div",
1632
1739
  {
1633
1740
  id: listId,
@@ -1637,9 +1744,9 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1637
1744
  className: "aura-combo__list"
1638
1745
  },
1639
1746
  runs.map(function(r, n2) {
1640
- if (r.group === null) return /* @__PURE__ */ React13.createElement(React13.Fragment, { key: "r" + n2 }, r.items.map(option));
1747
+ if (r.group === null) return /* @__PURE__ */ React14.createElement(React14.Fragment, { key: "r" + n2 }, r.items.map(option));
1641
1748
  const gid = id + "-group-" + n2;
1642
- return /* @__PURE__ */ React13.createElement("div", { key: "r" + n2, role: "group", "aria-labelledby": gid }, /* @__PURE__ */ React13.createElement("div", { id: gid, className: "aura-select__group" }, r.group), r.items.map(option));
1749
+ return /* @__PURE__ */ React14.createElement("div", { key: "r" + n2, role: "group", "aria-labelledby": gid }, /* @__PURE__ */ React14.createElement("div", { id: gid, className: "aura-select__group" }, r.group), r.items.map(option));
1643
1750
  })
1644
1751
  )
1645
1752
  ),
@@ -1647,14 +1754,14 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1647
1754
  ) : null;
1648
1755
  const userFocus = rest.onFocus, userBlur = rest.onBlur, userKey = rest.onKeyDown, userClick = rest.onClick;
1649
1756
  return field(
1650
- /* @__PURE__ */ React13.createElement(
1757
+ /* @__PURE__ */ React14.createElement(
1651
1758
  "div",
1652
1759
  {
1653
1760
  className: cx("aura-input aura-select aura-select--custom", props.icon && "has-icon", open && "is-open"),
1654
1761
  "data-invalid": props.error ? "" : void 0
1655
1762
  },
1656
- props.icon ? /* @__PURE__ */ React13.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null,
1657
- h3(
1763
+ props.icon ? /* @__PURE__ */ React14.createElement(Icon, { name: props.icon, className: "aura-input__icon" }) : null,
1764
+ h4(
1658
1765
  "select",
1659
1766
  Object.assign(extra, pick(rest, FORM_KEYS), {
1660
1767
  ref: selMerged,
@@ -1679,7 +1786,7 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1679
1786
  opts,
1680
1787
  props.children
1681
1788
  ),
1682
- /* @__PURE__ */ React13.createElement(
1789
+ /* @__PURE__ */ React14.createElement(
1683
1790
  "button",
1684
1791
  {
1685
1792
  ...omit(rest, HANDLED_KEYS),
@@ -1719,17 +1826,17 @@ var Select = React13.forwardRef(function Select2(props, ref) {
1719
1826
  if (selRef.current) selRef.current.dispatchEvent(new FocusEvent("focusout", { bubbles: true }));
1720
1827
  }
1721
1828
  },
1722
- /* @__PURE__ */ React13.createElement("span", { id: id + "-value", className: cx("aura-select__value", shown[0].empty && "is-placeholder") }, shown[0].label || " ")
1829
+ /* @__PURE__ */ React14.createElement("span", { id: id + "-value", className: cx("aura-select__value", shown[0].empty && "is-placeholder") }, shown[0].label || " ")
1723
1830
  ),
1724
- /* @__PURE__ */ React13.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }),
1831
+ /* @__PURE__ */ React14.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }),
1725
1832
  popup
1726
1833
  )
1727
1834
  );
1728
1835
  });
1729
1836
 
1730
1837
  // src/RadioGroup.tsx
1731
- var React14 = __toESM(require("react"), 1);
1732
- var RadioGroup = React14.forwardRef(function RadioGroup2(props, ref) {
1838
+ var React15 = __toESM(require("react"), 1);
1839
+ var RadioGroup = React15.forwardRef(function RadioGroup2(props, ref) {
1733
1840
  const auto = uid(), id = props.id || auto;
1734
1841
  const st = useMaybeControlled(
1735
1842
  props.value,
@@ -1737,7 +1844,7 @@ var RadioGroup = React14.forwardRef(function RadioGroup2(props, ref) {
1737
1844
  props.onChange
1738
1845
  );
1739
1846
  const name = props.name || id;
1740
- const setRef = React14.useCallback(
1847
+ const setRef = React15.useCallback(
1741
1848
  function(el) {
1742
1849
  if (el)
1743
1850
  el.focus = function(opts) {
@@ -1749,7 +1856,7 @@ var RadioGroup = React14.forwardRef(function RadioGroup2(props, ref) {
1749
1856
  },
1750
1857
  [ref]
1751
1858
  );
1752
- return /* @__PURE__ */ React14.createElement(
1859
+ return /* @__PURE__ */ React15.createElement(
1753
1860
  "fieldset",
1754
1861
  {
1755
1862
  ref: setRef,
@@ -1758,10 +1865,10 @@ var RadioGroup = React14.forwardRef(function RadioGroup2(props, ref) {
1758
1865
  "aria-invalid": props.error ? true : void 0,
1759
1866
  disabled: props.disabled
1760
1867
  },
1761
- props.label ? /* @__PURE__ */ React14.createElement("legend", { className: "aura-field__label" }, props.label, props.required ? /* @__PURE__ */ React14.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *") : null) : null,
1762
- /* @__PURE__ */ React14.createElement("div", { className: cx("aura-radio-group__list", props.orientation === "horizontal" && "is-horizontal") }, (props.options || []).map(function(o) {
1868
+ props.label ? /* @__PURE__ */ React15.createElement("legend", { className: "aura-field__label" }, props.label, props.required ? /* @__PURE__ */ React15.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *") : null) : null,
1869
+ /* @__PURE__ */ React15.createElement("div", { className: cx("aura-radio-group__list", props.orientation === "horizontal" && "is-horizontal") }, (props.options || []).map(function(o) {
1763
1870
  const v = typeof o === "object" ? o : { value: o, label: o };
1764
- return /* @__PURE__ */ React14.createElement("label", { key: v.value, className: cx("aura-choice", v.disabled && "is-disabled") }, /* @__PURE__ */ React14.createElement(
1871
+ return /* @__PURE__ */ React15.createElement("label", { key: v.value, className: cx("aura-choice", v.disabled && "is-disabled") }, /* @__PURE__ */ React15.createElement(
1765
1872
  "input",
1766
1873
  {
1767
1874
  type: "radio",
@@ -1775,19 +1882,19 @@ var RadioGroup = React14.forwardRef(function RadioGroup2(props, ref) {
1775
1882
  st[1](v.value);
1776
1883
  }
1777
1884
  }
1778
- ), /* @__PURE__ */ React14.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React14.createElement("span", { className: "aura-choice__label" }, v.label), v.description ? /* @__PURE__ */ React14.createElement("span", { className: "aura-choice__desc" }, v.description) : null));
1885
+ ), /* @__PURE__ */ React15.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React15.createElement("span", { className: "aura-choice__label" }, v.label), v.description ? /* @__PURE__ */ React15.createElement("span", { className: "aura-choice__desc" }, v.description) : null));
1779
1886
  })),
1780
- props.error ? /* @__PURE__ */ React14.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React14.createElement(Icon, { name: "circle-alert", size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React14.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
1887
+ props.error ? /* @__PURE__ */ React15.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React15.createElement(Icon, { name: "circle-alert", size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React15.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
1781
1888
  );
1782
1889
  });
1783
1890
 
1784
1891
  // src/Switch.tsx
1785
- var React15 = __toESM(require("react"), 1);
1786
- var Switch = React15.forwardRef(function Switch2(props, ref) {
1892
+ var React16 = __toESM(require("react"), 1);
1893
+ var Switch = React16.forwardRef(function Switch2(props, ref) {
1787
1894
  const auto = uid(), id = props.id || auto;
1788
1895
  const st = useMaybeControlled(props.checked, !!props.defaultChecked, props.onChange);
1789
1896
  const on = !!st[0];
1790
- return /* @__PURE__ */ React15.createElement(
1897
+ return /* @__PURE__ */ React16.createElement(
1791
1898
  "div",
1792
1899
  {
1793
1900
  className: cx("aura-switch-row", props.disabled && "is-disabled", props.className),
@@ -1797,7 +1904,7 @@ var Switch = React15.forwardRef(function Switch2(props, ref) {
1797
1904
  st[1](!on);
1798
1905
  }
1799
1906
  },
1800
- /* @__PURE__ */ React15.createElement(
1907
+ /* @__PURE__ */ React16.createElement(
1801
1908
  "button",
1802
1909
  {
1803
1910
  ref,
@@ -1814,14 +1921,14 @@ var Switch = React15.forwardRef(function Switch2(props, ref) {
1814
1921
  st[1](!on);
1815
1922
  }
1816
1923
  },
1817
- /* @__PURE__ */ React15.createElement("span", { className: "aura-switch__thumb" })
1924
+ /* @__PURE__ */ React16.createElement("span", { className: "aura-switch__thumb" })
1818
1925
  ),
1819
- props.label ? /* @__PURE__ */ React15.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React15.createElement("label", { className: "aura-choice__label", id: id + "-label", htmlFor: id }, props.label), props.description ? /* @__PURE__ */ React15.createElement("span", { className: "aura-choice__desc", id: id + "-desc" }, props.description) : null) : props.description ? /* @__PURE__ */ React15.createElement("span", { className: "aura-sr-only", id: id + "-desc" }, props.description) : null
1926
+ props.label ? /* @__PURE__ */ React16.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React16.createElement("label", { className: "aura-choice__label", id: id + "-label", htmlFor: id }, props.label), props.description ? /* @__PURE__ */ React16.createElement("span", { className: "aura-choice__desc", id: id + "-desc" }, props.description) : null) : props.description ? /* @__PURE__ */ React16.createElement("span", { className: "aura-sr-only", id: id + "-desc" }, props.description) : null
1820
1927
  );
1821
1928
  });
1822
1929
 
1823
1930
  // src/Combobox.tsx
1824
- var React16 = __toESM(require("react"), 1);
1931
+ var React17 = __toESM(require("react"), 1);
1825
1932
  var import_react_dom3 = require("react-dom");
1826
1933
  function norm(s) {
1827
1934
  return String(s == null ? "" : s).normalize("NFC").toLocaleLowerCase("th");
@@ -1836,7 +1943,7 @@ function defaultFilter(option, query) {
1836
1943
  return norm(k).indexOf(q) >= 0;
1837
1944
  });
1838
1945
  }
1839
- var Combobox = React16.forwardRef(
1946
+ var Combobox = React17.forwardRef(
1840
1947
  function Combobox2(all, ref) {
1841
1948
  const props = all;
1842
1949
  const multi = all.multiple === true;
@@ -1871,11 +1978,11 @@ var Combobox = React16.forwardRef(
1871
1978
  return o.value === v;
1872
1979
  })[0];
1873
1980
  }).filter(Boolean) : [];
1874
- const openState = React16.useState(false), open = openState[0], setOpen = openState[1];
1875
- const qState = React16.useState(null), query = qState[0], setQuery = qState[1];
1876
- const aState = React16.useState(0), active = aState[0], setActive = aState[1];
1877
- const posState = React16.useState(null);
1878
- const inputRef = React16.useRef(null), inputMerged = useMergedRef(ref, inputRef), boxRef = React16.useRef(null), listRef = React16.useRef(null);
1981
+ const openState = React17.useState(false), open = openState[0], setOpen = openState[1];
1982
+ const qState = React17.useState(null), query = qState[0], setQuery = qState[1];
1983
+ const aState = React17.useState(0), active = aState[0], setActive = aState[1];
1984
+ const posState = React17.useState(null);
1985
+ const inputRef = React17.useRef(null), inputMerged = useMergedRef(ref, inputRef), boxRef = React17.useRef(null), listRef = React17.useRef(null);
1879
1986
  const mounted = useMounted();
1880
1987
  const limit = props.limit || 200;
1881
1988
  const filter = props.filter || defaultFilter;
@@ -1903,7 +2010,7 @@ var Combobox = React16.forwardRef(
1903
2010
  },
1904
2011
  [open, shown.length, values.length]
1905
2012
  );
1906
- React16.useEffect(
2013
+ React17.useEffect(
1907
2014
  function() {
1908
2015
  if (!open) return;
1909
2016
  function outside(e) {
@@ -1925,7 +2032,7 @@ var Combobox = React16.forwardRef(
1925
2032
  },
1926
2033
  [open]
1927
2034
  );
1928
- React16.useEffect(
2035
+ React17.useEffect(
1929
2036
  function() {
1930
2037
  if (!open || !listRef.current) return;
1931
2038
  const el = listRef.current.querySelector('[data-idx="' + activeIdx + '"]');
@@ -1994,19 +2101,19 @@ var Combobox = React16.forwardRef(
1994
2101
  } else if (!multi && !props.readOnly && props.clearable !== false && value != null && query == null) {
1995
2102
  setValue(null);
1996
2103
  }
1997
- } else if (k === "Backspace" && multi && !props.readOnly && !text && values.length) {
2104
+ } else if (k === "Backspace" && multi && !props.readOnly && !text2 && values.length) {
1998
2105
  setValues(values.slice(0, -1));
1999
2106
  } else if (k === "Tab") {
2000
2107
  if (open) close();
2001
2108
  }
2002
2109
  }
2003
- const text = query != null ? query : selected ? selected.label : "";
2110
+ const text2 = query != null ? query : selected ? selected.label : "";
2004
2111
  const summaryId = id + "-picked";
2005
2112
  const optId = function(i) {
2006
2113
  return id + "-opt-" + i;
2007
2114
  };
2008
2115
  const list = open && mounted && posState[0] ? (0, import_react_dom3.createPortal)(
2009
- /* @__PURE__ */ React16.createElement("div", { ref: listRef, "data-density": density, className: "aura-combo__popover", style: posState[0] }, live.length ? /* @__PURE__ */ React16.createElement(
2116
+ /* @__PURE__ */ React17.createElement("div", { ref: listRef, "data-density": density, className: "aura-combo__popover", style: posState[0] }, live.length ? /* @__PURE__ */ React17.createElement(
2010
2117
  "ul",
2011
2118
  {
2012
2119
  id: listId,
@@ -2018,7 +2125,7 @@ var Combobox = React16.forwardRef(
2018
2125
  live.map(function(o, i) {
2019
2126
  const isSel = multi ? isPicked(o.value) : !!selected && o.value === selected.value;
2020
2127
  const blocked = o.disabled || multi && full && !isSel;
2021
- return /* @__PURE__ */ React16.createElement(
2128
+ return /* @__PURE__ */ React17.createElement(
2022
2129
  "li",
2023
2130
  {
2024
2131
  key: o.value,
@@ -2043,15 +2150,15 @@ var Combobox = React16.forwardRef(
2043
2150
  if (activeIdx !== i) setActive(i);
2044
2151
  }
2045
2152
  },
2046
- o.icon ? /* @__PURE__ */ React16.createElement(Icon, { name: o.icon }) : null,
2047
- /* @__PURE__ */ React16.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React16.createElement("span", { className: "aura-combo__label" }, o.label), o.description ? /* @__PURE__ */ React16.createElement("span", { className: "aura-combo__desc" }, o.description) : null),
2048
- isSel ? /* @__PURE__ */ React16.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
2153
+ o.icon ? /* @__PURE__ */ React17.createElement(Icon, { name: o.icon }) : null,
2154
+ /* @__PURE__ */ React17.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React17.createElement("span", { className: "aura-combo__label" }, o.label), o.description ? /* @__PURE__ */ React17.createElement("span", { className: "aura-combo__desc" }, o.description) : null),
2155
+ isSel ? /* @__PURE__ */ React17.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
2049
2156
  );
2050
2157
  })
2051
- ) : null, props.loading || !live.length || more ? /* @__PURE__ */ React16.createElement("div", { className: "aura-combo__list", role: "status" }, props.loading ? /* @__PURE__ */ React16.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React16.createElement(Icon, { name: "loader-circle", className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React16.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React16.createElement("div", { className: "aura-combo__note" }, t.keepTyping((props.options || []).length))) : null),
2158
+ ) : null, props.loading || !live.length || more ? /* @__PURE__ */ React17.createElement("div", { className: "aura-combo__list", role: "status" }, props.loading ? /* @__PURE__ */ React17.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React17.createElement(Icon, { name: "loader-circle", className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React17.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React17.createElement("div", { className: "aura-combo__note" }, t.keepTyping((props.options || []).length))) : null),
2052
2159
  document.body
2053
2160
  ) : null;
2054
- return /* @__PURE__ */ React16.createElement(
2161
+ return /* @__PURE__ */ React17.createElement(
2055
2162
  Field,
2056
2163
  {
2057
2164
  id,
@@ -2063,8 +2170,8 @@ var Combobox = React16.forwardRef(
2063
2170
  disabled: props.disabled,
2064
2171
  className: props.className
2065
2172
  },
2066
- /* @__PURE__ */ React16.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo has-icon", open && "is-open", multi && "is-multi") }, /* @__PURE__ */ React16.createElement(Icon, { name: props.icon || "search", className: "aura-input__icon" }), multi && picked.length ? /* @__PURE__ */ React16.createElement("span", { className: "aura-combo__chips" }, picked.map(function(o) {
2067
- return /* @__PURE__ */ React16.createElement("span", { key: o.value, className: "aura-combo__chip" }, /* @__PURE__ */ React16.createElement("span", { className: "aura-combo__chip-label" }, o.label), props.disabled || props.readOnly ? null : /* @__PURE__ */ React16.createElement(
2173
+ /* @__PURE__ */ React17.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo has-icon", open && "is-open", multi && "is-multi") }, /* @__PURE__ */ React17.createElement(Icon, { name: props.icon || "search", className: "aura-input__icon" }), multi && picked.length ? /* @__PURE__ */ React17.createElement("span", { className: "aura-combo__chips" }, picked.map(function(o) {
2174
+ return /* @__PURE__ */ React17.createElement("span", { key: o.value, className: "aura-combo__chip" }, /* @__PURE__ */ React17.createElement("span", { className: "aura-combo__chip-label" }, o.label), props.disabled || props.readOnly ? null : /* @__PURE__ */ React17.createElement(
2068
2175
  "button",
2069
2176
  {
2070
2177
  type: "button",
@@ -2083,13 +2190,13 @@ var Combobox = React16.forwardRef(
2083
2190
  if (inputRef.current) inputRef.current.focus();
2084
2191
  }
2085
2192
  },
2086
- /* @__PURE__ */ React16.createElement(Icon, { name: "x" })
2193
+ /* @__PURE__ */ React17.createElement(Icon, { name: "x" })
2087
2194
  ));
2088
- })) : null, multi ? /* @__PURE__ */ React16.createElement("span", { id: summaryId, className: "aura-sr-only" }, picked.length ? t.selectedCount(picked.length) + ": " + picked.map(function(o) {
2195
+ })) : null, multi ? /* @__PURE__ */ React17.createElement("span", { id: summaryId, className: "aura-sr-only" }, picked.length ? t.selectedCount(picked.length) + ": " + picked.map(function(o) {
2089
2196
  return o.label;
2090
2197
  }).join(", ") : "") : null, props.name ? multi ? values.map(function(v) {
2091
- return /* @__PURE__ */ React16.createElement("input", { key: v, type: "hidden", name: props.name, value: v });
2092
- }) : /* @__PURE__ */ React16.createElement("input", { type: "hidden", name: props.name, value: value == null ? "" : value }) : null, /* @__PURE__ */ React16.createElement(
2198
+ return /* @__PURE__ */ React17.createElement("input", { key: v, type: "hidden", name: props.name, value: v });
2199
+ }) : /* @__PURE__ */ React17.createElement("input", { type: "hidden", name: props.name, value: value == null ? "" : value }) : null, /* @__PURE__ */ React17.createElement(
2093
2200
  "input",
2094
2201
  {
2095
2202
  ref: inputMerged,
@@ -2108,7 +2215,7 @@ var Combobox = React16.forwardRef(
2108
2215
  disabled: props.disabled,
2109
2216
  readOnly: props.readOnly,
2110
2217
  required: props.required && (!multi || !values.length),
2111
- value: text,
2218
+ value: text2,
2112
2219
  onChange: function(e) {
2113
2220
  setQuery(e.target.value);
2114
2221
  setActive(0);
@@ -2125,7 +2232,7 @@ var Combobox = React16.forwardRef(
2125
2232
  }, 0);
2126
2233
  }
2127
2234
  }
2128
- ), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */ React16.createElement(
2235
+ ), props.clearable !== false && values.length && !props.disabled && !props.readOnly ? /* @__PURE__ */ React17.createElement(
2129
2236
  "button",
2130
2237
  {
2131
2238
  type: "button",
@@ -2138,8 +2245,8 @@ var Combobox = React16.forwardRef(
2138
2245
  if (inputRef.current) inputRef.current.focus();
2139
2246
  }
2140
2247
  },
2141
- /* @__PURE__ */ React16.createElement(Icon, { name: "x" })
2142
- ) : null, /* @__PURE__ */ React16.createElement(
2248
+ /* @__PURE__ */ React17.createElement(Icon, { name: "x" })
2249
+ ) : null, /* @__PURE__ */ React17.createElement(
2143
2250
  "button",
2144
2251
  {
2145
2252
  type: "button",
@@ -2157,7 +2264,7 @@ var Combobox = React16.forwardRef(
2157
2264
  }
2158
2265
  }
2159
2266
  },
2160
- /* @__PURE__ */ React16.createElement(Icon, { name: "chevron-down" })
2267
+ /* @__PURE__ */ React17.createElement(Icon, { name: "chevron-down" })
2161
2268
  )),
2162
2269
  list
2163
2270
  );
@@ -2165,7 +2272,7 @@ var Combobox = React16.forwardRef(
2165
2272
  );
2166
2273
 
2167
2274
  // src/DatePicker.tsx
2168
- var React17 = __toESM(require("react"), 1);
2275
+ var React18 = __toESM(require("react"), 1);
2169
2276
  var import_react_dom4 = require("react-dom");
2170
2277
 
2171
2278
  // src/dates.ts
@@ -2303,8 +2410,8 @@ function monthIndex(word) {
2303
2410
  const k = word.toLowerCase().replace(/\.$/, "");
2304
2411
  return MONTHS[k] != null ? MONTHS[k] : -1;
2305
2412
  }
2306
- function parseDate(text) {
2307
- const raw = String(text || "").trim();
2413
+ function parseDate(text2) {
2414
+ const raw = String(text2 || "").trim();
2308
2415
  const gregorian = /ค\.ศ\.|\d\s*(AD|CE)\b|^\s*(AD|CE)\s/i.test(raw);
2309
2416
  let s = raw.replace(/พ\.ศ\.|ค\.ศ\./g, " ").replace(/(\d)\s*(BE|AD|CE)\b/gi, "$1 ").replace(/^\s*(BE|AD|CE)\s+/i, " ").replace(/\s+/g, " ").trim();
2310
2417
  const eight = /^(\d{2})(\d{2})(\d{4})$/.exec(s);
@@ -2349,7 +2456,7 @@ function todayIn(timeZone) {
2349
2456
  // src/DatePicker.tsx
2350
2457
  function useFormatDate() {
2351
2458
  const ctx = useAuraLocale(), locale = ctx.locale || "en", calendar = ctx.calendar;
2352
- return React17.useCallback(
2459
+ return React18.useCallback(
2353
2460
  function(iso, opts) {
2354
2461
  const o = opts || {}, loc = o.locale || locale;
2355
2462
  return formatDate(
@@ -2370,7 +2477,7 @@ function allowedDate(iso, o) {
2370
2477
  if (hi && fromISO(hi) && iso > hi) return false;
2371
2478
  return !(o.isDateDisabled && o.isDateDisabled(iso));
2372
2479
  }
2373
- var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2480
+ var Calendar = React18.forwardRef(function Calendar2(props, ref) {
2374
2481
  const ctx = useAuraLocale(), locale = props.locale || ctx.locale || "en", calendar = props.calendar || ctx.calendar || defaultCalendar(locale), tag = localeTag(locale, calendar);
2375
2482
  const weekStart = props.weekStartsOn == null ? locale === "sv" ? 1 : 0 : props.weekStartsOn;
2376
2483
  const given = props.today && fromISO(props.today) ? props.today : null, zone = props.timeZone || ctx.timeZone;
@@ -2385,7 +2492,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2385
2492
  function select(iso) {
2386
2493
  if (props.onSelect) props.onSelect(iso);
2387
2494
  }
2388
- const focusState = React17.useState(function() {
2495
+ const focusState = React18.useState(function() {
2389
2496
  const d0 = fromISO(props.focus) || start || today;
2390
2497
  if (!disabledAt(d0)) return d0;
2391
2498
  for (let i = 1; i <= 366; i++) {
@@ -2395,21 +2502,21 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2395
2502
  return d0;
2396
2503
  });
2397
2504
  const focusDate = focusState[0], setFocus = focusState[1];
2398
- const viewState = React17.useState("days"), view = viewState[0], setView = viewState[1];
2399
- const hoverState = React17.useState(null);
2400
- const gridRef = React17.useRef(null), gridMerged = useMergedRef(ref, gridRef), moved = React17.useRef(false);
2505
+ const viewState = React18.useState("days"), view = viewState[0], setView = viewState[1];
2506
+ const hoverState = React18.useState(null);
2507
+ const gridRef = React18.useRef(null), gridMerged = useMergedRef(ref, gridRef), moved = React18.useRef(false);
2401
2508
  const th = locale === "th";
2402
2509
  const dt = dateText(locale);
2403
2510
  function disabled(d) {
2404
2511
  return disabledAt(d);
2405
2512
  }
2406
- React17.useEffect(function() {
2513
+ React18.useEffect(function() {
2407
2514
  if (!moved.current) return;
2408
2515
  moved.current = false;
2409
2516
  const el = gridRef.current && gridRef.current.querySelector('[data-date="' + toISO(focusDate) + '"]');
2410
2517
  if (el) el.focus();
2411
2518
  });
2412
- React17.useEffect(
2519
+ React18.useEffect(
2413
2520
  function() {
2414
2521
  if (props.autoFocus === false) return;
2415
2522
  const el = gridRef.current && gridRef.current.querySelector('[tabindex="0"]');
@@ -2464,7 +2571,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2464
2571
  const yr = focusDate.getFullYear(), base = yr - yr % 12;
2465
2572
  const years = [];
2466
2573
  for (let y = base; y < base + 12; y++) years.push(y);
2467
- return /* @__PURE__ */ React17.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React17.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React17.createElement(
2574
+ return /* @__PURE__ */ React18.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React18.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React18.createElement(
2468
2575
  IconButton,
2469
2576
  {
2470
2577
  icon: "chevron-left",
@@ -2473,7 +2580,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2473
2580
  setFocus(new Date(yr - 12, focusDate.getMonth(), 1));
2474
2581
  }
2475
2582
  }
2476
- ), /* @__PURE__ */ React17.createElement(
2583
+ ), /* @__PURE__ */ React18.createElement(
2477
2584
  "button",
2478
2585
  {
2479
2586
  type: "button",
@@ -2483,7 +2590,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2483
2590
  }
2484
2591
  },
2485
2592
  fmt(tag, { year: "numeric" }, new Date(base, 0, 1)).replace(ERA, "") + " \u2013 " + fmt(tag, { year: "numeric" }, new Date(base + 11, 0, 1)).replace(ERA, "")
2486
- ), /* @__PURE__ */ React17.createElement(
2593
+ ), /* @__PURE__ */ React18.createElement(
2487
2594
  IconButton,
2488
2595
  {
2489
2596
  icon: "chevron-right",
@@ -2492,9 +2599,9 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2492
2599
  setFocus(new Date(yr + 12, focusDate.getMonth(), 1));
2493
2600
  }
2494
2601
  }
2495
- )), /* @__PURE__ */ React17.createElement("div", { className: "aura-cal__years" }, years.map(function(y) {
2602
+ )), /* @__PURE__ */ React18.createElement("div", { className: "aura-cal__years" }, years.map(function(y) {
2496
2603
  const d = new Date(y, focusDate.getMonth(), 1);
2497
- return /* @__PURE__ */ React17.createElement(
2604
+ return /* @__PURE__ */ React18.createElement(
2498
2605
  "button",
2499
2606
  {
2500
2607
  key: y,
@@ -2511,7 +2618,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2511
2618
  );
2512
2619
  })));
2513
2620
  }
2514
- return /* @__PURE__ */ React17.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React17.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React17.createElement(
2621
+ return /* @__PURE__ */ React18.createElement("div", { className: "aura-cal", ref: gridMerged, key: gridKey }, /* @__PURE__ */ React18.createElement("div", { className: "aura-cal__head" }, /* @__PURE__ */ React18.createElement(
2515
2622
  IconButton,
2516
2623
  {
2517
2624
  icon: "chevron-left",
@@ -2520,7 +2627,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2520
2627
  setFocus(addMonths(focusDate, -1));
2521
2628
  }
2522
2629
  }
2523
- ), /* @__PURE__ */ React17.createElement(
2630
+ ), /* @__PURE__ */ React18.createElement(
2524
2631
  "button",
2525
2632
  {
2526
2633
  type: "button",
@@ -2531,8 +2638,8 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2531
2638
  }
2532
2639
  },
2533
2640
  monthTitle,
2534
- /* @__PURE__ */ React17.createElement(Icon, { name: "chevron-down", size: 14 })
2535
- ), /* @__PURE__ */ React17.createElement(
2641
+ /* @__PURE__ */ React18.createElement(Icon, { name: "chevron-down", size: 14 })
2642
+ ), /* @__PURE__ */ React18.createElement(
2536
2643
  IconButton,
2537
2644
  {
2538
2645
  icon: "chevron-right",
@@ -2541,9 +2648,9 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2541
2648
  setFocus(addMonths(focusDate, 1));
2542
2649
  }
2543
2650
  }
2544
- )), /* @__PURE__ */ React17.createElement("table", { role: "grid", className: "aura-cal__grid", "aria-label": monthTitle }, /* @__PURE__ */ React17.createElement("thead", null, /* @__PURE__ */ React17.createElement("tr", null, weekdayNames.map(function(n2, i) {
2545
- return /* @__PURE__ */ React17.createElement("th", { key: i, scope: "col", abbr: n2.long }, /* @__PURE__ */ React17.createElement("span", { "aria-hidden": true }, n2.short));
2546
- }))), /* @__PURE__ */ React17.createElement(
2651
+ )), /* @__PURE__ */ React18.createElement("table", { role: "grid", className: "aura-cal__grid", "aria-label": monthTitle }, /* @__PURE__ */ React18.createElement("thead", null, /* @__PURE__ */ React18.createElement("tr", null, weekdayNames.map(function(n2, i) {
2652
+ return /* @__PURE__ */ React18.createElement("th", { key: i, scope: "col", abbr: n2.long }, /* @__PURE__ */ React18.createElement("span", { "aria-hidden": true }, n2.short));
2653
+ }))), /* @__PURE__ */ React18.createElement(
2547
2654
  "tbody",
2548
2655
  {
2549
2656
  onMouseLeave: function() {
@@ -2551,11 +2658,11 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2551
2658
  }
2552
2659
  },
2553
2660
  weeks.map(function(wk, wi) {
2554
- return /* @__PURE__ */ React17.createElement("tr", { key: wi }, wk.map(function(d) {
2661
+ return /* @__PURE__ */ React18.createElement("tr", { key: wi }, wk.map(function(d) {
2555
2662
  const iso = toISO(d), out = d.getMonth() !== focusDate.getMonth(), dis = disabled(d);
2556
2663
  const isStart = same(d, start), isEnd = same(d, end) || !end && props.range && same(d, hover) && start;
2557
2664
  const sel = isStart || same(d, end);
2558
- return /* @__PURE__ */ React17.createElement(
2665
+ return /* @__PURE__ */ React18.createElement(
2559
2666
  "td",
2560
2667
  {
2561
2668
  key: iso,
@@ -2567,7 +2674,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2567
2674
  props.range && isEnd && start && "is-range-end"
2568
2675
  )
2569
2676
  },
2570
- /* @__PURE__ */ React17.createElement(
2677
+ /* @__PURE__ */ React18.createElement(
2571
2678
  "button",
2572
2679
  {
2573
2680
  type: "button",
@@ -2600,7 +2707,7 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2600
2707
  );
2601
2708
  }));
2602
2709
  })
2603
- )), props.footer === false ? null : /* @__PURE__ */ React17.createElement("div", { className: "aura-cal__foot" }, /* @__PURE__ */ React17.createElement(
2710
+ )), props.footer === false ? null : /* @__PURE__ */ React18.createElement("div", { className: "aura-cal__foot" }, /* @__PURE__ */ React18.createElement(
2604
2711
  "button",
2605
2712
  {
2606
2713
  type: "button",
@@ -2612,11 +2719,11 @@ var Calendar = React17.forwardRef(function Calendar2(props, ref) {
2612
2719
  }
2613
2720
  },
2614
2721
  dt.today
2615
- ), props.onClear ? /* @__PURE__ */ React17.createElement("button", { type: "button", className: "aura-cal__link", onClick: props.onClear }, dt.clear) : null));
2722
+ ), props.onClear ? /* @__PURE__ */ React18.createElement("button", { type: "button", className: "aura-cal__link", onClick: props.onClear }, dt.clear) : null));
2616
2723
  });
2617
2724
  function useCalendarPopover(boxRef) {
2618
- const openState = React17.useState(false), open = openState[0], setOpen = openState[1];
2619
- const pos = React17.useState(null), popRef = React17.useRef(null), mounted = useMounted();
2725
+ const openState = React18.useState(false), open = openState[0], setOpen = openState[1];
2726
+ const pos = React18.useState(null), popRef = React18.useRef(null), mounted = useMounted();
2620
2727
  function place() {
2621
2728
  if (!boxRef.current) return;
2622
2729
  const el = popRef.current, r = boxRef.current.getBoundingClientRect(), W = el ? el.offsetWidth : 320, H = el ? el.offsetHeight : 380;
@@ -2630,7 +2737,7 @@ function useCalendarPopover(boxRef) {
2630
2737
  },
2631
2738
  [open, !!pos[0]]
2632
2739
  );
2633
- React17.useEffect(
2740
+ React18.useEffect(
2634
2741
  function() {
2635
2742
  if (!open) return;
2636
2743
  function outside(e) {
@@ -2652,8 +2759,8 @@ function useCalendarPopover(boxRef) {
2652
2759
  return { open, setOpen, pos: pos[0], popRef, mounted };
2653
2760
  }
2654
2761
  function DateField(props) {
2655
- const editState = React17.useState(null), editing = editState[0], setEditing = editState[1];
2656
- return /* @__PURE__ */ React17.createElement(
2762
+ const editState = React18.useState(null), editing = editState[0], setEditing = editState[1];
2763
+ return /* @__PURE__ */ React18.createElement(
2657
2764
  Field,
2658
2765
  {
2659
2766
  id: props.id,
@@ -2665,7 +2772,7 @@ function DateField(props) {
2665
2772
  disabled: props.disabled,
2666
2773
  className: props.className
2667
2774
  },
2668
- /* @__PURE__ */ React17.createElement("div", { ref: props.boxRef, className: cx("aura-input aura-date", props.open && "is-open") }, /* @__PURE__ */ React17.createElement(
2775
+ /* @__PURE__ */ React18.createElement("div", { ref: props.boxRef, className: cx("aura-input aura-date", props.open && "is-open") }, /* @__PURE__ */ React18.createElement(
2669
2776
  "input",
2670
2777
  {
2671
2778
  ref: props.inputRef,
@@ -2704,7 +2811,7 @@ function DateField(props) {
2704
2811
  }
2705
2812
  }
2706
2813
  }
2707
- ), props.clearable !== false && props.hasValue && !props.disabled ? /* @__PURE__ */ React17.createElement(
2814
+ ), props.clearable !== false && props.hasValue && !props.disabled ? /* @__PURE__ */ React18.createElement(
2708
2815
  "button",
2709
2816
  {
2710
2817
  type: "button",
@@ -2713,8 +2820,8 @@ function DateField(props) {
2713
2820
  "aria-label": props.clearLabel,
2714
2821
  onClick: props.onClear
2715
2822
  },
2716
- /* @__PURE__ */ React17.createElement(Icon, { name: "x" })
2717
- ) : null, /* @__PURE__ */ React17.createElement(
2823
+ /* @__PURE__ */ React18.createElement(Icon, { name: "x" })
2824
+ ) : null, /* @__PURE__ */ React18.createElement(
2718
2825
  "button",
2719
2826
  {
2720
2827
  type: "button",
@@ -2728,11 +2835,11 @@ function DateField(props) {
2728
2835
  props.onToggle(!props.open);
2729
2836
  }
2730
2837
  },
2731
- /* @__PURE__ */ React17.createElement(Icon, { name: "calendar" })
2838
+ /* @__PURE__ */ React18.createElement(Icon, { name: "calendar" })
2732
2839
  ))
2733
2840
  );
2734
2841
  }
2735
- var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2842
+ var DatePicker = React18.forwardRef(function DatePicker2(props, ref) {
2736
2843
  const auto = uid(), id = props.id || auto, dialogId = id + "-cal";
2737
2844
  const ctx = useAuraLocale(), locale = props.locale || ctx.locale || "en", calendar = props.calendar || ctx.calendar || defaultCalendar(locale), dt = dateText(locale);
2738
2845
  const st = useMaybeControlled(
@@ -2740,7 +2847,7 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2740
2847
  props.defaultValue == null ? null : props.defaultValue,
2741
2848
  props.onChange
2742
2849
  );
2743
- const boxRef = React17.useRef(null), inputRef = React17.useRef(null), inputMerged = useMergedRef(ref, inputRef);
2850
+ const boxRef = React18.useRef(null), inputRef = React18.useRef(null), inputMerged = useMergedRef(ref, inputRef);
2744
2851
  const pop = useCalendarPopover(boxRef);
2745
2852
  const limits = {
2746
2853
  min: props.min,
@@ -2749,20 +2856,20 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2749
2856
  timeZone: props.timeZone || ctx.timeZone,
2750
2857
  isDateDisabled: props.isDateDisabled
2751
2858
  };
2752
- const bad = React17.useState(null);
2753
- React17.useEffect(
2859
+ const bad = React18.useState(null);
2860
+ React18.useEffect(
2754
2861
  function() {
2755
2862
  bad[1](null);
2756
2863
  },
2757
2864
  [st[0]]
2758
2865
  );
2759
- function commit(text) {
2866
+ function commit(text2) {
2760
2867
  bad[1](null);
2761
- if (!text.trim()) {
2868
+ if (!text2.trim()) {
2762
2869
  st[1](null);
2763
2870
  return;
2764
2871
  }
2765
- const iso = parseDate(text);
2872
+ const iso = parseDate(text2);
2766
2873
  if (!iso) return;
2767
2874
  if (allowedDate(iso, limits)) st[1](iso);
2768
2875
  else bad[1](dt.dateUnavailable);
@@ -2772,7 +2879,7 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2772
2879
  if (inputRef.current) inputRef.current.focus();
2773
2880
  }
2774
2881
  const cal = pop.open && pop.mounted && pop.pos ? (0, import_react_dom4.createPortal)(
2775
- /* @__PURE__ */ React17.createElement(
2882
+ /* @__PURE__ */ React18.createElement(
2776
2883
  "div",
2777
2884
  {
2778
2885
  ref: pop.popRef,
@@ -2789,7 +2896,7 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2789
2896
  } else trapTab(e, pop.popRef.current);
2790
2897
  }
2791
2898
  },
2792
- /* @__PURE__ */ React17.createElement(
2899
+ /* @__PURE__ */ React18.createElement(
2793
2900
  Calendar,
2794
2901
  {
2795
2902
  locale,
@@ -2812,7 +2919,7 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2812
2919
  ),
2813
2920
  document.body
2814
2921
  ) : null;
2815
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
2922
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
2816
2923
  DateField,
2817
2924
  {
2818
2925
  id,
@@ -2847,7 +2954,7 @@ var DatePicker = React17.forwardRef(function DatePicker2(props, ref) {
2847
2954
  }
2848
2955
  ), cal);
2849
2956
  });
2850
- var DateRangePicker = React17.forwardRef(
2957
+ var DateRangePicker = React18.forwardRef(
2851
2958
  function DateRangePicker2(props, ref) {
2852
2959
  const auto = uid(), id = props.id || auto, dialogId = id + "-cal";
2853
2960
  const ctx = useAuraLocale(), locale = props.locale || ctx.locale || "en", calendar = props.calendar || ctx.calendar || defaultCalendar(locale), dt = dateText(locale);
@@ -2857,8 +2964,8 @@ var DateRangePicker = React17.forwardRef(
2857
2964
  props.onChange
2858
2965
  );
2859
2966
  const v = st[0] || { start: null, end: null };
2860
- const draft = React17.useState(null);
2861
- const boxRef = React17.useRef(null), inputRef = React17.useRef(null), inputMerged = useMergedRef(ref, inputRef);
2967
+ const draft = React18.useState(null);
2968
+ const boxRef = React18.useRef(null), inputRef = React18.useRef(null), inputMerged = useMergedRef(ref, inputRef);
2862
2969
  const pop = useCalendarPopover(boxRef);
2863
2970
  const limits = {
2864
2971
  min: props.min,
@@ -2873,17 +2980,17 @@ var DateRangePicker = React17.forwardRef(
2873
2980
  if (!r.end) return formatDate(r.start, o) + " \u2013";
2874
2981
  return formatDate(r.start, o) + " \u2013 " + formatDate(r.end, o);
2875
2982
  }
2876
- const bad = React17.useState(null);
2877
- React17.useEffect(
2983
+ const bad = React18.useState(null);
2984
+ React18.useEffect(
2878
2985
  function() {
2879
2986
  bad[1](null);
2880
2987
  },
2881
2988
  [v.start, v.end]
2882
2989
  );
2883
- function commit(text) {
2990
+ function commit(text2) {
2884
2991
  bad[1](null);
2885
- const parts = String(text).split(/\s[–-]\s|\s*–\s*/);
2886
- if (!text.trim()) {
2992
+ const parts = String(text2).split(/\s[–-]\s|\s*–\s*/);
2993
+ if (!text2.trim()) {
2887
2994
  st[1]({ start: null, end: null });
2888
2995
  return;
2889
2996
  }
@@ -2907,7 +3014,7 @@ var DateRangePicker = React17.forwardRef(
2907
3014
  close();
2908
3015
  }
2909
3016
  const cal = pop.open && pop.mounted && pop.pos ? (0, import_react_dom4.createPortal)(
2910
- /* @__PURE__ */ React17.createElement(
3017
+ /* @__PURE__ */ React18.createElement(
2911
3018
  "div",
2912
3019
  {
2913
3020
  ref: pop.popRef,
@@ -2924,8 +3031,8 @@ var DateRangePicker = React17.forwardRef(
2924
3031
  } else trapTab(e, pop.popRef.current);
2925
3032
  }
2926
3033
  },
2927
- /* @__PURE__ */ React17.createElement("p", { className: "aura-cal__hint", "aria-live": "polite" }, draft[0] ? dt.chooseEnd : dt.chooseStart),
2928
- /* @__PURE__ */ React17.createElement(
3034
+ /* @__PURE__ */ React18.createElement("p", { className: "aura-cal__hint", "aria-live": "polite" }, draft[0] ? dt.chooseEnd : dt.chooseStart),
3035
+ /* @__PURE__ */ React18.createElement(
2929
3036
  Calendar,
2930
3037
  {
2931
3038
  range: true,
@@ -2946,7 +3053,7 @@ var DateRangePicker = React17.forwardRef(
2946
3053
  ),
2947
3054
  document.body
2948
3055
  ) : null;
2949
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
3056
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
2950
3057
  DateField,
2951
3058
  {
2952
3059
  id,
@@ -2985,31 +3092,18 @@ var DateRangePicker = React17.forwardRef(
2985
3092
  );
2986
3093
 
2987
3094
  // src/Alert.tsx
2988
- var React18 = __toESM(require("react"), 1);
2989
- var ALERT_ICON = {
2990
- info: "info",
2991
- success: "circle-check",
2992
- warning: "triangle-alert",
2993
- danger: "circle-alert"
2994
- };
2995
- var Alert = React18.forwardRef(function Alert2(props, ref) {
3095
+ var React19 = __toESM(require("react"), 1);
3096
+ var Alert = React19.forwardRef(function Alert2(props, ref) {
2996
3097
  const t = useStrings();
2997
- const tone2 = props.tone || "info";
2998
- return /* @__PURE__ */ React18.createElement(
2999
- "div",
3000
- {
3001
- ref,
3002
- className: cx("aura-alert", "aura-alert--" + tone2, props.className),
3003
- role: tone2 === "danger" || tone2 === "warning" ? "alert" : "status"
3004
- },
3005
- /* @__PURE__ */ React18.createElement(Icon, { name: ALERT_ICON[tone2], className: "aura-alert__icon" }),
3006
- /* @__PURE__ */ React18.createElement("div", { className: "aura-alert__body" }, props.title ? /* @__PURE__ */ React18.createElement("p", { className: "aura-alert__title" }, props.title) : null, props.children ? /* @__PURE__ */ React18.createElement("div", { className: "aura-alert__text" }, props.children) : null, props.action ? /* @__PURE__ */ React18.createElement("div", { className: "aura-alert__action" }, props.action) : null),
3007
- props.onDismiss ? /* @__PURE__ */ React18.createElement(IconButton, { icon: "x", label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null
3098
+ return alertElement(
3099
+ props,
3100
+ ref,
3101
+ props.onDismiss ? /* @__PURE__ */ React19.createElement(IconButton, { icon: "x", label: t.dismiss, className: "aura-alert__close", onClick: props.onDismiss }) : null
3008
3102
  );
3009
3103
  });
3010
3104
 
3011
3105
  // src/Toaster.tsx
3012
- var React19 = __toESM(require("react"), 1);
3106
+ var React20 = __toESM(require("react"), 1);
3013
3107
  var import_react_dom5 = require("react-dom");
3014
3108
  var MAX_VISIBLE = 3;
3015
3109
  var toastState = {
@@ -3085,8 +3179,8 @@ function outsideToaster(el) {
3085
3179
  function ToastItem(props) {
3086
3180
  const str = useStrings();
3087
3181
  const Link = useLinkComponent();
3088
- const node = React19.useRef(null);
3089
- const origin = React19.useRef(null);
3182
+ const node = React20.useRef(null);
3183
+ const origin = React20.useRef(null);
3090
3184
  useIsoLayoutEffect(function() {
3091
3185
  origin.current = outsideToaster(document.activeElement);
3092
3186
  const el = node.current;
@@ -3102,8 +3196,8 @@ function ToastItem(props) {
3102
3196
  }, 0);
3103
3197
  };
3104
3198
  }, []);
3105
- const t = props.toast, timer = React19.useRef(null), left = React19.useRef(t.duration || 5e3), since = React19.useRef(0);
3106
- const hover = React19.useRef(false), focused = React19.useRef(false);
3199
+ const t = props.toast, timer = React20.useRef(null), left = React20.useRef(t.duration || 5e3), since = React20.useRef(0);
3200
+ const hover = React20.useRef(false), focused = React20.useRef(false);
3107
3201
  function syncFocus() {
3108
3202
  if (focused.current && !(node.current && node.current.contains(document.activeElement))) focused.current = false;
3109
3203
  }
@@ -3125,7 +3219,7 @@ function ToastItem(props) {
3125
3219
  left.current -= Date.now() - since.current;
3126
3220
  }
3127
3221
  }
3128
- React19.useEffect(
3222
+ React20.useEffect(
3129
3223
  function() {
3130
3224
  if (timer.current) clearTimeout(timer.current);
3131
3225
  timer.current = null;
@@ -3144,7 +3238,7 @@ function ToastItem(props) {
3144
3238
  if (a.onClick) a.onClick();
3145
3239
  if (a.dismiss !== false) toast.dismiss(t.id);
3146
3240
  }
3147
- return /* @__PURE__ */ React19.createElement(
3241
+ return /* @__PURE__ */ React20.createElement(
3148
3242
  "div",
3149
3243
  {
3150
3244
  ref: node,
@@ -3181,16 +3275,16 @@ function ToastItem(props) {
3181
3275
  resume();
3182
3276
  }
3183
3277
  },
3184
- /* @__PURE__ */ React19.createElement(
3278
+ /* @__PURE__ */ React20.createElement(
3185
3279
  Icon,
3186
3280
  {
3187
3281
  name: t.loading ? "loader-circle" : ALERT_ICON[t.tone] || "info",
3188
3282
  className: cx("aura-toast__icon", t.loading && "aura-spin")
3189
3283
  }
3190
3284
  ),
3191
- /* @__PURE__ */ React19.createElement("div", { className: "aura-toast__body" }, /* @__PURE__ */ React19.createElement("p", { className: "aura-toast__title" }, t.title), rich ? /* @__PURE__ */ React19.createElement("div", { className: "aura-toast__text" }, t.description) : null),
3192
- actions.length ? /* @__PURE__ */ React19.createElement("div", { className: "aura-toast__actions" }, actions.map(function(a, i) {
3193
- return a.href ? /* @__PURE__ */ React19.createElement(
3285
+ /* @__PURE__ */ React20.createElement("div", { className: "aura-toast__body" }, /* @__PURE__ */ React20.createElement("p", { className: "aura-toast__title" }, t.title), rich ? /* @__PURE__ */ React20.createElement("div", { className: "aura-toast__text" }, t.description) : null),
3286
+ actions.length ? /* @__PURE__ */ React20.createElement("div", { className: "aura-toast__actions" }, actions.map(function(a, i) {
3287
+ return a.href ? /* @__PURE__ */ React20.createElement(
3194
3288
  Link,
3195
3289
  {
3196
3290
  key: i,
@@ -3202,7 +3296,7 @@ function ToastItem(props) {
3202
3296
  }
3203
3297
  },
3204
3298
  a.label
3205
- ) : /* @__PURE__ */ React19.createElement(
3299
+ ) : /* @__PURE__ */ React20.createElement(
3206
3300
  "button",
3207
3301
  {
3208
3302
  key: i,
@@ -3215,7 +3309,7 @@ function ToastItem(props) {
3215
3309
  a.label
3216
3310
  );
3217
3311
  })) : null,
3218
- /* @__PURE__ */ React19.createElement(
3312
+ /* @__PURE__ */ React20.createElement(
3219
3313
  IconButton,
3220
3314
  {
3221
3315
  icon: "x",
@@ -3246,8 +3340,8 @@ function hotkeyMatcher(spec) {
3246
3340
  function Toaster(props = {}) {
3247
3341
  const t = useStrings();
3248
3342
  const mounted = useMounted();
3249
- const s = React19.useState(toastState.list);
3250
- React19.useEffect(function() {
3343
+ const s = React20.useState(toastState.list);
3344
+ React20.useEffect(function() {
3251
3345
  toastState.subs.push(s[1]);
3252
3346
  s[1](toastState.list.slice());
3253
3347
  return function() {
@@ -3256,9 +3350,9 @@ function Toaster(props = {}) {
3256
3350
  });
3257
3351
  };
3258
3352
  }, []);
3259
- const region = React19.useRef(null);
3353
+ const region = React20.useRef(null);
3260
3354
  const hotkey = props.hotkey === void 0 ? "Alt+T" : props.hotkey;
3261
- React19.useEffect(
3355
+ React20.useEffect(
3262
3356
  function() {
3263
3357
  if (!hotkey) return;
3264
3358
  const match = hotkeyMatcher(hotkey);
@@ -3289,7 +3383,7 @@ function Toaster(props = {}) {
3289
3383
  const pos = props.position || "bottom";
3290
3384
  const offset = props.offset;
3291
3385
  return (0, import_react_dom5.createPortal)(
3292
- /* @__PURE__ */ React19.createElement(
3386
+ /* @__PURE__ */ React20.createElement(
3293
3387
  "div",
3294
3388
  {
3295
3389
  ref: region,
@@ -3301,7 +3395,7 @@ function Toaster(props = {}) {
3301
3395
  "aria-keyshortcuts": hotkey || void 0
3302
3396
  },
3303
3397
  s[0].map(function(t2) {
3304
- return /* @__PURE__ */ React19.createElement(ToastItem, { key: t2.id, toast: t2 });
3398
+ return /* @__PURE__ */ React20.createElement(ToastItem, { key: t2.id, toast: t2 });
3305
3399
  })
3306
3400
  ),
3307
3401
  document.body
@@ -3309,12 +3403,12 @@ function Toaster(props = {}) {
3309
3403
  }
3310
3404
 
3311
3405
  // src/PasswordField.tsx
3312
- var React20 = __toESM(require("react"), 1);
3313
- var PasswordField = React20.forwardRef(function PasswordField2(props, ref) {
3406
+ var React21 = __toESM(require("react"), 1);
3407
+ var PasswordField = React21.forwardRef(function PasswordField2(props, ref) {
3314
3408
  const t = useStrings();
3315
- const shown = React20.useState(false);
3409
+ const shown = React21.useState(false);
3316
3410
  const rest = omit(props, ["toggle", "className"]);
3317
- return /* @__PURE__ */ React20.createElement(
3411
+ return /* @__PURE__ */ React21.createElement(
3318
3412
  TextField,
3319
3413
  {
3320
3414
  autoComplete: "current-password",
@@ -3324,7 +3418,7 @@ var PasswordField = React20.forwardRef(function PasswordField2(props, ref) {
3324
3418
  spellCheck: false,
3325
3419
  autoCapitalize: "none",
3326
3420
  className: cx("aura-password", props.className),
3327
- suffix: props.toggle === false ? void 0 : /* @__PURE__ */ React20.createElement(
3421
+ suffix: props.toggle === false ? void 0 : /* @__PURE__ */ React21.createElement(
3328
3422
  IconButton,
3329
3423
  {
3330
3424
  icon: shown[0] ? "eye-off" : "eye",
@@ -3341,7 +3435,7 @@ var PasswordField = React20.forwardRef(function PasswordField2(props, ref) {
3341
3435
  });
3342
3436
 
3343
3437
  // src/FormErrorSummary.tsx
3344
- var React21 = __toESM(require("react"), 1);
3438
+ var React22 = __toESM(require("react"), 1);
3345
3439
  function items(errors) {
3346
3440
  if (Array.isArray(errors)) return errors;
3347
3441
  const out = [];
@@ -3370,16 +3464,16 @@ function fieldElement(field) {
3370
3464
  }
3371
3465
  return named;
3372
3466
  }
3373
- var FormErrorSummary = React21.forwardRef(
3467
+ var FormErrorSummary = React22.forwardRef(
3374
3468
  function FormErrorSummary2(props, ref) {
3375
3469
  const t = useStrings();
3376
3470
  const auto = uid(), id = props.id || auto;
3377
3471
  const list = items(props.errors);
3378
- const box = React21.useRef(null);
3472
+ const box = React22.useRef(null);
3379
3473
  const keyed = props.focusKey !== void 0;
3380
- const lastKey = React21.useRef(null), armed = React21.useRef(false), hadErrors = React21.useRef(false);
3474
+ const lastKey = React22.useRef(null), armed = React22.useRef(false), hadErrors = React22.useRef(false);
3381
3475
  const has = list.length > 0;
3382
- React21.useEffect(
3476
+ React22.useEffect(
3383
3477
  function() {
3384
3478
  const appeared = has && !hadErrors.current;
3385
3479
  hadErrors.current = has;
@@ -3403,7 +3497,7 @@ var FormErrorSummary = React21.forwardRef(
3403
3497
  // eslint-disable-next-line react-hooks/exhaustive-deps
3404
3498
  [has, props.focusKey, keyed]
3405
3499
  );
3406
- React21.useEffect(
3500
+ React22.useEffect(
3407
3501
  function() {
3408
3502
  if (!keyed) return;
3409
3503
  function disarm() {
@@ -3422,7 +3516,7 @@ var FormErrorSummary = React21.forwardRef(
3422
3516
  [keyed]
3423
3517
  );
3424
3518
  if (!list.length) return null;
3425
- return /* @__PURE__ */ React21.createElement(
3519
+ return /* @__PURE__ */ React22.createElement(
3426
3520
  "div",
3427
3521
  {
3428
3522
  ref: function(el) {
@@ -3436,9 +3530,9 @@ var FormErrorSummary = React21.forwardRef(
3436
3530
  "aria-labelledby": id + "-title",
3437
3531
  className: cx("aura-alert aura-alert--danger aura-error-summary", props.className)
3438
3532
  },
3439
- /* @__PURE__ */ React21.createElement(Icon, { name: "circle-alert", className: "aura-alert__icon" }),
3440
- /* @__PURE__ */ React21.createElement("div", { className: "aura-alert__body" }, /* @__PURE__ */ React21.createElement("h2", { className: "aura-alert__title", id: id + "-title" }, props.title || t.errorSummary(list.length)), /* @__PURE__ */ React21.createElement("ul", { className: "aura-error-summary__list" }, list.map(function(e) {
3441
- return /* @__PURE__ */ React21.createElement("li", { key: e.field }, /* @__PURE__ */ React21.createElement(
3533
+ /* @__PURE__ */ React22.createElement(Icon, { name: "circle-alert", className: "aura-alert__icon" }),
3534
+ /* @__PURE__ */ React22.createElement("div", { className: "aura-alert__body" }, /* @__PURE__ */ React22.createElement("h2", { className: "aura-alert__title", id: id + "-title" }, props.title || t.errorSummary(list.length)), /* @__PURE__ */ React22.createElement("ul", { className: "aura-error-summary__list" }, list.map(function(e) {
3535
+ return /* @__PURE__ */ React22.createElement("li", { key: e.field }, /* @__PURE__ */ React22.createElement(
3442
3536
  "a",
3443
3537
  {
3444
3538
  href: "#" + e.field,
@@ -3463,20 +3557,20 @@ var FormErrorSummary = React21.forwardRef(
3463
3557
  );
3464
3558
 
3465
3559
  // src/FilterBar.tsx
3466
- var React23 = __toESM(require("react"), 1);
3560
+ var React24 = __toESM(require("react"), 1);
3467
3561
 
3468
3562
  // src/Tag.tsx
3469
- var React22 = __toESM(require("react"), 1);
3470
- var Tag = React22.forwardRef(function Tag2(props, ref) {
3563
+ var React23 = __toESM(require("react"), 1);
3564
+ var Tag = React23.forwardRef(function Tag2(props, ref) {
3471
3565
  const t = useStrings();
3472
3566
  const selectable = props.onClick != null || props.selected != null;
3473
3567
  const rest = omit(props, ["onRemove", "selected", "icon", "className", "children", "disabled", "removeLabel"]);
3474
3568
  const inner = [
3475
- props.icon ? /* @__PURE__ */ React22.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
3476
- /* @__PURE__ */ React22.createElement("span", { key: "t", className: "aura-tag__text" }, props.children)
3569
+ props.icon ? /* @__PURE__ */ React23.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
3570
+ /* @__PURE__ */ React23.createElement("span", { key: "t", className: "aura-tag__text" }, props.children)
3477
3571
  ];
3478
3572
  if (selectable) {
3479
- return /* @__PURE__ */ React22.createElement(
3573
+ return /* @__PURE__ */ React23.createElement(
3480
3574
  "button",
3481
3575
  {
3482
3576
  ...rest,
@@ -3486,11 +3580,11 @@ var Tag = React22.forwardRef(function Tag2(props, ref) {
3486
3580
  disabled: props.disabled,
3487
3581
  className: cx("aura-tag is-selectable", props.selected && "is-selected", props.className)
3488
3582
  },
3489
- props.selected ? /* @__PURE__ */ React22.createElement(Icon, { name: "check", size: 14 }) : inner[0],
3583
+ props.selected ? /* @__PURE__ */ React23.createElement(Icon, { name: "check", size: 14 }) : inner[0],
3490
3584
  inner[1]
3491
3585
  );
3492
3586
  }
3493
- return /* @__PURE__ */ React22.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React22.createElement(
3587
+ return /* @__PURE__ */ React23.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React23.createElement(
3494
3588
  "button",
3495
3589
  {
3496
3590
  type: "button",
@@ -3498,21 +3592,21 @@ var Tag = React22.forwardRef(function Tag2(props, ref) {
3498
3592
  "aria-label": props.removeLabel || t.remove(typeof props.children === "string" ? props.children : ""),
3499
3593
  onClick: props.onRemove
3500
3594
  },
3501
- /* @__PURE__ */ React22.createElement(Icon, { name: "x", size: 12 })
3595
+ /* @__PURE__ */ React23.createElement(Icon, { name: "x", size: 12 })
3502
3596
  ) : null);
3503
3597
  });
3504
3598
 
3505
3599
  // src/FilterBar.tsx
3506
- var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3600
+ var FilterBar = React24.forwardRef(function FilterBar2(props, ref) {
3507
3601
  const t = useStrings();
3508
3602
  const id = uid();
3509
3603
  const hasSearch = !!props.onSearchChange;
3510
- const draft = React23.useState(props.search || "");
3511
- const timer = React23.useRef(null);
3512
- const sent = React23.useRef(props.search || "");
3513
- const onChange = React23.useRef(props.onSearchChange);
3604
+ const draft = React24.useState(props.search || "");
3605
+ const timer = React24.useRef(null);
3606
+ const sent = React24.useRef(props.search || "");
3607
+ const onChange = React24.useRef(props.onSearchChange);
3514
3608
  onChange.current = props.onSearchChange;
3515
- React23.useEffect(
3609
+ React24.useEffect(
3516
3610
  function() {
3517
3611
  if ((props.search || "") !== sent.current) {
3518
3612
  sent.current = props.search || "";
@@ -3521,7 +3615,7 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3521
3615
  },
3522
3616
  [props.search]
3523
3617
  );
3524
- React23.useEffect(function() {
3618
+ React24.useEffect(function() {
3525
3619
  return function() {
3526
3620
  if (timer.current) clearTimeout(timer.current);
3527
3621
  };
@@ -3546,7 +3640,7 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3546
3640
  const filters = props.filters || [];
3547
3641
  const anything = filters.length > 0 || !!(props.search || draft[0]);
3548
3642
  const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
3549
- return /* @__PURE__ */ React23.createElement(
3643
+ return /* @__PURE__ */ React24.createElement(
3550
3644
  "div",
3551
3645
  {
3552
3646
  ref,
@@ -3554,7 +3648,7 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3554
3648
  "aria-label": props.label || t.filters,
3555
3649
  className: cx("aura-filterbar", props.className)
3556
3650
  },
3557
- /* @__PURE__ */ React23.createElement("div", { className: "aura-filterbar__row" }, hasSearch ? /* @__PURE__ */ React23.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React23.createElement(Icon, { name: "search", className: "aura-input__icon" }), /* @__PURE__ */ React23.createElement(
3651
+ /* @__PURE__ */ React24.createElement("div", { className: "aura-filterbar__row" }, hasSearch ? /* @__PURE__ */ React24.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React24.createElement(Icon, { name: "search", className: "aura-input__icon" }), /* @__PURE__ */ React24.createElement(
3558
3652
  "input",
3559
3653
  {
3560
3654
  id,
@@ -3575,7 +3669,7 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3575
3669
  }
3576
3670
  }
3577
3671
  }
3578
- ), draft[0] ? /* @__PURE__ */ React23.createElement(
3672
+ ), draft[0] ? /* @__PURE__ */ React24.createElement(
3579
3673
  IconButton,
3580
3674
  {
3581
3675
  icon: "x",
@@ -3586,10 +3680,10 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3586
3680
  send("");
3587
3681
  }
3588
3682
  }
3589
- ) : null) : null, props.children ? /* @__PURE__ */ React23.createElement("div", { className: "aura-filterbar__controls" }, props.children) : null, /* @__PURE__ */ React23.createElement("span", { className: "aura-filterbar__spacer" }), count != null ? /* @__PURE__ */ React23.createElement("span", { className: "aura-filterbar__count", "aria-live": "polite" }, count) : null, props.actions ? /* @__PURE__ */ React23.createElement("div", { className: "aura-filterbar__actions" }, props.actions) : null),
3590
- filters.length || props.onClearAll && anything ? /* @__PURE__ */ React23.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
3591
- return /* @__PURE__ */ React23.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
3592
- }), props.onClearAll && anything ? /* @__PURE__ */ React23.createElement(
3683
+ ) : null) : null, props.children ? /* @__PURE__ */ React24.createElement("div", { className: "aura-filterbar__controls" }, props.children) : null, /* @__PURE__ */ React24.createElement("span", { className: "aura-filterbar__spacer" }), count != null ? /* @__PURE__ */ React24.createElement("span", { className: "aura-filterbar__count", "aria-live": "polite" }, count) : null, props.actions ? /* @__PURE__ */ React24.createElement("div", { className: "aura-filterbar__actions" }, props.actions) : null),
3684
+ filters.length || props.onClearAll && anything ? /* @__PURE__ */ React24.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
3685
+ return /* @__PURE__ */ React24.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
3686
+ }), props.onClearAll && anything ? /* @__PURE__ */ React24.createElement(
3593
3687
  "button",
3594
3688
  {
3595
3689
  type: "button",
@@ -3607,11 +3701,11 @@ var FilterBar = React23.forwardRef(function FilterBar2(props, ref) {
3607
3701
  });
3608
3702
 
3609
3703
  // src/Command.tsx
3610
- var React25 = __toESM(require("react"), 1);
3704
+ var React26 = __toESM(require("react"), 1);
3611
3705
  var import_react_dom6 = require("react-dom");
3612
3706
 
3613
3707
  // src/useModal.tsx
3614
- var React24 = __toESM(require("react"), 1);
3708
+ var React25 = __toESM(require("react"), 1);
3615
3709
  var locks = 0;
3616
3710
  var savedOverflow = "";
3617
3711
  function lockScroll() {
@@ -3638,9 +3732,9 @@ function tabbable(el) {
3638
3732
  }
3639
3733
  function useModal(open, ref, opts) {
3640
3734
  const mounted = useMounted();
3641
- const prev = React24.useRef(null);
3735
+ const prev = React25.useRef(null);
3642
3736
  const o = opts || {};
3643
- React24.useEffect(
3737
+ React25.useEffect(
3644
3738
  function() {
3645
3739
  if (!open || !mounted) return;
3646
3740
  prev.current = document.activeElement;
@@ -3698,21 +3792,21 @@ function Command(props) {
3698
3792
  const t = useStrings();
3699
3793
  const density = useDensity();
3700
3794
  const id = uid(), listId = id + "-list";
3701
- const box = React25.useRef(null);
3702
- const input = React25.useRef(null);
3703
- const qState = React25.useState(""), act = React25.useState(null);
3795
+ const box = React26.useRef(null);
3796
+ const input = React26.useRef(null);
3797
+ const qState = React26.useState(""), act = React26.useState(null);
3704
3798
  const query = props.query !== void 0 ? props.query : qState[0];
3705
3799
  function setQuery(v) {
3706
3800
  if (props.query === void 0) qState[1](v);
3707
3801
  if (props.onQueryChange) props.onQueryChange(v);
3708
3802
  }
3709
- const openRef = React25.useRef(props.open);
3803
+ const openRef = React26.useRef(props.open);
3710
3804
  openRef.current = props.open;
3711
3805
  const close = function() {
3712
3806
  props.onOpenChange(false);
3713
3807
  };
3714
3808
  const modal = useModal(props.open, box, { onEscape: close });
3715
- React25.useEffect(
3809
+ React26.useEffect(
3716
3810
  function() {
3717
3811
  if (props.hotkey === false) return;
3718
3812
  function onKey2(e) {
@@ -3728,7 +3822,7 @@ function Command(props) {
3728
3822
  },
3729
3823
  [props.hotkey, props.onOpenChange]
3730
3824
  );
3731
- React25.useEffect(
3825
+ React26.useEffect(
3732
3826
  function() {
3733
3827
  if (!props.open) {
3734
3828
  if (query) setQuery("");
@@ -3750,25 +3844,25 @@ function Command(props) {
3750
3844
  if (!g) groups.push(g = { name, items: [] });
3751
3845
  g.items.push(it);
3752
3846
  });
3753
- const flat = [];
3847
+ const flat2 = [];
3754
3848
  groups.forEach(function(g) {
3755
3849
  g.items.forEach(function(it) {
3756
- flat.push(it);
3850
+ flat2.push(it);
3757
3851
  });
3758
3852
  });
3759
- const enabled = flat.map(function(it, i2) {
3853
+ const enabled = flat2.map(function(it, i2) {
3760
3854
  return it.disabled ? -1 : i2;
3761
3855
  }).filter(function(i2) {
3762
3856
  return i2 >= 0;
3763
3857
  });
3764
- const byId = act[0] == null ? -1 : flat.findIndex(function(it) {
3858
+ const byId = act[0] == null ? -1 : flat2.findIndex(function(it) {
3765
3859
  return it.id === act[0];
3766
3860
  });
3767
3861
  const active = enabled.indexOf(byId) >= 0 ? byId : enabled.length ? enabled[0] : -1;
3768
3862
  const optId = function(i2) {
3769
3863
  return id + "-o" + i2;
3770
3864
  };
3771
- React25.useEffect(
3865
+ React26.useEffect(
3772
3866
  function() {
3773
3867
  if (!box.current || active < 0) return;
3774
3868
  const el = box.current.querySelector("#" + CSS.escape(optId(active)));
@@ -3789,7 +3883,7 @@ function Command(props) {
3789
3883
  if (dir === "first") n2 = 0;
3790
3884
  else if (dir === "last") n2 = enabled.length - 1;
3791
3885
  else n2 = (at + dir + enabled.length) % enabled.length;
3792
- act[1](flat[enabled[n2]].id);
3886
+ act[1](flat2[enabled[n2]].id);
3793
3887
  }
3794
3888
  function onKey(e) {
3795
3889
  if (e.key === "ArrowDown") {
@@ -3807,13 +3901,13 @@ function Command(props) {
3807
3901
  } else if (e.key === "Enter") {
3808
3902
  if (e.nativeEvent.isComposing || e.keyCode === 229) return;
3809
3903
  e.preventDefault();
3810
- if (active >= 0) run(flat[active]);
3904
+ if (active >= 0) run(flat2[active]);
3811
3905
  }
3812
3906
  }
3813
3907
  if (!modal.ready) return null;
3814
3908
  let i = -1;
3815
3909
  return (0, import_react_dom6.createPortal)(
3816
- /* @__PURE__ */ React25.createElement(
3910
+ /* @__PURE__ */ React26.createElement(
3817
3911
  "div",
3818
3912
  {
3819
3913
  className: "aura-dialog-layer aura-command-layer",
@@ -3823,8 +3917,8 @@ function Command(props) {
3823
3917
  e.stopPropagation();
3824
3918
  }
3825
3919
  },
3826
- /* @__PURE__ */ React25.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
3827
- /* @__PURE__ */ React25.createElement(
3920
+ /* @__PURE__ */ React26.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
3921
+ /* @__PURE__ */ React26.createElement(
3828
3922
  "div",
3829
3923
  {
3830
3924
  ref: box,
@@ -3834,15 +3928,15 @@ function Command(props) {
3834
3928
  tabIndex: -1,
3835
3929
  className: cx("aura-command", props.className)
3836
3930
  },
3837
- /* @__PURE__ */ React25.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React25.createElement(Icon, { name: "search", className: "aura-command__search-icon" }), /* @__PURE__ */ React25.createElement(
3931
+ /* @__PURE__ */ React26.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React26.createElement(Icon, { name: "search", className: "aura-command__search-icon" }), /* @__PURE__ */ React26.createElement(
3838
3932
  "input",
3839
3933
  {
3840
3934
  ref: input,
3841
3935
  "data-autofocus": "",
3842
3936
  type: "text",
3843
3937
  role: "combobox",
3844
- "aria-expanded": flat.length > 0,
3845
- "aria-controls": flat.length ? listId : void 0,
3938
+ "aria-expanded": flat2.length > 0,
3939
+ "aria-controls": flat2.length ? listId : void 0,
3846
3940
  "aria-autocomplete": "list",
3847
3941
  "aria-activedescendant": active >= 0 ? optId(active) : void 0,
3848
3942
  "aria-label": props.label || t.commandMenu,
@@ -3857,8 +3951,8 @@ function Command(props) {
3857
3951
  },
3858
3952
  onKeyDown: onKey
3859
3953
  }
3860
- ), /* @__PURE__ */ React25.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
3861
- /* @__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(
3954
+ ), /* @__PURE__ */ React26.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
3955
+ /* @__PURE__ */ React26.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React26.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React26.createElement(Icon, { name: "loader-circle", className: "aura-spin" }), t.searching) : null, !flat2.length ? props.loading ? null : /* @__PURE__ */ React26.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React26.createElement(
3862
3956
  "div",
3863
3957
  {
3864
3958
  id: listId,
@@ -3868,7 +3962,7 @@ function Command(props) {
3868
3962
  },
3869
3963
  groups.map(function(g, gi) {
3870
3964
  const gid = id + "-g" + gi;
3871
- return /* @__PURE__ */ React25.createElement(
3965
+ return /* @__PURE__ */ React26.createElement(
3872
3966
  "div",
3873
3967
  {
3874
3968
  key: g.name || gi,
@@ -3876,11 +3970,11 @@ function Command(props) {
3876
3970
  "aria-labelledby": g.name ? gid : void 0,
3877
3971
  className: "aura-command__group"
3878
3972
  },
3879
- g.name ? /* @__PURE__ */ React25.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
3973
+ g.name ? /* @__PURE__ */ React26.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
3880
3974
  g.items.map(function(it) {
3881
3975
  i++;
3882
3976
  const n2 = i;
3883
- return /* @__PURE__ */ React25.createElement(
3977
+ return /* @__PURE__ */ React26.createElement(
3884
3978
  "div",
3885
3979
  {
3886
3980
  key: it.id,
@@ -3903,16 +3997,16 @@ function Command(props) {
3903
3997
  run(it);
3904
3998
  }
3905
3999
  },
3906
- it.icon ? /* @__PURE__ */ React25.createElement(Icon, { name: it.icon }) : null,
3907
- /* @__PURE__ */ React25.createElement("span", { className: "aura-command__text" }, /* @__PURE__ */ React25.createElement("span", { className: "aura-command__label" }, it.label), it.description ? /* @__PURE__ */ React25.createElement("span", { className: "aura-command__desc" }, it.description) : null),
3908
- it.shortcut ? /* @__PURE__ */ React25.createElement("kbd", { className: "aura-command__kbd" }, it.shortcut) : null
4000
+ it.icon ? /* @__PURE__ */ React26.createElement(Icon, { name: it.icon }) : null,
4001
+ /* @__PURE__ */ React26.createElement("span", { className: "aura-command__text" }, /* @__PURE__ */ React26.createElement("span", { className: "aura-command__label" }, it.label), it.description ? /* @__PURE__ */ React26.createElement("span", { className: "aura-command__desc" }, it.description) : null),
4002
+ it.shortcut ? /* @__PURE__ */ React26.createElement("kbd", { className: "aura-command__kbd" }, it.shortcut) : null
3909
4003
  );
3910
4004
  })
3911
4005
  );
3912
4006
  })
3913
4007
  )),
3914
- /* @__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) : ""),
3915
- /* @__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"))
4008
+ /* @__PURE__ */ React26.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat2.length ? t.noMatches : props.loading === false && query ? t.results(flat2.length) : ""),
4009
+ /* @__PURE__ */ React26.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React26.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
3916
4010
  )
3917
4011
  ),
3918
4012
  document.body
@@ -3920,12 +4014,12 @@ function Command(props) {
3920
4014
  }
3921
4015
 
3922
4016
  // src/Tooltip.tsx
3923
- var React26 = __toESM(require("react"), 1);
4017
+ var React27 = __toESM(require("react"), 1);
3924
4018
  var import_react_dom7 = require("react-dom");
3925
- var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
3926
- const id = uid(), st = React26.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
3927
- const anchor = React26.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip = React26.useRef(null), timer = React26.useRef(void 0);
3928
- const pos = React26.useState(null), mounted = useMounted();
4019
+ var Tooltip = React27.forwardRef(function Tooltip2(props, ref) {
4020
+ const id = uid(), st = React27.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
4021
+ const anchor = React27.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip = React27.useRef(null), timer = React27.useRef(void 0);
4022
+ const pos = React27.useState(null), mounted = useMounted();
3929
4023
  function show2(now) {
3930
4024
  clearTimeout(timer.current);
3931
4025
  timer.current = setTimeout(
@@ -3945,7 +4039,7 @@ var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
3945
4039
  set(false);
3946
4040
  }, 120);
3947
4041
  }
3948
- React26.useEffect(function() {
4042
+ React27.useEffect(function() {
3949
4043
  return function() {
3950
4044
  clearTimeout(timer.current);
3951
4045
  };
@@ -3989,7 +4083,7 @@ var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
3989
4083
  },
3990
4084
  [open, mounted]
3991
4085
  );
3992
- React26.useEffect(
4086
+ React27.useEffect(
3993
4087
  function() {
3994
4088
  if (!open) return;
3995
4089
  function esc(e) {
@@ -4002,8 +4096,8 @@ var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
4002
4096
  },
4003
4097
  [open]
4004
4098
  );
4005
- const child = React26.Children.only(props.children);
4006
- const trigger = /* @__PURE__ */ React26.createElement(
4099
+ const child = React27.Children.only(props.children);
4100
+ const trigger = /* @__PURE__ */ React27.createElement(
4007
4101
  "span",
4008
4102
  {
4009
4103
  ref: anchorMerged,
@@ -4017,10 +4111,10 @@ var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
4017
4111
  },
4018
4112
  onBlur: hide
4019
4113
  },
4020
- React26.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
4114
+ React27.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
4021
4115
  );
4022
- return /* @__PURE__ */ React26.createElement(React26.Fragment, null, trigger, open && mounted ? (0, import_react_dom7.createPortal)(
4023
- /* @__PURE__ */ React26.createElement(
4116
+ return /* @__PURE__ */ React27.createElement(React27.Fragment, null, trigger, open && mounted ? (0, import_react_dom7.createPortal)(
4117
+ /* @__PURE__ */ React27.createElement(
4024
4118
  "div",
4025
4119
  {
4026
4120
  ref: tip,
@@ -4040,12 +4134,12 @@ var Tooltip = React26.forwardRef(function Tooltip2(props, ref) {
4040
4134
  });
4041
4135
 
4042
4136
  // src/Dialog.tsx
4043
- var React27 = __toESM(require("react"), 1);
4137
+ var React28 = __toESM(require("react"), 1);
4044
4138
  var import_react_dom8 = require("react-dom");
4045
- var Dialog = React27.forwardRef(function Dialog2(props, ref) {
4139
+ var Dialog = React28.forwardRef(function Dialog2(props, ref) {
4046
4140
  const t = useStrings();
4047
4141
  const density = useDensity();
4048
- const own = React27.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4142
+ const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4049
4143
  function close() {
4050
4144
  if (props.dismissible !== false && props.onClose) props.onClose();
4051
4145
  }
@@ -4058,7 +4152,7 @@ var Dialog = React27.forwardRef(function Dialog2(props, ref) {
4058
4152
  });
4059
4153
  if (!modal.ready) return null;
4060
4154
  return (0, import_react_dom8.createPortal)(
4061
- /* @__PURE__ */ React27.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React27.createElement(
4155
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
4062
4156
  "div",
4063
4157
  {
4064
4158
  className: "aura-scrim",
@@ -4068,7 +4162,7 @@ var Dialog = React27.forwardRef(function Dialog2(props, ref) {
4068
4162
  },
4069
4163
  "aria-hidden": true
4070
4164
  }
4071
- ), /* @__PURE__ */ React27.createElement(
4165
+ ), /* @__PURE__ */ React28.createElement(
4072
4166
  "div",
4073
4167
  {
4074
4168
  ref: merged,
@@ -4079,18 +4173,18 @@ var Dialog = React27.forwardRef(function Dialog2(props, ref) {
4079
4173
  tabIndex: -1,
4080
4174
  className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
4081
4175
  },
4082
- /* @__PURE__ */ React27.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React27.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React27.createElement(IconButton, { icon: "x", label: t.close, className: "aura-dialog__close", onClick: close }) : null),
4083
- props.description ? /* @__PURE__ */ React27.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
4084
- props.children ? /* @__PURE__ */ React27.createElement("div", { className: "aura-dialog__body" }, props.children) : null,
4085
- props.footer ? /* @__PURE__ */ React27.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null
4176
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React28.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React28.createElement(IconButton, { icon: "x", label: t.close, className: "aura-dialog__close", onClick: close }) : null),
4177
+ props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
4178
+ props.children ? /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__body" }, props.children) : null,
4179
+ props.footer ? /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null
4086
4180
  )),
4087
4181
  document.body
4088
4182
  );
4089
4183
  });
4090
- var Drawer = React27.forwardRef(function Drawer2(props, ref) {
4184
+ var Drawer = React28.forwardRef(function Drawer2(props, ref) {
4091
4185
  const t = useStrings();
4092
4186
  const density = useDensity();
4093
- const own = React27.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4187
+ const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4094
4188
  function close() {
4095
4189
  if (props.dismissible !== false && props.onClose) props.onClose();
4096
4190
  }
@@ -4104,7 +4198,7 @@ var Drawer = React27.forwardRef(function Drawer2(props, ref) {
4104
4198
  const side = props.side === "left" ? "left" : "right";
4105
4199
  const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
4106
4200
  return (0, import_react_dom8.createPortal)(
4107
- /* @__PURE__ */ React27.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React27.createElement(
4201
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
4108
4202
  "div",
4109
4203
  {
4110
4204
  className: "aura-scrim",
@@ -4114,7 +4208,7 @@ var Drawer = React27.forwardRef(function Drawer2(props, ref) {
4114
4208
  } : void 0,
4115
4209
  "aria-hidden": true
4116
4210
  }
4117
- ), /* @__PURE__ */ React27.createElement(
4211
+ ), /* @__PURE__ */ React28.createElement(
4118
4212
  "div",
4119
4213
  {
4120
4214
  ref: merged,
@@ -4126,17 +4220,17 @@ var Drawer = React27.forwardRef(function Drawer2(props, ref) {
4126
4220
  tabIndex: -1,
4127
4221
  className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
4128
4222
  },
4129
- props.title || props.dismissible !== false ? /* @__PURE__ */ React27.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React27.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React27.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React27.createElement(IconButton, { icon: "x", label: t.close, onClick: close }) : null) : null,
4130
- props.description ? /* @__PURE__ */ React27.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
4131
- /* @__PURE__ */ React27.createElement("div", { className: "aura-drawer__body" }, props.children),
4132
- props.footer ? /* @__PURE__ */ React27.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
4223
+ props.title || props.dismissible !== false ? /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React28.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React28.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React28.createElement(IconButton, { icon: "x", label: t.close, onClick: close }) : null) : null,
4224
+ props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
4225
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__body" }, props.children),
4226
+ props.footer ? /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
4133
4227
  )),
4134
4228
  document.body
4135
4229
  );
4136
4230
  });
4137
4231
 
4138
4232
  // src/DataTable.tsx
4139
- var React28 = __toESM(require("react"), 1);
4233
+ var React29 = __toESM(require("react"), 1);
4140
4234
  var import_react_dom9 = require("react-dom");
4141
4235
  var BP = { sm: 640, md: 768, lg: 1024, xl: 1280 };
4142
4236
  var DEFAULT_COLUMNS = [
@@ -4159,7 +4253,7 @@ function hidePx(c) {
4159
4253
  var ROW_H_DEFAULT = 48;
4160
4254
  var OVERSCAN = 8;
4161
4255
  var FLEX_MIN = 160;
4162
- var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4256
+ var DataTableImpl = React29.forwardRef(function DataTable(props, ref) {
4163
4257
  const t = useStrings();
4164
4258
  const columns = props.columns || DEFAULT_COLUMNS;
4165
4259
  const byKey = {};
@@ -4198,7 +4292,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4198
4292
  const droppedSig = selState[0].length === selected.length ? "" : "#" + selState[0].filter(function(k) {
4199
4293
  return rejected[String(k)];
4200
4294
  }).join("\0") + "#" + selected.join("\0");
4201
- React28.useEffect(
4295
+ React29.useEffect(
4202
4296
  function() {
4203
4297
  if (droppedSig !== "") setSelected(selected);
4204
4298
  },
@@ -4235,19 +4329,19 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4235
4329
  }),
4236
4330
  props.onPinnedColumnsChange
4237
4331
  );
4238
- const widthState = React28.useState({});
4332
+ const widthState = React29.useState({});
4239
4333
  const widths = widthState[0], setWidths = widthState[1];
4240
- const activeState = React28.useState({ r: 1, c: 0 });
4241
- const scrollState = React28.useState(0);
4334
+ const activeState = React29.useState({ r: 1, c: 0 });
4335
+ const scrollState = React29.useState(0);
4242
4336
  const scrollTop = scrollState[0], setScrollTop = scrollState[1];
4243
- const scrolledX = React28.useState(false);
4244
- const menuState = React28.useState(null);
4337
+ const scrolledX = React29.useState(false);
4338
+ const menuState = React29.useState(null);
4245
4339
  const menu = menuState[0], setMenu = menuState[1];
4246
- const dragState = React28.useState(null);
4340
+ const dragState = React29.useState(null);
4247
4341
  const drag = dragState[0], setDrag = dragState[1];
4248
- const gridRef = React28.useRef(null);
4249
- const wrapRef = React28.useRef(null), wrapMerged = useMergedRef(ref, wrapRef);
4250
- const boxWidth = React28.useState(null);
4342
+ const gridRef = React29.useRef(null);
4343
+ const wrapRef = React29.useRef(null), wrapMerged = useMergedRef(ref, wrapRef);
4344
+ const boxWidth = React29.useState(null);
4251
4345
  const measure = !!props.stackBelow || columns.some(function(c) {
4252
4346
  return c.hideBelow != null;
4253
4347
  });
@@ -4257,7 +4351,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4257
4351
  return px != null && a.indexOf(px) === i;
4258
4352
  }).length
4259
4353
  );
4260
- React28.useEffect(
4354
+ React29.useEffect(
4261
4355
  function() {
4262
4356
  if (!measure || !wrapRef.current || typeof ResizeObserver === "undefined") return;
4263
4357
  const ro = new ResizeObserver(function(en) {
@@ -4302,8 +4396,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4302
4396
  const px = hidePx(c);
4303
4397
  return px != null && below(boxWidth[0], px);
4304
4398
  }
4305
- const scrollRef = React28.useRef(null);
4306
- const tipState = React28.useState(null), tip = tipState[0], setTip = tipState[1];
4399
+ const scrollRef = React29.useRef(null);
4400
+ const tipState = React29.useState(null), tip = tipState[0], setTip = tipState[1];
4307
4401
  function showFull(e) {
4308
4402
  const el = e.target.closest ? e.target.closest(".aura-table__td") : null;
4309
4403
  if (!el || el.scrollWidth <= el.clientWidth + 1 || el.querySelector("button, input, .aura-pill"))
@@ -4315,7 +4409,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4315
4409
  setTip(null);
4316
4410
  }
4317
4411
  const tipEl = tip && typeof document !== "undefined" ? (0, import_react_dom9.createPortal)(
4318
- /* @__PURE__ */ React28.createElement(
4412
+ /* @__PURE__ */ React29.createElement(
4319
4413
  "div",
4320
4414
  {
4321
4415
  className: "aura-tooltip aura-tooltip--above",
@@ -4326,7 +4420,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4326
4420
  ),
4327
4421
  document.body
4328
4422
  ) : null;
4329
- const rowH = React28.useState(ROW_H_DEFAULT);
4423
+ const rowH = React29.useState(ROW_H_DEFAULT);
4330
4424
  const ROW_H = rowH[0];
4331
4425
  useIsoLayoutEffect(function() {
4332
4426
  const el = wrapRef.current;
@@ -4334,8 +4428,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4334
4428
  const v = parseFloat(getComputedStyle(el).getPropertyValue("--aura-table-row-height"));
4335
4429
  if (v > 0 && v !== rowH[0]) rowH[1](v);
4336
4430
  });
4337
- const pending = React28.useRef(null);
4338
- const resizing = React28.useRef(false);
4431
+ const pending = React29.useRef(null);
4432
+ const resizing = React29.useRef(false);
4339
4433
  useIsoLayoutEffect(function() {
4340
4434
  if (!gridRef.current) return;
4341
4435
  const els = gridRef.current.querySelectorAll(
@@ -4419,7 +4513,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4419
4513
  return s;
4420
4514
  }
4421
4515
  const sortCol = sort && sort.key ? byKey[sort.key] : void 0;
4422
- const view = React28.useMemo(
4516
+ const view = React29.useMemo(
4423
4517
  function() {
4424
4518
  if (manual || !sort || !sort.key || !byKey[sort.key]) return rows;
4425
4519
  const col = byKey[sort.key];
@@ -4461,8 +4555,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4461
4555
  const pageRows = pageSize && !manual ? view.slice(first, first + pageSize) : view;
4462
4556
  const canSortAny = !busy && (manual ? total > 1 : rows.length > 1);
4463
4557
  const shownTotal = manual && props.totalRows == null ? first + rows.length : total;
4464
- const prevCount = React28.useRef(pageCount);
4465
- React28.useEffect(
4558
+ const prevCount = React29.useRef(pageCount);
4559
+ React29.useEffect(
4466
4560
  function() {
4467
4561
  if (busy) return;
4468
4562
  const before = prevCount.current;
@@ -4476,9 +4570,9 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4476
4570
  [pageState[0], page, busy, pageCount]
4477
4571
  );
4478
4572
  const linkPaging = !!props.getPageHref && !props.onPageChange && !oneCallback;
4479
- const prevLink = React28.useRef(null), nextLink = React28.useRef(null), jumpLink = React28.useRef(null);
4480
- const jumpState = React28.useState(null);
4481
- React28.useEffect(
4573
+ const prevLink = React29.useRef(null), nextLink = React29.useRef(null), jumpLink = React29.useRef(null);
4574
+ const jumpState = React29.useState(null);
4575
+ React29.useEffect(
4482
4576
  function() {
4483
4577
  if (jumpState[0] == null) return;
4484
4578
  if (jumpLink.current) jumpLink.current.click();
@@ -4529,7 +4623,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4529
4623
  );
4530
4624
  }
4531
4625
  function rowLinkWrap(r, content) {
4532
- return rowHref ? /* @__PURE__ */ React28.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
4626
+ return rowHref ? /* @__PURE__ */ React29.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
4533
4627
  }
4534
4628
  const height = props.height || 0;
4535
4629
  const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
@@ -4554,7 +4648,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4554
4648
  if (!activeRendered) return r === 0 && c === ac ? 0 : -1;
4555
4649
  return r === ar && c === ac ? 0 : -1;
4556
4650
  }
4557
- React28.useEffect(function() {
4651
+ React29.useEffect(function() {
4558
4652
  const p = pending.current;
4559
4653
  if (!p || !gridRef.current) return;
4560
4654
  let c = p.c;
@@ -4896,10 +4990,10 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4896
4990
  e.stopPropagation();
4897
4991
  }
4898
4992
  }
4899
- const head = [/* @__PURE__ */ React28.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
4993
+ const head = [/* @__PURE__ */ React29.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
4900
4994
  if (selectable)
4901
4995
  head.push(
4902
- /* @__PURE__ */ React28.createElement(
4996
+ /* @__PURE__ */ React29.createElement(
4903
4997
  "span",
4904
4998
  {
4905
4999
  key: "__sel",
@@ -4913,7 +5007,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4913
5007
  activeState[1]({ r: 0, c: 0 });
4914
5008
  }
4915
5009
  },
4916
- pageKeys.length ? /* @__PURE__ */ React28.createElement(
5010
+ pageKeys.length ? /* @__PURE__ */ React29.createElement(
4917
5011
  Checkbox,
4918
5012
  {
4919
5013
  hideLabel: true,
@@ -4924,7 +5018,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4924
5018
  onChange: toggleAll
4925
5019
  }
4926
5020
  ) : null,
4927
- pageKeys.length ? /* @__PURE__ */ React28.createElement("span", { className: "aura-table__sel-text" }, nSel ? t.selectedCount(nSel) : t.selectAll) : /* @__PURE__ */ React28.createElement("span", { className: "aura-sr-only" }, t.selectRows)
5021
+ pageKeys.length ? /* @__PURE__ */ React29.createElement("span", { className: "aura-table__sel-text" }, nSel ? t.selectedCount(nSel) : t.selectAll) : /* @__PURE__ */ React29.createElement("span", { className: "aura-sr-only" }, t.selectRows)
4928
5022
  )
4929
5023
  );
4930
5024
  vis.forEach(function(c, i) {
@@ -4934,7 +5028,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4934
5028
  const ariaSort = isSorted && canSort ? sort.dir === "desc" ? "descending" : "ascending" : canSort ? "none" : void 0;
4935
5029
  const pin = isPinned(c), edge = pin && i === nPinned - 1;
4936
5030
  head.push(
4937
- /* @__PURE__ */ React28.createElement(
5031
+ /* @__PURE__ */ React29.createElement(
4938
5032
  "span",
4939
5033
  {
4940
5034
  key: c.key,
@@ -4984,7 +5078,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4984
5078
  setDrag(null);
4985
5079
  }
4986
5080
  },
4987
- /* @__PURE__ */ React28.createElement("span", { className: "aura-table__th-inner" }, canSort ? /* @__PURE__ */ React28.createElement(
5081
+ /* @__PURE__ */ React29.createElement("span", { className: "aura-table__th-inner" }, canSort ? /* @__PURE__ */ React29.createElement(
4988
5082
  "button",
4989
5083
  {
4990
5084
  type: "button",
@@ -4996,8 +5090,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
4996
5090
  }
4997
5091
  },
4998
5092
  c.label,
4999
- /* @__PURE__ */ React28.createElement(Icon, { name: isSorted ? sort.dir === "desc" ? "arrow-down" : "arrow-up" : "arrow-up-down", size: 12 })
5000
- ) : /* @__PURE__ */ React28.createElement("span", { className: cx("aura-table__th-label", !c.label && "aura-sr-only") }, c.label || (c.actions ? t.actions : c.key)), pin ? /* @__PURE__ */ React28.createElement(Icon, { name: "pin", size: 12, className: "aura-table__pin-icon", label: t.pinned }) : null, controls ? /* @__PURE__ */ React28.createElement(
5093
+ /* @__PURE__ */ React29.createElement(Icon, { name: isSorted ? sort.dir === "desc" ? "arrow-down" : "arrow-up" : "arrow-up-down", size: 12 })
5094
+ ) : /* @__PURE__ */ React29.createElement("span", { className: cx("aura-table__th-label", !c.label && "aura-sr-only") }, c.label || (c.actions ? t.actions : c.key)), pin ? /* @__PURE__ */ React29.createElement(Icon, { name: "pin", size: 12, className: "aura-table__pin-icon", label: t.pinned }) : null, controls ? /* @__PURE__ */ React29.createElement(
5001
5095
  "button",
5002
5096
  {
5003
5097
  type: "button",
@@ -5011,9 +5105,9 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5011
5105
  openMenu("col", c.key, e.currentTarget, { r: 0, c: ci });
5012
5106
  }
5013
5107
  },
5014
- /* @__PURE__ */ React28.createElement(Icon, { name: "ellipsis" })
5108
+ /* @__PURE__ */ React29.createElement(Icon, { name: "ellipsis" })
5015
5109
  ) : null),
5016
- canResize(c) ? /* @__PURE__ */ React28.createElement(
5110
+ canResize(c) ? /* @__PURE__ */ React29.createElement(
5017
5111
  "span",
5018
5112
  {
5019
5113
  className: "aura-table__resize",
@@ -5035,7 +5129,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5035
5129
  );
5036
5130
  });
5037
5131
  head.push(
5038
- /* @__PURE__ */ React28.createElement(
5132
+ /* @__PURE__ */ React29.createElement(
5039
5133
  "span",
5040
5134
  {
5041
5135
  key: "__gr",
@@ -5046,14 +5140,14 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5046
5140
  );
5047
5141
  function cellContent(c, r) {
5048
5142
  const v = r[c.key];
5049
- return c.render ? c.render(r) : c.pill ? /* @__PURE__ */ React28.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
5143
+ return c.render ? c.render(r) : c.pill ? /* @__PURE__ */ React29.createElement(StatusPill, { ...{ tone: c.tones && c.tones[v] } }, v) : v;
5050
5144
  }
5051
5145
  function rowCells(r, i, k, isSel) {
5052
5146
  const ri = i + 1;
5053
- const cells = [/* @__PURE__ */ React28.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
5147
+ const cells = [/* @__PURE__ */ React29.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
5054
5148
  if (selectable)
5055
5149
  cells.push(
5056
- /* @__PURE__ */ React28.createElement(
5150
+ /* @__PURE__ */ React29.createElement(
5057
5151
  "span",
5058
5152
  {
5059
5153
  key: "__sel",
@@ -5067,7 +5161,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5067
5161
  if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
5068
5162
  }
5069
5163
  },
5070
- canSelect(r) ? /* @__PURE__ */ React28.createElement(
5164
+ canSelect(r) ? /* @__PURE__ */ React29.createElement(
5071
5165
  Checkbox,
5072
5166
  {
5073
5167
  hideLabel: true,
@@ -5084,7 +5178,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5084
5178
  vis.forEach(function(c, j) {
5085
5179
  const ci = j + (selectable ? 1 : 0), v = r[c.key], pin = isPinned(c);
5086
5180
  cells.push(
5087
- /* @__PURE__ */ React28.createElement(
5181
+ /* @__PURE__ */ React29.createElement(
5088
5182
  "span",
5089
5183
  {
5090
5184
  key: c.key,
@@ -5109,9 +5203,9 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5109
5203
  )
5110
5204
  );
5111
5205
  });
5112
- if (hasFields) cells.push(/* @__PURE__ */ React28.createElement("span", { key: "__br", className: "aura-table__break", "aria-hidden": true }));
5206
+ if (hasFields) cells.push(/* @__PURE__ */ React29.createElement("span", { key: "__br", className: "aura-table__break", "aria-hidden": true }));
5113
5207
  cells.push(
5114
- /* @__PURE__ */ React28.createElement(
5208
+ /* @__PURE__ */ React29.createElement(
5115
5209
  "span",
5116
5210
  {
5117
5211
  key: "__gr",
@@ -5128,14 +5222,14 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5128
5222
  const n2 = pageSize || props.skeletonRows || 5;
5129
5223
  const skRows = body = [];
5130
5224
  for (let i = 0; i < n2; i++) {
5131
- const sk = [/* @__PURE__ */ React28.createElement("span", { key: "__gl", className: "aura-table__gutter" })];
5225
+ const sk = [/* @__PURE__ */ React29.createElement("span", { key: "__gl", className: "aura-table__gutter" })];
5132
5226
  if (selectable)
5133
5227
  sk.push(
5134
- /* @__PURE__ */ React28.createElement("span", { key: "__sel", className: cx("aura-table__sel", nPinned && "is-pinned") }, /* @__PURE__ */ React28.createElement("span", { className: "aura-skel aura-skel--box" }))
5228
+ /* @__PURE__ */ React29.createElement("span", { key: "__sel", className: cx("aura-table__sel", nPinned && "is-pinned") }, /* @__PURE__ */ React29.createElement("span", { className: "aura-skel aura-skel--box" }))
5135
5229
  );
5136
5230
  vis.forEach(function(c, j) {
5137
5231
  sk.push(
5138
- /* @__PURE__ */ React28.createElement(
5232
+ /* @__PURE__ */ React29.createElement(
5139
5233
  "span",
5140
5234
  {
5141
5235
  key: c.key,
@@ -5144,7 +5238,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5144
5238
  ...cardAttrs(c, j),
5145
5239
  "data-label": void 0
5146
5240
  },
5147
- /* @__PURE__ */ React28.createElement(
5241
+ /* @__PURE__ */ React29.createElement(
5148
5242
  "span",
5149
5243
  {
5150
5244
  className: cx("aura-skel", c.pill && "aura-skel--pill"),
@@ -5154,28 +5248,28 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5154
5248
  )
5155
5249
  );
5156
5250
  });
5157
- if (hasFields) sk.push(/* @__PURE__ */ React28.createElement("span", { key: "__br", className: "aura-table__break" }));
5251
+ if (hasFields) sk.push(/* @__PURE__ */ React29.createElement("span", { key: "__br", className: "aura-table__break" }));
5158
5252
  sk.push(
5159
- /* @__PURE__ */ React28.createElement("span", { key: "__gr", className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker") })
5253
+ /* @__PURE__ */ React29.createElement("span", { key: "__gr", className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker") })
5160
5254
  );
5161
5255
  skRows.push(
5162
- /* @__PURE__ */ React28.createElement("div", { key: "sk" + i, className: "aura-table__row aura-table__row--skeleton", "aria-hidden": true, style: rowStyle }, sk)
5256
+ /* @__PURE__ */ React29.createElement("div", { key: "sk" + i, className: "aura-table__row aura-table__row--skeleton", "aria-hidden": true, style: rowStyle }, sk)
5163
5257
  );
5164
5258
  }
5165
5259
  } else if (!rows.length) {
5166
5260
  const em = props.empty || {};
5167
- body = /* @__PURE__ */ React28.createElement("div", { className: "aura-table__empty", role: "row" }, /* @__PURE__ */ React28.createElement("div", { role: "gridcell" }, /* @__PURE__ */ React28.createElement("span", { className: "aura-table__empty-icon" }, /* @__PURE__ */ React28.createElement(Icon, { name: em.icon || "inbox", size: "lg" })), /* @__PURE__ */ React28.createElement("p", { className: "aura-table__empty-title" }, em.title || t.empty), em.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-table__empty-text" }, em.description) : null, em.action ? /* @__PURE__ */ React28.createElement("div", { className: "aura-table__empty-action" }, em.action) : null));
5261
+ body = /* @__PURE__ */ React29.createElement("div", { className: "aura-table__empty", role: "row" }, /* @__PURE__ */ React29.createElement("div", { role: "gridcell" }, /* @__PURE__ */ React29.createElement("span", { className: "aura-table__empty-icon" }, /* @__PURE__ */ React29.createElement(Icon, { name: em.icon || "inbox", size: "lg" })), /* @__PURE__ */ React29.createElement("p", { className: "aura-table__empty-title" }, em.title || t.empty), em.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-table__empty-text" }, em.description) : null, em.action ? /* @__PURE__ */ React29.createElement("div", { className: "aura-table__empty-action" }, em.action) : null));
5168
5262
  } else {
5169
5263
  const bodyRows = body = [];
5170
5264
  if (virtual && start > 0)
5171
5265
  bodyRows.push(
5172
- /* @__PURE__ */ React28.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
5266
+ /* @__PURE__ */ React29.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
5173
5267
  );
5174
5268
  for (let ri = start; ri < end; ri++) {
5175
5269
  (function(r, i) {
5176
5270
  const k = r[rowKey], isSel = !!selSet[k];
5177
5271
  bodyRows.push(
5178
- /* @__PURE__ */ React28.createElement(
5272
+ /* @__PURE__ */ React29.createElement(
5179
5273
  "div",
5180
5274
  {
5181
5275
  key: k,
@@ -5202,7 +5296,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5202
5296
  }
5203
5297
  if (virtual && end < pageRows.length)
5204
5298
  bodyRows.push(
5205
- /* @__PURE__ */ React28.createElement(
5299
+ /* @__PURE__ */ React29.createElement(
5206
5300
  "div",
5207
5301
  {
5208
5302
  key: "__bot",
@@ -5217,7 +5311,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5217
5311
  function pagerButton(dir) {
5218
5312
  const p = page + dir, off = busy || (dir < 0 ? page <= 1 : page >= pageCount), label = dir < 0 ? t.prevPage : t.nextPage, icon = dir < 0 ? "chevron-left" : "chevron-right";
5219
5313
  if (props.getPageHref && !off)
5220
- return /* @__PURE__ */ React28.createElement(
5314
+ return /* @__PURE__ */ React29.createElement(
5221
5315
  Link,
5222
5316
  {
5223
5317
  ref: dir < 0 ? prevLink : nextLink,
@@ -5232,9 +5326,9 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5232
5326
  }
5233
5327
  }
5234
5328
  },
5235
- /* @__PURE__ */ React28.createElement(Icon, { name: icon })
5329
+ /* @__PURE__ */ React29.createElement(Icon, { name: icon })
5236
5330
  );
5237
- return /* @__PURE__ */ React28.createElement(
5331
+ return /* @__PURE__ */ React29.createElement(
5238
5332
  IconButton,
5239
5333
  {
5240
5334
  icon,
@@ -5249,11 +5343,11 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5249
5343
  const openTotal = manual && props.totalRows == null && !!pageSize && rows.length >= pageSize;
5250
5344
  if (pageSize && (rows.length || busy || page > 1)) {
5251
5345
  const from = rows.length ? first + 1 : 0, to = manual ? first + rows.length : Math.min(first + pageSize, view.length);
5252
- foot = /* @__PURE__ */ React28.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React28.createElement("span", { "aria-live": "polite" }, busy ? t.loading : openTotal ? t.rangeOpen(from, to) : t.range(from, to, shownTotal)), /* @__PURE__ */ React28.createElement("span", { className: "aura-table__pager" }, /* @__PURE__ */ React28.createElement("span", null, openTotal ? t.pageOpen(page) : t.page(page, pageCount)), pagerButton(-1), pagerButton(1)));
5346
+ foot = /* @__PURE__ */ React29.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React29.createElement("span", { "aria-live": "polite" }, busy ? t.loading : openTotal ? t.rangeOpen(from, to) : t.range(from, to, shownTotal)), /* @__PURE__ */ React29.createElement("span", { className: "aura-table__pager" }, /* @__PURE__ */ React29.createElement("span", null, openTotal ? t.pageOpen(page) : t.page(page, pageCount)), pagerButton(-1), pagerButton(1)));
5253
5347
  } else if (height && rows.length && !loading) {
5254
- foot = /* @__PURE__ */ React28.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React28.createElement("span", null, t.rowCount(shownTotal)), selectable && selected.length ? /* @__PURE__ */ React28.createElement("span", null, t.selectedCount(selected.length)) : /* @__PURE__ */ React28.createElement("span", null));
5348
+ foot = /* @__PURE__ */ React29.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React29.createElement("span", null, t.rowCount(shownTotal)), selectable && selected.length ? /* @__PURE__ */ React29.createElement("span", null, t.selectedCount(selected.length)) : /* @__PURE__ */ React29.createElement("span", null));
5255
5349
  }
5256
- const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */ React28.createElement(
5350
+ const totalRow = props.footer && rows.length && !loading ? /* @__PURE__ */ React29.createElement(
5257
5351
  "div",
5258
5352
  {
5259
5353
  role: "row",
@@ -5262,8 +5356,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5262
5356
  className: cx("aura-table__row aura-table__total", props.stickyFooter && "is-sticky"),
5263
5357
  style: rowStyle
5264
5358
  },
5265
- /* @__PURE__ */ React28.createElement("span", { className: "aura-table__gutter", "aria-hidden": true }),
5266
- selectable ? /* @__PURE__ */ React28.createElement(
5359
+ /* @__PURE__ */ React29.createElement("span", { className: "aura-table__gutter", "aria-hidden": true }),
5360
+ selectable ? /* @__PURE__ */ React29.createElement(
5267
5361
  "span",
5268
5362
  {
5269
5363
  role: "gridcell",
@@ -5278,7 +5372,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5278
5372
  ) : null,
5279
5373
  vis.map(function(c, j) {
5280
5374
  const pin = isPinned(c), ci = j + (selectable ? 1 : 0);
5281
- return /* @__PURE__ */ React28.createElement(
5375
+ return /* @__PURE__ */ React29.createElement(
5282
5376
  "span",
5283
5377
  {
5284
5378
  key: c.key,
@@ -5304,8 +5398,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5304
5398
  props.footer[c.key]
5305
5399
  );
5306
5400
  }),
5307
- hasFields ? /* @__PURE__ */ React28.createElement("span", { className: "aura-table__break", "aria-hidden": true }) : null,
5308
- /* @__PURE__ */ React28.createElement(
5401
+ hasFields ? /* @__PURE__ */ React29.createElement("span", { className: "aura-table__break", "aria-hidden": true }) : null,
5402
+ /* @__PURE__ */ React29.createElement(
5309
5403
  "span",
5310
5404
  {
5311
5405
  className: cx("aura-table__gutter aura-table__gutter--end", controls && "has-picker"),
@@ -5319,7 +5413,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5319
5413
  scrollPaddingBottom: stickyTotal ? ROW_H + "px" : void 0
5320
5414
  };
5321
5415
  if (height) scrollStyle["--aura-table-h"] = height + "px";
5322
- const gridEl = /* @__PURE__ */ React28.createElement(
5416
+ const gridEl = /* @__PURE__ */ React29.createElement(
5323
5417
  "div",
5324
5418
  {
5325
5419
  ref: levels.length ? wrapRef : wrapMerged,
@@ -5333,8 +5427,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5333
5427
  ),
5334
5428
  style: levels.length ? { ["--aura-q-back"]: String(levels[levels.length - 1].px / Q) } : void 0
5335
5429
  },
5336
- refreshing ? /* @__PURE__ */ React28.createElement("span", { className: "aura-table__busy-bar", "aria-hidden": true }) : null,
5337
- /* @__PURE__ */ React28.createElement(
5430
+ refreshing ? /* @__PURE__ */ React29.createElement("span", { className: "aura-table__busy-bar", "aria-hidden": true }) : null,
5431
+ /* @__PURE__ */ React29.createElement(
5338
5432
  "div",
5339
5433
  {
5340
5434
  ref: function(el) {
@@ -5363,7 +5457,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5363
5457
  if (sx !== scrolledX[0]) scrolledX[1](sx);
5364
5458
  }
5365
5459
  },
5366
- /* @__PURE__ */ React28.createElement(
5460
+ /* @__PURE__ */ React29.createElement(
5367
5461
  "div",
5368
5462
  {
5369
5463
  className: cx("aura-table__head", selectable && nRows > 0 && !busy && "has-select-all"),
@@ -5376,8 +5470,8 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5376
5470
  body,
5377
5471
  totalRow
5378
5472
  ),
5379
- busy ? /* @__PURE__ */ React28.createElement("span", { className: "aura-sr-only", role: "status" }, t.loadingRows) : null,
5380
- controls ? /* @__PURE__ */ React28.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React28.createElement(
5473
+ busy ? /* @__PURE__ */ React29.createElement("span", { className: "aura-sr-only", role: "status" }, t.loadingRows) : null,
5474
+ controls ? /* @__PURE__ */ React29.createElement("div", { className: "aura-table__picker" }, /* @__PURE__ */ React29.createElement(
5381
5475
  IconButton,
5382
5476
  {
5383
5477
  icon: "columns-3",
@@ -5389,7 +5483,7 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5389
5483
  }
5390
5484
  )) : null,
5391
5485
  foot,
5392
- menu ? /* @__PURE__ */ React28.createElement(
5486
+ menu ? /* @__PURE__ */ React29.createElement(
5393
5487
  Menu,
5394
5488
  {
5395
5489
  anchor: menu.anchor,
@@ -5399,13 +5493,13 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5399
5493
  }
5400
5494
  ) : null,
5401
5495
  tipEl,
5402
- jumpState[0] != null && props.getPageHref ? /* @__PURE__ */ React28.createElement(Link, { ref: jumpLink, href: props.getPageHref(jumpState[0]), hidden: true, tabIndex: -1, "aria-hidden": true }) : null
5496
+ jumpState[0] != null && props.getPageHref ? /* @__PURE__ */ React29.createElement(Link, { ref: jumpLink, href: props.getPageHref(jumpState[0]), hidden: true, tabIndex: -1, "aria-hidden": true }) : null
5403
5497
  );
5404
5498
  if (!levels.length) return gridEl;
5405
5499
  let out = gridEl;
5406
5500
  for (let i = levels.length - 1; i >= 0; i--) {
5407
5501
  const prev = i === 0 ? Q : levels[i - 1].px;
5408
- out = /* @__PURE__ */ React28.createElement(
5502
+ out = /* @__PURE__ */ React29.createElement(
5409
5503
  "div",
5410
5504
  {
5411
5505
  className: cx("aura-table-q", "aura-table-q--" + levels[i].name),
@@ -5414,36 +5508,19 @@ var DataTableImpl = React28.forwardRef(function DataTable(props, ref) {
5414
5508
  out
5415
5509
  );
5416
5510
  }
5417
- return /* @__PURE__ */ React28.createElement("div", { ref, className: cx("aura-table-box", props.className) }, out);
5511
+ return /* @__PURE__ */ React29.createElement("div", { ref, className: cx("aura-table-box", props.className) }, out);
5418
5512
  });
5419
5513
  var DataTable2 = DataTableImpl;
5420
5514
 
5421
5515
  // src/Card.tsx
5422
- var React29 = __toESM(require("react"), 1);
5423
- var h4 = React29.createElement;
5424
- var Card = React29.forwardRef(function Card2(props, ref) {
5425
- const creative = props.variant === "creative";
5426
- return h4(
5427
- props.as || "section",
5428
- {
5429
- ref,
5430
- className: cx(
5431
- "aura-card",
5432
- creative && "aura-card--creative",
5433
- props.interactive && "is-interactive",
5434
- props.className
5435
- ),
5436
- "aria-labelledby": props.title && props.titleId ? props.titleId : void 0
5437
- },
5438
- props.title || props.actions ? /* @__PURE__ */ React29.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React29.createElement("div", { className: "aura-card__heading" }, props.title ? h4("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React29.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React29.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
5439
- props.children ? /* @__PURE__ */ React29.createElement("div", { className: "aura-card__body" }, props.children) : null,
5440
- props.footer ? /* @__PURE__ */ React29.createElement("div", { className: "aura-card__foot" }, props.footer) : null
5441
- );
5516
+ var React30 = __toESM(require("react"), 1);
5517
+ var Card = React30.forwardRef(function Card2(props, ref) {
5518
+ return cardElement(props, ref);
5442
5519
  });
5443
5520
 
5444
5521
  // src/Tabs.tsx
5445
- var React30 = __toESM(require("react"), 1);
5446
- var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5522
+ var React31 = __toESM(require("react"), 1);
5523
+ var Tabs = React31.forwardRef(function Tabs2(props, ref) {
5447
5524
  const items2 = props.tabs || [], base = uid();
5448
5525
  const asLinks = items2.length > 0 && items2.every(function(t) {
5449
5526
  return !!t.href;
@@ -5457,27 +5534,27 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5457
5534
  props.onChange
5458
5535
  );
5459
5536
  const cur = asLinks && "value" in props ? props.value : st[0];
5460
- const refs = React30.useRef({});
5537
+ const refs = React31.useRef({});
5461
5538
  const current2 = items2.filter(function(t) {
5462
5539
  return t.id === cur;
5463
5540
  })[0] || firstOn || items2[0];
5464
5541
  const Link = useLinkComponent(props.linkComponent);
5465
5542
  if (asLinks)
5466
- return /* @__PURE__ */ React30.createElement(
5543
+ return /* @__PURE__ */ React31.createElement(
5467
5544
  "nav",
5468
5545
  {
5469
5546
  ref,
5470
5547
  "aria-label": props.label,
5471
5548
  className: cx("aura-tabs aura-tabs--links", props.className)
5472
5549
  },
5473
- /* @__PURE__ */ React30.createElement("div", { className: "aura-tabs__list" }, items2.map(function(t) {
5550
+ /* @__PURE__ */ React31.createElement("div", { className: "aura-tabs__list" }, items2.map(function(t) {
5474
5551
  const on = t.id === cur;
5475
5552
  const inner = [
5476
- t.icon ? /* @__PURE__ */ React30.createElement(Icon, { key: "i", name: t.icon }) : null,
5553
+ t.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: t.icon }) : null,
5477
5554
  t.label,
5478
- t.count != null ? /* @__PURE__ */ React30.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
5555
+ t.count != null ? /* @__PURE__ */ React31.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
5479
5556
  ];
5480
- return t.disabled ? /* @__PURE__ */ React30.createElement("span", { key: t.id, className: "aura-tab is-disabled", "aria-disabled": true }, inner) : /* @__PURE__ */ React30.createElement(
5557
+ return t.disabled ? /* @__PURE__ */ React31.createElement("span", { key: t.id, className: "aura-tab is-disabled", "aria-disabled": true }, inner) : /* @__PURE__ */ React31.createElement(
5481
5558
  Link,
5482
5559
  {
5483
5560
  key: t.id,
@@ -5501,7 +5578,7 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5501
5578
  st[1](t.id);
5502
5579
  if (refs.current[t.id]) refs.current[t.id].focus();
5503
5580
  }
5504
- return /* @__PURE__ */ React30.createElement("div", { ref, className: cx("aura-tabs", props.className) }, /* @__PURE__ */ React30.createElement(
5581
+ return /* @__PURE__ */ React31.createElement("div", { ref, className: cx("aura-tabs", props.className) }, /* @__PURE__ */ React31.createElement(
5505
5582
  "div",
5506
5583
  {
5507
5584
  role: "tablist",
@@ -5528,7 +5605,7 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5528
5605
  },
5529
5606
  items2.map(function(t) {
5530
5607
  const on = current2 && t.id === current2.id;
5531
- return /* @__PURE__ */ React30.createElement(
5608
+ return /* @__PURE__ */ React31.createElement(
5532
5609
  "button",
5533
5610
  {
5534
5611
  key: t.id,
@@ -5547,12 +5624,12 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5547
5624
  st[1](t.id);
5548
5625
  }
5549
5626
  },
5550
- t.icon ? /* @__PURE__ */ React30.createElement(Icon, { name: t.icon }) : null,
5627
+ t.icon ? /* @__PURE__ */ React31.createElement(Icon, { name: t.icon }) : null,
5551
5628
  t.label,
5552
- t.count != null ? /* @__PURE__ */ React30.createElement("span", { className: "aura-tab__count" }, t.count) : null
5629
+ t.count != null ? /* @__PURE__ */ React31.createElement("span", { className: "aura-tab__count" }, t.count) : null
5553
5630
  );
5554
5631
  })
5555
- ), current2 && current2.content !== void 0 ? /* @__PURE__ */ React30.createElement(
5632
+ ), current2 && current2.content !== void 0 ? /* @__PURE__ */ React31.createElement(
5556
5633
  "div",
5557
5634
  {
5558
5635
  role: "tabpanel",
@@ -5566,14 +5643,14 @@ var Tabs = React30.forwardRef(function Tabs2(props, ref) {
5566
5643
  });
5567
5644
 
5568
5645
  // src/SideNav.tsx
5569
- var React31 = __toESM(require("react"), 1);
5646
+ var React32 = __toESM(require("react"), 1);
5570
5647
  var import_react_dom10 = require("react-dom");
5571
5648
  function contains(it, id) {
5572
5649
  return !!id && !!it.children && it.children.some(function(c) {
5573
5650
  return c.id === id || contains(c, id);
5574
5651
  });
5575
5652
  }
5576
- var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5653
+ var SideNav = React32.forwardRef(function SideNav2(props, ref) {
5577
5654
  const t = useStrings();
5578
5655
  const Link = useLinkComponent(props.linkComponent);
5579
5656
  const base = uid();
@@ -5585,14 +5662,14 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5585
5662
  const active = st[0];
5586
5663
  const col = useMaybeControlled(props.collapsed, !!props.defaultCollapsed, props.onCollapsedChange);
5587
5664
  const collapsed = col[0];
5588
- const tipState = React31.useState(null), tip = tipState[0], setTip = tipState[1];
5589
- React31.useEffect(
5665
+ const tipState = React32.useState(null), tip = tipState[0], setTip = tipState[1];
5666
+ React32.useEffect(
5590
5667
  function() {
5591
5668
  if (!collapsed) setTip(null);
5592
5669
  },
5593
5670
  [collapsed]
5594
5671
  );
5595
- React31.useEffect(
5672
+ React32.useEffect(
5596
5673
  function() {
5597
5674
  if (!tip) return;
5598
5675
  function esc(e) {
@@ -5617,12 +5694,12 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5617
5694
  return { onMouseEnter: show2, onFocus: show2, onMouseLeave: hide, onBlur: hide };
5618
5695
  }
5619
5696
  const sections = props.sections || [{ items: props.items || [] }];
5620
- const openState = React31.useState({}), toggled = openState[0], setToggled = openState[1];
5697
+ const openState = React32.useState({}), toggled = openState[0], setToggled = openState[1];
5621
5698
  function isOpen(it) {
5622
5699
  if (toggled[it.id] != null) return toggled[it.id];
5623
5700
  return !!it.defaultOpen || contains(it, active);
5624
5701
  }
5625
- React31.useEffect(
5702
+ React32.useEffect(
5626
5703
  function() {
5627
5704
  if (!active) return;
5628
5705
  const next = {};
@@ -5644,7 +5721,7 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5644
5721
  },
5645
5722
  [active]
5646
5723
  );
5647
- const navRef = React31.useRef(null);
5724
+ const navRef = React32.useRef(null);
5648
5725
  function onKeyDown(e) {
5649
5726
  const k = e.key;
5650
5727
  if (k !== "ArrowDown" && k !== "ArrowUp" && k !== "Home" && k !== "End") return;
@@ -5663,12 +5740,12 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5663
5740
  function inner(it, group, open) {
5664
5741
  const marked = it.count != null && it.count > 0 || it.badge != null;
5665
5742
  return [
5666
- it.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: it.icon }) : collapsed ? /* @__PURE__ */ React31.createElement("span", { key: "i", className: "aura-nav__initial", "aria-hidden": "true" }, it.label.charAt(0)) : null,
5667
- collapsed && marked ? /* @__PURE__ */ React31.createElement("span", { key: "d", className: "aura-nav__dot", "aria-hidden": "true" }) : null,
5668
- /* @__PURE__ */ React31.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
5669
- it.badge != null ? /* @__PURE__ */ React31.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
5670
- it.count != null ? /* @__PURE__ */ React31.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
5671
- group ? /* @__PURE__ */ React31.createElement(Icon, { key: "g", name: "chevron-down", className: cx("aura-nav__chevron", open && "is-open") }) : null
5743
+ it.icon ? /* @__PURE__ */ React32.createElement(Icon, { key: "i", name: it.icon }) : collapsed ? /* @__PURE__ */ React32.createElement("span", { key: "i", className: "aura-nav__initial", "aria-hidden": "true" }, it.label.charAt(0)) : null,
5744
+ collapsed && marked ? /* @__PURE__ */ React32.createElement("span", { key: "d", className: "aura-nav__dot", "aria-hidden": "true" }) : null,
5745
+ /* @__PURE__ */ React32.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
5746
+ it.badge != null ? /* @__PURE__ */ React32.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
5747
+ it.count != null ? /* @__PURE__ */ React32.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
5748
+ group ? /* @__PURE__ */ React32.createElement(Icon, { key: "g", name: "chevron-down", className: cx("aura-nav__chevron", open && "is-open") }) : null
5672
5749
  ];
5673
5750
  }
5674
5751
  function item(it, depth) {
@@ -5676,7 +5753,7 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5676
5753
  const open = !collapsed && isOpen(it);
5677
5754
  const listId = base + "-" + it.id;
5678
5755
  const holdsActive = contains(it, active);
5679
- return /* @__PURE__ */ React31.createElement("li", { key: it.id, className: "aura-nav__group" }, /* @__PURE__ */ React31.createElement(
5756
+ return /* @__PURE__ */ React32.createElement("li", { key: it.id, className: "aura-nav__group" }, /* @__PURE__ */ React32.createElement(
5680
5757
  "button",
5681
5758
  {
5682
5759
  type: "button",
@@ -5705,7 +5782,7 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5705
5782
  }
5706
5783
  },
5707
5784
  inner(it, true, open)
5708
- ), /* @__PURE__ */ React31.createElement("ul", { id: listId, className: "aura-nav__list aura-nav__sub", hidden: !open }, it.children.map(function(c) {
5785
+ ), /* @__PURE__ */ React32.createElement("ul", { id: listId, className: "aura-nav__list aura-nav__sub", hidden: !open }, it.children.map(function(c) {
5709
5786
  return item(c, depth + 1);
5710
5787
  })));
5711
5788
  }
@@ -5721,9 +5798,9 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5721
5798
  st[1](it.id);
5722
5799
  }
5723
5800
  };
5724
- return /* @__PURE__ */ React31.createElement("li", { key: it.id }, it.href ? /* @__PURE__ */ React31.createElement(Link, { href: it.href, ...common }, inner(it, false, false)) : /* @__PURE__ */ React31.createElement("button", { type: "button", ...common }, inner(it, false, false)));
5801
+ return /* @__PURE__ */ React32.createElement("li", { key: it.id }, it.href ? /* @__PURE__ */ React32.createElement(Link, { href: it.href, ...common }, inner(it, false, false)) : /* @__PURE__ */ React32.createElement("button", { type: "button", ...common }, inner(it, false, false)));
5725
5802
  }
5726
- return /* @__PURE__ */ React31.createElement(
5803
+ return /* @__PURE__ */ React32.createElement(
5727
5804
  "nav",
5728
5805
  {
5729
5806
  ref: function(el) {
@@ -5741,14 +5818,14 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5741
5818
  "aria-label": props.label || t.mainNav,
5742
5819
  onKeyDown
5743
5820
  },
5744
- props.header ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__header" }, props.header) : null,
5745
- /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__scroll" }, sections.map(function(s, i) {
5746
- return /* @__PURE__ */ React31.createElement("div", { key: i, className: "aura-nav__section" }, s.title ? /* @__PURE__ */ React31.createElement("p", { className: "aura-nav__title" }, s.title) : null, /* @__PURE__ */ React31.createElement("ul", { className: "aura-nav__list" }, s.items.map(function(it) {
5821
+ props.header ? /* @__PURE__ */ React32.createElement("div", { className: "aura-nav__header" }, props.header) : null,
5822
+ /* @__PURE__ */ React32.createElement("div", { className: "aura-nav__scroll" }, sections.map(function(s, i) {
5823
+ return /* @__PURE__ */ React32.createElement("div", { key: i, className: "aura-nav__section" }, s.title ? /* @__PURE__ */ React32.createElement("p", { className: "aura-nav__title" }, s.title) : null, /* @__PURE__ */ React32.createElement("ul", { className: "aura-nav__list" }, s.items.map(function(it) {
5747
5824
  return item(it, 0);
5748
5825
  })));
5749
5826
  })),
5750
- props.footer ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__footer" }, props.footer) : null,
5751
- props.collapsible ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React31.createElement(
5827
+ props.footer ? /* @__PURE__ */ React32.createElement("div", { className: "aura-nav__footer" }, props.footer) : null,
5828
+ props.collapsible ? /* @__PURE__ */ React32.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React32.createElement(
5752
5829
  IconButton,
5753
5830
  {
5754
5831
  icon: collapsed ? "panel-left-open" : "panel-left-close",
@@ -5761,7 +5838,7 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5761
5838
  }
5762
5839
  )) : null,
5763
5840
  tip && typeof document !== "undefined" ? (0, import_react_dom10.createPortal)(
5764
- /* @__PURE__ */ React31.createElement(
5841
+ /* @__PURE__ */ React32.createElement(
5765
5842
  "div",
5766
5843
  {
5767
5844
  className: "aura-tooltip aura-tooltip--right",
@@ -5776,35 +5853,35 @@ var SideNav = React31.forwardRef(function SideNav2(props, ref) {
5776
5853
  });
5777
5854
 
5778
5855
  // src/Breadcrumb.tsx
5779
- var React32 = __toESM(require("react"), 1);
5780
- var Breadcrumb = React32.forwardRef(function Breadcrumb2(props, ref) {
5856
+ var React33 = __toESM(require("react"), 1);
5857
+ var Breadcrumb = React33.forwardRef(function Breadcrumb2(props, ref) {
5781
5858
  const t = useStrings();
5782
5859
  const Link = useLinkComponent(props.linkComponent);
5783
5860
  const items2 = props.items || [];
5784
- return /* @__PURE__ */ React32.createElement("nav", { ref, "aria-label": props.label || t.breadcrumb, className: cx("aura-crumbs", props.className) }, /* @__PURE__ */ React32.createElement("ol", null, items2.map(function(it, i) {
5861
+ return /* @__PURE__ */ React33.createElement("nav", { ref, "aria-label": props.label || t.breadcrumb, className: cx("aura-crumbs", props.className) }, /* @__PURE__ */ React33.createElement("ol", null, items2.map(function(it, i) {
5785
5862
  const last = i === items2.length - 1;
5786
- return /* @__PURE__ */ React32.createElement("li", { key: i }, last ? /* @__PURE__ */ React32.createElement("span", { "aria-current": "page", className: "aura-crumbs__current" }, it.label) : it.href ? /* @__PURE__ */ React32.createElement(Link, { href: it.href, onClick: it.onClick }, it.label) : it.onClick ? /* @__PURE__ */ React32.createElement("button", { type: "button", onClick: it.onClick }, it.label) : (
5863
+ return /* @__PURE__ */ React33.createElement("li", { key: i }, last ? /* @__PURE__ */ React33.createElement("span", { "aria-current": "page", className: "aura-crumbs__current" }, it.label) : it.href ? /* @__PURE__ */ React33.createElement(Link, { href: it.href, onClick: it.onClick }, it.label) : it.onClick ? /* @__PURE__ */ React33.createElement("button", { type: "button", onClick: it.onClick }, it.label) : (
5787
5864
  /* 5.7: a segment with no page and no action is text, not a button that does nothing. */
5788
- /* @__PURE__ */ React32.createElement("span", { className: "aura-crumbs__text" }, it.label)
5789
- ), last ? null : /* @__PURE__ */ React32.createElement(Icon, { name: "chevron-right", size: 12, className: "aura-crumbs__sep" }));
5865
+ /* @__PURE__ */ React33.createElement("span", { className: "aura-crumbs__text" }, it.label)
5866
+ ), last ? null : /* @__PURE__ */ React33.createElement(Icon, { name: "chevron-right", size: 12, className: "aura-crumbs__sep" }));
5790
5867
  })));
5791
5868
  });
5792
5869
 
5793
5870
  // src/Avatar.tsx
5794
- var React33 = __toESM(require("react"), 1);
5871
+ var React34 = __toESM(require("react"), 1);
5795
5872
  var AVATAR_TONES = ["progress", "ready", "neutral", "warning"];
5796
5873
  function initials(name) {
5797
5874
  const parts = String(name || "?").trim().split(/\s+/);
5798
5875
  return ((parts[0] || "?")[0] + (parts.length > 1 ? parts[parts.length - 1][0] : parts[0][1] || "")).toUpperCase();
5799
5876
  }
5800
- var Avatar = React33.forwardRef(function Avatar2(props, ref) {
5801
- const size = props.size || "md", errState = React33.useState(null);
5877
+ var Avatar = React34.forwardRef(function Avatar2(props, ref) {
5878
+ const size = props.size || "md", errState = React34.useState(null);
5802
5879
  let hash = 0;
5803
5880
  String(props.name || "").split("").forEach(function(ch) {
5804
5881
  hash = hash * 31 + ch.charCodeAt(0) >>> 0;
5805
5882
  });
5806
5883
  const tone2 = AVATAR_TONES[hash % AVATAR_TONES.length];
5807
- return /* @__PURE__ */ React33.createElement(
5884
+ return /* @__PURE__ */ React34.createElement(
5808
5885
  "span",
5809
5886
  {
5810
5887
  ref,
@@ -5812,7 +5889,7 @@ var Avatar = React33.forwardRef(function Avatar2(props, ref) {
5812
5889
  role: "img",
5813
5890
  "aria-label": props.name + (props.status ? ", " + props.status : "")
5814
5891
  },
5815
- props.src && errState[0] !== props.src ? /* @__PURE__ */ React33.createElement(
5892
+ props.src && errState[0] !== props.src ? /* @__PURE__ */ React34.createElement(
5816
5893
  "img",
5817
5894
  {
5818
5895
  key: props.src,
@@ -5822,16 +5899,16 @@ var Avatar = React33.forwardRef(function Avatar2(props, ref) {
5822
5899
  errState[1](props.src || null);
5823
5900
  }
5824
5901
  }
5825
- ) : /* @__PURE__ */ React33.createElement("span", { "aria-hidden": true }, initials(props.name)),
5826
- props.status === "online" ? /* @__PURE__ */ React33.createElement("span", { className: "aura-avatar__status", "aria-hidden": true }) : null
5902
+ ) : /* @__PURE__ */ React34.createElement("span", { "aria-hidden": true }, initials(props.name)),
5903
+ props.status === "online" ? /* @__PURE__ */ React34.createElement("span", { className: "aura-avatar__status", "aria-hidden": true }) : null
5827
5904
  );
5828
5905
  });
5829
5906
 
5830
5907
  // src/Stack.tsx
5831
- var React35 = __toESM(require("react"), 1);
5908
+ var React36 = __toESM(require("react"), 1);
5832
5909
 
5833
5910
  // src/responsive.tsx
5834
- var React34 = __toESM(require("react"), 1);
5911
+ var React35 = __toESM(require("react"), 1);
5835
5912
 
5836
5913
  // src/breakpoints.ts
5837
5914
  var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
@@ -5839,7 +5916,7 @@ var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
5839
5916
  // src/responsive.tsx
5840
5917
  var ORDER = ["base", "sm", "md", "lg", "xl"];
5841
5918
  function useBreakpoint() {
5842
- return React34.useSyncExternalStore(subscribe, current, function() {
5919
+ return React35.useSyncExternalStore(subscribe, current, function() {
5843
5920
  return "lg";
5844
5921
  });
5845
5922
  }
@@ -5879,8 +5956,8 @@ var space = function(v) {
5879
5956
  };
5880
5957
 
5881
5958
  // src/Stack.tsx
5882
- var h5 = React35.createElement;
5883
- var Stack = React35.forwardRef(function Stack2(props, ref) {
5959
+ var h5 = React36.createElement;
5960
+ var Stack = React36.forwardRef(function Stack2(props, ref) {
5884
5961
  const style = Object.assign(
5885
5962
  {},
5886
5963
  respVars("aura-stack-dir", props.direction || "column"),
@@ -5894,9 +5971,9 @@ var Stack = React35.forwardRef(function Stack2(props, ref) {
5894
5971
  });
5895
5972
 
5896
5973
  // src/Grid.tsx
5897
- var React36 = __toESM(require("react"), 1);
5898
- var h6 = React36.createElement;
5899
- var Grid = React36.forwardRef(function Grid2(props, ref) {
5974
+ var React37 = __toESM(require("react"), 1);
5975
+ var h6 = React37.createElement;
5976
+ var Grid = React37.forwardRef(function Grid2(props, ref) {
5900
5977
  const style = Object.assign(
5901
5978
  {},
5902
5979
  respVars("aura-grid-gap", props.gap == null ? 6 : props.gap, space),
@@ -5911,9 +5988,9 @@ var Grid = React36.forwardRef(function Grid2(props, ref) {
5911
5988
  });
5912
5989
 
5913
5990
  // src/Container.tsx
5914
- var React37 = __toESM(require("react"), 1);
5915
- var h7 = React37.createElement;
5916
- var Container = React37.forwardRef(function Container2(props, ref) {
5991
+ var React38 = __toESM(require("react"), 1);
5992
+ var h7 = React38.createElement;
5993
+ var Container = React38.forwardRef(function Container2(props, ref) {
5917
5994
  return h7(
5918
5995
  props.as || "div",
5919
5996
  {
@@ -5926,27 +6003,27 @@ var Container = React37.forwardRef(function Container2(props, ref) {
5926
6003
  });
5927
6004
 
5928
6005
  // src/AppShell.tsx
5929
- var React38 = __toESM(require("react"), 1);
5930
- var AppShell = React38.forwardRef(function AppShell2(props, ref) {
6006
+ var React39 = __toESM(require("react"), 1);
6007
+ var AppShell = React39.forwardRef(function AppShell2(props, ref) {
5931
6008
  const t = useStrings();
5932
6009
  const bp = useBreakpoint();
5933
6010
  const wide = bp === "lg" || bp === "xl";
5934
- const st = React38.useState(false), open = st[0], setOpen = st[1];
5935
- React38.useEffect(
6011
+ const st = React39.useState(false), open = st[0], setOpen = st[1];
6012
+ React39.useEffect(
5936
6013
  function() {
5937
6014
  if (wide) setOpen(false);
5938
6015
  },
5939
6016
  [wide]
5940
6017
  );
5941
- const navEl = props.nav && React38.isValidElement(props.nav) ? props.nav : null;
6018
+ const navEl = props.nav && React39.isValidElement(props.nav) ? props.nav : null;
5942
6019
  const shared = !!navEl && navEl.props.value === void 0 && (navEl.props.defaultValue !== void 0 || navEl.props.sections !== void 0 || navEl.props.items !== void 0);
5943
- const navState = React38.useState(navEl ? navEl.props.defaultValue : void 0);
6020
+ const navState = React39.useState(navEl ? navEl.props.defaultValue : void 0);
5944
6021
  function onNav(id) {
5945
6022
  if (shared) navState[1](id);
5946
6023
  if (navEl && navEl.props.onChange) navEl.props.onChange(id);
5947
6024
  }
5948
- const deskNav = navEl && shared ? React38.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
5949
- const drawerNav = navEl ? React38.cloneElement(navEl, {
6025
+ const deskNav = navEl && shared ? React39.cloneElement(navEl, { value: navState[0], onChange: onNav }) : props.nav;
6026
+ const drawerNav = navEl ? React39.cloneElement(navEl, {
5950
6027
  value: shared ? navState[0] : navEl.props.value,
5951
6028
  onChange: function(id) {
5952
6029
  onNav(id);
@@ -5956,7 +6033,7 @@ var AppShell = React38.forwardRef(function AppShell2(props, ref) {
5956
6033
  collapsed: false,
5957
6034
  collapsible: false
5958
6035
  }) : props.nav;
5959
- 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" }, deskNav) : null, props.nav ? /* @__PURE__ */ React38.createElement(
6036
+ return /* @__PURE__ */ React39.createElement("div", { ref, className: cx("aura-shell", props.bottomNav && "aura-shell--bottomnav", props.className) }, props.nav ? /* @__PURE__ */ React39.createElement("div", { className: "aura-shell__nav" }, deskNav) : null, props.nav ? /* @__PURE__ */ React39.createElement(
5960
6037
  Drawer,
5961
6038
  {
5962
6039
  open,
@@ -5969,7 +6046,7 @@ var AppShell = React38.forwardRef(function AppShell2(props, ref) {
5969
6046
  dismissible: true
5970
6047
  },
5971
6048
  drawerNav
5972
- ) : null, /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React38.createElement("header", { className: cx("aura-shell__bar", !props.header && "aura-shell__bar--menu-only") }, props.nav ? /* @__PURE__ */ React38.createElement(
6049
+ ) : null, /* @__PURE__ */ React39.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React39.createElement("header", { className: cx("aura-shell__bar", !props.header && "aura-shell__bar--menu-only") }, props.nav ? /* @__PURE__ */ React39.createElement(
5973
6050
  IconButton,
5974
6051
  {
5975
6052
  className: "aura-shell__menu",
@@ -5981,18 +6058,18 @@ var AppShell = React38.forwardRef(function AppShell2(props, ref) {
5981
6058
  },
5982
6059
  "aria-expanded": open
5983
6060
  }
5984
- ) : 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", tabIndex: -1 }, props.children), props.bottomNav || null));
6061
+ ) : null, /* @__PURE__ */ React39.createElement("div", { className: "aura-shell__bar-content" }, props.header)) : null, /* @__PURE__ */ React39.createElement("main", { className: "aura-shell__content", id: props.mainId || "main", tabIndex: -1 }, props.children), props.bottomNav || null));
5985
6062
  });
5986
6063
 
5987
6064
  // src/ActionBar.tsx
5988
- var React39 = __toESM(require("react"), 1);
5989
- var ActionBar = React39.forwardRef(function ActionBar2(props, ref) {
6065
+ var React40 = __toESM(require("react"), 1);
6066
+ var ActionBar = React40.forwardRef(function ActionBar2(props, ref) {
5990
6067
  const t = useStrings();
5991
6068
  const bulk = props.selected != null;
5992
6069
  const idle = bulk && !props.selected;
5993
6070
  const count = bulk && props.selected ? t.selectedCount(props.selected) : null;
5994
- const cameFrom = React39.useRef(null);
5995
- const own = React39.useRef(null);
6071
+ const cameFrom = React40.useRef(null);
6072
+ const own = React40.useRef(null);
5996
6073
  function clear() {
5997
6074
  props.onClearSelection();
5998
6075
  setTimeout(function() {
@@ -6001,7 +6078,7 @@ var ActionBar = React39.forwardRef(function ActionBar2(props, ref) {
6001
6078
  if ((!a || a === document.body || !a.isConnected) && back && back.isConnected) back.focus();
6002
6079
  }, 0);
6003
6080
  }
6004
- return /* @__PURE__ */ React39.createElement(
6081
+ return /* @__PURE__ */ React40.createElement(
6005
6082
  "div",
6006
6083
  {
6007
6084
  ref: function(el) {
@@ -6022,16 +6099,16 @@ var ActionBar = React39.forwardRef(function ActionBar2(props, ref) {
6022
6099
  props.className
6023
6100
  )
6024
6101
  },
6025
- /* @__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)
6102
+ /* @__PURE__ */ React40.createElement("div", { className: "aura-actionbar__inner" }, /* @__PURE__ */ React40.createElement("div", { className: "aura-actionbar__status", role: "status" }, count, count && props.status ? " \xB7 " : null, props.status), !idle ? /* @__PURE__ */ React40.createElement("div", { className: "aura-actionbar__actions" }, count && props.onClearSelection ? /* @__PURE__ */ React40.createElement(Button, { variant: "ghost", size: "sm", onClick: clear }, t.clear()) : null, props.children) : null)
6026
6103
  );
6027
6104
  });
6028
6105
 
6029
6106
  // src/Separator.tsx
6030
- var React40 = __toESM(require("react"), 1);
6031
- var Separator = React40.forwardRef(function Separator2(props, ref) {
6107
+ var React41 = __toESM(require("react"), 1);
6108
+ var Separator = React41.forwardRef(function Separator2(props, ref) {
6032
6109
  const vertical = props.orientation === "vertical";
6033
6110
  const decorative = props.decorative !== false;
6034
- return /* @__PURE__ */ React40.createElement(
6111
+ return /* @__PURE__ */ React41.createElement(
6035
6112
  "div",
6036
6113
  {
6037
6114
  ref,
@@ -6044,12 +6121,64 @@ var Separator = React40.forwardRef(function Separator2(props, ref) {
6044
6121
  });
6045
6122
 
6046
6123
  // src/Table.tsx
6047
- var React41 = __toESM(require("react"), 1);
6048
- var Table = React41.forwardRef(function Table2(props, ref) {
6049
- const { caption, captionHidden, density, className, children, ...rest } = props;
6124
+ var React42 = __toESM(require("react"), 1);
6125
+ var StackLabels = React42.createContext(null);
6126
+ var ColumnIndex = React42.createContext(-1);
6127
+ function flat(children) {
6128
+ const out = [];
6129
+ React42.Children.toArray(children).forEach(function(c) {
6130
+ if (React42.isValidElement(c) && c.type === React42.Fragment)
6131
+ out.push.apply(out, flat(c.props.children));
6132
+ else out.push(c);
6133
+ });
6134
+ return out;
6135
+ }
6136
+ function text(node) {
6137
+ if (typeof node === "string" || typeof node === "number") return String(node);
6138
+ if (Array.isArray(node)) {
6139
+ const parts = node.map(text).filter(function(x) {
6140
+ return x != null;
6141
+ });
6142
+ return parts.length ? parts.join("") : void 0;
6143
+ }
6144
+ if (React42.isValidElement(node)) {
6145
+ const p = node.props;
6146
+ if (p["aria-hidden"] === true || p["aria-hidden"] === "true") return void 0;
6147
+ return text(p.children);
6148
+ }
6149
+ return void 0;
6150
+ }
6151
+ function headerLabels(children) {
6152
+ let out = [];
6153
+ flat(children).forEach(function(c) {
6154
+ if (out.length || !React42.isValidElement(c) || c.type !== THead) return;
6155
+ const row = flat(c.props.children).find(function(r) {
6156
+ return React42.isValidElement(r);
6157
+ });
6158
+ if (!row) return;
6159
+ flat(row.props.children).forEach(function(cell) {
6160
+ if (!React42.isValidElement(cell)) return;
6161
+ const p = cell.props;
6162
+ const t = text(p.children);
6163
+ const label = p.label != null ? p.label : t != null ? t.replace(/\s+/g, " ").trim() || void 0 : void 0;
6164
+ const span = Math.max(1, Number(p.colSpan) || 1);
6165
+ for (let i = 0; i < span; i++) out.push(label);
6166
+ });
6167
+ });
6168
+ return out;
6169
+ }
6170
+ var Table = React42.forwardRef(function Table2(props, ref) {
6171
+ const { caption, captionHidden, density, stackBelow, className, children, ...rest } = props;
6172
+ const labels = stackBelow ? headerLabels(children) : null;
6173
+ if (labels && !labels.length)
6174
+ devWarnOnce(
6175
+ "tbl-stack-labels",
6176
+ "Table stackBelow: no THead > Tr > Th found among its children, so cells have no labels. Pass `label` on each Td."
6177
+ );
6178
+ const outer = React42.useContext(StackLabels);
6050
6179
  const capId = uid();
6051
- const wrap = React41.useRef(null);
6052
- const sc = React41.useState(false), scrolls = sc[0];
6180
+ const wrap = React42.useRef(null);
6181
+ const sc = React42.useState(false), scrolls = sc[0];
6053
6182
  useIsoLayoutEffect(function() {
6054
6183
  const el = wrap.current;
6055
6184
  if (!el || typeof ResizeObserver === "undefined") return;
@@ -6063,24 +6192,38 @@ var Table = React41.forwardRef(function Table2(props, ref) {
6063
6192
  ro.disconnect();
6064
6193
  };
6065
6194
  }, []);
6066
- return /* @__PURE__ */ React41.createElement(
6195
+ return /* @__PURE__ */ React42.createElement(
6067
6196
  "div",
6068
6197
  {
6069
6198
  ref: wrap,
6070
- className: "aura-tbl-wrap",
6199
+ className: cx("aura-tbl-wrap", stackBelow && "is-stackable"),
6071
6200
  "data-density": density,
6072
6201
  tabIndex: scrolls ? 0 : void 0,
6073
6202
  role: scrolls && (caption != null || rest["aria-label"]) ? "region" : void 0,
6074
6203
  "aria-labelledby": scrolls && caption != null ? capId : void 0,
6075
6204
  "aria-label": scrolls && caption == null ? rest["aria-label"] : void 0
6076
6205
  },
6077
- /* @__PURE__ */ React41.createElement("table", { ref, className: cx("aura-tbl", className), ...rest }, caption != null ? /* @__PURE__ */ React41.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null, children)
6206
+ /* @__PURE__ */ React42.createElement(
6207
+ "table",
6208
+ {
6209
+ ref,
6210
+ className: cx("aura-tbl", stackBelow && "aura-tbl--stack-" + stackBelow, className),
6211
+ role: stackBelow ? "table" : void 0,
6212
+ ...rest
6213
+ },
6214
+ caption != null ? /* @__PURE__ */ React42.createElement("caption", { id: capId, className: cx("aura-tbl__caption", captionHidden && "aura-sr-only") }, caption) : null,
6215
+ labels ? /* @__PURE__ */ React42.createElement(StackLabels.Provider, { value: labels }, children) : outer ? /* @__PURE__ */ React42.createElement(StackLabels.Provider, { value: null }, children) : children
6216
+ )
6078
6217
  );
6079
6218
  });
6080
6219
  function section(tag, cls) {
6081
- const C = React41.forwardRef(function TableSection(props, ref) {
6220
+ const C = React42.forwardRef(function TableSection(props, ref) {
6082
6221
  const { className, ...rest } = props;
6083
- return React41.createElement(tag, Object.assign({ ref, className: cx(cls, className) }, rest));
6222
+ const stacked = React42.useContext(StackLabels) != null;
6223
+ return React42.createElement(
6224
+ tag,
6225
+ Object.assign({ ref, className: cx(cls, className), role: stacked ? "rowgroup" : void 0 }, rest)
6226
+ );
6084
6227
  });
6085
6228
  return C;
6086
6229
  }
@@ -6090,9 +6233,15 @@ var TBody = section("tbody", "aura-tbl__body");
6090
6233
  TBody.displayName = "TBody";
6091
6234
  var TFoot = section("tfoot", "aura-tbl__foot");
6092
6235
  TFoot.displayName = "TFoot";
6093
- var Tr = React41.forwardRef(function Tr2(props, ref) {
6094
- const { className, ...rest } = props;
6095
- return /* @__PURE__ */ React41.createElement("tr", { ref, className: cx("aura-tbl__row", className), ...rest });
6236
+ var Tr = React42.forwardRef(function Tr2(props, ref) {
6237
+ const { className, children, ...rest } = props;
6238
+ const stacked = React42.useContext(StackLabels) != null;
6239
+ let col = 0;
6240
+ return /* @__PURE__ */ React42.createElement("tr", { ref, className: cx("aura-tbl__row", className), role: stacked ? "row" : void 0, ...rest }, stacked ? flat(children).map(function(c) {
6241
+ const at = col;
6242
+ if (React42.isValidElement(c)) col += Math.max(1, Number(c.props.colSpan) || 1);
6243
+ return /* @__PURE__ */ React42.createElement(ColumnIndex.Provider, { key: React42.isValidElement(c) && c.key != null ? c.key : at, value: at }, c);
6244
+ }) : children);
6096
6245
  });
6097
6246
  function cellClass(base, p) {
6098
6247
  const align = p.align || (p.numeric ? "end" : void 0);
@@ -6105,18 +6254,39 @@ function cellClass(base, p) {
6105
6254
  p.className
6106
6255
  );
6107
6256
  }
6108
- var Th = React41.forwardRef(function Th2(props, ref) {
6109
- const { align, numeric, mono, className, scope, ...rest } = props;
6110
- return /* @__PURE__ */ React41.createElement("th", { ref, scope: scope || "col", className: cellClass("aura-tbl__th", props), ...rest });
6257
+ var Th = React42.forwardRef(function Th2(props, ref) {
6258
+ const { align, numeric, mono, className, scope, label, ...rest } = props;
6259
+ const stacked = React42.useContext(StackLabels) != null;
6260
+ return /* @__PURE__ */ React42.createElement(
6261
+ "th",
6262
+ {
6263
+ ref,
6264
+ scope: scope || "col",
6265
+ className: cellClass("aura-tbl__th", props),
6266
+ role: stacked ? scope === "row" ? "rowheader" : "columnheader" : void 0,
6267
+ ...rest
6268
+ }
6269
+ );
6111
6270
  });
6112
- var Td = React41.forwardRef(function Td2(props, ref) {
6113
- const { align, numeric, mono, className, scope, ...rest } = props;
6114
- return /* @__PURE__ */ React41.createElement("td", { ref, className: cellClass("aura-tbl__td", props), ...rest });
6271
+ var Td = React42.forwardRef(function Td2(props, ref) {
6272
+ const { align, numeric, mono, className, scope, label, ...rest } = props;
6273
+ const labels = React42.useContext(StackLabels), col = React42.useContext(ColumnIndex);
6274
+ const shown = labels ? label != null ? label : col >= 0 ? labels[col] : void 0 : void 0;
6275
+ return /* @__PURE__ */ React42.createElement(
6276
+ "td",
6277
+ {
6278
+ ref,
6279
+ className: cellClass("aura-tbl__td", props),
6280
+ role: labels ? "cell" : void 0,
6281
+ "data-label": shown || void 0,
6282
+ ...rest
6283
+ }
6284
+ );
6115
6285
  });
6116
6286
 
6117
6287
  // src/BottomNav.tsx
6118
- var React42 = __toESM(require("react"), 1);
6119
- var BottomNav = React42.forwardRef(function BottomNav2(props, ref) {
6288
+ var React43 = __toESM(require("react"), 1);
6289
+ var BottomNav = React43.forwardRef(function BottomNav2(props, ref) {
6120
6290
  const t = useStrings();
6121
6291
  const Link = useLinkComponent(props.linkComponent);
6122
6292
  const st = useMaybeControlled(
@@ -6126,14 +6296,14 @@ var BottomNav = React42.forwardRef(function BottomNav2(props, ref) {
6126
6296
  );
6127
6297
  const active = st[0];
6128
6298
  const hide = props.hideFrom === false ? "always" : "below-" + (props.hideFrom || "lg");
6129
- return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide), "aria-hidden": "true" }), /* @__PURE__ */ React42.createElement(
6299
+ return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement("div", { className: cx("aura-bottomnav-spacer", "aura-bottomnav--" + hide), "aria-hidden": "true" }), /* @__PURE__ */ React43.createElement(
6130
6300
  "nav",
6131
6301
  {
6132
6302
  ref,
6133
6303
  className: cx("aura-bottomnav", "aura-bottomnav--" + hide, props.className),
6134
6304
  "aria-label": props.label || t.mainNav
6135
6305
  },
6136
- /* @__PURE__ */ React42.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
6306
+ /* @__PURE__ */ React43.createElement("ul", { className: "aura-bottomnav__list" }, props.items.map(function(it) {
6137
6307
  const on = active === it.id;
6138
6308
  const count = it.count != null && it.count > 0 ? it.count > 99 ? "99+" : String(it.count) : null;
6139
6309
  const suffix = count || it.badge && it.badgeLabel ? " (" + (count || it.badgeLabel) + ")" : "";
@@ -6149,19 +6319,19 @@ var BottomNav = React42.forwardRef(function BottomNav2(props, ref) {
6149
6319
  }
6150
6320
  };
6151
6321
  const inner = [
6152
- /* @__PURE__ */ React42.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React42.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React42.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React42.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
6153
- /* @__PURE__ */ React42.createElement("span", { key: "l", className: "aura-bottomnav__label" }, it.label),
6154
- suffix && !it.ariaLabel ? /* @__PURE__ */ React42.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
6322
+ /* @__PURE__ */ React43.createElement("span", { key: "i", className: "aura-bottomnav__icon" }, /* @__PURE__ */ React43.createElement(Icon, { name: it.icon, size: "md" }), count ? /* @__PURE__ */ React43.createElement("span", { className: "aura-bottomnav__count", "aria-hidden": "true" }, count) : it.badge ? /* @__PURE__ */ React43.createElement("span", { className: "aura-bottomnav__dot", "aria-hidden": "true" }) : null),
6323
+ /* @__PURE__ */ React43.createElement("span", { key: "l", className: "aura-bottomnav__label" }, it.label),
6324
+ suffix && !it.ariaLabel ? /* @__PURE__ */ React43.createElement("span", { key: "s", className: "aura-sr-only" }, suffix) : null
6155
6325
  ];
6156
- return /* @__PURE__ */ React42.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React42.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React42.createElement("button", { type: "button", ...common }, inner));
6326
+ return /* @__PURE__ */ React43.createElement("li", { key: it.id, className: "aura-bottomnav__cell" }, it.href ? /* @__PURE__ */ React43.createElement(Link, { href: it.href, ...common }, inner) : /* @__PURE__ */ React43.createElement("button", { type: "button", ...common }, inner));
6157
6327
  }))
6158
6328
  ));
6159
6329
  });
6160
6330
 
6161
6331
  // src/Surface.tsx
6162
- var React43 = __toESM(require("react"), 1);
6163
- var h8 = React43.createElement;
6164
- var Surface = React43.forwardRef(function Surface2(props, ref) {
6332
+ var React44 = __toESM(require("react"), 1);
6333
+ var h8 = React44.createElement;
6334
+ var Surface = React44.forwardRef(function Surface2(props, ref) {
6165
6335
  const t = props.texture || "mesh";
6166
6336
  const rest = omit(props, ["texture", "className", "children", "as"]);
6167
6337
  return h8(
@@ -6182,8 +6352,8 @@ var Surface = React43.forwardRef(function Surface2(props, ref) {
6182
6352
  });
6183
6353
 
6184
6354
  // src/Stat.tsx
6185
- var React44 = __toESM(require("react"), 1);
6186
- var Stat = React44.forwardRef(function Stat2(props, ref) {
6355
+ var React45 = __toESM(require("react"), 1);
6356
+ var Stat = React45.forwardRef(function Stat2(props, ref) {
6187
6357
  const ch = props.change;
6188
6358
  const dir = ch && (ch.direction || "flat");
6189
6359
  const tone2 = ch && (ch.tone || (dir === "up" ? "positive" : dir === "down" ? "negative" : "neutral"));
@@ -6192,7 +6362,7 @@ var Stat = React44.forwardRef(function Stat2(props, ref) {
6192
6362
  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, ""));
6193
6363
  const Tag3 = props.href ? Link : props.onClick ? "button" : "div";
6194
6364
  const interactive = !!(props.href || props.onClick);
6195
- return /* @__PURE__ */ React44.createElement(
6365
+ return /* @__PURE__ */ React45.createElement(
6196
6366
  Tag3,
6197
6367
  {
6198
6368
  ref,
@@ -6202,14 +6372,14 @@ var Stat = React44.forwardRef(function Stat2(props, ref) {
6202
6372
  type: Tag3 === "button" ? "button" : void 0,
6203
6373
  "aria-busy": props.loading || void 0
6204
6374
  },
6205
- /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__head" }, /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React44.createElement(Icon, { name: props.icon })) : null),
6206
- props.loading ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React44.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React44.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
6207
- ch && !props.loading || props.caption ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React44.createElement("span", { className: cx("aura-stat__change", "is-" + tone2) }, /* @__PURE__ */ React44.createElement(Icon, { name: dir === "up" ? "trending-up" : dir === "down" ? "trending-down" : "minus", size: 14 }), /* @__PURE__ */ React44.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React44.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
6375
+ /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__head" }, /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React45.createElement(Icon, { name: props.icon })) : null),
6376
+ props.loading ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React45.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React45.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
6377
+ ch && !props.loading || props.caption ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React45.createElement("span", { className: cx("aura-stat__change", "is-" + tone2) }, /* @__PURE__ */ React45.createElement(Icon, { name: dir === "up" ? "trending-up" : dir === "down" ? "trending-down" : "minus", size: 14 }), /* @__PURE__ */ React45.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React45.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
6208
6378
  );
6209
6379
  });
6210
6380
 
6211
6381
  // src/TimePicker.tsx
6212
- var React45 = __toESM(require("react"), 1);
6382
+ var React46 = __toESM(require("react"), 1);
6213
6383
  var import_react_dom11 = require("react-dom");
6214
6384
 
6215
6385
  // src/text.ts
@@ -6226,8 +6396,8 @@ function formatBytes(n2) {
6226
6396
  function pad2(n2) {
6227
6397
  return (n2 < 10 ? "0" : "") + n2;
6228
6398
  }
6229
- function parseTime(text) {
6230
- let s = String(text || "").trim().toLowerCase().replace(/\s*(น\.?|นาฬิกา)$/, "").trim();
6399
+ function parseTime(text2) {
6400
+ let s = String(text2 || "").trim().toLowerCase().replace(/\s*(น\.?|นาฬิกา)$/, "").trim();
6231
6401
  const pm = /\s*(pm|p\.m\.)$/.test(s), am = /\s*(am|a\.m\.)$/.test(s);
6232
6402
  s = s.replace(/\s*(am|pm|a\.m\.|p\.m\.)$/, "");
6233
6403
  const m = /^(\d{1,2})(?:[:.](\d{2}))?$/.exec(s) || /^(\d{1,2})(\d{2})$/.exec(s);
@@ -6251,7 +6421,7 @@ function toMin(t) {
6251
6421
  function fromMin(n2) {
6252
6422
  return pad3(Math.floor(n2 / 60)) + ":" + pad3(n2 % 60);
6253
6423
  }
6254
- var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6424
+ var TimePicker = React46.forwardRef(function TimePicker2(props, ref) {
6255
6425
  const t = useStrings();
6256
6426
  const auto = uid(), id = props.id || auto, listId = id + "-list";
6257
6427
  const st = useMaybeControlled(
@@ -6261,7 +6431,7 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6261
6431
  );
6262
6432
  const value = st[0];
6263
6433
  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;
6264
- const slots = React45.useMemo(
6434
+ const slots = React46.useMemo(
6265
6435
  function() {
6266
6436
  const out = [];
6267
6437
  for (let m = lo; m <= hi; m += step) out.push(fromMin(m));
@@ -6273,12 +6443,12 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6273
6443
  const n2 = toMin(v);
6274
6444
  return n2 == null || n2 < lo || n2 > hi || props.isTimeDisabled && props.isTimeDisabled(v);
6275
6445
  }
6276
- const openState = React45.useState(false), open = openState[0], setOpen = openState[1];
6277
- const editState = React45.useState(null), editing = editState[0], setEditing = editState[1];
6278
- const aState = React45.useState(0), active = aState[0], setActive = aState[1];
6279
- const errState = React45.useState(null);
6280
- const pos = React45.useState(null);
6281
- const boxRef = React45.useRef(null), inputRef = React45.useRef(null), listRef = React45.useRef(null), inputMerged = useMergedRef(ref, inputRef);
6446
+ const openState = React46.useState(false), open = openState[0], setOpen = openState[1];
6447
+ const editState = React46.useState(null), editing = editState[0], setEditing = editState[1];
6448
+ const aState = React46.useState(0), active = aState[0], setActive = aState[1];
6449
+ const errState = React46.useState(null);
6450
+ const pos = React46.useState(null);
6451
+ const boxRef = React46.useRef(null), inputRef = React46.useRef(null), listRef = React46.useRef(null), inputMerged = useMergedRef(ref, inputRef);
6282
6452
  const mounted = useMounted();
6283
6453
  function nearest(v) {
6284
6454
  const n2 = toMin(v);
@@ -6306,7 +6476,7 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6306
6476
  },
6307
6477
  [open]
6308
6478
  );
6309
- React45.useEffect(
6479
+ React46.useEffect(
6310
6480
  function() {
6311
6481
  if (!open) return;
6312
6482
  function outside(e) {
@@ -6328,7 +6498,7 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6328
6498
  },
6329
6499
  [open]
6330
6500
  );
6331
- React45.useEffect(
6501
+ React46.useEffect(
6332
6502
  function() {
6333
6503
  if (!open || !listRef.current) return;
6334
6504
  const el = listRef.current.querySelector('[data-idx="' + active + '"]');
@@ -6427,9 +6597,9 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6427
6597
  }
6428
6598
  const error = errState[0] || props.error;
6429
6599
  const list = open && mounted && pos[0] ? (0, import_react_dom11.createPortal)(
6430
- /* @__PURE__ */ React45.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React45.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
6600
+ /* @__PURE__ */ React46.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React46.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
6431
6601
  const dis = blocked(s), sel = s === value;
6432
- return /* @__PURE__ */ React45.createElement(
6602
+ return /* @__PURE__ */ React46.createElement(
6433
6603
  "li",
6434
6604
  {
6435
6605
  key: s,
@@ -6454,13 +6624,13 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6454
6624
  if (active !== i) setActive(i);
6455
6625
  }
6456
6626
  },
6457
- /* @__PURE__ */ React45.createElement("span", { className: "aura-combo__label" }, s),
6458
- sel ? /* @__PURE__ */ React45.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
6627
+ /* @__PURE__ */ React46.createElement("span", { className: "aura-combo__label" }, s),
6628
+ sel ? /* @__PURE__ */ React46.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
6459
6629
  );
6460
6630
  }))),
6461
6631
  document.body
6462
6632
  ) : null;
6463
- return /* @__PURE__ */ React45.createElement(
6633
+ return /* @__PURE__ */ React46.createElement(
6464
6634
  Field,
6465
6635
  {
6466
6636
  id,
@@ -6472,7 +6642,7 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6472
6642
  disabled: props.disabled,
6473
6643
  className: props.className
6474
6644
  },
6475
- /* @__PURE__ */ React45.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React45.createElement(Icon, { name: "clock", className: "aura-input__icon" }), /* @__PURE__ */ React45.createElement(
6645
+ /* @__PURE__ */ React46.createElement("div", { ref: boxRef, className: cx("aura-input aura-combo aura-time has-icon", open && "is-open") }, /* @__PURE__ */ React46.createElement(Icon, { name: "clock", className: "aura-input__icon" }), /* @__PURE__ */ React46.createElement(
6476
6646
  "input",
6477
6647
  {
6478
6648
  ref: inputMerged,
@@ -6512,7 +6682,7 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6512
6682
  }, 0);
6513
6683
  }
6514
6684
  }
6515
- ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React45.createElement(
6685
+ ), props.clearable !== false && value != null && !props.disabled ? /* @__PURE__ */ React46.createElement(
6516
6686
  "button",
6517
6687
  {
6518
6688
  type: "button",
@@ -6525,8 +6695,8 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6525
6695
  if (inputRef.current) inputRef.current.focus();
6526
6696
  }
6527
6697
  },
6528
- /* @__PURE__ */ React45.createElement(Icon, { name: "x" })
6529
- ) : null, /* @__PURE__ */ React45.createElement(
6698
+ /* @__PURE__ */ React46.createElement(Icon, { name: "x" })
6699
+ ) : null, /* @__PURE__ */ React46.createElement(
6530
6700
  "button",
6531
6701
  {
6532
6702
  type: "button",
@@ -6544,14 +6714,14 @@ var TimePicker = React45.forwardRef(function TimePicker2(props, ref) {
6544
6714
  }
6545
6715
  }
6546
6716
  },
6547
- /* @__PURE__ */ React45.createElement(Icon, { name: "chevron-down" })
6717
+ /* @__PURE__ */ React46.createElement(Icon, { name: "chevron-down" })
6548
6718
  )),
6549
6719
  list
6550
6720
  );
6551
6721
  });
6552
6722
 
6553
6723
  // src/FileUpload.tsx
6554
- var React46 = __toESM(require("react"), 1);
6724
+ var React47 = __toESM(require("react"), 1);
6555
6725
  function matches(file, accept) {
6556
6726
  if (!accept) return true;
6557
6727
  const name = (file.name || "").toLowerCase(), type = (file.type || "").toLowerCase();
@@ -6575,24 +6745,24 @@ function describeAccept(accept, t) {
6575
6745
  }).join(", ");
6576
6746
  }
6577
6747
  var seq = 0;
6578
- var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6748
+ var FileUpload = React47.forwardRef(function FileUpload2(props, ref) {
6579
6749
  const t = useStrings();
6580
6750
  const auto = uid(), id = props.id || auto;
6581
6751
  const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
6582
6752
  const items2 = st[0] || [];
6583
- const dragState = React46.useState(false), over = dragState[0];
6584
- const inputRef = React46.useRef(null), inputMerged = useMergedRef(ref, inputRef);
6585
- const urls = React46.useRef({});
6753
+ const dragState = React47.useState(false), over = dragState[0];
6754
+ const inputRef = React47.useRef(null), inputMerged = useMergedRef(ref, inputRef);
6755
+ const urls = React47.useRef({});
6586
6756
  const maxFiles = props.multiple ? props.maxFiles : 1;
6587
6757
  const note = t.accepts(describeAccept(props.accept, t), props.maxSize ? formatBytes(props.maxSize) : "");
6588
- React46.useEffect(function() {
6758
+ React47.useEffect(function() {
6589
6759
  return function() {
6590
6760
  Object.keys(urls.current).forEach(function(k) {
6591
6761
  URL.revokeObjectURL(urls.current[k]);
6592
6762
  });
6593
6763
  };
6594
6764
  }, []);
6595
- React46.useEffect(
6765
+ React47.useEffect(
6596
6766
  function() {
6597
6767
  const el = inputRef.current;
6598
6768
  if (!el || !props.name || typeof DataTransfer === "undefined") return;
@@ -6652,7 +6822,7 @@ var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6652
6822
  if (inputRef.current) inputRef.current.focus();
6653
6823
  }
6654
6824
  const error = props.error;
6655
- return /* @__PURE__ */ React46.createElement(
6825
+ return /* @__PURE__ */ React47.createElement(
6656
6826
  Field,
6657
6827
  {
6658
6828
  id,
@@ -6664,7 +6834,7 @@ var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6664
6834
  disabled: props.disabled,
6665
6835
  className: props.className
6666
6836
  },
6667
- /* @__PURE__ */ React46.createElement(
6837
+ /* @__PURE__ */ React47.createElement(
6668
6838
  "div",
6669
6839
  {
6670
6840
  className: cx("aura-upload", over && "is-over", props.disabled && "is-disabled", error && "is-invalid"),
@@ -6685,9 +6855,9 @@ var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6685
6855
  add(e.dataTransfer && e.dataTransfer.files);
6686
6856
  }
6687
6857
  },
6688
- /* @__PURE__ */ React46.createElement(Icon, { name: "cloud-upload", size: "lg", className: "aura-upload__icon" }),
6689
- /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
6690
- /* @__PURE__ */ React46.createElement(
6858
+ /* @__PURE__ */ React47.createElement(Icon, { name: "cloud-upload", size: "lg", className: "aura-upload__icon" }),
6859
+ /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__text" }, t.dropFiles, " "),
6860
+ /* @__PURE__ */ React47.createElement(
6691
6861
  "input",
6692
6862
  {
6693
6863
  ref: inputMerged,
@@ -6709,12 +6879,12 @@ var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6709
6879
  }
6710
6880
  }
6711
6881
  ),
6712
- /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
6713
- note ? /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
6882
+ /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__browse", "aria-hidden": true }, props.multiple ? t.browse : t.browseOne),
6883
+ note ? /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__note", id: id + "-note" }, note) : null
6714
6884
  ),
6715
- items2.length ? /* @__PURE__ */ React46.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
6885
+ items2.length ? /* @__PURE__ */ React47.createElement("ul", { className: "aura-upload__list", "aria-live": "polite" }, items2.map(function(it) {
6716
6886
  const src = thumb(it);
6717
- return /* @__PURE__ */ React46.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React46.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React46.createElement(Icon, { name: /^image\//.test(it.type || "") ? "image" : "file", size: "md" })), /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React46.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React46.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.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__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(Icon, { name: "circle-check", size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React46.createElement(
6887
+ return /* @__PURE__ */ React47.createElement("li", { key: it.id, className: cx("aura-upload__item", it.error && "is-error") }, src ? /* @__PURE__ */ React47.createElement("img", { className: "aura-upload__thumb", src, alt: "" }) : /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__thumb is-icon", "aria-hidden": true }, /* @__PURE__ */ React47.createElement(Icon, { name: /^image\//.test(it.type || "") ? "image" : "file", size: "md" })), /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__meta" }, it.url && !it.error ? /* @__PURE__ */ React47.createElement("a", { className: "aura-upload__name", href: it.url, target: "_blank", rel: "noreferrer" }, it.name) : /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__name" }, it.name), /* @__PURE__ */ React47.createElement("span", { className: "aura-upload__sub" }, it.error ? /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.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__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(Icon, { name: "circle-check", size: 12 }), formatBytes(it.size)) : formatBytes(it.size)), it.status === "uploading" ? /* @__PURE__ */ React47.createElement(
6718
6888
  "span",
6719
6889
  {
6720
6890
  className: "aura-upload__bar",
@@ -6724,8 +6894,8 @@ var FileUpload = React46.forwardRef(function FileUpload2(props, ref) {
6724
6894
  "aria-valuemax": 100,
6725
6895
  "aria-valuenow": it.progress != null ? Math.round(it.progress) : void 0
6726
6896
  },
6727
- /* @__PURE__ */ React46.createElement("span", { style: { width: (it.progress || 0) + "%" } })
6728
- ) : null), /* @__PURE__ */ React46.createElement(
6897
+ /* @__PURE__ */ React47.createElement("span", { style: { width: (it.progress || 0) + "%" } })
6898
+ ) : null), /* @__PURE__ */ React47.createElement(
6729
6899
  IconButton,
6730
6900
  {
6731
6901
  icon: "x",
@@ -7013,9 +7183,9 @@ function createTheme(opts) {
7013
7183
  }
7014
7184
 
7015
7185
  // src/ThemeStyle.tsx
7016
- var React47 = __toESM(require("react"), 1);
7186
+ var React48 = __toESM(require("react"), 1);
7017
7187
  function ThemeStyle(props) {
7018
- const css = React47.useMemo(
7188
+ const css = React48.useMemo(
7019
7189
  function() {
7020
7190
  try {
7021
7191
  return createTheme({
@@ -7032,11 +7202,11 @@ function ThemeStyle(props) {
7032
7202
  [props.brand, props.signal, props.primary, props.name, props.selector]
7033
7203
  );
7034
7204
  if (css === null) return null;
7035
- return /* @__PURE__ */ React47.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
7205
+ return /* @__PURE__ */ React48.createElement("style", { "data-aura-theme": props.name || props.brand, dangerouslySetInnerHTML: { __html: css } });
7036
7206
  }
7037
7207
 
7038
7208
  // src/colorScheme.tsx
7039
- var React48 = __toESM(require("react"), 1);
7209
+ var React49 = __toESM(require("react"), 1);
7040
7210
 
7041
7211
  // src/colorSchemeScript.ts
7042
7212
  var DEFAULT_KEY = "aura-color-scheme";
@@ -7053,7 +7223,7 @@ function colorSchemeScript(options) {
7053
7223
 
7054
7224
  // src/colorScheme.tsx
7055
7225
  function ColorSchemeScript(props) {
7056
- return /* @__PURE__ */ React48.createElement(
7226
+ return /* @__PURE__ */ React49.createElement(
7057
7227
  "script",
7058
7228
  {
7059
7229
  "data-aura-color-scheme": "",
@@ -7078,7 +7248,7 @@ function apply(scheme) {
7078
7248
  function useColorScheme(options) {
7079
7249
  const key = options && options.storageKey || DEFAULT_KEY;
7080
7250
  const fallback = options && options.defaultScheme || "system";
7081
- const subscribe2 = React48.useCallback(
7251
+ const subscribe2 = React49.useCallback(
7082
7252
  function(cb) {
7083
7253
  const mq = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
7084
7254
  function onSystem() {
@@ -7100,7 +7270,7 @@ function useColorScheme(options) {
7100
7270
  },
7101
7271
  [fallback, key]
7102
7272
  );
7103
- const snapshot = React48.useSyncExternalStore(
7273
+ const snapshot = React49.useSyncExternalStore(
7104
7274
  subscribe2,
7105
7275
  function() {
7106
7276
  const s = readScheme(fallback);
@@ -7111,7 +7281,7 @@ function useColorScheme(options) {
7111
7281
  }
7112
7282
  );
7113
7283
  const parts = snapshot.split("|");
7114
- const setScheme = React48.useCallback(
7284
+ const setScheme = React49.useCallback(
7115
7285
  function(next) {
7116
7286
  if (!valid(next)) return;
7117
7287
  try {
@@ -7130,11 +7300,11 @@ function ColorSchemeToggle(props) {
7130
7300
  const cs = useColorScheme(props);
7131
7301
  const names = { light: t.schemeLight, dark: t.schemeDark, system: t.schemeSystem };
7132
7302
  const label = props.label || t.colorScheme;
7133
- return /* @__PURE__ */ React48.createElement(
7303
+ return /* @__PURE__ */ React49.createElement(
7134
7304
  DropdownMenu,
7135
7305
  {
7136
7306
  label,
7137
- trigger: /* @__PURE__ */ React48.createElement(IconButton, { icon: cs.resolved === "dark" ? "moon" : "sun", label: label + ": " + names[cs.scheme] }),
7307
+ trigger: /* @__PURE__ */ React49.createElement(IconButton, { icon: cs.resolved === "dark" ? "moon" : "sun", label: label + ": " + names[cs.scheme] }),
7138
7308
  items: SCHEMES.map(function(s) {
7139
7309
  return {
7140
7310
  label: names[s],
@@ -7149,35 +7319,19 @@ function ColorSchemeToggle(props) {
7149
7319
  }
7150
7320
 
7151
7321
  // src/Badge.tsx
7152
- var React49 = __toESM(require("react"), 1);
7153
- var Badge = React49.forwardRef(function Badge2(props, ref) {
7154
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
7155
- return /* @__PURE__ */ React49.createElement(
7156
- "span",
7157
- {
7158
- ...rest,
7159
- ref,
7160
- className: cx(
7161
- "aura-badge",
7162
- "aura-badge--" + tone(props.tone),
7163
- props.variant === "solid" && "is-solid",
7164
- props.variant === "outline" && "is-outline",
7165
- props.className
7166
- )
7167
- },
7168
- props.icon ? /* @__PURE__ */ React49.createElement(Icon, { name: props.icon, size: 12 }) : null,
7169
- props.children
7170
- );
7322
+ var React50 = __toESM(require("react"), 1);
7323
+ var Badge = React50.forwardRef(function Badge2(props, ref) {
7324
+ return badgeElement(props, ref);
7171
7325
  });
7172
7326
 
7173
7327
  // src/Progress.tsx
7174
- var React50 = __toESM(require("react"), 1);
7175
- var Progress = React50.forwardRef(function Progress2(props, ref) {
7328
+ var React51 = __toESM(require("react"), 1);
7329
+ var Progress = React51.forwardRef(function Progress2(props, ref) {
7176
7330
  const auto = uid(), id = props.id || auto;
7177
7331
  const max = props.max || 100, det = props.value != null;
7178
7332
  const pct = det ? Math.max(0, Math.min(100, props.value / max * 100)) : 0;
7179
7333
  const shown = props.valueLabel != null ? props.valueLabel : det ? Math.round(pct) + "%" : null;
7180
- return /* @__PURE__ */ React50.createElement(
7334
+ return /* @__PURE__ */ React51.createElement(
7181
7335
  "div",
7182
7336
  {
7183
7337
  ref,
@@ -7188,8 +7342,8 @@ var Progress = React50.forwardRef(function Progress2(props, ref) {
7188
7342
  props.className
7189
7343
  )
7190
7344
  },
7191
- props.label || props.showValue && shown ? /* @__PURE__ */ React50.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React50.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React50.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React50.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
7192
- /* @__PURE__ */ React50.createElement(
7345
+ props.label || props.showValue && shown ? /* @__PURE__ */ React51.createElement("div", { className: "aura-progress__head" }, props.label ? /* @__PURE__ */ React51.createElement("span", { className: "aura-progress__label", id: id + "-label" }, props.label) : /* @__PURE__ */ React51.createElement("span", null), props.showValue && shown ? /* @__PURE__ */ React51.createElement("span", { className: "aura-progress__value" }, shown) : null) : null,
7346
+ /* @__PURE__ */ React51.createElement(
7193
7347
  "div",
7194
7348
  {
7195
7349
  className: cx("aura-progress__track", !det && "is-indeterminate"),
@@ -7201,21 +7355,21 @@ var Progress = React50.forwardRef(function Progress2(props, ref) {
7201
7355
  "aria-valuenow": det ? props.value : void 0,
7202
7356
  "aria-valuetext": det && props.valueLabel != null ? String(props.valueLabel) : void 0
7203
7357
  },
7204
- /* @__PURE__ */ React50.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 })
7358
+ /* @__PURE__ */ React51.createElement("span", { className: "aura-progress__bar", style: det ? { width: pct + "%" } : void 0 })
7205
7359
  ),
7206
- props.hint ? /* @__PURE__ */ React50.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
7360
+ props.hint ? /* @__PURE__ */ React51.createElement("p", { className: "aura-progress__hint" }, props.hint) : null
7207
7361
  );
7208
7362
  });
7209
7363
 
7210
7364
  // src/Skeleton.tsx
7211
- var React51 = __toESM(require("react"), 1);
7212
- var Skeleton = React51.forwardRef(function Skeleton2(props, ref) {
7365
+ var React52 = __toESM(require("react"), 1);
7366
+ var Skeleton = React52.forwardRef(function Skeleton2(props, ref) {
7213
7367
  const v = props.variant || "text";
7214
7368
  if (v === "text" && (props.lines || 1) > 1) {
7215
7369
  const n2 = props.lines, rows = [];
7216
7370
  for (let i = 0; i < n2; i++)
7217
- rows.push(/* @__PURE__ */ React51.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n2 - 1 ? "60%" : "100%" } }));
7218
- return /* @__PURE__ */ React51.createElement(
7371
+ rows.push(/* @__PURE__ */ React52.createElement("span", { key: i, className: "aura-skel aura-skel--text", style: { width: i === n2 - 1 ? "60%" : "100%" } }));
7372
+ return /* @__PURE__ */ React52.createElement(
7219
7373
  "span",
7220
7374
  {
7221
7375
  ref,
@@ -7233,28 +7387,17 @@ var Skeleton = React51.forwardRef(function Skeleton2(props, ref) {
7233
7387
  if (v === "circle") {
7234
7388
  style.width = style.height = props.size || props.width || 40;
7235
7389
  }
7236
- return /* @__PURE__ */ React51.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
7390
+ return /* @__PURE__ */ React52.createElement("span", { ref, "aria-hidden": true, className: cx("aura-skel", "aura-skel--" + v, props.className), style });
7237
7391
  });
7238
7392
 
7239
7393
  // src/EmptyState.tsx
7240
- var React52 = __toESM(require("react"), 1);
7241
- var EmptyState = React52.forwardRef(function EmptyState2(props, ref) {
7242
- const HT = "h" + (props.headingLevel || 3);
7243
- return /* @__PURE__ */ React52.createElement(
7244
- "div",
7245
- {
7246
- ref,
7247
- className: cx("aura-empty", props.size === "sm" && "is-sm", props.bordered && "is-bordered", props.className)
7248
- },
7249
- /* @__PURE__ */ React52.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React52.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
7250
- /* @__PURE__ */ React52.createElement(HT, { className: "aura-empty__title" }, props.title),
7251
- props.description ? /* @__PURE__ */ React52.createElement("p", { className: "aura-empty__text" }, props.description) : null,
7252
- props.action ? /* @__PURE__ */ React52.createElement("div", { className: "aura-empty__action" }, props.action) : null
7253
- );
7394
+ var React53 = __toESM(require("react"), 1);
7395
+ var EmptyState = React53.forwardRef(function EmptyState2(props, ref) {
7396
+ return emptyStateElement(props, ref);
7254
7397
  });
7255
7398
 
7256
7399
  // src/Pagination.tsx
7257
- var React53 = __toESM(require("react"), 1);
7400
+ var React54 = __toESM(require("react"), 1);
7258
7401
  function pageList(page, count, sib) {
7259
7402
  let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
7260
7403
  if (page - sib <= 3) {
@@ -7274,7 +7417,7 @@ function pageList(page, count, sib) {
7274
7417
  if (count > 1) out.push(count);
7275
7418
  return out;
7276
7419
  }
7277
- var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7420
+ var Pagination = React54.forwardRef(function Pagination2(props, ref) {
7278
7421
  const t = useStrings();
7279
7422
  const count = Math.max(1, props.pageCount || 1);
7280
7423
  const st = useMaybeControlled(props.page, props.defaultPage || 1, props.onChange);
@@ -7293,7 +7436,7 @@ var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7293
7436
  },
7294
7437
  extra
7295
7438
  );
7296
- return link ? /* @__PURE__ */ React53.createElement(
7439
+ return link ? /* @__PURE__ */ React54.createElement(
7297
7440
  Link,
7298
7441
  {
7299
7442
  href: link(p),
@@ -7306,7 +7449,7 @@ var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7306
7449
  ...common
7307
7450
  },
7308
7451
  label
7309
- ) : /* @__PURE__ */ React53.createElement(
7452
+ ) : /* @__PURE__ */ React54.createElement(
7310
7453
  "button",
7311
7454
  {
7312
7455
  type: "button",
@@ -7320,7 +7463,7 @@ var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7320
7463
  }
7321
7464
  function arrow(p, icon, label, rel, disabled) {
7322
7465
  if (!link || disabled)
7323
- return /* @__PURE__ */ React53.createElement(
7466
+ return /* @__PURE__ */ React54.createElement(
7324
7467
  IconButton,
7325
7468
  {
7326
7469
  icon,
@@ -7331,7 +7474,7 @@ var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7331
7474
  }
7332
7475
  }
7333
7476
  );
7334
- return /* @__PURE__ */ React53.createElement(
7477
+ return /* @__PURE__ */ React54.createElement(
7335
7478
  Link,
7336
7479
  {
7337
7480
  href: link(p),
@@ -7346,17 +7489,17 @@ var Pagination = React53.forwardRef(function Pagination2(props, ref) {
7346
7489
  }
7347
7490
  }
7348
7491
  },
7349
- /* @__PURE__ */ React53.createElement(Icon, { name: icon, size: "sm" })
7492
+ /* @__PURE__ */ React54.createElement(Icon, { name: icon, size: "sm" })
7350
7493
  );
7351
7494
  }
7352
- return /* @__PURE__ */ React53.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__ */ React53.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
7353
- return typeof p === "number" ? /* @__PURE__ */ React53.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React53.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
7354
- })), /* @__PURE__ */ React53.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, "chevron-right", t.nextPage, "next", page >= count));
7495
+ return /* @__PURE__ */ React54.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__ */ React54.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
7496
+ return typeof p === "number" ? /* @__PURE__ */ React54.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React54.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
7497
+ })), /* @__PURE__ */ React54.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, "chevron-right", t.nextPage, "next", page >= count));
7355
7498
  });
7356
7499
 
7357
7500
  // src/Accordion.tsx
7358
- var React54 = __toESM(require("react"), 1);
7359
- var Accordion = React54.forwardRef(function Accordion2(props, ref) {
7501
+ var React55 = __toESM(require("react"), 1);
7502
+ var Accordion = React55.forwardRef(function Accordion2(props, ref) {
7360
7503
  const auto = uid(), base = props.id || auto;
7361
7504
  const multiple = props.type === "multiple";
7362
7505
  const st = useMaybeControlled(
@@ -7394,9 +7537,9 @@ var Accordion = React54.forwardRef(function Accordion2(props, ref) {
7394
7537
  n2.focus();
7395
7538
  }
7396
7539
  }
7397
- return /* @__PURE__ */ React54.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
7540
+ return /* @__PURE__ */ React55.createElement("div", { ref, className: cx("aura-accordion", props.className), onKeyDown: onKey }, items2.map(function(it) {
7398
7541
  const on = open.indexOf(it.id) >= 0, bid = base + "-btn-" + it.id, pid = base + "-panel-" + it.id;
7399
- return /* @__PURE__ */ React54.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React54.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React54.createElement(
7542
+ return /* @__PURE__ */ React55.createElement("div", { key: it.id, className: cx("aura-accordion__item", on && "is-open") }, /* @__PURE__ */ React55.createElement(HT, { className: "aura-accordion__heading" }, /* @__PURE__ */ React55.createElement(
7400
7543
  "button",
7401
7544
  {
7402
7545
  type: "button",
@@ -7408,15 +7551,15 @@ var Accordion = React54.forwardRef(function Accordion2(props, ref) {
7408
7551
  toggle(it.id);
7409
7552
  }
7410
7553
  },
7411
- it.icon ? /* @__PURE__ */ React54.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
7412
- /* @__PURE__ */ React54.createElement("span", { className: "aura-accordion__title" }, it.title, it.description ? /* @__PURE__ */ React54.createElement("span", { className: "aura-accordion__desc" }, it.description) : null),
7413
- /* @__PURE__ */ React54.createElement(Icon, { name: "chevron-down", className: "aura-accordion__chevron" })
7414
- )), /* @__PURE__ */ React54.createElement("div", { id: pid, role: "region", "aria-labelledby": bid, className: "aura-accordion__panel", hidden: !on }, it.content));
7554
+ it.icon ? /* @__PURE__ */ React55.createElement(Icon, { name: it.icon, className: "aura-accordion__lead" }) : null,
7555
+ /* @__PURE__ */ React55.createElement("span", { className: "aura-accordion__title" }, it.title, it.description ? /* @__PURE__ */ React55.createElement("span", { className: "aura-accordion__desc" }, it.description) : null),
7556
+ /* @__PURE__ */ React55.createElement(Icon, { name: "chevron-down", className: "aura-accordion__chevron" })
7557
+ )), /* @__PURE__ */ React55.createElement("div", { id: pid, role: "region", "aria-labelledby": bid, className: "aura-accordion__panel", hidden: !on }, it.content));
7415
7558
  }));
7416
7559
  });
7417
7560
 
7418
7561
  // src/Popover.tsx
7419
- var React55 = __toESM(require("react"), 1);
7562
+ var React56 = __toESM(require("react"), 1);
7420
7563
  var import_react_dom12 = require("react-dom");
7421
7564
  function position(anchor, pop, placement) {
7422
7565
  const r = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
@@ -7434,15 +7577,15 @@ function position(anchor, pop, placement) {
7434
7577
  const left = align === "end" ? r.right - pw : align === "center" ? r.left + r.width / 2 - pw / 2 : r.left;
7435
7578
  return { top: Math.max(8, top), left: Math.max(8, Math.min(left, vw - pw - 8)), side, maxHeight };
7436
7579
  }
7437
- var Popover = React55.forwardRef(function Popover2(props, ref) {
7580
+ var Popover = React56.forwardRef(function Popover2(props, ref) {
7438
7581
  const t = useStrings();
7439
7582
  const density = useDensity();
7440
7583
  const auto = uid(), id = props.id || auto;
7441
7584
  const st = useMaybeControlled(props.open, !!props.defaultOpen, props.onOpenChange);
7442
7585
  const open = !!st[0];
7443
- const wrap = React55.useRef(null), pop = React55.useRef(null), popMerged = useMergedRef(ref, pop);
7444
- const pos = React55.useState(null), mounted = useMounted();
7445
- const inTree = React55.useRef(false);
7586
+ const wrap = React56.useRef(null), pop = React56.useRef(null), popMerged = useMergedRef(ref, pop);
7587
+ const pos = React56.useState(null), mounted = useMounted();
7588
+ const inTree = React56.useRef(false);
7446
7589
  function trigger() {
7447
7590
  return wrap.current && (wrap.current.querySelector('button, [role="button"], a, input') || wrap.current.firstElementChild);
7448
7591
  }
@@ -7469,7 +7612,7 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7469
7612
  },
7470
7613
  [open, mounted, props.placement]
7471
7614
  );
7472
- React55.useEffect(
7615
+ React56.useEffect(
7473
7616
  function() {
7474
7617
  if (!open || !mounted) return;
7475
7618
  if (props.autoFocus !== false && pop.current) {
@@ -7494,9 +7637,9 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7494
7637
  },
7495
7638
  [open, mounted]
7496
7639
  );
7497
- const child = React55.Children.only(props.trigger);
7640
+ const child = React56.Children.only(props.trigger);
7498
7641
  const panel = open && mounted ? (0, import_react_dom12.createPortal)(
7499
- /* @__PURE__ */ React55.createElement(
7642
+ /* @__PURE__ */ React56.createElement(
7500
7643
  "div",
7501
7644
  {
7502
7645
  ref: popMerged,
@@ -7526,7 +7669,7 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7526
7669
  } else trapTab(e, pop.current);
7527
7670
  }
7528
7671
  },
7529
- props.title ? /* @__PURE__ */ React55.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React55.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React55.createElement(
7672
+ props.title ? /* @__PURE__ */ React56.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React56.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React56.createElement(
7530
7673
  IconButton,
7531
7674
  {
7532
7675
  icon: "x",
@@ -7536,7 +7679,7 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7536
7679
  }
7537
7680
  }
7538
7681
  )) : null,
7539
- /* @__PURE__ */ React55.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
7682
+ /* @__PURE__ */ React56.createElement("div", { className: "aura-popover__body" }, typeof props.children === "function" ? props.children({
7540
7683
  close: function() {
7541
7684
  close(true);
7542
7685
  }
@@ -7544,7 +7687,7 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7544
7687
  ),
7545
7688
  document.body
7546
7689
  ) : null;
7547
- return /* @__PURE__ */ React55.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React55.cloneElement(child, {
7690
+ return /* @__PURE__ */ React56.createElement("span", { ref: wrap, className: "aura-popover-anchor" }, React56.cloneElement(child, {
7548
7691
  onClick: function(e) {
7549
7692
  if (child.props.onClick) child.props.onClick(e);
7550
7693
  st[1](!open);
@@ -7556,20 +7699,20 @@ var Popover = React55.forwardRef(function Popover2(props, ref) {
7556
7699
  });
7557
7700
 
7558
7701
  // src/NumberField.tsx
7559
- var React56 = __toESM(require("react"), 1);
7702
+ var React57 = __toESM(require("react"), 1);
7560
7703
  function decimalsOf(n2) {
7561
7704
  const s = String(n2);
7562
7705
  const i = s.indexOf(".");
7563
7706
  return i < 0 ? 0 : s.length - i - 1;
7564
7707
  }
7565
- function parse(text) {
7566
- let t = text.trim();
7708
+ function parse(text2) {
7709
+ let t = text2.trim();
7567
7710
  if (t.indexOf(".") < 0 && /^-?\d+,\d+$/.test(t.replace(/[\s ]/g, "")) && !/,\d{3}$/.test(t)) t = t.replace(",", ".");
7568
7711
  const s = t.replace(/[,\s ]/g, "");
7569
7712
  if (!/^-?(\d+\.?\d*|\.\d+)$/.test(s)) return NaN;
7570
7713
  return Number(s);
7571
7714
  }
7572
- var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7715
+ var NumberField = React57.forwardRef(function NumberField2(props, ref) {
7573
7716
  const t = useStrings();
7574
7717
  const auto = uid(), id = props.id || auto;
7575
7718
  const step = props.step || 1;
@@ -7580,7 +7723,7 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7580
7723
  props.onChange
7581
7724
  );
7582
7725
  const value = st[0], setValue = st[1];
7583
- const draftState = React56.useState(null), draft = draftState[0], setDraft = draftState[1];
7726
+ const draftState = React57.useState(null), draft = draftState[0], setDraft = draftState[1];
7584
7727
  function fmt2(n2) {
7585
7728
  if (n2 == null || isNaN(n2)) return "";
7586
7729
  return n2.toLocaleString("en", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
@@ -7629,7 +7772,7 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7629
7772
  };
7630
7773
  const valueText = value == null ? void 0 : [affixText(props.prefix), fmt2(value), affixText(props.suffix)].join(" ").trim();
7631
7774
  const stepper = props.stepper !== false && !props.readOnly;
7632
- return /* @__PURE__ */ React56.createElement(
7775
+ return /* @__PURE__ */ React57.createElement(
7633
7776
  Field,
7634
7777
  {
7635
7778
  id,
@@ -7641,7 +7784,7 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7641
7784
  disabled: props.disabled,
7642
7785
  className: props.className
7643
7786
  },
7644
- /* @__PURE__ */ React56.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React56.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React56.createElement(
7787
+ /* @__PURE__ */ React57.createElement("div", { className: cx("aura-input aura-number", stepper && "has-stepper") }, props.prefix != null ? /* @__PURE__ */ React57.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.prefix) : null, /* @__PURE__ */ React57.createElement(
7645
7788
  "input",
7646
7789
  {
7647
7790
  ref,
@@ -7667,11 +7810,11 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7667
7810
  setDraft(fmt2(value));
7668
7811
  },
7669
7812
  onChange: function(e) {
7670
- const text = e.target.value;
7671
- setDraft(text);
7672
- if (!text.trim()) setValue(null);
7813
+ const text2 = e.target.value;
7814
+ setDraft(text2);
7815
+ if (!text2.trim()) setValue(null);
7673
7816
  else {
7674
- const n2 = parse(text);
7817
+ const n2 = parse(text2);
7675
7818
  if (!isNaN(n2)) setValue(n2);
7676
7819
  }
7677
7820
  },
@@ -7688,7 +7831,7 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7688
7831
  },
7689
7832
  onKeyDown
7690
7833
  }
7691
- ), props.suffix != null ? /* @__PURE__ */ React56.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React56.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React56.createElement(
7834
+ ), props.suffix != null ? /* @__PURE__ */ React57.createElement("span", { className: "aura-number__affix", "aria-hidden": true }, props.suffix) : null, stepper ? /* @__PURE__ */ React57.createElement("span", { className: "aura-number__steps" }, /* @__PURE__ */ React57.createElement(
7692
7835
  "button",
7693
7836
  {
7694
7837
  type: "button",
@@ -7704,8 +7847,8 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7704
7847
  nudge(-step);
7705
7848
  }
7706
7849
  },
7707
- /* @__PURE__ */ React56.createElement(Icon, { name: "minus" })
7708
- ), /* @__PURE__ */ React56.createElement(
7850
+ /* @__PURE__ */ React57.createElement(Icon, { name: "minus" })
7851
+ ), /* @__PURE__ */ React57.createElement(
7709
7852
  "button",
7710
7853
  {
7711
7854
  type: "button",
@@ -7721,14 +7864,14 @@ var NumberField = React56.forwardRef(function NumberField2(props, ref) {
7721
7864
  nudge(step);
7722
7865
  }
7723
7866
  },
7724
- /* @__PURE__ */ React56.createElement(Icon, { name: "plus" })
7867
+ /* @__PURE__ */ React57.createElement(Icon, { name: "plus" })
7725
7868
  )) : null)
7726
7869
  );
7727
7870
  });
7728
7871
 
7729
7872
  // src/Stepper.tsx
7730
- var React57 = __toESM(require("react"), 1);
7731
- var Stepper = React57.forwardRef(function Stepper2(props, ref) {
7873
+ var React58 = __toESM(require("react"), 1);
7874
+ var Stepper = React58.forwardRef(function Stepper2(props, ref) {
7732
7875
  const t = useStrings();
7733
7876
  const steps = props.steps || [];
7734
7877
  let at = -1;
@@ -7738,26 +7881,26 @@ var Stepper = React57.forwardRef(function Stepper2(props, ref) {
7738
7881
  if (at < 0) at = 0;
7739
7882
  const vertical = props.orientation === "vertical";
7740
7883
  const cur = steps[at];
7741
- return /* @__PURE__ */ React57.createElement(
7884
+ return /* @__PURE__ */ React58.createElement(
7742
7885
  "nav",
7743
7886
  {
7744
7887
  ref,
7745
7888
  "aria-label": props.label,
7746
7889
  className: cx("aura-stepper", vertical ? "aura-stepper--vertical" : "aura-stepper--horizontal", props.className)
7747
7890
  },
7748
- /* @__PURE__ */ React57.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
7891
+ /* @__PURE__ */ React58.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
7749
7892
  const state = i < at ? "done" : i === at ? "current" : "upcoming";
7750
- const marker = /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React57.createElement(Icon, { name: "check" }) : i + 1);
7751
- const text = /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__label" }, s.label, state === "done" ? /* @__PURE__ */ React57.createElement("span", { className: "aura-sr-only" }, ", " + t.stepDone) : null), s.description ? /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__desc" }, s.description) : null);
7893
+ const marker = /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React58.createElement(Icon, { name: "check" }) : i + 1);
7894
+ const text2 = /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__label" }, s.label, state === "done" ? /* @__PURE__ */ React58.createElement("span", { className: "aura-sr-only" }, ", " + t.stepDone) : null), s.description ? /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__desc" }, s.description) : null);
7752
7895
  const clickable = state === "done" && !!props.onStepClick;
7753
- return /* @__PURE__ */ React57.createElement(
7896
+ return /* @__PURE__ */ React58.createElement(
7754
7897
  "li",
7755
7898
  {
7756
7899
  key: s.id,
7757
7900
  className: cx("aura-stepper__item", "is-" + state),
7758
7901
  "aria-current": state === "current" ? "step" : void 0
7759
7902
  },
7760
- clickable ? /* @__PURE__ */ React57.createElement(
7903
+ clickable ? /* @__PURE__ */ React58.createElement(
7761
7904
  "button",
7762
7905
  {
7763
7906
  type: "button",
@@ -7767,20 +7910,20 @@ var Stepper = React57.forwardRef(function Stepper2(props, ref) {
7767
7910
  }
7768
7911
  },
7769
7912
  marker,
7770
- text
7771
- ) : /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__step" }, marker, text)
7913
+ text2
7914
+ ) : /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__step" }, marker, text2)
7772
7915
  );
7773
7916
  })),
7774
- !vertical && cur ? /* @__PURE__ */ React57.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React57.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
7917
+ !vertical && cur ? /* @__PURE__ */ React58.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React58.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
7775
7918
  );
7776
7919
  });
7777
7920
 
7778
7921
  // src/SegmentedControl.tsx
7779
- var React58 = __toESM(require("react"), 1);
7922
+ var React59 = __toESM(require("react"), 1);
7780
7923
  function toOpt2(o) {
7781
7924
  return typeof o === "object" ? o : { value: o, label: o };
7782
7925
  }
7783
- var SegmentedControl = React58.forwardRef(
7926
+ var SegmentedControl = React59.forwardRef(
7784
7927
  function SegmentedControl2(props, ref) {
7785
7928
  const options = (props.options || []).map(toOpt2);
7786
7929
  const firstEnabled = options.filter(function(o) {
@@ -7793,7 +7936,7 @@ var SegmentedControl = React58.forwardRef(
7793
7936
  );
7794
7937
  const value = st[0], setValue = st[1];
7795
7938
  const auto = uid(), id = props.id || auto;
7796
- const refs = React58.useRef([]);
7939
+ const refs = React59.useRef([]);
7797
7940
  const selIdx = options.findIndex(function(o) {
7798
7941
  return o.value === value;
7799
7942
  });
@@ -7826,7 +7969,7 @@ var SegmentedControl = React58.forwardRef(
7826
7969
  move(options.length, -1);
7827
7970
  }
7828
7971
  }
7829
- return /* @__PURE__ */ React58.createElement(
7972
+ return /* @__PURE__ */ React59.createElement(
7830
7973
  "div",
7831
7974
  {
7832
7975
  ref,
@@ -7845,7 +7988,7 @@ var SegmentedControl = React58.forwardRef(
7845
7988
  options.map(function(o, i) {
7846
7989
  const on = o.value === value;
7847
7990
  const off = props.disabled || o.disabled;
7848
- return /* @__PURE__ */ React58.createElement(
7991
+ return /* @__PURE__ */ React59.createElement(
7849
7992
  "button",
7850
7993
  {
7851
7994
  key: o.value,
@@ -7867,8 +8010,8 @@ var SegmentedControl = React58.forwardRef(
7867
8010
  onKeyDown(e, i);
7868
8011
  }
7869
8012
  },
7870
- o.icon ? /* @__PURE__ */ React58.createElement(Icon, { name: o.icon }) : null,
7871
- o.iconOnly ? null : /* @__PURE__ */ React58.createElement("span", null, o.label)
8013
+ o.icon ? /* @__PURE__ */ React59.createElement(Icon, { name: o.icon }) : null,
8014
+ o.iconOnly ? null : /* @__PURE__ */ React59.createElement("span", null, o.label)
7872
8015
  );
7873
8016
  })
7874
8017
  );