@mirror-physics/fractal-ui 0.2.0-next.73 → 0.2.0-next.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -80,6 +80,7 @@ __export(index_exports, {
80
80
  PromptCard: () => PromptCard,
81
81
  PromptCardGhost: () => PromptCardGhost,
82
82
  PromptGrid: () => PromptGrid,
83
+ Radio: () => Radio,
83
84
  SidePanel: () => SidePanel,
84
85
  SidePanelGhost: () => SidePanelGhost,
85
86
  Sidebar: () => Sidebar,
@@ -101,6 +102,8 @@ __export(index_exports, {
101
102
  TextButtonGhost: () => TextButtonGhost,
102
103
  Textarea: () => Textarea,
103
104
  TextareaGhost: () => TextareaGhost,
105
+ Toast: () => Toast,
106
+ ToastViewport: () => ToastViewport,
104
107
  Toggle: () => Toggle,
105
108
  ToggleGhost: () => ToggleGhost,
106
109
  UILoader: () => UILoader,
@@ -1138,10 +1141,109 @@ var AlertDescription = React9.forwardRef(
1138
1141
  );
1139
1142
  AlertDescription.displayName = "AlertDescription";
1140
1143
 
1141
- // src/components/Toggle/Toggle.tsx
1144
+ // src/components/Toast/Toast.tsx
1145
+ var React10 = __toESM(require("react"), 1);
1146
+ var import_react_dom = require("react-dom");
1147
+ var import_fractal_icons8 = require("@mirror-physics/fractal-icons");
1142
1148
  var import_jsx_runtime13 = require("react/jsx-runtime");
1143
- function Toggle({ checked, onChange, label, className }) {
1149
+ var defaultIcons2 = {
1150
+ default: import_fractal_icons8.CircleInfo,
1151
+ info: import_fractal_icons8.CircleInfo,
1152
+ success: import_fractal_icons8.CircleCheck,
1153
+ warning: import_fractal_icons8.Warning,
1154
+ error: import_fractal_icons8.CircleClose
1155
+ };
1156
+ var Toast = React10.forwardRef(function Toast2({
1157
+ action,
1158
+ children,
1159
+ className,
1160
+ dismissLabel = "Dismiss notification",
1161
+ duration,
1162
+ icon,
1163
+ onBlurCapture,
1164
+ onDismiss,
1165
+ onFocusCapture,
1166
+ onPointerEnter,
1167
+ onPointerLeave,
1168
+ role,
1169
+ variant = "default",
1170
+ ...props
1171
+ }, ref) {
1172
+ const [paused, setPaused] = React10.useState(false);
1173
+ const dismissRef = React10.useRef(onDismiss);
1174
+ const DefaultIcon = defaultIcons2[variant];
1175
+ const resolvedDuration = duration === void 0 ? variant === "error" ? null : 5e3 : duration;
1176
+ React10.useEffect(() => {
1177
+ dismissRef.current = onDismiss;
1178
+ }, [onDismiss]);
1179
+ React10.useEffect(() => {
1180
+ if (!dismissRef.current || paused || resolvedDuration === null || resolvedDuration <= 0) return;
1181
+ const timeout = window.setTimeout(() => dismissRef.current?.(), resolvedDuration);
1182
+ return () => window.clearTimeout(timeout);
1183
+ }, [paused, resolvedDuration]);
1184
+ const announcementRole = role ?? (variant === "error" ? "alert" : "status");
1144
1185
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1186
+ "div",
1187
+ {
1188
+ ref,
1189
+ "aria-atomic": "true",
1190
+ "aria-live": announcementRole === "alert" ? "assertive" : "polite",
1191
+ className: cn("fractal-toast", `fractal-toast--${variant}`, className),
1192
+ role: announcementRole,
1193
+ onBlurCapture: (event) => {
1194
+ onBlurCapture?.(event);
1195
+ if (!event.currentTarget.contains(event.relatedTarget)) setPaused(false);
1196
+ },
1197
+ onFocusCapture: (event) => {
1198
+ onFocusCapture?.(event);
1199
+ setPaused(true);
1200
+ },
1201
+ onPointerEnter: (event) => {
1202
+ onPointerEnter?.(event);
1203
+ setPaused(true);
1204
+ },
1205
+ onPointerLeave: (event) => {
1206
+ onPointerLeave?.(event);
1207
+ setPaused(false);
1208
+ },
1209
+ ...props,
1210
+ children: [
1211
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", className: "fractal-toast__icon", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DefaultIcon, { size: 18 }) }),
1212
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fractal-toast__content", children }),
1213
+ action && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fractal-toast__action", children: action }),
1214
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1215
+ "button",
1216
+ {
1217
+ "aria-label": dismissLabel,
1218
+ className: "fractal-toast__dismiss",
1219
+ onClick: onDismiss,
1220
+ type: "button",
1221
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_fractal_icons8.Close, { "aria-hidden": "true", size: 14 })
1222
+ }
1223
+ )
1224
+ ]
1225
+ }
1226
+ );
1227
+ });
1228
+ var ToastViewport = React10.forwardRef(function ToastViewport2({ children, className, portal = true, position = "top-center", ...props }, ref) {
1229
+ const viewport = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1230
+ "div",
1231
+ {
1232
+ ref,
1233
+ className: cn("fractal-toast-viewport", `fractal-toast-viewport--${position}`, className),
1234
+ "data-position": position,
1235
+ ...props,
1236
+ children
1237
+ }
1238
+ );
1239
+ if (!portal || typeof document === "undefined") return viewport;
1240
+ return (0, import_react_dom.createPortal)(viewport, document.body);
1241
+ });
1242
+
1243
+ // src/components/Toggle/Toggle.tsx
1244
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1245
+ function Toggle({ checked, onChange, label, className }) {
1246
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1145
1247
  "button",
1146
1248
  {
1147
1249
  type: "button",
@@ -1150,16 +1252,16 @@ function Toggle({ checked, onChange, label, className }) {
1150
1252
  className: cn("fractal-toggle", className),
1151
1253
  onClick: () => onChange(!checked),
1152
1254
  children: [
1153
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: cn("fractal-toggle-track", checked && "fractal-toggle-track--checked"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: cn("fractal-toggle-thumb", checked && "fractal-toggle-thumb--checked") }) }),
1154
- label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "fractal-toggle-label", children: label })
1255
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn("fractal-toggle-track", checked && "fractal-toggle-track--checked"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn("fractal-toggle-thumb", checked && "fractal-toggle-thumb--checked") }) }),
1256
+ label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fractal-toggle-label", children: label })
1155
1257
  ]
1156
1258
  }
1157
1259
  );
1158
1260
  }
1159
1261
 
1160
1262
  // src/components/Modal/Modal.tsx
1161
- var React10 = __toESM(require("react"), 1);
1162
- var import_react_dom = require("react-dom");
1263
+ var React11 = __toESM(require("react"), 1);
1264
+ var import_react_dom2 = require("react-dom");
1163
1265
 
1164
1266
  // src/hooks/useEscapeDismiss.ts
1165
1267
  var import_react2 = require("react");
