@orianatech/pire 1.4.0 → 1.5.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.
Files changed (111) hide show
  1. package/dist/components/core/Avatar.d.ts.map +1 -1
  2. package/dist/components/core/Badge.d.ts.map +1 -1
  3. package/dist/components/core/Button.d.ts.map +1 -1
  4. package/dist/components/core/Card.d.ts.map +1 -1
  5. package/dist/components/core/Heading.d.ts.map +1 -1
  6. package/dist/components/core/Icon.d.ts.map +1 -1
  7. package/dist/components/core/IconButton.d.ts.map +1 -1
  8. package/dist/components/core/Kbd.d.ts.map +1 -1
  9. package/dist/components/core/SegmentedControl.d.ts.map +1 -1
  10. package/dist/components/core/Separator.d.ts.map +1 -1
  11. package/dist/components/core/Tag.d.ts.map +1 -1
  12. package/dist/components/core/Text.d.ts.map +1 -1
  13. package/dist/components/core/icon-map.d.ts.map +1 -1
  14. package/dist/components/data/BarChart.d.ts.map +1 -1
  15. package/dist/components/data/ChartFrame.d.ts.map +1 -1
  16. package/dist/components/data/DataTable.d.ts.map +1 -1
  17. package/dist/components/data/DescriptionList.d.ts.map +1 -1
  18. package/dist/components/data/DonutChart.d.ts.map +1 -1
  19. package/dist/components/data/FilterBar.d.ts.map +1 -1
  20. package/dist/components/data/KpiTile.d.cts +1 -1
  21. package/dist/components/data/KpiTile.d.ts +1 -1
  22. package/dist/components/data/KpiTile.d.ts.map +1 -1
  23. package/dist/components/data/LineChart.d.ts.map +1 -1
  24. package/dist/components/data/LinkList.d.ts.map +1 -1
  25. package/dist/components/data/ObjectHeader.d.ts.map +1 -1
  26. package/dist/components/data/RecordCard.d.ts.map +1 -1
  27. package/dist/components/data/ViewSwitcher.d.cts +1 -1
  28. package/dist/components/data/ViewSwitcher.d.ts +1 -1
  29. package/dist/components/data/ViewSwitcher.d.ts.map +1 -1
  30. package/dist/components/data/chartGeometry.d.ts.map +1 -1
  31. package/dist/components/feedback/Dialog.d.cts +1 -1
  32. package/dist/components/feedback/Dialog.d.ts +1 -1
  33. package/dist/components/feedback/Dialog.d.ts.map +1 -1
  34. package/dist/components/feedback/InlineMessage.d.ts.map +1 -1
  35. package/dist/components/feedback/ProgressBar.d.cts +1 -1
  36. package/dist/components/feedback/ProgressBar.d.ts +1 -1
  37. package/dist/components/feedback/ProgressBar.d.ts.map +1 -1
  38. package/dist/components/feedback/Skeleton.d.ts.map +1 -1
  39. package/dist/components/feedback/Toast.d.cts +1 -1
  40. package/dist/components/feedback/Toast.d.ts +1 -1
  41. package/dist/components/feedback/Toast.d.ts.map +1 -1
  42. package/dist/components/feedback/Tooltip.d.ts.map +1 -1
  43. package/dist/components/forms/Checkbox.d.ts.map +1 -1
  44. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -1
  45. package/dist/components/forms/ComboBox.d.ts.map +1 -1
  46. package/dist/components/forms/DatePicker.d.ts.map +1 -1
  47. package/dist/components/forms/DateRangePicker.d.ts.map +1 -1
  48. package/dist/components/forms/FileUpload.d.ts.map +1 -1
  49. package/dist/components/forms/FormField.d.ts.map +1 -1
  50. package/dist/components/forms/Input.d.ts.map +1 -1
  51. package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
  52. package/dist/components/forms/NumberField.d.ts.map +1 -1
  53. package/dist/components/forms/QuantityStepper.d.ts.map +1 -1
  54. package/dist/components/forms/Radio.d.ts.map +1 -1
  55. package/dist/components/forms/Select.d.ts.map +1 -1
  56. package/dist/components/forms/Switch.d.ts.map +1 -1
  57. package/dist/components/forms/TextArea.d.ts.map +1 -1
  58. package/dist/components/forms/ValueHelpField.d.cts +1 -1
  59. package/dist/components/forms/ValueHelpField.d.ts +1 -1
  60. package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
  61. package/dist/components/forms/dateValues.d.ts.map +1 -1
  62. package/dist/components/layout/PageBand.d.ts.map +1 -1
  63. package/dist/components/layout/SectionHeader.d.ts.map +1 -1
  64. package/dist/components/layout/SelectionBar.d.ts.map +1 -1
  65. package/dist/components/layout/SplitPane.d.ts.map +1 -1
  66. package/dist/components/navigation/Breadcrumb.d.ts.map +1 -1
  67. package/dist/components/navigation/Menu.d.ts.map +1 -1
  68. package/dist/components/navigation/Pagination.d.cts +1 -1
  69. package/dist/components/navigation/Pagination.d.ts +1 -1
  70. package/dist/components/navigation/Pagination.d.ts.map +1 -1
  71. package/dist/components/navigation/Ribbon.d.ts.map +1 -1
  72. package/dist/components/navigation/ShellBar.d.ts.map +1 -1
  73. package/dist/components/navigation/ShellRail.d.ts.map +1 -1
  74. package/dist/components/navigation/SideNav.d.cts +9 -1
  75. package/dist/components/navigation/SideNav.d.ts +9 -1
  76. package/dist/components/navigation/SideNav.d.ts.map +1 -1
  77. package/dist/components/navigation/Tabs.d.ts.map +1 -1
  78. package/dist/components/patterns/AppLauncher.d.cts +1 -1
  79. package/dist/components/patterns/AppLauncher.d.ts +1 -1
  80. package/dist/components/patterns/AppLauncher.d.ts.map +1 -1
  81. package/dist/components/patterns/CommandPalette.d.ts.map +1 -1
  82. package/dist/components/patterns/ConfirmDialog.d.cts +1 -1
  83. package/dist/components/patterns/ConfirmDialog.d.ts +1 -1
  84. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
  85. package/dist/components/patterns/EmptyState.d.ts.map +1 -1
  86. package/dist/components/patterns/FileDropZone.d.ts.map +1 -1
  87. package/dist/components/patterns/NumPad.d.ts.map +1 -1
  88. package/dist/components/patterns/SidePanel.d.cts +1 -1
  89. package/dist/components/patterns/SidePanel.d.ts +1 -1
  90. package/dist/components/patterns/SidePanel.d.ts.map +1 -1
  91. package/dist/components/patterns/ValueHelpDialog.d.cts +1 -1
  92. package/dist/components/patterns/ValueHelpDialog.d.ts +1 -1
  93. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  94. package/dist/components.css +3685 -678
  95. package/dist/i18n/PireIntlProvider.d.ts.map +1 -1
  96. package/dist/index.cjs +669 -265
  97. package/dist/index.cjs.map +1 -1
  98. package/dist/index.d.cts +17 -17
  99. package/dist/index.d.ts +17 -17
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +693 -276
  102. package/dist/index.js.map +1 -1
  103. package/dist/tokens/base.css +64 -13
  104. package/dist/tokens/colors.css +156 -78
  105. package/dist/tokens/elevation.css +20 -16
  106. package/dist/tokens/fonts.css +49 -7
  107. package/dist/tokens/motion.css +15 -12
  108. package/dist/tokens/spacing.css +41 -16
  109. package/dist/tokens/themes.css +88 -32
  110. package/dist/tokens/typography.css +43 -36
  111. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -557,9 +557,26 @@ var import_react_aria_components3 = require("react-aria-components");
