@orianatech/pire 1.4.1 → 1.6.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 (119) hide show
  1. package/dist/components/core/Avatar.d.ts.map +1 -1
  2. package/dist/components/core/Badge.d.ts.map +1 -1
  3. package/dist/components/core/Button.d.ts.map +1 -1
  4. package/dist/components/core/Card.d.ts.map +1 -1
  5. package/dist/components/core/Heading.d.ts.map +1 -1
  6. package/dist/components/core/Icon.d.ts.map +1 -1
  7. package/dist/components/core/IconButton.d.ts.map +1 -1
  8. package/dist/components/core/Kbd.d.ts.map +1 -1
  9. package/dist/components/core/SegmentedControl.d.ts.map +1 -1
  10. package/dist/components/core/Separator.d.ts.map +1 -1
  11. package/dist/components/core/Tag.d.ts.map +1 -1
  12. package/dist/components/core/Text.d.ts.map +1 -1
  13. package/dist/components/core/icon-map.d.ts.map +1 -1
  14. package/dist/components/data/BarChart.d.ts.map +1 -1
  15. package/dist/components/data/ChartFrame.d.ts.map +1 -1
  16. package/dist/components/data/DataTable.d.ts.map +1 -1
  17. package/dist/components/data/DescriptionList.d.ts.map +1 -1
  18. package/dist/components/data/DonutChart.d.ts.map +1 -1
  19. package/dist/components/data/FilterBar.d.ts.map +1 -1
  20. package/dist/components/data/KpiTile.d.cts +1 -1
  21. package/dist/components/data/KpiTile.d.ts +1 -1
  22. package/dist/components/data/KpiTile.d.ts.map +1 -1
  23. package/dist/components/data/LineChart.d.ts.map +1 -1
  24. package/dist/components/data/LinkList.d.ts.map +1 -1
  25. package/dist/components/data/ObjectHeader.d.ts.map +1 -1
  26. package/dist/components/data/RecordCard.d.ts.map +1 -1
  27. package/dist/components/data/ViewSwitcher.d.cts +1 -1
  28. package/dist/components/data/ViewSwitcher.d.ts +1 -1
  29. package/dist/components/data/ViewSwitcher.d.ts.map +1 -1
  30. package/dist/components/data/chartGeometry.d.ts.map +1 -1
  31. package/dist/components/feedback/Dialog.d.cts +1 -1
  32. package/dist/components/feedback/Dialog.d.ts +1 -1
  33. package/dist/components/feedback/Dialog.d.ts.map +1 -1
  34. package/dist/components/feedback/InlineMessage.d.ts.map +1 -1
  35. package/dist/components/feedback/ProgressBar.d.cts +1 -1
  36. package/dist/components/feedback/ProgressBar.d.ts +1 -1
  37. package/dist/components/feedback/ProgressBar.d.ts.map +1 -1
  38. package/dist/components/feedback/Skeleton.d.ts.map +1 -1
  39. package/dist/components/feedback/Toast.d.cts +1 -1
  40. package/dist/components/feedback/Toast.d.ts +1 -1
  41. package/dist/components/feedback/Toast.d.ts.map +1 -1
  42. package/dist/components/feedback/Tooltip.d.ts.map +1 -1
  43. package/dist/components/forms/Checkbox.d.ts.map +1 -1
  44. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -1
  45. package/dist/components/forms/ComboBox.d.ts.map +1 -1
  46. package/dist/components/forms/DatePicker.d.ts.map +1 -1
  47. package/dist/components/forms/DateRangePicker.d.ts.map +1 -1
  48. package/dist/components/forms/FileUpload.d.ts.map +1 -1
  49. package/dist/components/forms/FormField.d.ts.map +1 -1
  50. package/dist/components/forms/Input.d.ts.map +1 -1
  51. package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
  52. package/dist/components/forms/NumberField.d.ts.map +1 -1
  53. package/dist/components/forms/QuantityStepper.d.ts.map +1 -1
  54. package/dist/components/forms/Radio.d.ts.map +1 -1
  55. package/dist/components/forms/Select.d.ts.map +1 -1
  56. package/dist/components/forms/Switch.d.ts.map +1 -1
  57. package/dist/components/forms/TextArea.d.ts.map +1 -1
  58. package/dist/components/forms/ValueHelpField.d.cts +1 -1
  59. package/dist/components/forms/ValueHelpField.d.ts +1 -1
  60. package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
  61. package/dist/components/forms/dateValues.d.ts.map +1 -1
  62. package/dist/components/layout/PageBand.d.ts.map +1 -1
  63. package/dist/components/layout/SectionHeader.d.ts.map +1 -1
  64. package/dist/components/layout/SelectionBar.d.ts.map +1 -1
  65. package/dist/components/layout/SplitPane.d.ts.map +1 -1
  66. package/dist/components/navigation/Breadcrumb.d.ts.map +1 -1
  67. package/dist/components/navigation/Menu.d.ts.map +1 -1
  68. package/dist/components/navigation/Pagination.d.cts +1 -1
  69. package/dist/components/navigation/Pagination.d.ts +1 -1
  70. package/dist/components/navigation/Pagination.d.ts.map +1 -1
  71. package/dist/components/navigation/Ribbon.d.ts.map +1 -1
  72. package/dist/components/navigation/ShellBar.d.ts.map +1 -1
  73. package/dist/components/navigation/ShellRail.d.ts.map +1 -1
  74. package/dist/components/navigation/SideNav.d.cts +9 -1
  75. package/dist/components/navigation/SideNav.d.ts +9 -1
  76. package/dist/components/navigation/SideNav.d.ts.map +1 -1
  77. package/dist/components/navigation/Tabs.d.ts.map +1 -1
  78. package/dist/components/patterns/AppLauncher.d.cts +1 -1
  79. package/dist/components/patterns/AppLauncher.d.ts +1 -1
  80. package/dist/components/patterns/AppLauncher.d.ts.map +1 -1
  81. package/dist/components/patterns/CommandPalette.d.ts.map +1 -1
  82. package/dist/components/patterns/ConfirmDialog.d.cts +1 -1
  83. package/dist/components/patterns/ConfirmDialog.d.ts +1 -1
  84. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
  85. package/dist/components/patterns/EmptyState.d.ts.map +1 -1
  86. package/dist/components/patterns/FileDropZone.d.ts.map +1 -1
  87. package/dist/components/patterns/NumPad.d.cts +19 -2
  88. package/dist/components/patterns/NumPad.d.ts +19 -2
  89. package/dist/components/patterns/NumPad.d.ts.map +1 -1
  90. package/dist/components/patterns/SidePanel.d.cts +1 -1
  91. package/dist/components/patterns/SidePanel.d.ts +1 -1
  92. package/dist/components/patterns/SidePanel.d.ts.map +1 -1
  93. package/dist/components/patterns/ValueHelpDialog.d.cts +1 -1
  94. package/dist/components/patterns/ValueHelpDialog.d.ts +1 -1
  95. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  96. package/dist/components/utils/decimalSeparator.d.cts +9 -0
  97. package/dist/components/utils/decimalSeparator.d.ts +10 -0
  98. package/dist/components/utils/decimalSeparator.d.ts.map +1 -0
  99. package/dist/components.css +3661 -691
  100. package/dist/i18n/PireIntlProvider.d.ts.map +1 -1
  101. package/dist/i18n/messages.d.cts +3 -0
  102. package/dist/i18n/messages.d.ts +3 -0
  103. package/dist/i18n/messages.d.ts.map +1 -1
  104. package/dist/index.cjs +659 -263
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.d.cts +17 -17
  107. package/dist/index.d.ts +17 -17
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +663 -254
  110. package/dist/index.js.map +1 -1
  111. package/dist/tokens/base.css +64 -13
  112. package/dist/tokens/colors.css +156 -78
  113. package/dist/tokens/elevation.css +20 -16
  114. package/dist/tokens/fonts.css +49 -7
  115. package/dist/tokens/motion.css +15 -12
  116. package/dist/tokens/spacing.css +41 -16
  117. package/dist/tokens/themes.css +88 -32
  118. package/dist/tokens/typography.css +43 -36
  119. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -425,9 +425,26 @@ import * as React2 from "react";
425
425
  import { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow, Focusable } from "react-aria-components";