@@ -1213,7 +1315,7 @@ function useEscapeDismiss(priority, handler, enabled = true) {
1213
1315
 
1214
1316
  // src/components/UILoader/UILoader.tsx
1215
1317
  var import_react3 = require("react");
1216
- var import_jsx_runtime14 = require("react/jsx-runtime");
1318
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1217
1319
  var LEFT = "M0 53C0 51 1.6 49.5 3.6 49.5h16.5c1 0 1.9.4 2.5 1L42.1 69.6c.7.7 1.1 1.6 1.1 2.5v16.2c0 2-1.6 3.5-3.6 3.5H23.1c-1 0-1.9-.4-2.5-1L1.1 71.7C.4 71 0 70.1 0 69.2V53Z";
1218
1320
  var CENTER = "M0 3.5C0 1.6 1.6 0 3.6 0h16.5c1 0 1.9.4 2.5 1L92.5 69.6c.7.7 1 1.6 1 2.5v16.2c0 2-1.6 3.5-3.6 3.5H73.4c-1 0-1.9-.4-2.5-1L1.1 22.2C.4 21.6 0 20.7 0 19.7V3.5Z";
1219
1321
  var RIGHT = "M50.4 3.5C50.4 1.6 52 0 54 0h16.5c1 0 1.9.4 2.5 1l69.8 68.6c.7.7 1.1 1.6 1.1 2.5v16.2c0 2-1.6 3.5-3.6 3.5h-16.5c-1 0-1.9-.4-2.5-1L51.4 22.2c-.7-.6-1-1.5-1-2.5V3.5Z";
@@ -1222,7 +1324,7 @@ function UILoader({ size = 48, tone = "neutral", className, style, label = "Load
1222
1324
  const clipId = `fractal-ui-loader-clip-${rawId}`;
1223
1325
  const gradientId = `fractal-ui-loader-gradient-${rawId}`;
1224
1326
  const height = typeof size === "number" ? `${size}px` : size;
1225
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1327
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1226
1328
  "span",
1227
1329
  {
1228
1330
  "aria-hidden": ariaHidden || void 0,
@@ -1230,52 +1332,52 @@ function UILoader({ size = 48, tone = "neutral", className, style, label = "Load
1230
1332
  className: cn("fractal-ui-loader", `fractal-ui-loader--${tone}`, className),
1231
1333
  role: ariaHidden ? void 0 : "status",
1232
1334
  style,
1233
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { "aria-hidden": "true", fill: "none", viewBox: "0 0 144 92", style: { height, width: "auto" }, children: [
1234
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("defs", { children: [
1235
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("linearGradient", { id: gradientId, x1: "59", x2: "94.3", y1: "0", y2: "89.1", gradientUnits: "userSpaceOnUse", children: [
1236
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { className: "fractal-ui-loader__stop-start", offset: "0" }),
1237
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { className: "fractal-ui-loader__stop-end", offset: "1" })
1335
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { "aria-hidden": "true", fill: "none", viewBox: "0 0 144 92", style: { height, width: "auto" }, children: [
1336
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("defs", { children: [
1337
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("linearGradient", { id: gradientId, x1: "59", x2: "94.3", y1: "0", y2: "89.1", gradientUnits: "userSpaceOnUse", children: [
1338
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { className: "fractal-ui-loader__stop-start", offset: "0" }),
1339
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { className: "fractal-ui-loader__stop-end", offset: "1" })
1238
1340
  ] }),
1239
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("linearGradient", { id: `${gradientId}-shine`, x1: "0", x2: "1", y1: "0", y2: "0", children: [
1240
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { offset: "0.4", stopColor: "white", stopOpacity: "0" }),
1241
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { offset: "0.5", stopColor: "white", stopOpacity: "0.62" }),
1242
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { offset: "0.6", stopColor: "white", stopOpacity: "0" })
1341
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("linearGradient", { id: `${gradientId}-shine`, x1: "0", x2: "1", y1: "0", y2: "0", children: [
1342
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { offset: "0.4", stopColor: "white", stopOpacity: "0" }),
1343
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { offset: "0.5", stopColor: "white", stopOpacity: "0.62" }),
1344
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { offset: "0.6", stopColor: "white", stopOpacity: "0" })
1243
1345
  ] }),
1244
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("clipPath", { id: clipId, children: [
1245
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: LEFT }),
1246
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: CENTER }),
1247
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: RIGHT })
1346
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("clipPath", { id: clipId, children: [
1347
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: LEFT }),
1348
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: CENTER }),
1349
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: RIGHT })
1248
1350
  ] })
1249
1351
  ] }),
1250
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: CENTER, fill: `url(#${gradientId})` }),
1251
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: RIGHT, fill: `url(#${gradientId})` }),
1252
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: LEFT, fill: `url(#${gradientId})` }),
1253
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("g", { clipPath: `url(#${clipId})`, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("g", { className: "fractal-ui-loader__shine-axis", transform: "translate(72 46) rotate(68.4)", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("rect", { className: "fractal-ui-loader__shine", x: "-160", y: "-100", width: "320", height: "200", fill: `url(#${gradientId}-shine)` }) }) })
1352
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: CENTER, fill: `url(#${gradientId})` }),
1353
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: RIGHT, fill: `url(#${gradientId})` }),
1354
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: LEFT, fill: `url(#${gradientId})` }),
1355
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { clipPath: `url(#${clipId})`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { className: "fractal-ui-loader__shine-axis", transform: "translate(72 46) rotate(68.4)", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { className: "fractal-ui-loader__shine", x: "-160", y: "-100", width: "320", height: "200", fill: `url(#${gradientId}-shine)` }) }) })
1254
1356
  ] })
1255
1357
  }
1256
1358
  );
1257
1359
  }
1258
1360
 
1259
1361
  // src/components/Modal/Modal.tsx
1260
- var import_jsx_runtime15 = require("react/jsx-runtime");
1261
- var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M12 4L4 12M4 4L12 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1362
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1363
+ var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M12 4L4 12M4 4L12 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1262
1364
  function Modal({ open, onClose, title, children, danger, warn, footer, noClose, closeDisabled = false, size = "sm", loading = false, loadingLabel = "Loading", scrollable = false, className }) {
1263
- const [bodyScrolled, setBodyScrolled] = React10.useState(false);
1365
+ const [bodyScrolled, setBodyScrolled] = React11.useState(false);
1264
1366
  useEscapeDismiss(80, onClose, open && !noClose && !closeDisabled);
1265
- React10.useEffect(() => {
1367
+ React11.useEffect(() => {
1266
1368
  if (open) setBodyScrolled(false);
1267
1369
  }, [open]);
1268
1370
  if (!open) return null;
1269
1371
  const sizeClass = `fractal-modal-panel--${size}`;
1270
1372
  const accentClass = danger ? "fractal-modal-panel--danger" : warn ? "fractal-modal-panel--warn" : "";
1271
- return (0, import_react_dom.createPortal)(
1272
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "fractal-modal-overlay", onClick: noClose || closeDisabled ? void 0 : onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1373
+ return (0, import_react_dom2.createPortal)(
1374
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fractal-modal-overlay", onClick: noClose || closeDisabled ? void 0 : onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1273
1375
  "div",
1274
1376
  {
1275
1377
  className: cn("fractal-modal-panel", sizeClass, accentClass, scrollable && "fractal-modal-panel--scrollable", className),
1276
1378
  onClick: (e) => e.stopPropagation(),
1277
1379
  children: [
1278
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1380
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1279
1381
  "div",
1280
1382
  {
1281
1383
  className: cn(
@@ -1284,12 +1386,12 @@ function Modal({ open, onClose, title, children, danger, warn, footer, noClose,
1284
1386
  scrollable && bodyScrolled && "fractal-modal-title-row--scrolled"
1285
1387
  ),
1286
1388
  children: [
1287
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { className: cn("fractal-modal-title", danger && "fractal-modal-title--danger", warn && "fractal-modal-title--warn"), children: title }),
1288
- !noClose && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: onClose, title: "Close", disabled: closeDisabled, className: "fractal-modal-close", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CloseIcon, {}) })
1389
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: cn("fractal-modal-title", danger && "fractal-modal-title--danger", warn && "fractal-modal-title--warn"), children: title }),
1390
+ !noClose && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", onClick: onClose, title: "Close", disabled: closeDisabled, className: "fractal-modal-close", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CloseIcon, {}) })
1289
1391
  ]
1290
1392
  }
1291
1393
  ),
1292
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1394
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1293
1395
  "div",
1294
1396
  {
1295
1397
  "aria-busy": loading || void 0,
@@ -1300,10 +1402,10 @@ function Modal({ open, onClose, title, children, danger, warn, footer, noClose,
1300
1402
  scrollable && "fractal-modal-body--scrollable"
1301
1403
  ),
1302
1404
  onScroll: scrollable ? (event) => setBodyScrolled(event.currentTarget.scrollTop > 0) : void 0,
1303
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UILoader, { label: loadingLabel }) : children
1405
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UILoader, { label: loadingLabel }) : children
1304
1406
  }
1305
1407
  ),
1306
- footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("fractal-modal-footer", scrollable && "fractal-modal-footer--divided"), children: footer })
1408
+ footer && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("fractal-modal-footer", scrollable && "fractal-modal-footer--divided"), children: footer })
1307
1409
  ]
1308
1410
  }
1309
1411
  ) }),
@@ -1312,17 +1414,17 @@ function Modal({ open, onClose, title, children, danger, warn, footer, noClose,
1312
1414
  }
1313
1415
 
1314
1416
  // src/components/DataTable/DataTable.tsx
1315
- var import_jsx_runtime16 = require("react/jsx-runtime");
1417
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1316
1418
  function DataTable({ columns, data, emptyMessage, header, size = "md", className }) {
1317
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("fractal-datatable", `fractal-datatable--${size}`, className), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fractal-datatable-surface", children: [
1318
- header && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fractal-datatable-header", children: header }),
1319
- data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fractal-datatable-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "fractal-datatable-table", children: [
1320
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "fractal-datatable-thead-row", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "fractal-datatable-th", style: { width: col.width }, children: col.header }, col.key)) }) }),
1321
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { children: data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cn("fractal-datatable", `fractal-datatable--${size}`, className), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fractal-datatable-surface", children: [
1420
+ header && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fractal-datatable-header", children: header }),
1421
+ data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fractal-datatable-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "fractal-datatable-table", children: [
1422
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", { className: "fractal-datatable-thead-row", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "fractal-datatable-th", style: { width: col.width }, children: col.header }, col.key)) }) }),
1423
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1322
1424
  "tr",
1323
1425
  {
1324
1426
  className: "fractal-datatable-row",
1325
- children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "fractal-datatable-td", style: { width: col.width }, children: col.render(row, rowIndex) }, col.key))
1427
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "fractal-datatable-td", style: { width: col.width }, children: col.render(row, rowIndex) }, col.key))
1326
1428
  },
1327
1429
  rowIndex
1328
1430
  )) })