557
557
  // src/components/feedback/Tooltip.tsx
558
558
  var React2 = __toESM(require("react"), 1);
559
559
  var import_react_aria_components2 = require("react-aria-components");
560
- var import_jsx_runtime3 = require("react/jsx-runtime");
560
+ var import_jsx_runtime3 = (
561
+ // `Focusable` also dev-warns when the element it clones onto has neither a native
562
+ // interactive tag nor an ARIA widget role — a bare `<span>` is neither. Every disabled
563
+ // control this wraps (`IconButton`, `Button`, …) is button-shaped, so `role="button"` plus
564
+ // `aria-disabled` describes the wrapper the same way its disabled child already describes
565
+ // itself, and is what lets the accessible name (from the child's own text or `aria-label`)
566
+ // reach the element that actually holds focus. No static `tabIndex` here on purpose: it
567
+ // would win over the one `Focusable` computes at clone time (react-aria's `mergeProps` lets
568
+ // a prop already on this element beat the one it supplies), silently making the span
569
+ // unfocusable again and reintroducing the defect this file exists to fix. A real `<button>`
570
+ // is not an option either: `children` is very often a button itself (`IconButton`), and a
571
+ // button nested in a button is invalid HTML that browsers repair by breaking the DOM tree.
572
+ // biome-ignore lint/a11y/useFocusableInteractive: tabIndex is added by Focusable's clone, not statically — see above.
573
+ // biome-ignore lint/a11y/useSemanticElements: a real <button> would nest inside the disabled child, which is often one itself — see above.
574
+ require("react/jsx-runtime")
575
+ );
561
576
  function Tooltip({ label, placement = "top", delay = 500, children }) {
562
- const props = React2.isValidElement(children) ? children.props : void 0;
577
+ const props = React2.isValidElement(
578
+ children
579
+ ) ? children.props : void 0;
563
580
  const isDisabledChild = props?.isDisabled === true || props?.disabled === true;
564
581
  const target = React2.isValidElement(children) && !isDisabledChild ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : isDisabledChild ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pire-tooltip-target", role: "button", "aria-disabled": "true", children }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pire-tooltip-target", children });
565
582
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_aria_components2.TooltipTrigger, { delay, closeDelay: 0, children: [
@@ -806,10 +823,7 @@ var esMessages = {
806
823
  var import_jsx_runtime6 = require("react/jsx-runtime");
807
824
  var MessagesContext = React5.createContext(enMessages);
808
825
  function PireIntlProvider({ messages, children }) {
809
- const value = React5.useMemo(
810
- () => messages ? { ...enMessages, ...messages } : enMessages,
811
- [messages]
812
- );
826
+ const value = React5.useMemo(() => messages ? { ...enMessages, ...messages } : enMessages, [messages]);
813
827
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessagesContext.Provider, { value, children });
814
828
  }
815
829
  function usePireMessages() {
@@ -824,37 +838,64 @@ function useMessage(key, override) {
824
838
  var import_jsx_runtime7 = require("react/jsx-runtime");
825
839
  var Tag = React6.forwardRef(function Tag2({ children, onRemove, isDisabled, category, className, ...rest }, ref) {
826
840
  const msg = usePireMessages();
827
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { ref, className: cx("pire-tag", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
828
- category ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
829
- children,
830
- onRemove ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
831
- import_react_aria_components4.Button,
832
- {
833
- className: "pire-tag-remove",
834
- isDisabled,
835
- onPress: onRemove,
836
- "aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
837
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "x", size: 12 })
838
- }
839
- ) : null
840
- ] });
841
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
842
+ "span",
843
+ {
844
+ ref,
845
+ className: cx("pire-tag", className),
846
+ "data-disabled": isDisabled ? "true" : void 0,
847
+ ...rest,
848
+ children: [
849
+ category ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
850
+ children,
851
+ onRemove ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
852
+ import_react_aria_components4.Button,
853
+ {
854
+ className: "pire-tag-remove",
855
+ isDisabled,
856
+ onPress: onRemove,
857
+ "aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
858
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "x", size: 12 })
859
+ }
860
+ ) : null
861
+ ]
862
+ }
863
+ );
841
864
  });
842
865
 
843
866
  // src/components/core/Card.tsx
844
867
  var import_jsx_runtime8 = require("react/jsx-runtime");
845
- function Card({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }) {
846
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: cx("pire-card", className), "data-interactive": interactive ? "true" : void 0, ...rest, children: [
847
- title || actions ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "pire-card-head", children: [
848
- icon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
849
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
850
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "pire-card-title", children: title }),
851
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
852
- ] }),
853
- actions ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
854
- ] }) : null,
855
- children ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pire-card-body", children }) : null,
856
- footer ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("footer", { className: "pire-card-foot", children: footer }) : null
857
- ] });
868
+ function Card({
869
+ title,
870
+ subtitle,
871
+ icon,
872
+ actions,
873
+ footer,
874
+ interactive,
875
+ children,
876
+ className,
877
+ ...rest
878
+ }) {
879
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
880
+ "section",
881
+ {
882
+ className: cx("pire-card", className),
883
+ "data-interactive": interactive ? "true" : void 0,
884
+ ...rest,
885
+ children: [
886
+ title || actions ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "pire-card-head", children: [
887
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
888
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "pire-card-title", children: title }),
890
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
891
+ ] }),
892
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
893
+ ] }) : null,
894
+ children ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pire-card-body", children }) : null,
895
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("footer", { className: "pire-card-foot", children: footer }) : null
896
+ ]
897
+ }
898
+ );
858
899
  }
859
900
 
860
901
  // src/components/core/Avatar.tsx
