@orianatech/pire 1.6.0 → 2.0.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 (54) hide show
  1. package/dist/components/forms/ChoiceCardGroup.d.cts +11 -1
  2. package/dist/components/forms/ChoiceCardGroup.d.ts +11 -1
  3. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -1
  4. package/dist/components/forms/ComboBox.d.cts +11 -1
  5. package/dist/components/forms/ComboBox.d.ts +11 -1
  6. package/dist/components/forms/ComboBox.d.ts.map +1 -1
  7. package/dist/components/forms/DatePicker.d.cts +11 -1
  8. package/dist/components/forms/DatePicker.d.ts +11 -1
  9. package/dist/components/forms/DatePicker.d.ts.map +1 -1
  10. package/dist/components/forms/DateRangePicker.d.cts +11 -1
  11. package/dist/components/forms/DateRangePicker.d.ts +11 -1
  12. package/dist/components/forms/DateRangePicker.d.ts.map +1 -1
  13. package/dist/components/forms/FieldDescription.d.cts +16 -0
  14. package/dist/components/forms/FieldDescription.d.ts +17 -0
  15. package/dist/components/forms/FieldDescription.d.ts.map +1 -0
  16. package/dist/components/forms/FieldHelp.d.cts +19 -0
  17. package/dist/components/forms/FieldHelp.d.ts +20 -0
  18. package/dist/components/forms/FieldHelp.d.ts.map +1 -0
  19. package/dist/components/forms/FieldLabel.d.cts +36 -0
  20. package/dist/components/forms/FieldLabel.d.ts +37 -0
  21. package/dist/components/forms/FieldLabel.d.ts.map +1 -0
  22. package/dist/components/forms/FormField.d.cts +10 -1
  23. package/dist/components/forms/FormField.d.ts +10 -1
  24. package/dist/components/forms/FormField.d.ts.map +1 -1
  25. package/dist/components/forms/Input.d.cts +11 -1
  26. package/dist/components/forms/Input.d.ts +11 -1
  27. package/dist/components/forms/Input.d.ts.map +1 -1
  28. package/dist/components/forms/MultiComboBox.d.cts +11 -1
  29. package/dist/components/forms/MultiComboBox.d.ts +11 -1
  30. package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
  31. package/dist/components/forms/NumberField.d.cts +11 -1
  32. package/dist/components/forms/NumberField.d.ts +11 -1
  33. package/dist/components/forms/NumberField.d.ts.map +1 -1
  34. package/dist/components/forms/Select.d.cts +38 -4
  35. package/dist/components/forms/Select.d.ts +38 -4
  36. package/dist/components/forms/Select.d.ts.map +1 -1
  37. package/dist/components/forms/TextArea.d.cts +11 -1
  38. package/dist/components/forms/TextArea.d.ts +11 -1
  39. package/dist/components/forms/TextArea.d.ts.map +1 -1
  40. package/dist/components/utils/devWarn.d.cts +9 -0
  41. package/dist/components/utils/devWarn.d.ts +10 -0
  42. package/dist/components/utils/devWarn.d.ts.map +1 -0
  43. package/dist/components.css +11 -0
  44. package/dist/i18n/messages.d.cts +13 -1
  45. package/dist/i18n/messages.d.ts +13 -1
  46. package/dist/i18n/messages.d.ts.map +1 -1
  47. package/dist/index.cjs +953 -843
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +1 -0
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +837 -748
  53. package/dist/index.js.map +1 -1
  54. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -52,17 +52,18 @@ __export(src_exports, {
52
52
  DialogBody: () => DialogBody,
53
53
  DialogDescription: () => DialogDescription,
54
54
  DialogTitle: () => DialogTitle,
55
- DialogTrigger: () => import_react_aria_components40.DialogTrigger,
55
+ DialogTrigger: () => import_react_aria_components43.DialogTrigger,
56
56
  DonutChart: () => DonutChart,
57
57
  EmptyState: () => EmptyState,
58
+ FieldHelp: () => FieldHelp,
58
59
  FileDropZone: () => FileDropZone,
59
60
  FileUpload: () => FileUpload,
60
61
  FilterBar: () => FilterBar,
61
- Focusable: () => import_react_aria_components41.Focusable,
62
+ Focusable: () => import_react_aria_components44.Focusable,
62
63
  FooterBar: () => FooterBar,
63
64
  FormField: () => FormField,
64
65
  Heading: () => Heading,
65
- I18nProvider: () => import_react_aria_components40.I18nProvider,
66
+ I18nProvider: () => import_react_aria_components43.I18nProvider,
66
67
  ICON_NAMES: () => ICON_NAMES,
67
68
  Icon: () => Icon,
68
69
  IconButton: () => IconButton,
@@ -77,7 +78,7 @@ __export(src_exports, {
77
78
  MenuItem: () => MenuItem,
78
79
  MenuSection: () => MenuSection,
79
80
  MenuSeparator: () => MenuSeparator,
80
- MenuTrigger: () => import_react_aria_components40.MenuTrigger,
81
+ MenuTrigger: () => import_react_aria_components43.MenuTrigger,
81
82
  MultiComboBox: () => MultiComboBox,
82
83
  NumPad: () => NumPad,
83
84
  NumberField: () => NumberField,
@@ -86,14 +87,14 @@ __export(src_exports, {
86
87
  PageHeader: () => PageHeader,
87
88
  Pagination: () => Pagination,
88
89
  PireIntlProvider: () => PireIntlProvider,
89
- Popover: () => import_react_aria_components40.Popover,
90
+ Popover: () => import_react_aria_components43.Popover,
90
91
  ProgressBar: () => ProgressBar,
91
92
  QuantityStepper: () => QuantityStepper,
92
93
  Radio: () => Radio,
93
94
  RadioGroup: () => RadioGroup,
94
95
  RecordCard: () => RecordCard,
95
96
  Ribbon: () => Ribbon,
96
- RouterProvider: () => import_react_aria_components40.RouterProvider,
97
+ RouterProvider: () => import_react_aria_components43.RouterProvider,
97
98
  SectionHeader: () => SectionHeader,
98
99
  SegmentedControl: () => SegmentedControl,
99
100
  Select: () => Select,
@@ -107,7 +108,7 @@ __export(src_exports, {
107
108
  SkeletonTableRow: () => SkeletonTableRow,
108
109
  SplitPane: () => SplitPane,
109
110
  Strong: () => Strong,
110
- SubmenuTrigger: () => import_react_aria_components40.SubmenuTrigger,
111
+ SubmenuTrigger: () => import_react_aria_components43.SubmenuTrigger,
111
112
  Switch: () => Switch,
112
113
  Tabs: () => Tabs,
113
114
  Tag: () => Tag,
@@ -665,6 +666,7 @@ var enMessages = {
665
666
  inlineMessageDismiss: "Dismiss message",
666
667
  toastDismiss: "Dismiss",
667
668
  toastRegionLabel: "Notifications",
669
+ selectPlaceholder: "Select\u2026",
668
670
  selectEmpty: "No options available",
669
671
  comboBoxShowSuggestions: "Show suggestions",
670
672
  comboBoxLoading: "Searching\u2026",
@@ -675,6 +677,8 @@ var enMessages = {
675
677
  numberFieldIncrease: "Increase",
676
678
  numberFieldDecrease: "Decrease",
677
679
  inputClear: "Clear",
680
+ fieldHelp: "More information",
681
+ fieldHelpNamed: "More information about {label}",
678
682
  valueHelpFieldPlaceholder: "Not selected",
679
683
  valueHelpFieldClear: "Clear selection",
680
684
  valueHelpFieldOpenNamed: "Select {label}",
@@ -750,6 +754,7 @@ var esMessages = {
750
754
  inlineMessageDismiss: "Descartar mensaje",
751
755
  toastDismiss: "Descartar",
752
756
  toastRegionLabel: "Notificaciones",
757
+ selectPlaceholder: "Seleccionar\u2026",
753
758
  selectEmpty: "Sin opciones disponibles",
754
759
  comboBoxShowSuggestions: "Mostrar sugerencias",
755
760
  comboBoxLoading: "Buscando\u2026",
@@ -760,6 +765,8 @@ var esMessages = {
760
765
  numberFieldIncrease: "Aumentar",
761
766
  numberFieldDecrease: "Disminuir",
762
767
  inputClear: "Limpiar",
768
+ fieldHelp: "M\xE1s informaci\xF3n",
769
+ fieldHelpNamed: "M\xE1s informaci\xF3n sobre {label}",
763
770
  valueHelpFieldPlaceholder: "Sin seleccionar",
764
771
  valueHelpFieldClear: "Limpiar selecci\xF3n",
765
772
  valueHelpFieldOpenNamed: "Seleccionar {label}",
@@ -1082,8 +1089,25 @@ function Kbd({ children, size = "md", className, ...rest }) {
1082
1089
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("kbd", { className: cx("pire-kbd", className), "data-size": size, ...rest, children });
1083
1090
  }
1084
1091
 
1085
- // src/components/forms/FormField.tsx
1092
+ // src/components/forms/FieldHelp.tsx
1093
+ var import_react_aria_components9 = require("react-aria-components");
1086
1094
  var import_jsx_runtime16 = require("react/jsx-runtime");
1095
+ function FieldHelp({ children, label, placement = "top" }) {
1096
+ const msg = usePireMessages();
1097
+ return (
1098
+ // React Aria hands every descendant Button the nearest slotted ButtonContext. Inside a
1099
+ // NumberField that context has only `increment` and `decrement`, and an unslotted Button
1100
+ // throws `A slot prop is required`; inside DatePicker, DateRangePicker and ComboBox the same
1101
+ // Button is silently adopted as the field's *trigger*, which is worse than a crash because it
1102
+ // renders. `value={null}` is React Aria's own idiom for lifting a subtree back out of a
1103
+ // slotted context — the same one `MultiComboBox` and `FieldLabel` use — and is what makes
1104
+ // this component safe anywhere.
1105
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_aria_components9.ButtonContext.Provider, { value: null, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip, { label: children, placement, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconButton, { icon: "help-circle", label: label ?? msg.fieldHelp, size: "sm", hideTooltip: true }) }) })
1106
+ );
1107
+ }
1108
+
1109
+ // src/components/forms/FormField.tsx
1110
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1087
1111
  function FormField({
1088
1112
  label,
1089
1113
  htmlFor,
@@ -1091,26 +1115,31 @@ function FormField({
1091
1115
  hint,
1092
1116
  error,
1093
1117
  layout = "stacked",
1118
+ help,
1094
1119
  children,
1095
1120
  className,
1096
1121
  ...rest
1097
1122
  }) {
1098
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
1099
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "pire-field-label", htmlFor, children: [
1100
- label,
1101
- isRequired ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1102
- ] }),
1123
+ const labelEl = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "pire-field-label", htmlFor, children: [
1124
+ label,
1125
+ isRequired ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1126
+ ] });
1127
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
1128
+ help ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "pire-field-labelrow", children: [
1129
+ labelEl,
1130
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FieldHelp, { children: help })
1131
+ ] }) : labelEl,
1103
1132
  children,
1104
- error ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "pire-field-error", role: "alert", children: [
1105
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "alert-circle", size: 12 }),
1133
+ error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "pire-field-error", role: "alert", children: [
1134
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "alert-circle", size: 12 }),
1106
1135
  error
1107
- ] }) : hint ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "pire-field-hint", children: hint }) : null
1136
+ ] }) : hint ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-field-hint", children: hint }) : null
1108
1137
  ] });
1109
1138
  }
1110
1139
 
1111
1140
  // src/components/forms/Input.tsx
1112
1141
  var React10 = __toESM(require("react"), 1);
1113
- var import_react_aria_components9 = require("react-aria-components");
1142
+ var import_react_aria_components12 = require("react-aria-components");
1114
1143
 
1115
1144
  // src/components/utils/focusField.ts
1116
1145
  function focusFieldOf(button) {
@@ -1118,13 +1147,75 @@ function focusFieldOf(button) {
1118
1147
  control?.querySelector(".pire-datesegment, .pire-input, input, textarea")?.focus();
1119
1148
  }
1120
1149
 
1150
+ // src/components/forms/FieldLabel.tsx
1151
+ var import_react_aria_components10 = require("react-aria-components");
1152
+
1153
+ // src/components/utils/devWarn.ts
1154
+ var IS_DEV2 = process.env.NODE_ENV !== "production";
1155
+ var warned2 = /* @__PURE__ */ new Set();
1156
+ function warnOnce2(key, message) {
1157
+ if (warned2.has(key)) return;
1158
+ warned2.add(key);
1159
+ console.warn(`[pire] ${message}`);
1160
+ }
1161
+
1162
+ // src/components/forms/FieldLabel.tsx
1163
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1164
+ function warnHelpWithoutLabel(component, label, help) {
1165
+ if (!IS_DEV2 || !help || label) return;
1166
+ warnOnce2(
1167
+ `help-without-label:${component}`,
1168
+ `${component}: \`help\` needs a visible \`label\`. Its icon is drawn beside one, so a field named only by \`aria-label\` renders no icon at all \u2014 the text still reaches a screen reader through the field's description, but nothing on screen offers it. Pass \`label\`, or move the sentence to \`description\`.`
1169
+ );
1170
+ }
1171
+ function FieldLabel({ label, isRequired, help }) {
1172
+ const msg = usePireMessages();
1173
+ const text = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_aria_components10.Label, { className: "pire-field-label", children: [
1174
+ label,
1175
+ isRequired ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1176
+ ] });
1177
+ return (
1178
+ // React Aria's own idiom for lifting a subtree back out of a slotted context — the same one
1179
+ // `MultiComboBox` uses on its chips, and the one Popover uses on the way into an overlay.
1180
+ // Without it every Button below a field inherits that field's trigger props.
1181
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components10.ButtonContext.Provider, { value: null, children: help ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "pire-field-labelrow", children: [
1182
+ text,
1183
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1184
+ FieldHelp,
1185
+ {
1186
+ label: typeof label === "string" ? msg.fieldHelpNamed.replace("{label}", label.toLowerCase()) : void 0,
1187
+ children: help
1188
+ }
1189
+ )
1190
+ ] }) : text })
1191
+ );
1192
+ }
1193
+
1194
+ // src/components/forms/FieldDescription.tsx
1195
+ var import_react_aria_components11 = require("react-aria-components");
1196
+ var import_jsx_runtime19 = (
1197
+ // The class is picked, never combined: `.pire-sr-only` is `!important` and pairing it with
1198
+ // another pire-* class is what grew the document sideways in 0.23.0. Choosing `pire-sr-only`
1199
+ // when there is no visible description also keeps the node out of `.pire-field`'s flex gap —
1200
+ // a `pire-field-hint` holding only hidden text still opens a visible gap under every field.
1201
+ require("react/jsx-runtime")
1202
+ );
1203
+ function FieldDescription({ description, help }) {
1204
+ if (!description && !help) return null;
1205
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_aria_components11.Text, { slot: "description", className: description ? "pire-field-hint" : "pire-sr-only", children: [
1206
+ description,
1207
+ help ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "pire-sr-only", children: help }) : null
1208
+ ] });
1209
+ }
1210
+
1121
1211
  // src/components/forms/Input.tsx
1122
- var import_jsx_runtime17 = require("react/jsx-runtime");
1212
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1123
1213
  function Input({
1124
1214
  label,
1125
1215
  icon,
1126
1216
  suffix,
1127
1217
  description,
1218
+ help,
1128
1219
  errorMessage,
1129
1220
  size = "md",
1130
1221
  numeric,
@@ -1148,8 +1239,9 @@ function Input({
1148
1239
  const takesOverValue = isClearable && !isControlled;
1149
1240
  const valueProps = takesOverValue ? { value: ownValue, defaultValue: void 0 } : {};
1150
1241
  const showsClear = isClearable && currentValue !== "" && !rest.isDisabled && !rest.isReadOnly;
1151
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1152
- import_react_aria_components9.TextField,
1242
+ warnHelpWithoutLabel("Input", label, help);
1243
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1244
+ import_react_aria_components12.TextField,
1153
1245
  {
1154
1246
  className: cx("pire-field", className),
1155
1247
  style,
@@ -1158,12 +1250,9 @@ function Input({
1158
1250
  ...rest,
1159
1251
  ...valueProps,
1160
1252
  children: [
1161
- label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_aria_components9.Label, { className: "pire-field-label", children: [
1162
- label,
1163
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1164
- ] }) : null,
1165
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1166
- import_react_aria_components9.Group,
1253
+ label ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
1254
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1255
+ import_react_aria_components12.Group,
1167
1256
  {
1168
1257
  className: "pire-control",
1169
1258
  "data-size": size,
@@ -1171,10 +1260,10 @@ function Input({
1171
1260
  "data-invalid": rest.isInvalid ? "true" : void 0,
1172
1261
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1173
1262
  children: [
1174
- icon ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: icon, size: 16, className: "pire-leading-icon" }) : null,
1175
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.Input, { ref: inputRef, className: "pire-input", "data-numeric": numeric ? "true" : void 0 }),
1176
- showsClear ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1177
- import_react_aria_components9.Button,
1263
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: icon, size: 16, className: "pire-leading-icon" }) : null,
1264
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.Input, { ref: inputRef, className: "pire-input", "data-numeric": numeric ? "true" : void 0 }),
1265
+ showsClear ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1266
+ import_react_aria_components12.Button,
1178
1267
  {
1179
1268
  className: "pire-input-clear",
1180
1269
  onPress: (event) => {
@@ -1184,12 +1273,12 @@ function Input({
1184
1273
  children: clearLabel ?? msg.inputClear
1185
1274
  }
1186
1275
  ) : null,
1187
- suffix ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "pire-affix", children: suffix }) : null
1276
+ suffix ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pire-affix", children: suffix }) : null
1188
1277
  ]
1189
1278
  }
1190
1279
  ),
1191
- description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1192
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components9.FieldError, { className: "pire-field-error", children: errorMessage })
1280
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FieldDescription, { description, help }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.FieldError, { className: "pire-field-error", children: errorMessage })
1193
1282
  ]
1194
1283
  }
1195
1284
  );
@@ -1197,12 +1286,13 @@ function Input({
1197
1286
 
1198
1287
  // src/components/forms/TextArea.tsx
1199
1288
  var React11 = __toESM(require("react"), 1);
1200
- var import_react_aria_components10 = require("react-aria-components");
1201
- var import_jsx_runtime18 = require("react/jsx-runtime");
1289
+ var import_react_aria_components13 = require("react-aria-components");
1290
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1202
1291
  var useIsomorphicLayoutEffect = typeof document === "undefined" ? React11.useEffect : React11.useLayoutEffect;
1203
1292
  function TextArea({
1204
1293
  label,
1205
1294
  description,
1295
+ help,
1206
1296
  errorMessage,
1207
1297
  size = "md",
1208
1298
  rows = 3,
@@ -1242,8 +1332,9 @@ function TextArea({
1242
1332
  }
1243
1333
  grow();
1244
1334
  }, [autoGrow, grow, rest.value]);
1245
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1246
- import_react_aria_components10.TextField,
1335
+ warnHelpWithoutLabel("TextArea", label, help);
1336
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1337
+ import_react_aria_components13.TextField,
1247
1338
  {
1248
1339
  className: cx("pire-field", className),
1249
1340
  style,
@@ -1251,12 +1342,9 @@ function TextArea({
1251
1342
  validationBehavior: "aria",
1252
1343
  ...rest,
1253
1344
  children: [
1254
- label ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_aria_components10.Label, { className: "pire-field-label", children: [
1255
- label,
1256
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1257
- ] }) : null,
1258
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1259
- import_react_aria_components10.Group,
1345
+ label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
1346
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1347
+ import_react_aria_components13.Group,
1260
1348
  {
1261
1349
  className: "pire-control",
1262
1350
  "data-size": size,
@@ -1264,8 +1352,8 @@ function TextArea({
1264
1352
  "data-multiline": "true",
1265
1353
  "data-invalid": rest.isInvalid ? "true" : void 0,
1266
1354
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1267
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1268
- import_react_aria_components10.TextArea,
1355
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1356
+ import_react_aria_components13.TextArea,
1269
1357
  {
1270
1358
  ref,
1271
1359
  rows,
@@ -1276,16 +1364,18 @@ function TextArea({
1276
1364
  )
1277
1365
  }
1278
1366
  ),
1279
- description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components10.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1280
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components10.FieldError, { className: "pire-field-error", children: errorMessage })
1367
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FieldDescription, { description, help }),
1368
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.FieldError, { className: "pire-field-error", children: errorMessage })
1281
1369
  ]
1282
1370
  }
1283
1371
  );
1284
1372
  }
1285
1373
 
1286
1374
  // src/components/forms/Select.tsx
1287
- var import_react_aria_components11 = require("react-aria-components");
1288
- var import_jsx_runtime19 = require("react/jsx-runtime");
1375
+ var React12 = __toESM(require("react"), 1);
1376
+ var import_react_aria_components14 = require("react-aria-components");
1377
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1378
+ var CLEAR_KEY = "__pire-select-clear__";
1289
1379
  var norm = (o) => typeof o === "string" ? { value: o, label: o, isDisabled: false } : o;
1290
1380
  function Select({
1291
1381
  label,
@@ -1293,8 +1383,10 @@ function Select({
1293
1383
  defaultValue,
1294
1384
  onChange,
1295
1385
  options = [],
1296
- placeholder = "Select\u2026",
1386
+ placeholder,
1387
+ isClearable,
1297
1388
  description,
1389
+ help,
1298
1390
  errorMessage,
1299
1391
  emptyLabel,
1300
1392
  size = "md",
@@ -1305,51 +1397,74 @@ function Select({
1305
1397
  }) {
1306
1398
  const msg = usePireMessages();
1307
1399
  const items = options.map(norm);
1308
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1309
- import_react_aria_components11.Select,
1400
+ const effectivePlaceholder = placeholder ?? msg.selectPlaceholder;
1401
+ const isSelectionControlled = value !== void 0;
1402
+ const [ownSelection, setOwnSelection] = React12.useState(defaultValue ?? null);
1403
+ const takesOverSelection = isClearable === true && !isSelectionControlled;
1404
+ const collides = items.some((item) => item.value === CLEAR_KEY);
1405
+ const showsClear = isClearable === true && !rest.isDisabled && items.length > 0 && !collides;
1406
+ if (IS_DEV2 && isClearable === true && !rest.isDisabled && collides) {
1407
+ warnOnce2(
1408
+ CLEAR_KEY,
1409
+ `Select: an option's value is "${CLEAR_KEY}", which isClearable reserves for its "nothing chosen" row. The clear row has been dropped so the option keeps working \u2014 rename the option to get it back.`
1410
+ );
1411
+ }
1412
+ const rows = showsClear ? [
1413
+ // The row's own label falls back to the dictionary even when `placeholder` is explicitly
1414
+ // `''`: an empty trigger is a deliberate, supported shape, but a listbox option with no
1415
+ // accessible name is not — it would be unreachable by name and silent to a screen reader.
1416
+ { value: CLEAR_KEY, label: effectivePlaceholder || msg.selectPlaceholder, isDisabled: false },
1417
+ ...items
1418
+ ] : items;
1419
+ warnHelpWithoutLabel("Select", label, help);
1420
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1421
+ import_react_aria_components14.Select,
1310
1422
  {
1311
1423
  className: cx("pire-field", className),
1312
1424
  style,
1313
- selectedKey: value,
1314
- defaultSelectedKey: defaultValue,
1315
- onSelectionChange: (k) => onChange?.(String(k)),
1425
+ selectedKey: takesOverSelection ? ownSelection : value,
1426
+ defaultSelectedKey: takesOverSelection ? void 0 : defaultValue,
1427
+ onSelectionChange: (k) => {
1428
+ const raw = k == null ? null : String(k);
1429
+ const next = showsClear && raw === CLEAR_KEY ? null : raw;
1430
+ if (takesOverSelection) setOwnSelection(next);
1431
+ onChange?.(next);
1432
+ },
1316
1433
  allowsEmptyCollection: true,
1317
- placeholder,
1434
+ placeholder: effectivePlaceholder,
1318
1435
  validationBehavior: "aria",
1319
1436
  ...rest,
1320
1437
  children: [
1321
- label ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_aria_components11.Label, { className: "pire-field-label", children: [
1322
- label,
1323
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1324
- ] }) : null,
1325
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1326
- import_react_aria_components11.Button,
1438
+ label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
1439
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1440
+ import_react_aria_components14.Button,
1327
1441
  {
1328
1442
  className: "pire-control",
1329
1443
  "data-size": size,
1330
1444
  "data-full-width": String(fullWidth),
1331
1445
  "data-invalid": rest.isInvalid ? "true" : void 0,
1332
1446
  children: [
1333
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.SelectValue, { className: "pire-select-value" }),
1334
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-leading-icon" })
1447
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.SelectValue, { className: "pire-select-value" }),
1448
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-leading-icon" })
1335
1449
  ]
1336
1450
  }
1337
1451
  ),
1338
- description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1339
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.FieldError, { className: "pire-field-error", children: errorMessage }),
1340
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1341
- import_react_aria_components11.ListBox,
1452
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldDescription, { description, help }),
1453
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.FieldError, { className: "pire-field-error", children: errorMessage }),
1454
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components14.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1455
+ import_react_aria_components14.ListBox,
1342
1456
  {
1343
1457
  className: "pire-listbox",
1344
- items,
1345
- renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
1346
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1347
- import_react_aria_components11.ListBoxItem,
1458
+ items: rows,
1459
+ renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
1460
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1461
+ import_react_aria_components14.ListBoxItem,
1348
1462
  {
1349
1463
  className: "pire-option",
1350
1464
  id: item.value,
1351
1465
  textValue: item.label,
1352
1466
  isDisabled: item.isDisabled,
1467
+ "data-clear": item.value === CLEAR_KEY ? "true" : void 0,
1353
1468
  children: item.label
1354
1469
  }
1355
1470
  )
@@ -1361,21 +1476,21 @@ function Select({
1361
1476
  }
1362
1477
 
1363
1478
  // src/components/forms/Checkbox.tsx
1364
- var import_react_aria_components12 = require("react-aria-components");
1365
- var import_jsx_runtime20 = require("react/jsx-runtime");
1479
+ var import_react_aria_components15 = require("react-aria-components");
1480
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1366
1481
  function Checkbox({ label, hint, children, className, ...rest }) {
1367
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.Checkbox, { className: cx("pire-choice", className), ...rest, children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
1368
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pire-choice-box", "aria-hidden": "true", children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "minus", size: 12 }) : isSelected ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "check", size: 12 }) : null }),
1369
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
1482
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Checkbox, { className: cx("pire-choice", className), ...rest, children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1483
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choice-box", "aria-hidden": "true", children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "minus", size: 12 }) : isSelected ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "check", size: 12 }) : null }),
1484
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
1370
1485
  label ?? children,
1371
- hint ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
1486
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
1372
1487
  ] })
1373
1488
  ] }) });