@@ -1331,9 +1433,9 @@ function DataTable({ columns, data, emptyMessage, header, size = "md", className
1331
1433
  }
1332
1434
 
1333
1435
  // src/components/Dropdown/Dropdown.tsx
1334
- var React11 = __toESM(require("react"), 1);
1335
- var import_fractal_icons8 = require("@mirror-physics/fractal-icons");
1336
- var import_jsx_runtime17 = require("react/jsx-runtime");
1436
+ var React12 = __toESM(require("react"), 1);
1437
+ var import_fractal_icons9 = require("@mirror-physics/fractal-icons");
1438
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1337
1439
  var MARGIN = 4;
1338
1440
  function Dropdown({
1339
1441
  items,
@@ -1355,10 +1457,10 @@ function Dropdown({
1355
1457
  closeOnSelect = true,
1356
1458
  disabled = false
1357
1459
  }) {
1358
- const [open, setOpen] = React11.useState(false);
1359
- const triggerRef = React11.useRef(null);
1360
- const panelRef = React11.useRef(null);
1361
- const [panelStyle, setPanelStyle] = React11.useState({});
1460
+ const [open, setOpen] = React12.useState(false);
1461
+ const triggerRef = React12.useRef(null);
1462
+ const panelRef = React12.useRef(null);
1463
+ const [panelStyle, setPanelStyle] = React12.useState({});
1362
1464
  const visibleItems = items.filter(
1363
1465
  (item) => item.icon != null || item.description != null && (typeof item.description === "string" ? item.description !== "" : true)
1364
1466
  );
@@ -1367,8 +1469,8 @@ function Dropdown({
1367
1469
  const selected = items.find((i) => i.value === selectedValue && i.kind !== "header") ?? selectableItems[0] ?? visibleItems[0];
1368
1470
  const isUp = direction === "up";
1369
1471
  const isHorizontalDirection = direction === "left" || direction === "right";
1370
- const ChevronIcon = direction === "up" ? import_fractal_icons8.ChevronUp : direction === "left" ? import_fractal_icons8.ChevronLeft : direction === "right" ? import_fractal_icons8.ChevronRight : import_fractal_icons8.ChevronDown;
1371
- React11.useLayoutEffect(() => {
1472
+ const ChevronIcon = direction === "up" ? import_fractal_icons9.ChevronUp : direction === "left" ? import_fractal_icons9.ChevronLeft : direction === "right" ? import_fractal_icons9.ChevronRight : import_fractal_icons9.ChevronDown;
1473
+ React12.useLayoutEffect(() => {
1372
1474
  if (!open || !triggerRef.current || !panelRef.current) return;
1373
1475
  const triggerRect = triggerRef.current.getBoundingClientRect();
1374
1476
  const panelRect = panelRef.current.getBoundingClientRect();
@@ -1419,7 +1521,7 @@ function Dropdown({
1419
1521
  }
1420
1522
  setPanelStyle({ top, left, right });
1421
1523
  }, [open, direction, isHorizontalDirection, isUp, align]);
1422
- React11.useEffect(() => {
1524
+ React12.useEffect(() => {
1423
1525
  if (!open) return;
1424
1526
  const handleClickOutside = (e) => {
1425
1527
  const target = e.target;
@@ -1429,8 +1531,8 @@ function Dropdown({
1429
1531
  document.addEventListener("mousedown", handleClickOutside);
1430
1532
  return () => document.removeEventListener("mousedown", handleClickOutside);
1431
1533
  }, [open]);
1432
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("fractal-dropdown", className), children: [
1433
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1534
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("fractal-dropdown", className), children: [
1535
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1434
1536
  "button",
1435
1537
  {
1436
1538
  ref: triggerRef,
@@ -1449,15 +1551,15 @@ function Dropdown({
1449
1551
  triggerClassName
1450
1552
  ),
1451
1553
  children: [
1452
- triggerContent != null ? triggerContent : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1453
- selected.icon != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-icon fractal-dropdown-icon--trigger", children: selected.icon }),
1454
- selected.description != null && (typeof selected.description !== "string" || selected.description !== "") && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-selected-text", children: selected.description })
1554
+ triggerContent != null ? triggerContent : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1555
+ selected.icon != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-icon fractal-dropdown-icon--trigger", children: selected.icon }),
1556
+ selected.description != null && (typeof selected.description !== "string" || selected.description !== "") && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-selected-text", children: selected.description })
1455
1557
  ] }),
1456
- !noChevron && !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
1558
+ !noChevron && !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
1457
1559
  ]
1458
1560
  }
1459
1561
  ),
1460
- open && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1562
+ open && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1461
1563
  "div",
1462
1564
  {
1463
1565
  ref: panelRef,
@@ -1466,21 +1568,21 @@ function Dropdown({
1466
1568
  className: cn("fractal-dropdown-panel", `fractal-dropdown-panel--${size}`, panelClassName),
1467
1569
  style: panelStyle,
1468
1570
  children: [
1469
- label != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fractal-dropdown-label", children: label }),
1571
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fractal-dropdown-label", children: label }),
1470
1572
  visibleItems.map((item, index) => {
1471
- const topDivider = item.border === "top" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fractal-dropdown-separator" }) : null;
1472
- const bottomDivider = item.border === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "fractal-dropdown-separator" }) : null;
1573
+ const topDivider = item.border === "top" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fractal-dropdown-separator" }) : null;
1574
+ const bottomDivider = item.border === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fractal-dropdown-separator" }) : null;
1473
1575
  if (item.kind === "header") {
1474
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(React11.Fragment, { children: [
1576
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(React12.Fragment, { children: [
1475
1577
  topDivider,
1476
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { role: "presentation", className: "fractal-dropdown-label", children: item.description }),
1578
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { role: "presentation", className: "fractal-dropdown-label", children: item.description }),
1477
1579
  bottomDivider
1478
1580
  ] }, `header-${index}`);
1479
1581
  }
1480
1582
  const isSelected = item.value === selectedValue;
1481
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(React11.Fragment, { children: [
1583
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(React12.Fragment, { children: [
1482
1584
  topDivider,
1483
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1585
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1484
1586
  "button",
1485
1587
  {
1486
1588
  type: "button",
@@ -1492,9 +1594,9 @@ function Dropdown({
1492
1594
  },
1493
1595
  className: "fractal-dropdown-option",
1494
1596
  children: [
1495
- item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-icon", children: item.icon }),
1496
- item.description != null && (typeof item.description !== "string" || item.description !== "") && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-option-text", children: item.description }),
1497
- item.trailing != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fractal-dropdown-trailing", children: item.trailing })
1597
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-icon", children: item.icon }),
1598
+ item.description != null && (typeof item.description !== "string" || item.description !== "") && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-option-text", children: item.description }),
1599
+ item.trailing != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fractal-dropdown-trailing", children: item.trailing })
1498
1600
  ]
1499
1601
  }
1500
1602
  ),
@@ -1508,10 +1610,10 @@ function Dropdown({
1508
1610
  }
1509
1611
 
1510
1612
  // src/components/Link/Link.tsx
1511
- var React12 = __toESM(require("react"), 1);
1512
- var import_jsx_runtime18 = require("react/jsx-runtime");
1513
- var Link = React12.forwardRef(
1514
- ({ className, theme = "default", size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1613
+ var React13 = __toESM(require("react"), 1);
1614
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1615
+ var Link = React13.forwardRef(
1616
+ ({ className, theme = "default", size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1515
1617
  "a",
1516
1618
  {
1517
1619
  ref,
@@ -1523,10 +1625,10 @@ var Link = React12.forwardRef(
1523
1625
  Link.displayName = "Link";
1524
1626
 
1525
1627
  // src/components/Chip/Chip.tsx
1526
- var React13 = __toESM(require("react"), 1);
1527
- var import_jsx_runtime19 = require("react/jsx-runtime");
1528
- var Chip = React13.forwardRef(
1529
- ({ className, tone = "neutral", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1628
+ var React14 = __toESM(require("react"), 1);
1629
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1630
+ var Chip = React14.forwardRef(
1631
+ ({ className, tone = "neutral", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1530
1632
  "span",
1531
1633
  {
1532
1634
  ref,
@@ -1538,8 +1640,8 @@ var Chip = React13.forwardRef(
1538
1640
  Chip.displayName = "Chip";
1539
1641
 
1540
1642
  // src/components/Checkbox/Checkbox.tsx
1541
- var import_fractal_icons9 = require("@mirror-physics/fractal-icons");
1542
- var import_jsx_runtime20 = require("react/jsx-runtime");
1643
+ var import_fractal_icons10 = require("@mirror-physics/fractal-icons");
1644
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1543
1645
  function Checkbox({
1544
1646
  checked,
1545
1647
  indeterminate = false,
@@ -1550,7 +1652,7 @@ function Checkbox({
1550
1652
  onKeyDown,
1551
1653
  ...props
1552
1654
  }) {
1553
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1655
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1554
1656
  "button",
1555
1657
  {
1556
1658
  ...props,
@@ -1572,18 +1674,49 @@ function Checkbox({
1572
1674
  onKeyDown?.(event);
1573
1675
  if (event.key === " " || event.key === "Enter") event.stopPropagation();
1574
1676
  },
1575
- children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "fractal-checkbox__indeterminate-icon", "aria-hidden": "true", children: [
1576
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_fractal_icons9.Checkbox, { size: 18 }),
1577
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_fractal_icons9.Minus, { className: "fractal-checkbox__indeterminate-mark", size: 12 })
1578
- ] }) : checked ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_fractal_icons9.CheckboxChecked, { "aria-hidden": "true", size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_fractal_icons9.Checkbox, { "aria-hidden": "true", size: 18 })
1677
+ children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "fractal-checkbox__indeterminate-icon", "aria-hidden": "true", children: [
1678
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.Checkbox, { size: 18 }),
1679
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.Minus, { className: "fractal-checkbox__indeterminate-mark", size: 12 })
1680
+ ] }) : checked ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.CheckboxChecked, { "aria-hidden": "true", size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.Checkbox, { "aria-hidden": "true", size: 18 })
1579
1681
  }
1580
1682
  );
1581
1683
  }
1582
1684
 
1685
+ // src/components/Radio/Radio.tsx
1686
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1687
+ function Radio({
1688
+ checked,
1689
+ className,
1690
+ description,
1691
+ disabled,
1692
+ label,
1693
+ onCheckedChange,
1694
+ ...props
1695
+ }) {
1696
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: cn("fractal-radio", disabled && "fractal-radio--disabled", className), children: [
1697
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1698
+ "input",
1699
+ {
1700
+ ...props,
1701
+ checked,
1702
+ className: "fractal-radio__input",
1703
+ disabled,
1704
+ onChange: (event) => onCheckedChange?.(event.currentTarget.checked),
1705
+ type: "radio"
1706
+ }
1707
+ ),
1708
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", className: "fractal-radio__control", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "fractal-radio__dot" }) }),
1709
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "fractal-radio__content", children: [
1710
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "fractal-radio__label", children: label }),
1711
+ description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "fractal-radio__description", children: description })
1712
+ ] })
1713
+ ] });
1714
+ }
1715
+
1583
1716
  // src/components/SortableTable/SortableTable.tsx
1584
1717
  var import_react4 = require("react");
1585
- var import_fractal_icons10 = require("@mirror-physics/fractal-icons");
1586
- var import_jsx_runtime21 = require("react/jsx-runtime");
1718
+ var import_fractal_icons11 = require("@mirror-physics/fractal-icons");
1719
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1587
1720
  function SortableTable({
1588
1721
  columns,
1589
1722
  data,
@@ -1678,16 +1811,16 @@ function SortableTable({
1678
1811
  onSortChange?.(nextKey, nextDirection);
1679
1812
  }
1680
1813
  };
1681
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("fractal-sortable-table", `fractal-sortable-table--${size}`, embedded && "fractal-sortable-table--embedded", className), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "fractal-sortable-table-surface", children: [
1682
- header && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fractal-sortable-table-header", children: header }),
1683
- visibleRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fractal-sortable-table-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("table", { "aria-label": ariaLabel, className: "fractal-sortable-table-table", children: [
1684
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("tr", { className: "fractal-sortable-table-thead-row", children: [
1685
- selection && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("fractal-sortable-table", `fractal-sortable-table--${size}`, embedded && "fractal-sortable-table--embedded", className), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "fractal-sortable-table-surface", children: [
1815
+ header && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "fractal-sortable-table-header", children: header }),
1816
+ visibleRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "fractal-sortable-table-empty", children: emptyMessage || "No data" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("table", { "aria-label": ariaLabel, className: "fractal-sortable-table-table", children: [
1817
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("tr", { className: "fractal-sortable-table-thead-row", children: [
1818
+ selection && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1686
1819
  "th",
1687
1820
  {
1688
1821
  className: "fractal-sortable-table-th fractal-sortable-table-selection-cell",
1689
1822
  scope: "col",
1690
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1823
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1691
1824
  Checkbox,
1692
1825
  {
1693
1826
  "aria-label": selection.selectAllLabel ?? "Select all rows",
@@ -1713,7 +1846,7 @@ function SortableTable({
1713
1846
  columns.map((col) => {
1714
1847
  const isActive = activeKey === col.key && activeDirection !== null;
1715
1848
  if (!col.sortable) {
1716
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1717
1850
  "th",
1718
1851
  {
1719
1852
  className: "fractal-sortable-table-th",
@@ -1724,13 +1857,13 @@ function SortableTable({
1724
1857
  col.key
1725
1858
  );
1726
1859
  }
1727
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1860
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1728
1861
  "th",
1729
1862
  {
1730
1863
  className: "fractal-sortable-table-th fractal-sortable-table-th--sortable",
1731
1864
  scope: "col",
1732
1865
  style: { width: col.width },
1733
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1866
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1734
1867
  "button",
1735
1868
  {
1736
1869
  type: "button",
@@ -1741,8 +1874,8 @@ function SortableTable({
1741
1874
  onClick: () => handleSortClick(col.key),
1742
1875
  "aria-sort": isActive ? activeDirection === "asc" ? "ascending" : "descending" : "none",
1743
1876
  children: [
1744
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: col.header }),
1745
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fractal-sortable-table-sort-icon", "aria-hidden": "true", children: isActive && activeDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.ArrowUp, { size: 14 }) : isActive && activeDirection === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.ArrowDown, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_fractal_icons10.ArrowsUpDown, { size: 14 }) })
1877
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: col.header }),
1878
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fractal-sortable-table-sort-icon", "aria-hidden": "true", children: isActive && activeDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_fractal_icons11.ArrowUp, { size: 14 }) : isActive && activeDirection === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_fractal_icons11.ArrowDown, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_fractal_icons11.ArrowsUpDown, { size: 14 }) })
1746
1879
  ]
1747
1880
  }
1748
1881
  )
@@ -1751,7 +1884,7 @@ function SortableTable({
1751
1884
  );
1752
1885
  })
1753
1886
  ] }) }),
1754
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { children: visibleRows.map((row, rowIndex) => {
1887
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tbody", { children: visibleRows.map((row, rowIndex) => {
1755
1888
  const highlighted = highlightRow?.(row, rowIndex) ?? false;
1756
1889
  const disabled = isRowDisabled?.(row) ?? false;
1757
1890
  const selectionDisabled = disabled || (isRowSelectionDisabled?.(row) ?? false);
@@ -1760,7 +1893,7 @@ function SortableTable({
1760
1893
  label: rowAction.label(row, rowIndex),
1761
1894
  icon: rowAction.icon(row, rowIndex)
1762
1895
  } : null;
1763
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1764
1897
  "tr",
1765
1898
  {
1766
1899
  className: cn(
@@ -1784,7 +1917,7 @@ function SortableTable({
1784
1917
  role: interactive ? "button" : void 0,
1785
1918
  tabIndex: interactive ? 0 : void 0,
1786
1919
  children: [
1787
- selection && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fractal-sortable-table-td fractal-sortable-table-selection-cell", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1920
+ selection && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "fractal-sortable-table-td fractal-sortable-table-selection-cell", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1788
1921
  Checkbox,
1789
1922
  {
1790
1923
  "aria-label": selection.getRowLabel(row),
@@ -1796,7 +1929,7 @@ function SortableTable({
1796
1929
  }
1797
1930
  }
1798
1931
  ) }),
1799
- columns.map((col, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1932
+ columns.map((col, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1800
1933
  "td",
1801
1934
  {
1802
1935
  className: cn(
@@ -1806,7 +1939,7 @@ function SortableTable({
1806
1939
  style: { width: col.width, textAlign: col.align ?? "left" },
1807
1940
  children: [
1808
1941
  col.render(row, rowIndex),
1809
- action && columnIndex === columns.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fractal-sortable-table-row-action", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fractal-sortable-table-row-action__icon", children: action.icon }) })
1942
+ action && columnIndex === columns.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fractal-sortable-table-row-action", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fractal-sortable-table-row-action__icon", children: action.icon }) })
1810
1943
  ]
1811
1944
  },
1812
1945
  col.key
@@ -1822,7 +1955,7 @@ function SortableTable({
1822
1955
 
1823
1956
  // src/components/Tabs/Tabs.tsx
1824
1957
  var import_react5 = require("react");
1825
- var import_jsx_runtime22 = require("react/jsx-runtime");
1958
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1826
1959
  function Tabs({
1827
1960
  items,
1828
1961
  defaultValue,
@@ -1893,8 +2026,8 @@ function Tabs({
1893
2026
  selectTab(nextId2);
1894
2027
  requestAnimationFrame(() => tabRefs.current[nextId2]?.focus());
1895
2028
  };
1896
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("fractal-tabs", `fractal-tabs--${variant}`, divider && "fractal-tabs--divider", className), children: [
1897
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2029
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("fractal-tabs", `fractal-tabs--${variant}`, divider && "fractal-tabs--divider", className), children: [
2030
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1898
2031
  "div",
1899
2032
  {
1900
2033
  ref: tabListRef,
@@ -1907,7 +2040,7 @@ function Tabs({
1907
2040
  const isActive = item.id === activeId;
1908
2041
  const tabId = `${reactId}-tab-${item.id}`;
1909
2042
  const panelId = `${reactId}-panel-${item.id}`;
1910
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2043
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1911
2044
  "button",
1912
2045
  {
1913
2046
  ref: (el) => {
@@ -1938,7 +2071,7 @@ function Tabs({
1938
2071
  const tabId = `${reactId}-tab-${item.id}`;
1939
2072
  const panelId = `${reactId}-panel-${item.id}`;
1940
2073
  const isActive = item.id === activeId;
1941
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2074
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1942
2075
  "div",
1943
2076
  {
1944
2077
  id: panelId,
@@ -1955,14 +2088,14 @@ function Tabs({
1955
2088
  }
1956
2089
 
1957
2090
  // src/components/ContentSwitcher/ContentSwitcher.tsx
1958
- var React14 = __toESM(require("react"), 1);
1959
- var import_jsx_runtime23 = require("react/jsx-runtime");
2091
+ var React15 = __toESM(require("react"), 1);
2092
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1960
2093
  function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = false, className }) {
1961
- const switcherRef = React14.useRef(null);
1962
- const buttonRefs = React14.useRef([]);
1963
- const indicatorMotionReadyRef = React14.useRef(false);
2094
+ const switcherRef = React15.useRef(null);
2095
+ const buttonRefs = React15.useRef([]);
2096
+ const indicatorMotionReadyRef = React15.useRef(false);
1964
2097
  const activeIndex = items.findIndex((item) => item.value === value);
1965
- React14.useLayoutEffect(() => {
2098
+ React15.useLayoutEffect(() => {
1966
2099
  const switcher = switcherRef.current;
1967
2100
  const activeButton = buttonRefs.current[activeIndex];
1968
2101
  let motionFrame = 0;
@@ -2014,7 +2147,7 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
2014
2147
  onValueChange(items[nextIndex].value);
2015
2148
  }
2016
2149
  };
2017
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2150
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2018
2151
  "div",
2019
2152
  {
2020
2153
  className: cn("fractal-content-switcher", fullWidth && "fractal-content-switcher--full-width", className),
@@ -2022,10 +2155,10 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
2022
2155
  "aria-label": ariaLabel,
2023
2156
  ref: switcherRef,
2024
2157
  children: [
2025
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "fractal-content-switcher__indicator", "aria-hidden": true }),
2158
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "fractal-content-switcher__indicator", "aria-hidden": true }),
2026
2159
  items.map((item, index) => {
2027
2160
  const active = item.value === value;
2028
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2161
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2029
2162
  "button",
2030
2163
  {
2031
2164
  className: cn("fractal-content-switcher__item", active && "fractal-content-switcher__item--active"),
@@ -2058,8 +2191,8 @@ function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth = f
2058
2191
 
2059
2192
  // src/components/Disclosure/Disclosure.tsx
2060
2193
  var import_react6 = require("react");
2061
- var import_fractal_icons11 = require("@mirror-physics/fractal-icons");
2062
- var import_jsx_runtime24 = require("react/jsx-runtime");
2194
+ var import_fractal_icons12 = require("@mirror-physics/fractal-icons");
2195
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2063
2196
  function Disclosure({
2064
2197
  title,
2065
2198
  meta,
@@ -2087,7 +2220,7 @@ function Disclosure({
2087
2220
  onOpenChange?.(next);
2088
2221
  }
2089
2222
  };
2090
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2223
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2091
2224
  "div",
2092
2225
  {
2093
2226
  className: cn(
@@ -2098,7 +2231,7 @@ function Disclosure({
2098
2231
  className
2099
2232
  ),
2100
2233
  children: [
2101
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2234
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2102
2235
  "button",
2103
2236
  {
2104
2237
  type: "button",
@@ -2109,13 +2242,13 @@ function Disclosure({
2109
2242
  disabled,
2110
2243
  onClick: toggle,
2111
2244
  children: [
2112
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "fractal-disclosure-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_fractal_icons11.ChevronDown, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_fractal_icons11.ChevronRight, { size: 16 }) }),
2113
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "fractal-disclosure-title", children: title }),
2114
- meta && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "fractal-disclosure-meta", children: meta })
2245
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fractal-disclosure-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_fractal_icons12.ChevronDown, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_fractal_icons12.ChevronRight, { size: 16 }) }),
2246
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fractal-disclosure-title", children: title }),
2247
+ meta && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fractal-disclosure-meta", children: meta })
2115
2248
  ]
2116
2249
  }
2117
2250
  ),
2118
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2251
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2119
2252
  "div",
2120
2253
  {
2121
2254
  id: panelId,
@@ -2123,7 +2256,7 @@ function Disclosure({
2123
2256
  "aria-labelledby": headerId,
2124
2257
  className: "fractal-disclosure-panel",
2125
2258
  hidden: !isOpen,
2126
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "fractal-disclosure-panel-inner", children })
2259
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fractal-disclosure-panel-inner", children })
2127
2260
  }
2128
2261
  )
2129
2262
  ]
@@ -2132,18 +2265,18 @@ function Disclosure({
2132
2265
  }
2133
2266
 
2134
2267
  // src/components/LatticeLoader/LatticeLoader.tsx
2135
- var import_jsx_runtime25 = require("react/jsx-runtime");
2268
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2136
2269
  var LATTICE_COUNT = 160;
2137
2270
  var WAVE_PERIOD = 80;
2138
2271
  function LatticeLoader({ className, label = "Loading", ...props }) {
2139
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2272
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2140
2273
  "span",
2141
2274
  {
2142
2275
  "aria-label": label,
2143
2276
  className: cn("fractal-lattice-loader", className),
2144
2277
  role: "progressbar",
2145
2278
  ...props,
2146
- children: Array.from({ length: LATTICE_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2279
+ children: Array.from({ length: LATTICE_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2147
2280
  "span",
2148
2281
  {
2149
2282
  "aria-hidden": "true",
@@ -2157,10 +2290,10 @@ function LatticeLoader({ className, label = "Loading", ...props }) {
2157
2290
  }
2158
2291
 
2159
2292
  // src/components/Ghost/Ghost.tsx
2160
- var import_jsx_runtime26 = require("react/jsx-runtime");
2293
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2161
2294
  var toCssLength = (value) => typeof value === "number" ? `${value}px` : value;
2162
2295
  function Ghost({ className, width, height, radius, style, ...props }) {
2163
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2296
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2164
2297
  "div",
2165
2298
  {
2166
2299
  "aria-hidden": "true",
@@ -2176,15 +2309,15 @@ function Ghost({ className, width, height, radius, style, ...props }) {
2176
2309
  );
2177
2310
  }
2178
2311
  function GhostLine({ className, size = "md", width = "100%", ...props }) {
2179
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: cn("fractal-ghost-line", `fractal-ghost-line--${size}`, className), width, ...props });
2312
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: cn("fractal-ghost-line", `fractal-ghost-line--${size}`, className), width, ...props });
2180
2313
  }
2181
2314
  function ButtonGhost({ className, size = "md", iconOnly = false, width, ...props }) {
2182
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: cn("fractal-ghost-button", `fractal-ghost-button--${size}`, iconOnly && "fractal-ghost-button--icon-only", className), width, ...props });
2315
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: cn("fractal-ghost-button", `fractal-ghost-button--${size}`, iconOnly && "fractal-ghost-button--icon-only", className), width, ...props });
2183
2316
  }
2184
2317
  function CardGhost({ className, lines = 3, showHeader = true, ...props }) {
2185
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-card", className), ...props, children: [
2186
- showHeader && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "38%" }),
2187
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: index === lines - 1 ? "62%" : "100%" }, index)) })
2318
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-card", className), ...props, children: [
2319
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "38%" }),
2320
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: index === lines - 1 ? "62%" : "100%" }, index)) })
2188
2321
  ] });
2189
2322
  }
2190
2323
  function DataTableGhost({
@@ -2198,81 +2331,81 @@ function DataTableGhost({
2198
2331
  ...props
2199
2332
  }) {
2200
2333
  const cells = Array.from({ length: columns }, (_, index) => index);
2201
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-busy": "true", "aria-label": "Loading table", className: cn("fractal-ghost-table", `fractal-ghost-table--${size}`, className), role: "status", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("table", { className: "fractal-ghost-table__table", children: [
2202
- (showHeader || headers) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("tr", { className: "fractal-ghost-table__head-row", children: cells.map((index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("th", { style: { width: columnWidths?.[index] }, children: headers?.[index] ?? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { size: "sm", width: index === columns - 1 ? "62%" : "76%" }) }, index)) }) }),
2203
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("tbody", { children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("tr", { className: "fractal-ghost-table__row", children: cells.map((columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("td", { style: { width: columnWidths?.[columnIndex] }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: `${[72, 54, 82, 63, 46][(rowIndex + columnIndex) % 5]}%` }) }, columnIndex)) }, rowIndex)) })
2334
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-busy": "true", "aria-label": "Loading table", className: cn("fractal-ghost-table", `fractal-ghost-table--${size}`, className), role: "status", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("table", { className: "fractal-ghost-table__table", children: [
2335
+ (showHeader || headers) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tr", { className: "fractal-ghost-table__head-row", children: cells.map((index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("th", { style: { width: columnWidths?.[index] }, children: headers?.[index] ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { size: "sm", width: index === columns - 1 ? "62%" : "76%" }) }, index)) }) }),
2336
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tbody", { children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tr", { className: "fractal-ghost-table__row", children: cells.map((columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("td", { style: { width: columnWidths?.[columnIndex] }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: `${[72, 54, 82, 63, 46][(rowIndex + columnIndex) % 5]}%` }) }, columnIndex)) }, rowIndex)) })
2204
2337
  ] }) });
2205
2338
  }
2206
2339
  function InputGhost({ className, labelWidth = "26%", ...props }) {
2207
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FormFieldGhost, { className, labelWidth, ...props });
2340
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FormFieldGhost, { className, labelWidth, ...props });
2208
2341
  }
2209
2342
  function TextareaGhost({ className, labelWidth = "26%", ...props }) {
2210
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FormFieldGhost, { className, labelWidth, multiline: true, ...props });
2343
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FormFieldGhost, { className, labelWidth, multiline: true, ...props });
2211
2344
  }
2212
2345
  function LabelGhost({ className, width = "26%", ...props }) {
2213
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { className: cn("fractal-ghost-label", className), size: "sm", width, ...props });
2346
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { className: cn("fractal-ghost-label", className), size: "sm", width, ...props });
2214
2347
  }
2215
2348
  function FormFieldGhost({ className, labelWidth = "26%", multiline = false, ...props }) {
2216
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-field", className), ...props, children: [
2217
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LabelGhost, { width: labelWidth }),
2218
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: cn("fractal-ghost-field__control", multiline && "fractal-ghost-field__control--multiline") })
2349
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-field", className), ...props, children: [
2350
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LabelGhost, { width: labelWidth }),
2351
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: cn("fractal-ghost-field__control", multiline && "fractal-ghost-field__control--multiline") })
2219
2352
  ] });
2220
2353
  }
2221
2354
  function AlertGhost({ className, ...props }) {
2222
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-alert", className), ...props, children: [
2223
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "30%" }),
2224
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { size: "sm", width: "78%" })
2355
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-alert", className), ...props, children: [
2356
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "30%" }),
2357
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { size: "sm", width: "78%" })
2225
2358
  ] });
2226
2359
  }
2227
2360
  function CheckboxGhost({ className, ...props }) {
2228
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-choice", className), ...props, children: [
2229
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-choice__control" }),
2230
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "42%" })
2361
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-choice", className), ...props, children: [
2362
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-choice__control" }),
2363
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "42%" })
2231
2364
  ] });
2232
2365
  }
2233
2366
  var ToggleGhost = CheckboxGhost;
2234
2367
  function ChipGhost({ className, width = 74, ...props }) {
2235
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: cn("fractal-ghost-chip", className), height: 24, width, ...props });
2368
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: cn("fractal-ghost-chip", className), height: 24, width, ...props });
2236
2369
  }