@@ -889,7 +930,10 @@ function SegmentedControl({
889
930
  style,
890
931
  ...rest
891
932
  }) {
892
- const selected = React8.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
933
+ const selected = React8.useMemo(
934
+ () => new Set(value ? [value] : defaultValue ? [defaultValue] : []),
935
+ [value, defaultValue]
936
+ );
893
937
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
894
938
  import_react_aria_components5.ToggleButtonGroup,
895
939
  {
@@ -1038,7 +1082,17 @@ function Kbd({ children, size = "md", className, ...rest }) {
1038
1082
 
1039
1083
  // src/components/forms/FormField.tsx
1040
1084
  var import_jsx_runtime16 = require("react/jsx-runtime");
1041
- function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
1085
+ function FormField({
1086
+ label,
1087
+ htmlFor,
1088
+ isRequired,
1089
+ hint,
1090
+ error,
1091
+ layout = "stacked",
1092
+ children,
1093
+ className,
1094
+ ...rest
1095
+ }) {
1042
1096
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
1043
1097
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "pire-field-label", htmlFor, children: [
1044
1098
  label,
@@ -1160,11 +1214,14 @@ function TextArea({
1160
1214
  ...rest
1161
1215
  }) {
1162
1216
  const innerRef = React11.useRef(null);
1163
- const ref = React11.useCallback((node) => {
1164
- innerRef.current = node;
1165
- if (typeof textAreaRef === "function") textAreaRef(node);
1166
- else if (textAreaRef) textAreaRef.current = node;
1167
- }, [textAreaRef]);
1217
+ const ref = React11.useCallback(
1218
+ (node) => {
1219
+ innerRef.current = node;
1220
+ if (typeof textAreaRef === "function") textAreaRef(node);
1221
+ else if (textAreaRef) textAreaRef.current = node;
1222
+ },
1223
+ [textAreaRef]
1224
+ );
1168
1225
  const grow = React11.useCallback(() => {
1169
1226
  const el = innerRef.current;
1170
1227
  if (!el || !autoGrow) return;
@@ -1284,7 +1341,16 @@ function Select({
1284
1341
  className: "pire-listbox",
1285
1342
  items,
1286
1343
  renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
1287
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: item.label })
1344
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1345
+ import_react_aria_components11.ListBoxItem,
1346
+ {
1347
+ className: "pire-option",
1348
+ id: item.value,
1349
+ textValue: item.label,
1350
+ isDisabled: item.isDisabled,
1351
+ children: item.label
1352
+ }
1353
+ )
1288
1354
  }
1289
1355
  ) })
1290
1356
  ]
@@ -1308,7 +1374,14 @@ function Checkbox({ label, hint, children, className, ...rest }) {
1308
1374
  // src/components/forms/Radio.tsx
1309
1375
  var import_react_aria_components13 = require("react-aria-components");
1310
1376
  var import_jsx_runtime21 = require("react/jsx-runtime");
1311
- function RadioGroup({ label, description, errorMessage, children, className, ...rest }) {
1377
+ function RadioGroup({
1378
+ label,
1379
+ description,
1380
+ errorMessage,
1381
+ children,
1382
+ className,
1383
+ ...rest
1384
+ }) {
1312
1385
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_aria_components13.RadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
1313
1386
  label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Label, { className: "pire-field-label", children: label }) : null,
1314
1387
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pire-radiogroup", children }),
@@ -1371,12 +1444,21 @@ function ChoiceCardGroup({
1371
1444
  label,
1372
1445
  isRequired ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1373
1446
  ] }) : null,
1374
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_aria_components15.Radio, { value: option.id, className: "pire-choicecard", isDisabled: option.isDisabled, children: [
1375
- option.icon ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: option.icon, size: 20 }) : null,
1376
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-label", children: option.label }),
1377
- option.description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1378
- option.preview ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1379
- ] }, option.id)) }),
1447
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1448
+ import_react_aria_components15.Radio,
1449
+ {
1450
+ value: option.id,
1451
+ className: "pire-choicecard",
1452
+ isDisabled: option.isDisabled,
1453
+ children: [
1454
+ option.icon ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: option.icon, size: 20 }) : null,
1455
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-label", children: option.label }),
1456
+ option.description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1457
+ option.preview ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1458
+ ]
1459
+ },
1460
+ option.id
1461
+ )) }),
1380
1462
  description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1381
1463
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.FieldError, { className: "pire-field-error", children: errorMessage })
1382
1464
  ]
@@ -1480,7 +1562,16 @@ function ComboBox({
1480
1562
  children: clearLabel ?? msg.inputClear
1481
1563
  }
1482
1564
  ) : null,
1483
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron-down", size: 16 }) })
1565
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1566
+ import_react_aria_components16.Button,
1567
+ {
1568
+ className: "pire-iconbtn",
1569
+ "data-size": "sm",
1570
+ "aria-label": msg.comboBoxShowSuggestions,
1571
+ style: { width: 20, height: 20 },
1572
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron-down", size: 16 })
1573
+ }
1574
+ )
1484
1575
  ]
1485
1576
  }
1486
1577
  ),
@@ -1495,10 +1586,19 @@ function ComboBox({
1495
1586
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1496
1587
  } : void 0,
1497
1588
  renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1498
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1499
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-label", children: item.label }),
1500
- item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1501
- ] })
1589
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1590
+ import_react_aria_components16.ListBoxItem,
1591
+ {
1592
+ className: "pire-option",
1593
+ id: item.value,
1594
+ textValue: item.label,
1595
+ isDisabled: item.isDisabled,
1596
+ children: [
1597
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-label", children: item.label }),
1598
+ item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1599
+ ]
1600
+ }
1601
+ )
1502
1602
  }
1503
1603
  ) })
1504
1604
  ]
@@ -1622,7 +1722,16 @@ function MultiComboBox({
1622
1722
  }
1623
1723
  )
1624
1724
  ] }),
1625
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "chevron-down", size: 16 }) })
1725
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1726
+ import_react_aria_components17.Button,
1727
+ {
1728
+ className: "pire-iconbtn",
1729
+ "data-size": "sm",
1730
+ "aria-label": msg.comboBoxShowSuggestions,
1731
+ style: { width: 20, height: 20 },
1732
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "chevron-down", size: 16 })
1733
+ }
1734
+ )
1626
1735
  ]
1627
1736
  }
1628
1737
  ),
@@ -1638,10 +1747,19 @@ function MultiComboBox({
1638
1747
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1639
1748
  } : void 0,
1640
1749
  renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1641
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_aria_components17.ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1642
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-label", children: item.label }),
1643
- item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1644
- ] })
1750
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1751
+ import_react_aria_components17.ListBoxItem,
1752
+ {
1753
+ className: "pire-option",
1754
+ id: item.value,
1755
+ textValue: item.label,
1756
+ isDisabled: item.isDisabled,
1757
+ children: [
1758
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-label", children: item.label }),
1759
+ item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1760
+ ]
1761
+ }
1762
+ )
1645
1763
  }
1646
1764
  ) })
1647
1765
  ]
@@ -1801,7 +1919,15 @@ function NumberField({
1801
1919
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1802
1920
  "data-stepper": stepperLayout,
1803
1921
  children: [
1804
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "decrement", className: "pire-qty-btn", "aria-label": decrementLabel ?? msg.numberFieldDecrease, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 16 }) }) : null,
1922
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1923
+ import_react_aria_components18.Button,
1924
+ {
1925
+ slot: "decrement",
1926
+ className: "pire-qty-btn",
1927
+ "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1928
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 16 })
1929
+ }
1930
+ ) : null,
1805
1931
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1806
1932
  import_react_aria_components18.Input,
1807
1933
  {
@@ -1813,10 +1939,34 @@ function NumberField({
1813
1939
  ),
1814
1940
  suffix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-affix", children: suffix }) : null,
1815
1941
  showsClear ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
1816
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "increment", className: "pire-qty-btn", "aria-label": incrementLabel ?? msg.numberFieldIncrease, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 16 }) }) : null,
1942
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1943
+ import_react_aria_components18.Button,
1944
+ {
1945
+ slot: "increment",
1946
+ className: "pire-qty-btn",
1947
+ "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1948
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 16 })
1949
+ }
1950
+ ) : null,
1817
1951
  hideStepper ? null : stepperLayout === "inline" ? null : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "pire-stepper", children: [
1818
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "increment", className: "pire-stepper-btn", "aria-label": incrementLabel ?? msg.numberFieldIncrease, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 10 }) }),
1819
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Button, { slot: "decrement", className: "pire-stepper-btn", "aria-label": decrementLabel ?? msg.numberFieldDecrease, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 10 }) })
1952
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1953
+ import_react_aria_components18.Button,
1954
+ {
1955
+ slot: "increment",
1956
+ className: "pire-stepper-btn",
1957
+ "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1958
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 10 })
1959
+ }
1960
+ ),
1961
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1962
+ import_react_aria_components18.Button,
1963
+ {
1964
+ slot: "decrement",
1965
+ className: "pire-stepper-btn",
1966
+ "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1967
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 10 })
1968
+ }
1969
+ )
1820
1970
  ] })
1821
1971
  ]
1822
1972
  }
@@ -1947,7 +2097,16 @@ function DatePicker({
1947
2097
  children: [
1948
2098
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.DateSegment, { segment, className: "pire-datesegment" }) }),
1949
2099
  showsClear ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