1374
1489
  }
1375
1490
 
1376
1491
  // src/components/forms/Radio.tsx
1377
- var import_react_aria_components13 = require("react-aria-components");
1378
- var import_jsx_runtime21 = require("react/jsx-runtime");
1492
+ var import_react_aria_components16 = require("react-aria-components");
1493
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1379
1494
  function RadioGroup({
1380
1495
  label,
1381
1496
  description,
@@ -1384,39 +1499,40 @@ function RadioGroup({
1384
1499
  className,
1385
1500
  ...rest
1386
1501
  }) {
1387
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_aria_components13.RadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
1388
- label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Label, { className: "pire-field-label", children: label }) : null,
1389
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pire-radiogroup", children }),
1390
- description ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1391
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components13.FieldError, { className: "pire-field-error", children: errorMessage })
1502
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.RadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
1503
+ label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Label, { className: "pire-field-label", children: label }) : null,
1504
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "pire-radiogroup", children }),
1505
+ description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1506
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.FieldError, { className: "pire-field-error", children: errorMessage })
1392
1507
  ] });
1393
1508
  }
1394
1509
  function Radio({ label, hint, children, className, ...rest }) {
1395
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_aria_components13.Radio, { className: cx("pire-choice", className), ...rest, children: [
1396
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "pire-choice-box", "data-radio": "true", "aria-hidden": "true" }),
1397
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
1510
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.Radio, { className: cx("pire-choice", className), ...rest, children: [
1511
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-choice-box", "data-radio": "true", "aria-hidden": "true" }),
1512
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { children: [
1398
1513
  label ?? children,
1399
- hint ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
1514
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-choice-hint", children: hint }) : null
1400
1515
  ] })
1401
1516
  ] });
1402
1517
  }
1403
1518
 
1404
1519
  // src/components/forms/Switch.tsx
1405
- var import_react_aria_components14 = require("react-aria-components");
1406
- var import_jsx_runtime22 = require("react/jsx-runtime");
1520
+ var import_react_aria_components17 = require("react-aria-components");
1521
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1407
1522
  function Switch({ label, children, className, ...rest }) {
1408
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_aria_components14.Switch, { className: cx("pire-choice", className), ...rest, children: [
1409
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-switch-track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pire-switch-thumb" }) }),
1410
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label ?? children })
1523
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_aria_components17.Switch, { className: cx("pire-choice", className), ...rest, children: [
1524
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-switch-track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-switch-thumb" }) }),
1525
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label ?? children })
1411
1526
  ] });
1412
1527
  }
1413
1528
 
1414
1529
  // src/components/forms/ChoiceCardGroup.tsx
1415
- var import_react_aria_components15 = require("react-aria-components");
1416
- var import_jsx_runtime23 = require("react/jsx-runtime");
1530
+ var import_react_aria_components18 = require("react-aria-components");
1531
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1417
1532
  function ChoiceCardGroup({
1418
1533
  label,
1419
1534
  description,
1535
+ help,
1420
1536
  errorMessage,
1421
1537
  options,
1422
1538
  value,
@@ -1429,8 +1545,9 @@ function ChoiceCardGroup({
1429
1545
  style,
1430
1546
  ...rest
1431
1547
  }) {
1432
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1433
- import_react_aria_components15.RadioGroup,
1548
+ warnHelpWithoutLabel("ChoiceCardGroup", label, help);
1549
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1550
+ import_react_aria_components18.RadioGroup,
1434
1551
  {
1435
1552
  className: cx("pire-field", className),
1436
1553
  style,
@@ -1442,36 +1559,33 @@ function ChoiceCardGroup({
1442
1559
  isDisabled,
1443
1560
  isRequired,
1444
1561
  children: [
1445
- label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_aria_components15.Label, { className: "pire-field-label", children: [
1446
- label,
1447
- isRequired ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1448
- ] }) : null,
1449
- /* @__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)(
1450
- import_react_aria_components15.Radio,
1562
+ label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FieldLabel, { label, isRequired, help }) : null,
1563
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1564
+ import_react_aria_components18.Radio,
1451
1565
  {
1452
1566
  value: option.id,
1453
1567
  className: "pire-choicecard",
1454
1568
  isDisabled: option.isDisabled,
1455
1569
  children: [
1456
- option.icon ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: option.icon, size: 20 }) : null,
1457
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-label", children: option.label }),
1458
- option.description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1459
- option.preview ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1570
+ option.icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: option.icon, size: 20 }) : null,
1571
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-choicecard-label", children: option.label }),
1572
+ option.description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1573
+ option.preview ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1460
1574
  ]
1461
1575
  },
1462
1576
  option.id
1463
1577
  )) }),
1464
- description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1465
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components15.FieldError, { className: "pire-field-error", children: errorMessage })
1578
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FieldDescription, { description, help }),
1579
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.FieldError, { className: "pire-field-error", children: errorMessage })
1466
1580
  ]
1467
1581
  }
1468
1582
  );
1469
1583
  }
1470
1584
 
1471
1585
  // src/components/forms/ComboBox.tsx
1472
- var React12 = __toESM(require("react"), 1);
1473
- var import_react_aria_components16 = require("react-aria-components");
1474
- var import_jsx_runtime24 = require("react/jsx-runtime");
1586
+ var React13 = __toESM(require("react"), 1);
1587
+ var import_react_aria_components19 = require("react-aria-components");
1588
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1475
1589
  var norm2 = (o) => typeof o === "string" ? { value: o, label: o } : o;
1476
1590
  function ComboBox({
1477
1591
  label,
@@ -1482,6 +1596,7 @@ function ComboBox({
1482
1596
  inputValue,
1483
1597
  options = [],
1484
1598
  description,
1599
+ help,
1485
1600
  errorMessage,
1486
1601
  size = "md",
1487
1602
  fullWidth = true,
@@ -1499,10 +1614,10 @@ function ComboBox({
1499
1614
  const msg = usePireMessages();
1500
1615
  const items = options.map(norm2);
1501
1616
  const isSelectionControlled = value !== void 0;
1502
- const [ownSelection, setOwnSelection] = React12.useState(defaultValue ?? null);
1617
+ const [ownSelection, setOwnSelection] = React13.useState(defaultValue ?? null);
1503
1618
  const takesOverSelection = isClearable === true && !isSelectionControlled;
1504
1619
  const currentSelection = isSelectionControlled ? value : ownSelection;
1505
- const [typedText, setTypedText] = React12.useState("");
1620
+ const [typedText, setTypedText] = React13.useState("");
1506
1621
  const currentText = inputValue !== void 0 ? inputValue : typedText;
1507
1622
  const handleInputChange = isClearable ? (text) => {
1508
1623
  setTypedText(text);
@@ -1517,8 +1632,9 @@ function ComboBox({
1517
1632
  };
1518
1633
  const collection = isFilteredExternally ? { items } : { defaultItems: items };
1519
1634
  const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
1520
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1521
- import_react_aria_components16.ComboBox,
1635
+ warnHelpWithoutLabel("ComboBox", label, help);
1636
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1637
+ import_react_aria_components19.ComboBox,
1522
1638
  {
1523
1639
  className: cx("pire-field", className),
1524
1640
  style,
@@ -1538,22 +1654,19 @@ function ComboBox({
1538
1654
  validationBehavior: "aria",
1539
1655
  ...rest,
1540
1656
  children: [
1541
- label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components16.Label, { className: "pire-field-label", children: [
1542
- label,
1543
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1544
- ] }) : null,
1545
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1546
- import_react_aria_components16.Group,
1657
+ label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
1658
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1659
+ import_react_aria_components19.Group,
1547
1660
  {
1548
1661
  className: "pire-control",
1549
1662
  "data-size": size,
1550
1663
  "data-full-width": String(fullWidth),
1551
1664
  "data-invalid": rest.isInvalid ? "true" : void 0,
1552
1665
  children: [
1553
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1554
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Input, { className: "pire-input", placeholder: rest.placeholder }),
1555
- showsClear ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1556
- import_react_aria_components16.Button,
1666
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1667
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.Input, { className: "pire-input", placeholder: rest.placeholder }),
1668
+ showsClear ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1669
+ import_react_aria_components19.Button,
1557
1670
  {
1558
1671
  className: "pire-input-clear",
1559
1672
  slot: null,
@@ -1564,40 +1677,40 @@ function ComboBox({
1564
1677
  children: clearLabel ?? msg.inputClear
1565
1678
  }
1566
1679
  ) : null,
1567
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1568
- import_react_aria_components16.Button,
1680
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1681
+ import_react_aria_components19.Button,
1569
1682
  {
1570
1683
  className: "pire-iconbtn",
1571
1684
  "data-size": "sm",
1572
1685
  "aria-label": msg.comboBoxShowSuggestions,
1573
1686
  style: { width: 20, height: 20 },
1574
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron-down", size: 16 })
1687
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "chevron-down", size: 16 })
1575
1688
  }
1576
1689
  )
1577
1690
  ]
1578
1691
  }
1579
1692
  ),
1580
- description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1581
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.FieldError, { className: "pire-field-error", children: errorMessage }),
1582
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components16.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1583
- import_react_aria_components16.ListBox,
1693
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FieldDescription, { description, help }),
1694
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.FieldError, { className: "pire-field-error", children: errorMessage }),
1695
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components19.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1696
+ import_react_aria_components19.ListBox,
1584
1697
  {
1585
1698
  className: "pire-listbox",
1586
1699
  onScroll: onLoadMore ? (e) => {
1587
1700
  const el = e.currentTarget;
1588
1701
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1589
1702
  } : void 0,
1590
- 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,
1591
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1592
- import_react_aria_components16.ListBoxItem,
1703
+ renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1704
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1705
+ import_react_aria_components19.ListBoxItem,
1593
1706
  {
1594
1707
  className: "pire-option",
1595
1708
  id: item.value,
1596
1709
  textValue: item.label,
1597
1710
  isDisabled: item.isDisabled,
1598
1711
  children: [
1599
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-label", children: item.label }),
1600
- item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1712
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "pire-option-label", children: item.label }),
1713
+ item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1601
1714
  ]
1602
1715
  }
1603
1716
  )
@@ -1609,9 +1722,9 @@ function ComboBox({
1609
1722
  }
1610
1723
 
1611
1724
  // src/components/forms/MultiComboBox.tsx
1612
- var React13 = __toESM(require("react"), 1);
1613
- var import_react_aria_components17 = require("react-aria-components");
1614
- var import_jsx_runtime25 = require("react/jsx-runtime");
1725
+ var React14 = __toESM(require("react"), 1);
1726
+ var import_react_aria_components20 = require("react-aria-components");
1727
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1615
1728
  var norm3 = (o) => typeof o === "string" ? { value: o, label: o } : o;
1616
1729
  function MultiComboBox({
1617
1730
  label,
@@ -1621,6 +1734,7 @@ function MultiComboBox({
1621
1734
  onInputChange,
1622
1735
  options = [],
1623
1736
  description,
1737
+ help,
1624
1738
  errorMessage,
1625
1739
  allowsCustomValue,
1626
1740
  size = "md",
@@ -1635,15 +1749,15 @@ function MultiComboBox({
1635
1749
  ...rest
1636
1750
  }) {
1637
1751
  const msg = usePireMessages();
1638
- const items = React13.useMemo(() => options.map(norm3), [options]);
1752
+ const items = React14.useMemo(() => options.map(norm3), [options]);
1639
1753
  const collection = isFilteredExternally ? { items } : { defaultItems: items };
1640
1754
  const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
1641
- const [uncontrolled, setUncontrolled] = React13.useState(defaultValue ?? []);
1642
- const [announcement, setAnnouncement] = React13.useState("");
1643
- const inputRef = React13.useRef(null);
1755
+ const [uncontrolled, setUncontrolled] = React14.useState(defaultValue ?? []);
1756
+ const [announcement, setAnnouncement] = React14.useState("");
1757
+ const inputRef = React14.useRef(null);
1644
1758
  const raw = value ?? uncontrolled;
1645
1759
  const contentKey = raw.join("\0");
1646
- const values = React13.useMemo(() => raw, [contentKey]);
1760
+ const values = React14.useMemo(() => raw, [contentKey]);
1647
1761
  const labelOf = (v) => items.find((o) => o.value === v)?.label ?? v;
1648
1762
  const isEditable = !rest.isDisabled && !rest.isReadOnly;
1649
1763
  const commit = (next) => {
@@ -1676,8 +1790,9 @@ function MultiComboBox({
1676
1790
  e.stopPropagation();
1677
1791
  if (!values.includes(next)) commit([...values, next]);
1678
1792
  };
1679
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1680
- import_react_aria_components17.ComboBox,
1793
+ warnHelpWithoutLabel("MultiComboBox", label, help);
1794
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1795
+ import_react_aria_components20.ComboBox,
1681
1796
  {
1682
1797
  className: cx("pire-field", className),
1683
1798
  style,
@@ -1693,12 +1808,9 @@ function MultiComboBox({
1693
1808
  validationBehavior: "aria",
1694
1809
  ...rest,
1695
1810
  children: [
1696
- label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_aria_components17.Label, { className: "pire-field-label", children: [
1697
- label,
1698
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1699
- ] }) : null,
1700
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1701
- import_react_aria_components17.Group,
1811
+ label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
1812
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1813
+ import_react_aria_components20.Group,
1702
1814
  {
1703
1815
  className: "pire-control",
1704
1816
  "data-size": size,
@@ -1707,15 +1819,15 @@ function MultiComboBox({
1707
1819
  "data-invalid": rest.isInvalid ? "true" : void 0,
1708
1820
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1709
1821
  children: [
1710
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1711
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pire-chipfield", children: [
1712
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.ButtonContext.Provider, { value: null, children: values.map((v) => (
1822
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1823
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "pire-chipfield", children: [
1824
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.ButtonContext.Provider, { value: null, children: values.map((v) => (
1713
1825
  /* Disabled follows the field, not `isEditable`: a read-only field's chips are
1714
1826
  real, current values and should read as such — they simply lose the × . */
1715
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
1827
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
1716
1828
  )) }),
1717
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1718
- import_react_aria_components17.Input,
1829
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1830
+ import_react_aria_components20.Input,
1719
1831
  {
1720
1832
  ref: inputRef,
1721
1833
  className: cx("pire-input", "pire-chipinput"),
@@ -1724,41 +1836,41 @@ function MultiComboBox({
1724
1836
  }
1725
1837
  )
1726
1838
  ] }),
1727
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1728
- import_react_aria_components17.Button,
1839
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1840
+ import_react_aria_components20.Button,
1729
1841
  {
1730
1842
  className: "pire-iconbtn",
1731
1843
  "data-size": "sm",
1732
1844
  "aria-label": msg.comboBoxShowSuggestions,
1733
1845
  style: { width: 20, height: 20 },
1734
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "chevron-down", size: 16 })
1846
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-down", size: 16 })
1735
1847
  }
1736
1848
  )
1737
1849
  ]
1738
1850
  }
1739
1851
  ),
1740
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-live": "polite", children: announcement }) }),
1741
- description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1742
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.FieldError, { className: "pire-field-error", children: errorMessage }),
1743
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components17.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1744
- import_react_aria_components17.ListBox,
1852
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { "aria-live": "polite", children: announcement }) }),
1853
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FieldDescription, { description, help }),
1854
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.FieldError, { className: "pire-field-error", children: errorMessage }),
1855
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components20.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1856
+ import_react_aria_components20.ListBox,
1745
1857
  {
1746
1858
  className: "pire-listbox",
1747
1859
  onScroll: onLoadMore ? (e) => {
1748
1860
  const el = e.currentTarget;
1749
1861
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1750
1862
  } : void 0,
1751
- 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,
1752
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1753
- import_react_aria_components17.ListBoxItem,
1863
+ renderEmptyState: showsStatus ? () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1864
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1865
+ import_react_aria_components20.ListBoxItem,
1754
1866
  {
1755
1867
  className: "pire-option",
1756
1868
  id: item.value,
1757
1869
  textValue: item.label,
1758
1870
  isDisabled: item.isDisabled,
1759
1871
  children: [
1760
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-label", children: item.label }),
1761
- item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1872
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "pire-option-label", children: item.label }),
1873
+ item.secondary ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "pire-option-secondary", children: item.secondary }) : null
1762
1874
  ]
1763
1875
  }
1764
1876
  )
