@orianatech/pire 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/core/IconButton.d.cts +12 -0
- package/dist/components/core/IconButton.d.ts +12 -0
- package/dist/components/core/IconButton.d.ts.map +1 -1
- package/dist/components/data/DataTable.d.cts +7 -1
- package/dist/components/data/DataTable.d.ts +7 -1
- package/dist/components/data/DataTable.d.ts.map +1 -1
- package/dist/components/forms/ComboBox.d.cts +30 -11
- package/dist/components/forms/ComboBox.d.ts +30 -11
- package/dist/components/forms/ComboBox.d.ts.map +1 -1
- package/dist/components/forms/MultiComboBox.d.cts +18 -9
- package/dist/components/forms/MultiComboBox.d.ts +18 -9
- package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
- package/dist/components/layout/PageBand.d.cts +15 -0
- package/dist/components/layout/PageBand.d.ts +16 -0
- package/dist/components/layout/PageBand.d.ts.map +1 -0
- package/dist/components.css +25 -0
- package/dist/i18n/messages.d.cts +4 -0
- package/dist/i18n/messages.d.ts +4 -0
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/index.cjs +365 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +449 -337
- package/dist/index.js.map +1 -1
- package/dist/tokens/base.css +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -64,6 +64,7 @@ __export(src_exports, {
|
|
|
64
64
|
MultiComboBox: () => MultiComboBox,
|
|
65
65
|
NumberField: () => NumberField,
|
|
66
66
|
ObjectHeader: () => ObjectHeader,
|
|
67
|
+
PageBand: () => PageBand,
|
|
67
68
|
PageHeader: () => PageHeader,
|
|
68
69
|
Pagination: () => Pagination,
|
|
69
70
|
PireIntlProvider: () => PireIntlProvider,
|
|
@@ -358,8 +359,21 @@ function Tooltip({ label, placement = "top", delay = 500, children }) {
|
|
|
358
359
|
|
|
359
360
|
// src/components/core/IconButton.tsx
|
|
360
361
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
361
|
-
var IconButton = React2.forwardRef(function IconButton2({
|
|
362
|
-
|
|
362
|
+
var IconButton = React2.forwardRef(function IconButton2({
|
|
363
|
+
icon,
|
|
364
|
+
label,
|
|
365
|
+
size = "md",
|
|
366
|
+
variant = "tertiary",
|
|
367
|
+
selected,
|
|
368
|
+
hideTooltip,
|
|
369
|
+
count,
|
|
370
|
+
countMax = 9,
|
|
371
|
+
countVariant = "number",
|
|
372
|
+
className,
|
|
373
|
+
...rest
|
|
374
|
+
}, ref) {
|
|
375
|
+
const showsCount = count != null && count > 0;
|
|
376
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
363
377
|
import_react_aria_components3.Button,
|
|
364
378
|
{
|
|
365
379
|
ref,
|
|
@@ -369,8 +383,12 @@ var IconButton = React2.forwardRef(function IconButton2({ icon, label, size = "m
|
|
|
369
383
|
"data-size": size,
|
|
370
384
|
"data-variant": variant,
|
|
371
385
|
"data-selected": selected ? "true" : void 0,
|
|
386
|
+
"data-has-count": showsCount ? "true" : void 0,
|
|
372
387
|
...rest,
|
|
373
|
-
children:
|
|
388
|
+
children: [
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: icon, size: size === "lg" ? 20 : 16 }),
|
|
390
|
+
showsCount ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "pire-iconbtn-count", "data-variant": countVariant, "aria-hidden": "true", children: countVariant === "number" ? count > countMax ? `${countMax}+` : count : null }) : null
|
|
391
|
+
]
|
|
374
392
|
}
|
|
375
393
|
);
|
|
376
394
|
return hideTooltip ? button : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Tooltip, { label, children: button });
|
|
@@ -867,12 +885,14 @@ var enMessages = {
|
|
|
867
885
|
filterBarClearAll: "Clear all",
|
|
868
886
|
dataTableSelectAll: "Select all rows",
|
|
869
887
|
dataTableSelectRow: "Select row",
|
|
888
|
+
dataTableLoading: "Loading records",
|
|
870
889
|
dialogClose: "Close",
|
|
871
890
|
sidePanelClose: "Close panel",
|
|
872
891
|
inlineMessageDismiss: "Dismiss message",
|
|
873
892
|
toastDismiss: "Dismiss",
|
|
874
893
|
toastRegionLabel: "Notifications",
|
|
875
894
|
comboBoxShowSuggestions: "Show suggestions",
|
|
895
|
+
comboBoxLoading: "Searching\u2026",
|
|
876
896
|
datePickerOpenCalendar: "Open calendar",
|
|
877
897
|
datePickerPreviousMonth: "Previous month",
|
|
878
898
|
datePickerNextMonth: "Next month",
|
|
@@ -897,12 +917,14 @@ var esMessages = {
|
|
|
897
917
|
filterBarClearAll: "Limpiar todo",
|
|
898
918
|
dataTableSelectAll: "Seleccionar todas las filas",
|
|
899
919
|
dataTableSelectRow: "Seleccionar fila",
|
|
920
|
+
dataTableLoading: "Cargando registros",
|
|
900
921
|
dialogClose: "Cerrar",
|
|
901
922
|
sidePanelClose: "Cerrar panel",
|
|
902
923
|
inlineMessageDismiss: "Descartar mensaje",
|
|
903
924
|
toastDismiss: "Descartar",
|
|
904
925
|
toastRegionLabel: "Notificaciones",
|
|
905
926
|
comboBoxShowSuggestions: "Mostrar sugerencias",
|
|
927
|
+
comboBoxLoading: "Buscando\u2026",
|
|
906
928
|
datePickerOpenCalendar: "Abrir calendario",
|
|
907
929
|
datePickerPreviousMonth: "Mes anterior",
|
|
908
930
|
datePickerNextMonth: "Mes siguiente",
|
|
@@ -954,12 +976,19 @@ function ComboBox({
|
|
|
954
976
|
errorMessage,
|
|
955
977
|
size = "md",
|
|
956
978
|
fullWidth = true,
|
|
979
|
+
isFilteredExternally,
|
|
980
|
+
isLoading,
|
|
981
|
+
loadingLabel,
|
|
982
|
+
emptyLabel,
|
|
983
|
+
onLoadMore,
|
|
957
984
|
className,
|
|
958
985
|
style,
|
|
959
986
|
...rest
|
|
960
987
|
}) {
|
|
961
988
|
const msg = usePireMessages();
|
|
962
989
|
const items = options.map(norm2);
|
|
990
|
+
const collection = isFilteredExternally ? { items } : { defaultItems: items };
|
|
991
|
+
const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
|
|
963
992
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
964
993
|
import_react_aria_components15.ComboBox,
|
|
965
994
|
{
|
|
@@ -967,9 +996,13 @@ function ComboBox({
|
|
|
967
996
|
style,
|
|
968
997
|
selectedKey: value,
|
|
969
998
|
defaultSelectedKey: defaultValue,
|
|
970
|
-
onSelectionChange: (k) =>
|
|
999
|
+
onSelectionChange: (k) => {
|
|
1000
|
+
if (isLoading) return;
|
|
1001
|
+
onChange?.(k == null ? null : String(k));
|
|
1002
|
+
},
|
|
971
1003
|
onInputChange,
|
|
972
|
-
|
|
1004
|
+
...collection,
|
|
1005
|
+
allowsEmptyCollection: isFilteredExternally || isLoading,
|
|
973
1006
|
menuTrigger: "input",
|
|
974
1007
|
validationBehavior: "aria",
|
|
975
1008
|
...rest,
|
|
@@ -994,10 +1027,21 @@ function ComboBox({
|
|
|
994
1027
|
),
|
|
995
1028
|
description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components15.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
996
1029
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components15.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
997
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components15.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components15.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1031
|
+
import_react_aria_components15.ListBox,
|
|
1032
|
+
{
|
|
1033
|
+
className: "pire-listbox",
|
|
1034
|
+
onScroll: onLoadMore ? (e) => {
|
|
1035
|
+
const el = e.currentTarget;
|
|
1036
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1037
|
+
} : void 0,
|
|
1038
|
+
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1039
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_aria_components15.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-option-label", children: item.label }),
|
|
1041
|
+
item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1042
|
+
] })
|
|
1043
|
+
}
|
|
1044
|
+
) })
|
|
1001
1045
|
]
|
|
1002
1046
|
}
|
|
1003
1047
|
);
|
|
@@ -1019,6 +1063,11 @@ function MultiComboBox({
|
|
|
1019
1063
|
errorMessage,
|
|
1020
1064
|
allowsCustomValue,
|
|
1021
1065
|
size = "md",
|
|
1066
|
+
isFilteredExternally,
|
|
1067
|
+
isLoading,
|
|
1068
|
+
loadingLabel,
|
|
1069
|
+
emptyLabel,
|
|
1070
|
+
onLoadMore,
|
|
1022
1071
|
fullWidth = true,
|
|
1023
1072
|
className,
|
|
1024
1073
|
style,
|
|
@@ -1026,6 +1075,8 @@ function MultiComboBox({
|
|
|
1026
1075
|
}) {
|
|
1027
1076
|
const msg = usePireMessages();
|
|
1028
1077
|
const items = React7.useMemo(() => options.map(norm3), [options]);
|
|
1078
|
+
const collection = isFilteredExternally ? { items } : { defaultItems: items };
|
|
1079
|
+
const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
|
|
1029
1080
|
const [uncontrolled, setUncontrolled] = React7.useState(defaultValue ?? []);
|
|
1030
1081
|
const [announcement, setAnnouncement] = React7.useState("");
|
|
1031
1082
|
const inputRef = React7.useRef(null);
|
|
@@ -1071,9 +1122,12 @@ function MultiComboBox({
|
|
|
1071
1122
|
style,
|
|
1072
1123
|
selectionMode: "multiple",
|
|
1073
1124
|
value: values,
|
|
1074
|
-
onChange: (keys) =>
|
|
1125
|
+
onChange: (keys) => {
|
|
1126
|
+
if (!isLoading) commit(keys.map(String));
|
|
1127
|
+
},
|
|
1075
1128
|
onInputChange,
|
|
1076
|
-
|
|
1129
|
+
...collection,
|
|
1130
|
+
allowsEmptyCollection: isFilteredExternally || isLoading,
|
|
1077
1131
|
menuTrigger: "input",
|
|
1078
1132
|
validationBehavior: "aria",
|
|
1079
1133
|
...rest,
|
|
@@ -1116,10 +1170,21 @@ function MultiComboBox({
|
|
|
1116
1170
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components16.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "aria-live": "polite", children: announcement }) }),
|
|
1117
1171
|
description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components16.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1118
1172
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components16.FieldError, { className: "pire-field-error", children: errorMessage }),
|
|
1119
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components16.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1173
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components16.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1174
|
+
import_react_aria_components16.ListBox,
|
|
1175
|
+
{
|
|
1176
|
+
className: "pire-listbox",
|
|
1177
|
+
onScroll: onLoadMore ? (e) => {
|
|
1178
|
+
const el = e.currentTarget;
|
|
1179
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1180
|
+
} : void 0,
|
|
1181
|
+
renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1182
|
+
children: (item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_aria_components16.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-option-label", children: item.label }),
|
|
1184
|
+
item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1185
|
+
] })
|
|
1186
|
+
}
|
|
1187
|
+
) })
|
|
1123
1188
|
]
|
|
1124
1189
|
}
|
|
1125
1190
|
);
|
|
@@ -1272,7 +1337,54 @@ function Dialog({
|
|
|
1272
1337
|
|
|
1273
1338
|
// src/components/data/DataTable.tsx
|
|
1274
1339
|
var import_react_aria_components20 = require("react-aria-components");
|
|
1340
|
+
|
|
1341
|
+
// src/components/feedback/Skeleton.tsx
|
|
1275
1342
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1343
|
+
function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1345
|
+
"div",
|
|
1346
|
+
{
|
|
1347
|
+
className: cx("pire-skeleton", className),
|
|
1348
|
+
"data-shape": shape,
|
|
1349
|
+
"aria-hidden": "true",
|
|
1350
|
+
style: { width, height, ...style },
|
|
1351
|
+
...rest
|
|
1352
|
+
}
|
|
1353
|
+
);
|
|
1354
|
+
}
|
|
1355
|
+
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
1356
|
+
function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
|
|
1357
|
+
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1359
|
+
"div",
|
|
1360
|
+
{
|
|
1361
|
+
className: cx("pire-skeleton-row", className),
|
|
1362
|
+
"data-density": density,
|
|
1363
|
+
"aria-hidden": "true",
|
|
1364
|
+
style,
|
|
1365
|
+
...rest,
|
|
1366
|
+
children: cells.map((c, i) => {
|
|
1367
|
+
const align = c.numeric ? "right" : c.align ?? "left";
|
|
1368
|
+
return (
|
|
1369
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1371
|
+
"div",
|
|
1372
|
+
{
|
|
1373
|
+
className: "pire-skeleton-cell",
|
|
1374
|
+
"data-align": align,
|
|
1375
|
+
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
1376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
1377
|
+
},
|
|
1378
|
+
i
|
|
1379
|
+
)
|
|
1380
|
+
);
|
|
1381
|
+
})
|
|
1382
|
+
}
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
// src/components/data/DataTable.tsx
|
|
1387
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1276
1388
|
function DataTable({
|
|
1277
1389
|
columns,
|
|
1278
1390
|
rows,
|
|
@@ -1285,6 +1397,9 @@ function DataTable({
|
|
|
1285
1397
|
onRowAction,
|
|
1286
1398
|
stickyHeader = true,
|
|
1287
1399
|
emptyLabel = "No records match the current filters.",
|
|
1400
|
+
isLoading,
|
|
1401
|
+
loadingRowCount,
|
|
1402
|
+
loadingLabel,
|
|
1288
1403
|
className,
|
|
1289
1404
|
style,
|
|
1290
1405
|
...rest
|
|
@@ -1295,70 +1410,91 @@ function DataTable({
|
|
|
1295
1410
|
if (keys === "all") return onSelectionChange?.(rows.map((r) => r.id));
|
|
1296
1411
|
onSelectionChange?.([...keys]);
|
|
1297
1412
|
};
|
|
1298
|
-
|
|
1299
|
-
|
|
1413
|
+
const skeletonRows = loadingRowCount ?? (rows.length || 5);
|
|
1414
|
+
const skeletonColumns = [
|
|
1415
|
+
...selectable ? [{ width: 44 }] : [],
|
|
1416
|
+
...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric }))
|
|
1417
|
+
];
|
|
1418
|
+
const body = isLoading ? [] : rows;
|
|
1419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1420
|
+
"div",
|
|
1300
1421
|
{
|
|
1301
|
-
className: "pire-table",
|
|
1302
|
-
|
|
1303
|
-
"data-
|
|
1304
|
-
"aria-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1422
|
+
className: cx("pire-table-wrap", className),
|
|
1423
|
+
style,
|
|
1424
|
+
"data-loading": isLoading ? "true" : void 0,
|
|
1425
|
+
"aria-busy": isLoading ? "true" : void 0,
|
|
1426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1427
|
+
import_react_aria_components20.Table,
|
|
1428
|
+
{
|
|
1429
|
+
className: "pire-table",
|
|
1430
|
+
"data-density": density,
|
|
1431
|
+
"data-sticky": String(stickyHeader),
|
|
1432
|
+
"aria-label": rest["aria-label"],
|
|
1433
|
+
selectionMode: selectable ? "multiple" : "none",
|
|
1434
|
+
selectedKeys: selected ? new Set(selected) : void 0,
|
|
1435
|
+
onSelectionChange: handleSelection,
|
|
1436
|
+
sortDescriptor,
|
|
1437
|
+
onSortChange: (d) => onSortChange?.({ key: String(d.column), dir: d.direction === "ascending" ? "asc" : "desc" }),
|
|
1438
|
+
onRowAction: onRowAction ? (key) => {
|
|
1439
|
+
const row = rows.find((r) => String(r.id) === String(key));
|
|
1440
|
+
if (row) onRowAction(row);
|
|
1441
|
+
} : void 0,
|
|
1442
|
+
children: [
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components20.TableHeader, { className: "pire-thead-row", children: [
|
|
1444
|
+
selectable ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.Column, { className: "pire-th", width: 44, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
|
|
1445
|
+
columns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1446
|
+
import_react_aria_components20.Column,
|
|
1447
|
+
{
|
|
1448
|
+
id: c.key,
|
|
1449
|
+
className: "pire-th",
|
|
1450
|
+
isRowHeader: i === 0 && !selectable,
|
|
1451
|
+
allowsSorting: c.sortable,
|
|
1452
|
+
width: c.width,
|
|
1453
|
+
"data-align": c.numeric || c.align === "right" ? "right" : c.align,
|
|
1454
|
+
"data-allows-sorting": c.sortable ? "true" : void 0,
|
|
1455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "pire-th-inner", children: [
|
|
1456
|
+
c.label,
|
|
1457
|
+
c.sortable ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1458
|
+
Icon,
|
|
1459
|
+
{
|
|
1460
|
+
size: 12,
|
|
1461
|
+
name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
|
|
1462
|
+
style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
|
|
1463
|
+
}
|
|
1464
|
+
) : null
|
|
1465
|
+
] })
|
|
1466
|
+
},
|
|
1467
|
+
c.key
|
|
1468
|
+
))
|
|
1469
|
+
] }),
|
|
1470
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
|
|
1472
|
+
Array.from({ length: skeletonRows }, (_, i) => (
|
|
1473
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
|
|
1475
|
+
))
|
|
1476
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pire-table-empty", children: emptyLabel }), children: body.map((row) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components20.Row, { id: row.id, className: "pire-tr", "data-pressable": onRowAction ? "true" : void 0, children: [
|
|
1477
|
+
selectable ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.Cell, { className: "pire-td", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
|
|
1478
|
+
columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1479
|
+
import_react_aria_components20.Cell,
|
|
1480
|
+
{
|
|
1481
|
+
className: "pire-td",
|
|
1482
|
+
"data-numeric": c.numeric ? "true" : void 0,
|
|
1483
|
+
style: { textAlign: c.align && !c.numeric ? c.align : void 0 },
|
|
1484
|
+
children: c.render ? c.render(row) : row[c.key]
|
|
1485
|
+
},
|
|
1486
|
+
c.key
|
|
1487
|
+
))
|
|
1488
|
+
] }, row.id)) })
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
)
|
|
1356
1492
|
}
|
|
1357
|
-
)
|
|
1493
|
+
);
|
|
1358
1494
|
}
|
|
1359
1495
|
|
|
1360
1496
|
// src/components/patterns/ValueHelpDialog.tsx
|
|
1361
|
-
var
|
|
1497
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1362
1498
|
function ValueHelpDialog({
|
|
1363
1499
|
isOpen,
|
|
1364
1500
|
title = "Select a record",
|
|
@@ -1379,16 +1515,16 @@ function ValueHelpDialog({
|
|
|
1379
1515
|
if (!q) return rows;
|
|
1380
1516
|
return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));
|
|
1381
1517
|
}, [rows, query]);
|
|
1382
|
-
return /* @__PURE__ */ (0,
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1383
1519
|
Dialog,
|
|
1384
1520
|
{
|
|
1385
1521
|
isOpen,
|
|
1386
1522
|
size: "lg",
|
|
1387
1523
|
title,
|
|
1388
1524
|
onClose,
|
|
1389
|
-
footer: /* @__PURE__ */ (0,
|
|
1390
|
-
children: /* @__PURE__ */ (0,
|
|
1391
|
-
/* @__PURE__ */ (0,
|
|
1525
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
|
|
1526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1392
1528
|
Input,
|
|
1393
1529
|
{
|
|
1394
1530
|
"aria-label": msg.valueHelpDialogSearch,
|
|
@@ -1400,7 +1536,7 @@ function ValueHelpDialog({
|
|
|
1400
1536
|
autoFocus: true
|
|
1401
1537
|
}
|
|
1402
1538
|
),
|
|
1403
|
-
/* @__PURE__ */ (0,
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1404
1540
|
DataTable,
|
|
1405
1541
|
{
|
|
1406
1542
|
"aria-label": typeof title === "string" ? title : "Records",
|
|
@@ -1420,7 +1556,7 @@ function ValueHelpDialog({
|
|
|
1420
1556
|
}
|
|
1421
1557
|
|
|
1422
1558
|
// src/components/forms/ValueHelpField.tsx
|
|
1423
|
-
var
|
|
1559
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1424
1560
|
var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
|
|
1425
1561
|
function ValueHelpField({
|
|
1426
1562
|
label,
|
|
@@ -1442,9 +1578,9 @@ function ValueHelpField({
|
|
|
1442
1578
|
}) {
|
|
1443
1579
|
const msg = usePireMessages();
|
|
1444
1580
|
const [open, setOpen] = React9.useState(false);
|
|
1445
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1447
|
-
/* @__PURE__ */ (0,
|
|
1581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cx(className), style, children: [
|
|
1582
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", gap: "var(--sp-2)", alignItems: "flex-end" }, children: [
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1448
1584
|
Input,
|
|
1449
1585
|
{
|
|
1450
1586
|
label,
|
|
@@ -1458,7 +1594,7 @@ function ValueHelpField({
|
|
|
1458
1594
|
errorMessage
|
|
1459
1595
|
}
|
|
1460
1596
|
),
|
|
1461
|
-
allowsClear && value ? /* @__PURE__ */ (0,
|
|
1597
|
+
allowsClear && value ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1462
1598
|
IconButton,
|
|
1463
1599
|
{
|
|
1464
1600
|
icon: "x",
|
|
@@ -1468,7 +1604,7 @@ function ValueHelpField({
|
|
|
1468
1604
|
onPress: () => onChange?.(null)
|
|
1469
1605
|
}
|
|
1470
1606
|
) : null,
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1472
1608
|
IconButton,
|
|
1473
1609
|
{
|
|
1474
1610
|
icon: "search",
|
|
@@ -1479,7 +1615,7 @@ function ValueHelpField({
|
|
|
1479
1615
|
}
|
|
1480
1616
|
)
|
|
1481
1617
|
] }),
|
|
1482
|
-
/* @__PURE__ */ (0,
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1483
1619
|
ValueHelpDialog,
|
|
1484
1620
|
{
|
|
1485
1621
|
isOpen: open,
|
|
@@ -1494,7 +1630,7 @@ function ValueHelpField({
|
|
|
1494
1630
|
}
|
|
1495
1631
|
|
|
1496
1632
|
// src/components/navigation/ShellBar.tsx
|
|
1497
|
-
var
|
|
1633
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1498
1634
|
var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
|
|
1499
1635
|
function ShellBar({
|
|
1500
1636
|
product,
|
|
@@ -1509,22 +1645,22 @@ function ShellBar({
|
|
|
1509
1645
|
className,
|
|
1510
1646
|
...rest
|
|
1511
1647
|
}) {
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1513
|
-
onMenu ? /* @__PURE__ */ (0,
|
|
1514
|
-
monogram ? /* @__PURE__ */ (0,
|
|
1515
|
-
product ? /* @__PURE__ */ (0,
|
|
1516
|
-
title ? /* @__PURE__ */ (0,
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1518
|
-
onSearch ? /* @__PURE__ */ (0,
|
|
1648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("header", { className: cx("pire-shellbar", className), ...rest, children: [
|
|
1649
|
+
onMenu ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
|
|
1650
|
+
monogram ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
|
|
1651
|
+
product ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "pire-shellbar-product", children: product }) : null,
|
|
1652
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "pire-shellbar-title", children: title }) : null,
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "pire-shellbar-spacer" }),
|
|
1654
|
+
onSearch ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
|
|
1519
1655
|
actions,
|
|
1520
|
-
user ? /* @__PURE__ */ (0,
|
|
1656
|
+
user ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
|
|
1521
1657
|
] });
|
|
1522
1658
|
}
|
|
1523
1659
|
|
|
1524
1660
|
// src/components/navigation/SideNav.tsx
|
|
1525
1661
|
var React10 = __toESM(require("react"), 1);
|
|
1526
1662
|
var import_react_aria_components21 = require("react-aria-components");
|
|
1527
|
-
var
|
|
1663
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1528
1664
|
function findActiveParent(groups, value) {
|
|
1529
1665
|
if (value == null) return void 0;
|
|
1530
1666
|
for (const group of groups) {
|
|
@@ -1572,7 +1708,7 @@ function SideNav({
|
|
|
1572
1708
|
};
|
|
1573
1709
|
const renderRow = (item, onPress, isGroup) => {
|
|
1574
1710
|
const selected = !isGroup && item.id === value;
|
|
1575
|
-
const button = /* @__PURE__ */ (0,
|
|
1711
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1576
1712
|
import_react_aria_components21.Button,
|
|
1577
1713
|
{
|
|
1578
1714
|
className: "pire-sidenav-item",
|
|
@@ -1582,17 +1718,17 @@ function SideNav({
|
|
|
1582
1718
|
"aria-label": collapsed ? item.label : void 0,
|
|
1583
1719
|
onPress,
|
|
1584
1720
|
children: [
|
|
1585
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
1586
|
-
collapsed ? null : /* @__PURE__ */ (0,
|
|
1587
|
-
item.count != null && !collapsed ? /* @__PURE__ */ (0,
|
|
1721
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
1722
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: item.label }),
|
|
1723
|
+
item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
|
|
1588
1724
|
]
|
|
1589
1725
|
},
|
|
1590
1726
|
item.id
|
|
1591
1727
|
);
|
|
1592
|
-
return collapsed ? /* @__PURE__ */ (0,
|
|
1728
|
+
return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
|
|
1593
1729
|
};
|
|
1594
|
-
const renderSection = (item) => /* @__PURE__ */ (0,
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1730
|
+
const renderSection = (item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components21.Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1596
1732
|
import_react_aria_components21.Button,
|
|
1597
1733
|
{
|
|
1598
1734
|
slot: "trigger",
|
|
@@ -1600,16 +1736,16 @@ function SideNav({
|
|
|
1600
1736
|
"data-kind": "group",
|
|
1601
1737
|
"data-active-child": item.id === activeParent ? "true" : void 0,
|
|
1602
1738
|
children: [
|
|
1603
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1605
|
-
item.count != null ? /* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: item.label }),
|
|
1741
|
+
item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null,
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
|
|
1607
1743
|
]
|
|
1608
1744
|
}
|
|
1609
1745
|
),
|
|
1610
|
-
/* @__PURE__ */ (0,
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components21.DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
|
|
1611
1747
|
const selected = child.id === value;
|
|
1612
|
-
return /* @__PURE__ */ (0,
|
|
1748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1613
1749
|
import_react_aria_components21.Button,
|
|
1614
1750
|
{
|
|
1615
1751
|
className: "pire-sidenav-item pire-sidenav-subitem",
|
|
@@ -1617,15 +1753,15 @@ function SideNav({
|
|
|
1617
1753
|
"aria-current": selected ? "page" : void 0,
|
|
1618
1754
|
onPress: () => onChange?.(child.id),
|
|
1619
1755
|
children: [
|
|
1620
|
-
/* @__PURE__ */ (0,
|
|
1621
|
-
child.count != null ? /* @__PURE__ */ (0,
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: child.label }),
|
|
1757
|
+
child.count != null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sidenav-count", children: child.count }) : null
|
|
1622
1758
|
]
|
|
1623
1759
|
},
|
|
1624
1760
|
child.id
|
|
1625
1761
|
);
|
|
1626
1762
|
}) })
|
|
1627
1763
|
] }, item.id);
|
|
1628
|
-
return /* @__PURE__ */ (0,
|
|
1764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1629
1765
|
"nav",
|
|
1630
1766
|
{
|
|
1631
1767
|
className: cx("pire-sidenav", className),
|
|
@@ -1640,9 +1776,9 @@ function SideNav({
|
|
|
1640
1776
|
if (isGroup && !collapsed) return renderSection(item);
|
|
1641
1777
|
return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
|
|
1642
1778
|
});
|
|
1643
|
-
return /* @__PURE__ */ (0,
|
|
1644
|
-
group.label && !collapsed ? /* @__PURE__ */ (0,
|
|
1645
|
-
hasSections ? /* @__PURE__ */ (0,
|
|
1779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "pire-sidenav-group", children: [
|
|
1780
|
+
group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
|
|
1781
|
+
hasSections ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1646
1782
|
import_react_aria_components21.DisclosureGroup,
|
|
1647
1783
|
{
|
|
1648
1784
|
className: "pire-sidenav-tree",
|
|
@@ -1654,7 +1790,7 @@ function SideNav({
|
|
|
1654
1790
|
) : rows
|
|
1655
1791
|
] }, group.label ?? gi);
|
|
1656
1792
|
}),
|
|
1657
|
-
footer ? /* @__PURE__ */ (0,
|
|
1793
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-sidenav-footer", children: footer }) : null
|
|
1658
1794
|
]
|
|
1659
1795
|
}
|
|
1660
1796
|
);
|
|
@@ -1662,9 +1798,9 @@ function SideNav({
|
|
|
1662
1798
|
|
|
1663
1799
|
// src/components/navigation/Tabs.tsx
|
|
1664
1800
|
var import_react_aria_components22 = require("react-aria-components");
|
|
1665
|
-
var
|
|
1801
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1666
1802
|
function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
|
|
1667
|
-
return /* @__PURE__ */ (0,
|
|
1803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1668
1804
|
import_react_aria_components22.Tabs,
|
|
1669
1805
|
{
|
|
1670
1806
|
className,
|
|
@@ -1673,12 +1809,12 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
|
|
|
1673
1809
|
defaultSelectedKey: defaultValue,
|
|
1674
1810
|
onSelectionChange: (k) => onChange?.(String(k)),
|
|
1675
1811
|
children: [
|
|
1676
|
-
/* @__PURE__ */ (0,
|
|
1677
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components22.TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_aria_components22.Tab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
|
|
1813
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: item.icon, size: 16 }) : null,
|
|
1678
1814
|
item.label,
|
|
1679
|
-
item.count != null ? /* @__PURE__ */ (0,
|
|
1815
|
+
item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pire-tab-count", children: item.count }) : null
|
|
1680
1816
|
] }) }),
|
|
1681
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
1817
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components22.TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
|
|
1682
1818
|
]
|
|
1683
1819
|
}
|
|
1684
1820
|
);
|
|
@@ -1686,9 +1822,9 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
|
|
|
1686
1822
|
|
|
1687
1823
|
// src/components/navigation/Breadcrumb.tsx
|
|
1688
1824
|
var import_react_aria_components23 = require("react-aria-components");
|
|
1689
|
-
var
|
|
1825
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1690
1826
|
function Breadcrumb({ items, onNavigate, className, style }) {
|
|
1691
|
-
return /* @__PURE__ */ (0,
|
|
1827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1692
1828
|
import_react_aria_components23.Breadcrumbs,
|
|
1693
1829
|
{
|
|
1694
1830
|
className: cx("pire-breadcrumbs", className),
|
|
@@ -1697,9 +1833,9 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
1697
1833
|
onAction: (key) => onNavigate?.(String(key)),
|
|
1698
1834
|
children: (item) => {
|
|
1699
1835
|
const last = items[items.length - 1] === item;
|
|
1700
|
-
return /* @__PURE__ */ (0,
|
|
1701
|
-
last ? item.label : /* @__PURE__ */ (0,
|
|
1702
|
-
last ? null : /* @__PURE__ */ (0,
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_aria_components23.Breadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
|
|
1837
|
+
last ? item.label : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components23.Link, { href: item.href, children: item.label }),
|
|
1838
|
+
last ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
|
|
1703
1839
|
] });
|
|
1704
1840
|
}
|
|
1705
1841
|
}
|
|
@@ -1707,7 +1843,7 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
1707
1843
|
}
|
|
1708
1844
|
|
|
1709
1845
|
// src/components/navigation/Pagination.tsx
|
|
1710
|
-
var
|
|
1846
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1711
1847
|
function Pagination({
|
|
1712
1848
|
page = 1,
|
|
1713
1849
|
pageSize = 25,
|
|
@@ -1722,9 +1858,9 @@ function Pagination({
|
|
|
1722
1858
|
const pages = Math.max(1, Math.ceil(total / pageSize));
|
|
1723
1859
|
const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
|
|
1724
1860
|
const to = Math.min(total, page * pageSize);
|
|
1725
|
-
return /* @__PURE__ */ (0,
|
|
1726
|
-
/* @__PURE__ */ (0,
|
|
1727
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1728
1864
|
IconButton,
|
|
1729
1865
|
{
|
|
1730
1866
|
icon: "chevron-left",
|
|
@@ -1735,8 +1871,8 @@ function Pagination({
|
|
|
1735
1871
|
onPress: () => onPageChange?.(page - 1)
|
|
1736
1872
|
}
|
|
1737
1873
|
),
|
|
1738
|
-
/* @__PURE__ */ (0,
|
|
1739
|
-
/* @__PURE__ */ (0,
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1740
1876
|
IconButton,
|
|
1741
1877
|
{
|
|
1742
1878
|
icon: "chevron-right",
|
|
@@ -1747,7 +1883,7 @@ function Pagination({
|
|
|
1747
1883
|
onPress: () => onPageChange?.(page + 1)
|
|
1748
1884
|
}
|
|
1749
1885
|
),
|
|
1750
|
-
onPageSizeChange ? /* @__PURE__ */ (0,
|
|
1886
|
+
onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1751
1887
|
Select,
|
|
1752
1888
|
{
|
|
1753
1889
|
"aria-label": msg.paginationRowsPerPage,
|
|
@@ -1764,11 +1900,11 @@ function Pagination({
|
|
|
1764
1900
|
|
|
1765
1901
|
// src/components/navigation/Menu.tsx
|
|
1766
1902
|
var import_react_aria_components24 = require("react-aria-components");
|
|
1767
|
-
var
|
|
1903
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1768
1904
|
function Menu({ minWidth, className, style, ...rest }) {
|
|
1769
1905
|
const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
|
|
1770
1906
|
const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
|
|
1771
|
-
return /* @__PURE__ */ (0,
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1772
1908
|
import_react_aria_components24.Menu,
|
|
1773
1909
|
{
|
|
1774
1910
|
className: cx("pire-menu", className),
|
|
@@ -1786,35 +1922,35 @@ function MenuItem({
|
|
|
1786
1922
|
className,
|
|
1787
1923
|
...rest
|
|
1788
1924
|
}) {
|
|
1789
|
-
return /* @__PURE__ */ (0,
|
|
1925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1790
1926
|
import_react_aria_components24.MenuItem,
|
|
1791
1927
|
{
|
|
1792
1928
|
className: cx("pire-menu-item", className),
|
|
1793
1929
|
"data-tone": tone === "danger" ? "danger" : void 0,
|
|
1794
1930
|
...rest,
|
|
1795
1931
|
children: [
|
|
1796
|
-
icon ? /* @__PURE__ */ (0,
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1798
|
-
/* @__PURE__ */ (0,
|
|
1799
|
-
description ? /* @__PURE__ */ (0,
|
|
1932
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "pire-menu-item-body", children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-menu-item-label", children }),
|
|
1935
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-menu-item-desc", children: description }) : null
|
|
1800
1936
|
] }),
|
|
1801
|
-
shortcut ? /* @__PURE__ */ (0,
|
|
1937
|
+
shortcut ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("kbd", { className: "pire-menu-item-shortcut", children: shortcut }) : null
|
|
1802
1938
|
]
|
|
1803
1939
|
}
|
|
1804
1940
|
);
|
|
1805
1941
|
}
|
|
1806
1942
|
function MenuSection({ title, children, className, ...rest }) {
|
|
1807
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
-
title ? /* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_aria_components24.MenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
|
|
1944
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components24.Header, { className: "pire-menu-section-title", children: title }) : null,
|
|
1809
1945
|
children
|
|
1810
1946
|
] });
|
|
1811
1947
|
}
|
|
1812
1948
|
function MenuSeparator({ className }) {
|
|
1813
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components24.Separator, { className: cx("pire-menu-separator", className) });
|
|
1814
1950
|
}
|
|
1815
1951
|
|
|
1816
1952
|
// src/components/feedback/InlineMessage.tsx
|
|
1817
|
-
var
|
|
1953
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1818
1954
|
var KIND_ICON = {
|
|
1819
1955
|
info: "info",
|
|
1820
1956
|
success: "check-circle-2",
|
|
@@ -1824,7 +1960,7 @@ var KIND_ICON = {
|
|
|
1824
1960
|
function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
|
|
1825
1961
|
const msg = usePireMessages();
|
|
1826
1962
|
const assertive = kind === "error" || kind === "warning";
|
|
1827
|
-
return /* @__PURE__ */ (0,
|
|
1963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
1828
1964
|
"div",
|
|
1829
1965
|
{
|
|
1830
1966
|
className: cx("pire-msg", className),
|
|
@@ -1833,13 +1969,13 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
|
|
|
1833
1969
|
"aria-live": assertive ? "assertive" : "polite",
|
|
1834
1970
|
...rest,
|
|
1835
1971
|
children: [
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
1837
|
-
/* @__PURE__ */ (0,
|
|
1838
|
-
title ? /* @__PURE__ */ (0,
|
|
1839
|
-
children ? /* @__PURE__ */ (0,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
|
|
1974
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-msg-title", children: title }) : null,
|
|
1975
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-msg-body", children }) : null,
|
|
1840
1976
|
action
|
|
1841
1977
|
] }),
|
|
1842
|
-
onClose ? /* @__PURE__ */ (0,
|
|
1978
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
|
|
1843
1979
|
]
|
|
1844
1980
|
}
|
|
1845
1981
|
);
|
|
@@ -1847,7 +1983,7 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
|
|
|
1847
1983
|
|
|
1848
1984
|
// src/components/feedback/ProgressBar.tsx
|
|
1849
1985
|
var import_react_aria_components25 = require("react-aria-components");
|
|
1850
|
-
var
|
|
1986
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1851
1987
|
function ProgressBar({
|
|
1852
1988
|
value = 0,
|
|
1853
1989
|
minValue = 0,
|
|
@@ -1860,7 +1996,7 @@ function ProgressBar({
|
|
|
1860
1996
|
className,
|
|
1861
1997
|
style
|
|
1862
1998
|
}) {
|
|
1863
|
-
return /* @__PURE__ */ (0,
|
|
1999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1864
2000
|
import_react_aria_components25.ProgressBar,
|
|
1865
2001
|
{
|
|
1866
2002
|
className: cx("pire-progress", className),
|
|
@@ -1871,12 +2007,12 @@ function ProgressBar({
|
|
|
1871
2007
|
maxValue,
|
|
1872
2008
|
isIndeterminate,
|
|
1873
2009
|
style,
|
|
1874
|
-
children: ({ percentage, valueText }) => /* @__PURE__ */ (0,
|
|
1875
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
1876
|
-
label ? /* @__PURE__ */ (0,
|
|
1877
|
-
showValue && !isIndeterminate ? /* @__PURE__ */ (0,
|
|
2010
|
+
children: ({ percentage, valueText }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
2011
|
+
label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "pire-progress-head", children: [
|
|
2012
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components25.Label, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {}),
|
|
2013
|
+
showValue && !isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-numeric", children: valueText }) : null
|
|
1878
2014
|
] }) : null,
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "pire-progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
|
|
1880
2016
|
] })
|
|
1881
2017
|
}
|
|
1882
2018
|
);
|
|
@@ -1884,7 +2020,7 @@ function ProgressBar({
|
|
|
1884
2020
|
|
|
1885
2021
|
// src/components/feedback/Toast.tsx
|
|
1886
2022
|
var React11 = __toESM(require("react"), 1);
|
|
1887
|
-
var
|
|
2023
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1888
2024
|
var KIND_ICON2 = {
|
|
1889
2025
|
info: "info",
|
|
1890
2026
|
success: "check-circle-2",
|
|
@@ -1893,7 +2029,7 @@ var KIND_ICON2 = {
|
|
|
1893
2029
|
};
|
|
1894
2030
|
function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
|
|
1895
2031
|
const msg = usePireMessages();
|
|
1896
|
-
return /* @__PURE__ */ (0,
|
|
2032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1897
2033
|
"div",
|
|
1898
2034
|
{
|
|
1899
2035
|
className: cx("pire-toast", className),
|
|
@@ -1902,9 +2038,9 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
|
|
|
1902
2038
|
"aria-live": kind === "error" ? "assertive" : "polite",
|
|
1903
2039
|
...rest,
|
|
1904
2040
|
children: [
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1906
|
-
/* @__PURE__ */ (0,
|
|
1907
|
-
onClose ? /* @__PURE__ */ (0,
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: KIND_ICON2[kind], size: 16 }),
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { flex: 1 }, children }),
|
|
2043
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
|
|
1908
2044
|
]
|
|
1909
2045
|
}
|
|
1910
2046
|
);
|
|
@@ -1922,9 +2058,9 @@ function ToastProvider({ children, timeout = 6e3 }) {
|
|
|
1922
2058
|
return id;
|
|
1923
2059
|
}, [close, timeout]);
|
|
1924
2060
|
const value = React11.useMemo(() => ({ add, close }), [add, close]);
|
|
1925
|
-
return /* @__PURE__ */ (0,
|
|
2061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ToastContext.Provider, { value, children: [
|
|
1926
2062
|
children,
|
|
1927
|
-
/* @__PURE__ */ (0,
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
|
|
1928
2064
|
] });
|
|
1929
2065
|
}
|
|
1930
2066
|
function useToast() {
|
|
@@ -1933,51 +2069,6 @@ function useToast() {
|
|
|
1933
2069
|
return ctx;
|
|
1934
2070
|
}
|
|
1935
2071
|
|
|
1936
|
-
// src/components/feedback/Skeleton.tsx
|
|
1937
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1938
|
-
function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
|
|
1939
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1940
|
-
"div",
|
|
1941
|
-
{
|
|
1942
|
-
className: cx("pire-skeleton", className),
|
|
1943
|
-
"data-shape": shape,
|
|
1944
|
-
"aria-hidden": "true",
|
|
1945
|
-
style: { width, height, ...style },
|
|
1946
|
-
...rest
|
|
1947
|
-
}
|
|
1948
|
-
);
|
|
1949
|
-
}
|
|
1950
|
-
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
1951
|
-
function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
|
|
1952
|
-
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
1953
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1954
|
-
"div",
|
|
1955
|
-
{
|
|
1956
|
-
className: cx("pire-skeleton-row", className),
|
|
1957
|
-
"data-density": density,
|
|
1958
|
-
"aria-hidden": "true",
|
|
1959
|
-
style,
|
|
1960
|
-
...rest,
|
|
1961
|
-
children: cells.map((c, i) => {
|
|
1962
|
-
const align = c.numeric ? "right" : c.align ?? "left";
|
|
1963
|
-
return (
|
|
1964
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
|
|
1965
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1966
|
-
"div",
|
|
1967
|
-
{
|
|
1968
|
-
className: "pire-skeleton-cell",
|
|
1969
|
-
"data-align": align,
|
|
1970
|
-
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
1971
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
1972
|
-
},
|
|
1973
|
-
i
|
|
1974
|
-
)
|
|
1975
|
-
);
|
|
1976
|
-
})
|
|
1977
|
-
}
|
|
1978
|
-
);
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
2072
|
// src/components/data/KpiTile.tsx
|
|
1982
2073
|
var import_react_aria_components26 = require("react-aria-components");
|
|
1983
2074
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
@@ -2114,57 +2205,78 @@ function LinkList({ items, onSelect, className, ...rest }) {
|
|
|
2114
2205
|
] }, item.id)) });
|
|
2115
2206
|
}
|
|
2116
2207
|
|
|
2117
|
-
// src/components/layout/
|
|
2208
|
+
// src/components/layout/PageBand.tsx
|
|
2118
2209
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2210
|
+
function PageBand({
|
|
2211
|
+
surface = "card",
|
|
2212
|
+
hasBorder = true,
|
|
2213
|
+
children,
|
|
2214
|
+
className,
|
|
2215
|
+
...rest
|
|
2216
|
+
}) {
|
|
2217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2218
|
+
"div",
|
|
2219
|
+
{
|
|
2220
|
+
className: cx("pire-pageband", className),
|
|
2221
|
+
"data-surface": surface,
|
|
2222
|
+
"data-border": hasBorder ? "true" : void 0,
|
|
2223
|
+
...rest,
|
|
2224
|
+
children
|
|
2225
|
+
}
|
|
2226
|
+
);
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
// src/components/layout/PageHeader.tsx
|
|
2230
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2119
2231
|
function PageHeader({ title, subtitle, actions, className, ...rest }) {
|
|
2120
|
-
return /* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
2123
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
2232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("header", { className: cx("pire-pageheader", className), ...rest, children: [
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { style: { minWidth: 0 }, children: [
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h1", { className: "pire-pageheader-title", children: title }),
|
|
2235
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "pire-pageheader-sub", children: subtitle }) : null
|
|
2124
2236
|
] }),
|
|
2125
|
-
actions ? /* @__PURE__ */ (0,
|
|
2237
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-pageheader-actions", children: actions }) : null
|
|
2126
2238
|
] });
|
|
2127
2239
|
}
|
|
2128
2240
|
|
|
2129
2241
|
// src/components/layout/SectionHeader.tsx
|
|
2130
|
-
var
|
|
2242
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2131
2243
|
function SectionHeader({ title, meta, actions, className, ...rest }) {
|
|
2132
|
-
return /* @__PURE__ */ (0,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2134
|
-
meta ? /* @__PURE__ */ (0,
|
|
2135
|
-
actions ? /* @__PURE__ */ (0,
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cx("pire-sectionhead", className), ...rest, children: [
|
|
2245
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-eyebrow", children: title }),
|
|
2246
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
|
|
2247
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "pire-sectionhead-actions", children: actions }) : null
|
|
2136
2248
|
] });
|
|
2137
2249
|
}
|
|
2138
2250
|
|
|
2139
2251
|
// src/components/layout/SelectionBar.tsx
|
|
2140
|
-
var
|
|
2252
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2141
2253
|
function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
|
|
2142
2254
|
if (!count) return null;
|
|
2143
|
-
return /* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "pire-selectionbar-count", children: [
|
|
2145
2257
|
count.toLocaleString(),
|
|
2146
2258
|
" ",
|
|
2147
2259
|
noun,
|
|
2148
2260
|
count === 1 ? "" : "s",
|
|
2149
2261
|
" selected"
|
|
2150
2262
|
] }),
|
|
2151
|
-
children ? /* @__PURE__ */ (0,
|
|
2152
|
-
actions ? /* @__PURE__ */ (0,
|
|
2263
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
|
|
2264
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pire-selectionbar-actions", children: actions }) : null
|
|
2153
2265
|
] });
|
|
2154
2266
|
}
|
|
2155
2267
|
|
|
2156
2268
|
// src/components/layout/FooterBar.tsx
|
|
2157
|
-
var
|
|
2269
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2158
2270
|
function FooterBar({ note, actions, children, className, ...rest }) {
|
|
2159
|
-
return /* @__PURE__ */ (0,
|
|
2160
|
-
note ? /* @__PURE__ */ (0,
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("footer", { className: cx("pire-footerbar", className), ...rest, children: [
|
|
2272
|
+
note ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "pire-footerbar-note", children: note }) : null,
|
|
2161
2273
|
children,
|
|
2162
|
-
actions ? /* @__PURE__ */ (0,
|
|
2274
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "pire-footerbar-actions", children: actions }) : null
|
|
2163
2275
|
] });
|
|
2164
2276
|
}
|
|
2165
2277
|
|
|
2166
2278
|
// src/components/patterns/ConfirmDialog.tsx
|
|
2167
|
-
var
|
|
2279
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2168
2280
|
function ConfirmDialog({
|
|
2169
2281
|
isOpen,
|
|
2170
2282
|
title,
|
|
@@ -2178,7 +2290,7 @@ function ConfirmDialog({
|
|
|
2178
2290
|
onConfirm,
|
|
2179
2291
|
onCancel
|
|
2180
2292
|
}) {
|
|
2181
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2182
2294
|
Dialog,
|
|
2183
2295
|
{
|
|
2184
2296
|
isOpen,
|
|
@@ -2188,12 +2300,12 @@ function ConfirmDialog({
|
|
|
2188
2300
|
onClose: onCancel,
|
|
2189
2301
|
isDismissable: !isBusy,
|
|
2190
2302
|
showClose: false,
|
|
2191
|
-
footer: /* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
|
|
2194
2306
|
] }),
|
|
2195
2307
|
children: [
|
|
2196
|
-
consequence ? /* @__PURE__ */ (0,
|
|
2308
|
+
consequence ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
|
|
2197
2309
|
children
|
|
2198
2310
|
]
|
|
2199
2311
|
}
|
|
@@ -2202,10 +2314,10 @@ function ConfirmDialog({
|
|
|
2202
2314
|
|
|
2203
2315
|
// src/components/patterns/SidePanel.tsx
|
|
2204
2316
|
var import_react_aria_components28 = require("react-aria-components");
|
|
2205
|
-
var
|
|
2317
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2206
2318
|
function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
|
|
2207
2319
|
const msg = usePireMessages();
|
|
2208
|
-
return /* @__PURE__ */ (0,
|
|
2320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2209
2321
|
import_react_aria_components28.ModalOverlay,
|
|
2210
2322
|
{
|
|
2211
2323
|
className: "pire-sidepanel-overlay",
|
|
@@ -2214,28 +2326,28 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
|
|
|
2214
2326
|
onOpenChange: (o) => {
|
|
2215
2327
|
if (!o) onClose?.();
|
|
2216
2328
|
},
|
|
2217
|
-
children: /* @__PURE__ */ (0,
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2220
|
-
/* @__PURE__ */ (0,
|
|
2221
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
2329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_aria_components28.Modal, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_aria_components28.Dialog, { className: "pire-dialog", style: { height: "100%" }, children: [
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { className: "pire-dialog-head", children: [
|
|
2331
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2332
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_aria_components28.Heading, { slot: "title", className: "pire-dialog-title", children: title }),
|
|
2333
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
2222
2334
|
] }),
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2335
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
|
|
2224
2336
|
] }),
|
|
2225
|
-
/* @__PURE__ */ (0,
|
|
2226
|
-
footer ? /* @__PURE__ */ (0,
|
|
2337
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
|
|
2338
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null
|
|
2227
2339
|
] }) })
|
|
2228
2340
|
}
|
|
2229
2341
|
);
|
|
2230
2342
|
}
|
|
2231
2343
|
|
|
2232
2344
|
// src/components/patterns/EmptyState.tsx
|
|
2233
|
-
var
|
|
2345
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2234
2346
|
function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
|
|
2235
|
-
return /* @__PURE__ */ (0,
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
title ? /* @__PURE__ */ (0,
|
|
2238
|
-
children ? /* @__PURE__ */ (0,
|
|
2347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
|
|
2349
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
|
|
2350
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
|
|
2239
2351
|
action
|
|
2240
2352
|
] });
|
|
2241
2353
|
}
|
|
@@ -2278,6 +2390,7 @@ var import_react_aria_components29 = require("react-aria-components");
|
|
|
2278
2390
|
MultiComboBox,
|
|
2279
2391
|
NumberField,
|
|
2280
2392
|
ObjectHeader,
|
|
2393
|
+
PageBand,
|
|
2281
2394
|
PageHeader,
|
|
2282
2395
|
Pagination,
|
|
2283
2396
|
PireIntlProvider,
|