1950
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Button, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerOpenCalendar, style: { width: 24, height: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "calendar", size: 16 }) })
2100
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2101
+ import_react_aria_components19.Button,
2102
+ {
2103
+ className: "pire-iconbtn",
2104
+ "data-size": "sm",
2105
+ "aria-label": msg.datePickerOpenCalendar,
2106
+ style: { width: 24, height: 24 },
2107
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "calendar", size: 16 })
2108
+ }
2109
+ )
1951
2110
  ]
1952
2111
  }
1953
2112
  ),
@@ -1955,9 +2114,27 @@ function DatePicker({
1955
2114
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.FieldError, { className: "pire-field-error", children: errorMessage }),
1956
2115
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Dialog, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components19.Calendar, { className: "pire-calendar", children: [
1957
2116
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { className: "pire-calendar-head", children: [
1958
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Button, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerPreviousMonth, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-left", size: 16 }) }),
2117
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2118
+ import_react_aria_components19.Button,
2119
+ {
2120
+ slot: "previous",
2121
+ className: "pire-iconbtn",
2122
+ "data-size": "sm",
2123
+ "aria-label": msg.datePickerPreviousMonth,
2124
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-left", size: 16 })
2125
+ }
2126
+ ),
1959
2127
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Heading, { className: "pire-calendar-title" }),
1960
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Button, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerNextMonth, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-right", size: 16 }) })
2128
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2129
+ import_react_aria_components19.Button,
2130
+ {
2131
+ slot: "next",
2132
+ className: "pire-iconbtn",
2133
+ "data-size": "sm",
2134
+ "aria-label": msg.datePickerNextMonth,
2135
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-right", size: 16 })
2136
+ }
2137
+ )
1961
2138
  ] }),
1962
2139
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components19.CalendarGrid, { className: "pire-calendar-grid", children: [
1963
2140
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.CalendarHeaderCell, { children: day }) }),
@@ -2044,7 +2221,9 @@ function DateRangePicker({
2044
2221
  onChange(null);
2045
2222
  return;
2046
2223
  }
2047
- onChange(valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end });
2224
+ onChange(
2225
+ valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end }
2226
+ );
2048
2227
  };
2049
2228
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2050
2229
  import_react_aria_components20.DateRangePicker,
@@ -2239,7 +2418,13 @@ function Skeleton({ shape = "text", width, height, className, style, ...rest })
2239
2418
  );
2240
2419
  }
2241
2420
  var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
2242
- function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
2421
+ function SkeletonTableRow({
2422
+ columns,
2423
+ density = "regular",
2424
+ className,
2425
+ style,
2426
+ ...rest
2427
+ }) {
2243
2428
  const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
2244
2429
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2245
2430
  "div",
@@ -2251,18 +2436,15 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
2251
2436
  ...rest,
2252
2437
  children: cells.map((c, i) => {
2253
2438
  const align = c.numeric ? "right" : c.align ?? "left";
2254
- return (
2255
- // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
2256
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2257
- "div",
2258
- {
2259
- className: "pire-skeleton-cell",
2260
- "data-align": align,
2261
- style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2262
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2263
- },
2264
- i
2265
- )
2439
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2440
+ "div",
2441
+ {
2442
+ className: "pire-skeleton-cell",
2443
+ "data-align": align,
2444
+ style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2445
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2446
+ },
2447
+ i
2266
2448
  );
2267
2449
  })
2268
2450
  }
@@ -2316,10 +2498,11 @@ function DataTable({
2316
2498
  break;
2317
2499
  }
2318
2500
  if (typeof column.width !== "number") {
2319
- if (IS_DEV2) warnOnce2(
2320
- `pin-width:${column.key}`,
2321
- `DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
2322
- );
2501
+ if (IS_DEV2)
2502
+ warnOnce2(
2503
+ `pin-width:${column.key}`,
2504
+ `DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
2505
+ );
2323
2506
  broke = "width";
2324
2507
  break;
2325
2508
  }
@@ -2423,7 +2606,9 @@ function DataTable({
2423
2606
  {
2424
2607
  size: 12,
2425
2608
  name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
2426
- style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
2609
+ style: {
2610
+ color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)"
2611
+ }
2427
2612
  }
2428
2613
  ) : null
2429
2614
  ] })
@@ -2432,44 +2617,53 @@ function DataTable({
2432
2617
  )
2433
2618
  ))
2434
2619
  ] }),
2435
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2436
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2437
- Array.from({ length: skeletonRows }, (_, i) => (
2438
- // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2439
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2440
- ))
2441
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }), children: body.flatMap((row) => {
2442
- const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2443
- const record = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2444
- import_react_aria_components22.Row,
2445
- {
2446
- id: row.id,
2447
- className: cx("pire-tr", presentation.get(row.id)?.className),
2448
- "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2449
- children: [
2450
- hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2451
- columns.map((c) => {
2452
- const pin = pinProps(c.key);
2453
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2454
- import_react_aria_components22.Cell,
2455
- {
2456
- className: "pire-td",
2457
- "data-numeric": c.numeric ? "true" : void 0,
2458
- "data-tone": c.tone?.(row) ?? void 0,
2459
- ...pin,
2460
- style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2461
- children: c.render ? c.render(row) : row[c.key]
2462
- },
2463
- c.key
2464
- );
2465
- })
2466
- ]
2467
- },
2468
- row.id
2469
- );
2470
- if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2471
- return [record, /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))];
2472
- }) }),
2620
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2621
+ import_react_aria_components22.TableBody,
2622
+ {
2623
+ renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2624
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2625
+ Array.from({ length: skeletonRows }, (_, i) => (
2626
+ // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2627
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2628
+ ))
2629
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }),
2630
+ children: body.flatMap((row) => {
2631
+ const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2632
+ const record = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2633
+ import_react_aria_components22.Row,
2634
+ {
2635
+ id: row.id,
2636
+ className: cx("pire-tr", presentation.get(row.id)?.className),
2637
+ "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2638
+ children: [
2639
+ hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2640
+ columns.map((c) => {
2641
+ const pin = pinProps(c.key);
2642
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2643
+ import_react_aria_components22.Cell,
2644
+ {
2645
+ className: "pire-td",
2646
+ "data-numeric": c.numeric ? "true" : void 0,
2647
+ "data-tone": c.tone?.(row) ?? void 0,
2648
+ ...pin,
2649
+ style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2650
+ children: c.render ? c.render(row) : row[c.key]
2651
+ },
2652
+ c.key
2653
+ );
2654
+ })
2655
+ ]
2656
+ },
2657
+ row.id
2658
+ );
2659
+ if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2660
+ return [
2661
+ record,
2662
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))
2663
+ ];
2664
+ })
2665
+ }
2666
+ ),
2473
2667
  footer && !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components22.Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
2474
2668
  hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-tf", ...pinProps(null) }) : null,
2475
2669
  columns.map((c, i) => {
@@ -2539,10 +2733,17 @@ function ValueHelpDialog({
2539
2733
  onClose,
2540
2734
  footer: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2541
2735
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
2542
- isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { variant: "primary", onPress: () => {
2543
- onConfirm?.(selectedKeys ?? []);
2544
- onClose?.();
2545
- }, children: msg.valueHelpConfirm }) : null
2736
+ isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2737
+ Button,
2738
+ {
2739
+ variant: "primary",
2740
+ onPress: () => {
2741
+ onConfirm?.(selectedKeys ?? []);
2742
+ onClose?.();
2743
+ },
2744
+ children: msg.valueHelpConfirm
2745
+ }
2746
+ ) : null
2546
2747
  ] }),
2547
2748
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2548
2749
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -2563,28 +2764,35 @@ function ValueHelpDialog({
2563
2764
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
2564
2765
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
2565
2766
  ] }) : null,