@@ -1770,8 +1882,8 @@ function MultiComboBox({
1770
1882
  }
1771
1883
 
1772
1884
  // src/components/forms/NumberField.tsx
1773
- var React14 = __toESM(require("react"), 1);
1774
- var import_react_aria_components18 = require("react-aria-components");
1885
+ var React15 = __toESM(require("react"), 1);
1886
+ var import_react_aria_components21 = require("react-aria-components");
1775
1887
 
1776
1888
  // src/components/utils/decimalSeparator.ts
1777
1889
  function decimalSeparatorFor(locale) {
@@ -1779,7 +1891,7 @@ function decimalSeparatorFor(locale) {
1779
1891
  }
1780
1892
 
1781
1893
  // src/components/forms/NumberField.tsx
1782
- var import_jsx_runtime26 = require("react/jsx-runtime");
1894
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1783
1895
  function typeIntoInput(el, text) {
1784
1896
  const start = el.selectionStart ?? el.value.length;
1785
1897
  const end = el.selectionEnd ?? start;
@@ -1810,12 +1922,12 @@ function toAriaNumber(value) {
1810
1922
  return typeof value === "number" ? value : Number(value);
1811
1923
  }
1812
1924
  function ClearButton({ label, onClear }) {
1813
- const state = React14.useContext(import_react_aria_components18.NumberFieldStateContext);
1925
+ const state = React15.useContext(import_react_aria_components21.NumberFieldStateContext);
1814
1926
  if (!state?.inputValue) {
1815
1927
  return null;
1816
1928
  }
1817
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1818
- import_react_aria_components18.Button,
1929
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1930
+ import_react_aria_components21.Button,
1819
1931
  {
1820
1932
  className: "pire-input-clear",
1821
1933
  slot: null,
@@ -1831,6 +1943,7 @@ function NumberField({
1831
1943
  label,
1832
1944
  suffix,
1833
1945
  description,
1946
+ help,
1834
1947
  errorMessage,
1835
1948
  hideStepper,
1836
1949
  stepperLayout = "stacked",
@@ -1849,10 +1962,10 @@ function NumberField({
1849
1962
  ...rest
1850
1963
  }) {
1851
1964
  const msg = usePireMessages();
1852
- const { locale } = (0, import_react_aria_components18.useLocale)();
1965
+ const { locale } = (0, import_react_aria_components21.useLocale)();
1853
1966
  const empty = emptyValue === void 0 ? NaN : emptyValue;
1854
1967
  const isControlled = value !== void 0;
1855
- const [ownValue, setOwnValue] = React14.useState(() => toAriaNumber(defaultValue) ?? NaN);
1968
+ const [ownValue, setOwnValue] = React15.useState(() => toAriaNumber(defaultValue) ?? NaN);
1856
1969
  const takesOverValue = Boolean(isClearable) && !isControlled;
1857
1970
  const valueProps = takesOverValue ? { value: ownValue, defaultValue: void 0 } : { value: toAriaNumber(value), defaultValue: toAriaNumber(defaultValue) };
1858
1971
  const handleChange = (next) => {
@@ -1901,8 +2014,9 @@ function NumberField({
1901
2014
  event.stopPropagation();
1902
2015
  typeIntoInput(event.currentTarget, localised);
1903
2016
  };
1904
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1905
- import_react_aria_components18.NumberField,
2017
+ warnHelpWithoutLabel("NumberField", label, help);
2018
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2019
+ import_react_aria_components21.NumberField,
1906
2020
  {
1907
2021
  className: cx("pire-field", className),
1908
2022
  style,
@@ -1911,12 +2025,9 @@ function NumberField({
1911
2025
  ...rest,
1912
2026
  ...valueProps,
1913
2027
  children: [
1914
- label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_aria_components18.Label, { className: "pire-field-label", children: [
1915
- label,
1916
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1917
- ] }) : null,
1918
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1919
- import_react_aria_components18.Group,
2028
+ label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
2029
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2030
+ import_react_aria_components21.Group,
1920
2031
  {
1921
2032
  className: "pire-control",
1922
2033
  "data-size": size,
@@ -1925,17 +2036,17 @@ function NumberField({
1925
2036
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1926
2037
  "data-stepper": stepperLayout,
1927
2038
  children: [
1928
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1929
- import_react_aria_components18.Button,
2039
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2040
+ import_react_aria_components21.Button,
1930
2041
  {
1931
2042
  slot: "decrement",
1932
2043
  className: "pire-qty-btn",
1933
2044
  "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1934
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 16 })
2045
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "minus", size: 16 })
1935
2046
  }
1936
2047
  ) : null,
1937
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1938
- import_react_aria_components18.Input,
2048
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2049
+ import_react_aria_components21.Input,
1939
2050
  {
1940
2051
  className: "pire-input",
1941
2052
  "data-numeric": "true",
@@ -1943,52 +2054,52 @@ function NumberField({
1943
2054
  onPasteCapture: handlePaste
1944
2055
  }
1945
2056
  ),
1946
- suffix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pire-affix", children: suffix }) : null,
1947
- showsClear ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
1948
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1949
- import_react_aria_components18.Button,
2057
+ suffix ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "pire-affix", children: suffix }) : null,
2058
+ showsClear ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
2059
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2060
+ import_react_aria_components21.Button,
1950
2061
  {
1951
2062
  slot: "increment",
1952
2063
  className: "pire-qty-btn",
1953
2064
  "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1954
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 16 })
2065
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "plus", size: 16 })
1955
2066
  }
1956
2067
  ) : null,
1957
- hideStepper ? null : stepperLayout === "inline" ? null : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "pire-stepper", children: [
1958
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1959
- import_react_aria_components18.Button,
2068
+ hideStepper ? null : stepperLayout === "inline" ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "pire-stepper", children: [
2069
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2070
+ import_react_aria_components21.Button,
1960
2071
  {
1961
2072
  slot: "increment",
1962
2073
  className: "pire-stepper-btn",
1963
2074
  "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1964
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "plus", size: 10 })
2075
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "plus", size: 10 })
1965
2076
  }
1966
2077
  ),
1967
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1968
- import_react_aria_components18.Button,
2078
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2079
+ import_react_aria_components21.Button,
1969
2080
  {
1970
2081
  slot: "decrement",
1971
2082
  className: "pire-stepper-btn",
1972
2083
  "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1973
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "minus", size: 10 })
2084
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "minus", size: 10 })
1974
2085
  }
1975
2086
  )
1976
2087
  ] })
1977
2088
  ]
1978
2089
  }
1979
2090
  ),
1980
- description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
1981
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components18.FieldError, { className: "pire-field-error", children: errorMessage })
2091
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FieldDescription, { description, help }),
2092
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components21.FieldError, { className: "pire-field-error", children: errorMessage })
1982
2093
  ]
1983
2094
  }
1984
2095
  );
1985
2096
  }
1986
2097
 
1987
2098
  // src/components/forms/QuantityStepper.tsx