2237
2370
  function LinkGhost({ className, width = 96, ...props }) {
2238
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { className: cn("fractal-ghost-link", className), size: "sm", width, ...props });
2371
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { className: cn("fractal-ghost-link", className), size: "sm", width, ...props });
2239
2372
  }
2240
2373
  var TextButtonGhost = LinkGhost;
2241
2374
  function DropdownGhost({ className, ...props }) {
2242
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-dropdown", className), ...props, children: [
2243
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "38%" }),
2244
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-dropdown__chevron" })
2375
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-dropdown", className), ...props, children: [
2376
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "38%" }),
2377
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-dropdown__chevron" })
2245
2378
  ] });
2246
2379
  }
2247
2380
  function ContentSwitcherGhost({ className, options = 3, ...props }) {
2248
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-hidden": "true", className: cn("fractal-ghost-switcher", className), ...props, children: Array.from({ length: options }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, {}, index)) });
2381
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": "true", className: cn("fractal-ghost-switcher", className), ...props, children: Array.from({ length: options }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, {}, index)) });
2249
2382
  }
2250
2383
  var TabsGhost = ContentSwitcherGhost;
2251
2384
  function DisclosureGhost({ className, ...props }) {
2252
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-disclosure", className), ...props, children: [
2253
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-disclosure__icon" }),
2254
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "42%" })
2385
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-disclosure", className), ...props, children: [
2386
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-disclosure__icon" }),
2387
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "42%" })
2255
2388
  ] });