2566
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { onScroll: onLoadMore ? (event) => {
2567
- const el = event.currentTarget;
2568
- if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2569
- } : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2570
- DataTable,
2767
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2768
+ "div",
2571
2769
  {
2572
- "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
2573
- density: "condensed",
2574
- columns,
2575
- rows: filtered,
2576
- isLoading,
2577
- emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
2578
- selectable: isMultiple ? "multiple" : void 0,
2579
- hideSelectAll: isMultiple,
2580
- selected: isMultiple ? selectedKeys : void 0,
2581
- onSelectionChange: isMultiple ? onSelectionChange : void 0,
2582
- onRowAction: isMultiple ? void 0 : (row) => {
2583
- onSelect?.(row);
2584
- onClose?.();
2585
- }
2770
+ onScroll: onLoadMore ? (event) => {
2771
+ const el = event.currentTarget;
2772
+ if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2773
+ } : void 0,
2774
+ style: { overflow: "auto", maxHeight: "48vh" },
2775
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2776
+ DataTable,
2777
+ {
2778
+ "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
2779
+ density: "condensed",
2780
+ columns,
2781
+ rows: filtered,
2782
+ isLoading,
2783
+ emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
2784
+ selectable: isMultiple ? "multiple" : void 0,
2785
+ hideSelectAll: isMultiple,
2786
+ selected: isMultiple ? selectedKeys : void 0,
2787
+ onSelectionChange: isMultiple ? onSelectionChange : void 0,
2788
+ onRowAction: isMultiple ? void 0 : (row) => {
2789
+ onSelect?.(row);
2790
+ onClose?.();
2791
+ }
2792
+ }
2793
+ )
2586
2794
  }
2587
- ) })
2795
+ )
2588
2796
  ] })
2589
2797
  }
2590
2798
  );
@@ -2730,7 +2938,9 @@ function screenFiles(files, { maxSize, acceptedFileTypes }) {
2730
2938
  continue;
2731
2939
  }
2732
2940
  if (acceptedFileTypes?.length) {
2733
- const ok = acceptedFileTypes.some((t) => t.startsWith(".") ? file.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? file.type.startsWith(t.slice(0, -1)) : file.type === t);
2941
+ const ok = acceptedFileTypes.some(
2942
+ (t) => t.startsWith(".") ? file.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? file.type.startsWith(t.slice(0, -1)) : file.type === t
2943
+ );
2734
2944
  if (!ok) {
2735
2945
  rejected.push({ file, reason: "type" });
2736
2946
  continue;
@@ -2767,9 +2977,12 @@ function FileUpload({
2767
2977
  const [uncontrolled, setUncontrolled] = React21.useState(defaultValue ?? []);
2768
2978
  const files = value ?? uncontrolled;
2769
2979
  const created = React21.useRef([]);
2770
- React21.useEffect(() => () => {
2771
- for (const url of created.current) URL.revokeObjectURL(url);
2772
- }, []);
2980
+ React21.useEffect(
2981
+ () => () => {
2982
+ for (const url of created.current) URL.revokeObjectURL(url);
2983
+ },
2984
+ []
2985
+ );
2773
2986
  const commit = (next) => {
2774
2987
  if (value === void 0) setUncontrolled(next);
2775
2988
  onChange?.(next);
@@ -2890,14 +3103,7 @@ var import_jsx_runtime38 = require("react/jsx-runtime");
2890
3103
  function Menu({ minWidth, className, style, ...rest }) {
2891
3104
  const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
2892
3105
  const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
2893
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2894
- import_react_aria_components26.Menu,
2895
- {
2896
- className: cx("pire-menu", className),
2897
- style: menuStyle,
2898
- ...rest
2899
- }
2900
- );
3106
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components26.Menu, { className: cx("pire-menu", className), style: menuStyle, ...rest });
2901
3107
  }
2902
3108
  var shortcutKeys = (shortcut) => {
2903
3109
  if (shortcut == null) return [];
@@ -2926,7 +3132,14 @@ function MenuItem({
2926
3132
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-label", children }),
2927
3133
  description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-desc", children: description }) : null
2928
3134
  ] }),
2929
- keys.length ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Kbd, { size: "sm", children: cap }, `${cap}-${index}`)) }) : null
3135
+ keys.length ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3136
+ Kbd,
3137
+ {
3138
+ size: "sm",
3139
+ children: cap
3140
+ },
3141
+ `${cap}-${index}`
3142
+ )) }) : null
2930
3143
  ]
2931
3144
  }
2932
3145
  );
