@ai-matrx/design-system 0.86.350 → 0.86.351
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/CHANGELOG.md +5 -0
- package/dist/carousel.js +2 -2
- package/dist/{chunk-BCGNEWZM.js → chunk-FLWSEDUW.js} +2 -2
- package/dist/{chunk-UTADJKVR.js → chunk-GMNROZQJ.js} +3 -3
- package/dist/{chunk-UTADJKVR.js.map → chunk-GMNROZQJ.js.map} +1 -1
- package/dist/{chunk-SC3XPADZ.js → chunk-UGQRAQTE.js} +431 -342
- package/dist/chunk-UGQRAQTE.js.map +1 -0
- package/dist/controls.cjs +547 -458
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.css +27 -18
- package/dist/controls.d.cts +51 -3
- package/dist/controls.d.ts +51 -3
- package/dist/controls.js +10 -2
- package/dist/data-table/index.cjs +45 -38
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +44 -37
- package/dist/data-table/index.js.map +1 -1
- package/dist/desktop.cjs +90 -29
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.css +19 -0
- package/dist/desktop.d.cts +1 -1
- package/dist/desktop.d.ts +1 -1
- package/dist/desktop.js +90 -29
- package/dist/desktop.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/settings.cjs +2 -2
- package/dist/settings.cjs.map +1 -1
- package/dist/settings.js +1 -1
- package/dist/writing-field.cjs +2 -2
- package/dist/writing-field.cjs.map +1 -1
- package/dist/writing-field.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-SC3XPADZ.js.map +0 -1
- /package/dist/{chunk-BCGNEWZM.js.map → chunk-FLWSEDUW.js.map} +0 -0
|
@@ -1047,9 +1047,94 @@ function StageSteps({ steps, current, labels = "all", maxVisible, className, ...
|
|
|
1047
1047
|
}) });
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
|
+
// src/controls/checklist.tsx
|
|
1051
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1052
|
+
var STATE_WORD = {
|
|
1053
|
+
done: "Met",
|
|
1054
|
+
open: "Missing",
|
|
1055
|
+
unknown: "Not measured"
|
|
1056
|
+
};
|
|
1057
|
+
function ChecklistMark({ state, className }) {
|
|
1058
|
+
return /* @__PURE__ */ jsx6(
|
|
1059
|
+
"span",
|
|
1060
|
+
{
|
|
1061
|
+
"data-matrx-checklist-mark": "",
|
|
1062
|
+
"data-state": state,
|
|
1063
|
+
role: "img",
|
|
1064
|
+
"aria-label": STATE_WORD[state],
|
|
1065
|
+
className: cn(
|
|
1066
|
+
"grid size-4 shrink-0 place-items-center rounded-full",
|
|
1067
|
+
state === "done" && "bg-success text-success-foreground",
|
|
1068
|
+
state === "open" && "border-2 border-warning",
|
|
1069
|
+
state === "unknown" && "border-2 border-dashed border-muted-foreground",
|
|
1070
|
+
className
|
|
1071
|
+
),
|
|
1072
|
+
children: state === "done" ? /* @__PURE__ */ jsx6(CheckIcon, { className: "size-3", strokeWidth: 3 }) : null
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
}
|
|
1076
|
+
function Checklist({ className, children, ...props }) {
|
|
1077
|
+
return /* @__PURE__ */ jsx6("ul", { "data-matrx-checklist": "", className: cn("grid min-w-0", className), ...props, children });
|
|
1078
|
+
}
|
|
1079
|
+
function ChecklistItem({ state, title, line, end, className, ...props }) {
|
|
1080
|
+
return /* @__PURE__ */ jsxs5(
|
|
1081
|
+
"li",
|
|
1082
|
+
{
|
|
1083
|
+
"data-matrx-checklist-item": "",
|
|
1084
|
+
"data-state": state,
|
|
1085
|
+
className: cn(
|
|
1086
|
+
"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-start gap-x-2 py-1.5 sm:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1087
|
+
className
|
|
1088
|
+
),
|
|
1089
|
+
...props,
|
|
1090
|
+
children: [
|
|
1091
|
+
/* @__PURE__ */ jsx6(ChecklistMark, { state, className: "mt-0.5" }),
|
|
1092
|
+
/* @__PURE__ */ jsxs5("div", { className: "min-w-0", children: [
|
|
1093
|
+
/* @__PURE__ */ jsx6("div", { className: "type-title truncate text-foreground", children: title }),
|
|
1094
|
+
line ? /* @__PURE__ */ jsx6("div", { className: "type-secondary truncate text-muted-foreground", title: line, children: line }) : null
|
|
1095
|
+
] }),
|
|
1096
|
+
end ? /* @__PURE__ */ jsx6("div", { className: "col-start-2 mt-1.5 flex justify-start sm:col-start-3 sm:row-start-1 sm:mt-0 sm:justify-end sm:self-center", children: end }) : null
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
function ChecklistMeter({ label, met, total, end, className }) {
|
|
1102
|
+
const done = Math.max(0, Math.min(total, met));
|
|
1103
|
+
return /* @__PURE__ */ jsxs5("div", { "data-matrx-checklist-meter": "", className: cn("grid min-w-0 gap-1.5", className), children: [
|
|
1104
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1105
|
+
/* @__PURE__ */ jsx6("span", { className: "type-title min-w-0 truncate text-foreground", children: label }),
|
|
1106
|
+
/* @__PURE__ */ jsxs5("span", { className: "type-meta shrink-0 tabular-nums text-muted-foreground", children: [
|
|
1107
|
+
done,
|
|
1108
|
+
" of ",
|
|
1109
|
+
total
|
|
1110
|
+
] }),
|
|
1111
|
+
end ? /* @__PURE__ */ jsx6("span", { className: "ml-auto flex shrink-0 items-center", children: end }) : null
|
|
1112
|
+
] }),
|
|
1113
|
+
/* @__PURE__ */ jsx6(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
role: "meter",
|
|
1117
|
+
"aria-valuemin": 0,
|
|
1118
|
+
"aria-valuemax": total,
|
|
1119
|
+
"aria-valuenow": done,
|
|
1120
|
+
"aria-label": `${done} of ${total} met`,
|
|
1121
|
+
className: "flex gap-1",
|
|
1122
|
+
children: Array.from({ length: total }, (_, i) => /* @__PURE__ */ jsx6(
|
|
1123
|
+
"span",
|
|
1124
|
+
{
|
|
1125
|
+
"data-filled": i < done ? "" : void 0,
|
|
1126
|
+
className: cn("h-1.5 flex-1 rounded-full", i < done ? "bg-success" : "bg-border")
|
|
1127
|
+
},
|
|
1128
|
+
i
|
|
1129
|
+
))
|
|
1130
|
+
}
|
|
1131
|
+
)
|
|
1132
|
+
] });
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1050
1135
|
// src/controls/clamped-number-input.tsx
|
|
1051
1136
|
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
1052
|
-
import { jsx as
|
|
1137
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1053
1138
|
function shownDraft(raw, min, max, decimal = false) {
|
|
1054
1139
|
const next = clampDraft(raw, min, max, decimal);
|
|
1055
1140
|
if (next === null) return null;
|
|
@@ -1094,7 +1179,7 @@ function ClampedNumberInput({
|
|
|
1094
1179
|
setDraft(String(next));
|
|
1095
1180
|
if (next !== value) onChange(next);
|
|
1096
1181
|
};
|
|
1097
|
-
return /* @__PURE__ */
|
|
1182
|
+
return /* @__PURE__ */ jsx7(
|
|
1098
1183
|
Input,
|
|
1099
1184
|
{
|
|
1100
1185
|
id,
|
|
@@ -1127,7 +1212,7 @@ function ClampedNumberInput({
|
|
|
1127
1212
|
|
|
1128
1213
|
// src/controls/light-switch-toggle.tsx
|
|
1129
1214
|
import { useState as useState5, forwardRef as forwardRef3 } from "react";
|
|
1130
|
-
import { jsx as
|
|
1215
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1131
1216
|
var defaultSizes = {
|
|
1132
1217
|
width: "w-48",
|
|
1133
1218
|
height: "h-16"
|
|
@@ -1165,7 +1250,7 @@ var LightSwitchToggle = forwardRef3(
|
|
|
1165
1250
|
const buttonBaseClasses = "relative w-1/2 h-full transition-all duration-300";
|
|
1166
1251
|
const activeButtonClasses = "bg-primary transform -translate-y-px shadow-[inset_0_1px_3px_rgba(0,0,0,0.2)]";
|
|
1167
1252
|
const inactiveButtonClasses = "bg-muted/60 transform -translate-y-1.5";
|
|
1168
|
-
const renderOption = (isActive, label, side, onClick) => /* @__PURE__ */
|
|
1253
|
+
const renderOption = (isActive, label, side, onClick) => /* @__PURE__ */ jsxs6(
|
|
1169
1254
|
"button",
|
|
1170
1255
|
{
|
|
1171
1256
|
type: "button",
|
|
@@ -1177,7 +1262,7 @@ var LightSwitchToggle = forwardRef3(
|
|
|
1177
1262
|
isActive ? activeButtonClasses : inactiveButtonClasses
|
|
1178
1263
|
),
|
|
1179
1264
|
children: [
|
|
1180
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ jsx8(
|
|
1181
1266
|
"div",
|
|
1182
1267
|
{
|
|
1183
1268
|
className: cn(
|
|
@@ -1188,7 +1273,7 @@ var LightSwitchToggle = forwardRef3(
|
|
|
1188
1273
|
)
|
|
1189
1274
|
}
|
|
1190
1275
|
),
|
|
1191
|
-
/* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ jsx8(
|
|
1192
1277
|
"span",
|
|
1193
1278
|
{
|
|
1194
1279
|
className: cn(
|
|
@@ -1201,8 +1286,8 @@ var LightSwitchToggle = forwardRef3(
|
|
|
1201
1286
|
]
|
|
1202
1287
|
}
|
|
1203
1288
|
);
|
|
1204
|
-
return /* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ jsx8("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxs6("div", { ref, className: containerClasses, children: [
|
|
1290
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute left-1/2 top-0 bottom-0 w-[2px] bg-border transform -translate-x-1/2 z-10" }),
|
|
1206
1291
|
renderOption(!isOn, labels.off, "left", () => handleToggle(false)),
|
|
1207
1292
|
renderOption(isOn, labels.on, "right", () => handleToggle(true))
|
|
1208
1293
|
] }) });
|
|
@@ -1212,7 +1297,7 @@ LightSwitchToggle.displayName = "LightSwitchToggle";
|
|
|
1212
1297
|
|
|
1213
1298
|
// src/controls/option-combobox.tsx
|
|
1214
1299
|
import { useState as useState6 } from "react";
|
|
1215
|
-
import { jsx as
|
|
1300
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1216
1301
|
function OptionCombobox({
|
|
1217
1302
|
value,
|
|
1218
1303
|
onChange,
|
|
@@ -1246,7 +1331,7 @@ function OptionCombobox({
|
|
|
1246
1331
|
setOpen(false);
|
|
1247
1332
|
setQuery("");
|
|
1248
1333
|
};
|
|
1249
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsxs7(
|
|
1250
1335
|
Popover,
|
|
1251
1336
|
{
|
|
1252
1337
|
open,
|
|
@@ -1258,7 +1343,7 @@ function OptionCombobox({
|
|
|
1258
1343
|
}
|
|
1259
1344
|
},
|
|
1260
1345
|
children: [
|
|
1261
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ jsx9(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs7(
|
|
1262
1347
|
"button",
|
|
1263
1348
|
{
|
|
1264
1349
|
id,
|
|
@@ -1279,7 +1364,7 @@ function OptionCombobox({
|
|
|
1279
1364
|
),
|
|
1280
1365
|
children: [
|
|
1281
1366
|
hasValue && renderIcon?.(value),
|
|
1282
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsxs7(
|
|
1283
1368
|
"span",
|
|
1284
1369
|
{
|
|
1285
1370
|
className: cn(
|
|
@@ -1288,22 +1373,22 @@ function OptionCombobox({
|
|
|
1288
1373
|
),
|
|
1289
1374
|
children: [
|
|
1290
1375
|
hasValue ? getLabel(value) : placeholder,
|
|
1291
|
-
hint && /* @__PURE__ */
|
|
1376
|
+
hint && /* @__PURE__ */ jsx9("span", { className: "ml-1.5 text-muted-foreground", children: hint })
|
|
1292
1377
|
]
|
|
1293
1378
|
}
|
|
1294
1379
|
),
|
|
1295
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ jsx9(SelectChevron, { size: "sm", className: variant === "inline" ? "h-3 w-3" : void 0 })
|
|
1296
1381
|
]
|
|
1297
1382
|
}
|
|
1298
1383
|
) }),
|
|
1299
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ jsx9(
|
|
1300
1385
|
PopoverContent,
|
|
1301
1386
|
{
|
|
1302
1387
|
sizing: "content",
|
|
1303
1388
|
align: "start",
|
|
1304
1389
|
className: "p-0",
|
|
1305
|
-
children: /* @__PURE__ */
|
|
1306
|
-
searchable && /* @__PURE__ */
|
|
1390
|
+
children: /* @__PURE__ */ jsxs7(Command, { shouldFilter: false, children: [
|
|
1391
|
+
searchable && /* @__PURE__ */ jsx9(
|
|
1307
1392
|
CommandInput,
|
|
1308
1393
|
{
|
|
1309
1394
|
placeholder: searchPlaceholder,
|
|
@@ -1311,8 +1396,8 @@ function OptionCombobox({
|
|
|
1311
1396
|
onValueChange: setQuery
|
|
1312
1397
|
}
|
|
1313
1398
|
),
|
|
1314
|
-
/* @__PURE__ */
|
|
1315
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ jsxs7(CommandList, { className: "max-h-72", children: [
|
|
1400
|
+
/* @__PURE__ */ jsxs7(CommandEmpty, { children: [
|
|
1316
1401
|
"No match for \u201C",
|
|
1317
1402
|
query,
|
|
1318
1403
|
"\u201D."
|
|
@@ -1322,24 +1407,24 @@ function OptionCombobox({
|
|
|
1322
1407
|
if (visible.length === 0) return null;
|
|
1323
1408
|
const folded = group.collapsed && !showMore && !q && !group.options.includes(value);
|
|
1324
1409
|
if (folded) {
|
|
1325
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsx9(CommandGroup, { children: /* @__PURE__ */ jsxs7(
|
|
1326
1411
|
CommandItem,
|
|
1327
1412
|
{
|
|
1328
1413
|
value: `__more_${gi}`,
|
|
1329
1414
|
onSelect: () => setShowMore(true),
|
|
1330
1415
|
className: "text-muted-foreground",
|
|
1331
1416
|
children: [
|
|
1332
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ jsx9(ChevronRightIcon, { className: "h-3.5 w-3.5" }),
|
|
1333
1418
|
group.heading ?? "More",
|
|
1334
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ jsx9("span", { className: "ml-auto type-secondary tabular-nums", children: group.options.length })
|
|
1335
1420
|
]
|
|
1336
1421
|
}
|
|
1337
1422
|
) }, `g-${gi}`);
|
|
1338
1423
|
}
|
|
1339
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ jsx9(CommandGroup, { heading: group.heading, children: visible.map((o) => {
|
|
1340
1425
|
const selected = o === value;
|
|
1341
1426
|
const h = getHint?.(o);
|
|
1342
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsxs7(
|
|
1343
1428
|
CommandItem,
|
|
1344
1429
|
{
|
|
1345
1430
|
value: o,
|
|
@@ -1347,11 +1432,11 @@ function OptionCombobox({
|
|
|
1347
1432
|
className: "gap-2",
|
|
1348
1433
|
children: [
|
|
1349
1434
|
renderIcon?.(o),
|
|
1350
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1 truncate", children: [
|
|
1351
1436
|
getLabel(o),
|
|
1352
|
-
h && /* @__PURE__ */
|
|
1437
|
+
h && /* @__PURE__ */ jsx9("span", { className: "ml-1.5 text-muted-foreground", children: h })
|
|
1353
1438
|
] }),
|
|
1354
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ jsx9(
|
|
1355
1440
|
CheckIcon,
|
|
1356
1441
|
{
|
|
1357
1442
|
className: cn(
|
|
@@ -1453,7 +1538,7 @@ function groupRatioOptions(options) {
|
|
|
1453
1538
|
}
|
|
1454
1539
|
|
|
1455
1540
|
// src/controls/aspect-ratio-select.tsx
|
|
1456
|
-
import { jsx as
|
|
1541
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1457
1542
|
function AspectRatioGlyph({
|
|
1458
1543
|
value,
|
|
1459
1544
|
className
|
|
@@ -1461,7 +1546,7 @@ function AspectRatioGlyph({
|
|
|
1461
1546
|
const r = parseRatio(value);
|
|
1462
1547
|
const box = 14;
|
|
1463
1548
|
if (!r) {
|
|
1464
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ jsx10(
|
|
1465
1550
|
"span",
|
|
1466
1551
|
{
|
|
1467
1552
|
"aria-hidden": true,
|
|
@@ -1469,14 +1554,14 @@ function AspectRatioGlyph({
|
|
|
1469
1554
|
"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",
|
|
1470
1555
|
className
|
|
1471
1556
|
),
|
|
1472
|
-
children: /* @__PURE__ */
|
|
1557
|
+
children: /* @__PURE__ */ jsx10("span", { className: "h-2.5 w-2.5 rounded-[2px] border border-dashed border-current opacity-60" })
|
|
1473
1558
|
}
|
|
1474
1559
|
);
|
|
1475
1560
|
}
|
|
1476
1561
|
const k = r.w / r.h;
|
|
1477
1562
|
const w = k >= 1 ? box : Math.max(3, box * k);
|
|
1478
1563
|
const h = k >= 1 ? Math.max(3, box / k) : box;
|
|
1479
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsx10(
|
|
1480
1565
|
"span",
|
|
1481
1566
|
{
|
|
1482
1567
|
"aria-hidden": true,
|
|
@@ -1484,7 +1569,7 @@ function AspectRatioGlyph({
|
|
|
1484
1569
|
"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",
|
|
1485
1570
|
className
|
|
1486
1571
|
),
|
|
1487
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx10(
|
|
1488
1573
|
"span",
|
|
1489
1574
|
{
|
|
1490
1575
|
className: "rounded-[2px] border-[1.5px] border-current opacity-80",
|
|
@@ -1511,7 +1596,7 @@ function AspectRatioSelect({
|
|
|
1511
1596
|
{ options: common },
|
|
1512
1597
|
...more.length ? [{ heading: "More ratios", options: more, collapsed: true }] : []
|
|
1513
1598
|
];
|
|
1514
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ jsx10(
|
|
1515
1600
|
OptionCombobox,
|
|
1516
1601
|
{
|
|
1517
1602
|
value,
|
|
@@ -1519,7 +1604,7 @@ function AspectRatioSelect({
|
|
|
1519
1604
|
groups,
|
|
1520
1605
|
getLabel: (o) => parseRatio(o) ? o : humanizeRatioWord(o),
|
|
1521
1606
|
getHint: (o) => ratioShapeName(o),
|
|
1522
|
-
renderIcon: (o) => /* @__PURE__ */
|
|
1607
|
+
renderIcon: (o) => /* @__PURE__ */ jsx10(AspectRatioGlyph, { value: o, className: "text-muted-foreground" }),
|
|
1523
1608
|
searchable: options.length > 12,
|
|
1524
1609
|
searchPlaceholder: "Search ratios\u2026",
|
|
1525
1610
|
placeholder,
|
|
@@ -1533,7 +1618,7 @@ function AspectRatioSelect({
|
|
|
1533
1618
|
}
|
|
1534
1619
|
|
|
1535
1620
|
// src/indicator-strip.tsx
|
|
1536
|
-
import { jsx as
|
|
1621
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1537
1622
|
var TONE = {
|
|
1538
1623
|
danger: "text-destructive",
|
|
1539
1624
|
warning: "text-warning",
|
|
@@ -1546,7 +1631,7 @@ function indicatorText(item) {
|
|
|
1546
1631
|
return item.detail ? `${item.label}: yes \u2014 ${item.detail}` : `${item.label}: yes`;
|
|
1547
1632
|
}
|
|
1548
1633
|
function IndicatorStrip({ items, className, ...props }) {
|
|
1549
|
-
return /* @__PURE__ */
|
|
1634
|
+
return /* @__PURE__ */ jsx11(
|
|
1550
1635
|
"span",
|
|
1551
1636
|
{
|
|
1552
1637
|
"data-slot": "indicator-strip",
|
|
@@ -1556,7 +1641,7 @@ function IndicatorStrip({ items, className, ...props }) {
|
|
|
1556
1641
|
children: items.map((item) => {
|
|
1557
1642
|
const Icon = item.icon;
|
|
1558
1643
|
const text = indicatorText(item);
|
|
1559
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ jsx11(
|
|
1560
1645
|
"span",
|
|
1561
1646
|
{
|
|
1562
1647
|
role: "listitem",
|
|
@@ -1569,7 +1654,7 @@ function IndicatorStrip({ items, className, ...props }) {
|
|
|
1569
1654
|
item.on ? TONE[item.tone ?? "warning"] : "text-muted-foreground opacity-30",
|
|
1570
1655
|
item.on && item.soft && "opacity-55"
|
|
1571
1656
|
),
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1657
|
+
children: /* @__PURE__ */ jsx11(Icon, { className: "size-3.5", "aria-hidden": true })
|
|
1573
1658
|
},
|
|
1574
1659
|
item.id
|
|
1575
1660
|
);
|
|
@@ -1579,7 +1664,7 @@ function IndicatorStrip({ items, className, ...props }) {
|
|
|
1579
1664
|
}
|
|
1580
1665
|
|
|
1581
1666
|
// src/controls/middle-truncate.tsx
|
|
1582
|
-
import { jsx as
|
|
1667
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1583
1668
|
var DEFAULT_TAIL = 10;
|
|
1584
1669
|
function splitForMiddleTruncate(text, tail = DEFAULT_TAIL) {
|
|
1585
1670
|
const keep = Math.min(tail, Math.floor(text.length / 2));
|
|
@@ -1592,15 +1677,15 @@ function MiddleTruncate({
|
|
|
1592
1677
|
className
|
|
1593
1678
|
}) {
|
|
1594
1679
|
const { head, end } = splitForMiddleTruncate(text, tail);
|
|
1595
|
-
return /* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
end ? /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsxs8("span", { className: cn("flex min-w-0 items-baseline", className), title: text, children: [
|
|
1681
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: text }),
|
|
1682
|
+
/* @__PURE__ */ jsx12("span", { "aria-hidden": true, className: "min-w-0 truncate whitespace-pre", children: head }),
|
|
1683
|
+
end ? /* @__PURE__ */ jsx12("span", { "aria-hidden": true, className: "shrink-0 whitespace-pre", children: end }) : null
|
|
1599
1684
|
] });
|
|
1600
1685
|
}
|
|
1601
1686
|
|
|
1602
1687
|
// src/controls/callout-banner.tsx
|
|
1603
|
-
import { jsx as
|
|
1688
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1604
1689
|
var TONE2 = {
|
|
1605
1690
|
destructive: { container: "border-destructive/30 bg-destructive/10", icon: "text-destructive" },
|
|
1606
1691
|
warning: { container: "border-warning/30 bg-warning/10", icon: "text-warning" },
|
|
@@ -1618,7 +1703,7 @@ function CalloutBanner({
|
|
|
1618
1703
|
className
|
|
1619
1704
|
}) {
|
|
1620
1705
|
const t = TONE2[tone2];
|
|
1621
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ jsxs9(
|
|
1622
1707
|
"div",
|
|
1623
1708
|
{
|
|
1624
1709
|
className: cn(
|
|
@@ -1628,16 +1713,16 @@ function CalloutBanner({
|
|
|
1628
1713
|
),
|
|
1629
1714
|
role: "status",
|
|
1630
1715
|
children: [
|
|
1631
|
-
/* @__PURE__ */
|
|
1632
|
-
Icon && /* @__PURE__ */
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
description && /* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 items-start gap-2", children: [
|
|
1717
|
+
Icon && /* @__PURE__ */ jsx13(Icon, { className: cn("mt-0.5 h-4 w-4 shrink-0", t.icon), "aria-hidden": true }),
|
|
1718
|
+
/* @__PURE__ */ jsxs9("div", { className: "min-w-0", children: [
|
|
1719
|
+
/* @__PURE__ */ jsx13("p", { className: "type-title text-foreground", children: title }),
|
|
1720
|
+
description && /* @__PURE__ */ jsx13("p", { className: "mt-0.5 type-secondary text-muted-foreground", children: description })
|
|
1636
1721
|
] })
|
|
1637
1722
|
] }),
|
|
1638
|
-
/* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex shrink-0 items-center gap-1.5 sm:ml-2", children: [
|
|
1639
1724
|
actions,
|
|
1640
|
-
onDismiss && /* @__PURE__ */
|
|
1725
|
+
onDismiss && /* @__PURE__ */ jsx13(Button2, { variant: "quiet", icon: /* @__PURE__ */ jsx13(XIcon, {}), "aria-label": "Dismiss", onClick: onDismiss, disabled: dismissing })
|
|
1641
1726
|
] })
|
|
1642
1727
|
]
|
|
1643
1728
|
}
|
|
@@ -1646,7 +1731,7 @@ function CalloutBanner({
|
|
|
1646
1731
|
|
|
1647
1732
|
// src/controls/gated-action-button.tsx
|
|
1648
1733
|
import * as React4 from "react";
|
|
1649
|
-
import { jsx as
|
|
1734
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1650
1735
|
function firstBlockingReason(checks) {
|
|
1651
1736
|
for (const check of checks) {
|
|
1652
1737
|
if (check && check.when) return check.reason;
|
|
@@ -1665,7 +1750,7 @@ function GatedActionButton({
|
|
|
1665
1750
|
const reactId = React4.useId();
|
|
1666
1751
|
const blocked = Boolean(reason && reason.trim());
|
|
1667
1752
|
const reasonId = `gated-action-reason-${reactId}`;
|
|
1668
|
-
return /* @__PURE__ */
|
|
1753
|
+
return /* @__PURE__ */ jsxs10(
|
|
1669
1754
|
"span",
|
|
1670
1755
|
{
|
|
1671
1756
|
className: cn(
|
|
@@ -1673,7 +1758,7 @@ function GatedActionButton({
|
|
|
1673
1758
|
wrapperClassName
|
|
1674
1759
|
),
|
|
1675
1760
|
children: [
|
|
1676
|
-
blocked ? /* @__PURE__ */
|
|
1761
|
+
blocked ? /* @__PURE__ */ jsx14(
|
|
1677
1762
|
"span",
|
|
1678
1763
|
{
|
|
1679
1764
|
id: reasonId,
|
|
@@ -1686,7 +1771,7 @@ function GatedActionButton({
|
|
|
1686
1771
|
children: reason
|
|
1687
1772
|
}
|
|
1688
1773
|
) : null,
|
|
1689
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ jsx14(
|
|
1690
1775
|
Button,
|
|
1691
1776
|
{
|
|
1692
1777
|
...buttonProps,
|
|
@@ -1704,7 +1789,7 @@ GatedActionButton.displayName = "GatedActionButton";
|
|
|
1704
1789
|
|
|
1705
1790
|
// src/controls/search-input.tsx
|
|
1706
1791
|
import { useEffect as useEffect4, useRef as useRef2, useState as useState7 } from "react";
|
|
1707
|
-
import { jsx as
|
|
1792
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1708
1793
|
function SearchInput({
|
|
1709
1794
|
value,
|
|
1710
1795
|
defaultValue = "",
|
|
@@ -1760,21 +1845,21 @@ function SearchInput({
|
|
|
1760
1845
|
onSearch?.("");
|
|
1761
1846
|
inputRef.current?.focus();
|
|
1762
1847
|
};
|
|
1763
|
-
return /* @__PURE__ */
|
|
1848
|
+
return /* @__PURE__ */ jsxs11(
|
|
1764
1849
|
"form",
|
|
1765
1850
|
{
|
|
1766
1851
|
onSubmit: handleSubmit,
|
|
1767
1852
|
className: cn("flex min-w-0 items-center gap-2", className),
|
|
1768
1853
|
children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsxs11("div", { className: "relative min-w-0 flex-1", children: [
|
|
1855
|
+
/* @__PURE__ */ jsx15(
|
|
1771
1856
|
SearchIcon,
|
|
1772
1857
|
{
|
|
1773
1858
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
|
|
1774
1859
|
"aria-hidden": true
|
|
1775
1860
|
}
|
|
1776
1861
|
),
|
|
1777
|
-
/* @__PURE__ */
|
|
1862
|
+
/* @__PURE__ */ jsx15(
|
|
1778
1863
|
Input,
|
|
1779
1864
|
{
|
|
1780
1865
|
ref: inputRef,
|
|
@@ -1788,7 +1873,7 @@ function SearchInput({
|
|
|
1788
1873
|
adornment: showClearButton && searchValue ? "both" : "start"
|
|
1789
1874
|
}
|
|
1790
1875
|
),
|
|
1791
|
-
showClearButton && searchValue ? /* @__PURE__ */
|
|
1876
|
+
showClearButton && searchValue ? /* @__PURE__ */ jsx15(
|
|
1792
1877
|
"button",
|
|
1793
1878
|
{
|
|
1794
1879
|
type: "button",
|
|
@@ -1796,14 +1881,14 @@ function SearchInput({
|
|
|
1796
1881
|
disabled,
|
|
1797
1882
|
"aria-label": "Clear search",
|
|
1798
1883
|
className: "absolute right-2 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:text-disabled-foreground",
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1884
|
+
children: /* @__PURE__ */ jsx15(XIcon, { className: "h-3.5 w-3.5" })
|
|
1800
1885
|
}
|
|
1801
1886
|
) : null
|
|
1802
1887
|
] }),
|
|
1803
|
-
showSubmitButton ? /* @__PURE__ */
|
|
1888
|
+
showSubmitButton ? /* @__PURE__ */ jsx15(
|
|
1804
1889
|
Button2,
|
|
1805
1890
|
{
|
|
1806
|
-
icon: loading ? /* @__PURE__ */
|
|
1891
|
+
icon: loading ? /* @__PURE__ */ jsx15(Loader2Icon, { className: "animate-spin" }) : /* @__PURE__ */ jsx15(SearchIcon, {}),
|
|
1807
1892
|
variant: "primary",
|
|
1808
1893
|
type: "submit",
|
|
1809
1894
|
disabled: disabled || loading,
|
|
@@ -1818,7 +1903,7 @@ function SearchInput({
|
|
|
1818
1903
|
|
|
1819
1904
|
// src/controls/collapsible-text.tsx
|
|
1820
1905
|
import { useLayoutEffect, useRef as useRef3, useState as useState8 } from "react";
|
|
1821
|
-
import { jsx as
|
|
1906
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1822
1907
|
function CollapsibleText({
|
|
1823
1908
|
children,
|
|
1824
1909
|
expanded,
|
|
@@ -1852,8 +1937,8 @@ function CollapsibleText({
|
|
|
1852
1937
|
}, [children, collapsedLines]);
|
|
1853
1938
|
const isCollapsed = isOverflowing && !expanded;
|
|
1854
1939
|
if (showLabel) {
|
|
1855
|
-
return /* @__PURE__ */
|
|
1856
|
-
/* @__PURE__ */
|
|
1940
|
+
return /* @__PURE__ */ jsxs12("div", { className: "relative min-w-0", children: [
|
|
1941
|
+
/* @__PURE__ */ jsx16(
|
|
1857
1942
|
"div",
|
|
1858
1943
|
{
|
|
1859
1944
|
ref: contentRef,
|
|
@@ -1866,7 +1951,7 @@ function CollapsibleText({
|
|
|
1866
1951
|
children
|
|
1867
1952
|
}
|
|
1868
1953
|
),
|
|
1869
|
-
isOverflowing ? /* @__PURE__ */
|
|
1954
|
+
isOverflowing ? /* @__PURE__ */ jsxs12(
|
|
1870
1955
|
"button",
|
|
1871
1956
|
{
|
|
1872
1957
|
type: "button",
|
|
@@ -1877,15 +1962,15 @@ function CollapsibleText({
|
|
|
1877
1962
|
},
|
|
1878
1963
|
className: "mt-0.5 inline-flex min-h-6 items-center gap-0.5 rounded text-xs font-medium text-primary hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring",
|
|
1879
1964
|
children: [
|
|
1880
|
-
isCollapsed ? /* @__PURE__ */
|
|
1965
|
+
isCollapsed ? /* @__PURE__ */ jsx16(ChevronDownIcon, { className: "h-3.5 w-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx16(ChevronUpIcon, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
1881
1966
|
isCollapsed ? expandLabel : collapseLabel
|
|
1882
1967
|
]
|
|
1883
1968
|
}
|
|
1884
1969
|
) : null
|
|
1885
1970
|
] });
|
|
1886
1971
|
}
|
|
1887
|
-
return /* @__PURE__ */
|
|
1888
|
-
/* @__PURE__ */
|
|
1972
|
+
return /* @__PURE__ */ jsxs12("div", { className: "relative min-w-0", children: [
|
|
1973
|
+
/* @__PURE__ */ jsx16(
|
|
1889
1974
|
"div",
|
|
1890
1975
|
{
|
|
1891
1976
|
ref: contentRef,
|
|
@@ -1898,10 +1983,10 @@ function CollapsibleText({
|
|
|
1898
1983
|
children
|
|
1899
1984
|
}
|
|
1900
1985
|
),
|
|
1901
|
-
isCollapsed ? /* @__PURE__ */
|
|
1986
|
+
isCollapsed ? /* @__PURE__ */ jsx16("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex justify-center", children: /* @__PURE__ */ jsx16(
|
|
1902
1987
|
Button2,
|
|
1903
1988
|
{
|
|
1904
|
-
icon: /* @__PURE__ */
|
|
1989
|
+
icon: /* @__PURE__ */ jsx16(ChevronDownIcon, {}),
|
|
1905
1990
|
type: "button",
|
|
1906
1991
|
variant: "outline",
|
|
1907
1992
|
"aria-label": expandLabel,
|
|
@@ -1912,10 +1997,10 @@ function CollapsibleText({
|
|
|
1912
1997
|
},
|
|
1913
1998
|
className: "pointer-events-auto"
|
|
1914
1999
|
}
|
|
1915
|
-
) }) : isOverflowing ? /* @__PURE__ */
|
|
2000
|
+
) }) : isOverflowing ? /* @__PURE__ */ jsx16("div", { className: "flex justify-center pt-0.5", children: /* @__PURE__ */ jsx16(
|
|
1916
2001
|
Button2,
|
|
1917
2002
|
{
|
|
1918
|
-
icon: /* @__PURE__ */
|
|
2003
|
+
icon: /* @__PURE__ */ jsx16(ChevronUpIcon, {}),
|
|
1919
2004
|
type: "button",
|
|
1920
2005
|
variant: "quiet",
|
|
1921
2006
|
"aria-label": collapseLabel,
|
|
@@ -1935,12 +2020,12 @@ function CollapsibleTextGroupControls({
|
|
|
1935
2020
|
anyExpanded,
|
|
1936
2021
|
disabled = false
|
|
1937
2022
|
}) {
|
|
1938
|
-
return /* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
/* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-0.5", children: [
|
|
2024
|
+
/* @__PURE__ */ jsxs12(Tooltip, { children: [
|
|
2025
|
+
/* @__PURE__ */ jsx16(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx16(
|
|
1941
2026
|
Button2,
|
|
1942
2027
|
{
|
|
1943
|
-
icon: /* @__PURE__ */
|
|
2028
|
+
icon: /* @__PURE__ */ jsx16(ChevronsDownIcon, { className: "!size-[18px] lg:!size-3.5" }),
|
|
1944
2029
|
type: "button",
|
|
1945
2030
|
variant: "quiet",
|
|
1946
2031
|
"aria-label": "Expand all",
|
|
@@ -1948,13 +2033,13 @@ function CollapsibleTextGroupControls({
|
|
|
1948
2033
|
disabled: disabled || allExpanded
|
|
1949
2034
|
}
|
|
1950
2035
|
) }),
|
|
1951
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ jsx16(TooltipContent, { side: "top", children: "Expand all" })
|
|
1952
2037
|
] }),
|
|
1953
|
-
/* @__PURE__ */
|
|
1954
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsxs12(Tooltip, { children: [
|
|
2039
|
+
/* @__PURE__ */ jsx16(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx16(
|
|
1955
2040
|
Button2,
|
|
1956
2041
|
{
|
|
1957
|
-
icon: /* @__PURE__ */
|
|
2042
|
+
icon: /* @__PURE__ */ jsx16(ChevronsUpIcon, { className: "!size-[18px] lg:!size-3.5" }),
|
|
1958
2043
|
type: "button",
|
|
1959
2044
|
variant: "quiet",
|
|
1960
2045
|
"aria-label": "Collapse all",
|
|
@@ -1962,14 +2047,14 @@ function CollapsibleTextGroupControls({
|
|
|
1962
2047
|
disabled: disabled || !anyExpanded
|
|
1963
2048
|
}
|
|
1964
2049
|
) }),
|
|
1965
|
-
/* @__PURE__ */
|
|
2050
|
+
/* @__PURE__ */ jsx16(TooltipContent, { side: "top", children: "Collapse all" })
|
|
1966
2051
|
] })
|
|
1967
2052
|
] });
|
|
1968
2053
|
}
|
|
1969
2054
|
|
|
1970
2055
|
// src/controls/info-hint.tsx
|
|
1971
2056
|
import { useState as useState9, useSyncExternalStore } from "react";
|
|
1972
|
-
import { jsx as
|
|
2057
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1973
2058
|
var COARSE_POINTER_QUERY = "(pointer: coarse)";
|
|
1974
2059
|
function subscribeCoarse(onChange) {
|
|
1975
2060
|
const mq = window.matchMedia(COARSE_POINTER_QUERY);
|
|
@@ -1993,10 +2078,10 @@ function InfoHint({ text, label = "More info", className, side = "top" }) {
|
|
|
1993
2078
|
const coarse = useCoarsePointer();
|
|
1994
2079
|
const isMobile = useIsMobile();
|
|
1995
2080
|
const [open, setOpen] = useState9(false);
|
|
1996
|
-
const glyph = /* @__PURE__ */
|
|
2081
|
+
const glyph = /* @__PURE__ */ jsx17(InfoIcon, { "aria-hidden": true, className: "h-3.5 w-3.5", strokeWidth: 2 });
|
|
1997
2082
|
if (coarse || isMobile) {
|
|
1998
|
-
return /* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ jsxs13(Popover, { open, onOpenChange: setOpen, children: [
|
|
2084
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
2000
2085
|
"button",
|
|
2001
2086
|
{
|
|
2002
2087
|
type: "button",
|
|
@@ -2010,7 +2095,7 @@ function InfoHint({ text, label = "More info", className, side = "top" }) {
|
|
|
2010
2095
|
children: glyph
|
|
2011
2096
|
}
|
|
2012
2097
|
) }),
|
|
2013
|
-
/* @__PURE__ */
|
|
2098
|
+
/* @__PURE__ */ jsx17(
|
|
2014
2099
|
PopoverContent,
|
|
2015
2100
|
{
|
|
2016
2101
|
side,
|
|
@@ -2027,8 +2112,8 @@ function InfoHint({ text, label = "More info", className, side = "top" }) {
|
|
|
2027
2112
|
return (
|
|
2028
2113
|
// Brings its own provider: an official component works wherever it is imported (a
|
|
2029
2114
|
// test, a portal, a page without the app shell) — 2026-09-30, final-switch tests.
|
|
2030
|
-
/* @__PURE__ */
|
|
2031
|
-
/* @__PURE__ */
|
|
2115
|
+
/* @__PURE__ */ jsx17(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs13(Tooltip, { open, onOpenChange: setOpen, children: [
|
|
2116
|
+
/* @__PURE__ */ jsx17(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx17(
|
|
2032
2117
|
"button",
|
|
2033
2118
|
{
|
|
2034
2119
|
type: "button",
|
|
@@ -2044,13 +2129,13 @@ function InfoHint({ text, label = "More info", className, side = "top" }) {
|
|
|
2044
2129
|
children: glyph
|
|
2045
2130
|
}
|
|
2046
2131
|
) }),
|
|
2047
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx17(TooltipContent, { side, className: CONTENT_CLASS, onClick: isolate, children: text })
|
|
2048
2133
|
] }) })
|
|
2049
2134
|
);
|
|
2050
2135
|
}
|
|
2051
2136
|
|
|
2052
2137
|
// src/controls/status-badge.tsx
|
|
2053
|
-
import { jsx as
|
|
2138
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2054
2139
|
var STATUS_TONES = ["success", "warning", "danger", "neutral", "info"];
|
|
2055
2140
|
var TONE_CLASS = {
|
|
2056
2141
|
success: "border-success/40 bg-success/15 text-success-ink",
|
|
@@ -2066,7 +2151,7 @@ var SIZE_CLASS = {
|
|
|
2066
2151
|
};
|
|
2067
2152
|
function StatusBadge({ label, tone: tone2, icon: Icon, size = "md", title, trailing, className }) {
|
|
2068
2153
|
const s = SIZE_CLASS[size];
|
|
2069
|
-
return /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ jsxs14(
|
|
2070
2155
|
"span",
|
|
2071
2156
|
{
|
|
2072
2157
|
role: "status",
|
|
@@ -2082,7 +2167,7 @@ function StatusBadge({ label, tone: tone2, icon: Icon, size = "md", title, trail
|
|
|
2082
2167
|
className
|
|
2083
2168
|
),
|
|
2084
2169
|
children: [
|
|
2085
|
-
Icon ? /* @__PURE__ */
|
|
2170
|
+
Icon ? /* @__PURE__ */ jsx18(Icon, { "aria-hidden": true, className: cn("shrink-0", s.icon) }) : null,
|
|
2086
2171
|
label,
|
|
2087
2172
|
trailing
|
|
2088
2173
|
]
|
|
@@ -2092,7 +2177,7 @@ function StatusBadge({ label, tone: tone2, icon: Icon, size = "md", title, trail
|
|
|
2092
2177
|
|
|
2093
2178
|
// src/controls/structured-section-card.tsx
|
|
2094
2179
|
import * as React6 from "react";
|
|
2095
|
-
import { jsx as
|
|
2180
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2096
2181
|
var TITLE_TONE = {
|
|
2097
2182
|
primary: "text-primary-ink",
|
|
2098
2183
|
foreground: "text-foreground"
|
|
@@ -2109,24 +2194,24 @@ function StructuredSectionCard({
|
|
|
2109
2194
|
className
|
|
2110
2195
|
}) {
|
|
2111
2196
|
const hasFooter = footerLeft || footerCenter || footerRight;
|
|
2112
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ jsxs15(
|
|
2113
2198
|
"div",
|
|
2114
2199
|
{
|
|
2115
2200
|
"data-slot": "structured-section-card",
|
|
2116
2201
|
className: cn("overflow-hidden rounded-xl border-border bg-textured shadow-sm", className),
|
|
2117
2202
|
children: [
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
description && /* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between border-b border-border bg-muted px-4 py-3", children: [
|
|
2204
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
2205
|
+
/* @__PURE__ */ jsx19("h3", { className: cn("font-medium", TITLE_TONE[titleTone]), children: title }),
|
|
2206
|
+
description && /* @__PURE__ */ jsx19("p", { className: "type-body text-muted-foreground", children: description })
|
|
2122
2207
|
] }),
|
|
2123
|
-
headerActions.length > 0 && /* @__PURE__ */
|
|
2208
|
+
headerActions.length > 0 && /* @__PURE__ */ jsx19("div", { className: "ml-4 flex shrink-0 items-center space-x-2", children: headerActions.map((action, index) => /* @__PURE__ */ jsx19(React6.Fragment, { children: action }, index)) })
|
|
2124
2209
|
] }),
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
hasFooter && /* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2128
|
-
/* @__PURE__ */
|
|
2129
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ jsx19("div", { className: "p-4", children }),
|
|
2211
|
+
hasFooter && /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap items-center border-t border-border px-4 py-3", children: [
|
|
2212
|
+
/* @__PURE__ */ jsx19("div", { className: "flex min-w-[33%] flex-1 justify-start space-x-2 sm:min-w-0", children: footerLeft }),
|
|
2213
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-2 flex min-w-[33%] flex-1 justify-center space-x-2 sm:mt-0 sm:min-w-0", children: footerCenter }),
|
|
2214
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-2 flex min-w-[33%] flex-1 justify-end space-x-2 sm:mt-0 sm:min-w-0", children: footerRight })
|
|
2130
2215
|
] })
|
|
2131
2216
|
]
|
|
2132
2217
|
}
|
|
@@ -2134,7 +2219,7 @@ function StructuredSectionCard({
|
|
|
2134
2219
|
}
|
|
2135
2220
|
|
|
2136
2221
|
// src/controls/icon-dropdown-menu.tsx
|
|
2137
|
-
import { jsx as
|
|
2222
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2138
2223
|
function IconDropdownMenu({
|
|
2139
2224
|
options,
|
|
2140
2225
|
value,
|
|
@@ -2149,21 +2234,21 @@ function IconDropdownMenu({
|
|
|
2149
2234
|
console.warn("IconDropdownMenu: no option to show \u2014 pass at least one option.");
|
|
2150
2235
|
return null;
|
|
2151
2236
|
}
|
|
2152
|
-
return /* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ jsxs16(DropdownMenu, { children: [
|
|
2238
|
+
/* @__PURE__ */ jsx20(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
2154
2239
|
Button2,
|
|
2155
2240
|
{
|
|
2156
|
-
icon: /* @__PURE__ */
|
|
2157
|
-
iconEnd: /* @__PURE__ */
|
|
2241
|
+
icon: /* @__PURE__ */ jsx20(SelectedIcon, {}),
|
|
2242
|
+
iconEnd: /* @__PURE__ */ jsx20(ChevronDownIcon, {}),
|
|
2158
2243
|
variant: "outline",
|
|
2159
2244
|
"aria-label": selected.label,
|
|
2160
2245
|
...className ? { className } : {}
|
|
2161
2246
|
}
|
|
2162
2247
|
) }),
|
|
2163
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ jsx20(DropdownMenuContent, { align, className: cn("rounded-2xl p-1", menuWidth), children: options.map((option) => {
|
|
2164
2249
|
const isSelected = option.value === value;
|
|
2165
2250
|
const OptionIcon = option.icon;
|
|
2166
|
-
return /* @__PURE__ */
|
|
2251
|
+
return /* @__PURE__ */ jsxs16(
|
|
2167
2252
|
DropdownMenuItem,
|
|
2168
2253
|
{
|
|
2169
2254
|
onClick: () => onValueChange(option.value),
|
|
@@ -2173,9 +2258,9 @@ function IconDropdownMenu({
|
|
|
2173
2258
|
isSelected && "bg-primary/10"
|
|
2174
2259
|
),
|
|
2175
2260
|
children: [
|
|
2176
|
-
/* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
isSelected && /* @__PURE__ */
|
|
2261
|
+
/* @__PURE__ */ jsx20(OptionIcon, { className: cn("h-4 w-4 shrink-0", isSelected ? "text-primary-ink" : "text-muted-foreground") }),
|
|
2262
|
+
/* @__PURE__ */ jsx20("span", { className: cn("type-body flex-1 leading-tight", isSelected ? "font-medium text-primary-ink" : "text-foreground"), children: option.label }),
|
|
2263
|
+
isSelected && /* @__PURE__ */ jsx20(CheckIcon, { className: "h-4 w-4 shrink-0 text-primary-ink" })
|
|
2179
2264
|
]
|
|
2180
2265
|
},
|
|
2181
2266
|
String(option.value)
|
|
@@ -2185,7 +2270,7 @@ function IconDropdownMenu({
|
|
|
2185
2270
|
}
|
|
2186
2271
|
|
|
2187
2272
|
// src/controls/field.tsx
|
|
2188
|
-
import { jsx as
|
|
2273
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2189
2274
|
function LabeledField({
|
|
2190
2275
|
label,
|
|
2191
2276
|
htmlFor,
|
|
@@ -2204,9 +2289,9 @@ function LabeledField({
|
|
|
2204
2289
|
const hasCounter = typeof count === "number";
|
|
2205
2290
|
const overLimit = hasCounter && maxCount != null && count > maxCount;
|
|
2206
2291
|
const nearLimit = hasCounter && maxCount != null && count > maxCount * 0.9 && !overLimit;
|
|
2207
|
-
return /* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
/* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsxs17("div", { "data-field-root": "", className: cn("group/field space-y-1.5", className), children: [
|
|
2293
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5", children: [
|
|
2294
|
+
/* @__PURE__ */ jsxs17(
|
|
2210
2295
|
Label,
|
|
2211
2296
|
{
|
|
2212
2297
|
htmlFor,
|
|
@@ -2216,27 +2301,27 @@ function LabeledField({
|
|
|
2216
2301
|
),
|
|
2217
2302
|
children: [
|
|
2218
2303
|
label,
|
|
2219
|
-
required && /* @__PURE__ */
|
|
2220
|
-
!required && optional && /* @__PURE__ */
|
|
2304
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-destructive ml-1", "aria-hidden": true, children: "*" }),
|
|
2305
|
+
!required && optional && /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground ml-1.5 type-secondary font-normal", children: "(optional)" })
|
|
2221
2306
|
]
|
|
2222
2307
|
}
|
|
2223
2308
|
),
|
|
2224
|
-
typeof help === "string" && help && /* @__PURE__ */
|
|
2225
|
-
help && typeof help !== "string" && /* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2309
|
+
typeof help === "string" && help && /* @__PURE__ */ jsx21(InfoHint, { text: help, label: typeof label === "string" ? `About ${label}` : "Help" }),
|
|
2310
|
+
help && typeof help !== "string" && /* @__PURE__ */ jsx21(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsxs17(Tooltip, { children: [
|
|
2311
|
+
/* @__PURE__ */ jsx21(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
2227
2312
|
"button",
|
|
2228
2313
|
{
|
|
2229
2314
|
type: "button",
|
|
2230
2315
|
"aria-label": "Help",
|
|
2231
2316
|
className: "inline-flex items-center justify-center h-4 w-4 rounded-full text-muted-foreground hover:text-foreground transition-colors",
|
|
2232
|
-
children: /* @__PURE__ */
|
|
2317
|
+
children: /* @__PURE__ */ jsx21(CircleHelpIcon, { className: "h-3.5 w-3.5" })
|
|
2233
2318
|
}
|
|
2234
2319
|
) }),
|
|
2235
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx21(TooltipContent, { side: "top", className: "max-w-xs type-secondary", children: help })
|
|
2236
2321
|
] }) })
|
|
2237
2322
|
] }),
|
|
2238
|
-
description && !error && /* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2323
|
+
description && !error && /* @__PURE__ */ jsx21("p", { className: "type-secondary text-muted-foreground", children: description }),
|
|
2324
|
+
/* @__PURE__ */ jsx21(
|
|
2240
2325
|
"div",
|
|
2241
2326
|
{
|
|
2242
2327
|
"data-slot": "field-control",
|
|
@@ -2247,7 +2332,7 @@ function LabeledField({
|
|
|
2247
2332
|
children
|
|
2248
2333
|
}
|
|
2249
2334
|
),
|
|
2250
|
-
(error || hasCounter || requiredEmpty) && /* @__PURE__ */
|
|
2335
|
+
(error || hasCounter || requiredEmpty) && /* @__PURE__ */ jsxs17(
|
|
2251
2336
|
"div",
|
|
2252
2337
|
{
|
|
2253
2338
|
className: cn(
|
|
@@ -2259,10 +2344,10 @@ function LabeledField({
|
|
|
2259
2344
|
!error && !hasCounter && "hidden [[data-field-root]:has(:placeholder-shown)_&]:flex"
|
|
2260
2345
|
),
|
|
2261
2346
|
children: [
|
|
2262
|
-
error ? /* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
/* @__PURE__ */
|
|
2265
|
-
/* @__PURE__ */
|
|
2347
|
+
error ? /* @__PURE__ */ jsxs17("p", { className: "type-secondary text-destructive flex items-center gap-1", children: [
|
|
2348
|
+
/* @__PURE__ */ jsx21(CircleAlertIcon, { className: "h-3 w-3 flex-shrink-0" }),
|
|
2349
|
+
/* @__PURE__ */ jsx21("span", { children: error }),
|
|
2350
|
+
/* @__PURE__ */ jsx21(
|
|
2266
2351
|
ErrorActions,
|
|
2267
2352
|
{
|
|
2268
2353
|
...typeof error === "string" ? { message: error } : {},
|
|
@@ -2270,18 +2355,18 @@ function LabeledField({
|
|
|
2270
2355
|
origin: "design-system/LabeledField"
|
|
2271
2356
|
}
|
|
2272
2357
|
)
|
|
2273
|
-
] }) : requiredEmpty ? /* @__PURE__ */
|
|
2358
|
+
] }) : requiredEmpty ? /* @__PURE__ */ jsxs17(
|
|
2274
2359
|
"p",
|
|
2275
2360
|
{
|
|
2276
2361
|
"data-slot": "field-empty-notice",
|
|
2277
2362
|
className: "hidden type-secondary text-muted-foreground items-center gap-1 [[data-field-root]:has(:placeholder-shown)_&]:flex",
|
|
2278
2363
|
children: [
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ jsx21(CircleAlertIcon, { className: "h-3 w-3 flex-shrink-0" }),
|
|
2365
|
+
/* @__PURE__ */ jsx21("span", { children: "Empty \u2014 the gray text is an example, not your answer." })
|
|
2281
2366
|
]
|
|
2282
2367
|
}
|
|
2283
|
-
) : /* @__PURE__ */
|
|
2284
|
-
hasCounter && /* @__PURE__ */
|
|
2368
|
+
) : /* @__PURE__ */ jsx21("span", {}),
|
|
2369
|
+
hasCounter && /* @__PURE__ */ jsx21(
|
|
2285
2370
|
"span",
|
|
2286
2371
|
{
|
|
2287
2372
|
className: cn(
|
|
@@ -2304,7 +2389,7 @@ import { openClipboardFallback } from "@ai-matrx/kit/clipboard-fallback-opener";
|
|
|
2304
2389
|
import { toast } from "@ai-matrx/kit/notify";
|
|
2305
2390
|
import * as React7 from "react";
|
|
2306
2391
|
import { createPortal } from "react-dom";
|
|
2307
|
-
import { jsx as
|
|
2392
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2308
2393
|
var { useState: useState10, useLayoutEffect: useLayoutEffect2, useRef: useRef4 } = React7;
|
|
2309
2394
|
function HelpIcon({
|
|
2310
2395
|
text,
|
|
@@ -2403,13 +2488,13 @@ function HelpIcon({
|
|
|
2403
2488
|
}, [isVisible]);
|
|
2404
2489
|
const formatTextWithLineBreaks = (text2) => {
|
|
2405
2490
|
const processedText = text2.replace(/\\n/g, "\n");
|
|
2406
|
-
return processedText.split("\n").map((line, index) => /* @__PURE__ */
|
|
2407
|
-
index > 0 && /* @__PURE__ */
|
|
2491
|
+
return processedText.split("\n").map((line, index) => /* @__PURE__ */ jsxs18(React7.Fragment, { children: [
|
|
2492
|
+
index > 0 && /* @__PURE__ */ jsx22("br", {}),
|
|
2408
2493
|
line
|
|
2409
2494
|
] }, index));
|
|
2410
2495
|
};
|
|
2411
2496
|
if (!text && !content) return null;
|
|
2412
|
-
return /* @__PURE__ */
|
|
2497
|
+
return /* @__PURE__ */ jsxs18(
|
|
2413
2498
|
"div",
|
|
2414
2499
|
{
|
|
2415
2500
|
className: `inline-block relative cursor-help ${className}`,
|
|
@@ -2417,9 +2502,9 @@ function HelpIcon({
|
|
|
2417
2502
|
onMouseEnter: showTooltip,
|
|
2418
2503
|
onMouseLeave: hideTooltip,
|
|
2419
2504
|
children: [
|
|
2420
|
-
/* @__PURE__ */
|
|
2505
|
+
/* @__PURE__ */ jsx22(InfoIcon, { className: "h-4 w-4 text-muted-foreground transition-colors duration-200" }),
|
|
2421
2506
|
isVisible && typeof document !== "undefined" && createPortal(
|
|
2422
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsxs18(
|
|
2423
2508
|
"div",
|
|
2424
2509
|
{
|
|
2425
2510
|
ref: tooltipRef,
|
|
@@ -2432,29 +2517,29 @@ function HelpIcon({
|
|
|
2432
2517
|
onMouseEnter: cancelHideTooltip,
|
|
2433
2518
|
onMouseLeave: hideTooltip,
|
|
2434
2519
|
children: [
|
|
2435
|
-
/* @__PURE__ */
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
/* @__PURE__ */
|
|
2438
|
-
title && /* @__PURE__ */
|
|
2439
|
-
text && /* @__PURE__ */
|
|
2520
|
+
/* @__PURE__ */ jsxs18("div", { className: "p-3", children: [
|
|
2521
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
2522
|
+
/* @__PURE__ */ jsx22(CircleHelpIcon, { className: "h-4 w-4 flex-shrink-0 text-info-ink" }),
|
|
2523
|
+
title && /* @__PURE__ */ jsx22("h3", { className: "text-foreground type-title", children: title }),
|
|
2524
|
+
text && /* @__PURE__ */ jsx22(
|
|
2440
2525
|
Button2,
|
|
2441
2526
|
{
|
|
2442
2527
|
variant: "quiet",
|
|
2443
2528
|
className: "ml-auto",
|
|
2444
|
-
icon: copied ? /* @__PURE__ */
|
|
2529
|
+
icon: copied ? /* @__PURE__ */ jsx22(CheckIcon, {}) : /* @__PURE__ */ jsx22(CopyIcon, {}),
|
|
2445
2530
|
"aria-label": "Copy to clipboard",
|
|
2446
2531
|
onClick: handleCopy
|
|
2447
2532
|
}
|
|
2448
2533
|
)
|
|
2449
2534
|
] }),
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
required && /* @__PURE__ */
|
|
2452
|
-
/* @__PURE__ */
|
|
2535
|
+
/* @__PURE__ */ jsx22("div", { className: "type-body text-foreground leading-relaxed", children: content ? content : text && formatTextWithLineBreaks(text) }),
|
|
2536
|
+
required && /* @__PURE__ */ jsxs18("div", { className: "mt-3 inline-flex items-center gap-1.5 px-2.5 py-1 bg-warning/15 text-warning-ink type-secondary font-medium rounded-full", children: [
|
|
2537
|
+
/* @__PURE__ */ jsx22("div", { className: "w-1.5 h-1.5 bg-warning-ink rounded-full" }),
|
|
2453
2538
|
"Required Field"
|
|
2454
2539
|
] }),
|
|
2455
|
-
onAiAssistance && /* @__PURE__ */
|
|
2540
|
+
onAiAssistance && /* @__PURE__ */ jsx22(Button2, { variant: "primary", icon: /* @__PURE__ */ jsx22(CircleDotIcon, {}), className: "mt-3 w-full", onClick: handleAiClick, children: "Get Help From Matrx AI" })
|
|
2456
2541
|
] }),
|
|
2457
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ jsx22("div", { className: "absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-textured border-r border-b border-border rotate-45" })
|
|
2458
2543
|
]
|
|
2459
2544
|
}
|
|
2460
2545
|
),
|
|
@@ -2470,7 +2555,7 @@ import { copyText as copyText2 } from "@ai-matrx/kit/clipboard";
|
|
|
2470
2555
|
import { toast as toast2 } from "@ai-matrx/kit/notify";
|
|
2471
2556
|
import { openClipboardFallback as openClipboardFallback2 } from "@ai-matrx/kit/clipboard-fallback-opener";
|
|
2472
2557
|
import * as React8 from "react";
|
|
2473
|
-
import { jsx as
|
|
2558
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2474
2559
|
function cleanUrl(url) {
|
|
2475
2560
|
try {
|
|
2476
2561
|
const parsed = new URL(url);
|
|
@@ -2526,9 +2611,9 @@ function TextArrayInput({
|
|
|
2526
2611
|
handleChange([...value, ...added]);
|
|
2527
2612
|
setInputValue("");
|
|
2528
2613
|
};
|
|
2529
|
-
return /* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ jsxs19("div", { className: `space-y-3 ${className}`, children: [
|
|
2615
|
+
/* @__PURE__ */ jsxs19("form", { onSubmit: handleSubmit, className: "relative w-full", children: [
|
|
2616
|
+
/* @__PURE__ */ jsx23(
|
|
2532
2617
|
Input,
|
|
2533
2618
|
{
|
|
2534
2619
|
adornment: "end",
|
|
@@ -2542,12 +2627,12 @@ function TextArrayInput({
|
|
|
2542
2627
|
className: "w-full"
|
|
2543
2628
|
}
|
|
2544
2629
|
),
|
|
2545
|
-
showCopyIcon && value.length > 0 && /* @__PURE__ */
|
|
2630
|
+
showCopyIcon && value.length > 0 && /* @__PURE__ */ jsx23(
|
|
2546
2631
|
Button2,
|
|
2547
2632
|
{
|
|
2548
2633
|
...tabIndexProp,
|
|
2549
2634
|
variant: "quiet",
|
|
2550
|
-
icon: copied ? /* @__PURE__ */
|
|
2635
|
+
icon: copied ? /* @__PURE__ */ jsx23(CheckIcon, {}) : /* @__PURE__ */ jsx23(CopyIcon, {}),
|
|
2551
2636
|
...copied ? { glyphTone: "success" } : {},
|
|
2552
2637
|
"aria-label": "Copy values",
|
|
2553
2638
|
onClick: handleCopy,
|
|
@@ -2555,13 +2640,13 @@ function TextArrayInput({
|
|
|
2555
2640
|
}
|
|
2556
2641
|
)
|
|
2557
2642
|
] }),
|
|
2558
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-wrap gap-2", children: value.length === 0 ? /* @__PURE__ */ jsx23("span", { className: "type-body inline-flex items-center rounded-full bg-muted px-3 py-1 text-muted-foreground", children: "None Added" }) : value.map((item, index) => /* @__PURE__ */ jsxs19(
|
|
2559
2644
|
"span",
|
|
2560
2645
|
{
|
|
2561
2646
|
className: `inline-flex cursor-default items-center gap-1 rounded-full px-3 py-1 text-sm transition-all duration-200 ${chipClassName}`,
|
|
2562
2647
|
children: [
|
|
2563
2648
|
item,
|
|
2564
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ jsx23(
|
|
2565
2650
|
"button",
|
|
2566
2651
|
{
|
|
2567
2652
|
...tabIndexProp,
|
|
@@ -2572,7 +2657,7 @@ function TextArrayInput({
|
|
|
2572
2657
|
},
|
|
2573
2658
|
className: "cursor-pointer rounded-full p-0.5 transition-colors duration-200 hover:bg-primary-foreground/20",
|
|
2574
2659
|
"aria-label": `Remove ${item}`,
|
|
2575
|
-
children: /* @__PURE__ */
|
|
2660
|
+
children: /* @__PURE__ */ jsx23(XIcon, { className: "h-3.5 w-3.5" })
|
|
2576
2661
|
}
|
|
2577
2662
|
)
|
|
2578
2663
|
]
|
|
@@ -2583,7 +2668,7 @@ function TextArrayInput({
|
|
|
2583
2668
|
}
|
|
2584
2669
|
|
|
2585
2670
|
// src/read-state/untrusted-count.tsx
|
|
2586
|
-
import { jsx as
|
|
2671
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2587
2672
|
function countReadState(input) {
|
|
2588
2673
|
const { read, trustworthy } = input;
|
|
2589
2674
|
if (trustworthy === false) return "failed";
|
|
@@ -2612,7 +2697,7 @@ function UntrustedCount({
|
|
|
2612
2697
|
const state = countReadState({ read, trustworthy });
|
|
2613
2698
|
if (state === "ready") {
|
|
2614
2699
|
if (countIsStale(read)) {
|
|
2615
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx24(
|
|
2616
2701
|
"span",
|
|
2617
2702
|
{
|
|
2618
2703
|
className,
|
|
@@ -2622,12 +2707,12 @@ function UntrustedCount({
|
|
|
2622
2707
|
}
|
|
2623
2708
|
);
|
|
2624
2709
|
}
|
|
2625
|
-
return /* @__PURE__ */
|
|
2710
|
+
return /* @__PURE__ */ jsx24("span", { className, children: value });
|
|
2626
2711
|
}
|
|
2627
2712
|
if (state === "loading") {
|
|
2628
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsx24("span", { className, "aria-busy": "true", "aria-label": `${label} loading`, children: "\u2026" });
|
|
2629
2714
|
}
|
|
2630
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsx24(
|
|
2631
2716
|
"span",
|
|
2632
2717
|
{
|
|
2633
2718
|
className,
|
|
@@ -2639,7 +2724,7 @@ function UntrustedCount({
|
|
|
2639
2724
|
}
|
|
2640
2725
|
|
|
2641
2726
|
// src/controls/kpi-tile.tsx
|
|
2642
|
-
import { Fragment as Fragment6, jsx as
|
|
2727
|
+
import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2643
2728
|
var TONE_VALUE = {
|
|
2644
2729
|
neutral: "text-foreground",
|
|
2645
2730
|
good: "text-success-ink",
|
|
@@ -2662,7 +2747,7 @@ function KpiSparkline({ trend, label }) {
|
|
|
2662
2747
|
const range = Math.max(max - min, Math.abs(max) * 0.1) || 1;
|
|
2663
2748
|
const y = (v) => max === min ? SPARK_H / 2 : SPARK_H - 2 - (v - min) / range * (SPARK_H - 4);
|
|
2664
2749
|
const pts = trend.values.map((v, i) => `${(i / (n - 1) * SPARK_W).toFixed(1)},${y(v).toFixed(1)}`).join(" ");
|
|
2665
|
-
return /* @__PURE__ */
|
|
2750
|
+
return /* @__PURE__ */ jsxs20(
|
|
2666
2751
|
"svg",
|
|
2667
2752
|
{
|
|
2668
2753
|
viewBox: `0 0 ${SPARK_W} ${SPARK_H}`,
|
|
@@ -2671,9 +2756,9 @@ function KpiSparkline({ trend, label }) {
|
|
|
2671
2756
|
"aria-label": `${trend.label ?? label}, last ${trend.period}`,
|
|
2672
2757
|
className: "h-5 w-16 shrink-0 text-primary",
|
|
2673
2758
|
children: [
|
|
2674
|
-
/* @__PURE__ */
|
|
2675
|
-
max === min ? null : /* @__PURE__ */
|
|
2676
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ jsx25("title", { children: `${trend.label ?? label}, last ${trend.period}` }),
|
|
2760
|
+
max === min ? null : /* @__PURE__ */ jsx25("polygon", { points: `0,${SPARK_H} ${pts} ${SPARK_W},${SPARK_H}`, fill: "currentColor", fillOpacity: 0.15 }),
|
|
2761
|
+
/* @__PURE__ */ jsx25("polyline", { points: pts, fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" })
|
|
2677
2762
|
]
|
|
2678
2763
|
}
|
|
2679
2764
|
);
|
|
@@ -2695,19 +2780,19 @@ function KpiTile({
|
|
|
2695
2780
|
const failed = readState === "failed";
|
|
2696
2781
|
const shown = failed ? null : value;
|
|
2697
2782
|
const dot = TONE_DOT[tone2];
|
|
2698
|
-
const body = /* @__PURE__ */
|
|
2699
|
-
/* @__PURE__ */
|
|
2700
|
-
dot ? /* @__PURE__ */
|
|
2701
|
-
/* @__PURE__ */
|
|
2783
|
+
const body = /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
2784
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 items-start gap-1.5 type-meta font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
2785
|
+
dot ? /* @__PURE__ */ jsx25("span", { "aria-hidden": true, className: cn("mt-1 inline-block h-2 w-2 shrink-0 rounded-sm", dot) }) : null,
|
|
2786
|
+
/* @__PURE__ */ jsxs20("span", { className: "line-clamp-2 break-words", children: [
|
|
2702
2787
|
label,
|
|
2703
|
-
title ? /* @__PURE__ */
|
|
2788
|
+
title ? /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
2704
2789
|
" ",
|
|
2705
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx25(InfoHint, { text: title, label: `What ${label} means` })
|
|
2706
2791
|
] }) : null
|
|
2707
2792
|
] })
|
|
2708
2793
|
] }),
|
|
2709
|
-
loading ? /* @__PURE__ */
|
|
2710
|
-
/* @__PURE__ */
|
|
2794
|
+
loading ? /* @__PURE__ */ jsx25("div", { className: "my-0.5 h-6 w-12 animate-pulse rounded bg-muted", "aria-hidden": true }) : /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 items-end justify-between gap-2", children: [
|
|
2795
|
+
/* @__PURE__ */ jsx25(
|
|
2711
2796
|
"div",
|
|
2712
2797
|
{
|
|
2713
2798
|
className: cn(
|
|
@@ -2719,16 +2804,16 @@ function KpiTile({
|
|
|
2719
2804
|
children: shown === null ? "\u2014" : shown
|
|
2720
2805
|
}
|
|
2721
2806
|
),
|
|
2722
|
-
trend && shown !== null ? /* @__PURE__ */
|
|
2807
|
+
trend && shown !== null ? /* @__PURE__ */ jsx25(KpiSparkline, { trend, label }) : null
|
|
2723
2808
|
] }),
|
|
2724
|
-
hint ? /* @__PURE__ */
|
|
2809
|
+
hint ? /* @__PURE__ */ jsx25("div", { className: "truncate type-meta text-muted-foreground", children: hint }) : null
|
|
2725
2810
|
] });
|
|
2726
2811
|
const shell = cn(
|
|
2727
2812
|
"flex min-w-0 flex-col gap-0.5 rounded-md border border-border bg-card px-3 py-2",
|
|
2728
2813
|
className
|
|
2729
2814
|
);
|
|
2730
2815
|
if (href && !loading && shown !== null) {
|
|
2731
|
-
return /* @__PURE__ */
|
|
2816
|
+
return /* @__PURE__ */ jsx25(
|
|
2732
2817
|
HostLink,
|
|
2733
2818
|
{
|
|
2734
2819
|
href,
|
|
@@ -2741,13 +2826,13 @@ function KpiTile({
|
|
|
2741
2826
|
}
|
|
2742
2827
|
);
|
|
2743
2828
|
}
|
|
2744
|
-
return /* @__PURE__ */
|
|
2829
|
+
return /* @__PURE__ */ jsx25("div", { className: shell, "data-look-surface": "card", "aria-busy": loading || void 0, children: body });
|
|
2745
2830
|
}
|
|
2746
2831
|
function KpiGrid({
|
|
2747
2832
|
children,
|
|
2748
2833
|
className
|
|
2749
2834
|
}) {
|
|
2750
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ jsx25(
|
|
2751
2836
|
"div",
|
|
2752
2837
|
{
|
|
2753
2838
|
className: cn(
|
|
@@ -2761,7 +2846,7 @@ function KpiGrid({
|
|
|
2761
2846
|
|
|
2762
2847
|
// src/controls/action-feedback-button.tsx
|
|
2763
2848
|
import * as React9 from "react";
|
|
2764
|
-
import { jsx as
|
|
2849
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2765
2850
|
function ActionFeedbackButton({
|
|
2766
2851
|
icon,
|
|
2767
2852
|
tooltip,
|
|
@@ -2787,11 +2872,11 @@ function ActionFeedbackButton({
|
|
|
2787
2872
|
timer.current = setTimeout(() => setShowSuccess(false), feedbackDuration);
|
|
2788
2873
|
};
|
|
2789
2874
|
const text = showSuccess ? successTooltip : disabled && disabledTooltip ? disabledTooltip : tooltip;
|
|
2790
|
-
const button = /* @__PURE__ */
|
|
2875
|
+
const button = /* @__PURE__ */ jsx26(
|
|
2791
2876
|
Button2,
|
|
2792
2877
|
{
|
|
2793
2878
|
variant,
|
|
2794
|
-
icon: showSuccess ? successIcon ?? /* @__PURE__ */
|
|
2879
|
+
icon: showSuccess ? successIcon ?? /* @__PURE__ */ jsx26(CheckCircle2Icon, {}) : icon,
|
|
2795
2880
|
...showSuccess ? { glyphTone: "success" } : glyphTone ? { glyphTone } : {},
|
|
2796
2881
|
...props,
|
|
2797
2882
|
"aria-label": text,
|
|
@@ -2799,15 +2884,15 @@ function ActionFeedbackButton({
|
|
|
2799
2884
|
onClick: handleClick
|
|
2800
2885
|
}
|
|
2801
2886
|
);
|
|
2802
|
-
return /* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
2887
|
+
return /* @__PURE__ */ jsxs21(Tooltip, { children: [
|
|
2888
|
+
/* @__PURE__ */ jsx26(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ jsx26("span", { className: "inline-flex", children: button }) : button }),
|
|
2889
|
+
/* @__PURE__ */ jsx26(TooltipContent, { side: "bottom", sideOffset: 5, className: "z-[9999]", children: text })
|
|
2805
2890
|
] });
|
|
2806
2891
|
}
|
|
2807
2892
|
|
|
2808
2893
|
// src/controls/citation-chip.tsx
|
|
2809
2894
|
import { useState as useState13 } from "react";
|
|
2810
|
-
import { jsx as
|
|
2895
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2811
2896
|
function CitationPopoverBody({
|
|
2812
2897
|
icon: Icon,
|
|
2813
2898
|
label,
|
|
@@ -2817,32 +2902,32 @@ function CitationPopoverBody({
|
|
|
2817
2902
|
onOpen,
|
|
2818
2903
|
openLabel = "Open source"
|
|
2819
2904
|
}) {
|
|
2820
|
-
return /* @__PURE__ */
|
|
2821
|
-
/* @__PURE__ */
|
|
2822
|
-
/* @__PURE__ */
|
|
2905
|
+
return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-2", children: [
|
|
2906
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-start gap-2", children: [
|
|
2907
|
+
/* @__PURE__ */ jsx27(
|
|
2823
2908
|
Icon,
|
|
2824
2909
|
{
|
|
2825
2910
|
className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground",
|
|
2826
2911
|
"aria-hidden": true
|
|
2827
2912
|
}
|
|
2828
2913
|
),
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
locator && /* @__PURE__ */
|
|
2914
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0", children: [
|
|
2915
|
+
/* @__PURE__ */ jsx27("p", { className: "truncate type-title text-foreground", children: label }),
|
|
2916
|
+
locator && /* @__PURE__ */ jsx27("p", { className: "type-secondary text-muted-foreground", children: locator })
|
|
2832
2917
|
] })
|
|
2833
2918
|
] }),
|
|
2834
|
-
excerpt && /* @__PURE__ */
|
|
2835
|
-
/* @__PURE__ */
|
|
2836
|
-
/* @__PURE__ */
|
|
2919
|
+
excerpt && /* @__PURE__ */ jsxs22("blockquote", { className: "flex gap-2 rounded-md bg-muted/60 p-2 type-secondary italic text-muted-foreground", children: [
|
|
2920
|
+
/* @__PURE__ */ jsx27(QuoteIcon, { className: "h-3 w-3 shrink-0", "aria-hidden": true }),
|
|
2921
|
+
/* @__PURE__ */ jsx27("span", { className: cn("not-italic", clampExcerpt && "line-clamp-6"), children: excerpt })
|
|
2837
2922
|
] }),
|
|
2838
|
-
onOpen && /* @__PURE__ */
|
|
2923
|
+
onOpen && /* @__PURE__ */ jsxs22(
|
|
2839
2924
|
"button",
|
|
2840
2925
|
{
|
|
2841
2926
|
type: "button",
|
|
2842
2927
|
onClick: onOpen,
|
|
2843
2928
|
className: "inline-flex items-center gap-1 self-start text-xs font-medium text-primary hover:underline",
|
|
2844
2929
|
children: [
|
|
2845
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ jsx27(ArrowUpRightIcon, { className: "h-3 w-3", "aria-hidden": true }),
|
|
2846
2931
|
openLabel
|
|
2847
2932
|
]
|
|
2848
2933
|
}
|
|
@@ -2862,8 +2947,8 @@ function CitationChip({
|
|
|
2862
2947
|
setOpen(false);
|
|
2863
2948
|
body.onOpen?.();
|
|
2864
2949
|
} : void 0;
|
|
2865
|
-
return /* @__PURE__ */
|
|
2866
|
-
/* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ jsxs22(Popover, { open, onOpenChange: setOpen, children: [
|
|
2951
|
+
/* @__PURE__ */ jsx27(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
|
|
2867
2952
|
"button",
|
|
2868
2953
|
{
|
|
2869
2954
|
type: "button",
|
|
@@ -2873,20 +2958,20 @@ function CitationChip({
|
|
|
2873
2958
|
chipClassName
|
|
2874
2959
|
),
|
|
2875
2960
|
children: [
|
|
2876
|
-
number != null && /* @__PURE__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2878
|
-
/* @__PURE__ */
|
|
2879
|
-
chipSuffix && /* @__PURE__ */
|
|
2961
|
+
number != null && /* @__PURE__ */ jsx27("span", { className: "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-muted px-1 text-[0.65rem] font-medium leading-none text-muted-foreground", children: number }),
|
|
2962
|
+
/* @__PURE__ */ jsx27(Icon, { className: "h-3 w-3 shrink-0 text-muted-foreground", "aria-hidden": true }),
|
|
2963
|
+
/* @__PURE__ */ jsx27("span", { className: "truncate", children: label }),
|
|
2964
|
+
chipSuffix && /* @__PURE__ */ jsx27("span", { className: "shrink-0 text-muted-foreground", children: chipSuffix })
|
|
2880
2965
|
]
|
|
2881
2966
|
}
|
|
2882
2967
|
) }),
|
|
2883
|
-
/* @__PURE__ */
|
|
2968
|
+
/* @__PURE__ */ jsx27(PopoverContent, { sizing: "content", align: "start", className: "p-3", children: /* @__PURE__ */ jsx27(CitationPopoverBody, { ...body, onOpen }) })
|
|
2884
2969
|
] });
|
|
2885
2970
|
}
|
|
2886
2971
|
|
|
2887
2972
|
// src/controls/tool-rail.tsx
|
|
2888
2973
|
import * as React10 from "react";
|
|
2889
|
-
import { jsx as
|
|
2974
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2890
2975
|
function ToolRail({
|
|
2891
2976
|
groups,
|
|
2892
2977
|
value,
|
|
@@ -2926,7 +3011,7 @@ function ToolRail({
|
|
|
2926
3011
|
focusAt(enabled[enabled.length - 1]?.id);
|
|
2927
3012
|
}
|
|
2928
3013
|
};
|
|
2929
|
-
return /* @__PURE__ */
|
|
3014
|
+
return /* @__PURE__ */ jsx28(
|
|
2930
3015
|
"div",
|
|
2931
3016
|
{
|
|
2932
3017
|
role: "toolbar",
|
|
@@ -2935,8 +3020,8 @@ function ToolRail({
|
|
|
2935
3020
|
"data-matrx-tool-rail": "",
|
|
2936
3021
|
"data-orientation": orientation,
|
|
2937
3022
|
className: cn("flex w-fit shrink-0 items-center gap-1", vertical ? "flex-col" : "flex-row", className),
|
|
2938
|
-
children: groups.map((group, gi) => /* @__PURE__ */
|
|
2939
|
-
gi > 0 ? /* @__PURE__ */
|
|
3023
|
+
children: groups.map((group, gi) => /* @__PURE__ */ jsxs23(React10.Fragment, { children: [
|
|
3024
|
+
gi > 0 ? /* @__PURE__ */ jsx28(
|
|
2940
3025
|
"div",
|
|
2941
3026
|
{
|
|
2942
3027
|
role: "separator",
|
|
@@ -2948,8 +3033,8 @@ function ToolRail({
|
|
|
2948
3033
|
const on = tool.id === value;
|
|
2949
3034
|
const Icon = tool.icon;
|
|
2950
3035
|
const name = tool.shortcut ? `${tool.label} (${tool.shortcut})` : tool.label;
|
|
2951
|
-
return /* @__PURE__ */
|
|
2952
|
-
/* @__PURE__ */
|
|
3036
|
+
return /* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
3037
|
+
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
|
|
2953
3038
|
Button2,
|
|
2954
3039
|
{
|
|
2955
3040
|
ref: (el) => {
|
|
@@ -2957,7 +3042,7 @@ function ToolRail({
|
|
|
2957
3042
|
else refs.current.delete(tool.id);
|
|
2958
3043
|
},
|
|
2959
3044
|
variant: on ? "primary" : "quiet",
|
|
2960
|
-
icon: /* @__PURE__ */
|
|
3045
|
+
icon: /* @__PURE__ */ jsx28(Icon, {}),
|
|
2961
3046
|
"aria-label": name,
|
|
2962
3047
|
pressed: on,
|
|
2963
3048
|
disabled: tool.disabled,
|
|
@@ -2968,7 +3053,7 @@ function ToolRail({
|
|
|
2968
3053
|
onClick: () => onValueChange(on && allowDeselect ? null : tool.id, tool)
|
|
2969
3054
|
}
|
|
2970
3055
|
) }),
|
|
2971
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ jsx28(TooltipContent, { side: vertical ? "right" : "bottom", sideOffset: 6, children: name })
|
|
2972
3057
|
] }, tool.id);
|
|
2973
3058
|
})
|
|
2974
3059
|
] }, gi))
|
|
@@ -3048,7 +3133,7 @@ function formatPageRanges(pages) {
|
|
|
3048
3133
|
}
|
|
3049
3134
|
|
|
3050
3135
|
// src/controls/page-range-input.tsx
|
|
3051
|
-
import { jsx as
|
|
3136
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3052
3137
|
function PageRangeInput({
|
|
3053
3138
|
value,
|
|
3054
3139
|
onChange,
|
|
@@ -3065,8 +3150,8 @@ function PageRangeInput({
|
|
|
3065
3150
|
const parsed = React11.useMemo(() => parsePageRanges(value, pageCount), [value, pageCount]);
|
|
3066
3151
|
const first = parsed.issues[0];
|
|
3067
3152
|
const hint = parsed.empty ? `${pageCount} page${pageCount === 1 ? "" : "s"}` : first ? first.hint : `${parsed.pages.length} page${parsed.pages.length === 1 ? "" : "s"}: ${formatPageRanges(parsed.pages)}`;
|
|
3068
|
-
return /* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3153
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn("flex min-w-0 flex-col gap-1", className), "data-matrx-page-range-input": "", children: [
|
|
3154
|
+
/* @__PURE__ */ jsx29(
|
|
3070
3155
|
Input,
|
|
3071
3156
|
{
|
|
3072
3157
|
id,
|
|
@@ -3085,7 +3170,7 @@ function PageRangeInput({
|
|
|
3085
3170
|
}
|
|
3086
3171
|
}
|
|
3087
3172
|
),
|
|
3088
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsx29(
|
|
3089
3174
|
"p",
|
|
3090
3175
|
{
|
|
3091
3176
|
id: hintId,
|
|
@@ -3100,7 +3185,7 @@ function PageRangeInput({
|
|
|
3100
3185
|
|
|
3101
3186
|
// src/controls/opacity-slider.tsx
|
|
3102
3187
|
import * as React12 from "react";
|
|
3103
|
-
import { jsx as
|
|
3188
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3104
3189
|
var clamp = (n, lo, hi) => Math.min(hi, Math.max(lo, n));
|
|
3105
3190
|
var toPercent = (v) => Math.round(v * 100);
|
|
3106
3191
|
function OpacitySlider({
|
|
@@ -3120,8 +3205,8 @@ function OpacitySlider({
|
|
|
3120
3205
|
}
|
|
3121
3206
|
setDraft(null);
|
|
3122
3207
|
};
|
|
3123
|
-
return /* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3208
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn("flex min-w-0 items-center gap-2", className), "data-matrx-opacity-slider": "", children: [
|
|
3209
|
+
/* @__PURE__ */ jsx30(
|
|
3125
3210
|
Slider,
|
|
3126
3211
|
{
|
|
3127
3212
|
className: "min-w-0 flex-1",
|
|
@@ -3134,8 +3219,8 @@ function OpacitySlider({
|
|
|
3134
3219
|
onValueChange: ([v]) => onChange(clamp((v ?? 0) / 100, min, max))
|
|
3135
3220
|
}
|
|
3136
3221
|
),
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3222
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex w-16 shrink-0 items-center gap-1", style: { ["--matrx-control-field-min"]: "0px" }, children: [
|
|
3223
|
+
/* @__PURE__ */ jsx30(
|
|
3139
3224
|
Input,
|
|
3140
3225
|
{
|
|
3141
3226
|
numeric: true,
|
|
@@ -3154,14 +3239,14 @@ function OpacitySlider({
|
|
|
3154
3239
|
}
|
|
3155
3240
|
}
|
|
3156
3241
|
),
|
|
3157
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ jsx30("span", { "aria-hidden": true, className: "text-xs text-muted-foreground", children: "%" })
|
|
3158
3243
|
] })
|
|
3159
3244
|
] });
|
|
3160
3245
|
}
|
|
3161
3246
|
|
|
3162
3247
|
// src/controls/color-swatch-row.tsx
|
|
3163
3248
|
import * as React13 from "react";
|
|
3164
|
-
import { jsx as
|
|
3249
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3165
3250
|
function ColorSwatchRow({
|
|
3166
3251
|
colors,
|
|
3167
3252
|
value,
|
|
@@ -3180,7 +3265,7 @@ function ColorSwatchRow({
|
|
|
3180
3265
|
refs.current[i]?.focus();
|
|
3181
3266
|
onChange(c.value, c);
|
|
3182
3267
|
};
|
|
3183
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ jsx31(
|
|
3184
3269
|
"div",
|
|
3185
3270
|
{
|
|
3186
3271
|
role: "radiogroup",
|
|
@@ -3190,7 +3275,7 @@ function ColorSwatchRow({
|
|
|
3190
3275
|
"data-matrx-color-swatch-row": "",
|
|
3191
3276
|
children: colors.map((c, i) => {
|
|
3192
3277
|
const on = i === chosen;
|
|
3193
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ jsx31(
|
|
3194
3279
|
"button",
|
|
3195
3280
|
{
|
|
3196
3281
|
ref: (el) => {
|
|
@@ -3228,7 +3313,7 @@ function ColorSwatchRow({
|
|
|
3228
3313
|
on && "ring-2 ring-foreground ring-offset-1 ring-offset-background"
|
|
3229
3314
|
),
|
|
3230
3315
|
style: { backgroundColor: c.value },
|
|
3231
|
-
children: on ? /* @__PURE__ */
|
|
3316
|
+
children: on ? /* @__PURE__ */ jsx31(RadixCheckIcon, { className: "size-3 mix-blend-difference text-white" }) : null
|
|
3232
3317
|
},
|
|
3233
3318
|
`${c.value}-${i}`
|
|
3234
3319
|
);
|
|
@@ -3239,7 +3324,7 @@ function ColorSwatchRow({
|
|
|
3239
3324
|
|
|
3240
3325
|
// src/controls/anchored-toolbar.tsx
|
|
3241
3326
|
import * as React14 from "react";
|
|
3242
|
-
import { jsx as
|
|
3327
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3243
3328
|
function virtualFor(rect) {
|
|
3244
3329
|
return {
|
|
3245
3330
|
getBoundingClientRect: () => ({
|
|
@@ -3272,9 +3357,9 @@ function AnchoredToolbar({
|
|
|
3272
3357
|
[x, y, w, h]
|
|
3273
3358
|
);
|
|
3274
3359
|
const visible = open && rect !== null;
|
|
3275
|
-
return /* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3277
|
-
/* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ jsxs26(Popover, { open: visible, ...onOpenChange ? { onOpenChange } : {}, children: [
|
|
3361
|
+
/* @__PURE__ */ jsx32(PopoverAnchor, { virtualRef }),
|
|
3362
|
+
/* @__PURE__ */ jsx32(
|
|
3278
3363
|
PopoverContent,
|
|
3279
3364
|
{
|
|
3280
3365
|
role: "toolbar",
|
|
@@ -3299,7 +3384,7 @@ function AnchoredToolbar({
|
|
|
3299
3384
|
// src/controls/icon-select.tsx
|
|
3300
3385
|
import * as React15 from "react";
|
|
3301
3386
|
import { openOutbound } from "@ai-matrx/kit/outbound";
|
|
3302
|
-
import { jsx as
|
|
3387
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3303
3388
|
function wantsNewTab(e) {
|
|
3304
3389
|
return Boolean(e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button === 1);
|
|
3305
3390
|
}
|
|
@@ -3309,7 +3394,7 @@ var TRIGGER_SIZE = {
|
|
|
3309
3394
|
};
|
|
3310
3395
|
var TRIGGER_FACE = "h-7 w-7 justify-center border-none bg-muted px-0 focus:outline-none focus:ring-0";
|
|
3311
3396
|
var IconSelectTrigger = React15.forwardRef(function IconSelectTrigger2({ icon, disabled, ariaLabel, size = "default", className, ...rest }, ref) {
|
|
3312
|
-
return /* @__PURE__ */
|
|
3397
|
+
return /* @__PURE__ */ jsx33(
|
|
3313
3398
|
Button2,
|
|
3314
3399
|
{
|
|
3315
3400
|
ref,
|
|
@@ -3337,13 +3422,13 @@ function IconSelect({
|
|
|
3337
3422
|
const [open, setOpen] = React15.useState(false);
|
|
3338
3423
|
const skipSelectRef = React15.useRef(false);
|
|
3339
3424
|
if (searchable) {
|
|
3340
|
-
return /* @__PURE__ */
|
|
3341
|
-
/* @__PURE__ */
|
|
3342
|
-
/* @__PURE__ */
|
|
3343
|
-
/* @__PURE__ */
|
|
3344
|
-
/* @__PURE__ */
|
|
3345
|
-
/* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ jsxs27(Popover, { open, onOpenChange: setOpen, children: [
|
|
3426
|
+
/* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(IconSelectTrigger, { icon, disabled, ariaLabel, size, className }) }),
|
|
3427
|
+
/* @__PURE__ */ jsx33(PopoverContent, { sizing: "content", className: "p-0", align: "start", children: /* @__PURE__ */ jsxs27(Command, { children: [
|
|
3428
|
+
/* @__PURE__ */ jsx33(CommandInput, { placeholder: searchPlaceholder, className: "h-9 text-sm" }),
|
|
3429
|
+
/* @__PURE__ */ jsxs27(CommandList, { children: [
|
|
3430
|
+
/* @__PURE__ */ jsx33(CommandEmpty, { children: "No results found." }),
|
|
3431
|
+
/* @__PURE__ */ jsx33(CommandGroup, { className: "max-h-72 overflow-auto", children: items.map((item) => /* @__PURE__ */ jsx33(
|
|
3347
3432
|
CommandItem,
|
|
3348
3433
|
{
|
|
3349
3434
|
value: item.label,
|
|
@@ -3363,8 +3448,8 @@ function IconSelect({
|
|
|
3363
3448
|
onValueChange?.(item.value);
|
|
3364
3449
|
setOpen(false);
|
|
3365
3450
|
},
|
|
3366
|
-
children: /* @__PURE__ */
|
|
3367
|
-
item.icon && /* @__PURE__ */
|
|
3451
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "flex items-center", children: [
|
|
3452
|
+
item.icon && /* @__PURE__ */ jsx33("span", { className: "mr-2", children: item.icon }),
|
|
3368
3453
|
item.label
|
|
3369
3454
|
] })
|
|
3370
3455
|
},
|
|
@@ -3374,8 +3459,8 @@ function IconSelect({
|
|
|
3374
3459
|
] }) })
|
|
3375
3460
|
] });
|
|
3376
3461
|
}
|
|
3377
|
-
return /* @__PURE__ */
|
|
3378
|
-
/* @__PURE__ */
|
|
3462
|
+
return /* @__PURE__ */ jsxs27(Select, { ...value === void 0 ? {} : { value }, ...onValueChange ? { onValueChange } : {}, disabled, children: [
|
|
3463
|
+
/* @__PURE__ */ jsx33(
|
|
3379
3464
|
SelectTrigger,
|
|
3380
3465
|
{
|
|
3381
3466
|
"aria-label": ariaLabel,
|
|
@@ -3384,7 +3469,7 @@ function IconSelect({
|
|
|
3384
3469
|
children: icon
|
|
3385
3470
|
}
|
|
3386
3471
|
),
|
|
3387
|
-
/* @__PURE__ */
|
|
3472
|
+
/* @__PURE__ */ jsx33(SelectContent, { children: /* @__PURE__ */ jsx33(SelectGroup, { children: items.map((item) => /* @__PURE__ */ jsx33(
|
|
3388
3473
|
SelectItem,
|
|
3389
3474
|
{
|
|
3390
3475
|
value: item.value,
|
|
@@ -3394,8 +3479,8 @@ function IconSelect({
|
|
|
3394
3479
|
openOutbound(item.href, "_blank", "noopener");
|
|
3395
3480
|
}
|
|
3396
3481
|
},
|
|
3397
|
-
children: /* @__PURE__ */
|
|
3398
|
-
item.icon && /* @__PURE__ */
|
|
3482
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "flex items-center", children: [
|
|
3483
|
+
item.icon && /* @__PURE__ */ jsx33("span", { className: "mr-2", children: item.icon }),
|
|
3399
3484
|
item.label
|
|
3400
3485
|
] })
|
|
3401
3486
|
},
|
|
@@ -3411,7 +3496,7 @@ import { openClipboardFallback as openClipboardFallback3 } from "@ai-matrx/kit/c
|
|
|
3411
3496
|
import { toast as toast3 } from "@ai-matrx/kit/notify";
|
|
3412
3497
|
|
|
3413
3498
|
// src/icon-button.tsx
|
|
3414
|
-
import { jsx as
|
|
3499
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3415
3500
|
var VARIANT = {
|
|
3416
3501
|
ghost: "quiet",
|
|
3417
3502
|
outline: "outline",
|
|
@@ -3432,25 +3517,25 @@ function IconButton({
|
|
|
3432
3517
|
"aria-label": ariaLabel,
|
|
3433
3518
|
...props
|
|
3434
3519
|
}) {
|
|
3435
|
-
const control = /* @__PURE__ */
|
|
3520
|
+
const control = /* @__PURE__ */ jsx34(
|
|
3436
3521
|
Button2,
|
|
3437
3522
|
{
|
|
3438
3523
|
variant: VARIANT[variant],
|
|
3439
|
-
icon: spinning ? /* @__PURE__ */
|
|
3524
|
+
icon: spinning ? /* @__PURE__ */ jsx34(Icon, { className: MOTION_SPIN }) : /* @__PURE__ */ jsx34(Icon, {}),
|
|
3440
3525
|
...glyphTone ? { glyphTone } : {},
|
|
3441
3526
|
"aria-label": ariaLabel ?? tooltip ?? "Action",
|
|
3442
3527
|
...props
|
|
3443
3528
|
}
|
|
3444
3529
|
);
|
|
3445
3530
|
if (!tooltip) return control;
|
|
3446
|
-
return /* @__PURE__ */
|
|
3447
|
-
/* @__PURE__ */
|
|
3448
|
-
/* @__PURE__ */
|
|
3531
|
+
return /* @__PURE__ */ jsxs28(Tooltip, { children: [
|
|
3532
|
+
/* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: control }),
|
|
3533
|
+
/* @__PURE__ */ jsx34(TooltipContent, { side: tooltipSide, align: tooltipAlign, className: "z-[9999]", sideOffset: tooltipOffset, children: tooltip })
|
|
3449
3534
|
] });
|
|
3450
3535
|
}
|
|
3451
3536
|
|
|
3452
3537
|
// src/controls/advanced-collapsible.tsx
|
|
3453
|
-
import { Fragment as Fragment8, jsx as
|
|
3538
|
+
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3454
3539
|
function AdvancedCollapsible({
|
|
3455
3540
|
icon,
|
|
3456
3541
|
title,
|
|
@@ -3490,29 +3575,29 @@ function AdvancedCollapsible({
|
|
|
3490
3575
|
if (!landed) void openClipboardFallback3(text);
|
|
3491
3576
|
else onCopy?.();
|
|
3492
3577
|
};
|
|
3493
|
-
const actions = /* @__PURE__ */
|
|
3494
|
-
onSave && /* @__PURE__ */
|
|
3578
|
+
const actions = /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-end gap-2", children: [
|
|
3579
|
+
onSave && /* @__PURE__ */ jsx35(
|
|
3495
3580
|
ActionFeedbackButton,
|
|
3496
3581
|
{
|
|
3497
|
-
icon: /* @__PURE__ */
|
|
3582
|
+
icon: /* @__PURE__ */ jsx35(SaveIcon, {}),
|
|
3498
3583
|
glyphTone: "info",
|
|
3499
3584
|
tooltip: saveTooltip,
|
|
3500
3585
|
successTooltip: "Saved!",
|
|
3501
3586
|
onClick: onSave
|
|
3502
3587
|
}
|
|
3503
3588
|
),
|
|
3504
|
-
onReset && /* @__PURE__ */
|
|
3589
|
+
onReset && /* @__PURE__ */ jsx35(
|
|
3505
3590
|
ActionFeedbackButton,
|
|
3506
3591
|
{
|
|
3507
|
-
icon: /* @__PURE__ */
|
|
3592
|
+
icon: /* @__PURE__ */ jsx35(RefreshCwIcon, {}),
|
|
3508
3593
|
glyphTone: "warning",
|
|
3509
3594
|
tooltip: resetTooltip,
|
|
3510
3595
|
successTooltip: "Reset!",
|
|
3511
3596
|
onClick: onReset
|
|
3512
3597
|
}
|
|
3513
3598
|
),
|
|
3514
|
-
/* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3599
|
+
/* @__PURE__ */ jsx35(IconButton, { icon: CopyIcon, tooltip: copyTooltip, onClick: () => void handleCopy() }),
|
|
3600
|
+
/* @__PURE__ */ jsx35(
|
|
3516
3601
|
IconButton,
|
|
3517
3602
|
{
|
|
3518
3603
|
icon: isFullScreen ? Minimize2Icon : Maximize2Icon,
|
|
@@ -3523,20 +3608,20 @@ function AdvancedCollapsible({
|
|
|
3523
3608
|
)
|
|
3524
3609
|
] });
|
|
3525
3610
|
const heading = typeof title === "string" ? title : "Content";
|
|
3526
|
-
return /* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
3611
|
+
return /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
3612
|
+
/* @__PURE__ */ jsxs29(
|
|
3528
3613
|
Collapsible,
|
|
3529
3614
|
{
|
|
3530
3615
|
open: isOpen,
|
|
3531
3616
|
onOpenChange: handleOpenChange,
|
|
3532
3617
|
className: cn("w-full rounded-xl border border-border shadow-sm", className),
|
|
3533
3618
|
children: [
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
/* @__PURE__ */
|
|
3619
|
+
/* @__PURE__ */ jsxs29(CollapsibleTrigger, { className: "relative flex w-full items-center justify-between rounded-t-xl px-4 py-3 font-medium hover:bg-muted", children: [
|
|
3620
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
3536
3621
|
icon,
|
|
3537
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
3622
|
+
typeof title === "string" ? /* @__PURE__ */ jsx35("span", { children: title }) : title
|
|
3538
3623
|
] }),
|
|
3539
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ jsx35(
|
|
3540
3625
|
ChevronDownIcon,
|
|
3541
3626
|
{
|
|
3542
3627
|
className: cn(
|
|
@@ -3546,27 +3631,27 @@ function AdvancedCollapsible({
|
|
|
3546
3631
|
}
|
|
3547
3632
|
)
|
|
3548
3633
|
] }),
|
|
3549
|
-
/* @__PURE__ */
|
|
3550
|
-
/* @__PURE__ */
|
|
3551
|
-
/* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
3634
|
+
/* @__PURE__ */ jsx35(CollapsibleContent, { children: /* @__PURE__ */ jsxs29("div", { className: "relative", children: [
|
|
3635
|
+
/* @__PURE__ */ jsx35("div", { className: "absolute left-8 right-8 top-0 h-px bg-border" }),
|
|
3636
|
+
/* @__PURE__ */ jsx35("div", { ref: contentRef, className: "p-4", children }),
|
|
3637
|
+
/* @__PURE__ */ jsx35("div", { className: "mb-1 mr-1 mt-2", children: actions })
|
|
3553
3638
|
] }) })
|
|
3554
3639
|
]
|
|
3555
3640
|
}
|
|
3556
3641
|
),
|
|
3557
|
-
/* @__PURE__ */
|
|
3558
|
-
/* @__PURE__ */
|
|
3559
|
-
/* @__PURE__ */
|
|
3560
|
-
fullScreenDescription ? /* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx35(Dialog, { open: isFullScreen, onOpenChange: setIsFullScreen, children: /* @__PURE__ */ jsxs29(DialogContent, { size: "full", height: "tall", children: [
|
|
3643
|
+
/* @__PURE__ */ jsxs29(DialogHeader, { children: [
|
|
3644
|
+
/* @__PURE__ */ jsx35(DialogTitle, { children: fullScreenTitle || heading }),
|
|
3645
|
+
fullScreenDescription ? /* @__PURE__ */ jsx35(DialogDescription, { children: fullScreenDescription }) : null
|
|
3561
3646
|
] }),
|
|
3562
3647
|
actions,
|
|
3563
|
-
/* @__PURE__ */
|
|
3648
|
+
/* @__PURE__ */ jsx35("div", { ref: fullRef, className: "min-h-0 flex-1 overflow-auto p-4", children })
|
|
3564
3649
|
] }) })
|
|
3565
3650
|
] });
|
|
3566
3651
|
}
|
|
3567
3652
|
|
|
3568
3653
|
// src/controls/empty-state-card.tsx
|
|
3569
|
-
import { jsx as
|
|
3654
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3570
3655
|
var TONE3 = {
|
|
3571
3656
|
primary: { data: "primary", button: "primary" },
|
|
3572
3657
|
success: { data: "success", button: "outline" }
|
|
@@ -3581,12 +3666,12 @@ function EmptyStateCard({
|
|
|
3581
3666
|
tone: tone2 = "primary"
|
|
3582
3667
|
}) {
|
|
3583
3668
|
const t = TONE3[tone2];
|
|
3584
|
-
return /* @__PURE__ */
|
|
3585
|
-
/* @__PURE__ */
|
|
3586
|
-
/* @__PURE__ */
|
|
3587
|
-
/* @__PURE__ */
|
|
3588
|
-
buttonText && /* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsxs30("div", { "data-tone": t.data, className: "matrx-hue-card flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
3670
|
+
/* @__PURE__ */ jsx36("div", { className: "matrx-hue-icon mb-6 rounded-full p-6", children: /* @__PURE__ */ jsx36(Icon, { className: "h-12 w-12", strokeWidth: 1.5 }) }),
|
|
3671
|
+
/* @__PURE__ */ jsx36("h3", { className: cn("mb-3 text-xl font-semibold", tone2 === "success" ? "text-success-ink" : "text-foreground"), children: title }),
|
|
3672
|
+
/* @__PURE__ */ jsx36("p", { className: "mb-8 max-w-md text-muted-foreground", children: description }),
|
|
3673
|
+
buttonText && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-4 sm:flex-row", children: [
|
|
3674
|
+
/* @__PURE__ */ jsx36(Button2, { variant: t.button, ...tone2 === "success" ? { tone: "success" } : {}, ...onButtonClick ? { onClick: onButtonClick } : {}, children: buttonText }),
|
|
3590
3675
|
secondaryButton
|
|
3591
3676
|
] })
|
|
3592
3677
|
] });
|
|
@@ -3594,7 +3679,7 @@ function EmptyStateCard({
|
|
|
3594
3679
|
|
|
3595
3680
|
// src/controls/hue-cards.tsx
|
|
3596
3681
|
import * as React17 from "react";
|
|
3597
|
-
import { Fragment as Fragment9, jsx as
|
|
3682
|
+
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3598
3683
|
var HUE_TONE = {
|
|
3599
3684
|
indigo: "indigo",
|
|
3600
3685
|
emerald: "emerald",
|
|
@@ -3628,7 +3713,7 @@ function Destination({
|
|
|
3628
3713
|
children
|
|
3629
3714
|
}) {
|
|
3630
3715
|
if (path) {
|
|
3631
|
-
return /* @__PURE__ */
|
|
3716
|
+
return /* @__PURE__ */ jsx37(
|
|
3632
3717
|
HostLink,
|
|
3633
3718
|
{
|
|
3634
3719
|
href: path,
|
|
@@ -3639,7 +3724,7 @@ function Destination({
|
|
|
3639
3724
|
}
|
|
3640
3725
|
);
|
|
3641
3726
|
}
|
|
3642
|
-
return /* @__PURE__ */
|
|
3727
|
+
return /* @__PURE__ */ jsx37("div", { ...className ? { className } : {}, ...onClick ? { onClick } : {}, children });
|
|
3643
3728
|
}
|
|
3644
3729
|
var SIZE_PADDING = {
|
|
3645
3730
|
xs: "p-3",
|
|
@@ -3662,19 +3747,19 @@ function HueCard({
|
|
|
3662
3747
|
external = false
|
|
3663
3748
|
}) {
|
|
3664
3749
|
if (compact) {
|
|
3665
|
-
return /* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsx37(Destination, { path, onClick, external, children: /* @__PURE__ */ jsxs31(
|
|
3666
3751
|
"div",
|
|
3667
3752
|
{
|
|
3668
3753
|
"data-tone": tone(color),
|
|
3669
3754
|
className: cn("matrx-hue-card flex cursor-pointer select-none flex-col items-center gap-1.5", className),
|
|
3670
3755
|
children: [
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
/* @__PURE__ */
|
|
3756
|
+
/* @__PURE__ */ jsx37("div", { className: "matrx-hue-squircle flex aspect-square w-full max-w-[62px] items-center justify-center rounded-[22%] shadow-sm transition-colors", children: sizedIcon(icon, 36) }),
|
|
3757
|
+
/* @__PURE__ */ jsx37("span", { className: "type-meta w-full truncate px-0.5 text-center font-medium leading-tight text-foreground", children: title })
|
|
3673
3758
|
]
|
|
3674
3759
|
}
|
|
3675
3760
|
) });
|
|
3676
3761
|
}
|
|
3677
|
-
return /* @__PURE__ */
|
|
3762
|
+
return /* @__PURE__ */ jsx37(Destination, { path, onClick, external, children: /* @__PURE__ */ jsx37(
|
|
3678
3763
|
"div",
|
|
3679
3764
|
{
|
|
3680
3765
|
"data-tone": tone(color),
|
|
@@ -3683,10 +3768,10 @@ function HueCard({
|
|
|
3683
3768
|
SIZE_PADDING[size],
|
|
3684
3769
|
className
|
|
3685
3770
|
),
|
|
3686
|
-
children: /* @__PURE__ */
|
|
3687
|
-
/* @__PURE__ */
|
|
3688
|
-
/* @__PURE__ */
|
|
3689
|
-
description && /* @__PURE__ */
|
|
3771
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center space-y-3 text-center", children: [
|
|
3772
|
+
/* @__PURE__ */ jsx37("div", { className: "matrx-hue-icon rounded-full p-3", children: sizedIcon(icon, 28) }),
|
|
3773
|
+
/* @__PURE__ */ jsx37("h3", { className: "text-lg font-semibold", children: title }),
|
|
3774
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-body text-muted-foreground", children: description }),
|
|
3690
3775
|
descriptionNode && !description && descriptionNode
|
|
3691
3776
|
] })
|
|
3692
3777
|
}
|
|
@@ -3713,12 +3798,12 @@ function HueGrid({
|
|
|
3713
3798
|
compact = false
|
|
3714
3799
|
}) {
|
|
3715
3800
|
const colsClass = compact ? "grid-cols-4" : GRID_COLUMNS[Math.min(6, Math.max(1, columns))];
|
|
3716
|
-
return /* @__PURE__ */
|
|
3717
|
-
title && /* @__PURE__ */
|
|
3718
|
-
description && /* @__PURE__ */
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
items.map((item, index) => /* @__PURE__ */
|
|
3721
|
-
showAddButton && /* @__PURE__ */
|
|
3801
|
+
return /* @__PURE__ */ jsxs31("div", { className, children: [
|
|
3802
|
+
title && /* @__PURE__ */ jsx37("h2", { className: "mb-4 text-base font-semibold", children: title }),
|
|
3803
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-body mb-4 text-muted-foreground", children: description }),
|
|
3804
|
+
/* @__PURE__ */ jsxs31("div", { className: cn("grid", compact ? "gap-2" : "gap-4", colsClass), children: [
|
|
3805
|
+
items.map((item, index) => /* @__PURE__ */ jsx37(HueCard, { ...item, compact, className: cn(cardClassName, item.className) }, `card-${index}`)),
|
|
3806
|
+
showAddButton && /* @__PURE__ */ jsxs31(
|
|
3722
3807
|
"button",
|
|
3723
3808
|
{
|
|
3724
3809
|
type: "button",
|
|
@@ -3728,8 +3813,8 @@ function HueGrid({
|
|
|
3728
3813
|
cardClassName
|
|
3729
3814
|
),
|
|
3730
3815
|
children: [
|
|
3731
|
-
/* @__PURE__ */
|
|
3732
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsx37("span", { className: "rounded-full bg-muted p-3 text-muted-foreground", children: /* @__PURE__ */ jsx37(PlusIcon, { className: "h-7 w-7" }) }),
|
|
3817
|
+
/* @__PURE__ */ jsx37("span", { className: "text-lg font-semibold", children: addButtonText })
|
|
3733
3818
|
]
|
|
3734
3819
|
}
|
|
3735
3820
|
)
|
|
@@ -3744,12 +3829,12 @@ function HueRow({
|
|
|
3744
3829
|
color,
|
|
3745
3830
|
path,
|
|
3746
3831
|
className,
|
|
3747
|
-
rightIcon = /* @__PURE__ */
|
|
3832
|
+
rightIcon = /* @__PURE__ */ jsx37(ChevronRightIcon, { className: "h-5 w-5 text-muted-foreground" }),
|
|
3748
3833
|
onClick,
|
|
3749
3834
|
showBorder = true,
|
|
3750
3835
|
isLast = false
|
|
3751
3836
|
}) {
|
|
3752
|
-
return /* @__PURE__ */
|
|
3837
|
+
return /* @__PURE__ */ jsx37(Destination, { path, onClick, children: /* @__PURE__ */ jsxs31(
|
|
3753
3838
|
"div",
|
|
3754
3839
|
{
|
|
3755
3840
|
"data-tone": tone(color),
|
|
@@ -3759,11 +3844,11 @@ function HueRow({
|
|
|
3759
3844
|
className
|
|
3760
3845
|
),
|
|
3761
3846
|
children: [
|
|
3762
|
-
/* @__PURE__ */
|
|
3763
|
-
/* @__PURE__ */
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3766
|
-
description && /* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center", children: [
|
|
3848
|
+
/* @__PURE__ */ jsx37("div", { className: "matrx-hue-icon mr-4 rounded-lg p-2", children: sizedIcon(icon, 20) }),
|
|
3849
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3850
|
+
/* @__PURE__ */ jsx37("h3", { className: "font-medium", children: title }),
|
|
3851
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-body text-muted-foreground", children: description }),
|
|
3767
3852
|
descriptionNode && !description && descriptionNode
|
|
3768
3853
|
] })
|
|
3769
3854
|
] }),
|
|
@@ -3781,7 +3866,7 @@ function HueList({
|
|
|
3781
3866
|
showBorders = true,
|
|
3782
3867
|
showContainer = true
|
|
3783
3868
|
}) {
|
|
3784
|
-
const rows = items.map((item, index) => /* @__PURE__ */
|
|
3869
|
+
const rows = items.map((item, index) => /* @__PURE__ */ jsx37(
|
|
3785
3870
|
HueRow,
|
|
3786
3871
|
{
|
|
3787
3872
|
...item,
|
|
@@ -3791,14 +3876,14 @@ function HueList({
|
|
|
3791
3876
|
},
|
|
3792
3877
|
`row-${index}`
|
|
3793
3878
|
));
|
|
3794
|
-
return /* @__PURE__ */
|
|
3795
|
-
title && /* @__PURE__ */
|
|
3796
|
-
description && /* @__PURE__ */
|
|
3797
|
-
showContainer ? /* @__PURE__ */
|
|
3879
|
+
return /* @__PURE__ */ jsxs31("div", { className, children: [
|
|
3880
|
+
title && /* @__PURE__ */ jsx37("h2", { className: "mb-4 text-base font-semibold", children: title }),
|
|
3881
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-body mb-4 text-muted-foreground", children: description }),
|
|
3882
|
+
showContainer ? /* @__PURE__ */ jsx37("div", { className: "rounded-xl bg-card shadow-md", children: rows }) : rows
|
|
3798
3883
|
] });
|
|
3799
3884
|
}
|
|
3800
3885
|
function IosWidget({ title, description, icon, color, path, badge, className, onClick }) {
|
|
3801
|
-
return /* @__PURE__ */
|
|
3886
|
+
return /* @__PURE__ */ jsx37(Destination, { path, onClick, className: "contents", children: /* @__PURE__ */ jsxs31(
|
|
3802
3887
|
"div",
|
|
3803
3888
|
{
|
|
3804
3889
|
"data-tone": tone(color),
|
|
@@ -3807,13 +3892,13 @@ function IosWidget({ title, description, icon, color, path, badge, className, on
|
|
|
3807
3892
|
className
|
|
3808
3893
|
),
|
|
3809
3894
|
children: [
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
badge && /* @__PURE__ */
|
|
3895
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-start justify-between", children: [
|
|
3896
|
+
/* @__PURE__ */ jsx37("div", { children: sizedIcon(icon, 32) }),
|
|
3897
|
+
badge && /* @__PURE__ */ jsx37("span", { className: "type-meta rounded-full bg-black/25 px-2 py-0.5 font-semibold leading-tight", children: badge })
|
|
3813
3898
|
] }),
|
|
3814
|
-
/* @__PURE__ */
|
|
3815
|
-
/* @__PURE__ */
|
|
3816
|
-
description && /* @__PURE__ */
|
|
3899
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3900
|
+
/* @__PURE__ */ jsx37("p", { className: "type-title line-clamp-2 leading-tight", children: title }),
|
|
3901
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-meta mt-0.5 line-clamp-2 leading-tight", children: description })
|
|
3817
3902
|
] })
|
|
3818
3903
|
]
|
|
3819
3904
|
}
|
|
@@ -3824,21 +3909,21 @@ function TileCard({ icon, title, description, onClick, href, className }) {
|
|
|
3824
3909
|
"flex h-64 cursor-pointer flex-col items-center justify-center space-y-6 rounded-xl border-2 border-border bg-muted p-4 text-xl transition-colors hover:border-primary hover:bg-accent",
|
|
3825
3910
|
className
|
|
3826
3911
|
);
|
|
3827
|
-
const content = /* @__PURE__ */
|
|
3828
|
-
icon && /* @__PURE__ */
|
|
3829
|
-
title && /* @__PURE__ */
|
|
3830
|
-
description && /* @__PURE__ */
|
|
3912
|
+
const content = /* @__PURE__ */ jsxs31(Fragment9, { children: [
|
|
3913
|
+
icon && /* @__PURE__ */ jsx37("div", { className: "h-12 w-12 text-primary-ink", children: icon }),
|
|
3914
|
+
title && /* @__PURE__ */ jsx37("span", { className: "font-medium text-primary-ink", children: title }),
|
|
3915
|
+
description && /* @__PURE__ */ jsx37("p", { className: "type-secondary mt-1 text-center text-muted-foreground", children: description })
|
|
3831
3916
|
] });
|
|
3832
|
-
return href ? /* @__PURE__ */
|
|
3917
|
+
return href ? /* @__PURE__ */ jsx37(HostLink, { href, className: face, children: content }) : /* @__PURE__ */ jsx37("div", { onClick, className: face, children: content });
|
|
3833
3918
|
}
|
|
3834
3919
|
var TILE_COLUMNS = { 1: "md:grid-cols-1", 2: "md:grid-cols-2", 3: "md:grid-cols-3", 4: "md:grid-cols-4" };
|
|
3835
3920
|
function TileCardGrid({ title, description, cards, columns = 2, className }) {
|
|
3836
|
-
return /* @__PURE__ */
|
|
3837
|
-
(title || description) && /* @__PURE__ */
|
|
3838
|
-
title && /* @__PURE__ */
|
|
3839
|
-
description && /* @__PURE__ */
|
|
3921
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn("w-full", className), children: [
|
|
3922
|
+
(title || description) && /* @__PURE__ */ jsxs31("div", { className: "pb-8 text-center", children: [
|
|
3923
|
+
title && /* @__PURE__ */ jsx37("h2", { className: "text-2xl font-bold text-foreground md:text-3xl", children: title }),
|
|
3924
|
+
description && /* @__PURE__ */ jsx37("p", { className: "mt-2 text-muted-foreground", children: description })
|
|
3840
3925
|
] }),
|
|
3841
|
-
/* @__PURE__ */
|
|
3926
|
+
/* @__PURE__ */ jsx37("div", { className: cn("grid grid-cols-1 gap-6", TILE_COLUMNS[columns] ?? TILE_COLUMNS[2]), children: cards.map((card, index) => /* @__PURE__ */ jsx37(TileCard, { ...card }, index)) })
|
|
3842
3927
|
] });
|
|
3843
3928
|
}
|
|
3844
3929
|
|
|
@@ -3861,6 +3946,10 @@ export {
|
|
|
3861
3946
|
NumberStepper,
|
|
3862
3947
|
stageStates,
|
|
3863
3948
|
StageSteps,
|
|
3949
|
+
ChecklistMark,
|
|
3950
|
+
Checklist,
|
|
3951
|
+
ChecklistItem,
|
|
3952
|
+
ChecklistMeter,
|
|
3864
3953
|
shownDraft,
|
|
3865
3954
|
clampDraft,
|
|
3866
3955
|
ClampedNumberInput,
|
|
@@ -3918,4 +4007,4 @@ export {
|
|
|
3918
4007
|
TileCard,
|
|
3919
4008
|
TileCardGrid
|
|
3920
4009
|
};
|
|
3921
|
-
//# sourceMappingURL=chunk-
|
|
4010
|
+
//# sourceMappingURL=chunk-UGQRAQTE.js.map
|