1988
- var import_jsx_runtime27 = require("react/jsx-runtime");
2099
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1989
2100
  function QuantityStepper({ size = "md", ...rest }) {
1990
2101
  const msg = usePireMessages();
1991
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2102
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1992
2103
  NumberField,
1993
2104
  {
1994
2105
  ...rest,
@@ -2002,8 +2113,8 @@ function QuantityStepper({ size = "md", ...rest }) {
2002
2113
  }
2003
2114
 
2004
2115
  // src/components/forms/DatePicker.tsx
2005
- var React15 = __toESM(require("react"), 1);
2006
- var import_react_aria_components19 = require("react-aria-components");
2116
+ var React16 = __toESM(require("react"), 1);
2117
+ var import_react_aria_components22 = require("react-aria-components");
2007
2118
 
2008
2119
  // src/components/forms/dateValues.ts
2009
2120
  var import_date = require("@internationalized/date");
@@ -2033,14 +2144,14 @@ function coerceBound(value) {
2033
2144
  }
2034
2145
 
2035
2146
  // src/components/forms/DatePicker.tsx
2036
- var import_jsx_runtime28 = require("react/jsx-runtime");
2147
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2037
2148
  function ClearButton2({ label }) {
2038
- const state = React15.useContext(import_react_aria_components19.DatePickerStateContext);
2149
+ const state = React16.useContext(import_react_aria_components22.DatePickerStateContext);
2039
2150
  if (!state?.value) {
2040
2151
  return null;
2041
2152
  }
2042
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2043
- import_react_aria_components19.Button,
2153
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2154
+ import_react_aria_components22.Button,
2044
2155
  {
2045
2156
  className: "pire-input-clear",
2046
2157
  slot: null,
@@ -2055,6 +2166,7 @@ function ClearButton2({ label }) {
2055
2166
  function DatePicker({
2056
2167
  label,
2057
2168
  description,
2169
+ help,
2058
2170
  errorMessage,
2059
2171
  size = "md",
2060
2172
  fullWidth = true,
@@ -2075,8 +2187,9 @@ function DatePicker({
2075
2187
  const handleChange = (next) => onChange?.(
2076
2188
  valueFormat === "iso" && next ? next.toString() : next
2077
2189
  );
2078
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2079
- import_react_aria_components19.DatePicker,
2190
+ warnHelpWithoutLabel("DatePicker", label, help);
2191
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2192
+ import_react_aria_components22.DatePicker,
2080
2193
  {
2081
2194
  className: cx("pire-field", className),
2082
2195
  style,
@@ -2088,12 +2201,9 @@ function DatePicker({
2088
2201
  onChange: handleChange,
2089
2202
  ...rest,
2090
2203
  children: [
2091
- label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components19.Label, { className: "pire-field-label", children: [
2092
- label,
2093
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
2094
- ] }) : null,
2095
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2096
- import_react_aria_components19.Group,
2204
+ label ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
2205
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2206
+ import_react_aria_components22.Group,
2097
2207
  {
2098
2208
  className: "pire-control",
2099
2209
  "data-size": size,
@@ -2101,50 +2211,50 @@ function DatePicker({
2101
2211
  "data-invalid": rest.isInvalid ? "true" : void 0,
2102
2212
  "data-readonly": rest.isReadOnly ? "true" : void 0,
2103
2213
  children: [
2104
- /* @__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" }) }),
2105
- showsClear ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
2106
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2107
- import_react_aria_components19.Button,
2214
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.DateSegment, { segment, className: "pire-datesegment" }) }),
2215
+ showsClear ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
2216
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2217
+ import_react_aria_components22.Button,
2108
2218
  {
2109
2219
  className: "pire-iconbtn",
2110
2220
  "data-size": "sm",
2111
2221
  "aria-label": msg.datePickerOpenCalendar,
2112
2222
  style: { width: 24, height: 24 },
2113
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "calendar", size: 16 })
2223
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "calendar", size: 16 })
2114
2224
  }
2115
2225
  )
2116
2226
  ]
2117
2227
  }
2118
2228
  ),
2119
- description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
2120
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.FieldError, { className: "pire-field-error", children: errorMessage }),
2121
- /* @__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: [
2122
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { className: "pire-calendar-head", children: [
2123
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2124
- import_react_aria_components19.Button,
2229
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(FieldDescription, { description, help }),
2230
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.FieldError, { className: "pire-field-error", children: errorMessage }),
2231
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.Dialog, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_aria_components22.Calendar, { className: "pire-calendar", children: [
2232
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("header", { className: "pire-calendar-head", children: [
2233
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2234
+ import_react_aria_components22.Button,
2125
2235
  {
2126
2236
  slot: "previous",
2127
2237
  className: "pire-iconbtn",
2128
2238
  "data-size": "sm",
2129
2239
  "aria-label": msg.datePickerPreviousMonth,
2130
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-left", size: 16 })
2240
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "chevron-left", size: 16 })
2131
2241
  }
2132
2242
  ),
2133
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.Heading, { className: "pire-calendar-title" }),
2134
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2135
- import_react_aria_components19.Button,
2243
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.Heading, { className: "pire-calendar-title" }),
2244
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2245
+ import_react_aria_components22.Button,
2136
2246
  {
2137
2247
  slot: "next",
2138
2248
  className: "pire-iconbtn",
2139
2249
  "data-size": "sm",
2140
2250
  "aria-label": msg.datePickerNextMonth,
2141
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "chevron-right", size: 16 })
2251
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "chevron-right", size: 16 })
2142
2252
  }
2143
2253
  )
2144
2254
  ] }),
2145
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_aria_components19.CalendarGrid, { className: "pire-calendar-grid", children: [
2146
- /* @__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 }) }),
2147
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_aria_components19.CalendarCell, { date, className: "pire-calendar-cell" }) })
2255
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_aria_components22.CalendarGrid, { className: "pire-calendar-grid", children: [
2256
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.CalendarHeaderCell, { children: day }) }),
2257
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components22.CalendarCell, { date, className: "pire-calendar-cell" }) })
2148
2258
  ] })
2149
2259
  ] }) }) })
2150
2260
  ]
@@ -2153,9 +2263,9 @@ function DatePicker({
2153
2263
  }
2154
2264
 
2155
2265
  // src/components/forms/DateRangePicker.tsx
2156
- var React16 = __toESM(require("react"), 1);
2157
- var import_react_aria_components20 = require("react-aria-components");
2158
- var import_jsx_runtime29 = require("react/jsx-runtime");
2266
+ var React17 = __toESM(require("react"), 1);
2267
+ var import_react_aria_components23 = require("react-aria-components");
2268
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2159
2269
  function coerceRange(range) {
2160
2270
  if (range === void 0) {
2161
2271
  return void 0;
@@ -2176,12 +2286,12 @@ function rangeLengthInDays(range) {
2176
2286
  return end.toDate("UTC").getTime() / 864e5 - start.toDate("UTC").getTime() / 864e5 + 1;
2177
2287
  }
2178
2288
  function ClearButton3({ label }) {
2179
- const state = React16.useContext(import_react_aria_components20.DateRangePickerStateContext);
2289
+ const state = React17.useContext(import_react_aria_components23.DateRangePickerStateContext);
2180
2290
  if (!state?.value?.start && !state?.value?.end) {
2181
2291
  return null;
2182
2292
  }
2183
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2184
- import_react_aria_components20.Button,
2293
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2294
+ import_react_aria_components23.Button,
2185
2295
  {
2186
2296
  className: "pire-input-clear",
2187
2297
  slot: null,
@@ -2196,6 +2306,7 @@ function ClearButton3({ label }) {
2196
2306
  function DateRangePicker({
2197
2307
  label,
2198
2308
  description,
2309
+ help,
2199
2310
  errorMessage,
2200
2311
  maxRangeDays,
2201
2312
  presets,
@@ -2231,8 +2342,9 @@ function DateRangePicker({
2231
2342
  valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end }
2232
2343
  );
2233
2344
  };
2234
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2235
- import_react_aria_components20.DateRangePicker,
2345
+ warnHelpWithoutLabel("DateRangePicker", label, help);
2346
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2347
+ import_react_aria_components23.DateRangePicker,
2236
2348
  {
2237
2349
  className: cx("pire-field", className),
2238
2350
  style,
@@ -2247,12 +2359,9 @@ function DateRangePicker({
2247
2359
  ...rest,
2248
2360
  isInvalid: rest.isInvalid || tooLong || void 0,
2249
2361
  children: [
2250
- label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_aria_components20.Label, { className: "pire-field-label", children: [
2251
- label,
2252
- rest.isRequired ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
2253
- ] }) : null,
2254
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2255
- import_react_aria_components20.Group,
2362
+ label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FieldLabel, { label, isRequired: rest.isRequired, help }) : null,
2363
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2364
+ import_react_aria_components23.Group,
2256
2365
  {
2257
2366
  className: "pire-control pire-daterange-control",
2258
2367
  "data-size": size,
@@ -2260,31 +2369,31 @@ function DateRangePicker({
2260
2369
  "data-invalid": rest.isInvalid || tooLong ? "true" : void 0,
2261
2370
  "data-readonly": rest.isReadOnly ? "true" : void 0,
2262
2371
  children: [
2263
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.DateInput, { slot: "start", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.DateSegment, { segment, className: "pire-datesegment" }) }),
2264
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { "aria-hidden": "true", className: "pire-daterange-dash", children: "\u2013" }),
2265
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.DateInput, { slot: "end", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.DateSegment, { segment, className: "pire-datesegment" }) }),
2266
- isClearable && !rest.isDisabled && !rest.isReadOnly ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ClearButton3, { label: clearLabel ?? msg.inputClear }) : null,
2267
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2268
- import_react_aria_components20.Button,
2372
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.DateInput, { slot: "start", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.DateSegment, { segment, className: "pire-datesegment" }) }),
2373
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": "true", className: "pire-daterange-dash", children: "\u2013" }),
2374
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.DateInput, { slot: "end", className: "pire-datefield", children: (segment) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.DateSegment, { segment, className: "pire-datesegment" }) }),
2375
+ isClearable && !rest.isDisabled && !rest.isReadOnly ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ClearButton3, { label: clearLabel ?? msg.inputClear }) : null,
2376
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2377
+ import_react_aria_components23.Button,
2269
2378
  {
2270
2379
  className: "pire-iconbtn",
2271
2380
  "data-size": "sm",
2272
2381
  "aria-label": msg.datePickerOpenCalendar,
2273
2382
  style: { width: 24, height: 24 },
2274
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "calendar", size: 16 })
2383
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "calendar", size: 16 })
2275
2384
  }
2276
2385
  )
2277
2386
  ]
2278
2387
  }
2279
2388
  ),
2280
- description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
2281
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.FieldError, { className: "pire-field-error", children: errorMessage }),
2282
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_aria_components20.Dialog, { className: "pire-daterange-dialog", children: [
2389
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FieldDescription, { description, help }),
2390
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.FieldError, { className: "pire-field-error", children: errorMessage }),
2391
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.Popover, { className: "pire-popover", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components23.Dialog, { className: "pire-daterange-dialog", children: [
2283
2392
  presets?.length ? (
2284
2393
  // Before the calendar in the DOM, so keyboard users reach the shortcut without
2285
2394
  // arrowing through a month first.
2286
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "pire-daterange-presets", role: "group", "aria-label": msg.dateRangePresetsLabel, children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2287
- import_react_aria_components20.Button,
2395
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-daterange-presets", role: "group", "aria-label": msg.dateRangePresetsLabel, children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2396
+ import_react_aria_components23.Button,
2288
2397
  {
2289
2398
  className: "pire-daterange-preset",
2290
2399
  onPress: () => emit(coerceRange(preset.range()) ?? null),
@@ -2293,33 +2402,33 @@ function DateRangePicker({
2293
2402
  preset.id
2294
2403
  )) })
2295
2404
  ) : null,
2296
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_aria_components20.RangeCalendar, { className: "pire-calendar", children: [
2297
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("header", { className: "pire-calendar-head", children: [
2298
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2299
- import_react_aria_components20.Button,
2405
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components23.RangeCalendar, { className: "pire-calendar", children: [
2406
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("header", { className: "pire-calendar-head", children: [
2407
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2408
+ import_react_aria_components23.Button,
2300
2409
  {
2301
2410
  slot: "previous",
2302
2411
  className: "pire-iconbtn",
2303
2412
  "data-size": "sm",
2304
2413
  "aria-label": msg.datePickerPreviousMonth,
2305
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "chevron-left", size: 16 })
2414
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "chevron-left", size: 16 })
2306
2415
  }
2307
2416
  ),
2308
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.Heading, { className: "pire-calendar-title" }),
2309
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2310
- import_react_aria_components20.Button,
2417
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.Heading, { className: "pire-calendar-title" }),
2418
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2419
+ import_react_aria_components23.Button,
2311
2420
  {
2312
2421
  slot: "next",
2313
2422
  className: "pire-iconbtn",
2314
2423
  "data-size": "sm",
2315
2424
  "aria-label": msg.datePickerNextMonth,
2316
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "chevron-right", size: 16 })
2425
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "chevron-right", size: 16 })
2317
2426
  }
2318
2427
  )
2319
2428
  ] }),
2320
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_aria_components20.CalendarGrid, { className: "pire-calendar-grid", children: [
2321
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.CalendarHeaderCell, { children: day }) }),
2322
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_aria_components20.CalendarCell, { date, className: "pire-calendar-cell" }) })
2429
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components23.CalendarGrid, { className: "pire-calendar-grid", children: [
2430
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.CalendarHeaderCell, { children: day }) }),
2431
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.CalendarGridBody, { children: (date) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components23.CalendarCell, { date, className: "pire-calendar-cell" }) })
2323
2432
  ] })
2324
2433
  ] })
2325
2434
  ] }) })
@@ -2329,26 +2438,26 @@ function DateRangePicker({
2329
2438
  }
2330
2439
 
2331
2440
  // src/components/forms/ValueHelpField.tsx
2332
- var React20 = __toESM(require("react"), 1);
2441
+ var React21 = __toESM(require("react"), 1);
2333
2442
 
2334
2443
  // src/components/patterns/ValueHelpDialog.tsx
2335
- var React19 = __toESM(require("react"), 1);
2444
+ var React20 = __toESM(require("react"), 1);
2336
2445
 
2337
2446
  // src/components/feedback/Dialog.tsx
2338
- var React17 = __toESM(require("react"), 1);
2339
- var import_react_aria_components21 = require("react-aria-components");
2340
- var import_jsx_runtime30 = require("react/jsx-runtime");
2447
+ var React18 = __toESM(require("react"), 1);
2448
+ var import_react_aria_components24 = require("react-aria-components");
2449
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2341
2450
  function DialogTitle({ children, className }) {
2342
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.Heading, { slot: "title", className: cx("pire-dialog-title", className), children });
2451
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components24.Heading, { slot: "title", className: cx("pire-dialog-title", className), children });
2343
2452
  }
2344
2453
  function DialogDescription({ children, className }) {
2345
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: cx("pire-dialog-sub", className), style: { margin: 0 }, children });
2454
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: cx("pire-dialog-sub", className), style: { margin: 0 }, children });
2346
2455
  }
2347
2456
  function DialogBody({ children, className }) {
2348
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cx("pire-dialog-body", className), children });
2457
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cx("pire-dialog-body", className), children });
2349
2458
  }
2350
2459
  function DialogActions({ children, className }) {
2351
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("footer", { className: cx("pire-dialog-foot", className), children });
2460
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("footer", { className: cx("pire-dialog-foot", className), children });
2352
2461
  }
2353
2462
  function Dialog({
2354
2463
  isOpen,
@@ -2369,20 +2478,20 @@ function Dialog({
2369
2478
  onClose?.();
2370
2479
  onOpenChange?.(false);
2371
2480
  };
2372
- const parts = React17.Children.toArray(children);
2373
- const slotOf = (type) => parts.find((node) => React17.isValidElement(node) && node.type === type);
2481
+ const parts = React18.Children.toArray(children);
2482
+ const slotOf = (type) => parts.find((node) => React18.isValidElement(node) && node.type === type);
2374
2483
  const titleSlot = slotOf(DialogTitle);
2375
2484
  const descriptionSlot = slotOf(DialogDescription);
2376
2485
  const bodySlot = slotOf(DialogBody);
2377
2486
  const actionsSlot = slotOf(DialogActions);
2378
2487
  const slots = [titleSlot, descriptionSlot, bodySlot, actionsSlot];
2379
2488
  const loose = parts.filter((node) => !slots.includes(node));
2380
- const heading = titleSlot ?? (title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.Heading, { slot: "title", className: "pire-dialog-title", children: title }) : null);
2381
- const description = descriptionSlot ?? (subtitle ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null);
2382
- const actions = actionsSlot ?? (footer ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null);
2383
- const body = bodySlot ?? (loose.length ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pire-dialog-body", children: loose }) : null);
2384
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2385
- import_react_aria_components21.ModalOverlay,
2489
+ const heading = titleSlot ?? (title ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components24.Heading, { slot: "title", className: "pire-dialog-title", children: title }) : null);
2490
+ const description = descriptionSlot ?? (subtitle ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null);
2491
+ const actions = actionsSlot ?? (footer ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null);
2492
+ const body = bodySlot ?? (loose.length ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pire-dialog-body", children: loose }) : null);
2493
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2494
+ import_react_aria_components24.ModalOverlay,
2386
2495
  {
2387
2496
  className: "pire-modal-overlay",
2388
2497
  isOpen,
@@ -2390,13 +2499,13 @@ function Dialog({
2390
2499
  onOpenChange: (o) => {
2391
2500
  if (!o) close();
2392
2501
  },
2393
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components21.Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_aria_components21.Dialog, { className: "pire-dialog", children: [
2394
- heading || description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("header", { className: "pire-dialog-head", children: [
2395
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
2502
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_aria_components24.Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_aria_components24.Dialog, { className: "pire-dialog", children: [
2503
+ heading || description ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("header", { className: "pire-dialog-head", children: [
2504
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
2396
2505
  heading,
2397
2506
  description
2398
2507
  ] }),
2399
- showClose ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
2508
+ showClose ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
2400
2509
  ] }) : null,
2401
2510
  body,
2402
2511
  actions
@@ -2406,13 +2515,13 @@ function Dialog({
2406
2515
  }
2407
2516
 
2408
2517
  // src/components/data/DataTable.tsx
2409
- var React18 = __toESM(require("react"), 1);
2410
- var import_react_aria_components22 = require("react-aria-components");
2518
+ var React19 = __toESM(require("react"), 1);
2519
+ var import_react_aria_components25 = require("react-aria-components");
2411
2520
 
2412
2521
  // src/components/feedback/Skeleton.tsx
2413
- var import_jsx_runtime31 = require("react/jsx-runtime");
2522
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2414
2523
  function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
2415
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2524
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2416
2525
  "div",
2417
2526
  {
2418
2527
  className: cx("pire-skeleton", className),
@@ -2432,7 +2541,7 @@ function SkeletonTableRow({
2432
2541
  ...rest
2433
2542
  }) {
2434
2543
  const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
2435
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2544
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2436
2545
  "div",
2437
2546
  {
2438
2547
  className: cx("pire-skeleton-row", className),
@@ -2442,13 +2551,13 @@ function SkeletonTableRow({
2442
2551
  ...rest,
2443
2552
  children: cells.map((c, i) => {
2444
2553
  const align = c.numeric ? "right" : c.align ?? "left";
2445
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2554
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2446
2555
  "div",
2447
2556
  {
2448
2557
  className: "pire-skeleton-cell",
2449
2558
  "data-align": align,
2450
2559
  style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2451
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2560
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2452
2561
  },
2453
2562
  i
2454
2563
  );
@@ -2458,12 +2567,12 @@ function SkeletonTableRow({
2458
2567
  }
2459
2568
 
2460
2569
  // src/components/data/DataTable.tsx
2461
- var import_jsx_runtime32 = require("react/jsx-runtime");
2462
- var IS_DEV2 = process.env.NODE_ENV !== "production";
2463
- var warned2 = /* @__PURE__ */ new Set();
2464
- function warnOnce2(key, message) {
2465
- if (warned2.has(key)) return;
2466
- warned2.add(key);
2570
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2571
+ var IS_DEV3 = process.env.NODE_ENV !== "production";
2572
+ var warned3 = /* @__PURE__ */ new Set();
2573
+ function warnOnce3(key, message) {
2574
+ if (warned3.has(key)) return;
2575
+ warned3.add(key);
2467
2576
  console.warn(`[pire] ${message}`);
2468
2577
  }
2469
2578
  var CHECKBOX_W = 44;
@@ -2494,7 +2603,7 @@ function DataTable({
2494
2603
  const msg = usePireMessages();
2495
2604
  const selectionMode = selectable === true || selectable === "multiple" ? "multiple" : selectable === "single" ? "single" : "none";
2496
2605
  const hasCheckboxColumn = selectionMode === "multiple";
2497
- const pinnedGeometry = React18.useMemo(() => {
2606
+ const pinnedGeometry = React19.useMemo(() => {
2498
2607
  const geometry = /* @__PURE__ */ new Map();
2499
2608
  let x = hasCheckboxColumn ? CHECKBOX_W : 0;
2500
2609
  let broke = null;
@@ -2504,8 +2613,8 @@ function DataTable({
2504
2613
  break;
2505
2614
  }
2506
2615
  if (typeof column.width !== "number") {
2507
- if (IS_DEV2)
2508
- warnOnce2(
2616
+ if (IS_DEV3)
2617
+ warnOnce3(
2509
2618
  `pin-width:${column.key}`,
2510
2619
  `DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
2511
2620
  );
@@ -2515,10 +2624,10 @@ function DataTable({
2515
2624
  geometry.set(column.key, { left: x, width: column.width });
2516
2625
  x += column.width;
2517
2626
  }
2518
- if (IS_DEV2 && broke === "unpinned") {
2627
+ if (IS_DEV3 && broke === "unpinned") {
2519
2628
  const stranded = columns.slice(geometry.size).find((c) => c.pinned);
2520
2629
  if (stranded) {
2521
- warnOnce2(
2630
+ warnOnce3(
2522
2631
  `pin-gap:${stranded.key}`,
2523
2632
  `DataTable column "${stranded.key}" is pinned but does not sit in the leading run, so it will scroll. Move it before the first unpinned column.`
2524
2633
  );
@@ -2560,15 +2669,15 @@ function DataTable({
2560
2669
  style: { left: box.left, width: box.width, minWidth: box.width, maxWidth: box.width }
2561
2670
  };
2562
2671
  };
2563
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2672
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2564
2673
  "div",
2565
2674
  {
2566
2675
  className: cx("pire-table-wrap", className),
2567
2676
  style,
2568
2677
  "data-loading": isLoading ? "true" : void 0,
2569
2678
  "aria-busy": isLoading ? "true" : void 0,
2570
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2571
- import_react_aria_components22.Table,
2679
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2680
+ import_react_aria_components25.Table,
2572
2681
  {
2573
2682
  className: "pire-table",
2574
2683
  "data-density": density,
@@ -2586,8 +2695,8 @@ function DataTable({
2586
2695
  if (row) onRowAction(row);
2587
2696
  } : void 0,
2588
2697
  children: [
2589
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_aria_components22.TableHeader, { className: "pire-thead-row", children: [
2590
- hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Column, { className: "pire-th", ...pinProps(null), children: hideSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sr-only", children: msg.dataTableSelectionColumn }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
2698
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_aria_components25.TableHeader, { className: "pire-thead-row", children: [
2699
+ hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.Column, { className: "pire-th", ...pinProps(null), children: hideSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-sr-only", children: msg.dataTableSelectionColumn }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
2591
2700
  columns.map((c, i) => (
2592
2701
  // The checkbox column is never the row header — a selection control does not identify
2593
2702
  // the record — so the first *data* column carries it regardless of whether a checkbox
@@ -2595,8 +2704,8 @@ function DataTable({
2595
2704
  // table with no row header at all: invisible on first paint, and a hard crash from
2596
2705
  // React Aria's own "table must have a row header" invariant the moment `rows` changes
2597
2706
  // under it (search, sort, a paginated load).
2598
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2599
- import_react_aria_components22.Column,
2707
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2708
+ import_react_aria_components25.Column,
2600
2709
  {
2601
2710
  id: c.key,
2602
2711
  className: "pire-th",
@@ -2605,9 +2714,9 @@ function DataTable({
2605
2714
  "data-align": c.numeric || c.align === "right" ? "right" : c.align,
2606
2715
  "data-allows-sorting": c.sortable ? "true" : void 0,
2607
2716
  ...pinProps(c.key),
2608
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: c.hideLabel ? "pire-sr-only" : "pire-th-inner", children: [
2717
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: c.hideLabel ? "pire-sr-only" : "pire-th-inner", children: [
2609
2718
  c.label,
2610
- c.sortable ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2719
+ c.sortable ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2611
2720
  Icon,
2612
2721
  {
2613
2722
  size: 12,
@@ -2623,30 +2732,30 @@ function DataTable({
2623
2732
  )
2624
2733
  ))
2625
2734
  ] }),
2626
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2627
- import_react_aria_components22.TableBody,
2735
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2736
+ import_react_aria_components25.TableBody,
2628
2737
  {
2629
- renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2630
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2738
+ renderEmptyState: () => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2739
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2631
2740
  Array.from({ length: skeletonRows }, (_, i) => (
2632
2741
  // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2633
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2742
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2634
2743
  ))
2635
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }),
2744
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }),
2636
2745
  children: body.flatMap((row) => {
2637
2746
  const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2638
- const record = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2639
- import_react_aria_components22.Row,
2747
+ const record = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2748
+ import_react_aria_components25.Row,
2640
2749
  {
2641
2750
  id: row.id,
2642
2751
  className: cx("pire-tr", presentation.get(row.id)?.className),
2643
2752
  "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2644
2753
  children: [
2645
- 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,
2754
+ hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2646
2755
  columns.map((c) => {
2647
2756
  const pin = pinProps(c.key);
2648
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2649
- import_react_aria_components22.Cell,
2757
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2758
+ import_react_aria_components25.Cell,
2650
2759
  {
2651
2760
  className: "pire-td",
2652
2761
  "data-numeric": c.numeric ? "true" : void 0,
@@ -2665,23 +2774,23 @@ function DataTable({
2665
2774
  if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2666
2775
  return [
2667
2776
  record,
2668
- /* @__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))
2777
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))
2669
2778
  ];
2670
2779
  })
2671
2780
  }
2672
2781
  ),
2673
- 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: [
2674
- hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components22.Cell, { className: "pire-tf", ...pinProps(null) }) : null,
2782
+ footer && !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_aria_components25.Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
2783
+ hasCheckboxColumn ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components25.Cell, { className: "pire-tf", ...pinProps(null) }) : null,
2675
2784
  columns.map((c, i) => {
2676
2785
  const pin = pinProps(c.key);
2677
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2678
- import_react_aria_components22.Cell,
2786
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2787
+ import_react_aria_components25.Cell,
2679
2788
  {
2680
2789
  className: "pire-tf",
2681
2790
  "data-numeric": c.numeric ? "true" : void 0,
2682
2791
  ...pin,
2683
2792
  style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2684
- children: footer[c.key] ?? (i === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "pire-sr-only", children: msg.dataTableSummaryRow }) : null)
2793
+ children: footer[c.key] ?? (i === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-sr-only", children: msg.dataTableSummaryRow }) : null)
2685
2794
  },
2686
2795
  c.key
2687
2796
  );
@@ -2695,7 +2804,7 @@ function DataTable({
2695
2804
  }
2696
2805
 
2697
2806
  // src/components/patterns/ValueHelpDialog.tsx
2698
- var import_jsx_runtime33 = require("react/jsx-runtime");
2807
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2699
2808
  function ValueHelpDialog({
2700
2809
  isOpen,
2701
2810
  title,
@@ -2715,12 +2824,12 @@ function ValueHelpDialog({
2715
2824
  onConfirm
2716
2825
  }) {
2717
2826
  const msg = usePireMessages();
2718
- const [query, setQuery] = React19.useState("");
2719
- React19.useEffect(() => {
2827
+ const [query, setQuery] = React20.useState("");
2828
+ React20.useEffect(() => {
2720
2829
  if (isOpen) setQuery("");
2721
2830
  }, [isOpen]);
2722
2831
  const isMultiple = selectionMode === "multiple";
2723
- const filtered = React19.useMemo(() => {
2832
+ const filtered = React20.useMemo(() => {
2724
2833
  if (isFilteredExternally) return rows;
2725
2834
  const q = query.trim().toLowerCase();
2726
2835
  if (!q) return rows;
@@ -2730,16 +2839,16 @@ function ValueHelpDialog({
2730
2839
  setQuery(value);
2731
2840
  onSearch?.(value);
2732
2841
  };
2733
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2842
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2734
2843
  Dialog,
2735
2844
  {
2736
2845
  isOpen,
2737
2846
  size: "lg",
2738
2847
  title: title ?? msg.valueHelpDialogTitle,
2739
2848
  onClose,
2740
- footer: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2741
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
2742
- isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2849
+ footer: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2850
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
2851
+ isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2743
2852
  Button,
2744
2853
  {
2745
2854
  variant: "primary",
@@ -2751,8 +2860,8 @@ function ValueHelpDialog({
2751
2860
  }
2752
2861
  ) : null
2753
2862
  ] }),
2754
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2755
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2863
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2864
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2756
2865
  Input,
2757
2866
  {
2758
2867
  "aria-label": msg.valueHelpDialogSearch,
@@ -2765,12 +2874,12 @@ function ValueHelpDialog({
2765
2874
  autoFocus: true
2766
2875
  }
2767
2876
  ),
2768
- isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "pire-valuehelp-selectionbar", children: [
2769
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.(rows.map((r) => r.id)), children: msg.valueHelpSelectAllCount.replace("{count}", String(rows.length)) }),
2770
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
2771
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
2877
+ isMultiple ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "pire-valuehelp-selectionbar", children: [
2878
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.(rows.map((r) => r.id)), children: msg.valueHelpSelectAllCount.replace("{count}", String(rows.length)) }),
2879
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
2880
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
2772
2881
  ] }) : null,
2773
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2882
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2774
2883
  "div",
2775
2884
  {
2776
2885
  onScroll: onLoadMore ? (event) => {
@@ -2778,7 +2887,7 @@ function ValueHelpDialog({
2778
2887
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2779
2888
  } : void 0,
2780
2889
  style: { overflow: "auto", maxHeight: "48vh" },
2781
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2890
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2782
2891
  DataTable,
2783
2892
  {
2784
2893
  "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
@@ -2805,7 +2914,7 @@ function ValueHelpDialog({
2805
2914
  }
2806
2915
 
2807
2916
  // src/components/forms/ValueHelpField.tsx
2808
- var import_jsx_runtime34 = require("react/jsx-runtime");
2917
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2809
2918
  var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
2810
2919
  function ValueHelpField({
2811
2920
  label,
@@ -2831,9 +2940,9 @@ function ValueHelpField({
2831
2940
  style
2832
2941
  }) {
2833
2942
  const msg = usePireMessages();
2834
- const [open, setOpen] = React20.useState(false);
2835
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cx(className), style, children: [
2836
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2943
+ const [open, setOpen] = React21.useState(false);
2944
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cx(className), style, children: [
2945
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2837
2946
  Input,
2838
2947
  {
2839
2948
  label,
@@ -2845,8 +2954,8 @@ function ValueHelpField({
2845
2954
  placeholder: placeholder ?? msg.valueHelpFieldPlaceholder,
2846
2955
  description,
2847
2956
  errorMessage,
2848
- suffix: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "pire-valuehelp-actions", children: [
2849
- allowsClear && value ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2957
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "pire-valuehelp-actions", children: [
2958
+ allowsClear && value ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2850
2959
  IconButton,
2851
2960
  {
2852
2961
  icon: "x",
@@ -2855,7 +2964,7 @@ function ValueHelpField({
2855
2964
  onPress: () => onChange?.(null)
2856
2965
  }
2857
2966
  ) : null,
2858
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2967
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2859
2968
  IconButton,
2860
2969
  {
2861
2970
  icon: "search",
@@ -2867,7 +2976,7 @@ function ValueHelpField({
2867
2976
  ] })
2868
2977
  }
2869
2978
  ),
2870
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2979
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2871
2980
  ValueHelpDialog,
2872
2981
  {
2873
2982
  isOpen: open,
@@ -2887,12 +2996,12 @@ function ValueHelpField({
2887
2996
  }
2888
2997
 
2889
2998
  // src/components/forms/FileUpload.tsx
2890
- var React21 = __toESM(require("react"), 1);
2891
- var import_react_aria_components24 = require("react-aria-components");
2999
+ var React22 = __toESM(require("react"), 1);
3000
+ var import_react_aria_components27 = require("react-aria-components");
2892
3001
 
2893
3002
  // src/components/feedback/ProgressBar.tsx
2894
- var import_react_aria_components23 = require("react-aria-components");
2895
- var import_jsx_runtime35 = require("react/jsx-runtime");
3003
+ var import_react_aria_components26 = require("react-aria-components");
3004
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2896
3005
  function ProgressBar({
2897
3006
  value = 0,
2898
3007
  minValue = 0,
@@ -2905,8 +3014,8 @@ function ProgressBar({
2905
3014
  className,
2906
3015
  style
2907
3016
  }) {
2908
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2909
- import_react_aria_components23.ProgressBar,
3017
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3018
+ import_react_aria_components26.ProgressBar,
2910
3019
  {
2911
3020
  className: cx("pire-progress", className),
2912
3021
  "data-status": status,
@@ -2916,19 +3025,19 @@ function ProgressBar({
2916
3025
  maxValue,
2917
3026
  isIndeterminate,
2918
3027
  style,
2919
- children: ({ percentage, valueText }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
2920
- label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "pire-progress-head", children: [
2921
- label ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components23.Label, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
2922
- showValue && !isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "pire-numeric", children: valueText }) : null
3028
+ children: ({ percentage, valueText }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3029
+ label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "pire-progress-head", children: [
3030
+ label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components26.Label, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {}),
3031
+ showValue && !isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-numeric", children: valueText }) : null
2923
3032
  ] }) : null,
2924
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "pire-progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
3033
+ /* @__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}%` } }) })
2925
3034
  ] })
2926
3035
  }
2927
3036
  );
2928
3037
  }
2929
3038
 
2930
3039
  // src/components/forms/FileUpload.tsx
2931
- var import_jsx_runtime36 = require("react/jsx-runtime");
3040
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2932
3041
  var isImage = (file) => file.type.startsWith("image/");
2933
3042
  function formatFileSize(bytes) {
2934
3043
  if (bytes < 1024) return `${bytes} B`;
@@ -2980,10 +3089,10 @@ function FileUpload({
2980
3089
  ...rest
2981
3090
  }) {
2982
3091
  const msg = usePireMessages();
2983
- const [uncontrolled, setUncontrolled] = React21.useState(defaultValue ?? []);
3092
+ const [uncontrolled, setUncontrolled] = React22.useState(defaultValue ?? []);
2984
3093
  const files = value ?? uncontrolled;
2985
- const created = React21.useRef([]);
2986
- React21.useEffect(
3094
+ const created = React22.useRef([]);
3095
+ React22.useEffect(
2987
3096
  () => () => {
2988
3097
  for (const url of created.current) URL.revokeObjectURL(url);
2989
3098
  },
@@ -3006,7 +3115,7 @@ function FileUpload({
3006
3115
  commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
3007
3116
  };
3008
3117
  const remove = (target) => commit(files.filter((f) => f.file !== target));
3009
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3118
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3010
3119
  "div",
3011
3120
  {
3012
3121
  className: cx("pire-field", "pire-fileupload", className),
@@ -3015,24 +3124,24 @@ function FileUpload({
3015
3124
  "data-invalid": isInvalid ? "true" : void 0,
3016
3125
  ...rest,
3017
3126
  children: [
3018
- label ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "pire-field-label", children: [
3127
+ label ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "pire-field-label", children: [
3019
3128
  label,
3020
- isRequired ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
3129
+ isRequired ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
3021
3130
  ] }) : null,
3022
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3023
- import_react_aria_components24.FileTrigger,
3131
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3132
+ import_react_aria_components27.FileTrigger,
3024
3133
  {
3025
3134
  acceptedFileTypes,
3026
3135
  allowsMultiple,
3027
3136
  onSelect: accept,
3028
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { icon: "paperclip", isDisabled: isDisabled || isReadOnly, children: chooseLabel ?? msg.fileUploadChoose })
3137
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { icon: "paperclip", isDisabled: isDisabled || isReadOnly, children: chooseLabel ?? msg.fileUploadChoose })
3029
3138
  }
3030
3139
  ),
3031
- files.length ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "pire-fileupload-item", children: [
3032
- previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
3033
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
3034
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
3035
- isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3140
+ files.length ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("li", { className: "pire-fileupload-item", children: [
3141
+ previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
3142
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
3143
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
3144
+ isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3036
3145
  IconButton,
3037
3146
  {
3038
3147
  icon: "x",
@@ -3042,17 +3151,17 @@ function FileUpload({
3042
3151
  }
3043
3152
  )
3044
3153
  ] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
3045
- uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
3046
- description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_aria_components24.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
3047
- isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
3154
+ uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
3155
+ description ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components27.Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
3156
+ isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
3048
3157
  ]
3049
3158
  }
3050
3159
  );
3051
3160
  }
3052
3161
 
3053
3162
  // src/components/navigation/ShellBar.tsx
3054
- var import_react_aria_components25 = require("react-aria-components");
3055
- var import_jsx_runtime37 = require("react/jsx-runtime");
3163
+ var import_react_aria_components28 = require("react-aria-components");
3164
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3056
3165
  var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
3057
3166
  function ShellBar({
3058
3167
  launcher,
@@ -3071,45 +3180,45 @@ function ShellBar({
3071
3180
  ...rest
3072
3181
  }) {
3073
3182
  const msg = usePireMessages();
3074
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("header", { className: cx("pire-shellbar", className), ...rest, children: [
3183
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("header", { className: cx("pire-shellbar", className), ...rest, children: [
3075
3184
  launcher,
3076
- onMenu ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
3077
- monogram ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
3078
- product ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-shellbar-product", children: product }) : null,
3079
- title ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-shellbar-title", children: title }) : null,
3080
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-shellbar-spacer" }),
3081
- onSearch ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
3185
+ onMenu ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
3186
+ monogram ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
3187
+ product ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-shellbar-product", children: product }) : null,
3188
+ title ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-shellbar-title", children: title }) : null,
3189
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-shellbar-spacer" }),
3190
+ onSearch ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
3082
3191
  actions,
3083
3192
  user && userMenu ? (
3084
3193
  // A real button, not the img-role span: the avatar is where "my profile", "switch company"
3085
3194
  // and "sign out" live in any ERP, and a span accepts neither focus nor onPress. Popover is
3086
3195
  // rendered here rather than expected from the consumer so the panel keeps shell placement.
3087
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_aria_components25.MenuTrigger, { children: [
3088
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3089
- import_react_aria_components25.Button,
3196
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_aria_components28.MenuTrigger, { children: [
3197
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3198
+ import_react_aria_components28.Button,
3090
3199
  {
3091
3200
  className: "pire-avatar pire-avatar-trigger",
3092
3201
  "aria-label": (userMenuLabel ?? msg.shellBarUserMenu).replace("{user}", user),
3093
3202
  children: initials2(user)
3094
3203
  }
3095
3204
  ),
3096
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_aria_components25.Popover, { className: "pire-popover", children: userMenu })
3205
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_aria_components28.Popover, { className: "pire-popover", children: userMenu })
3097
3206
  ] })
3098
- ) : user ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
3207
+ ) : user ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
3099
3208
  ] });
3100
3209
  }
3101
3210
 
3102
3211
  // src/components/navigation/SideNav.tsx
3103
- var React22 = __toESM(require("react"), 1);
3104
- var import_react_aria_components27 = require("react-aria-components");
3212
+ var React23 = __toESM(require("react"), 1);
3213
+ var import_react_aria_components30 = require("react-aria-components");
3105
3214
 
3106
3215
  // src/components/navigation/Menu.tsx
3107
- var import_react_aria_components26 = require("react-aria-components");
3108
- var import_jsx_runtime38 = require("react/jsx-runtime");
3216
+ var import_react_aria_components29 = require("react-aria-components");
3217
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3109
3218
  function Menu({ minWidth, className, style, ...rest }) {
3110
3219
  const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
3111
3220
  const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
3112
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components26.Menu, { className: cx("pire-menu", className), style: menuStyle, ...rest });
3221
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components29.Menu, { className: cx("pire-menu", className), style: menuStyle, ...rest });
3113
3222
  }
3114
3223
  var shortcutKeys = (shortcut) => {
3115
3224
  if (shortcut == null) return [];
@@ -3126,19 +3235,19 @@ function MenuItem({
3126
3235
  ...rest
3127
3236
  }) {
3128
3237
  const keys = shortcutKeys(shortcut);
3129
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3130
- import_react_aria_components26.MenuItem,
3238
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3239
+ import_react_aria_components29.MenuItem,
3131
3240
  {
3132
3241
  className: cx("pire-menu-item", className),
3133
3242
  "data-tone": tone === "danger" ? "danger" : void 0,
3134
3243
  ...rest,
3135
3244
  children: [
3136
- icon ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
3137
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "pire-menu-item-body", children: [
3138
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-label", children }),
3139
- description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pire-menu-item-desc", children: description }) : null
3245
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
3246
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "pire-menu-item-body", children: [
3247
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-menu-item-label", children }),
3248
+ description ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-menu-item-desc", children: description }) : null
3140
3249
  ] }),
3141
- 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)(
3250
+ keys.length ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3142
3251
  Kbd,
3143
3252
  {
3144
3253
  size: "sm",
@@ -3151,17 +3260,17 @@ function MenuItem({
3151
3260
  );
3152
3261
  }
3153
3262
  function MenuSection({ title, children, className, ...rest }) {
3154
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_aria_components26.MenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
3155
- title ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components26.Header, { className: "pire-menu-section-title", children: title }) : null,
3263
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_aria_components29.MenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
3264
+ title ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components29.Header, { className: "pire-menu-section-title", children: title }) : null,
3156
3265
  children
3157
3266
  ] });
3158
3267
  }
3159
3268
  function MenuSeparator({ className }) {
3160
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_aria_components26.Separator, { className: cx("pire-menu-separator", className) });
3269
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components29.Separator, { className: cx("pire-menu-separator", className) });
3161
3270
  }
3162
3271
 
3163
3272
  // src/components/navigation/SideNav.tsx
3164
- var import_jsx_runtime39 = require("react/jsx-runtime");
3273
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3165
3274
  function findActiveParent(groups, value) {
3166
3275
  if (value == null) return void 0;
3167
3276
  for (const group of groups) {
@@ -3188,10 +3297,10 @@ function SideNav({
3188
3297
  const msg = usePireMessages();
3189
3298
  const activeParent = findActiveParent(groups, value);
3190
3299
  const isControlled = expandedIds != null;
3191
- const [ownExpanded, setOwnExpanded] = React22.useState(
3300
+ const [ownExpanded, setOwnExpanded] = React23.useState(
3192
3301
  () => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : []))
3193
3302
  );
3194
- const [lastValue, setLastValue] = React22.useState(value);
3303
+ const [lastValue, setLastValue] = React23.useState(value);
3195
3304
  if (value !== lastValue) {
3196
3305
  setLastValue(value);
3197
3306
  if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {
@@ -3211,8 +3320,8 @@ function SideNav({
3211
3320
  };
3212
3321
  const renderRow = (item, onPress, isGroup) => {
3213
3322
  const selected = !isGroup && item.id === value;
3214
- const button = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3215
- import_react_aria_components27.Button,
3323
+ const button = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3324
+ import_react_aria_components30.Button,
3216
3325
  {
3217
3326
  className: "pire-sidenav-item",
3218
3327
  "data-selected": selected ? "true" : void 0,
@@ -3221,70 +3330,70 @@ function SideNav({
3221
3330
  "aria-label": collapsed ? item.label : void 0,
3222
3331
  onPress,
3223
3332
  children: [
3224
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3225
- collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: item.label }),
3226
- item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
3333
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3334
+ collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: item.label }),
3335
+ item.count != null && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null
3227
3336
  ]
3228
3337
  },
3229
3338
  item.id
3230
3339
  );
3231
- return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
3340
+ return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
3232
3341
  };
3233
- const renderRailFlyout = (item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_aria_components27.MenuTrigger, { children: [
3234
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3235
- import_react_aria_components27.Button,
3342
+ const renderRailFlyout = (item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_aria_components30.MenuTrigger, { children: [
3343
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3344
+ import_react_aria_components30.Button,
3236
3345
  {
3237
3346
  className: "pire-sidenav-item",
3238
3347
  "aria-label": item.label,
3239
3348
  "data-active-child": item.id === activeParent ? "true" : void 0,
3240
- children: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: item.icon, size: 16 }) : null
3349
+ children: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: item.icon, size: 16 }) : null
3241
3350
  }
3242
3351
  ),
3243
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components27.Popover, { className: "pire-popover", placement: "right top", offset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3352
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components30.Popover, { className: "pire-popover", placement: "right top", offset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3244
3353
  Menu,
3245
3354
  {
3246
3355
  "aria-label": item.label,
3247
3356
  className: "pire-sidenav-flyout",
3248
3357
  onAction: (key) => onChange?.(String(key)),
3249
- children: (item.items ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MenuItem, { id: child.id, children: child.label }, child.id))
3358
+ children: (item.items ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MenuItem, { id: child.id, children: child.label }, child.id))
3250
3359
  }
3251
3360
  ) })
3252
3361
  ] }, item.id);
3253
- const renderSection = (item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_aria_components27.Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
3254
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3255
- import_react_aria_components27.Button,
3362
+ const renderSection = (item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_aria_components30.Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
3363
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3364
+ import_react_aria_components30.Button,
3256
3365
  {
3257
3366
  slot: "trigger",
3258
3367
  className: "pire-sidenav-item",
3259
3368
  "data-kind": "group",
3260
3369
  "data-active-child": item.id === activeParent ? "true" : void 0,
3261
3370
  children: [
3262
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3263
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: item.label }),
3264
- item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null,
3265
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
3371
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3372
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: item.label }),
3373
+ item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "pire-sidenav-count", children: item.count }) : null,
3374
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
3266
3375
  ]
3267
3376
  }
3268
3377
  ),
3269
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components27.DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
3378
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components30.DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
3270
3379
  const selected = child.id === value;
3271
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3272
- import_react_aria_components27.Button,
3380
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3381
+ import_react_aria_components30.Button,
3273
3382
  {
3274
3383
  className: "pire-sidenav-item pire-sidenav-subitem",
3275
3384
  "data-selected": selected ? "true" : void 0,
3276
3385
  "aria-current": selected ? "page" : void 0,
3277
3386
  onPress: () => onChange?.(child.id),
3278
3387
  children: [
3279
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: child.label }),
3280
- child.count != null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "pire-sidenav-count", children: child.count }) : null
3388
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: child.label }),
3389
+ child.count != null ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "pire-sidenav-count", children: child.count }) : null
3281
3390
  ]
3282
3391
  },
3283
3392
  child.id
3284
3393
  );
3285
3394
  }) })