426
426
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
427
427
  function Tooltip({ label, placement = "top", delay = 500, children }) {
428
- const props = React2.isValidElement(children) ? children.props : void 0;
428
+ const props = React2.isValidElement(
429
+ children
430
+ ) ? children.props : void 0;
429
431
  const isDisabledChild = props?.isDisabled === true || props?.disabled === true;
430
- const target = React2.isValidElement(children) && !isDisabledChild ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : isDisabledChild ? /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", role: "button", "aria-disabled": "true", children }) : /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", children });
432
+ const target = React2.isValidElement(children) && !isDisabledChild ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : isDisabledChild ? (
433
+ // `Focusable` also dev-warns when the element it clones onto has neither a native
434
+ // interactive tag nor an ARIA widget role — a bare `<span>` is neither. Every disabled
435
+ // control this wraps (`IconButton`, `Button`, …) is button-shaped, so `role="button"` plus
436
+ // `aria-disabled` describes the wrapper the same way its disabled child already describes
437
+ // itself, and is what lets the accessible name (from the child's own text or `aria-label`)
438
+ // reach the element that actually holds focus. No static `tabIndex` here on purpose: it
439
+ // would win over the one `Focusable` computes at clone time (react-aria's `mergeProps` lets
440
+ // a prop already on this element beat the one it supplies), silently making the span
441
+ // unfocusable again and reintroducing the defect this file exists to fix. A real `<button>`
442
+ // is not an option either: `children` is very often a button itself (`IconButton`), and a
443
+ // button nested in a button is invalid HTML that browsers repair by breaking the DOM tree.
444
+ // biome-ignore lint/a11y/useFocusableInteractive: tabIndex is added by Focusable's clone, not statically — see above.
445
+ // biome-ignore lint/a11y/useSemanticElements: a real <button> would nest inside the disabled child, which is often one itself — see above.
446
+ /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", role: "button", "aria-disabled": "true", children })
447
+ ) : /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", children });
431
448
  return /* @__PURE__ */ jsxs2(TooltipTrigger, { delay, closeDelay: 0, children: [
432
449
  /* @__PURE__ */ jsx3(Focusable, { children: target }),
433
450
  /* @__PURE__ */ jsxs2(AriaTooltip, { className: "pire-tooltip", placement, offset: 6, children: [
@@ -567,6 +584,7 @@ var enMessages = {
567
584
  chartEmpty: "No data for this period",
568
585
  numPadClear: "Clear",
569
586
  numPadBackspace: "Remove last digit",
587
+ numPadDecimal: "Decimal separator",
570
588
  viewSwitcherName: "Saved views: {view}",
571
589
  viewSwitcherNameModified: "Saved views: {view}, modified",
572
590
  viewSwitcherModifiedMark: "\xB7 modified",
@@ -651,6 +669,7 @@ var esMessages = {
651
669
  chartEmpty: "Sin datos para este per\xEDodo",
652
670
  numPadClear: "Limpiar",
653
671
  numPadBackspace: "Borrar \xFAltimo d\xEDgito",
672
+ numPadDecimal: "Separador decimal",
654
673
  viewSwitcherName: "Vistas guardadas: {view}",
655
674
  viewSwitcherNameModified: "Vistas guardadas: {view}, modificada",
656
675
  viewSwitcherModifiedMark: "\xB7 modificada",
@@ -672,10 +691,7 @@ var esMessages = {
672
691
  import { jsx as jsx6 } from "react/jsx-runtime";
673
692
  var MessagesContext = React5.createContext(enMessages);
674
693
  function PireIntlProvider({ messages, children }) {
675
- const value = React5.useMemo(
676
- () => messages ? { ...enMessages, ...messages } : enMessages,
677
- [messages]
678
- );
694
+ const value = React5.useMemo(() => messages ? { ...enMessages, ...messages } : enMessages, [messages]);
679
695
  return /* @__PURE__ */ jsx6(MessagesContext.Provider, { value, children });
680
696
  }
681
697
  function usePireMessages() {
@@ -690,37 +706,64 @@ function useMessage(key, override) {
690
706
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
691
707
  var Tag = React6.forwardRef(function Tag2({ children, onRemove, isDisabled, category, className, ...rest }, ref) {
692
708
  const msg = usePireMessages();
693
- return /* @__PURE__ */ jsxs5("span", { ref, className: cx("pire-tag", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
694
- category ? /* @__PURE__ */ jsx7("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
695
- children,
696
- onRemove ? /* @__PURE__ */ jsx7(
697
- AriaButton3,
698
- {
699
- className: "pire-tag-remove",
700
- isDisabled,
701
- onPress: onRemove,
702
- "aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
703
- children: /* @__PURE__ */ jsx7(Icon, { name: "x", size: 12 })
704
- }
705
- ) : null
706
- ] });
709
+ return /* @__PURE__ */ jsxs5(
710
+ "span",
711
+ {
712
+ ref,
713
+ className: cx("pire-tag", className),
714
+ "data-disabled": isDisabled ? "true" : void 0,
715
+ ...rest,
716
+ children: [
717
+ category ? /* @__PURE__ */ jsx7("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
718
+ children,
719
+ onRemove ? /* @__PURE__ */ jsx7(
720
+ AriaButton3,
721
+ {
722
+ className: "pire-tag-remove",
723
+ isDisabled,
724
+ onPress: onRemove,
725
+ "aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
726
+ children: /* @__PURE__ */ jsx7(Icon, { name: "x", size: 12 })
727
+ }
728
+ ) : null
729
+ ]
730
+ }
731
+ );
707
732
  });
708
733
 
709
734
  // src/components/core/Card.tsx
710
735
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
711
- function Card({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }) {
712
- return /* @__PURE__ */ jsxs6("section", { className: cx("pire-card", className), "data-interactive": interactive ? "true" : void 0, ...rest, children: [
713
- title || actions ? /* @__PURE__ */ jsxs6("header", { className: "pire-card-head", children: [
714
- icon ? /* @__PURE__ */ jsx8(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
715
- /* @__PURE__ */ jsxs6("div", { style: { flex: 1, minWidth: 0 }, children: [
716
- /* @__PURE__ */ jsx8("h3", { className: "pire-card-title", children: title }),
717
- subtitle ? /* @__PURE__ */ jsx8("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
718
- ] }),
719
- actions ? /* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
720
- ] }) : null,
721
- children ? /* @__PURE__ */ jsx8("div", { className: "pire-card-body", children }) : null,
722
- footer ? /* @__PURE__ */ jsx8("footer", { className: "pire-card-foot", children: footer }) : null
723
- ] });
736
+ function Card({
737
+ title,
738
+ subtitle,
739
+ icon,
740
+ actions,
741
+ footer,
742
+ interactive,
743
+ children,
744
+ className,
745
+ ...rest
746
+ }) {
747
+ return /* @__PURE__ */ jsxs6(
748
+ "section",
749
+ {
750
+ className: cx("pire-card", className),
751
+ "data-interactive": interactive ? "true" : void 0,
752
+ ...rest,
753
+ children: [
754
+ title || actions ? /* @__PURE__ */ jsxs6("header", { className: "pire-card-head", children: [
755
+ icon ? /* @__PURE__ */ jsx8(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
756
+ /* @__PURE__ */ jsxs6("div", { style: { flex: 1, minWidth: 0 }, children: [
757
+ /* @__PURE__ */ jsx8("h3", { className: "pire-card-title", children: title }),
758
+ subtitle ? /* @__PURE__ */ jsx8("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
759
+ ] }),
760
+ actions ? /* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
761
+ ] }) : null,
762
+ children ? /* @__PURE__ */ jsx8("div", { className: "pire-card-body", children }) : null,
763
+ footer ? /* @__PURE__ */ jsx8("footer", { className: "pire-card-foot", children: footer }) : null
764
+ ]
765
+ }
766
+ );
724
767
  }
725
768
 
726
769
  // src/components/core/Avatar.tsx
@@ -755,7 +798,10 @@ function SegmentedControl({
755
798
  style,
756
799
  ...rest
757
800
  }) {
758
- const selected = React8.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
801
+ const selected = React8.useMemo(
802
+ () => new Set(value ? [value] : defaultValue ? [defaultValue] : []),
803
+ [value, defaultValue]
804
+ );
759
805
  return /* @__PURE__ */ jsx10(
760
806
  ToggleButtonGroup,
761
807
  {
@@ -904,7 +950,17 @@ function Kbd({ children, size = "md", className, ...rest }) {
904
950
 
905
951
  // src/components/forms/FormField.tsx
906
952
  import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
907
- function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
953
+ function FormField({
954
+ label,
955
+ htmlFor,
956
+ isRequired,
957
+ hint,
958
+ error,
959
+ layout = "stacked",
960
+ children,
961
+ className,
962
+ ...rest
963
+ }) {
908
964
  return /* @__PURE__ */ jsxs9("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
909
965
  /* @__PURE__ */ jsxs9("label", { className: "pire-field-label", htmlFor, children: [
910
966
  label,
@@ -1034,11 +1090,14 @@ function TextArea({
1034
1090
  ...rest
1035
1091
  }) {
1036
1092
  const innerRef = React11.useRef(null);
1037
- const ref = React11.useCallback((node) => {
1038
- innerRef.current = node;
1039
- if (typeof textAreaRef === "function") textAreaRef(node);
1040
- else if (textAreaRef) textAreaRef.current = node;
1041
- }, [textAreaRef]);
1093
+ const ref = React11.useCallback(
1094
+ (node) => {
1095
+ innerRef.current = node;
1096
+ if (typeof textAreaRef === "function") textAreaRef(node);
1097
+ else if (textAreaRef) textAreaRef.current = node;
1098
+ },
1099
+ [textAreaRef]
1100
+ );
1042
1101
  const grow = React11.useCallback(() => {
1043
1102
  const el = innerRef.current;
1044
1103
  if (!el || !autoGrow) return;
@@ -1168,7 +1227,16 @@ function Select({
1168
1227
  className: "pire-listbox",
1169
1228
  items,
1170
1229
  renderEmptyState: () => /* @__PURE__ */ jsx19("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
1171
- children: (item) => /* @__PURE__ */ jsx19(ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: item.label })
1230
+ children: (item) => /* @__PURE__ */ jsx19(
1231
+ ListBoxItem,
1232
+ {
1233
+ className: "pire-option",
1234
+ id: item.value,
1235
+ textValue: item.label,
1236
+ isDisabled: item.isDisabled,
1237
+ children: item.label
1238
+ }
1239
+ )
1172
1240
  }
1173
1241
  ) })
1174
1242
  ]
@@ -1198,7 +1266,14 @@ import {
1198
1266
  FieldError as FieldError4
1199
1267
  } from "react-aria-components";
1200
1268
  import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1201
- function RadioGroup({ label, description, errorMessage, children, className, ...rest }) {
1269
+ function RadioGroup({
1270
+ label,
1271
+ description,
1272
+ errorMessage,
1273
+ children,
1274
+ className,
1275
+ ...rest
1276
+ }) {
1202
1277
  return /* @__PURE__ */ jsxs14(AriaRadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
1203
1278
  label ? /* @__PURE__ */ jsx21(Label4, { className: "pire-field-label", children: label }) : null,
1204
1279
  /* @__PURE__ */ jsx21("div", { className: "pire-radiogroup", children }),
@@ -1227,7 +1302,13 @@ function Switch({ label, children, className, ...rest }) {
1227
1302
  }
1228
1303
 
1229
1304
  // src/components/forms/ChoiceCardGroup.tsx
1230
- import { RadioGroup as AriaRadioGroup2, Radio as AriaRadio2, Label as Label5, Text as Text7, FieldError as FieldError5 } from "react-aria-components";
1305
+ import {
1306
+ RadioGroup as AriaRadioGroup2,
1307
+ Radio as AriaRadio2,
1308
+ Label as Label5,
1309
+ Text as Text7,
1310
+ FieldError as FieldError5
1311
+ } from "react-aria-components";
1231
1312
  import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1232
1313
  function ChoiceCardGroup({
1233
1314
  label,
@@ -1261,12 +1342,21 @@ function ChoiceCardGroup({
1261
1342
  label,
1262
1343
  isRequired ? /* @__PURE__ */ jsx23("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1263
1344
  ] }) : null,
1264
- /* @__PURE__ */ jsx23("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ jsxs16(AriaRadio2, { value: option.id, className: "pire-choicecard", isDisabled: option.isDisabled, children: [
1265
- option.icon ? /* @__PURE__ */ jsx23(Icon, { name: option.icon, size: 20 }) : null,
1266
- /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-label", children: option.label }),
1267
- option.description ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1268
- option.preview ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1269
- ] }, option.id)) }),
1345
+ /* @__PURE__ */ jsx23("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ jsxs16(
1346
+ AriaRadio2,
1347
+ {
1348
+ value: option.id,
1349
+ className: "pire-choicecard",
1350
+ isDisabled: option.isDisabled,
1351
+ children: [
1352
+ option.icon ? /* @__PURE__ */ jsx23(Icon, { name: option.icon, size: 20 }) : null,
1353
+ /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-label", children: option.label }),
1354
+ option.description ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-desc", children: option.description }) : null,
1355
+ option.preview ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
1356
+ ]
1357
+ },
1358
+ option.id
1359
+ )) }),
1270
1360
  description ? /* @__PURE__ */ jsx23(Text7, { slot: "description", className: "pire-field-hint", children: description }) : null,
1271
1361
  /* @__PURE__ */ jsx23(FieldError5, { className: "pire-field-error", children: errorMessage })
1272
1362
  ]
@@ -1381,7 +1471,16 @@ function ComboBox({
1381
1471
  children: clearLabel ?? msg.inputClear
1382
1472
  }
1383
1473
  ) : null,
1384
- /* @__PURE__ */ jsx24(AriaButton6, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx24(Icon, { name: "chevron-down", size: 16 }) })
1474
+ /* @__PURE__ */ jsx24(
1475
+ AriaButton6,
1476
+ {
1477
+ className: "pire-iconbtn",
1478
+ "data-size": "sm",
1479
+ "aria-label": msg.comboBoxShowSuggestions,
1480
+ style: { width: 20, height: 20 },
1481
+ children: /* @__PURE__ */ jsx24(Icon, { name: "chevron-down", size: 16 })
1482
+ }
1483
+ )
1385
1484
  ]
1386
1485
  }
1387
1486
  ),
@@ -1396,10 +1495,19 @@ function ComboBox({
1396
1495
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1397
1496
  } : void 0,
1398
1497
  renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx24("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1399
- children: (item) => /* @__PURE__ */ jsxs17(ListBoxItem2, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1400
- /* @__PURE__ */ jsx24("span", { className: "pire-option-label", children: item.label }),
1401
- item.secondary ? /* @__PURE__ */ jsx24("span", { className: "pire-option-secondary", children: item.secondary }) : null
1402
- ] })
1498
+ children: (item) => /* @__PURE__ */ jsxs17(
1499
+ ListBoxItem2,
1500
+ {
1501
+ className: "pire-option",
1502
+ id: item.value,
1503
+ textValue: item.label,
1504
+ isDisabled: item.isDisabled,
1505
+ children: [
1506
+ /* @__PURE__ */ jsx24("span", { className: "pire-option-label", children: item.label }),
1507
+ item.secondary ? /* @__PURE__ */ jsx24("span", { className: "pire-option-secondary", children: item.secondary }) : null
1508
+ ]
1509
+ }
1510
+ )
1403
1511
  }
1404
1512
  ) })
1405
1513
  ]
@@ -1536,7 +1644,16 @@ function MultiComboBox({
1536
1644
  }
1537
1645
  )
1538
1646
  ] }),
1539
- /* @__PURE__ */ jsx25(AriaButton7, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx25(Icon, { name: "chevron-down", size: 16 }) })
1647
+ /* @__PURE__ */ jsx25(
1648
+ AriaButton7,
1649
+ {
1650
+ className: "pire-iconbtn",
1651
+ "data-size": "sm",
1652
+ "aria-label": msg.comboBoxShowSuggestions,
1653
+ style: { width: 20, height: 20 },
1654
+ children: /* @__PURE__ */ jsx25(Icon, { name: "chevron-down", size: 16 })
1655
+ }
1656
+ )
1540
1657
  ]
1541
1658
  }
1542
1659
  ),
@@ -1552,10 +1669,19 @@ function MultiComboBox({
1552
1669
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1553
1670
  } : void 0,
1554
1671
  renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx25("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1555
- children: (item) => /* @__PURE__ */ jsxs18(ListBoxItem3, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1556
- /* @__PURE__ */ jsx25("span", { className: "pire-option-label", children: item.label }),
1557
- item.secondary ? /* @__PURE__ */ jsx25("span", { className: "pire-option-secondary", children: item.secondary }) : null
1558
- ] })
1672
+ children: (item) => /* @__PURE__ */ jsxs18(
1673
+ ListBoxItem3,
1674
+ {
1675
+ className: "pire-option",
1676
+ id: item.value,
1677
+ textValue: item.label,
1678
+ isDisabled: item.isDisabled,
1679
+ children: [
1680
+ /* @__PURE__ */ jsx25("span", { className: "pire-option-label", children: item.label }),
1681
+ item.secondary ? /* @__PURE__ */ jsx25("span", { className: "pire-option-secondary", children: item.secondary }) : null
1682
+ ]
1683
+ }
1684
+ )
1559
1685
  }
1560
1686
  ) })
1561
1687
  ]
@@ -1576,10 +1702,14 @@ import {
1576
1702
  useLocale,
1577
1703
  NumberFieldStateContext
1578
1704
  } from "react-aria-components";
1579
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1705
+
1706
+ // src/components/utils/decimalSeparator.ts
1580
1707
  function decimalSeparatorFor(locale) {
1581
1708
  return new Intl.NumberFormat(locale).formatToParts(1.1).find((part) => part.type === "decimal")?.value ?? ".";
1582
1709
  }
1710
+
1711
+ // src/components/forms/NumberField.tsx
1712
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1583
1713
  function typeIntoInput(el, text) {
1584
1714
  const start = el.selectionStart ?? el.value.length;
1585
1715
  const end = el.selectionEnd ?? start;
@@ -1725,7 +1855,15 @@ function NumberField({
1725
1855
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1726
1856
  "data-stepper": stepperLayout,
1727
1857
  children: [
1728
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(AriaButton8, { slot: "decrement", className: "pire-qty-btn", "aria-label": decrementLabel ?? msg.numberFieldDecrease, children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 16 }) }) : null,
1858
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
1859
+ AriaButton8,
1860
+ {
1861
+ slot: "decrement",
1862
+ className: "pire-qty-btn",
1863
+ "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1864
+ children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 16 })
1865
+ }
1866
+ ) : null,
1729
1867
  /* @__PURE__ */ jsx26(
1730
1868
  AriaInput4,
1731
1869
  {
@@ -1737,10 +1875,34 @@ function NumberField({
1737
1875
  ),
1738
1876
  suffix ? /* @__PURE__ */ jsx26("span", { className: "pire-affix", children: suffix }) : null,
1739
1877
  showsClear ? /* @__PURE__ */ jsx26(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
1740
- !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(AriaButton8, { slot: "increment", className: "pire-qty-btn", "aria-label": incrementLabel ?? msg.numberFieldIncrease, children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 16 }) }) : null,
1878
+ !hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
1879
+ AriaButton8,
1880
+ {
1881
+ slot: "increment",
1882
+ className: "pire-qty-btn",
1883
+ "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1884
+ children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 16 })
1885
+ }
1886
+ ) : null,
1741
1887
  hideStepper ? null : stepperLayout === "inline" ? null : /* @__PURE__ */ jsxs19("span", { className: "pire-stepper", children: [
1742
- /* @__PURE__ */ jsx26(AriaButton8, { slot: "increment", className: "pire-stepper-btn", "aria-label": incrementLabel ?? msg.numberFieldIncrease, children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 10 }) }),
1743
- /* @__PURE__ */ jsx26(AriaButton8, { slot: "decrement", className: "pire-stepper-btn", "aria-label": decrementLabel ?? msg.numberFieldDecrease, children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 10 }) })
1888
+ /* @__PURE__ */ jsx26(
1889
+ AriaButton8,
1890
+ {
1891
+ slot: "increment",
1892
+ className: "pire-stepper-btn",
1893
+ "aria-label": incrementLabel ?? msg.numberFieldIncrease,
1894
+ children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 10 })
1895
+ }
1896
+ ),
1897
+ /* @__PURE__ */ jsx26(
1898
+ AriaButton8,
1899
+ {
1900
+ slot: "decrement",
1901
+ className: "pire-stepper-btn",
1902
+ "aria-label": decrementLabel ?? msg.numberFieldDecrease,
1903
+ children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 10 })
1904
+ }
1905
+ )
1744
1906
  ] })