2256
2389
  }
2257
2390
  function PaginationGhost({ className, pages = 5, ...props }) {
2258
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-hidden": "true", className: cn("fractal-ghost-pagination", className), ...props, children: Array.from({ length: pages }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, {}, index)) });
2391
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": "true", className: cn("fractal-ghost-pagination", className), ...props, children: Array.from({ length: pages }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, {}, index)) });
2259
2392
  }
2260
2393
  function FileDropzoneGhost({ className, ...props }) {
2261
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-dropzone", className), ...props, children: [
2262
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-dropzone__icon" }),
2263
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "26%" }),
2264
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { size: "sm", width: "46%" })
2394
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-dropzone", className), ...props, children: [
2395
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-dropzone__icon" }),
2396
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "26%" }),
2397
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { size: "sm", width: "46%" })
2265
2398
  ] });
2266
2399
  }
2267
2400
  function PromptCardGhost({ className, ...props }) {
2268
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CardGhost, { className: cn("fractal-ghost-prompt-card", className), lines: 4, ...props });
2401
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CardGhost, { className: cn("fractal-ghost-prompt-card", className), lines: 4, ...props });
2269
2402
  }
2270
2403
  function ConversationGhost({
2271
2404
  className,
2272
2405
  "aria-label": ariaLabel = "Loading conversation",
2273
2406
  ...props
2274
2407
  }) {
2275
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2408
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2276
2409
  "div",
2277
2410
  {
2278
2411
  "aria-busy": "true",
@@ -2281,54 +2414,54 @@ function ConversationGhost({
2281
2414
  role: "status",
2282
2415
  ...props,
2283
2416
  children: [
2284
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--user", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "fractal-ghost-conversation__bubble", children: [
2285
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "100%" }),
2286
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "86%" }),
2287
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "64%" })
2417
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--user", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fractal-ghost-conversation__bubble", children: [
2418
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "100%" }),
2419
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "86%" }),
2420
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "64%" })
2288
2421
  ] }) }),