3286
3395
  ] }, item.id);
3287
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3396
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3288
3397
  "nav",
3289
3398
  {
3290
3399
  className: cx("pire-sidenav", className),
@@ -3301,10 +3410,10 @@ function SideNav({
3301
3410
  if (isGroup && collapsed && railFlyout) return renderRailFlyout(item);
3302
3411
  return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
3303
3412
  });
3304
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "pire-sidenav-group", children: [
3305
- group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
3306
- hasSections ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3307
- import_react_aria_components27.DisclosureGroup,
3413
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "pire-sidenav-group", children: [
3414
+ group.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "pire-sidenav-label", children: group.label }) : null,
3415
+ hasSections ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3416
+ import_react_aria_components30.DisclosureGroup,
3308
3417
  {
3309
3418
  className: "pire-sidenav-tree",
3310
3419
  allowsMultipleExpanded: true,
@@ -3315,44 +3424,44 @@ function SideNav({
3315
3424
  ) : rows
3316
3425
  ] }, group.label ?? gi);
3317
3426
  }),
3318
- footer ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pire-sidenav-footer", children: footer }) : null
3427
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "pire-sidenav-footer", children: footer }) : null
3319
3428
  ]
3320
3429
  }
3321
3430
  );
3322
3431
  }
3323
3432
 
3324
3433
  // src/components/navigation/ShellRail.tsx
3325
- var React23 = __toESM(require("react"), 1);
3326
- var import_react_aria_components28 = require("react-aria-components");
3327
- var import_jsx_runtime40 = (
3434
+ var React24 = __toESM(require("react"), 1);
3435
+ var import_react_aria_components31 = require("react-aria-components");
3436
+ var import_jsx_runtime43 = (
3328
3437
  // The divider is a sibling of the groups rather than a pseudo-element on one, because the
3329
3438
  // scrolling zone would carry its own rule out of view on the first wheel event.
3330
3439
  require("react/jsx-runtime")
3331
3440
  );
3332
3441
  function ShellRail({ groups, value, onChange, className, ...rest }) {
3333
3442
  const msg = usePireMessages();
3334
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("nav", { className: cx("pire-shellrail", className), "aria-label": msg.shellRailLabel, ...rest, children: groups.map((group, gi) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(React23.Fragment, { children: [
3335
- gi > 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "pire-shellrail-divider" }) : null,
3336
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "pire-shellrail-group", "data-scroll": group.isScrollable ? "true" : void 0, children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tooltip, { label: item.label, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3337
- import_react_aria_components28.Button,
3443
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { className: cx("pire-shellrail", className), "aria-label": msg.shellRailLabel, ...rest, children: groups.map((group, gi) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(React24.Fragment, { children: [
3444
+ gi > 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pire-shellrail-divider" }) : null,
3445
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pire-shellrail-group", "data-scroll": group.isScrollable ? "true" : void 0, children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Tooltip, { label: item.label, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3446
+ import_react_aria_components31.Button,
3338
3447
  {
3339
3448
  className: "pire-shellrail-item",
3340
3449
  "aria-label": item.label,
3341
3450
  "data-selected": item.id === value ? "true" : void 0,
3342
3451
  "aria-current": item.id === value ? "true" : void 0,
3343
3452
  onPress: () => onChange?.(item.id),
3344
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pire-shellrail-tile", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: item.icon, size: 20 }) })
3453
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pire-shellrail-tile", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: item.icon, size: 20 }) })
3345
3454
  }
3346
3455
  ) }, item.id)) })
3347
3456
  ] }, group.items[0]?.id ?? gi)) });
3348
3457
  }
3349
3458
 
3350
3459
  // src/components/navigation/Tabs.tsx
3351
- var import_react_aria_components29 = require("react-aria-components");
3352
- var import_jsx_runtime41 = require("react/jsx-runtime");
3460
+ var import_react_aria_components32 = require("react-aria-components");
3461
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3353
3462
  function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
3354
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3355
- import_react_aria_components29.Tabs,
3463
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3464
+ import_react_aria_components32.Tabs,
3356
3465
  {
3357
3466
  className,
3358
3467
  style,
@@ -3360,23 +3469,23 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
3360
3469
  defaultSelectedKey: defaultValue,
3361
3470
  onSelectionChange: (k) => onChange?.(String(k)),
3362
3471
  children: [
3363
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components29.TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_aria_components29.Tab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
3364
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3472
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_aria_components32.TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components32.Tab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
3473
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: item.icon, size: 16 }) : null,
3365
3474
  item.label,
3366
- item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "pire-tab-count", children: item.count }) : null
3475
+ item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-tab-count", children: item.count }) : null
3367
3476
  ] }) }),
3368
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_aria_components29.TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
3477
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_aria_components32.TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
3369
3478
  ]
3370
3479
  }
3371
3480
  );
3372
3481
  }
3373
3482
 
3374
3483
  // src/components/navigation/Breadcrumb.tsx
3375
- var import_react_aria_components30 = require("react-aria-components");
3376
- var import_jsx_runtime42 = require("react/jsx-runtime");
3484
+ var import_react_aria_components33 = require("react-aria-components");
3485
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3377
3486
  function Breadcrumb({ items, onNavigate, className, style }) {
3378
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3379
- import_react_aria_components30.Breadcrumbs,
3487
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3488
+ import_react_aria_components33.Breadcrumbs,
3380
3489
  {
3381
3490
  className: cx("pire-breadcrumbs", className),
3382
3491
  style,
@@ -3384,9 +3493,9 @@ function Breadcrumb({ items, onNavigate, className, style }) {
3384
3493
  onAction: (key) => onNavigate?.(String(key)),
3385
3494
  children: (item) => {
3386
3495
  const last = items[items.length - 1] === item;
3387
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_aria_components30.Breadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
3388
- last ? item.label : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components30.Link, { href: item.href, children: item.label }),
3389
- last ? null : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
3496
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_aria_components33.Breadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
3497
+ last ? item.label : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_aria_components33.Link, { href: item.href, children: item.label }),
3498
+ last ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
3390
3499
  ] });
3391
3500
  }
3392
3501
  }
@@ -3394,7 +3503,7 @@ function Breadcrumb({ items, onNavigate, className, style }) {
3394
3503
  }
3395
3504
 
3396
3505
  // src/components/navigation/Pagination.tsx