1745
1907
  ]
1746
1908
  }
@@ -1890,7 +2052,16 @@ function DatePicker({
1890
2052
  children: [
1891
2053
  /* @__PURE__ */ jsx28(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx28(DateSegment, { segment, className: "pire-datesegment" }) }),
1892
2054
  showsClear ? /* @__PURE__ */ jsx28(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
1893
- /* @__PURE__ */ jsx28(AriaButton9, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerOpenCalendar, style: { width: 24, height: 24 }, children: /* @__PURE__ */ jsx28(Icon, { name: "calendar", size: 16 }) })
2055
+ /* @__PURE__ */ jsx28(
2056
+ AriaButton9,
2057
+ {
2058
+ className: "pire-iconbtn",
2059
+ "data-size": "sm",
2060
+ "aria-label": msg.datePickerOpenCalendar,
2061
+ style: { width: 24, height: 24 },
2062
+ children: /* @__PURE__ */ jsx28(Icon, { name: "calendar", size: 16 })
2063
+ }
2064
+ )
1894
2065
  ]
1895
2066
  }
1896
2067
  ),
@@ -1898,9 +2069,27 @@ function DatePicker({
1898
2069
  /* @__PURE__ */ jsx28(FieldError9, { className: "pire-field-error", children: errorMessage }),
1899
2070
  /* @__PURE__ */ jsx28(Popover4, { className: "pire-popover", children: /* @__PURE__ */ jsx28(AriaDialog, { children: /* @__PURE__ */ jsxs20(Calendar, { className: "pire-calendar", children: [
1900
2071
  /* @__PURE__ */ jsxs20("header", { className: "pire-calendar-head", children: [
1901
- /* @__PURE__ */ jsx28(AriaButton9, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerPreviousMonth, children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-left", size: 16 }) }),
2072
+ /* @__PURE__ */ jsx28(
2073
+ AriaButton9,
2074
+ {
2075
+ slot: "previous",
2076
+ className: "pire-iconbtn",
2077
+ "data-size": "sm",
2078
+ "aria-label": msg.datePickerPreviousMonth,
2079
+ children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-left", size: 16 })
2080
+ }
2081
+ ),
1902
2082
  /* @__PURE__ */ jsx28(Heading2, { className: "pire-calendar-title" }),
1903
- /* @__PURE__ */ jsx28(AriaButton9, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerNextMonth, children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-right", size: 16 }) })
2083
+ /* @__PURE__ */ jsx28(
2084
+ AriaButton9,
2085
+ {
2086
+ slot: "next",
2087
+ className: "pire-iconbtn",
2088
+ "data-size": "sm",
2089
+ "aria-label": msg.datePickerNextMonth,
2090
+ children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-right", size: 16 })
2091
+ }
2092
+ )
1904
2093
  ] }),
1905
2094
  /* @__PURE__ */ jsxs20(CalendarGrid, { className: "pire-calendar-grid", children: [
1906
2095
  /* @__PURE__ */ jsx28(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx28(CalendarHeaderCell, { children: day }) }),
@@ -2006,7 +2195,9 @@ function DateRangePicker({
2006
2195
  onChange(null);
2007
2196
  return;
2008
2197
  }
2009
- onChange(valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end });
2198
+ onChange(
2199
+ valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end }
2200
+ );
2010
2201
  };
2011
2202
  return /* @__PURE__ */ jsxs21(
2012
2203
  AriaDateRangePicker,
@@ -2209,7 +2400,13 @@ function Skeleton({ shape = "text", width, height, className, style, ...rest })
2209
2400
  );
2210
2401
  }
2211
2402
  var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
2212
- function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
2403
+ function SkeletonTableRow({
2404
+ columns,
2405
+ density = "regular",
2406
+ className,
2407
+ style,
2408
+ ...rest
2409
+ }) {
2213
2410
  const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
2214
2411
  return /* @__PURE__ */ jsx31(
2215
2412
  "div",
@@ -2221,18 +2418,15 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
2221
2418
  ...rest,
2222
2419
  children: cells.map((c, i) => {
2223
2420
  const align = c.numeric ? "right" : c.align ?? "left";
2224
- return (
2225
- // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
2226
- /* @__PURE__ */ jsx31(
2227
- "div",
2228
- {
2229
- className: "pire-skeleton-cell",
2230
- "data-align": align,
2231
- style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2232
- children: /* @__PURE__ */ jsx31(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2233
- },
2234
- i
2235
- )
2421
+ return /* @__PURE__ */ jsx31(
2422
+ "div",
2423
+ {
2424
+ className: "pire-skeleton-cell",
2425
+ "data-align": align,
2426
+ style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2427
+ children: /* @__PURE__ */ jsx31(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2428
+ },
2429
+ i
2236
2430
  );
2237
2431
  })
2238
2432
  }
@@ -2286,10 +2480,11 @@ function DataTable({
2286
2480
  break;
2287
2481
  }
2288
2482
  if (typeof column.width !== "number") {
2289
- if (IS_DEV2) warnOnce2(
2290
- `pin-width:${column.key}`,
2291
- `DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
2292
- );
2483
+ if (IS_DEV2)
2484
+ warnOnce2(
2485
+ `pin-width:${column.key}`,
2486
+ `DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
2487
+ );
2293
2488
  broke = "width";
2294
2489
  break;
2295
2490
  }
@@ -2393,7 +2588,9 @@ function DataTable({
2393
2588
  {
2394
2589
  size: 12,
2395
2590
  name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
2396
- style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
2591
+ style: {
2592
+ color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)"
2593
+ }
2397
2594
  }
2398
2595
  ) : null
2399
2596
  ] })
@@ -2402,44 +2599,53 @@ function DataTable({
2402
2599
  )
2403
2600
  ))
2404
2601
  ] }),
2405
- /* @__PURE__ */ jsx32(TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ jsxs23("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2406
- /* @__PURE__ */ jsx32("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2407
- Array.from({ length: skeletonRows }, (_, i) => (
2408
- // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2409
- /* @__PURE__ */ jsx32(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2410
- ))
2411
- ] }) : /* @__PURE__ */ jsx32("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }), children: body.flatMap((row) => {
2412
- const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2413
- const record = /* @__PURE__ */ jsxs23(
2414
- Row,
2415
- {
2416
- id: row.id,
2417
- className: cx("pire-tr", presentation.get(row.id)?.className),
2418
- "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2419
- children: [
2420
- hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ jsx32(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2421
- columns.map((c) => {
2422
- const pin = pinProps(c.key);
2423
- return /* @__PURE__ */ jsx32(
2424
- Cell,
2425
- {
2426
- className: "pire-td",
2427
- "data-numeric": c.numeric ? "true" : void 0,
2428
- "data-tone": c.tone?.(row) ?? void 0,
2429
- ...pin,
2430
- style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2431
- children: c.render ? c.render(row) : row[c.key]
2432
- },
2433
- c.key
2434
- );
2435
- })
2436
- ]
2437
- },
2438
- row.id
2439
- );
2440
- if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2441
- return [record, /* @__PURE__ */ jsx32(Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ jsx32(Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))];
2442
- }) }),
2602
+ /* @__PURE__ */ jsx32(
2603
+ TableBody,
2604
+ {
2605
+ renderEmptyState: () => isLoading ? /* @__PURE__ */ jsxs23("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2606
+ /* @__PURE__ */ jsx32("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
2607
+ Array.from({ length: skeletonRows }, (_, i) => (
2608
+ // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2609
+ /* @__PURE__ */ jsx32(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2610
+ ))
2611
+ ] }) : /* @__PURE__ */ jsx32("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }),
2612
+ children: body.flatMap((row) => {
2613
+ const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2614
+ const record = /* @__PURE__ */ jsxs23(
2615
+ Row,
2616
+ {
2617
+ id: row.id,
2618
+ className: cx("pire-tr", presentation.get(row.id)?.className),
2619
+ "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2620
+ children: [
2621
+ hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ jsx32(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2622
+ columns.map((c) => {
2623
+ const pin = pinProps(c.key);
2624
+ return /* @__PURE__ */ jsx32(
2625
+ Cell,
2626
+ {
2627
+ className: "pire-td",
2628
+ "data-numeric": c.numeric ? "true" : void 0,
2629
+ "data-tone": c.tone?.(row) ?? void 0,
2630
+ ...pin,
2631
+ style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2632
+ children: c.render ? c.render(row) : row[c.key]
2633
+ },
2634
+ c.key
2635
+ );
2636
+ })
2637
+ ]
2638
+ },
2639
+ row.id
2640
+ );
2641
+ if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2642
+ return [
2643
+ record,
2644
+ /* @__PURE__ */ jsx32(Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ jsx32(Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))
2645
+ ];
2646
+ })
2647
+ }
2648
+ ),
2443
2649
  footer && !isLoading ? /* @__PURE__ */ jsx32(TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ jsxs23(Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
2444
2650
  hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-tf", ...pinProps(null) }) : null,
2445
2651
  columns.map((c, i) => {
@@ -2509,10 +2715,17 @@ function ValueHelpDialog({
2509
2715
  onClose,
2510
2716
  footer: /* @__PURE__ */ jsxs24(Fragment2, { children: [
2511
2717
  /* @__PURE__ */ jsx33(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
2512
- isMultiple ? /* @__PURE__ */ jsx33(Button, { variant: "primary", onPress: () => {
2513
- onConfirm?.(selectedKeys ?? []);
2514
- onClose?.();
2515
- }, children: msg.valueHelpConfirm }) : null
2718
+ isMultiple ? /* @__PURE__ */ jsx33(
2719
+ Button,
2720
+ {
2721
+ variant: "primary",
2722
+ onPress: () => {
2723
+ onConfirm?.(selectedKeys ?? []);
2724
+ onClose?.();
2725
+ },
2726
+ children: msg.valueHelpConfirm
2727
+ }
2728
+ ) : null
2516
2729
  ] }),
2517
2730
  children: /* @__PURE__ */ jsxs24("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2518
2731
  /* @__PURE__ */ jsx33(
@@ -2533,28 +2746,35 @@ function ValueHelpDialog({
2533
2746
  /* @__PURE__ */ jsx33(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
2534
2747
  /* @__PURE__ */ jsx33("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
2535
2748
  ] }) : null,
2536
- /* @__PURE__ */ jsx33("div", { onScroll: onLoadMore ? (event) => {
2537
- const el = event.currentTarget;
2538
- if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2539
- } : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ jsx33(
2540
- DataTable,
2749
+ /* @__PURE__ */ jsx33(
2750
+ "div",
2541
2751
  {
2542
- "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
2543
- density: "condensed",
2544
- columns,
2545
- rows: filtered,
2546
- isLoading,
2547
- emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
2548
- selectable: isMultiple ? "multiple" : void 0,
2549
- hideSelectAll: isMultiple,
2550
- selected: isMultiple ? selectedKeys : void 0,
2551
- onSelectionChange: isMultiple ? onSelectionChange : void 0,
2552
- onRowAction: isMultiple ? void 0 : (row) => {
2553
- onSelect?.(row);
2554
- onClose?.();
2555
- }
2752
+ onScroll: onLoadMore ? (event) => {
2753
+ const el = event.currentTarget;
2754
+ if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2755
+ } : void 0,
2756
+ style: { overflow: "auto", maxHeight: "48vh" },
2757
+ children: /* @__PURE__ */ jsx33(
2758
+ DataTable,
2759
+ {
2760
+ "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
2761
+ density: "condensed",
2762
+ columns,
2763
+ rows: filtered,
2764
+ isLoading,
2765
+ emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
2766
+ selectable: isMultiple ? "multiple" : void 0,
2767
+ hideSelectAll: isMultiple,
2768
+ selected: isMultiple ? selectedKeys : void 0,
2769
+ onSelectionChange: isMultiple ? onSelectionChange : void 0,
2770
+ onRowAction: isMultiple ? void 0 : (row) => {
2771
+ onSelect?.(row);
2772
+ onClose?.();
2773
+ }
2774
+ }
2775
+ )
2556
2776
  }
2557
- ) })
2777
+ )
2558
2778
  ] })
2559
2779
  }
2560
2780
  );
@@ -2700,7 +2920,9 @@ function screenFiles(files, { maxSize, acceptedFileTypes }) {
2700
2920
  continue;
2701
2921
  }
2702
2922
  if (acceptedFileTypes?.length) {
2703
- const ok = acceptedFileTypes.some((t) => t.startsWith(".") ? file.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? file.type.startsWith(t.slice(0, -1)) : file.type === t);
2923
+ const ok = acceptedFileTypes.some(
2924
+ (t) => t.startsWith(".") ? file.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? file.type.startsWith(t.slice(0, -1)) : file.type === t
2925
+ );
2704
2926
  if (!ok) {
2705
2927
  rejected.push({ file, reason: "type" });
2706
2928
  continue;
@@ -2737,9 +2959,12 @@ function FileUpload({
2737
2959
  const [uncontrolled, setUncontrolled] = React21.useState(defaultValue ?? []);
2738
2960
  const files = value ?? uncontrolled;
2739
2961
  const created = React21.useRef([]);
2740
- React21.useEffect(() => () => {
2741
- for (const url of created.current) URL.revokeObjectURL(url);
2742
- }, []);
2962
+ React21.useEffect(
2963
+ () => () => {
2964
+ for (const url of created.current) URL.revokeObjectURL(url);
2965
+ },
2966
+ []
2967
+ );
2743
2968
  const commit = (next) => {
2744
2969
  if (value === void 0) setUncontrolled(next);
2745
2970
  onChange?.(next);
@@ -2873,14 +3098,7 @@ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
2873
3098
  function Menu({ minWidth, className, style, ...rest }) {
2874
3099
  const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
2875
3100
  const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
2876
- return /* @__PURE__ */ jsx38(
2877
- AriaMenu,
2878
- {
2879
- className: cx("pire-menu", className),
2880
- style: menuStyle,
2881
- ...rest
2882
- }
2883
- );
3101
+ return /* @__PURE__ */ jsx38(AriaMenu, { className: cx("pire-menu", className), style: menuStyle, ...rest });
2884
3102
  }
2885
3103
  var shortcutKeys = (shortcut) => {
2886
3104
  if (shortcut == null) return [];
@@ -2909,7 +3127,14 @@ function MenuItem({
2909
3127
  /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-label", children }),
2910
3128
  description ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-desc", children: description }) : null
2911
3129
  ] }),
2912
- keys.length ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ jsx38(Kbd, { size: "sm", children: cap }, `${cap}-${index}`)) }) : null
3130
+ keys.length ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ jsx38(
3131
+ Kbd,
3132
+ {
3133
+ size: "sm",
3134
+ children: cap
3135
+ },
3136
+ `${cap}-${index}`
3137
+ )) }) : null
2913
3138
  ]
2914
3139
  }
2915
3140
  );
@@ -2944,6 +3169,7 @@ function SideNav({
2944
3169
  onExpandedChange,
2945
3170
  collapsed,
2946
3171
  railFlyout = true,
3172
+ bordered = true,
2947
3173
  footer,
2948
3174
  className,
2949
3175
  ...rest
@@ -3052,6 +3278,7 @@ function SideNav({
3052
3278
  {
3053
3279
  className: cx("pire-sidenav", className),
3054
3280
  "data-collapsed": collapsed ? "true" : void 0,
3281
+ "data-bordered": bordered ? void 0 : "false",
3055
3282
  "aria-label": msg.sideNavLabel,
3056
3283
  ...rest,
3057
3284
  children: [
@@ -3243,7 +3470,9 @@ function childrenOfType(children, type, what, parent) {
3243
3470
  }
3244
3471
  if (!React24.isValidElement(child) || child.type !== type) {
3245
3472
  const isWrapper = React24.isValidElement(child) && typeof child.type !== "string" && !CONFIG_ELEMENTS.has(child.type);
3246
- throw new Error(`[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` + (isWrapper ? ` Configuration elements are read, not rendered, so ${parent} cannot see through a wrapper component.` : ""));
3473
+ throw new Error(
3474
+ `[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.` : "")
3475
+ );
3247
3476
  }
3248
3477
  out.push({ ...child.props, key: child.key != null ? String(child.key) : `${path}${i}` });
3249
3478
  });
@@ -3254,13 +3483,24 @@ function childrenOfType(children, type, what, parent) {
3254
3483
  function readTabs(children) {
3255
3484
  return childrenOfType(children, RibbonTab, "Ribbon.Tab", "Ribbon").map((tab) => ({
3256
3485
  ...tab,
3257
- groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map((group) => ({
3258
- ...group,
3259
- commands: childrenOfType(group.children, RibbonCommand, "Ribbon.Command", "Ribbon.Group")
3260
- }))
3486
+ groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map(
3487
+ (group) => ({
3488
+ ...group,
3489
+ commands: childrenOfType(
3490
+ group.children,
3491
+ RibbonCommand,
3492
+ "Ribbon.Command",
3493
+ "Ribbon.Group"
3494
+ )
3495
+ })
3496
+ )
3261
3497
  }));
3262
3498
  }
3263
- function Command({ command, selectionCount, inBar }) {
3499
+ function Command({
3500
+ command,
3501
+ selectionCount,
3502
+ inBar
3503
+ }) {
3264
3504
  const size = inBar ? "sm" : command.size ?? "sm";
3265
3505
  const isDisabled = command.isDisabled || command.requiresSelection === true && selectionCount === 0;
3266
3506
  return /* @__PURE__ */ jsxs35(
@@ -3307,7 +3547,13 @@ function useTrailingOverflow() {
3307
3547
  }, []);
3308
3548
  return [ref, overflow];
3309
3549
  }
3310
- function Surface({ className, id, label, trailing, children }) {
3550
+ function Surface({
3551
+ className,
3552
+ id,
3553
+ label,
3554
+ trailing,
3555
+ children
3556
+ }) {
3311
3557
  const [scrollRef, overflow] = useTrailingOverflow();
3312
3558
  const domId = id ? { id } : {};
3313
3559
  return /* @__PURE__ */ jsxs35(Toolbar, { ...domId, className, "aria-label": label, children: [
@@ -3348,10 +3594,13 @@ function Ribbon({
3348
3594
  const [ownTab, setOwnTab] = React24.useState(defaultValue);
3349
3595
  const requested = value ?? ownTab;
3350
3596
  const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;
3351
- const select = React24.useCallback((id) => {
3352
- setOwnTab(id);
3353
- onChange?.(id);
3354
- }, [onChange]);
3597
+ const select = React24.useCallback(
3598
+ (id) => {
3599
+ setOwnTab(id);
3600
+ onChange?.(id);
3601
+ },
3602
+ [onChange]
3603
+ );
3355
3604
  const hadSelection = React24.useRef(false);
3356
3605
  React24.useEffect(() => {
3357
3606
  const has = count > 0;
@@ -3447,7 +3696,15 @@ var KIND_ICON = {
3447
3696
  warning: "alert-triangle",
3448
3697
  error: "alert-octagon"
3449
3698
  };
3450
- function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
3699
+ function InlineMessage({
3700
+ kind = "info",
3701
+ title,
3702
+ action,
3703
+ onClose,
3704
+ children,
3705
+ className,
3706
+ ...rest
3707
+ }) {
3451
3708
  const msg = usePireMessages();
3452
3709
  const assertive = kind === "error" || kind === "warning";
3453
3710
  return /* @__PURE__ */ jsxs36(
@@ -3480,7 +3737,14 @@ var KIND_ICON2 = {
3480
3737
  warning: "alert-triangle",
3481
3738
  error: "alert-octagon"
3482
3739
  };
3483
- function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
3740
+ function Toast({
3741
+ kind = "success",
3742
+ onClose,
3743
+ position = "bottom-center",
3744
+ children,
3745
+ className,
3746
+ ...rest
3747
+ }) {
3484
3748
  const msg = usePireMessages();
3485
3749
  return /* @__PURE__ */ jsxs37(
3486
3750
  "div",
@@ -3499,21 +3763,36 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
3499
3763
  );
3500
3764
  }
3501
3765
  var ToastContext = React25.createContext(null);
3502
- function ToastProvider({ children, timeout = 6e3 }) {
3766
+ function ToastProvider({
3767
+ children,
3768
+ timeout = 6e3
3769
+ }) {
3503
3770
  const msg = usePireMessages();
3504
3771
  const [toasts, setToasts] = React25.useState([]);
3505
3772
  const close = React25.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3506
- const add = React25.useCallback((toast) => {
3507
- const id = Math.random().toString(36).slice(2);
3508
- setToasts((t) => [...t, { ...toast, id }]);
3509
- const ms = toast.timeout ?? timeout;
3510
- if (ms > 0) setTimeout(() => close(id), ms);
3511
- return id;
3512
- }, [close, timeout]);
3773
+ const add = React25.useCallback(
3774
+ (toast) => {
3775
+ const id = Math.random().toString(36).slice(2);
3776
+ setToasts((t) => [...t, { ...toast, id }]);
3777
+ const ms = toast.timeout ?? timeout;
3778
+ if (ms > 0) setTimeout(() => close(id), ms);
3779
+ return id;
3780
+ },
3781
+ [close, timeout]
3782
+ );
3513
3783
  const value = React25.useMemo(() => ({ add, close }), [add, close]);
3514
3784
  return /* @__PURE__ */ jsxs37(ToastContext.Provider, { value, children: [
3515
3785
  children,
3516
- /* @__PURE__ */ jsx46("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx46(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
3786
+ /* @__PURE__ */ jsx46("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx46(
3787
+ Toast,
3788
+ {
3789
+ kind: t.kind,
3790
+ onClose: () => close(t.id),
3791
+ style: { position: "static", transform: "none" },
3792
+ children: t.message
3793
+ },
3794
+ t.id
3795
+ )) })
3517
3796
  ] });
3518
3797
  }
3519
3798
  function useToast() {
@@ -3561,7 +3840,17 @@ function KpiTile({
3561
3840
 
3562
3841
  // src/components/data/ObjectHeader.tsx
3563
3842
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
3564
- function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
3843
+ function ObjectHeader({
3844
+ title,
3845
+ subtitle,
3846
+ id,
3847
+ breadcrumb,
3848
+ badge,
3849
+ facts,
3850
+ actions,
3851
+ className,
3852
+ ...rest
3853
+ }) {
3565
3854
  return /* @__PURE__ */ jsxs39("header", { className: cx("pire-objheader", className), ...rest, children: [
3566
3855
  breadcrumb,
3567
3856
  /* @__PURE__ */ jsxs39("div", { className: "pire-objheader-row", children: [
@@ -3577,7 +3866,15 @@ function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions,
3577
3866
  ] }),
3578
3867
  facts?.length ? /* @__PURE__ */ jsx48("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs39("div", { children: [
3579
3868
  /* @__PURE__ */ jsx48("dt", { className: "pire-fact-label", children: fact.label }),
3580
- /* @__PURE__ */ jsx48("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
3869
+ /* @__PURE__ */ jsx48(
3870
+ "dd",
3871
+ {
3872
+ className: "pire-fact-value",
3873
+ "data-numeric": fact.numeric ? "true" : void 0,
3874
+ style: { margin: 0 },
3875
+ children: fact.value
3876
+ }
3877
+ )
3581
3878
  ] }, fact.label)) }) : null
3582
3879
  ] });
3583
3880
  }
@@ -3616,7 +3913,14 @@ function FilterBar({
3616
3913
 
3617
3914
  // src/components/data/DescriptionList.tsx
3618
3915
  import { jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
3619
- function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
3916
+ function DescriptionList({
3917
+ items,
3918
+ layout = "rows",
3919
+ columns = 3,
3920
+ className,
3921
+ style,
3922
+ ...rest
3923
+ }) {
3620
3924
  return /* @__PURE__ */ jsx50(
3621
3925
  "dl",
3622
3926
  {
@@ -3674,10 +3978,7 @@ function linearScale(values, tickCount = 4, startAtZero = true) {
3674
3978
  const min = toStepPrecision(Math.floor(low / step + EDGE_TOLERANCE) * step);
3675
3979
  const max = toStepPrecision(Math.ceil(high / step - EDGE_TOLERANCE) * step);
3676
3980
  const stepCount = Math.round((max - min) / step);
3677
- const ticks = Array.from(
3678
- { length: stepCount + 1 },
3679
- (_, index) => toStepPrecision(min + index * step)
3680
- );
3981
+ const ticks = Array.from({ length: stepCount + 1 }, (_, index) => toStepPrecision(min + index * step));
3681
3982
  return { min, max, ticks };
3682
3983
  }
3683
3984
  function scalePosition(value, scale) {
@@ -3705,10 +4006,14 @@ function warnOnDonutShape(series, categoryCount, chartLabel) {
3705
4006
  complaints.push(`it has ${series.length} series but a donut draws one \u2014 the rest are ignored`);
3706
4007
  }
3707
4008
  if (categoryCount > VIZ_SLOT_COUNT) {
3708
- complaints.push(`it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; past about four, slices stop being readable at all \u2014 group the tail into "Other"`);
4009
+ complaints.push(
4010
+ `it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; past about four, slices stop being readable at all \u2014 group the tail into "Other"`
4011
+ );
3709
4012
  }
3710
4013
  if (series[0]?.values.some((value) => value != null && value < 0)) {
3711
- complaints.push("it contains negative values, which have no part-to-whole meaning \u2014 a signed measure belongs in a bar chart");
4014
+ complaints.push(
4015
+ "it contains negative values, which have no part-to-whole meaning \u2014 a signed measure belongs in a bar chart"
4016
+ );
3712
4017
  }
3713
4018
  if (complaints.length === 0) return;
3714
4019
  warnedCharts.add(`donut:${chartLabel}`);
@@ -3721,7 +4026,9 @@ function flatValues(series) {
3721
4026
  return series.flatMap((one) => one.values);
3722
4027
  }
3723
4028
  function alignToCategories(series, categoryCount) {
3724
- return series.map((one) => one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) });
4029
+ return series.map(
4030
+ (one) => one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) }
4031
+ );
3725
4032
  }
3726
4033
 
3727
4034
  // src/components/data/ChartFrame.tsx
@@ -3980,10 +4287,12 @@ function LineChart({
3980
4287
  },
3981
4288
  tick
3982
4289
  )),
3983
- categories.map((category, index) => index % labelEvery === 0 ? (
3984
- // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3985
- /* @__PURE__ */ jsx54("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
3986
- ) : null)
4290
+ categories.map(
4291
+ (category, index) => index % labelEvery === 0 ? (
4292
+ // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4293
+ /* @__PURE__ */ jsx54("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
4294
+ ) : null
4295
+ )
3987
4296
  ] }),
3988
4297
  showArea && series[0] ? /* @__PURE__ */ jsx54(
3989
4298
  "path",
@@ -3994,19 +4303,20 @@ function LineChart({
3994
4303
  }
3995
4304
  ) : null,
3996
4305
  /* @__PURE__ */ jsx54("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ jsx54("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
3997
- withMarkers ? /* @__PURE__ */ jsx54("g", { className: "pire-chart-marker", children: series.map((one, seriesIndex) => one.values.map((value, index) => value == null ? null : (
3998
- // biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.
3999
- /* @__PURE__ */ jsx54(
4000
- "circle",
4001
- {
4002
- cx: xAt(index),
4003
- cy: yAt(value),
4004
- r: 4,
4005
- fill: seriesColor(one, seriesIndex)
4006
- },
4007
- `${one.id}-${index}`
4306
+ withMarkers ? /* @__PURE__ */ jsx54("g", { className: "pire-chart-marker", children: series.map(
4307
+ (one, seriesIndex) => one.values.map(
4308
+ (value, index) => value == null ? null : /* @__PURE__ */ jsx54(
4309
+ "circle",
4310
+ {
4311
+ cx: xAt(index),
4312
+ cy: yAt(value),
4313
+ r: 4,
4314
+ fill: seriesColor(one, seriesIndex)
4315
+ },
4316
+ `${one.id}-${index}`
4317
+ )
4008
4318
  )
4009
- ))) }) : null
4319
+ ) }) : null
4010
4320
  ]
4011
4321
  }
4012
4322
  ) : null,
@@ -4014,7 +4324,9 @@ function LineChart({
4014
4324
  "div",
4015
4325
  {
4016
4326
  className: "pire-chart-hover",
4017
- style: { inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px` },
4327
+ style: {
4328
+ inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px`
4329
+ },
4018
4330
  children: categories.map((category, categoryIndex) => (
4019
4331
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
4020
4332
  /* @__PURE__ */ jsx54("div", { className: "pire-chart-band", children: /* @__PURE__ */ jsxs45("span", { className: "pire-chart-tip", role: "presentation", children: [
@@ -4154,15 +4466,31 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
4154
4466
 
4155
4467
  // src/components/data/RecordCard.tsx
4156
4468
  import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
4157
- function RecordCard({ title, subtitle, icon, action, isDisabled, className, ...rest }) {
4158
- return /* @__PURE__ */ jsxs48("div", { className: cx("pire-recordcard", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
4159
- icon ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ jsx57(Icon, { name: icon, size: 20 }) }) : null,
4160
- /* @__PURE__ */ jsxs48("span", { className: "pire-recordcard-body", children: [
4161
- /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-title", children: title }),
4162
- subtitle ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4163
- ] }),
4164
- action ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-action", children: action }) : null
4165
- ] });
4469
+ function RecordCard({
4470
+ title,
4471
+ subtitle,
4472
+ icon,
4473
+ action,
4474
+ isDisabled,
4475
+ className,
4476
+ ...rest
4477
+ }) {
4478
+ return /* @__PURE__ */ jsxs48(
4479
+ "div",
4480
+ {
4481
+ className: cx("pire-recordcard", className),
4482
+ "data-disabled": isDisabled ? "true" : void 0,
4483
+ ...rest,
4484
+ children: [
4485
+ icon ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ jsx57(Icon, { name: icon, size: 20 }) }) : null,
4486
+ /* @__PURE__ */ jsxs48("span", { className: "pire-recordcard-body", children: [
4487
+ /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-title", children: title }),
4488
+ subtitle ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4489
+ ] }),
4490
+ action ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-action", children: action }) : null
4491
+ ]
4492
+ }
4493
+ );
4166
4494
  }
4167
4495
 
4168
4496
  // src/components/data/ViewSwitcher.tsx
@@ -4262,7 +4590,14 @@ function SectionHeader({ title, meta, actions, className, ...rest }) {
4262
4590
 
4263
4591
  // src/components/layout/SelectionBar.tsx
4264
4592
  import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
4265
- function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
4593
+ function SelectionBar({
4594
+ count,
4595
+ noun = "record",
4596
+ children,
4597
+ actions,
4598
+ className,
4599
+ ...rest
4600
+ }) {
4266
4601
  if (!count) return null;
4267
4602
  return /* @__PURE__ */ jsxs53("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
4268
4603
  /* @__PURE__ */ jsxs53("span", { className: "pire-selectionbar-count", children: [
@@ -4361,7 +4696,14 @@ function ConfirmDialog({
4361
4696
  // pairs with an explicit role for the same reason.
4362
4697
  /* @__PURE__ */ jsx66("div", { className: "pire-confirm-facts", role: "group", "aria-label": msg.confirmDialogFactsLabel, children: /* @__PURE__ */ jsx66(DescriptionList, { layout: "rows", items: facts }) })
4363
4698
  ) : null,
4364
- consequence ? /* @__PURE__ */ jsx66(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
4699
+ consequence ? /* @__PURE__ */ jsx66(
4700
+ InlineMessage,
4701
+ {
4702
+ kind: tone === "danger" ? "error" : "warning",
4703
+ style: { marginBottom: children ? "var(--sp-3)" : 0 },
4704
+ children: consequence
4705
+ }
4706
+ ) : null,
4365
4707
  children
4366
4708
  ]
4367
4709
  }
@@ -4413,10 +4755,13 @@ function CommandPalette({
4413
4755
  for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
4414
4756
  return byId;
4415
4757
  }, [groups]);
4416
- const filter = React28.useCallback((textValue, inputValue, node) => {
4417
- if (node.parentKey === RESULTS_SECTION_KEY) return true;
4418
- return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
4419
- }, [contains, searchableById]);
4758
+ const filter = React28.useCallback(
4759
+ (textValue, inputValue, node) => {
4760
+ if (node.parentKey === RESULTS_SECTION_KEY) return true;
4761
+ return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
4762
+ },
4763
+ [contains, searchableById]
4764
+ );
4420
4765
  const handleInputChange = (value) => {
4421
4766
  setQuery(value);
4422
4767
  onSearch?.(value);
@@ -4549,7 +4894,10 @@ function AppLauncher({
4549
4894
  if (isFilteredExternally) return sections;
4550
4895
  const q = query.trim();
4551
4896
  if (!q) return sections;
4552
- return sections.map((section) => ({ ...section, items: section.items.filter((i) => contains(searchableText2(i), q)) })).filter((section) => section.items.length > 0);
4897
+ return sections.map((section) => ({
4898
+ ...section,
4899
+ items: section.items.filter((i) => contains(searchableText2(i), q))
4900
+ })).filter((section) => section.items.length > 0);
4553
4901
  }, [sections, query, isFilteredExternally, contains]);
4554
4902
  const isEmpty = !isLoading && visible.length === 0;
4555
4903
  const label = ariaLabel ?? msg.appLauncherLabel;
@@ -4606,7 +4954,13 @@ function AppLauncher({
4606
4954
  onAction?.(item.id);
4607
4955
  },
4608
4956
  children: [
4609
- item.icon ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ jsx68(Icon, { name: item.icon, size: (section.variant ?? "tile") === "tile" ? 20 : 16 }) }) : null,
4957
+ item.icon ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ jsx68(
4958
+ Icon,
4959
+ {
4960
+ name: item.icon,
4961
+ size: (section.variant ?? "tile") === "tile" ? 20 : 16
4962
+ }
4963
+ ) }) : null,
4610
4964
  /* @__PURE__ */ jsxs58("span", { className: "pire-launcher-item-text", children: [
4611
4965
  /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-label", children: item.label }),
4612
4966
  showsDescription ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-desc", children: item.description }) : null
@@ -4627,7 +4981,16 @@ function AppLauncher({
4627
4981
  // src/components/patterns/SidePanel.tsx
4628
4982
  import { ModalOverlay as ModalOverlay3, Modal as Modal3, Dialog as AriaDialog6, Heading as Heading5 } from "react-aria-components";
4629
4983
  import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
4630
- function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
4984
+ function SidePanel({
4985
+ isOpen,
4986
+ title,
4987
+ subtitle,
4988
+ width = 400,
4989
+ children,
4990
+ footer,
4991
+ onClose,
4992
+ className
4993
+ }) {
4631
4994
  const msg = usePireMessages();
4632
4995
  return /* @__PURE__ */ jsx69(
4633
4996
  ModalOverlay3,
@@ -4655,7 +5018,15 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
4655
5018
 
4656
5019
  // src/components/patterns/EmptyState.tsx
4657
5020
  import { jsx as jsx70, jsxs as jsxs60 } from "react/jsx-runtime";
4658
- function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
5021
+ function EmptyState({
5022
+ icon = "file-text",
5023
+ title,
5024
+ action,
5025
+ compact,
5026
+ children,
5027
+ className,
5028
+ ...rest
5029
+ }) {
4659
5030
  return /* @__PURE__ */ jsxs60("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
4660
5031
  /* @__PURE__ */ jsx70(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
4661
5032
  title ? /* @__PURE__ */ jsx70("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
@@ -4666,6 +5037,7 @@ function EmptyState({ icon = "file-text", title, action, compact, children, clas
4666
5037
 
4667
5038
  // src/components/patterns/NumPad.tsx
4668
5039
  import * as React30 from "react";
5040
+ import { useLocale as useLocale2 } from "react-aria-components";
4669
5041
  import { jsx as jsx71, jsxs as jsxs61 } from "react/jsx-runtime";
4670
5042
  var BASE_KEYS = [
4671
5043
  { value: "7" },
@@ -4682,6 +5054,12 @@ var BASE_KEYS = [
4682
5054
  { value: "0" }
4683
5055
  ];
4684
5056
  var isInsertable = (value) => /^[0-9]+$/.test(value);
5057
+ function fittingDigits(digits, buffer, separator, maxFractionDigits) {
5058
+ const separatorAt = buffer.indexOf(separator);
5059
+ if (separatorAt === -1) return digits;
5060
+ const room = maxFractionDigits - (buffer.length - separatorAt - 1);
5061
+ return room <= 0 ? "" : digits.slice(0, room);
5062
+ }
4685
5063
  function useNumPadKeyboard(onKey, isDisabled, containerRef) {
4686
5064
  const handler = React30.useRef(onKey);
4687
5065
  handler.current = onKey;
@@ -4709,6 +5087,10 @@ function useNumPadKeyboard(onKey, isDisabled, containerRef) {
4709
5087
  handler.current("clear");
4710
5088
  return;
4711
5089
  }
5090
+ if (event.key === "," || event.key === ".") {
5091
+ handler.current("decimal");
5092
+ return;
5093
+ }
4712
5094
  };
4713
5095
  document.addEventListener("keydown", onKeyDown);
4714
5096
  return () => document.removeEventListener("keydown", onKeyDown);
@@ -4721,6 +5103,7 @@ function NumPad({
4721
5103
  onChange,
4722
5104
  extraKeys = [],
4723
5105
  onAction,
5106
+ maxFractionDigits,
4724
5107
  isDisabled,
4725
5108
  size = "md",
4726
5109
  className,
@@ -4728,24 +5111,41 @@ function NumPad({
4728
5111
  }) {
4729
5112
  const msg = usePireMessages();
4730
5113
  const containerRef = React30.useRef(null);
4731
- const applyKey = React30.useCallback((key) => {
4732
- if (isDisabled) return;
4733
- if (key.value === "backspace") {
4734
- onChange(value.slice(0, -1));
4735
- return;
4736
- }
4737
- if (key.value === "clear") {
4738
- onChange("");
4739
- return;
4740
- }
4741
- if (isInsertable(key.value)) {
4742
- onChange(value + key.value);
4743
- return;
4744
- }
4745
- onAction?.(key.value);
4746
- }, [isDisabled, value, onChange, onAction]);
5114
+ const { locale } = useLocale2();
5115
+ const separator = decimalSeparatorFor(locale);
5116
+ const allowsDecimal = maxFractionDigits !== void 0 && maxFractionDigits > 0;
5117
+ const applyKey = React30.useCallback(
5118
+ (key) => {
5119
+ if (isDisabled) return;
5120
+ if (key.value === "backspace") {
5121
+ onChange(value.slice(0, -1));
5122
+ return;
5123
+ }
5124
+ if (key.value === "clear") {
5125
+ onChange("");
5126
+ return;
5127
+ }
5128
+ if (key.value === "decimal") {
5129
+ if (!allowsDecimal || value.includes(separator)) return;
5130
+ onChange((value === "" ? "0" : value) + separator);
5131
+ return;
5132
+ }
5133
+ if (isInsertable(key.value)) {
5134
+ onChange(
5135
+ value + (allowsDecimal ? fittingDigits(key.value, value, separator, maxFractionDigits) : key.value)
5136
+ );
5137
+ return;
5138
+ }
5139
+ onAction?.(key.value);
5140
+ },
5141
+ [isDisabled, value, onChange, onAction, allowsDecimal, separator, maxFractionDigits]
5142
+ );
4747
5143
  useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);
4748
- const keys = [...BASE_KEYS, ...extraKeys];
5144
+ const keys = [
5145
+ ...BASE_KEYS,
5146
+ ...allowsDecimal ? [{ value: "decimal", label: separator }] : [],
5147
+ ...extraKeys
5148
+ ];
4749
5149
  return /* @__PURE__ */ jsxs61(
4750
5150
  "div",
4751
5151
  {
@@ -4757,7 +5157,7 @@ function NumPad({
4757
5157
  children: [
4758
5158
  target !== void 0 ? /* @__PURE__ */ jsx71("div", { className: "pire-numpad-target", role: "status", "aria-live": "polite", children: target }) : null,
4759
5159
  /* @__PURE__ */ jsx71("div", { className: "pire-numpad-grid", role: "group", "aria-label": ariaLabel, children: keys.map((key) => {
4760
- const accessibleLabel = key.value === "backspace" ? msg.numPadBackspace : key.value === "clear" ? msg.numPadClear : void 0;
5160
+ const accessibleLabel = key.value === "backspace" ? msg.numPadBackspace : key.value === "clear" ? msg.numPadClear : key.value === "decimal" ? msg.numPadDecimal : void 0;
4761
5161
  return /* @__PURE__ */ jsx71(
4762
5162
  Button,
4763
5163
  {
@@ -4766,6 +5166,7 @@ function NumPad({
4766
5166
  fullWidth: true,
4767
5167
  className: "pire-numpad-key",
4768
5168
  "data-span": key.span === 2 ? "2" : void 0,
5169
+ "data-key": key.value === "decimal" ? "decimal" : void 0,
4769
5170
  isDisabled,
4770
5171
  "aria-label": accessibleLabel,
4771
5172
  onPress: () => applyKey(key),
@@ -4813,9 +5214,12 @@ function FileDropZone({
4813
5214
  const [uncontrolled, setUncontrolled] = React31.useState(defaultValue ?? []);
4814
5215
  const files = value ?? uncontrolled;
4815
5216
  const created = React31.useRef([]);
4816
- React31.useEffect(() => () => {
4817
- for (const url of created.current) URL.revokeObjectURL(url);
4818
- }, []);
5217
+ React31.useEffect(
5218
+ () => () => {
5219
+ for (const url of created.current) URL.revokeObjectURL(url);
5220
+ },
5221
+ []
5222
+ );
4819
5223
  const commit = (next) => {
4820
5224
  if (value === void 0) setUncontrolled(next);
4821
5225
  onChange?.(next);
@@ -4846,9 +5250,7 @@ function FileDropZone({
4846
5250
  "data-height": height,
4847
5251
  isDisabled: isDisabled || isReadOnly,
4848
5252
  onDrop: async (e) => {
4849
- const dropped = await Promise.all(
4850
- e.items.filter(isFileDropItem).map((item) => item.getFile())
4851
- );
5253
+ const dropped = await Promise.all(e.items.filter(isFileDropItem).map((item) => item.getFile()));
4852
5254
  accept(dropped);
4853
5255
  },
4854
5256
  children: [
@@ -4887,7 +5289,14 @@ function FileDropZone({
4887
5289
  }
4888
5290
 
4889
5291
  // src/index.ts
4890
- import { DialogTrigger as DialogTrigger2, MenuTrigger as MenuTrigger3, SubmenuTrigger, Popover as Popover9, RouterProvider, I18nProvider } from "react-aria-components";
5292
+ import {
5293
+ DialogTrigger as DialogTrigger2,
5294
+ MenuTrigger as MenuTrigger3,
5295
+ SubmenuTrigger,
5296
+ Popover as Popover9,
5297
+ RouterProvider,
5298
+ I18nProvider
5299
+ } from "react-aria-components";
4891
5300
  import { Focusable as Focusable2 } from "react-aria-components";
4892
5301
  export {
4893
5302
  AppLauncher,