2289
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--assistant", children: [
2290
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "92%" }),
2291
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "78%" }),
2292
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "58%" })
2422
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: "fractal-ghost-conversation__message fractal-ghost-conversation__message--assistant", children: [
2423
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "92%" }),
2424
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "78%" }),
2425
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "58%" })
2293
2426
  ] })
2294
2427
  ]
2295
2428
  }
2296
2429
  );
2297
2430
  }
2298
2431
  function SortableTableGhost(props) {
2299
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DataTableGhost, { ...props });
2432
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DataTableGhost, { ...props });
2300
2433
  }
2301
2434
  function SidebarGhost({ className, items = 6, ...props }) {
2302
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("aside", { "aria-hidden": "true", className: cn("fractal-ghost-sidebar", className), ...props, children: [
2303
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-sidebar__brand" }),
2304
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fractal-ghost-sidebar__items", children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "fractal-ghost-sidebar__item", children: [
2305
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, {}),
2306
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: `${[54, 68, 44, 61][index % 4]}%` })
2435
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("aside", { "aria-hidden": "true", className: cn("fractal-ghost-sidebar", className), ...props, children: [
2436
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-sidebar__brand" }),
2437
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-ghost-sidebar__items", children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fractal-ghost-sidebar__item", children: [
2438
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, {}),
2439
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: `${[54, 68, 44, 61][index % 4]}%` })
2307
2440
  ] }, index)) })
2308
2441
  ] });
2309
2442
  }
2310
2443
  function ModalGhost({ className, title, lines = 3, ...props }) {
2311
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SurfaceGhost, { className: cn("fractal-ghost-modal", className), title, lines, ...props });
2444
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SurfaceGhost, { className: cn("fractal-ghost-modal", className), title, lines, ...props });
2312
2445
  }
2313
2446
  function SidePanelGhost({ className, title, lines = 5, ...props }) {
2314
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SurfaceGhost, { className: cn("fractal-ghost-side-panel", className), title, lines, ...props });
2447
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SurfaceGhost, { className: cn("fractal-ghost-side-panel", className), title, lines, ...props });
2315
2448
  }
2316
2449
  function SurfaceGhost({ className, title, lines = 3, ...props }) {
2317
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-surface", className), ...props, children: [
2318
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "fractal-ghost-surface__header", children: [
2319
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: "42%" }),
2320
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Ghost, { className: "fractal-ghost-surface__close" })
2450
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: cn("fractal-ghost-surface", className), ...props, children: [
2451
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fractal-ghost-surface__header", children: [
2452
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: "42%" }),
2453
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Ghost, { className: "fractal-ghost-surface__close" })
2321
2454
  ] }),