3397
- var import_jsx_runtime43 = require("react/jsx-runtime");
3506
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3398
3507
  function Pagination({
3399
3508
  page = 1,
3400
3509
  pageSize = 25,
@@ -3409,9 +3518,9 @@ function Pagination({
3409
3518
  const pages = Math.max(1, Math.ceil(total / pageSize));
3410
3519
  const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
3411
3520
  const to = Math.min(total, page * pageSize);
3412
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
3413
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
3414
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3521
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
3522
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
3523
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3415
3524
  IconButton,
3416
3525
  {
3417
3526
  icon: "chevron-left",
@@ -3422,8 +3531,8 @@ function Pagination({
3422
3531
  onPress: () => onPageChange?.(page - 1)
3423
3532
  }
3424
3533
  ),
3425
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
3426
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3534
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
3535
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3427
3536
  IconButton,
3428
3537
  {
3429
3538
  icon: "chevron-right",
@@ -3434,7 +3543,7 @@ function Pagination({
3434
3543
  onPress: () => onPageChange?.(page + 1)
3435
3544
  }
3436
3545
  ),
3437
- onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3546
+ onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3438
3547
  Select,
3439
3548
  {
3440
3549
  "aria-label": msg.paginationRowsPerPage,
@@ -3450,9 +3559,9 @@ function Pagination({
3450
3559
  }
3451
3560
 
3452
3561
  // src/components/navigation/Ribbon.tsx
3453
- var React24 = __toESM(require("react"), 1);
3454
- var import_react_aria_components31 = require("react-aria-components");
3455
- var import_jsx_runtime44 = require("react/jsx-runtime");
3562
+ var React25 = __toESM(require("react"), 1);
3563
+ var import_react_aria_components34 = require("react-aria-components");
3564
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3456
3565
  var outside = (what, parent) => {
3457
3566
  const Config = () => {
3458
3567
  throw new Error(`[pire] ${what} must be a child of ${parent}.`);
@@ -3466,7 +3575,7 @@ var RibbonGroup = outside("Ribbon.Group", "Ribbon.Tab");
3466
3575
  var RibbonCommand = outside("Ribbon.Command", "Ribbon.Group");
3467
3576
  var CONFIG_ELEMENTS = /* @__PURE__ */ new Set([RibbonTab, RibbonGroup, RibbonCommand]);
3468
3577
  function describe(child) {
3469
- if (!React24.isValidElement(child)) return JSON.stringify(child);
3578
+ if (!React25.isValidElement(child)) return JSON.stringify(child);
3470
3579
  if (typeof child.type === "string") return `<${child.type}>`;
3471
3580
  const type = child.type;
3472
3581
  return type?.displayName || type?.name || "a component";
@@ -3474,13 +3583,13 @@ function describe(child) {
3474
3583
  function childrenOfType(children, type, what, parent) {
3475
3584
  const out = [];
3476
3585
  const walk = (nodes, path) => {
3477
- React24.Children.forEach(nodes, (child, i) => {
3586
+ React25.Children.forEach(nodes, (child, i) => {
3478
3587
  if (child == null || typeof child === "boolean") return;
3479
- if (React24.isValidElement(child) && child.type === React24.Fragment) {
3588
+ if (React25.isValidElement(child) && child.type === React25.Fragment) {
3480
3589
  return walk(child.props.children, `${path}${i}.`);
3481
3590
  }
3482
- if (!React24.isValidElement(child) || child.type !== type) {
3483
- const isWrapper = React24.isValidElement(child) && typeof child.type !== "string" && !CONFIG_ELEMENTS.has(child.type);
3591
+ if (!React25.isValidElement(child) || child.type !== type) {
3592
+ const isWrapper = React25.isValidElement(child) && typeof child.type !== "string" && !CONFIG_ELEMENTS.has(child.type);
3484
3593
  throw new Error(
3485
3594
  `[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.` : "")
3486
3595
  );
@@ -3514,16 +3623,16 @@ function Command({
3514
3623
  }) {
3515
3624
  const size = inBar ? "sm" : command.size ?? "sm";
3516
3625
  const isDisabled = command.isDisabled || command.requiresSelection === true && selectionCount === 0;
3517
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3518
- import_react_aria_components31.Button,
3626
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3627
+ import_react_aria_components34.Button,
3519
3628
  {
3520
3629
  className: "pire-ribbon-command",
3521
3630
  "data-size": size,
3522
3631
  isDisabled,
3523
3632
  onPress: command.onPress,
3524
3633
  children: [
3525
- command.icon ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: command.icon, size: size === "lg" ? 20 : 16 }) : null,
3526
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-command-label", children: command.label })
3634
+ command.icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: command.icon, size: size === "lg" ? 20 : 16 }) : null,
3635
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-ribbon-command-label", children: command.label })
3527
3636
  ]
3528
3637
  }
3529
3638
  );
@@ -3531,18 +3640,18 @@ function Command({
3531
3640
  function Group8({ group, selectionCount }) {
3532
3641
  const large = group.commands.filter((c) => (c.size ?? "sm") === "lg");
3533
3642
  const small = group.commands.filter((c) => (c.size ?? "sm") !== "lg");
3534
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "pire-ribbon-group", role: "group", "aria-label": group.caption, children: [
3535
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "pire-ribbon-group-body", children: [
3536
- large.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { command: c, selectionCount }, c.key)),
3537
- small.length ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-stack", children: small.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { command: c, selectionCount }, c.key)) }) : null
3643
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "pire-ribbon-group", role: "group", "aria-label": group.caption, children: [
3644
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "pire-ribbon-group-body", children: [
3645
+ large.map((c) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Command, { command: c, selectionCount }, c.key)),
3646
+ small.length ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-ribbon-stack", children: small.map((c) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Command, { command: c, selectionCount }, c.key)) }) : null
3538
3647
  ] }),
3539
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-caption", "aria-hidden": "true", children: group.caption })
3648
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-ribbon-caption", "aria-hidden": "true", children: group.caption })
3540
3649
  ] });
3541
3650
  }
3542
3651
  function useTrailingOverflow() {
3543
- const ref = React24.useRef(null);
3544
- const [overflow, setOverflow] = React24.useState(false);
3545
- React24.useEffect(() => {
3652
+ const ref = React25.useRef(null);
3653
+ const [overflow, setOverflow] = React25.useState(false);
3654
+ React25.useEffect(() => {
3546
3655
  const node = ref.current;
3547
3656
  if (!node) return;
3548
3657
  const measure = () => setOverflow(node.scrollLeft + node.clientWidth < node.scrollWidth - 1);
@@ -3567,9 +3676,9 @@ function Surface({
3567
3676
  }) {
3568
3677
  const [scrollRef, overflow] = useTrailingOverflow();
3569
3678
  const domId = id ? { id } : {};
3570
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_aria_components31.Toolbar, { ...domId, className, "aria-label": label, children: [
3571
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-scroll", ref: scrollRef, children }),
3572
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-trail", "data-overflow": overflow ? "true" : void 0, children: trailing })
3679
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_aria_components34.Toolbar, { ...domId, className, "aria-label": label, children: [
3680
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-ribbon-scroll", ref: scrollRef, children }),
3681
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-ribbon-trail", "data-overflow": overflow ? "true" : void 0, children: trailing })
3573
3682
  ] });
3574
3683
  }
3575
3684
  function barBlocks(tabs) {
@@ -3602,18 +3711,18 @@ function Ribbon({
3602
3711
  const count = selectionCount ?? 0;
3603
3712
  const visible = tabs.filter((tab) => !tab.isContextual || count > 0);
3604
3713
  const fallback = visible[0]?.id;
3605
- const [ownTab, setOwnTab] = React24.useState(defaultValue);
3714
+ const [ownTab, setOwnTab] = React25.useState(defaultValue);
3606
3715
  const requested = value ?? ownTab;
3607
3716
  const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;
3608
- const select = React24.useCallback(
3717
+ const select = React25.useCallback(
3609
3718
  (id) => {
3610
3719
  setOwnTab(id);
3611
3720
  onChange?.(id);
3612
3721
  },
3613
3722
  [onChange]
3614
3723
  );
3615
- const hadSelection = React24.useRef(false);
3616
- React24.useEffect(() => {
3724
+ const hadSelection = React25.useRef(false);
3725
+ React25.useEffect(() => {
3617
3726
  const has = count > 0;
3618
3727
  if (has === hadSelection.current) return;
3619
3728
  hadSelection.current = has;
@@ -3622,18 +3731,18 @@ function Ribbon({
3622
3731
  if (has) select(contextual.id);
3623
3732
  else if (requested === contextual.id) select(tabs.find((tab) => !tab.isContextual)?.id ?? "");
3624
3733
  }, [count, tabs, requested, select]);
3625
- const [ownCollapsed, setOwnCollapsed] = React24.useState(false);
3734
+ const [ownCollapsed, setOwnCollapsed] = React25.useState(false);
3626
3735
  const collapsed = isCollapsed ?? ownCollapsed;
3627
- const toggleRef = React24.useRef(null);
3628
- const restoreFocus = React24.useRef(false);
3629
- React24.useLayoutEffect(() => {
3736
+ const toggleRef = React25.useRef(null);
3737
+ const restoreFocus = React25.useRef(false);
3738
+ React25.useLayoutEffect(() => {
3630
3739
  if (!restoreFocus.current) return;
3631
3740
  restoreFocus.current = false;
3632
3741
  toggleRef.current?.focus();
3633
3742
  });
3634
- const bandId = React24.useId();
3635
- const toggle = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3636
- import_react_aria_components31.Button,
3743
+ const bandId = React25.useId();
3744
+ const toggle = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3745
+ import_react_aria_components34.Button,
3637
3746
  {
3638
3747
  ref: toggleRef,
3639
3748
  className: "pire-ribbon-toggle",
@@ -3645,33 +3754,33 @@ function Ribbon({
3645
3754
  setOwnCollapsed(!collapsed);
3646
3755
  onCollapsedChange?.(!collapsed);
3647
3756
  },
3648
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: collapsed ? "chevron-down" : "chevron-up", size: 16 })
3757
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: collapsed ? "chevron-down" : "chevron-up", size: 16 })
3649
3758
  }
3650
3759
  );
3651
3760
  if (collapsed) {
3652
3761
  const blocks = barBlocks(tabs);
3653
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3762
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3654
3763
  Surface,
3655
3764
  {
3656
3765
  className: "pire-ribbon-bar",
3657
3766
  label: rest["aria-label"],
3658
- trailing: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3767
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3659
3768
  actions,
3660
3769
  toggle
3661
3770
  ] }),
3662
3771
  children: [
3663
- leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pire-ribbon-leading", children: leading }) : null,
3664
- blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(React24.Fragment, { children: [
3665
- i > 0 || leading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pire-ribbon-bar-sep" }) : null,
3666
- block.commands.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { command: c, selectionCount: count, inBar: true }, c.key))
3772
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pire-ribbon-leading", children: leading }) : null,
3773
+ blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(React25.Fragment, { children: [
3774
+ i > 0 || leading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-ribbon-bar-sep" }) : null,
3775
+ block.commands.map((c) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Command, { command: c, selectionCount: count, inBar: true }, c.key))
3667
3776
  ] }, block.key))
3668
3777
  ]
3669
3778
  }
3670
3779
  ) });
3671
3780
  }
3672
- 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: [
3673
- /* @__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)(
3674
- import_react_aria_components31.Tab,
3781
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_aria_components34.Tabs, { selectedKey: selected, onSelectionChange: (k) => select(String(k)), children: [
3782
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components34.TabList, { className: "pire-ribbon-tablist", "aria-label": rest["aria-label"], children: visible.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3783
+ import_react_aria_components34.Tab,
3675
3784
  {
3676
3785
  id: tab.id,
3677
3786
  className: "pire-ribbon-tab",
@@ -3680,17 +3789,17 @@ function Ribbon({
3680
3789
  },
3681
3790
  tab.key
3682
3791
  )) }),
3683
- 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)(
3792
+ visible.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components34.TabPanel, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3684
3793
  Surface,
3685
3794
  {
3686
3795
  id: bandId,
3687
3796
  className: "pire-ribbon-band",
3688
3797
  label: msg.ribbonLabel,
3689
- trailing: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3798
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3690
3799
  actions,
3691
3800
  toggle
3692
3801
  ] }),
3693
- children: tab.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Group8, { group, selectionCount: count }, group.key))
3802
+ children: tab.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Group8, { group, selectionCount: count }, group.key))
3694
3803
  }
3695
3804
  ) }, tab.key))
3696
3805
  ] }) });
@@ -3700,7 +3809,7 @@ Ribbon.Group = RibbonGroup;
3700
3809
  Ribbon.Command = RibbonCommand;
3701
3810
 
3702
3811
  // src/components/feedback/InlineMessage.tsx
3703
- var import_jsx_runtime45 = require("react/jsx-runtime");
3812
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3704
3813
  var KIND_ICON = {
3705
3814
  info: "info",
3706
3815
  success: "check-circle-2",
@@ -3718,7 +3827,7 @@ function InlineMessage({
3718
3827
  }) {
3719
3828
  const msg = usePireMessages();
3720
3829
  const assertive = kind === "error" || kind === "warning";
3721
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3830
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3722
3831
  "div",
3723
3832
  {
3724
3833
  className: cx("pire-msg", className),
@@ -3727,21 +3836,21 @@ function InlineMessage({
3727
3836
  "aria-live": assertive ? "assertive" : "polite",
3728
3837
  ...rest,
3729
3838
  children: [
3730
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
3731
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
3732
- title ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "pire-msg-title", children: title }) : null,
3733
- children ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "pire-msg-body", children }) : null,
3839
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
3840
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
3841
+ title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-msg-title", children: title }) : null,
3842
+ children ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-msg-body", children }) : null,
3734
3843
  action
3735
3844
  ] }),
3736
- onClose ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
3845
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
3737
3846
  ]
3738
3847
  }
3739
3848
  );
3740
3849
  }
3741
3850
 
3742
3851
  // src/components/feedback/Toast.tsx
3743
- var React25 = __toESM(require("react"), 1);
3744
- var import_jsx_runtime46 = require("react/jsx-runtime");
3852
+ var React26 = __toESM(require("react"), 1);
3853
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3745
3854
  var KIND_ICON2 = {
3746
3855
  info: "info",
3747
3856
  success: "check-circle-2",
@@ -3757,7 +3866,7 @@ function Toast({
3757
3866
  ...rest
3758
3867
  }) {
3759
3868
  const msg = usePireMessages();
3760
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3869
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3761
3870
  "div",
3762
3871
  {
3763
3872
  className: cx("pire-toast", className),
@@ -3766,22 +3875,22 @@ function Toast({
3766
3875
  "aria-live": kind === "error" ? "assertive" : "polite",
3767
3876
  ...rest,
3768
3877
  children: [
3769
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { name: KIND_ICON2[kind], size: 16 }),
3770
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { flex: 1 }, children }),
3771
- onClose ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
3878
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { name: KIND_ICON2[kind], size: 16 }),
3879
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { style: { flex: 1 }, children }),
3880
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
3772
3881
  ]
3773
3882
  }
3774
3883
  );
3775
3884
  }
3776
- var ToastContext = React25.createContext(null);
3885
+ var ToastContext = React26.createContext(null);
3777
3886
  function ToastProvider({
3778
3887
  children,
3779
3888
  timeout = 6e3
3780
3889
  }) {
3781
3890
  const msg = usePireMessages();
3782
- const [toasts, setToasts] = React25.useState([]);
3783
- const close = React25.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3784
- const add = React25.useCallback(
3891
+ const [toasts, setToasts] = React26.useState([]);
3892
+ const close = React26.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3893
+ const add = React26.useCallback(
3785
3894
  (toast) => {
3786
3895
  const id = Math.random().toString(36).slice(2);
3787
3896
  setToasts((t) => [...t, { ...toast, id }]);
@@ -3791,10 +3900,10 @@ function ToastProvider({
3791
3900
  },
3792
3901
  [close, timeout]
3793
3902
  );
3794
- const value = React25.useMemo(() => ({ add, close }), [add, close]);
3795
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ToastContext.Provider, { value, children: [
3903
+ const value = React26.useMemo(() => ({ add, close }), [add, close]);
3904
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ToastContext.Provider, { value, children: [
3796
3905
  children,
3797
- /* @__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)(
3906
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3798
3907
  Toast,
3799
3908
  {
3800
3909
  kind: t.kind,
@@ -3807,14 +3916,14 @@ function ToastProvider({
3807
3916
  ] });
3808
3917
  }
3809
3918
  function useToast() {
3810
- const ctx = React25.useContext(ToastContext);
3919
+ const ctx = React26.useContext(ToastContext);
3811
3920
  if (!ctx) throw new Error("useToast must be used inside <ToastProvider>");
3812
3921
  return ctx;
3813
3922
  }
3814
3923
 
3815
3924
  // src/components/data/KpiTile.tsx
3816
- var import_react_aria_components32 = require("react-aria-components");
3817
- var import_jsx_runtime47 = require("react/jsx-runtime");
3925
+ var import_react_aria_components35 = require("react-aria-components");
3926
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3818
3927
  function KpiTile({
3819
3928
  label,
3820
3929
  value,
@@ -3830,27 +3939,27 @@ function KpiTile({
3830
3939
  style
3831
3940
  }) {
3832
3941
  const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
3833
- const body = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3834
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "pire-kpi-label", children: [
3835
- icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: icon, size: 16 }) : null,
3942
+ const body = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3943
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "pire-kpi-label", children: [
3944
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: icon, size: 16 }) : null,
3836
3945
  label
3837
3946
  ] }),
3838
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "pire-kpi-value", children: [
3947
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "pire-kpi-value", children: [
3839
3948
  value,
3840
- unit ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-kpi-unit", children: unit }) : null
3949
+ unit ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "pire-kpi-unit", children: unit }) : null
3841
3950
  ] }),
3842
- delta ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
3843
- deltaDirection ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
3951
+ delta ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
3952
+ deltaDirection ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
3844
3953
  delta
3845
3954
  ] }) : null,
3846
- footnote ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "pire-kpi-foot", children: footnote }) : null
3955
+ footnote ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "pire-kpi-foot", children: footnote }) : null
3847
3956
  ] });
3848
3957
  const props = { className: cx("pire-kpi", className), "data-status": status, style };
3849
- return onPress ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria_components32.Button, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ...props, children: body });
3958
+ return onPress ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_aria_components35.Button, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ...props, children: body });
3850
3959
  }
3851
3960
 
3852
3961
  // src/components/data/ObjectHeader.tsx
3853
- var import_jsx_runtime48 = require("react/jsx-runtime");
3962
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3854
3963
  function ObjectHeader({
3855
3964
  title,
3856
3965
  subtitle,
@@ -3862,22 +3971,22 @@ function ObjectHeader({
3862
3971
  className,
3863
3972
  ...rest
3864
3973
  }) {
3865
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("header", { className: cx("pire-objheader", className), ...rest, children: [
3974
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("header", { className: cx("pire-objheader", className), ...rest, children: [
3866
3975
  breadcrumb,
3867
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "pire-objheader-row", children: [
3868
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { style: { minWidth: 0 }, children: [
3869
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h1", { className: "pire-objheader-title", children: title }),
3870
- subtitle || id ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "pire-objheader-sub", children: [
3976
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "pire-objheader-row", children: [
3977
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: { minWidth: 0 }, children: [
3978
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h1", { className: "pire-objheader-title", children: title }),
3979
+ subtitle || id ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "pire-objheader-sub", children: [
3871
3980
  subtitle,
3872
- id ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "pire-objheader-id", children: id }) : null
3981
+ id ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-objheader-id", children: id }) : null
3873
3982
  ] }) : null
3874
3983
  ] }),
3875
3984
  badge,
3876
- actions ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "pire-objheader-actions", children: actions }) : null
3985
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "pire-objheader-actions", children: actions }) : null
3877
3986
  ] }),
3878
- 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: [
3879
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dt", { className: "pire-fact-label", children: fact.label }),
3880
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3987
+ facts?.length ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
3988
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("dt", { className: "pire-fact-label", children: fact.label }),
3989
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3881
3990
  "dd",
3882
3991
  {
3883
3992
  className: "pire-fact-value",
@@ -3891,7 +4000,7 @@ function ObjectHeader({
3891
4000
  }
3892
4001
 
3893
4002
  // src/components/data/FilterBar.tsx
3894
- var import_jsx_runtime49 = require("react/jsx-runtime");
4003
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3895
4004
  function FilterBar({
3896
4005
  children,
3897
4006
  activeFilters = [],
@@ -3908,22 +4017,22 @@ function FilterBar({
3908
4017
  const label = useMessage("filterBarLabel", rest["aria-label"]);
3909
4018
  const go = useMessage("filterBarGo", goLabel);
3910
4019
  const clearAll = useMessage("filterBarClearAll", clearAllLabel);
3911
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
3912
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "pire-filterbar-controls", children: [
4020
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
4021
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "pire-filterbar-controls", children: [
3913
4022
  children,
3914
- onGo ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { variant: "primary", onPress: onGo, children: go }) : null
4023
+ onGo ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { variant: "primary", onPress: onGo, children: go }) : null
3915
4024
  ] }),
3916
- activeFilters.length || resultLabel || actions ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "pire-filterbar-foot", children: [
3917
- activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
3918
- activeFilters.length && onClear ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
3919
- resultLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
3920
- actions ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pire-filterbar-actions", children: actions }) : null
4025
+ activeFilters.length || resultLabel || actions ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "pire-filterbar-foot", children: [
4026
+ activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
4027
+ activeFilters.length && onClear ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
4028
+ resultLabel ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
4029
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pire-filterbar-actions", children: actions }) : null
3921
4030
  ] }) : null
3922
4031
  ] });
3923
4032
  }
3924
4033
 
3925
4034
  // src/components/data/DescriptionList.tsx
3926
- var import_jsx_runtime50 = require("react/jsx-runtime");
4035
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3927
4036
  function DescriptionList({
3928
4037
  items,
3929
4038
  layout = "rows",
@@ -3932,32 +4041,32 @@ function DescriptionList({
3932
4041
  style,
3933
4042
  ...rest
3934
4043
  }) {
3935
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3936
4045
  "dl",
3937
4046
  {
3938
4047
  className: cx("pire-dl", className),
3939
4048
  "data-layout": layout,
3940
4049
  style: { ...layout === "grid" ? { "--pire-dl-cols": columns } : null, ...style },
3941
4050
  ...rest,
3942
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
3943
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("dt", { className: "pire-dl-term", children: [
4051
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
4052
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("dt", { className: "pire-dl-term", children: [
3944
4053
  item.label,
3945
4054
  item.hint
3946
4055
  ] }),
3947
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
4056
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
3948
4057
  ] }, i))
3949
4058
  }
3950
4059
  );
3951
4060
  }
3952
4061
 
3953
4062
  // src/components/data/Timeline.tsx
3954
- var import_jsx_runtime51 = require("react/jsx-runtime");
4063
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3955
4064
  function Timeline({ entries, reverse = false, className, ...rest }) {
3956
4065
  const list = reverse ? [...entries].reverse() : entries;
3957
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("li", { className: "pire-timeline-item", children: [
3958
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-timeline-time", children: entry.time }),
3959
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-timeline-text", children: entry.event }),
3960
- entry.actor ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "pire-timeline-actor", children: entry.actor }) : null
4066
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("li", { className: "pire-timeline-item", children: [
4067
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "pire-timeline-time", children: entry.time }),
4068
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "pire-timeline-text", children: entry.event }),
4069
+ entry.actor ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "pire-timeline-actor", children: entry.actor }) : null
3961
4070
  ] }, entry.id ?? i)) });
3962
4071
  }
3963
4072
 
@@ -4000,10 +4109,10 @@ function seriesColor(series, index) {
4000
4109
  const slot = series.colorIndex ?? index + 1;
4001
4110
  return slot >= 1 && slot <= VIZ_SLOT_COUNT ? `var(--viz-${slot})` : "var(--viz-other)";
4002
4111
  }
4003
- var IS_DEV3 = process.env.NODE_ENV !== "production";
4112
+ var IS_DEV4 = process.env.NODE_ENV !== "production";
4004
4113
  var warnedCharts = /* @__PURE__ */ new Set();
4005
4114
  function warnOnSlotOverflow(series, chartLabel) {
4006
- if (!IS_DEV3 || warnedCharts.has(chartLabel)) return;
4115
+ if (!IS_DEV4 || warnedCharts.has(chartLabel)) return;
4007
4116
  if (series.length <= VIZ_SLOT_COUNT) return;
4008
4117
  warnedCharts.add(chartLabel);
4009
4118
  console.warn(
@@ -4011,7 +4120,7 @@ function warnOnSlotOverflow(series, chartLabel) {
4011
4120
  );
4012
4121
  }
4013
4122
  function warnOnDonutShape(series, categoryCount, chartLabel) {
4014
- if (!IS_DEV3 || warnedCharts.has(`donut:${chartLabel}`)) return;
4123
+ if (!IS_DEV4 || warnedCharts.has(`donut:${chartLabel}`)) return;
4015
4124
  const complaints = [];
4016
4125
  if (series.length > 1) {
4017
4126
  complaints.push(`it has ${series.length} series but a donut draws one \u2014 the rest are ignored`);
@@ -4043,7 +4152,7 @@ function alignToCategories(series, categoryCount) {
4043
4152
  }
4044
4153
 
4045
4154
  // src/components/data/ChartFrame.tsx
4046
- var import_jsx_runtime52 = require("react/jsx-runtime");
4155
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4047
4156
  function seriesLegend(series) {
4048
4157
  return series.map((one, index) => ({
4049
4158
  key: one.id,
@@ -4066,29 +4175,29 @@ function ChartFrame({
4066
4175
  children
4067
4176
  }) {
4068
4177
  const msg = usePireMessages();
4069
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("figure", { className: cx("pire-chart", className), style, children: [
4070
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("figcaption", { className: "pire-chart-head", children: [
4071
- title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-chart-title", children: title }) : null,
4072
- description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-chart-desc", children: description }) : null
4178
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("figure", { className: cx("pire-chart", className), style, children: [
4179
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("figcaption", { className: "pire-chart-head", children: [
4180
+ title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-chart-title", children: title }) : null,
4181
+ description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-chart-desc", children: description }) : null
4073
4182
  ] }) : null,
4074
- legend && legend.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "pire-chart-legend", children: legend.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("li", { className: "pire-chart-legend-item", children: [
4075
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "pire-chart-swatch", style: { background: item.color } }),
4183
+ legend && legend.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: "pire-chart-legend", children: legend.map((item) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("li", { className: "pire-chart-legend-item", children: [
4184
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-chart-swatch", style: { background: item.color } }),
4076
4185
  item.label
4077
4186
  ] }, item.key)) }) : null,
4078
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pire-chart-plot", "aria-hidden": "true", children }),
4079
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: showDataTable ? "pire-chart-table" : "pire-sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("table", { children: [
4080
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("caption", { children: label }),
4081
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("tr", { children: [
4082
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("th", { scope: "col", children: msg.chartCategoryHeader }),
4083
- series.map((one) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("th", { scope: "col", children: one.label }, one.id))
4187
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "pire-chart-plot", "aria-hidden": "true", children }),
4188
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: showDataTable ? "pire-chart-table" : "pire-sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("table", { children: [
4189
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("caption", { children: label }),
4190
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("tr", { children: [
4191
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("th", { scope: "col", children: msg.chartCategoryHeader }),
4192
+ series.map((one) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("th", { scope: "col", children: one.label }, one.id))
4084
4193
  ] }) }),
4085
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("tbody", { children: categories.map((category, categoryIndex) => (
4194
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tbody", { children: categories.map((category, categoryIndex) => (
4086
4195
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4087
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("tr", { children: [
4088
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("th", { scope: "row", children: category }),
4196
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("tr", { children: [
4197
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("th", { scope: "row", children: category }),
4089
4198
  series.map((one) => {
4090
4199
  const value = one.values[categoryIndex];
4091
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("td", { children: value == null ? msg.chartNoValue : formatValue(value) }, one.id);
4200
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { children: value == null ? msg.chartNoValue : formatValue(value) }, one.id);
4092
4201
  })
4093
4202
  ] }, categoryIndex)
4094
4203
  )) })
@@ -4097,7 +4206,7 @@ function ChartFrame({
4097
4206
  }
4098
4207
 
4099
4208
  // src/components/data/BarChart.tsx
4100
- var import_jsx_runtime53 = require("react/jsx-runtime");
4209
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4101
4210
  function BarChart({
4102
4211
  categories,
4103
4212
  series: rawSeries,
@@ -4129,7 +4238,7 @@ function BarChart({
4129
4238
  const value = series[0].values[categoryIndex];
4130
4239
  return value == null ? msg.chartNoValue : formatValue(value);
4131
4240
  };
4132
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4241
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4133
4242
  ChartFrame,
4134
4243
  {
4135
4244
  label,
@@ -4142,7 +4251,7 @@ function BarChart({
4142
4251
  showDataTable,
4143
4252
  className,
4144
4253
  style,
4145
- children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4254
+ children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4146
4255
  "div",
4147
4256
  {
4148
4257
  className: "pire-chart-bars",
@@ -4151,12 +4260,12 @@ function BarChart({
4151
4260
  style: { "--pire-chart-height": `${height}px` },
4152
4261
  children: categories.map((category, categoryIndex) => (
4153
4262
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4154
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "pire-chart-group", children: [
4155
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "pire-chart-cat", children: category }),
4156
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "pire-chart-track", children: series.map((one, seriesIndex) => {
4263
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "pire-chart-group", children: [
4264
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "pire-chart-cat", children: category }),
4265
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "pire-chart-track", children: series.map((one, seriesIndex) => {
4157
4266
  const value = one.values[categoryIndex];
4158
4267
  if (value == null) return null;
4159
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4268
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4160
4269
  "div",
4161
4270
  {
4162
4271
  className: "pire-chart-bar",
@@ -4165,8 +4274,8 @@ function BarChart({
4165
4274
  "--pire-bar-color": seriesColor(one, seriesIndex)
4166
4275
  },
4167
4276
  children: [
4168
- withValues && orientation === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "pire-chart-barval", children: formatValue(value) }) : null,
4169
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
4277
+ withValues && orientation === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "pire-chart-barval", children: formatValue(value) }) : null,
4278
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
4170
4279
  series.length > 1 ? `${one.label}: ` : "",
4171
4280
  formatValue(value)
4172
4281
  ] })
@@ -4175,7 +4284,7 @@ function BarChart({
4175
4284
  one.id
4176
4285
  );
4177
4286
  }) }),
4178
- withValues && orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "pire-chart-val", children: horizontalLabelFor(categoryIndex) }) : null
4287
+ withValues && orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "pire-chart-val", children: horizontalLabelFor(categoryIndex) }) : null
4179
4288
  ] }, categoryIndex)
4180
4289
  ))
4181
4290
  }
@@ -4185,14 +4294,14 @@ function BarChart({
4185
4294
  }
4186
4295
 
4187
4296
  // src/components/data/LineChart.tsx
4188
- var React26 = __toESM(require("react"), 1);
4189
- var import_jsx_runtime54 = require("react/jsx-runtime");
4297
+ var React27 = __toESM(require("react"), 1);
4298
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4190
4299
  var PLOT_INSET = { top: 10, right: 14, bottom: 24, left: 58 };
4191
4300
  var MARKER_LIMIT = 20;
4192
- var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React26.useEffect : React26.useLayoutEffect;
4301
+ var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React27.useEffect : React27.useLayoutEffect;
4193
4302
  function useMeasuredWidth() {
4194
- const ref = React26.useRef(null);
4195
- const [width, setWidth] = React26.useState(0);
4303
+ const ref = React27.useRef(null);
4304
+ const [width, setWidth] = React27.useState(0);
4196
4305
  useIsomorphicLayoutEffect2(() => {
4197
4306
  const element = ref.current;
4198
4307
  if (!element) return;
@@ -4253,7 +4362,7 @@ function LineChart({
4253
4362
  return `M${xAt(present[0].index)} ${baseline} L${line} L${xAt(last.index)} ${baseline} Z`;
4254
4363
  };
4255
4364
  const labelEvery = Math.max(1, Math.ceil(categories.length / Math.max(2, Math.floor(innerWidth / 64))));
4256
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4365
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4257
4366
  ChartFrame,
4258
4367
  {
4259
4368
  label,
@@ -4266,8 +4375,8 @@ function LineChart({
4266
4375
  showDataTable,
4267
4376
  className,
4268
4377
  style,
4269
- children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "pire-chart-lines", ref: plotRef, style: { height }, children: [
4270
- width > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4378
+ children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "pire-chart-lines", ref: plotRef, style: { height }, children: [
4379
+ width > 0 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4271
4380
  "svg",
4272
4381
  {
4273
4382
  width,
@@ -4276,7 +4385,7 @@ function LineChart({
4276
4385
  "aria-hidden": "true",
4277
4386
  focusable: "false",
4278
4387
  children: [
4279
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { className: "pire-chart-grid", children: scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4388
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("g", { className: "pire-chart-grid", children: scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4280
4389
  "line",
4281
4390
  {
4282
4391
  x1: PLOT_INSET.left,
@@ -4286,8 +4395,8 @@ function LineChart({
4286
4395
  },
4287
4396
  tick
4288
4397
  )) }),
4289
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("g", { className: "pire-chart-tick", children: [
4290
- scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4398
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("g", { className: "pire-chart-tick", children: [
4399
+ scale.ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4291
4400
  "text",
4292
4401
  {
4293
4402
  x: PLOT_INSET.left - 8,
@@ -4301,11 +4410,11 @@ function LineChart({
4301
4410
  categories.map(
4302
4411
  (category, index) => index % labelEvery === 0 ? (
4303
4412
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4304
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
4413
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
4305
4414
  ) : null
4306
4415
  )
4307
4416
  ] }),
4308
- showArea && series[0] ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4417
+ showArea && series[0] ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4309
4418
  "path",
4310
4419
  {
4311
4420
  d: areaFor(series[0].values),
@@ -4313,10 +4422,10 @@ function LineChart({
4313
4422
  style: { fill: seriesColor(series[0], 0) }
4314
4423
  }
4315
4424
  ) : null,
4316
- /* @__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)) }),
4317
- withMarkers ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { className: "pire-chart-marker", children: series.map(
4425
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
4426
+ withMarkers ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("g", { className: "pire-chart-marker", children: series.map(
4318
4427
  (one, seriesIndex) => one.values.map(
4319
- (value, index) => value == null ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4428
+ (value, index) => value == null ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4320
4429
  "circle",
4321
4430
  {
4322
4431
  cx: xAt(index),
@@ -4331,7 +4440,7 @@ function LineChart({
4331
4440
  ]
4332
4441
  }
4333
4442
  ) : null,
4334
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4443
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4335
4444
  "div",
4336
4445
  {
4337
4446
  className: "pire-chart-hover",
@@ -4340,11 +4449,11 @@ function LineChart({
4340
4449
  },
4341
4450
  children: categories.map((category, categoryIndex) => (
4342
4451
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4343
- /* @__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: [
4344
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: category }),
4452
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "pire-chart-band", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "pire-chart-tip", role: "presentation", children: [
4453
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("strong", { children: category }),
4345
4454
  series.map((one) => {
4346
4455
  const value = one.values[categoryIndex];
4347
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "pire-chart-tip-row", children: [
4456
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "pire-chart-tip-row", children: [
4348
4457
  one.label,
4349
4458
  ": ",
4350
4459
  value == null ? "No data" : formatValue(value)
@@ -4360,8 +4469,8 @@ function LineChart({
4360
4469
  }
4361
4470
 
4362
4471
  // src/components/data/DonutChart.tsx
4363
- var React27 = __toESM(require("react"), 1);
4364
- var import_jsx_runtime55 = require("react/jsx-runtime");
4472
+ var React28 = __toESM(require("react"), 1);
4473
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4365
4474
  var SEGMENT_GAP_DEGREES = 1.5;
4366
4475
  function DonutChart({
4367
4476
  categories,
@@ -4381,7 +4490,7 @@ function DonutChart({
4381
4490
  }) {
4382
4491
  const label = rest["aria-label"];
4383
4492
  const msg = usePireMessages();
4384
- const [hoveredIndex, setHoveredIndex] = React27.useState(null);
4493
+ const [hoveredIndex, setHoveredIndex] = React28.useState(null);
4385
4494
  warnOnDonutShape(series, categories.length, label);
4386
4495
  const values = (series[0]?.values ?? []).slice(0, categories.length);
4387
4496
  const segments = categories.map((category, index) => ({ category, index, value: values[index] ?? 0 })).filter((segment) => segment.value > 0);
@@ -4398,7 +4507,7 @@ function DonutChart({
4398
4507
  }));
4399
4508
  const hovered = hoveredIndex == null ? null : segments.find((segment) => segment.index === hoveredIndex) ?? null;
4400
4509
  let arcStart = 0;
4401
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4510
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4402
4511
  ChartFrame,
4403
4512
  {
4404
4513
  label,
@@ -4411,8 +4520,8 @@ function DonutChart({
4411
4520
  showDataTable,
4412
4521
  className,
4413
4522
  style,
4414
- children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "pire-chart-donut", style: { height: size }, children: [
4415
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4523
+ children: !hasData ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "pire-chart-donut", style: { height: size }, children: [
4524
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4416
4525
  "svg",
4417
4526
  {
4418
4527
  width: size,
@@ -4420,13 +4529,13 @@ function DonutChart({
4420
4529
  "aria-hidden": "true",
4421
4530
  focusable: "false",
4422
4531
  onMouseLeave: () => setHoveredIndex(null),
4423
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: segments.map((segment) => {
4532
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: segments.map((segment) => {
4424
4533
  const arcLength = segment.value / total * circumference;
4425
4534
  const offset = arcStart;
4426
4535
  arcStart += arcLength;
4427
4536
  return (
4428
4537
  // biome-ignore lint/a11y/noStaticElementInteractions: pointer-only enhancement inside an aria-hidden plot — the arcs carry nothing the data table does not, so there is nothing here for a keyboard to reach.
4429
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4538
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4430
4539
  "circle",
4431
4540
  {
4432
4541
  className: "pire-chart-arc",
@@ -4446,9 +4555,9 @@ function DonutChart({
4446
4555
  }) })
4447
4556
  }
4448
4557
  ),
4449
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "pire-chart-donut-center", style: { width: size - thickness * 2 - 8 }, children: [
4450
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-chart-donut-value", children: hovered ? formatValue(hovered.value) : centerLabel ?? formatValue(total) }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "pire-chart-donut-caption", children: hovered ? hovered.category : centerCaption })
4558
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "pire-chart-donut-center", style: { width: size - thickness * 2 - 8 }, children: [
4559
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "pire-chart-donut-value", children: hovered ? formatValue(hovered.value) : centerLabel ?? formatValue(total) }),
4560
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "pire-chart-donut-caption", children: hovered ? hovered.category : centerCaption })
4452
4561
  ] })
4453
4562
  ] })
4454
4563
  }
@@ -4459,15 +4568,15 @@ function colorForSegment(index) {
4459
4568
  }
4460
4569
 
4461
4570
  // src/components/data/LinkList.tsx
4462
- var import_react_aria_components33 = require("react-aria-components");
4463
- var import_jsx_runtime56 = require("react/jsx-runtime");
4571
+ var import_react_aria_components36 = require("react-aria-components");
4572
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4464
4573
  function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
4465
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: cx("pire-linklist", className), role: "list", "data-emphasis": emphasis, ...rest, children: items.map((item) => {
4466
- const keySlot = item.key ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "pire-linklist-key", children: item.key }) : null;
4467
- const textSlot = item.text ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "pire-linklist-text", children: item.text }) : null;
4574
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: cx("pire-linklist", className), role: "list", "data-emphasis": emphasis, ...rest, children: items.map((item) => {
4575
+ const keySlot = item.key ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-linklist-key", children: item.key }) : null;
4576
+ const textSlot = item.text ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-linklist-text", children: item.text }) : null;
4468
4577
  const [first, second] = emphasis === "text" ? [textSlot, keySlot] : [keySlot, textSlot];
4469
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "listitem", className: "pire-linklist-row", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_aria_components33.Button, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
4470
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
4578
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { role: "listitem", className: "pire-linklist-row", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_aria_components36.Button, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
4579
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
4471
4580
  first,
4472
4581
  second,
4473
4582
  item.trailing
@@ -4476,7 +4585,7 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
4476
4585
  }
4477
4586
 
4478
4587
  // src/components/data/RecordCard.tsx
4479
- var import_jsx_runtime57 = require("react/jsx-runtime");
4588
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4480
4589
  function RecordCard({
4481
4590
  title,
4482
4591
  subtitle,
@@ -4486,27 +4595,27 @@ function RecordCard({
4486
4595
  className,
4487
4596
  ...rest
4488
4597
  }) {
4489
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4598
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
4490
4599
  "div",
4491
4600
  {
4492
4601
  className: cx("pire-recordcard", className),
4493
4602
  "data-disabled": isDisabled ? "true" : void 0,
4494
4603
  ...rest,
4495
4604
  children: [
4496
- 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,
4497
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "pire-recordcard-body", children: [
4498
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-title", children: title }),
4499
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4605
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: icon, size: 20 }) }) : null,
4606
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "pire-recordcard-body", children: [
4607
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "pire-recordcard-title", children: title }),
4608
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4500
4609
  ] }),
4501
- action ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "pire-recordcard-action", children: action }) : null
4610
+ action ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "pire-recordcard-action", children: action }) : null
4502
4611
  ]
4503
4612
  }
4504
4613
  );
4505
4614
  }
4506
4615
 
4507
4616
  // src/components/data/ViewSwitcher.tsx
4508
- var import_react_aria_components34 = require("react-aria-components");
4509
- var import_jsx_runtime58 = require("react/jsx-runtime");
4617
+ var import_react_aria_components37 = require("react-aria-components");
4618
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4510
4619
  function ViewSwitcher({
4511
4620
  name,
4512
4621
  isDirty,
@@ -4519,8 +4628,8 @@ function ViewSwitcher({
4519
4628
  }) {
4520
4629
  const msg = usePireMessages();
4521
4630
  const label = ariaLabel ?? (isDirty ? msg.viewSwitcherNameModified.replace("{view}", name) : msg.viewSwitcherName.replace("{view}", name));
4522
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4523
- import_react_aria_components34.Button,
4631
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
4632
+ import_react_aria_components37.Button,
4524
4633
  {
4525
4634
  className: cx("pire-viewswitcher", className),
4526
4635
  style,
@@ -4528,36 +4637,36 @@ function ViewSwitcher({
4528
4637
  isDisabled,
4529
4638
  onPress,
4530
4639
  children: [
4531
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: icon, size: 16 }),
4532
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "pire-viewswitcher-name", children: name }),
4533
- isDirty ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "pire-viewswitcher-dirty", "aria-hidden": "true", children: msg.viewSwitcherModifiedMark }) : null,
4534
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "chevron-down", size: 16 })
4640
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: icon, size: 16 }),
4641
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "pire-viewswitcher-name", children: name }),
4642
+ isDirty ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "pire-viewswitcher-dirty", "aria-hidden": "true", children: msg.viewSwitcherModifiedMark }) : null,
4643
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "chevron-down", size: 16 })
4535
4644
  ]
4536
4645
  }
4537
4646
  );
4538
4647
  }
4539
4648
 
4540
4649
  // src/components/data/BarList.tsx
4541
- var import_jsx_runtime59 = require("react/jsx-runtime");
4650
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4542
4651
  function BarList({ items, max, className, ...rest }) {
4543
4652
  const scale = max ?? Math.max(0, ...items.map((i) => i.value));
4544
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { ...rest, className: cx("pire-barlist", className), children: items.map((item) => {
4653
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("ul", { ...rest, className: cx("pire-barlist", className), children: items.map((item) => {
4545
4654
  const pct = scale > 0 ? Math.max(0, Math.min(100, item.value / scale * 100)) : 0;
4546
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("li", { className: "pire-barlist-row", "data-tone": item.tone, children: [
4547
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "pire-barlist-main", children: [
4548
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-barlist-label", children: item.label }),
4549
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-barlist-track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-barlist-fill", style: { width: `${pct}%` } }) })
4655
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("li", { className: "pire-barlist-row", "data-tone": item.tone, children: [
4656
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "pire-barlist-main", children: [
4657
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-barlist-label", children: item.label }),
4658
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-barlist-track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-barlist-fill", style: { width: `${pct}%` } }) })
4550
4659
  ] }),
4551
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "pire-barlist-figure", children: [
4552
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-barlist-value", children: item.valueLabel ?? String(item.value) }),
4553
- item.hint ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "pire-barlist-hint", children: item.hint }) : null
4660
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "pire-barlist-figure", children: [
4661
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-barlist-value", children: item.valueLabel ?? String(item.value) }),
4662
+ item.hint ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-barlist-hint", children: item.hint }) : null
4554
4663
  ] })
4555
4664
  ] }, item.id);
4556
4665
  }) });
4557
4666
  }
4558
4667
 
4559
4668
  // src/components/layout/PageBand.tsx
4560
- var import_jsx_runtime60 = require("react/jsx-runtime");
4669
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4561
4670
  function PageBand({
4562
4671
  surface = "card",
4563
4672
  hasBorder = true,
@@ -4565,7 +4674,7 @@ function PageBand({
4565
4674
  className,
4566
4675
  ...rest
4567
4676
  }) {
4568
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4677
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4569
4678
  "div",
4570
4679
  {
4571
4680
  className: cx("pire-pageband", className),
@@ -4578,29 +4687,29 @@ function PageBand({
4578
4687
  }
4579
4688
 
4580
4689
  // src/components/layout/PageHeader.tsx
4581
- var import_jsx_runtime61 = require("react/jsx-runtime");
4690
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4582
4691
  function PageHeader({ title, subtitle, actions, className, ...rest }) {
4583
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("header", { className: cx("pire-pageheader", className), ...rest, children: [
4584
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { style: { minWidth: 0 }, children: [
4585
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h1", { className: "pire-pageheader-title", children: title }),
4586
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "pire-pageheader-sub", children: subtitle }) : null
4692
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("header", { className: cx("pire-pageheader", className), ...rest, children: [
4693
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { style: { minWidth: 0 }, children: [
4694
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("h1", { className: "pire-pageheader-title", children: title }),
4695
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "pire-pageheader-sub", children: subtitle }) : null
4587
4696
  ] }),
4588
- actions ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "pire-pageheader-actions", children: actions }) : null
4697
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "pire-pageheader-actions", children: actions }) : null
4589
4698
  ] });
4590
4699
  }
4591
4700
 
4592
4701
  // src/components/layout/SectionHeader.tsx
4593
- var import_jsx_runtime62 = require("react/jsx-runtime");
4702
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4594
4703
  function SectionHeader({ title, meta, actions, className, ...rest }) {
4595
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cx("pire-sectionhead", className), ...rest, children: [
4596
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "pire-eyebrow", children: title }),
4597
- meta ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
4598
- actions ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "pire-sectionhead-actions", children: actions }) : null
4704
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: cx("pire-sectionhead", className), ...rest, children: [
4705
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "pire-eyebrow", children: title }),
4706
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
4707
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "pire-sectionhead-actions", children: actions }) : null
4599
4708
  ] });
4600
4709
  }
4601
4710
 
4602
4711
  // src/components/layout/SelectionBar.tsx
4603
- var import_jsx_runtime63 = require("react/jsx-runtime");
4712
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4604
4713
  function SelectionBar({
4605
4714
  count,
4606
4715
  noun = "record",
@@ -4610,31 +4719,31 @@ function SelectionBar({
4610
4719
  ...rest
4611
4720
  }) {
4612
4721
  if (!count) return null;
4613
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
4614
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "pire-selectionbar-count", children: [
4722
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
4723
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "pire-selectionbar-count", children: [
4615
4724
  count.toLocaleString(),
4616
4725
  " ",
4617
4726
  noun,
4618
4727
  count === 1 ? "" : "s",
4619
4728
  " selected"
4620
4729
  ] }),
4621
- children ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
4622
- actions ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "pire-selectionbar-actions", children: actions }) : null
4730
+ children ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
4731
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "pire-selectionbar-actions", children: actions }) : null
4623
4732
  ] });
4624
4733
  }
4625
4734
 
4626
4735
  // src/components/layout/FooterBar.tsx
4627
- var import_jsx_runtime64 = require("react/jsx-runtime");
4736
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4628
4737
  function FooterBar({ note, actions, children, className, ...rest }) {
4629
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("footer", { className: cx("pire-footerbar", className), ...rest, children: [
4630
- note ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "pire-footerbar-note", children: note }) : null,
4738
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("footer", { className: cx("pire-footerbar", className), ...rest, children: [
4739
+ note ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "pire-footerbar-note", children: note }) : null,
4631
4740
  children,
4632
- actions ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "pire-footerbar-actions", children: actions }) : null
4741
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "pire-footerbar-actions", children: actions }) : null
4633
4742
  ] });
4634
4743
  }
4635
4744
 
4636
4745
  // src/components/layout/SplitPane.tsx
4637
- var import_jsx_runtime65 = require("react/jsx-runtime");
4746
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4638
4747
  function SplitPane({
4639
4748
  list,
4640
4749
  detail,
@@ -4650,7 +4759,7 @@ function SplitPane({
4650
4759
  }) {
4651
4760
  const msg = usePireMessages();
4652
4761
  const width = typeof listWidth === "number" ? `${listWidth}px` : listWidth;
4653
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4762
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
4654
4763
  "div",
4655
4764
  {
4656
4765
  className: cx("pire-split", className),
@@ -4658,10 +4767,10 @@ function SplitPane({
4658
4767
  style: { ["--pire-split-list-w"]: width, ...style },
4659
4768
  ...rest,
4660
4769
  children: [
4661
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("section", { className: "pire-split-list", "aria-label": listLabel ?? msg.splitPaneList, children: list }),
4662
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: "pire-split-detail", "aria-label": detailLabel ?? msg.splitPaneDetail, children: [
4663
- onBack ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "pire-split-back", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Button, { variant: "tertiary", size: "sm", icon: "arrow-left", onPress: onBack, children: backLabel ?? msg.splitPaneBack }) }) : null,
4664
- detail ?? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "pire-split-empty", children: emptyDetail })
4770
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("section", { className: "pire-split-list", "aria-label": listLabel ?? msg.splitPaneList, children: list }),
4771
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("section", { className: "pire-split-detail", "aria-label": detailLabel ?? msg.splitPaneDetail, children: [
4772
+ onBack ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-split-back", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "tertiary", size: "sm", icon: "arrow-left", onPress: onBack, children: backLabel ?? msg.splitPaneBack }) }) : null,
4773
+ detail ?? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-split-empty", children: emptyDetail })
4665
4774
  ] })
4666
4775
  ]
4667
4776
  }
@@ -4669,7 +4778,7 @@ function SplitPane({
4669
4778
  }
4670
4779
 
4671
4780
  // src/components/patterns/ConfirmDialog.tsx
4672
- var import_jsx_runtime66 = require("react/jsx-runtime");
4781
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4673
4782
  function ConfirmDialog({
4674
4783
  isOpen,
4675
4784
  title,
@@ -4685,7 +4794,7 @@ function ConfirmDialog({
4685
4794
  onCancel
4686
4795
  }) {
4687
4796
  const msg = usePireMessages();
4688
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4797
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
4689
4798
  Dialog,
4690
4799
  {
4691
4800
  isOpen,
@@ -4695,9 +4804,9 @@ function ConfirmDialog({
4695
4804
  onClose: onCancel,
4696
4805
  isDismissable: !isBusy,
4697
4806
  showClose: false,
4698
- footer: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
4699
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
4700
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
4807
+ footer: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
4808
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
4809
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
4701
4810
  ] }),
4702
4811
  children: [
4703
4812
  facts?.length ? (
@@ -4705,9 +4814,9 @@ function ConfirmDialog({
4705
4814
  // *prohibits* `aria-label` — the label named nothing at all, and axe's
4706
4815
  // `aria-prohibited-attr` fails it on sight. Every other labelled div/span in this library
4707
4816
  // pairs with an explicit role for the same reason.
4708
- /* @__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 }) })
4817
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "pire-confirm-facts", role: "group", "aria-label": msg.confirmDialogFactsLabel, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DescriptionList, { layout: "rows", items: facts }) })
4709
4818
  ) : null,
4710
- consequence ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4819
+ consequence ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4711
4820
  InlineMessage,
4712
4821
  {
4713
4822
  kind: tone === "danger" ? "error" : "warning",
@@ -4722,9 +4831,9 @@ function ConfirmDialog({
4722
4831
  }
4723
4832
 
4724
4833
  // src/components/patterns/CommandPalette.tsx
4725
- var React28 = __toESM(require("react"), 1);
4726
- var import_react_aria_components35 = require("react-aria-components");
4727
- var import_jsx_runtime67 = require("react/jsx-runtime");
4834
+ var React29 = __toESM(require("react"), 1);
4835
+ var import_react_aria_components38 = require("react-aria-components");
4836
+ var import_jsx_runtime70 = require("react/jsx-runtime");
4728
4837
  var RESULTS_SECTION_KEY = "__pire_results__";
4729
4838
  var searchableText = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
4730
4839
  function CommandPalette({
@@ -4745,17 +4854,17 @@ function CommandPalette({
4745
4854
  style
4746
4855
  }) {
4747
4856
  const msg = usePireMessages();
4748
- const [query, setQuery] = React28.useState("");
4749
- const { contains } = (0, import_react_aria_components35.useFilter)({ sensitivity: "base" });
4750
- React28.useEffect(() => {
4857
+ const [query, setQuery] = React29.useState("");
4858
+ const { contains } = (0, import_react_aria_components38.useFilter)({ sensitivity: "base" });
4859
+ React29.useEffect(() => {
4751
4860
  if (isOpen) setQuery("");
4752
4861
  }, [isOpen]);
4753
- const searchableById = React28.useMemo(() => {
4862
+ const searchableById = React29.useMemo(() => {
4754
4863
  const byId = /* @__PURE__ */ new Map();
4755
4864
  for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
4756
4865
  return byId;
4757
4866
  }, [groups]);
4758
- const filter = React28.useCallback(
4867
+ const filter = React29.useCallback(
4759
4868
  (textValue, inputValue, node) => {
4760
4869
  if (node.parentKey === RESULTS_SECTION_KEY) return true;
4761
4870
  return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
@@ -4768,8 +4877,8 @@ function CommandPalette({
4768
4877
  };
4769
4878
  const sections = [...groups, ...resultsGroup ? [{ ...resultsGroup, id: RESULTS_SECTION_KEY }] : []];
4770
4879
  const status = isLoading ? loadingLabel ?? msg.commandPaletteLoading : emptyLabel ?? msg.commandPaletteEmpty;
4771
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4772
- import_react_aria_components35.ModalOverlay,
4880
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4881
+ import_react_aria_components38.ModalOverlay,
4773
4882
  {
4774
4883
  className: "pire-cp-overlay",
4775
4884
  isOpen,
@@ -4777,12 +4886,12 @@ function CommandPalette({
4777
4886
  onOpenChange: (open) => {
4778
4887
  if (!open) onOpenChange?.(false);
4779
4888
  },
4780
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_aria_components35.Modal, { className: cx("pire-cp-modal", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react_aria_components35.Dialog, { className: "pire-cp-dialog", "aria-label": ariaLabel ?? msg.commandPaletteLabel, children: [
4781
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react_aria_components35.Autocomplete, { filter, inputValue: query, onInputChange: handleInputChange, children: [
4782
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react_aria_components35.SearchField, { className: "pire-cp-search", "aria-label": msg.commandPaletteSearchLabel, children: [
4783
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: "search", size: 18, className: "pire-cp-search-icon" }),
4784
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4785
- import_react_aria_components35.Input,
4889
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_aria_components38.Modal, { className: cx("pire-cp-modal", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react_aria_components38.Dialog, { className: "pire-cp-dialog", "aria-label": ariaLabel ?? msg.commandPaletteLabel, children: [
4890
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react_aria_components38.Autocomplete, { filter, inputValue: query, onInputChange: handleInputChange, children: [
4891
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react_aria_components38.SearchField, { className: "pire-cp-search", "aria-label": msg.commandPaletteSearchLabel, children: [
4892
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { name: "search", size: 18, className: "pire-cp-search-icon" }),
4893
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4894
+ import_react_aria_components38.Input,
4786
4895
  {
4787
4896
  className: "pire-cp-input",
4788
4897
  autoFocus: true,
@@ -4790,16 +4899,16 @@ function CommandPalette({
4790
4899
  }
4791
4900
  )
4792
4901
  ] }),
4793
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "pire-cp-loading", role: "status", "aria-live": "polite", children: loadingLabel ?? msg.commandPaletteLoading }) : null,
4794
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4795
- import_react_aria_components35.Menu,
4902
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "pire-cp-loading", role: "status", "aria-live": "polite", children: loadingLabel ?? msg.commandPaletteLoading }) : null,
4903
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4904
+ import_react_aria_components38.Menu,
4796
4905
  {
4797
4906
  className: "pire-cp-list",
4798
4907
  onAction: (key) => onAction?.(String(key)),
4799
- renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "pire-cp-status", children: status }),
4800
- children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react_aria_components35.MenuSection, { id: section.id, className: "pire-cp-section", children: [
4801
- section.label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_aria_components35.Header, { className: "pire-cp-section-title", children: section.label }) : null,
4802
- section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4908
+ renderEmptyState: () => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "pire-cp-status", children: status }),
4909
+ children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_react_aria_components38.MenuSection, { id: section.id, className: "pire-cp-section", children: [
4910
+ section.label ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_aria_components38.Header, { className: "pire-cp-section-title", children: section.label }) : null,
4911
+ section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4803
4912
  MenuItem,
4804
4913
  {
4805
4914
  id: item.id,
@@ -4820,18 +4929,18 @@ function CommandPalette({
4820
4929
  // aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen
4821
4930
  // reader already announces the listbox semantics that make those keys work, so reading
4822
4931
  // "up arrow down arrow navigate" out loud is noise on every open.
4823
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
4824
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "pire-cp-hint", children: [
4825
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Kbd, { children: "\u2191" }),
4826
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Kbd, { children: "\u2193" }),
4932
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
4933
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "pire-cp-hint", children: [
4934
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Kbd, { children: "\u2191" }),
4935
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Kbd, { children: "\u2193" }),
4827
4936
  msg.commandPaletteHintNavigate
4828
4937
  ] }),
4829
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "pire-cp-hint", children: [
4830
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Kbd, { children: "\u21B5" }),
4938
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "pire-cp-hint", children: [
4939
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Kbd, { children: "\u21B5" }),
4831
4940
  msg.commandPaletteHintSelect
4832
4941
  ] }),
4833
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "pire-cp-hint", children: [
4834
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Kbd, { children: "esc" }),
4942
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "pire-cp-hint", children: [
4943
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Kbd, { children: "esc" }),
4835
4944
  msg.commandPaletteHintClose
4836
4945
  ] })
4837
4946
  ] }) })
@@ -4841,9 +4950,9 @@ function CommandPalette({
4841
4950
  );
4842
4951
  }
4843
4952
  function useCommandPaletteShortcut(onTrigger, { key = "k", isDisabled } = {}) {
4844
- const handler = React28.useRef(onTrigger);
4953
+ const handler = React29.useRef(onTrigger);
4845
4954
  handler.current = onTrigger;
4846
- React28.useEffect(() => {
4955
+ React29.useEffect(() => {
4847
4956
  if (isDisabled) return;
4848
4957
  const onKeyDown = (event) => {
4849
4958
  if (!(event.metaKey || event.ctrlKey) || event.altKey) return;
@@ -4857,9 +4966,9 @@ function useCommandPaletteShortcut(onTrigger, { key = "k", isDisabled } = {}) {
4857
4966
  }
4858
4967
 
4859
4968
  // src/components/patterns/AppLauncher.tsx
4860
- var React29 = __toESM(require("react"), 1);
4861
- var import_react_aria_components36 = require("react-aria-components");
4862
- var import_jsx_runtime68 = require("react/jsx-runtime");
4969
+ var React30 = __toESM(require("react"), 1);
4970
+ var import_react_aria_components39 = require("react-aria-components");
4971
+ var import_jsx_runtime71 = require("react/jsx-runtime");
4863
4972
  var searchableText2 = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
4864
4973
  function AppLauncher({
4865
4974
  sections,
@@ -4878,13 +4987,13 @@ function AppLauncher({
4878
4987
  className
4879
4988
  }) {
4880
4989
  const msg = usePireMessages();
4881
- const [query, setQuery] = React29.useState("");
4882
- const { contains } = (0, import_react_aria_components36.useFilter)({ sensitivity: "base" });
4990
+ const [query, setQuery] = React30.useState("");
4991
+ const { contains } = (0, import_react_aria_components39.useFilter)({ sensitivity: "base" });
4883
4992
  const handleSearch = (next) => {
4884
4993
  setQuery(next);
4885
4994
  onSearchChange?.(next);
4886
4995
  };
4887
- const visible = React29.useMemo(() => {
4996
+ const visible = React30.useMemo(() => {
4888
4997
  if (isFilteredExternally) return sections;
4889
4998
  const q = query.trim();
4890
4999
  if (!q) return sections;
@@ -4895,25 +5004,25 @@ function AppLauncher({
4895
5004
  }, [sections, query, isFilteredExternally, contains]);
4896
5005
  const isEmpty = !isLoading && visible.length === 0;
4897
5006
  const label = ariaLabel ?? msg.appLauncherLabel;
4898
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react_aria_components36.DialogTrigger, { children: [
4899
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_aria_components36.Button, { className: "pire-launcher-trigger", "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: icon, size: 20 }) }),
4900
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4901
- import_react_aria_components36.Popover,
5007
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react_aria_components39.DialogTrigger, { children: [
5008
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_aria_components39.Button, { className: "pire-launcher-trigger", "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon, { name: icon, size: 20 }) }),
5009
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5010
+ import_react_aria_components39.Popover,
4902
5011
  {
4903
5012
  className: cx("pire-launcher-popover", className),
4904
5013
  placement: "bottom start",
4905
5014
  offset: 0,
4906
5015
  crossOffset: 0,
4907
5016
  containerPadding: 0,
4908
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_aria_components36.Dialog, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
4909
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "pire-launcher-head", children: [
4910
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-title", children: title ?? msg.appLauncherTitle }),
4911
- meta ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-meta", children: meta }) : null
5017
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_aria_components39.Dialog, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
5018
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "pire-launcher-head", children: [
5019
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "pire-launcher-title", children: title ?? msg.appLauncherTitle }),
5020
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "pire-launcher-meta", children: meta }) : null
4912
5021
  ] }),
4913
5022
  isSearchable ? (
4914
5023
  // autoFocus is right here specifically: the panel exists to be searched, and the
4915
5024
  // user just chose to open it, so taking the caret is what they asked for.
4916
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5025
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4917
5026
  Input,
4918
5027
  {
4919
5028
  "aria-label": msg.appLauncherSearch,
@@ -4927,18 +5036,18 @@ function AppLauncher({
4927
5036
  }
4928
5037
  )
4929
5038
  ) : null,
4930
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-launcher-empty", role: "status", "aria-live": "polite", children: msg.appLauncherLoading }) : null,
4931
- isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-launcher-empty", children: emptyLabel ?? msg.appLauncherEmpty }) : null,
5039
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-launcher-empty", role: "status", "aria-live": "polite", children: msg.appLauncherLoading }) : null,
5040
+ isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-launcher-empty", children: emptyLabel ?? msg.appLauncherEmpty }) : null,
4932
5041
  visible.map((section, si) => (
4933
5042
  // Sections are positional zones with no record identity, so the heading is the key
4934
5043
  // where there is one. Same reasoning as ShellRail's groups.
4935
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "pire-launcher-section", children: [
4936
- section.label ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-eyebrow", children: section.label }) : null,
4937
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "pire-launcher-grid", "data-variant": section.variant ?? "tile", children: section.items.map((item) => {
5044
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "pire-launcher-section", children: [
5045
+ section.label ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-eyebrow", children: section.label }) : null,
5046
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-launcher-grid", "data-variant": section.variant ?? "tile", children: section.items.map((item) => {
4938
5047
  const isCurrent = item.id === value;
4939
5048
  const showsDescription = (section.variant ?? "tile") === "tile" && Boolean(item.description);
4940
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
4941
- import_react_aria_components36.Button,
5049
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
5050
+ import_react_aria_components39.Button,
4942
5051
  {
4943
5052
  className: "pire-launcher-item",
4944
5053
  "data-selected": isCurrent ? "true" : void 0,
@@ -4948,16 +5057,16 @@ function AppLauncher({
4948
5057
  onAction?.(item.id);
4949
5058
  },
4950
5059
  children: [
4951
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5060
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4952
5061
  Icon,
4953
5062
  {
4954
5063
  name: item.icon,
4955
5064
  size: (section.variant ?? "tile") === "tile" ? 20 : 16
4956
5065
  }
4957
5066
  ) }) : null,
4958
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "pire-launcher-item-text", children: [
4959
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-label", children: item.label }),
4960
- showsDescription ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pire-launcher-item-desc", children: item.description }) : null
5067
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "pire-launcher-item-text", children: [
5068
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "pire-launcher-item-label", children: item.label }),
5069
+ showsDescription ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "pire-launcher-item-desc", children: item.description }) : null
4961
5070
  ] })
4962
5071
  ]
4963
5072
  },
@@ -4973,8 +5082,8 @@ function AppLauncher({
4973
5082
  }
4974
5083
 
4975
5084
  // src/components/patterns/SidePanel.tsx
4976
- var import_react_aria_components37 = require("react-aria-components");
4977
- var import_jsx_runtime69 = require("react/jsx-runtime");
5085
+ var import_react_aria_components40 = require("react-aria-components");
5086
+ var import_jsx_runtime72 = require("react/jsx-runtime");
4978
5087
  function SidePanel({
4979
5088
  isOpen,
4980
5089
  title,
@@ -4986,8 +5095,8 @@ function SidePanel({
4986
5095
  className
4987
5096
  }) {
4988
5097
  const msg = usePireMessages();
4989
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4990
- import_react_aria_components37.ModalOverlay,
5098
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5099
+ import_react_aria_components40.ModalOverlay,
4991
5100
  {
4992
5101
  className: "pire-sidepanel-overlay",
4993
5102
  isOpen,
@@ -4995,23 +5104,23 @@ function SidePanel({
4995
5104
  onOpenChange: (o) => {
4996
5105
  if (!o) onClose?.();
4997
5106
  },
4998
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_aria_components37.Modal, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react_aria_components37.Dialog, { className: "pire-dialog", style: { height: "100%" }, children: [
4999
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("header", { className: "pire-dialog-head", children: [
5000
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
5001
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_aria_components37.Heading, { slot: "title", className: "pire-dialog-title", children: title }),
5002
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
5107
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_aria_components40.Modal, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react_aria_components40.Dialog, { className: "pire-dialog", style: { height: "100%" }, children: [
5108
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("header", { className: "pire-dialog-head", children: [
5109
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
5110
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_aria_components40.Heading, { slot: "title", className: "pire-dialog-title", children: title }),
5111
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
5003
5112
  ] }),
5004
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
5113
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
5005
5114
  ] }),
5006
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
5007
- footer ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null
5115
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
5116
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("footer", { className: "pire-dialog-foot", children: footer }) : null
5008
5117
  ] }) })
5009
5118
  }
5010
5119
  );
5011
5120
  }
5012
5121
 
5013
5122
  // src/components/patterns/EmptyState.tsx
5014
- var import_jsx_runtime70 = require("react/jsx-runtime");
5123
+ var import_jsx_runtime73 = require("react/jsx-runtime");
5015
5124
  function EmptyState({
5016
5125
  icon = "file-text",
5017
5126
  title,
@@ -5021,18 +5130,18 @@ function EmptyState({
5021
5130
  className,
5022
5131
  ...rest
5023
5132
  }) {
5024
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
5025
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
5026
- title ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
5027
- children ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
5133
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
5134
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
5135
+ title ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
5136
+ children ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
5028
5137
  action
5029
5138
  ] });
5030
5139
  }
5031
5140
 
5032
5141
  // src/components/patterns/NumPad.tsx
5033
- var React30 = __toESM(require("react"), 1);
5034
- var import_react_aria_components38 = require("react-aria-components");
5035
- var import_jsx_runtime71 = require("react/jsx-runtime");
5142
+ var React31 = __toESM(require("react"), 1);
5143
+ var import_react_aria_components41 = require("react-aria-components");
5144
+ var import_jsx_runtime74 = require("react/jsx-runtime");
5036
5145
  var BASE_KEYS = [
5037
5146
  { value: "7" },
5038
5147
  { value: "8" },
@@ -5055,9 +5164,9 @@ function fittingDigits(digits, buffer, separator, maxFractionDigits) {
5055
5164
  return room <= 0 ? "" : digits.slice(0, room);
5056
5165
  }
5057
5166
  function useNumPadKeyboard(onKey, isDisabled, containerRef) {
5058
- const handler = React30.useRef(onKey);
5167
+ const handler = React31.useRef(onKey);
5059
5168
  handler.current = onKey;
5060
- React30.useEffect(() => {
5169
+ React31.useEffect(() => {
5061
5170
  if (isDisabled) return;
5062
5171
  const isEditingElsewhere = () => {
5063
5172
  const el = document.activeElement;
@@ -5104,11 +5213,11 @@ function NumPad({
5104
5213
  style
5105
5214
  }) {
5106
5215
  const msg = usePireMessages();
5107
- const containerRef = React30.useRef(null);
5108
- const { locale } = (0, import_react_aria_components38.useLocale)();
5216
+ const containerRef = React31.useRef(null);
5217
+ const { locale } = (0, import_react_aria_components41.useLocale)();
5109
5218
  const separator = decimalSeparatorFor(locale);
5110
5219
  const allowsDecimal = maxFractionDigits !== void 0 && maxFractionDigits > 0;
5111
- const applyKey = React30.useCallback(
5220
+ const applyKey = React31.useCallback(
5112
5221
  (key) => {
5113
5222
  if (isDisabled) return;
5114
5223
  if (key.value === "backspace") {
@@ -5140,7 +5249,7 @@ function NumPad({
5140
5249
  ...allowsDecimal ? [{ value: "decimal", label: separator }] : [],
5141
5250
  ...extraKeys
5142
5251
  ];
5143
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
5252
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
5144
5253
  "div",
5145
5254
  {
5146
5255
  ref: containerRef,
@@ -5149,10 +5258,10 @@ function NumPad({
5149
5258
  "data-size": size,
5150
5259
  "data-disabled": isDisabled ? "true" : void 0,
5151
5260
  children: [
5152
- target !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-numpad-target", role: "status", "aria-live": "polite", children: target }) : null,
5153
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "pire-numpad-grid", role: "group", "aria-label": ariaLabel, children: keys.map((key) => {
5261
+ target !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pire-numpad-target", role: "status", "aria-live": "polite", children: target }) : null,
5262
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pire-numpad-grid", role: "group", "aria-label": ariaLabel, children: keys.map((key) => {
5154
5263
  const accessibleLabel = key.value === "backspace" ? msg.numPadBackspace : key.value === "clear" ? msg.numPadClear : key.value === "decimal" ? msg.numPadDecimal : void 0;
5155
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5264
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5156
5265
  Button,
5157
5266
  {
5158
5267
  variant: "secondary",
@@ -5175,9 +5284,9 @@ function NumPad({
5175
5284
  }
5176
5285
 
5177
5286
  // src/components/patterns/FileDropZone.tsx
5178
- var React31 = __toESM(require("react"), 1);
5179
- var import_react_aria_components39 = require("react-aria-components");
5180
- var import_jsx_runtime72 = require("react/jsx-runtime");
5287
+ var React32 = __toESM(require("react"), 1);
5288
+ var import_react_aria_components42 = require("react-aria-components");
5289
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5181
5290
  var isImage2 = (file) => file.type.startsWith("image/");
5182
5291
  function FileDropZone({
5183
5292
  label,
@@ -5205,10 +5314,10 @@ function FileDropZone({
5205
5314
  ...rest
5206
5315
  }) {
5207
5316
  const msg = usePireMessages();
5208
- const [uncontrolled, setUncontrolled] = React31.useState(defaultValue ?? []);
5317
+ const [uncontrolled, setUncontrolled] = React32.useState(defaultValue ?? []);
5209
5318
  const files = value ?? uncontrolled;
5210
- const created = React31.useRef([]);
5211
- React31.useEffect(
5319
+ const created = React32.useRef([]);
5320
+ React32.useEffect(
5212
5321
  () => () => {
5213
5322
  for (const url of created.current) URL.revokeObjectURL(url);
5214
5323
  },
@@ -5231,42 +5340,42 @@ function FileDropZone({
5231
5340
  commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
5232
5341
  };
5233
5342
  const remove = (target) => commit(files.filter((f) => f.file !== target));
5234
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cx("pire-field", className), style, "data-full-width": String(fullWidth), ...rest, children: [
5235
- label ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "pire-field-label", children: [
5343
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: cx("pire-field", className), style, "data-full-width": String(fullWidth), ...rest, children: [
5344
+ label ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "pire-field-label", children: [
5236
5345
  label,
5237
- isRequired ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
5346
+ isRequired ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
5238
5347
  ] }) : null,
5239
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5240
- import_react_aria_components39.DropZone,
5348
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
5349
+ import_react_aria_components42.DropZone,
5241
5350
  {
5242
5351
  className: "pire-dropzone",
5243
5352
  "aria-label": ariaLabel,
5244
5353
  "data-height": height,
5245
5354
  isDisabled: isDisabled || isReadOnly,
5246
5355
  onDrop: async (e) => {
5247
- const dropped = await Promise.all(e.items.filter(import_react_aria_components39.isFileDropItem).map((item) => item.getFile()));
5356
+ const dropped = await Promise.all(e.items.filter(import_react_aria_components42.isFileDropItem).map((item) => item.getFile()));
5248
5357
  accept(dropped);
5249
5358
  },
5250
5359
  children: [
5251
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { name: "download", size: 24, className: "pire-dropzone-icon" }),
5252
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-dropzone-prompt", children: promptLabel ?? msg.fileDropZonePrompt }),
5253
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5254
- import_react_aria_components39.FileTrigger,
5360
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon, { name: "download", size: 24, className: "pire-dropzone-icon" }),
5361
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-dropzone-prompt", children: promptLabel ?? msg.fileDropZonePrompt }),
5362
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5363
+ import_react_aria_components42.FileTrigger,
5255
5364
  {
5256
5365
  acceptedFileTypes,
5257
5366
  allowsMultiple,
5258
5367
  onSelect: (list) => accept(list ? [...list] : []),
5259
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { variant: "secondary", isDisabled: isDisabled || isReadOnly, children: msg.fileUploadChoose })
5368
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Button, { variant: "secondary", isDisabled: isDisabled || isReadOnly, children: msg.fileUploadChoose })
5260
5369
  }
5261
5370
  )
5262
5371
  ]
5263
5372
  }
5264
5373
  ),
5265
- files.length ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("li", { className: "pire-fileupload-item", children: [
5266
- previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
5267
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
5268
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
5269
- isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5374
+ files.length ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("li", { className: "pire-fileupload-item", children: [
5375
+ previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
5376
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-fileupload-name", children: file.name }),
5377
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
5378
+ isDisabled || isReadOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5270
5379
  IconButton,
5271
5380
  {
5272
5381
  icon: "x",
@@ -5276,15 +5385,15 @@ function FileDropZone({
5276
5385
  }
5277
5386
  )
5278
5387
  ] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
5279
- uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
5280
- description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-field-hint", children: description }) : null,
5281
- isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
5388
+ uploadProgress != null ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
5389
+ description ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-field-hint", children: description }) : null,
5390
+ isInvalid && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "pire-field-error", children: errorMessage }) : null
5282
5391
  ] });
5283
5392
  }
5284
5393
 
5285
5394
  // src/index.ts
5286
- var import_react_aria_components40 = require("react-aria-components");
5287
- var import_react_aria_components41 = require("react-aria-components");
5395
+ var import_react_aria_components43 = require("react-aria-components");
5396
+ var import_react_aria_components44 = require("react-aria-components");
5288
5397
  // Annotate the CommonJS export names for ESM import in node:
5289
5398
  0 && (module.exports = {
5290
5399
  AppLauncher,
@@ -5312,6 +5421,7 @@ var import_react_aria_components41 = require("react-aria-components");
5312
5421
  DialogTrigger,
5313
5422
  DonutChart,
5314
5423
  EmptyState,
5424
+ FieldHelp,
5315
5425
  FileDropZone,
5316
5426
  FileUpload,
5317
5427
  FilterBar,