@@ -2961,6 +3174,7 @@ function SideNav({
2961
3174
  onExpandedChange,
2962
3175
  collapsed,
2963
3176
  railFlyout = true,
3177
+ bordered = true,
2964
3178
  footer,
2965
3179
  className,
2966
3180
  ...rest
@@ -3069,6 +3283,7 @@ function SideNav({
3069
3283
  {
3070
3284
  className: cx("pire-sidenav", className),
3071
3285
  "data-collapsed": collapsed ? "true" : void 0,
3286
+ "data-bordered": bordered ? void 0 : "false",
3072
3287
  "aria-label": msg.sideNavLabel,
3073
3288
  ...rest,
3074
3289
  children: [
@@ -3260,7 +3475,9 @@ function childrenOfType(children, type, what, parent) {
3260
3475
  }
3261
3476
  if (!React24.isValidElement(child) || child.type !== type) {
3262
3477
  const isWrapper = React24.isValidElement(child) && typeof child.type !== "string" && !CONFIG_ELEMENTS.has(child.type);
3263
- throw new Error(`[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` + (isWrapper ? ` Configuration elements are read, not rendered, so ${parent} cannot see through a wrapper component.` : ""));
3478
+ throw new Error(
3479
+ `[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` + (isWrapper ? ` Configuration elements are read, not rendered, so ${parent} cannot see through a wrapper component.` : "")
3480
+ );
3264
3481
  }
3265
3482
  out.push({ ...child.props, key: child.key != null ? String(child.key) : `${path}${i}` });
3266
3483
  });
@@ -3271,13 +3488,24 @@ function childrenOfType(children, type, what, parent) {
3271
3488
  function readTabs(children) {
3272
3489
  return childrenOfType(children, RibbonTab, "Ribbon.Tab", "Ribbon").map((tab) => ({
3273
3490
  ...tab,
3274
- groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map((group) => ({
3275
- ...group,
3276
- commands: childrenOfType(group.children, RibbonCommand, "Ribbon.Command", "Ribbon.Group")
3277
- }))
3491
+ groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map(
3492
+ (group) => ({
3493
+ ...group,
3494
+ commands: childrenOfType(
3495
+ group.children,
3496
+ RibbonCommand,
3497
+ "Ribbon.Command",
3498
+ "Ribbon.Group"
3499
+ )
3500
+ })
3501
+ )
3278
3502
  }));
3279
3503
  }
3280
- function Command({ command, selectionCount, inBar }) {
3504
+ function Command({
3505
+ command,
3506
+ selectionCount,
3507
+ inBar
3508
+ }) {
3281
3509
  const size = inBar ? "sm" : command.size ?? "sm";
3282
3510
  const isDisabled = command.isDisabled || command.requiresSelection === true && selectionCount === 0;
3283
3511
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
@@ -3305,6 +3533,39 @@ function Group8({ group, selectionCount }) {
3305
3533
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-caption", "aria-hidden": "true", children: group.caption })
3306
3534
  ] });
3307
3535
  }
3536
+ function useTrailingOverflow() {
3537
+ const ref = React24.useRef(null);
3538
+ const [overflow, setOverflow] = React24.useState(false);
3539
+ React24.useEffect(() => {
3540
+ const node = ref.current;
3541
+ if (!node) return;
3542
+ const measure = () => setOverflow(node.scrollLeft + node.clientWidth < node.scrollWidth - 1);
3543
+ measure();
3544
+ node.addEventListener("scroll", measure, { passive: true });
3545
+ const resize = new ResizeObserver(measure);
3546
+ resize.observe(node);
3547
+ for (const child of node.children) resize.observe(child);
3548
+ return () => {
3549
+ node.removeEventListener("scroll", measure);
3550
+ resize.disconnect();
3551
+ };
3552
+ }, []);
3553
+ return [ref, overflow];
3554
+ }
3555
+ function Surface({
3556
+ className,
3557
+ id,
3558
+ label,
3559
+ trailing,
3560
+ children
3561
+ }) {
3562
+ const [scrollRef, overflow] = useTrailingOverflow();
3563
+ const domId = id ? { id } : {};
3564
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components31.Toolbar, { ...domId, className, "aria-label": label, children: [
3565
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-scroll", ref: scrollRef, children }),
3566
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-trail", "data-overflow": overflow ? "true" : void 0, children: trailing })
3567
+ ] });
3568
+ }
3308
3569
  function barBlocks(tabs) {
3309
3570
  const blocks = [];
3310
3571
  for (const tab of tabs) {
@@ -3338,10 +3599,13 @@ function Ribbon({
3338
3599
  const [ownTab, setOwnTab] = React24.useState(defaultValue);
3339
3600
  const requested = value ?? ownTab;
3340
3601
  const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;
3341
- const select = React24.useCallback((id) => {
3342
- setOwnTab(id);
3343
- onChange?.(id);
3344
- }, [onChange]);
3602
+ const select = React24.useCallback(
3603
+ (id) => {
3604
+ setOwnTab(id);
3605
+ onChange?.(id);
3606
+ },
3607
+ [onChange]
3608
+ );
3345
3609
  const hadSelection = React24.useRef(false);
3346
3610
  React24.useEffect(() => {
3347
3611
  const has = count > 0;
@@ -3362,7 +3626,6 @@ function Ribbon({
3362
3626
  toggleRef.current?.focus();
3363
3627
  });
3364
3628
  const bandId = React24.useId();
3365
- const bandDomId = { id: bandId };
3366
3629
  const toggle = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3367
3630
  import_react_aria_components31.Button,
3368
3631
  {
@@ -3381,16 +3644,24 @@ function Ribbon({
3381
3644
  );
3382
3645
  if (collapsed) {
3383
3646
  const blocks = barBlocks(tabs);
3384
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components31.Toolbar, { className: "pire-ribbon-bar", "aria-label": rest["aria-label"], children: [
3385
- leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-leading", children: leading }) : null,
3386
- blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(React24.Fragment, { children: [
3387
- i > 0 || leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-bar-sep" }) : null,
3388
- block.commands.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { command: c, selectionCount: count, inBar: true }, c.key))
3389
- ] }, block.key)),
3390
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-bar-spacer" }),
3391
- actions,
3392
- toggle
3393
- ] }) });
3647
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3648
+ Surface,
3649
+ {
3650
+ className: "pire-ribbon-bar",
3651
+ label: rest["aria-label"],
3652
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3653
+ actions,
3654
+ toggle
3655
+ ] }),
3656
+ children: [
3657
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-leading", children: leading }) : null,
3658
+ blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(React24.Fragment, { children: [
3659
+ i > 0 || leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-bar-sep" }) : null,
3660
+ block.commands.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { command: c, selectionCount: count, inBar: true }, c.key))
3661
+ ] }, block.key))
3662
+ ]
3663
+ }
3664
+ ) });
3394
3665
  }
3395
3666
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components31.Tabs, { selectedKey: selected, onSelectionChange: (k) => select(String(k)), children: [
3396
3667
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_aria_components31.TabList, { className: "pire-ribbon-tablist", "aria-label": rest["aria-label"], children: visible.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -3403,12 +3674,19 @@ function Ribbon({
3403
3674
  },
3404
3675
  tab.key
3405
3676
  )) }),
3406
- visible.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_aria_components31.TabPanel, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components31.Toolbar, { ...bandDomId, className: "pire-ribbon-band", "aria-label": msg.ribbonLabel, children: [
3407
- tab.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Group8, { group, selectionCount: count }, group.key)),
3408
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-bar-spacer" }),
3409
- actions,
3410
- toggle
3411
- ] }) }, tab.key))
3677
+ visible.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_aria_components31.TabPanel, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3678
+ Surface,
3679
+ {
3680
+ id: bandId,
3681
+ className: "pire-ribbon-band",
3682
+ label: msg.ribbonLabel,
3683
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3684
+ actions,
3685
+ toggle
3686
+ ] }),
3687
+ children: tab.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Group8, { group, selectionCount: count }, group.key))
3688
+ }
3689
+ ) }, tab.key))
3412
3690
  ] }) });
3413
3691
  }
3414
3692
  Ribbon.Tab = RibbonTab;
@@ -3423,7 +3701,15 @@ var KIND_ICON = {
3423
3701
  warning: "alert-triangle",
3424
3702
  error: "alert-octagon"
3425
3703
  };
3426
- function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
3704
+ function InlineMessage({
3705
+ kind = "info",
3706
+ title,
3707
+ action,
3708
+ onClose,
3709
+ children,
3710
+ className,
3711
+ ...rest
3712
+ }) {
3427
3713
  const msg = usePireMessages();
3428
3714
  const assertive = kind === "error" || kind === "warning";
3429
3715
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
@@ -3456,7 +3742,14 @@ var KIND_ICON2 = {
3456
3742
  warning: "alert-triangle",
3457
3743
  error: "alert-octagon"
3458
3744
  };
3459
- function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
3745
+ function Toast({
3746
+ kind = "success",
3747
+ onClose,
3748
+ position = "bottom-center",
3749
+ children,
3750
+ className,
3751
+ ...rest
3752
+ }) {
3460
3753
  const msg = usePireMessages();
3461
3754
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3462
3755
  "div",
@@ -3475,21 +3768,36 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
3475
3768
  );
3476
3769
  }
3477
3770
  var ToastContext = React25.createContext(null);
3478
- function ToastProvider({ children, timeout = 6e3 }) {
3771
+ function ToastProvider({
3772
+ children,
3773
+ timeout = 6e3
3774
+ }) {
3479
3775
  const msg = usePireMessages();
3480
3776
  const [toasts, setToasts] = React25.useState([]);
3481
3777
  const close = React25.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3482
- const add = React25.useCallback((toast) => {
3483
- const id = Math.random().toString(36).slice(2);
3484
- setToasts((t) => [...t, { ...toast, id }]);
3485
- const ms = toast.timeout ?? timeout;
3486
- if (ms > 0) setTimeout(() => close(id), ms);
3487
- return id;
3488
- }, [close, timeout]);
3778
+ const add = React25.useCallback(
3779
+ (toast) => {
3780
+ const id = Math.random().toString(36).slice(2);
3781
+ setToasts((t) => [...t, { ...toast, id }]);
3782
+ const ms = toast.timeout ?? timeout;
3783
+ if (ms > 0) setTimeout(() => close(id), ms);
3784
+ return id;
3785
+ },
3786
+ [close, timeout]
3787
+ );
3489
3788
  const value = React25.useMemo(() => ({ add, close }), [add, close]);
3490
3789
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ToastContext.Provider, { value, children: [
3491
3790
  children,
3492
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
3791
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3792
+ Toast,
3793
+ {
3794
+ kind: t.kind,
3795
+ onClose: () => close(t.id),
3796
+ style: { position: "static", transform: "none" },
3797
+ children: t.message
3798
+ },
3799
+ t.id
3800
+ )) })
3493
3801
  ] });