2322
- title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fractal-ghost-surface__title", children: title }),
2323
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GhostLine, { width: index === lines - 1 ? "64%" : "100%" }, index)) })
2455
+ title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-ghost-surface__title", children: title }),
2456
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-ghost-stack", children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GhostLine, { width: index === lines - 1 ? "64%" : "100%" }, index)) })
2324
2457
  ] });
2325
2458
  }
2326
2459
 
2327
2460
  // src/components/Sidebar/Sidebar.tsx
2328
- var React15 = __toESM(require("react"), 1);
2329
- var import_jsx_runtime27 = require("react/jsx-runtime");
2330
- var Sidebar = React15.forwardRef(
2331
- ({ className, width, compact = false, style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2461
+ var React16 = __toESM(require("react"), 1);
2462
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2463
+ var Sidebar = React16.forwardRef(
2464
+ ({ className, width, compact = false, style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2332
2465
  "aside",
2333
2466
  {
2334
2467
  ref,
@@ -2340,12 +2473,12 @@ var Sidebar = React15.forwardRef(
2340
2473
  )
2341
2474
  );
2342
2475
  Sidebar.displayName = "Sidebar";
2343
- var SidebarHeader = React15.forwardRef(
2344
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: cn("fractal-sidebar__header", className), ...props })
2476
+ var SidebarHeader = React16.forwardRef(
2477
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: cn("fractal-sidebar__header", className), ...props })
2345
2478
  );
2346
2479
  SidebarHeader.displayName = "SidebarHeader";
2347
- var SidebarBrand = React15.forwardRef(
2348
- ({ className, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { ref, type, className: cn("fractal-sidebar__brand", className), ...props })
2480
+ var SidebarBrand = React16.forwardRef(
2481
+ ({ className, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { ref, type, className: cn("fractal-sidebar__brand", className), ...props })
2349
2482
  );
2350
2483
  SidebarBrand.displayName = "SidebarBrand";
2351
2484
  function SidebarAccountMenu({
@@ -2356,7 +2489,7 @@ function SidebarAccountMenu({
2356
2489
  icon,
2357
2490
  className
2358
2491
  }) {
2359
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2492
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2360
2493
  Dropdown,
2361
2494
  {
2362
2495
  align: "left",
@@ -2366,25 +2499,25 @@ function SidebarAccountMenu({
2366
2499
  panelClassName: "fractal-sidebar__account-panel",
2367
2500
  selectedValue: "",
2368
2501
  triggerClassName: "fractal-sidebar__account-trigger",
2369
- triggerContent: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2370
- icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fractal-sidebar__account-icon", "aria-hidden": "true", children: icon }),
2371
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fractal-sidebar__account-name", children: name })
2502
+ triggerContent: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
2503
+ icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fractal-sidebar__account-icon", "aria-hidden": "true", children: icon }),
2504
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fractal-sidebar__account-name", children: name })
2372
2505
  ] }),
2373
2506
  triggerLabel,
2374
2507
  triggerVariant: "tertiary"
2375
2508
  }
2376
2509
  );
2377
2510
  }
2378
- var SidebarNav = React15.forwardRef(
2379
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("nav", { ref, className: cn("fractal-sidebar__nav", className), ...props })
2511
+ var SidebarNav = React16.forwardRef(
2512
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("nav", { ref, className: cn("fractal-sidebar__nav", className), ...props })
2380
2513
  );
2381
2514
  SidebarNav.displayName = "SidebarNav";
2382
- var SidebarSection = React15.forwardRef(
2383
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: cn("fractal-sidebar__section", className), ...props })
2515
+ var SidebarSection = React16.forwardRef(
2516
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: cn("fractal-sidebar__section", className), ...props })
2384
2517
  );
2385
2518
  SidebarSection.displayName = "SidebarSection";
2386
- var SidebarNavItem = React15.forwardRef(
2387
- ({ active = false, icon, endAdornment, className, type = "button", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2519
+ var SidebarNavItem = React16.forwardRef(
2520
+ ({ active = false, icon, endAdornment, className, type = "button", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2388
2521
  "button",
2389
2522
  {
2390
2523
  ref,
@@ -2394,28 +2527,28 @@ var SidebarNavItem = React15.forwardRef(
2394
2527
  "aria-current": active ? "page" : void 0,
2395
2528
  ...props,
2396
2529
  children: [
2397
- icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fractal-sidebar__nav-item-icon", "aria-hidden": "true", children: icon }),
2398
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fractal-sidebar__nav-item-label", children }),
2399
- endAdornment && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fractal-sidebar__nav-item-end", children: endAdornment })
2530
+ icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fractal-sidebar__nav-item-icon", "aria-hidden": "true", children: icon }),
2531
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fractal-sidebar__nav-item-label", children }),
2532
+ endAdornment && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fractal-sidebar__nav-item-end", children: endAdornment })
2400
2533
  ]
2401
2534
  }
2402
2535
  )
2403
2536
  );
2404
2537
  SidebarNavItem.displayName = "SidebarNavItem";
2405
- var SidebarFooter = React15.forwardRef(
2406
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: cn("fractal-sidebar__footer", className), ...props })
2538
+ var SidebarFooter = React16.forwardRef(
2539
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: cn("fractal-sidebar__footer", className), ...props })
2407
2540
  );
2408
2541
  SidebarFooter.displayName = "SidebarFooter";
2409
2542
 
2410
2543
  // src/components/SidePanel/SidePanel.tsx
2411
- var import_react_dom2 = require("react-dom");
2412
- var import_fractal_icons12 = require("@mirror-physics/fractal-icons");
2413
- var import_jsx_runtime28 = require("react/jsx-runtime");
2544
+ var import_react_dom3 = require("react-dom");
2545
+ var import_fractal_icons13 = require("@mirror-physics/fractal-icons");
2546
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2414
2547
  function SidePanel({ open, onClose, title, description, children, footer, size = "md", loading = false, loadingLabel = "Loading", className }) {
2415
2548
  useEscapeDismiss(80, onClose, open);
2416
2549
  if (!open) return null;
2417
- return (0, import_react_dom2.createPortal)(
2418
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-side-panel-overlay", onMouseDown: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2550
+ return (0, import_react_dom3.createPortal)(
2551
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "fractal-side-panel-overlay", onMouseDown: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2419
2552
  "aside",
2420
2553
  {
2421
2554
  className: cn("fractal-side-panel", `fractal-side-panel--${size}`, className),
@@ -2424,15 +2557,15 @@ function SidePanel({ open, onClose, title, description, children, footer, size =
2424
2557
  role: "dialog",
2425
2558
  onMouseDown: (event) => event.stopPropagation(),
2426
2559
  children: [
2427
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { className: "fractal-side-panel__header", children: [
2428
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fractal-side-panel__heading", children: [
2429
- typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "fractal-side-panel__title", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "fractal-side-panel__title", children: title }),
2430
- description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "fractal-side-panel__description", children: description })
2560
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("header", { className: "fractal-side-panel__header", children: [
2561
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "fractal-side-panel__heading", children: [
2562
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { className: "fractal-side-panel__title", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "fractal-side-panel__title", children: title }),
2563
+ description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "fractal-side-panel__description", children: description })
2431
2564
  ] }),
2432
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { type: "button", className: "fractal-side-panel__close", "aria-label": "Close panel", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_fractal_icons12.Close, { size: 18 }) })
2565
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "fractal-side-panel__close", "aria-label": "Close panel", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_fractal_icons13.Close, { size: 18 }) })
2433
2566
  ] }),
2434
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-busy": loading || void 0, className: cn("fractal-side-panel__body", loading && "fractal-side-panel__body--loading"), children: loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(UILoader, { label: loadingLabel }) : children }),
2435
- footer && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("footer", { className: "fractal-side-panel__footer", children: footer })
2567
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { "aria-busy": loading || void 0, className: cn("fractal-side-panel__body", loading && "fractal-side-panel__body--loading"), children: loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(UILoader, { label: loadingLabel }) : children }),
2568
+ footer && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("footer", { className: "fractal-side-panel__footer", children: footer })
2436
2569
  ]
2437
2570
  }
2438
2571
  ) }),
