@orianatech/pire 1.2.0 → 1.4.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 (53) hide show
  1. package/dist/components/core/Tag.d.ts.map +1 -1
  2. package/dist/components/core/icon-data.generated.d.ts.map +1 -1
  3. package/dist/components/core/icon-map.d.ts.map +1 -1
  4. package/dist/components/data/BarList.d.cts +30 -0
  5. package/dist/components/data/BarList.d.ts +31 -0
  6. package/dist/components/data/BarList.d.ts.map +1 -0
  7. package/dist/components/data/DataTable.d.cts +45 -3
  8. package/dist/components/data/DataTable.d.ts +45 -3
  9. package/dist/components/data/DataTable.d.ts.map +1 -1
  10. package/dist/components/data/RecordCard.d.cts +28 -0
  11. package/dist/components/data/RecordCard.d.ts +29 -0
  12. package/dist/components/data/RecordCard.d.ts.map +1 -0
  13. package/dist/components/data/ViewSwitcher.d.cts +32 -0
  14. package/dist/components/data/ViewSwitcher.d.ts +33 -0
  15. package/dist/components/data/ViewSwitcher.d.ts.map +1 -0
  16. package/dist/components/feedback/Tooltip.d.cts +18 -0
  17. package/dist/components/feedback/Tooltip.d.ts +18 -0
  18. package/dist/components/feedback/Tooltip.d.ts.map +1 -1
  19. package/dist/components/forms/ChoiceCardGroup.d.cts +50 -0
  20. package/dist/components/forms/ChoiceCardGroup.d.ts +51 -0
  21. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -0
  22. package/dist/components/forms/NumberField.d.cts +18 -1
  23. package/dist/components/forms/NumberField.d.ts +18 -1
  24. package/dist/components/forms/NumberField.d.ts.map +1 -1
  25. package/dist/components/forms/QuantityStepper.d.cts +28 -0
  26. package/dist/components/forms/QuantityStepper.d.ts +29 -0
  27. package/dist/components/forms/QuantityStepper.d.ts.map +1 -0
  28. package/dist/components/navigation/Ribbon.d.cts +75 -0
  29. package/dist/components/navigation/Ribbon.d.ts +76 -0
  30. package/dist/components/navigation/Ribbon.d.ts.map +1 -0
  31. package/dist/components/patterns/ConfirmDialog.d.cts +8 -1
  32. package/dist/components/patterns/ConfirmDialog.d.ts +8 -1
  33. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
  34. package/dist/components/patterns/NumPad.d.cts +60 -0
  35. package/dist/components/patterns/NumPad.d.ts +61 -0
  36. package/dist/components/patterns/NumPad.d.ts.map +1 -0
  37. package/dist/components/patterns/ValueHelpDialog.d.cts +23 -1
  38. package/dist/components/patterns/ValueHelpDialog.d.ts +23 -1
  39. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  40. package/dist/components.css +221 -0
  41. package/dist/i18n/messages.d.cts +48 -0
  42. package/dist/i18n/messages.d.ts +48 -0
  43. package/dist/i18n/messages.d.ts.map +1 -1
  44. package/dist/index.cjs +1437 -831
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.d.cts +8 -1
  47. package/dist/index.d.ts +8 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +1359 -760
  50. package/dist/index.js.map +1 -1
  51. package/dist/tokens/colors.css +7 -0
  52. package/dist/tokens/themes.css +3 -0
  53. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -95,6 +95,7 @@ var ICON_MARKUP = {
95
95
  "percentage": '<path d="M9,14a5,5,0,1,1,5-5A5.0055,5.0055,0,0,1,9,14ZM9,6a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,9,6Z"/><path d="M.029 15H31.97V17H.029z" transform="rotate(-45 16 16)"/><path d="M23,28a5,5,0,1,1,5-5A5.0055,5.0055,0,0,1,23,28Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,23,20Z"/>',
96
96
  "phone": '<path d="M26,29h-.17C6.18,27.87,3.39,11.29,3,6.23A3,3,0,0,1,5.76,3h5.51a2,2,0,0,1,1.86,1.26L14.65,8a2,2,0,0,1-.44,2.16l-2.13,2.15a9.37,9.37,0,0,0,7.58,7.6l2.17-2.15A2,2,0,0,1,24,17.35l3.77,1.51A2,2,0,0,1,29,20.72V26A3,3,0,0,1,26,29ZM6,5A1,1,0,0,0,5,6v.08C5.46,12,8.41,26,25.94,27A1,1,0,0,0,27,26.06V20.72l-3.77-1.51-2.87,2.85L19.88,22C11.18,20.91,10,12.21,10,12.12l-.06-.48,2.84-2.87L11.28,5Z"/>',
97
97
  "piggy-bank": '<path d="M16.5,14H20V12H18V11H16v1.0508A2.5,2.5,0,0,0,16.5,17h1a.5.5,0,0,1,0,1H14v2h2v1h2V19.9492A2.5,2.5,0,0,0,17.5,15h-1a.5.5,0,0,1,0-1Z"/><path d="M29,13H26.98A5.7789,5.7789,0,0,0,25,8.8525V5a1,1,0,0,0-1.6-.8L19.6665,7H15c-5.5095,0-9.4634,3.2412-9.9485,8H5a1.0009,1.0009,0,0,1-1-1V12H2v2a3.0033,3.0033,0,0,0,3,3h.07A9.1733,9.1733,0,0,0,9,23.5566V27a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V25h3v2a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V23.6372A5.0926,5.0926,0,0,0,26.8188,20H29a1,1,0,0,0,1-1V14A1,1,0,0,0,29,13Zm-1,5H25.124c-.3052,2.7529-.8235,3.4854-3.124,4.3154V26H20V23H13v3H11V22.3779A7.013,7.013,0,0,1,7,16c0-4.8354,4.0181-7,8-7h5.3335L23,7V9.7764c2.4182,1.8593,1.9126,3.186,2.0183,5.2236H28Z"/>',
98
+ "pin": '<path d="M28.59,13.31,30,11.9,20,2,18.69,3.42,19.87,4.6,8.38,14.32,6.66,12.61,5.25,14l5.66,5.68L2,28.58,3.41,30l8.91-8.91L18,26.75l1.39-1.42-1.71-1.71L27.4,12.13ZM16.26,22.2,9.8,15.74,21.29,6,26,10.71Z"/>',
98
99
  "portfolio": '<path d="M28,10H22V6a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v4H4a2,2,0,0,0-2,2V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V12A2,2,0,0,0,28,10ZM12,6h8v4H12ZM4,26V12H28V26Z"/>',
99
100
  "printer": '<path d="M28,9H25V3H7V9H4a2,2,0,0,0-2,2V21a2,2,0,0,0,2,2H7v6H25V23h3a2,2,0,0,0,2-2V11A2,2,0,0,0,28,9ZM9,5H23V9H9ZM23,27H9V17H23Zm5-6H25V15H7v6H4V11H28Z"/>',
100
101
  "purchase": '<path d="M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6Zm0,2v3H4V8ZM4,24V13H28V24Z"/><path d="M6 20H16V22H6z"/>',
@@ -130,6 +131,7 @@ var ICON_MARKUP = {
130
131
  "time": '<path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"/><path d="M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"/>',
131
132
  "trash-can": '<path d="M12 12H14V24H12z"/><path d="M18 12H20V24H18z"/><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"/><path d="M12 2H20V4H12z"/>',
132
133
  "undo": '<path d="M20,10H7.8149l3.5874-3.5859L10,5,4,11,10,17l1.4023-1.4146L7.8179,12H20a6,6,0,0,1,0,12H12v2h8a8,8,0,0,0,0-16Z"/>',
134
+ "upload": '<path d="M6 18 7.41 19.41 15 11.83 15 30 17 30 17 11.83 24.59 19.41 26 18 16 8 6 18z"/><path d="M6,8V4H26V8h2V4a2,2,0,0,0-2-2H6A2,2,0,0,0,4,4V8Z"/>',
133
135
  "user": '<path d="M16,4a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,16,2Z"/><path d="M26,30H24V25a5,5,0,0,0-5-5H13a5,5,0,0,0-5,5v5H6V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/>',
134
136
  "user--admin": '<path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/><path d="M22,30H20V25a5,5,0,0,0-5-5H9a5,5,0,0,0-5,5v5H2V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/><path d="M25 16.18 22.41 13.59 21 15 25 19 32 12 30.59 10.59 25 16.18z"/>',
135
137
  "user--follow": '<path d="M32 14 28 14 28 10 26 10 26 14 22 14 22 16 26 16 26 20 28 20 28 16 32 16 32 14z"/><path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"/><path d="M22,30H20V25a5,5,0,0,0-5-5H9a5,5,0,0,0-5,5v5H2V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"/>',
@@ -155,6 +157,11 @@ var CARBON_MAP = {
155
157
  "file-text": "document",
156
158
  "clipboard-list": "list--checked",
157
159
  "building-2": "building",
160
+ /* Ribbon and import commands. `task--complete` is Carbon's ticked-list glyph; `check-square`
161
+ already points at it, and the generator de-duplicates by slug, so this costs no bytes. */
162
+ "list-checks": "task--complete",
163
+ "pin": "pin",
164
+ "upload": "upload",
158
165
  "boxes": "box",
159
166
  "truck": "delivery-truck",
160
167
  "stamp": "checkmark--outline",
@@ -418,7 +425,9 @@ import * as React2 from "react";
418
425
  import { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow, Focusable } from "react-aria-components";
419
426
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
420
427
  function Tooltip({ label, placement = "top", delay = 500, children }) {
421
- const target = React2.isValidElement(children) ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", children });
428
+ const props = React2.isValidElement(children) ? children.props : void 0;
429
+ 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 });
422
431
  return /* @__PURE__ */ jsxs2(TooltipTrigger, { delay, closeDelay: 0, children: [
423
432
  /* @__PURE__ */ jsx3(Focusable, { children: target }),
424
433
  /* @__PURE__ */ jsxs2(AriaTooltip, { className: "pire-tooltip", placement, offset: 6, children: [
@@ -483,50 +492,244 @@ var Badge = React4.forwardRef(function Badge2({ children, status = "neutral", sh
483
492
  });
484
493
 
485
494
  // src/components/core/Tag.tsx
486
- import * as React5 from "react";
495
+ import * as React6 from "react";
487
496
  import { Button as AriaButton3 } from "react-aria-components";
488
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
489
- var Tag = React5.forwardRef(function Tag2({ children, onRemove, isDisabled, category, className, ...rest }, ref) {
497
+
498
+ // src/i18n/PireIntlProvider.tsx
499
+ import * as React5 from "react";
500
+
501
+ // src/i18n/messages.ts
502
+ var enMessages = {
503
+ filterBarLabel: "Filters",
504
+ filterBarGo: "Go",
505
+ filterBarClearAll: "Clear all",
506
+ dataTableSelectAll: "Select all rows",
507
+ dataTableSelectRow: "Select row",
508
+ dataTableSelectionColumn: "Selection",
509
+ dataTableLoading: "Loading records",
510
+ dataTableSummaryRow: "Summary",
511
+ dataTableEmpty: "No records match the current filters.",
512
+ dialogClose: "Close",
513
+ sidePanelClose: "Close panel",
514
+ inlineMessageDismiss: "Dismiss message",
515
+ toastDismiss: "Dismiss",
516
+ toastRegionLabel: "Notifications",
517
+ selectEmpty: "No options available",
518
+ comboBoxShowSuggestions: "Show suggestions",
519
+ comboBoxLoading: "Searching\u2026",
520
+ datePickerOpenCalendar: "Open calendar",
521
+ datePickerPreviousMonth: "Previous month",
522
+ datePickerNextMonth: "Next month",
523
+ dateRangePresetsLabel: "Date range shortcuts",
524
+ numberFieldIncrease: "Increase",
525
+ numberFieldDecrease: "Decrease",
526
+ inputClear: "Clear",
527
+ valueHelpFieldPlaceholder: "Not selected",
528
+ valueHelpFieldClear: "Clear selection",
529
+ valueHelpFieldOpenNamed: "Select {label}",
530
+ valueHelpFieldOpen: "Open value help",
531
+ valueHelpDialogSearch: "Search records",
532
+ valueHelpDialogTitle: "Select a record",
533
+ valueHelpDialogSearchPlaceholder: "Search by ID or name",
534
+ valueHelpDialogEmpty: "No records found",
535
+ valueHelpDialogCancel: "Cancel",
536
+ paginationLabel: "Pagination",
537
+ paginationRange: "{from}\u2013{to} of {total}",
538
+ paginationPageOf: "Page {page} of {pages}",
539
+ paginationPrevious: "Previous page",
540
+ paginationNext: "Next page",
541
+ paginationRowsPerPage: "Rows per page",
542
+ sideNavLabel: "Main navigation",
543
+ shellRailLabel: "Applications",
544
+ appLauncherLabel: "All applications",
545
+ appLauncherTitle: "All applications",
546
+ appLauncherSearch: "Search for an application",
547
+ appLauncherEmpty: "No application matches that search.",
548
+ appLauncherLoading: "Loading applications\u2026",
549
+ splitPaneList: "List",
550
+ splitPaneDetail: "Detail",
551
+ splitPaneBack: "Back to list",
552
+ fileUploadChoose: "Choose files",
553
+ fileUploadRemoveNamed: "Remove {name}",
554
+ fileUploadUploading: "Uploading",
555
+ fileDropZonePrompt: "Drag files here, or choose them",
556
+ shellBarUserMenu: "Account menu for {user}",
557
+ commandPaletteLabel: "Command palette",
558
+ commandPaletteSearchLabel: "Search commands and records",
559
+ commandPalettePlaceholder: "Search for a screen, an action or a record\u2026",
560
+ commandPaletteEmpty: "Nothing matches that",
561
+ commandPaletteLoading: "Searching\u2026",
562
+ commandPaletteHintNavigate: "navigate",
563
+ commandPaletteHintSelect: "open",
564
+ commandPaletteHintClose: "close",
565
+ chartCategoryHeader: "Category",
566
+ chartNoValue: "No data",
567
+ chartEmpty: "No data for this period",
568
+ numPadClear: "Clear",
569
+ numPadBackspace: "Remove last digit",
570
+ viewSwitcherName: "Saved views: {view}",
571
+ viewSwitcherNameModified: "Saved views: {view}, modified",
572
+ viewSwitcherModifiedMark: "\xB7 modified",
573
+ quantityStepperIncrease: "Increase quantity",
574
+ quantityStepperDecrease: "Decrease quantity",
575
+ confirmDialogFactsLabel: "Summary",
576
+ valueHelpSelectAllCount: "Select all ({count})",
577
+ valueHelpClearSelection: "Clear selection",
578
+ valueHelpSelectedCount: "Selected: {count}",
579
+ valueHelpConfirm: "Apply selection",
580
+ tagRemoveNamed: "Remove {name}",
581
+ tagRemove: "Remove",
582
+ ribbonLabel: "Commands",
583
+ ribbonCollapse: "Collapse the ribbon",
584
+ ribbonExpand: "Expand the ribbon"
585
+ };
586
+ var esMessages = {
587
+ filterBarLabel: "Filtros",
588
+ filterBarGo: "Buscar",
589
+ filterBarClearAll: "Limpiar todo",
590
+ dataTableSelectAll: "Seleccionar todas las filas",
591
+ dataTableSelectRow: "Seleccionar fila",
592
+ dataTableSelectionColumn: "Selecci\xF3n",
593
+ dataTableLoading: "Cargando registros",
594
+ dataTableSummaryRow: "Resumen",
595
+ dataTableEmpty: "Ning\xFAn registro coincide con los filtros actuales.",
596
+ dialogClose: "Cerrar",
597
+ sidePanelClose: "Cerrar panel",
598
+ inlineMessageDismiss: "Descartar mensaje",
599
+ toastDismiss: "Descartar",
600
+ toastRegionLabel: "Notificaciones",
601
+ selectEmpty: "Sin opciones disponibles",
602
+ comboBoxShowSuggestions: "Mostrar sugerencias",
603
+ comboBoxLoading: "Buscando\u2026",
604
+ datePickerOpenCalendar: "Abrir calendario",
605
+ datePickerPreviousMonth: "Mes anterior",
606
+ datePickerNextMonth: "Mes siguiente",
607
+ dateRangePresetsLabel: "Atajos de rango de fechas",
608
+ numberFieldIncrease: "Aumentar",
609
+ numberFieldDecrease: "Disminuir",
610
+ inputClear: "Limpiar",
611
+ valueHelpFieldPlaceholder: "Sin seleccionar",
612
+ valueHelpFieldClear: "Limpiar selecci\xF3n",
613
+ valueHelpFieldOpenNamed: "Seleccionar {label}",
614
+ valueHelpFieldOpen: "Abrir ayuda de valores",
615
+ valueHelpDialogSearch: "Buscar registros",
616
+ valueHelpDialogTitle: "Seleccionar un registro",
617
+ valueHelpDialogSearchPlaceholder: "Buscar por c\xF3digo o nombre",
618
+ valueHelpDialogEmpty: "No se encontraron registros",
619
+ valueHelpDialogCancel: "Cancelar",
620
+ paginationLabel: "Paginaci\xF3n",
621
+ paginationRange: "{from}\u2013{to} de {total}",
622
+ paginationPageOf: "P\xE1gina {page} de {pages}",
623
+ paginationPrevious: "P\xE1gina anterior",
624
+ paginationNext: "P\xE1gina siguiente",
625
+ paginationRowsPerPage: "Filas por p\xE1gina",
626
+ sideNavLabel: "Navegaci\xF3n principal",
627
+ shellRailLabel: "Aplicaciones",
628
+ appLauncherLabel: "Todas las aplicaciones",
629
+ appLauncherTitle: "Todas las aplicaciones",
630
+ appLauncherSearch: "Busc\xE1 una aplicaci\xF3n",
631
+ appLauncherEmpty: "Ninguna aplicaci\xF3n coincide con esa b\xFAsqueda.",
632
+ appLauncherLoading: "Cargando aplicaciones\u2026",
633
+ splitPaneList: "Lista",
634
+ splitPaneDetail: "Detalle",
635
+ splitPaneBack: "Volver a la lista",
636
+ fileUploadChoose: "Elegir archivos",
637
+ fileUploadRemoveNamed: "Quitar {name}",
638
+ fileUploadUploading: "Subiendo",
639
+ fileDropZonePrompt: "Arrastr\xE1 archivos ac\xE1, o elegilos",
640
+ shellBarUserMenu: "Men\xFA de cuenta de {user}",
641
+ commandPaletteLabel: "Paleta de comandos",
642
+ commandPaletteSearchLabel: "Buscar comandos y registros",
643
+ commandPalettePlaceholder: "Busc\xE1 una pantalla, una acci\xF3n o un registro\u2026",
644
+ commandPaletteEmpty: "No hay coincidencias",
645
+ commandPaletteLoading: "Buscando\u2026",
646
+ commandPaletteHintNavigate: "navegar",
647
+ commandPaletteHintSelect: "abrir",
648
+ commandPaletteHintClose: "cerrar",
649
+ chartCategoryHeader: "Categor\xEDa",
650
+ chartNoValue: "Sin datos",
651
+ chartEmpty: "Sin datos para este per\xEDodo",
652
+ numPadClear: "Limpiar",
653
+ numPadBackspace: "Borrar \xFAltimo d\xEDgito",
654
+ viewSwitcherName: "Vistas guardadas: {view}",
655
+ viewSwitcherNameModified: "Vistas guardadas: {view}, modificada",
656
+ viewSwitcherModifiedMark: "\xB7 modificada",
657
+ quantityStepperIncrease: "Aumentar cantidad",
658
+ quantityStepperDecrease: "Disminuir cantidad",
659
+ confirmDialogFactsLabel: "Resumen",
660
+ valueHelpSelectAllCount: "Seleccionar todo ({count})",
661
+ valueHelpClearSelection: "Limpiar selecci\xF3n",
662
+ valueHelpSelectedCount: "Seleccionadas: {count}",
663
+ valueHelpConfirm: "Aplicar selecci\xF3n",
664
+ tagRemoveNamed: "Quitar {name}",
665
+ tagRemove: "Quitar",
666
+ ribbonLabel: "Comandos",
667
+ ribbonCollapse: "Contraer la cinta",
668
+ ribbonExpand: "Expandir la cinta"
669
+ };
670
+
671
+ // src/i18n/PireIntlProvider.tsx
672
+ import { jsx as jsx6 } from "react/jsx-runtime";
673
+ var MessagesContext = React5.createContext(enMessages);
674
+ function PireIntlProvider({ messages, children }) {
675
+ const value = React5.useMemo(
676
+ () => messages ? { ...enMessages, ...messages } : enMessages,
677
+ [messages]
678
+ );
679
+ return /* @__PURE__ */ jsx6(MessagesContext.Provider, { value, children });
680
+ }
681
+ function usePireMessages() {
682
+ return React5.useContext(MessagesContext);
683
+ }
684
+ function useMessage(key, override) {
685
+ const messages = React5.useContext(MessagesContext);
686
+ return override ?? messages[key];
687
+ }
688
+
689
+ // src/components/core/Tag.tsx
690
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
691
+ var Tag = React6.forwardRef(function Tag2({ children, onRemove, isDisabled, category, className, ...rest }, ref) {
692
+ const msg = usePireMessages();
490
693
  return /* @__PURE__ */ jsxs5("span", { ref, className: cx("pire-tag", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
491
- category ? /* @__PURE__ */ jsx6("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
694
+ category ? /* @__PURE__ */ jsx7("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
492
695
  children,
493
- onRemove ? /* @__PURE__ */ jsx6(
696
+ onRemove ? /* @__PURE__ */ jsx7(
494
697
  AriaButton3,
495
698
  {
496
699
  className: "pire-tag-remove",
497
700
  isDisabled,
498
701
  onPress: onRemove,
499
- "aria-label": `Remove ${typeof children === "string" ? children : "filter"}`,
500
- children: /* @__PURE__ */ jsx6(Icon, { name: "x", size: 12 })
702
+ "aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
703
+ children: /* @__PURE__ */ jsx7(Icon, { name: "x", size: 12 })
501
704
  }
502
705
  ) : null
503
706
  ] });
504
707
  });
505
708
 
506
709
  // src/components/core/Card.tsx
507
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
710
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
508
711
  function Card({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }) {
509
712
  return /* @__PURE__ */ jsxs6("section", { className: cx("pire-card", className), "data-interactive": interactive ? "true" : void 0, ...rest, children: [
510
713
  title || actions ? /* @__PURE__ */ jsxs6("header", { className: "pire-card-head", children: [
511
- icon ? /* @__PURE__ */ jsx7(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
714
+ icon ? /* @__PURE__ */ jsx8(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
512
715
  /* @__PURE__ */ jsxs6("div", { style: { flex: 1, minWidth: 0 }, children: [
513
- /* @__PURE__ */ jsx7("h3", { className: "pire-card-title", children: title }),
514
- subtitle ? /* @__PURE__ */ jsx7("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
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
515
718
  ] }),
516
- actions ? /* @__PURE__ */ jsx7("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
719
+ actions ? /* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
517
720
  ] }) : null,
518
- children ? /* @__PURE__ */ jsx7("div", { className: "pire-card-body", children }) : null,
519
- footer ? /* @__PURE__ */ jsx7("footer", { className: "pire-card-foot", children: footer }) : null
721
+ children ? /* @__PURE__ */ jsx8("div", { className: "pire-card-body", children }) : null,
722
+ footer ? /* @__PURE__ */ jsx8("footer", { className: "pire-card-foot", children: footer }) : null
520
723
  ] });
521
724
  }
522
725
 
523
726
  // src/components/core/Avatar.tsx
524
- import * as React6 from "react";
525
- import { jsx as jsx8 } from "react/jsx-runtime";
727
+ import * as React7 from "react";
728
+ import { jsx as jsx9 } from "react/jsx-runtime";
526
729
  var initials = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
527
730
  function Avatar({ name, size = "md", src, className, ...rest }) {
528
- const [failed, setFailed] = React6.useState(false);
529
- return /* @__PURE__ */ jsx8("span", { className: cx("pire-avatar", className), "data-size": size, role: "img", "aria-label": name, ...rest, children: src && !failed ? /* @__PURE__ */ jsx8(
731
+ const [failed, setFailed] = React7.useState(false);
732
+ return /* @__PURE__ */ jsx9("span", { className: cx("pire-avatar", className), "data-size": size, role: "img", "aria-label": name, ...rest, children: src && !failed ? /* @__PURE__ */ jsx9(
530
733
  "img",
531
734
  {
532
735
  src,
@@ -538,9 +741,9 @@ function Avatar({ name, size = "md", src, className, ...rest }) {
538
741
  }
539
742
 
540
743
  // src/components/core/SegmentedControl.tsx
541
- import * as React7 from "react";
744
+ import * as React8 from "react";
542
745
  import { ToggleButtonGroup, ToggleButton } from "react-aria-components";
543
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
746
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
544
747
  function SegmentedControl({
545
748
  options,
546
749
  value,
@@ -552,8 +755,8 @@ function SegmentedControl({
552
755
  style,
553
756
  ...rest
554
757
  }) {
555
- const selected = React7.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
556
- return /* @__PURE__ */ jsx9(
758
+ const selected = React8.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
759
+ return /* @__PURE__ */ jsx10(
557
760
  ToggleButtonGroup,
558
761
  {
559
762
  className: cx("pire-segmented", className),
@@ -575,7 +778,7 @@ function SegmentedControl({
575
778
  isDisabled: option.isDisabled,
576
779
  "aria-label": iconOnly ? option.label : void 0,
577
780
  children: [
578
- option.icon ? /* @__PURE__ */ jsx9(Icon, { name: option.icon, size: 16 }) : null,
781
+ option.icon ? /* @__PURE__ */ jsx10(Icon, { name: option.icon, size: 16 }) : null,
579
782
  iconOnly ? null : option.label
580
783
  ]
581
784
  },
@@ -586,9 +789,9 @@ function SegmentedControl({
586
789
  }
587
790
 
588
791
  // src/components/core/Text.tsx
589
- import * as React8 from "react";
590
- import { jsx as jsx10 } from "react/jsx-runtime";
591
- var Text = React8.forwardRef(function Text2({
792
+ import * as React9 from "react";
793
+ import { jsx as jsx11 } from "react/jsx-runtime";
794
+ var Text = React9.forwardRef(function Text2({
592
795
  size = "body",
593
796
  color = "primary",
594
797
  weight = "regular",
@@ -602,7 +805,7 @@ var Text = React8.forwardRef(function Text2({
602
805
  }, ref) {
603
806
  const lineClamp = typeof truncate === "number" ? truncate : truncate ? 1 : void 0;
604
807
  const clampStyle = lineClamp == null ? style : { ["--pire-text-clamp"]: lineClamp, ...style };
605
- return /* @__PURE__ */ jsx10(
808
+ return /* @__PURE__ */ jsx11(
606
809
  Wrapper,
607
810
  {
608
811
  ref,
@@ -618,13 +821,13 @@ var Text = React8.forwardRef(function Text2({
618
821
  }
619
822
  );
620
823
  });
621
- var Strong = React8.forwardRef(function Strong2({ className, ...rest }, ref) {
622
- return /* @__PURE__ */ jsx10(Text, { ref, elementType: "span", weight: "strong", className, ...rest });
824
+ var Strong = React9.forwardRef(function Strong2({ className, ...rest }, ref) {
825
+ return /* @__PURE__ */ jsx11(Text, { ref, elementType: "span", weight: "strong", className, ...rest });
623
826
  });
624
827
 
625
828
  // src/components/core/Heading.tsx
626
829
  import { Heading as AriaHeading } from "react-aria-components";
627
- import { jsx as jsx11 } from "react/jsx-runtime";
830
+ import { jsx as jsx12 } from "react/jsx-runtime";
628
831
  function Heading({
629
832
  level = 2,
630
833
  size,
@@ -636,7 +839,7 @@ function Heading({
636
839
  }) {
637
840
  const lineClamp = typeof truncate === "number" ? truncate : truncate ? 1 : void 0;
638
841
  const clampStyle = lineClamp == null ? style : { ["--pire-text-clamp"]: lineClamp, ...style };
639
- return /* @__PURE__ */ jsx11(
842
+ return /* @__PURE__ */ jsx12(
640
843
  AriaHeading,
641
844
  {
642
845
  level,
@@ -652,7 +855,7 @@ function Heading({
652
855
 
653
856
  // src/components/core/Link.tsx
654
857
  import { Link as AriaLink } from "react-aria-components";
655
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
858
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
656
859
  function Link({ children, size, isExternal, className, rel, ...rest }) {
657
860
  return /* @__PURE__ */ jsxs8(
658
861
  AriaLink,
@@ -664,7 +867,7 @@ function Link({ children, size, isExternal, className, rel, ...rest }) {
664
867
  ...rest,
665
868
  children: [
666
869
  children,
667
- isExternal ? /* @__PURE__ */ jsx12(Icon, { name: "external-link", size: 12, className: "pire-link-external" }) : null
870
+ isExternal ? /* @__PURE__ */ jsx13(Icon, { name: "external-link", size: 12, className: "pire-link-external" }) : null
668
871
  ]
669
872
  }
670
873
  );
@@ -672,7 +875,7 @@ function Link({ children, size, isExternal, className, rel, ...rest }) {
672
875
 
673
876
  // src/components/core/Separator.tsx
674
877
  import { Separator as AriaSeparator } from "react-aria-components";
675
- import { jsx as jsx13 } from "react/jsx-runtime";
878
+ import { jsx as jsx14 } from "react/jsx-runtime";
676
879
  function Separator({
677
880
  orientation = "horizontal",
678
881
  emphasis = "default",
@@ -680,7 +883,7 @@ function Separator({
680
883
  className,
681
884
  ...rest
682
885
  }) {
683
- return /* @__PURE__ */ jsx13(
886
+ return /* @__PURE__ */ jsx14(
684
887
  AriaSeparator,
685
888
  {
686
889
  orientation,
@@ -694,24 +897,24 @@ function Separator({
694
897
  }
695
898
 
696
899
  // src/components/core/Kbd.tsx
697
- import { jsx as jsx14 } from "react/jsx-runtime";
900
+ import { jsx as jsx15 } from "react/jsx-runtime";
698
901
  function Kbd({ children, size = "md", className, ...rest }) {
699
- return /* @__PURE__ */ jsx14("kbd", { className: cx("pire-kbd", className), "data-size": size, ...rest, children });
902
+ return /* @__PURE__ */ jsx15("kbd", { className: cx("pire-kbd", className), "data-size": size, ...rest, children });
700
903
  }
701
904
 
702
905
  // src/components/forms/FormField.tsx
703
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
906
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
704
907
  function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
705
908
  return /* @__PURE__ */ jsxs9("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
706
909
  /* @__PURE__ */ jsxs9("label", { className: "pire-field-label", htmlFor, children: [
707
910
  label,
708
- isRequired ? /* @__PURE__ */ jsx15("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
911
+ isRequired ? /* @__PURE__ */ jsx16("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
709
912
  ] }),
710
913
  children,
711
914
  error ? /* @__PURE__ */ jsxs9("span", { className: "pire-field-error", role: "alert", children: [
712
- /* @__PURE__ */ jsx15(Icon, { name: "alert-circle", size: 12 }),
915
+ /* @__PURE__ */ jsx16(Icon, { name: "alert-circle", size: 12 }),
713
916
  error
714
- ] }) : hint ? /* @__PURE__ */ jsx15("span", { className: "pire-field-hint", children: hint }) : null
917
+ ] }) : hint ? /* @__PURE__ */ jsx16("span", { className: "pire-field-hint", children: hint }) : null
715
918
  ] });
716
919
  }
717
920
 
@@ -727,161 +930,6 @@ import {
727
930
  Button as AriaButton4
728
931
  } from "react-aria-components";
729
932
 
730
- // src/i18n/PireIntlProvider.tsx
731
- import * as React9 from "react";
732
-
733
- // src/i18n/messages.ts
734
- var enMessages = {
735
- filterBarLabel: "Filters",
736
- filterBarGo: "Go",
737
- filterBarClearAll: "Clear all",
738
- dataTableSelectAll: "Select all rows",
739
- dataTableSelectRow: "Select row",
740
- dataTableLoading: "Loading records",
741
- dataTableSummaryRow: "Summary",
742
- dataTableEmpty: "No records match the current filters.",
743
- dialogClose: "Close",
744
- sidePanelClose: "Close panel",
745
- inlineMessageDismiss: "Dismiss message",
746
- toastDismiss: "Dismiss",
747
- toastRegionLabel: "Notifications",
748
- selectEmpty: "No options available",
749
- comboBoxShowSuggestions: "Show suggestions",
750
- comboBoxLoading: "Searching\u2026",
751
- datePickerOpenCalendar: "Open calendar",
752
- datePickerPreviousMonth: "Previous month",
753
- datePickerNextMonth: "Next month",
754
- dateRangePresetsLabel: "Date range shortcuts",
755
- numberFieldIncrease: "Increase",
756
- numberFieldDecrease: "Decrease",
757
- inputClear: "Clear",
758
- valueHelpFieldPlaceholder: "Not selected",
759
- valueHelpFieldClear: "Clear selection",
760
- valueHelpFieldOpenNamed: "Select {label}",
761
- valueHelpFieldOpen: "Open value help",
762
- valueHelpDialogSearch: "Search records",
763
- valueHelpDialogTitle: "Select a record",
764
- valueHelpDialogSearchPlaceholder: "Search by ID or name",
765
- valueHelpDialogEmpty: "No records found",
766
- valueHelpDialogCancel: "Cancel",
767
- paginationLabel: "Pagination",
768
- paginationRange: "{from}\u2013{to} of {total}",
769
- paginationPageOf: "Page {page} of {pages}",
770
- paginationPrevious: "Previous page",
771
- paginationNext: "Next page",
772
- paginationRowsPerPage: "Rows per page",
773
- sideNavLabel: "Main navigation",
774
- shellRailLabel: "Applications",
775
- appLauncherLabel: "All applications",
776
- appLauncherTitle: "All applications",
777
- appLauncherSearch: "Search for an application",
778
- appLauncherEmpty: "No application matches that search.",
779
- appLauncherLoading: "Loading applications\u2026",
780
- splitPaneList: "List",
781
- splitPaneDetail: "Detail",
782
- splitPaneBack: "Back to list",
783
- fileUploadChoose: "Choose files",
784
- fileUploadRemoveNamed: "Remove {name}",
785
- fileUploadUploading: "Uploading",
786
- fileDropZonePrompt: "Drag files here, or choose them",
787
- shellBarUserMenu: "Account menu for {user}",
788
- commandPaletteLabel: "Command palette",
789
- commandPaletteSearchLabel: "Search commands and records",
790
- commandPalettePlaceholder: "Search for a screen, an action or a record\u2026",
791
- commandPaletteEmpty: "Nothing matches that",
792
- commandPaletteLoading: "Searching\u2026",
793
- commandPaletteHintNavigate: "navigate",
794
- commandPaletteHintSelect: "open",
795
- commandPaletteHintClose: "close",
796
- chartCategoryHeader: "Category",
797
- chartNoValue: "No data",
798
- chartEmpty: "No data for this period"
799
- };
800
- var esMessages = {
801
- filterBarLabel: "Filtros",
802
- filterBarGo: "Buscar",
803
- filterBarClearAll: "Limpiar todo",
804
- dataTableSelectAll: "Seleccionar todas las filas",
805
- dataTableSelectRow: "Seleccionar fila",
806
- dataTableLoading: "Cargando registros",
807
- dataTableSummaryRow: "Resumen",
808
- dataTableEmpty: "Ning\xFAn registro coincide con los filtros actuales.",
809
- dialogClose: "Cerrar",
810
- sidePanelClose: "Cerrar panel",
811
- inlineMessageDismiss: "Descartar mensaje",
812
- toastDismiss: "Descartar",
813
- toastRegionLabel: "Notificaciones",
814
- selectEmpty: "Sin opciones disponibles",
815
- comboBoxShowSuggestions: "Mostrar sugerencias",
816
- comboBoxLoading: "Buscando\u2026",
817
- datePickerOpenCalendar: "Abrir calendario",
818
- datePickerPreviousMonth: "Mes anterior",
819
- datePickerNextMonth: "Mes siguiente",
820
- dateRangePresetsLabel: "Atajos de rango de fechas",
821
- numberFieldIncrease: "Aumentar",
822
- numberFieldDecrease: "Disminuir",
823
- inputClear: "Limpiar",
824
- valueHelpFieldPlaceholder: "Sin seleccionar",
825
- valueHelpFieldClear: "Limpiar selecci\xF3n",
826
- valueHelpFieldOpenNamed: "Seleccionar {label}",
827
- valueHelpFieldOpen: "Abrir ayuda de valores",
828
- valueHelpDialogSearch: "Buscar registros",
829
- valueHelpDialogTitle: "Seleccionar un registro",
830
- valueHelpDialogSearchPlaceholder: "Buscar por c\xF3digo o nombre",
831
- valueHelpDialogEmpty: "No se encontraron registros",
832
- valueHelpDialogCancel: "Cancelar",
833
- paginationLabel: "Paginaci\xF3n",
834
- paginationRange: "{from}\u2013{to} de {total}",
835
- paginationPageOf: "P\xE1gina {page} de {pages}",
836
- paginationPrevious: "P\xE1gina anterior",
837
- paginationNext: "P\xE1gina siguiente",
838
- paginationRowsPerPage: "Filas por p\xE1gina",
839
- sideNavLabel: "Navegaci\xF3n principal",
840
- shellRailLabel: "Aplicaciones",
841
- appLauncherLabel: "Todas las aplicaciones",
842
- appLauncherTitle: "Todas las aplicaciones",
843
- appLauncherSearch: "Busc\xE1 una aplicaci\xF3n",
844
- appLauncherEmpty: "Ninguna aplicaci\xF3n coincide con esa b\xFAsqueda.",
845
- appLauncherLoading: "Cargando aplicaciones\u2026",
846
- splitPaneList: "Lista",
847
- splitPaneDetail: "Detalle",
848
- splitPaneBack: "Volver a la lista",
849
- fileUploadChoose: "Elegir archivos",
850
- fileUploadRemoveNamed: "Quitar {name}",
851
- fileUploadUploading: "Subiendo",
852
- fileDropZonePrompt: "Arrastr\xE1 archivos ac\xE1, o elegilos",
853
- shellBarUserMenu: "Men\xFA de cuenta de {user}",
854
- commandPaletteLabel: "Paleta de comandos",
855
- commandPaletteSearchLabel: "Buscar comandos y registros",
856
- commandPalettePlaceholder: "Busc\xE1 una pantalla, una acci\xF3n o un registro\u2026",
857
- commandPaletteEmpty: "No hay coincidencias",
858
- commandPaletteLoading: "Buscando\u2026",
859
- commandPaletteHintNavigate: "navegar",
860
- commandPaletteHintSelect: "abrir",
861
- commandPaletteHintClose: "cerrar",
862
- chartCategoryHeader: "Categor\xEDa",
863
- chartNoValue: "Sin datos",
864
- chartEmpty: "Sin datos para este per\xEDodo"
865
- };
866
-
867
- // src/i18n/PireIntlProvider.tsx
868
- import { jsx as jsx16 } from "react/jsx-runtime";
869
- var MessagesContext = React9.createContext(enMessages);
870
- function PireIntlProvider({ messages, children }) {
871
- const value = React9.useMemo(
872
- () => messages ? { ...enMessages, ...messages } : enMessages,
873
- [messages]
874
- );
875
- return /* @__PURE__ */ jsx16(MessagesContext.Provider, { value, children });
876
- }
877
- function usePireMessages() {
878
- return React9.useContext(MessagesContext);
879
- }
880
- function useMessage(key, override) {
881
- const messages = React9.useContext(MessagesContext);
882
- return override ?? messages[key];
883
- }
884
-
885
933
  // src/components/utils/focusField.ts
886
934
  function focusFieldOf(button) {
887
935
  const control = button?.closest?.(".pire-control");
@@ -1178,21 +1226,69 @@ function Switch({ label, children, className, ...rest }) {
1178
1226
  ] });
1179
1227
  }
1180
1228
 
1229
+ // 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";
1231
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1232
+ function ChoiceCardGroup({
1233
+ label,
1234
+ description,
1235
+ errorMessage,
1236
+ options,
1237
+ value,
1238
+ defaultValue,
1239
+ onChange,
1240
+ columns = 2,
1241
+ isDisabled,
1242
+ isRequired,
1243
+ className,
1244
+ style,
1245
+ ...rest
1246
+ }) {
1247
+ return /* @__PURE__ */ jsxs16(
1248
+ AriaRadioGroup2,
1249
+ {
1250
+ className: cx("pire-field", className),
1251
+ style,
1252
+ validationBehavior: "aria",
1253
+ "aria-label": label ? void 0 : rest["aria-label"],
1254
+ value,
1255
+ defaultValue,
1256
+ onChange,
1257
+ isDisabled,
1258
+ isRequired,
1259
+ children: [
1260
+ label ? /* @__PURE__ */ jsxs16(Label5, { className: "pire-field-label", children: [
1261
+ label,
1262
+ isRequired ? /* @__PURE__ */ jsx23("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1263
+ ] }) : 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)) }),
1270
+ description ? /* @__PURE__ */ jsx23(Text7, { slot: "description", className: "pire-field-hint", children: description }) : null,
1271
+ /* @__PURE__ */ jsx23(FieldError5, { className: "pire-field-error", children: errorMessage })
1272
+ ]
1273
+ }
1274
+ );
1275
+ }
1276
+
1181
1277
  // src/components/forms/ComboBox.tsx
1182
1278
  import * as React12 from "react";
1183
1279
  import {
1184
1280
  ComboBox as AriaComboBox,
1185
- Label as Label5,
1281
+ Label as Label6,
1186
1282
  Input as AriaInput2,
1187
1283
  Button as AriaButton6,
1188
1284
  Group as Group3,
1189
1285
  Popover as Popover2,
1190
1286
  ListBox as ListBox2,
1191
1287
  ListBoxItem as ListBoxItem2,
1192
- Text as Text7,
1193
- FieldError as FieldError5
1288
+ Text as Text8,
1289
+ FieldError as FieldError6
1194
1290
  } from "react-aria-components";
1195
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1291
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1196
1292
  var norm2 = (o) => typeof o === "string" ? { value: o, label: o } : o;
1197
1293
  function ComboBox({
1198
1294
  label,
@@ -1238,7 +1334,7 @@ function ComboBox({
1238
1334
  };
1239
1335
  const collection = isFilteredExternally ? { items } : { defaultItems: items };
1240
1336
  const showsStatus = isLoading || isFilteredExternally && items.length === 0 && emptyLabel != null;
1241
- return /* @__PURE__ */ jsxs16(
1337
+ return /* @__PURE__ */ jsxs17(
1242
1338
  AriaComboBox,
1243
1339
  {
1244
1340
  className: cx("pire-field", className),
@@ -1259,11 +1355,11 @@ function ComboBox({
1259
1355
  validationBehavior: "aria",
1260
1356
  ...rest,
1261
1357
  children: [
1262
- label ? /* @__PURE__ */ jsxs16(Label5, { className: "pire-field-label", children: [
1358
+ label ? /* @__PURE__ */ jsxs17(Label6, { className: "pire-field-label", children: [
1263
1359
  label,
1264
- rest.isRequired ? /* @__PURE__ */ jsx23("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1360
+ rest.isRequired ? /* @__PURE__ */ jsx24("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1265
1361
  ] }) : null,
1266
- /* @__PURE__ */ jsxs16(
1362
+ /* @__PURE__ */ jsxs17(
1267
1363
  Group3,
1268
1364
  {
1269
1365
  className: "pire-control",
@@ -1271,9 +1367,9 @@ function ComboBox({
1271
1367
  "data-full-width": String(fullWidth),
1272
1368
  "data-invalid": rest.isInvalid ? "true" : void 0,
1273
1369
  children: [
1274
- /* @__PURE__ */ jsx23(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1275
- /* @__PURE__ */ jsx23(AriaInput2, { className: "pire-input", placeholder: rest.placeholder }),
1276
- showsClear ? /* @__PURE__ */ jsx23(
1370
+ /* @__PURE__ */ jsx24(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1371
+ /* @__PURE__ */ jsx24(AriaInput2, { className: "pire-input", placeholder: rest.placeholder }),
1372
+ showsClear ? /* @__PURE__ */ jsx24(
1277
1373
  AriaButton6,
1278
1374
  {
1279
1375
  className: "pire-input-clear",
@@ -1285,13 +1381,13 @@ function ComboBox({
1285
1381
  children: clearLabel ?? msg.inputClear
1286
1382
  }
1287
1383
  ) : null,
1288
- /* @__PURE__ */ jsx23(AriaButton6, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx23(Icon, { name: "chevron-down", size: 16 }) })
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 }) })
1289
1385
  ]
1290
1386
  }
1291
1387
  ),
1292
- description ? /* @__PURE__ */ jsx23(Text7, { slot: "description", className: "pire-field-hint", children: description }) : null,
1293
- /* @__PURE__ */ jsx23(FieldError5, { className: "pire-field-error", children: errorMessage }),
1294
- /* @__PURE__ */ jsx23(Popover2, { className: "pire-popover", children: /* @__PURE__ */ jsx23(
1388
+ description ? /* @__PURE__ */ jsx24(Text8, { slot: "description", className: "pire-field-hint", children: description }) : null,
1389
+ /* @__PURE__ */ jsx24(FieldError6, { className: "pire-field-error", children: errorMessage }),
1390
+ /* @__PURE__ */ jsx24(Popover2, { className: "pire-popover", children: /* @__PURE__ */ jsx24(
1295
1391
  ListBox2,
1296
1392
  {
1297
1393
  className: "pire-listbox",
@@ -1299,10 +1395,10 @@ function ComboBox({
1299
1395
  const el = e.currentTarget;
1300
1396
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1301
1397
  } : void 0,
1302
- renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx23("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1303
- children: (item) => /* @__PURE__ */ jsxs16(ListBoxItem2, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1304
- /* @__PURE__ */ jsx23("span", { className: "pire-option-label", children: item.label }),
1305
- item.secondary ? /* @__PURE__ */ jsx23("span", { className: "pire-option-secondary", children: item.secondary }) : null
1398
+ 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
1306
1402
  ] })
1307
1403
  }
1308
1404
  ) })
@@ -1315,7 +1411,7 @@ function ComboBox({
1315
1411
  import * as React13 from "react";
1316
1412
  import {
1317
1413
  ComboBox as AriaComboBox2,
1318
- Label as Label6,
1414
+ Label as Label7,
1319
1415
  Input as AriaInput3,
1320
1416
  Button as AriaButton7,
1321
1417
  ButtonContext,
@@ -1323,11 +1419,11 @@ import {
1323
1419
  Popover as Popover3,
1324
1420
  ListBox as ListBox3,
1325
1421
  ListBoxItem as ListBoxItem3,
1326
- Text as Text8,
1327
- FieldError as FieldError6,
1422
+ Text as Text9,
1423
+ FieldError as FieldError7,
1328
1424
  VisuallyHidden
1329
1425
  } from "react-aria-components";
1330
- import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1426
+ import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
1331
1427
  var norm3 = (o) => typeof o === "string" ? { value: o, label: o } : o;
1332
1428
  function MultiComboBox({
1333
1429
  label,
@@ -1392,7 +1488,7 @@ function MultiComboBox({
1392
1488
  e.stopPropagation();
1393
1489
  if (!values.includes(next)) commit([...values, next]);
1394
1490
  };
1395
- return /* @__PURE__ */ jsxs17(
1491
+ return /* @__PURE__ */ jsxs18(
1396
1492
  AriaComboBox2,
1397
1493
  {
1398
1494
  className: cx("pire-field", className),
@@ -1409,11 +1505,11 @@ function MultiComboBox({
1409
1505
  validationBehavior: "aria",
1410
1506
  ...rest,
1411
1507
  children: [
1412
- label ? /* @__PURE__ */ jsxs17(Label6, { className: "pire-field-label", children: [
1508
+ label ? /* @__PURE__ */ jsxs18(Label7, { className: "pire-field-label", children: [
1413
1509
  label,
1414
- rest.isRequired ? /* @__PURE__ */ jsx24("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1510
+ rest.isRequired ? /* @__PURE__ */ jsx25("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1415
1511
  ] }) : null,
1416
- /* @__PURE__ */ jsxs17(
1512
+ /* @__PURE__ */ jsxs18(
1417
1513
  Group4,
1418
1514
  {
1419
1515
  className: "pire-control",
@@ -1423,14 +1519,14 @@ function MultiComboBox({
1423
1519
  "data-invalid": rest.isInvalid ? "true" : void 0,
1424
1520
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1425
1521
  children: [
1426
- /* @__PURE__ */ jsx24(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1427
- /* @__PURE__ */ jsxs17("div", { className: "pire-chipfield", children: [
1428
- /* @__PURE__ */ jsx24(ButtonContext.Provider, { value: null, children: values.map((v) => (
1522
+ /* @__PURE__ */ jsx25(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
1523
+ /* @__PURE__ */ jsxs18("div", { className: "pire-chipfield", children: [
1524
+ /* @__PURE__ */ jsx25(ButtonContext.Provider, { value: null, children: values.map((v) => (
1429
1525
  /* Disabled follows the field, not `isEditable`: a read-only field's chips are
1430
1526
  real, current values and should read as such — they simply lose the × . */
1431
- /* @__PURE__ */ jsx24(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
1527
+ /* @__PURE__ */ jsx25(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
1432
1528
  )) }),
1433
- /* @__PURE__ */ jsx24(
1529
+ /* @__PURE__ */ jsx25(
1434
1530
  AriaInput3,
1435
1531
  {
1436
1532
  ref: inputRef,
@@ -1440,14 +1536,14 @@ function MultiComboBox({
1440
1536
  }
1441
1537
  )
1442
1538
  ] }),
1443
- /* @__PURE__ */ jsx24(AriaButton7, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx24(Icon, { name: "chevron-down", size: 16 }) })
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 }) })
1444
1540
  ]
1445
1541
  }
1446
1542
  ),
1447
- /* @__PURE__ */ jsx24(VisuallyHidden, { children: /* @__PURE__ */ jsx24("span", { "aria-live": "polite", children: announcement }) }),
1448
- description ? /* @__PURE__ */ jsx24(Text8, { slot: "description", className: "pire-field-hint", children: description }) : null,
1449
- /* @__PURE__ */ jsx24(FieldError6, { className: "pire-field-error", children: errorMessage }),
1450
- /* @__PURE__ */ jsx24(Popover3, { className: "pire-popover", children: /* @__PURE__ */ jsx24(
1543
+ /* @__PURE__ */ jsx25(VisuallyHidden, { children: /* @__PURE__ */ jsx25("span", { "aria-live": "polite", children: announcement }) }),
1544
+ description ? /* @__PURE__ */ jsx25(Text9, { slot: "description", className: "pire-field-hint", children: description }) : null,
1545
+ /* @__PURE__ */ jsx25(FieldError7, { className: "pire-field-error", children: errorMessage }),
1546
+ /* @__PURE__ */ jsx25(Popover3, { className: "pire-popover", children: /* @__PURE__ */ jsx25(
1451
1547
  ListBox3,
1452
1548
  {
1453
1549
  className: "pire-listbox",
@@ -1455,10 +1551,10 @@ function MultiComboBox({
1455
1551
  const el = e.currentTarget;
1456
1552
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
1457
1553
  } : void 0,
1458
- renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx24("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
1459
- children: (item) => /* @__PURE__ */ jsxs17(ListBoxItem3, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
1460
- /* @__PURE__ */ jsx24("span", { className: "pire-option-label", children: item.label }),
1461
- item.secondary ? /* @__PURE__ */ jsx24("span", { className: "pire-option-secondary", children: item.secondary }) : null
1554
+ 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
1462
1558
  ] })
1463
1559
  }
1464
1560
  ) })
@@ -1471,16 +1567,16 @@ function MultiComboBox({
1471
1567
  import * as React14 from "react";
1472
1568
  import {
1473
1569
  NumberField as AriaNumberField,
1474
- Label as Label7,
1570
+ Label as Label8,
1475
1571
  Input as AriaInput4,
1476
1572
  Group as Group5,
1477
1573
  Button as AriaButton8,
1478
- Text as Text9,
1479
- FieldError as FieldError7,
1574
+ Text as Text10,
1575
+ FieldError as FieldError8,
1480
1576
  useLocale,
1481
1577
  NumberFieldStateContext
1482
1578
  } from "react-aria-components";
1483
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
1579
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1484
1580
  function decimalSeparatorFor(locale) {
1485
1581
  return new Intl.NumberFormat(locale).formatToParts(1.1).find((part) => part.type === "decimal")?.value ?? ".";
1486
1582
  }
@@ -1518,7 +1614,7 @@ function ClearButton({ label, onClear }) {
1518
1614
  if (!state?.inputValue) {
1519
1615
  return null;
1520
1616
  }
1521
- return /* @__PURE__ */ jsx25(
1617
+ return /* @__PURE__ */ jsx26(
1522
1618
  AriaButton8,
1523
1619
  {
1524
1620
  className: "pire-input-clear",
@@ -1537,6 +1633,9 @@ function NumberField({
1537
1633
  description,
1538
1634
  errorMessage,
1539
1635
  hideStepper,
1636
+ stepperLayout = "stacked",
1637
+ incrementLabel,
1638
+ decrementLabel,
1540
1639
  size = "md",
1541
1640
  fullWidth = true,
1542
1641
  className,
@@ -1602,7 +1701,7 @@ function NumberField({
1602
1701
  event.stopPropagation();
1603
1702
  typeIntoInput(event.currentTarget, localised);
1604
1703
  };
1605
- return /* @__PURE__ */ jsxs18(
1704
+ return /* @__PURE__ */ jsxs19(
1606
1705
  AriaNumberField,
1607
1706
  {
1608
1707
  className: cx("pire-field", className),
@@ -1612,11 +1711,11 @@ function NumberField({
1612
1711
  ...rest,
1613
1712
  ...valueProps,
1614
1713
  children: [
1615
- label ? /* @__PURE__ */ jsxs18(Label7, { className: "pire-field-label", children: [
1714
+ label ? /* @__PURE__ */ jsxs19(Label8, { className: "pire-field-label", children: [
1616
1715
  label,
1617
- rest.isRequired ? /* @__PURE__ */ jsx25("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1716
+ rest.isRequired ? /* @__PURE__ */ jsx26("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1618
1717
  ] }) : null,
1619
- /* @__PURE__ */ jsxs18(
1718
+ /* @__PURE__ */ jsxs19(
1620
1719
  Group5,
1621
1720
  {
1622
1721
  className: "pire-control",
@@ -1624,8 +1723,10 @@ function NumberField({
1624
1723
  "data-full-width": String(fullWidth),
1625
1724
  "data-invalid": rest.isInvalid ? "true" : void 0,
1626
1725
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1726
+ "data-stepper": stepperLayout,
1627
1727
  children: [
1628
- /* @__PURE__ */ jsx25(
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,
1729
+ /* @__PURE__ */ jsx26(
1629
1730
  AriaInput4,
1630
1731
  {
1631
1732
  className: "pire-input",
@@ -1634,27 +1735,45 @@ function NumberField({
1634
1735
  onPasteCapture: handlePaste
1635
1736
  }
1636
1737
  ),
1637
- suffix ? /* @__PURE__ */ jsx25("span", { className: "pire-affix", children: suffix }) : null,
1638
- showsClear ? /* @__PURE__ */ jsx25(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
1639
- hideStepper ? null : /* @__PURE__ */ jsxs18("span", { className: "pire-stepper", children: [
1640
- /* @__PURE__ */ jsx25(AriaButton8, { slot: "increment", className: "pire-stepper-btn", "aria-label": msg.numberFieldIncrease, children: /* @__PURE__ */ jsx25(Icon, { name: "plus", size: 10 }) }),
1641
- /* @__PURE__ */ jsx25(AriaButton8, { slot: "decrement", className: "pire-stepper-btn", "aria-label": msg.numberFieldDecrease, children: /* @__PURE__ */ jsx25(Icon, { name: "minus", size: 10 }) })
1738
+ suffix ? /* @__PURE__ */ jsx26("span", { className: "pire-affix", children: suffix }) : null,
1739
+ 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,
1741
+ 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 }) })
1642
1744
  ] })
1643
1745
  ]
1644
1746
  }
1645
1747
  ),
1646
- description ? /* @__PURE__ */ jsx25(Text9, { slot: "description", className: "pire-field-hint", children: description }) : null,
1647
- /* @__PURE__ */ jsx25(FieldError7, { className: "pire-field-error", children: errorMessage })
1748
+ description ? /* @__PURE__ */ jsx26(Text10, { slot: "description", className: "pire-field-hint", children: description }) : null,
1749
+ /* @__PURE__ */ jsx26(FieldError8, { className: "pire-field-error", children: errorMessage })
1648
1750
  ]
1649
1751
  }
1650
1752
  );
1651
1753
  }
1652
1754
 
1755
+ // src/components/forms/QuantityStepper.tsx
1756
+ import { jsx as jsx27 } from "react/jsx-runtime";
1757
+ function QuantityStepper({ size = "md", ...rest }) {
1758
+ const msg = usePireMessages();
1759
+ return /* @__PURE__ */ jsx27(
1760
+ NumberField,
1761
+ {
1762
+ ...rest,
1763
+ size,
1764
+ stepperLayout: "inline",
1765
+ emptyValue: null,
1766
+ incrementLabel: msg.quantityStepperIncrease,
1767
+ decrementLabel: msg.quantityStepperDecrease
1768
+ }
1769
+ );
1770
+ }
1771
+
1653
1772
  // src/components/forms/DatePicker.tsx
1654
1773
  import * as React15 from "react";
1655
1774
  import {
1656
1775
  DatePicker as AriaDatePicker,
1657
- Label as Label8,
1776
+ Label as Label9,
1658
1777
  Group as Group6,
1659
1778
  DateInput,
1660
1779
  DateSegment,
@@ -1668,8 +1787,8 @@ import {
1668
1787
  CalendarGridBody,
1669
1788
  CalendarCell,
1670
1789
  Heading as Heading2,
1671
- Text as Text10,
1672
- FieldError as FieldError8,
1790
+ Text as Text11,
1791
+ FieldError as FieldError9,
1673
1792
  DatePickerStateContext
1674
1793
  } from "react-aria-components";
1675
1794
 
@@ -1701,13 +1820,13 @@ function coerceBound(value) {
1701
1820
  }
1702
1821
 
1703
1822
  // src/components/forms/DatePicker.tsx
1704
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1823
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
1705
1824
  function ClearButton2({ label }) {
1706
1825
  const state = React15.useContext(DatePickerStateContext);
1707
1826
  if (!state?.value) {
1708
1827
  return null;
1709
1828
  }
1710
- return /* @__PURE__ */ jsx26(
1829
+ return /* @__PURE__ */ jsx28(
1711
1830
  AriaButton9,
1712
1831
  {
1713
1832
  className: "pire-input-clear",
@@ -1743,7 +1862,7 @@ function DatePicker({
1743
1862
  const handleChange = (next) => onChange?.(
1744
1863
  valueFormat === "iso" && next ? next.toString() : next
1745
1864
  );
1746
- return /* @__PURE__ */ jsxs19(
1865
+ return /* @__PURE__ */ jsxs20(
1747
1866
  AriaDatePicker,
1748
1867
  {
1749
1868
  className: cx("pire-field", className),
@@ -1756,11 +1875,11 @@ function DatePicker({
1756
1875
  onChange: handleChange,
1757
1876
  ...rest,
1758
1877
  children: [
1759
- label ? /* @__PURE__ */ jsxs19(Label8, { className: "pire-field-label", children: [
1878
+ label ? /* @__PURE__ */ jsxs20(Label9, { className: "pire-field-label", children: [
1760
1879
  label,
1761
- rest.isRequired ? /* @__PURE__ */ jsx26("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1880
+ rest.isRequired ? /* @__PURE__ */ jsx28("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1762
1881
  ] }) : null,
1763
- /* @__PURE__ */ jsxs19(
1882
+ /* @__PURE__ */ jsxs20(
1764
1883
  Group6,
1765
1884
  {
1766
1885
  className: "pire-control",
@@ -1769,23 +1888,23 @@ function DatePicker({
1769
1888
  "data-invalid": rest.isInvalid ? "true" : void 0,
1770
1889
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1771
1890
  children: [
1772
- /* @__PURE__ */ jsx26(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx26(DateSegment, { segment, className: "pire-datesegment" }) }),
1773
- showsClear ? /* @__PURE__ */ jsx26(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
1774
- /* @__PURE__ */ jsx26(AriaButton9, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerOpenCalendar, style: { width: 24, height: 24 }, children: /* @__PURE__ */ jsx26(Icon, { name: "calendar", size: 16 }) })
1891
+ /* @__PURE__ */ jsx28(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx28(DateSegment, { segment, className: "pire-datesegment" }) }),
1892
+ 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 }) })
1775
1894
  ]
1776
1895
  }
1777
1896
  ),
1778
- description ? /* @__PURE__ */ jsx26(Text10, { slot: "description", className: "pire-field-hint", children: description }) : null,
1779
- /* @__PURE__ */ jsx26(FieldError8, { className: "pire-field-error", children: errorMessage }),
1780
- /* @__PURE__ */ jsx26(Popover4, { className: "pire-popover", children: /* @__PURE__ */ jsx26(AriaDialog, { children: /* @__PURE__ */ jsxs19(Calendar, { className: "pire-calendar", children: [
1781
- /* @__PURE__ */ jsxs19("header", { className: "pire-calendar-head", children: [
1782
- /* @__PURE__ */ jsx26(AriaButton9, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerPreviousMonth, children: /* @__PURE__ */ jsx26(Icon, { name: "chevron-left", size: 16 }) }),
1783
- /* @__PURE__ */ jsx26(Heading2, { className: "pire-calendar-title" }),
1784
- /* @__PURE__ */ jsx26(AriaButton9, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerNextMonth, children: /* @__PURE__ */ jsx26(Icon, { name: "chevron-right", size: 16 }) })
1897
+ description ? /* @__PURE__ */ jsx28(Text11, { slot: "description", className: "pire-field-hint", children: description }) : null,
1898
+ /* @__PURE__ */ jsx28(FieldError9, { className: "pire-field-error", children: errorMessage }),
1899
+ /* @__PURE__ */ jsx28(Popover4, { className: "pire-popover", children: /* @__PURE__ */ jsx28(AriaDialog, { children: /* @__PURE__ */ jsxs20(Calendar, { className: "pire-calendar", children: [
1900
+ /* @__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 }) }),
1902
+ /* @__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 }) })
1785
1904
  ] }),
1786
- /* @__PURE__ */ jsxs19(CalendarGrid, { className: "pire-calendar-grid", children: [
1787
- /* @__PURE__ */ jsx26(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx26(CalendarHeaderCell, { children: day }) }),
1788
- /* @__PURE__ */ jsx26(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx26(CalendarCell, { date, className: "pire-calendar-cell" }) })
1905
+ /* @__PURE__ */ jsxs20(CalendarGrid, { className: "pire-calendar-grid", children: [
1906
+ /* @__PURE__ */ jsx28(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx28(CalendarHeaderCell, { children: day }) }),
1907
+ /* @__PURE__ */ jsx28(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx28(CalendarCell, { date, className: "pire-calendar-cell" }) })
1789
1908
  ] })
1790
1909
  ] }) }) })
1791
1910
  ]
@@ -1797,7 +1916,7 @@ function DatePicker({
1797
1916
  import * as React16 from "react";
1798
1917
  import {
1799
1918
  DateRangePicker as AriaDateRangePicker,
1800
- Label as Label9,
1919
+ Label as Label10,
1801
1920
  Group as Group7,
1802
1921
  DateInput as DateInput2,
1803
1922
  DateSegment as DateSegment2,
@@ -1811,11 +1930,11 @@ import {
1811
1930
  CalendarGridBody as CalendarGridBody2,
1812
1931
  CalendarCell as CalendarCell2,
1813
1932
  Heading as Heading3,
1814
- Text as Text11,
1815
- FieldError as FieldError9,
1933
+ Text as Text12,
1934
+ FieldError as FieldError10,
1816
1935
  DateRangePickerStateContext
1817
1936
  } from "react-aria-components";
1818
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
1937
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
1819
1938
  function coerceRange(range) {
1820
1939
  if (range === void 0) {
1821
1940
  return void 0;
@@ -1840,7 +1959,7 @@ function ClearButton3({ label }) {
1840
1959
  if (!state?.value?.start && !state?.value?.end) {
1841
1960
  return null;
1842
1961
  }
1843
- return /* @__PURE__ */ jsx27(
1962
+ return /* @__PURE__ */ jsx29(
1844
1963
  AriaButton10,
1845
1964
  {
1846
1965
  className: "pire-input-clear",
@@ -1889,7 +2008,7 @@ function DateRangePicker({
1889
2008
  }
1890
2009
  onChange(valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end });
1891
2010
  };
1892
- return /* @__PURE__ */ jsxs20(
2011
+ return /* @__PURE__ */ jsxs21(
1893
2012
  AriaDateRangePicker,
1894
2013
  {
1895
2014
  className: cx("pire-field", className),
@@ -1905,11 +2024,11 @@ function DateRangePicker({
1905
2024
  ...rest,
1906
2025
  isInvalid: rest.isInvalid || tooLong || void 0,
1907
2026
  children: [
1908
- label ? /* @__PURE__ */ jsxs20(Label9, { className: "pire-field-label", children: [
2027
+ label ? /* @__PURE__ */ jsxs21(Label10, { className: "pire-field-label", children: [
1909
2028
  label,
1910
- rest.isRequired ? /* @__PURE__ */ jsx27("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
2029
+ rest.isRequired ? /* @__PURE__ */ jsx29("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
1911
2030
  ] }) : null,
1912
- /* @__PURE__ */ jsxs20(
2031
+ /* @__PURE__ */ jsxs21(
1913
2032
  Group7,
1914
2033
  {
1915
2034
  className: "pire-control pire-daterange-control",
@@ -1918,30 +2037,30 @@ function DateRangePicker({
1918
2037
  "data-invalid": rest.isInvalid || tooLong ? "true" : void 0,
1919
2038
  "data-readonly": rest.isReadOnly ? "true" : void 0,
1920
2039
  children: [
1921
- /* @__PURE__ */ jsx27(DateInput2, { slot: "start", className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx27(DateSegment2, { segment, className: "pire-datesegment" }) }),
1922
- /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "pire-daterange-dash", children: "\u2013" }),
1923
- /* @__PURE__ */ jsx27(DateInput2, { slot: "end", className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx27(DateSegment2, { segment, className: "pire-datesegment" }) }),
1924
- isClearable && !rest.isDisabled && !rest.isReadOnly ? /* @__PURE__ */ jsx27(ClearButton3, { label: clearLabel ?? msg.inputClear }) : null,
1925
- /* @__PURE__ */ jsx27(
2040
+ /* @__PURE__ */ jsx29(DateInput2, { slot: "start", className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx29(DateSegment2, { segment, className: "pire-datesegment" }) }),
2041
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: "pire-daterange-dash", children: "\u2013" }),
2042
+ /* @__PURE__ */ jsx29(DateInput2, { slot: "end", className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx29(DateSegment2, { segment, className: "pire-datesegment" }) }),
2043
+ isClearable && !rest.isDisabled && !rest.isReadOnly ? /* @__PURE__ */ jsx29(ClearButton3, { label: clearLabel ?? msg.inputClear }) : null,
2044
+ /* @__PURE__ */ jsx29(
1926
2045
  AriaButton10,
1927
2046
  {
1928
2047
  className: "pire-iconbtn",
1929
2048
  "data-size": "sm",
1930
2049
  "aria-label": msg.datePickerOpenCalendar,
1931
2050
  style: { width: 24, height: 24 },
1932
- children: /* @__PURE__ */ jsx27(Icon, { name: "calendar", size: 16 })
2051
+ children: /* @__PURE__ */ jsx29(Icon, { name: "calendar", size: 16 })
1933
2052
  }
1934
2053
  )
1935
2054
  ]
1936
2055
  }
1937
2056
  ),
1938
- description ? /* @__PURE__ */ jsx27(Text11, { slot: "description", className: "pire-field-hint", children: description }) : null,
1939
- /* @__PURE__ */ jsx27(FieldError9, { className: "pire-field-error", children: errorMessage }),
1940
- /* @__PURE__ */ jsx27(Popover5, { className: "pire-popover", children: /* @__PURE__ */ jsxs20(AriaDialog2, { className: "pire-daterange-dialog", children: [
2057
+ description ? /* @__PURE__ */ jsx29(Text12, { slot: "description", className: "pire-field-hint", children: description }) : null,
2058
+ /* @__PURE__ */ jsx29(FieldError10, { className: "pire-field-error", children: errorMessage }),
2059
+ /* @__PURE__ */ jsx29(Popover5, { className: "pire-popover", children: /* @__PURE__ */ jsxs21(AriaDialog2, { className: "pire-daterange-dialog", children: [
1941
2060
  presets?.length ? (
1942
2061
  // Before the calendar in the DOM, so keyboard users reach the shortcut without
1943
2062
  // arrowing through a month first.
1944
- /* @__PURE__ */ jsx27("div", { className: "pire-daterange-presets", role: "group", "aria-label": msg.dateRangePresetsLabel, children: presets.map((preset) => /* @__PURE__ */ jsx27(
2063
+ /* @__PURE__ */ jsx29("div", { className: "pire-daterange-presets", role: "group", "aria-label": msg.dateRangePresetsLabel, children: presets.map((preset) => /* @__PURE__ */ jsx29(
1945
2064
  AriaButton10,
1946
2065
  {
1947
2066
  className: "pire-daterange-preset",
@@ -1951,33 +2070,33 @@ function DateRangePicker({
1951
2070
  preset.id
1952
2071
  )) })
1953
2072
  ) : null,
1954
- /* @__PURE__ */ jsxs20(RangeCalendar, { className: "pire-calendar", children: [
1955
- /* @__PURE__ */ jsxs20("header", { className: "pire-calendar-head", children: [
1956
- /* @__PURE__ */ jsx27(
2073
+ /* @__PURE__ */ jsxs21(RangeCalendar, { className: "pire-calendar", children: [
2074
+ /* @__PURE__ */ jsxs21("header", { className: "pire-calendar-head", children: [
2075
+ /* @__PURE__ */ jsx29(
1957
2076
  AriaButton10,
1958
2077
  {
1959
2078
  slot: "previous",
1960
2079
  className: "pire-iconbtn",
1961
2080
  "data-size": "sm",
1962
2081
  "aria-label": msg.datePickerPreviousMonth,
1963
- children: /* @__PURE__ */ jsx27(Icon, { name: "chevron-left", size: 16 })
2082
+ children: /* @__PURE__ */ jsx29(Icon, { name: "chevron-left", size: 16 })
1964
2083
  }
1965
2084
  ),
1966
- /* @__PURE__ */ jsx27(Heading3, { className: "pire-calendar-title" }),
1967
- /* @__PURE__ */ jsx27(
2085
+ /* @__PURE__ */ jsx29(Heading3, { className: "pire-calendar-title" }),
2086
+ /* @__PURE__ */ jsx29(
1968
2087
  AriaButton10,
1969
2088
  {
1970
2089
  slot: "next",
1971
2090
  className: "pire-iconbtn",
1972
2091
  "data-size": "sm",
1973
2092
  "aria-label": msg.datePickerNextMonth,
1974
- children: /* @__PURE__ */ jsx27(Icon, { name: "chevron-right", size: 16 })
2093
+ children: /* @__PURE__ */ jsx29(Icon, { name: "chevron-right", size: 16 })
1975
2094
  }
1976
2095
  )
1977
2096
  ] }),
1978
- /* @__PURE__ */ jsxs20(CalendarGrid2, { className: "pire-calendar-grid", children: [
1979
- /* @__PURE__ */ jsx27(CalendarGridHeader2, { children: (day) => /* @__PURE__ */ jsx27(CalendarHeaderCell2, { children: day }) }),
1980
- /* @__PURE__ */ jsx27(CalendarGridBody2, { children: (date) => /* @__PURE__ */ jsx27(CalendarCell2, { date, className: "pire-calendar-cell" }) })
2097
+ /* @__PURE__ */ jsxs21(CalendarGrid2, { className: "pire-calendar-grid", children: [
2098
+ /* @__PURE__ */ jsx29(CalendarGridHeader2, { children: (day) => /* @__PURE__ */ jsx29(CalendarHeaderCell2, { children: day }) }),
2099
+ /* @__PURE__ */ jsx29(CalendarGridBody2, { children: (date) => /* @__PURE__ */ jsx29(CalendarCell2, { date, className: "pire-calendar-cell" }) })
1981
2100
  ] })
1982
2101
  ] })
1983
2102
  ] }) })
@@ -1987,26 +2106,26 @@ function DateRangePicker({
1987
2106
  }
1988
2107
 
1989
2108
  // src/components/forms/ValueHelpField.tsx
1990
- import * as React19 from "react";
2109
+ import * as React20 from "react";
1991
2110
 
1992
2111
  // src/components/patterns/ValueHelpDialog.tsx
1993
- import * as React18 from "react";
2112
+ import * as React19 from "react";
1994
2113
 
1995
2114
  // src/components/feedback/Dialog.tsx
1996
2115
  import * as React17 from "react";
1997
2116
  import { ModalOverlay, Modal, Dialog as AriaDialog3, Heading as Heading4 } from "react-aria-components";
1998
- import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
2117
+ import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
1999
2118
  function DialogTitle({ children, className }) {
2000
- return /* @__PURE__ */ jsx28(Heading4, { slot: "title", className: cx("pire-dialog-title", className), children });
2119
+ return /* @__PURE__ */ jsx30(Heading4, { slot: "title", className: cx("pire-dialog-title", className), children });
2001
2120
  }
2002
2121
  function DialogDescription({ children, className }) {
2003
- return /* @__PURE__ */ jsx28("p", { className: cx("pire-dialog-sub", className), style: { margin: 0 }, children });
2122
+ return /* @__PURE__ */ jsx30("p", { className: cx("pire-dialog-sub", className), style: { margin: 0 }, children });
2004
2123
  }
2005
2124
  function DialogBody({ children, className }) {
2006
- return /* @__PURE__ */ jsx28("div", { className: cx("pire-dialog-body", className), children });
2125
+ return /* @__PURE__ */ jsx30("div", { className: cx("pire-dialog-body", className), children });
2007
2126
  }
2008
2127
  function DialogActions({ children, className }) {
2009
- return /* @__PURE__ */ jsx28("footer", { className: cx("pire-dialog-foot", className), children });
2128
+ return /* @__PURE__ */ jsx30("footer", { className: cx("pire-dialog-foot", className), children });
2010
2129
  }
2011
2130
  function Dialog({
2012
2131
  isOpen,
@@ -2035,11 +2154,11 @@ function Dialog({
2035
2154
  const actionsSlot = slotOf(DialogActions);
2036
2155
  const slots = [titleSlot, descriptionSlot, bodySlot, actionsSlot];
2037
2156
  const loose = parts.filter((node) => !slots.includes(node));
2038
- const heading = titleSlot ?? (title ? /* @__PURE__ */ jsx28(Heading4, { slot: "title", className: "pire-dialog-title", children: title }) : null);
2039
- const description = descriptionSlot ?? (subtitle ? /* @__PURE__ */ jsx28("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null);
2040
- const actions = actionsSlot ?? (footer ? /* @__PURE__ */ jsx28("footer", { className: "pire-dialog-foot", children: footer }) : null);
2041
- const body = bodySlot ?? (loose.length ? /* @__PURE__ */ jsx28("div", { className: "pire-dialog-body", children: loose }) : null);
2042
- return /* @__PURE__ */ jsx28(
2157
+ const heading = titleSlot ?? (title ? /* @__PURE__ */ jsx30(Heading4, { slot: "title", className: "pire-dialog-title", children: title }) : null);
2158
+ const description = descriptionSlot ?? (subtitle ? /* @__PURE__ */ jsx30("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null);
2159
+ const actions = actionsSlot ?? (footer ? /* @__PURE__ */ jsx30("footer", { className: "pire-dialog-foot", children: footer }) : null);
2160
+ const body = bodySlot ?? (loose.length ? /* @__PURE__ */ jsx30("div", { className: "pire-dialog-body", children: loose }) : null);
2161
+ return /* @__PURE__ */ jsx30(
2043
2162
  ModalOverlay,
2044
2163
  {
2045
2164
  className: "pire-modal-overlay",
@@ -2048,13 +2167,13 @@ function Dialog({
2048
2167
  onOpenChange: (o) => {
2049
2168
  if (!o) close();
2050
2169
  },
2051
- children: /* @__PURE__ */ jsx28(Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ jsxs21(AriaDialog3, { className: "pire-dialog", children: [
2052
- heading || description ? /* @__PURE__ */ jsxs21("header", { className: "pire-dialog-head", children: [
2053
- /* @__PURE__ */ jsxs21("div", { style: { flex: 1, minWidth: 0 }, children: [
2170
+ children: /* @__PURE__ */ jsx30(Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ jsxs22(AriaDialog3, { className: "pire-dialog", children: [
2171
+ heading || description ? /* @__PURE__ */ jsxs22("header", { className: "pire-dialog-head", children: [
2172
+ /* @__PURE__ */ jsxs22("div", { style: { flex: 1, minWidth: 0 }, children: [
2054
2173
  heading,
2055
2174
  description
2056
2175
  ] }),
2057
- showClose ? /* @__PURE__ */ jsx28(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
2176
+ showClose ? /* @__PURE__ */ jsx30(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
2058
2177
  ] }) : null,
2059
2178
  body,
2060
2179
  actions
@@ -2064,6 +2183,7 @@ function Dialog({
2064
2183
  }
2065
2184
 
2066
2185
  // src/components/data/DataTable.tsx
2186
+ import * as React18 from "react";
2067
2187
  import {
2068
2188
  Table,
2069
2189
  TableHeader,
@@ -2075,9 +2195,9 @@ import {
2075
2195
  } from "react-aria-components";
2076
2196
 
2077
2197
  // src/components/feedback/Skeleton.tsx
2078
- import { jsx as jsx29 } from "react/jsx-runtime";
2198
+ import { jsx as jsx31 } from "react/jsx-runtime";
2079
2199
  function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
2080
- return /* @__PURE__ */ jsx29(
2200
+ return /* @__PURE__ */ jsx31(
2081
2201
  "div",
2082
2202
  {
2083
2203
  className: cx("pire-skeleton", className),
@@ -2091,7 +2211,7 @@ function Skeleton({ shape = "text", width, height, className, style, ...rest })
2091
2211
  var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
2092
2212
  function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
2093
2213
  const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
2094
- return /* @__PURE__ */ jsx29(
2214
+ return /* @__PURE__ */ jsx31(
2095
2215
  "div",
2096
2216
  {
2097
2217
  className: cx("pire-skeleton-row", className),
@@ -2103,13 +2223,13 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
2103
2223
  const align = c.numeric ? "right" : c.align ?? "left";
2104
2224
  return (
2105
2225
  // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
2106
- /* @__PURE__ */ jsx29(
2226
+ /* @__PURE__ */ jsx31(
2107
2227
  "div",
2108
2228
  {
2109
2229
  className: "pire-skeleton-cell",
2110
2230
  "data-align": align,
2111
2231
  style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
2112
- children: /* @__PURE__ */ jsx29(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2232
+ children: /* @__PURE__ */ jsx31(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
2113
2233
  },
2114
2234
  i
2115
2235
  )
@@ -2120,7 +2240,15 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
2120
2240
  }
2121
2241
 
2122
2242
  // src/components/data/DataTable.tsx
2123
- import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
2243
+ import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
2244
+ var IS_DEV2 = process.env.NODE_ENV !== "production";
2245
+ var warned2 = /* @__PURE__ */ new Set();
2246
+ function warnOnce2(key, message) {
2247
+ if (warned2.has(key)) return;
2248
+ warned2.add(key);
2249
+ console.warn(`[pire] ${message}`);
2250
+ }
2251
+ var CHECKBOX_W = 44;
2124
2252
  function DataTable({
2125
2253
  columns,
2126
2254
  rows,
@@ -2128,6 +2256,7 @@ function DataTable({
2128
2256
  selectable,
2129
2257
  selected,
2130
2258
  onSelectionChange,
2259
+ hideSelectAll,
2131
2260
  sort,
2132
2261
  onSortChange,
2133
2262
  onRowAction,
@@ -2147,14 +2276,53 @@ function DataTable({
2147
2276
  const msg = usePireMessages();
2148
2277
  const selectionMode = selectable === true || selectable === "multiple" ? "multiple" : selectable === "single" ? "single" : "none";
2149
2278
  const hasCheckboxColumn = selectionMode === "multiple";
2279
+ const pinnedGeometry = React18.useMemo(() => {
2280
+ const geometry = /* @__PURE__ */ new Map();
2281
+ let x = hasCheckboxColumn ? CHECKBOX_W : 0;
2282
+ let broke = null;
2283
+ for (const column of columns) {
2284
+ if (!column.pinned) {
2285
+ broke = "unpinned";
2286
+ break;
2287
+ }
2288
+ 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
+ );
2293
+ broke = "width";
2294
+ break;
2295
+ }
2296
+ geometry.set(column.key, { left: x, width: column.width });
2297
+ x += column.width;
2298
+ }
2299
+ if (IS_DEV2 && broke === "unpinned") {
2300
+ const stranded = columns.slice(geometry.size).find((c) => c.pinned);
2301
+ if (stranded) {
2302
+ warnOnce2(
2303
+ `pin-gap:${stranded.key}`,
2304
+ `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.`
2305
+ );
2306
+ }
2307
+ }
2308
+ return geometry;
2309
+ }, [columns, hasCheckboxColumn]);
2310
+ const hasPinned = pinnedGeometry.size > 0;
2311
+ const lastPinnedKey = hasPinned ? [...pinnedGeometry.keys()][pinnedGeometry.size - 1] : void 0;
2150
2312
  const sortDescriptor = sort ? { column: sort.key, direction: sort.dir === "asc" ? "ascending" : "descending" } : void 0;
2151
2313
  const handleSelection = (keys) => {
2152
- if (keys === "all") return onSelectionChange?.(rows.map((r) => r.id));
2314
+ if (keys === "all") {
2315
+ const inCollection = new Set(rows.map((r) => r.id));
2316
+ return onSelectionChange?.([
2317
+ ...rows.map((r) => r.id),
2318
+ ...(selected ?? []).filter((id) => !inCollection.has(id))
2319
+ ]);
2320
+ }
2153
2321
  onSelectionChange?.([...keys]);
2154
2322
  };
2155
2323
  const skeletonRows = loadingRowCount ?? (rows.length || 5);
2156
2324
  const skeletonColumns = [
2157
- ...hasCheckboxColumn ? [{ width: 44 }] : [],
2325
+ ...hasCheckboxColumn ? [{ width: CHECKBOX_W }] : [],
2158
2326
  ...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric }))
2159
2327
  ];
2160
2328
  const body = isLoading ? [] : rows;
@@ -2163,19 +2331,30 @@ function DataTable({
2163
2331
  const expanded = new Set((expandedIds ?? []).map(String));
2164
2332
  const spanAll = columns.length + (hasCheckboxColumn ? 1 : 0);
2165
2333
  const expandedKey = (id) => `${id}::__pire_expanded__`;
2166
- return /* @__PURE__ */ jsx30(
2334
+ const pinProps = (key) => {
2335
+ if (!hasPinned) return {};
2336
+ const box = key === null ? { left: 0, width: CHECKBOX_W } : pinnedGeometry.get(key);
2337
+ if (!box) return {};
2338
+ return {
2339
+ "data-pinned": "true",
2340
+ "data-pinned-last": key !== null && key === lastPinnedKey ? "true" : void 0,
2341
+ style: { left: box.left, width: box.width, minWidth: box.width, maxWidth: box.width }
2342
+ };
2343
+ };
2344
+ return /* @__PURE__ */ jsx32(
2167
2345
  "div",
2168
2346
  {
2169
2347
  className: cx("pire-table-wrap", className),
2170
2348
  style,
2171
2349
  "data-loading": isLoading ? "true" : void 0,
2172
2350
  "aria-busy": isLoading ? "true" : void 0,
2173
- children: /* @__PURE__ */ jsxs22(
2351
+ children: /* @__PURE__ */ jsxs23(
2174
2352
  Table,
2175
2353
  {
2176
2354
  className: "pire-table",
2177
2355
  "data-density": density,
2178
2356
  "data-sticky": String(stickyHeader),
2357
+ "data-pinned": hasPinned ? "true" : void 0,
2179
2358
  "aria-label": rest["aria-label"],
2180
2359
  disabledKeys: disabledKeys.length ? new Set(disabledKeys) : void 0,
2181
2360
  selectionMode,
@@ -2188,78 +2367,95 @@ function DataTable({
2188
2367
  if (row) onRowAction(row);
2189
2368
  } : void 0,
2190
2369
  children: [
2191
- /* @__PURE__ */ jsxs22(TableHeader, { className: "pire-thead-row", children: [
2192
- hasCheckboxColumn ? /* @__PURE__ */ jsx30(Column, { className: "pire-th", width: 44, children: /* @__PURE__ */ jsx30(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
2193
- columns.map((c, i) => /* @__PURE__ */ jsx30(
2194
- Column,
2195
- {
2196
- id: c.key,
2197
- className: "pire-th",
2198
- isRowHeader: i === 0 && !hasCheckboxColumn,
2199
- allowsSorting: c.sortable,
2200
- width: c.width,
2201
- "data-align": c.numeric || c.align === "right" ? "right" : c.align,
2202
- "data-allows-sorting": c.sortable ? "true" : void 0,
2203
- children: /* @__PURE__ */ jsxs22("span", { className: c.hideLabel ? "pire-sr-only" : "pire-th-inner", children: [
2204
- c.label,
2205
- c.sortable ? /* @__PURE__ */ jsx30(
2206
- Icon,
2207
- {
2208
- size: 12,
2209
- name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
2210
- style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
2211
- }
2212
- ) : null
2213
- ] })
2214
- },
2215
- c.key
2370
+ /* @__PURE__ */ jsxs23(TableHeader, { className: "pire-thead-row", children: [
2371
+ hasCheckboxColumn ? /* @__PURE__ */ jsx32(Column, { className: "pire-th", ...pinProps(null), children: hideSelectAll ? /* @__PURE__ */ jsx32("span", { className: "pire-sr-only", children: msg.dataTableSelectionColumn }) : /* @__PURE__ */ jsx32(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
2372
+ columns.map((c, i) => (
2373
+ // The checkbox column is never the row header — a selection control does not identify
2374
+ // the record — so the first *data* column carries it regardless of whether a checkbox
2375
+ // column precedes it. Conditioning this on `hasCheckboxColumn` left every selectable
2376
+ // table with no row header at all: invisible on first paint, and a hard crash from
2377
+ // React Aria's own "table must have a row header" invariant the moment `rows` changes
2378
+ // under it (search, sort, a paginated load).
2379
+ /* @__PURE__ */ jsx32(
2380
+ Column,
2381
+ {
2382
+ id: c.key,
2383
+ className: "pire-th",
2384
+ isRowHeader: i === 0,
2385
+ allowsSorting: c.sortable,
2386
+ "data-align": c.numeric || c.align === "right" ? "right" : c.align,
2387
+ "data-allows-sorting": c.sortable ? "true" : void 0,
2388
+ ...pinProps(c.key),
2389
+ children: /* @__PURE__ */ jsxs23("span", { className: c.hideLabel ? "pire-sr-only" : "pire-th-inner", children: [
2390
+ c.label,
2391
+ c.sortable ? /* @__PURE__ */ jsx32(
2392
+ Icon,
2393
+ {
2394
+ size: 12,
2395
+ 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)" }
2397
+ }
2398
+ ) : null
2399
+ ] })
2400
+ },
2401
+ c.key
2402
+ )
2216
2403
  ))
2217
2404
  ] }),
2218
- /* @__PURE__ */ jsx30(TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ jsxs22("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
2219
- /* @__PURE__ */ jsx30("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
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 }),
2220
2407
  Array.from({ length: skeletonRows }, (_, i) => (
2221
2408
  // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
2222
- /* @__PURE__ */ jsx30(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2409
+ /* @__PURE__ */ jsx32(SkeletonTableRow, { columns: skeletonColumns, density }, i)
2223
2410
  ))
2224
- ] }) : /* @__PURE__ */ jsx30("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }), children: body.flatMap((row) => {
2411
+ ] }) : /* @__PURE__ */ jsx32("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }), children: body.flatMap((row) => {
2225
2412
  const rowIsDisabled = presentation.get(row.id)?.isDisabled;
2226
- const record = /* @__PURE__ */ jsxs22(
2413
+ const record = /* @__PURE__ */ jsxs23(
2227
2414
  Row,
2228
2415
  {
2229
2416
  id: row.id,
2230
2417
  className: cx("pire-tr", presentation.get(row.id)?.className),
2231
2418
  "data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
2232
2419
  children: [
2233
- hasCheckboxColumn ? /* @__PURE__ */ jsx30(Cell, { className: "pire-td", children: /* @__PURE__ */ jsx30(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
2234
- columns.map((c) => /* @__PURE__ */ jsx30(
2235
- Cell,
2236
- {
2237
- className: "pire-td",
2238
- "data-numeric": c.numeric ? "true" : void 0,
2239
- style: { textAlign: c.align && !c.numeric ? c.align : void 0 },
2240
- children: c.render ? c.render(row) : row[c.key]
2241
- },
2242
- c.key
2243
- ))
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
+ })
2244
2436
  ]
2245
2437
  },
2246
2438
  row.id
2247
2439
  );
2248
2440
  if (!renderExpanded || !expanded.has(String(row.id))) return [record];
2249
- return [record, /* @__PURE__ */ jsx30(Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ jsx30(Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))];
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))];
2250
2442
  }) }),
2251
- footer && !isLoading ? /* @__PURE__ */ jsx30(TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ jsxs22(Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
2252
- hasCheckboxColumn ? /* @__PURE__ */ jsx30(Cell, { className: "pire-tf" }) : null,
2253
- columns.map((c, i) => /* @__PURE__ */ jsx30(
2254
- Cell,
2255
- {
2256
- className: "pire-tf",
2257
- "data-numeric": c.numeric ? "true" : void 0,
2258
- style: { textAlign: c.align && !c.numeric ? c.align : void 0 },
2259
- children: footer[c.key] ?? (i === 0 && !hasCheckboxColumn ? /* @__PURE__ */ jsx30("span", { className: "pire-sr-only", children: msg.dataTableSummaryRow }) : null)
2260
- },
2261
- c.key
2262
- ))
2443
+ footer && !isLoading ? /* @__PURE__ */ jsx32(TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ jsxs23(Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
2444
+ hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-tf", ...pinProps(null) }) : null,
2445
+ columns.map((c, i) => {
2446
+ const pin = pinProps(c.key);
2447
+ return /* @__PURE__ */ jsx32(
2448
+ Cell,
2449
+ {
2450
+ className: "pire-tf",
2451
+ "data-numeric": c.numeric ? "true" : void 0,
2452
+ ...pin,
2453
+ style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
2454
+ children: footer[c.key] ?? (i === 0 ? /* @__PURE__ */ jsx32("span", { className: "pire-sr-only", children: msg.dataTableSummaryRow }) : null)
2455
+ },
2456
+ c.key
2457
+ );
2458
+ })
2263
2459
  ] }) }) : null
2264
2460
  ]
2265
2461
  }
@@ -2269,7 +2465,7 @@ function DataTable({
2269
2465
  }
2270
2466
 
2271
2467
  // src/components/patterns/ValueHelpDialog.tsx
2272
- import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
2468
+ import { Fragment as Fragment2, jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
2273
2469
  function ValueHelpDialog({
2274
2470
  isOpen,
2275
2471
  title,
@@ -2282,14 +2478,19 @@ function ValueHelpDialog({
2282
2478
  isLoading,
2283
2479
  onLoadMore,
2284
2480
  onSelect,
2285
- onClose
2481
+ onClose,
2482
+ selectionMode = "single",
2483
+ selectedKeys,
2484
+ onSelectionChange,
2485
+ onConfirm
2286
2486
  }) {
2287
2487
  const msg = usePireMessages();
2288
- const [query, setQuery] = React18.useState("");
2289
- React18.useEffect(() => {
2488
+ const [query, setQuery] = React19.useState("");
2489
+ React19.useEffect(() => {
2290
2490
  if (isOpen) setQuery("");
2291
2491
  }, [isOpen]);
2292
- const filtered = React18.useMemo(() => {
2492
+ const isMultiple = selectionMode === "multiple";
2493
+ const filtered = React19.useMemo(() => {
2293
2494
  if (isFilteredExternally) return rows;
2294
2495
  const q = query.trim().toLowerCase();
2295
2496
  if (!q) return rows;
@@ -2299,16 +2500,22 @@ function ValueHelpDialog({
2299
2500
  setQuery(value);
2300
2501
  onSearch?.(value);
2301
2502
  };
2302
- return /* @__PURE__ */ jsx31(
2503
+ return /* @__PURE__ */ jsx33(
2303
2504
  Dialog,
2304
2505
  {
2305
2506
  isOpen,
2306
2507
  size: "lg",
2307
2508
  title: title ?? msg.valueHelpDialogTitle,
2308
2509
  onClose,
2309
- footer: /* @__PURE__ */ jsx31(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
2310
- children: /* @__PURE__ */ jsxs23("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2311
- /* @__PURE__ */ jsx31(
2510
+ footer: /* @__PURE__ */ jsxs24(Fragment2, { children: [
2511
+ /* @__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
2516
+ ] }),
2517
+ children: /* @__PURE__ */ jsxs24("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
2518
+ /* @__PURE__ */ jsx33(
2312
2519
  Input,
2313
2520
  {
2314
2521
  "aria-label": msg.valueHelpDialogSearch,
@@ -2321,10 +2528,15 @@ function ValueHelpDialog({
2321
2528
  autoFocus: true
2322
2529
  }
2323
2530
  ),
2324
- /* @__PURE__ */ jsx31("div", { onScroll: onLoadMore ? (event) => {
2531
+ isMultiple ? /* @__PURE__ */ jsxs24("div", { className: "pire-valuehelp-selectionbar", children: [
2532
+ /* @__PURE__ */ jsx33(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.(rows.map((r) => r.id)), children: msg.valueHelpSelectAllCount.replace("{count}", String(rows.length)) }),
2533
+ /* @__PURE__ */ jsx33(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
2534
+ /* @__PURE__ */ jsx33("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
2535
+ ] }) : null,
2536
+ /* @__PURE__ */ jsx33("div", { onScroll: onLoadMore ? (event) => {
2325
2537
  const el = event.currentTarget;
2326
2538
  if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
2327
- } : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ jsx31(
2539
+ } : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ jsx33(
2328
2540
  DataTable,
2329
2541
  {
2330
2542
  "aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
@@ -2333,7 +2545,11 @@ function ValueHelpDialog({
2333
2545
  rows: filtered,
2334
2546
  isLoading,
2335
2547
  emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
2336
- onRowAction: (row) => {
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) => {
2337
2553
  onSelect?.(row);
2338
2554
  onClose?.();
2339
2555
  }
@@ -2345,7 +2561,7 @@ function ValueHelpDialog({
2345
2561
  }
2346
2562
 
2347
2563
  // src/components/forms/ValueHelpField.tsx
2348
- import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
2564
+ import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
2349
2565
  var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
2350
2566
  function ValueHelpField({
2351
2567
  label,
@@ -2371,9 +2587,9 @@ function ValueHelpField({
2371
2587
  style
2372
2588
  }) {
2373
2589
  const msg = usePireMessages();
2374
- const [open, setOpen] = React19.useState(false);
2375
- return /* @__PURE__ */ jsxs24("div", { className: cx(className), style, children: [
2376
- /* @__PURE__ */ jsx32(
2590
+ const [open, setOpen] = React20.useState(false);
2591
+ return /* @__PURE__ */ jsxs25("div", { className: cx(className), style, children: [
2592
+ /* @__PURE__ */ jsx34(
2377
2593
  Input,
2378
2594
  {
2379
2595
  label,
@@ -2385,8 +2601,8 @@ function ValueHelpField({
2385
2601
  placeholder: placeholder ?? msg.valueHelpFieldPlaceholder,
2386
2602
  description,
2387
2603
  errorMessage,
2388
- suffix: /* @__PURE__ */ jsxs24("span", { className: "pire-valuehelp-actions", children: [
2389
- allowsClear && value ? /* @__PURE__ */ jsx32(
2604
+ suffix: /* @__PURE__ */ jsxs25("span", { className: "pire-valuehelp-actions", children: [
2605
+ allowsClear && value ? /* @__PURE__ */ jsx34(
2390
2606
  IconButton,
2391
2607
  {
2392
2608
  icon: "x",
@@ -2395,7 +2611,7 @@ function ValueHelpField({
2395
2611
  onPress: () => onChange?.(null)
2396
2612
  }
2397
2613
  ) : null,
2398
- /* @__PURE__ */ jsx32(
2614
+ /* @__PURE__ */ jsx34(
2399
2615
  IconButton,
2400
2616
  {
2401
2617
  icon: "search",
@@ -2407,7 +2623,7 @@ function ValueHelpField({
2407
2623
  ] })
2408
2624
  }
2409
2625
  ),
2410
- /* @__PURE__ */ jsx32(
2626
+ /* @__PURE__ */ jsx34(
2411
2627
  ValueHelpDialog,
2412
2628
  {
2413
2629
  isOpen: open,
@@ -2427,12 +2643,12 @@ function ValueHelpField({
2427
2643
  }
2428
2644
 
2429
2645
  // src/components/forms/FileUpload.tsx
2430
- import * as React20 from "react";
2431
- import { FileTrigger, Text as Text12 } from "react-aria-components";
2646
+ import * as React21 from "react";
2647
+ import { FileTrigger, Text as Text13 } from "react-aria-components";
2432
2648
 
2433
2649
  // src/components/feedback/ProgressBar.tsx
2434
- import { ProgressBar as AriaProgressBar, Label as Label10 } from "react-aria-components";
2435
- import { Fragment as Fragment2, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
2650
+ import { ProgressBar as AriaProgressBar, Label as Label11 } from "react-aria-components";
2651
+ import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
2436
2652
  function ProgressBar({
2437
2653
  value = 0,
2438
2654
  minValue = 0,
@@ -2445,7 +2661,7 @@ function ProgressBar({
2445
2661
  className,
2446
2662
  style
2447
2663
  }) {
2448
- return /* @__PURE__ */ jsx33(
2664
+ return /* @__PURE__ */ jsx35(
2449
2665
  AriaProgressBar,
2450
2666
  {
2451
2667
  className: cx("pire-progress", className),
@@ -2456,19 +2672,19 @@ function ProgressBar({
2456
2672
  maxValue,
2457
2673
  isIndeterminate,
2458
2674
  style,
2459
- children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs25(Fragment2, { children: [
2460
- label || showValue ? /* @__PURE__ */ jsxs25("div", { className: "pire-progress-head", children: [
2461
- label ? /* @__PURE__ */ jsx33(Label10, { children: label }) : /* @__PURE__ */ jsx33("span", {}),
2462
- showValue && !isIndeterminate ? /* @__PURE__ */ jsx33("span", { className: "pire-numeric", children: valueText }) : null
2675
+ children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs26(Fragment3, { children: [
2676
+ label || showValue ? /* @__PURE__ */ jsxs26("div", { className: "pire-progress-head", children: [
2677
+ label ? /* @__PURE__ */ jsx35(Label11, { children: label }) : /* @__PURE__ */ jsx35("span", {}),
2678
+ showValue && !isIndeterminate ? /* @__PURE__ */ jsx35("span", { className: "pire-numeric", children: valueText }) : null
2463
2679
  ] }) : null,
2464
- /* @__PURE__ */ jsx33("div", { className: "pire-progress-track", children: /* @__PURE__ */ jsx33("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
2680
+ /* @__PURE__ */ jsx35("div", { className: "pire-progress-track", children: /* @__PURE__ */ jsx35("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
2465
2681
  ] })
2466
2682
  }
2467
2683
  );
2468
2684
  }
2469
2685
 
2470
2686
  // src/components/forms/FileUpload.tsx
2471
- import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
2687
+ import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
2472
2688
  var isImage = (file) => file.type.startsWith("image/");
2473
2689
  function formatFileSize(bytes) {
2474
2690
  if (bytes < 1024) return `${bytes} B`;
@@ -2518,10 +2734,10 @@ function FileUpload({
2518
2734
  ...rest
2519
2735
  }) {
2520
2736
  const msg = usePireMessages();
2521
- const [uncontrolled, setUncontrolled] = React20.useState(defaultValue ?? []);
2737
+ const [uncontrolled, setUncontrolled] = React21.useState(defaultValue ?? []);
2522
2738
  const files = value ?? uncontrolled;
2523
- const created = React20.useRef([]);
2524
- React20.useEffect(() => () => {
2739
+ const created = React21.useRef([]);
2740
+ React21.useEffect(() => () => {
2525
2741
  for (const url of created.current) URL.revokeObjectURL(url);
2526
2742
  }, []);
2527
2743
  const commit = (next) => {
@@ -2541,7 +2757,7 @@ function FileUpload({
2541
2757
  commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
2542
2758
  };
2543
2759
  const remove = (target) => commit(files.filter((f) => f.file !== target));
2544
- return /* @__PURE__ */ jsxs26(
2760
+ return /* @__PURE__ */ jsxs27(
2545
2761
  "div",
2546
2762
  {
2547
2763
  className: cx("pire-field", "pire-fileupload", className),
@@ -2550,24 +2766,24 @@ function FileUpload({
2550
2766
  "data-invalid": isInvalid ? "true" : void 0,
2551
2767
  ...rest,
2552
2768
  children: [
2553
- label ? /* @__PURE__ */ jsxs26("span", { className: "pire-field-label", children: [
2769
+ label ? /* @__PURE__ */ jsxs27("span", { className: "pire-field-label", children: [
2554
2770
  label,
2555
- isRequired ? /* @__PURE__ */ jsx34("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
2771
+ isRequired ? /* @__PURE__ */ jsx36("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
2556
2772
  ] }) : null,
2557
- /* @__PURE__ */ jsx34(
2773
+ /* @__PURE__ */ jsx36(
2558
2774
  FileTrigger,
2559
2775
  {
2560
2776
  acceptedFileTypes,
2561
2777
  allowsMultiple,
2562
2778
  onSelect: accept,
2563
- children: /* @__PURE__ */ jsx34(Button, { icon: "paperclip", isDisabled: isDisabled || isReadOnly, children: chooseLabel ?? msg.fileUploadChoose })
2779
+ children: /* @__PURE__ */ jsx36(Button, { icon: "paperclip", isDisabled: isDisabled || isReadOnly, children: chooseLabel ?? msg.fileUploadChoose })
2564
2780
  }
2565
2781
  ),
2566
- files.length ? /* @__PURE__ */ jsx34("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ jsxs26("li", { className: "pire-fileupload-item", children: [
2567
- previewUrl ? /* @__PURE__ */ jsx34("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ jsx34(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
2568
- /* @__PURE__ */ jsx34("span", { className: "pire-fileupload-name", children: file.name }),
2569
- /* @__PURE__ */ jsx34("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
2570
- isDisabled || isReadOnly ? null : /* @__PURE__ */ jsx34(
2782
+ files.length ? /* @__PURE__ */ jsx36("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ jsxs27("li", { className: "pire-fileupload-item", children: [
2783
+ previewUrl ? /* @__PURE__ */ jsx36("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ jsx36(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
2784
+ /* @__PURE__ */ jsx36("span", { className: "pire-fileupload-name", children: file.name }),
2785
+ /* @__PURE__ */ jsx36("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
2786
+ isDisabled || isReadOnly ? null : /* @__PURE__ */ jsx36(
2571
2787
  IconButton,
2572
2788
  {
2573
2789
  icon: "x",
@@ -2577,9 +2793,9 @@ function FileUpload({
2577
2793
  }
2578
2794
  )
2579
2795
  ] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
2580
- uploadProgress != null ? /* @__PURE__ */ jsx34(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
2581
- description ? /* @__PURE__ */ jsx34(Text12, { slot: "description", className: "pire-field-hint", children: description }) : null,
2582
- isInvalid && errorMessage ? /* @__PURE__ */ jsx34("span", { className: "pire-field-error", children: errorMessage }) : null
2796
+ uploadProgress != null ? /* @__PURE__ */ jsx36(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
2797
+ description ? /* @__PURE__ */ jsx36(Text13, { slot: "description", className: "pire-field-hint", children: description }) : null,
2798
+ isInvalid && errorMessage ? /* @__PURE__ */ jsx36("span", { className: "pire-field-error", children: errorMessage }) : null
2583
2799
  ]
2584
2800
  }
2585
2801
  );
@@ -2587,7 +2803,7 @@ function FileUpload({
2587
2803
 
2588
2804
  // src/components/navigation/ShellBar.tsx
2589
2805
  import { MenuTrigger, Button as AriaButton11, Popover as Popover6 } from "react-aria-components";
2590
- import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
2806
+ import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
2591
2807
  var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
2592
2808
  function ShellBar({
2593
2809
  launcher,
@@ -2606,21 +2822,21 @@ function ShellBar({
2606
2822
  ...rest
2607
2823
  }) {
2608
2824
  const msg = usePireMessages();
2609
- return /* @__PURE__ */ jsxs27("header", { className: cx("pire-shellbar", className), ...rest, children: [
2825
+ return /* @__PURE__ */ jsxs28("header", { className: cx("pire-shellbar", className), ...rest, children: [
2610
2826
  launcher,
2611
- onMenu ? /* @__PURE__ */ jsx35(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
2612
- monogram ? /* @__PURE__ */ jsx35("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
2613
- product ? /* @__PURE__ */ jsx35("span", { className: "pire-shellbar-product", children: product }) : null,
2614
- title ? /* @__PURE__ */ jsx35("span", { className: "pire-shellbar-title", children: title }) : null,
2615
- /* @__PURE__ */ jsx35("span", { className: "pire-shellbar-spacer" }),
2616
- onSearch ? /* @__PURE__ */ jsx35(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
2827
+ onMenu ? /* @__PURE__ */ jsx37(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
2828
+ monogram ? /* @__PURE__ */ jsx37("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
2829
+ product ? /* @__PURE__ */ jsx37("span", { className: "pire-shellbar-product", children: product }) : null,
2830
+ title ? /* @__PURE__ */ jsx37("span", { className: "pire-shellbar-title", children: title }) : null,
2831
+ /* @__PURE__ */ jsx37("span", { className: "pire-shellbar-spacer" }),
2832
+ onSearch ? /* @__PURE__ */ jsx37(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
2617
2833
  actions,
2618
2834
  user && userMenu ? (
2619
2835
  // A real button, not the img-role span: the avatar is where "my profile", "switch company"
2620
2836
  // and "sign out" live in any ERP, and a span accepts neither focus nor onPress. Popover is
2621
2837
  // rendered here rather than expected from the consumer so the panel keeps shell placement.
2622
- /* @__PURE__ */ jsxs27(MenuTrigger, { children: [
2623
- /* @__PURE__ */ jsx35(
2838
+ /* @__PURE__ */ jsxs28(MenuTrigger, { children: [
2839
+ /* @__PURE__ */ jsx37(
2624
2840
  AriaButton11,
2625
2841
  {
2626
2842
  className: "pire-avatar pire-avatar-trigger",
@@ -2628,14 +2844,14 @@ function ShellBar({
2628
2844
  children: initials2(user)
2629
2845
  }
2630
2846
  ),
2631
- /* @__PURE__ */ jsx35(Popover6, { className: "pire-popover", children: userMenu })
2847
+ /* @__PURE__ */ jsx37(Popover6, { className: "pire-popover", children: userMenu })
2632
2848
  ] })
2633
- ) : user ? /* @__PURE__ */ jsx35("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
2849
+ ) : user ? /* @__PURE__ */ jsx37("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
2634
2850
  ] });
2635
2851
  }
2636
2852
 
2637
2853
  // src/components/navigation/SideNav.tsx
2638
- import * as React21 from "react";
2854
+ import * as React22 from "react";
2639
2855
  import {
2640
2856
  Button as AriaButton12,
2641
2857
  Disclosure,
@@ -2653,11 +2869,11 @@ import {
2653
2869
  Separator as AriaSeparator2,
2654
2870
  Header
2655
2871
  } from "react-aria-components";
2656
- import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
2872
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
2657
2873
  function Menu({ minWidth, className, style, ...rest }) {
2658
2874
  const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
2659
2875
  const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
2660
- return /* @__PURE__ */ jsx36(
2876
+ return /* @__PURE__ */ jsx38(
2661
2877
  AriaMenu,
2662
2878
  {
2663
2879
  className: cx("pire-menu", className),
@@ -2681,35 +2897,35 @@ function MenuItem({
2681
2897
  ...rest
2682
2898
  }) {
2683
2899
  const keys = shortcutKeys(shortcut);
2684
- return /* @__PURE__ */ jsxs28(
2900
+ return /* @__PURE__ */ jsxs29(
2685
2901
  AriaMenuItem,
2686
2902
  {
2687
2903
  className: cx("pire-menu-item", className),
2688
2904
  "data-tone": tone === "danger" ? "danger" : void 0,
2689
2905
  ...rest,
2690
2906
  children: [
2691
- icon ? /* @__PURE__ */ jsx36(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
2692
- /* @__PURE__ */ jsxs28("span", { className: "pire-menu-item-body", children: [
2693
- /* @__PURE__ */ jsx36("span", { className: "pire-menu-item-label", children }),
2694
- description ? /* @__PURE__ */ jsx36("span", { className: "pire-menu-item-desc", children: description }) : null
2907
+ icon ? /* @__PURE__ */ jsx38(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
2908
+ /* @__PURE__ */ jsxs29("span", { className: "pire-menu-item-body", children: [
2909
+ /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-label", children }),
2910
+ description ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-desc", children: description }) : null
2695
2911
  ] }),
2696
- keys.length ? /* @__PURE__ */ jsx36("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ jsx36(Kbd, { size: "sm", children: cap }, `${cap}-${index}`)) }) : null
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
2697
2913
  ]
2698
2914
  }
2699
2915
  );
2700
2916
  }
2701
2917
  function MenuSection({ title, children, className, ...rest }) {
2702
- return /* @__PURE__ */ jsxs28(AriaMenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
2703
- title ? /* @__PURE__ */ jsx36(Header, { className: "pire-menu-section-title", children: title }) : null,
2918
+ return /* @__PURE__ */ jsxs29(AriaMenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
2919
+ title ? /* @__PURE__ */ jsx38(Header, { className: "pire-menu-section-title", children: title }) : null,
2704
2920
  children
2705
2921
  ] });
2706
2922
  }
2707
2923
  function MenuSeparator({ className }) {
2708
- return /* @__PURE__ */ jsx36(AriaSeparator2, { className: cx("pire-menu-separator", className) });
2924
+ return /* @__PURE__ */ jsx38(AriaSeparator2, { className: cx("pire-menu-separator", className) });
2709
2925
  }
2710
2926
 
2711
2927
  // src/components/navigation/SideNav.tsx
2712
- import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
2928
+ import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
2713
2929
  function findActiveParent(groups, value) {
2714
2930
  if (value == null) return void 0;
2715
2931
  for (const group of groups) {
@@ -2735,10 +2951,10 @@ function SideNav({
2735
2951
  const msg = usePireMessages();
2736
2952
  const activeParent = findActiveParent(groups, value);
2737
2953
  const isControlled = expandedIds != null;
2738
- const [ownExpanded, setOwnExpanded] = React21.useState(
2954
+ const [ownExpanded, setOwnExpanded] = React22.useState(
2739
2955
  () => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : []))
2740
2956
  );
2741
- const [lastValue, setLastValue] = React21.useState(value);
2957
+ const [lastValue, setLastValue] = React22.useState(value);
2742
2958
  if (value !== lastValue) {
2743
2959
  setLastValue(value);
2744
2960
  if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {
@@ -2758,7 +2974,7 @@ function SideNav({
2758
2974
  };
2759
2975
  const renderRow = (item, onPress, isGroup) => {
2760
2976
  const selected = !isGroup && item.id === value;
2761
- const button = /* @__PURE__ */ jsxs29(
2977
+ const button = /* @__PURE__ */ jsxs30(
2762
2978
  AriaButton12,
2763
2979
  {
2764
2980
  className: "pire-sidenav-item",
@@ -2768,37 +2984,37 @@ function SideNav({
2768
2984
  "aria-label": collapsed ? item.label : void 0,
2769
2985
  onPress,
2770
2986
  children: [
2771
- item.icon ? /* @__PURE__ */ jsx37(Icon, { name: item.icon, size: 16 }) : null,
2772
- collapsed ? null : /* @__PURE__ */ jsx37("span", { children: item.label }),
2773
- item.count != null && !collapsed ? /* @__PURE__ */ jsx37("span", { className: "pire-sidenav-count", children: item.count }) : null
2987
+ item.icon ? /* @__PURE__ */ jsx39(Icon, { name: item.icon, size: 16 }) : null,
2988
+ collapsed ? null : /* @__PURE__ */ jsx39("span", { children: item.label }),
2989
+ item.count != null && !collapsed ? /* @__PURE__ */ jsx39("span", { className: "pire-sidenav-count", children: item.count }) : null
2774
2990
  ]
2775
2991
  },
2776
2992
  item.id
2777
2993
  );
2778
- return collapsed ? /* @__PURE__ */ jsx37(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
2994
+ return collapsed ? /* @__PURE__ */ jsx39(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
2779
2995
  };
2780
- const renderRailFlyout = (item) => /* @__PURE__ */ jsxs29(MenuTrigger2, { children: [
2781
- /* @__PURE__ */ jsx37(
2996
+ const renderRailFlyout = (item) => /* @__PURE__ */ jsxs30(MenuTrigger2, { children: [
2997
+ /* @__PURE__ */ jsx39(
2782
2998
  AriaButton12,
2783
2999
  {
2784
3000
  className: "pire-sidenav-item",
2785
3001
  "aria-label": item.label,
2786
3002
  "data-active-child": item.id === activeParent ? "true" : void 0,
2787
- children: item.icon ? /* @__PURE__ */ jsx37(Icon, { name: item.icon, size: 16 }) : null
3003
+ children: item.icon ? /* @__PURE__ */ jsx39(Icon, { name: item.icon, size: 16 }) : null
2788
3004
  }
2789
3005
  ),
2790
- /* @__PURE__ */ jsx37(Popover7, { className: "pire-popover", placement: "right top", offset: 4, children: /* @__PURE__ */ jsx37(
3006
+ /* @__PURE__ */ jsx39(Popover7, { className: "pire-popover", placement: "right top", offset: 4, children: /* @__PURE__ */ jsx39(
2791
3007
  Menu,
2792
3008
  {
2793
3009
  "aria-label": item.label,
2794
3010
  className: "pire-sidenav-flyout",
2795
3011
  onAction: (key) => onChange?.(String(key)),
2796
- children: (item.items ?? []).map((child) => /* @__PURE__ */ jsx37(MenuItem, { id: child.id, children: child.label }, child.id))
3012
+ children: (item.items ?? []).map((child) => /* @__PURE__ */ jsx39(MenuItem, { id: child.id, children: child.label }, child.id))
2797
3013
  }
2798
3014
  ) })
2799
3015
  ] }, item.id);
2800
- const renderSection = (item) => /* @__PURE__ */ jsxs29(Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
2801
- /* @__PURE__ */ jsxs29(
3016
+ const renderSection = (item) => /* @__PURE__ */ jsxs30(Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
3017
+ /* @__PURE__ */ jsxs30(
2802
3018
  AriaButton12,
2803
3019
  {
2804
3020
  slot: "trigger",
@@ -2806,16 +3022,16 @@ function SideNav({
2806
3022
  "data-kind": "group",
2807
3023
  "data-active-child": item.id === activeParent ? "true" : void 0,
2808
3024
  children: [
2809
- item.icon ? /* @__PURE__ */ jsx37(Icon, { name: item.icon, size: 16 }) : null,
2810
- /* @__PURE__ */ jsx37("span", { children: item.label }),
2811
- item.count != null ? /* @__PURE__ */ jsx37("span", { className: "pire-sidenav-count", children: item.count }) : null,
2812
- /* @__PURE__ */ jsx37(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
3025
+ item.icon ? /* @__PURE__ */ jsx39(Icon, { name: item.icon, size: 16 }) : null,
3026
+ /* @__PURE__ */ jsx39("span", { children: item.label }),
3027
+ item.count != null ? /* @__PURE__ */ jsx39("span", { className: "pire-sidenav-count", children: item.count }) : null,
3028
+ /* @__PURE__ */ jsx39(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
2813
3029
  ]
2814
3030
  }
2815
3031
  ),
2816
- /* @__PURE__ */ jsx37(DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
3032
+ /* @__PURE__ */ jsx39(DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
2817
3033
  const selected = child.id === value;
2818
- return /* @__PURE__ */ jsxs29(
3034
+ return /* @__PURE__ */ jsxs30(
2819
3035
  AriaButton12,
2820
3036
  {
2821
3037
  className: "pire-sidenav-item pire-sidenav-subitem",
@@ -2823,15 +3039,15 @@ function SideNav({
2823
3039
  "aria-current": selected ? "page" : void 0,
2824
3040
  onPress: () => onChange?.(child.id),
2825
3041
  children: [
2826
- /* @__PURE__ */ jsx37("span", { children: child.label }),
2827
- child.count != null ? /* @__PURE__ */ jsx37("span", { className: "pire-sidenav-count", children: child.count }) : null
3042
+ /* @__PURE__ */ jsx39("span", { children: child.label }),
3043
+ child.count != null ? /* @__PURE__ */ jsx39("span", { className: "pire-sidenav-count", children: child.count }) : null
2828
3044
  ]
2829
3045
  },
2830
3046
  child.id
2831
3047
  );
2832
3048
  }) })
2833
3049
  ] }, item.id);
2834
- return /* @__PURE__ */ jsxs29(
3050
+ return /* @__PURE__ */ jsxs30(
2835
3051
  "nav",
2836
3052
  {
2837
3053
  className: cx("pire-sidenav", className),
@@ -2847,9 +3063,9 @@ function SideNav({
2847
3063
  if (isGroup && collapsed && railFlyout) return renderRailFlyout(item);
2848
3064
  return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
2849
3065
  });
2850
- return /* @__PURE__ */ jsxs29("div", { className: "pire-sidenav-group", children: [
2851
- group.label && !collapsed ? /* @__PURE__ */ jsx37("div", { className: "pire-sidenav-label", children: group.label }) : null,
2852
- hasSections ? /* @__PURE__ */ jsx37(
3066
+ return /* @__PURE__ */ jsxs30("div", { className: "pire-sidenav-group", children: [
3067
+ group.label && !collapsed ? /* @__PURE__ */ jsx39("div", { className: "pire-sidenav-label", children: group.label }) : null,
3068
+ hasSections ? /* @__PURE__ */ jsx39(
2853
3069
  DisclosureGroup,
2854
3070
  {
2855
3071
  className: "pire-sidenav-tree",
@@ -2861,24 +3077,24 @@ function SideNav({
2861
3077
  ) : rows
2862
3078
  ] }, group.label ?? gi);
2863
3079
  }),
2864
- footer ? /* @__PURE__ */ jsx37("div", { className: "pire-sidenav-footer", children: footer }) : null
3080
+ footer ? /* @__PURE__ */ jsx39("div", { className: "pire-sidenav-footer", children: footer }) : null
2865
3081
  ]
2866
3082
  }
2867
3083
  );
2868
3084
  }
2869
3085
 
2870
3086
  // src/components/navigation/ShellRail.tsx
2871
- import * as React22 from "react";
3087
+ import * as React23 from "react";
2872
3088
  import { Button as AriaButton13 } from "react-aria-components";
2873
- import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
3089
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
2874
3090
  function ShellRail({ groups, value, onChange, className, ...rest }) {
2875
3091
  const msg = usePireMessages();
2876
- return /* @__PURE__ */ jsx38("nav", { className: cx("pire-shellrail", className), "aria-label": msg.shellRailLabel, ...rest, children: groups.map((group, gi) => (
3092
+ return /* @__PURE__ */ jsx40("nav", { className: cx("pire-shellrail", className), "aria-label": msg.shellRailLabel, ...rest, children: groups.map((group, gi) => (
2877
3093
  // The divider is a sibling of the groups rather than a pseudo-element on one, because the
2878
3094
  // scrolling zone would carry its own rule out of view on the first wheel event.
2879
- /* @__PURE__ */ jsxs30(React22.Fragment, { children: [
2880
- gi > 0 ? /* @__PURE__ */ jsx38("div", { className: "pire-shellrail-divider" }) : null,
2881
- /* @__PURE__ */ jsx38("div", { className: "pire-shellrail-group", "data-scroll": group.isScrollable ? "true" : void 0, children: group.items.map((item) => /* @__PURE__ */ jsx38(Tooltip, { label: item.label, placement: "right", children: /* @__PURE__ */ jsx38(
3095
+ /* @__PURE__ */ jsxs31(React23.Fragment, { children: [
3096
+ gi > 0 ? /* @__PURE__ */ jsx40("div", { className: "pire-shellrail-divider" }) : null,
3097
+ /* @__PURE__ */ jsx40("div", { className: "pire-shellrail-group", "data-scroll": group.isScrollable ? "true" : void 0, children: group.items.map((item) => /* @__PURE__ */ jsx40(Tooltip, { label: item.label, placement: "right", children: /* @__PURE__ */ jsx40(
2882
3098
  AriaButton13,
2883
3099
  {
2884
3100
  className: "pire-shellrail-item",
@@ -2886,7 +3102,7 @@ function ShellRail({ groups, value, onChange, className, ...rest }) {
2886
3102
  "data-selected": item.id === value ? "true" : void 0,
2887
3103
  "aria-current": item.id === value ? "true" : void 0,
2888
3104
  onPress: () => onChange?.(item.id),
2889
- children: /* @__PURE__ */ jsx38("span", { className: "pire-shellrail-tile", children: /* @__PURE__ */ jsx38(Icon, { name: item.icon, size: 20 }) })
3105
+ children: /* @__PURE__ */ jsx40("span", { className: "pire-shellrail-tile", children: /* @__PURE__ */ jsx40(Icon, { name: item.icon, size: 20 }) })
2890
3106
  }
2891
3107
  ) }, item.id)) })
2892
3108
  ] }, group.items[0]?.id ?? gi)
@@ -2895,9 +3111,9 @@ function ShellRail({ groups, value, onChange, className, ...rest }) {
2895
3111
 
2896
3112
  // src/components/navigation/Tabs.tsx
2897
3113
  import { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel } from "react-aria-components";
2898
- import { jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
3114
+ import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
2899
3115
  function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
2900
- return /* @__PURE__ */ jsxs31(
3116
+ return /* @__PURE__ */ jsxs32(
2901
3117
  AriaTabs,
2902
3118
  {
2903
3119
  className,
@@ -2906,12 +3122,12 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
2906
3122
  defaultSelectedKey: defaultValue,
2907
3123
  onSelectionChange: (k) => onChange?.(String(k)),
2908
3124
  children: [
2909
- /* @__PURE__ */ jsx39(TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ jsxs31(AriaTab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
2910
- item.icon ? /* @__PURE__ */ jsx39(Icon, { name: item.icon, size: 16 }) : null,
3125
+ /* @__PURE__ */ jsx41(TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ jsxs32(AriaTab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
3126
+ item.icon ? /* @__PURE__ */ jsx41(Icon, { name: item.icon, size: 16 }) : null,
2911
3127
  item.label,
2912
- item.count != null ? /* @__PURE__ */ jsx39("span", { className: "pire-tab-count", children: item.count }) : null
3128
+ item.count != null ? /* @__PURE__ */ jsx41("span", { className: "pire-tab-count", children: item.count }) : null
2913
3129
  ] }) }),
2914
- items.map((item) => /* @__PURE__ */ jsx39(TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
3130
+ items.map((item) => /* @__PURE__ */ jsx41(TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
2915
3131
  ]
2916
3132
  }
2917
3133
  );
@@ -2919,9 +3135,9 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
2919
3135
 
2920
3136
  // src/components/navigation/Breadcrumb.tsx
2921
3137
  import { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link as Link2 } from "react-aria-components";
2922
- import { jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
3138
+ import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
2923
3139
  function Breadcrumb({ items, onNavigate, className, style }) {
2924
- return /* @__PURE__ */ jsx40(
3140
+ return /* @__PURE__ */ jsx42(
2925
3141
  AriaBreadcrumbs,
2926
3142
  {
2927
3143
  className: cx("pire-breadcrumbs", className),
@@ -2930,9 +3146,9 @@ function Breadcrumb({ items, onNavigate, className, style }) {
2930
3146
  onAction: (key) => onNavigate?.(String(key)),
2931
3147
  children: (item) => {
2932
3148
  const last = items[items.length - 1] === item;
2933
- return /* @__PURE__ */ jsxs32(AriaBreadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
2934
- last ? item.label : /* @__PURE__ */ jsx40(Link2, { href: item.href, children: item.label }),
2935
- last ? null : /* @__PURE__ */ jsx40(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
3149
+ return /* @__PURE__ */ jsxs33(AriaBreadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
3150
+ last ? item.label : /* @__PURE__ */ jsx42(Link2, { href: item.href, children: item.label }),
3151
+ last ? null : /* @__PURE__ */ jsx42(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
2936
3152
  ] });
2937
3153
  }
2938
3154
  }
@@ -2940,7 +3156,7 @@ function Breadcrumb({ items, onNavigate, className, style }) {
2940
3156
  }
2941
3157
 
2942
3158
  // src/components/navigation/Pagination.tsx
2943
- import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
3159
+ import { jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
2944
3160
  function Pagination({
2945
3161
  page = 1,
2946
3162
  pageSize = 25,
@@ -2955,9 +3171,9 @@ function Pagination({
2955
3171
  const pages = Math.max(1, Math.ceil(total / pageSize));
2956
3172
  const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
2957
3173
  const to = Math.min(total, page * pageSize);
2958
- return /* @__PURE__ */ jsxs33("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
2959
- /* @__PURE__ */ jsx41("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
2960
- /* @__PURE__ */ jsx41(
3174
+ return /* @__PURE__ */ jsxs34("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
3175
+ /* @__PURE__ */ jsx43("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
3176
+ /* @__PURE__ */ jsx43(
2961
3177
  IconButton,
2962
3178
  {
2963
3179
  icon: "chevron-left",
@@ -2968,8 +3184,8 @@ function Pagination({
2968
3184
  onPress: () => onPageChange?.(page - 1)
2969
3185
  }
2970
3186
  ),
2971
- /* @__PURE__ */ jsx41("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
2972
- /* @__PURE__ */ jsx41(
3187
+ /* @__PURE__ */ jsx43("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
3188
+ /* @__PURE__ */ jsx43(
2973
3189
  IconButton,
2974
3190
  {
2975
3191
  icon: "chevron-right",
@@ -2980,7 +3196,7 @@ function Pagination({
2980
3196
  onPress: () => onPageChange?.(page + 1)
2981
3197
  }
2982
3198
  ),
2983
- onPageSizeChange ? /* @__PURE__ */ jsx41(
3199
+ onPageSizeChange ? /* @__PURE__ */ jsx43(
2984
3200
  Select,
2985
3201
  {
2986
3202
  "aria-label": msg.paginationRowsPerPage,
@@ -2995,8 +3211,195 @@ function Pagination({
2995
3211
  ] });
2996
3212
  }
2997
3213
 
3214
+ // src/components/navigation/Ribbon.tsx
3215
+ import * as React24 from "react";
3216
+ import { Tabs as AriaTabs2, TabList as TabList2, Tab as AriaTab2, TabPanel as TabPanel2, Toolbar, Button as Button3 } from "react-aria-components";
3217
+ import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
3218
+ var outside = (what, parent) => {
3219
+ const Config = () => {
3220
+ throw new Error(`[pire] ${what} must be a child of ${parent}.`);
3221
+ };
3222
+ Object.defineProperty(Config, "name", { value: what });
3223
+ Config.displayName = what;
3224
+ return Config;
3225
+ };
3226
+ var RibbonTab = outside("Ribbon.Tab", "Ribbon");
3227
+ var RibbonGroup = outside("Ribbon.Group", "Ribbon.Tab");
3228
+ var RibbonCommand = outside("Ribbon.Command", "Ribbon.Group");
3229
+ var CONFIG_ELEMENTS = /* @__PURE__ */ new Set([RibbonTab, RibbonGroup, RibbonCommand]);
3230
+ function describe(child) {
3231
+ if (!React24.isValidElement(child)) return JSON.stringify(child);
3232
+ if (typeof child.type === "string") return `<${child.type}>`;
3233
+ const type = child.type;
3234
+ return type?.displayName || type?.name || "a component";
3235
+ }
3236
+ function childrenOfType(children, type, what, parent) {
3237
+ const out = [];
3238
+ const walk = (nodes, path) => {
3239
+ React24.Children.forEach(nodes, (child, i) => {
3240
+ if (child == null || typeof child === "boolean") return;
3241
+ if (React24.isValidElement(child) && child.type === React24.Fragment) {
3242
+ return walk(child.props.children, `${path}${i}.`);
3243
+ }
3244
+ if (!React24.isValidElement(child) || child.type !== type) {
3245
+ 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.` : ""));
3247
+ }
3248
+ out.push({ ...child.props, key: child.key != null ? String(child.key) : `${path}${i}` });
3249
+ });
3250
+ };
3251
+ walk(children, "");
3252
+ return out;
3253
+ }
3254
+ function readTabs(children) {
3255
+ return childrenOfType(children, RibbonTab, "Ribbon.Tab", "Ribbon").map((tab) => ({
3256
+ ...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
+ }))
3261
+ }));
3262
+ }
3263
+ function Command({ command, selectionCount, inBar }) {
3264
+ const size = inBar ? "sm" : command.size ?? "sm";
3265
+ const isDisabled = command.isDisabled || command.requiresSelection === true && selectionCount === 0;
3266
+ return /* @__PURE__ */ jsxs35(
3267
+ Button3,
3268
+ {
3269
+ className: "pire-ribbon-command",
3270
+ "data-size": size,
3271
+ isDisabled,
3272
+ onPress: command.onPress,
3273
+ children: [
3274
+ command.icon ? /* @__PURE__ */ jsx44(Icon, { name: command.icon, size: size === "lg" ? 20 : 16 }) : null,
3275
+ /* @__PURE__ */ jsx44("span", { className: "pire-ribbon-command-label", children: command.label })
3276
+ ]
3277
+ }
3278
+ );
3279
+ }
3280
+ function Group8({ group, selectionCount }) {
3281
+ const large = group.commands.filter((c) => (c.size ?? "sm") === "lg");
3282
+ const small = group.commands.filter((c) => (c.size ?? "sm") !== "lg");
3283
+ return /* @__PURE__ */ jsxs35("div", { className: "pire-ribbon-group", role: "group", "aria-label": group.caption, children: [
3284
+ /* @__PURE__ */ jsxs35("div", { className: "pire-ribbon-group-body", children: [
3285
+ large.map((c) => /* @__PURE__ */ jsx44(Command, { command: c, selectionCount }, c.key)),
3286
+ small.length ? /* @__PURE__ */ jsx44("div", { className: "pire-ribbon-stack", children: small.map((c) => /* @__PURE__ */ jsx44(Command, { command: c, selectionCount }, c.key)) }) : null
3287
+ ] }),
3288
+ /* @__PURE__ */ jsx44("div", { className: "pire-ribbon-caption", "aria-hidden": "true", children: group.caption })
3289
+ ] });
3290
+ }
3291
+ function barBlocks(tabs) {
3292
+ const blocks = [];
3293
+ for (const tab of tabs) {
3294
+ if (tab.isContextual) continue;
3295
+ for (const group of tab.groups) {
3296
+ const commands = group.commands.filter((c) => c.inBar);
3297
+ if (commands.length) blocks.push({ key: `${tab.key}:${group.key}`, commands });
3298
+ }
3299
+ }
3300
+ return blocks;
3301
+ }
3302
+ function Ribbon({
3303
+ children,
3304
+ value,
3305
+ defaultValue,
3306
+ onChange,
3307
+ isCollapsed,
3308
+ onCollapsedChange,
3309
+ leading,
3310
+ actions,
3311
+ selectionCount,
3312
+ className,
3313
+ style,
3314
+ ...rest
3315
+ }) {
3316
+ const msg = usePireMessages();
3317
+ const tabs = readTabs(children);
3318
+ const count = selectionCount ?? 0;
3319
+ const visible = tabs.filter((tab) => !tab.isContextual || count > 0);
3320
+ const fallback = visible[0]?.id;
3321
+ const [ownTab, setOwnTab] = React24.useState(defaultValue);
3322
+ const requested = value ?? ownTab;
3323
+ const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;
3324
+ const select = React24.useCallback((id) => {
3325
+ setOwnTab(id);
3326
+ onChange?.(id);
3327
+ }, [onChange]);
3328
+ const hadSelection = React24.useRef(false);
3329
+ React24.useEffect(() => {
3330
+ const has = count > 0;
3331
+ if (has === hadSelection.current) return;
3332
+ hadSelection.current = has;
3333
+ const contextual = tabs.find((tab) => tab.isContextual);
3334
+ if (!contextual) return;
3335
+ if (has) select(contextual.id);
3336
+ else if (requested === contextual.id) select(tabs.find((tab) => !tab.isContextual)?.id ?? "");
3337
+ }, [count, tabs, requested, select]);
3338
+ const [ownCollapsed, setOwnCollapsed] = React24.useState(false);
3339
+ const collapsed = isCollapsed ?? ownCollapsed;
3340
+ const toggleRef = React24.useRef(null);
3341
+ const restoreFocus = React24.useRef(false);
3342
+ React24.useLayoutEffect(() => {
3343
+ if (!restoreFocus.current) return;
3344
+ restoreFocus.current = false;
3345
+ toggleRef.current?.focus();
3346
+ });
3347
+ const bandId = React24.useId();
3348
+ const bandDomId = { id: bandId };
3349
+ const toggle = /* @__PURE__ */ jsx44(
3350
+ Button3,
3351
+ {
3352
+ ref: toggleRef,
3353
+ className: "pire-ribbon-toggle",
3354
+ "aria-expanded": !collapsed,
3355
+ "aria-controls": bandId,
3356
+ "aria-label": collapsed ? msg.ribbonExpand : msg.ribbonCollapse,
3357
+ onPress: () => {
3358
+ restoreFocus.current = document.activeElement === toggleRef.current;
3359
+ setOwnCollapsed(!collapsed);
3360
+ onCollapsedChange?.(!collapsed);
3361
+ },
3362
+ children: /* @__PURE__ */ jsx44(Icon, { name: collapsed ? "chevron-down" : "chevron-up", size: 16 })
3363
+ }
3364
+ );
3365
+ if (collapsed) {
3366
+ const blocks = barBlocks(tabs);
3367
+ return /* @__PURE__ */ jsx44("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ jsxs35(Toolbar, { className: "pire-ribbon-bar", "aria-label": rest["aria-label"], children: [
3368
+ leading ? /* @__PURE__ */ jsx44("div", { className: "pire-ribbon-leading", children: leading }) : null,
3369
+ blocks.map((block, i) => /* @__PURE__ */ jsxs35(React24.Fragment, { children: [
3370
+ i > 0 || leading ? /* @__PURE__ */ jsx44("span", { className: "pire-ribbon-bar-sep" }) : null,
3371
+ block.commands.map((c) => /* @__PURE__ */ jsx44(Command, { command: c, selectionCount: count, inBar: true }, c.key))
3372
+ ] }, block.key)),
3373
+ /* @__PURE__ */ jsx44("span", { className: "pire-ribbon-bar-spacer" }),
3374
+ actions,
3375
+ toggle
3376
+ ] }) });
3377
+ }
3378
+ return /* @__PURE__ */ jsx44("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ jsxs35(AriaTabs2, { selectedKey: selected, onSelectionChange: (k) => select(String(k)), children: [
3379
+ /* @__PURE__ */ jsx44(TabList2, { className: "pire-ribbon-tablist", "aria-label": rest["aria-label"], children: visible.map((tab) => /* @__PURE__ */ jsx44(
3380
+ AriaTab2,
3381
+ {
3382
+ id: tab.id,
3383
+ className: "pire-ribbon-tab",
3384
+ "data-contextual": tab.isContextual ? "true" : void 0,
3385
+ children: tab.label
3386
+ },
3387
+ tab.key
3388
+ )) }),
3389
+ visible.map((tab) => /* @__PURE__ */ jsx44(TabPanel2, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */ jsxs35(Toolbar, { ...bandDomId, className: "pire-ribbon-band", "aria-label": msg.ribbonLabel, children: [
3390
+ tab.groups.map((group) => /* @__PURE__ */ jsx44(Group8, { group, selectionCount: count }, group.key)),
3391
+ /* @__PURE__ */ jsx44("span", { className: "pire-ribbon-bar-spacer" }),
3392
+ actions,
3393
+ toggle
3394
+ ] }) }, tab.key))
3395
+ ] }) });
3396
+ }
3397
+ Ribbon.Tab = RibbonTab;
3398
+ Ribbon.Group = RibbonGroup;
3399
+ Ribbon.Command = RibbonCommand;
3400
+
2998
3401
  // src/components/feedback/InlineMessage.tsx
2999
- import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
3402
+ import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
3000
3403
  var KIND_ICON = {
3001
3404
  info: "info",
3002
3405
  success: "check-circle-2",
@@ -3006,7 +3409,7 @@ var KIND_ICON = {
3006
3409
  function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
3007
3410
  const msg = usePireMessages();
3008
3411
  const assertive = kind === "error" || kind === "warning";
3009
- return /* @__PURE__ */ jsxs34(
3412
+ return /* @__PURE__ */ jsxs36(
3010
3413
  "div",
3011
3414
  {
3012
3415
  className: cx("pire-msg", className),
@@ -3015,21 +3418,21 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
3015
3418
  "aria-live": assertive ? "assertive" : "polite",
3016
3419
  ...rest,
3017
3420
  children: [
3018
- /* @__PURE__ */ jsx42(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
3019
- /* @__PURE__ */ jsxs34("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
3020
- title ? /* @__PURE__ */ jsx42("span", { className: "pire-msg-title", children: title }) : null,
3021
- children ? /* @__PURE__ */ jsx42("span", { className: "pire-msg-body", children }) : null,
3421
+ /* @__PURE__ */ jsx45(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
3422
+ /* @__PURE__ */ jsxs36("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
3423
+ title ? /* @__PURE__ */ jsx45("span", { className: "pire-msg-title", children: title }) : null,
3424
+ children ? /* @__PURE__ */ jsx45("span", { className: "pire-msg-body", children }) : null,
3022
3425
  action
3023
3426
  ] }),
3024
- onClose ? /* @__PURE__ */ jsx42(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
3427
+ onClose ? /* @__PURE__ */ jsx45(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
3025
3428
  ]
3026
3429
  }
3027
3430
  );
3028
3431
  }
3029
3432
 
3030
3433
  // src/components/feedback/Toast.tsx
3031
- import * as React23 from "react";
3032
- import { jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
3434
+ import * as React25 from "react";
3435
+ import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
3033
3436
  var KIND_ICON2 = {
3034
3437
  info: "info",
3035
3438
  success: "check-circle-2",
@@ -3038,7 +3441,7 @@ var KIND_ICON2 = {
3038
3441
  };
3039
3442
  function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
3040
3443
  const msg = usePireMessages();
3041
- return /* @__PURE__ */ jsxs35(
3444
+ return /* @__PURE__ */ jsxs37(
3042
3445
  "div",
3043
3446
  {
3044
3447
  className: cx("pire-toast", className),
@@ -3047,40 +3450,40 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
3047
3450
  "aria-live": kind === "error" ? "assertive" : "polite",
3048
3451
  ...rest,
3049
3452
  children: [
3050
- /* @__PURE__ */ jsx43(Icon, { name: KIND_ICON2[kind], size: 16 }),
3051
- /* @__PURE__ */ jsx43("span", { style: { flex: 1 }, children }),
3052
- onClose ? /* @__PURE__ */ jsx43(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
3453
+ /* @__PURE__ */ jsx46(Icon, { name: KIND_ICON2[kind], size: 16 }),
3454
+ /* @__PURE__ */ jsx46("span", { style: { flex: 1 }, children }),
3455
+ onClose ? /* @__PURE__ */ jsx46(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
3053
3456
  ]
3054
3457
  }
3055
3458
  );
3056
3459
  }
3057
- var ToastContext = React23.createContext(null);
3460
+ var ToastContext = React25.createContext(null);
3058
3461
  function ToastProvider({ children, timeout = 6e3 }) {
3059
3462
  const msg = usePireMessages();
3060
- const [toasts, setToasts] = React23.useState([]);
3061
- const close = React23.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3062
- const add = React23.useCallback((toast) => {
3463
+ const [toasts, setToasts] = React25.useState([]);
3464
+ const close = React25.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
3465
+ const add = React25.useCallback((toast) => {
3063
3466
  const id = Math.random().toString(36).slice(2);
3064
3467
  setToasts((t) => [...t, { ...toast, id }]);
3065
3468
  const ms = toast.timeout ?? timeout;
3066
3469
  if (ms > 0) setTimeout(() => close(id), ms);
3067
3470
  return id;
3068
3471
  }, [close, timeout]);
3069
- const value = React23.useMemo(() => ({ add, close }), [add, close]);
3070
- return /* @__PURE__ */ jsxs35(ToastContext.Provider, { value, children: [
3472
+ const value = React25.useMemo(() => ({ add, close }), [add, close]);
3473
+ return /* @__PURE__ */ jsxs37(ToastContext.Provider, { value, children: [
3071
3474
  children,
3072
- /* @__PURE__ */ jsx43("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx43(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
3475
+ /* @__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)) })
3073
3476
  ] });
3074
3477
  }
3075
3478
  function useToast() {
3076
- const ctx = React23.useContext(ToastContext);
3479
+ const ctx = React25.useContext(ToastContext);
3077
3480
  if (!ctx) throw new Error("useToast must be used inside <ToastProvider>");
3078
3481
  return ctx;
3079
3482
  }
3080
3483
 
3081
3484
  // src/components/data/KpiTile.tsx
3082
3485
  import { Button as AriaButton14 } from "react-aria-components";
3083
- import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
3486
+ import { Fragment as Fragment6, jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
3084
3487
  function KpiTile({
3085
3488
  label,
3086
3489
  value,
@@ -3096,50 +3499,50 @@ function KpiTile({
3096
3499
  style
3097
3500
  }) {
3098
3501
  const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
3099
- const body = /* @__PURE__ */ jsxs36(Fragment4, { children: [
3100
- /* @__PURE__ */ jsxs36("span", { className: "pire-kpi-label", children: [
3101
- icon ? /* @__PURE__ */ jsx44(Icon, { name: icon, size: 16 }) : null,
3502
+ const body = /* @__PURE__ */ jsxs38(Fragment6, { children: [
3503
+ /* @__PURE__ */ jsxs38("span", { className: "pire-kpi-label", children: [
3504
+ icon ? /* @__PURE__ */ jsx47(Icon, { name: icon, size: 16 }) : null,
3102
3505
  label
3103
3506
  ] }),
3104
- /* @__PURE__ */ jsxs36("span", { className: "pire-kpi-value", children: [
3507
+ /* @__PURE__ */ jsxs38("span", { className: "pire-kpi-value", children: [
3105
3508
  value,
3106
- unit ? /* @__PURE__ */ jsx44("span", { className: "pire-kpi-unit", children: unit }) : null
3509
+ unit ? /* @__PURE__ */ jsx47("span", { className: "pire-kpi-unit", children: unit }) : null
3107
3510
  ] }),
3108
- delta ? /* @__PURE__ */ jsxs36("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
3109
- deltaDirection ? /* @__PURE__ */ jsx44(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
3511
+ delta ? /* @__PURE__ */ jsxs38("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
3512
+ deltaDirection ? /* @__PURE__ */ jsx47(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
3110
3513
  delta
3111
3514
  ] }) : null,
3112
- footnote ? /* @__PURE__ */ jsx44("span", { className: "pire-kpi-foot", children: footnote }) : null
3515
+ footnote ? /* @__PURE__ */ jsx47("span", { className: "pire-kpi-foot", children: footnote }) : null
3113
3516
  ] });
3114
3517
  const props = { className: cx("pire-kpi", className), "data-status": status, style };
3115
- return onPress ? /* @__PURE__ */ jsx44(AriaButton14, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ jsx44("div", { ...props, children: body });
3518
+ return onPress ? /* @__PURE__ */ jsx47(AriaButton14, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ jsx47("div", { ...props, children: body });
3116
3519
  }
3117
3520
 
3118
3521
  // src/components/data/ObjectHeader.tsx
3119
- import { jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
3522
+ import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
3120
3523
  function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
3121
- return /* @__PURE__ */ jsxs37("header", { className: cx("pire-objheader", className), ...rest, children: [
3524
+ return /* @__PURE__ */ jsxs39("header", { className: cx("pire-objheader", className), ...rest, children: [
3122
3525
  breadcrumb,
3123
- /* @__PURE__ */ jsxs37("div", { className: "pire-objheader-row", children: [
3124
- /* @__PURE__ */ jsxs37("div", { style: { minWidth: 0 }, children: [
3125
- /* @__PURE__ */ jsx45("h1", { className: "pire-objheader-title", children: title }),
3126
- subtitle || id ? /* @__PURE__ */ jsxs37("div", { className: "pire-objheader-sub", children: [
3526
+ /* @__PURE__ */ jsxs39("div", { className: "pire-objheader-row", children: [
3527
+ /* @__PURE__ */ jsxs39("div", { style: { minWidth: 0 }, children: [
3528
+ /* @__PURE__ */ jsx48("h1", { className: "pire-objheader-title", children: title }),
3529
+ subtitle || id ? /* @__PURE__ */ jsxs39("div", { className: "pire-objheader-sub", children: [
3127
3530
  subtitle,
3128
- id ? /* @__PURE__ */ jsx45("span", { className: "pire-objheader-id", children: id }) : null
3531
+ id ? /* @__PURE__ */ jsx48("span", { className: "pire-objheader-id", children: id }) : null
3129
3532
  ] }) : null
3130
3533
  ] }),
3131
3534
  badge,
3132
- actions ? /* @__PURE__ */ jsx45("div", { className: "pire-objheader-actions", children: actions }) : null
3535
+ actions ? /* @__PURE__ */ jsx48("div", { className: "pire-objheader-actions", children: actions }) : null
3133
3536
  ] }),
3134
- facts?.length ? /* @__PURE__ */ jsx45("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs37("div", { children: [
3135
- /* @__PURE__ */ jsx45("dt", { className: "pire-fact-label", children: fact.label }),
3136
- /* @__PURE__ */ jsx45("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
3537
+ facts?.length ? /* @__PURE__ */ jsx48("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs39("div", { children: [
3538
+ /* @__PURE__ */ jsx48("dt", { className: "pire-fact-label", children: fact.label }),
3539
+ /* @__PURE__ */ jsx48("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
3137
3540
  ] }, fact.label)) }) : null
3138
3541
  ] });
3139
3542
  }
3140
3543
 
3141
3544
  // src/components/data/FilterBar.tsx
3142
- import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
3545
+ import { jsx as jsx49, jsxs as jsxs40 } from "react/jsx-runtime";
3143
3546
  function FilterBar({
3144
3547
  children,
3145
3548
  activeFilters = [],
@@ -3156,49 +3559,49 @@ function FilterBar({
3156
3559
  const label = useMessage("filterBarLabel", rest["aria-label"]);
3157
3560
  const go = useMessage("filterBarGo", goLabel);
3158
3561
  const clearAll = useMessage("filterBarClearAll", clearAllLabel);
3159
- return /* @__PURE__ */ jsxs38("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
3160
- /* @__PURE__ */ jsxs38("div", { className: "pire-filterbar-controls", children: [
3562
+ return /* @__PURE__ */ jsxs40("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
3563
+ /* @__PURE__ */ jsxs40("div", { className: "pire-filterbar-controls", children: [
3161
3564
  children,
3162
- onGo ? /* @__PURE__ */ jsx46(Button, { variant: "primary", onPress: onGo, children: go }) : null
3565
+ onGo ? /* @__PURE__ */ jsx49(Button, { variant: "primary", onPress: onGo, children: go }) : null
3163
3566
  ] }),
3164
- activeFilters.length || resultLabel || actions ? /* @__PURE__ */ jsxs38("div", { className: "pire-filterbar-foot", children: [
3165
- activeFilters.map((filter) => /* @__PURE__ */ jsx46(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
3166
- activeFilters.length && onClear ? /* @__PURE__ */ jsx46(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
3167
- resultLabel ? /* @__PURE__ */ jsx46("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
3168
- actions ? /* @__PURE__ */ jsx46("div", { className: "pire-filterbar-actions", children: actions }) : null
3567
+ activeFilters.length || resultLabel || actions ? /* @__PURE__ */ jsxs40("div", { className: "pire-filterbar-foot", children: [
3568
+ activeFilters.map((filter) => /* @__PURE__ */ jsx49(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
3569
+ activeFilters.length && onClear ? /* @__PURE__ */ jsx49(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
3570
+ resultLabel ? /* @__PURE__ */ jsx49("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
3571
+ actions ? /* @__PURE__ */ jsx49("div", { className: "pire-filterbar-actions", children: actions }) : null
3169
3572
  ] }) : null
3170
3573
  ] });
3171
3574
  }
3172
3575
 
3173
3576
  // src/components/data/DescriptionList.tsx
3174
- import { jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
3577
+ import { jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
3175
3578
  function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
3176
- return /* @__PURE__ */ jsx47(
3579
+ return /* @__PURE__ */ jsx50(
3177
3580
  "dl",
3178
3581
  {
3179
3582
  className: cx("pire-dl", className),
3180
3583
  "data-layout": layout,
3181
3584
  style: { ...layout === "grid" ? { "--pire-dl-cols": columns } : null, ...style },
3182
3585
  ...rest,
3183
- children: items.map((item, i) => /* @__PURE__ */ jsxs39("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
3184
- /* @__PURE__ */ jsxs39("dt", { className: "pire-dl-term", children: [
3586
+ children: items.map((item, i) => /* @__PURE__ */ jsxs41("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
3587
+ /* @__PURE__ */ jsxs41("dt", { className: "pire-dl-term", children: [
3185
3588
  item.label,
3186
3589
  item.hint
3187
3590
  ] }),
3188
- /* @__PURE__ */ jsx47("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
3591
+ /* @__PURE__ */ jsx50("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
3189
3592
  ] }, i))
3190
3593
  }
3191
3594
  );
3192
3595
  }
3193
3596
 
3194
3597
  // src/components/data/Timeline.tsx
3195
- import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
3598
+ import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
3196
3599
  function Timeline({ entries, reverse = false, className, ...rest }) {
3197
3600
  const list = reverse ? [...entries].reverse() : entries;
3198
- return /* @__PURE__ */ jsx48("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ jsxs40("li", { className: "pire-timeline-item", children: [
3199
- /* @__PURE__ */ jsx48("span", { className: "pire-timeline-time", children: entry.time }),
3200
- /* @__PURE__ */ jsx48("span", { className: "pire-timeline-text", children: entry.event }),
3201
- entry.actor ? /* @__PURE__ */ jsx48("span", { className: "pire-timeline-actor", children: entry.actor }) : null
3601
+ return /* @__PURE__ */ jsx51("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ jsxs42("li", { className: "pire-timeline-item", children: [
3602
+ /* @__PURE__ */ jsx51("span", { className: "pire-timeline-time", children: entry.time }),
3603
+ /* @__PURE__ */ jsx51("span", { className: "pire-timeline-text", children: entry.event }),
3604
+ entry.actor ? /* @__PURE__ */ jsx51("span", { className: "pire-timeline-actor", children: entry.actor }) : null
3202
3605
  ] }, entry.id ?? i)) });
3203
3606
  }
3204
3607
 
@@ -3244,10 +3647,10 @@ function seriesColor(series, index) {
3244
3647
  const slot = series.colorIndex ?? index + 1;
3245
3648
  return slot >= 1 && slot <= VIZ_SLOT_COUNT ? `var(--viz-${slot})` : "var(--viz-other)";
3246
3649
  }
3247
- var IS_DEV2 = process.env.NODE_ENV !== "production";
3650
+ var IS_DEV3 = process.env.NODE_ENV !== "production";
3248
3651
  var warnedCharts = /* @__PURE__ */ new Set();
3249
3652
  function warnOnSlotOverflow(series, chartLabel) {
3250
- if (!IS_DEV2 || warnedCharts.has(chartLabel)) return;
3653
+ if (!IS_DEV3 || warnedCharts.has(chartLabel)) return;
3251
3654
  if (series.length <= VIZ_SLOT_COUNT) return;
3252
3655
  warnedCharts.add(chartLabel);
3253
3656
  console.warn(
@@ -3255,7 +3658,7 @@ function warnOnSlotOverflow(series, chartLabel) {
3255
3658
  );
3256
3659
  }
3257
3660
  function warnOnDonutShape(series, categoryCount, chartLabel) {
3258
- if (!IS_DEV2 || warnedCharts.has(`donut:${chartLabel}`)) return;
3661
+ if (!IS_DEV3 || warnedCharts.has(`donut:${chartLabel}`)) return;
3259
3662
  const complaints = [];
3260
3663
  if (series.length > 1) {
3261
3664
  complaints.push(`it has ${series.length} series but a donut draws one \u2014 the rest are ignored`);
@@ -3281,7 +3684,7 @@ function alignToCategories(series, categoryCount) {
3281
3684
  }
3282
3685
 
3283
3686
  // src/components/data/ChartFrame.tsx
3284
- import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
3687
+ import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
3285
3688
  function seriesLegend(series) {
3286
3689
  return series.map((one, index) => ({
3287
3690
  key: one.id,
@@ -3304,29 +3707,29 @@ function ChartFrame({
3304
3707
  children
3305
3708
  }) {
3306
3709
  const msg = usePireMessages();
3307
- return /* @__PURE__ */ jsxs41("figure", { className: cx("pire-chart", className), style, children: [
3308
- title || description ? /* @__PURE__ */ jsxs41("figcaption", { className: "pire-chart-head", children: [
3309
- title ? /* @__PURE__ */ jsx49("span", { className: "pire-chart-title", children: title }) : null,
3310
- description ? /* @__PURE__ */ jsx49("span", { className: "pire-chart-desc", children: description }) : null
3710
+ return /* @__PURE__ */ jsxs43("figure", { className: cx("pire-chart", className), style, children: [
3711
+ title || description ? /* @__PURE__ */ jsxs43("figcaption", { className: "pire-chart-head", children: [
3712
+ title ? /* @__PURE__ */ jsx52("span", { className: "pire-chart-title", children: title }) : null,
3713
+ description ? /* @__PURE__ */ jsx52("span", { className: "pire-chart-desc", children: description }) : null
3311
3714
  ] }) : null,
3312
- legend && legend.length > 1 ? /* @__PURE__ */ jsx49("ul", { className: "pire-chart-legend", children: legend.map((item) => /* @__PURE__ */ jsxs41("li", { className: "pire-chart-legend-item", children: [
3313
- /* @__PURE__ */ jsx49("span", { className: "pire-chart-swatch", style: { background: item.color } }),
3715
+ legend && legend.length > 1 ? /* @__PURE__ */ jsx52("ul", { className: "pire-chart-legend", children: legend.map((item) => /* @__PURE__ */ jsxs43("li", { className: "pire-chart-legend-item", children: [
3716
+ /* @__PURE__ */ jsx52("span", { className: "pire-chart-swatch", style: { background: item.color } }),
3314
3717
  item.label
3315
3718
  ] }, item.key)) }) : null,
3316
- /* @__PURE__ */ jsx49("div", { className: "pire-chart-plot", "aria-hidden": "true", children }),
3317
- /* @__PURE__ */ jsx49("div", { className: showDataTable ? "pire-chart-table" : "pire-sr-only", children: /* @__PURE__ */ jsxs41("table", { children: [
3318
- /* @__PURE__ */ jsx49("caption", { children: label }),
3319
- /* @__PURE__ */ jsx49("thead", { children: /* @__PURE__ */ jsxs41("tr", { children: [
3320
- /* @__PURE__ */ jsx49("th", { scope: "col", children: msg.chartCategoryHeader }),
3321
- series.map((one) => /* @__PURE__ */ jsx49("th", { scope: "col", children: one.label }, one.id))
3719
+ /* @__PURE__ */ jsx52("div", { className: "pire-chart-plot", "aria-hidden": "true", children }),
3720
+ /* @__PURE__ */ jsx52("div", { className: showDataTable ? "pire-chart-table" : "pire-sr-only", children: /* @__PURE__ */ jsxs43("table", { children: [
3721
+ /* @__PURE__ */ jsx52("caption", { children: label }),
3722
+ /* @__PURE__ */ jsx52("thead", { children: /* @__PURE__ */ jsxs43("tr", { children: [
3723
+ /* @__PURE__ */ jsx52("th", { scope: "col", children: msg.chartCategoryHeader }),
3724
+ series.map((one) => /* @__PURE__ */ jsx52("th", { scope: "col", children: one.label }, one.id))
3322
3725
  ] }) }),
3323
- /* @__PURE__ */ jsx49("tbody", { children: categories.map((category, categoryIndex) => (
3726
+ /* @__PURE__ */ jsx52("tbody", { children: categories.map((category, categoryIndex) => (
3324
3727
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3325
- /* @__PURE__ */ jsxs41("tr", { children: [
3326
- /* @__PURE__ */ jsx49("th", { scope: "row", children: category }),
3728
+ /* @__PURE__ */ jsxs43("tr", { children: [
3729
+ /* @__PURE__ */ jsx52("th", { scope: "row", children: category }),
3327
3730
  series.map((one) => {
3328
3731
  const value = one.values[categoryIndex];
3329
- return /* @__PURE__ */ jsx49("td", { children: value == null ? msg.chartNoValue : formatValue(value) }, one.id);
3732
+ return /* @__PURE__ */ jsx52("td", { children: value == null ? msg.chartNoValue : formatValue(value) }, one.id);
3330
3733
  })
3331
3734
  ] }, categoryIndex)
3332
3735
  )) })
@@ -3335,7 +3738,7 @@ function ChartFrame({
3335
3738
  }
3336
3739
 
3337
3740
  // src/components/data/BarChart.tsx
3338
- import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
3741
+ import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
3339
3742
  function BarChart({
3340
3743
  categories,
3341
3744
  series: rawSeries,
@@ -3367,7 +3770,7 @@ function BarChart({
3367
3770
  const value = series[0].values[categoryIndex];
3368
3771
  return value == null ? msg.chartNoValue : formatValue(value);
3369
3772
  };
3370
- return /* @__PURE__ */ jsx50(
3773
+ return /* @__PURE__ */ jsx53(
3371
3774
  ChartFrame,
3372
3775
  {
3373
3776
  label,
@@ -3380,7 +3783,7 @@ function BarChart({
3380
3783
  showDataTable,
3381
3784
  className,
3382
3785
  style,
3383
- children: !hasData ? /* @__PURE__ */ jsx50("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsx50(
3786
+ children: !hasData ? /* @__PURE__ */ jsx53("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsx53(
3384
3787
  "div",
3385
3788
  {
3386
3789
  className: "pire-chart-bars",
@@ -3389,12 +3792,12 @@ function BarChart({
3389
3792
  style: { "--pire-chart-height": `${height}px` },
3390
3793
  children: categories.map((category, categoryIndex) => (
3391
3794
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3392
- /* @__PURE__ */ jsxs42("div", { className: "pire-chart-group", children: [
3393
- /* @__PURE__ */ jsx50("span", { className: "pire-chart-cat", children: category }),
3394
- /* @__PURE__ */ jsx50("div", { className: "pire-chart-track", children: series.map((one, seriesIndex) => {
3795
+ /* @__PURE__ */ jsxs44("div", { className: "pire-chart-group", children: [
3796
+ /* @__PURE__ */ jsx53("span", { className: "pire-chart-cat", children: category }),
3797
+ /* @__PURE__ */ jsx53("div", { className: "pire-chart-track", children: series.map((one, seriesIndex) => {
3395
3798
  const value = one.values[categoryIndex];
3396
3799
  if (value == null) return null;
3397
- return /* @__PURE__ */ jsxs42(
3800
+ return /* @__PURE__ */ jsxs44(
3398
3801
  "div",
3399
3802
  {
3400
3803
  className: "pire-chart-bar",
@@ -3403,8 +3806,8 @@ function BarChart({
3403
3806
  "--pire-bar-color": seriesColor(one, seriesIndex)
3404
3807
  },
3405
3808
  children: [
3406
- withValues && orientation === "vertical" ? /* @__PURE__ */ jsx50("span", { className: "pire-chart-barval", children: formatValue(value) }) : null,
3407
- /* @__PURE__ */ jsxs42("span", { className: "pire-chart-tip", role: "presentation", children: [
3809
+ withValues && orientation === "vertical" ? /* @__PURE__ */ jsx53("span", { className: "pire-chart-barval", children: formatValue(value) }) : null,
3810
+ /* @__PURE__ */ jsxs44("span", { className: "pire-chart-tip", role: "presentation", children: [
3408
3811
  series.length > 1 ? `${one.label}: ` : "",
3409
3812
  formatValue(value)
3410
3813
  ] })
@@ -3413,7 +3816,7 @@ function BarChart({
3413
3816
  one.id
3414
3817
  );
3415
3818
  }) }),
3416
- withValues && orientation === "horizontal" ? /* @__PURE__ */ jsx50("span", { className: "pire-chart-val", children: horizontalLabelFor(categoryIndex) }) : null
3819
+ withValues && orientation === "horizontal" ? /* @__PURE__ */ jsx53("span", { className: "pire-chart-val", children: horizontalLabelFor(categoryIndex) }) : null
3417
3820
  ] }, categoryIndex)
3418
3821
  ))
3419
3822
  }
@@ -3423,14 +3826,14 @@ function BarChart({
3423
3826
  }
3424
3827
 
3425
3828
  // src/components/data/LineChart.tsx
3426
- import * as React24 from "react";
3427
- import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
3829
+ import * as React26 from "react";
3830
+ import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
3428
3831
  var PLOT_INSET = { top: 10, right: 14, bottom: 24, left: 58 };
3429
3832
  var MARKER_LIMIT = 20;
3430
- var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React24.useEffect : React24.useLayoutEffect;
3833
+ var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React26.useEffect : React26.useLayoutEffect;
3431
3834
  function useMeasuredWidth() {
3432
- const ref = React24.useRef(null);
3433
- const [width, setWidth] = React24.useState(0);
3835
+ const ref = React26.useRef(null);
3836
+ const [width, setWidth] = React26.useState(0);
3434
3837
  useIsomorphicLayoutEffect2(() => {
3435
3838
  const element = ref.current;
3436
3839
  if (!element) return;
@@ -3491,7 +3894,7 @@ function LineChart({
3491
3894
  return `M${xAt(present[0].index)} ${baseline} L${line} L${xAt(last.index)} ${baseline} Z`;
3492
3895
  };
3493
3896
  const labelEvery = Math.max(1, Math.ceil(categories.length / Math.max(2, Math.floor(innerWidth / 64))));
3494
- return /* @__PURE__ */ jsx51(
3897
+ return /* @__PURE__ */ jsx54(
3495
3898
  ChartFrame,
3496
3899
  {
3497
3900
  label,
@@ -3504,8 +3907,8 @@ function LineChart({
3504
3907
  showDataTable,
3505
3908
  className,
3506
3909
  style,
3507
- children: !hasData ? /* @__PURE__ */ jsx51("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsxs43("div", { className: "pire-chart-lines", ref: plotRef, style: { height }, children: [
3508
- width > 0 ? /* @__PURE__ */ jsxs43(
3910
+ children: !hasData ? /* @__PURE__ */ jsx54("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsxs45("div", { className: "pire-chart-lines", ref: plotRef, style: { height }, children: [
3911
+ width > 0 ? /* @__PURE__ */ jsxs45(
3509
3912
  "svg",
3510
3913
  {
3511
3914
  width,
@@ -3514,7 +3917,7 @@ function LineChart({
3514
3917
  "aria-hidden": "true",
3515
3918
  focusable: "false",
3516
3919
  children: [
3517
- /* @__PURE__ */ jsx51("g", { className: "pire-chart-grid", children: scale.ticks.map((tick) => /* @__PURE__ */ jsx51(
3920
+ /* @__PURE__ */ jsx54("g", { className: "pire-chart-grid", children: scale.ticks.map((tick) => /* @__PURE__ */ jsx54(
3518
3921
  "line",
3519
3922
  {
3520
3923
  x1: PLOT_INSET.left,
@@ -3524,8 +3927,8 @@ function LineChart({
3524
3927
  },
3525
3928
  tick
3526
3929
  )) }),
3527
- /* @__PURE__ */ jsxs43("g", { className: "pire-chart-tick", children: [
3528
- scale.ticks.map((tick) => /* @__PURE__ */ jsx51(
3930
+ /* @__PURE__ */ jsxs45("g", { className: "pire-chart-tick", children: [
3931
+ scale.ticks.map((tick) => /* @__PURE__ */ jsx54(
3529
3932
  "text",
3530
3933
  {
3531
3934
  x: PLOT_INSET.left - 8,
@@ -3538,10 +3941,10 @@ function LineChart({
3538
3941
  )),
3539
3942
  categories.map((category, index) => index % labelEvery === 0 ? (
3540
3943
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3541
- /* @__PURE__ */ jsx51("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
3944
+ /* @__PURE__ */ jsx54("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
3542
3945
  ) : null)
3543
3946
  ] }),
3544
- showArea && series[0] ? /* @__PURE__ */ jsx51(
3947
+ showArea && series[0] ? /* @__PURE__ */ jsx54(
3545
3948
  "path",
3546
3949
  {
3547
3950
  d: areaFor(series[0].values),
@@ -3549,10 +3952,10 @@ function LineChart({
3549
3952
  style: { fill: seriesColor(series[0], 0) }
3550
3953
  }
3551
3954
  ) : null,
3552
- /* @__PURE__ */ jsx51("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ jsx51("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
3553
- withMarkers ? /* @__PURE__ */ jsx51("g", { className: "pire-chart-marker", children: series.map((one, seriesIndex) => one.values.map((value, index) => value == null ? null : (
3955
+ /* @__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)) }),
3956
+ withMarkers ? /* @__PURE__ */ jsx54("g", { className: "pire-chart-marker", children: series.map((one, seriesIndex) => one.values.map((value, index) => value == null ? null : (
3554
3957
  // biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.
3555
- /* @__PURE__ */ jsx51(
3958
+ /* @__PURE__ */ jsx54(
3556
3959
  "circle",
3557
3960
  {
3558
3961
  cx: xAt(index),
@@ -3566,18 +3969,18 @@ function LineChart({
3566
3969
  ]
3567
3970
  }
3568
3971
  ) : null,
3569
- /* @__PURE__ */ jsx51(
3972
+ /* @__PURE__ */ jsx54(
3570
3973
  "div",
3571
3974
  {
3572
3975
  className: "pire-chart-hover",
3573
3976
  style: { inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px` },
3574
3977
  children: categories.map((category, categoryIndex) => (
3575
3978
  // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
3576
- /* @__PURE__ */ jsx51("div", { className: "pire-chart-band", children: /* @__PURE__ */ jsxs43("span", { className: "pire-chart-tip", role: "presentation", children: [
3577
- /* @__PURE__ */ jsx51("strong", { children: category }),
3979
+ /* @__PURE__ */ jsx54("div", { className: "pire-chart-band", children: /* @__PURE__ */ jsxs45("span", { className: "pire-chart-tip", role: "presentation", children: [
3980
+ /* @__PURE__ */ jsx54("strong", { children: category }),
3578
3981
  series.map((one) => {
3579
3982
  const value = one.values[categoryIndex];
3580
- return /* @__PURE__ */ jsxs43("span", { className: "pire-chart-tip-row", children: [
3983
+ return /* @__PURE__ */ jsxs45("span", { className: "pire-chart-tip-row", children: [
3581
3984
  one.label,
3582
3985
  ": ",
3583
3986
  value == null ? "No data" : formatValue(value)
@@ -3593,8 +3996,8 @@ function LineChart({
3593
3996
  }
3594
3997
 
3595
3998
  // src/components/data/DonutChart.tsx
3596
- import * as React25 from "react";
3597
- import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
3999
+ import * as React27 from "react";
4000
+ import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
3598
4001
  var SEGMENT_GAP_DEGREES = 1.5;
3599
4002
  function DonutChart({
3600
4003
  categories,
@@ -3614,7 +4017,7 @@ function DonutChart({
3614
4017
  }) {
3615
4018
  const label = rest["aria-label"];
3616
4019
  const msg = usePireMessages();
3617
- const [hoveredIndex, setHoveredIndex] = React25.useState(null);
4020
+ const [hoveredIndex, setHoveredIndex] = React27.useState(null);
3618
4021
  warnOnDonutShape(series, categories.length, label);
3619
4022
  const values = (series[0]?.values ?? []).slice(0, categories.length);
3620
4023
  const segments = categories.map((category, index) => ({ category, index, value: values[index] ?? 0 })).filter((segment) => segment.value > 0);
@@ -3631,7 +4034,7 @@ function DonutChart({
3631
4034
  }));
3632
4035
  const hovered = hoveredIndex == null ? null : segments.find((segment) => segment.index === hoveredIndex) ?? null;
3633
4036
  let arcStart = 0;
3634
- return /* @__PURE__ */ jsx52(
4037
+ return /* @__PURE__ */ jsx55(
3635
4038
  ChartFrame,
3636
4039
  {
3637
4040
  label,
@@ -3644,8 +4047,8 @@ function DonutChart({
3644
4047
  showDataTable,
3645
4048
  className,
3646
4049
  style,
3647
- children: !hasData ? /* @__PURE__ */ jsx52("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsxs44("div", { className: "pire-chart-donut", style: { height: size }, children: [
3648
- /* @__PURE__ */ jsx52(
4050
+ children: !hasData ? /* @__PURE__ */ jsx55("div", { className: "pire-chart-empty", children: emptyState ?? msg.chartEmpty }) : /* @__PURE__ */ jsxs46("div", { className: "pire-chart-donut", style: { height: size }, children: [
4051
+ /* @__PURE__ */ jsx55(
3649
4052
  "svg",
3650
4053
  {
3651
4054
  width: size,
@@ -3653,13 +4056,13 @@ function DonutChart({
3653
4056
  "aria-hidden": "true",
3654
4057
  focusable: "false",
3655
4058
  onMouseLeave: () => setHoveredIndex(null),
3656
- children: /* @__PURE__ */ jsx52("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: segments.map((segment) => {
4059
+ children: /* @__PURE__ */ jsx55("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: segments.map((segment) => {
3657
4060
  const arcLength = segment.value / total * circumference;
3658
4061
  const offset = arcStart;
3659
4062
  arcStart += arcLength;
3660
4063
  return (
3661
4064
  // 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.
3662
- /* @__PURE__ */ jsx52(
4065
+ /* @__PURE__ */ jsx55(
3663
4066
  "circle",
3664
4067
  {
3665
4068
  className: "pire-chart-arc",
@@ -3679,9 +4082,9 @@ function DonutChart({
3679
4082
  }) })
3680
4083
  }
3681
4084
  ),
3682
- /* @__PURE__ */ jsxs44("div", { className: "pire-chart-donut-center", style: { width: size - thickness * 2 - 8 }, children: [
3683
- /* @__PURE__ */ jsx52("span", { className: "pire-chart-donut-value", children: hovered ? formatValue(hovered.value) : centerLabel ?? formatValue(total) }),
3684
- /* @__PURE__ */ jsx52("span", { className: "pire-chart-donut-caption", children: hovered ? hovered.category : centerCaption })
4085
+ /* @__PURE__ */ jsxs46("div", { className: "pire-chart-donut-center", style: { width: size - thickness * 2 - 8 }, children: [
4086
+ /* @__PURE__ */ jsx55("span", { className: "pire-chart-donut-value", children: hovered ? formatValue(hovered.value) : centerLabel ?? formatValue(total) }),
4087
+ /* @__PURE__ */ jsx55("span", { className: "pire-chart-donut-caption", children: hovered ? hovered.category : centerCaption })
3685
4088
  ] })
3686
4089
  ] })
3687
4090
  }
@@ -3693,14 +4096,14 @@ function colorForSegment(index) {
3693
4096
 
3694
4097
  // src/components/data/LinkList.tsx
3695
4098
  import { Button as AriaButton15 } from "react-aria-components";
3696
- import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
4099
+ import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
3697
4100
  function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
3698
- return /* @__PURE__ */ jsx53("div", { className: cx("pire-linklist", className), role: "list", "data-emphasis": emphasis, ...rest, children: items.map((item) => {
3699
- const keySlot = item.key ? /* @__PURE__ */ jsx53("span", { className: "pire-linklist-key", children: item.key }) : null;
3700
- const textSlot = item.text ? /* @__PURE__ */ jsx53("span", { className: "pire-linklist-text", children: item.text }) : null;
4101
+ return /* @__PURE__ */ jsx56("div", { className: cx("pire-linklist", className), role: "list", "data-emphasis": emphasis, ...rest, children: items.map((item) => {
4102
+ const keySlot = item.key ? /* @__PURE__ */ jsx56("span", { className: "pire-linklist-key", children: item.key }) : null;
4103
+ const textSlot = item.text ? /* @__PURE__ */ jsx56("span", { className: "pire-linklist-text", children: item.text }) : null;
3701
4104
  const [first, second] = emphasis === "text" ? [textSlot, keySlot] : [keySlot, textSlot];
3702
- return /* @__PURE__ */ jsx53("div", { role: "listitem", className: "pire-linklist-row", children: /* @__PURE__ */ jsxs45(AriaButton15, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
3703
- item.icon ? /* @__PURE__ */ jsx53(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
4105
+ return /* @__PURE__ */ jsx56("div", { role: "listitem", className: "pire-linklist-row", children: /* @__PURE__ */ jsxs47(AriaButton15, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
4106
+ item.icon ? /* @__PURE__ */ jsx56(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
3704
4107
  first,
3705
4108
  second,
3706
4109
  item.trailing
@@ -3708,8 +4111,73 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
3708
4111
  }) });
3709
4112
  }
3710
4113
 
4114
+ // src/components/data/RecordCard.tsx
4115
+ import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
4116
+ function RecordCard({ title, subtitle, icon, action, isDisabled, className, ...rest }) {
4117
+ return /* @__PURE__ */ jsxs48("div", { className: cx("pire-recordcard", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
4118
+ icon ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ jsx57(Icon, { name: icon, size: 20 }) }) : null,
4119
+ /* @__PURE__ */ jsxs48("span", { className: "pire-recordcard-body", children: [
4120
+ /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-title", children: title }),
4121
+ subtitle ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-sub", children: subtitle }) : null
4122
+ ] }),
4123
+ action ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-action", children: action }) : null
4124
+ ] });
4125
+ }
4126
+
4127
+ // src/components/data/ViewSwitcher.tsx
4128
+ import { Button as AriaButton16 } from "react-aria-components";
4129
+ import { jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
4130
+ function ViewSwitcher({
4131
+ name,
4132
+ isDirty,
4133
+ icon = "star",
4134
+ onPress,
4135
+ isDisabled,
4136
+ "aria-label": ariaLabel,
4137
+ className,
4138
+ style
4139
+ }) {
4140
+ const msg = usePireMessages();
4141
+ const label = ariaLabel ?? (isDirty ? msg.viewSwitcherNameModified.replace("{view}", name) : msg.viewSwitcherName.replace("{view}", name));
4142
+ return /* @__PURE__ */ jsxs49(
4143
+ AriaButton16,
4144
+ {
4145
+ className: cx("pire-viewswitcher", className),
4146
+ style,
4147
+ "aria-label": label,
4148
+ isDisabled,
4149
+ onPress,
4150
+ children: [
4151
+ /* @__PURE__ */ jsx58(Icon, { name: icon, size: 16 }),
4152
+ /* @__PURE__ */ jsx58("span", { className: "pire-viewswitcher-name", children: name }),
4153
+ isDirty ? /* @__PURE__ */ jsx58("span", { className: "pire-viewswitcher-dirty", "aria-hidden": "true", children: msg.viewSwitcherModifiedMark }) : null,
4154
+ /* @__PURE__ */ jsx58(Icon, { name: "chevron-down", size: 16 })
4155
+ ]
4156
+ }
4157
+ );
4158
+ }
4159
+
4160
+ // src/components/data/BarList.tsx
4161
+ import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
4162
+ function BarList({ items, max, className, ...rest }) {
4163
+ const scale = max ?? Math.max(0, ...items.map((i) => i.value));
4164
+ return /* @__PURE__ */ jsx59("ul", { ...rest, className: cx("pire-barlist", className), children: items.map((item) => {
4165
+ const pct = scale > 0 ? Math.max(0, Math.min(100, item.value / scale * 100)) : 0;
4166
+ return /* @__PURE__ */ jsxs50("li", { className: "pire-barlist-row", "data-tone": item.tone, children: [
4167
+ /* @__PURE__ */ jsxs50("span", { className: "pire-barlist-main", children: [
4168
+ /* @__PURE__ */ jsx59("span", { className: "pire-barlist-label", children: item.label }),
4169
+ /* @__PURE__ */ jsx59("span", { className: "pire-barlist-track", "aria-hidden": "true", children: /* @__PURE__ */ jsx59("span", { className: "pire-barlist-fill", style: { width: `${pct}%` } }) })
4170
+ ] }),
4171
+ /* @__PURE__ */ jsxs50("span", { className: "pire-barlist-figure", children: [
4172
+ /* @__PURE__ */ jsx59("span", { className: "pire-barlist-value", children: item.valueLabel ?? String(item.value) }),
4173
+ item.hint ? /* @__PURE__ */ jsx59("span", { className: "pire-barlist-hint", children: item.hint }) : null
4174
+ ] })
4175
+ ] }, item.id);
4176
+ }) });
4177
+ }
4178
+
3711
4179
  // src/components/layout/PageBand.tsx
3712
- import { jsx as jsx54 } from "react/jsx-runtime";
4180
+ import { jsx as jsx60 } from "react/jsx-runtime";
3713
4181
  function PageBand({
3714
4182
  surface = "card",
3715
4183
  hasBorder = true,
@@ -3717,7 +4185,7 @@ function PageBand({
3717
4185
  className,
3718
4186
  ...rest
3719
4187
  }) {
3720
- return /* @__PURE__ */ jsx54(
4188
+ return /* @__PURE__ */ jsx60(
3721
4189
  "div",
3722
4190
  {
3723
4191
  className: cx("pire-pageband", className),
@@ -3730,56 +4198,56 @@ function PageBand({
3730
4198
  }
3731
4199
 
3732
4200
  // src/components/layout/PageHeader.tsx
3733
- import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
4201
+ import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
3734
4202
  function PageHeader({ title, subtitle, actions, className, ...rest }) {
3735
- return /* @__PURE__ */ jsxs46("header", { className: cx("pire-pageheader", className), ...rest, children: [
3736
- /* @__PURE__ */ jsxs46("div", { style: { minWidth: 0 }, children: [
3737
- /* @__PURE__ */ jsx55("h1", { className: "pire-pageheader-title", children: title }),
3738
- subtitle ? /* @__PURE__ */ jsx55("p", { className: "pire-pageheader-sub", children: subtitle }) : null
4203
+ return /* @__PURE__ */ jsxs51("header", { className: cx("pire-pageheader", className), ...rest, children: [
4204
+ /* @__PURE__ */ jsxs51("div", { style: { minWidth: 0 }, children: [
4205
+ /* @__PURE__ */ jsx61("h1", { className: "pire-pageheader-title", children: title }),
4206
+ subtitle ? /* @__PURE__ */ jsx61("p", { className: "pire-pageheader-sub", children: subtitle }) : null
3739
4207
  ] }),
3740
- actions ? /* @__PURE__ */ jsx55("div", { className: "pire-pageheader-actions", children: actions }) : null
4208
+ actions ? /* @__PURE__ */ jsx61("div", { className: "pire-pageheader-actions", children: actions }) : null
3741
4209
  ] });
3742
4210
  }
3743
4211
 
3744
4212
  // src/components/layout/SectionHeader.tsx
3745
- import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
4213
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
3746
4214
  function SectionHeader({ title, meta, actions, className, ...rest }) {
3747
- return /* @__PURE__ */ jsxs47("div", { className: cx("pire-sectionhead", className), ...rest, children: [
3748
- /* @__PURE__ */ jsx56("span", { className: "pire-eyebrow", children: title }),
3749
- meta ? /* @__PURE__ */ jsx56("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
3750
- actions ? /* @__PURE__ */ jsx56("div", { className: "pire-sectionhead-actions", children: actions }) : null
4215
+ return /* @__PURE__ */ jsxs52("div", { className: cx("pire-sectionhead", className), ...rest, children: [
4216
+ /* @__PURE__ */ jsx62("span", { className: "pire-eyebrow", children: title }),
4217
+ meta ? /* @__PURE__ */ jsx62("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
4218
+ actions ? /* @__PURE__ */ jsx62("div", { className: "pire-sectionhead-actions", children: actions }) : null
3751
4219
  ] });
3752
4220
  }
3753
4221
 
3754
4222
  // src/components/layout/SelectionBar.tsx
3755
- import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
4223
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
3756
4224
  function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
3757
4225
  if (!count) return null;
3758
- return /* @__PURE__ */ jsxs48("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
3759
- /* @__PURE__ */ jsxs48("span", { className: "pire-selectionbar-count", children: [
4226
+ return /* @__PURE__ */ jsxs53("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
4227
+ /* @__PURE__ */ jsxs53("span", { className: "pire-selectionbar-count", children: [
3760
4228
  count.toLocaleString(),
3761
4229
  " ",
3762
4230
  noun,
3763
4231
  count === 1 ? "" : "s",
3764
4232
  " selected"
3765
4233
  ] }),
3766
- children ? /* @__PURE__ */ jsx57("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
3767
- actions ? /* @__PURE__ */ jsx57("div", { className: "pire-selectionbar-actions", children: actions }) : null
4234
+ children ? /* @__PURE__ */ jsx63("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
4235
+ actions ? /* @__PURE__ */ jsx63("div", { className: "pire-selectionbar-actions", children: actions }) : null
3768
4236
  ] });
3769
4237
  }
3770
4238
 
3771
4239
  // src/components/layout/FooterBar.tsx
3772
- import { jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
4240
+ import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
3773
4241
  function FooterBar({ note, actions, children, className, ...rest }) {
3774
- return /* @__PURE__ */ jsxs49("footer", { className: cx("pire-footerbar", className), ...rest, children: [
3775
- note ? /* @__PURE__ */ jsx58("span", { className: "pire-footerbar-note", children: note }) : null,
4242
+ return /* @__PURE__ */ jsxs54("footer", { className: cx("pire-footerbar", className), ...rest, children: [
4243
+ note ? /* @__PURE__ */ jsx64("span", { className: "pire-footerbar-note", children: note }) : null,
3776
4244
  children,
3777
- actions ? /* @__PURE__ */ jsx58("div", { className: "pire-footerbar-actions", children: actions }) : null
4245
+ actions ? /* @__PURE__ */ jsx64("div", { className: "pire-footerbar-actions", children: actions }) : null
3778
4246
  ] });
3779
4247
  }
3780
4248
 
3781
4249
  // src/components/layout/SplitPane.tsx
3782
- import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
4250
+ import { jsx as jsx65, jsxs as jsxs55 } from "react/jsx-runtime";
3783
4251
  function SplitPane({
3784
4252
  list,
3785
4253
  detail,
@@ -3795,7 +4263,7 @@ function SplitPane({
3795
4263
  }) {
3796
4264
  const msg = usePireMessages();
3797
4265
  const width = typeof listWidth === "number" ? `${listWidth}px` : listWidth;
3798
- return /* @__PURE__ */ jsxs50(
4266
+ return /* @__PURE__ */ jsxs55(
3799
4267
  "div",
3800
4268
  {
3801
4269
  className: cx("pire-split", className),
@@ -3803,10 +4271,10 @@ function SplitPane({
3803
4271
  style: { ["--pire-split-list-w"]: width, ...style },
3804
4272
  ...rest,
3805
4273
  children: [
3806
- /* @__PURE__ */ jsx59("section", { className: "pire-split-list", "aria-label": listLabel ?? msg.splitPaneList, children: list }),
3807
- /* @__PURE__ */ jsxs50("section", { className: "pire-split-detail", "aria-label": detailLabel ?? msg.splitPaneDetail, children: [
3808
- onBack ? /* @__PURE__ */ jsx59("div", { className: "pire-split-back", children: /* @__PURE__ */ jsx59(Button, { variant: "tertiary", size: "sm", icon: "arrow-left", onPress: onBack, children: backLabel ?? msg.splitPaneBack }) }) : null,
3809
- detail ?? /* @__PURE__ */ jsx59("div", { className: "pire-split-empty", children: emptyDetail })
4274
+ /* @__PURE__ */ jsx65("section", { className: "pire-split-list", "aria-label": listLabel ?? msg.splitPaneList, children: list }),
4275
+ /* @__PURE__ */ jsxs55("section", { className: "pire-split-detail", "aria-label": detailLabel ?? msg.splitPaneDetail, children: [
4276
+ onBack ? /* @__PURE__ */ jsx65("div", { className: "pire-split-back", children: /* @__PURE__ */ jsx65(Button, { variant: "tertiary", size: "sm", icon: "arrow-left", onPress: onBack, children: backLabel ?? msg.splitPaneBack }) }) : null,
4277
+ detail ?? /* @__PURE__ */ jsx65("div", { className: "pire-split-empty", children: emptyDetail })
3810
4278
  ] })
3811
4279
  ]
3812
4280
  }
@@ -3814,11 +4282,12 @@ function SplitPane({
3814
4282
  }
3815
4283
 
3816
4284
  // src/components/patterns/ConfirmDialog.tsx
3817
- import { Fragment as Fragment5, jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
4285
+ import { Fragment as Fragment7, jsx as jsx66, jsxs as jsxs56 } from "react/jsx-runtime";
3818
4286
  function ConfirmDialog({
3819
4287
  isOpen,
3820
4288
  title,
3821
4289
  subtitle,
4290
+ facts,
3822
4291
  consequence,
3823
4292
  children,
3824
4293
  confirmLabel = "Confirm",
@@ -3828,7 +4297,8 @@ function ConfirmDialog({
3828
4297
  onConfirm,
3829
4298
  onCancel
3830
4299
  }) {
3831
- return /* @__PURE__ */ jsxs51(
4300
+ const msg = usePireMessages();
4301
+ return /* @__PURE__ */ jsxs56(
3832
4302
  Dialog,
3833
4303
  {
3834
4304
  isOpen,
@@ -3838,12 +4308,19 @@ function ConfirmDialog({
3838
4308
  onClose: onCancel,
3839
4309
  isDismissable: !isBusy,
3840
4310
  showClose: false,
3841
- footer: /* @__PURE__ */ jsxs51(Fragment5, { children: [
3842
- /* @__PURE__ */ jsx60(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
3843
- /* @__PURE__ */ jsx60(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
4311
+ footer: /* @__PURE__ */ jsxs56(Fragment7, { children: [
4312
+ /* @__PURE__ */ jsx66(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
4313
+ /* @__PURE__ */ jsx66(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
3844
4314
  ] }),
3845
4315
  children: [
3846
- consequence ? /* @__PURE__ */ jsx60(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
4316
+ facts?.length ? (
4317
+ // The role is what makes the name stick. A bare <div> resolves to `generic`, which
4318
+ // *prohibits* `aria-label` — the label named nothing at all, and axe's
4319
+ // `aria-prohibited-attr` fails it on sight. Every other labelled div/span in this library
4320
+ // pairs with an explicit role for the same reason.
4321
+ /* @__PURE__ */ jsx66("div", { className: "pire-confirm-facts", role: "group", "aria-label": msg.confirmDialogFactsLabel, children: /* @__PURE__ */ jsx66(DescriptionList, { layout: "rows", items: facts }) })
4322
+ ) : null,
4323
+ consequence ? /* @__PURE__ */ jsx66(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
3847
4324
  children
3848
4325
  ]
3849
4326
  }
@@ -3851,7 +4328,7 @@ function ConfirmDialog({
3851
4328
  }
3852
4329
 
3853
4330
  // src/components/patterns/CommandPalette.tsx
3854
- import * as React26 from "react";
4331
+ import * as React28 from "react";
3855
4332
  import {
3856
4333
  Autocomplete,
3857
4334
  ModalOverlay as ModalOverlay2,
@@ -3864,7 +4341,7 @@ import {
3864
4341
  Header as Header2,
3865
4342
  useFilter
3866
4343
  } from "react-aria-components";
3867
- import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs52 } from "react/jsx-runtime";
4344
+ import { Fragment as Fragment8, jsx as jsx67, jsxs as jsxs57 } from "react/jsx-runtime";
3868
4345
  var RESULTS_SECTION_KEY = "__pire_results__";
3869
4346
  var searchableText = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
3870
4347
  function CommandPalette({
@@ -3885,17 +4362,17 @@ function CommandPalette({
3885
4362
  style
3886
4363
  }) {
3887
4364
  const msg = usePireMessages();
3888
- const [query, setQuery] = React26.useState("");
4365
+ const [query, setQuery] = React28.useState("");
3889
4366
  const { contains } = useFilter({ sensitivity: "base" });
3890
- React26.useEffect(() => {
4367
+ React28.useEffect(() => {
3891
4368
  if (isOpen) setQuery("");
3892
4369
  }, [isOpen]);
3893
- const searchableById = React26.useMemo(() => {
4370
+ const searchableById = React28.useMemo(() => {
3894
4371
  const byId = /* @__PURE__ */ new Map();
3895
4372
  for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
3896
4373
  return byId;
3897
4374
  }, [groups]);
3898
- const filter = React26.useCallback((textValue, inputValue, node) => {
4375
+ const filter = React28.useCallback((textValue, inputValue, node) => {
3899
4376
  if (node.parentKey === RESULTS_SECTION_KEY) return true;
3900
4377
  return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
3901
4378
  }, [contains, searchableById]);
@@ -3905,7 +4382,7 @@ function CommandPalette({
3905
4382
  };
3906
4383
  const sections = [...groups, ...resultsGroup ? [{ ...resultsGroup, id: RESULTS_SECTION_KEY }] : []];
3907
4384
  const status = isLoading ? loadingLabel ?? msg.commandPaletteLoading : emptyLabel ?? msg.commandPaletteEmpty;
3908
- return /* @__PURE__ */ jsx61(
4385
+ return /* @__PURE__ */ jsx67(
3909
4386
  ModalOverlay2,
3910
4387
  {
3911
4388
  className: "pire-cp-overlay",
@@ -3914,11 +4391,11 @@ function CommandPalette({
3914
4391
  onOpenChange: (open) => {
3915
4392
  if (!open) onOpenChange?.(false);
3916
4393
  },
3917
- children: /* @__PURE__ */ jsx61(Modal2, { className: cx("pire-cp-modal", className), style, children: /* @__PURE__ */ jsxs52(AriaDialog4, { className: "pire-cp-dialog", "aria-label": ariaLabel ?? msg.commandPaletteLabel, children: [
3918
- /* @__PURE__ */ jsxs52(Autocomplete, { filter, inputValue: query, onInputChange: handleInputChange, children: [
3919
- /* @__PURE__ */ jsxs52(SearchField, { className: "pire-cp-search", "aria-label": msg.commandPaletteSearchLabel, children: [
3920
- /* @__PURE__ */ jsx61(Icon, { name: "search", size: 18, className: "pire-cp-search-icon" }),
3921
- /* @__PURE__ */ jsx61(
4394
+ children: /* @__PURE__ */ jsx67(Modal2, { className: cx("pire-cp-modal", className), style, children: /* @__PURE__ */ jsxs57(AriaDialog4, { className: "pire-cp-dialog", "aria-label": ariaLabel ?? msg.commandPaletteLabel, children: [
4395
+ /* @__PURE__ */ jsxs57(Autocomplete, { filter, inputValue: query, onInputChange: handleInputChange, children: [
4396
+ /* @__PURE__ */ jsxs57(SearchField, { className: "pire-cp-search", "aria-label": msg.commandPaletteSearchLabel, children: [
4397
+ /* @__PURE__ */ jsx67(Icon, { name: "search", size: 18, className: "pire-cp-search-icon" }),
4398
+ /* @__PURE__ */ jsx67(
3922
4399
  AriaInput5,
3923
4400
  {
3924
4401
  className: "pire-cp-input",
@@ -3927,16 +4404,16 @@ function CommandPalette({
3927
4404
  }
3928
4405
  )
3929
4406
  ] }),
3930
- isLoading ? /* @__PURE__ */ jsx61("div", { className: "pire-cp-loading", role: "status", "aria-live": "polite", children: loadingLabel ?? msg.commandPaletteLoading }) : null,
3931
- /* @__PURE__ */ jsx61(
4407
+ isLoading ? /* @__PURE__ */ jsx67("div", { className: "pire-cp-loading", role: "status", "aria-live": "polite", children: loadingLabel ?? msg.commandPaletteLoading }) : null,
4408
+ /* @__PURE__ */ jsx67(
3932
4409
  AriaMenu2,
3933
4410
  {
3934
4411
  className: "pire-cp-list",
3935
4412
  onAction: (key) => onAction?.(String(key)),
3936
- renderEmptyState: () => /* @__PURE__ */ jsx61("div", { className: "pire-cp-status", children: status }),
3937
- children: sections.map((section) => /* @__PURE__ */ jsxs52(AriaMenuSection2, { id: section.id, className: "pire-cp-section", children: [
3938
- section.label ? /* @__PURE__ */ jsx61(Header2, { className: "pire-cp-section-title", children: section.label }) : null,
3939
- section.items.map((item) => /* @__PURE__ */ jsx61(
4413
+ renderEmptyState: () => /* @__PURE__ */ jsx67("div", { className: "pire-cp-status", children: status }),
4414
+ children: sections.map((section) => /* @__PURE__ */ jsxs57(AriaMenuSection2, { id: section.id, className: "pire-cp-section", children: [
4415
+ section.label ? /* @__PURE__ */ jsx67(Header2, { className: "pire-cp-section-title", children: section.label }) : null,
4416
+ section.items.map((item) => /* @__PURE__ */ jsx67(
3940
4417
  MenuItem,
3941
4418
  {
3942
4419
  id: item.id,
@@ -3957,18 +4434,18 @@ function CommandPalette({
3957
4434
  // aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen
3958
4435
  // reader already announces the listbox semantics that make those keys work, so reading
3959
4436
  // "up arrow down arrow navigate" out loud is noise on every open.
3960
- /* @__PURE__ */ jsx61("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ jsxs52(Fragment6, { children: [
3961
- /* @__PURE__ */ jsxs52("span", { className: "pire-cp-hint", children: [
3962
- /* @__PURE__ */ jsx61(Kbd, { children: "\u2191" }),
3963
- /* @__PURE__ */ jsx61(Kbd, { children: "\u2193" }),
4437
+ /* @__PURE__ */ jsx67("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ jsxs57(Fragment8, { children: [
4438
+ /* @__PURE__ */ jsxs57("span", { className: "pire-cp-hint", children: [
4439
+ /* @__PURE__ */ jsx67(Kbd, { children: "\u2191" }),
4440
+ /* @__PURE__ */ jsx67(Kbd, { children: "\u2193" }),
3964
4441
  msg.commandPaletteHintNavigate
3965
4442
  ] }),
3966
- /* @__PURE__ */ jsxs52("span", { className: "pire-cp-hint", children: [
3967
- /* @__PURE__ */ jsx61(Kbd, { children: "\u21B5" }),
4443
+ /* @__PURE__ */ jsxs57("span", { className: "pire-cp-hint", children: [
4444
+ /* @__PURE__ */ jsx67(Kbd, { children: "\u21B5" }),
3968
4445
  msg.commandPaletteHintSelect
3969
4446
  ] }),
3970
- /* @__PURE__ */ jsxs52("span", { className: "pire-cp-hint", children: [
3971
- /* @__PURE__ */ jsx61(Kbd, { children: "esc" }),
4447
+ /* @__PURE__ */ jsxs57("span", { className: "pire-cp-hint", children: [
4448
+ /* @__PURE__ */ jsx67(Kbd, { children: "esc" }),
3972
4449
  msg.commandPaletteHintClose
3973
4450
  ] })
3974
4451
  ] }) })
@@ -3978,9 +4455,9 @@ function CommandPalette({
3978
4455
  );
3979
4456
  }
3980
4457
  function useCommandPaletteShortcut(onTrigger, { key = "k", isDisabled } = {}) {
3981
- const handler = React26.useRef(onTrigger);
4458
+ const handler = React28.useRef(onTrigger);
3982
4459
  handler.current = onTrigger;
3983
- React26.useEffect(() => {
4460
+ React28.useEffect(() => {
3984
4461
  if (isDisabled) return;
3985
4462
  const onKeyDown = (event) => {
3986
4463
  if (!(event.metaKey || event.ctrlKey) || event.altKey) return;
@@ -3994,15 +4471,15 @@ function useCommandPaletteShortcut(onTrigger, { key = "k", isDisabled } = {}) {
3994
4471
  }
3995
4472
 
3996
4473
  // src/components/patterns/AppLauncher.tsx
3997
- import * as React27 from "react";
4474
+ import * as React29 from "react";
3998
4475
  import {
3999
4476
  DialogTrigger,
4000
- Button as AriaButton16,
4477
+ Button as AriaButton17,
4001
4478
  Popover as Popover8,
4002
4479
  Dialog as AriaDialog5,
4003
4480
  useFilter as useFilter2
4004
4481
  } from "react-aria-components";
4005
- import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
4482
+ import { Fragment as Fragment9, jsx as jsx68, jsxs as jsxs58 } from "react/jsx-runtime";
4006
4483
  var searchableText2 = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
4007
4484
  function AppLauncher({
4008
4485
  sections,
@@ -4021,13 +4498,13 @@ function AppLauncher({
4021
4498
  className
4022
4499
  }) {
4023
4500
  const msg = usePireMessages();
4024
- const [query, setQuery] = React27.useState("");
4501
+ const [query, setQuery] = React29.useState("");
4025
4502
  const { contains } = useFilter2({ sensitivity: "base" });
4026
4503
  const handleSearch = (next) => {
4027
4504
  setQuery(next);
4028
4505
  onSearchChange?.(next);
4029
4506
  };
4030
- const visible = React27.useMemo(() => {
4507
+ const visible = React29.useMemo(() => {
4031
4508
  if (isFilteredExternally) return sections;
4032
4509
  const q = query.trim();
4033
4510
  if (!q) return sections;
@@ -4035,9 +4512,9 @@ function AppLauncher({
4035
4512
  }, [sections, query, isFilteredExternally, contains]);
4036
4513
  const isEmpty = !isLoading && visible.length === 0;
4037
4514
  const label = ariaLabel ?? msg.appLauncherLabel;
4038
- return /* @__PURE__ */ jsxs53(DialogTrigger, { children: [
4039
- /* @__PURE__ */ jsx62(AriaButton16, { className: "pire-launcher-trigger", "aria-label": label, children: /* @__PURE__ */ jsx62(Icon, { name: icon, size: 20 }) }),
4040
- /* @__PURE__ */ jsx62(
4515
+ return /* @__PURE__ */ jsxs58(DialogTrigger, { children: [
4516
+ /* @__PURE__ */ jsx68(AriaButton17, { className: "pire-launcher-trigger", "aria-label": label, children: /* @__PURE__ */ jsx68(Icon, { name: icon, size: 20 }) }),
4517
+ /* @__PURE__ */ jsx68(
4041
4518
  Popover8,
4042
4519
  {
4043
4520
  className: cx("pire-launcher-popover", className),
@@ -4045,15 +4522,15 @@ function AppLauncher({
4045
4522
  offset: 0,
4046
4523
  crossOffset: 0,
4047
4524
  containerPadding: 0,
4048
- children: /* @__PURE__ */ jsx62(AriaDialog5, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ jsxs53(Fragment7, { children: [
4049
- /* @__PURE__ */ jsxs53("div", { className: "pire-launcher-head", children: [
4050
- /* @__PURE__ */ jsx62("span", { className: "pire-launcher-title", children: title ?? msg.appLauncherTitle }),
4051
- meta ? /* @__PURE__ */ jsx62("span", { className: "pire-launcher-meta", children: meta }) : null
4525
+ children: /* @__PURE__ */ jsx68(AriaDialog5, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ jsxs58(Fragment9, { children: [
4526
+ /* @__PURE__ */ jsxs58("div", { className: "pire-launcher-head", children: [
4527
+ /* @__PURE__ */ jsx68("span", { className: "pire-launcher-title", children: title ?? msg.appLauncherTitle }),
4528
+ meta ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-meta", children: meta }) : null
4052
4529
  ] }),
4053
4530
  isSearchable ? (
4054
4531
  // autoFocus is right here specifically: the panel exists to be searched, and the
4055
4532
  // user just chose to open it, so taking the caret is what they asked for.
4056
- /* @__PURE__ */ jsx62(
4533
+ /* @__PURE__ */ jsx68(
4057
4534
  Input,
4058
4535
  {
4059
4536
  "aria-label": msg.appLauncherSearch,
@@ -4067,18 +4544,18 @@ function AppLauncher({
4067
4544
  }
4068
4545
  )
4069
4546
  ) : null,
4070
- isLoading ? /* @__PURE__ */ jsx62("div", { className: "pire-launcher-empty", role: "status", "aria-live": "polite", children: msg.appLauncherLoading }) : null,
4071
- isEmpty ? /* @__PURE__ */ jsx62("div", { className: "pire-launcher-empty", children: emptyLabel ?? msg.appLauncherEmpty }) : null,
4547
+ isLoading ? /* @__PURE__ */ jsx68("div", { className: "pire-launcher-empty", role: "status", "aria-live": "polite", children: msg.appLauncherLoading }) : null,
4548
+ isEmpty ? /* @__PURE__ */ jsx68("div", { className: "pire-launcher-empty", children: emptyLabel ?? msg.appLauncherEmpty }) : null,
4072
4549
  visible.map((section, si) => (
4073
4550
  // Sections are positional zones with no record identity, so the heading is the key
4074
4551
  // where there is one. Same reasoning as ShellRail's groups.
4075
- /* @__PURE__ */ jsxs53("div", { className: "pire-launcher-section", children: [
4076
- section.label ? /* @__PURE__ */ jsx62("div", { className: "pire-eyebrow", children: section.label }) : null,
4077
- /* @__PURE__ */ jsx62("div", { className: "pire-launcher-grid", "data-variant": section.variant ?? "tile", children: section.items.map((item) => {
4552
+ /* @__PURE__ */ jsxs58("div", { className: "pire-launcher-section", children: [
4553
+ section.label ? /* @__PURE__ */ jsx68("div", { className: "pire-eyebrow", children: section.label }) : null,
4554
+ /* @__PURE__ */ jsx68("div", { className: "pire-launcher-grid", "data-variant": section.variant ?? "tile", children: section.items.map((item) => {
4078
4555
  const isCurrent = item.id === value;
4079
4556
  const showsDescription = (section.variant ?? "tile") === "tile" && Boolean(item.description);
4080
- return /* @__PURE__ */ jsxs53(
4081
- AriaButton16,
4557
+ return /* @__PURE__ */ jsxs58(
4558
+ AriaButton17,
4082
4559
  {
4083
4560
  className: "pire-launcher-item",
4084
4561
  "data-selected": isCurrent ? "true" : void 0,
@@ -4088,10 +4565,10 @@ function AppLauncher({
4088
4565
  onAction?.(item.id);
4089
4566
  },
4090
4567
  children: [
4091
- item.icon ? /* @__PURE__ */ jsx62("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ jsx62(Icon, { name: item.icon, size: (section.variant ?? "tile") === "tile" ? 20 : 16 }) }) : null,
4092
- /* @__PURE__ */ jsxs53("span", { className: "pire-launcher-item-text", children: [
4093
- /* @__PURE__ */ jsx62("span", { className: "pire-launcher-item-label", children: item.label }),
4094
- showsDescription ? /* @__PURE__ */ jsx62("span", { className: "pire-launcher-item-desc", children: item.description }) : null
4568
+ 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,
4569
+ /* @__PURE__ */ jsxs58("span", { className: "pire-launcher-item-text", children: [
4570
+ /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-label", children: item.label }),
4571
+ showsDescription ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-desc", children: item.description }) : null
4095
4572
  ] })
4096
4573
  ]
4097
4574
  },
@@ -4108,10 +4585,10 @@ function AppLauncher({
4108
4585
 
4109
4586
  // src/components/patterns/SidePanel.tsx
4110
4587
  import { ModalOverlay as ModalOverlay3, Modal as Modal3, Dialog as AriaDialog6, Heading as Heading5 } from "react-aria-components";
4111
- import { jsx as jsx63, jsxs as jsxs54 } from "react/jsx-runtime";
4588
+ import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
4112
4589
  function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
4113
4590
  const msg = usePireMessages();
4114
- return /* @__PURE__ */ jsx63(
4591
+ return /* @__PURE__ */ jsx69(
4115
4592
  ModalOverlay3,
4116
4593
  {
4117
4594
  className: "pire-sidepanel-overlay",
@@ -4120,36 +4597,151 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
4120
4597
  onOpenChange: (o) => {
4121
4598
  if (!o) onClose?.();
4122
4599
  },
4123
- children: /* @__PURE__ */ jsx63(Modal3, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ jsxs54(AriaDialog6, { className: "pire-dialog", style: { height: "100%" }, children: [
4124
- /* @__PURE__ */ jsxs54("header", { className: "pire-dialog-head", children: [
4125
- /* @__PURE__ */ jsxs54("div", { style: { flex: 1, minWidth: 0 }, children: [
4126
- /* @__PURE__ */ jsx63(Heading5, { slot: "title", className: "pire-dialog-title", children: title }),
4127
- subtitle ? /* @__PURE__ */ jsx63("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
4600
+ children: /* @__PURE__ */ jsx69(Modal3, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ jsxs59(AriaDialog6, { className: "pire-dialog", style: { height: "100%" }, children: [
4601
+ /* @__PURE__ */ jsxs59("header", { className: "pire-dialog-head", children: [
4602
+ /* @__PURE__ */ jsxs59("div", { style: { flex: 1, minWidth: 0 }, children: [
4603
+ /* @__PURE__ */ jsx69(Heading5, { slot: "title", className: "pire-dialog-title", children: title }),
4604
+ subtitle ? /* @__PURE__ */ jsx69("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
4128
4605
  ] }),
4129
- /* @__PURE__ */ jsx63(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
4606
+ /* @__PURE__ */ jsx69(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
4130
4607
  ] }),
4131
- /* @__PURE__ */ jsx63("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
4132
- footer ? /* @__PURE__ */ jsx63("footer", { className: "pire-dialog-foot", children: footer }) : null
4608
+ /* @__PURE__ */ jsx69("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
4609
+ footer ? /* @__PURE__ */ jsx69("footer", { className: "pire-dialog-foot", children: footer }) : null
4133
4610
  ] }) })
4134
4611
  }
4135
4612
  );
4136
4613
  }
4137
4614
 
4138
4615
  // src/components/patterns/EmptyState.tsx
4139
- import { jsx as jsx64, jsxs as jsxs55 } from "react/jsx-runtime";
4616
+ import { jsx as jsx70, jsxs as jsxs60 } from "react/jsx-runtime";
4140
4617
  function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
4141
- return /* @__PURE__ */ jsxs55("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
4142
- /* @__PURE__ */ jsx64(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
4143
- title ? /* @__PURE__ */ jsx64("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
4144
- children ? /* @__PURE__ */ jsx64("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
4618
+ return /* @__PURE__ */ jsxs60("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
4619
+ /* @__PURE__ */ jsx70(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
4620
+ title ? /* @__PURE__ */ jsx70("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
4621
+ children ? /* @__PURE__ */ jsx70("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
4145
4622
  action
4146
4623
  ] });
4147
4624
  }
4148
4625
 
4626
+ // src/components/patterns/NumPad.tsx
4627
+ import * as React30 from "react";
4628
+ import { jsx as jsx71, jsxs as jsxs61 } from "react/jsx-runtime";
4629
+ var BASE_KEYS = [
4630
+ { value: "7" },
4631
+ { value: "8" },
4632
+ { value: "9" },
4633
+ { value: "clear", label: "C" },
4634
+ { value: "4" },
4635
+ { value: "5" },
4636
+ { value: "6" },
4637
+ { value: "backspace", label: "\u232B" },
4638
+ { value: "1" },
4639
+ { value: "2" },
4640
+ { value: "3" },
4641
+ { value: "0" }
4642
+ ];
4643
+ var isInsertable = (value) => /^[0-9]+$/.test(value);
4644
+ function useNumPadKeyboard(onKey, isDisabled, containerRef) {
4645
+ const handler = React30.useRef(onKey);
4646
+ handler.current = onKey;
4647
+ React30.useEffect(() => {
4648
+ if (isDisabled) return;
4649
+ const isEditingElsewhere = () => {
4650
+ const el = document.activeElement;
4651
+ if (!el) return false;
4652
+ const tag = el.tagName;
4653
+ return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || el.hasAttribute("contenteditable");
4654
+ };
4655
+ const isBackgroundedByAnOverlay = () => containerRef.current?.closest("[inert]") != null;
4656
+ const onKeyDown = (event) => {
4657
+ if (event.metaKey || event.ctrlKey || event.altKey) return;
4658
+ if (isEditingElsewhere() || isBackgroundedByAnOverlay()) return;
4659
+ if (event.key >= "0" && event.key <= "9") {
4660
+ handler.current(event.key);
4661
+ return;
4662
+ }
4663
+ if (event.key === "Backspace") {
4664
+ handler.current("backspace");
4665
+ return;
4666
+ }
4667
+ if (event.key === "Escape") {
4668
+ handler.current("clear");
4669
+ return;
4670
+ }
4671
+ };
4672
+ document.addEventListener("keydown", onKeyDown);
4673
+ return () => document.removeEventListener("keydown", onKeyDown);
4674
+ }, [isDisabled, containerRef]);
4675
+ }
4676
+ function NumPad({
4677
+ "aria-label": ariaLabel,
4678
+ target,
4679
+ value,
4680
+ onChange,
4681
+ extraKeys = [],
4682
+ onAction,
4683
+ isDisabled,
4684
+ size = "md",
4685
+ className,
4686
+ style
4687
+ }) {
4688
+ const msg = usePireMessages();
4689
+ const containerRef = React30.useRef(null);
4690
+ const applyKey = React30.useCallback((key) => {
4691
+ if (isDisabled) return;
4692
+ if (key.value === "backspace") {
4693
+ onChange(value.slice(0, -1));
4694
+ return;
4695
+ }
4696
+ if (key.value === "clear") {
4697
+ onChange("");
4698
+ return;
4699
+ }
4700
+ if (isInsertable(key.value)) {
4701
+ onChange(value + key.value);
4702
+ return;
4703
+ }
4704
+ onAction?.(key.value);
4705
+ }, [isDisabled, value, onChange, onAction]);
4706
+ useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);
4707
+ const keys = [...BASE_KEYS, ...extraKeys];
4708
+ return /* @__PURE__ */ jsxs61(
4709
+ "div",
4710
+ {
4711
+ ref: containerRef,
4712
+ className: cx("pire-numpad", className),
4713
+ style,
4714
+ "data-size": size,
4715
+ "data-disabled": isDisabled ? "true" : void 0,
4716
+ children: [
4717
+ target !== void 0 ? /* @__PURE__ */ jsx71("div", { className: "pire-numpad-target", role: "status", "aria-live": "polite", children: target }) : null,
4718
+ /* @__PURE__ */ jsx71("div", { className: "pire-numpad-grid", role: "group", "aria-label": ariaLabel, children: keys.map((key) => {
4719
+ const accessibleLabel = key.value === "backspace" ? msg.numPadBackspace : key.value === "clear" ? msg.numPadClear : void 0;
4720
+ return /* @__PURE__ */ jsx71(
4721
+ Button,
4722
+ {
4723
+ variant: "secondary",
4724
+ size,
4725
+ fullWidth: true,
4726
+ className: "pire-numpad-key",
4727
+ "data-span": key.span === 2 ? "2" : void 0,
4728
+ isDisabled,
4729
+ "aria-label": accessibleLabel,
4730
+ onPress: () => applyKey(key),
4731
+ children: key.label ?? key.value
4732
+ },
4733
+ key.value
4734
+ );
4735
+ }) })
4736
+ ]
4737
+ }
4738
+ );
4739
+ }
4740
+
4149
4741
  // src/components/patterns/FileDropZone.tsx
4150
- import * as React28 from "react";
4742
+ import * as React31 from "react";
4151
4743
  import { DropZone, FileTrigger as FileTrigger2, isFileDropItem } from "react-aria-components";
4152
- import { jsx as jsx65, jsxs as jsxs56 } from "react/jsx-runtime";
4744
+ import { jsx as jsx72, jsxs as jsxs62 } from "react/jsx-runtime";
4153
4745
  var isImage2 = (file) => file.type.startsWith("image/");
4154
4746
  function FileDropZone({
4155
4747
  label,
@@ -4177,10 +4769,10 @@ function FileDropZone({
4177
4769
  ...rest
4178
4770
  }) {
4179
4771
  const msg = usePireMessages();
4180
- const [uncontrolled, setUncontrolled] = React28.useState(defaultValue ?? []);
4772
+ const [uncontrolled, setUncontrolled] = React31.useState(defaultValue ?? []);
4181
4773
  const files = value ?? uncontrolled;
4182
- const created = React28.useRef([]);
4183
- React28.useEffect(() => () => {
4774
+ const created = React31.useRef([]);
4775
+ React31.useEffect(() => () => {
4184
4776
  for (const url of created.current) URL.revokeObjectURL(url);
4185
4777
  }, []);
4186
4778
  const commit = (next) => {
@@ -4200,12 +4792,12 @@ function FileDropZone({
4200
4792
  commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));
4201
4793
  };
4202
4794
  const remove = (target) => commit(files.filter((f) => f.file !== target));
4203
- return /* @__PURE__ */ jsxs56("div", { className: cx("pire-field", className), style, "data-full-width": String(fullWidth), ...rest, children: [
4204
- label ? /* @__PURE__ */ jsxs56("span", { className: "pire-field-label", children: [
4795
+ return /* @__PURE__ */ jsxs62("div", { className: cx("pire-field", className), style, "data-full-width": String(fullWidth), ...rest, children: [
4796
+ label ? /* @__PURE__ */ jsxs62("span", { className: "pire-field-label", children: [
4205
4797
  label,
4206
- isRequired ? /* @__PURE__ */ jsx65("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
4798
+ isRequired ? /* @__PURE__ */ jsx72("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
4207
4799
  ] }) : null,
4208
- /* @__PURE__ */ jsxs56(
4800
+ /* @__PURE__ */ jsxs62(
4209
4801
  DropZone,
4210
4802
  {
4211
4803
  className: "pire-dropzone",
@@ -4219,25 +4811,25 @@ function FileDropZone({
4219
4811
  accept(dropped);
4220
4812
  },
4221
4813
  children: [
4222
- /* @__PURE__ */ jsx65(Icon, { name: "download", size: 24, className: "pire-dropzone-icon" }),
4223
- /* @__PURE__ */ jsx65("span", { className: "pire-dropzone-prompt", children: promptLabel ?? msg.fileDropZonePrompt }),
4224
- /* @__PURE__ */ jsx65(
4814
+ /* @__PURE__ */ jsx72(Icon, { name: "download", size: 24, className: "pire-dropzone-icon" }),
4815
+ /* @__PURE__ */ jsx72("span", { className: "pire-dropzone-prompt", children: promptLabel ?? msg.fileDropZonePrompt }),
4816
+ /* @__PURE__ */ jsx72(
4225
4817
  FileTrigger2,
4226
4818
  {
4227
4819
  acceptedFileTypes,
4228
4820
  allowsMultiple,
4229
4821
  onSelect: (list) => accept(list ? [...list] : []),
4230
- children: /* @__PURE__ */ jsx65(Button, { variant: "secondary", isDisabled: isDisabled || isReadOnly, children: msg.fileUploadChoose })
4822
+ children: /* @__PURE__ */ jsx72(Button, { variant: "secondary", isDisabled: isDisabled || isReadOnly, children: msg.fileUploadChoose })
4231
4823
  }
4232
4824
  )
4233
4825
  ]
4234
4826
  }
4235
4827
  ),
4236
- files.length ? /* @__PURE__ */ jsx65("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ jsxs56("li", { className: "pire-fileupload-item", children: [
4237
- previewUrl ? /* @__PURE__ */ jsx65("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ jsx65(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
4238
- /* @__PURE__ */ jsx65("span", { className: "pire-fileupload-name", children: file.name }),
4239
- /* @__PURE__ */ jsx65("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
4240
- isDisabled || isReadOnly ? null : /* @__PURE__ */ jsx65(
4828
+ files.length ? /* @__PURE__ */ jsx72("ul", { className: "pire-fileupload-list", children: files.map(({ file, previewUrl }) => /* @__PURE__ */ jsxs62("li", { className: "pire-fileupload-item", children: [
4829
+ previewUrl ? /* @__PURE__ */ jsx72("img", { className: "pire-fileupload-thumb", src: previewUrl, alt: "" }) : /* @__PURE__ */ jsx72(Icon, { name: "file-text", size: 16, className: "pire-fileupload-icon" }),
4830
+ /* @__PURE__ */ jsx72("span", { className: "pire-fileupload-name", children: file.name }),
4831
+ /* @__PURE__ */ jsx72("span", { className: "pire-fileupload-size", children: formatFileSize(file.size) }),
4832
+ isDisabled || isReadOnly ? null : /* @__PURE__ */ jsx72(
4241
4833
  IconButton,
4242
4834
  {
4243
4835
  icon: "x",
@@ -4247,9 +4839,9 @@ function FileDropZone({
4247
4839
  }
4248
4840
  )
4249
4841
  ] }, `${file.name}-${file.size}-${file.lastModified}`)) }) : null,
4250
- uploadProgress != null ? /* @__PURE__ */ jsx65(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
4251
- description ? /* @__PURE__ */ jsx65("span", { className: "pire-field-hint", children: description }) : null,
4252
- isInvalid && errorMessage ? /* @__PURE__ */ jsx65("span", { className: "pire-field-error", children: errorMessage }) : null
4842
+ uploadProgress != null ? /* @__PURE__ */ jsx72(ProgressBar, { value: uploadProgress, label: msg.fileUploadUploading }) : null,
4843
+ description ? /* @__PURE__ */ jsx72("span", { className: "pire-field-hint", children: description }) : null,
4844
+ isInvalid && errorMessage ? /* @__PURE__ */ jsx72("span", { className: "pire-field-error", children: errorMessage }) : null
4253
4845
  ] });
4254
4846
  }
4255
4847
 
@@ -4261,10 +4853,12 @@ export {
4261
4853
  Avatar,
4262
4854
  Badge,
4263
4855
  BarChart,
4856
+ BarList,
4264
4857
  Breadcrumb,
4265
4858
  Button,
4266
4859
  Card,
4267
4860
  Checkbox,
4861
+ ChoiceCardGroup,
4268
4862
  ComboBox,
4269
4863
  CommandPalette,
4270
4864
  ConfirmDialog,
@@ -4304,6 +4898,7 @@ export {
4304
4898
  MenuSeparator,
4305
4899
  MenuTrigger3 as MenuTrigger,
4306
4900
  MultiComboBox,
4901
+ NumPad,
4307
4902
  NumberField,
4308
4903
  ObjectHeader,
4309
4904
  PageBand,
@@ -4312,8 +4907,11 @@ export {
4312
4907
  PireIntlProvider,
4313
4908
  Popover9 as Popover,
4314
4909
  ProgressBar,
4910
+ QuantityStepper,
4315
4911
  Radio,
4316
4912
  RadioGroup,
4913
+ RecordCard,
4914
+ Ribbon,
4317
4915
  RouterProvider,
4318
4916
  SectionHeader,
4319
4917
  SegmentedControl,
@@ -4341,6 +4939,7 @@ export {
4341
4939
  VIZ_SLOT_COUNT,
4342
4940
  ValueHelpDialog,
4343
4941
  ValueHelpField,
4942
+ ViewSwitcher,
4344
4943
  configureIcons,
4345
4944
  enMessages,
4346
4945
  esMessages,