3494
3802
  }
3495
3803
  function useToast() {
@@ -3537,7 +3845,17 @@ function KpiTile({
3537
3845
 
3538
3846
  // src/components/data/ObjectHeader.tsx
3539
3847
  var import_jsx_runtime48 = require("react/jsx-runtime");
3540
- function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
3848
+ function ObjectHeader({
3849
+ title,
3850
+ subtitle,
3851
+ id,
3852
+ breadcrumb,
3853
+ badge,
3854
+ facts,
3855
+ actions,
3856
+ className,
3857
+ ...rest
3858
+ }) {
3541
3859
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("header", { className: cx("pire-objheader", className), ...rest, children: [
3542
3860
  breadcrumb,
3543
3861
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "pire-objheader-row", children: [
@@ -3553,7 +3871,15 @@ function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions,
3553
3871
  ] }),
3554
3872
  facts?.length ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { children: [
3555
3873
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dt", { className: "pire-fact-label", children: fact.label }),
3556
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
3874
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3875
+ "dd",
3876
+ {
3877
+ className: "pire-fact-value",
3878
+ "data-numeric": fact.numeric ? "true" : void 0,
3879
+ style: { margin: 0 },
3880
+ children: fact.value
3881
+ }
3882
+ )
3557
3883
  ] }, fact.label)) }) : null
3558
3884
  ] });
3559
3885
  }
@@ -3592,7 +3918,14 @@ function FilterBar({
3592
3918
 
3593
3919
  // src/components/data/DescriptionList.tsx
3594
3920
  var import_jsx_runtime50 = require("react/jsx-runtime");
3595
- function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
3921
+ function DescriptionList({
3922
+ items,
3923
+ layout = "rows",
3924
+ columns = 3,
3925
+ className,
3926
+ style,
3927
+ ...rest
3928
+ }) {
3596
3929
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3597
3930
  "dl",
3598
3931
  {
@@ -3650,10 +3983,7 @@ function linearScale(values, tickCount = 4, startAtZero = true) {
3650
3983
  const min = toStepPrecision(Math.floor(low / step + EDGE_TOLERANCE) * step);
3651
3984
  const max = toStepPrecision(Math.ceil(high / step - EDGE_TOLERANCE) * step);
3652
3985
  const stepCount = Math.round((max - min) / step);
3653
- const ticks = Array.from(
3654
- { length: stepCount + 1 },
3655
- (_, index) => toStepPrecision(min + index * step)
3656
- );
3986
+ const ticks = Array.from({ length: stepCount + 1 }, (_, index) => toStepPrecision(min + index * step));
3657
3987
  return { min, max, ticks };
3658
3988
  }
3659
3989
  function scalePosition(value, scale) {
@@ -3681,10 +4011,14 @@ function warnOnDonutShape(series, categoryCount, chartLabel) {
3681
4011
  complaints.push(`it has ${series.length} series but a donut draws one \u2014 the rest are ignored`);
3682
4012
  }
3683
4013
  if (categoryCount > VIZ_SLOT_COUNT) {
3684
- complaints.push(`it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; past about four, slices stop being readable at all \u2014 group the tail into "Other"`);
4014
+ complaints.push(
4015
+ `it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; past about four, slices stop being readable at all \u2014 group the tail into "Other"`
4016
+ );
3685
4017
  }
3686
4018
  if (series[0]?.values.some((value) => value != null && value < 0)) {
3687
- complaints.push("it contains negative values, which have no part-to-whole meaning \u2014 a signed measure belongs in a bar chart");
4019
+ complaints.push(
4020
+ "it contains negative values, which have no part-to-whole meaning \u2014 a signed measure belongs in a bar chart"
4021
+ );
3688
4022
  }
3689
4023
  if (complaints.length === 0) return;
3690
4024
  warnedCharts.add(`donut:${chartLabel}`);
@@ -3697,7 +4031,9 @@ function flatValues(series) {
3697
4031
  return series.flatMap((one) => one.values);
3698
4032
  }
3699
4033
  function alignToCategories(series, categoryCount) {
3700
- return series.map((one) => one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) });
4034
+ return series.map(
4035
+ (one) => one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) }
4036
+ );
3701
4037
  }
3702
4038
 
3703
4039
  // src/components/data/ChartFrame.tsx
@@ -3956,10 +4292,12 @@ function LineChart({
3956
4292
  },
3957
4293
  tick
3958
4294
  )),
3959
- categories.map((category, index) => index % labelEvery === 0 ? (
3960
- // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3961
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
3962
- ) : null)
4295
+ categories.map(
4296
+ (category, index) => index % labelEvery === 0 ? (
4297
+ // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4298
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
4299
+ ) : null
4300
+ )
3963
4301
  ] }),
3964
4302
  showArea && series[0] ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3965
4303
  "path",
@@ -3970,19 +4308,20 @@ function LineChart({
3970
4308
  }
3971
4309
  ) : null,
3972
4310
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
3973
- withMarkers ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { className: "pire-chart-marker", children: series.map((one, seriesIndex) => one.values.map((value, index) => value == null ? null : (
3974
- // biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.
3975
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3976
- "circle",
3977
- {
3978
- cx: xAt(index),
3979
- cy: yAt(value),
3980
- r: 4,
3981
- fill: seriesColor(one, seriesIndex)
3982
- },
3983
- `${one.id}-${index}`
4311
+ withMarkers ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { className: "pire-chart-marker", children: series.map(
4312
+ (one, seriesIndex) => one.values.map(
4313
+ (value, index) => value == null ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4314
+ "circle",
4315
+ {
4316
+ cx: xAt(index),
4317
+ cy: yAt(value),
4318
+ r: 4,
4319
+ fill: seriesColor(one, seriesIndex)
4320
+ },
4321
+ `${one.id}-${index}`
4322
+ )
3984
4323
  )
3985
- ))) }) : null
4324
+ ) }) : null
3986
4325
  ]
3987
4326
  }
3988
4327
  ) : null,
@@ -3990,7 +4329,9 @@ function LineChart({
3990
4329
  "div",
3991
4330
  {
3992
4331
  className: "pire-chart-hover",
3993
- style: { inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px` },
4332
+ style: {
4333
+ inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px`
4334
+ },
3994
4335
  children: categories.map((category, categoryIndex) => (
3995
4336
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3996
4337
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "pire-chart-band", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
@@ -4130,15 +4471,31 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
4130
4471
 
4131
4472
  // src/components/data/RecordCard.tsx
4132
4473
  var import_jsx_runtime57 = require("react/jsx-runtime");
4133
- function RecordCard({ title, subtitle, icon, action, isDisabled, className, ...rest }) {
4134
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cx("pire-recordcard", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
4135
- icon ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: icon, size: 20 }) }) : null,
4136
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "pire-recordcard-body", children: [
4137
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-title", children: title }),
4138
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4139
- ] }),
4140
- action ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-action", children: action }) : null
4141
- ] });
4474
+ function RecordCard({
4475
+ title,
4476
+ subtitle,
4477
+ icon,
4478
+ action,
4479
+ isDisabled,
4480
+ className,
4481
+ ...rest
4482
+ }) {
4483
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4484
+ "div",
4485
+ {
4486
+ className: cx("pire-recordcard", className),
4487
+ "data-disabled": isDisabled ? "true" : void 0,
4488
+ ...rest,
4489
+ children: [
4490
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: icon, size: 20 }) }) : null,
4491
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "pire-recordcard-body", children: [
4492
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-title", children: title }),
4493
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4494
+ ] }),
4495
+ action ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-action", children: action }) : null
4496
+ ]
4497
+ }
4498
+ );
4142
4499
  }