@@ -2441,18 +2574,18 @@ function SidePanel({ open, onClose, title, description, children, footer, size =
2441
2574
  }
2442
2575
 
2443
2576
  // src/components/Textarea/Textarea.tsx
2444
- var React16 = __toESM(require("react"), 1);
2445
- var import_jsx_runtime29 = require("react/jsx-runtime");
2446
- var Textarea = React16.forwardRef(
2447
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("textarea", { ref, className: cn("fractal-textarea", className), ...props })
2577
+ var React17 = __toESM(require("react"), 1);
2578
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2579
+ var Textarea = React17.forwardRef(
2580
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("textarea", { ref, className: cn("fractal-textarea", className), ...props })
2448
2581
  );
2449
2582
  Textarea.displayName = "Textarea";
2450
2583
 
2451
2584
  // src/components/TextButton/TextButton.tsx
2452
- var React17 = __toESM(require("react"), 1);
2453
- var import_jsx_runtime30 = require("react/jsx-runtime");
2454
- var TextButton = React17.forwardRef(
2455
- ({ className, icon, iconPosition = "start", size = "md", tone = "primary", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2585
+ var React18 = __toESM(require("react"), 1);
2586
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2587
+ var TextButton = React18.forwardRef(
2588
+ ({ className, icon, iconPosition = "start", size = "md", tone = "primary", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2456
2589
  "button",
2457
2590
  {
2458
2591
  ref,
@@ -2460,9 +2593,9 @@ var TextButton = React17.forwardRef(
2460
2593
  type: "button",
2461
2594
  ...props,
2462
2595
  children: [
2463
- icon && iconPosition === "start" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon }),
2464
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children }),
2465
- icon && iconPosition === "end" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon })
2596
+ icon && iconPosition === "start" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon }),
2597
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children }),
2598
+ icon && iconPosition === "end" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "fractal-text-button__icon", "aria-hidden": "true", children: icon })
2466
2599
  ]
2467
2600
  }
2468
2601
  )
@@ -2470,9 +2603,9 @@ var TextButton = React17.forwardRef(
2470
2603
  TextButton.displayName = "TextButton";
2471
2604
 
2472
2605
  // src/components/FileDropzone/FileDropzone.tsx
2473
- var React18 = __toESM(require("react"), 1);
2474
- var import_fractal_icons13 = require("@mirror-physics/fractal-icons");
2475
- var import_jsx_runtime31 = require("react/jsx-runtime");
2606
+ var React19 = __toESM(require("react"), 1);
2607
+ var import_fractal_icons14 = require("@mirror-physics/fractal-icons");
2608
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2476
2609
  function FileDropzone({
2477
2610
  files,
2478
2611
  onFilesChange,
@@ -2483,17 +2616,17 @@ function FileDropzone({
2483
2616
  description = "Files stay attached to this record.",
2484
2617
  className
2485
2618
  }) {
2486
- const inputId = React18.useId();
2487
- const inputRef = React18.useRef(null);
2488
- const [isDragging, setIsDragging] = React18.useState(false);
2619
+ const inputId = React19.useId();
2620
+ const inputRef = React19.useRef(null);
2621
+ const [isDragging, setIsDragging] = React19.useState(false);
2489
2622
  const addFiles = (nextFiles) => {
2490
2623
  if (disabled) return;
2491
2624
  const additions = Array.from(nextFiles);
2492
2625
  if (additions.length === 0) return;
2493
2626
  onFilesChange(multiple ? [...files, ...additions] : additions.slice(0, 1));
2494
2627
  };
2495
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("fractal-file-dropzone", className), children: [
2496
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2628
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("fractal-file-dropzone", className), children: [
2629
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2497
2630
  "input",
2498
2631
  {
2499
2632
  ref: inputRef,
@@ -2509,7 +2642,7 @@ function FileDropzone({
2509
2642
  }
2510
2643
  }
2511
2644
  ),
2512
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2645
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2513
2646
  "button",
2514
2647
  {
2515
2648
  className: "fractal-file-dropzone__target",
@@ -2532,18 +2665,18 @@ function FileDropzone({
2532
2665
  addFiles(event.dataTransfer.files);
2533
2666
  },
2534
2667
  children: [
2535
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_fractal_icons13.FileArrowUp, { "aria-hidden": "true", size: 20 }),
2536
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "fractal-file-dropzone__copy", children: [
2537
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "fractal-file-dropzone__title", children: title }),
2538
- description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "fractal-file-dropzone__description", children: description })
2668
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fractal_icons14.FileArrowUp, { "aria-hidden": "true", size: 20 }),
2669
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "fractal-file-dropzone__copy", children: [
2670
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fractal-file-dropzone__title", children: title }),
2671
+ description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fractal-file-dropzone__description", children: description })
2539
2672
  ] })
2540
2673
  ]
2541
2674
  }
2542
2675
  ),
2543
- files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: "fractal-file-dropzone__files", "aria-label": "Attached files", children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("li", { className: "fractal-file-dropzone__file", children: [
2544
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "fractal-file-dropzone__file-name", children: file.name }),
2545
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "fractal-file-dropzone__file-meta", children: formatFileSize(file.size) }),
2546
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2676
+ files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "fractal-file-dropzone__files", "aria-label": "Attached files", children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("li", { className: "fractal-file-dropzone__file", children: [
2677
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fractal-file-dropzone__file-name", children: file.name }),
2678
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fractal-file-dropzone__file-meta", children: formatFileSize(file.size) }),
2679
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2547
2680
  "button",
2548
2681
  {
2549
2682
  className: "fractal-file-dropzone__remove",
@@ -2551,7 +2684,7 @@ function FileDropzone({
2551
2684
  "aria-label": `Remove ${file.name}`,
2552
2685
  disabled,
2553
2686
  onClick: () => onFilesChange(files.filter((_, fileIndex) => fileIndex !== index)),
2554
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_fractal_icons13.Close, { "aria-hidden": "true", size: 14 })
2687
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fractal_icons14.Close, { "aria-hidden": "true", size: 14 })
2555
2688
  }
2556
2689
  )
2557
2690
  ] }, `${file.name}-${file.size}-${index}`)) })
@@ -2564,8 +2697,8 @@ function formatFileSize(bytes) {
2564
2697
  }
2565
2698
 
2566
2699
  // src/components/Pagination/Pagination.tsx
2567
- var import_fractal_icons14 = require("@mirror-physics/fractal-icons");
2568
- var import_jsx_runtime32 = require("react/jsx-runtime");
2700
+ var import_fractal_icons15 = require("@mirror-physics/fractal-icons");
2701
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2569
2702
  function Pagination({
2570
2703
  page,
2571
2704
  pageSize,
@@ -2581,10 +2714,10 @@ function Pagination({
2581
2714
  const start = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
2582
2715
  const end = Math.min(currentPage * pageSize, totalItems);
2583
2716
  const canChangePageSize = pageSizeOptions != null && pageSizeOptions.length > 0 && onPageSizeChange != null;
2584
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("nav", { className: cn("fractal-pagination", className), "aria-label": ariaLabel, children: [
2585
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "fractal-pagination__summary", children: totalItems === 0 ? "No results" : `${start}-${end} of ${totalItems}` }),
2586
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "fractal-pagination__controls", children: [
2587
- canChangePageSize && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2717
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { className: cn("fractal-pagination", className), "aria-label": ariaLabel, children: [
2718
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "fractal-pagination__summary", children: totalItems === 0 ? "No results" : `${start}-${end} of ${totalItems}` }),
2719
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "fractal-pagination__controls", children: [
2720
+ canChangePageSize && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2588
2721
  Dropdown,
2589
2722
  {
2590
2723
  align: "right",
@@ -2601,7 +2734,7 @@ function Pagination({
2601
2734
  triggerVariant: "tertiary"
2602
2735
  }
2603
2736
  ),
2604
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2737
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2605
2738
  "button",
2606
2739
  {
2607
2740
  className: "fractal-pagination__button",
@@ -2610,15 +2743,15 @@ function Pagination({
2610
2743
  title: "Previous page",
2611
2744
  disabled: currentPage === 1 || totalItems === 0,
2612
2745
  onClick: () => onPageChange(currentPage - 1),
2613
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fractal_icons14.ArrowLeft, { "aria-hidden": "true", size: 16 })
2746
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_fractal_icons15.ArrowLeft, { "aria-hidden": "true", size: 16 })
2614
2747
  }
2615
2748
  ),
2616
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "fractal-pagination__page", "aria-current": "page", children: [
2749
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "fractal-pagination__page", "aria-current": "page", children: [
2617
2750
  currentPage,
2618
2751
  " of ",
2619
2752
  totalPages
2620
2753
  ] }),
2621
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2754
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2622
2755
  "button",
2623
2756
  {
2624
2757
  className: "fractal-pagination__button",
@@ -2627,7 +2760,7 @@ function Pagination({
2627
2760
  title: "Next page",
2628
2761
  disabled: currentPage === totalPages || totalItems === 0,
2629
2762
  onClick: () => onPageChange(currentPage + 1),
2630
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fractal_icons14.ArrowRight, { "aria-hidden": "true", size: 16 })
2763
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_fractal_icons15.ArrowRight, { "aria-hidden": "true", size: 16 })
2631
2764
  }
2632
2765
  )
2633
2766
  ] })
@@ -2685,6 +2818,7 @@ function Pagination({
2685
2818
  PromptCard,
2686
2819
  PromptCardGhost,
2687
2820
  PromptGrid,
2821
+ Radio,
2688
2822
  SidePanel,
2689
2823
  SidePanelGhost,
2690
2824
  Sidebar,
@@ -2706,6 +2840,8 @@ function Pagination({
2706
2840
  TextButtonGhost,
2707
2841
  Textarea,
2708
2842
  TextareaGhost,
2843
+ Toast,
2844
+ ToastViewport,
2709
2845
  Toggle,
2710
2846
  ToggleGhost,
2711
2847
  UILoader,