4143
4500
 
4144
4501
  // src/components/data/ViewSwitcher.tsx
@@ -4238,7 +4595,14 @@ function SectionHeader({ title, meta, actions, className, ...rest }) {
4238
4595
 
4239
4596
  // src/components/layout/SelectionBar.tsx
4240
4597
  var import_jsx_runtime63 = require("react/jsx-runtime");
4241
- function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
4598
+ function SelectionBar({
4599
+ count,
4600
+ noun = "record",
4601
+ children,
4602
+ actions,
4603
+ className,
4604
+ ...rest
4605
+ }) {
4242
4606
  if (!count) return null;
4243
4607
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
4244
4608
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "pire-selectionbar-count", children: [
@@ -4337,7 +4701,14 @@ function ConfirmDialog({
4337
4701
  // pairs with an explicit role for the same reason.
4338
4702
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "pire-confirm-facts", role: "group", "aria-label": msg.confirmDialogFactsLabel, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DescriptionList, { layout: "rows", items: facts }) })
4339
4703
  ) : null,
4340
- consequence ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
4704
+ consequence ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4705
+ InlineMessage,
4706
+ {
4707
+ kind: tone === "danger" ? "error" : "warning",
4708
+ style: { marginBottom: children ? "var(--sp-3)" : 0 },
4709
+ children: consequence
4710
+ }
4711
+ ) : null,
4341
4712
  children
4342
4713
  ]
4343
4714
  }
@@ -4378,10 +4749,13 @@ function CommandPalette({
4378
4749
  for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
4379
4750
  return byId;
4380
4751
  }, [groups]);
4381
- const filter = React28.useCallback((textValue, inputValue, node) => {
4382
- if (node.parentKey === RESULTS_SECTION_KEY) return true;
4383
- return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
4384
- }, [contains, searchableById]);
4752
+ const filter = React28.useCallback(
4753
+ (textValue, inputValue, node) => {
4754
+ if (node.parentKey === RESULTS_SECTION_KEY) return true;
4755
+ return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
4756
+ },
4757
+ [contains, searchableById]
4758
+ );
4385
4759
  const handleInputChange = (value) => {
4386
4760
  setQuery(value);
4387
4761
  onSearch?.(value);
@@ -4508,7 +4882,10 @@ function AppLauncher({
4508
4882
  if (isFilteredExternally) return sections;
4509
4883
  const q = query.trim();
4510
4884
  if (!q) return sections;
4511
- return sections.map((section) => ({ ...section, items: section.items.filter((i) => contains(searchableText2(i), q)) })).filter((section) => section.items.length > 0);
4885
+ return sections.map((section) => ({
4886
+ ...section,
4887
+ items: section.items.filter((i) => contains(searchableText2(i), q))
4888
+ })).filter((section) => section.items.length > 0);
4512
4889
  }, [sections, query, isFilteredExternally, contains]);
4513
4890
  const isEmpty = !isLoading && visible.length === 0;
4514
4891
  const label = ariaLabel ?? msg.appLauncherLabel;
@@ -4565,7 +4942,13 @@ function AppLauncher({
4565
4942
  onAction?.(item.id);
4566
4943
  },
4567
4944
  children: [
4568
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: item.icon, size: (section.variant ?? "tile") === "tile" ? 20 : 16 }) }) : null,
4945
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4946
+ Icon,
4947
+ {
4948
+ name: item.icon,
4949
+ size: (section.variant ?? "tile") === "tile" ? 20 : 16
4950
+ }
4951
+ ) }) : null,
4569
4952
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "pire-launcher-item-text", children: [
4570
4953
  /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-label", children: item.label }),
4571
4954
  showsDescription ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-desc", children: item.description }) : null
@@ -4586,7 +4969,16 @@ function AppLauncher({
4586
4969
  // src/components/patterns/SidePanel.tsx
4587
4970
  var import_react_aria_components37 = require("react-aria-components");
4588
4971
  var import_jsx_runtime69 = require("react/jsx-runtime");
4589
- function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
4972
+ function SidePanel({
4973
+ isOpen,
4974
+ title,
4975
+ subtitle,
4976
+ width = 400,
4977
+ children,
4978
+ footer,
4979
+ onClose,
4980
+ className
4981
+ }) {
4590
4982
  const msg = usePireMessages();
4591
4983
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4592
4984
  import_react_aria_components37.ModalOverlay,
@@ -4614,7 +5006,15 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
4614
5006
 
4615
5007
  // src/components/patterns/EmptyState.tsx
4616
5008
  var import_jsx_runtime70 = require("react/jsx-runtime");
4617
- function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
5009
+ function EmptyState({
5010
+ icon = "file-text",
5011
+ title,
5012
+ action,
5013
+ compact,
5014
+ children,
5015
+ className,
5016
+ ...rest
5017
+ }) {
4618
5018
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
4619
5019
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
4620
5020
  title ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
@@ -4687,22 +5087,25 @@ function NumPad({
4687
5087
  }) {
4688
5088
  const msg = usePireMessages();
4689
5089
  const containerRef = React30.useRef(null);
4690
- const applyKey = React30.useCallback((key) => {
4691
- if (isDisabled) return;
4692
- if (key.value === "backspace") {
4693
- onChange(value.slice(0, -1));
4694
- return;
4695
- }
4696
- if (key.value === "clear") {
4697
- onChange("");
4698
- return;
4699
- }
4700
- if (isInsertable(key.value)) {
4701
- onChange(value + key.value);
4702
- return;
4703
- }
4704
- onAction?.(key.value);
4705
- }, [isDisabled, value, onChange, onAction]);
5090
+ const applyKey = React30.useCallback(
5091
+ (key) => {
5092
+ if (isDisabled) return;
5093
+ if (key.value === "backspace") {
5094
+ onChange(value.slice(0, -1));
5095
+ return;
5096
+ }
5097
+ if (key.value === "clear") {
5098
+ onChange("");
5099
+ return;
5100
+ }
5101
+ if (isInsertable(key.value)) {
5102
+ onChange(value + key.value);
5103
+ return;
5104
+ }
5105
+ onAction?.(key.value);
5106
+ },
5107
+ [isDisabled, value, onChange, onAction]
5108
+ );
4706
5109
  useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);
4707
5110
  const keys = [...BASE_KEYS, ...extraKeys];
4708
5111
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
@@ -4772,9 +5175,12 @@ function FileDropZone({
4772
5175
  const [uncontrolled, setUncontrolled] = React31.useState(defaultValue ?? []);
4773
5176
  const files = value ?? uncontrolled;
4774
5177
  const created = React31.useRef([]);
4775
- React31.useEffect(() => () => {
4776
- for (const url of created.current) URL.revokeObjectURL(url);
4777
- }, []);
5178
+ React31.useEffect(
5179
+ () => () => {
5180
+ for (const url of created.current) URL.revokeObjectURL(url);
5181
+ },
5182
+ []
5183
+ );
4778
5184
  const commit = (next) => {
4779
5185
  if (value === void 0) setUncontrolled(next);
4780
5186
  onChange?.(next);
@@ -4805,9 +5211,7 @@ function FileDropZone({
4805
5211
  "data-height": height,
4806
5212
  isDisabled: isDisabled || isReadOnly,
4807
5213
  onDrop: async (e) => {
4808
- const dropped = await Promise.all(
4809
- e.items.filter(import_react_aria_components38.isFileDropItem).map((item) => item.getFile())
4810
- );
5214
+ const dropped = await Promise.all(e.items.filter(import_react_aria_components38.isFileDropItem).map((item) => item.getFile()));
4811
5215
  accept(dropped);
4812
5216
  },
4813
5217
  children: [