@orianatech/pire 2.1.0 → 2.2.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 (233) hide show
  1. package/dist/components/core/Avatar.d.ts +0 -1
  2. package/dist/components/core/Badge.d.cts +2 -5
  3. package/dist/components/core/Badge.d.ts +2 -6
  4. package/dist/components/core/Button.d.ts +0 -1
  5. package/dist/components/core/Card.d.ts +0 -1
  6. package/dist/components/core/ComingSoonMark.d.ts +0 -1
  7. package/dist/components/core/Heading.d.cts +1 -1
  8. package/dist/components/core/Heading.d.ts +1 -2
  9. package/dist/components/core/Icon.d.cts +1 -2
  10. package/dist/components/core/Icon.d.ts +1 -3
  11. package/dist/components/core/IconButton.d.ts +0 -1
  12. package/dist/components/core/Kbd.d.ts +0 -1
  13. package/dist/components/core/Link.d.ts +0 -1
  14. package/dist/components/core/SegmentedControl.d.cts +1 -1
  15. package/dist/components/core/SegmentedControl.d.ts +1 -2
  16. package/dist/components/core/Separator.d.ts +0 -1
  17. package/dist/components/core/Tag.d.cts +1 -1
  18. package/dist/components/core/Tag.d.ts +1 -2
  19. package/dist/components/core/Text.d.cts +9 -1
  20. package/dist/components/core/Text.d.ts +9 -2
  21. package/dist/components/core/icon-data.generated.d.ts +0 -1
  22. package/dist/components/core/icon-map.d.ts +0 -1
  23. package/dist/components/data/BarChart.d.cts +1 -1
  24. package/dist/components/data/BarChart.d.ts +1 -2
  25. package/dist/components/data/BarList.d.ts +0 -1
  26. package/dist/components/data/ChartFrame.d.ts +0 -1
  27. package/dist/components/data/DataTable.d.cts +9 -3
  28. package/dist/components/data/DataTable.d.ts +9 -4
  29. package/dist/components/data/DescriptionList.d.ts +0 -1
  30. package/dist/components/data/DonutChart.d.cts +1 -1
  31. package/dist/components/data/DonutChart.d.ts +1 -2
  32. package/dist/components/data/FilterBar.d.ts +0 -1
  33. package/dist/components/data/KpiTile.d.ts +0 -1
  34. package/dist/components/data/LineChart.d.cts +1 -1
  35. package/dist/components/data/LineChart.d.ts +1 -2
  36. package/dist/components/data/LinkList.d.ts +0 -1
  37. package/dist/components/data/ObjectHeader.d.ts +0 -1
  38. package/dist/components/data/RecordCard.d.ts +0 -1
  39. package/dist/components/data/Timeline.d.cts +1 -1
  40. package/dist/components/data/Timeline.d.ts +1 -2
  41. package/dist/components/data/ViewSwitcher.d.ts +0 -1
  42. package/dist/components/data/chartGeometry.d.ts +0 -1
  43. package/dist/components/feedback/Dialog.d.cts +11 -0
  44. package/dist/components/feedback/Dialog.d.ts +11 -1
  45. package/dist/components/feedback/InlineMessage.d.cts +2 -0
  46. package/dist/components/feedback/InlineMessage.d.ts +2 -1
  47. package/dist/components/feedback/ProgressBar.d.ts +0 -1
  48. package/dist/components/feedback/Skeleton.d.ts +0 -1
  49. package/dist/components/feedback/Toast.d.cts +1 -1
  50. package/dist/components/feedback/Toast.d.ts +1 -2
  51. package/dist/components/feedback/Tooltip.d.ts +0 -1
  52. package/dist/components/forms/CalendarMonth.d.cts +6 -0
  53. package/dist/components/forms/CalendarMonth.d.ts +6 -0
  54. package/dist/components/forms/Checkbox.d.ts +0 -1
  55. package/dist/components/forms/ChoiceCardGroup.d.cts +3 -12
  56. package/dist/components/forms/ChoiceCardGroup.d.ts +3 -13
  57. package/dist/components/forms/ComboBox.d.cts +2 -11
  58. package/dist/components/forms/ComboBox.d.ts +2 -12
  59. package/dist/components/forms/ComboBoxListBox.d.cts +35 -0
  60. package/dist/components/forms/ComboBoxListBox.d.ts +35 -0
  61. package/dist/components/forms/DatePicker.d.cts +3 -13
  62. package/dist/components/forms/DatePicker.d.ts +3 -14
  63. package/dist/components/forms/DateRangePicker.d.cts +5 -15
  64. package/dist/components/forms/DateRangePicker.d.ts +5 -16
  65. package/dist/components/forms/FieldClearButton.d.cts +12 -0
  66. package/dist/components/forms/FieldClearButton.d.ts +12 -0
  67. package/dist/components/forms/FieldDescription.d.ts +0 -1
  68. package/dist/components/forms/FieldHelp.d.cts +23 -0
  69. package/dist/components/forms/FieldHelp.d.ts +23 -1
  70. package/dist/components/forms/FieldLabel.d.cts +2 -5
  71. package/dist/components/forms/FieldLabel.d.ts +2 -6
  72. package/dist/components/forms/FileUpload.d.cts +40 -1
  73. package/dist/components/forms/FileUpload.d.ts +40 -2
  74. package/dist/components/forms/FormField.d.ts +0 -1
  75. package/dist/components/forms/Input.d.cts +2 -11
  76. package/dist/components/forms/Input.d.ts +2 -12
  77. package/dist/components/forms/MultiComboBox.d.cts +2 -11
  78. package/dist/components/forms/MultiComboBox.d.ts +2 -12
  79. package/dist/components/forms/NumberField.d.cts +3 -13
  80. package/dist/components/forms/NumberField.d.ts +3 -14
  81. package/dist/components/forms/QuantityStepper.d.ts +0 -1
  82. package/dist/components/forms/Radio.d.ts +0 -1
  83. package/dist/components/forms/Select.d.cts +2 -11
  84. package/dist/components/forms/Select.d.ts +2 -12
  85. package/dist/components/forms/Switch.d.ts +0 -1
  86. package/dist/components/forms/TextArea.d.cts +3 -14
  87. package/dist/components/forms/TextArea.d.ts +3 -15
  88. package/dist/components/forms/ValueHelpField.d.cts +7 -3
  89. package/dist/components/forms/ValueHelpField.d.ts +7 -4
  90. package/dist/components/forms/dateValues.d.cts +2 -5
  91. package/dist/components/forms/dateValues.d.ts +2 -6
  92. package/dist/components/layout/FooterBar.d.ts +0 -1
  93. package/dist/components/layout/PageBand.d.ts +0 -1
  94. package/dist/components/layout/PageHeader.d.ts +0 -1
  95. package/dist/components/layout/SectionHeader.d.ts +0 -1
  96. package/dist/components/layout/SelectionBar.d.cts +1 -2
  97. package/dist/components/layout/SelectionBar.d.ts +1 -3
  98. package/dist/components/layout/SplitPane.d.ts +0 -1
  99. package/dist/components/navigation/Breadcrumb.d.ts +0 -1
  100. package/dist/components/navigation/Menu.d.ts +0 -1
  101. package/dist/components/navigation/Pagination.d.ts +0 -1
  102. package/dist/components/navigation/Ribbon.d.cts +1 -1
  103. package/dist/components/navigation/Ribbon.d.ts +1 -2
  104. package/dist/components/navigation/ShellBar.d.cts +2 -5
  105. package/dist/components/navigation/ShellBar.d.ts +2 -6
  106. package/dist/components/navigation/ShellRail.d.ts +0 -1
  107. package/dist/components/navigation/SideNav.d.cts +3 -6
  108. package/dist/components/navigation/SideNav.d.ts +3 -7
  109. package/dist/components/navigation/Tabs.d.cts +1 -1
  110. package/dist/components/navigation/Tabs.d.ts +1 -2
  111. package/dist/components/patterns/AppLauncher.d.cts +1 -2
  112. package/dist/components/patterns/AppLauncher.d.ts +1 -3
  113. package/dist/components/patterns/CommandPalette.d.ts +0 -1
  114. package/dist/components/patterns/ConfirmDialog.d.ts +0 -1
  115. package/dist/components/patterns/EmptyState.d.ts +0 -1
  116. package/dist/components/patterns/FileDropZone.d.cts +1 -1
  117. package/dist/components/patterns/FileDropZone.d.ts +1 -2
  118. package/dist/components/patterns/NumPad.d.cts +2 -8
  119. package/dist/components/patterns/NumPad.d.ts +2 -9
  120. package/dist/components/patterns/SidePanel.d.ts +0 -1
  121. package/dist/components/patterns/ValueHelpDialog.d.cts +5 -5
  122. package/dist/components/patterns/ValueHelpDialog.d.ts +5 -6
  123. package/dist/components/utils/cx.d.ts +0 -1
  124. package/dist/components/utils/decimalSeparator.d.cts +1 -4
  125. package/dist/components/utils/decimalSeparator.d.ts +1 -5
  126. package/dist/components/utils/devWarn.d.cts +5 -3
  127. package/dist/components/utils/devWarn.d.ts +5 -4
  128. package/dist/components/utils/useDocumentKeyDown.d.cts +5 -0
  129. package/dist/components/utils/useDocumentKeyDown.d.ts +5 -0
  130. package/dist/components/utils/useLoadMoreOnScroll.d.cts +11 -0
  131. package/dist/components/utils/useLoadMoreOnScroll.d.ts +11 -0
  132. package/dist/components.css +145 -87
  133. package/dist/i18n/PireIntlProvider.d.ts +0 -1
  134. package/dist/i18n/messages.d.cts +18 -0
  135. package/dist/i18n/messages.d.ts +18 -1
  136. package/dist/index.cjs +1615 -1514
  137. package/dist/index.cjs.map +1 -1
  138. package/dist/index.d.ts +0 -1
  139. package/dist/index.js +1527 -1449
  140. package/dist/index.js.map +1 -1
  141. package/dist/tokens/base.css +2 -5
  142. package/dist/tokens/colors.css +14 -8
  143. package/dist/tokens/elevation.css +15 -0
  144. package/dist/tokens/themes.css +7 -12
  145. package/package.json +1 -1
  146. package/dist/components/core/Avatar.d.ts.map +0 -1
  147. package/dist/components/core/Badge.d.ts.map +0 -1
  148. package/dist/components/core/Button.d.ts.map +0 -1
  149. package/dist/components/core/Card.d.ts.map +0 -1
  150. package/dist/components/core/ComingSoonMark.d.ts.map +0 -1
  151. package/dist/components/core/Heading.d.ts.map +0 -1
  152. package/dist/components/core/Icon.d.ts.map +0 -1
  153. package/dist/components/core/IconButton.d.ts.map +0 -1
  154. package/dist/components/core/Kbd.d.ts.map +0 -1
  155. package/dist/components/core/Link.d.ts.map +0 -1
  156. package/dist/components/core/SegmentedControl.d.ts.map +0 -1
  157. package/dist/components/core/Separator.d.ts.map +0 -1
  158. package/dist/components/core/Tag.d.ts.map +0 -1
  159. package/dist/components/core/Text.d.ts.map +0 -1
  160. package/dist/components/core/icon-data.generated.d.ts.map +0 -1
  161. package/dist/components/core/icon-map.d.ts.map +0 -1
  162. package/dist/components/data/BarChart.d.ts.map +0 -1
  163. package/dist/components/data/BarList.d.ts.map +0 -1
  164. package/dist/components/data/ChartFrame.d.ts.map +0 -1
  165. package/dist/components/data/DataTable.d.ts.map +0 -1
  166. package/dist/components/data/DescriptionList.d.ts.map +0 -1
  167. package/dist/components/data/DonutChart.d.ts.map +0 -1
  168. package/dist/components/data/FilterBar.d.ts.map +0 -1
  169. package/dist/components/data/KpiTile.d.ts.map +0 -1
  170. package/dist/components/data/LineChart.d.ts.map +0 -1
  171. package/dist/components/data/LinkList.d.ts.map +0 -1
  172. package/dist/components/data/ObjectHeader.d.ts.map +0 -1
  173. package/dist/components/data/RecordCard.d.ts.map +0 -1
  174. package/dist/components/data/Timeline.d.ts.map +0 -1
  175. package/dist/components/data/ViewSwitcher.d.ts.map +0 -1
  176. package/dist/components/data/chartGeometry.d.ts.map +0 -1
  177. package/dist/components/feedback/Dialog.d.ts.map +0 -1
  178. package/dist/components/feedback/InlineMessage.d.ts.map +0 -1
  179. package/dist/components/feedback/ProgressBar.d.ts.map +0 -1
  180. package/dist/components/feedback/Skeleton.d.ts.map +0 -1
  181. package/dist/components/feedback/Toast.d.ts.map +0 -1
  182. package/dist/components/feedback/Tooltip.d.ts.map +0 -1
  183. package/dist/components/forms/Checkbox.d.ts.map +0 -1
  184. package/dist/components/forms/ChoiceCardGroup.d.ts.map +0 -1
  185. package/dist/components/forms/ComboBox.d.ts.map +0 -1
  186. package/dist/components/forms/DatePicker.d.ts.map +0 -1
  187. package/dist/components/forms/DateRangePicker.d.ts.map +0 -1
  188. package/dist/components/forms/FieldDescription.d.ts.map +0 -1
  189. package/dist/components/forms/FieldHelp.d.ts.map +0 -1
  190. package/dist/components/forms/FieldLabel.d.ts.map +0 -1
  191. package/dist/components/forms/FileUpload.d.ts.map +0 -1
  192. package/dist/components/forms/FormField.d.ts.map +0 -1
  193. package/dist/components/forms/Input.d.ts.map +0 -1
  194. package/dist/components/forms/MultiComboBox.d.ts.map +0 -1
  195. package/dist/components/forms/NumberField.d.ts.map +0 -1
  196. package/dist/components/forms/QuantityStepper.d.ts.map +0 -1
  197. package/dist/components/forms/Radio.d.ts.map +0 -1
  198. package/dist/components/forms/Select.d.ts.map +0 -1
  199. package/dist/components/forms/Switch.d.ts.map +0 -1
  200. package/dist/components/forms/TextArea.d.ts.map +0 -1
  201. package/dist/components/forms/ValueHelpField.d.ts.map +0 -1
  202. package/dist/components/forms/dateValues.d.ts.map +0 -1
  203. package/dist/components/layout/FooterBar.d.ts.map +0 -1
  204. package/dist/components/layout/PageBand.d.ts.map +0 -1
  205. package/dist/components/layout/PageHeader.d.ts.map +0 -1
  206. package/dist/components/layout/SectionHeader.d.ts.map +0 -1
  207. package/dist/components/layout/SelectionBar.d.ts.map +0 -1
  208. package/dist/components/layout/SplitPane.d.ts.map +0 -1
  209. package/dist/components/navigation/Breadcrumb.d.ts.map +0 -1
  210. package/dist/components/navigation/Menu.d.ts.map +0 -1
  211. package/dist/components/navigation/Pagination.d.ts.map +0 -1
  212. package/dist/components/navigation/Ribbon.d.ts.map +0 -1
  213. package/dist/components/navigation/ShellBar.d.ts.map +0 -1
  214. package/dist/components/navigation/ShellRail.d.ts.map +0 -1
  215. package/dist/components/navigation/SideNav.d.ts.map +0 -1
  216. package/dist/components/navigation/Tabs.d.ts.map +0 -1
  217. package/dist/components/patterns/AppLauncher.d.ts.map +0 -1
  218. package/dist/components/patterns/CommandPalette.d.ts.map +0 -1
  219. package/dist/components/patterns/ConfirmDialog.d.ts.map +0 -1
  220. package/dist/components/patterns/EmptyState.d.ts.map +0 -1
  221. package/dist/components/patterns/FileDropZone.d.ts.map +0 -1
  222. package/dist/components/patterns/NumPad.d.ts.map +0 -1
  223. package/dist/components/patterns/SidePanel.d.ts.map +0 -1
  224. package/dist/components/patterns/ValueHelpDialog.d.ts.map +0 -1
  225. package/dist/components/utils/cx.d.ts.map +0 -1
  226. package/dist/components/utils/decimalSeparator.d.ts.map +0 -1
  227. package/dist/components/utils/devWarn.d.ts.map +0 -1
  228. package/dist/components/utils/focusField.d.cts +0 -11
  229. package/dist/components/utils/focusField.d.ts +0 -12
  230. package/dist/components/utils/focusField.d.ts.map +0 -1
  231. package/dist/i18n/PireIntlProvider.d.ts.map +0 -1
  232. package/dist/i18n/messages.d.ts.map +0 -1
  233. package/dist/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/components/core/icon-data.generated.ts","../src/components/core/icon-map.ts","../src/components/core/Icon.tsx","../src/components/core/Button.tsx","../src/i18n/PireIntlProvider.tsx","../src/i18n/messages.ts","../src/components/core/ComingSoonMark.tsx","../src/components/utils/cx.ts","../src/components/core/IconButton.tsx","../src/components/feedback/Tooltip.tsx","../src/components/core/Badge.tsx","../src/components/core/Tag.tsx","../src/components/core/Card.tsx","../src/components/core/Avatar.tsx","../src/components/core/SegmentedControl.tsx","../src/components/core/Text.tsx","../src/components/core/Heading.tsx","../src/components/core/Link.tsx","../src/components/core/Separator.tsx","../src/components/core/Kbd.tsx","../src/components/forms/FieldHelp.tsx","../src/components/forms/FormField.tsx","../src/components/forms/Input.tsx","../src/components/utils/focusField.ts","../src/components/forms/FieldLabel.tsx","../src/components/utils/devWarn.ts","../src/components/forms/FieldDescription.tsx","../src/components/forms/TextArea.tsx","../src/components/forms/Select.tsx","../src/components/forms/Checkbox.tsx","../src/components/forms/Radio.tsx","../src/components/forms/Switch.tsx","../src/components/forms/ChoiceCardGroup.tsx","../src/components/forms/ComboBox.tsx","../src/components/forms/MultiComboBox.tsx","../src/components/forms/NumberField.tsx","../src/components/utils/decimalSeparator.ts","../src/components/forms/QuantityStepper.tsx","../src/components/forms/DatePicker.tsx","../src/components/forms/dateValues.ts","../src/components/forms/DateRangePicker.tsx","../src/components/forms/ValueHelpField.tsx","../src/components/patterns/ValueHelpDialog.tsx","../src/components/feedback/Dialog.tsx","../src/components/data/DataTable.tsx","../src/components/feedback/Skeleton.tsx","../src/components/forms/FileUpload.tsx","../src/components/feedback/ProgressBar.tsx","../src/components/navigation/ShellBar.tsx","../src/components/navigation/Breadcrumb.tsx","../src/components/navigation/Menu.tsx","../src/components/navigation/SideNav.tsx","../src/components/navigation/ShellRail.tsx","../src/components/navigation/Tabs.tsx","../src/components/navigation/Pagination.tsx","../src/components/navigation/Ribbon.tsx","../src/components/feedback/InlineMessage.tsx","../src/components/feedback/Toast.tsx","../src/components/data/KpiTile.tsx","../src/components/data/ObjectHeader.tsx","../src/components/data/FilterBar.tsx","../src/components/data/DescriptionList.tsx","../src/components/data/Timeline.tsx","../src/components/data/chartGeometry.ts","../src/components/data/ChartFrame.tsx","../src/components/data/BarChart.tsx","../src/components/data/LineChart.tsx","../src/components/data/DonutChart.tsx","../src/components/data/LinkList.tsx","../src/components/data/RecordCard.tsx","../src/components/data/ViewSwitcher.tsx","../src/components/data/BarList.tsx","../src/components/layout/PageBand.tsx","../src/components/layout/PageHeader.tsx","../src/components/layout/SectionHeader.tsx","../src/components/layout/SelectionBar.tsx","../src/components/layout/FooterBar.tsx","../src/components/layout/SplitPane.tsx","../src/components/patterns/ConfirmDialog.tsx","../src/components/patterns/CommandPalette.tsx","../src/components/patterns/AppLauncher.tsx","../src/components/patterns/SidePanel.tsx","../src/components/patterns/EmptyState.tsx","../src/components/patterns/NumPad.tsx","../src/components/patterns/FileDropZone.tsx"],"sourcesContent":["/* @orianatech/pire — Pire Design System components.\n Styles are a separate import so they can be loaded once, ahead of the bundle:\n import '@orianatech/pire/styles.css'; */\n\nexport { Icon, configureIcons, type IconProps, type IconPack, type IconConfig } from './components/core/Icon';\nexport { Button, type ButtonProps } from './components/core/Button';\nexport { IconButton, type IconButtonProps } from './components/core/IconButton';\nexport { Badge, type BadgeProps, type BadgeStatus } from './components/core/Badge';\nexport { Tag, type TagProps } from './components/core/Tag';\nexport { Card, type CardProps } from './components/core/Card';\nexport { Avatar, type AvatarProps } from './components/core/Avatar';\nexport {\n SegmentedControl,\n type SegmentedControlProps,\n type SegmentOption,\n} from './components/core/SegmentedControl';\nexport {\n Text,\n Strong,\n type TextProps,\n type StrongProps,\n type TextColor,\n type TextSize,\n} from './components/core/Text';\nexport { Heading, type HeadingProps } from './components/core/Heading';\nexport { Link, type LinkProps } from './components/core/Link';\nexport { Separator, type SeparatorProps } from './components/core/Separator';\nexport { Kbd, type KbdProps } from './components/core/Kbd';\nexport { ICON_NAMES } from './components/core/icon-map';\n\nexport { FormField, type FormFieldProps } from './components/forms/FormField';\nexport { Input, type InputProps } from './components/forms/Input';\nexport { TextArea, type TextAreaProps } from './components/forms/TextArea';\nexport { Select, type SelectProps, type SelectOption } from './components/forms/Select';\nexport { Checkbox, type CheckboxProps } from './components/forms/Checkbox';\nexport { RadioGroup, Radio, type RadioGroupProps, type RadioProps } from './components/forms/Radio';\nexport { Switch, type SwitchProps } from './components/forms/Switch';\nexport {\n ChoiceCardGroup,\n type ChoiceCardGroupProps,\n type ChoiceCardOption,\n} from './components/forms/ChoiceCardGroup';\nexport { ComboBox, type ComboBoxProps, type ComboBoxOption } from './components/forms/ComboBox';\nexport { MultiComboBox, type MultiComboBoxProps } from './components/forms/MultiComboBox';\nexport { NumberField, type NumberFieldProps } from './components/forms/NumberField';\nexport { QuantityStepper, type QuantityStepperProps } from './components/forms/QuantityStepper';\nexport { DatePicker, type DatePickerProps } from './components/forms/DatePicker';\nexport {\n DateRangePicker,\n rangeLengthInDays,\n type DateRangePickerProps,\n type DateRange,\n type DateRangeInput,\n type IsoDateRange,\n type DateRangePreset,\n} from './components/forms/DateRangePicker';\nexport { ValueHelpField, type ValueHelpFieldProps } from './components/forms/ValueHelpField';\nexport { FieldHelp, type FieldHelpProps } from './components/forms/FieldHelp';\nexport {\n FileUpload,\n formatFileSize,\n type FileUploadProps,\n type PireFile,\n type FileRejection,\n} from './components/forms/FileUpload';\n\nexport { ShellBar, type ShellBarProps } from './components/navigation/ShellBar';\nexport {\n SideNav,\n type SideNavProps,\n type SideNavItem,\n type SideNavChildItem,\n type SideNavGroup,\n} from './components/navigation/SideNav';\nexport {\n ShellRail,\n type ShellRailProps,\n type ShellRailItem,\n type ShellRailGroup,\n} from './components/navigation/ShellRail';\nexport { Tabs, type TabsProps, type TabItem } from './components/navigation/Tabs';\nexport { Breadcrumb, type BreadcrumbProps, type BreadcrumbItem } from './components/navigation/Breadcrumb';\nexport { Pagination, type PaginationProps } from './components/navigation/Pagination';\nexport {\n Menu,\n MenuItem,\n MenuSection,\n MenuSeparator,\n type MenuProps,\n type MenuItemProps,\n type MenuSectionProps,\n type MenuSeparatorProps,\n} from './components/navigation/Menu';\nexport {\n Ribbon,\n type RibbonProps,\n type RibbonTabProps,\n type RibbonGroupProps,\n type RibbonCommandProps,\n} from './components/navigation/Ribbon';\n\nexport {\n Dialog,\n DialogTitle,\n DialogDescription,\n DialogBody,\n DialogActions,\n type DialogProps,\n type DialogSlotProps,\n} from './components/feedback/Dialog';\nexport {\n InlineMessage,\n type InlineMessageProps,\n type MessageKind,\n} from './components/feedback/InlineMessage';\nexport { ProgressBar, type ProgressBarProps } from './components/feedback/ProgressBar';\nexport { Tooltip, type TooltipProps } from './components/feedback/Tooltip';\nexport { Toast, ToastProvider, useToast, type ToastProps, type ToastItem } from './components/feedback/Toast';\nexport {\n Skeleton,\n SkeletonTableRow,\n type SkeletonProps,\n type SkeletonShape,\n type SkeletonTableRowProps,\n type SkeletonTableColumn,\n} from './components/feedback/Skeleton';\n\nexport {\n DataTable,\n type DataTableProps,\n type DataTableColumn,\n type DataTableSort,\n type DataTableCellTone,\n type DataTableRowProps,\n} from './components/data/DataTable';\nexport { KpiTile, type KpiTileProps } from './components/data/KpiTile';\nexport { ObjectHeader, type ObjectHeaderProps, type ObjectFact } from './components/data/ObjectHeader';\nexport { FilterBar, type FilterBarProps, type ActiveFilter } from './components/data/FilterBar';\nexport {\n DescriptionList,\n type DescriptionListProps,\n type DescriptionItem,\n} from './components/data/DescriptionList';\nexport { Timeline, type TimelineProps, type TimelineEntry } from './components/data/Timeline';\nexport { BarChart, type BarChartProps } from './components/data/BarChart';\nexport { LineChart, type LineChartProps } from './components/data/LineChart';\nexport { DonutChart, type DonutChartProps } from './components/data/DonutChart';\nexport type { ChartBaseProps, ChartLegendItem } from './components/data/ChartFrame';\nexport { VIZ_SLOT_COUNT, type ChartSeries } from './components/data/chartGeometry';\nexport { LinkList, type LinkListProps, type LinkListItem } from './components/data/LinkList';\nexport { RecordCard, type RecordCardProps } from './components/data/RecordCard';\nexport { ViewSwitcher, type ViewSwitcherProps } from './components/data/ViewSwitcher';\nexport { BarList, type BarListProps, type BarListItem } from './components/data/BarList';\n\nexport { PageBand, type PageBandProps } from './components/layout/PageBand';\nexport { PageHeader, type PageHeaderProps } from './components/layout/PageHeader';\nexport { SectionHeader, type SectionHeaderProps } from './components/layout/SectionHeader';\nexport {\n SelectionBar,\n type SelectionBarProps,\n type SelectionBarNoun,\n} from './components/layout/SelectionBar';\nexport { FooterBar, type FooterBarProps } from './components/layout/FooterBar';\nexport { SplitPane, type SplitPaneProps } from './components/layout/SplitPane';\n\nexport { ConfirmDialog, type ConfirmDialogProps } from './components/patterns/ConfirmDialog';\nexport { ValueHelpDialog, type ValueHelpDialogProps } from './components/patterns/ValueHelpDialog';\nexport {\n CommandPalette,\n useCommandPaletteShortcut,\n type CommandPaletteProps,\n type CommandPaletteItem,\n type CommandPaletteGroup,\n type CommandPaletteShortcutOptions,\n} from './components/patterns/CommandPalette';\nexport {\n AppLauncher,\n type AppLauncherProps,\n type AppLauncherItem,\n type AppLauncherSection,\n} from './components/patterns/AppLauncher';\nexport { SidePanel, type SidePanelProps } from './components/patterns/SidePanel';\nexport { EmptyState, type EmptyStateProps } from './components/patterns/EmptyState';\nexport { NumPad, type NumPadProps, type NumPadKey } from './components/patterns/NumPad';\nexport { FileDropZone, type FileDropZoneProps } from './components/patterns/FileDropZone';\n\n/** Re-exported so apps can compose overlays and collections without a second dependency. */\n/* Pire's own strings. React Aria's I18nProvider below localises React Aria's internals; this\n localises Pire's. Install both to fully translate the UI. */\nexport { PireIntlProvider, usePireMessages, type PireIntlProviderProps } from './i18n/PireIntlProvider';\nexport { enMessages, esMessages, type PireMessages } from './i18n/messages';\n\n/* Compose overlays and collections without a second dependency. `RouterProvider` takes the\n app's own `navigate`, so `href` on MenuItem, Link and Breadcrumb routes client-side. */\nexport {\n DialogTrigger,\n MenuTrigger,\n SubmenuTrigger,\n Popover,\n RouterProvider,\n I18nProvider,\n} from 'react-aria-components';\n/* `Focusable` makes any single child focusable by cloning it — no wrapper element, so it never adds\n a tab stop to something that already had one. `Tooltip` applies it for you; this export is for the\n cases Pire does not cover, such as a custom trigger for a Popover or a MenuTrigger. */\nexport { Focusable } from 'react-aria-components';\nexport type { DateValue } from 'react-aria-components';\n","// GENERATED FILE — do not edit by hand. Run `pnpm icons:generate` (or `pnpm build`).\n// Source: scripts/generate-icon-data.mjs, from @carbon/icons (devDependency) and the CARBON_MAP\n// in ./icon-map.ts. Committed so typecheck, lint, tests and Storybook work on a fresh clone\n// without a build step.\n//\n// Inner markup of each 32x32 Carbon glyph, keyed by Carbon slug. `Icon` drops it into\n// <svg viewBox=\"0 0 32 32\" fill=\"currentColor\">, so paths inherit text colour. Slugs are the\n// Carbon names; call sites use the canonical Lucide names in ./icon-map.ts.\nexport const ICON_MARKUP: Record<string, string> = {\n 'add': '<path d=\"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z\"/>',\n 'apps': '<path d=\"M8,4V8H4V4Zm2-2H2v8h8Zm8,2V8H14V4Zm2-2H12v8h8Zm8,2V8H24V4Zm2-2H22v8h8ZM8,14v4H4V14Zm2-2H2v8h8Zm8,2v4H14V14Zm2-2H12v8h8Zm8,2v4H24V14Zm2-2H22v8h8ZM8,24v4H4V24Zm2-2H2v8h8Zm8,2v4H14V24Zm2-2H12v8h8Zm8,2v4H24V24Zm2-2H22v8h8Z\"/>',\n 'archive': '<path d=\"M14 19H18V21H14z\"/><path d=\"M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z\"/>',\n 'arrow--down': '<path d=\"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z\"/>',\n 'arrow--left': '<path d=\"M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z\"/>',\n 'arrow--right': '<path d=\"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z\"/>',\n 'arrow--up': '<path d=\"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z\"/>',\n 'arrows--vertical': '<path d=\"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z\"/><path d=\"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z\"/>',\n 'asterisk': '<path d=\"M28.316 13.949 27.684 12.051 17 15.612 17 4 15 4 15 15.612 4.316 12.051 3.684 13.949 14.368 17.51 7.2 27.066 8.8 28.267 16 18.667 23.2 28.267 24.8 27.066 17.632 17.51 28.316 13.949z\"/>',\n 'attachment': '<path d=\"M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9\tC3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1\tc0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2\tc-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z\"/>',\n 'bank--vault': '<path d=\"M26,30h-2v-2H8v2h-2v-2h-2c-1.103,0-2-.8975-2-2V4c0-1.103.897-2,2-2h24c1.1025,0,2,.897,2,2v22c0,1.1025-.8975,2-2,2h-2v2ZM4,4v22h24.002l-.002-22H4ZM17,22h-2v-2.1006c-.626-.127-1.2207-.374-1.7573-.7285l-2.5356,2.5361-1.4141-1.4141,2.5366-2.5371c-.3555-.5371-.6021-1.1318-.729-1.7559h-2.1006v-2h2.1001c.1274-.626.374-1.2207.7285-1.7573l-2.5356-2.5356,1.4141-1.4141,2.5366,2.5366c.5376-.3555,1.1318-.6021,1.7563-.729v-2.1006h2v2.1006c.626.127,1.2207.3735,1.7568.728l2.5361-2.5356,1.4141,1.4141-2.5361,2.5356c.3545.5366.6016,1.1313.7285,1.7573h2.1006v2h-2.1006c-.127.626-.374,1.2207-.7285,1.7568l2.5361,2.5361-1.4141,1.4141-2.5371-2.5371c-.5371.3555-1.1318.6025-1.7559.7295v2.1006ZM16,12c-.7954,0-1.5513.3135-2.1279.8818-.5586.5669-.8721,1.3228-.8721,2.1182,0,.7949.3135,1.5508.8823,2.1279,1.1318,1.1162,3.0908,1.127,4.2456-.0098.5586-.5674.8721-1.3232.8721-2.1182,0-.793-.3115-1.5464-.877-2.1226-.5771-.5659-1.3306-.8774-2.123-.8774Z\"/>',\n 'barcode': '<path d=\"M2 6H4V28H2z\"/><path d=\"M12 6H14V26H12z\"/><path d=\"M6 6H10V26H6z\"/><path d=\"M16 6H20V26H16z\"/><path d=\"M22 6H26V26H22z\"/><path d=\"M28 6H30V28H28z\"/>',\n 'book': '<path d=\"M19 10H26V12H19z\"/><path d=\"M19 15H26V17H19z\"/><path d=\"M19 20H26V22H19z\"/><path d=\"M6 10H13V12H6z\"/><path d=\"M6 15H13V17H6z\"/><path d=\"M6 20H13V22H6z\"/><path d=\"M28,5H4A2.002,2.002,0,0,0,2,7V25a2.002,2.002,0,0,0,2,2H28a2.002,2.002,0,0,0,2-2V7A2.002,2.002,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28V25Z\"/>',\n 'bookmark': '<path d=\"M24,4V26.75l-7.1-3.59-.9-.45-.9.45L8,26.75V4H24m0-2H8A2,2,0,0,0,6,4V30L16,25,26,30V4A2,2,0,0,0,24,2Z\"/>',\n 'box': '<path d=\"M20,21H12a2,2,0,0,1-2-2V17a2,2,0,0,1,2-2h8a2,2,0,0,1,2,2v2A2,2,0,0,1,20,21Zm-8-4v2h8V17Z\"/><path d=\"M28,4H4A2,2,0,0,0,2,6v4a2,2,0,0,0,2,2V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V12a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM26,28H6V12H26Zm2-18H4V6H28v4Z\"/>',\n 'building': '<path d=\"M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z\"/><path d=\"M18 8H20V10H18z\"/><path d=\"M24 8H26V10H24z\"/><path d=\"M18 14H20V16H18z\"/><path d=\"M24 14H26V16H24z\"/><path d=\"M18 20H20V22H18z\"/><path d=\"M24 20H26V22H24z\"/>',\n 'building--insights-1': '<path d=\"M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z\"/><path d=\"M18 8H20V10H18z\"/><path d=\"M24 8H26V10H24z\"/><path d=\"M18 14H20V16H18z\"/><path d=\"M24 14H26V16H24z\"/><path d=\"M18 20H20V22H18z\"/><path d=\"M24 20H26V22H24z\"/><path d=\"M9,12H7a5.0059,5.0059,0,0,1,5-5V9A3.0033,3.0033,0,0,0,9,12Z\"/><path d=\"M4,12H2A10.0114,10.0114,0,0,1,12,2V4A8.0092,8.0092,0,0,0,4,12Z\"/>',\n 'calculator': '<path d=\"M26,4V28H6V4H26m0-2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V4A2,2,0,0,0,26,2Z\"/><path d=\"M9 23H11V25H9z\"/><path d=\"M21 23H23V25H21z\"/><path d=\"M9 18H11V20H9z\"/><path d=\"M21 18H23V20H21z\"/><path d=\"M9 13H11V15H9z\"/><path d=\"M15 23H17V25H15z\"/><path d=\"M15 18H17V20H15z\"/><path d=\"M15 13H17V15H15z\"/><path d=\"M21 13H23V15H21z\"/><path d=\"M9 7H23V10H9z\"/>',\n 'calendar': '<path d=\"M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20\tV26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z\"/>',\n 'calendar--add': '<switch><foreignObject width=\"1\" height=\"1\" x=\"0\" y=\"0\" requiredExtensions=\"http://ns.adobe.com/AdobeIllustrator/10.0/\"/><g><path d=\"M30 22 24 22 24 16 22 16 22 22 16 22 16 24 22 24 22 30 24 30 24 24 30 24z\"/><path d=\"M28,6c0-1.1-0.9-2-2-2h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h8v-2H6V6h4v2h2V6h8v2h2V6h4v8h2V6z\"/></g></switch>',\n 'calendar--heat-map': '<path d=\"M26,4H22V2H20V4H12V2H10V4H6A2.0025,2.0025,0,0,0,4,6V26a2.0025,2.0025,0,0,0,2,2H26a2.0025,2.0025,0,0,0,2-2V6A2.0025,2.0025,0,0,0,26,4ZM6,6h4V8h2V6h8V8h2V6h4l0,4H6Zm0,6h5v6H6ZM19,26H13V20h6Zm0-8H13V12h6Zm2,8V20h5l.0012,6Z\"/>',\n 'chart--area': '<path d=\"M20.4761,8.0151,13.4473,4.2109a2.0076,2.0076,0,0,0-2.1158.2051L4,10.001V2H2V28a2,2,0,0,0,2,2H30V5.7354ZM28,20.209l-7.62,1.8022-7.0288-2.8838a1.99,1.99,0,0,0-2.022.37L4,25.8359v-4.455l8.375-9.4,7.0186,5.62a2.0155,2.0155,0,0,0,2.0459.2119L28,14.6025ZM12.5239,5.9849l7.03,3.8042a2.012,2.012,0,0,0,1.3408.16L28,8.2646v4.1138L20.6187,16.02,13.6,10.4a1.99,1.99,0,0,0-2.6885.2642L4,18.3838v-5.87ZM4.5513,28,12.62,20.9888l7.0288,2.8838a1.9977,1.9977,0,0,0,1.147.0771L28,22.2612V28Z\"/>',\n 'chart--bar': '<path d=\"M4,2H2V28a2,2,0,0,0,2,2H30V28H4V25H26V17H4V13H18V5H4ZM24,19v4H4V19ZM16,7v4H4V7Z\"/>',\n 'chart--column': '<path d=\"M27,28V6H19V28H15V14H7V28H4V2H2V28a2,2,0,0,0,2,2H30V28ZM13,28H9V16h4Zm12,0H21V8h4Z\"/>',\n 'chart--line': '<path d=\"M4.67,28l6.39-12,7.3,6.49a2,2,0,0,0,1.7.47,2,2,0,0,0,1.42-1.07L27,10.9,25.18,10,19.69,21l-7.3-6.49A2,2,0,0,0,10.71,14a2,2,0,0,0-1.42,1L4,25V2H2V28a2,2,0,0,0,2,2H30V28Z\"/>',\n 'chart--pie': '<path d=\"M16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4ZM26,15H17V6.05A10,10,0,0,1,26,15ZM15.42,26A10,10,0,0,1,15,6.05v9a2,2,0,0,0,2,2h9A10,10,0,0,1,15.42,26Z\"/>',\n 'checkmark': '<path d=\"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z\"/>',\n 'checkmark--filled': '<path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z\"/><path fill=\"none\" d=\"M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z\" data-icon-path=\"inner-path\"/>',\n 'checkmark--outline': '<path d=\"M14 21.414 9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z\"/><path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"/>',\n 'chevron--down': '<path d=\"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z\"/>',\n 'chevron--left': '<path d=\"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z\"/>',\n 'chevron--right': '<path d=\"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z\"/>',\n 'chevron--sort': '<path d=\"M16 28 9 21 10.41 19.59 16 25.17 21.59 19.59 23 21 16 28z\"/><path d=\"M16 4 23 11 21.59 12.41 16 6.83 10.41 12.41 9 11 16 4z\"/>',\n 'chevron--up': '<path d=\"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z\"/>',\n 'circle-dash': '<path d=\"M7.7,4.7a14.7,14.7,0,0,0-3,3.1L6.3,9A13.26,13.26,0,0,1,8.9,6.3Z\"/><path d=\"M4.6,12.3l-1.9-.6A12.51,12.51,0,0,0,2,16H4A11.48,11.48,0,0,1,4.6,12.3Z\"/><path d=\"M2.7,20.4a14.4,14.4,0,0,0,2,3.9l1.6-1.2a12.89,12.89,0,0,1-1.7-3.3Z\"/><path d=\"M7.8,27.3a14.4,14.4,0,0,0,3.9,2l.6-1.9A12.89,12.89,0,0,1,9,25.7Z\"/><path d=\"M11.7,2.7l.6,1.9A11.48,11.48,0,0,1,16,4V2A12.51,12.51,0,0,0,11.7,2.7Z\"/><path d=\"M24.2,27.3a15.18,15.18,0,0,0,3.1-3.1L25.7,23A11.53,11.53,0,0,1,23,25.7Z\"/><path d=\"M27.4,19.7l1.9.6A15.47,15.47,0,0,0,30,16H28A11.48,11.48,0,0,1,27.4,19.7Z\"/><path d=\"M29.2,11.6a14.4,14.4,0,0,0-2-3.9L25.6,8.9a12.89,12.89,0,0,1,1.7,3.3Z\"/><path d=\"M24.1,4.6a14.4,14.4,0,0,0-3.9-2l-.6,1.9a12.89,12.89,0,0,1,3.3,1.7Z\"/><path d=\"M20.3,29.3l-.6-1.9A11.48,11.48,0,0,1,16,28v2A21.42,21.42,0,0,0,20.3,29.3Z\"/>',\n 'close': '<path d=\"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z\"/>',\n 'cloud--download': '<path d=\"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z\"/><path d=\"M17 26.17 17 14 15 14 15 26.17 12.41 23.59 11 25 16 30 21 25 19.59 23.59 17 26.17z\"/>',\n 'cloud--upload': '<path d=\"M11 18 12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z\"/><path d=\"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z\"/>',\n 'color-palette': '<circle cx=\"10\" cy=\"12\" r=\"2\"/><circle cx=\"16\" cy=\"9\" r=\"2\"/><circle cx=\"22\" cy=\"12\" r=\"2\"/><circle cx=\"23\" cy=\"18\" r=\"2\"/><circle cx=\"19\" cy=\"23\" r=\"2\"/><path d=\"M16.54,2A14,14,0,0,0,2,16a4.82,4.82,0,0,0,6.09,4.65l1.12-.31A3,3,0,0,1,13,23.24V27a3,3,0,0,0,3,3A14,14,0,0,0,30,15.46,14.05,14.05,0,0,0,16.54,2Zm8.11,22.31A11.93,11.93,0,0,1,16,28a1,1,0,0,1-1-1V23.24a5,5,0,0,0-5-5,5.07,5.07,0,0,0-1.33.18l-1.12.31A2.82,2.82,0,0,1,4,16,12,12,0,0,1,16.47,4,12.18,12.18,0,0,1,28,15.53,11.89,11.89,0,0,1,24.65,24.32Z\"/>',\n 'copy': '<path d=\"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z\"/><path d=\"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z\"/>',\n 'currency': '<path d=\"M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z\"/><path d=\"M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z\"/>',\n 'currency--dollar': '<path d=\"M23,20.5151c0-4.6152-3.78-5.1411-6.8171-5.563-3.31-.4609-5.1829-.86-5.1829-3.71C11,8.8491,13.5071,8,15.6538,8a6.7538,6.7538,0,0,1,5.5681,2.6279l1.5562-1.2558A8.6508,8.6508,0,0,0,17,6.0962V3H15V6.022c-3.6152.2192-6,2.26-6,5.22,0,4.73,3.83,5.2627,6.9075,5.69C19.16,17.3848,21,17.7744,21,20.5151,21,23.5474,17.8674,24,16,24c-3.4294,0-4.8782-.9639-6.2219-2.6279L8.2219,22.6279A8.4382,8.4382,0,0,0,15,25.9648V29h2V25.9551C20.7256,25.6509,23,23.6279,23,20.5151Z\"/>',\n 'currency--euro': '<path d=\"M17,26c-3.6162,0-6.3328-2.2974-7.4456-6H19V18H9.1321A15.2782,15.2782,0,0,1,9,16c0-.33.01-.6641.0259-1H19V13H9.2371C9.8447,9.3525,11.81,6,17,6c3.8533,0,5.5315,1.6465,7.1282,4.4893l1.7436-.9786C24.2649,6.6484,22.0779,4,17,4,10.6448,4,7,8.374,7,16c0,7.0654,4.1121,12,10,12,5.0779,0,7.2649-2.6484,8.8718-5.5107l-1.7436-.9786C22.5315,24.3535,20.8533,26,17,26Z\"/>',\n 'data--base': '<path d=\"M24,3H8A2,2,0,0,0,6,5V27a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V5A2,2,0,0,0,24,3Zm0,2v6H8V5ZM8,19V13H24v6Zm0,8V21H24v6Z\"/><circle cx=\"11\" cy=\"8\" r=\"1\"/><circle cx=\"11\" cy=\"16\" r=\"1\"/><circle cx=\"11\" cy=\"24\" r=\"1\"/>',\n 'debug': '<path d=\"M29.83,20l.34-2L25,17.15V13c0-.08,0-.15,0-.23l5.06-1.36-.51-1.93-4.83,1.29A9,9,0,0,0,20,5V2H18V4.23a8.81,8.81,0,0,0-4,0V2H12V5a9,9,0,0,0-4.71,5.82L2.46,9.48,2,11.41,7,12.77c0,.08,0,.15,0,.23v4.15L1.84,18l.32,2L7,19.18a8.9,8.9,0,0,0,.82,3.57L3.29,27.29l1.42,1.42,4.19-4.2a9,9,0,0,0,14.2,0l4.19,4.2,1.42-1.42-4.54-4.54A8.9,8.9,0,0,0,25,19.18ZM15,25.92A7,7,0,0,1,9,19V13h6ZM9.29,11a7,7,0,0,1,13.42,0ZM23,19a7,7,0,0,1-6,6.92V13h6Z\"/>',\n 'delivery--parcel': '<path d=\"M29.4819,8.624l-10-5.5a1,1,0,0,0-.9638,0l-10,5.5a1,1,0,0,0,0,1.752L18,15.5913V26.3086l-3.0362-1.6693L14,26.3912l4.5181,2.4848a.9984.9984,0,0,0,.9638,0l10-5.5A1,1,0,0,0,30,22.5V9.5A1,1,0,0,0,29.4819,8.624ZM19,5.1416,26.9248,9.5,19,13.8584,11.0752,9.5Zm9,16.7671-8,4.4V15.5913l8-4.4Z\"/><path d=\"M2 14H10V16H2z\" transform=\"matrix(-1 0 0 -1 12 30)\"/><path d=\"M4 22H12V24H4z\" transform=\"matrix(-1 0 0 -1 16 46)\"/><path d=\"M6 18H14V20H6z\" transform=\"matrix(-1 0 0 -1 20 38)\"/>',\n 'delivery-truck': '<path d=\"M29.92,16.61l-3-7A1,1,0,0,0,26,9H23V7a1,1,0,0,0-1-1H3A1,1,0,0,0,2,7V24a1,1,0,0,0,1,1H5.14a4,4,0,0,0,7.72,0h6.28a4,4,0,0,0,7.72,0H29a1,1,0,0,0,1-1V17A1,1,0,0,0,29.92,16.61ZM23,11h2.34l2.14,5H23ZM9,26a2,2,0,1,1,2-2A2,2,0,0,1,9,26Zm10.14-3H12.86a4,4,0,0,0-7.72,0H4V8H21V20.56A4,4,0,0,0,19.14,23ZM23,26a2,2,0,1,1,2-2A2,2,0,0,1,23,26Zm5-3H26.86A4,4,0,0,0,23,20V18h5Z\"/>',\n 'document': '<path d=\"M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3\tz M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z\"/><path d=\"M10 22H22V24H10z\"/><path d=\"M10 16H22V18H10z\"/>',\n 'document--add': '<path d=\"M30 24 26 24 26 20 24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24z\"/><path d=\"M16,28H8V4h8v6a2.0058,2.0058,0,0,0,2,2h6v4h2V10a.9092.9092,0,0,0-.3-.7l-7-7A.9087.9087,0,0,0,18,2H8A2.0058,2.0058,0,0,0,6,4V28a2.0058,2.0058,0,0,0,2,2h8ZM18,4.4,23.6,10H18Z\"/>',\n 'download': '<path d=\"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z\"/><path d=\"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z\"/>',\n 'edit': '<path d=\"M2 26H30V28H2z\"/><path d=\"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6\tl-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z\"/>',\n 'email': '<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,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z\"/>',\n 'error--filled': '<path fill=\"none\" d=\"M14.9 7.2H17.1V24.799H14.9z\" data-icon-path=\"inner-path\" transform=\"rotate(-45 16 16)\"/><path d=\"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z\"/>',\n 'events': '<path d=\"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z\"/><path d=\"M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z\"/><path d=\"M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z\"/><path d=\"M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z\"/><path d=\"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z\"/><path d=\"M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z\"/>',\n 'filter': '<path d=\"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z\"/>',\n 'filter--edit': '<path d=\"M26,6H4V9.17l7.41,7.42.59.58V26h4V24h2v2a2,2,0,0,1-2,2H12a2,2,0,0,1-2-2V18L2.59,10.59A2,2,0,0,1,2,9.17V6A2,2,0,0,1,4,4H26Z\"/><path d=\"M29.71,11.29l-3-3a1,1,0,0,0-1.42,0L16,17.59V22h4.41l9.3-9.29A1,1,0,0,0,29.71,11.29ZM19.59,20H18V18.41l5-5L24.59,15ZM26,13.59,24.41,12,26,10.41,27.59,12Z\"/>',\n 'flash': '<path d=\"M11.61,29.92a1,1,0,0,1-.6-1.07L12.83,17H8a1,1,0,0,1-1-1.23l3-13A1,1,0,0,1,11,2H21a1,1,0,0,1,.78.37,1,1,0,0,1,.2.85L20.25,11H25a1,1,0,0,1,.9.56,1,1,0,0,1-.11,1l-13,17A1,1,0,0,1,12,30,1.09,1.09,0,0,1,11.61,29.92ZM17.75,13l2-9H11.8L9.26,15h5.91L13.58,25.28,23,13Z\"/>',\n 'flow': '<path d=\"M27,22.14V17a2,2,0,0,0-2-2H17V9.86a4,4,0,1,0-2,0V15H7a2,2,0,0,0-2,2v5.14a4,4,0,1,0,2,0V17H25v5.14a4,4,0,1,0,2,0ZM8,26a2,2,0,1,1-2-2A2,2,0,0,1,8,26ZM14,6a2,2,0,1,1,2,2A2,2,0,0,1,14,6ZM26,28a2,2,0,1,1,2-2A2,2,0,0,1,26,28Z\"/>',\n 'folder': '<path d=\"M11.17,6l3.42,3.41.58.59H28V26H4V6h7.17m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H16L12.59,4.59A2,2,0,0,0,11.17,4Z\"/>',\n 'function': '<path d=\"M19.6262,29.5256,19.11,27.5935A12.0035,12.0035,0,0,0,25.2312,8.3323l1.5376-1.2788a14.0033,14.0033,0,0,1-7.1426,22.4721Z\"/><path d=\"M10,29H8V25.18l.8037-.1607C10.2617,24.728,12,23.6206,12,20V18.6182l-4-2V14.3818l4-2V12c0-5.4673,3.9253-9,10-9h2V6.82l-.8037.1607C21.7383,7.272,20,8.3794,20,12v.3818l4,2v2.2364l-4,2V20C20,25.4673,16.0747,29,10,29Zm0-2c4.9346,0,8-2.6821,8-7V17.3818L21.7642,15.5,18,13.6182V12c0-4.5781,2.3853-6.1924,4-6.76V5c-4.9346,0-8,2.6821-8,7v1.6182L10.2358,15.5,14,17.3818V20c0,4.5781-2.3853,6.1924-4,6.76Z\"/><path d=\"M5.2312,24.9465A14.0032,14.0032,0,0,1,12.3779,2.4734l.5161,1.9321A12.0035,12.0035,0,0,0,6.7688,23.6677Z\"/>',\n 'globe': '<path d=\"M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z\"/><path d=\"M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z\"/>',\n 'grid': '<path d=\"M12,4H6A2,2,0,0,0,4,6v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,12,4Zm0,8H6V6h6Z\"/><path d=\"M26,4H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,8H20V6h6Z\"/><path d=\"M12,18H6a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,12,18Zm0,8H6V20h6Z\"/><path d=\"M26,18H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,26,18Zm0,8H20V20h6Z\"/>',\n 'hashtag': '<path d=\"M28,12V10H22V4H20v6H12V4H10v6H4v2h6v8H4v2h6v6h2V22h8v6h2V22h6V20H22V12Zm-8,8H12V12h8Z\"/>',\n 'help': '<path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"/><circle cx=\"16\" cy=\"23.5\" r=\"1.5\"/><path d=\"M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z\"/>',\n 'home': '<path d=\"M16.6123,2.2138a1.01,1.01,0,0,0-1.2427,0L1,13.4194l1.2427,1.5717L4,13.6209V26a2.0041,2.0041,0,0,0,2,2H26a2.0037,2.0037,0,0,0,2-2V13.63L29.7573,15,31,13.4282ZM18,26H14V18h4Zm2,0V18a2.0023,2.0023,0,0,0-2-2H14a2.002,2.002,0,0,0-2,2v8H6V12.0615l10-7.79,10,7.8005V26Z\"/>',\n 'idea': '<path d=\"M11 24H21V26H11z\"/><path d=\"M13 28H19V30H13z\"/><path d=\"M16,2A10,10,0,0,0,6,12a9.19,9.19,0,0,0,3.46,7.62c1,.93,1.54,1.46,1.54,2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2,7.2,0,0,1,8,12a8,8,0,0,1,16,0,7.2,7.2,0,0,1-2.82,6.14c-1.07,1-2.18,2-2.18,3.86h2c0-.92.53-1.45,1.54-2.39A9.18,9.18,0,0,0,26,12,10,10,0,0,0,16,2Z\"/>',\n 'identification': '<path d=\"M28,6V26H4V6H28m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6a2,2,0,0,0-2-2Z\"/><path d=\"M6 10H13V12H6z\"/><path d=\"M6 14H10V16H6z\"/><path d=\"M23,18H17a3,3,0,0,0-3,3v2h2V21a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v2h2V21A3,3,0,0,0,23,18Z\"/><path d=\"M20,17a4,4,0,1,0-4-4A4,4,0,0,0,20,17Zm0-6a2,2,0,1,1-2,2A2,2,0,0,1,20,11Z\"/>',\n 'information': '<path d=\"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z\"/><path d=\"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z\"/><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\"/>',\n 'information--square': '<path d=\"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z\"/><path d=\"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z\"/><path d=\"M26,28H6a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,6,4H26a2.0023,2.0023,0,0,1,2,2V26A2.0023,2.0023,0,0,1,26,28ZM6,6V26H26V6Z\"/>',\n 'inventory-management': '<path d=\"M19 24H23V28H19z\"/><path d=\"M26 24H30V28H26z\"/><path d=\"M19 17H23V21H19z\"/><path d=\"M26 17H30V21H26z\"/><path d=\"M17,24H4V10H28v5h2V10a2.0023,2.0023,0,0,0-2-2H22V4a2.0023,2.0023,0,0,0-2-2H12a2.002,2.002,0,0,0-2,2V8H4a2.002,2.002,0,0,0-2,2V24a2.0023,2.0023,0,0,0,2,2H17ZM12,4h8V8H12Z\"/>',\n 'launch': '<path d=\"M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z\"/><path d=\"M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z\"/>',\n 'layers': '<path d=\"M16,24a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,15.12,16,21.8643,28.5259,15.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,24Z\"/><path d=\"M16,30a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,21.12,16,27.8643,28.5259,21.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,30Z\"/><path d=\"M16,18a.9967.9967,0,0,1-.4741-.12l-13-7a1,1,0,0,1,0-1.7607l13-7a.9982.9982,0,0,1,.9482,0l13,7a1,1,0,0,1,0,1.7607l-13,7A.9967.9967,0,0,1,16,18ZM5.1094,10,16,15.8643,26.8906,10,16,4.1358Z\"/>',\n 'license': '<path d=\"M10 6H22V8H10z\"/><path d=\"M10 10H22V12H10z\"/><path d=\"M10 24H16V26H10z\"/><path d=\"M10 14H16V16H10z\"/><path d=\"M24,30H8a2.0023,2.0023,0,0,1-2-2V4A2.0023,2.0023,0,0,1,8,2H24a2.0023,2.0023,0,0,1,2,2V28A2.0023,2.0023,0,0,1,24,30ZM8,4V28H24V4Z\"/>',\n 'list': '<path d=\"M10 6H28V8H10z\"/><path d=\"M10 24H28V26H10z\"/><path d=\"M10 15H28V17H10z\"/><path d=\"M4 15H6V17H4z\"/><path d=\"M4 6H6V8H4z\"/><path d=\"M4 24H6V26H4z\"/>',\n 'list--boxes': '<path d=\"M16 8H30V10H16z\"/><path d=\"M16 22H30V24H16z\"/><path d=\"M10,14H4a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,4,4h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,14ZM4,6v6h6.0012L10,6Z\"/><path d=\"M10,28H4a2.0023,2.0023,0,0,1-2-2V20a2.0023,2.0023,0,0,1,2-2h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,28ZM4,20v6h6.0012L10,20Z\"/>',\n 'list--checked': '<path d=\"M16 22H30V24H16z\"/><path d=\"M14 19.4 12.6 18 6 24.6 3.4 22 2 23.4 6 27.4z\"/><path d=\"M16 8H30V10H16z\"/><path d=\"M14 5.4 12.6 4 6 10.6 3.4 8 2 9.4 6 13.4z\"/>',\n 'location': '<path d=\"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z\"/><path d=\"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z\"/>',\n 'location--company': '<path d=\"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,0,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z\"/><path d=\"M21,18H19V10H13v8H11V10a2.0021,2.0021,0,0,1,2-2h6a2.0021,2.0021,0,0,1,2,2Z\"/><path d=\"M15 16H17V18H15z\"/><path d=\"M15 12H17V14H15z\"/>',\n 'locked': '<path d=\"M24,14H22V8A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14ZM12,8a4,4,0,0,1,8,0v6H12ZM24,28H8V16H24Z\"/>',\n 'login': '<path d=\"M26,30H14a2,2,0,0,1-2-2V25h2v3H26V4H14V7H12V4a2,2,0,0,1,2-2H26a2,2,0,0,1,2,2V28A2,2,0,0,1,26,30Z\"/><path d=\"M14.59 20.59 18.17 17 4 17 4 15 18.17 15 14.59 11.41 16 10 22 16 16 22 14.59 20.59z\"/>',\n 'logout': '<path d=\"M6,30H18a2.0023,2.0023,0,0,0,2-2V25H18v3H6V4H18V7h2V4a2.0023,2.0023,0,0,0-2-2H6A2.0023,2.0023,0,0,0,4,4V28A2.0023,2.0023,0,0,0,6,30Z\"/><path d=\"M20.586 20.586 24.172 17 10 17 10 15 24.172 15 20.586 11.414 22 10 28 16 22 22 20.586 20.586z\"/>',\n 'maximize': '<path d=\"M20 2 20 4 26.586 4 18 12.582 19.414 14 28 5.414 28 12 30 12 30 2 20 2z\"/><path d=\"M14 19.416 12.592 18 4 26.586 4 20 2 20 2 30 12 30 12 28 5.414 28 14 19.416z\"/>',\n 'menu': '<path d=\"M4 6H28V8H4z\"/><path d=\"M4 24H28V26H4z\"/><path d=\"M4 12H28V14H4z\"/><path d=\"M4 18H28V20H4z\"/>',\n 'minimize': '<path d=\"M4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18z\"/><path d=\"M30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z\"/>',\n 'misuse': '<path d=\"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9\tl5.4,5.4L21.4,9l1.6,1.6L17.6,16l5.4,5.4L21.4,23z\"/><path fill=\"none\" d=\"M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9l5.4,5.4L21.4,9l1.6,1.6L17.6,16\tl5.4,5.4L21.4,23z\" data-icon-path=\"inner-path\" opacity=\"0\"/>',\n 'money': '<path d=\"M2 22H30V24H2z\"/><path d=\"M2 26H30V28H2z\"/><path d=\"M24,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z\"/><path d=\"M16,16a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,16,16Zm0-6a2,2,0,1,0,2,2A2.002,2.002,0,0,0,16,10Z\"/><path d=\"M8,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z\"/><path d=\"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z\"/>',\n 'notebook': '<path d=\"M19 10H26V12H19z\"/><path d=\"M19 15H26V17H19z\"/><path d=\"M19 20H26V22H19z\"/><path d=\"M28,5H4A2.002,2.002,0,0,0,2,7V25a2.0023,2.0023,0,0,0,2,2H28a2.0027,2.0027,0,0,0,2-2V7A2.0023,2.0023,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28l.002,18Z\"/>',\n 'notification': '<path d=\"M28.7071,19.293,26,16.5859V13a10.0136,10.0136,0,0,0-9-9.9492V1H15V3.0508A10.0136,10.0136,0,0,0,6,13v3.5859L3.2929,19.293A1,1,0,0,0,3,20v3a1,1,0,0,0,1,1h7v.7768a5.152,5.152,0,0,0,4.5,5.1987A5.0057,5.0057,0,0,0,21,25V24h7a1,1,0,0,0,1-1V20A1,1,0,0,0,28.7071,19.293ZM19,25a3,3,0,0,1-6,0V24h6Zm8-3H5V20.4141L7.707,17.707A1,1,0,0,0,8,17V13a8,8,0,0,1,16,0v4a1,1,0,0,0,.293.707L27,20.4141Z\"/>',\n 'overflow-menu--horizontal': '<circle cx=\"8\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"24\" cy=\"16\" r=\"2\"/>',\n 'overflow-menu--vertical': '<circle cx=\"16\" cy=\"8\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"24\" r=\"2\"/>',\n 'partnership': '<path d=\"M8,9a4,4,0,1,1,4-4A4,4,0,0,1,8,9ZM8,3a2,2,0,1,0,2,2A2,2,0,0,0,8,3Z\"/><path d=\"M24,9a4,4,0,1,1,4-4A4,4,0,0,1,24,9Zm0-6a2,2,0,1,0,2,2A2,2,0,0,0,24,3Z\"/><path d=\"M26,30H22a2,2,0,0,1-2-2V21h2v7h4V19h2V13a1,1,0,0,0-1-1H20.58L16,20l-4.58-8H5a1,1,0,0,0-1,1v6H6v9h4V21h2v7a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V21a2,2,0,0,1-2-2V13a3,3,0,0,1,3-3h7.58L16,16l3.42-6H27a3,3,0,0,1,3,3v6a2,2,0,0,1-2,2v7A2,2,0,0,1,26,30Z\"/>',\n 'payment--methods': '<path d=\"M5,26V15.8281l-3.5859,3.586L0,18l6-6,6,6-1.4141,1.4141-3.5859-3.586v10.1719h12v2H7c-1.104-.0013-1.9987-.896-2-2Z\"/><path d=\"M31,18h-3v-2h-2v2h-1c-1.1046,0-2,.8954-2,2v2c0,1.1046,.8954,2,2,2h4v2h-6s0,2,0,2h3v2h2v-2h1c1.1046,0,2-.8954,2-2v-2c0-1.1046-.8954-2-2-2h-4v-2h6v-2Z\"/><path d=\"M28,12V6c-.0012-1.104-.896-1.9988-2-2H12v2h14v6\"/><path d=\"M2 6H7V8H2z\"/><path d=\"M2 2H10V4H2z\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n 'qr-code': '<path d=\"M24 26H26V28H24z\" transform=\"rotate(-90 25 27)\"/><path d=\"M18 22H20V24H18z\" transform=\"rotate(-90 19 23)\"/><path d=\"M18 30 22 30 22 28 20 28 20 26 18 26 18 30z\"/><path d=\"M25 23H29V25H25z\" transform=\"rotate(-90 27 24)\"/><path d=\"M28 26 30 26 30 30 26 30 26 28 28 28 28 26z\"/><path d=\"M26 20 26 18 30 18 30 22 28 22 28 20 26 20z\"/><path d=\"M24 20 22 20 22 24 20 24 20 26 24 26 24 20z\"/><path d=\"M19 17H21V21H19z\" transform=\"rotate(-90 20 19)\"/><path d=\"M6 22H10V26H6z\"/><path d=\"M14,30H2V18H14ZM4,28h8V20H4Z\"/><path d=\"M22 6H26V10H22z\"/><path d=\"M30,14H18V2H30ZM20,12h8V4H20Z\"/><path d=\"M6 6H10V10H6z\"/><path d=\"M14,14H2V2H14ZM4,12h8V4H4Z\"/>',\n 'receipt': '<path d=\"M21 16H23V18H21z\"/><path d=\"M9 16H17V18H9z\"/><path d=\"M21 12H23V14H21z\"/><path d=\"M9 12H17V14H9z\"/><path d=\"M9 8H23V10H9z\"/><path d=\"M25,2H7A2.002,2.002,0,0,0,5,4V29a1,1,0,0,0,1,1H7a.9987.9987,0,0,0,.8-.4L10,26.667,12.2,29.6a1.0353,1.0353,0,0,0,1.6,0L16,26.667,18.2,29.6a1.0353,1.0353,0,0,0,1.6,0L22,26.667,24.2,29.6a.9993.9993,0,0,0,.8.4h1a1,1,0,0,0,1-1V4A2.0023,2.0023,0,0,0,25,2Zm0,25.333L22.8,24.4a1.0353,1.0353,0,0,0-1.6,0L19,27.333,16.8,24.4a1.0353,1.0353,0,0,0-1.6,0L13,27.333,10.8,24.4a1.0353,1.0353,0,0,0-1.6,0L7,27.333V4H25Z\"/>',\n 'recently-viewed': '<path d=\"M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z\"/><path d=\"M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z\"/>',\n 'redo': '<path d=\"M12,10H24.1851L20.5977,6.4141,22,5,28,11,22,17l-1.4023-1.4146L24.1821,12H12a6,6,0,0,0,0,12h8v2H12a8,8,0,0,1,0-16Z\"/>',\n 'renew': '<path d=\"M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z\"/><path d=\"M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z\"/>',\n 'repeat': '<path d=\"M6,6H26.1719l-3.586-3.5859L24,1l6,6-6,6-1.4141-1.4141L26.1719,8H6v7H4V8A2.0024,2.0024,0,0,1,6,6Z\"/><path d=\"M9.4141,20.4141,5.8281,24H26V17h2v7a2.0024,2.0024,0,0,1-2,2H5.8281L9.414,29.5859,8,31,2,25l6-6Z\"/>',\n 'report': '<path d=\"M10 18H18V20H10z\"/><path d=\"M10 13H22V15H10z\"/><path d=\"M10 23H15V25H10z\"/><path d=\"M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z\"/>',\n 'request-quote': '<path d=\"M22,22v6H6V4H16V2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V22Z\"/><path d=\"M29.54,5.76l-3.3-3.3a1.6,1.6,0,0,0-2.24,0l-14,14V22h5.53l14-14a1.6,1.6,0,0,0,0-2.24ZM14.7,20H12V17.3l9.44-9.45,2.71,2.71ZM25.56,9.15,22.85,6.44l2.27-2.27,2.71,2.71Z\"/>',\n 'reset': '<path d=\"M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z\"/>',\n 'rule': '<path d=\"M10 16H22V18H10z\"/><path d=\"M10 10H22V12H10z\"/><path d=\"M16,30,9.8242,26.7071A10.9815,10.9815,0,0,1,4,17V4A2.0022,2.0022,0,0,1,6,2H26a2.0022,2.0022,0,0,1,2,2V17a10.9815,10.9815,0,0,1-5.8242,9.7069ZM6,4V17a8.9852,8.9852,0,0,0,4.7656,7.9423L16,27.7333l5.2344-2.791A8.9852,8.9852,0,0,0,26,17V4Z\"/>',\n 'save': '<path d=\"M27.71,9.29l-5-5A1,1,0,0,0,22,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V10A1,1,0,0,0,27.71,9.29ZM12,6h8v4H12Zm8,20H12V18h8Zm2,0V18a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v8H6V6h4v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V6.41l4,4V26Z\"/>',\n 'scales': '<path d=\"M20,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L25.896,7.5562a.8913.8913,0,0,0-.0454-.0816A1,1,0,0,0,25,7H18.8218A3.0155,3.0155,0,0,0,17,5.1841V2H15V5.1841A3.0155,3.0155,0,0,0,13.1782,7H7a1,1,0,0,0-.8945.5527l-4,8A1,1,0,0,0,2,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L8.6182,9h4.56A3.0147,3.0147,0,0,0,15,10.8154V28H6v2H26V28H17V10.8159A3.0155,3.0155,0,0,0,18.8218,9h4.56l-3.2763,6.5527A1,1,0,0,0,20,16ZM7,19a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,7,19Zm2.3821-4H4.6179L7,10.2363ZM16,9a1,1,0,1,1,1-1A1.0009,1.0009,0,0,1,16,9Zm9,10a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,25,19Zm0-8.7637L27.3821,15H22.6179Z\"/>',\n 'search': '<path d=\"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z\"/>',\n 'send': '<path d=\"M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z\"/>',\n 'settings': '<path d=\"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z\"/><path d=\"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z\"/>',\n 'settings--adjust': '<path d=\"M30,8h-4.1c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2v2h14.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30V8z M21,12c-1.7,0-3-1.3-3-3\ts1.3-3,3-3s3,1.3,3,3S22.7,12,21,12z\"/><path d=\"M2,24h4.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30v-2H15.9c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2V24z M11,20c1.7,0,3,1.3,3,3\ts-1.3,3-3,3s-3-1.3-3-3S9.3,20,11,20z\"/>',\n 'shopping--bag': '<path d=\"M28.76,11.35A1,1,0,0,0,28,11H22V7a3,3,0,0,0-3-3H13a3,3,0,0,0-3,3v4H4a1,1,0,0,0-1,1.15L4.88,24.3a2,2,0,0,0,2,1.7H25.14a2,2,0,0,0,2-1.7L29,12.15A1,1,0,0,0,28.76,11.35ZM12,7a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v4H12ZM25.14,24H6.86L5.17,13H26.83Z\"/>',\n 'shopping--cart': '<circle cx=\"10\" cy=\"28\" r=\"2\"/><circle cx=\"24\" cy=\"28\" r=\"2\"/><path d=\"M28,7H5.82L5,2.8A1,1,0,0,0,4,2H0V4H3.18L7,23.2A1,1,0,0,0,8,24H26V22H8.82L8,18H26a1,1,0,0,0,1-.78l2-9A1,1,0,0,0,28,7Zm-2.8,9H7.62L6.22,9H26.75Z\"/>',\n 'sort--ascending': '<path d=\"M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z\"/><path d=\"M2 18H16V20H2z\"/><path d=\"M6 12H16V14H6z\"/><path d=\"M10 6H16V8H10z\"/>',\n 'sort--descending': '<path d=\"M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z\"/><path d=\"M2 6H16V8H2z\"/><path d=\"M6 12H16V14H6z\"/><path d=\"M10 18H16V20H10z\"/>',\n 'star': '<path d=\"M16,6.52l2.76,5.58.46,1,1,.15,6.16.89L22,18.44l-.75.73.18,1,1.05,6.13-5.51-2.89L16,23l-.93.49L9.56,26.34l1-6.13.18-1L10,18.44,5.58,14.09l6.16-.89,1-.15.46-1L16,6.52M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z\"/>',\n 'star--filled': '<path d=\"M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z\"/>',\n 'store': '<path d=\"M30,10.68l-2-6A1,1,0,0,0,27,4H5a1,1,0,0,0-1,.68l-2,6A1.19,1.19,0,0,0,2,11v6a1,1,0,0,0,1,1H4V28H6V18h6V28H28V18h1a1,1,0,0,0,1-1V11A1.19,1.19,0,0,0,30,10.68ZM26,26H14V18H26Zm2-10H24V12H22v4H17V12H15v4H10V12H8v4H4V11.16L5.72,6H26.28L28,11.16Z\"/>',\n 'subtract': '<path d=\"M8 15H24V17H8z\"/>',\n 'table--split': '<path d=\"M27,3H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,2V9H5V5ZM17,11H27v7H17Zm-2,7H5V11H15ZM5,20H15v7H5Zm12,7V20H27v7Z\"/>',\n 'tag': '<path d=\"M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z\"/><path d=\"M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z\"/>',\n 'task': '<path d=\"M14 20.18 10.41 16.59 9 18 14 23 23 14 21.59 12.58 14 20.18z\"/><path d=\"M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z\"/>',\n 'task--complete': '<path d=\"M22 27.18 19.41 24.59 18 26 22 30 30 22 28.59 20.59 22 27.18z\"/><path d=\"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3V18h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z\"/>',\n 'text--font': '<path d=\"M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z\"/><path d=\"M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n 'user--multiple': '<path d=\"M30,30H28V25a5.0057,5.0057,0,0,0-5-5V18a7.0078,7.0078,0,0,1,7,7Z\"/><path d=\"M22,30H20V25a5.0059,5.0059,0,0,0-5-5H9a5.0059,5.0059,0,0,0-5,5v5H2V25a7.0082,7.0082,0,0,1,7-7h6a7.0082,7.0082,0,0,1,7,7Z\"/><path d=\"M20,2V4a5,5,0,0,1,0,10v2A7,7,0,0,0,20,2Z\"/><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\"/>',\n 'user--profile': '<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=\"M22 4H32V6H22z\"/><path d=\"M22 9H32V11H22z\"/><path d=\"M22 14H29V16H22z\"/>',\n 'view': '<path d=\"M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z\"/><path d=\"M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z\"/>',\n 'wallet': '<path d=\"M22 17H24V19H22z\"/><path d=\"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z\"/>',\n 'warning--alt': '<path d=\"M16,23a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,23Z\"/><path d=\"M15 12H17V21H15z\"/><path d=\"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z\"/>',\n 'warning--filled': '<path d=\"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25\tc-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z\"/><path fill=\"none\" d=\"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22\tC16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z\" data-icon-path=\"inner-path\" opacity=\"0\"/>',\n};\n","/** Canonical Pire icon names are Lucide slugs; the shipped IBM Carbon pack is reached through\n * this map, so swapping packs never touches a call site. A new icon name used by a component\n * must be added here — that is the whole registration step.\n *\n * This file is also the single source of truth for *which glyphs get vendored*:\n * `scripts/generate-icon-data.mjs` reads it and inlines the matching SVG from\n * `@carbon/icons` into `icon-data.generated.ts`. The script cannot import TypeScript, so it\n * parses this object textually. **Every entry must stay a literal `'name': 'slug',` pair.**\n * A spread, a computed key or a template literal is invisible to the generator: the glyph\n * never gets vendored and `Icon` warns at runtime instead of rendering. Multiple names may\n * point at one slug (`boxes` and `package` both mean `box`); the generator de-duplicates.\n */\nexport const CARBON_MAP: Record<string, string> = {\n 'menu': 'menu',\n 'search': 'search',\n 'bell': 'notification',\n 'help-circle': 'help',\n 'grid-3x3': 'grid',\n /* The app launcher's trigger. Carbon has no 2x2 grid, and `apps` is the glyph it uses for\n exactly this affordance, so the Lucide name maps onto it rather than onto plain `grid`. */\n 'grid-2x2': 'apps',\n 'home': 'home',\n 'file-text': 'document',\n 'clipboard-list': 'list--checked',\n 'building-2': 'building',\n /* Ribbon and import commands. `task--complete` is Carbon's ticked-list glyph; `check-square`\n already points at it, and the generator de-duplicates by slug, so this costs no bytes. */\n 'list-checks': 'task--complete',\n 'pin': 'pin',\n 'upload': 'upload',\n 'boxes': 'box',\n 'truck': 'delivery-truck',\n 'stamp': 'checkmark--outline',\n 'check': 'checkmark',\n 'x': 'close',\n 'minus': 'subtract',\n 'plus': 'add',\n 'trash-2': 'trash-can',\n 'printer': 'printer',\n 'paperclip': 'attachment',\n 'download': 'download',\n 'calendar': 'calendar',\n 'hash': 'hashtag',\n 'history': 'recently-viewed',\n 'calculator': 'calculator',\n 'zap': 'flash',\n 'palette': 'color-palette',\n 'settings': 'settings',\n 'sliders-horizontal': 'settings--adjust',\n 'filter': 'filter',\n 'rows-3': 'list',\n 'align-justify': 'list--boxes',\n 'more-vertical': 'overflow-menu--vertical',\n 'alert-triangle': 'warning--alt',\n 'alert-octagon': 'error--filled',\n 'alert-circle': 'warning--filled',\n 'check-circle-2': 'checkmark--filled',\n 'x-circle': 'misuse',\n 'info': 'information',\n 'circle': 'circle-dash',\n 'chevron-right': 'chevron--right',\n 'chevron-left': 'chevron--left',\n 'chevron-down': 'chevron--down',\n 'chevrons-up-down': 'chevron--sort',\n 'arrow-right': 'arrow--right',\n 'arrow-up': 'arrow--up',\n 'arrow-down': 'arrow--down',\n 'trending-up': 'arrow--up',\n 'trending-down': 'arrow--down',\n 'shopping-cart': 'shopping--cart',\n 'store': 'store',\n 'user': 'user',\n 'shapes': 'apps',\n 'type': 'text--font',\n 'package': 'box',\n 'warehouse': 'building--insights-1',\n 'arrow-up-down': 'arrows--vertical',\n 'scan-line': 'qr-code',\n 'circle-alert': 'warning--filled',\n 'clock': 'time',\n 'layers': 'layers',\n 'map-pin': 'location',\n 'copy': 'copy',\n 'refresh-cw': 'renew',\n 'external-link': 'launch',\n 'pencil': 'edit',\n 'lock': 'locked',\n 'eye': 'view',\n 'minimize-2': 'minimize',\n\n /* --- Direction and chrome, completing the sets above --------------------\n `chevron-up` and `arrow-left` were missing while their three siblings shipped, so a collapsible\n that pointed down had nothing to point back up with. */\n 'chevron-up': 'chevron--up',\n 'arrow-left': 'arrow--left',\n 'more-horizontal': 'overflow-menu--horizontal',\n 'maximize-2': 'maximize',\n 'log-out': 'logout',\n 'log-in': 'login',\n 'archive': 'archive',\n 'folder': 'folder',\n 'book': 'book',\n 'notebook': 'notebook',\n 'asterisk': 'asterisk',\n 'bookmark': 'bookmark',\n 'star': 'star',\n 'star-filled': 'star--filled',\n 'tag': 'tag',\n 'repeat': 'repeat',\n 'undo-2': 'undo',\n 'redo-2': 'redo',\n 'rotate-ccw': 'reset',\n 'table': 'table--split',\n 'database': 'data--base',\n 'function-square': 'function',\n\n /* --- Money -------------------------------------------------------------\n `credit-card` is here because its absence shipped: it resolved to nothing, rendered an empty\n box, and reached production on the payment notifications. Carbon spells it `payment--methods`,\n which is exactly the kind of mismatch this map exists to absorb. */\n 'credit-card': 'payment--methods',\n 'wallet': 'wallet',\n 'banknote': 'money',\n 'coins': 'currency',\n 'dollar-sign': 'currency--dollar',\n 'euro': 'currency--euro',\n 'receipt': 'receipt',\n 'percent': 'percentage',\n 'piggy-bank': 'piggy-bank',\n 'landmark': 'bank--vault',\n 'scale': 'scales',\n 'purchase': 'purchase',\n\n /* --- Documents and ERP objects ----------------------------------------- */\n 'file-signature': 'request-quote',\n 'scroll-text': 'license',\n 'file-plus': 'document--add',\n 'save': 'save',\n 'file-bar-chart': 'report',\n 'list-todo': 'task',\n 'check-square': 'task--complete',\n 'gavel': 'rule',\n 'id-card': 'identification',\n 'briefcase': 'portfolio',\n 'handshake': 'partnership',\n 'lightbulb': 'idea',\n 'inventory': 'inventory-management',\n 'package-2': 'delivery--parcel',\n 'shopping-bag': 'shopping--bag',\n 'barcode': 'barcode',\n 'qr-code': 'qr-code',\n 'git-branch': 'flow',\n 'bug': 'debug',\n\n /* --- People and contact ------------------------------------------------- */\n 'users': 'user--multiple',\n 'user-plus': 'user--follow',\n 'user-cog': 'user--admin',\n 'user-circle': 'user--profile',\n 'mail': 'email',\n 'phone': 'phone',\n 'send': 'send',\n 'globe': 'globe',\n 'building': 'location--company',\n\n /* --- Charts and time ---------------------------------------------------- */\n 'bar-chart-3': 'chart--column',\n 'bar-chart-horizontal': 'chart--bar',\n 'line-chart': 'chart--line',\n 'pie-chart': 'chart--pie',\n 'area-chart': 'chart--area',\n 'calendar-days': 'events',\n 'calendar-plus': 'calendar--add',\n 'calendar-heatmap': 'calendar--heat-map',\n\n /* --- Transfer ----------------------------------------------------------- */\n 'cloud-upload': 'cloud--upload',\n 'cloud-download': 'cloud--download',\n 'filter-x': 'filter--edit',\n 'arrow-up-narrow-wide': 'sort--ascending',\n 'arrow-down-wide-narrow': 'sort--descending',\n 'badge-info': 'information--square',\n};\n\n/**\n * Every name `Icon` can render, frozen and sorted.\n *\n * Exported because an unknown slug fails quietly — an empty box and one dev-only console warning,\n * which is easy to lose in a busy log. A consumer that generates icon names from data can assert\n * against this list at build time instead of discovering the gap in production, which is how\n * `credit-card` shipped as a blank square.\n */\nexport const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(CARBON_MAP).sort());\n","import type * as React from 'react';\nimport { ICON_MARKUP } from './icon-data.generated';\nimport { CARBON_MAP } from './icon-map';\n\n/** The package has no `@types/node`, and it should not need one for a browser library — but the\n * literal token `process.env.NODE_ENV` has to survive into the output for a bundler to substitute\n * it. Declared inside the module rather than globally so it shadows, and cannot clash with, the\n * `process` that `@types/node` contributes when it is present in a consumer's graph. */\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/** Dev-only diagnostics. Every bundler replaces `process.env.NODE_ENV` statically, so the warnings\n * and their registry are dead code a minifier drops from production builds. Do *not* wrap this in\n * `typeof process !== 'undefined'`: `process` is genuinely undefined in the browser, the `typeof`\n * test is not something a bundler substitutes, and the guard would evaluate false in development —\n * silencing the warnings this exists to emit. This is the same bare check react-aria-components\n * ships, so it is already in every consumer's bundle. */\nconst IS_DEV = process.env.NODE_ENV !== 'production';\n\nconst warned = new Set<string>();\n/** One warning per distinct cause. Icons re-render on every keystroke in a filter bar, so warning\n * per render would bury the message in its own repetitions. */\nfunction warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[pire] ${message}`);\n}\n\n/** @deprecated Retained only so existing `pack` values still typecheck. Glyphs are bundled from\n * the Carbon pack; there is no second pack and no remote fetch, so the value is ignored. */\nexport type IconPack = 'carbon' | 'lucide';\n\nexport interface IconConfig {\n /** @deprecated Ignored. The bundled Carbon pack is the only pack — `lucide` was a remote-URL\n * pack and no longer exists. Setting this warns in development. */\n pack?: IconPack;\n /** @deprecated Ignored — glyphs are inlined in the bundle, so there is nothing to serve from a\n * folder. Apps that vendored `<slug>.svg` files into `public/` to survive offline can delete\n * both the files and this call. Setting it warns in development. */\n base?: string;\n /** Escape hatch for a glyph Pire does not bundle, or to override one. Return the *inner* markup\n * of a 32x32 SVG (`'<path d=\"…\"/>'`), or `undefined` to fall through to the bundled set. The\n * string is injected as-is, so it must be authored markup, never user input. */\n resolve?: (name: string) => string | undefined;\n}\n\nlet config: IconConfig = {};\n\n/** Optional. The bundled Carbon set needs no configuration — this exists only to register glyphs\n * Pire does not ship, once at startup. */\nexport function configureIcons(next: IconConfig): void {\n config = { ...config, ...next };\n if (!IS_DEV) return;\n if (next.base !== undefined) {\n warnOnce(\n 'config:base',\n 'configureIcons({ base }) is ignored: glyphs are inlined in the bundle and no longer fetched over the network. Remove the call, and the self-hosted SVGs it pointed at.',\n );\n }\n if (next.pack !== undefined) {\n warnOnce(\n 'config:pack',\n 'configureIcons({ pack }) is ignored: the bundled Carbon pack is the only pack. Use configureIcons({ resolve }) to supply a glyph Pire does not ship.',\n );\n }\n}\n\nexport interface IconProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {\n /** Canonical (Lucide) slug, e.g. \"shopping-cart\". Translated to the Carbon pack automatically. */\n name: string;\n /** Pixel box. 16 in dense UI, 20 in headers, 24 in tiles. */\n size?: number;\n /** Accessible name. Omit for decorative icons — they are hidden from assistive tech. */\n label?: string;\n /** @deprecated Ignored. See {@link IconConfig.pack}. */\n pack?: IconPack;\n}\n\n/** Glyph rendered as inline SVG filled with `currentColor`, so it inherits text colour everywhere\n * and paints with no network at all — which the previous CDN-backed implementation did not, leaving\n * every icon blank offline in the PWAs that consume this library.\n *\n * An unknown name still renders nothing, so a typo cannot collapse a layout, but it warns in\n * development: the silent blank gap was the failure mode worth killing. */\nexport function Icon({ name, size = 16, label, pack, style, ...rest }: IconProps) {\n const markup = config.resolve?.(name) ?? ICON_MARKUP[CARBON_MAP[name] ?? name];\n if (IS_DEV) {\n if (pack !== undefined) {\n warnOnce(\n 'prop:pack',\n 'The Icon `pack` prop is ignored: the bundled Carbon pack is the only pack. Drop the prop.',\n );\n }\n if (markup === undefined) {\n warnOnce(\n `missing:${name}`,\n `Unknown icon name \"${name}\" — nothing will render. Add it to CARBON_MAP in src/components/core/icon-map.ts and rebuild, or register it with configureIcons({ resolve }).`,\n );\n }\n }\n return (\n <span\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n data-icon={name}\n {...rest}\n style={{ display: 'inline-block', flex: '0 0 auto', width: size, height: size, ...style }}\n >\n {markup === undefined ? (\n // A broken icon has to look broken. In development the box gets a dashed outline so the\n // gap is visible on screen instead of only in a console warning that is easy to lose in a\n // busy log — which is how a missing `credit-card` reached production as a blank square.\n // Production still renders nothing at all: a dev diagnostic must never become a user's\n // first sight of a defect. Deliberately not an <svg>, so nothing reads it as a real glyph.\n IS_DEV ? (\n <span className=\"pire-icon-missing\" title={`Unknown icon: ${name}`} />\n ) : null\n ) : (\n <svg\n viewBox=\"0 0 32 32\"\n width={size}\n height={size}\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\"\n style={{ display: 'block' }}\n // The markup is build-time output of scripts/generate-icon-data.mjs, or a string the app\n // itself handed to configureIcons — never user input. Parsing it into React elements\n // would mean shipping an SVG parser to do what the browser already does.\n // biome-ignore lint/security/noDangerouslySetInnerHtml: build-time generated icon markup.\n dangerouslySetInnerHTML={{ __html: markup }}\n />\n )}\n </span>\n );\n}\n","import * as React from 'react';\nimport { Button as AriaButton, type ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { ComingSoonMark, comingSoonProps } from './ComingSoonMark';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** primary = one per view. secondary = default action. tertiary = low-stakes/inline.\n * danger = destructive. emphasized = on the dark shell. */\n variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'emphasized';\n /** sm = table rows & toolbars, md = default forms, lg = full-width CTAs. */\n size?: 'sm' | 'md' | 'lg';\n /** Icon slug rendered before the label. */\n icon?: string;\n /** Icon slug rendered after the label. */\n iconEnd?: string;\n fullWidth?: boolean;\n /**\n * An action the product will have but does not have yet. Draws the button in the tertiary ink\n * with a \"Soon\" mark after the label, keeps it **focusable** with `aria-disabled=\"true\"`, and\n * never fires `onPress` (nor submits a form).\n *\n * Not a kind of `isDisabled`. Disabled means \"not now\" — no selection, no permission, the wrong\n * document state — and takes the control out of the tab order. This means \"not yet\", and the mark\n * is the message: it has to be reachable by keyboard, announced (\"Send by WhatsApp, soon\"), and\n * able to carry a `Tooltip` saying what the action will do. It also does not look disabled, so a\n * user can tell the two apart.\n */\n isComingSoon?: boolean;\n className?: string;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n children,\n variant = 'secondary',\n size = 'md',\n icon,\n iconEnd,\n fullWidth,\n isComingSoon,\n className,\n ...rest\n },\n ref,\n) {\n const msg = usePireMessages();\n const soonLabel = rest['aria-label'] ?? (typeof children === 'string' ? children : undefined);\n return (\n <AriaButton\n ref={ref}\n className={cx('pire-btn', className)}\n data-variant={variant}\n data-size={size}\n data-full-width={fullWidth ? 'true' : undefined}\n {...rest}\n {...(isComingSoon ? comingSoonProps(soonLabel, msg.comingSoon) : {})}\n >\n {icon ? <Icon name={icon} size={16} /> : null}\n {children}\n {iconEnd ? <Icon name={iconEnd} size={16} /> : null}\n {isComingSoon ? <ComingSoonMark announce={soonLabel == null} /> : null}\n </AriaButton>\n );\n});\n","import * as React from 'react';\nimport { type PireMessages, enMessages } from './messages';\n\nconst MessagesContext = React.createContext<PireMessages>(enMessages);\n\nexport interface PireIntlProviderProps {\n /** Overrides merged over the English defaults, so a partial dictionary is enough. */\n messages?: Partial<PireMessages>;\n children?: React.ReactNode;\n}\n\n/**\n * Supplies the strings Pire renders itself. Mount once near the app root, alongside React Aria's\n * `I18nProvider` — that one localises React Aria's internals, this one localises Pire's.\n */\nexport function PireIntlProvider({ messages, children }: PireIntlProviderProps) {\n const value = React.useMemo(() => (messages ? { ...enMessages, ...messages } : enMessages), [messages]);\n\n return <MessagesContext.Provider value={value}>{children}</MessagesContext.Provider>;\n}\n\n/** Reads the active dictionary. Without a provider this returns the English defaults. */\nexport function usePireMessages(): PireMessages {\n return React.useContext(MessagesContext);\n}\n\n/**\n * Resolves one string, letting an explicit prop win over the dictionary.\n *\n * Components call this so a per-instance override is always available — a screen with two navs\n * needs to name them differently even when the dictionary is correct.\n */\nexport function useMessage(key: keyof PireMessages, override?: string): string {\n // Read the context unconditionally — `override ?? useContext(...)` short-circuits, which\n // changes the hook call order between renders.\n const messages = React.useContext(MessagesContext);\n return override ?? messages[key];\n}\n","/**\n * Every string Pire renders that the consumer did not supply.\n *\n * Keys are `<component><thing>`. Values are the English defaults, so a consumer that installs\n * nothing keeps working exactly as before.\n *\n * React Aria localises its own internals (date field segments, table sort announcements) through\n * `I18nProvider`, which Pire re-exports. This dictionary is the parallel for Pire's own strings —\n * install both to fully translate the UI.\n */\nexport interface PireMessages {\n /** FilterBar's landmark name. */\n filterBarLabel: string;\n /** Visible text of the apply button. Filters apply explicitly, never live. */\n filterBarGo: string;\n /** Visible text of the button that removes every active filter. */\n filterBarClearAll: string;\n\n /** Accessible name of the header checkbox that selects every row. */\n dataTableSelectAll: string;\n /** Accessible name of a row's selection checkbox. */\n dataTableSelectRow: string;\n /** Announced-only name of the selection column's header when `hideSelectAll` removes the\n * select-all checkbox that would otherwise name it. */\n dataTableSelectionColumn: string;\n /** Announced while the table body is a skeleton. */\n dataTableLoading: string;\n /** Row header announced for the totals row when the first column carries no summary cell. */\n dataTableSummaryRow: string;\n /** Shown in place of the body when a table has no rows and is not loading. */\n dataTableEmpty: string;\n\n /** Accessible name of the dialog's close affordance. */\n dialogClose: string;\n /** Accessible name of SidePanel's close affordance. */\n sidePanelClose: string;\n\n /** Accessible name of InlineMessage's dismiss affordance. */\n inlineMessageDismiss: string;\n /** Accessible name of a toast's dismiss affordance. */\n toastDismiss: string;\n /** Landmark name of the toast live region. */\n toastRegionLabel: string;\n\n /** Shown in a Select's trigger while nothing is chosen, and — with `isClearable` — reused as\n * the visible label of the row that returns the field to that state. The same string has to\n * read naturally in both places: as trigger text and as a list item. */\n selectPlaceholder: string;\n /** Shown inside the popover when a Select has no options at all. A Select whose list is empty\n * used not to open, so the field read as broken; this is the text that explains it instead. */\n selectEmpty: string;\n\n /** Accessible name of the button that opens a ComboBox's list. */\n comboBoxShowSuggestions: string;\n /** Row shown in the popover while a server search is in flight. */\n comboBoxLoading: string;\n\n /** Accessible name of the button that opens the calendar popover. */\n datePickerOpenCalendar: string;\n datePickerPreviousMonth: string;\n datePickerNextMonth: string;\n /** Groups the shortcut buttons beside the range calendar. */\n dateRangePresetsLabel: string;\n\n /** Accessible names of the NumberField steppers. */\n numberFieldIncrease: string;\n numberFieldDecrease: string;\n\n /** Accessible name of the button that clears a ValueHelpField. */\n /** Accessible name of the clear affordance on a clearable Input. */\n inputClear: string;\n\n /** Accessible name of the help icon beside a field label. The explanation itself is the\n * tooltip, and is also announced as part of the field's description. */\n fieldHelp: string;\n /** Accessible name of a field's help icon when the field's label is a plain string, so that a\n * form with six helped fields does not offer six buttons all called `fieldHelp`. `{label}` is\n * replaced with the field's own label, lowercased for its mid-sentence position — the same\n * shape as `valueHelpFieldOpenNamed`. */\n fieldHelpNamed: string;\n\n /** Placeholder in the closed value-help field when nothing is picked. */\n valueHelpFieldPlaceholder: string;\n valueHelpFieldClear: string;\n /** Opens the value-help dialog. `{label}` is replaced with the field's own label. */\n valueHelpFieldOpenNamed: string;\n /** Same button, when the field has no string label to name it with. */\n valueHelpFieldOpen: string;\n /** Accessible name of ValueHelpDialog's search field. */\n valueHelpDialogSearch: string;\n /** Default dialog heading when the field does not supply one. */\n valueHelpDialogTitle: string;\n /** Placeholder in the value-help search box. */\n valueHelpDialogSearchPlaceholder: string;\n /** Shown when the search returns nothing. */\n valueHelpDialogEmpty: string;\n /** Visible text of ValueHelpDialog's cancel button. */\n valueHelpDialogCancel: string;\n\n /** Pagination's landmark name and its controls. */\n paginationLabel: string;\n /** Record range. `{from}`, `{to}` and `{total}` are replaced with formatted numbers. */\n paginationRange: string;\n /** Current page. `{page}` and `{pages}` are replaced. */\n paginationPageOf: string;\n paginationPrevious: string;\n paginationNext: string;\n paginationRowsPerPage: string;\n\n /** Landmark name of the main SideNav. Override it when a screen has more than one nav. */\n sideNavLabel: string;\n /** ShellRail's landmark name. Distinct from `sideNavLabel`: the two navs are on screen together,\n * and one of them has to say which level it is. */\n shellRailLabel: string;\n\n /** Accessible name of AppLauncher's trigger, and of the panel it opens. */\n appLauncherLabel: string;\n /** Heading inside the launcher panel. */\n appLauncherTitle: string;\n /** The launcher search box's label and placeholder. */\n appLauncherSearch: string;\n /** Shown when the search matches nothing. */\n appLauncherEmpty: string;\n /** Announced while a server-backed catalogue is loading. */\n appLauncherLoading: string;\n /** Names SplitPane's list column. */\n splitPaneList: string;\n /** Names SplitPane's detail column. */\n splitPaneDetail: string;\n /** Returns to the list when SplitPane is narrow enough to show one column. */\n splitPaneBack: string;\n\n /** Button that opens the OS file picker. */\n fileUploadChoose: string;\n /** Removes one picked file. `{name}` is replaced with the file name. */\n fileUploadRemoveNamed: string;\n /** Label on the progress bar while the app uploads. */\n fileUploadUploading: string;\n /** Instruction inside the drop surface. */\n fileDropZonePrompt: string;\n\n /** Accessible name of the ShellBar avatar once it opens a menu. `{user}` is the person's name. */\n shellBarUserMenu: string;\n\n /** Names the command palette dialog. */\n commandPaletteLabel: string;\n /** Accessible name of the palette's search input. */\n commandPaletteSearchLabel: string;\n /** Placeholder in the palette's input. */\n commandPalettePlaceholder: string;\n /** Shown when nothing matches what was typed. */\n commandPaletteEmpty: string;\n /** Shown while a server-backed search is in flight. */\n commandPaletteLoading: string;\n /** Footer hint beside the arrow-key glyphs. */\n commandPaletteHintNavigate: string;\n /** Footer hint beside the Enter glyph. */\n commandPaletteHintSelect: string;\n /** Footer hint beside the Esc glyph. */\n commandPaletteHintClose: string;\n\n /** Heading of the category column in a chart's data table. */\n chartCategoryHeader: string;\n /** Cell text where a chart series has no reading for a category. Never \"0\" — a gap is not a zero. */\n chartNoValue: string;\n /** Shown in place of the plot when a chart has nothing to draw. */\n chartEmpty: string;\n\n /** Accessible name of NumPad's clear key. Its visible glyph is \"C\". */\n numPadClear: string;\n /** Accessible name of NumPad's backspace key. Its visible glyph is \"⌫\". */\n numPadBackspace: string;\n /** Accessible name of NumPad's decimal key. Its visible glyph is the locale's own separator\n * (\",\" or \".\"), which is not a name a screen reader can announce. */\n numPadDecimal: string;\n\n /** Accessible name of the trigger. `{view}` is the view's own name. An `aria-label` on the\n * component replaces this entirely — see the prop's own note. */\n viewSwitcherName: string;\n /** Accessible name when the view has unsaved changes. A comma rather than the middot the\n * visible marker uses: a screen reader announces punctuation, and \"·\" reads as a symbol\n * rather than as the pause it is meant to be. */\n viewSwitcherNameModified: string;\n /** The visible marker beside a modified view's name, separator included. */\n viewSwitcherModifiedMark: string;\n\n /** Accessible name of QuantityStepper's increment button. */\n quantityStepperIncrease: string;\n /** Accessible name of QuantityStepper's decrement button. */\n quantityStepperDecrease: string;\n\n /** Names the key-figure summary inside a ConfirmDialog, for assistive tech. */\n confirmDialogFactsLabel: string;\n\n /** Visible text of the multi-select value help's \"select every row\" action. Carries the scope\n * it will act on: `{count}` is replaced with how many records the press would tick. */\n valueHelpSelectAllCount: string;\n /** Visible text of the action that empties a multi-select value help's selection. */\n valueHelpClearSelection: string;\n /** How many records are selected. `{count}` is replaced with the number. */\n valueHelpSelectedCount: string;\n /** Visible text of the multi-select value help's commit button. */\n valueHelpConfirm: string;\n\n /** Accessible name of a Tag's remove affordance, with the tag's own text substituted for\n * `{name}`. Same shape as `fileUploadRemoveNamed`, which solves the identical problem. */\n tagRemoveNamed: string;\n /** Accessible name of a Tag's remove affordance when the tag's content is not plain text.\n * Deliberately not \"filter\": a Tag is categorical and carries payment kinds and document\n * types as often as it carries filters. */\n tagRemove: string;\n\n /**\n * Names the expanded ribbon's command band. Separate from the `aria-label` the consumer\n * supplies, which is already spent naming the tab list above it — the band is a second\n * landmark and would otherwise go unnamed.\n */\n ribbonLabel: string;\n /** Accessible name of the toggle while the ribbon is expanded. */\n ribbonCollapse: string;\n /** Accessible name of the toggle while the ribbon is collapsed. */\n ribbonExpand: string;\n\n /** The mark beside an action the product will have but does not have yet (`isComingSoon` on\n * `Button` and `Ribbon.Command`). Short, because it sits inside a 21px ribbon row. Announced\n * after the label as part of the control's name. */\n comingSoon: string;\n\n /** SelectionBar's sentence, one selected record. `{count}` is the formatted number and `{noun}`\n * the noun's `one` form. The four entries exist because a Spanish participle agrees in number\n * *and* gender — \"2 órdenes seleccionadas\", \"2 presupuestos seleccionados\" — and English needs\n * neither, so its feminine entries simply repeat the masculine ones. */\n selectionBarCountOne: string;\n /** As `selectionBarCountOne`, for any count that is not grammatically singular. */\n selectionBarCountOther: string;\n /** As `selectionBarCountOne`, for a noun with `gender=\"feminine\"`. */\n selectionBarCountOneFeminine: string;\n /** As `selectionBarCountOther`, for a noun with `gender=\"feminine\"`. */\n selectionBarCountOtherFeminine: string;\n /** SelectionBar's noun when the consumer names none, singular and plural. Masculine in Spanish. */\n selectionBarNounOne: string;\n selectionBarNounOther: string;\n /** Visible text of SelectionBar's own clear button, rendered once `onClear` is supplied. */\n selectionBarClear: string;\n\n /** Accessible name of the button that stands in for a collapsed breadcrumb's middle steps. */\n breadcrumbMore: string;\n /** Names the shell bar's breadcrumb landmark. */\n breadcrumbLabel: string;\n}\n\nexport const enMessages: PireMessages = {\n filterBarLabel: 'Filters',\n filterBarGo: 'Go',\n filterBarClearAll: 'Clear all',\n\n dataTableSelectAll: 'Select all rows',\n dataTableSelectRow: 'Select row',\n dataTableSelectionColumn: 'Selection',\n dataTableLoading: 'Loading records',\n dataTableSummaryRow: 'Summary',\n dataTableEmpty: 'No records match the current filters.',\n\n dialogClose: 'Close',\n sidePanelClose: 'Close panel',\n\n inlineMessageDismiss: 'Dismiss message',\n toastDismiss: 'Dismiss',\n toastRegionLabel: 'Notifications',\n\n selectPlaceholder: 'Select…',\n\n selectEmpty: 'No options available',\n\n comboBoxShowSuggestions: 'Show suggestions',\n comboBoxLoading: 'Searching…',\n\n datePickerOpenCalendar: 'Open calendar',\n datePickerPreviousMonth: 'Previous month',\n datePickerNextMonth: 'Next month',\n dateRangePresetsLabel: 'Date range shortcuts',\n\n numberFieldIncrease: 'Increase',\n numberFieldDecrease: 'Decrease',\n\n inputClear: 'Clear',\n\n fieldHelp: 'More information',\n fieldHelpNamed: 'More information about {label}',\n\n valueHelpFieldPlaceholder: 'Not selected',\n valueHelpFieldClear: 'Clear selection',\n valueHelpFieldOpenNamed: 'Select {label}',\n valueHelpFieldOpen: 'Open value help',\n valueHelpDialogSearch: 'Search records',\n valueHelpDialogTitle: 'Select a record',\n valueHelpDialogSearchPlaceholder: 'Search by ID or name',\n valueHelpDialogEmpty: 'No records found',\n valueHelpDialogCancel: 'Cancel',\n\n paginationLabel: 'Pagination',\n paginationRange: '{from}–{to} of {total}',\n paginationPageOf: 'Page {page} of {pages}',\n paginationPrevious: 'Previous page',\n paginationNext: 'Next page',\n paginationRowsPerPage: 'Rows per page',\n\n sideNavLabel: 'Main navigation',\n shellRailLabel: 'Applications',\n appLauncherLabel: 'All applications',\n appLauncherTitle: 'All applications',\n appLauncherSearch: 'Search for an application',\n appLauncherEmpty: 'No application matches that search.',\n appLauncherLoading: 'Loading applications…',\n splitPaneList: 'List',\n splitPaneDetail: 'Detail',\n splitPaneBack: 'Back to list',\n\n fileUploadChoose: 'Choose files',\n fileUploadRemoveNamed: 'Remove {name}',\n fileUploadUploading: 'Uploading',\n fileDropZonePrompt: 'Drag files here, or choose them',\n\n shellBarUserMenu: 'Account menu for {user}',\n\n commandPaletteLabel: 'Command palette',\n commandPaletteSearchLabel: 'Search commands and records',\n commandPalettePlaceholder: 'Search for a screen, an action or a record…',\n commandPaletteEmpty: 'Nothing matches that',\n commandPaletteLoading: 'Searching…',\n commandPaletteHintNavigate: 'navigate',\n commandPaletteHintSelect: 'open',\n commandPaletteHintClose: 'close',\n\n chartCategoryHeader: 'Category',\n chartNoValue: 'No data',\n chartEmpty: 'No data for this period',\n\n numPadClear: 'Clear',\n numPadBackspace: 'Remove last digit',\n numPadDecimal: 'Decimal separator',\n\n viewSwitcherName: 'Saved views: {view}',\n viewSwitcherNameModified: 'Saved views: {view}, modified',\n viewSwitcherModifiedMark: '· modified',\n quantityStepperIncrease: 'Increase quantity',\n quantityStepperDecrease: 'Decrease quantity',\n confirmDialogFactsLabel: 'Summary',\n valueHelpSelectAllCount: 'Select all ({count})',\n valueHelpClearSelection: 'Clear selection',\n valueHelpSelectedCount: 'Selected: {count}',\n valueHelpConfirm: 'Apply selection',\n tagRemoveNamed: 'Remove {name}',\n tagRemove: 'Remove',\n\n ribbonLabel: 'Commands',\n ribbonCollapse: 'Collapse the ribbon',\n ribbonExpand: 'Expand the ribbon',\n\n comingSoon: 'Soon',\n\n selectionBarCountOne: '{count} {noun} selected',\n selectionBarCountOther: '{count} {noun} selected',\n selectionBarCountOneFeminine: '{count} {noun} selected',\n selectionBarCountOtherFeminine: '{count} {noun} selected',\n selectionBarNounOne: 'record',\n selectionBarNounOther: 'records',\n selectionBarClear: 'Clear selection',\n\n breadcrumbMore: 'Show the full path',\n breadcrumbLabel: 'Breadcrumb',\n};\n\nexport const esMessages: PireMessages = {\n filterBarLabel: 'Filtros',\n filterBarGo: 'Buscar',\n filterBarClearAll: 'Limpiar todo',\n\n dataTableSelectAll: 'Seleccionar todas las filas',\n dataTableSelectRow: 'Seleccionar fila',\n dataTableSelectionColumn: 'Selección',\n dataTableLoading: 'Cargando registros',\n dataTableSummaryRow: 'Resumen',\n dataTableEmpty: 'Ningún registro coincide con los filtros actuales.',\n\n dialogClose: 'Cerrar',\n sidePanelClose: 'Cerrar panel',\n\n inlineMessageDismiss: 'Descartar mensaje',\n toastDismiss: 'Descartar',\n toastRegionLabel: 'Notificaciones',\n\n selectPlaceholder: 'Seleccionar…',\n\n selectEmpty: 'Sin opciones disponibles',\n\n comboBoxShowSuggestions: 'Mostrar sugerencias',\n comboBoxLoading: 'Buscando…',\n\n datePickerOpenCalendar: 'Abrir calendario',\n datePickerPreviousMonth: 'Mes anterior',\n datePickerNextMonth: 'Mes siguiente',\n dateRangePresetsLabel: 'Atajos de rango de fechas',\n\n numberFieldIncrease: 'Aumentar',\n numberFieldDecrease: 'Disminuir',\n\n inputClear: 'Limpiar',\n\n fieldHelp: 'Más información',\n fieldHelpNamed: 'Más información sobre {label}',\n\n valueHelpFieldPlaceholder: 'Sin seleccionar',\n valueHelpFieldClear: 'Limpiar selección',\n valueHelpFieldOpenNamed: 'Seleccionar {label}',\n valueHelpFieldOpen: 'Abrir ayuda de valores',\n valueHelpDialogSearch: 'Buscar registros',\n valueHelpDialogTitle: 'Seleccionar un registro',\n valueHelpDialogSearchPlaceholder: 'Buscar por código o nombre',\n valueHelpDialogEmpty: 'No se encontraron registros',\n valueHelpDialogCancel: 'Cancelar',\n\n paginationLabel: 'Paginación',\n paginationRange: '{from}–{to} de {total}',\n paginationPageOf: 'Página {page} de {pages}',\n paginationPrevious: 'Página anterior',\n paginationNext: 'Página siguiente',\n paginationRowsPerPage: 'Filas por página',\n\n sideNavLabel: 'Navegación principal',\n shellRailLabel: 'Aplicaciones',\n appLauncherLabel: 'Todas las aplicaciones',\n appLauncherTitle: 'Todas las aplicaciones',\n appLauncherSearch: 'Buscá una aplicación',\n appLauncherEmpty: 'Ninguna aplicación coincide con esa búsqueda.',\n appLauncherLoading: 'Cargando aplicaciones…',\n splitPaneList: 'Lista',\n splitPaneDetail: 'Detalle',\n splitPaneBack: 'Volver a la lista',\n\n fileUploadChoose: 'Elegir archivos',\n fileUploadRemoveNamed: 'Quitar {name}',\n fileUploadUploading: 'Subiendo',\n fileDropZonePrompt: 'Arrastrá archivos acá, o elegilos',\n\n shellBarUserMenu: 'Menú de cuenta de {user}',\n\n commandPaletteLabel: 'Paleta de comandos',\n commandPaletteSearchLabel: 'Buscar comandos y registros',\n commandPalettePlaceholder: 'Buscá una pantalla, una acción o un registro…',\n commandPaletteEmpty: 'No hay coincidencias',\n commandPaletteLoading: 'Buscando…',\n commandPaletteHintNavigate: 'navegar',\n commandPaletteHintSelect: 'abrir',\n commandPaletteHintClose: 'cerrar',\n\n chartCategoryHeader: 'Categoría',\n chartNoValue: 'Sin datos',\n chartEmpty: 'Sin datos para este período',\n\n numPadClear: 'Limpiar',\n numPadBackspace: 'Borrar último dígito',\n numPadDecimal: 'Separador decimal',\n\n viewSwitcherName: 'Vistas guardadas: {view}',\n viewSwitcherNameModified: 'Vistas guardadas: {view}, modificada',\n viewSwitcherModifiedMark: '· modificada',\n quantityStepperIncrease: 'Aumentar cantidad',\n quantityStepperDecrease: 'Disminuir cantidad',\n confirmDialogFactsLabel: 'Resumen',\n valueHelpSelectAllCount: 'Seleccionar todo ({count})',\n valueHelpClearSelection: 'Limpiar selección',\n valueHelpSelectedCount: 'Seleccionadas: {count}',\n valueHelpConfirm: 'Aplicar selección',\n tagRemoveNamed: 'Quitar {name}',\n tagRemove: 'Quitar',\n\n ribbonLabel: 'Comandos',\n ribbonCollapse: 'Contraer la cinta',\n ribbonExpand: 'Expandir la cinta',\n\n comingSoon: 'Pronto',\n\n selectionBarCountOne: '{count} {noun} seleccionado',\n selectionBarCountOther: '{count} {noun} seleccionados',\n selectionBarCountOneFeminine: '{count} {noun} seleccionada',\n selectionBarCountOtherFeminine: '{count} {noun} seleccionadas',\n selectionBarNounOne: 'registro',\n selectionBarNounOther: 'registros',\n selectionBarClear: 'Quitar selección',\n\n breadcrumbMore: 'Mostrar la ruta completa',\n breadcrumbLabel: 'Ruta de navegación',\n};\n","import { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/**\n * The \"Soon\" mark `Button` and `Ribbon.Command` draw after their label while `isComingSoon`.\n *\n * Private: the mark means nothing on its own, only beside the label of a control that is focusable\n * and inert. It is drawn, never announced — the announcement is the control's name, which\n * `comingSoonProps` builds whenever the label is plain text. `announce` is the fallback for a label\n * that is not (an element, a formatted fragment): a hidden \", Soon\" read as part of the content.\n * Second best, because the hidden span is absolutely positioned and name computation pads a\n * non-inline box with spaces — \"Registrar cobro , Pronto\".\n */\nexport function ComingSoonMark({ announce }: { announce: boolean }) {\n const msg = usePireMessages();\n return (\n <>\n {announce ? <span className=\"pire-sr-only\">, {msg.comingSoon}</span> : null}\n <span className=\"pire-soon-mark\" aria-hidden=\"true\">\n {msg.comingSoon}\n </span>\n </>\n );\n}\n\n/**\n * What `isComingSoon` does to a React Aria button's props, shared so `Button` and `Ribbon.Command`\n * cannot drift apart.\n *\n * Not `isDisabled`: that takes the control out of the tab order, and the mark is the message — a\n * screen-reader user who can never reach the control never hears it, and a `Tooltip` has nothing to\n * attach to. `aria-disabled` keeps it reachable while saying it does nothing. Every press handler\n * is dropped rather than wrapped, and `type` is forced to `button`, because a submit button that is\n * only *aria*-disabled still submits its form.\n *\n * `label` is the control's name as plain text — an explicit `aria-label`, or the children when they\n * are a string — and comes back as `\"<label>, <Soon>\"`. Pass `undefined` when there is no such text,\n * and render `ComingSoonMark` with `announce` instead.\n */\nexport function comingSoonProps(label: string | undefined, comingSoon: string) {\n return {\n 'aria-disabled': true as const,\n 'data-coming-soon': 'true',\n type: 'button' as const,\n onPress: undefined,\n onPressStart: undefined,\n onPressEnd: undefined,\n onPressUp: undefined,\n onPressChange: undefined,\n onClick: undefined,\n ...(label != null ? { 'aria-label': `${label}, ${comingSoon}` } : {}),\n };\n}\n","/** Joins truthy class names. Kept local so the package has no runtime class-name dependency. */\nexport function cx(...parts: Array<string | false | null | undefined>) {\n return parts.filter(Boolean).join(' ');\n}\n","import * as React from 'react';\nimport { Button as AriaButton, type ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { cx } from '../utils/cx';\n\nexport interface IconButtonProps extends Omit<AriaButtonProps, 'className' | 'children' | 'aria-label'> {\n icon: string;\n /** Required accessible name — also the tooltip text. */\n label: string;\n size?: 'sm' | 'md' | 'lg';\n /** inverse = on the dark shell bar. outlined = standalone beside fields. */\n variant?: 'tertiary' | 'outlined' | 'inverse';\n selected?: boolean;\n /** Suppress the tooltip when the control already sits inside one. */\n hideTooltip?: boolean;\n /**\n * Indicator over the icon. `0` and `undefined` draw nothing — a badge reading \"0\" is noise.\n *\n * Drawn `aria-hidden`, so **`label` must carry the number itself** (\"Notifications, 3 unread\").\n * Pire cannot compose that sentence: it does not know the noun, and word order differs by\n * language. Passing `count` without putting it in `label` hides the count from screen readers.\n */\n count?: number;\n /** Cap before rendering \"N+\". Default 9. */\n countMax?: number;\n /** `dot` when \"something is new\" is the whole message and the number adds nothing. */\n countVariant?: 'number' | 'dot';\n className?: string;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n icon,\n label,\n size = 'md',\n variant = 'tertiary',\n selected,\n hideTooltip,\n count,\n countMax = 9,\n countVariant = 'number',\n className,\n ...rest\n },\n ref,\n) {\n const showsCount = count != null && count > 0;\n const button = (\n <AriaButton\n ref={ref}\n aria-label={label}\n aria-pressed={selected}\n className={cx('pire-iconbtn', className)}\n data-size={size}\n data-variant={variant}\n data-selected={selected ? 'true' : undefined}\n data-has-count={showsCount ? 'true' : undefined}\n {...rest}\n >\n <Icon name={icon} size={size === 'lg' ? 20 : 16} />\n {showsCount ? (\n <span className=\"pire-iconbtn-count\" data-variant={countVariant} aria-hidden=\"true\">\n {countVariant === 'number' ? (count > countMax ? `${countMax}+` : count) : null}\n </span>\n ) : null}\n </AriaButton>\n );\n return hideTooltip ? button : <Tooltip label={label}>{button}</Tooltip>;\n});\n","import * as React from 'react';\nimport { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow, Focusable } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface TooltipProps {\n /** Short clarifying text — never the only source of an instruction. */\n label: React.ReactNode;\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Hover delay in ms. Keyboard focus always shows it immediately. */\n delay?: number;\n /**\n * Anything — a Button, a Badge, a span, plain text.\n *\n * A child that cannot take focus on its own is made focusable for you. That is the point: a\n * tooltip on something unreachable by keyboard is invisible to anyone not using a mouse, and it\n * fails silently — a dead tooltip is indistinguishable from a live one until somebody hovers it.\n *\n * **A `isDisabled` child must be button-shaped.** A disabled control cannot hold focus, so it is\n * wrapped in a focusable `<span role=\"button\" aria-disabled=\"true\">` — the only role React\n * Aria's `Focusable` accepts here that also describes a disabled control the way the control\n * already describes itself (`group` is not in its allow-list; a real `<button>` would nest\n * inside the `IconButton` this most often wraps). `role=\"button\"` is children-presentational, so\n * wrapping a *disabled field* — `<Tooltip label=\"Locked until released\"><Input isDisabled /></Tooltip>`\n * — announces \"button\" and suppresses the textbox semantics inside it. Explain a locked field\n * through its own `description` instead, and keep this for buttons, icon buttons and the\n * button-shaped controls beside them.\n *\n * This is documented rather than warned about: the only runtime signal is the child's rendered\n * role, and sniffing that is both a heuristic and a thing that would fire on every correct call\n * site here — a warning nobody can act on is a warning everybody learns to ignore.\n *\n * Weigh the tab stop, too. On an `IconButton` the tooltip label *is* the button's accessible\n * name, so a disabled one gains a focus stop that tells a screen-reader user nothing it had not\n * already read. A toolbar of eight disabled icon buttons is eight of them.\n */\n children: React.ReactNode;\n}\n\n/**\n * Explains something without adding a step. Shows on hover after `delay`, and immediately on\n * keyboard focus.\n *\n * Never put an instruction here that is not available elsewhere: there is no hover on touch.\n */\nexport function Tooltip({ label, placement = 'top', delay = 500, children }: TooltipProps) {\n /**\n * `Focusable` clones its child rather than wrapping it in a node, so an already-focusable child\n * keeps exactly one tab stop while a non-focusable one simply gains `tabindex=\"0\"`. That is what\n * makes this unconditional — no prop asking the caller whether their child takes focus, and no\n * guessing at render time.\n *\n * The class rides along so the focus ring can live in components.css. React Aria sets only\n * `tabindex` here, no `data-focus-visible`, so the ring would otherwise come from base.css's\n * `[tabindex]:focus-visible` — and base.css is the layer a consumer migrating off Tailwind skips.\n */\n const props = React.isValidElement<{ className?: string; isDisabled?: boolean; disabled?: boolean }>(\n children,\n )\n ? children.props\n : undefined;\n // A disabled control is not focusable, and `Focusable` clones rather than wraps — so it would\n // have nothing to attach to and warns (this is the Pagination-with-one-page defect reported in\n // the backlog, ronda 7, item 1). Wrapping in a focusable span keeps the explanation reachable,\n // which is the entire point of a tooltip on a control that cannot be used. The accepted cost is\n // that a disabled control gains a tab stop it did not have before — that is deliberate, not an\n // oversight: an unreachable explanation helps nobody, so do not \"optimise\" this branch away.\n const isDisabledChild = props?.isDisabled === true || props?.disabled === true;\n const target =\n React.isValidElement<{ className?: string }>(children) && !isDisabledChild ? (\n React.cloneElement(children, { className: cx(children.props.className, 'pire-tooltip-target') })\n ) : isDisabledChild ? (\n // `Focusable` also dev-warns when the element it clones onto has neither a native\n // interactive tag nor an ARIA widget role — a bare `<span>` is neither. Every disabled\n // control this wraps (`IconButton`, `Button`, …) is button-shaped, so `role=\"button\"` plus\n // `aria-disabled` describes the wrapper the same way its disabled child already describes\n // itself, and is what lets the accessible name (from the child's own text or `aria-label`)\n // reach the element that actually holds focus. No static `tabIndex` here on purpose: it\n // would win over the one `Focusable` computes at clone time (react-aria's `mergeProps` lets\n // a prop already on this element beat the one it supplies), silently making the span\n // unfocusable again and reintroducing the defect this file exists to fix. A real `<button>`\n // is not an option either: `children` is very often a button itself (`IconButton`), and a\n // button nested in a button is invalid HTML that browsers repair by breaking the DOM tree.\n // biome-ignore lint/a11y/useFocusableInteractive: tabIndex is added by Focusable's clone, not statically — see above.\n // biome-ignore lint/a11y/useSemanticElements: a real <button> would nest inside the disabled child, which is often one itself — see above.\n <span className=\"pire-tooltip-target\" role=\"button\" aria-disabled=\"true\">\n {children}\n </span>\n ) : (\n <span className=\"pire-tooltip-target\">{children}</span>\n );\n\n return (\n <TooltipTrigger delay={delay} closeDelay={0}>\n <Focusable>{target}</Focusable>\n <AriaTooltip className=\"pire-tooltip\" placement={placement} offset={6}>\n <OverlayArrow>\n <span />\n </OverlayArrow>\n {label}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","import * as React from 'react';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\n\nexport type BadgeStatus = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';\n\nconst STATUS_ICON: Record<BadgeStatus, string> = {\n positive: 'check-circle-2',\n critical: 'alert-triangle',\n negative: 'x-circle',\n informative: 'info',\n neutral: 'circle',\n};\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Semantic value state. Colour is never the only signal — the icon carries the same meaning. */\n status?: BadgeStatus;\n showIcon?: boolean;\n}\n\n/**\n * Value state on an object or row. Text is the label, never a bare colour dot.\n *\n * Takes a ref, which is what lets it be a `Tooltip` target: React Aria's `Focusable` clones its\n * child and hands it one, and a component that cannot accept a ref leaves the tooltip **silently**\n * dead — no error, and a screenshot identical to a working one.\n *\n * Worth stating why this was invisible for so long. Under React 19 `ref` is an ordinary prop, so it\n * rode along in `...rest` and landed on the span by accident; under React 18 it is stripped before\n * the component ever sees it. The library develops on 19 and had consumers on 18, so the failure\n * existed only where nobody was testing.\n */\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { children, status = 'neutral', showIcon = true, className, ...rest },\n ref,\n) {\n return (\n <span ref={ref} className={cx('pire-badge', className)} data-status={status} {...rest}>\n {showIcon ? <Icon name={STATUS_ICON[status]} size={12} /> : null}\n {children}\n </span>\n );\n});\n","import * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Provide to render the remove affordance — filter tokens, multi-select values. */\n onRemove?: () => void;\n isDisabled?: boolean;\n /**\n * Marks the tag as one of a set of **categories** — kinds of a thing, where none is good or bad.\n * Use it for payment kinds, document types, cost-centre groups.\n *\n * This is what `Badge` is not for. `Badge`'s five values are *states*: painting a category\n * \"negative\" says something went wrong when nothing did.\n *\n * The number is a slot in the shared `--viz` ramp, not a colour. Assign in order and do not\n * cycle past 6 — colour-blind separation is measured between adjacent slots, and a seventh\n * category implies a distinction the eye cannot recover. Fold the tail into one \"Other\".\n *\n * The colour rides on a swatch, never on the text: the label stays in normal ink so it keeps\n * its contrast, and the category is never carried by colour alone.\n */\n category?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\n/**\n * A removable token: applied filters, multi-select values.\n *\n * Takes a ref so it can be a `Tooltip` target — a truncated category label is a common reason to\n * want one. See `Badge` for why the missing ref failed silently.\n */\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(function Tag(\n { children, onRemove, isDisabled, category, className, ...rest },\n ref,\n) {\n const msg = usePireMessages();\n return (\n <span\n ref={ref}\n className={cx('pire-tag', className)}\n data-disabled={isDisabled ? 'true' : undefined}\n {...rest}\n >\n {/* Hidden from assistive tech on purpose: the label already says which category this is, so\n announcing the swatch would repeat it without adding anything. */}\n {category ? <span className=\"pire-tag-swatch\" data-category={category} aria-hidden=\"true\" /> : null}\n {children}\n {onRemove ? (\n <AriaButton\n className=\"pire-tag-remove\"\n isDisabled={isDisabled}\n onPress={onRemove}\n aria-label={\n typeof children === 'string' ? msg.tagRemoveNamed.replace('{name}', children) : msg.tagRemove\n }\n >\n <Icon name=\"x\" size={12} />\n </AriaButton>\n ) : null}\n </span>\n );\n});\n","import type * as React from 'react';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\n\nexport interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n icon?: string;\n /** Header-right actions — usually IconButtons. */\n actions?: React.ReactNode;\n /** Right-aligned footer actions, separated by a hairline. */\n footer?: React.ReactNode;\n /** Raises the shadow on hover and sets a pointer cursor. Pair with onClick and a heading link. */\n interactive?: boolean;\n}\n\nexport function Card({\n title,\n subtitle,\n icon,\n actions,\n footer,\n interactive,\n children,\n className,\n ...rest\n}: CardProps) {\n return (\n <section\n className={cx('pire-card', className)}\n data-interactive={interactive ? 'true' : undefined}\n {...rest}\n >\n {title || actions ? (\n <header className=\"pire-card-head\">\n {icon ? <Icon name={icon} size={20} style={{ color: 'var(--text-secondary)' }} /> : null}\n <div style={{ flex: 1, minWidth: 0 }}>\n <h3 className=\"pire-card-title\">{title}</h3>\n {subtitle ? (\n <p className=\"pire-card-sub\" style={{ margin: 0 }}>\n {subtitle}\n </p>\n ) : null}\n </div>\n {actions ? <div style={{ display: 'flex', gap: 'var(--sp-1)' }}>{actions}</div> : null}\n </header>\n ) : null}\n {children ? <div className=\"pire-card-body\">{children}</div> : null}\n {footer ? <footer className=\"pire-card-foot\">{footer}</footer> : null}\n </section>\n );\n}\n","import * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Full name — initials are derived from the first two words. */\n name: string;\n size?: 'sm' | 'md' | 'lg';\n /** Optional photo. Falls back to initials if it fails to load. */\n src?: string;\n}\n\nconst initials = (name: string) =>\n name\n .trim()\n .split(/\\s+/)\n .slice(0, 2)\n .map((p) => p[0])\n .join('')\n .toUpperCase();\n\n/** Identity chip for the shell bar, approval lists and history rows. Never the only way a person\n * is named — always sits beside or is labelled with the full name. */\nexport function Avatar({ name, size = 'md', src, className, ...rest }: AvatarProps) {\n const [failed, setFailed] = React.useState(false);\n return (\n <span className={cx('pire-avatar', className)} data-size={size} role=\"img\" aria-label={name} {...rest}>\n {src && !failed ? (\n <img\n src={src}\n alt=\"\"\n onError={() => setFailed(true)}\n style={{ width: '100%', height: '100%', borderRadius: 'inherit', objectFit: 'cover' }}\n />\n ) : (\n initials(name)\n )}\n </span>\n );\n}\n","import * as React from 'react';\nimport { ToggleButtonGroup, ToggleButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface SegmentOption {\n id: string;\n label: string;\n icon?: string;\n isDisabled?: boolean;\n}\n\nexport interface SegmentedControlProps {\n /** Names the choice for assistive tech, e.g. \"Row density\". */\n 'aria-label': string;\n options: SegmentOption[];\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Show icons only; labels move into the accessible name and the tooltip. */\n iconOnly?: boolean;\n size?: 'sm' | 'md';\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Two to four mutually exclusive view options that change how data is displayed, not what it is:\n * row density, list vs chart, period. For filtering, use Select or Tabs. */\nexport function SegmentedControl({\n options,\n value,\n defaultValue,\n onChange,\n iconOnly,\n size = 'sm',\n className,\n style,\n ...rest\n}: SegmentedControlProps) {\n const selected = React.useMemo(\n () => new Set(value ? [value] : defaultValue ? [defaultValue] : []),\n [value, defaultValue],\n );\n return (\n <ToggleButtonGroup\n className={cx('pire-segmented', className)}\n data-size={size}\n style={style}\n aria-label={rest['aria-label']}\n selectionMode=\"single\"\n disallowEmptySelection\n selectedKeys={selected}\n onSelectionChange={(keys) => {\n const first = [...keys][0];\n if (first != null) onChange?.(String(first));\n }}\n >\n {options.map((option) => (\n <ToggleButton\n key={option.id}\n id={option.id}\n className=\"pire-segmented-item\"\n isDisabled={option.isDisabled}\n aria-label={iconOnly ? option.label : undefined}\n >\n {option.icon ? <Icon name={option.icon} size={16} /> : null}\n {iconOnly ? null : option.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n","import * as React from 'react';\nimport { cx } from '../utils/cx';\n\n/** Colour hierarchy, named after the `--text-*` token each value resolves to. */\nexport type TextColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'inverse';\n\n/** Typographic scale, named after the `--type-*` tokens. */\nexport type TextSize = 'body' | 'body-lg' | 'caption' | 'micro';\n\n// `color` shadows a DOM attribute, so it must be Omitted before being redeclared.\nexport interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {\n /** Typographic scale. `body` covers most copy. */\n size?: TextSize;\n /** `secondary` for supporting copy, `tertiary` for metadata. */\n color?: TextColor;\n /** Raises weight without changing size. Same effect as wrapping in `<Strong>`. */\n weight?: 'regular' | 'strong';\n /** Tabular mono, right-aligned. Use for every amount, quantity and ID. */\n numeric?: boolean;\n /** Uppercase label for a block. Replaces the `.pire-eyebrow` helper. */\n eyebrow?: boolean;\n /** `true` clamps to one line; a number clamps to that many. */\n truncate?: boolean | number;\n /** `span` when inline, `div` when wrapping, `dd`/`li` inside lists. */\n elementType?: 'p' | 'span' | 'div' | 'dd' | 'li';\n className?: string;\n}\n\n/**\n * Body copy, captions, metadata and eyebrows — everything that is text but not a heading.\n *\n * Takes a ref so it can be a `Tooltip` target, and so a clamped line can be measured to decide\n * whether a tooltip is warranted at all. See `Badge` for why the missing ref failed silently.\n */\nexport const Text = React.forwardRef<HTMLElement, TextProps>(function Text(\n {\n size = 'body',\n color = 'primary',\n weight = 'regular',\n numeric,\n eyebrow,\n truncate,\n elementType: Wrapper = 'p',\n className,\n style,\n ...rest\n },\n ref,\n) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle =\n lineClamp == null\n ? style\n : ({ ['--pire-text-clamp' as string]: lineClamp, ...style } as React.CSSProperties);\n\n return (\n <Wrapper\n ref={ref as React.Ref<never>}\n className={cx('pire-text', className)}\n data-size={size}\n data-color={color}\n data-weight={weight === 'strong' ? 'strong' : undefined}\n data-numeric={numeric ? 'true' : undefined}\n data-eyebrow={eyebrow ? 'true' : undefined}\n data-truncate={lineClamp != null ? 'true' : undefined}\n style={clampStyle}\n {...rest}\n />\n );\n});\n\nexport interface StrongProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {\n className?: string;\n}\n\n/** Inline emphasis. Sugar over `<Text weight=\"strong\" elementType=\"span\">`. */\nexport const Strong = React.forwardRef<HTMLElement, StrongProps>(function Strong(\n { className, ...rest },\n ref,\n) {\n return <Text ref={ref} elementType=\"span\" weight=\"strong\" className={className} {...rest} />;\n});\n","import type * as React from 'react';\nimport { Heading as AriaHeading } from 'react-aria-components';\nimport { cx } from '../utils/cx';\nimport type { TextColor } from './Text';\n\n// `color` shadows a DOM attribute, so it must be Omitted before being redeclared.\nexport interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'color'> {\n /** Semantic level. Picks the h1–h4 element and defines the document outline. */\n level?: 1 | 2 | 3 | 4;\n /** Visual scale, independent of `level`. Set it when a correct outline needs a different size. */\n size?: 'display' | 'h1' | 'h2' | 'h3' | 'h4';\n /** `secondary` for a supporting title. Same vocabulary as `Text`. */\n color?: TextColor;\n /** `true` clamps to one line; a number clamps to that many. */\n truncate?: boolean | number;\n className?: string;\n}\n\n/** Section and page titles. Built on React Aria's `Heading` so a `Dialog` picks it up as its name. */\nexport function Heading({\n level = 2,\n size,\n color = 'primary',\n truncate,\n className,\n style,\n ...rest\n}: HeadingProps) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle =\n lineClamp == null\n ? style\n : ({ ['--pire-text-clamp' as string]: lineClamp, ...style } as React.CSSProperties);\n\n return (\n <AriaHeading\n level={level}\n className={cx('pire-heading', className)}\n data-size={size ?? `h${level}`}\n data-color={color}\n data-truncate={lineClamp != null ? 'true' : undefined}\n style={clampStyle}\n {...rest}\n />\n );\n}\n","import type * as React from 'react';\nimport { Link as AriaLink, type LinkProps as AriaLinkProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\nimport type { TextSize } from './Text';\n\nexport interface LinkProps extends Omit<AriaLinkProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** Inherits the surrounding size by default. Set it when the link stands alone. */\n size?: TextSize;\n /** Adds the launch glyph and `rel=\"noopener noreferrer\"`. Does not set `target`. */\n isExternal?: boolean;\n className?: string;\n}\n\n/** A real anchor with the system's link styling. Honours a `RouterProvider` when the app supplies one. */\nexport function Link({ children, size, isExternal, className, rel, ...rest }: LinkProps) {\n return (\n <AriaLink\n className={cx('pire-link', className)}\n data-size={size}\n data-external={isExternal ? 'true' : undefined}\n rel={isExternal ? (rel ?? 'noopener noreferrer') : rel}\n {...rest}\n >\n {children}\n {isExternal ? <Icon name=\"external-link\" size={12} className=\"pire-link-external\" /> : null}\n </AriaLink>\n );\n}\n","import { Separator as AriaSeparator, type SeparatorProps as AriaSeparatorProps } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface SeparatorProps extends Omit<AriaSeparatorProps, 'className'> {\n /** `vertical` to divide actions inside a toolbar. */\n orientation?: 'horizontal' | 'vertical';\n /** `subtle` divides inside a card without chopping it up. */\n emphasis?: 'default' | 'subtle';\n /** `none` when the container already provides the rhythm. */\n spacing?: 'none' | 'sm' | 'md';\n className?: string;\n}\n\n/** A page-level divider. For rules inside a menu use `MenuSeparator`, which follows the menu's rhythm. */\nexport function Separator({\n orientation = 'horizontal',\n emphasis = 'default',\n spacing = 'md',\n className,\n ...rest\n}: SeparatorProps) {\n return (\n <AriaSeparator\n orientation={orientation}\n className={cx('pire-separator', className)}\n data-orientation={orientation}\n data-emphasis={emphasis}\n data-spacing={spacing}\n {...rest}\n />\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface KbdProps extends React.HTMLAttributes<HTMLElement> {\n /** One key per element — compose several for a chord: `<Kbd>⌘</Kbd><Kbd>K</Kbd>`. */\n children: React.ReactNode;\n /** `sm` for inline use inside running text, where a full-size cap sits taller than the line. */\n size?: 'sm' | 'md';\n}\n\n/**\n * A single key, drawn as a key cap.\n *\n * Renders a real `<kbd>`, so assistive tech announces it as keyboard input rather than as loose\n * text. It is painted only — nothing here binds a shortcut; that stays with the app.\n *\n * One key per element. A chord is several of these side by side, which keeps each cap the size of\n * its own glyph instead of stretching one cap across \"Ctrl+Shift+K\".\n */\nexport function Kbd({ children, size = 'md', className, ...rest }: KbdProps) {\n return (\n <kbd className={cx('pire-kbd', className)} data-size={size} {...rest}>\n {children}\n </kbd>\n );\n}\n","import type * as React from 'react';\nimport { ButtonContext } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface FieldHelpProps {\n /** The explanation. Shown on hover and immediately on keyboard focus. Never put an instruction\n * here that is unavailable elsewhere — there is no hover on touch. */\n children: React.ReactNode;\n /** Overrides the dictionary's `fieldHelp`. This names the *icon* (\"More information\"), not the\n * explanation — say what is being explained when a form has several. */\n label?: string;\n /** Which side the explanation opens on. Change it when the default would put the bubble off\n * screen or over the thing being explained — a field at the top of a dialog, or the last row\n * of a table where `top` covers the row above. */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n}\n\n/**\n * The help icon beside a field label: an explanation reachable by pointer and by keyboard, with\n * the markup a consumer would otherwise hand-write. Fields take a `help` prop that renders this\n * for you; reach for the component directly beside a `FormField` or a bare control.\n */\nexport function FieldHelp({ children, label, placement = 'top' }: FieldHelpProps) {\n const msg = usePireMessages();\n return (\n // React Aria hands every descendant Button the nearest slotted ButtonContext. Inside a\n // NumberField that context has only `increment` and `decrement`, and an unslotted Button\n // throws `A slot prop is required`; inside DatePicker, DateRangePicker and ComboBox the same\n // Button is silently adopted as the field's *trigger*, which is worse than a crash because it\n // renders. `value={null}` is React Aria's own idiom for lifting a subtree back out of a\n // slotted context — the same one `MultiComboBox` and `FieldLabel` use — and is what makes\n // this component safe anywhere.\n <ButtonContext.Provider value={null}>\n <Tooltip label={children} placement={placement}>\n {/* hideTooltip because IconButton builds its own tooltip from `label`, and `label` here is\n the icon's name, not the explanation. The explanation is the Tooltip above. */}\n <IconButton icon=\"help-circle\" label={label ?? msg.fieldHelp} size=\"sm\" hideTooltip />\n </Tooltip>\n </ButtonContext.Provider>\n );\n}\n","import type * as React from 'react';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\nimport { FieldHelp } from './FieldHelp';\n\nexport interface FormFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n label: React.ReactNode;\n /** id of the control this label points at. Required when wrapping a bare control. */\n htmlFor?: string;\n isRequired?: boolean;\n /** Static help text. Hidden while an error is shown. */\n hint?: React.ReactNode;\n /** Error message; rendered in an alert row with an icon. */\n error?: React.ReactNode;\n /** horizontal = right-aligned 160px label column, the ERP detail-form default. */\n layout?: 'stacked' | 'horizontal';\n /**\n * Contextual explanation, shown as a help icon beside the label.\n *\n * Unlike the fields that render their own control, `FormField` cannot add this to the control's\n * `aria-describedby` — it does not own that control. The explanation reaches a screen reader\n * through the trigger's own tooltip instead. When the text must be announced with the field,\n * pass it as `hint`, or use the control's own `help` prop.\n */\n help?: React.ReactNode;\n children?: React.ReactNode;\n}\n\n/** Label + control + hint/error wrapper for controls that do not manage their own label\n * (most Pire controls do — use their `label` prop first). */\nexport function FormField({\n label,\n htmlFor,\n isRequired,\n hint,\n error,\n layout = 'stacked',\n help,\n children,\n className,\n ...rest\n}: FormFieldProps) {\n const msg = usePireMessages();\n const labelEl = (\n <label className=\"pire-field-label\" htmlFor={htmlFor}>\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </label>\n );\n return (\n <div className={cx('pire-field', className)} data-layout={layout} {...rest}>\n {help ? (\n <div className=\"pire-field-labelrow\">\n {labelEl}\n {/* Named from a string label exactly as `FieldLabel` does. This is the horizontal\n detail-form layout, where several helped fields sit on one screen — unnamed, a\n screen reader would list them all as \"More information\". */}\n <FieldHelp\n label={\n typeof label === 'string'\n ? msg.fieldHelpNamed.replace('{label}', label.toLowerCase())\n : undefined\n }\n >\n {help}\n </FieldHelp>\n </div>\n ) : (\n labelEl\n )}\n {children}\n {error ? (\n <span className=\"pire-field-error\" role=\"alert\">\n <Icon name=\"alert-circle\" size={12} />\n {error}\n </span>\n ) : hint ? (\n <span className=\"pire-field-hint\">{hint}</span>\n ) : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport {\n TextField,\n Input as AriaInput,\n Group,\n FieldError,\n Button as AriaButton,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { focusFieldOf } from '../utils/focusField';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\nexport interface InputProps {\n label?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n /** Receives the raw string value. */\n onChange?: (value: string) => void;\n placeholder?: string;\n /**\n * `date` is accepted for compatibility but reaches for the browser's native picker, which\n * ignores the token palette and behaves differently per browser. Use `DatePicker`, or\n * `DateRangePicker` for two ends.\n */\n type?: 'text' | 'search' | 'email' | 'number' | 'date' | 'password' | 'tel' | 'url';\n /** Leading icon slug — \"search\", \"calendar\", \"hash\". */\n icon?: string;\n /** Trailing static text: unit, currency, \"of 40\". */\n suffix?: React.ReactNode;\n /**\n * Adds a clear affordance once the field has a value.\n *\n * Use it on every search field. `type=\"search\"` gets one from the browser for free, but only in\n * Chrome and Safari, and it cannot be styled or sized — Pire hides that one so a search box does\n * not look different per browser. This is the replacement, and it is a real button: focusable,\n * labelled, and the same shape everywhere.\n *\n * Works controlled or uncontrolled.\n */\n isClearable?: boolean;\n /**\n * The clear button's visible text. Defaults to the dictionary's `inputClear`.\n *\n * Deliberately a word rather than an icon: an \"x\" beside a dialog's own close \"x\" reads as a\n * second way to dismiss the dialog. Keep it short — it sits inside the field.\n */\n clearLabel?: string;\n /** Help text below the field. Replaced by errorMessage when invalid. */\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n /** Right-aligned tabular mono — use for every amount, quantity and ID. */\n numeric?: boolean;\n fullWidth?: boolean;\n name?: string;\n autoFocus?: boolean;\n className?: string;\n style?: React.CSSProperties;\n inputRef?: React.Ref<HTMLInputElement>;\n}\n\n/** Single-line text entry. Labels, descriptions and errors are wired to the input by React Aria,\n * so no manual aria-describedby is ever needed. */\nexport function Input({\n label,\n icon,\n suffix,\n description,\n help,\n errorMessage,\n size = 'md',\n numeric,\n isClearable,\n clearLabel,\n fullWidth = true,\n className,\n style,\n inputRef,\n onChange,\n ...rest\n}: InputProps) {\n const msg = usePireMessages();\n const isControlled = rest.value !== undefined;\n const [ownValue, setOwnValue] = React.useState(rest.defaultValue ?? '');\n const currentValue = isControlled ? rest.value : ownValue;\n const handleChange = (next: string) => {\n setOwnValue(next);\n onChange?.(next);\n };\n\n /**\n * A clearable, uncontrolled field is driven by Pire rather than by React Aria. There is no\n * imperative \"clear\" on TextField, and writing to the DOM node directly would leave React Aria's\n * own state holding the old value. Scoped to `isClearable` so every other Input keeps exactly\n * the behaviour it has today.\n */\n const takesOverValue = isClearable && !isControlled;\n const valueProps = takesOverValue ? { value: ownValue, defaultValue: undefined } : {};\n const showsClear = isClearable && currentValue !== '' && !rest.isDisabled && !rest.isReadOnly;\n warnHelpWithoutLabel('Input', label, help);\n\n return (\n <TextField\n className={cx('pire-field', className)}\n style={style}\n onChange={handleChange}\n validationBehavior=\"aria\"\n {...rest}\n {...valueProps}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n {icon ? <Icon name={icon} size={16} className=\"pire-leading-icon\" /> : null}\n <AriaInput ref={inputRef} className=\"pire-input\" data-numeric={numeric ? 'true' : undefined} />\n {/* A labelled text button, not an \"x\": inside a dialog an icon-only x sits next to the\n dialog's own close x and reads as a second dismiss. The word says what it clears. */}\n {showsClear ? (\n <AriaButton\n className=\"pire-input-clear\"\n onPress={(event) => {\n handleChange('');\n focusFieldOf(event.target);\n }}\n >\n {clearLabel ?? msg.inputClear}\n </AriaButton>\n ) : null}\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","/**\n * Put focus back into the field a clear button belongs to.\n *\n * Every clear button in this library unmounts the moment it works — there is nothing left to clear\n * — so without this the browser drops focus on `<body>` and a keyboard or screen-reader user is\n * dumped at the top of the document, several tab stops from the field they were editing.\n *\n * The selector list is ordered: a date field's first segment, otherwise the input. Both live\n * inside the same `.pire-control` shell as the button.\n */\nexport function focusFieldOf(button: EventTarget | null): void {\n const control = (button as HTMLElement | null)?.closest?.('.pire-control');\n control?.querySelector<HTMLElement>('.pire-datesegment, .pire-input, input, textarea')?.focus();\n}\n","import type * as React from 'react';\nimport { ButtonContext, Label } from 'react-aria-components';\nimport { FieldHelp } from './FieldHelp';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\nexport interface FieldLabelProps {\n label: React.ReactNode;\n isRequired?: boolean;\n /** Contextual explanation, rendered as a help icon beside the label. */\n help?: React.ReactNode;\n}\n\n/**\n * Internal, dev-only. `help` draws its icon beside the label, so a field named only by\n * `aria-label` has nowhere to put it: the explanation still reaches a screen reader through the\n * field's `description`, but the visual affordance is silently missing — the same shape of defect\n * as an icon name that resolves to a blank square. Every field calls this before deciding whether\n * to render a label row.\n *\n * A warning rather than a bare icon: an icon with no label to sit beside is an unanchored control,\n * and supplying the label is a real fix only the consumer can make.\n */\nexport function warnHelpWithoutLabel(component: string, label: React.ReactNode, help: React.ReactNode) {\n if (!IS_DEV || !help || label) return;\n warnOnce(\n `help-without-label:${component}`,\n `${component}: \\`help\\` needs a visible \\`label\\`. Its icon is drawn beside one, so a field named only by \\`aria-label\\` renders no icon at all — the text still reaches a screen reader through the field's description, but nothing on screen offers it. Pass \\`label\\`, or move the sentence to \\`description\\`.`,\n );\n}\n\n/**\n * Internal. The label row every Pire field draws, in one place.\n *\n * It exists because this markup was copied nine times, and the ButtonContext reset below had to\n * land in all nine: React Aria hands every descendant Button the field's own slotted context, so\n * a button a consumer puts in a label either throws (NumberField) or is silently adopted as the\n * field's trigger (DatePicker, DateRangePicker, ComboBox). Resetting the context here makes any\n * button in any field's label behave like a button — not just the help icon.\n *\n * That does not make every shape a good one. `help` renders `FieldHelp` as a **sibling** of\n * `<Label>`, which is the supported shape and the only one this component produces on its own.\n * A consumer-supplied button placed *inside* `label` — now possible instead of throwing or being\n * silently adopted — still sits inside the `<Label>` React Aria points the stepper and\n * calendar-trigger `aria-labelledby` at, so its text is absorbed into every sibling control's\n * accessible name (a `NumberField` stepper reads \"Increase Cantidad Ayuda\"). Lossy, not broken —\n * prefer `help` unless the label truly needs its own button.\n */\nexport function FieldLabel({ label, isRequired, help }: FieldLabelProps) {\n const msg = usePireMessages();\n const text = (\n <Label className=\"pire-field-label\">\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </Label>\n );\n return (\n // React Aria's own idiom for lifting a subtree back out of a slotted context — the same one\n // `MultiComboBox` uses on its chips, and the one Popover uses on the way into an overlay.\n // Without it every Button below a field inherits that field's trigger props.\n <ButtonContext.Provider value={null}>\n {/* The wrapper appears only on the help path. Rendering it unconditionally would make it the\n grid item under `.pire-field[data-layout=\"horizontal\"]` and silently change label\n alignment in every existing form. The trigger is a sibling of the Label, never a child:\n a focusable control inside a <label> re-targets its own clicks at the field. */}\n {help ? (\n <div className=\"pire-field-labelrow\">\n {text}\n {/* Named from the label wherever the label is a string, the way `ValueHelpField` names\n its search trigger. `help` is the path every real use takes, and unnamed it gives a\n form with six helped fields six buttons all called \"More information\". A ReactNode\n label cannot be flattened into a sentence, so those keep the plain name. */}\n <FieldHelp\n label={\n typeof label === 'string'\n ? msg.fieldHelpNamed.replace('{label}', label.toLowerCase())\n : undefined\n }\n >\n {help}\n </FieldHelp>\n </div>\n ) : (\n text\n )}\n </ButtonContext.Provider>\n );\n}\n","/** The package has no `@types/node`, and should not need one for a browser library — but the\n * literal token `process.env.NODE_ENV` has to survive into the output for a bundler to\n * substitute it. Declared inside the module so it shadows, and cannot clash with, the `process`\n * that `@types/node` contributes when it is present in a consumer's graph. */\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/** Dev-only diagnostics. Every bundler replaces `process.env.NODE_ENV` statically, so the\n * warnings and their registry are dead code a minifier drops from production builds. Do *not*\n * wrap this in `typeof process !== 'undefined'`: `process` is genuinely undefined in the\n * browser, the `typeof` test is not something a bundler substitutes, and the guard would\n * evaluate false in development — silencing the warnings this exists to emit. */\nexport const IS_DEV = process.env.NODE_ENV !== 'production';\n\nconst warned = new Set<string>();\n\n/** One warning per distinct cause. Fields re-render on every keystroke, so warning per render\n * would bury the message in its own repetitions. */\nexport function warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[pire] ${message}`);\n}\n","import type * as React from 'react';\nimport { Text } from 'react-aria-components';\n\nexport interface FieldDescriptionProps {\n description?: React.ReactNode;\n /** Contextual explanation. Announced with the field, and shown visually by the help icon. */\n help?: React.ReactNode;\n}\n\n/**\n * Internal. The one `Text slot=\"description\"` a field renders.\n *\n * There is exactly one description slot per field — two `Text slot=\"description\"` elements would\n * collide on a single generated id — so `description` and `help` merge here rather than each\n * rendering their own node. `help` is announced with the field as well as shown on the icon,\n * because a tooltip-only explanation is reachable only by visiting a tab stop, and a dense form\n * has one of those per helped field.\n */\nexport function FieldDescription({ description, help }: FieldDescriptionProps) {\n if (!description && !help) return null;\n return (\n // The class is picked, never combined: `.pire-sr-only` is `!important` and pairing it with\n // another pire-* class is what grew the document sideways in 0.23.0. Choosing `pire-sr-only`\n // when there is no visible description also keeps the node out of `.pire-field`'s flex gap —\n // a `pire-field-hint` holding only hidden text still opens a visible gap under every field.\n <Text slot=\"description\" className={description ? 'pire-field-hint' : 'pire-sr-only'}>\n {description}\n {help ? <span className=\"pire-sr-only\">{help}</span> : null}\n </Text>\n );\n}\n","import * as React from 'react';\nimport { TextField, TextArea as AriaTextArea, Group, FieldError } from 'react-aria-components';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\n/* Measuring before paint is the whole point of autoGrow — useEffect would show one frame at the\n wrong height — but useLayoutEffect warns when it runs during server rendering, where there is\n nothing to measure anyway. */\nconst useIsomorphicLayoutEffect = typeof document === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nexport interface TextAreaProps {\n label?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n /** Receives the raw string value. */\n onChange?: (value: string) => void;\n placeholder?: string;\n /** Help text below the field. Replaced by errorMessage when invalid. */\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n /** Visible lines before scrolling. Three is the ERP default: an address or a short note. */\n rows?: number;\n /** Grow with the content instead of scrolling. Off by default — see the component note. */\n autoGrow?: boolean;\n /** Ceiling for `autoGrow`, in lines. Beyond it the field scrolls, so a pasted essay\n * cannot push the form's buttons off screen. */\n maxRows?: number;\n fullWidth?: boolean;\n name?: string;\n autoFocus?: boolean;\n className?: string;\n style?: React.CSSProperties;\n textAreaRef?: React.Ref<HTMLTextAreaElement>;\n}\n\n/** Multi-line text entry — notes, addresses, rejection reasons. The prop API is Input's, so a\n * field can be swapped between the two without relearning; labels, descriptions and errors are\n * wired up by React Aria, so no manual aria-describedby is ever needed.\n *\n * `autoGrow` is opt-in, not always-on, for two reasons. It costs a synchronous measure-and-write\n * on every keystroke, and in a dense form it makes every field below the one being typed in jump\n * — the wrong trade in a screen the user is tabbing through. Turn it on where the content length\n * is genuinely unknown (a long free-text comment) and leave it off everywhere else. When on, the\n * height is only written when it actually changed, so a keystroke that does not wrap costs no\n * layout; and the resize grip is removed, since a manual height would be overwritten on the next\n * keystroke anyway. */\nexport function TextArea({\n label,\n description,\n help,\n errorMessage,\n size = 'md',\n rows = 3,\n autoGrow,\n maxRows,\n fullWidth = true,\n className,\n style,\n textAreaRef,\n onChange,\n ...rest\n}: TextAreaProps) {\n const innerRef = React.useRef<HTMLTextAreaElement>(null);\n const ref = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof textAreaRef === 'function') textAreaRef(node);\n else if (textAreaRef) (textAreaRef as React.RefObject<HTMLTextAreaElement | null>).current = node;\n },\n [textAreaRef],\n );\n\n // Read from the DOM rather than from `rest.value`: the same measure has to run for the\n // uncontrolled case, where no value ever reaches this component.\n const grow = React.useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoGrow) return;\n const styles = getComputedStyle(el);\n const lineHeight = Number.parseFloat(styles.lineHeight) || Number.parseFloat(styles.fontSize) * 1.5;\n const chrome = el.offsetHeight - el.clientHeight; // borders, which scrollHeight excludes\n // Collapse first: scrollHeight can never report less than the current height, so without\n // this the field would only ever grow, never shrink back when text is deleted.\n el.style.height = 'auto';\n const wanted = maxRows ? Math.min(el.scrollHeight, Math.ceil(lineHeight * maxRows)) : el.scrollHeight;\n const next = `${wanted + chrome}px`;\n // Only write when it changed — a keystroke that does not wrap must not dirty layout.\n if (el.style.height !== next) el.style.height = next;\n }, [autoGrow, maxRows]);\n\n // Layout effect, not an onChange hook: it has to run for controlled values pushed in from the\n // outside (a reset, a loaded record) as well as for typing, and before paint so the field never\n // renders one frame at the wrong height.\n useIsomorphicLayoutEffect(() => {\n if (!autoGrow) {\n if (innerRef.current) innerRef.current.style.height = '';\n return;\n }\n grow();\n }, [autoGrow, grow, rest.value]);\n\n warnHelpWithoutLabel('TextArea', label, help);\n\n return (\n <TextField\n className={cx('pire-field', className)}\n style={style}\n onChange={onChange}\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-multiline=\"true\"\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <AriaTextArea\n ref={ref}\n rows={rows}\n onInput={autoGrow ? grow : undefined}\n className={cx('pire-input', 'pire-textarea')}\n data-auto-grow={autoGrow ? 'true' : undefined}\n />\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import * as React from 'react';\nimport {\n Select as AriaSelect,\n Button as AriaButton,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem,\n FieldError,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\nexport type SelectOption = string | { value: string; label: string; isDisabled?: boolean };\n\n/** The id the clear row carries inside the listbox. It never leaves the component:\n * `onSelectionChange` maps it to `null` before `onChange` sees it. That is the whole difference\n * between this and the thirty sentinels the consumer wrote — the same trick, but it cannot reach\n * a form body or a server. */\nconst CLEAR_KEY = '__pire-select-clear__';\n\nexport interface SelectProps {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n /**\n * Emits `null` when the field returns to «nothing chosen» — reachable only with `isClearable`,\n * but typed unconditionally, the way React Aria types the `onSelectionChange` below it.\n */\n onChange?: (value: string | null) => void;\n options?: SelectOption[];\n /**\n * Shown when nothing is selected. Defaults to the dictionary's `selectPlaceholder`; with\n * `isClearable` this is also the visible label of the row that clears the field, so a custom\n * value should read naturally as both.\n */\n placeholder?: string;\n /**\n * Adds a row at the top of the list that returns the field to «nothing chosen», labelled with\n * `placeholder`.\n *\n * For an optional field this is the difference between a changeable choice and a permanent one:\n * without it the only way back from a wrong pick is to select something else, and there is no\n * \"something else\" that means *none*. A row rather than a clear button on the control — in a\n * `Select`, unlike a `ComboBox`, the user already expects everything choosable to be in the list.\n *\n * One asymmetry to know about: React Aria suppresses re-picking the key that is already\n * selected, but the clear row is a real row, so choosing it on an already-empty field does emit\n * `onChange(null)` a second time. Deliberate — the row is *visible* on an empty field, and a\n * control that looks pressable and reports nothing is the harder thing to debug. A handler that\n * writes on every call rather than on every change should compare against its own state.\n */\n isClearable?: boolean;\n /**\n * Replaces the dictionary's `selectEmpty` inside the popover when `options` is empty. Worth\n * setting whenever you can say *why* the list is empty — \"Pick a company first\" beats the\n * generic default, and an empty reference table is the usual cause.\n */\n emptyLabel?: React.ReactNode;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst norm = (o: SelectOption) => (typeof o === 'string' ? { value: o, label: o, isDisabled: false } : o);\n\n/** Single-choice picker. Uses a listbox popover rather than a native <select> so the option\n * rows can carry Pire typography and keyboard behaviour is identical across browsers. */\nexport function Select({\n label,\n value,\n defaultValue,\n onChange,\n options = [],\n placeholder,\n isClearable,\n description,\n help,\n errorMessage,\n emptyLabel,\n size = 'md',\n fullWidth = true,\n className,\n style,\n ...rest\n}: SelectProps) {\n const msg = usePireMessages();\n const items = options.map(norm);\n // Undefined, not just missing — a consumer may pass `placeholder=\"\"` deliberately, and `??`\n // would overwrite that. The dictionary default only applies when the prop is absent.\n const effectivePlaceholder = placeholder ?? msg.selectPlaceholder;\n\n /**\n * A clearable, uncontrolled Select is driven by Pire, the same trade `ComboBox` makes: React\n * Aria's own state would hold `CLEAR_KEY` and `SelectValue` would render it as the value.\n * Scoped to `isClearable`, so every other Select keeps exactly the behaviour it has today.\n */\n const isSelectionControlled = value !== undefined;\n const [ownSelection, setOwnSelection] = React.useState<string | null>(defaultValue ?? null);\n const takesOverSelection = isClearable === true && !isSelectionControlled;\n\n /**\n * A consumer's own option already carrying the reserved id. Prepending the clear row anyway\n * would give two `ListBoxItem`s one id: React logs a duplicate-key error, and choosing the\n * *real* option reports `null` — silent wrong data on its way to a server, which is the failure\n * this round exists to end. The consumer's option wins; the clear row is what gets dropped.\n */\n const collides = items.some((item) => item.value === CLEAR_KEY);\n\n /**\n * Not shown on an empty list: the clear row would fill the collection, suppress\n * `renderEmptyState`, and turn \"no options available\" back into the blank popover that reached\n * users twice. There is also nothing to clear from a list with no options.\n */\n const showsClear = isClearable === true && !rest.isDisabled && items.length > 0 && !collides;\n\n // Gated on the request rather than on `showsClear`, which the collision itself now switches off:\n // folding the check into `showsClear` alone would also silence the warning explaining why.\n if (IS_DEV && isClearable === true && !rest.isDisabled && collides) {\n warnOnce(\n CLEAR_KEY,\n `Select: an option's value is \"${CLEAR_KEY}\", which isClearable reserves for its \"nothing chosen\" row. The clear row has been dropped so the option keeps working — rename the option to get it back.`,\n );\n }\n\n const rows = showsClear\n ? [\n // The row's own label falls back to the dictionary even when `placeholder` is explicitly\n // `''`: an empty trigger is a deliberate, supported shape, but a listbox option with no\n // accessible name is not — it would be unreachable by name and silent to a screen reader.\n { value: CLEAR_KEY, label: effectivePlaceholder || msg.selectPlaceholder, isDisabled: false },\n ...items,\n ]\n : items;\n\n warnHelpWithoutLabel('Select', label, help);\n\n return (\n <AriaSelect\n className={cx('pire-field', className)}\n style={style}\n selectedKey={takesOverSelection ? ownSelection : value}\n defaultSelectedKey={takesOverSelection ? undefined : defaultValue}\n onSelectionChange={(k) => {\n // `String(k)` alone emitted the literal string \"null\" the moment a null could arrive.\n const raw = k == null ? null : String(k);\n // Gated on `showsClear`, not on the id alone: when a consumer's own option collides with\n // the reserved key the clear row stands down, and translating that id to `null` anyway\n // would still report nothing for an option the user really chose.\n const next = showsClear && raw === CLEAR_KEY ? null : raw;\n if (takesOverSelection) setOwnSelection(next);\n onChange?.(next);\n }}\n // Without this React Aria refuses to open on an empty collection — `useSelectState.open()`\n // is guarded by `collection.size !== 0 || props.allowsEmptyCollection`. The trigger then\n // swallows the click while staying enabled and reporting aria-expanded=\"false\", so the\n // field reads as broken rather than as empty. That reached users twice as \"the dropdown\n // doesn't work\", both times an unseeded reference table behind a required field.\n allowsEmptyCollection\n placeholder={effectivePlaceholder}\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <AriaButton\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n >\n <SelectValue className=\"pire-select-value\" />\n <Icon name=\"chevron-down\" size={16} className=\"pire-leading-icon\" />\n </AriaButton>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox\n className=\"pire-listbox\"\n items={rows}\n // Same treatment ComboBox gives a server that answered with nothing, so the two\n // components read alike. Announced, because an empty listbox is otherwise silent.\n renderEmptyState={() => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {emptyLabel ?? msg.selectEmpty}\n </div>\n )}\n >\n {(item) => (\n <ListBoxItem\n className=\"pire-option\"\n id={item.value}\n textValue={item.label}\n isDisabled={item.isDisabled}\n data-clear={item.value === CLEAR_KEY ? 'true' : undefined}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n","import type * as React from 'react';\nimport { Checkbox as AriaCheckbox, type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'children'> {\n label?: React.ReactNode;\n hint?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function Checkbox({ label, hint, children, className, ...rest }: CheckboxProps) {\n return (\n <AriaCheckbox className={cx('pire-choice', className)} {...rest}>\n {({ isSelected, isIndeterminate }) => (\n <>\n <span className=\"pire-choice-box\" aria-hidden=\"true\">\n {isIndeterminate ? (\n <Icon name=\"minus\" size={12} />\n ) : isSelected ? (\n <Icon name=\"check\" size={12} />\n ) : null}\n </span>\n <span>\n {label ?? children}\n {hint ? <span className=\"pire-choice-hint\">{hint}</span> : null}\n </span>\n </>\n )}\n </AriaCheckbox>\n );\n}\n","import type * as React from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\n Label,\n Text,\n FieldError,\n type RadioGroupProps as AriaRadioGroupProps,\n type RadioProps as AriaRadioProps,\n} from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'children'> {\n label?: React.ReactNode;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/** Radios must live in a group — that is what gives arrow-key navigation and a single tab stop. */\nexport function RadioGroup({\n label,\n description,\n errorMessage,\n children,\n className,\n ...rest\n}: RadioGroupProps) {\n return (\n <AriaRadioGroup className={cx('pire-field', className)} validationBehavior=\"aria\" {...rest}>\n {label ? <Label className=\"pire-field-label\">{label}</Label> : null}\n <div className=\"pire-radiogroup\">{children}</div>\n {description ? (\n <Text slot=\"description\" className=\"pire-field-hint\">\n {description}\n </Text>\n ) : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaRadioGroup>\n );\n}\n\nexport interface RadioProps extends Omit<AriaRadioProps, 'className' | 'children'> {\n label?: React.ReactNode;\n hint?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function Radio({ label, hint, children, className, ...rest }: RadioProps) {\n return (\n <AriaRadio className={cx('pire-choice', className)} {...rest}>\n <span className=\"pire-choice-box\" data-radio=\"true\" aria-hidden=\"true\" />\n <span>\n {label ?? children}\n {hint ? <span className=\"pire-choice-hint\">{hint}</span> : null}\n </span>\n </AriaRadio>\n );\n}\n","import type * as React from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'children'> {\n label?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/** Immediate-effect toggle. For settings that need a save step, use a Checkbox. */\nexport function Switch({ label, children, className, ...rest }: SwitchProps) {\n return (\n <AriaSwitch className={cx('pire-choice', className)} {...rest}>\n <span className=\"pire-switch-track\" aria-hidden=\"true\">\n <span className=\"pire-switch-thumb\" />\n </span>\n <span>{label ?? children}</span>\n </AriaSwitch>\n );\n}\n","import type * as React from 'react';\nimport { RadioGroup as AriaRadioGroup, Radio as AriaRadio, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\nexport interface ChoiceCardOption {\n id: string;\n label: React.ReactNode;\n /** One line on what choosing this means — the cost, the scope, the consequence. */\n description?: React.ReactNode;\n icon?: string;\n /** Decorative illustration under the description, e.g. the density picker's row bars.\n * Marked `aria-hidden` — put anything that carries meaning in `description` instead. */\n preview?: React.ReactNode;\n /** Use for an option the current context makes unavailable, e.g. a scope the record doesn't\n * support. Still shown, so the user knows the choice exists — just not right now. */\n isDisabled?: boolean;\n}\n\nexport interface ChoiceCardGroupProps {\n /** Names the choice for assistive tech, e.g. \"Count scope\". Required when `label` is omitted. */\n 'aria-label'?: string;\n /** Visible group label. Use when the choice needs a heading of its own on the page; fall back\n * to `aria-label` when the surrounding UI already names the choice (a dialog title, a step\n * heading). */\n label?: React.ReactNode;\n /** Guidance that applies to the group as a whole, below the cards — not a per-option detail,\n * which belongs in that option's `description`. */\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n /** Shown when `isRequired` and nothing has been chosen at validation time. */\n errorMessage?: React.ReactNode;\n options: ChoiceCardOption[];\n /** Controlled selection. Pair with `onChange`; omit and use `defaultValue` for an uncontrolled group. */\n value?: string;\n /** Starting selection for an uncontrolled group. */\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Grid columns. Two by default; four suits short labels (a count-scope picker), one suits a\n * description-led list with a preview underneath (a row-density picker). */\n columns?: number;\n /** Use while the choice is temporarily unavailable for every option — e.g. the record it\n * governs hasn't loaded yet — not for disabling a single option, which is `ChoiceCardOption.isDisabled`. */\n isDisabled?: boolean;\n /** Use when the form cannot be submitted without a selection, so a missing choice surfaces\n * `errorMessage` instead of failing silently downstream. */\n isRequired?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Mutually exclusive options that each need explaining — a count's scope, a row density, a\n * posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough\n * and `SegmentedControl` when the options only change how data is displayed.\n */\nexport function ChoiceCardGroup({\n label,\n description,\n help,\n errorMessage,\n options,\n value,\n defaultValue,\n onChange,\n columns = 2,\n isDisabled,\n isRequired,\n className,\n style,\n ...rest\n}: ChoiceCardGroupProps) {\n warnHelpWithoutLabel('ChoiceCardGroup', label, help);\n\n return (\n <AriaRadioGroup\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n aria-label={label ? undefined : rest['aria-label']}\n value={value}\n defaultValue={defaultValue}\n onChange={onChange}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {label ? <FieldLabel label={label} isRequired={isRequired} help={help} /> : null}\n <div className=\"pire-choicecards\" style={{ gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }}>\n {options.map((option) => (\n <AriaRadio\n key={option.id}\n value={option.id}\n className=\"pire-choicecard\"\n isDisabled={option.isDisabled}\n >\n {option.icon ? <Icon name={option.icon} size={20} /> : null}\n <span className=\"pire-choicecard-label\">{option.label}</span>\n {option.description ? <span className=\"pire-choicecard-desc\">{option.description}</span> : null}\n {option.preview ? (\n <span className=\"pire-choicecard-preview\" aria-hidden=\"true\">\n {option.preview}\n </span>\n ) : null}\n </AriaRadio>\n ))}\n </div>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaRadioGroup>\n );\n}\n","import * as React from 'react';\nimport {\n ComboBox as AriaComboBox,\n Input as AriaInput,\n Button as AriaButton,\n Group,\n Popover,\n ListBox,\n ListBoxItem,\n FieldError,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { focusFieldOf } from '../utils/focusField';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\nexport interface ComboBoxOption {\n value: string;\n label: string;\n secondary?: string;\n isDisabled?: boolean;\n}\n\nexport interface ComboBoxProps {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n onChange?: (value: string | null) => void;\n /**\n * Free-text as typed, on every keystroke. Debounce it before calling the server.\n *\n * Without `isFilteredExternally`, React Aria also applies its own local \"contains\" filter,\n * so a result whose label does not literally contain the typed text is hidden client-side.\n */\n onInputChange?: (text: string) => void;\n /**\n * The text in the input, controlled. Pair it with `onInputChange` or typing stops working.\n *\n * Needed whenever the parent has to *impose* the text rather than read it: clearing the field\n * on a form reset or a context switch, and rehydrating an edited line whose key is known but\n * whose label is not in `options` until the search comes back. Remounting via `key` also\n * clears the field, but it drops focus.\n */\n inputValue?: string;\n options?: Array<string | ComboBoxOption>;\n /**\n * Adds a button that empties the field — both the text and the selection.\n *\n * A required field still needs this whenever the choice is *changeable*: without it the only way\n * back from a wrong pick is to select something else, so there is no way to say \"not this one\n * yet\" short of reloading the screen.\n */\n isClearable?: boolean;\n /** Overrides the dictionary's `inputClear`. Say what is being cleared when the field is one of several. */\n clearLabel?: string;\n /**\n * `options` is the final list and React Aria filters nothing locally. Required for server\n * search: fuzzy matches, synonyms, code-to-description and server ranking do not survive a\n * local \"contains\" pass.\n *\n * Turns `options` into a controlled collection, so the popover reflects exactly what you\n * pass — including an empty list, which is why `isLoading` and `emptyLabel` exist.\n */\n isFilteredExternally?: boolean;\n /**\n * Shows a loading row instead of closing the popover. Without it a 300ms debounce reads as\n * a menu that flickers open and shut.\n *\n * Also blocks selection while it is set: confirming here would commit an item from the\n * previous response.\n */\n isLoading?: boolean;\n /** Overrides the dictionary's `comboBoxLoading`. */\n loadingLabel?: string;\n /**\n * Shown when the server answered with nothing. Without it the popover closes and the user\n * cannot tell a bad query from a slow one.\n */\n emptyLabel?: React.ReactNode;\n /** Called when the list is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n placeholder?: string;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n /** Allow committing free text that isn't in `options`, instead of reverting to the last valid selection. */\n allowsCustomValue?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst norm = (o: string | ComboBoxOption): ComboBoxOption =>\n typeof o === 'string' ? { value: o, label: o } : o;\n\n/** Type-ahead picker for lists too long to scroll — material, cost centre, G/L account.\n * Below ~10 fixed options use Select; for master-data search with several columns use ValueHelpField. */\nexport function ComboBox({\n label,\n value,\n defaultValue,\n onChange,\n onInputChange,\n inputValue,\n options = [],\n description,\n help,\n errorMessage,\n size = 'md',\n fullWidth = true,\n isFilteredExternally,\n isLoading,\n loadingLabel,\n emptyLabel,\n isClearable,\n clearLabel,\n onLoadMore,\n className,\n style,\n ...rest\n}: ComboBoxProps) {\n const msg = usePireMessages();\n const items = options.map(norm);\n\n /**\n * A clearable, uncontrolled ComboBox is driven by Pire, the same trade `Input` makes: React Aria\n * has no imperative clear, and writing to the DOM node would leave its state holding the old key.\n * Scoped to `isClearable` so every other ComboBox keeps exactly the behaviour it has today.\n */\n const isSelectionControlled = value !== undefined;\n const [ownSelection, setOwnSelection] = React.useState<string | null>(defaultValue ?? null);\n const takesOverSelection = isClearable === true && !isSelectionControlled;\n const currentSelection = isSelectionControlled ? value : ownSelection;\n\n /**\n * The typed text is *observed*, never controlled. Controlling it would mean owning the job React\n * Aria does on selection — writing the chosen option's label into the input — and getting that\n * wrong shows an empty box over a real selection. Clearing the key is enough: `useComboBoxState`\n * resyncs the text whenever `selectedKey` changes, so a null key empties the input for free.\n */\n const [typedText, setTypedText] = React.useState('');\n const currentText = inputValue !== undefined ? inputValue : typedText;\n\n // Only a clearable field tracks the text, so every other ComboBox keeps re-rendering exactly as\n // often as it did before — this runs on each keystroke, and the state is unread without the button.\n const handleInputChange = isClearable\n ? (text: string) => {\n setTypedText(text);\n onInputChange?.(text);\n }\n : onInputChange;\n\n const showsClear =\n isClearable && !rest.isDisabled && !rest.isReadOnly && (currentText !== '' || currentSelection != null);\n\n const clear = () => {\n setTypedText('');\n if (takesOverSelection) setOwnSelection(null);\n onChange?.(null);\n onInputChange?.('');\n };\n\n // `items` (controlled) skips React Aria's local filter; `defaultItems` applies it. That single\n // choice is the whole feature — see useComboBoxState, which reads\n // `props.items != null || !defaultFilter ? collection : filterCollection(...)`.\n const collection = isFilteredExternally ? { items } : { defaultItems: items };\n const showsStatus = isLoading || (isFilteredExternally && items.length === 0 && emptyLabel != null);\n\n warnHelpWithoutLabel('ComboBox', label, help);\n\n return (\n <AriaComboBox\n className={cx('pire-field', className)}\n style={style}\n selectedKey={takesOverSelection ? ownSelection : value}\n defaultSelectedKey={takesOverSelection ? undefined : defaultValue}\n onSelectionChange={(k) => {\n // Ignore confirmations mid-flight: the highlighted row still belongs to the last response.\n if (isLoading) return;\n const next = k == null ? null : String(k);\n if (takesOverSelection) setOwnSelection(next);\n onChange?.(next);\n }}\n // Forwarded by name rather than left to `...rest`: it is part of Pire's contract, not an\n // accident of prop spreading, and a consumer should not have to know it reaches React Aria.\n inputValue={inputValue}\n onInputChange={handleInputChange}\n {...collection}\n // Always true under external filtering, not just while a status row shows. Gating it on\n // showsStatus closes the popover at the moment results land, because the flag flips false\n // in the same render the collection fills.\n allowsEmptyCollection={isFilteredExternally || isLoading}\n menuTrigger=\"input\"\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n >\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <AriaInput className=\"pire-input\" placeholder={rest.placeholder} />\n {/* A word rather than an \"x\", matching Input: inside a dialog an icon-only x sits beside\n the dialog's own close x and reads as a second way to dismiss it. */}\n {showsClear ? (\n <AriaButton\n className=\"pire-input-clear\"\n slot={null}\n onPress={(event) => {\n clear();\n focusFieldOf(event.target);\n }}\n >\n {clearLabel ?? msg.inputClear}\n </AriaButton>\n ) : null}\n <AriaButton\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.comboBoxShowSuggestions}\n style={{ width: 20, height: 20 }}\n >\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox\n className=\"pire-listbox\"\n onScroll={\n onLoadMore\n ? (e) => {\n // Fires on scroll rather than on an intersection observer so nothing is added below\n // the virtual focus while the user is still moving through the list.\n const el = e.currentTarget;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();\n }\n : undefined\n }\n // React Aria strips aria-busy from ListBox, so this live region is the whole\n // announcement: without it a screen-reader user gets silence while the request is in\n // flight and cannot tell pending from empty.\n renderEmptyState={\n showsStatus\n ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n )\n : undefined\n }\n >\n {(item: ComboBoxOption) => (\n <ListBoxItem\n className=\"pire-option\"\n id={item.value}\n textValue={item.label}\n isDisabled={item.isDisabled}\n >\n <span className=\"pire-option-label\">{item.label}</span>\n {item.secondary ? <span className=\"pire-option-secondary\">{item.secondary}</span> : null}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n","import * as React from 'react';\nimport {\n ComboBox as AriaComboBox,\n Input as AriaInput,\n Button as AriaButton,\n ButtonContext,\n Group,\n Popover,\n ListBox,\n ListBoxItem,\n FieldError,\n VisuallyHidden,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Tag } from '../core/Tag';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport type { ComboBoxOption } from './ComboBox';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\nexport interface MultiComboBoxProps {\n label?: React.ReactNode;\n /** Selected values, in the order they were picked. */\n value?: string[];\n defaultValue?: string[];\n onChange?: (values: string[]) => void;\n /**\n * Free-text as typed, on every keystroke. Debounce it before calling the server.\n *\n * Without `isFilteredExternally`, React Aria also applies its own local \"contains\" filter,\n * so a result whose label does not literally contain the typed text is hidden client-side.\n */\n onInputChange?: (text: string) => void;\n options?: Array<string | ComboBoxOption>;\n /**\n * `options` is the final list and React Aria filters nothing locally. Same meaning and same\n * name as on `ComboBox`. Required for server search, where fuzzy matches, synonyms and\n * server ranking do not survive a local \"contains\" pass.\n */\n isFilteredExternally?: boolean;\n /** Shows a loading row instead of closing the popover, and blocks selection while set. */\n isLoading?: boolean;\n /** Overrides the dictionary's `comboBoxLoading`. */\n loadingLabel?: string;\n /** Shown when the server answered with nothing, so a bad query reads differently from a slow one. */\n emptyLabel?: React.ReactNode;\n /** Called when the list is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n placeholder?: string;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n /** Let Enter commit text that is not in `options` — how product tags get coined. */\n allowsCustomValue?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst norm = (o: string | ComboBoxOption): ComboBoxOption =>\n typeof o === 'string' ? { value: o, label: o } : o;\n\n/** Multi-value type-ahead: pick several options, each shown as a removable chip, and — with\n * `allowsCustomValue` — coin new ones by typing. Product tags, cost-centre sets, watchers.\n *\n * A separate component rather than a mode on ComboBox: ComboBox's `value` is a `string | null`\n * and its `onChange` emits one key, while multi-select needs an array on both. Folding the two\n * together would put a discriminated union in front of every existing consumer of\n * `ComboBoxProps` — a breaking change in exchange for a purely additive feature.\n *\n * Three things worth knowing before you use it:\n *\n * - **Free text commits on Enter, never on blur.** React Aria treats the input text as\n * independent of the selection in multi-select mode, so leaving the field discards whatever\n * was typed but not committed. The chips are the only record of what was entered.\n * - **Backspace on an empty input removes the last chip.** The handler runs in the capture\n * phase because React Aria's own key handling sits on the same input and would otherwise act\n * on the same key.\n * - **The chips are plain `Tag`s, not a React Aria TagGroup.** React Aria's ComboBox builds its\n * listbox collection by shallow-rendering its entire subtree, which swallows any collection\n * component nested inside it — a TagGroup there registers its tags as listbox items and then\n * crashes looking for grid state. Each chip's remove button is an ordinary Tab stop instead,\n * and removals are announced through the live region below. */\nexport function MultiComboBox({\n label,\n value,\n defaultValue,\n onChange,\n onInputChange,\n options = [],\n description,\n help,\n errorMessage,\n allowsCustomValue,\n size = 'md',\n isFilteredExternally,\n isLoading,\n loadingLabel,\n emptyLabel,\n onLoadMore,\n fullWidth = true,\n className,\n style,\n ...rest\n}: MultiComboBoxProps) {\n const msg = usePireMessages();\n const items = React.useMemo(() => options.map(norm), [options]);\n // `items` (controlled) skips React Aria's local filter; `defaultItems` applies it.\n const collection = isFilteredExternally ? { items } : { defaultItems: items };\n const showsStatus = isLoading || (isFilteredExternally && items.length === 0 && emptyLabel != null);\n const [uncontrolled, setUncontrolled] = React.useState<string[]>(defaultValue ?? []);\n const [announcement, setAnnouncement] = React.useState('');\n const inputRef = React.useRef<HTMLInputElement>(null);\n const raw = value ?? uncontrolled;\n\n // React Aria compares the value array by reference on every render to decide whether the\n // selection changed — and, when it thinks it did, clears the input. An inline `value={['a']}`\n // is a fresh array every render, which would wipe the text mid-typing, so identity here\n // follows the contents rather than the caller's literal.\n const contentKey = raw.join('\\u0000');\n // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on contents by design — see above.\n const values = React.useMemo(() => raw, [contentKey]);\n\n const labelOf = (v: string) => items.find((o) => o.value === v)?.label ?? v;\n /* A read-only field still lists its chips, but nothing about it may be edited — neither by the\n remove buttons nor by Backspace, neither of which the input's readonly attribute covers. */\n const isEditable = !rest.isDisabled && !rest.isReadOnly;\n\n const commit = (next: string[]) => {\n /* Removing a chip is the only change a screen reader cannot infer from somewhere else: the\n listbox announces its own selected state, but a chip that disappears — by button or by\n Backspace — is silent otherwise. */\n const added = next.find((v) => !values.includes(v));\n const removed = values.find((v) => !next.includes(v));\n if (added) setAnnouncement(`${labelOf(added)} added. ${next.length} selected.`);\n else if (removed) setAnnouncement(`${labelOf(removed)} removed. ${next.length} selected.`);\n if (value === undefined) setUncontrolled(next);\n onChange?.(next);\n };\n\n const remove = (v: string) => {\n commit(values.filter((x) => x !== v));\n // The pressed button is about to unmount, and focus would fall to <body> with it.\n inputRef.current?.focus();\n };\n\n /* Capture phase: React Aria's input keydown handler is on the same element, and a bubble-phase\n handler cannot stop it from also acting on the key. */\n const onKeyDownCapture = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const el = e.currentTarget;\n if (!isEditable) return;\n if (e.key === 'Backspace' && el.value === '' && values.length > 0) {\n e.preventDefault();\n e.stopPropagation();\n commit(values.slice(0, -1));\n return;\n }\n if (e.key !== 'Enter' || !allowsCustomValue) return;\n const text = el.value.trim();\n // An option is highlighted — this Enter belongs to React Aria, which will select it.\n if (text === '' || el.getAttribute('aria-activedescendant')) return;\n // Typing an option's label in full must resolve to that option, not coin a duplicate under a\n // different key — otherwise \"Fragile\" typed and \"Fragile\" clicked are two chips on one record.\n const match = items.find((o) => o.label.toLowerCase() === text.toLowerCase());\n const next = match ? match.value : text;\n e.preventDefault();\n e.stopPropagation();\n if (!values.includes(next)) commit([...values, next]);\n };\n\n warnHelpWithoutLabel('MultiComboBox', label, help);\n\n return (\n <AriaComboBox\n className={cx('pire-field', className)}\n style={style}\n selectionMode=\"multiple\"\n value={values}\n onChange={(keys) => {\n if (!isLoading) commit(keys.map(String));\n }}\n onInputChange={onInputChange}\n {...collection}\n // Always true under external filtering: gating on showsStatus closes the popover at the\n // moment results land, because the flag flips false as the collection fills.\n allowsEmptyCollection={isFilteredExternally || isLoading}\n menuTrigger=\"input\"\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-multiline=\"true\"\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <div className=\"pire-chipfield\">\n {/* React Aria's ComboBox publishes its trigger-button props through ButtonContext, and\n every Button under it — including each chip's remove button — picks them up: the\n trigger's id (duplicated three ways), aria-haspopup, an aria-labelledby that\n outranks the chip's own label, and tabindex=\"-1\", which takes the chips out of the\n keyboard order entirely. Clearing the context is React Aria's own idiom for this\n (see how Popover clears contexts on the way into an overlay). */}\n <ButtonContext.Provider value={null}>\n {values.map((v) => (\n /* Disabled follows the field, not `isEditable`: a read-only field's chips are\n real, current values and should read as such — they simply lose the × . */\n <Tag key={v} isDisabled={rest.isDisabled} onRemove={isEditable ? () => remove(v) : undefined}>\n {labelOf(v)}\n </Tag>\n ))}\n </ButtonContext.Provider>\n <AriaInput\n ref={inputRef}\n className={cx('pire-input', 'pire-chipinput')}\n placeholder={rest.placeholder}\n onKeyDownCapture={onKeyDownCapture}\n />\n </div>\n <AriaButton\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.comboBoxShowSuggestions}\n style={{ width: 20, height: 20 }}\n >\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n <VisuallyHidden>\n <span aria-live=\"polite\">{announcement}</span>\n </VisuallyHidden>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox\n className=\"pire-listbox\"\n onScroll={\n onLoadMore\n ? (e) => {\n const el = e.currentTarget;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();\n }\n : undefined\n }\n // React Aria strips aria-busy from ListBox, so this live region is the whole\n // announcement: without it a screen-reader user gets silence while the request is in\n // flight and cannot tell pending from empty.\n renderEmptyState={\n showsStatus\n ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n )\n : undefined\n }\n >\n {(item: ComboBoxOption) => (\n <ListBoxItem\n className=\"pire-option\"\n id={item.value}\n textValue={item.label}\n isDisabled={item.isDisabled}\n >\n <span className=\"pire-option-label\">{item.label}</span>\n {item.secondary ? <span className=\"pire-option-secondary\">{item.secondary}</span> : null}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n","import * as React from 'react';\nimport {\n NumberField as AriaNumberField,\n Input as AriaInput,\n Group,\n Button as AriaButton,\n FieldError,\n useLocale,\n NumberFieldStateContext,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { focusFieldOf } from '../utils/focusField';\nimport { decimalSeparatorFor } from '../utils/decimalSeparator';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\n/**\n * Types `text` into `el` as though the user had.\n *\n * Assigning `el.value` is invisible to React: it caches the last value it wrote on the node\n * and would compare the new one against itself. Going through the prototype's setter leaves\n * that cache holding the previous value, so the dispatched `input` event reaches React Aria's\n * own handler — which is the point. We are supplying a keystroke, not a value; its parser\n * still decides whether the result is acceptable and rejects it if not.\n */\nfunction typeIntoInput(el: HTMLInputElement, text: string): void {\n const start = el.selectionStart ?? el.value.length;\n const end = el.selectionEnd ?? start;\n const setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;\n setValue?.call(el, el.value.slice(0, start) + text + el.value.slice(end));\n el.dispatchEvent(new Event('input', { bubbles: true }));\n const caret = start + text.length;\n el.setSelectionRange(caret, caret);\n}\n\n/** One dot with digits on both sides — the shape a decimal point and a lone group separator share. */\nconst SINGLE_DOT = /^(-?\\d+)\\.(\\d+)$/;\n\n/**\n * Whether grouping could have produced this text, in which case it is genuinely ambiguous and gets\n * left to the locale's own reading — the same ambiguity the typed-dot handler refuses to resolve.\n *\n * Grouping puts *exactly* three digits after its separator and *at most* three before the first\n * one: `1.500` and `123.500` are how a locale writes 1500 and 123500, but `1500.000` is not how it\n * writes anything, because that number would have been grouped `1.500.000`. Both halves of the\n * test matter. Checking only the fraction rejects `1500.000` — a `decimal(_,3)` quantity, which is\n * exactly the shape a backend sends — and hands it to a parser that reads it as 1500000.\n */\nfunction couldBeGrouped(integerPart: string, fractionPart: string): boolean {\n return fractionPart.length === 3 && integerPart.replace('-', '').length <= 3;\n}\n\n/** The pasted text with its decimal point rewritten to the locale's, or unchanged when the text is\n * not unambiguously a machine decimal. */\nfunction localiseMachineDecimal(text: string, separator: string): string {\n const match = SINGLE_DOT.exec(text.trim());\n if (!match || couldBeGrouped(match[1], match[2])) {\n return text;\n }\n return `${match[1]}${separator}${match[2]}`;\n}\n\nexport interface NumberFieldProps<TEmpty extends '' | null = never> {\n label?: React.ReactNode;\n /** Accessible name when `label` is omitted — e.g. in a table cell where the column header\n * already carries the visible text. A field with neither is unnamed and fails axe. */\n 'aria-label'?: string;\n /** A figure, or the string one arrived as — a `decimal` column serialises as `\"1500.00\"`, so\n * a value straight off a JSON response needs no conversion. Strings are read with `Number`,\n * which is machine format only: `\"1500.00\"`, never the `\"1.500,00\"` the field *displays*\n * under es-PY. Anything unparseable shows as empty rather than as `NaN`. */\n value?: number | string | null;\n defaultValue?: number | string | null;\n // `NoInfer` so the sentinel is read from `emptyValue` alone: without it a handler annotated\n // `(v: number) => void` is itself an inference site, TypeScript tries `TEmpty = number`, and\n // falls back to the constraint — which widens the emitted type for consumers who declared no\n // sentinel at all, the one thing this generic exists to avoid. Not a doc comment: this is why\n // the code is shaped this way, which is no business of the prop table.\n onChange?: (value: number | NoInfer<TEmpty>) => void;\n /**\n * What this field uses to mean \"empty\", in both directions: accepted in `value` and emitted by\n * `onChange`.\n *\n * Defaults to `NaN`, which is what React Aria uses internally and what this component has\n * always emitted. Declare `''` or `null` when the form is serialised to JSON: `NaN` does not\n * survive `JSON.stringify` (it becomes `null`) and compares `false` against everything\n * including itself, so a guard like `Math.abs(total) > 0` reads an empty field as a balanced\n * one.\n */\n emptyValue?: TEmpty;\n minValue?: number;\n maxValue?: number;\n step?: number;\n /** Intl.NumberFormat options — currency, unit, decimals. Locale comes from the app's I18nProvider. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Trailing unit shown after the figure: EA, KG, %. */\n suffix?: React.ReactNode;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n /** Hide the increment/decrement buttons — typical inside dense table cells. */\n hideStepper?: boolean;\n /**\n * `stacked` is the compact spinner beside the input — the default, and right for a dense form.\n * `inline` puts a full-size decrement and increment on either side of the value, for entry with\n * gloves or a scanner. `QuantityStepper` is the named preset for that case; reach for this prop\n * directly only when you need the layout without the preset's other defaults.\n */\n stepperLayout?: 'stacked' | 'inline';\n /**\n * Overrides the dictionary's increment/decrement names, in **both** stepper layouts —\n * QuantityStepper supplies its own.\n *\n * For a field where \"Increase\" is not what the button does to the thing being counted: \"Add one\n * case\", \"Next pallet\". A silently-ignored override is worse than no prop, so the stacked\n * spinner honours these exactly as the inline one does.\n */\n incrementLabel?: string;\n decrementLabel?: string;\n /**\n * Show a button that empties the field, reporting whatever `emptyValue` declares.\n *\n * Worth it wherever \"no figure\" is a meaningful answer rather than zero — an optional discount,\n * a filter bound. Works controlled or uncontrolled.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** What React Aria is given for a value: a figure, or `NaN` for empty — but `undefined` stays\n * `undefined`, since that is what keeps an uncontrolled field uncontrolled. Coercing it to `NaN`\n * would make every field without a `value` prop controlled-empty, which reports keystrokes\n * through `onChange` and displays none of them.\n *\n * The empty check comes before the coercion on purpose: `Number('')` is `0`, not `NaN`, so the\n * other order turns every empty price into a zero — which reads as a real figure. */\nfunction toAriaNumber(value: number | string | null | undefined): number | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (value === null || value === '') {\n return NaN;\n }\n return typeof value === 'number' ? value : Number(value);\n}\n\n/**\n * Visible whenever the field is *showing* something, which React Aria's own state knows and a copy\n * of `onChange` does not: `onChange` fires on commit, not per keystroke, so a mirrored copy stays\n * empty over a figure the user has typed and not committed — exactly when someone reaches for a\n * clear button.\n *\n * The clearing itself goes back through the component, unlike on the date fields. React Aria's\n * `commit()` treats an empty input as invalid and restores the last good figure, so the state\n * cannot be asked to empty itself; the component owns the value instead (see `takesOverValue`).\n */\nfunction ClearButton({ label, onClear }: { label: string; onClear: () => void }) {\n const state = React.useContext(NumberFieldStateContext);\n if (!state?.inputValue) {\n return null;\n }\n return (\n <AriaButton\n className=\"pire-input-clear\"\n slot={null}\n onPress={(event) => {\n onClear();\n focusFieldOf(event.target);\n }}\n >\n {label}\n </AriaButton>\n );\n}\n\n/**\n * Quantities, prices and any figure the user edits. Always right-aligned tabular mono, with\n * arrow-key and scroll stepping supplied by React Aria.\n *\n * **`onChange` fires on commit — blur, Enter or a stepper press — never per keystroke.** That is\n * React Aria's design and it is the right one: a formatted number field passes through states like\n * `1,` and `-` that must not reach the form.\n *\n * The consequence is worth knowing before you hit it. **Do not disable an action on this field's\n * value.** Typing `50000` and pressing an `isDisabled={amount <= 0}` button swallows the first\n * press: the field has not committed yet, so the button is still disabled when the pointer goes\n * down, and it takes a second click. It is not a race that can be tuned away — a test that clicks\n * such a button deadlocks outright, waiting for an enabled state that only that click can produce.\n *\n * Enable the action and validate when it is pressed, surfacing the reason. A disabled control that\n * does not say why is a worse affordance regardless, so the fix costs nothing.\n */\nexport function NumberField<TEmpty extends '' | null = never>({\n label,\n suffix,\n description,\n help,\n errorMessage,\n hideStepper,\n stepperLayout = 'stacked',\n incrementLabel,\n decrementLabel,\n size = 'md',\n fullWidth = true,\n className,\n style,\n value,\n defaultValue,\n onChange,\n emptyValue,\n isClearable,\n clearLabel,\n ...rest\n}: NumberFieldProps<TEmpty>) {\n const msg = usePireMessages();\n const { locale } = useLocale();\n const empty: number | TEmpty = emptyValue === undefined ? NaN : emptyValue;\n\n /**\n * A clearable, uncontrolled field is driven by Pire rather than by React Aria, for the same\n * reason `Input` is: the primitive has no imperative clear — `commit()` restores the last good\n * figure rather than emptying — and writing to the DOM node would leave React Aria's own state\n * holding the old one. Scoped to `isClearable`, so every other NumberField behaves as before.\n */\n const isControlled = value !== undefined;\n const [ownValue, setOwnValue] = React.useState<number>(() => toAriaNumber(defaultValue) ?? NaN);\n const takesOverValue = Boolean(isClearable) && !isControlled;\n const valueProps = takesOverValue\n ? { value: ownValue, defaultValue: undefined }\n : { value: toAriaNumber(value), defaultValue: toAriaNumber(defaultValue) };\n\n const handleChange = (next: number) => {\n if (takesOverValue) {\n setOwnValue(next);\n }\n onChange?.(Number.isNaN(next) ? empty : next);\n };\n\n const showsClear = Boolean(isClearable) && !rest.isDisabled && !rest.isReadOnly;\n\n /**\n * Treat the `.` key as \"the user means the decimal point\".\n *\n * In a locale that groups with `.`, React Aria reads a typed `3.5` as `35` — correctly, by\n * the locale's own rules, and without complaint: the parser reports it as valid partial\n * input, so nothing surfaces. On a quantity that is an order-of-magnitude error with no\n * error state to notice.\n *\n * This is fixed as an input method rather than by loosening the parser, because loosening it\n * cannot be done safely: `1.500` is genuinely ambiguous between 1500 and 1.5, and no rule\n * resolves it. Remapping the keystroke has no such ambiguity, since grouping separators are\n * output formatting — they are produced when a value is displayed, not typed to enter one.\n *\n * Deliberately narrow: it does nothing where `.` already is the decimal separator, and\n * nothing on integer fields — which is every currency without minor units, PYG included, so\n * the amount fields where someone might genuinely type grouping are excluded by construction.\n * Anything invalid that survives this (a second separator, say) is still React Aria's to\n * reject; everything below only decides which character the keypress produces.\n */\n const handleDecimalKey = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== '.' || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (rest.isReadOnly || rest.isDisabled) {\n return;\n }\n\n const separator = decimalSeparatorFor(locale);\n if (separator === '.') {\n return;\n }\n\n const { maximumFractionDigits } = new Intl.NumberFormat(locale, rest.formatOptions).resolvedOptions();\n if (!maximumFractionDigits) {\n return;\n }\n\n event.preventDefault();\n typeIntoInput(event.currentTarget, separator);\n };\n\n /**\n * The same rule for pasted text, which the key handler never sees.\n *\n * Typing `3.5` has read as 3.5 since the handler above landed; pasting it still read as 35,\n * because the parser takes the `.` for grouping. An input method that works only when the\n * characters arrive one at a time is worse than none: the typed path teaches that this field\n * understands a dot, and the pasted path then quietly enters a number ten times too big.\n *\n * Same guards as the keystroke, so a locale that already decimalises with a dot and a field that\n * takes no decimals are both left alone, and anything unparseable is still React Aria's to\n * reject — this only decides which characters the paste delivers.\n */\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (rest.isReadOnly || rest.isDisabled) {\n return;\n }\n\n const separator = decimalSeparatorFor(locale);\n if (separator === '.') {\n return;\n }\n\n const { maximumFractionDigits } = new Intl.NumberFormat(locale, rest.formatOptions).resolvedOptions();\n if (!maximumFractionDigits) {\n return;\n }\n\n const pasted = event.clipboardData.getData('text');\n const localised = localiseMachineDecimal(pasted, separator);\n if (localised === pasted) {\n return;\n }\n\n // Capture phase, and the propagation stopped: React Aria chains its own paste handling onto\n // this input, and `preventDefault` does not stop a chained JavaScript handler — it would\n // sanitise the raw text and insert `35` right over the `3,5` written here.\n event.preventDefault();\n event.stopPropagation();\n typeIntoInput(event.currentTarget, localised);\n };\n\n warnHelpWithoutLabel('NumberField', label, help);\n\n return (\n <AriaNumberField\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n onChange={handleChange}\n {...rest}\n {...valueProps}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n data-stepper={stepperLayout}\n >\n {!hideStepper && stepperLayout === 'inline' ? (\n <AriaButton\n slot=\"decrement\"\n className=\"pire-qty-btn\"\n aria-label={decrementLabel ?? msg.numberFieldDecrease}\n >\n <Icon name=\"minus\" size={16} />\n </AriaButton>\n ) : null}\n <AriaInput\n className=\"pire-input\"\n data-numeric=\"true\"\n onKeyDown={handleDecimalKey}\n onPasteCapture={handlePaste}\n />\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n {showsClear ? (\n <ClearButton label={clearLabel ?? msg.inputClear} onClear={() => handleChange(NaN)} />\n ) : null}\n {!hideStepper && stepperLayout === 'inline' ? (\n <AriaButton\n slot=\"increment\"\n className=\"pire-qty-btn\"\n aria-label={incrementLabel ?? msg.numberFieldIncrease}\n >\n <Icon name=\"plus\" size={16} />\n </AriaButton>\n ) : null}\n {hideStepper ? null : stepperLayout === 'inline' ? null : (\n <span className=\"pire-stepper\">\n {/* The same fallbacks as the inline branch above. Reading the dictionary directly here\n made `incrementLabel`/`decrementLabel` accept a value and drop it in the default\n layout — no type error, no warning, a button still announcing \"Increase\". */}\n <AriaButton\n slot=\"increment\"\n className=\"pire-stepper-btn\"\n aria-label={incrementLabel ?? msg.numberFieldIncrease}\n >\n <Icon name=\"plus\" size={10} />\n </AriaButton>\n <AriaButton\n slot=\"decrement\"\n className=\"pire-stepper-btn\"\n aria-label={decrementLabel ?? msg.numberFieldDecrease}\n >\n <Icon name=\"minus\" size={10} />\n </AriaButton>\n </span>\n )}\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaNumberField>\n );\n}\n","/**\n * The character this locale puts before the fractional part — a locale property, not a formatting\n * choice, so it is read without any field's `formatOptions`.\n *\n * Shared rather than declared twice: `NumberField` remaps a typed `.` to it, and `NumPad` draws it\n * on a key. Two copies of this would be two chances for the two components to disagree about what\n * `es-PY` means, on the same screen, in the same transaction.\n */\nexport function decimalSeparatorFor(locale: string): string {\n return (\n new Intl.NumberFormat(locale).formatToParts(1.1).find((part) => part.type === 'decimal')?.value ?? '.'\n );\n}\n","import { NumberField, type NumberFieldProps } from './NumberField';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/**\n * Nothing beyond NumberField's own props: this is that field with the layout, the empty sentinel\n * and the button names a stock count needs.\n *\n * `incrementLabel`/`decrementLabel` are deliberately not offered here — unlike `NumberField`,\n * which keeps them for a caller with its own wording. Every `QuantityStepper` on a warehouse\n * screen names its buttons from the dictionary (`quantityStepperIncrease` /\n * `quantityStepperDecrease`), so two counts on the same screen never end up with one stepper\n * labelled in English and the other in Spanish. Wanting different wording means the dictionary is\n * wrong for this locale — fix it there, not at the call site.\n */\nexport interface QuantityStepperProps\n extends Omit<\n NumberFieldProps<null>,\n 'stepperLayout' | 'hideStepper' | 'emptyValue' | 'suffix' | 'incrementLabel' | 'decrementLabel'\n > {\n /** Height of the value box. `sm` for a line-item table cell, where the field competes with the\n * row for space. The two buttons stay 32px square either way — that is the whole point of the\n * component, and a size that shrank them below the touch target would defeat it. */\n size?: 'sm' | 'md';\n}\n\n/**\n * A counted quantity: decrement, value, increment, sized for a warehouse.\n *\n * Use it wherever the number is entered by someone holding a scanner or wearing gloves — a\n * physical count, a picking screen, a returns desk. Everywhere else `NumberField` is the field.\n *\n * `null` means \"not counted yet\", which is not the same fact as zero: conflating the two is how\n * a blind count reports a shortage that never happened.\n */\nexport function QuantityStepper({ size = 'md', ...rest }: QuantityStepperProps) {\n const msg = usePireMessages();\n return (\n <NumberField<null>\n {...rest}\n size={size}\n stepperLayout=\"inline\"\n emptyValue={null}\n incrementLabel={msg.quantityStepperIncrease}\n decrementLabel={msg.quantityStepperDecrease}\n />\n );\n}\n","import * as React from 'react';\nimport {\n DatePicker as AriaDatePicker,\n Group,\n DateInput,\n DateSegment,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n Calendar,\n CalendarGrid,\n CalendarGridHeader,\n CalendarHeaderCell,\n CalendarGridBody,\n CalendarCell,\n Heading,\n FieldError,\n DatePickerStateContext,\n} from 'react-aria-components';\nimport type { DateValue } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { focusFieldOf } from '../utils/focusField';\nimport { coerceBound, coerceDateValue } from './dateValues';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\nexport interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> {\n label?: React.ReactNode;\n /** A `DateValue`, or the `YYYY-MM-DD` string one arrived as — a value straight off a JSON\n * response needs no conversion. A datetime is accepted and trimmed to its date (`date`\n * columns commonly serialise as `\"2026-08-14T00:00:00.000000Z\"`); the time and zone are\n * discarded, because a `DateValue` is a calendar date and holds neither. A malformed date\n * shows as an empty field rather than throwing. */\n value?: DateValue | string | null;\n defaultValue?: DateValue | string | null;\n onChange?: (value: (TFormat extends 'iso' ? string : DateValue) | null) => void;\n /**\n * The shape `onChange` emits.\n *\n * `'object'` (the default) emits the `@internationalized/date` `DateValue` this component has\n * always emitted. `'iso'` emits the `YYYY-MM-DD` string a consumer sends back to its API, and\n * `null` for an empty field. Input accepts both shapes in either mode.\n */\n valueFormat?: TFormat;\n /** Earliest date that can be picked, in either shape `value` accepts. `null` and `undefined`\n * both mean \"no bound\", so a bound read out of the same state as the value needs no `??\n * undefined` on the way in. An unreadable bound stops applying rather than throwing. */\n minValue?: DateValue | string | null;\n /** Latest date that can be picked — see `minValue`. In a from/to pair each end bounds the\n * other, and both ends come out of the same state in the same shape. */\n maxValue?: DateValue | string | null;\n /** Return true for dates that cannot be picked — factory calendar, blocked periods. */\n isDateUnavailable?: (date: DateValue) => boolean;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n /**\n * Show a button that empties the field.\n *\n * There is otherwise no way for a user to say \"no date\" once one is set: React Aria substitutes\n * a date when a segment is cleared and never reports an empty value back, so a field that has\n * been filled in cannot be emptied from the keyboard at all.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Reads React Aria's own state rather than a copy Pire keeps beside it.\n *\n * Two reasons, both found the hard way. The state holds what the field is *showing*, which for a\n * date being filled in is not yet a value the component ever reports — mirroring `onChange` leaves\n * the button hidden over exactly the input a user wants to abandon. And `setValue(null)` is the\n * only thing that resets the segments: handing the field a null from outside leaves whatever was\n * typed on screen, because React Aria only drops its placeholder when the value was complete.\n *\n * `slot={null}` or React Aria adopts this as the field's calendar trigger, and \"Clear\" opens the\n * popover instead of clearing.\n */\nfunction ClearButton({ label }: { label: string }) {\n const state = React.useContext(DatePickerStateContext);\n if (!state?.value) {\n return null;\n }\n return (\n <AriaButton\n className=\"pire-input-clear\"\n slot={null}\n onPress={(event) => {\n state.setValue(null);\n focusFieldOf(event.target);\n }}\n >\n {label}\n </AriaButton>\n );\n}\n\n/** Date entry with a segmented field and a calendar popover. Segments follow the user's locale,\n * so a German user types dd.mm.yyyy without any prop change. Wrap the app in React Aria's\n * I18nProvider to pin a locale. */\nexport function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({\n label,\n description,\n help,\n errorMessage,\n size = 'md',\n fullWidth = true,\n className,\n style,\n value,\n defaultValue,\n onChange,\n valueFormat,\n minValue,\n maxValue,\n isClearable,\n clearLabel,\n ...rest\n}: DatePickerProps<TFormat>) {\n const msg = usePireMessages();\n\n const showsClear = Boolean(isClearable) && !rest.isDisabled && !rest.isReadOnly;\n // The cast is the one place the conditional emitted type has to be asserted rather than\n // inferred: `valueFormat` is checked at runtime, which TypeScript cannot tie back to `TFormat`.\n const handleChange = (next: DateValue | null) =>\n onChange?.(\n (valueFormat === 'iso' && next ? next.toString() : next) as\n | (TFormat extends 'iso' ? string : DateValue)\n | null,\n );\n warnHelpWithoutLabel('DatePicker', label, help);\n\n return (\n <AriaDatePicker\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n minValue={coerceBound(minValue)}\n maxValue={coerceBound(maxValue)}\n value={coerceDateValue(value)}\n defaultValue={coerceDateValue(defaultValue)}\n onChange={handleChange}\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <DateInput className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n {showsClear ? <ClearButton label={clearLabel ?? msg.inputClear} /> : null}\n <AriaButton\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerOpenCalendar}\n style={{ width: 24, height: 24 }}\n >\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <AriaDialog>\n <Calendar className=\"pire-calendar\">\n <header className=\"pire-calendar-head\">\n <AriaButton\n slot=\"previous\"\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerPreviousMonth}\n >\n <Icon name=\"chevron-left\" size={16} />\n </AriaButton>\n <Heading className=\"pire-calendar-title\" />\n <AriaButton\n slot=\"next\"\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerNextMonth}\n >\n <Icon name=\"chevron-right\" size={16} />\n </AriaButton>\n </header>\n <CalendarGrid className=\"pire-calendar-grid\">\n <CalendarGridHeader>\n {(day) => <CalendarHeaderCell>{day}</CalendarHeaderCell>}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => <CalendarCell date={date} className=\"pire-calendar-cell\" />}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n </AriaDialog>\n </Popover>\n </AriaDatePicker>\n );\n}\n","import { parseDate } from '@internationalized/date';\nimport type { DateValue } from 'react-aria-components';\n\n/** A date, optionally followed by a time this component has no room for. */\nconst ISO_DATE = /^(\\d{4}-\\d{2}-\\d{2})(?:[T ].*)?$/;\n\n/**\n * What React Aria is given for a date. `undefined` stays `undefined`, since that is what keeps an\n * uncontrolled field uncontrolled — coercing it to `null` would silently disable `defaultValue`\n * and freeze the field.\n *\n * The rest is why this belongs in the library: `parseDate` *throws* on a malformed date, and a bad\n * date arriving from a server must empty one field, never unmount the screen. A datetime is\n * trimmed to its date, because a `DateValue` is a calendar date and holds neither time nor zone.\n */\nexport function coerceDateValue(value: DateValue | string | null | undefined): DateValue | null | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (value === null || value === '') {\n return null;\n }\n if (typeof value !== 'string') {\n return value;\n }\n const match = ISO_DATE.exec(value);\n if (!match) {\n return null;\n }\n try {\n return parseDate(match[1]);\n } catch {\n return null;\n }\n}\n\n/**\n * The same coercion for `minValue` / `maxValue`, where the two ways of saying \"no bound\" — `null`\n * and `undefined` — collapse into the one React Aria's own types accept.\n *\n * Worth knowing which way this degrades: an unreadable *value* is visible, because the field shows\n * empty. An unreadable *bound* is not — the constraint simply stops applying, and the user can\n * pick a date the screen meant to forbid. Degrading still beats throwing, since a bound arriving\n * malformed from a server should not take the screen down, but it is the quieter failure of the\n * two.\n */\nexport function coerceBound(value: DateValue | string | null | undefined): DateValue | undefined {\n return coerceDateValue(value) ?? undefined;\n}\n","import * as React from 'react';\nimport {\n DateRangePicker as AriaDateRangePicker,\n Group,\n DateInput,\n DateSegment,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n RangeCalendar,\n CalendarGrid,\n CalendarGridHeader,\n CalendarHeaderCell,\n CalendarGridBody,\n CalendarCell,\n Heading,\n FieldError,\n DateRangePickerStateContext,\n} from 'react-aria-components';\nimport type { DateValue } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { focusFieldOf } from '../utils/focusField';\nimport { coerceBound, coerceDateValue } from './dateValues';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\n\n/** A complete range: what this component emits, and what `rangeLengthInDays` measures. */\nexport interface DateRange {\n start: DateValue;\n end: DateValue;\n}\n\n/** A complete range as ISO strings — what `onChange` emits under `valueFormat=\"iso\"`. */\nexport interface IsoDateRange {\n start: string;\n end: string;\n}\n\n/**\n * What `value` accepts: either end in either shape, and either end absent.\n *\n * The two ends are read separately on purpose. An unreadable or empty end leaves *that* end\n * without a date instead of voiding the whole range, so a caller can pass the two halves of its\n * state straight through rather than guarding that both parsed before building an object. Deciding\n * what counts as a usable range is this component's job, which is the point of the prop.\n */\nexport interface DateRangeInput {\n start?: DateValue | string | null;\n end?: DateValue | string | null;\n}\n\nexport interface DateRangePreset {\n id: string;\n label: string;\n /** The app computes the range: Pire cannot know when a customer's fiscal year starts. It also\n * computes in whatever shape it stores, so either shape is accepted here. */\n range: () => DateRangeInput;\n}\n\n/** Both ends coerced, each independently missing — the shape React Aria is actually handed. */\ninterface PartialRange {\n start: DateValue | null;\n end: DateValue | null;\n}\n\n/**\n * Both ends read separately. A pair with nothing in either end is no range at all, which is what\n * React Aria wants for an empty field; a pair with one end is handed over as-is, which React Aria\n * renders as one filled end and one on placeholder.\n */\nfunction coerceRange(range: DateRangeInput | null | undefined): PartialRange | null | undefined {\n if (range === undefined) {\n return undefined;\n }\n if (range === null) {\n return null;\n }\n const start = coerceDateValue(range.start) ?? null;\n const end = coerceDateValue(range.end) ?? null;\n return start === null && end === null ? null : { start, end };\n}\n\nexport interface DateRangePickerProps<TFormat extends 'object' | 'iso' = 'object'> {\n label?: React.ReactNode;\n /** Either end in either shape — see `DateRangeInput`. A range whose ends are both empty is an\n * empty field. */\n value?: DateRangeInput | null;\n defaultValue?: DateRangeInput | null;\n onChange?: (value: (TFormat extends 'iso' ? IsoDateRange : DateRange) | null) => void;\n /**\n * The shape `onChange` emits.\n *\n * `'object'` (the default) emits the `DateValue` pair this component has always emitted. `'iso'`\n * emits `{ start: 'YYYY-MM-DD', end: 'YYYY-MM-DD' }`, the shape a consumer sends back to its API.\n *\n * Either way the emitted range is always complete or `null`: React Aria never reports half a\n * range, even though it will happily *display* one while a caller is still filling it in.\n */\n valueFormat?: TFormat;\n /** Earliest date either end can take, in either shape `value` accepts. `null` and `undefined`\n * both mean \"no bound\". An unreadable bound stops applying rather than throwing. */\n minValue?: DateValue | string | null;\n /** Latest date either end can take — see `minValue`. */\n maxValue?: DateValue | string | null;\n /** Return true for dates that cannot be picked — blocked periods, closed books. */\n isDateUnavailable?: (date: DateValue) => boolean;\n /**\n * Longest range the caller accepts, in days. Exceeding it marks the field invalid so\n * `errorMessage` shows — the wording is the app's, since only it knows the limit's reason.\n *\n * Days rather than a duration: \"12 months\" is not a fixed number of days, so pick the bound\n * that matches your rule rather than expecting a calendar-aware one.\n */\n maxRangeDays?: number;\n /** Shortcuts beside the calendar: \"This month\", \"Last 30 days\". */\n presets?: DateRangePreset[];\n /**\n * Show a button that empties both ends at once.\n *\n * Same gap as on `DatePicker`, and worse here: a user who fills one end and changes their mind\n * has no way back to an empty period, since React Aria never reports an emptied field.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n description?: React.ReactNode;\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n /** HTML submit names for the two ends. */\n startName?: string;\n endName?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Whole days between the two ends, inclusive of both.\n *\n * A complete `DateRange` measures to a number, which is the signature this has always had. Given\n * the looser shape `value` now takes — either end a string, either end absent — it returns `null`\n * for a range it cannot measure, so a caller holding two strings can pass them straight in.\n */\nexport function rangeLengthInDays(range: DateRange): number;\nexport function rangeLengthInDays(range: DateRangeInput | null | undefined): number | null;\nexport function rangeLengthInDays(range: DateRangeInput | null | undefined): number | null {\n const start = coerceDateValue(range?.start) ?? null;\n const end = coerceDateValue(range?.end) ?? null;\n if (start === null || end === null) {\n return null;\n }\n return end.toDate('UTC').getTime() / 86_400_000 - start.toDate('UTC').getTime() / 86_400_000 + 1;\n}\n\n/**\n * Reads React Aria's own state rather than a copy — see the same button on `DatePicker`, where the\n * reasoning is written out. It matters more here: half a range is the state a caller lands in by\n * filling one end, React Aria never reports it, and it is precisely what a user wants to abandon.\n */\nfunction ClearButton({ label }: { label: string }) {\n const state = React.useContext(DateRangePickerStateContext);\n if (!state?.value?.start && !state?.value?.end) {\n return null;\n }\n return (\n <AriaButton\n className=\"pire-input-clear\"\n slot={null}\n onPress={(event) => {\n state.setValue(null);\n focusFieldOf(event.target);\n }}\n >\n {label}\n </AriaButton>\n );\n}\n\n/**\n * Two dates that belong together — the default filter on 24 ERP screens.\n *\n * Built on React Aria's `DateRangePicker`, which supplies the segmented ends, the ordering rules\n * between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:\n * `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.\n */\nexport function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({\n label,\n description,\n help,\n errorMessage,\n maxRangeDays,\n presets,\n size = 'md',\n fullWidth = true,\n startName,\n endName,\n className,\n style,\n value,\n defaultValue,\n onChange,\n valueFormat,\n minValue,\n maxValue,\n isClearable,\n clearLabel,\n ...rest\n}: DateRangePickerProps<TFormat>) {\n const msg = usePireMessages();\n\n // Only for measuring the span: whichever of the two props holds the current range. It must not\n // be handed back as `value` — that would make a field with only `defaultValue` controlled, and a\n // controlled field whose parent never updates is a frozen one.\n const current = coerceRange(value) ?? coerceRange(defaultValue) ?? null;\n const span = current === null ? null : rangeLengthInDays(current);\n const tooLong = maxRangeDays != null && span != null && span > maxRangeDays;\n\n /**\n * The one place a range leaves this component, so `valueFormat` is honoured whether the range\n * came from the calendar, the segments or a preset button. A preset that returns something\n * unusable reports no range rather than a half one.\n *\n * The cast is where the conditional emitted type has to be asserted rather than inferred:\n * `valueFormat` is checked at runtime, which TypeScript cannot tie back to `TFormat`.\n */\n const emit = (next: PartialRange | null) => {\n if (!onChange) {\n return;\n }\n if (!next?.start || !next.end) {\n onChange(null);\n return;\n }\n onChange(\n (valueFormat === 'iso'\n ? { start: next.start.toString(), end: next.end.toString() }\n : { start: next.start, end: next.end }) as TFormat extends 'iso' ? IsoDateRange : DateRange,\n );\n };\n\n warnHelpWithoutLabel('DateRangePicker', label, help);\n\n return (\n <AriaDateRangePicker\n className={cx('pire-field', className)}\n style={style}\n startName={startName}\n endName={endName}\n validationBehavior=\"aria\"\n // React Aria types both ends of a range as required, but renders a half one exactly as a\n // half-filled field — which is what a caller passing one end of its state means.\n value={coerceRange(value) as DateRange | null | undefined}\n defaultValue={coerceRange(defaultValue) as DateRange | null | undefined}\n minValue={coerceBound(minValue)}\n maxValue={coerceBound(maxValue)}\n onChange={emit}\n {...rest}\n // `undefined`, never `false`: an explicit `false` overrides React Aria's own validation, and\n // that is what kept a `minValue` / `maxValue` violation from ever surfacing here — the field\n // was being told it was valid before the bound was consulted.\n isInvalid={rest.isInvalid || tooLong || undefined}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n\n <Group\n className=\"pire-control pire-daterange-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid || tooLong ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n {/* Two independent segment groups, each named by React Aria. Do not collapse them under a\n single aria-label: a screen reader then cannot say which end it is editing. */}\n <DateInput slot=\"start\" className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n <span aria-hidden=\"true\" className=\"pire-daterange-dash\">\n –\n </span>\n <DateInput slot=\"end\" className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n {isClearable && !rest.isDisabled && !rest.isReadOnly ? (\n <ClearButton label={clearLabel ?? msg.inputClear} />\n ) : null}\n <AriaButton\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerOpenCalendar}\n style={{ width: 24, height: 24 }}\n >\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n\n <Popover className=\"pire-popover\">\n <AriaDialog className=\"pire-daterange-dialog\">\n {presets?.length ? (\n // Before the calendar in the DOM, so keyboard users reach the shortcut without\n // arrowing through a month first.\n <div className=\"pire-daterange-presets\" role=\"group\" aria-label={msg.dateRangePresetsLabel}>\n {presets.map((preset) => (\n <AriaButton\n key={preset.id}\n className=\"pire-daterange-preset\"\n onPress={() => emit(coerceRange(preset.range()) ?? null)}\n >\n {preset.label}\n </AriaButton>\n ))}\n </div>\n ) : null}\n <RangeCalendar className=\"pire-calendar\">\n <header className=\"pire-calendar-head\">\n <AriaButton\n slot=\"previous\"\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerPreviousMonth}\n >\n <Icon name=\"chevron-left\" size={16} />\n </AriaButton>\n <Heading className=\"pire-calendar-title\" />\n <AriaButton\n slot=\"next\"\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerNextMonth}\n >\n <Icon name=\"chevron-right\" size={16} />\n </AriaButton>\n </header>\n <CalendarGrid className=\"pire-calendar-grid\">\n <CalendarGridHeader>\n {(day) => <CalendarHeaderCell>{day}</CalendarHeaderCell>}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => <CalendarCell date={date} className=\"pire-calendar-cell\" />}\n </CalendarGridBody>\n </CalendarGrid>\n </RangeCalendar>\n </AriaDialog>\n </Popover>\n </AriaDateRangePicker>\n );\n}\n","import * as React from 'react';\nimport { Input } from './Input';\nimport { IconButton } from '../core/IconButton';\nimport { ValueHelpDialog } from '../patterns/ValueHelpDialog';\nimport type { DataTableColumn } from '../data/DataTable';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ValueHelpFieldProps<T extends { id: string | number } = any> {\n label?: React.ReactNode;\n /** The picked record, or null. */\n value?: T | null;\n onChange?: (row: T | null) => void;\n /** How the picked record reads in the closed field. Default: \"id — name\". */\n format?: (row: T) => string;\n /** Records offered in the dialog, and the columns that identify them. */\n rows?: T[];\n columns?: DataTableColumn<T>[];\n dialogTitle?: React.ReactNode;\n /**\n * Forwarded to {@link ValueHelpDialog}. Set `isFilteredExternally` and feed `rows` from\n * `onSearch` when the list is too large to sit in the browser — which is the usual case for\n * suppliers, customers and products.\n */\n onSearch?: (query: string) => void;\n isFilteredExternally?: boolean;\n isLoading?: boolean;\n onLoadMore?: () => void;\n /** Shown in the dialog when the search returns nothing. */\n emptyLabel?: string;\n placeholder?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n /** Provide to render a clear affordance once a record is picked. */\n allowsClear?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Falls back to \"<id> — <human label>\", probing the usual master-data label fields in order. */\nconst defaultFormat = (row: { id: string | number; [field: string]: unknown }) =>\n [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(' — ');\n\n/** The ERP field that cannot be typed: a read-only display of the picked master-data record plus\n * the value-help trigger. Pairs Input with ValueHelpDialog so screens stop rewiring both. */\nexport function ValueHelpField<T extends { id: string | number }>({\n label,\n value,\n onChange,\n format = defaultFormat,\n rows = [],\n columns = [],\n dialogTitle,\n onSearch,\n isFilteredExternally,\n isLoading,\n onLoadMore,\n emptyLabel,\n placeholder,\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isRequired,\n allowsClear,\n className,\n style,\n}: ValueHelpFieldProps<T>) {\n const msg = usePireMessages();\n const [open, setOpen] = React.useState(false);\n return (\n <div className={cx(className)} style={style}>\n {/* The triggers live inside the field's control rather than beside it. As siblings of Input\n they aligned to the bottom of the whole field — label, control *and* description — so any\n field with a description pushed them below the input. Inside the control they align to\n the input row by construction, at any size and however long the description runs, and the\n three read as one control instead of a field with two boxes parked next to it.\n Input keeps ownership of description and errorMessage, so React Aria's aria-describedby\n wiring is untouched; moving them out to fix the layout would have cost that. */}\n <Input\n label={label}\n isReadOnly\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n isRequired={isRequired}\n value={value ? format(value) : ''}\n placeholder={placeholder ?? msg.valueHelpFieldPlaceholder}\n description={description}\n errorMessage={errorMessage}\n suffix={\n <span className=\"pire-valuehelp-actions\">\n {allowsClear && value ? (\n <IconButton\n icon=\"x\"\n label={msg.valueHelpFieldClear}\n isDisabled={isDisabled}\n onPress={() => onChange?.(null)}\n />\n ) : null}\n <IconButton\n icon=\"search\"\n label={\n typeof label === 'string'\n ? msg.valueHelpFieldOpenNamed.replace('{label}', label.toLowerCase())\n : msg.valueHelpFieldOpen\n }\n isDisabled={isDisabled}\n onPress={() => setOpen(true)}\n />\n </span>\n }\n />\n <ValueHelpDialog\n isOpen={open}\n onClose={() => setOpen(false)}\n title={dialogTitle ?? label}\n columns={columns}\n rows={rows}\n onSearch={onSearch}\n isFilteredExternally={isFilteredExternally}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n emptyLabel={emptyLabel}\n onSelect={(row) => onChange?.(row)}\n />\n </div>\n );\n}\n","import * as React from 'react';\nimport { Dialog } from '../feedback/Dialog';\nimport { Input } from '../forms/Input';\nimport { DataTable, type DataTableColumn } from '../data/DataTable';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface ValueHelpDialogProps<T extends { id: string | number } = any> {\n isOpen?: boolean;\n title?: React.ReactNode;\n /** Show 2–4 identifying columns, not just the key. */\n columns?: DataTableColumn<T>[];\n rows?: T[];\n searchPlaceholder?: string;\n emptyLabel?: string;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * On its own this only observes; it does not change how `rows` is treated. Pair it with\n * `isFilteredExternally` to actually hand filtering to the server.\n */\n onSearch?: (query: string) => void;\n /**\n * `rows` is the final list and the dialog filters nothing locally. Required for server search:\n * fuzzy matches, synonyms, code-to-description and server ranking do not survive a local\n * \"contains\" pass over the fields that happen to be in the row.\n *\n * Named to match `ComboBox`, deliberately. The same idea under two names is worse than either\n * name — the ERP's supplier, customer, product and purchase-order pickers all need this, and\n * they already know the ComboBox spelling.\n */\n isFilteredExternally?: boolean;\n /** Keeps the table's skeleton up instead of showing \"no records\" while a request is in flight. */\n isLoading?: boolean;\n /** Called when the table is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n /** Receives the picked row. */\n onSelect?: (row: T) => void;\n onClose?: () => void;\n /**\n * `'single'` (the default) commits on row press, exactly as before. `'multiple'` adds a\n * checkbox column, a running count and select-all / clear shortcuts, and moves the commit to\n * an explicit confirm — a row press only toggles that row.\n */\n selectionMode?: 'single' | 'multiple';\n /**\n * The checked ids, in `'multiple'` mode. Held by the **consumer**, not derived from the\n * rendered rows — a selection tied to the filtered list would empty itself the moment a search\n * narrows the table, silently dropping rows the user already ticked.\n */\n selectedKeys?: Array<string | number>;\n /**\n * Fires on every checkbox toggle and on the select-all / clear shortcuts, in `'multiple'` mode.\n *\n * Always the **whole** selection, never just the part currently on screen: the toolbar's\n * select-all reports every id in `rows`, and a row toggle reports the ids already held plus or\n * minus the one pressed. A caller can therefore assign it straight over its own state.\n */\n onSelectionChange?: (keys: Array<string | number>) => void;\n /** Fires with the current `selectedKeys` when the `'multiple'`-mode footer button is pressed. */\n onConfirm?: (keys: Array<string | number>) => void;\n}\n\n/** The ERP value help: search a master-data list and pick one record back into a field. */\nexport function ValueHelpDialog<T extends { id: string | number }>({\n isOpen,\n title,\n columns = [],\n rows = [],\n searchPlaceholder,\n emptyLabel,\n onSearch,\n isFilteredExternally,\n isLoading,\n onLoadMore,\n onSelect,\n onClose,\n selectionMode = 'single',\n selectedKeys,\n onSelectionChange,\n onConfirm,\n}: ValueHelpDialogProps<T>) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n React.useEffect(() => {\n if (isOpen) setQuery('');\n }, [isOpen]);\n const isMultiple = selectionMode === 'multiple';\n\n const filtered = React.useMemo(() => {\n // Under external filtering `rows` is already the answer. Filtering it again is not merely\n // redundant: it drops every match the server made on something the row does not contain.\n if (isFilteredExternally) return rows;\n const q = query.trim().toLowerCase();\n if (!q) return rows;\n return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));\n }, [rows, query, isFilteredExternally]);\n\n const handleSearch = (value: string) => {\n setQuery(value);\n onSearch?.(value);\n };\n\n return (\n <Dialog\n isOpen={isOpen}\n size=\"lg\"\n title={title ?? msg.valueHelpDialogTitle}\n onClose={onClose}\n footer={\n <>\n <Button variant=\"tertiary\" onPress={onClose}>\n {msg.valueHelpDialogCancel}\n </Button>\n {isMultiple ? (\n <Button\n variant=\"primary\"\n onPress={() => {\n onConfirm?.(selectedKeys ?? []);\n onClose?.();\n }}\n >\n {msg.valueHelpConfirm}\n </Button>\n ) : null}\n </>\n }\n >\n <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--sp-3)' }}>\n <Input\n aria-label={msg.valueHelpDialogSearch}\n icon=\"search\"\n type=\"search\"\n value={query}\n onChange={handleSearch}\n isClearable\n placeholder={searchPlaceholder ?? msg.valueHelpDialogSearchPlaceholder}\n autoFocus\n />\n {isMultiple ? (\n <div className=\"pire-valuehelp-selectionbar\">\n {/* The scope is in the label because it is not the scope the table in front of it\n shows: this ticks every record in `rows`, search or no search. An unqualified\n \"Select all\" beside a table narrowed to one row reads as \"select that one\". */}\n <Button size=\"sm\" variant=\"tertiary\" onPress={() => onSelectionChange?.(rows.map((r) => r.id))}>\n {msg.valueHelpSelectAllCount.replace('{count}', String(rows.length))}\n </Button>\n <Button size=\"sm\" variant=\"tertiary\" onPress={() => onSelectionChange?.([])}>\n {msg.valueHelpClearSelection}\n </Button>\n <span className=\"pire-valuehelp-count\">\n {msg.valueHelpSelectedCount.replace('{count}', String(selectedKeys?.length ?? 0))}\n </span>\n </div>\n ) : null}\n <div\n onScroll={\n onLoadMore\n ? (event) => {\n const el = event.currentTarget;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();\n }\n : undefined\n }\n style={{ overflow: 'auto', maxHeight: '48vh' }}\n >\n <DataTable\n aria-label={typeof title === 'string' ? title : msg.valueHelpDialogTitle}\n density=\"condensed\"\n columns={columns}\n rows={filtered}\n isLoading={isLoading}\n emptyLabel={emptyLabel ?? msg.valueHelpDialogEmpty}\n selectable={isMultiple ? 'multiple' : undefined}\n // Two select-alls on one screen, over two different collections, is how a ticked row\n // disappeared: the header box acts on the table's own `rows` — which is `filtered`\n // here — while the toolbar acts on the whole list. The toolbar's is the one that says\n // what it will do, so the header box goes; the per-row checkboxes stay.\n hideSelectAll={isMultiple}\n selected={isMultiple ? selectedKeys : undefined}\n onSelectionChange={isMultiple ? onSelectionChange : undefined}\n onRowAction={\n isMultiple\n ? undefined\n : (row) => {\n onSelect?.(row);\n onClose?.();\n }\n }\n />\n </div>\n </div>\n </Dialog>\n );\n}\n","import * as React from 'react';\nimport { ModalOverlay, Modal, Dialog as AriaDialog, Heading } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface DialogSlotProps {\n children?: React.ReactNode;\n className?: string;\n}\n\n/** The dialog's heading. Wires itself to the dialog's accessible name through React Aria's\n * `slot=\"title\"`, which is why it cannot be replaced by a bare heading element. */\nexport function DialogTitle({ children, className }: DialogSlotProps) {\n return (\n <Heading slot=\"title\" className={cx('pire-dialog-title', className)}>\n {children}\n </Heading>\n );\n}\n\n/** One line under the title. Say what the action affects, not what the button is called. */\nexport function DialogDescription({ children, className }: DialogSlotProps) {\n return (\n <p className={cx('pire-dialog-sub', className)} style={{ margin: 0 }}>\n {children}\n </p>\n );\n}\n\n/** The scrollable middle. Omit it entirely when the title and description say everything. */\nexport function DialogBody({ children, className }: DialogSlotProps) {\n return <div className={cx('pire-dialog-body', className)}>{children}</div>;\n}\n\n/** The action row. Cancel first, the commit or destructive action last. */\nexport function DialogActions({ children, className }: DialogSlotProps) {\n return <footer className={cx('pire-dialog-foot', className)}>{children}</footer>;\n}\n\nexport interface DialogProps {\n isOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n children?: React.ReactNode;\n /** Right-aligned actions: cancel first, primary or danger last. */\n footer?: React.ReactNode;\n onClose?: () => void;\n /** sm = confirm, md = edit form, lg = value help / table picker. */\n size?: 'sm' | 'md' | 'lg';\n /** Blocks dismiss on outside click / Esc — use only when data would be lost silently. */\n isDismissable?: boolean;\n showClose?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Modal dialog. Focus is trapped, the page behind is inert, and Esc closes unless\n * isDismissable is false — all handled by React Aria. */\nexport function Dialog({\n isOpen,\n onOpenChange,\n title,\n subtitle,\n children,\n footer,\n onClose,\n size = 'md',\n isDismissable = true,\n showClose = true,\n className,\n style,\n}: DialogProps) {\n const msg = usePireMessages();\n const close = () => {\n onClose?.();\n onOpenChange?.(false);\n };\n\n /**\n * Both APIs are supported at once. The props form (`title`, `subtitle`, `footer`) is harder to\n * misuse and stays the default; the sub-components exist so a composed dialog can be written the\n * way it reads, and so a migration can change imports before it changes structure.\n *\n * Slots are hoisted rather than rendered where they sit, because the title and description belong\n * inside the header alongside the close button — a caller should not have to know that. Anything\n * that is not a slot falls through to the body, so mixing prose with a `DialogActions` works.\n */\n const parts = React.Children.toArray(children);\n const slotOf = (type: React.ElementType) =>\n parts.find((node) => React.isValidElement(node) && node.type === type);\n const titleSlot = slotOf(DialogTitle);\n const descriptionSlot = slotOf(DialogDescription);\n const bodySlot = slotOf(DialogBody);\n const actionsSlot = slotOf(DialogActions);\n const slots = [titleSlot, descriptionSlot, bodySlot, actionsSlot];\n const loose = parts.filter((node) => !slots.includes(node));\n\n // A slot always wins over the matching prop: passing both is a mistake, and the more specific\n // one is the better guess at intent.\n const heading =\n titleSlot ??\n (title ? (\n <Heading slot=\"title\" className=\"pire-dialog-title\">\n {title}\n </Heading>\n ) : null);\n const description =\n descriptionSlot ??\n (subtitle ? (\n <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>\n {subtitle}\n </p>\n ) : null);\n const actions = actionsSlot ?? (footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null);\n // The body keeps its conditional: it carries --sp-5 of padding, so rendering it empty leaves a\n // ~40px band between the description and the buttons. A confirmation that says everything in its\n // title and description is the normal case, not an edge one.\n const body = bodySlot ?? (loose.length ? <div className=\"pire-dialog-body\">{loose}</div> : null);\n\n return (\n <ModalOverlay\n className=\"pire-modal-overlay\"\n isOpen={isOpen}\n isDismissable={isDismissable}\n onOpenChange={(o) => {\n if (!o) close();\n }}\n >\n <Modal className={cx('pire-modal', className)} data-size={size} style={style}>\n <AriaDialog className=\"pire-dialog\">\n {heading || description ? (\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n {heading}\n {description}\n </div>\n {showClose ? <IconButton icon=\"x\" label={msg.dialogClose} size=\"sm\" onPress={close} /> : null}\n </header>\n ) : null}\n {body}\n {actions}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import * as React from 'react';\nimport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableStateContext,\n Column,\n Row,\n Cell,\n type Selection,\n type SortDescriptor,\n} from 'react-aria-components';\nimport { Checkbox } from '../forms/Checkbox';\nimport { Icon } from '../core/Icon';\nimport { SkeletonTableRow } from '../feedback/Skeleton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** See Icon.tsx for why this is declared in-module and why the check is bare. */\ndeclare const process: { env: { NODE_ENV?: string } };\nconst IS_DEV = process.env.NODE_ENV !== 'production';\nconst warned = new Set<string>();\nfunction warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[pire] ${message}`);\n}\n\n/** The selection column's width, in px. Declared once because the pinned offsets are measured\n * from it: the first pinned data column starts where the checkbox column ends. */\nconst CHECKBOX_W = 44;\n\n/** Collection key of `pendingRow`. Not spelled like a `pire-*` class, for the reason given at\n * `expandedKey` below. */\nconst PENDING_KEY = '__pire_pending_row__';\n\n/** What counts as \"a field\" when the edit row puts focus on its first one. */\nconst FIELD_SELECTOR = [\n 'input:not([type=\"hidden\"]):not([disabled])',\n 'textarea:not([disabled])',\n 'select:not([disabled])',\n 'button:not([disabled])',\n '[contenteditable=\"true\"]',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/**\n * The content of one cell of a row being edited.\n *\n * React Aria's table is a grid with its own keyboard model — arrows move between cells, Space\n * selects, a printable key starts a type-ahead search that moves focus to whichever row matches. A\n * field inside a cell loses every one of those fights: \"Faber Castell\" types an F, jumps to the\n * first row starting with F, and the space selects it. So while focus is inside a field of the row,\n * the grid's navigation is switched off through `TableStateContext` — the same switch React Aria's\n * own column resizing uses — and keys and presses stop here instead of reaching the row. Off again\n * the moment focus leaves the row's fields, so the rest of the table navigates normally.\n */\nfunction EditCell({\n children,\n isFirst,\n focusToken,\n onCommit,\n onCancel,\n}: {\n children: React.ReactNode;\n /** The row's first editable cell owns putting focus in on start and back on the row at the end. */\n isFirst: boolean;\n /** Changes when focus must go back to the first field without a remount — a pending row that\n * was just committed and is now blank again. */\n focusToken: number;\n onCommit: () => void;\n onCancel: () => void;\n}) {\n const state = React.useContext(TableStateContext);\n const setNavDisabled = state?.setKeyboardNavigationDisabled;\n const ref = React.useRef<HTMLDivElement>(null);\n const focusedWithin = React.useRef(false);\n\n React.useLayoutEffect(() => {\n if (!isFirst) return;\n const row = ref.current?.closest<HTMLElement>('[role=\"row\"]');\n // `focusToken` is the dependency that matters: every change is a request to refocus.\n void focusToken;\n for (const cell of row?.querySelectorAll<HTMLElement>('.pire-td-edit') ?? []) {\n const field = cell.querySelector<HTMLElement>(FIELD_SELECTOR);\n if (field) {\n field.focus();\n break;\n }\n }\n }, [isFirst, focusToken]);\n\n React.useLayoutEffect(() => {\n if (!isFirst) return;\n const row = ref.current?.closest<HTMLElement>('[role=\"row\"]');\n return () => {\n // The fields are unmounting with focus in one of them, and the browser is about to drop it\n // on <body>. Hand it to the row instead — which stays, for an existing record — so the user\n // is still in the table, on the record they just edited.\n requestAnimationFrame(() => {\n const active = document.activeElement;\n if (row?.isConnected && (!active || active === document.body || !active.isConnected)) row.focus();\n });\n };\n }, [isFirst]);\n\n React.useEffect(\n () => () => {\n if (focusedWithin.current) setNavDisabled?.(false);\n },\n [setNavDisabled],\n );\n\n const stop = (e: React.SyntheticEvent) => e.stopPropagation();\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: not a control — it only intercepts events bubbling out of the fields inside it, so the grid does not act on them\n <div\n ref={ref}\n className=\"pire-td-edit\"\n onFocus={(e) => {\n // Stopped, so the grid never hears that focus entered it. If it does, its collection picks a\n // row to own focus and the row takes it straight back off the field — the field cannot be\n // focused by script or by Tab, only by a pointer.\n e.stopPropagation();\n focusedWithin.current = true;\n setNavDisabled?.(true);\n }}\n onBlur={(e) => {\n const next = e.relatedTarget as HTMLElement | null;\n const row = ref.current?.closest('[role=\"row\"]');\n if (next && row?.contains(next) && next.closest('.pire-td-edit')) return;\n focusedWithin.current = false;\n setNavDisabled?.(false);\n }}\n onKeyDown={(e) => {\n stop(e);\n if (e.nativeEvent.isComposing || e.defaultPrevented) return;\n if (e.key === 'Enter' && !(e.target instanceof HTMLTextAreaElement)) {\n e.preventDefault();\n onCommit();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n onCancel();\n }\n }}\n onPointerDown={stop}\n onMouseDown={stop}\n onClick={stop}\n >\n {children}\n </div>\n );\n}\n\n/** Value states a single cell can carry. The same five `Badge` uses, so a red cell and a red badge\n * mean the same thing on one screen. */\nexport type DataTableCellTone = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';\n\nexport interface DataTableColumn<T = any> {\n key: string;\n label: string;\n align?: 'left' | 'right' | 'center';\n /**\n * Column width. Applied to the DOM for a **pinned** column, where it is the geometry the whole\n * frozen run is measured from and a number is required. Everywhere else the grid still sizes by\n * content: React Aria's `<Column width>` reaches the DOM only inside a `ResizableTableContainer`,\n * which this table is not, so an unpinned width is a hint the browser is free to ignore.\n */\n width?: number | string;\n /** Right-aligns and switches to tabular mono. Use for every amount, quantity and ID. */\n numeric?: boolean;\n sortable?: boolean;\n /**\n * Keeps `label` for assistive tech but not on screen. For a utility column — a disclosure or\n * row-action column — where a visible header is noise. An *empty* label is not the answer: a\n * header with no text leaves its column unnamed for anyone using a screen reader.\n */\n hideLabel?: boolean;\n render?: (row: T) => React.ReactNode;\n /**\n * The field this cell shows while its row is being edited (`editingRowId`, `pendingRow`). Pass an\n * `Input`, `Select`, `NumberField`… with `aria-label` — there is no visible label in a cell — and\n * own its value yourself. A column without one keeps showing its value, or nothing on the pending\n * row, which has no value yet.\n *\n * For the pending row it is called with `pendingRow`, which is not a full record: read nothing\n * off it that the pending row does not carry.\n */\n renderEdit?: (row: T) => React.ReactNode;\n /**\n * Freezes the column at the start of the grid while the rest scroll horizontally. For a\n * comparison matrix — one product across thirty-four branches — where the row is unreadable\n * once its identity has scrolled away.\n *\n * Requires a numeric `width`: every later pinned column's offset is the sum of the ones before\n * it, and there is nothing to sum otherwise. Only a *leading* run may be pinned.\n */\n pinned?: boolean;\n /**\n * Tints the cell by value state — background from `--status-*-bg`, text from `--status-*-fg`.\n *\n * For a matrix where the *cell* carries the state and the row does not: one branch out of stock\n * while the rest of the product's row is fine. Return `undefined` to leave a cell untinted.\n *\n * This is not a substitute for saying so in words. Colour alone is not a value state — pair it\n * with a figure, a badge or a sub-label that reads the same to someone who cannot see the tint.\n */\n tone?: (row: T) => DataTableCellTone | undefined;\n}\n\nexport interface DataTableSort {\n key: string;\n dir: 'asc' | 'desc';\n}\n\nexport interface DataTableRowProps {\n /** Extra class on the `<tr>`. */\n className?: string;\n /**\n * Greys the row and takes it out of selection and row actions. Use it when a row is present for\n * context but cannot be acted on — and pair it with a cell that says *why*, since a greyed row\n * on its own does not explain itself.\n */\n isDisabled?: boolean;\n}\n\nexport interface DataTableProps<T extends { id: string | number } = any> {\n /** Accessible name for the grid — required. */\n 'aria-label': string;\n columns: DataTableColumn<T>[];\n rows: T[];\n /** Row height: 32 / 40 / 48px. Condensed is the analyst default. */\n density?: 'condensed' | 'regular' | 'comfortable';\n /**\n * `true` / `'multiple'` gives a checkbox column and a select-all header box — see\n * `hideSelectAll` for when the header box is the wrong control.\n *\n * `'single'` selects by pressing the row and renders **no** selection column. That is not a\n * shortcut: a checkbox is a claim that more than one can be ticked, and a checkbox column that\n * silently unticks the previous row reads as a bug. Prefer a master/detail list — the pattern\n * `SplitPane` exists for — over a grid with one checkbox per row.\n */\n selectable?: boolean | 'single' | 'multiple';\n selected?: Array<string | number>;\n onSelectionChange?: (ids: Array<string | number>) => void;\n /**\n * Drops the header's select-all checkbox, keeping the per-row ones.\n *\n * For a table whose `rows` are a *view* of a larger selectable set — a searchable picker where\n * the consumer holds ticks for records the current query filtered out of sight — and where the\n * screen already carries a select-all of its own whose scope is the whole set. Two select-alls\n * on one screen acting on two different collections is the defect this exists to remove, not a\n * choice to offer the user; `ValueHelpDialog`'s multi-select is the call site.\n *\n * The column stays (the row checkboxes need it) and keeps an announced-only name, since a\n * header cell with no text leaves its column unnamed.\n */\n hideSelectAll?: boolean;\n sort?: DataTableSort;\n onSortChange?: (sort: DataTableSort) => void;\n onRowAction?: (row: T) => void;\n emptyLabel?: React.ReactNode;\n /**\n * Summary cells keyed by column, rendered in a real `<tfoot>`.\n *\n * Keyed rather than free-form so a total sits under the column it totals, and stays there when\n * columns are reordered or resized. Columns missing from the map get an empty cell. Hidden while\n * `isLoading`, since a total from the previous response next to skeleton rows reads as current.\n */\n footer?: Record<string, React.ReactNode>;\n /** Per-row presentation and interactivity. Called for every row on every render — keep it cheap. */\n rowProps?: (row: T) => DataTableRowProps;\n /**\n * Detail rendered in a full-width row beneath its parent, for the rows named by `expandedIds`.\n *\n * Expansion is controlled: put the trigger in a column's `render` and track the ids yourself.\n * The table has no opinion on what opens a row, because the affordance differs per screen.\n */\n renderExpanded?: (row: T) => React.ReactNode;\n /** Ids whose `renderExpanded` content is currently shown. */\n expandedIds?: Array<string | number>;\n /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */\n isLoading?: boolean;\n /**\n * The row currently being edited in place. Its `renderEdit` cells swap in for their values, focus\n * goes to the first field, and every key typed into a field belongs to that field — Space types a\n * space, arrows move the caret, letters do not start a row search. Enter in any field calls\n * `onCommitRow`, Escape calls `onCancelRow`; the table does not leave edit mode on its own, so\n * clear this (or keep it, if the save failed) in those handlers.\n *\n * For a 1–3 field master — brands, reasons, helpdesk categories — that has no page or dialog of\n * its own. A row with more fields than that wants `SidePanel presentation=\"docked\"` instead.\n */\n editingRowId?: string | number;\n /**\n * A new record that does not exist in `rows` yet, rendered as an editing row above them. Lets\n * \"New brand\" add a row without inventing a placeholder id. Its handlers receive `null` as the id.\n *\n * After `onCommitRow(null)` focus returns to the pending row's first field, so a consumer that\n * saves and passes a fresh blank `pendingRow` gives the \"Enter saves and opens another\" loop with\n * no focus handling of its own.\n */\n pendingRow?: Partial<T>;\n /** Enter in a field of the editing row. `null` for `pendingRow`. */\n onCommitRow?: (id: string | number | null) => void;\n /** Escape in a field of the editing row. `null` for `pendingRow`. */\n onCancelRow?: (id: string | number | null) => void;\n /** Skeleton row count. Defaults to the current `rows` length, or 5 when there are none. */\n loadingRowCount?: number;\n /** Overrides the dictionary's `dataTableLoading`, announced while the body is a skeleton. */\n loadingLabel?: string;\n stickyHeader?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Records grid. React Aria supplies roving focus, type-ahead, shift-click ranges and\n * screen-reader row/column announcements — do not hand-roll a <table> in product code. */\nexport function DataTable<T extends { id: string | number }>({\n columns,\n rows,\n density = 'regular',\n selectable,\n selected,\n onSelectionChange,\n hideSelectAll,\n sort,\n onSortChange,\n onRowAction,\n stickyHeader = true,\n emptyLabel,\n isLoading,\n loadingRowCount,\n loadingLabel,\n footer,\n rowProps,\n renderExpanded,\n expandedIds,\n editingRowId,\n pendingRow,\n onCommitRow,\n onCancelRow,\n className,\n style,\n ...rest\n}: DataTableProps<T>) {\n const msg = usePireMessages();\n const [pendingFocus, setPendingFocus] = React.useState(0);\n const isEditing = (row: T) => editingRowId != null && String(row.id) === String(editingRowId);\n\n /**\n * `true` still means `'multiple'`, which is what every existing caller passes.\n *\n * Only the multiple mode gets a checkbox column: see `selectable` for why a single-select\n * checkbox is worse than no checkbox at all.\n */\n const selectionMode =\n selectable === true || selectable === 'multiple'\n ? 'multiple'\n : selectable === 'single'\n ? 'single'\n : 'none';\n const hasCheckboxColumn = selectionMode === 'multiple';\n\n /**\n * The frozen run, and the left offset of each column in it.\n *\n * Only a leading run can be frozen: an offset is the sum of the widths before it, and a\n * scrolling column in the middle has no fixed width to contribute. A gap therefore truncates\n * rather than mispositioning everything after it — and warns, because a column that silently\n * stops being pinned is a layout bug nobody goes looking for. Warned, not thrown: production\n * must not lose the whole table over a misconfigured column, which is how `Icon` treats an\n * unknown slug.\n */\n const pinnedGeometry = React.useMemo(() => {\n const geometry = new Map<string, { left: number; width: number }>();\n let x = hasCheckboxColumn ? CHECKBOX_W : 0;\n // Which of the two ways the run can end, because they warn about different columns and a\n // column that hits one must not also be reported for the other.\n let broke: 'unpinned' | 'width' | null = null;\n for (const column of columns) {\n if (!column.pinned) {\n broke = 'unpinned';\n break;\n }\n if (typeof column.width !== 'number') {\n if (IS_DEV)\n warnOnce(\n `pin-width:${column.key}`,\n `DataTable column \"${column.key}\" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`,\n );\n broke = 'width';\n break;\n }\n geometry.set(column.key, { left: x, width: column.width });\n x += column.width;\n }\n // Only an *unpinned* column strands the pinned ones behind it. A column that failed the width\n // check has already been named above, and every pinned column after it is stranded by that\n // one failure rather than by a gap of its own.\n if (IS_DEV && broke === 'unpinned') {\n const stranded = columns.slice(geometry.size).find((c) => c.pinned);\n if (stranded) {\n warnOnce(\n `pin-gap:${stranded.key}`,\n `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.`,\n );\n }\n }\n return geometry;\n }, [columns, hasCheckboxColumn]);\n const hasPinned = pinnedGeometry.size > 0;\n const lastPinnedKey = hasPinned ? [...pinnedGeometry.keys()][pinnedGeometry.size - 1] : undefined;\n const sortDescriptor: SortDescriptor | undefined = sort\n ? { column: sort.key, direction: sort.dir === 'asc' ? 'ascending' : 'descending' }\n : undefined;\n const handleSelection = (selection: Selection) => {\n // The pending row is a collection item React Aria can select, but not a record the consumer has.\n const keys =\n selection !== 'all' && selection.has(PENDING_KEY)\n ? new Set([...selection].filter((key) => key !== PENDING_KEY))\n : selection;\n // \"Select all\" *adds* the collection to the selection; it never replaces it. `rows` is not\n // always the whole selectable universe — a picker hands this table the filtered list while the\n // consumer holds ticks spanning the unfiltered one — and replacing would silently drop every\n // record the current query happens to hide. Ctrl/Cmd+A reaches this branch too, so the union\n // has to live here rather than at any one affordance. Row order first, so a table whose\n // selection is already a subset of its rows emits exactly what it always did.\n if (keys === 'all') {\n const inCollection = new Set(rows.map((r) => r.id));\n return onSelectionChange?.([\n ...rows.map((r) => r.id),\n ...(selected ?? []).filter((id) => !inCollection.has(id)),\n ]);\n }\n onSelectionChange?.([...keys] as Array<string | number>);\n };\n\n // Defaulting to the current row count keeps the grid the same height across a reload, so the\n // page does not jump under the pointer that just pressed Go.\n const skeletonRows = loadingRowCount ?? (rows.length || 5);\n const skeletonColumns = [\n ...(hasCheckboxColumn ? [{ width: CHECKBOX_W }] : []),\n ...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric })),\n ];\n // SkeletonTableRow is not a <tr> and cannot live inside React Aria's collection. Feeding the\n // Table an empty collection and rendering the skeletons through renderEmptyState is what keeps\n // the real header — and its sort state — mounted while the body is a placeholder.\n const body = isLoading ? [] : rows;\n\n const firstEditable = columns.find((c) => c.renderEdit);\n const presentation = new Map(rows.map((row) => [row.id, rowProps?.(row) ?? {}]));\n // Row disabling is a collection-level concern in React Aria, not a prop on Row: `disabledKeys`\n // is what removes a row from selection, row actions and the focus order in one go.\n const disabledKeys = rows.filter((row) => presentation.get(row.id)?.isDisabled).map((row) => row.id);\n const expanded = new Set((expandedIds ?? []).map(String));\n const spanAll = columns.length + (hasCheckboxColumn ? 1 : 0);\n /**\n * Detail rows are siblings in the collection, so their keys must not collide with a record id.\n * Deliberately not spelled like a `pire-*` class: `styles.css.test.ts` reads `pire-*` string\n * literals in component source as class references.\n */\n const expandedKey = (id: string | number) => `${id}::__pire_expanded__`;\n\n /**\n * Everything a frozen cell needs on the element itself: where it sticks, and how wide it is.\n *\n * The width is not decoration. Every offset above is the sum of the declared widths before it,\n * so the column has to *be* that wide or the run gapes open and then overlaps — `position:\n * sticky` can push a cell right, never pull it left. React Aria's `<Column width>` does not\n * reach the DOM (it is honoured only inside a `ResizableTableContainer`, which this table is\n * not, and `filterDOMProps` has no `width` in its allow-list), so the declared width is applied\n * here, through the `style` React Aria does forward. All three of `width`/`min-width`/\n * `max-width` are set because under `table-layout: auto` a lone `width` is a suggestion the\n * layout algorithm is free to grow past.\n */\n const pinProps = (key: string | null) => {\n if (!hasPinned) return {};\n const box = key === null ? { left: 0, width: CHECKBOX_W } : pinnedGeometry.get(key);\n if (!box) return {};\n return {\n 'data-pinned': 'true',\n 'data-pinned-last': key !== null && key === lastPinnedKey ? 'true' : undefined,\n style: { left: box.left, width: box.width, minWidth: box.width, maxWidth: box.width },\n } as const;\n };\n\n return (\n <div\n className={cx('pire-table-wrap', className)}\n style={style}\n data-loading={isLoading ? 'true' : undefined}\n aria-busy={isLoading ? 'true' : undefined}\n >\n <Table\n className=\"pire-table\"\n data-density={density}\n data-sticky={String(stickyHeader)}\n data-pinned={hasPinned ? 'true' : undefined}\n aria-label={rest['aria-label']}\n disabledKeys={disabledKeys.length ? new Set(disabledKeys) : undefined}\n selectionMode={selectionMode}\n selectedKeys={selected ? new Set(selected) : undefined}\n onSelectionChange={handleSelection}\n sortDescriptor={sortDescriptor}\n onSortChange={(d) =>\n onSortChange?.({ key: String(d.column), dir: d.direction === 'ascending' ? 'asc' : 'desc' })\n }\n onRowAction={\n onRowAction\n ? (key) => {\n const row = rows.find((r) => String(r.id) === String(key));\n // A press on an editing row's padding is someone aiming at a field, not opening the\n // record out from under their own unsaved edit.\n if (row && !isEditing(row)) onRowAction(row);\n }\n : undefined\n }\n >\n <TableHeader className=\"pire-thead-row\">\n {hasCheckboxColumn ? (\n <Column className=\"pire-th\" {...pinProps(null)}>\n {hideSelectAll ? (\n <span className=\"pire-sr-only\">{msg.dataTableSelectionColumn}</span>\n ) : (\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectAll} />\n )}\n </Column>\n ) : null}\n {columns.map((c, i) => (\n // The checkbox column is never the row header — a selection control does not identify\n // the record — so the first *data* column carries it regardless of whether a checkbox\n // column precedes it. Conditioning this on `hasCheckboxColumn` left every selectable\n // table with no row header at all: invisible on first paint, and a hard crash from\n // React Aria's own \"table must have a row header\" invariant the moment `rows` changes\n // under it (search, sort, a paginated load).\n <Column\n key={c.key}\n id={c.key}\n className=\"pire-th\"\n isRowHeader={i === 0}\n allowsSorting={c.sortable}\n data-align={c.numeric || c.align === 'right' ? 'right' : c.align}\n data-allows-sorting={c.sortable ? 'true' : undefined}\n {...pinProps(c.key)}\n >\n {/* Never both classes at once. `.pire-sr-only` and `.pire-th-inner` are each a single\n class, so the one defined later in components.css wins `width` — the hidden header\n came out `position:absolute` (from sr-only) at `width:100%` (from th-inner), which\n resolves against the containing block, not the column. It stayed clipped, so\n nothing was visible, but it grew the document and scrolled the whole page\n sideways. A header that is only announced needs no flex layout. */}\n <span className={c.hideLabel ? 'pire-sr-only' : 'pire-th-inner'}>\n {c.label}\n {c.sortable ? (\n <Icon\n size={12}\n name={\n sort?.key === c.key\n ? sort.dir === 'asc'\n ? 'arrow-up'\n : 'arrow-down'\n : 'chevrons-up-down'\n }\n style={{\n color: sort?.key === c.key ? 'var(--accent-subtle-fg)' : 'var(--text-tertiary)',\n }}\n />\n ) : null}\n </span>\n </Column>\n ))}\n </TableHeader>\n <TableBody\n renderEmptyState={() =>\n isLoading ? (\n <div className=\"pire-table-loading\" role=\"status\" aria-live=\"polite\">\n <span className=\"pire-sr-only\">{loadingLabel ?? msg.dataTableLoading}</span>\n {Array.from({ length: skeletonRows }, (_, i) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.\n <SkeletonTableRow key={i} columns={skeletonColumns} density={density} />\n ))}\n </div>\n ) : (\n <div className=\"pire-table-empty\">{emptyLabel ?? msg.dataTableEmpty}</div>\n )\n }\n >\n {pendingRow && !isLoading ? (\n <Row\n key={PENDING_KEY}\n id={PENDING_KEY}\n className=\"pire-tr\"\n data-editing=\"true\"\n data-pending=\"true\"\n >\n {/* No checkbox: there is no record to select yet. */}\n {hasCheckboxColumn ? <Cell className=\"pire-td\" {...pinProps(null)} /> : null}\n {columns.map((c) => {\n const pin = pinProps(c.key);\n return (\n <Cell\n key={c.key}\n className=\"pire-td\"\n data-numeric={c.numeric ? 'true' : undefined}\n {...pin}\n style={{ ...pin.style, textAlign: c.align && !c.numeric ? c.align : undefined }}\n >\n {c.renderEdit ? (\n <EditCell\n isFirst={c === firstEditable}\n focusToken={pendingFocus}\n onCommit={() => {\n onCommitRow?.(null);\n setPendingFocus((n) => n + 1);\n }}\n onCancel={() => onCancelRow?.(null)}\n >\n {c.renderEdit(pendingRow as T)}\n </EditCell>\n ) : null}\n </Cell>\n );\n })}\n </Row>\n ) : null}\n {body.flatMap((row) => {\n const rowIsDisabled = presentation.get(row.id)?.isDisabled;\n const editing = isEditing(row);\n const record = (\n <Row\n key={row.id}\n id={row.id}\n className={cx('pire-tr', presentation.get(row.id)?.className)}\n data-pressable={onRowAction && !rowIsDisabled && !editing ? 'true' : undefined}\n data-editing={editing ? 'true' : undefined}\n >\n {hasCheckboxColumn ? (\n <Cell className=\"pire-td\" {...pinProps(null)}>\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectRow} />\n </Cell>\n ) : null}\n {columns.map((c) => {\n const pin = pinProps(c.key);\n return (\n <Cell\n key={c.key}\n className=\"pire-td\"\n data-numeric={c.numeric ? 'true' : undefined}\n data-tone={c.tone?.(row) ?? undefined}\n {...pin}\n style={{ ...pin.style, textAlign: c.align && !c.numeric ? c.align : undefined }}\n >\n {editing && c.renderEdit ? (\n <EditCell\n isFirst={c === firstEditable}\n focusToken={0}\n onCommit={() => onCommitRow?.(row.id)}\n onCancel={() => onCancelRow?.(row.id)}\n >\n {c.renderEdit(row)}\n </EditCell>\n ) : c.render ? (\n c.render(row)\n ) : (\n (row as Record<string, React.ReactNode>)[c.key]\n )}\n </Cell>\n );\n })}\n </Row>\n );\n if (!renderExpanded || !expanded.has(String(row.id))) return [record];\n return [\n record,\n <Row key={expandedKey(row.id)} id={expandedKey(row.id)} className=\"pire-tr-expanded\">\n <Cell className=\"pire-td-expanded\" colSpan={spanAll}>\n {renderExpanded(row)}\n </Cell>\n </Row>,\n ];\n })}\n </TableBody>\n {footer && !isLoading ? (\n <TableFooter className=\"pire-tfoot\">\n <Row id=\"__pire_footer__\" className=\"pire-tr-footer\">\n {hasCheckboxColumn ? <Cell className=\"pire-tf\" {...pinProps(null)} /> : null}\n {columns.map((c, i) => {\n const pin = pinProps(c.key);\n return (\n <Cell\n key={c.key}\n className=\"pire-tf\"\n data-numeric={c.numeric ? 'true' : undefined}\n {...pin}\n style={{ ...pin.style, textAlign: c.align && !c.numeric ? c.align : undefined }}\n >\n {/* React Aria makes the row's first cell a rowheader, and an empty rowheader\n leaves every other cell in the row unnamed. Totals usually start in a later\n column, so the first cell falls back to an announced-only label rather than\n to nothing. Unconditional on the checkbox column: the row header is the\n first *data* column either way — the leading `<Cell>` a checkbox column\n contributes to the footer is not one, exactly as in the body. Guarding this\n on `!hasCheckboxColumn` left every selectable table with a footer showing an\n empty rowheader, which is the defect the fallback exists to prevent. */}\n {footer[c.key] ??\n (i === 0 ? <span className=\"pire-sr-only\">{msg.dataTableSummaryRow}</span> : null)}\n </Cell>\n );\n })}\n </Row>\n </TableFooter>\n ) : null}\n </Table>\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport type SkeletonShape = 'text' | 'block' | 'circle';\n\nexport interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** text — a line of copy; block — a card, chart or image; circle — an avatar. */\n shape?: SkeletonShape;\n /** Overrides the shape's default. A percentage reads better than a pixel count in a\n * fluid layout, and keeps the placeholder honest when the real value is unknown. */\n width?: number | string;\n height?: number | string;\n}\n\n/** Loading placeholder for content whose shape is known before its value is.\n *\n * Deliberately `aria-hidden`: a screen reader gains nothing from \"graphic, graphic, graphic\",\n * and announcing placeholders as content is worse than silence. Announce the wait once, on the\n * region that is loading — `aria-busy=\"true\"` on the container, or a live-region message — and\n * let the skeleton be purely visual. Nothing inside is focusable, so keyboard order is\n * unaffected while the data is in flight.\n *\n * The shimmer is suppressed under `prefers-reduced-motion`; the placeholder still reads as one\n * because the shape and the surface contrast carry it, not the animation. */\nexport function Skeleton({ shape = 'text', width, height, className, style, ...rest }: SkeletonProps) {\n return (\n <div\n className={cx('pire-skeleton', className)}\n data-shape={shape}\n aria-hidden=\"true\"\n style={{ width, height, ...style }}\n {...rest}\n />\n );\n}\n\nexport interface SkeletonTableColumn {\n align?: 'left' | 'right' | 'center';\n /** Fixed column width. Omit to let the column share the free space, as DataTable does. */\n width?: number | string;\n /** Right-aligns the bar. Mirrors DataTable's column flag so a loading table and a loaded one\n * put their numbers in the same place. */\n numeric?: boolean;\n}\n\nexport interface SkeletonTableRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** A column count, or one descriptor per column when alignment or width matters. */\n columns: number | SkeletonTableColumn[];\n /** Must match the DataTable it stands in for, or the rows jump on load. */\n density?: 'condensed' | 'regular' | 'comfortable';\n}\n\n/* Bar widths cycle instead of being random: a random width would be a different number on every\n render, so the placeholder would twitch under any unrelated re-render. Four values is enough\n for the ragged look of real data without a visible repeat at normal column counts. */\nconst BAR_WIDTHS = ['72%', '54%', '86%', '63%'];\n\n/** One placeholder row, sized to line up with `DataTable` — same row height per density, same\n * cell padding, same bottom rule. Render a handful inside `.pire-table-wrap` (or above a real\n * table's body) while the first page loads, so the grid does not resize when it arrives.\n *\n * It is not a real `<tr>` and cannot be handed to `DataTable` as a row: DataTable builds its\n * collection from `rows`, and React Aria's table owns everything under it. Use it in place of\n * the table, not inside one. */\nexport function SkeletonTableRow({\n columns,\n density = 'regular',\n className,\n style,\n ...rest\n}: SkeletonTableRowProps) {\n const cells: SkeletonTableColumn[] =\n typeof columns === 'number' ? Array.from({ length: columns }, () => ({})) : columns;\n return (\n <div\n className={cx('pire-skeleton-row', className)}\n data-density={density}\n aria-hidden=\"true\"\n style={style}\n {...rest}\n >\n {cells.map((c, i) => {\n const align = c.numeric ? 'right' : (c.align ?? 'left');\n return (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.\n key={i}\n className=\"pire-skeleton-cell\"\n data-align={align}\n style={{ width: c.width, flex: c.width ? '0 0 auto' : undefined }}\n >\n <Skeleton width={BAR_WIDTHS[i % BAR_WIDTHS.length]} />\n </div>\n );\n })}\n </div>\n );\n}\n","import * as React from 'react';\nimport { FileTrigger, Text } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { ProgressBar } from '../feedback/ProgressBar';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface PireFile {\n /** The browser's `File`. Pire uploads nothing — that is the app's job. */\n file: File;\n /** Object URL, only for images with `showPreview`. Revoked on unmount. */\n previewUrl?: string;\n}\n\nexport interface FileRejection {\n file: File;\n reason: 'size' | 'type';\n}\n\n/**\n * Everything a caller can put on the wrapper: `id`, `data-*`, `aria-describedby`.\n *\n * The omissions are this component's own props under names the DOM also uses, and would otherwise\n * collide: `onChange` and `onError` carry files and rejections rather than DOM events, and\n * `defaultValue` a file list rather than a string.\n */\nexport type FileFieldPassthrough = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'onError' | 'defaultValue' | 'color'\n>;\n\nexport interface FileUploadProps extends FileFieldPassthrough {\n label?: React.ReactNode;\n /** Controlled / uncontrolled, the same pair as `Tabs` and `MultiComboBox`. */\n value?: PireFile[];\n defaultValue?: PireFile[];\n onChange?: (files: PireFile[]) => void;\n /** Mime types or extensions, exactly as `FileTrigger.acceptedFileTypes` takes them. */\n acceptedFileTypes?: readonly string[];\n allowsMultiple?: boolean;\n /** Ceiling in bytes. Oversized files are rejected and reported, never held. */\n maxSize?: number;\n /** Rejections, so the app can word its own message. */\n onError?: (rejections: FileRejection[]) => void;\n /** Thumbnail for images. Turn it off for CSVs, where a thumbnail says nothing. */\n showPreview?: boolean;\n /** Upload progress 0–100, while the app is doing the uploading. */\n uploadProgress?: number;\n /** Overrides the dictionary's `fileUploadChoose`. */\n chooseLabel?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst isImage = (file: File) => file.type.startsWith('image/');\n\n/** Human-readable size. Deliberately not localised digits: `toLocaleString` on the number only. */\nexport function formatFileSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024).toLocaleString()} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\n/** Splits a picked list into keepers and rejections, without uploading or mutating anything. */\nexport function screenFiles(\n files: File[],\n { maxSize, acceptedFileTypes }: { maxSize?: number; acceptedFileTypes?: readonly string[] },\n): { accepted: File[]; rejected: FileRejection[] } {\n const accepted: File[] = [];\n const rejected: FileRejection[] = [];\n\n for (const file of files) {\n if (maxSize != null && file.size > maxSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n // `acceptedFileTypes` mirrors the input's accept attribute, which the OS picker already\n // enforces — but drag-and-drop bypasses that picker entirely, so it is checked here too.\n if (acceptedFileTypes?.length) {\n const ok = acceptedFileTypes.some((t) =>\n t.startsWith('.')\n ? file.name.toLowerCase().endsWith(t.toLowerCase())\n : t.endsWith('/*')\n ? file.type.startsWith(t.slice(0, -1))\n : file.type === t,\n );\n if (!ok) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n }\n accepted.push(file);\n }\n return { accepted, rejected };\n}\n\n/**\n * File picker with a list of what was chosen. Pire hands back `File`s through `onChange` and\n * uploads nothing: the app owns the `FormData`, the request and the progress it reports back\n * through `uploadProgress`.\n */\nexport function FileUpload({\n label,\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview = true,\n uploadProgress,\n chooseLabel,\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isReadOnly,\n isRequired,\n fullWidth = true,\n className,\n style,\n ...rest\n}: FileUploadProps) {\n const msg = usePireMessages();\n const [uncontrolled, setUncontrolled] = React.useState<PireFile[]>(defaultValue ?? []);\n const files = value ?? uncontrolled;\n\n // Object URLs leak until revoked, and the browser will not do it for us.\n const created = React.useRef<string[]>([]);\n React.useEffect(\n () => () => {\n for (const url of created.current) URL.revokeObjectURL(url);\n },\n [],\n );\n\n const commit = (next: PireFile[]) => {\n if (value === undefined) setUncontrolled(next);\n onChange?.(next);\n };\n\n const accept = (picked: FileList | null) => {\n if (!picked || isDisabled || isReadOnly) return;\n const { accepted, rejected } = screenFiles([...picked], { maxSize, acceptedFileTypes });\n if (rejected.length) onError?.(rejected);\n if (!accepted.length) return;\n\n const wrapped = accepted.map((file) => {\n const previewUrl = showPreview && isImage(file) ? URL.createObjectURL(file) : undefined;\n if (previewUrl) created.current.push(previewUrl);\n return { file, previewUrl };\n });\n commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));\n };\n\n const remove = (target: File) => commit(files.filter((f) => f.file !== target));\n\n return (\n <div\n className={cx('pire-field', 'pire-fileupload', className)}\n style={style}\n data-full-width={String(fullWidth)}\n data-invalid={isInvalid ? 'true' : undefined}\n {...rest}\n >\n {label ? (\n <span className=\"pire-field-label\">\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </span>\n ) : null}\n\n <FileTrigger\n acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple}\n onSelect={accept}\n >\n <Button icon=\"paperclip\" isDisabled={isDisabled || isReadOnly}>\n {chooseLabel ?? msg.fileUploadChoose}\n </Button>\n </FileTrigger>\n\n {files.length ? (\n <ul className=\"pire-fileupload-list\">\n {files.map(({ file, previewUrl }) => (\n <li key={`${file.name}-${file.size}-${file.lastModified}`} className=\"pire-fileupload-item\">\n {previewUrl ? (\n <img className=\"pire-fileupload-thumb\" src={previewUrl} alt=\"\" />\n ) : (\n <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />\n )}\n <span className=\"pire-fileupload-name\">{file.name}</span>\n <span className=\"pire-fileupload-size\">{formatFileSize(file.size)}</span>\n {isDisabled || isReadOnly ? null : (\n <IconButton\n icon=\"x\"\n size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)}\n />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} /> : null}\n\n {description ? (\n <Text slot=\"description\" className=\"pire-field-hint\">\n {description}\n </Text>\n ) : null}\n {isInvalid && errorMessage ? <span className=\"pire-field-error\">{errorMessage}</span> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { ProgressBar as AriaProgressBar, Label } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface ProgressBarProps {\n value?: number;\n minValue?: number;\n maxValue?: number;\n label?: React.ReactNode;\n showValue?: boolean;\n /** Indeterminate work — no percentage is announced. */\n isIndeterminate?: boolean;\n /** Colours the fill — e.g. negative when a budget is overrun. */\n status?: 'informative' | 'positive' | 'critical' | 'negative';\n size?: 'sm' | 'md';\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function ProgressBar({\n value = 0,\n minValue = 0,\n maxValue = 100,\n label,\n showValue = true,\n isIndeterminate,\n status = 'informative',\n size = 'md',\n className,\n style,\n}: ProgressBarProps) {\n return (\n <AriaProgressBar\n className={cx('pire-progress', className)}\n data-status={status}\n data-size={size}\n value={value}\n minValue={minValue}\n maxValue={maxValue}\n isIndeterminate={isIndeterminate}\n style={style}\n >\n {({ percentage, valueText }) => (\n <>\n {label || showValue ? (\n <div className=\"pire-progress-head\">\n {label ? <Label>{label}</Label> : <span />}\n {showValue && !isIndeterminate ? <span className=\"pire-numeric\">{valueText}</span> : null}\n </div>\n ) : null}\n <div className=\"pire-progress-track\">\n <div className=\"pire-progress-fill\" style={{ width: `${isIndeterminate ? 40 : percentage}%` }} />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n}\n","import type * as React from 'react';\nimport { MenuTrigger, Button as AriaButton, Popover } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { Breadcrumb, type BreadcrumbItem } from './Breadcrumb';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n /** Wordmark at far left, uppercase micro-caps. */\n product?: string;\n /** 1–3 letter monogram tile before the wordmark — stand-in for a customer logo. */\n monogram?: string;\n /** Current app or object title. */\n title?: React.ReactNode;\n /**\n * Where the user is — \"Ventas › Órdenes de venta › OV-000128\" — drawn after `product`, behind a\n * separator, in the bar's own colours. Current step last; it is marked `aria-current=\"page\"` and\n * is never a link. `href`s navigate through `RouterProvider`, like every other Pire link.\n *\n * The trail is the part of the bar that gives way: it takes the room the actions leave, folds its\n * middle steps into a \"…\" menu when it does not fit, and then truncates the current step with an\n * ellipsis. A screen that draws its own `Breadcrumb` above the page can drop it — the bar keeps\n * the trail in one place on every screen without costing a row of height.\n *\n * Prefer this to putting a `Breadcrumb` in `title`, which sets it in bold, on the page's link\n * colours, and with no width management.\n */\n breadcrumb?: BreadcrumbItem[];\n /** Called with a step's `id` (or its `label` when it has none) when it is pressed — for a step\n * without an `href`, or to observe navigation. Same contract as `Breadcrumb`'s `onNavigate`. */\n onBreadcrumbNavigate?: (id: string) => void;\n /**\n * The leftmost cell of the bar — pass an `AppLauncher`.\n *\n * A slot rather than launcher props of its own: the bar's job is placement, and the catalogue,\n * its search and its open state all belong to the launcher. It renders before `onMenu`, sized to\n * `--rail-w` and pulled through the bar's padding, so it sits directly above `ShellRail`.\n */\n launcher?: React.ReactNode;\n onMenu?: () => void;\n onSearch?: () => void;\n /** Accessible name for the menu button. Defaults to English, and the bar has no access to the app's\n * catalogue — a Spanish product must pass its own or ship an English screen-reader label. */\n menuLabel?: string;\n /** Accessible name for the search button, for the same reason as {@link ShellBarProps.menuLabel}.\n * Until this existed the only way to localise it was to drop `onSearch` and re-render the icon by\n * hand, which is how a shell ends up with two search icons. */\n searchLabel?: string;\n /** IconButtons with variant=\"inverse\". */\n actions?: React.ReactNode;\n /** Full name — initials render into the avatar. */\n user?: string;\n /**\n * Turns the avatar into a menu trigger. Pass a `Menu` — the entries are the product's, because\n * they differ per app; only the trigger belongs here.\n *\n * Without it the avatar stays a plain `role=\"img\"`, so nothing that renders a bare `user` today\n * changes. With it the avatar becomes a real `<button>` carrying `aria-haspopup` and\n * `aria-expanded`.\n */\n userMenu?: React.ReactNode;\n /** Accessible name of the avatar button. `{user}` is replaced with the name. Defaults to the\n * dictionary's `shellBarUserMenu`, for the same reason as {@link ShellBarProps.menuLabel}. */\n userMenuLabel?: string;\n}\n\nconst initials = (name: string) =>\n name\n .trim()\n .split(/\\s+/)\n .slice(0, 2)\n .map((p) => p[0])\n .join('')\n .toUpperCase();\n\n/** Fixed 48px application chrome. One per page, always the first landmark. */\nexport function ShellBar({\n launcher,\n product,\n monogram,\n title,\n breadcrumb,\n onBreadcrumbNavigate,\n onMenu,\n onSearch,\n menuLabel = 'Open navigation',\n searchLabel = 'Search',\n actions,\n user,\n userMenu,\n userMenuLabel,\n className,\n ...rest\n}: ShellBarProps) {\n const msg = usePireMessages();\n return (\n <header className={cx('pire-shellbar', className)} {...rest}>\n {launcher}\n {onMenu ? (\n <IconButton icon=\"menu\" label={menuLabel} variant=\"inverse\" size=\"sm\" onPress={onMenu} />\n ) : null}\n {monogram ? (\n <span className=\"pire-shellbar-mono\" aria-hidden=\"true\">\n {monogram}\n </span>\n ) : null}\n {product ? <span className=\"pire-shellbar-product\">{product}</span> : null}\n {breadcrumb?.length ? (\n <nav className=\"pire-shellbar-crumbs\" aria-label={msg.breadcrumbLabel}>\n {product || monogram ? <span className=\"pire-shellbar-sep\" aria-hidden=\"true\" /> : null}\n <Breadcrumb items={breadcrumb} onNavigate={onBreadcrumbNavigate} isCollapsible />\n </nav>\n ) : null}\n {title ? <span className=\"pire-shellbar-title\">{title}</span> : null}\n {/* With a trail the spacer would split the free room with it, and the trail would collapse\n while half the bar sat empty. The trail is the flexible item instead. */}\n {breadcrumb?.length ? null : <span className=\"pire-shellbar-spacer\" />}\n {onSearch ? (\n <IconButton icon=\"search\" label={searchLabel} variant=\"inverse\" size=\"sm\" onPress={onSearch} />\n ) : null}\n {actions}\n {user && userMenu ? (\n // A real button, not the img-role span: the avatar is where \"my profile\", \"switch company\"\n // and \"sign out\" live in any ERP, and a span accepts neither focus nor onPress. Popover is\n // rendered here rather than expected from the consumer so the panel keeps shell placement.\n <MenuTrigger>\n <AriaButton\n className=\"pire-avatar pire-avatar-trigger\"\n aria-label={(userMenuLabel ?? msg.shellBarUserMenu).replace('{user}', user)}\n >\n {initials(user)}\n </AriaButton>\n <Popover className=\"pire-popover\">{userMenu}</Popover>\n </MenuTrigger>\n ) : user ? (\n <span className=\"pire-avatar\" title={user} aria-label={user} role=\"img\">\n {initials(user)}\n </span>\n ) : null}\n </header>\n );\n}\n","import * as React from 'react';\nimport {\n Breadcrumbs as AriaBreadcrumbs,\n Breadcrumb as AriaBreadcrumb,\n Link,\n MenuTrigger,\n Button as AriaButton,\n Popover,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Menu, MenuItem } from './Menu';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface BreadcrumbItem {\n id?: string;\n label: string;\n href?: string;\n}\n\nexport interface BreadcrumbProps {\n /** Ordered trail, current page last. The last item is never a link. */\n items: BreadcrumbItem[];\n onNavigate?: (id: string) => void;\n /**\n * Keeps the trail on one line however narrow its container gets. When the whole trail does not\n * fit, the middle steps fold into a \"…\" button that opens them as a menu, keeping the first and\n * current steps on screen. On a phone-narrow container the first step folds in too. The current\n * step is never folded: it truncates with an ellipsis instead, its full text kept in `title`.\n *\n * Off by default, where the trail wraps instead. `ShellBar`'s `breadcrumb` turns it on, because\n * a 48px bar has no second line to wrap onto.\n */\n isCollapsible?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst keyOf = (item: BreadcrumbItem) => item.id ?? item.label;\n\n/** The narrowest the current step is allowed to get before the first step folds away too: about\n * six characters and an ellipsis, enough to recognise a document number by its prefix. */\nconst MIN_CURRENT = 64;\n\n/**\n * How much of the trail fits: `0` all of it, `1` first + \"…\" + current, `2` \"…\" + current.\n *\n * Measured off an invisible copy of the full trail, never off the visible one: once collapsed, the\n * visible trail always fits, so it can never say when there is room to expand again. The copy\n * carries a \"…\" of its own so the collapsed shapes can be priced before they are drawn.\n */\nfunction useFitLevel(enabled: boolean) {\n const boxRef = React.useRef<HTMLDivElement>(null);\n const measureRef = React.useRef<HTMLDivElement>(null);\n const [level, setLevel] = React.useState<0 | 1 | 2>(0);\n React.useLayoutEffect(() => {\n const box = boxRef.current;\n const measure = measureRef.current;\n if (!enabled || !box || !measure) return;\n const check = () => {\n const avail = box.clientWidth;\n const gap = Number.parseFloat(getComputedStyle(measure).columnGap) || 0;\n const steps = [...measure.querySelectorAll<HTMLElement>('[data-step]')].map((el) => el.offsetWidth);\n const more = measure.querySelector<HTMLElement>('[data-more]')?.offsetWidth ?? 0;\n const full = steps.reduce((sum, w) => sum + w, 0) + gap * Math.max(steps.length - 1, 0);\n if (full <= avail + 0.5) return setLevel(0);\n const first = steps[0] ?? 0;\n setLevel(first + more + MIN_CURRENT + gap * 2 <= avail ? 1 : 2);\n };\n check();\n const observer = new ResizeObserver(check);\n observer.observe(box);\n observer.observe(measure);\n return () => observer.disconnect();\n }, [enabled]);\n return { boxRef, measureRef, level: enabled ? level : 0 };\n}\n\nexport function Breadcrumb({ items, onNavigate, isCollapsible, className, style }: BreadcrumbProps) {\n const msg = usePireMessages();\n const { boxRef, measureRef, level } = useFitLevel(!!isCollapsible);\n const last = items[items.length - 1];\n // Level 2 folds the first step as well, which only buys anything with at least two steps; level 1\n // needs three, or there is no middle to fold.\n const foldFirst = level === 2 && items.length > 1;\n const collapse = foldFirst || (level === 1 && items.length > 2);\n const folded = collapse ? items.slice(foldFirst ? 0 : 1, -1) : [];\n const shown = collapse ? (foldFirst ? [last] : [items[0], last]) : items;\n const moreAt = foldFirst ? 0 : 1;\n\n const separator = <Icon name=\"chevron-right\" size={12} className=\"pire-breadcrumb-sep\" />;\n\n const crumb = (item: BreadcrumbItem) => {\n const isLast = item === last;\n return (\n <AriaBreadcrumb\n key={keyOf(item)}\n className=\"pire-breadcrumb\"\n id={keyOf(item)}\n data-last={isLast ? 'true' : undefined}\n >\n {isCollapsible ? (\n // A Link even for the current step, because that is what React Aria marks\n // `aria-current=\"page\"`. The `title` is what reads the step whole once it truncates.\n // A class, not an `a` selector: React Aria renders a Link with no `href` as a <span>.\n <Link className=\"pire-breadcrumb-link\" href={isLast ? undefined : item.href}>\n <span title={isLast ? item.label : undefined}>{item.label}</span>\n </Link>\n ) : isLast ? (\n item.label\n ) : (\n <Link href={item.href}>{item.label}</Link>\n )}\n {isLast ? null : separator}\n </AriaBreadcrumb>\n );\n };\n\n if (!isCollapsible) {\n return (\n <AriaBreadcrumbs\n className={cx('pire-breadcrumbs', className)}\n style={style}\n items={items}\n onAction={(key) => onNavigate?.(String(key))}\n >\n {(item) => crumb(item)}\n </AriaBreadcrumbs>\n );\n }\n\n return (\n <div ref={boxRef} className={cx('pire-breadcrumbs-fit', className)} style={style}>\n <AriaBreadcrumbs\n className=\"pire-breadcrumbs\"\n data-collapsible=\"true\"\n onAction={(key) => onNavigate?.(String(key))}\n >\n {shown.map((item, i) =>\n collapse && i === moreAt ? (\n <React.Fragment key=\"__more__\">\n <AriaBreadcrumb className=\"pire-breadcrumb\" id=\"__pire_breadcrumb_more__\">\n <MenuTrigger>\n <AriaButton className=\"pire-breadcrumb-more\" aria-label={msg.breadcrumbMore}>\n <Icon name=\"more-horizontal\" size={16} />\n </AriaButton>\n <Popover className=\"pire-popover\">\n <Menu onAction={(key) => onNavigate?.(String(key))}>\n {folded.map((step) => (\n <MenuItem key={keyOf(step)} id={keyOf(step)} href={step.href}>\n {step.label}\n </MenuItem>\n ))}\n </Menu>\n </Popover>\n </MenuTrigger>\n {separator}\n </AriaBreadcrumb>\n {crumb(item)}\n </React.Fragment>\n ) : (\n crumb(item)\n ),\n )}\n </AriaBreadcrumbs>\n {/* The full trail, laid out but never painted, so it can be measured at its natural width.\n `inert` and `aria-hidden` keep it out of the tab order and the accessibility tree. The box\n around it clips, so a trail wider than the bar does not widen the bar's scroll area. */}\n <div className=\"pire-breadcrumbs-measure\" aria-hidden=\"true\" inert>\n <div ref={measureRef} className=\"pire-breadcrumbs\" data-measure=\"true\">\n {items.map((item) => (\n <span\n key={keyOf(item)}\n className=\"pire-breadcrumb\"\n data-step=\"true\"\n data-last={item === last ? 'true' : undefined}\n >\n <span>{item.label}</span>\n {item === last ? null : separator}\n </span>\n ))}\n <span className=\"pire-breadcrumb\" data-more=\"true\">\n <span className=\"pire-breadcrumb-more\">\n <Icon name=\"more-horizontal\" size={16} />\n </span>\n {separator}\n </span>\n </div>\n </div>\n </div>\n );\n}\n","import type * as React from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n Separator as AriaSeparator,\n Header,\n type MenuProps as AriaMenuProps,\n type MenuItemProps as AriaMenuItemProps,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Kbd } from '../core/Kbd';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object = object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {\n /** Accessible name when the trigger does not supply one. `MenuTrigger` usually does. */\n 'aria-label'?: string;\n /** Floor for the panel width. The panel sizes to its content, not to the trigger. */\n minWidth?: number | string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The surface inside a `MenuTrigger`. Wrap it in a `Popover`, the way `Select` does. */\nexport function Menu<T extends object = object>({ minWidth, className, style, ...rest }: MenuProps<T>) {\n const width = typeof minWidth === 'number' ? `${minWidth}px` : minWidth;\n const menuStyle =\n width == null ? style : ({ ['--pire-menu-min-w' as string]: width, ...style } as React.CSSProperties);\n\n return (\n <AriaMenu className={cx('pire-menu', className)} style={menuStyle} {...(rest as AriaMenuProps<T>)} />\n );\n}\n\nexport interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** Icon slug before the label. Same vocabulary as `Button.icon`. */\n icon?: string;\n /** Second line, for an action whose effect is not obvious from its label. */\n description?: React.ReactNode;\n /**\n * Keyboard shortcut, right-aligned and drawn as key caps. Painted only — it registers nothing.\n *\n * A string is split on `+` and spaces, so `\"Ctrl+Shift+P\"` renders as three caps. Pass an array\n * when the split cannot be inferred: `['⌘', 'N']`, since `\"⌘N\"` has no separator to split on.\n */\n shortcut?: string | string[];\n /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */\n tone?: 'default' | 'danger';\n className?: string;\n}\n\n/** Splits `\"Ctrl+Shift+P\"` into its caps. An array is taken as given, because a chord written\n * without separators — `\"⌘N\"` — cannot be split without guessing where one key ends. */\nconst shortcutKeys = (shortcut: string | string[] | undefined): string[] => {\n if (shortcut == null) return [];\n const parts = Array.isArray(shortcut) ? shortcut : shortcut.split(/[+\\s]+/);\n return parts.map((part) => part.trim()).filter(Boolean);\n};\n\n/** A single command. Accepts `href`, so navigation items render a real anchor. */\nexport function MenuItem({\n children,\n icon,\n description,\n shortcut,\n tone = 'default',\n className,\n ...rest\n}: MenuItemProps) {\n const keys = shortcutKeys(shortcut);\n return (\n <AriaMenuItem\n className={cx('pire-menu-item', className)}\n data-tone={tone === 'danger' ? 'danger' : undefined}\n {...rest}\n >\n {icon ? <Icon name={icon} size={16} className=\"pire-menu-item-icon\" /> : null}\n <span className=\"pire-menu-item-body\">\n <span className=\"pire-menu-item-label\">{children}</span>\n {description ? <span className=\"pire-menu-item-desc\">{description}</span> : null}\n </span>\n {keys.length ? (\n <span className=\"pire-menu-item-shortcut\">\n {keys.map((cap, index) => (\n <Kbd\n // biome-ignore lint/suspicious/noArrayIndexKey: position is the identity of a cap in a fixed chord, and a glyph may repeat\n key={`${cap}-${index}`}\n size=\"sm\"\n >\n {cap}\n </Kbd>\n ))}\n </span>\n ) : null}\n </AriaMenuItem>\n );\n}\n\n// `title` shadows the DOM tooltip attribute, so it must be Omitted before being redeclared.\nexport interface MenuSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n /** Section heading. Rendered as a `Header`, not as a focusable item. */\n title?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\n/** Groups related commands under an optional heading. */\nexport function MenuSection({ title, children, className, ...rest }: MenuSectionProps) {\n return (\n <AriaMenuSection className={cx('pire-menu-section', className)} {...rest}>\n {title ? <Header className=\"pire-menu-section-title\">{title}</Header> : null}\n {children}\n </AriaMenuSection>\n );\n}\n\nexport interface MenuSeparatorProps {\n className?: string;\n}\n\n/** Rule between groups of items, on the menu's rhythm rather than the page's. */\nexport function MenuSeparator({ className }: MenuSeparatorProps) {\n return <AriaSeparator className={cx('pire-menu-separator', className)} />;\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport {\n Button as AriaButton,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n MenuTrigger,\n Popover,\n} from 'react-aria-components';\nimport { Menu, MenuItem } from './Menu';\nimport type { Key } from 'react-aria-components';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** A second-level destination, nested under a first-level entry.\n *\n * Deliberately has no `icon`: only the first level carries one, so the second level reads as an\n * indented list of labels under a single glyph rather than a wall of decoration. Leaving `icon` off\n * the *type* is what stops that drifting back in one call site at a time. */\nexport interface SideNavChildItem {\n id: string;\n label: string;\n count?: number;\n}\n\nexport interface SideNavItem {\n id: string;\n label: string;\n icon?: string;\n count?: number;\n /** Second-level destinations. Supplying this turns the entry into a collapsible group: it stops\n * being a destination itself (pressing it expands, never navigates) and `id` becomes the\n * expansion key used by `expandedIds` / `defaultExpandedIds`, not something `onChange` can ever\n * emit. Omit it and the entry behaves exactly as it always has. */\n items?: SideNavChildItem[];\n}\n\nexport interface SideNavGroup {\n label?: string;\n items: SideNavItem[];\n}\n\nexport interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Spaces-and-pages hierarchy: one group per space. */\n groups: SideNavGroup[];\n value?: string;\n /** Fires with the selected item id — not a DOM change event. Only ever a destination id: a\n * first-level entry that owns `items` is a disclosure, and toggling it does not fire this. */\n onChange?: (id: string) => void;\n /** Expanded first-level entry ids — the controlled half of the pair. Pass it and you own expansion\n * outright, including expanding the group that holds `value`. */\n expandedIds?: string[];\n /** Initial expanded ids for the uncontrolled case. Omit it and the group holding `value` opens\n * itself; supply it and it is taken literally, so `value`'s group can start closed if that is\n * genuinely what you want. */\n defaultExpandedIds?: string[];\n /** Fires with every expanded id after a toggle, controlled or not. */\n onExpandedChange?: (ids: string[]) => void;\n /** 48px icon rail. Labels move into tooltips or, for a group, into its flyout. */\n collapsed?: boolean;\n /**\n * Draws the trailing rule that separates the nav from the page. On by default, because the nav\n * is normally the shell's own column and is the only thing that knows to draw it.\n *\n * Pass `false` when it is embedded beside something that draws its own border — a panel, a grid\n * track, a card — where the two rules stack into a double line.\n */\n bordered?: boolean;\n /**\n * In the rail, a group opens its children in a flyout beside it. On by default: without it the\n * rail records an expansion nothing can draw, leaving second-level destinations reachable only\n * by expanding the nav again.\n *\n * Pass `false` for the previous behaviour, where a rail group toggles expansion invisibly.\n */\n railFlyout?: boolean;\n footer?: React.ReactNode;\n}\n\n/** Which first-level entry owns `value`, if any. Undefined when `value` is a first-level destination. */\nfunction findActiveParent(groups: SideNavGroup[], value: string | undefined): string | undefined {\n if (value == null) return undefined;\n for (const group of groups) {\n for (const item of group.items) {\n if (item.items?.some((child) => child.id === value)) return item.id;\n }\n }\n return undefined;\n}\n\n/** Primary navigation. A first-level entry is either a destination (icon + label, selectable) or a\n * collapsible group (icon + label + chevron) when it carries `items` — the two coexist in one list,\n * which is how a 35-destination ERP menu fits without showing all 35 at once.\n *\n * Both levels are plain `Button`s and the disclosure is React Aria's `Disclosure` /\n * `DisclosureGroup`, so `aria-expanded`, `aria-controls`, the panel's `role=\"group\"` and\n * `aria-labelledby`, and Enter/Space on the trigger all come from React Aria rather than from\n * hand-rolled ARIA here.\n *\n * Three things worth knowing before you use it:\n *\n * - **The panel is always in the DOM.** React Aria hides a collapsed panel with\n * `hidden=\"until-found\"`, applied imperatively in a layout effect, so find-in-page can reveal it.\n * A test asserting a collapsed child is *absent* will fail; assert `aria-expanded` on the trigger,\n * or visibility, instead. The corollary in CSS: any `display` we set on the panel would beat the\n * UA's `[hidden] { display: none }`, leaving collapsed children focusable under\n * `aria-hidden=\"true\"`. `.pire-sidenav-subnav[hidden]` in `components.css` is that guard.\n * - **`collapsed` and expansion are different axes, and the rail wins.** With `collapsed` set there\n * are no labels, and a second level is nothing *but* labels. A group therefore opens its children\n * in a flyout beside the rail (`railFlyout`, on by default) rather than inline. With\n * `railFlyout={false}` the row falls back to recording the expansion silently — which leaves\n * second-level destinations reachable only by expanding the nav again, so it is off the\n * accessible path and exists for compatibility.\n * - **Several groups can be open at once**, and there is no accordion mode. Closing the group you\n * are in to open another is the wrong trade in a nav whose whole job is showing where you are. */\nexport function SideNav({\n groups,\n value,\n onChange,\n expandedIds,\n defaultExpandedIds,\n onExpandedChange,\n collapsed,\n railFlyout = true,\n bordered = true,\n footer,\n className,\n ...rest\n}: SideNavProps) {\n const msg = usePireMessages();\n const activeParent = findActiveParent(groups, value);\n const isControlled = expandedIds != null;\n const [ownExpanded, setOwnExpanded] = React.useState<Set<string>>(\n () => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : [])),\n );\n const [lastValue, setLastValue] = React.useState(value);\n\n // Reveal the group owning a *newly* selected destination. Seeding state at mount is not enough in a\n // router-driven app: a breadcrumb or a deep link can move `value` into a closed group, and the\n // current location would then be invisible. Keyed off the change rather than off `value` itself, so\n // a group the user closed by hand stays closed. Adjust-state-during-render, not an effect — React\n // re-runs this render before committing, so the panel never paints closed and then open.\n if (value !== lastValue) {\n setLastValue(value);\n if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {\n setOwnExpanded(new Set(ownExpanded).add(activeParent));\n }\n }\n\n const expanded = isControlled ? new Set(expandedIds) : ownExpanded;\n\n const commitExpanded = (next: Set<string>): void => {\n if (!isControlled) setOwnExpanded(next);\n onExpandedChange?.([...next]);\n };\n\n /** React Aria hands back the whole set, typed as `Key` (which widens to number). Ids are strings. */\n const handleExpandedChange = (keys: Set<Key>): void => commitExpanded(new Set([...keys].map(String)));\n\n const toggleExpanded = (id: string): void => {\n const next = new Set(expanded);\n if (!next.delete(id)) next.add(id);\n commitExpanded(next);\n };\n\n /** A first-level row: the leaf case, and the rail-mode rendering of a group. */\n const renderRow = (item: SideNavItem, onPress: () => void, isGroup: boolean) => {\n const selected = !isGroup && item.id === value;\n const button = (\n <AriaButton\n key={item.id}\n className=\"pire-sidenav-item\"\n data-selected={selected ? 'true' : undefined}\n data-active-child={isGroup && item.id === activeParent ? 'true' : undefined}\n aria-current={selected ? 'page' : undefined}\n // In the rail the visible label is dropped and the Icon is decorative, which left the\n // button with no accessible name at all. The Tooltip does not cover this: React Aria\n // wires it up as aria-describedby, and a description is not a name — a screen reader\n // announced these as an unlabelled \"button\". Expanded, the <span> below names it.\n aria-label={collapsed ? item.label : undefined}\n onPress={onPress}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n {collapsed ? null : <span>{item.label}</span>}\n {item.count != null && !collapsed ? <span className=\"pire-sidenav-count\">{item.count}</span> : null}\n </AriaButton>\n );\n // The Tooltip stays: it is the sighted affordance for the same missing label.\n return collapsed ? (\n <Tooltip key={item.id} label={item.label} placement=\"right\">\n {button}\n </Tooltip>\n ) : (\n button\n );\n };\n\n /** A rail group: the icon button, with its children in a flyout beside the rail.\n *\n * Built on MenuTrigger so roving focus, type-ahead and Escape-returns-focus come from React\n * Aria. The trade-off is that a child is a `menuitem` here and a `link` when the nav is\n * expanded — one destination with two roles depending on chrome state. That is deliberate:\n * the interaction genuinely differs, and the alternative was hand-rolling arrow-key handling. */\n const renderRailFlyout = (item: SideNavItem) => (\n <MenuTrigger key={item.id}>\n <AriaButton\n className=\"pire-sidenav-item\"\n aria-label={item.label}\n data-active-child={item.id === activeParent ? 'true' : undefined}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n </AriaButton>\n <Popover className=\"pire-popover\" placement=\"right top\" offset={4}>\n <Menu\n aria-label={item.label}\n className=\"pire-sidenav-flyout\"\n onAction={(key) => onChange?.(String(key))}\n >\n {(item.items ?? []).map((child) => (\n <MenuItem key={child.id} id={child.id}>\n {child.label}\n </MenuItem>\n ))}\n </Menu>\n </Popover>\n </MenuTrigger>\n );\n\n const renderSection = (item: SideNavItem) => (\n <Disclosure key={item.id} id={item.id} className=\"pire-sidenav-section\">\n {/* No onPress of our own: React Aria's ButtonContext supplies the toggle through\n slot=\"trigger\", and one here would navigate as a side effect of expanding. */}\n <AriaButton\n slot=\"trigger\"\n className=\"pire-sidenav-item\"\n data-kind=\"group\"\n data-active-child={item.id === activeParent ? 'true' : undefined}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n <span>{item.label}</span>\n {item.count != null ? <span className=\"pire-sidenav-count\">{item.count}</span> : null}\n <Icon name=\"chevron-down\" size={16} className=\"pire-sidenav-chevron\" />\n </AriaButton>\n <DisclosurePanel className=\"pire-sidenav-subnav\">\n {item.items?.map((child) => {\n const selected = child.id === value;\n return (\n <AriaButton\n key={child.id}\n className=\"pire-sidenav-item pire-sidenav-subitem\"\n data-selected={selected ? 'true' : undefined}\n aria-current={selected ? 'page' : undefined}\n onPress={() => onChange?.(child.id)}\n >\n <span>{child.label}</span>\n {child.count != null ? <span className=\"pire-sidenav-count\">{child.count}</span> : null}\n </AriaButton>\n );\n })}\n </DisclosurePanel>\n </Disclosure>\n );\n\n return (\n <nav\n className={cx('pire-sidenav', className)}\n data-collapsed={collapsed ? 'true' : undefined}\n data-bordered={bordered ? undefined : 'false'}\n aria-label={msg.sideNavLabel}\n {...rest}\n >\n {groups.map((group, gi) => {\n const hasSections = !collapsed && group.items.some((item) => item.items?.length);\n const rows = group.items.map((item) => {\n const isGroup = Boolean(item.items?.length);\n if (isGroup && !collapsed) return renderSection(item);\n if (isGroup && collapsed && railFlyout) return renderRailFlyout(item);\n return renderRow(item, () => (isGroup ? toggleExpanded(item.id) : onChange?.(item.id)), isGroup);\n });\n return (\n <div className=\"pire-sidenav-group\" key={group.label ?? gi}>\n {group.label && !collapsed ? <div className=\"pire-sidenav-label\">{group.label}</div> : null}\n {/* The DisclosureGroup wrapper appears only where something is actually collapsible, so a\n flat `groups` renders the DOM it rendered before any of this existed. */}\n {hasSections ? (\n <DisclosureGroup\n className=\"pire-sidenav-tree\"\n allowsMultipleExpanded\n expandedKeys={expanded}\n onExpandedChange={handleExpandedChange}\n >\n {rows}\n </DisclosureGroup>\n ) : (\n rows\n )}\n </div>\n );\n })}\n {footer ? <div className=\"pire-sidenav-footer\">{footer}</div> : null}\n </nav>\n );\n}\n","import * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** One application, or one company-wide destination. `icon` is required, not optional: the rail has\n * no room for a label, so an entry without a glyph would render as an empty 48px gap. */\nexport interface ShellRailItem {\n /** Passed back to `onChange`. Unique across every group. */\n id: string;\n /** The tooltip, and the entry's accessible name. Never drawn as text. */\n label: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon: string;\n}\n\nexport interface ShellRailGroup {\n items: ShellRailItem[];\n /**\n * Marks the zone that absorbs overflow, so the zones around it stay pinned while this one\n * scrolls. An ERP rail is a short pinned head, a long list of apps, and a short pinned tail; with\n * no group marked the rail scrolls as a whole and the tail scrolls off with everything else.\n *\n * Only one group should carry it. A second is not an error, but two flexible zones divide the\n * space between them and neither ends up the length it looks like it should be.\n */\n isScrollable?: boolean;\n}\n\nexport interface ShellRailProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Zones, in order, separated by a hairline rule. */\n groups: ShellRailGroup[];\n /** Id of the open application. */\n value?: string;\n /** Fires with the chosen item's id — not a DOM change event. */\n onChange?: (id: string) => void;\n}\n\n/**\n * The first of two navigation levels: which **application** is open. `SideNav` is the second — which\n * page is open inside it — and the two are independent, so an app with a single page renders a rail\n * and no nav, and a single-app product renders a nav and no rail.\n *\n * Icon-only by construction. Each entry is a React Aria `Button` carrying its label as\n * `aria-label` and wrapped in a right-placed `Tooltip`, which is the same pairing a collapsed\n * `SideNav` row uses and for the same reason: React Aria wires a tooltip up as `aria-describedby`,\n * and a description is not a name — without the `aria-label` a screen reader announces eleven\n * unlabelled buttons.\n *\n * Two things worth knowing:\n *\n * - **The selected entry is marked `aria-current=\"true\"`, not `\"page\"`.** It names the current\n * application, and the current *page* is the `SideNav` leaf inside it. Both levels claiming\n * `page` would announce two current pages on one screen.\n * - **The selection is a fill plus a ring, and needs both.** The fill is a tint at 1.64:1 against\n * the rail; `--border-rail-selected` is what clears the 3:1 WCAG 1.4.11 asks of a state\n * indicator. Restyling the tile without the ring makes selection invisible to anyone who cannot\n * separate two close blues.\n */\nexport function ShellRail({ groups, value, onChange, className, ...rest }: ShellRailProps) {\n const msg = usePireMessages();\n return (\n <nav className={cx('pire-shellrail', className)} aria-label={msg.shellRailLabel} {...rest}>\n {groups.map((group, gi) => (\n // The divider is a sibling of the groups rather than a pseudo-element on one, because the\n // scrolling zone would carry its own rule out of view on the first wheel event.\n <React.Fragment key={group.items[0]?.id ?? gi}>\n {gi > 0 ? <div className=\"pire-shellrail-divider\" /> : null}\n <div className=\"pire-shellrail-group\" data-scroll={group.isScrollable ? 'true' : undefined}>\n {group.items.map((item) => (\n <Tooltip key={item.id} label={item.label} placement=\"right\">\n <AriaButton\n className=\"pire-shellrail-item\"\n aria-label={item.label}\n data-selected={item.id === value ? 'true' : undefined}\n aria-current={item.id === value ? 'true' : undefined}\n onPress={() => onChange?.(item.id)}\n >\n <span className=\"pire-shellrail-tile\">\n <Icon name={item.icon} size={20} />\n </span>\n </AriaButton>\n </Tooltip>\n ))}\n </div>\n </React.Fragment>\n ))}\n </nav>\n );\n}\n","import type * as React from 'react';\nimport { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface TabItem {\n id: string;\n label: string;\n icon?: string;\n count?: number;\n isDisabled?: boolean;\n}\n\nexport interface TabsProps {\n items: TabItem[];\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Optional panel content keyed by tab id. Omit when the tabs drive an external region —\n * the panel element is still rendered (empty and unstyled) so the tab's `aria-controls`\n * has something to point at. */\n panels?: Record<string, React.ReactNode>;\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Peer views of one object. Arrow keys move between tabs; the panel is one tab stop away. */\nexport function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }: TabsProps) {\n return (\n <AriaTabs\n className={className}\n style={style}\n selectedKey={value}\n defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => onChange?.(String(k))}\n >\n <TabList className=\"pire-tablist\" items={items} aria-label={rest['aria-label'] ?? 'Views'}>\n {(item) => (\n <AriaTab className={cx('pire-tab')} id={item.id} isDisabled={item.isDisabled}>\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n {item.label}\n {item.count != null ? <span className=\"pire-tab-count\">{item.count}</span> : null}\n </AriaTab>\n )}\n </TabList>\n {/* Rendered for every tab, with or without `panels`. React Aria puts `aria-controls` on\n the selected tab pointing at that tab's generated tabpanel id unconditionally, so\n omitting the panel leaves the reference dangling: invalid ARIA, and an axe\n `aria-valid-attr-value` failure in any consuming app that drives an external region.\n React Aria mounts only the selected panel, and with no content it is an empty,\n zero-height element — the padded `.pire-tabpanel` box is applied only when there is\n actually content to sit in it. */}\n {items.map((item) => (\n <TabPanel key={item.id} id={item.id} className={panels ? 'pire-tabpanel' : undefined}>\n {panels?.[item.id]}\n </TabPanel>\n ))}\n </AriaTabs>\n );\n}\n","import type * as React from 'react';\nimport { IconButton } from '../core/IconButton';\nimport { Select } from '../forms/Select';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface PaginationProps {\n page?: number;\n pageSize?: number;\n /** Total record count — always shown, so users know the data set size. */\n total?: number;\n onPageChange?: (page: number) => void;\n onPageSizeChange?: (size: number) => void;\n pageSizes?: number[];\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function Pagination({\n page = 1,\n pageSize = 25,\n total = 0,\n onPageChange,\n onPageSizeChange,\n pageSizes = [25, 50, 100],\n className,\n style,\n}: PaginationProps) {\n const msg = usePireMessages();\n const pages = Math.max(1, Math.ceil(total / pageSize));\n const from = total === 0 ? 0 : (page - 1) * pageSize + 1;\n const to = Math.min(total, page * pageSize);\n return (\n <nav className={cx('pire-pagination', className)} style={style} aria-label={msg.paginationLabel}>\n <span className=\"pire-pagination-count\">\n {msg.paginationRange\n .replace('{from}', from.toLocaleString())\n .replace('{to}', to.toLocaleString())\n .replace('{total}', total.toLocaleString())}\n </span>\n <IconButton\n icon=\"chevron-left\"\n label={msg.paginationPrevious}\n size=\"sm\"\n variant=\"outlined\"\n isDisabled={page <= 1}\n onPress={() => onPageChange?.(page - 1)}\n />\n <span className=\"pire-pagination-count\" aria-live=\"polite\">\n {msg.paginationPageOf.replace('{page}', String(page)).replace('{pages}', String(pages))}\n </span>\n <IconButton\n icon=\"chevron-right\"\n label={msg.paginationNext}\n size=\"sm\"\n variant=\"outlined\"\n isDisabled={page >= pages}\n onPress={() => onPageChange?.(page + 1)}\n />\n {onPageSizeChange ? (\n <Select\n aria-label={msg.paginationRowsPerPage}\n size=\"sm\"\n fullWidth={false}\n value={String(pageSize)}\n options={pageSizes.map((s) => ({ value: String(s), label: `${s} rows` }))}\n onChange={(v) => onPageSizeChange(Number(v))}\n style={{ width: 120 }}\n />\n ) : null}\n </nav>\n );\n}\n","import * as React from 'react';\nimport { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel, Toolbar, Button } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { ComingSoonMark, comingSoonProps } from '../core/ComingSoonMark';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface RibbonCommandProps {\n /** Visible text *and* accessible name. Never hand-break it across lines — a large command's\n * tile has a fixed width and wraps the caption itself, so one string stays one name. */\n label: string;\n /** Lucide slug, resolved through CARBON_MAP like every other icon in the library. */\n icon?: string;\n /** `lg` is the stacked icon-over-caption tile that anchors a group; `sm` is the stacked list\n * beside it. A group with no `lg` command reads as a list of options rather than a place. */\n size?: 'sm' | 'lg';\n onPress?: () => void;\n isDisabled?: boolean;\n /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —\n * a command that fires against an empty selection is the bug this prevents. */\n requiresSelection?: boolean;\n /**\n * An action the product will have but does not have yet: drawn in the tertiary ink with a \"Soon\"\n * mark, in the band and in the collapsed bar, focusable with `aria-disabled=\"true\"`, and never\n * pressed. See `Button`'s `isComingSoon` for why this is not `isDisabled`.\n *\n * `requiresSelection` never brings it to life — an action that does not exist does not start\n * existing because rows were selected.\n */\n isComingSoon?: boolean;\n /**\n * The screen's main action — \"Nuevo presupuesto\", \"Facturar\", \"Aprobar\". Declared once and drawn\n * in the primary fill in both modes: as the first large tile of its group while the ribbon is\n * open (it is always `lg`, whatever `size` says), and at the very front of the collapsed bar,\n * before `leading`, without needing `inBar`.\n *\n * One per ribbon. It is what `leading` was being borrowed for, and `leading` keeps its own job:\n * row context such as the saved-view chip, not an action. Ignored on a contextual tab's commands,\n * which never reach the bar.\n */\n isPrimary?: boolean;\n /**\n * Explanation shown on hover and on keyboard focus. Commands are configuration elements, so a\n * `Tooltip` cannot be wrapped around one from outside; this is the slot instead. Its natural\n * partner is `isComingSoon` — \"Sends the order PDF to the customer's WhatsApp\" — but any command\n * can carry one.\n */\n tooltip?: React.ReactNode;\n /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for\n * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */\n inBar?: boolean;\n}\n\nexport interface RibbonGroupProps {\n /** The group's name. Rendered under the commands *and* used as the `role=\"group\"` label, so it\n * has to read as a category on its own — \"Stock\", not \"Actions\". */\n caption: string;\n children?: React.ReactNode;\n}\n\nexport interface RibbonTabProps {\n id: string;\n label: string;\n /** Renders the tab only while `selectionCount > 0`, in the teal that means \"acting on a\n * selection\". Put the commands that only make sense against selected rows here. */\n isContextual?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface RibbonProps {\n /** Names the tab list when expanded, and the bar when collapsed — whichever is on screen. */\n 'aria-label': string;\n /** `Ribbon.Tab` elements. */\n children?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Collapses the band to a single command bar. Controlled when supplied, uncontrolled when not. */\n isCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Rendered at the start of the **collapsed bar only**. Expanded mode has a tab list there.\n * Its reason for existing is the saved-view chip, which a collapsed screen has nowhere else\n * to put. */\n leading?: React.ReactNode;\n /** Trailing slot in both modes, before the collapse toggle — usually the overflow IconButton. */\n actions?: React.ReactNode;\n /** How many records are selected. Drives `requiresSelection` on commands and the visibility of\n * `isContextual` tabs, so the ribbon never offers an action with nothing to act on. */\n selectionCount?: number;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/* --- Configuration elements ------------------------------------------------\n These are never rendered. `Ribbon` reads `props` off them, which is what lets one authored tree\n produce both the expanded band and the collapsed bar. Rendering one directly means it escaped\n the tree, so each throws rather than returning null — a config element that silently vanishes\n takes a whole command group with it and reports nothing. */\n\nconst outside = (what: string, parent: string) => {\n const Config = () => {\n throw new Error(`[pire] ${what} must be a child of ${parent}.`);\n };\n // A named function, because the misnesting error below reports the child it got by its own\n // name. Assigning an arrow function to a `const` and then casting it left `.name` empty, so the\n // single most likely authoring mistake with this API reported \"and got .\" — nothing at all.\n // `name` is not writable but is configurable, and it is the only place a dotted name fits.\n Object.defineProperty(Config, 'name', { value: what });\n Config.displayName = what;\n return Config;\n};\n\n/** @see RibbonTabProps */\nexport const RibbonTab = outside('Ribbon.Tab', 'Ribbon') as (props: RibbonTabProps) => React.ReactElement;\n/** @see RibbonGroupProps */\nexport const RibbonGroup = outside('Ribbon.Group', 'Ribbon.Tab') as (\n props: RibbonGroupProps,\n) => React.ReactElement;\n/** @see RibbonCommandProps */\nexport const RibbonCommand = outside('Ribbon.Command', 'Ribbon.Group') as (\n props: RibbonCommandProps,\n) => React.ReactElement;\n\n/* --- Reading the tree ------------------------------------------------------ */\n\ntype Keyed<P> = P & { key: string };\ntype ReadCommand = Keyed<RibbonCommandProps>;\ntype ReadGroup = Keyed<RibbonGroupProps> & { commands: ReadCommand[] };\ntype ReadTab = Keyed<RibbonTabProps> & { groups: ReadGroup[] };\n\n/**\n * Collects children of exactly one type, descending through fragments.\n *\n * `React.Children.forEach` flattens arrays — so `.map()` works — but treats a fragment as a single\n * child, so it is walked by hand. Anything else is an error rather than a skip: the whole point of\n * configuration elements is that the parent can see the tree, and it cannot see through a\n * component boundary.\n */\nconst CONFIG_ELEMENTS = new Set<unknown>([RibbonTab, RibbonGroup, RibbonCommand]);\n\n/** What to call the thing that turned up where a configuration element was expected. */\nfunction describe(child: React.ReactNode): string {\n if (!React.isValidElement(child)) return JSON.stringify(child);\n if (typeof child.type === 'string') return `<${child.type}>`;\n const type = child.type as { displayName?: string; name?: string };\n // `||`, not `??`: an anonymous function has `name === ''`, and `'' ?? x` is `''`.\n return type?.displayName || type?.name || 'a component';\n}\n\nfunction childrenOfType<P>(\n children: React.ReactNode,\n type: unknown,\n what: string,\n parent: string,\n): Keyed<P>[] {\n const out: Keyed<P>[] = [];\n const walk = (nodes: React.ReactNode, path: string) => {\n React.Children.forEach(nodes, (child, i) => {\n if (child == null || typeof child === 'boolean') return;\n if (React.isValidElement(child) && child.type === React.Fragment) {\n return walk((child.props as { children?: React.ReactNode }).children, `${path}${i}.`);\n }\n if (!React.isValidElement(child) || child.type !== type) {\n // The wrapper hint only when the child genuinely is one. Appended to a plain misnesting —\n // a `Ribbon.Command` written straight under a `Ribbon.Tab` — it sends the reader hunting\n // for a wrapper component that does not exist.\n const isWrapper =\n React.isValidElement(child) && typeof child.type !== 'string' && !CONFIG_ELEMENTS.has(child.type);\n throw new Error(\n `[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` +\n (isWrapper\n ? ` Configuration elements are read, not rendered, so ${parent} cannot see` +\n ' through a wrapper component.'\n : ''),\n );\n }\n out.push({ ...(child.props as P), key: child.key != null ? String(child.key) : `${path}${i}` });\n });\n };\n walk(children, '');\n return out;\n}\n\nfunction readTabs(children: React.ReactNode): ReadTab[] {\n return childrenOfType<RibbonTabProps>(children, RibbonTab, 'Ribbon.Tab', 'Ribbon').map((tab) => ({\n ...tab,\n groups: childrenOfType<RibbonGroupProps>(tab.children, RibbonGroup, 'Ribbon.Group', 'Ribbon.Tab').map(\n (group) => ({\n ...group,\n commands: childrenOfType<RibbonCommandProps>(\n group.children,\n RibbonCommand,\n 'Ribbon.Command',\n 'Ribbon.Group',\n ),\n }),\n ),\n }));\n}\n\n/* --- Rendering ------------------------------------------------------------- */\n\n/**\n * `inBar` renders the compact presentation regardless of the authored `size`, because `size` is a\n * band concept: `lg` means the stacked 78x68 tile that anchors a group, and the collapsed bar is a\n * 32px row with no groups to anchor. A tile dropped into it kept `flex-direction: column` and its\n * fixed width, so half the bar's captions were clipped mid-word. One line, sized to its label.\n */\nfunction Command({\n command,\n selectionCount,\n inBar,\n}: {\n command: ReadCommand;\n selectionCount: number;\n inBar?: boolean;\n}) {\n const size = inBar ? 'sm' : command.isPrimary ? 'lg' : (command.size ?? 'sm');\n // `requiresSelection` only ever *adds* a reason to be disabled. An explicit isDisabled — no\n // permission, wrong document state — must survive a selection appearing.\n // A coming-soon command is never `isDisabled`, whatever the selection says: disabling it would\n // take it out of the toolbar's arrow-key order, and the mark it carries is the message.\n const msg = usePireMessages();\n const comingSoon = command.isComingSoon === true;\n const isDisabled =\n !comingSoon && (command.isDisabled || (command.requiresSelection === true && selectionCount === 0));\n const button = (\n <Button\n className=\"pire-ribbon-command\"\n data-size={size}\n data-primary={command.isPrimary ? 'true' : undefined}\n isDisabled={isDisabled}\n onPress={command.onPress}\n {...(comingSoon ? comingSoonProps(command.label, msg.comingSoon) : {})}\n >\n {comingSoon && size === 'lg' ? (\n // The tile is a column with no room for a third line under a two-line caption, and a mark\n // pinned to its corner lands on the icon. Beside the icon is the one place it fits.\n <span className=\"pire-ribbon-command-head\">\n {command.icon ? <Icon name={command.icon} size={20} /> : null}\n <ComingSoonMark announce={false} />\n </span>\n ) : command.icon ? (\n <Icon name={command.icon} size={size === 'lg' ? 20 : 16} />\n ) : null}\n <span className=\"pire-ribbon-command-label\">{command.label}</span>\n {comingSoon && size !== 'lg' ? <ComingSoonMark announce={false} /> : null}\n </Button>\n );\n return command.tooltip ? <Tooltip label={command.tooltip}>{button}</Tooltip> : button;\n}\n\nfunction Group({ group, selectionCount }: { group: ReadGroup; selectionCount: number }) {\n // The primary command leads its group, and is a tile however it was authored.\n const isLarge = (c: ReadCommand) => c.isPrimary || (c.size ?? 'sm') === 'lg';\n const large = [\n ...group.commands.filter((c) => c.isPrimary),\n ...group.commands.filter((c) => !c.isPrimary && isLarge(c)),\n ];\n const small = group.commands.filter((c) => !isLarge(c));\n return (\n <div className=\"pire-ribbon-group\" role=\"group\" aria-label={group.caption}>\n <div className=\"pire-ribbon-group-body\">\n {large.map((c) => (\n <Command key={c.key} command={c} selectionCount={selectionCount} />\n ))}\n {small.length ? (\n <div className=\"pire-ribbon-stack\">\n {small.map((c) => (\n <Command key={c.key} command={c} selectionCount={selectionCount} />\n ))}\n </div>\n ) : null}\n </div>\n {/* aria-hidden: the same string is already this group's accessible name, and announcing it\n twice makes every command sound like it belongs to \"Stock Stock\". */}\n <div className=\"pire-ribbon-caption\" aria-hidden=\"true\">\n {group.caption}\n </div>\n </div>\n );\n}\n\n/**\n * Reports whether the scroller it is attached to still hides content past its right edge.\n *\n * The freeze line is drawn from this and nothing else. Drawn unconditionally it is a divider the\n * ribbon does not otherwise have, sitting beside the toggle on every screen wide enough to need\n * no scrolling; drawn never, commands slide behind the trailing controls with nothing to say they\n * went somewhere rather than ceasing to exist.\n *\n * Both observers earn their place. The `scroll` listener catches the user reaching the end, and\n * `ResizeObserver` catches the viewport narrowing — but on the *children* as well as the scroller,\n * because a group getting wider changes `scrollWidth` while leaving the scroller's own border box\n * exactly where it was, and an observer watching only the scroller never fires.\n */\nfunction useTrailingOverflow() {\n const ref = React.useRef<HTMLDivElement>(null);\n const [overflow, setOverflow] = React.useState(false);\n React.useEffect(() => {\n const node = ref.current;\n if (!node) return;\n // The 1px slack is for fractional layout: a scroller that fits exactly reports a `scrollWidth`\n // a rounding error above its `clientWidth` often enough to flicker the line on and off.\n const measure = () => setOverflow(node.scrollLeft + node.clientWidth < node.scrollWidth - 1);\n measure();\n node.addEventListener('scroll', measure, { passive: true });\n const resize = new ResizeObserver(measure);\n resize.observe(node);\n for (const child of node.children) resize.observe(child);\n return () => {\n node.removeEventListener('scroll', measure);\n resize.disconnect();\n };\n }, []);\n return [ref, overflow] as const;\n}\n\n/**\n * One ribbon mode: commands that scroll, trailing controls that do not.\n *\n * Both modes are this shape, which is why it is one component. Before the split the toggle was\n * simply the last flex item of an `overflow:hidden` row, so a narrow screen clipped it away along\n * with the last group — and the toggle is the one control that gets an oversized ribbon out of the\n * way, so losing it to the overflow left no way back to a usable screen.\n *\n * The `Toolbar` stays on the outside. React Aria moves focus across every focusable descendant\n * rather than across direct children, so nesting them one element deeper keeps the arrow-key\n * behaviour and the single tab stop intact, and the browser scrolls a focused command into view on\n * its own.\n */\nfunction Surface({\n className,\n id,\n label,\n trailing,\n children,\n}: {\n className: string;\n id?: string;\n label: string;\n trailing: React.ReactNode;\n children: React.ReactNode;\n}) {\n const [scrollRef, overflow] = useTrailingOverflow();\n // Cast because React Aria's `ToolbarProps` does not declare `id` — it forwards one anyway,\n // through `filterDOMProps(props, {global: true})`, and `RibbonToggle.test.tsx` asserts it lands.\n const domId = (id ? { id } : {}) as { id?: string };\n return (\n <Toolbar {...domId} className={className} aria-label={label}>\n <div className=\"pire-ribbon-scroll\" ref={scrollRef}>\n {children}\n </div>\n <div className=\"pire-ribbon-trail\" data-overflow={overflow ? 'true' : undefined}>\n {trailing}\n </div>\n </Toolbar>\n );\n}\n\n/** One block per group that contributes at least one `inBar` command. Contextual tabs are skipped:\n * the bar has no way to say \"these only apply to the selection\", so a command that needs one has\n * no business appearing there unlabelled. */\nfunction barBlocks(tabs: ReadTab[]): { key: string; commands: ReadCommand[] }[] {\n const blocks: { key: string; commands: ReadCommand[] }[] = [];\n for (const tab of tabs) {\n if (tab.isContextual) continue;\n for (const group of tab.groups) {\n // The primary command is drawn at the front of the bar on its own, not in its group's block.\n const commands = group.commands.filter((c) => c.inBar && !c.isPrimary);\n if (commands.length) blocks.push({ key: `${tab.key}:${group.key}`, commands });\n }\n }\n return blocks;\n}\n\n/** The commands marked `isPrimary`, in authored order, from the tabs whose commands reach the bar. */\nfunction barPrimaries(tabs: ReadTab[]): ReadCommand[] {\n return tabs\n .filter((tab) => !tab.isContextual)\n .flatMap((tab) => tab.groups.flatMap((group) => group.commands.filter((c) => c.isPrimary)));\n}\n\n/**\n * The tabbed command surface an ERP list screen carries above its toolbar.\n *\n * Children are configuration elements — `Ribbon.Tab`, `Ribbon.Group`, `Ribbon.Command` — that\n * `Ribbon` reads rather than renders. That is what lets the collapsed bar be *derived* from the\n * same tree instead of authored a second time.\n */\nexport function Ribbon({\n children,\n value,\n defaultValue,\n onChange,\n isCollapsed,\n onCollapsedChange,\n leading,\n actions,\n selectionCount,\n className,\n style,\n ...rest\n}: RibbonProps) {\n const msg = usePireMessages();\n const tabs = readTabs(children);\n\n const count = selectionCount ?? 0;\n const visible = tabs.filter((tab) => !tab.isContextual || count > 0);\n const fallback = visible[0]?.id;\n\n const [ownTab, setOwnTab] = React.useState<string | undefined>(defaultValue);\n const requested = value ?? ownTab;\n /**\n * Clamped to what is on screen, every render. A `defaultValue` or `value` can name a contextual\n * tab that is not currently visible — an app that persists the last-used tab and restores it on\n * reload does exactly that, on every reload where nothing is selected — and an unclamped id\n * matched no tab at all: no tab selected, no panel, no commands, a blank ribbon, and no\n * `onChange` to tell a controlled consumer anything had gone wrong. Clamping also means the\n * request is honoured the moment its tab reappears, rather than being discarded.\n */\n const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;\n const select = React.useCallback(\n (id: string) => {\n setOwnTab(id);\n onChange?.(id);\n },\n [onChange],\n );\n\n /**\n * The only piece of ribbon state the library owns, and it exists because getting it wrong\n * strands keyboard focus. When the selection appears, the contextual tab takes over — that is\n * the whole reason it is contextual. When it goes away the tab unmounts, and if it was selected\n * the focus goes with it: the next Tab press restarts from <body> and the user is back at the\n * top of the page. Handing selection back is what prevents that.\n *\n * Guarded on the *transition*, not on the count, so a user who deliberately clicks back to\n * \"Inicio\" while rows stay selected is not dragged forward again on the next render.\n *\n * Initialised to `false` rather than to the current count, so mounting with a live selection is\n * a rise like any other. Seeding it from the count made a screen that renders with rows already\n * selected — restored from a saved state, or navigated back to — show the contextual tab while\n * leaving \"Inicio\" selected underneath it: the tab that exists to act on the selection, sitting\n * there unopened.\n */\n const hadSelection = React.useRef(false);\n React.useEffect(() => {\n const has = count > 0;\n if (has === hadSelection.current) return;\n hadSelection.current = has;\n const contextual = tabs.find((tab) => tab.isContextual);\n if (!contextual) return;\n if (has) select(contextual.id);\n // `requested`, not `selected`: by the time this runs the render has already clamped `selected`\n // off the tab that is going away, and a controlled consumer still holding that id has to be\n // told to let go of it.\n else if (requested === contextual.id) select(tabs.find((tab) => !tab.isContextual)?.id ?? '');\n }, [count, tabs, requested, select]);\n\n const [ownCollapsed, setOwnCollapsed] = React.useState(false);\n const collapsed = isCollapsed ?? ownCollapsed;\n\n /**\n * The toggle is one element mounted under two different parents — the bar's `Toolbar` when\n * collapsed, the band's when not — so pressing it unmounts the very button that was pressed and\n * keyboard focus falls to `<body>`. The next Tab press then restarts from the top of the page,\n * which is the same failure the contextual-tab guard below exists to prevent, left open on the\n * one control guaranteed to be focused when it fires.\n *\n * It cannot be hoisted out of the branch: the two modes are a row and a column, and the toggle\n * sits inside the trailing edge of each — outside them it would need absolute positioning, which\n * the band's groups would slide underneath. So the button is replaced and the focus is put back\n * on its replacement, before paint.\n */\n const toggleRef = React.useRef<HTMLButtonElement>(null);\n const restoreFocus = React.useRef(false);\n React.useLayoutEffect(() => {\n if (!restoreFocus.current) return;\n restoreFocus.current = false;\n toggleRef.current?.focus();\n });\n\n /**\n * The band's DOM id, so the toggle's `aria-expanded` has something to say it expands. Without an\n * `aria-controls` a screen-reader user is told a state changed and never told what changed.\n * `Surface` is what puts it on the `Toolbar`, and carries the cast that needs.\n */\n const bandId = React.useId();\n\n const toggle = (\n <Button\n ref={toggleRef}\n className=\"pire-ribbon-toggle\"\n aria-expanded={!collapsed}\n aria-controls={bandId}\n aria-label={collapsed ? msg.ribbonExpand : msg.ribbonCollapse}\n onPress={() => {\n restoreFocus.current = document.activeElement === toggleRef.current;\n setOwnCollapsed(!collapsed);\n onCollapsedChange?.(!collapsed);\n }}\n >\n <Icon name={collapsed ? 'chevron-down' : 'chevron-up'} size={16} />\n </Button>\n );\n\n if (collapsed) {\n const blocks = barBlocks(tabs);\n const primaries = barPrimaries(tabs);\n return (\n <div className={cx('pire-ribbon', className)} style={style}>\n <Surface\n className=\"pire-ribbon-bar\"\n label={rest['aria-label']}\n trailing={\n <>\n {actions}\n {toggle}\n </>\n }\n >\n {/* `leading` scrolls with the commands rather than pinning opposite the toggle. It is\n the saved-view chip — context for the row, not a control the user needs to reach —\n and a bar pinned at both ends leaves a narrow screen almost nothing between them. */}\n {primaries.map((c) => (\n <Command key={c.key} command={c} selectionCount={count} inBar />\n ))}\n {leading ? <div className=\"pire-ribbon-leading\">{leading}</div> : null}\n {blocks.map((block, i) => (\n <React.Fragment key={block.key}>\n {i > 0 || leading || primaries.length ? <span className=\"pire-ribbon-bar-sep\" /> : null}\n {block.commands.map((c) => (\n <Command key={c.key} command={c} selectionCount={count} inBar />\n ))}\n </React.Fragment>\n ))}\n </Surface>\n </div>\n );\n }\n\n return (\n <div className={cx('pire-ribbon', className)} style={style}>\n <AriaTabs selectedKey={selected} onSelectionChange={(k) => select(String(k))}>\n <TabList className=\"pire-ribbon-tablist\" aria-label={rest['aria-label']}>\n {visible.map((tab) => (\n <AriaTab\n key={tab.key}\n id={tab.id}\n className=\"pire-ribbon-tab\"\n data-contextual={tab.isContextual ? 'true' : undefined}\n >\n {tab.label}\n </AriaTab>\n ))}\n </TabList>\n {visible.map((tab) => (\n <TabPanel key={tab.key} id={tab.id} className=\"pire-ribbon-panel\">\n {/* A real toolbar, so arrow keys move between commands and the whole band is one tab\n stop. Twelve groups of commands as twelve tab stops is why ribbons get a reputation\n for being unusable from the keyboard. */}\n <Surface\n id={bandId}\n className=\"pire-ribbon-band\"\n label={msg.ribbonLabel}\n trailing={\n <>\n {actions}\n {toggle}\n </>\n }\n >\n {tab.groups.map((group) => (\n <Group key={group.key} group={group} selectionCount={count} />\n ))}\n </Surface>\n </TabPanel>\n ))}\n </AriaTabs>\n </div>\n );\n}\n\nRibbon.Tab = RibbonTab;\nRibbon.Group = RibbonGroup;\nRibbon.Command = RibbonCommand;\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport type MessageKind = 'info' | 'success' | 'warning' | 'error';\nconst KIND_ICON: Record<MessageKind, string> = {\n info: 'info',\n success: 'check-circle-2',\n warning: 'alert-triangle',\n error: 'alert-octagon',\n};\n\nexport interface InlineMessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n kind?: MessageKind;\n /** Message heading. Rich content, not the DOM title/tooltip attribute. */\n title?: React.ReactNode;\n /** Follow-up action, usually a tertiary Button. */\n action?: React.ReactNode;\n /** Provide to render a dismiss affordance. */\n onClose?: () => void;\n}\n\n/** In-page message tied to a region or form. Errors and warnings announce themselves. */\nexport function InlineMessage({\n kind = 'info',\n title,\n action,\n onClose,\n children,\n className,\n ...rest\n}: InlineMessageProps) {\n const msg = usePireMessages();\n const assertive = kind === 'error' || kind === 'warning';\n return (\n <div\n className={cx('pire-msg', className)}\n data-kind={kind}\n role={assertive ? 'alert' : 'status'}\n aria-live={assertive ? 'assertive' : 'polite'}\n {...rest}\n >\n <Icon name={KIND_ICON[kind]} size={16} style={{ marginTop: 2 }} />\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 'var(--sp-1)' }}>\n {title ? <span className=\"pire-msg-title\">{title}</span> : null}\n {children ? <span className=\"pire-msg-body\">{children}</span> : null}\n {action}\n </div>\n {onClose ? <IconButton icon=\"x\" label={msg.inlineMessageDismiss} size=\"sm\" onPress={onClose} /> : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport type { MessageKind } from './InlineMessage';\n\nconst KIND_ICON: Record<MessageKind, string> = {\n info: 'info',\n success: 'check-circle-2',\n warning: 'alert-triangle',\n error: 'alert-octagon',\n};\n\nexport interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {\n kind?: MessageKind;\n onClose?: () => void;\n position?: 'bottom-center' | 'bottom-right';\n}\n\n/** Transient confirmation of a completed action. Never use for errors the user must act on —\n * those belong in an InlineMessage next to the cause. */\nexport function Toast({\n kind = 'success',\n onClose,\n position = 'bottom-center',\n children,\n className,\n ...rest\n}: ToastProps) {\n const msg = usePireMessages();\n return (\n <div\n className={cx('pire-toast', className)}\n data-position={position}\n role={kind === 'error' ? 'alert' : 'status'}\n aria-live={kind === 'error' ? 'assertive' : 'polite'}\n {...rest}\n >\n <Icon name={KIND_ICON[kind]} size={16} />\n <span style={{ flex: 1 }}>{children}</span>\n {onClose ? (\n <IconButton icon=\"x\" label={msg.toastDismiss} size=\"sm\" variant=\"inverse\" onPress={onClose} />\n ) : null}\n </div>\n );\n}\n\nexport interface ToastItem {\n id: string;\n kind?: MessageKind;\n message: React.ReactNode;\n timeout?: number;\n}\n\ninterface ToastContextValue {\n add: (toast: Omit<ToastItem, 'id'>) => string;\n close: (id: string) => void;\n}\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\n/** Queue + live region. Mount once near the app root. */\nexport function ToastProvider({\n children,\n timeout = 6000,\n}: {\n children?: React.ReactNode;\n timeout?: number;\n}) {\n const msg = usePireMessages();\n const [toasts, setToasts] = React.useState<ToastItem[]>([]);\n const close = React.useCallback((id: string) => setToasts((t) => t.filter((x) => x.id !== id)), []);\n const add = React.useCallback(\n (toast: Omit<ToastItem, 'id'>) => {\n const id = Math.random().toString(36).slice(2);\n setToasts((t) => [...t, { ...toast, id }]);\n const ms = toast.timeout ?? timeout;\n if (ms > 0) setTimeout(() => close(id), ms);\n return id;\n },\n [close, timeout],\n );\n const value = React.useMemo(() => ({ add, close }), [add, close]);\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div className=\"pire-toast-region\" role=\"region\" aria-label={msg.toastRegionLabel}>\n {toasts.map((t) => (\n <Toast\n key={t.id}\n kind={t.kind}\n onClose={() => close(t.id)}\n style={{ position: 'static', transform: 'none' }}\n >\n {t.message}\n </Toast>\n ))}\n </div>\n </ToastContext.Provider>\n );\n}\n\n/** `const toast = useToast(); toast.add({ kind: 'success', message: 'Order 4500012 released.' })` */\nexport function useToast() {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast must be used inside <ToastProvider>');\n return ctx;\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface KpiTileProps {\n /** Short metric name. Truncates — the tile shrinks with its grid track. */\n label: React.ReactNode;\n /** Pre-formatted figure — format in the caller's locale, not here. */\n value: React.ReactNode;\n unit?: React.ReactNode;\n /** Comparison figure, e.g. \"+4.2% vs last month\". */\n delta?: React.ReactNode;\n /** Which arrow to draw — purely the direction the number moved. */\n deltaDirection?: 'up' | 'down';\n /** Whether that movement is good news. A rising overdue-invoice count is\n * deltaDirection=\"up\" with deltaTone=\"negative\". Defaults to positive for up. */\n deltaTone?: 'positive' | 'negative' | 'neutral';\n footnote?: React.ReactNode;\n icon?: string;\n /** Tints the value when the KPI itself is out of tolerance. */\n status?: 'neutral' | 'positive' | 'critical' | 'negative';\n onPress?: () => void;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function KpiTile({\n label,\n value,\n unit,\n delta,\n deltaDirection,\n deltaTone,\n footnote,\n icon,\n status = 'neutral',\n onPress,\n className,\n style,\n}: KpiTileProps) {\n const tone = deltaTone ?? (deltaDirection === 'down' ? 'negative' : 'positive');\n const body = (\n <>\n <span className=\"pire-kpi-label\">\n {icon ? <Icon name={icon} size={16} /> : null}\n {label}\n </span>\n <span className=\"pire-kpi-value\">\n {value}\n {unit ? <span className=\"pire-kpi-unit\">{unit}</span> : null}\n </span>\n {delta ? (\n <span className=\"pire-kpi-delta\" data-tone={tone}>\n {deltaDirection ? (\n <Icon name={deltaDirection === 'up' ? 'trending-up' : 'trending-down'} size={12} />\n ) : null}\n {delta}\n </span>\n ) : null}\n {footnote ? <span className=\"pire-kpi-foot\">{footnote}</span> : null}\n </>\n );\n const props = { className: cx('pire-kpi', className), 'data-status': status, style };\n return onPress ? (\n <AriaButton {...props} data-pressable=\"true\" onPress={onPress}>\n {body}\n </AriaButton>\n ) : (\n <div {...props}>{body}</div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface ObjectFact {\n label: string;\n value: React.ReactNode;\n numeric?: boolean;\n}\n\nexport interface ObjectHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'id'> {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n /** Technical key — rendered in mono next to the subtitle. Not the DOM id. */\n id?: React.ReactNode;\n /** A <Breadcrumb /> element. */\n breadcrumb?: React.ReactNode;\n /** A <Badge /> carrying the object's value state. */\n badge?: React.ReactNode;\n /** Key/value summary strip. Set numeric for amounts. */\n facts?: ObjectFact[];\n actions?: React.ReactNode;\n}\n\n/** The identity block at the top of any object page: who this record is, its state, its key figures. */\nexport function ObjectHeader({\n title,\n subtitle,\n id,\n breadcrumb,\n badge,\n facts,\n actions,\n className,\n ...rest\n}: ObjectHeaderProps) {\n return (\n <header className={cx('pire-objheader', className)} {...rest}>\n {breadcrumb}\n <div className=\"pire-objheader-row\">\n <div style={{ minWidth: 0 }}>\n <h1 className=\"pire-objheader-title\">{title}</h1>\n {subtitle || id ? (\n <div className=\"pire-objheader-sub\">\n {subtitle}\n {id ? <span className=\"pire-objheader-id\">{id}</span> : null}\n </div>\n ) : null}\n </div>\n {badge}\n {actions ? <div className=\"pire-objheader-actions\">{actions}</div> : null}\n </div>\n {facts?.length ? (\n <dl className=\"pire-facts\" style={{ margin: 0 }}>\n {facts.map((fact) => (\n <div key={fact.label}>\n <dt className=\"pire-fact-label\">{fact.label}</dt>\n <dd\n className=\"pire-fact-value\"\n data-numeric={fact.numeric ? 'true' : undefined}\n style={{ margin: 0 }}\n >\n {fact.value}\n </dd>\n </div>\n ))}\n </dl>\n ) : null}\n </header>\n );\n}\n","import type * as React from 'react';\nimport { Button } from '../core/Button';\nimport { Tag } from '../core/Tag';\nimport { useMessage } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ActiveFilter {\n id: string;\n label: string;\n}\n\nexport interface FilterBarProps extends React.HTMLAttributes<HTMLElement> {\n /** Filter controls — Inputs and Selects with their own labels. */\n children?: React.ReactNode;\n /** Applied filters, shown as removable Tags. */\n activeFilters?: ActiveFilter[];\n onRemoveFilter?: (id: string) => void;\n onClear?: () => void;\n /** Provide to render the \"Go\" trigger. Pire filters apply explicitly, never live. */\n onGo?: () => void;\n /** e.g. \"1,284 orders\". Announced when it changes. */\n resultLabel?: React.ReactNode;\n actions?: React.ReactNode;\n /** Overrides the dictionary's `filterBarGo` for this bar only. */\n goLabel?: string;\n /** Overrides the dictionary's `filterBarClearAll` for this bar only. */\n clearAllLabel?: string;\n /** Overrides the dictionary's `filterBarLabel` — the landmark name. */\n 'aria-label'?: string;\n}\n\nexport function FilterBar({\n children,\n activeFilters = [],\n onRemoveFilter,\n onClear,\n onGo,\n resultLabel,\n actions,\n goLabel,\n clearAllLabel,\n className,\n ...rest\n}: FilterBarProps) {\n const label = useMessage('filterBarLabel', rest['aria-label']);\n const go = useMessage('filterBarGo', goLabel);\n const clearAll = useMessage('filterBarClearAll', clearAllLabel);\n\n return (\n <section className={cx('pire-filterbar', className)} {...rest} aria-label={label}>\n <div className=\"pire-filterbar-controls\">\n {children}\n {onGo ? (\n <Button variant=\"primary\" onPress={onGo}>\n {go}\n </Button>\n ) : null}\n </div>\n {activeFilters.length || resultLabel || actions ? (\n <div className=\"pire-filterbar-foot\">\n {activeFilters.map((filter) => (\n <Tag key={filter.id} onRemove={onRemoveFilter ? () => onRemoveFilter(filter.id) : undefined}>\n {filter.label}\n </Tag>\n ))}\n {activeFilters.length && onClear ? (\n <Button variant=\"tertiary\" size=\"sm\" onPress={onClear}>\n {clearAll}\n </Button>\n ) : null}\n {resultLabel ? (\n <span className=\"pire-filterbar-result\" aria-live=\"polite\">\n {resultLabel}\n </span>\n ) : null}\n {actions ? <div className=\"pire-filterbar-actions\">{actions}</div> : null}\n </div>\n ) : null}\n </section>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface DescriptionItem {\n label: React.ReactNode;\n value: React.ReactNode;\n /** Tabular mono — use for every amount, quantity and ID. */\n numeric?: boolean;\n /** Separates and enlarges the row: totals, gross value, balance. */\n emphasis?: boolean;\n /** Rendered after the term — a Tooltip trigger explaining the figure. */\n hint?: React.ReactNode;\n}\n\nexport interface DescriptionListProps extends React.HTMLAttributes<HTMLDListElement> {\n items: DescriptionItem[];\n /** rows = label left / value right (totals panels). grid = caps label above value (detail facts). */\n layout?: 'rows' | 'grid';\n /** Columns when layout is grid. */\n columns?: number;\n}\n\n/** Key/value readout: order totals, stock figures, master-data summaries. Replaces the hand-rolled\n * <dl> that every ERP screen used to carry. */\nexport function DescriptionList({\n items,\n layout = 'rows',\n columns = 3,\n className,\n style,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={cx('pire-dl', className)}\n data-layout={layout}\n style={\n { ...(layout === 'grid' ? { '--pire-dl-cols': columns } : null), ...style } as React.CSSProperties\n }\n {...rest}\n >\n {items.map((item, i) => (\n <div className=\"pire-dl-row\" key={i} data-emphasis={item.emphasis ? 'true' : undefined}>\n <dt className=\"pire-dl-term\">\n {item.label}\n {item.hint}\n </dt>\n <dd className=\"pire-dl-value\" data-numeric={item.numeric ? 'true' : undefined}>\n {item.value}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface TimelineEntry {\n id?: string;\n /** Pre-formatted timestamp — format in the caller's locale. */\n time: React.ReactNode;\n event: React.ReactNode;\n /** Who or what caused it: a user name, \"System\", an interface id. */\n actor?: React.ReactNode;\n}\n\nexport interface TimelineProps extends React.HTMLAttributes<HTMLOListElement> {\n entries: TimelineEntry[];\n /** Newest first. Default true — audit trails read top-down from now. */\n reverse?: boolean;\n}\n\n/** Document history and audit trail: what happened, when, and who did it. */\nexport function Timeline({ entries, reverse = false, className, ...rest }: TimelineProps) {\n const list = reverse ? [...entries].reverse() : entries;\n return (\n <ol className={cx('pire-timeline', className)} {...rest}>\n {list.map((entry, i) => (\n <li className=\"pire-timeline-item\" key={entry.id ?? i}>\n <span className=\"pire-timeline-time\">{entry.time}</span>\n <span className=\"pire-timeline-text\">{entry.event}</span>\n {entry.actor ? <span className=\"pire-timeline-actor\">{entry.actor}</span> : null}\n </li>\n ))}\n </ol>\n );\n}\n","/**\n * Scale maths and slot assignment shared by the chart components.\n *\n * Kept free of React and of the DOM so the arithmetic — which is where charts go quietly\n * wrong — can be tested directly rather than through a rendered SVG.\n */\n\n/** One measured thing, drawn across every category. */\nexport interface ChartSeries {\n /** Stable across re-renders and across filter changes. Colour follows this, not position. */\n id: string;\n /** Shown in the legend, the tooltip and the data table. */\n label: string;\n /** One entry per category, in the same order. `null` is a gap in the data, never a zero. */\n values: (number | null)[];\n /**\n * Pin this series to a specific `--viz` slot, 1–6. Without it slots are handed out in\n * order. Use it when the same entity appears on several charts and must keep one colour.\n */\n colorIndex?: number;\n}\n\n/** How many distinct series colours the palette defines. Validated as a set; do not extend. */\nexport const VIZ_SLOT_COUNT = 6;\n\nexport interface ChartScale {\n min: number;\n max: number;\n /** Ascending, always including `min` and `max`. */\n ticks: number[];\n}\n\nconst NICE_STEPS = [1, 2, 2.5, 5, 10];\n\n/** Rounds a rough step up to the nearest 1 / 2 / 2.5 / 5 / 10 × 10ⁿ, so axis labels stay readable. */\nfunction niceStep(rough: number): number {\n if (!(rough > 0)) return 1;\n const magnitude = 10 ** Math.floor(Math.log10(rough));\n const normalized = rough / magnitude;\n return (NICE_STEPS.find((candidate) => candidate >= normalized) ?? 10) * magnitude;\n}\n\n/**\n * A rounded axis covering `values`.\n *\n * `startAtZero` defaults to true because a bar's length is only readable when the axis starts\n * at zero — a truncated bar axis exaggerates differences, which is the commonest way a chart\n * misleads. Lines may pass false, since a line encodes change rather than magnitude.\n */\nexport function linearScale(\n values: (number | null | undefined)[],\n tickCount = 4,\n startAtZero = true,\n): ChartScale {\n const present = values.filter((value): value is number => value != null && Number.isFinite(value));\n if (present.length === 0) return { min: 0, max: 1, ticks: [0, 1] };\n\n let low = Math.min(...present);\n let high = Math.max(...present);\n if (startAtZero) {\n low = Math.min(0, low);\n high = Math.max(0, high);\n }\n // A flat series still needs an axis with height, or every bar renders at zero pixels.\n if (low === high) {\n high = low === 0 ? 1 : low + Math.abs(low);\n }\n\n const step = niceStep((high - low) / Math.max(1, tickCount));\n\n // Two float defences, because both failures land straight on the axis labels.\n // The epsilon stops a value that is exactly on a step — 0.5 / 0.1 evaluating to\n // 5.000000000000001 — from rounding up to a whole extra tick. The decimal rounding stops\n // 3 × 0.1 from printing as \"0.30000000000000004\".\n const EDGE_TOLERANCE = 1e-9;\n const decimals = Math.max(0, 1 - Math.floor(Math.log10(step)));\n const toStepPrecision = (value: number) => Number(value.toFixed(decimals));\n\n const min = toStepPrecision(Math.floor(low / step + EDGE_TOLERANCE) * step);\n const max = toStepPrecision(Math.ceil(high / step - EDGE_TOLERANCE) * step);\n\n const stepCount = Math.round((max - min) / step);\n const ticks = Array.from({ length: stepCount + 1 }, (_, index) => toStepPrecision(min + index * step));\n return { min, max, ticks };\n}\n\n/** Where `value` sits on `scale`, as 0–1 from the axis minimum. */\nexport function scalePosition(value: number, scale: ChartScale): number {\n const span = scale.max - scale.min;\n return span === 0 ? 0 : (value - scale.min) / span;\n}\n\n/**\n * The CSS colour for a series.\n *\n * Slots are handed out in declaration order and never cycled: past the sixth, identity by\n * colour alone stops being reliable, so the overflow folds into one \"other\" neutral instead\n * of inventing a seventh hue. Aggregate upstream when you have more than six.\n */\nexport function seriesColor(series: ChartSeries, index: number): string {\n const slot = series.colorIndex ?? index + 1;\n return slot >= 1 && slot <= VIZ_SLOT_COUNT ? `var(--viz-${slot})` : 'var(--viz-other)';\n}\n\n/** Declared locally for the same reason as in `Icon` — see the note there. The bare\n * `process.env.NODE_ENV` token has to survive into the output for a bundler to substitute it,\n * and the package deliberately carries no `@types/node`. */\ndeclare const process: { env: { NODE_ENV?: string } };\nconst IS_DEV = process.env.NODE_ENV !== 'production';\n\n/** Charts re-render on every filter change, so one warning per cause rather than per render. */\nconst warnedCharts = new Set<string>();\n\n/** Dev-only nudge: more series than the palette can tell apart is a data-shape problem. */\nexport function warnOnSlotOverflow(series: ChartSeries[], chartLabel: string): void {\n if (!IS_DEV || warnedCharts.has(chartLabel)) return;\n if (series.length <= VIZ_SLOT_COUNT) return;\n warnedCharts.add(chartLabel);\n console.warn(\n `[pire] \"${chartLabel}\" has ${series.length} series but the palette defines ` +\n `${VIZ_SLOT_COUNT} distinguishable colours. The extras render in one shared neutral. ` +\n 'Group the tail into an \"Other\" series, or split the chart into small multiples.',\n );\n}\n\n/**\n * Dev-only checks specific to a donut, where the failure modes are about shape rather than count.\n *\n * Negative values are the important one: an arc length cannot be negative, so a refund or a\n * reversal silently draws as its own absolute value and the chart reads as confidently wrong.\n */\nexport function warnOnDonutShape(series: ChartSeries[], categoryCount: number, chartLabel: string): void {\n if (!IS_DEV || warnedCharts.has(`donut:${chartLabel}`)) return;\n\n const complaints: string[] = [];\n if (series.length > 1) {\n complaints.push(`it has ${series.length} series but a donut draws one — the rest are ignored`);\n }\n if (categoryCount > VIZ_SLOT_COUNT) {\n complaints.push(\n `it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; ` +\n 'past about four, slices stop being readable at all — group the tail into \"Other\"',\n );\n }\n if (series[0]?.values.some((value) => value != null && value < 0)) {\n complaints.push(\n 'it contains negative values, which have no part-to-whole meaning — ' +\n 'a signed measure belongs in a bar chart',\n );\n }\n if (complaints.length === 0) return;\n\n warnedCharts.add(`donut:${chartLabel}`);\n console.warn(`[pire] DonutChart \"${chartLabel}\": ${complaints.join('; ')}.`);\n}\n\n/** Sum of a category's values across series, skipping gaps. Used for stacked totals. */\nexport function stackTotal(series: ChartSeries[], categoryIndex: number): number {\n return series.reduce((total, one) => total + (one.values[categoryIndex] ?? 0), 0);\n}\n\n/** Every plotted number in one flat list — what the scale is derived from. */\nexport function flatValues(series: ChartSeries[]): (number | null)[] {\n return series.flatMap((one) => one.values);\n}\n\n/**\n * Trims each series to the category count.\n *\n * A series longer than the axis would otherwise plot points past the last category, stacked on\n * top of each other at an undefined position. Shorter series need no padding — reading past the\n * end already yields `undefined`, which every call site treats as a gap.\n */\nexport function alignToCategories(series: ChartSeries[], categoryCount: number): ChartSeries[] {\n return series.map((one) =>\n one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) },\n );\n}\n","import type * as React from 'react';\nimport type { ChartSeries } from './chartGeometry';\nimport { seriesColor } from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** Props every chart shares. Each chart adds its own encoding options on top. */\nexport interface ChartBaseProps {\n /**\n * What the chart shows, in a sentence. Required: a chart with no accessible name is\n * an unlabelled image, and the visible title cannot be relied on — charts are often\n * placed under a heading that already says something different.\n */\n 'aria-label': string;\n /** Category axis labels. `series[].values` line up with these by index. */\n categories: string[];\n series: ChartSeries[];\n /** Shown above the plot. With a single series this is what names it, in place of a legend. */\n title?: React.ReactNode;\n /** Sits under the title in secondary ink — units, period, source. */\n description?: React.ReactNode;\n /**\n * Formats every number that reaches a human: axis ticks, tooltips, the data table.\n * Pire does not format — only the app knows the currency, the locale and the precision.\n */\n formatValue?: (value: number) => string;\n /** Plot height in pixels. Width always fills the container. */\n height?: number;\n /** Replaces the plot when there is nothing to draw. */\n emptyState?: React.ReactNode;\n /** Renders the underlying table visibly beneath the plot, instead of only for screen readers. */\n showDataTable?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** One swatch in the legend. What it identifies differs by chart — see `ChartFrameProps.legend`. */\nexport interface ChartLegendItem {\n key: string;\n label: string;\n color: string;\n}\n\nexport interface ChartFrameProps\n extends Pick<\n ChartBaseProps,\n 'title' | 'description' | 'categories' | 'series' | 'showDataTable' | 'className' | 'style'\n > {\n label: string;\n formatValue: (value: number) => string;\n /**\n * Rendered only when there are at least two entries — one thing needs no key to tell it from\n * the others, and the title already names it.\n *\n * The chart decides what an entry stands for: bars and lines colour by series, a donut colours\n * by segment. Passing the list ready-made keeps that decision with the chart that made it.\n */\n legend?: ChartLegendItem[];\n children: React.ReactNode;\n}\n\n/** Legend entries for a chart that colours by series — bars and lines. */\nexport function seriesLegend(series: ChartSeries[]): ChartLegendItem[] {\n return series.map((one, index) => ({\n key: one.id,\n label: one.label,\n color: seriesColor(one, index),\n }));\n}\n\n/** Falls back to the browser's grouping so large figures stay readable without configuration. */\nexport const defaultFormatValue = (value: number): string => value.toLocaleString();\n\n/**\n * The shell around every Pire chart: heading, legend, plot, and the data table.\n *\n * The table is always in the DOM. A chart summarised in prose tells a screen-reader user what\n * someone else concluded; the table gives them the same numbers everyone else is looking at.\n * `showDataTable` only decides whether it is also visible.\n */\nexport function ChartFrame({\n label,\n title,\n description,\n categories,\n series,\n formatValue,\n legend,\n showDataTable,\n className,\n style,\n children,\n}: ChartFrameProps) {\n const msg = usePireMessages();\n return (\n <figure className={cx('pire-chart', className)} style={style}>\n {title || description ? (\n <figcaption className=\"pire-chart-head\">\n {title ? <span className=\"pire-chart-title\">{title}</span> : null}\n {description ? <span className=\"pire-chart-desc\">{description}</span> : null}\n </figcaption>\n ) : null}\n\n {legend && legend.length > 1 ? (\n <ul className=\"pire-chart-legend\">\n {legend.map((item) => (\n <li key={item.key} className=\"pire-chart-legend-item\">\n <span className=\"pire-chart-swatch\" style={{ background: item.color }} />\n {item.label}\n </li>\n ))}\n </ul>\n ) : null}\n\n {/* The plot is decorative to assistive tech — the table below carries the same data,\n and reading out a wall of SVG shapes is worse than nothing. */}\n <div className=\"pire-chart-plot\" aria-hidden=\"true\">\n {children}\n </div>\n\n <div className={showDataTable ? 'pire-chart-table' : 'pire-sr-only'}>\n <table>\n <caption>{label}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{msg.chartCategoryHeader}</th>\n {series.map((one) => (\n <th key={one.id} scope=\"col\">\n {one.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <tr key={categoryIndex}>\n <th scope=\"row\">{category}</th>\n {series.map((one) => {\n const value = one.values[categoryIndex];\n return <td key={one.id}>{value == null ? msg.chartNoValue : formatValue(value)}</td>;\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </figure>\n );\n}\n","import type * as React from 'react';\nimport type { ChartBaseProps } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue, seriesLegend } from './ChartFrame';\nimport {\n alignToCategories,\n flatValues,\n linearScale,\n scalePosition,\n seriesColor,\n stackTotal,\n warnOnSlotOverflow,\n} from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface BarChartProps extends ChartBaseProps {\n /**\n * `horizontal` puts categories down the side, which is what long ERP labels need — product\n * names and account descriptions do not fit under a vertical bar without turning sideways.\n * Use `vertical` when the categories are periods and reading left-to-right means time.\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Stack the series into one bar per category, for parts of a total.\n *\n * Only the first segment and the total are easy to compare across categories, because the\n * middle segments start at different offsets. If the comparison matters more than the total,\n * leave this off and let the bars sit side by side.\n */\n stacked?: boolean;\n /**\n * Print each value beside its bar. Defaults on for a single series — where the chart is a\n * ranking and the number is half the answer — and off beyond that, where a label per bar\n * turns into noise. The tooltip and the data table always carry every value.\n */\n showValues?: boolean;\n}\n\n/**\n * Magnitude and ranking — how big, and in what order.\n *\n * Laid out in HTML rather than SVG so category labels are real text: they wrap, truncate and\n * inherit type tokens, none of which survives a scaled `viewBox`. The bar axis always starts at\n * zero, since a bar encodes length, and a truncated axis overstates the difference.\n */\nexport function BarChart({\n categories,\n series: rawSeries,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 260,\n emptyState,\n showDataTable,\n orientation = 'horizontal',\n stacked = false,\n showValues,\n className,\n style,\n ...rest\n}: BarChartProps) {\n const label = rest['aria-label'];\n const msg = usePireMessages();\n warnOnSlotOverflow(rawSeries, label);\n\n const series = alignToCategories(rawSeries, categories.length);\n const hasData = categories.length > 0 && series.length > 0;\n const withValues = showValues ?? series.length === 1;\n\n // Stacking compares totals, so the axis has to reach the tallest total rather than the\n // tallest single value.\n const scale = linearScale(\n stacked ? categories.map((_, index) => stackTotal(series, index)) : flatValues(series),\n );\n\n const sizeOf = (value: number) => `${scalePosition(value, scale) * 100}%`;\n\n /**\n * The figure in the right-hand column. A missing reading gets the \"no data\" wording rather\n * than a formatted zero — printing ₲ 0 for a month nobody has closed states a number that\n * was never measured.\n */\n const horizontalLabelFor = (categoryIndex: number) => {\n if (stacked) return formatValue(stackTotal(series, categoryIndex));\n const value = series[0].values[categoryIndex];\n return value == null ? msg.chartNoValue : formatValue(value);\n };\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={seriesLegend(series)}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div\n className=\"pire-chart-bars\"\n data-orientation={orientation}\n data-stacked={String(stacked)}\n style={{ '--pire-chart-height': `${height}px` } as React.CSSProperties}\n >\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <div key={categoryIndex} className=\"pire-chart-group\">\n <span className=\"pire-chart-cat\">{category}</span>\n <div className=\"pire-chart-track\">\n {series.map((one, seriesIndex) => {\n const value = one.values[categoryIndex];\n if (value == null) return null;\n return (\n <div\n key={one.id}\n className=\"pire-chart-bar\"\n style={\n {\n '--pire-bar-size': sizeOf(value),\n '--pire-bar-color': seriesColor(one, seriesIndex),\n } as React.CSSProperties\n }\n >\n {/* Vertical bars label themselves. A shared column would put the number at\n a fixed height while the bar it belongs to ends somewhere else. */}\n {withValues && orientation === 'vertical' ? (\n <span className=\"pire-chart-barval\">{formatValue(value)}</span>\n ) : null}\n <span className=\"pire-chart-tip\" role=\"presentation\">\n {series.length > 1 ? `${one.label}: ` : ''}\n {formatValue(value)}\n </span>\n </div>\n );\n })}\n </div>\n {/* Horizontal keeps a shared right-hand column instead: the bars all end at\n different points, so aligned figures are far easier to compare down the list. */}\n {withValues && orientation === 'horizontal' ? (\n <span className=\"pire-chart-val\">{horizontalLabelFor(categoryIndex)}</span>\n ) : null}\n </div>\n ))}\n </div>\n )}\n </ChartFrame>\n );\n}\n","import * as React from 'react';\nimport type { ChartBaseProps } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue, seriesLegend } from './ChartFrame';\nimport {\n alignToCategories,\n flatValues,\n linearScale,\n scalePosition,\n seriesColor,\n warnOnSlotOverflow,\n} from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface LineChartProps extends ChartBaseProps {\n /**\n * Tint the area under each line. Reads well for one series; with several the fills overlap\n * and the lower ones are read as smaller than they are, so it is ignored past the first.\n */\n showArea?: boolean;\n /**\n * Draw a dot at every point. On by default under about twenty points, where the dots show\n * where the real readings are rather than implying data between them.\n */\n showMarkers?: boolean;\n /**\n * Let the axis start above zero, so a small movement in a large number stays visible.\n *\n * Legitimate for a line, which encodes change rather than length — but it does exaggerate,\n * so leave it off whenever the size of the number is part of the point.\n */\n zoomToData?: boolean;\n}\n\n/** Room for the axis labels, in CSS pixels. The plot is what is left inside these. */\nconst PLOT_INSET = { top: 10, right: 14, bottom: 24, left: 58 };\n\n/** Below this many points a dot per reading is informative; above it, it is a smear. */\nconst MARKER_LIMIT = 20;\n\n/**\n * `useLayoutEffect` where there is a DOM, `useEffect` where there is not.\n *\n * Server rendering warns about layout effects, but falling back to `useEffect` on the client\n * would measure after the first paint and show an empty plot frame for a frame.\n */\nconst useIsomorphicLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\n/** Tracks the rendered width, because a line's geometry cannot be expressed in percentages. */\nfunction useMeasuredWidth(): [React.RefObject<HTMLDivElement | null>, number] {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const [width, setWidth] = React.useState(0);\n\n useIsomorphicLayoutEffect(() => {\n const element = ref.current;\n if (!element) return;\n // Measure once up front: ResizeObserver's first callback is asynchronous, so waiting for\n // it would paint an empty frame before the chart appears.\n setWidth(element.getBoundingClientRect().width);\n const observer = new ResizeObserver(([entry]) => setWidth(entry.contentRect.width));\n observer.observe(element);\n return () => observer.disconnect();\n }, []);\n\n return [ref, width];\n}\n\n/**\n * Change over time.\n *\n * Drawn in SVG at measured pixel coordinates rather than a scaled `viewBox`: scaling a viewBox\n * to fit stretches the type and turns markers into ellipses. Gaps in a series break the line\n * instead of interpolating across them — a missing month is not a straight line through it.\n */\nexport function LineChart({\n categories,\n series: rawSeries,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 260,\n emptyState,\n showDataTable,\n showArea = false,\n showMarkers,\n zoomToData = false,\n className,\n style,\n ...rest\n}: LineChartProps) {\n const label = rest['aria-label'];\n const msg = usePireMessages();\n warnOnSlotOverflow(rawSeries, label);\n\n const [plotRef, width] = useMeasuredWidth();\n const series = alignToCategories(rawSeries, categories.length);\n const hasData = categories.length > 0 && series.length > 0;\n const withMarkers = showMarkers ?? categories.length <= MARKER_LIMIT;\n\n const scale = linearScale(flatValues(series), 4, !zoomToData);\n const innerWidth = Math.max(0, width - PLOT_INSET.left - PLOT_INSET.right);\n const innerHeight = Math.max(0, height - PLOT_INSET.top - PLOT_INSET.bottom);\n\n const xAt = (index: number) =>\n PLOT_INSET.left +\n (categories.length <= 1 ? innerWidth / 2 : (index / (categories.length - 1)) * innerWidth);\n const yAt = (value: number) => PLOT_INSET.top + innerHeight - scalePosition(value, scale) * innerHeight;\n\n /** One `M`-prefixed run per unbroken stretch, so nulls leave a hole rather than a shortcut. */\n const pathFor = (values: (number | null)[]) => {\n let path = '';\n let penIsDown = false;\n values.forEach((value, index) => {\n if (value == null) {\n penIsDown = false;\n return;\n }\n path += `${penIsDown ? 'L' : 'M'}${xAt(index)} ${yAt(value)} `;\n penIsDown = true;\n });\n return path.trim();\n };\n\n /** Closed back down to the baseline so the fill has a bottom edge. */\n const areaFor = (values: (number | null)[]) => {\n const present = values\n .map((value, index) => ({ value, index }))\n .filter((point): point is { value: number; index: number } => point.value != null);\n if (present.length < 2) return '';\n const baseline = PLOT_INSET.top + innerHeight;\n const line = present.map((point) => `${xAt(point.index)} ${yAt(point.value)}`).join(' L');\n const last = present[present.length - 1];\n return `M${xAt(present[0].index)} ${baseline} L${line} L${xAt(last.index)} ${baseline} Z`;\n };\n\n // Every third label at most, so ticks never collide on a narrow dashboard column.\n const labelEvery = Math.max(1, Math.ceil(categories.length / Math.max(2, Math.floor(innerWidth / 64))));\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={seriesLegend(series)}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div className=\"pire-chart-lines\" ref={plotRef} style={{ height }}>\n {/* The SVG is decorative: the frame's data table carries these numbers, and reading a\n wall of SVG shapes aloud is worse than nothing. It also waits for the first measured\n width, since there is no correct geometry before then. */}\n {width > 0 ? (\n <svg\n width={width}\n height={height}\n className=\"pire-chart-svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <g className=\"pire-chart-grid\">\n {scale.ticks.map((tick) => (\n <line\n key={tick}\n x1={PLOT_INSET.left}\n x2={width - PLOT_INSET.right}\n y1={yAt(tick)}\n y2={yAt(tick)}\n />\n ))}\n </g>\n <g className=\"pire-chart-tick\">\n {scale.ticks.map((tick) => (\n <text\n key={tick}\n x={PLOT_INSET.left - 8}\n y={yAt(tick)}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatValue(tick)}\n </text>\n ))}\n {categories.map((category, index) =>\n index % labelEvery === 0 ? (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <text key={index} x={xAt(index)} y={height - 6} textAnchor=\"middle\">\n {category}\n </text>\n ) : null,\n )}\n </g>\n\n {showArea && series[0] ? (\n <path\n d={areaFor(series[0].values)}\n className=\"pire-chart-area\"\n style={{ fill: seriesColor(series[0], 0) }}\n />\n ) : null}\n\n <g className=\"pire-chart-line\" fill=\"none\">\n {series.map((one, index) => (\n <path key={one.id} d={pathFor(one.values)} stroke={seriesColor(one, index)} />\n ))}\n </g>\n\n {withMarkers ? (\n <g className=\"pire-chart-marker\">\n {series.map((one, seriesIndex) =>\n one.values.map((value, index) =>\n value == null ? null : (\n <circle\n // biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.\n key={`${one.id}-${index}`}\n cx={xAt(index)}\n cy={yAt(value)}\n r={4}\n fill={seriesColor(one, seriesIndex)}\n />\n ),\n ),\n )}\n </g>\n ) : null}\n </svg>\n ) : null}\n\n {/* Hover bands sit above the SVG in HTML: a crosshair and a tooltip that inherits the\n type tokens, without hand-positioning text inside the SVG. */}\n <div\n className=\"pire-chart-hover\"\n style={{\n inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px`,\n }}\n >\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <div key={categoryIndex} className=\"pire-chart-band\">\n <span className=\"pire-chart-tip\" role=\"presentation\">\n <strong>{category}</strong>\n {series.map((one) => {\n const value = one.values[categoryIndex];\n return (\n <span key={one.id} className=\"pire-chart-tip-row\">\n {one.label}: {value == null ? 'No data' : formatValue(value)}\n </span>\n );\n })}\n </span>\n </div>\n ))}\n </div>\n </div>\n )}\n </ChartFrame>\n );\n}\n","import * as React from 'react';\nimport type { ChartBaseProps, ChartLegendItem } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue } from './ChartFrame';\nimport { VIZ_SLOT_COUNT, warnOnDonutShape } from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface DonutChartProps extends ChartBaseProps {\n /**\n * What sits in the hole. Defaults to the total of every segment, which is the number a\n * part-to-whole chart is implicitly about. Hovering a segment replaces it with that segment.\n */\n centerLabel?: React.ReactNode;\n /** Caption under the centre figure — \"Total\", \"Invoiced\", whatever the total means. */\n centerCaption?: React.ReactNode;\n /** Ring thickness in pixels. Thinner reads as a gauge, thicker as a pie. */\n thickness?: number;\n}\n\n/** Gap between segments, in degrees of arc — the spacer that stops two fills reading as one. */\nconst SEGMENT_GAP_DEGREES = 1.5;\n\n/**\n * Part-to-whole, at a glance.\n *\n * **Use this only when the reader needs the rough shape of a split, not the ranking.** People\n * compare angles far worse than they compare lengths, so any question of the form \"which is\n * bigger\" or \"by how much\" is a `BarChart`. Six segments is the ceiling, and it is a ceiling\n * rather than a target: past three or four the small slices stop being readable at all.\n *\n * Unlike the other charts, colour here follows the *segment*, not the series — a donut draws one\n * series, and its categories are what need telling apart. Pass exactly one series; anything after\n * the first is ignored, with a dev warning.\n */\nexport function DonutChart({\n categories,\n series,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 220,\n emptyState,\n showDataTable,\n centerLabel,\n centerCaption,\n thickness = 28,\n className,\n style,\n ...rest\n}: DonutChartProps) {\n const label = rest['aria-label'];\n const msg = usePireMessages();\n const [hoveredIndex, setHoveredIndex] = React.useState<number | null>(null);\n\n warnOnDonutShape(series, categories.length, label);\n\n // A donut is single-series by definition; the frame's table still wants the array shape.\n const values = (series[0]?.values ?? []).slice(0, categories.length);\n const segments = categories\n .map((category, index) => ({ category, index, value: values[index] ?? 0 }))\n // Zero and missing readings are dropped rather than drawn: a zero-width arc is invisible\n // anyway, and it would still consume a colour slot and a legend row.\n .filter((segment) => segment.value > 0);\n\n const total = segments.reduce((sum, segment) => sum + segment.value, 0);\n const hasData = segments.length > 0 && total > 0;\n\n const size = height;\n const radius = (size - thickness) / 2;\n const circumference = 2 * Math.PI * radius;\n const gapLength = (SEGMENT_GAP_DEGREES / 360) * circumference;\n\n const legend: ChartLegendItem[] = segments.map((segment) => ({\n key: segment.category,\n label: segment.category,\n color: colorForSegment(segment.index),\n }));\n\n const hovered =\n hoveredIndex == null ? null : (segments.find((segment) => segment.index === hoveredIndex) ?? null);\n\n let arcStart = 0;\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={legend}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div className=\"pire-chart-donut\" style={{ height: size }}>\n {/* Fixed square rather than fluid: a ring scales uniformly, so there is nothing to\n gain from stretching it, and the centre figure stays at its real type size. */}\n <svg\n width={size}\n height={size}\n aria-hidden=\"true\"\n focusable=\"false\"\n onMouseLeave={() => setHoveredIndex(null)}\n >\n {/* -90° so the first segment starts at twelve o'clock, where a reader looks first. */}\n <g transform={`rotate(-90 ${size / 2} ${size / 2})`}>\n {segments.map((segment) => {\n const arcLength = (segment.value / total) * circumference;\n const offset = arcStart;\n arcStart += arcLength;\n return (\n // 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.\n <circle\n key={segment.category}\n className=\"pire-chart-arc\"\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke={colorForSegment(segment.index)}\n strokeWidth={thickness}\n // The gap is taken off the arc rather than added between arcs, so the\n // segments still sum to the full circle.\n strokeDasharray={`${Math.max(0, arcLength - gapLength)} ${circumference}`}\n strokeDashoffset={-offset}\n data-hovered={hoveredIndex === segment.index ? 'true' : undefined}\n onMouseEnter={() => setHoveredIndex(segment.index)}\n />\n );\n })}\n </g>\n </svg>\n\n {/* HTML rather than SVG <text>: it inherits the type tokens and wraps on its own. */}\n <div className=\"pire-chart-donut-center\" style={{ width: size - thickness * 2 - 8 }}>\n <span className=\"pire-chart-donut-value\">\n {hovered ? formatValue(hovered.value) : (centerLabel ?? formatValue(total))}\n </span>\n <span className=\"pire-chart-donut-caption\">{hovered ? hovered.category : centerCaption}</span>\n </div>\n </div>\n )}\n </ChartFrame>\n );\n}\n\n/** Colour follows the segment here, not the series — see the component note. */\nfunction colorForSegment(index: number): string {\n return index < VIZ_SLOT_COUNT ? `var(--viz-${index + 1})` : 'var(--viz-other)';\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface LinkListItem {\n id: string;\n /** Technical key shown in mono — order number, material number. */\n key?: React.ReactNode;\n /** Secondary description, truncated. */\n text?: React.ReactNode;\n icon?: string;\n trailing?: React.ReactNode;\n}\n\nexport interface LinkListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n items: LinkListItem[];\n onSelect?: (id: string) => void;\n /**\n * Which slot gets the primary treatment. `'key'` (the default) sets `key` in mono and `text`\n * in secondary — right for \"OC-2026-000004 · Alfa S.A.\", where the code is what you scan.\n *\n * Use `'text'` when the name is what you scan and the code is the qualifier — a supplier or\n * customer list. It swaps the two treatments only; the slots keep their meanings, so `key`\n * stays the technical key and sorting or copying it still works.\n */\n emphasis?: 'key' | 'text';\n /** Names the list for assistive tech, e.g. \"Recently viewed orders\". */\n 'aria-label': string;\n}\n\n/** Compact list of records that navigate somewhere: recently viewed, related documents, shortcuts. */\nexport function LinkList({ items, onSelect, emphasis = 'key', className, ...rest }: LinkListProps) {\n return (\n <div className={cx('pire-linklist', className)} role=\"list\" data-emphasis={emphasis} {...rest}>\n {/* `role=\"list\"` requires children with `role=\"listitem\"`, and a button is not one: without\n this wrapper a screen reader announces a list containing nothing. The wrapper is a real\n flex box rather than `display: contents`, which has a history of dropping elements from\n the accessibility tree and would undo the fix it appears to make. */}\n {items.map((item) => {\n const keySlot = item.key ? <span className=\"pire-linklist-key\">{item.key}</span> : null;\n const textSlot = item.text ? <span className=\"pire-linklist-text\">{item.text}</span> : null;\n // Reordered here rather than with CSS `order`, so what a screen reader reads matches what\n // is on screen. A visual-only swap would leave the two disagreeing (WCAG 1.3.2), and the\n // whole row is one button, so there is no focus order to preserve by keeping the markup\n // fixed. The `emphasis` attribute on the root still drives the typography.\n const [first, second] = emphasis === 'text' ? [textSlot, keySlot] : [keySlot, textSlot];\n return (\n <div key={item.id} role=\"listitem\" className=\"pire-linklist-row\">\n <AriaButton className=\"pire-linklist-item\" onPress={() => onSelect?.(item.id)}>\n {item.icon ? (\n <Icon name={item.icon} size={16} style={{ color: 'var(--text-secondary)' }} />\n ) : null}\n {first}\n {second}\n {item.trailing}\n </AriaButton>\n </div>\n );\n })}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface RecordCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The record as a person names it — the branch, the supplier, the warehouse. */\n title: React.ReactNode;\n /** One line of secondary identity: an address, a code, a contact. Omit when the name is enough. */\n subtitle?: React.ReactNode;\n /** Lucide slug for the leading tile. */\n icon?: string;\n /** Trailing slot — usually a small tertiary Button that reopens the picker. Omit for a\n * read-only card, which is what a transfer's route needs at both ends. */\n action?: React.ReactNode;\n /**\n * Greys the card, and **only** the card: whatever sits in `action` stays fully pressable.\n *\n * The slot takes any node, so there is nothing here that could safely disable it — injecting a\n * prop into a stranger's element is a guess about what that element accepts. Pass `isDisabled`\n * to that control yourself, alongside this one, whenever the record is locked. A card is a\n * readout, not a control: this is presentation, and it carries no disabled semantics for\n * assistive tech either.\n */\n isDisabled?: boolean;\n}\n\n/**\n * A picked master-data record shown as a card rather than a field value: which branch, which\n * warehouse, which counterparty. Use it once a record is chosen — `ValueHelpField` is what\n * chooses one.\n */\nexport function RecordCard({\n title,\n subtitle,\n icon,\n action,\n isDisabled,\n className,\n ...rest\n}: RecordCardProps) {\n return (\n <div\n className={cx('pire-recordcard', className)}\n data-disabled={isDisabled ? 'true' : undefined}\n {...rest}\n >\n {icon ? (\n <span className=\"pire-recordcard-tile\" aria-hidden=\"true\">\n <Icon name={icon} size={20} />\n </span>\n ) : null}\n <span className=\"pire-recordcard-body\">\n <span className=\"pire-recordcard-title\">{title}</span>\n {subtitle ? <span className=\"pire-recordcard-sub\">{subtitle}</span> : null}\n </span>\n {action ? <span className=\"pire-recordcard-action\">{action}</span> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ViewSwitcherProps {\n /** The saved view currently applied. */\n name: string;\n /** The view has unsaved changes. Rendered as text and folded into the accessible name — a\n * colour-only marker is a state nobody using a screen reader ever learns about. */\n isDirty?: boolean;\n /** Leading glyph. Defaults to `star`, which is what saved views are marked with elsewhere. */\n icon?: string;\n /** Opens the consumer's own views menu or dialog. */\n onPress?: () => void;\n /** Set while the view list has nothing to switch to yet — e.g. the screen has not finished its\n * first load, or the consumer's views dialog is already open and re-opening it would be a\n * no-op. Do not use it to mean \"no views exist\"; render nothing in that case instead. */\n isDisabled?: boolean;\n /** Replaces the whole accessible name — the library's usual meaning for `aria-label`, the same\n * as `DataTable`, `SegmentedControl` and `FilterBar` give it. Reach for this when a screen\n * shows more than one saved-view switcher and the default \"Saved views: …\" phrasing would no\n * longer tell them apart. Supplying it hands the consumer the whole string: the dictionary's\n * modified phrasing no longer applies, so an `isDirty` view needs the override to say so\n * itself. */\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * The saved-view trigger every ERP list opens with. A `Button`, not a `Select`: picking a view\n * opens a dialog with scope and sharing, and a select that opens a dialog lies about what it is.\n *\n * Sits in a toolbar row, or in `Ribbon`'s `leading` slot when the ribbon is collapsed.\n */\nexport function ViewSwitcher({\n name,\n isDirty,\n icon = 'star',\n onPress,\n isDisabled,\n 'aria-label': ariaLabel,\n className,\n style,\n}: ViewSwitcherProps) {\n const msg = usePireMessages();\n const label =\n ariaLabel ??\n (isDirty\n ? msg.viewSwitcherNameModified.replace('{view}', name)\n : msg.viewSwitcherName.replace('{view}', name));\n return (\n <AriaButton\n className={cx('pire-viewswitcher', className)}\n style={style}\n aria-label={label}\n isDisabled={isDisabled}\n onPress={onPress}\n >\n <Icon name={icon} size={16} />\n <span className=\"pire-viewswitcher-name\">{name}</span>\n {/* aria-hidden: the marker is already in the button's accessible name above. Announcing it\n twice makes the view sound like \"Quiebres modified modified\". */}\n {isDirty ? (\n <span className=\"pire-viewswitcher-dirty\" aria-hidden=\"true\">\n {msg.viewSwitcherModifiedMark}\n </span>\n ) : null}\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface BarListItem {\n id: string;\n label: React.ReactNode;\n /** The magnitude the bar draws. */\n value: number;\n /** The figure as the reader should see it — formatted in the caller's locale, not here.\n * Defaults to `String(value)`. */\n valueLabel?: React.ReactNode;\n /** A second line under the figure: \"−12 reserved\", \"no stock\". */\n hint?: React.ReactNode;\n /** Tints the figure and the bar from the status ramp. Value states, never series colours. */\n tone?: 'neutral' | 'positive' | 'critical' | 'negative';\n}\n\nexport interface BarListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {\n /** Names the list for assistive tech — required. */\n 'aria-label': string;\n items: BarListItem[];\n /** What a full bar means. Defaults to the largest value present, which makes the list a\n * ranking. Supply it to compare against a target or a total instead. */\n max?: number;\n}\n\n/**\n * Label, proportional bar, figure — a ranked readout where the comparison is between rows.\n * Stock across branches, hours across cost centres, spend across suppliers.\n *\n * Not a chart: it uses the status ramp, not the `--viz-*` series ramp, because these are value\n * states. Not a `ProgressBar` either — that is one value against a known total.\n */\nexport function BarList({ items, max, className, ...rest }: BarListProps) {\n const scale = max ?? Math.max(0, ...items.map((i) => i.value));\n return (\n <ul {...rest} className={cx('pire-barlist', className)}>\n {items.map((item) => {\n const pct = scale > 0 ? Math.max(0, Math.min(100, (item.value / scale) * 100)) : 0;\n return (\n <li key={item.id} className=\"pire-barlist-row\" data-tone={item.tone}>\n <span className=\"pire-barlist-main\">\n <span className=\"pire-barlist-label\">{item.label}</span>\n {/* The bar restates the figure beside it, so it is decoration for assistive tech. */}\n <span className=\"pire-barlist-track\" aria-hidden=\"true\">\n <span className=\"pire-barlist-fill\" style={{ width: `${pct}%` }} />\n </span>\n </span>\n <span className=\"pire-barlist-figure\">\n <span className=\"pire-barlist-value\">{item.valueLabel ?? String(item.value)}</span>\n {item.hint ? <span className=\"pire-barlist-hint\">{item.hint}</span> : null}\n </span>\n </li>\n );\n })}\n </ul>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface PageBandProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `card` for a header band, `page` for a filter band or the body behind the content. */\n surface?: 'card' | 'page';\n /** `false` when the band below continues the same block and a rule would cut it in two. */\n hasBorder?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * The full-bleed horizontal band an ERP screen is built from: header, filters, body.\n *\n * Holds a `PageHeader`, `ObjectHeader`, `FilterBar` or edge-to-edge `Tabs`, supplying the page\n * gutter and the surface those components deliberately leave to their container.\n */\nexport function PageBand({\n surface = 'card',\n hasBorder = true,\n children,\n className,\n ...rest\n}: PageBandProps) {\n return (\n <div\n className={cx('pire-pageband', className)}\n data-surface={surface}\n data-border={hasBorder ? 'true' : undefined}\n {...rest}\n >\n {children}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title: React.ReactNode;\n /** One line of context: scope, plant, data timestamp. */\n subtitle?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\n/** Heading block for pages that are not a single object — launchpads, settings, reports.\n * Object pages use ObjectHeader instead. */\nexport function PageHeader({ title, subtitle, actions, className, ...rest }: PageHeaderProps) {\n return (\n <header className={cx('pire-pageheader', className)} {...rest}>\n <div style={{ minWidth: 0 }}>\n <h1 className=\"pire-pageheader-title\">{title}</h1>\n {subtitle ? <p className=\"pire-pageheader-sub\">{subtitle}</p> : null}\n </div>\n {actions ? <div className=\"pire-pageheader-actions\">{actions}</div> : null}\n </header>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface SectionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Uppercase micro-caps eyebrow — the space or group name. */\n title: React.ReactNode;\n /** Count or qualifier shown beside the title. */\n meta?: React.ReactNode;\n /** Usually one tertiary Button: \"Open space\", \"See all\". */\n actions?: React.ReactNode;\n}\n\n/** Divides a long page into named bands. Pairs with a KPI row or a card grid below it. */\nexport function SectionHeader({ title, meta, actions, className, ...rest }: SectionHeaderProps) {\n return (\n <div className={cx('pire-sectionhead', className)} {...rest}>\n <span className=\"pire-eyebrow\">{title}</span>\n {meta ? (\n <span style={{ font: 'var(--type-caption)', color: 'var(--text-tertiary)' }}>{meta}</span>\n ) : null}\n {actions ? <div className=\"pire-sectionhead-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useLocale } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** A noun in the two forms a count needs. `one` for a grammatically singular count, `other` for the\n * rest — the same split `Intl.PluralRules` makes, which is what picks between them. */\nexport interface SelectionBarNoun {\n one: string;\n other: string;\n}\n\nexport interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of selected records. The bar renders nothing at 0. */\n count: number;\n /**\n * The records' noun. Pass both forms — `{ one: 'orden', other: 'órdenes' }` — since a plural is\n * not the singular plus an \"s\" in any language this library ships for.\n *\n * A bare string is still accepted and pluralised the old English way, by appending \"s\". That is\n * kept so existing English screens do not change; do not use it for anything else. Defaults to\n * the dictionary's `selectionBarNounOne` / `selectionBarNounOther`.\n */\n noun?: string | SelectionBarNoun;\n /**\n * Grammatical gender of `noun`, for the participle that agrees with it: \"2 órdenes\n * seleccionadas\", \"2 presupuestos seleccionados\". Picks the dictionary's `…Feminine` entries.\n * Default `masculine`, which is also the gender of the default noun.\n */\n gender?: 'masculine' | 'feminine';\n /** Replaces the whole sentence, for a screen that needs a phrasing the dictionary cannot build.\n * Called with the raw count; format it yourself. */\n label?: (count: number) => React.ReactNode;\n /** Renders the bar's own \"Clear selection\" button after the count. Every selection bar needs\n * one, and the bar is the only place on screen that knows it is the selection being cleared. */\n onClear?: () => void;\n /** Overrides the dictionary's `selectionBarClear`. */\n clearLabel?: string;\n /** What happens on commit — mass posting caveats belong here, not in a toast. */\n children?: React.ReactNode;\n /** Buttons, size=\"sm\". Destructive last. */\n actions?: React.ReactNode;\n}\n\n/** Appears above a table once rows are selected and states exactly how many.\n * The count is announced, so keyboard users know a selection changed. */\nexport function SelectionBar({\n count,\n noun,\n gender = 'masculine',\n label,\n onClear,\n clearLabel,\n children,\n actions,\n className,\n ...rest\n}: SelectionBarProps) {\n const msg = usePireMessages();\n const { locale } = useLocale();\n const plural = React.useMemo(() => new Intl.PluralRules(locale), [locale]);\n const numbers = React.useMemo(() => new Intl.NumberFormat(locale), [locale]);\n if (!count) return null;\n\n const isOne = plural.select(count) === 'one';\n let sentence: React.ReactNode;\n if (label) {\n sentence = label(count);\n } else {\n const word =\n typeof noun === 'string'\n ? `${noun}${count === 1 ? '' : 's'}`\n : noun\n ? isOne\n ? noun.one\n : noun.other\n : isOne\n ? msg.selectionBarNounOne\n : msg.selectionBarNounOther;\n const feminine = gender === 'feminine';\n const template = isOne\n ? feminine\n ? msg.selectionBarCountOneFeminine\n : msg.selectionBarCountOne\n : feminine\n ? msg.selectionBarCountOtherFeminine\n : msg.selectionBarCountOther;\n sentence = template.replace('{count}', numbers.format(count)).replace('{noun}', word);\n }\n\n return (\n <div className={cx('pire-selectionbar', className)} role=\"status\" aria-live=\"polite\" {...rest}>\n <span className=\"pire-selectionbar-count\">{sentence}</span>\n {onClear ? (\n <Button size=\"sm\" variant=\"tertiary\" onPress={onClear}>\n {clearLabel ?? msg.selectionBarClear}\n </Button>\n ) : null}\n {children ? <span className=\"pire-selectionbar-note\">{children}</span> : null}\n {actions ? <div className=\"pire-selectionbar-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface FooterBarProps extends React.HTMLAttributes<HTMLElement> {\n /** Left-hand status: validation summary, draft saved at, total. */\n note?: React.ReactNode;\n /** Commit actions. Cancel first, primary or danger last. */\n actions?: React.ReactNode;\n}\n\n/** Sticky commit bar for create and edit screens: the page scrolls, the decision stays visible.\n * Give the scrolling container bottom padding equal to the bar height. */\nexport function FooterBar({ note, actions, children, className, ...rest }: FooterBarProps) {\n return (\n <footer className={cx('pire-footerbar', className)} {...rest}>\n {note ? <span className=\"pire-footerbar-note\">{note}</span> : null}\n {children}\n {actions ? <div className=\"pire-footerbar-actions\">{actions}</div> : null}\n </footer>\n );\n}\n","import type * as React from 'react';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface SplitPaneProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The narrow column: a list of records, kept in view while one of them is read. */\n list: React.ReactNode;\n /** The wide column. Leave it out when nothing is selected — `emptyDetail` fills the space. */\n detail?: React.ReactNode;\n /** Width of the list column. A number is pixels. */\n listWidth?: number | string;\n /** Names the list region for assistive tech. Both panes are landmarks, so both want a name. */\n listLabel?: string;\n detailLabel?: string;\n /** Shown in place of the detail column when there is no `detail`. */\n emptyDetail?: React.ReactNode;\n /**\n * Returns to the list on a narrow container, where only one column fits at a time.\n *\n * Without it a narrow layout can reach the detail and never leave it, so pass it whenever the\n * pane can be seen on a small screen.\n */\n onBack?: () => void;\n backLabel?: string;\n}\n\n/**\n * Two columns that live side by side and scroll independently — a list on the left, the selected\n * record on the right.\n *\n * Distinct from `SidePanel`, which is an overlay: this one is a layout, the panes coexist, and\n * nothing is dismissed to get back to the list.\n *\n * It fills the box it is given and owns the scrolling inside it, so give it a parent with a\n * definite height and no padding of its own. A wrapper that scrolls as well produces two nested\n * scrollbars, which is the usual way this pattern goes wrong.\n */\nexport function SplitPane({\n list,\n detail,\n listWidth = '24rem',\n listLabel,\n detailLabel,\n emptyDetail,\n onBack,\n backLabel,\n className,\n style,\n ...rest\n}: SplitPaneProps) {\n const msg = usePireMessages();\n const width = typeof listWidth === 'number' ? `${listWidth}px` : listWidth;\n\n return (\n <div\n className={cx('pire-split', className)}\n data-has-detail={detail != null ? 'true' : undefined}\n style={{ ['--pire-split-list-w' as string]: width, ...style } as React.CSSProperties}\n {...rest}\n >\n <section className=\"pire-split-list\" aria-label={listLabel ?? msg.splitPaneList}>\n {list}\n </section>\n <section className=\"pire-split-detail\" aria-label={detailLabel ?? msg.splitPaneDetail}>\n {/* Rendered always and hidden by the container query on wide layouts, rather than switched\n on a measured width. Nothing here depends on JavaScript knowing the size. */}\n {onBack ? (\n <div className=\"pire-split-back\">\n <Button variant=\"tertiary\" size=\"sm\" icon=\"arrow-left\" onPress={onBack}>\n {backLabel ?? msg.splitPaneBack}\n </Button>\n </div>\n ) : null}\n {detail ?? <div className=\"pire-split-empty\">{emptyDetail}</div>}\n </section>\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Dialog } from '../feedback/Dialog';\nimport { InlineMessage } from '../feedback/InlineMessage';\nimport { Button } from '../core/Button';\nimport { DescriptionList } from '../data/DescriptionList';\nimport type { ObjectFact } from '../data/ObjectHeader';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface ConfirmDialogProps {\n isOpen?: boolean;\n /** Question form, sentence case: \"Release purchase order?\" */\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n /**\n * The key figures the decision rests on, shown above the consequence. Use it when the number\n * *is* the reason to hesitate — units moved, value written off, records affected. A dialog\n * whose figures are buried in prose asks the reader to do arithmetic under time pressure.\n */\n facts?: ObjectFact[];\n /** What will happen — rendered as a warning, or an error when tone is danger. */\n consequence?: React.ReactNode;\n /** Extra detail or an opt-in Checkbox. */\n children?: React.ReactNode;\n confirmLabel?: string;\n cancelLabel?: string;\n /** danger = irreversible: red commit button, error-toned consequence. */\n tone?: 'primary' | 'danger';\n /** Disables both buttons and shows \"Working…\" on the commit button. */\n isBusy?: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\n/** Interrupts one irreversible action. Never use for information — that is an InlineMessage. */\nexport function ConfirmDialog({\n isOpen,\n title,\n subtitle,\n facts,\n consequence,\n children,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n tone = 'primary',\n isBusy,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) {\n const msg = usePireMessages();\n return (\n <Dialog\n isOpen={isOpen}\n size=\"sm\"\n title={title}\n subtitle={subtitle}\n onClose={onCancel}\n isDismissable={!isBusy}\n showClose={false}\n footer={\n <>\n <Button variant=\"tertiary\" isDisabled={isBusy} onPress={onCancel}>\n {cancelLabel}\n </Button>\n <Button variant={tone === 'danger' ? 'danger' : 'primary'} isDisabled={isBusy} onPress={onConfirm}>\n {isBusy ? 'Working…' : confirmLabel}\n </Button>\n </>\n }\n >\n {facts?.length ? (\n // The role is what makes the name stick. A bare <div> resolves to `generic`, which\n // *prohibits* `aria-label` — the label named nothing at all, and axe's\n // `aria-prohibited-attr` fails it on sight. Every other labelled div/span in this library\n // pairs with an explicit role for the same reason.\n <div className=\"pire-confirm-facts\" role=\"group\" aria-label={msg.confirmDialogFactsLabel}>\n <DescriptionList layout=\"rows\" items={facts} />\n </div>\n ) : null}\n {consequence ? (\n <InlineMessage\n kind={tone === 'danger' ? 'error' : 'warning'}\n style={{ marginBottom: children ? 'var(--sp-3)' : 0 }}\n >\n {consequence}\n </InlineMessage>\n ) : null}\n {children}\n </Dialog>\n );\n}\n","import * as React from 'react';\nimport {\n Autocomplete,\n ModalOverlay,\n Modal,\n Dialog as AriaDialog,\n SearchField,\n Input as AriaInput,\n Menu as AriaMenu,\n MenuSection as AriaMenuSection,\n Header,\n useFilter,\n} from 'react-aria-components';\nimport type { Key } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Kbd } from '../core/Kbd';\nimport { MenuItem } from '../navigation/Menu';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface CommandPaletteItem {\n /** Passed back to `onAction`. Must be unique across every group in the palette. */\n id: string;\n label: string;\n /** Second line — what the command does, or what identifies the record. */\n description?: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon?: string;\n /**\n * Painted on the right as key caps. Registers nothing; bind the key yourself.\n *\n * A string is split on `+` and spaces; pass an array when it cannot be — `['⌘', 'N']`.\n */\n shortcut?: string | string[];\n /**\n * Extra terms this item should match on, beyond its label. The place to put synonyms, the\n * English name of a Spanish command, and the abbreviations people actually type — a palette\n * that only matches the visible label makes users guess the wording.\n *\n * Matched against, never announced: the accessible name stays the label alone.\n */\n keywords?: string;\n isDisabled?: boolean;\n}\n\nexport interface CommandPaletteGroup {\n id: string;\n /** Heading above the group. Omit for a single unlabelled list. */\n label?: string;\n items: CommandPaletteItem[];\n}\n\nexport interface CommandPaletteProps {\n isOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Static groups — navigation targets and actions. Filtered locally as the user types, so these\n * are the whole list, not a page of it.\n */\n groups?: CommandPaletteGroup[];\n /**\n * Server-backed results, appended after the static groups and **never filtered locally**: the\n * server already ranked them, and a local \"contains\" pass would drop fuzzy and synonym matches.\n * Feed it from `onSearch`.\n */\n resultsGroup?: CommandPaletteGroup;\n /** The chosen item's `id`. The palette does not close itself — decide in the handler. */\n onAction?: (id: string) => void;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * Only needed for `resultsGroup`; the static groups filter without it.\n */\n onSearch?: (query: string) => void;\n /** Shows a status row rather than an empty list while a request is in flight. */\n isLoading?: boolean;\n /** Overrides the dictionary's `commandPaletteEmpty`. */\n emptyLabel?: React.ReactNode;\n /** Overrides the dictionary's `commandPaletteLoading`. */\n loadingLabel?: string;\n placeholder?: string;\n /**\n * Replaces the default key hints along the bottom. Use it for a product-specific affordance —\n * a scope switch, a \"search everything\" toggle.\n */\n footer?: React.ReactNode;\n /** Drops the footer entirely. The hints are worth their space until an app teaches the keys elsewhere. */\n showFooter?: boolean;\n /** Names the dialog for assistive tech. Defaults to the dictionary's `commandPaletteLabel`. */\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * The collection key of the section holding `resultsGroup`. Fixed rather than taken from the\n * consumer's group id, because the filter below has to recognise that section without trusting\n * user input.\n *\n * Deliberately not spelled like a `pire-*` class: it is a collection key, and `styles.css.test.ts`\n * reads `pire-*` string literals in component source as class references.\n */\nconst RESULTS_SECTION_KEY = '__pire_results__';\n\n/** Everything an item should match on. Kept out of `textValue` so screen readers announce the\n * label alone rather than the label plus a bag of synonyms. */\nconst searchableText = (item: CommandPaletteItem) =>\n [item.label, item.description, item.keywords].filter(Boolean).join(' ');\n\n/**\n * Application-wide search over commands, navigation targets and records — the Cmd/Ctrl+K surface.\n *\n * Behaviour is React Aria's `Autocomplete`: focus stays in the input while the arrow keys move\n * `aria-activedescendant` through the list, so typing and choosing never fight each other. Pire\n * supplies the overlay, the grouping and the empty/loading states.\n *\n * Open state is always the product's. Bind the shortcut with {@link useCommandPaletteShortcut},\n * or with anything else — an ERP may already own that key.\n */\nexport function CommandPalette({\n isOpen,\n onOpenChange,\n groups = [],\n resultsGroup,\n onAction,\n onSearch,\n isLoading,\n emptyLabel,\n loadingLabel,\n placeholder,\n footer,\n showFooter = true,\n 'aria-label': ariaLabel,\n className,\n style,\n}: CommandPaletteProps) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n // `contains` with base sensitivity so \"periodo\" finds \"Período\" and \"factura\" finds \"Factura\".\n // Accent- and case-sensitive matching makes a palette feel broken in Spanish.\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Reset on open, not on close: clearing on the way out is visible during the exit transition.\n React.useEffect(() => {\n if (isOpen) setQuery('');\n }, [isOpen]);\n\n const searchableById = React.useMemo(() => {\n const byId = new Map<string, string>();\n for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));\n return byId;\n }, [groups]);\n\n /**\n * The node is typed structurally rather than as React Aria's `Node<T>`, which lives in\n * `@react-types/shared` — a transitive package Pire does not depend on and should not start\n * depending on for one type. A wider parameter type is safe here: the callback is only ever\n * called with a full node.\n */\n const filter = React.useCallback(\n (textValue: string, inputValue: string, node: { key: Key; parentKey?: Key | null }) => {\n // The server's own ranking survives only if nothing filters it again.\n if (node.parentKey === RESULTS_SECTION_KEY) return true;\n return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);\n },\n [contains, searchableById],\n );\n\n const handleInputChange = (value: string) => {\n setQuery(value);\n onSearch?.(value);\n };\n\n const sections = [...groups, ...(resultsGroup ? [{ ...resultsGroup, id: RESULTS_SECTION_KEY }] : [])];\n const status = isLoading\n ? (loadingLabel ?? msg.commandPaletteLoading)\n : (emptyLabel ?? msg.commandPaletteEmpty);\n\n return (\n <ModalOverlay\n className=\"pire-cp-overlay\"\n isOpen={isOpen}\n isDismissable\n onOpenChange={(open) => {\n if (!open) onOpenChange?.(false);\n }}\n >\n <Modal className={cx('pire-cp-modal', className)} style={style}>\n <AriaDialog className=\"pire-cp-dialog\" aria-label={ariaLabel ?? msg.commandPaletteLabel}>\n <Autocomplete filter={filter} inputValue={query} onInputChange={handleInputChange}>\n <SearchField className=\"pire-cp-search\" aria-label={msg.commandPaletteSearchLabel}>\n <Icon name=\"search\" size={18} className=\"pire-cp-search-icon\" />\n {/* autoFocus is correct here specifically: the palette exists to be typed into, and\n it is a modal the user just chose to open, so taking the caret is what they asked\n for rather than a focus steal. */}\n <AriaInput\n className=\"pire-cp-input\"\n autoFocus\n placeholder={placeholder ?? msg.commandPalettePlaceholder}\n />\n </SearchField>\n {isLoading ? (\n <div className=\"pire-cp-loading\" role=\"status\" aria-live=\"polite\">\n {loadingLabel ?? msg.commandPaletteLoading}\n </div>\n ) : null}\n <AriaMenu\n className=\"pire-cp-list\"\n onAction={(key) => onAction?.(String(key))}\n renderEmptyState={() => <div className=\"pire-cp-status\">{status}</div>}\n >\n {sections.map((section) => (\n <AriaMenuSection key={section.id} id={section.id} className=\"pire-cp-section\">\n {section.label ? <Header className=\"pire-cp-section-title\">{section.label}</Header> : null}\n {section.items.map((item) => (\n <MenuItem\n key={item.id}\n id={item.id}\n textValue={item.label}\n icon={item.icon}\n description={item.description}\n shortcut={item.shortcut}\n isDisabled={item.isDisabled}\n >\n {item.label}\n </MenuItem>\n ))}\n </AriaMenuSection>\n ))}\n </AriaMenu>\n </Autocomplete>\n {showFooter ? (\n // aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen\n // reader already announces the listbox semantics that make those keys work, so reading\n // \"up arrow down arrow navigate\" out loud is noise on every open.\n <div className=\"pire-cp-foot\" aria-hidden=\"true\">\n {footer ?? (\n <>\n <span className=\"pire-cp-hint\">\n <Kbd>↑</Kbd>\n <Kbd>↓</Kbd>\n {msg.commandPaletteHintNavigate}\n </span>\n <span className=\"pire-cp-hint\">\n <Kbd>↵</Kbd>\n {msg.commandPaletteHintSelect}\n </span>\n <span className=\"pire-cp-hint\">\n <Kbd>esc</Kbd>\n {msg.commandPaletteHintClose}\n </span>\n </>\n )}\n </div>\n ) : null}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport interface CommandPaletteShortcutOptions {\n /** The key pressed with Cmd (macOS) or Ctrl. Single character, matched case-insensitively. */\n key?: string;\n /** Stop listening — while a modal owns the keyboard, for instance. */\n isDisabled?: boolean;\n}\n\n/**\n * Binds Cmd+K / Ctrl+K to open the palette.\n *\n * Opt-in rather than built into {@link CommandPalette}, because a global key listener is the\n * component's to grant and the app's to own: an ERP may already bind that combination, and a\n * component that claims it on mount takes it silently.\n */\nexport function useCommandPaletteShortcut(\n onTrigger: () => void,\n { key = 'k', isDisabled }: CommandPaletteShortcutOptions = {},\n): void {\n const handler = React.useRef(onTrigger);\n handler.current = onTrigger;\n\n React.useEffect(() => {\n if (isDisabled) return;\n const onKeyDown = (event: KeyboardEvent) => {\n if (!(event.metaKey || event.ctrlKey) || event.altKey) return;\n if (event.key.toLowerCase() !== key.toLowerCase()) return;\n // Chrome and Firefox both use Ctrl/Cmd+K for the address bar; without this the palette\n // opens behind a focused omnibox.\n event.preventDefault();\n handler.current();\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [key, isDisabled]);\n}\n","import * as React from 'react';\nimport {\n DialogTrigger,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n useFilter,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Input } from '../forms/Input';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface AppLauncherItem {\n /** Passed back to `onAction`. Unique across every section. */\n id: string;\n label: string;\n /** Second line, in a `tile` section. Ignored by `compact`, which has no room for it. */\n description?: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon?: string;\n /**\n * Extra terms this entry should match on, beyond its label and description — the English name of\n * a Spanish app, the abbreviation people actually type, the old name it was renamed from.\n *\n * Matched against, never announced: the accessible name stays the label alone. Named to match\n * `CommandPaletteItem.keywords`, which does the same job in the same way.\n */\n keywords?: string;\n}\n\nexport interface AppLauncherSection {\n /** Heading above the block. Omit for a single unlabelled grid. */\n label?: string;\n items: AppLauncherItem[];\n /**\n * `tile` (the default) is a destination worth describing: an accent plate, the name, and\n * `description` underneath. `compact` is a link that only needs naming, and drops to a muted\n * 16px glyph on one line.\n *\n * The distinction is not decoration. An ERP's app catalogue and its company-wide functions are\n * different kinds of thing, and drawing them at equal weight makes eleven equal choices out of\n * what is really seven plus four.\n */\n variant?: 'tile' | 'compact';\n}\n\nexport interface AppLauncherProps {\n /** The catalogue, in the order it should read. */\n sections: AppLauncherSection[];\n /** Fires with the chosen item's id. The panel closes itself first. */\n onAction?: (id: string) => void;\n /** Id of the open application, marked `aria-current` and highlighted. */\n value?: string;\n /** Heading inside the panel. Defaults to the dictionary's `appLauncherTitle`. */\n title?: React.ReactNode;\n /** Secondary text beside the heading — \"7 applications · 4 company functions\". */\n meta?: React.ReactNode;\n /** Drops the search box. Worth keeping until a catalogue is genuinely short. */\n isSearchable?: boolean;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * On its own this only observes; it does not change how `sections` is treated. Pair it with\n * `isFilteredExternally` to actually hand filtering over.\n */\n onSearchChange?: (query: string) => void;\n /**\n * `sections` is the final list and the launcher filters nothing locally. Required for\n * server-backed catalogues: fuzzy matches, synonyms and code-to-description hits do not survive\n * a second local \"contains\" pass.\n *\n * Named to match `ComboBox` and `ValueHelpDialog`, deliberately — one concept under two names is\n * worse than either name.\n */\n isFilteredExternally?: boolean;\n /** Shows a status row rather than \"nothing found\" while a request is in flight. */\n isLoading?: boolean;\n /** Overrides the dictionary's `appLauncherEmpty`. */\n emptyLabel?: React.ReactNode;\n /** Overrides the dictionary's `appLauncherSearch`, which is both placeholder and field label. */\n searchPlaceholder?: string;\n /** Accessible name of the trigger *and* the panel. Defaults to the dictionary's `appLauncherLabel`. */\n 'aria-label'?: string;\n /** Trigger glyph. `grid-2x2` is the launcher convention; override for a product mark. */\n icon?: string;\n className?: string;\n}\n\n/** Everything an entry matches on. Kept out of the accessible name so a screen reader announces the\n * label alone rather than the label plus a bag of synonyms. */\nconst searchableText = (item: AppLauncherItem) =>\n [item.label, item.description, item.keywords].filter(Boolean).join(' ');\n\n/**\n * The shell's application switcher: the full catalogue, one press from anywhere.\n *\n * Trigger and panel are one component rather than two exports, so nothing in the product has to\n * hold the open state or line the popover up with the button. The trigger is sized to `--rail-w`\n * and pulled through the shell bar's padding, which puts it directly above `ShellRail` — pass it to\n * `ShellBar`'s `launcher` slot and the two columns align on their own.\n *\n * The rail carries the apps a user works in every day; this carries all of them. That is the whole\n * division of labour, and it is why the launcher is not simply a longer rail.\n *\n * Filtering is local by default, over label, description and `keywords`, accent- and\n * case-insensitively — \"compras\" has to find \"Compras\" and \"periodo\" has to find \"Período\", or the\n * box feels broken in Spanish. Hand it to a server with `isFilteredExternally`.\n */\nexport function AppLauncher({\n sections,\n onAction,\n value,\n title,\n meta,\n isSearchable = true,\n onSearchChange,\n isFilteredExternally,\n isLoading,\n emptyLabel,\n searchPlaceholder,\n 'aria-label': ariaLabel,\n icon = 'grid-2x2',\n className,\n}: AppLauncherProps) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const handleSearch = (next: string) => {\n setQuery(next);\n onSearchChange?.(next);\n };\n\n const visible = React.useMemo(() => {\n // Under external filtering `sections` is already the answer. Filtering it again is not merely\n // redundant: it drops every match the server made on something the item does not contain.\n if (isFilteredExternally) return sections;\n const q = query.trim();\n if (!q) return sections;\n return (\n sections\n .map((section) => ({\n ...section,\n items: section.items.filter((i) => contains(searchableText(i), q)),\n }))\n // A heading over nothing reads as a section that failed to load, so empty ones are dropped\n // rather than left standing — which is also what makes the empty state below reachable.\n .filter((section) => section.items.length > 0)\n );\n }, [sections, query, isFilteredExternally, contains]);\n\n const isEmpty = !isLoading && visible.length === 0;\n const label = ariaLabel ?? msg.appLauncherLabel;\n\n return (\n <DialogTrigger>\n <AriaButton className=\"pire-launcher-trigger\" aria-label={label}>\n <Icon name={icon} size={20} />\n </AriaButton>\n {/* Anchored under the trigger and flush with the shell's left edge, so the panel opens over the\n rail it replaces rather than over the work. `containerPadding={0}` keeps that flush edge —\n React Aria otherwise insets an overlay from the viewport and the alignment drifts by 12px. */}\n <Popover\n className={cx('pire-launcher-popover', className)}\n placement=\"bottom start\"\n offset={0}\n crossOffset={0}\n containerPadding={0}\n >\n {/* Dialog, not a bare div: it is what gives the popover a role and a name, and what returns\n focus to the trigger on Escape. `close` comes from React Aria, so choosing an app\n dismisses the panel without the product owning open state. */}\n <AriaDialog className=\"pire-launcher\" aria-label={label}>\n {({ close }) => (\n <>\n <div className=\"pire-launcher-head\">\n <span className=\"pire-launcher-title\">{title ?? msg.appLauncherTitle}</span>\n {meta ? <span className=\"pire-launcher-meta\">{meta}</span> : null}\n </div>\n {isSearchable ? (\n // autoFocus is right here specifically: the panel exists to be searched, and the\n // user just chose to open it, so taking the caret is what they asked for.\n <Input\n aria-label={msg.appLauncherSearch}\n icon=\"search\"\n type=\"search\"\n autoFocus\n isClearable\n value={query}\n onChange={handleSearch}\n placeholder={searchPlaceholder ?? msg.appLauncherSearch}\n />\n ) : null}\n {isLoading ? (\n <div className=\"pire-launcher-empty\" role=\"status\" aria-live=\"polite\">\n {msg.appLauncherLoading}\n </div>\n ) : null}\n {isEmpty ? (\n <div className=\"pire-launcher-empty\">{emptyLabel ?? msg.appLauncherEmpty}</div>\n ) : null}\n {visible.map((section, si) => (\n // Sections are positional zones with no record identity, so the heading is the key\n // where there is one. Same reasoning as ShellRail's groups.\n <div className=\"pire-launcher-section\" key={section.label ?? section.items[0]?.id ?? si}>\n {section.label ? <div className=\"pire-eyebrow\">{section.label}</div> : null}\n <div className=\"pire-launcher-grid\" data-variant={section.variant ?? 'tile'}>\n {section.items.map((item) => {\n const isCurrent = item.id === value;\n const showsDescription =\n (section.variant ?? 'tile') === 'tile' && Boolean(item.description);\n return (\n <AriaButton\n key={item.id}\n className=\"pire-launcher-item\"\n data-selected={isCurrent ? 'true' : undefined}\n aria-current={isCurrent ? 'true' : undefined}\n onPress={() => {\n close();\n onAction?.(item.id);\n }}\n >\n {item.icon ? (\n <span className=\"pire-launcher-item-icon\">\n <Icon\n name={item.icon}\n size={(section.variant ?? 'tile') === 'tile' ? 20 : 16}\n />\n </span>\n ) : null}\n <span className=\"pire-launcher-item-text\">\n <span className=\"pire-launcher-item-label\">{item.label}</span>\n {showsDescription ? (\n <span className=\"pire-launcher-item-desc\">{item.description}</span>\n ) : null}\n </span>\n </AriaButton>\n );\n })}\n </div>\n </div>\n ))}\n </>\n )}\n </AriaDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n","import * as React from 'react';\nimport { ModalOverlay, Modal, Dialog as AriaDialog, Heading } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** At or below this viewport width a docked panel is presented as a modal instead: beside a table\n * on a phone there is no room for either. The library's one phone breakpoint — `AppLauncher`\n * drops to a single column at the same width. */\nconst PHONE_MAX_WIDTH = 600;\n\nexport interface SidePanelProps {\n isOpen?: boolean;\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n /** Panel width in px. 400 default; 560 for editable forms. */\n width?: number;\n /**\n * `modal` (default) overlays the page: a scrim, a focus trap, the list behind it inert. Right for\n * a detail that interrupts.\n *\n * `docked` puts the panel *in the flow* — place it beside the table in a flex row — with no scrim\n * and no trap, so the list stays usable and choosing another row switches the record being\n * edited. Right for a 4–8 field master (categories, cost centres, cash boxes) that has no page of\n * its own. `Escape` inside the panel still calls `onClose`.\n *\n * Opening a docked panel does not move focus: it opens because the user picked a row, and pulling\n * them out of the table each time they pick another would make the list unusable from the\n * keyboard. At a phone's width (600px or less) the panel falls back to the modal presentation.\n */\n presentation?: 'modal' | 'docked';\n children?: React.ReactNode;\n footer?: React.ReactNode;\n onClose?: () => void;\n className?: string;\n}\n\nconst narrowQuery = `(max-width: ${PHONE_MAX_WIDTH}px)`;\nconst subscribeNarrow = (notify: () => void) => {\n if (typeof window === 'undefined' || !window.matchMedia) return () => {};\n const query = window.matchMedia(narrowQuery);\n query.addEventListener('change', notify);\n return () => query.removeEventListener('change', notify);\n};\nconst isNarrow = () =>\n typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia(narrowQuery).matches;\n\n/** Right-hand panel for details and edits that must keep the list in view. */\nexport function SidePanel({\n isOpen,\n title,\n subtitle,\n width = 400,\n presentation = 'modal',\n children,\n footer,\n onClose,\n className,\n}: SidePanelProps) {\n const msg = usePireMessages();\n const titleId = React.useId();\n const narrow = React.useSyncExternalStore(subscribeNarrow, isNarrow, () => false);\n\n const head = (heading: React.ReactNode) => (\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n {heading}\n {subtitle ? (\n <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>\n {subtitle}\n </p>\n ) : null}\n </div>\n <IconButton icon=\"x\" label={msg.sidePanelClose} size=\"sm\" onPress={onClose} />\n </header>\n );\n\n if (presentation === 'docked' && !narrow) {\n if (!isOpen) return null;\n return (\n // A named `section` (role `region`) rather than the `aside` the shape suggests: `aside` is a\n // complementary landmark, which must sit at the top level of the page, and a docked editor\n // lives inside the app's `main` by definition.\n <section\n className={cx('pire-sidepanel', className)}\n data-presentation=\"docked\"\n aria-labelledby={title ? titleId : undefined}\n style={{ width }}\n onKeyDown={(e) => {\n // A popover or combobox inside the panel that handled Escape itself has already stopped\n // it or marked it handled; only an Escape nobody claimed closes the panel.\n if (e.key !== 'Escape' || e.defaultPrevented || e.nativeEvent.isComposing) return;\n e.preventDefault();\n onClose?.();\n }}\n >\n {head(\n <h2 id={titleId} className=\"pire-dialog-title\">\n {title}\n </h2>,\n )}\n <div className=\"pire-dialog-body\">{children}</div>\n {footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null}\n </section>\n );\n }\n\n return (\n <ModalOverlay\n className=\"pire-sidepanel-overlay\"\n isOpen={isOpen}\n isDismissable\n onOpenChange={(o) => {\n if (!o) onClose?.();\n }}\n >\n <Modal className={cx('pire-sidepanel', className)} style={{ width }}>\n <AriaDialog className=\"pire-dialog\" style={{ height: '100%' }}>\n {head(\n <Heading slot=\"title\" className=\"pire-dialog-title\">\n {title}\n </Heading>,\n )}\n <div className=\"pire-dialog-body\" style={{ flex: 1 }}>\n {children}\n </div>\n {footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Icon slug, 24px. Match the domain: \"search\" for no results, \"file-text\" for no records. */\n icon?: string;\n /** Headline. Rich content, not the DOM title/tooltip attribute. */\n title?: React.ReactNode;\n /** The single action that resolves the emptiness. */\n action?: React.ReactNode;\n /** Tighter padding, for inside cards and panels. */\n compact?: boolean;\n}\n\n/** Says what is missing, why, and the one thing to do about it. */\nexport function EmptyState({\n icon = 'file-text',\n title,\n action,\n compact,\n children,\n className,\n ...rest\n}: EmptyStateProps) {\n return (\n <div className={cx('pire-empty', className)} data-compact={compact ? 'true' : undefined} {...rest}>\n <Icon name={icon} size={24} className=\"pire-empty-icon\" />\n {title ? (\n <p className=\"pire-empty-title\" style={{ margin: 0 }}>\n {title}\n </p>\n ) : null}\n {children ? (\n <p className=\"pire-empty-body\" style={{ margin: 0 }}>\n {children}\n </p>\n ) : null}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useLocale } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { decimalSeparatorFor } from '../utils/decimalSeparator';\n\nexport interface NumPadKey {\n /**\n * What the key produces. A digit or a run of digits (`'7'`, `'00'`, `'000'`) is inserted into\n * the buffer directly — that covers the whole base grid plus a money keypad's multi-zero keys\n * for free. Anything else is a value NumPad cannot interpret on its own — an exact-balance\n * button, say — so it is reported through {@link NumPadProps.onAction} instead of touched.\n * `'backspace'`, `'clear'` and `'decimal'` are reserved: they always edit the buffer, never\n * insert. `'decimal'` is placed on the grid by {@link NumPadProps.maxFractionDigits} rather than\n * listed here, and does nothing when that prop is absent.\n */\n value: string;\n /** Visible content. Falls back to `value` for a digit key; required for anything else — an\n * action key has no default text that would make sense to show. */\n label?: React.ReactNode;\n /** Grid columns this key spans, in the 4-column layout. Defaults to 1. */\n span?: 1 | 2;\n}\n\nexport interface NumPadProps {\n /** Names the key grid. Required: it is ~16 individually meaningless buttons (\"7\", \"⌫\"…), and\n * nothing else on screen names the group of them. */\n 'aria-label': string;\n /** What is currently being edited — a selected line, the amount due. Announced through a live\n * region on change, so a screen-reader user knows where their keystrokes are going before they\n * press one. */\n target?: React.ReactNode;\n /** The buffer, controlled. NumPad renders no state of its own — the same principle\n * `NumberField` follows by reading React Aria's state instead of mirroring it — so the grid\n * and the physical keyboard can never disagree about what has been typed. */\n value: string;\n onChange: (value: string) => void;\n /** Extra keys appended after the base grid (`7 8 9 C` / `4 5 6 ⌫` / `1 2 3 0`), in the same\n * 4-column layout — a money keypad's `00`, `000` and a wide \"exact balance\" key. */\n extraKeys?: NumPadKey[];\n /**\n * Fired when a key whose `value` is not purely digits is pressed (the base grid and any\n * numeric `extraKeys` never call this — they go straight to `onChange`). The one place NumPad\n * hands control back to the app: it cannot know what a key like `{ value: 'exact' }` should\n * write into the buffer, only that it was pressed.\n */\n onAction?: (value: string) => void;\n /**\n * How many decimals the buffer accepts. Omitted — the default — no separator key is drawn and\n * the pad types integers, which is all a unit count or a guaraní amount needs.\n *\n * Above 0, the locale's own separator joins the grid as a thirteenth key (the base twelve do not\n * move: this is typed without looking down), the physical `,` and `.` both write it, and the\n * fraction is capped at this many digits. Pass the precision the unit of measure declares — a\n * kilo takes three, a metre two — because a keypad that lets `2,5678` be typed against a\n * `decimal(_,3)` column is a keypad whose figure the database truncates without telling anyone.\n *\n * The separator is read from React Aria's `I18nProvider`, the same source `NumberField` uses.\n * An app that mounts `PireIntlProvider` alone gets `.`, because that provider carries Pire's\n * strings and not the locale.\n */\n maxFractionDigits?: number;\n /** Disables every key at once — real `aria-disabled`, and a press does nothing, not just a\n * colour change. Typical use: no line selected yet to type a quantity into. */\n isDisabled?: boolean;\n size?: 'md' | 'lg';\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The base grid, fixed: `extraKeys` only ever appends to it. `label` is omitted for the digits —\n * their value doubles as their visible text — and set explicitly for the two control keys, whose\n * glyphs are not their accessible names (see the `aria-label` handling in `NumPad` below). */\nconst BASE_KEYS: NumPadKey[] = [\n { value: '7' },\n { value: '8' },\n { value: '9' },\n { value: 'clear', label: 'C' },\n { value: '4' },\n { value: '5' },\n { value: '6' },\n { value: 'backspace', label: '⌫' },\n { value: '1' },\n { value: '2' },\n { value: '3' },\n { value: '0' },\n];\n\n/** Whether a key's `value` is something NumPad knows how to insert on its own — every digit\n * string, including the multi-zero keys a money keypad adds (`'00'`, `'000'`). Anything else,\n * `'backspace'`/`'clear'` included, is handled by name instead. */\nconst isInsertable = (value: string) => /^[0-9]+$/.test(value);\n\n/**\n * As much of `digits` as the fraction still has room for — the whole run while the buffer has no\n * separator in it, since the integer part is never capped.\n *\n * A run rather than a character because `extraKeys` inserts them: a money keypad's `00` pressed\n * with one slot left writes one zero, which is what pressing `0` twice with the second ignored\n * would have done anyway.\n */\nfunction fittingDigits(digits: string, buffer: string, separator: string, maxFractionDigits: number): string {\n const separatorAt = buffer.indexOf(separator);\n if (separatorAt === -1) return digits;\n const room = maxFractionDigits - (buffer.length - separatorAt - 1);\n return room <= 0 ? '' : digits.slice(0, room);\n}\n\n/**\n * Binds the physical keyboard to the same buffer the grid writes to, so the screen this exists\n * for — a counter operated without looking down — never forces a choice between typing and\n * clicking.\n *\n * Unlike {@link useCommandPaletteShortcut}, this is not opt-in: digits are the entire reason\n * NumPad exists, not a global chord an app might already own, so it listens on its own once\n * mounted. Two conditions turn it off without touching `isDisabled`, and both are read from real\n * DOM state rather than trusted to a flag the consumer has to remember to set:\n *\n * - `document.activeElement` being editable is what a click into an ordinary text field\n * elsewhere on the screen looks like.\n * - `containerRef`'s own subtree being `inert` is what a POS screen with two NumPads mounted at\n * once — one in a cart panel, one inside the payment overlay covering it — looks like the\n * moment that overlay opens. React Aria's `ModalOverlay` already marks every other top-level\n * subtree `inert` while it is open (`ariaHideOutside`, `shouldUseInert: true` — the same\n * mechanism that keeps two stacked Dialogs from both reacting to Escape), so the backgrounded\n * NumPad goes quiet on its own, with no prop either instance has to be told to set. It has to\n * be `containerRef`, not `document.activeElement.closest('[inert]')`: once the overlay is open,\n * focus is inside it, not on the backgrounded NumPad's own DOM, so only asking about *this*\n * instance's subtree says which one the browser has taken out of the picture.\n */\nfunction useNumPadKeyboard(\n onKey: (value: string) => void,\n isDisabled: boolean | undefined,\n containerRef: React.RefObject<HTMLElement | null>,\n): void {\n const handler = React.useRef(onKey);\n handler.current = onKey;\n\n React.useEffect(() => {\n if (isDisabled) return;\n\n const isEditingElsewhere = () => {\n const el = document.activeElement;\n if (!el) return false;\n const tag = el.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || el.hasAttribute('contenteditable');\n };\n\n // `inert` cascades from whichever ancestor React Aria marked, so this instance need not be\n // the element carrying the attribute — only sitting under one that does.\n const isBackgroundedByAnOverlay = () => containerRef.current?.closest('[inert]') != null;\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.metaKey || event.ctrlKey || event.altKey) return;\n if (isEditingElsewhere() || isBackgroundedByAnOverlay()) return;\n\n if (event.key >= '0' && event.key <= '9') {\n handler.current(event.key);\n return;\n }\n if (event.key === 'Backspace') {\n handler.current('backspace');\n return;\n }\n if (event.key === 'Escape') {\n handler.current('clear');\n return;\n }\n // Both characters, normalised downstream to whichever one the locale uses: a PC numeric\n // block emits `.` whatever the locale, and a cashier in es-PY pressing it means a comma.\n // Whether a separator may be written at all is `applyKey`'s to decide, exactly as it is\n // for a digit — this hook only says which key was pressed.\n if (event.key === ',' || event.key === '.') {\n handler.current('decimal');\n return;\n }\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [isDisabled, containerRef]);\n}\n\n/**\n * An on-screen numeric keypad for a counter operated hands-on-keyboard: a POS quantity or an\n * amount tendered, typed without looking down at the screen.\n *\n * Two defects the design it replaces had, and the reason both traps are closed here rather than\n * left to each product: every press works from the physical keyboard as well as a click (see\n * {@link useNumPadKeyboard}), and `isDisabled` is real — a native disabled `<button>`, not a\n * class name a press still gets through.\n *\n * A screen with two of these mounted at once — a quantity keypad in a cart panel, an amount\n * keypad in the payment overlay covering it — never has both answer the same keystroke either:\n * see {@link useNumPadKeyboard} for how the backgrounded one recognises that on its own.\n */\nexport function NumPad({\n 'aria-label': ariaLabel,\n target,\n value,\n onChange,\n extraKeys = [],\n onAction,\n maxFractionDigits,\n isDisabled,\n size = 'md',\n className,\n style,\n}: NumPadProps) {\n const msg = usePireMessages();\n const containerRef = React.useRef<HTMLDivElement>(null);\n const { locale } = useLocale();\n const separator = decimalSeparatorFor(locale);\n const allowsDecimal = maxFractionDigits !== undefined && maxFractionDigits > 0;\n\n const applyKey = React.useCallback(\n (key: NumPadKey) => {\n if (isDisabled) return;\n if (key.value === 'backspace') {\n onChange(value.slice(0, -1));\n return;\n }\n if (key.value === 'clear') {\n onChange('');\n return;\n }\n if (key.value === 'decimal') {\n // Two of the three rules live here. The third — the fraction's length — is `fittingDigits`,\n // because it is the digits that get refused, not the separator.\n if (!allowsDecimal || value.includes(separator)) return;\n // Someone who opens the buffer with the separator means `0,5`; `,5` parses as nothing.\n onChange((value === '' ? '0' : value) + separator);\n return;\n }\n if (isInsertable(key.value)) {\n onChange(\n value + (allowsDecimal ? fittingDigits(key.value, value, separator, maxFractionDigits) : key.value),\n );\n return;\n }\n onAction?.(key.value);\n },\n [isDisabled, value, onChange, onAction, allowsDecimal, separator, maxFractionDigits],\n );\n\n useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);\n\n // Appended, never woven in: the base twelve keep their positions so a counter already typing\n // on this pad without looking down does not find them moved.\n const keys: NumPadKey[] = [\n ...BASE_KEYS,\n ...(allowsDecimal ? [{ value: 'decimal', label: separator }] : []),\n ...extraKeys,\n ];\n\n return (\n <div\n ref={containerRef}\n className={cx('pire-numpad', className)}\n style={style}\n data-size={size}\n data-disabled={isDisabled ? 'true' : undefined}\n >\n {target !== undefined ? (\n <div className=\"pire-numpad-target\" role=\"status\" aria-live=\"polite\">\n {target}\n </div>\n ) : null}\n <div className=\"pire-numpad-grid\" role=\"group\" aria-label={ariaLabel}>\n {keys.map((key) => {\n const accessibleLabel =\n key.value === 'backspace'\n ? msg.numPadBackspace\n : key.value === 'clear'\n ? msg.numPadClear\n : key.value === 'decimal'\n ? msg.numPadDecimal\n : undefined;\n return (\n <Button\n key={key.value}\n variant=\"secondary\"\n size={size}\n fullWidth\n className=\"pire-numpad-key\"\n data-span={key.span === 2 ? '2' : undefined}\n data-key={key.value === 'decimal' ? 'decimal' : undefined}\n isDisabled={isDisabled}\n aria-label={accessibleLabel}\n onPress={() => applyKey(key)}\n >\n {key.label ?? key.value}\n </Button>\n );\n })}\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { DropZone, FileTrigger, isFileDropItem } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { ProgressBar } from '../feedback/ProgressBar';\nimport { formatFileSize, screenFiles, type FileUploadProps, type PireFile } from '../forms/FileUpload';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface FileDropZoneProps extends Omit<FileUploadProps, 'chooseLabel'> {\n /** Instruction inside the zone. Overrides the dictionary's `fileDropZonePrompt`. */\n promptLabel?: React.ReactNode;\n /** `compact` for an import modal, where the zone competes with a table for height. */\n height?: 'compact' | 'regular';\n /**\n * Accessible name for the drop target when `label` is omitted.\n *\n * It lands on the `DropZone` rather than the wrapper, because the drop target is the thing\n * being named — React Aria gives it a button role, and an unnamed one fails axe.\n */\n 'aria-label'?: string;\n}\n\nconst isImage = (file: File) => file.type.startsWith('image/');\n\n/**\n * The large drop surface, for import screens and anywhere a file is the point of the page.\n *\n * Built on React Aria's `DropZone`, so it is a real drop target for keyboard and assistive tech —\n * not a div with `onDragOver`. It still contains a `FileTrigger`, because drag-and-drop alone is\n * not an accessible way to supply a file.\n */\nexport function FileDropZone({\n label,\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview = true,\n uploadProgress,\n promptLabel,\n height = 'regular',\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isReadOnly,\n isRequired,\n fullWidth = true,\n className,\n style,\n 'aria-label': ariaLabel,\n ...rest\n}: FileDropZoneProps) {\n const msg = usePireMessages();\n const [uncontrolled, setUncontrolled] = React.useState<PireFile[]>(defaultValue ?? []);\n const files = value ?? uncontrolled;\n\n const created = React.useRef<string[]>([]);\n React.useEffect(\n () => () => {\n for (const url of created.current) URL.revokeObjectURL(url);\n },\n [],\n );\n\n const commit = (next: PireFile[]) => {\n if (value === undefined) setUncontrolled(next);\n onChange?.(next);\n };\n\n const accept = (picked: File[]) => {\n if (isDisabled || isReadOnly || !picked.length) return;\n const { accepted, rejected } = screenFiles(picked, { maxSize, acceptedFileTypes });\n if (rejected.length) onError?.(rejected);\n if (!accepted.length) return;\n\n const wrapped = accepted.map((file) => {\n const previewUrl = showPreview && isImage(file) ? URL.createObjectURL(file) : undefined;\n if (previewUrl) created.current.push(previewUrl);\n return { file, previewUrl };\n });\n commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));\n };\n\n const remove = (target: File) => commit(files.filter((f) => f.file !== target));\n\n return (\n <div className={cx('pire-field', className)} style={style} data-full-width={String(fullWidth)} {...rest}>\n {label ? (\n <span className=\"pire-field-label\">\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </span>\n ) : null}\n\n <DropZone\n className=\"pire-dropzone\"\n aria-label={ariaLabel}\n data-height={height}\n isDisabled={isDisabled || isReadOnly}\n onDrop={async (e) => {\n // Only file items: a drag can also carry text or a directory, and both would otherwise\n // resolve to nothing halfway through this list.\n const dropped = await Promise.all(e.items.filter(isFileDropItem).map((item) => item.getFile()));\n accept(dropped);\n }}\n >\n <Icon name=\"download\" size={24} className=\"pire-dropzone-icon\" />\n <span className=\"pire-dropzone-prompt\">{promptLabel ?? msg.fileDropZonePrompt}</span>\n <FileTrigger\n acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple}\n onSelect={(list) => accept(list ? [...list] : [])}\n >\n <Button variant=\"secondary\" isDisabled={isDisabled || isReadOnly}>\n {msg.fileUploadChoose}\n </Button>\n </FileTrigger>\n </DropZone>\n\n {files.length ? (\n <ul className=\"pire-fileupload-list\">\n {files.map(({ file, previewUrl }) => (\n <li key={`${file.name}-${file.size}-${file.lastModified}`} className=\"pire-fileupload-item\">\n {previewUrl ? (\n <img className=\"pire-fileupload-thumb\" src={previewUrl} alt=\"\" />\n ) : (\n <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />\n )}\n <span className=\"pire-fileupload-name\">{file.name}</span>\n <span className=\"pire-fileupload-size\">{formatFileSize(file.size)}</span>\n {isDisabled || isReadOnly ? null : (\n <IconButton\n icon=\"x\"\n size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)}\n />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} /> : null}\n\n {description ? <span className=\"pire-field-hint\">{description}</span> : null}\n {isInvalid && errorMessage ? <span className=\"p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I,IAAI,CAAC,CAAC;AAAA,cAEhD,wDAAC,UAAO,SAAQ,aAAY,YAAY,cAAc,YACnD,cAAI,kBACP;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,IAEC,MAAM,SACL,8CAAC,QAAG,WAAU,wBACX,gBAAM,IAAI,CAAC,EAAE,MAAM,WAAW,MAC7B,+CAAC,QAA0D,WAAU,wBAClE;AAAA,mBACC,8CAAC,SAAI,WAAU,yBAAwB,KAAK,YAAY,KAAI,IAAG,IAE/D,8CAAC,QAAK,MAAK,aAAY,MAAM,IAAI,WAAU,wBAAuB;AAAA,MAEpE,8CAAC,UAAK,WAAU,wBAAwB,eAAK,MAAK;AAAA,MAClD,8CAAC,UAAK,WAAU,wBAAwB,yBAAe,KAAK,IAAI,GAAE;AAAA,MACjE,cAAc,aAAa,OAC1B;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,MAAK;AAAA,UACL,OAAO,IAAI,sBAAsB,QAAQ,UAAU,KAAK,IAAI;AAAA,UAC5D,SAAS,MAAM,OAAO,IAAI;AAAA;AAAA,MAC5B;AAAA,SAdK,GAAG,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,YAAY,EAgBvD,CACD,GACH,IACE;AAAA,IAEH,kBAAkB,OAAO,8CAAC,eAAY,OAAO,gBAAgB,OAAO,IAAI,qBAAqB,IAAK;AAAA,IAElG,cAAc,8CAAC,UAAK,WAAU,mBAAmB,uBAAY,IAAU;AAAA,IACvE,aAAa,eAAe,8CAAC,UAAK,WAAU,oBAAoB,wBAAa,IAAU;AAAA,KAC1F;AAEJ;;;ArFmCA,IAAAC,iCAOO;AAIP,IAAAA,iCAA0B;","names":["React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Button","AriaButton","React","import_react_aria_components","React","import_react_aria_components","import_jsx_runtime","AriaTooltip","import_jsx_runtime","IconButton","AriaButton","React","import_jsx_runtime","Badge","React","import_react_aria_components","import_jsx_runtime","Tag","AriaButton","import_jsx_runtime","React","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","React","import_jsx_runtime","Text","Strong","import_react_aria_components","import_jsx_runtime","AriaHeading","import_react_aria_components","import_jsx_runtime","AriaLink","import_react_aria_components","import_jsx_runtime","AriaSeparator","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_react_aria_components","IS_DEV","warned","warnOnce","import_jsx_runtime","IS_DEV","warnOnce","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","AriaInput","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaTextArea","React","import_react_aria_components","import_jsx_runtime","IS_DEV","warnOnce","AriaSelect","AriaButton","import_react_aria_components","import_jsx_runtime","AriaCheckbox","import_react_aria_components","import_jsx_runtime","AriaRadioGroup","AriaRadio","import_react_aria_components","import_jsx_runtime","AriaSwitch","import_react_aria_components","import_jsx_runtime","AriaRadioGroup","AriaRadio","React","import_react_aria_components","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","React","import_react_aria_components","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaButton","AriaNumberField","AriaInput","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","ClearButton","AriaButton","AriaDatePicker","AriaDialog","React","import_react_aria_components","import_jsx_runtime","ClearButton","AriaButton","AriaDateRangePicker","AriaDialog","React","React","React","import_react_aria_components","import_jsx_runtime","AriaDialog","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","IS_DEV","warned","warnOnce","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaProgressBar","import_jsx_runtime","import_react_aria_components","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaMenu","AriaMenuItem","AriaMenuSection","AriaSeparator","import_jsx_runtime","AriaBreadcrumb","AriaBreadcrumbs","AriaButton","import_jsx_runtime","initials","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaButton","import_react_aria_components","import_jsx_runtime","AriaTabs","AriaTab","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","Group","AriaTabs","AriaTab","import_jsx_runtime","React","import_jsx_runtime","KIND_ICON","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","IS_DEV","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","useIsomorphicLayoutEffect","React","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","AriaDialog","AriaInput","AriaMenu","AriaMenuSection","React","import_react_aria_components","import_jsx_runtime","searchableText","AriaButton","AriaDialog","React","import_react_aria_components","import_jsx_runtime","AriaDialog","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","isImage","import_react_aria_components"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/core/icon-data.generated.ts","../src/components/core/icon-map.ts","../src/components/utils/devWarn.ts","../src/components/core/Icon.tsx","../src/components/core/Button.tsx","../src/i18n/PireIntlProvider.tsx","../src/i18n/messages.ts","../src/components/core/ComingSoonMark.tsx","../src/components/utils/cx.ts","../src/components/core/IconButton.tsx","../src/components/feedback/Tooltip.tsx","../src/components/core/Badge.tsx","../src/components/core/Tag.tsx","../src/components/core/Card.tsx","../src/components/core/Avatar.tsx","../src/components/core/SegmentedControl.tsx","../src/components/core/Text.tsx","../src/components/core/Heading.tsx","../src/components/core/Link.tsx","../src/components/core/Separator.tsx","../src/components/core/Kbd.tsx","../src/components/forms/FieldHelp.tsx","../src/components/forms/FormField.tsx","../src/components/forms/Input.tsx","../src/components/forms/FieldClearButton.tsx","../src/components/forms/FieldLabel.tsx","../src/components/forms/FieldDescription.tsx","../src/components/forms/TextArea.tsx","../src/components/forms/Select.tsx","../src/components/forms/Checkbox.tsx","../src/components/forms/Radio.tsx","../src/components/forms/Switch.tsx","../src/components/forms/ChoiceCardGroup.tsx","../src/components/forms/ComboBox.tsx","../src/components/forms/ComboBoxListBox.tsx","../src/components/utils/useLoadMoreOnScroll.ts","../src/components/forms/MultiComboBox.tsx","../src/components/forms/NumberField.tsx","../src/components/utils/decimalSeparator.ts","../src/components/forms/QuantityStepper.tsx","../src/components/forms/DatePicker.tsx","../src/components/forms/CalendarMonth.tsx","../src/components/forms/dateValues.ts","../src/components/forms/DateRangePicker.tsx","../src/components/forms/ValueHelpField.tsx","../src/components/patterns/ValueHelpDialog.tsx","../src/components/feedback/Dialog.tsx","../src/components/data/DataTable.tsx","../src/components/feedback/Skeleton.tsx","../src/components/forms/FileUpload.tsx","../src/components/feedback/ProgressBar.tsx","../src/components/navigation/ShellBar.tsx","../src/components/navigation/Breadcrumb.tsx","../src/components/navigation/Menu.tsx","../src/components/navigation/SideNav.tsx","../src/components/navigation/ShellRail.tsx","../src/components/navigation/Tabs.tsx","../src/components/navigation/Pagination.tsx","../src/components/navigation/Ribbon.tsx","../src/components/feedback/InlineMessage.tsx","../src/components/feedback/Toast.tsx","../src/components/data/KpiTile.tsx","../src/components/data/ObjectHeader.tsx","../src/components/data/FilterBar.tsx","../src/components/data/DescriptionList.tsx","../src/components/data/Timeline.tsx","../src/components/data/chartGeometry.ts","../src/components/data/ChartFrame.tsx","../src/components/data/BarChart.tsx","../src/components/data/LineChart.tsx","../src/components/data/DonutChart.tsx","../src/components/data/LinkList.tsx","../src/components/data/RecordCard.tsx","../src/components/data/ViewSwitcher.tsx","../src/components/data/BarList.tsx","../src/components/layout/PageBand.tsx","../src/components/layout/PageHeader.tsx","../src/components/layout/SectionHeader.tsx","../src/components/layout/SelectionBar.tsx","../src/components/layout/FooterBar.tsx","../src/components/layout/SplitPane.tsx","../src/components/patterns/ConfirmDialog.tsx","../src/components/patterns/CommandPalette.tsx","../src/components/utils/useDocumentKeyDown.ts","../src/components/patterns/AppLauncher.tsx","../src/components/patterns/SidePanel.tsx","../src/components/patterns/EmptyState.tsx","../src/components/patterns/NumPad.tsx","../src/components/patterns/FileDropZone.tsx"],"sourcesContent":["/* @orianatech/pire — Pire Design System components.\n Styles are a separate import so they can be loaded once, ahead of the bundle:\n import '@orianatech/pire/styles.css'; */\n\nexport { Icon, configureIcons, type IconProps, type IconPack, type IconConfig } from './components/core/Icon';\nexport { Button, type ButtonProps } from './components/core/Button';\nexport { IconButton, type IconButtonProps } from './components/core/IconButton';\nexport { Badge, type BadgeProps, type BadgeStatus } from './components/core/Badge';\nexport { Tag, type TagProps } from './components/core/Tag';\nexport { Card, type CardProps } from './components/core/Card';\nexport { Avatar, type AvatarProps } from './components/core/Avatar';\nexport {\n SegmentedControl,\n type SegmentedControlProps,\n type SegmentOption,\n} from './components/core/SegmentedControl';\nexport {\n Text,\n Strong,\n type TextProps,\n type StrongProps,\n type TextColor,\n type TextSize,\n} from './components/core/Text';\nexport { Heading, type HeadingProps } from './components/core/Heading';\nexport { Link, type LinkProps } from './components/core/Link';\nexport { Separator, type SeparatorProps } from './components/core/Separator';\nexport { Kbd, type KbdProps } from './components/core/Kbd';\nexport { ICON_NAMES } from './components/core/icon-map';\n\nexport { FormField, type FormFieldProps } from './components/forms/FormField';\nexport { Input, type InputProps } from './components/forms/Input';\nexport { TextArea, type TextAreaProps } from './components/forms/TextArea';\nexport { Select, type SelectProps, type SelectOption } from './components/forms/Select';\nexport { Checkbox, type CheckboxProps } from './components/forms/Checkbox';\nexport { RadioGroup, Radio, type RadioGroupProps, type RadioProps } from './components/forms/Radio';\nexport { Switch, type SwitchProps } from './components/forms/Switch';\nexport {\n ChoiceCardGroup,\n type ChoiceCardGroupProps,\n type ChoiceCardOption,\n} from './components/forms/ChoiceCardGroup';\nexport { ComboBox, type ComboBoxProps, type ComboBoxOption } from './components/forms/ComboBox';\nexport { MultiComboBox, type MultiComboBoxProps } from './components/forms/MultiComboBox';\nexport { NumberField, type NumberFieldProps } from './components/forms/NumberField';\nexport { QuantityStepper, type QuantityStepperProps } from './components/forms/QuantityStepper';\nexport { DatePicker, type DatePickerProps } from './components/forms/DatePicker';\nexport {\n DateRangePicker,\n rangeLengthInDays,\n type DateRangePickerProps,\n type DateRange,\n type DateRangeInput,\n type IsoDateRange,\n type DateRangePreset,\n} from './components/forms/DateRangePicker';\nexport { ValueHelpField, type ValueHelpFieldProps } from './components/forms/ValueHelpField';\nexport { FieldHelp, type FieldHelpProps } from './components/forms/FieldHelp';\nexport {\n FileUpload,\n formatFileSize,\n type FileUploadProps,\n type PireFile,\n type FileRejection,\n} from './components/forms/FileUpload';\n\nexport { ShellBar, type ShellBarProps } from './components/navigation/ShellBar';\nexport {\n SideNav,\n type SideNavProps,\n type SideNavItem,\n type SideNavChildItem,\n type SideNavGroup,\n} from './components/navigation/SideNav';\nexport {\n ShellRail,\n type ShellRailProps,\n type ShellRailItem,\n type ShellRailGroup,\n} from './components/navigation/ShellRail';\nexport { Tabs, type TabsProps, type TabItem } from './components/navigation/Tabs';\nexport { Breadcrumb, type BreadcrumbProps, type BreadcrumbItem } from './components/navigation/Breadcrumb';\nexport { Pagination, type PaginationProps } from './components/navigation/Pagination';\nexport {\n Menu,\n MenuItem,\n MenuSection,\n MenuSeparator,\n type MenuProps,\n type MenuItemProps,\n type MenuSectionProps,\n type MenuSeparatorProps,\n} from './components/navigation/Menu';\nexport {\n Ribbon,\n type RibbonProps,\n type RibbonTabProps,\n type RibbonGroupProps,\n type RibbonCommandProps,\n} from './components/navigation/Ribbon';\n\nexport {\n Dialog,\n DialogTitle,\n DialogDescription,\n DialogBody,\n DialogActions,\n type DialogProps,\n type DialogSlotProps,\n} from './components/feedback/Dialog';\nexport {\n InlineMessage,\n type InlineMessageProps,\n type MessageKind,\n} from './components/feedback/InlineMessage';\nexport { ProgressBar, type ProgressBarProps } from './components/feedback/ProgressBar';\nexport { Tooltip, type TooltipProps } from './components/feedback/Tooltip';\nexport { Toast, ToastProvider, useToast, type ToastProps, type ToastItem } from './components/feedback/Toast';\nexport {\n Skeleton,\n SkeletonTableRow,\n type SkeletonProps,\n type SkeletonShape,\n type SkeletonTableRowProps,\n type SkeletonTableColumn,\n} from './components/feedback/Skeleton';\n\nexport {\n DataTable,\n type DataTableProps,\n type DataTableColumn,\n type DataTableSort,\n type DataTableCellTone,\n type DataTableRowProps,\n} from './components/data/DataTable';\nexport { KpiTile, type KpiTileProps } from './components/data/KpiTile';\nexport { ObjectHeader, type ObjectHeaderProps, type ObjectFact } from './components/data/ObjectHeader';\nexport { FilterBar, type FilterBarProps, type ActiveFilter } from './components/data/FilterBar';\nexport {\n DescriptionList,\n type DescriptionListProps,\n type DescriptionItem,\n} from './components/data/DescriptionList';\nexport { Timeline, type TimelineProps, type TimelineEntry } from './components/data/Timeline';\nexport { BarChart, type BarChartProps } from './components/data/BarChart';\nexport { LineChart, type LineChartProps } from './components/data/LineChart';\nexport { DonutChart, type DonutChartProps } from './components/data/DonutChart';\nexport type { ChartBaseProps, ChartLegendItem } from './components/data/ChartFrame';\nexport { VIZ_SLOT_COUNT, type ChartSeries } from './components/data/chartGeometry';\nexport { LinkList, type LinkListProps, type LinkListItem } from './components/data/LinkList';\nexport { RecordCard, type RecordCardProps } from './components/data/RecordCard';\nexport { ViewSwitcher, type ViewSwitcherProps } from './components/data/ViewSwitcher';\nexport { BarList, type BarListProps, type BarListItem } from './components/data/BarList';\n\nexport { PageBand, type PageBandProps } from './components/layout/PageBand';\nexport { PageHeader, type PageHeaderProps } from './components/layout/PageHeader';\nexport { SectionHeader, type SectionHeaderProps } from './components/layout/SectionHeader';\nexport {\n SelectionBar,\n type SelectionBarProps,\n type SelectionBarNoun,\n} from './components/layout/SelectionBar';\nexport { FooterBar, type FooterBarProps } from './components/layout/FooterBar';\nexport { SplitPane, type SplitPaneProps } from './components/layout/SplitPane';\n\nexport { ConfirmDialog, type ConfirmDialogProps } from './components/patterns/ConfirmDialog';\nexport { ValueHelpDialog, type ValueHelpDialogProps } from './components/patterns/ValueHelpDialog';\nexport {\n CommandPalette,\n useCommandPaletteShortcut,\n type CommandPaletteProps,\n type CommandPaletteItem,\n type CommandPaletteGroup,\n type CommandPaletteShortcutOptions,\n} from './components/patterns/CommandPalette';\nexport {\n AppLauncher,\n type AppLauncherProps,\n type AppLauncherItem,\n type AppLauncherSection,\n} from './components/patterns/AppLauncher';\nexport { SidePanel, type SidePanelProps } from './components/patterns/SidePanel';\nexport { EmptyState, type EmptyStateProps } from './components/patterns/EmptyState';\nexport { NumPad, type NumPadProps, type NumPadKey } from './components/patterns/NumPad';\nexport { FileDropZone, type FileDropZoneProps } from './components/patterns/FileDropZone';\n\n/** Re-exported so apps can compose overlays and collections without a second dependency. */\n/* Pire's own strings. React Aria's I18nProvider below localises React Aria's internals; this\n localises Pire's. Install both to fully translate the UI. */\nexport { PireIntlProvider, usePireMessages, type PireIntlProviderProps } from './i18n/PireIntlProvider';\nexport { enMessages, esMessages, type PireMessages } from './i18n/messages';\n\n/* Compose overlays and collections without a second dependency. `RouterProvider` takes the\n app's own `navigate`, so `href` on MenuItem, Link and Breadcrumb routes client-side. */\nexport {\n DialogTrigger,\n MenuTrigger,\n SubmenuTrigger,\n Popover,\n RouterProvider,\n I18nProvider,\n} from 'react-aria-components';\n/* `Focusable` makes any single child focusable by cloning it — no wrapper element, so it never adds\n a tab stop to something that already had one. `Tooltip` applies it for you; this export is for the\n cases Pire does not cover, such as a custom trigger for a Popover or a MenuTrigger. */\nexport { Focusable } from 'react-aria-components';\nexport type { DateValue } from 'react-aria-components';\n","// GENERATED FILE — do not edit by hand. Run `pnpm icons:generate` (or `pnpm build`).\n// Source: scripts/generate-icon-data.mjs, from @carbon/icons (devDependency) and the CARBON_MAP\n// in ./icon-map.ts. Committed so typecheck, lint, tests and Storybook work on a fresh clone\n// without a build step.\n//\n// Inner markup of each 32x32 Carbon glyph, keyed by Carbon slug. `Icon` drops it into\n// <svg viewBox=\"0 0 32 32\" fill=\"currentColor\">, so paths inherit text colour. Slugs are the\n// Carbon names; call sites use the canonical Lucide names in ./icon-map.ts.\nexport const ICON_MARKUP: Record<string, string> = {\n 'add': '<path d=\"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z\"/>',\n 'apps': '<path d=\"M8,4V8H4V4Zm2-2H2v8h8Zm8,2V8H14V4Zm2-2H12v8h8Zm8,2V8H24V4Zm2-2H22v8h8ZM8,14v4H4V14Zm2-2H2v8h8Zm8,2v4H14V14Zm2-2H12v8h8Zm8,2v4H24V14Zm2-2H22v8h8ZM8,24v4H4V24Zm2-2H2v8h8Zm8,2v4H14V24Zm2-2H12v8h8Zm8,2v4H24V24Zm2-2H22v8h8Z\"/>',\n 'archive': '<path d=\"M14 19H18V21H14z\"/><path d=\"M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z\"/>',\n 'arrow--down': '<path d=\"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z\"/>',\n 'arrow--left': '<path d=\"M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z\"/>',\n 'arrow--right': '<path d=\"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z\"/>',\n 'arrow--up': '<path d=\"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z\"/>',\n 'arrows--vertical': '<path d=\"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z\"/><path d=\"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z\"/>',\n 'asterisk': '<path d=\"M28.316 13.949 27.684 12.051 17 15.612 17 4 15 4 15 15.612 4.316 12.051 3.684 13.949 14.368 17.51 7.2 27.066 8.8 28.267 16 18.667 23.2 28.267 24.8 27.066 17.632 17.51 28.316 13.949z\"/>',\n 'attachment': '<path d=\"M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9\tC3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1\tc0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2\tc-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z\"/>',\n 'bank--vault': '<path d=\"M26,30h-2v-2H8v2h-2v-2h-2c-1.103,0-2-.8975-2-2V4c0-1.103.897-2,2-2h24c1.1025,0,2,.897,2,2v22c0,1.1025-.8975,2-2,2h-2v2ZM4,4v22h24.002l-.002-22H4ZM17,22h-2v-2.1006c-.626-.127-1.2207-.374-1.7573-.7285l-2.5356,2.5361-1.4141-1.4141,2.5366-2.5371c-.3555-.5371-.6021-1.1318-.729-1.7559h-2.1006v-2h2.1001c.1274-.626.374-1.2207.7285-1.7573l-2.5356-2.5356,1.4141-1.4141,2.5366,2.5366c.5376-.3555,1.1318-.6021,1.7563-.729v-2.1006h2v2.1006c.626.127,1.2207.3735,1.7568.728l2.5361-2.5356,1.4141,1.4141-2.5361,2.5356c.3545.5366.6016,1.1313.7285,1.7573h2.1006v2h-2.1006c-.127.626-.374,1.2207-.7285,1.7568l2.5361,2.5361-1.4141,1.4141-2.5371-2.5371c-.5371.3555-1.1318.6025-1.7559.7295v2.1006ZM16,12c-.7954,0-1.5513.3135-2.1279.8818-.5586.5669-.8721,1.3228-.8721,2.1182,0,.7949.3135,1.5508.8823,2.1279,1.1318,1.1162,3.0908,1.127,4.2456-.0098.5586-.5674.8721-1.3232.8721-2.1182,0-.793-.3115-1.5464-.877-2.1226-.5771-.5659-1.3306-.8774-2.123-.8774Z\"/>',\n 'barcode': '<path d=\"M2 6H4V28H2z\"/><path d=\"M12 6H14V26H12z\"/><path d=\"M6 6H10V26H6z\"/><path d=\"M16 6H20V26H16z\"/><path d=\"M22 6H26V26H22z\"/><path d=\"M28 6H30V28H28z\"/>',\n 'book': '<path d=\"M19 10H26V12H19z\"/><path d=\"M19 15H26V17H19z\"/><path d=\"M19 20H26V22H19z\"/><path d=\"M6 10H13V12H6z\"/><path d=\"M6 15H13V17H6z\"/><path d=\"M6 20H13V22H6z\"/><path d=\"M28,5H4A2.002,2.002,0,0,0,2,7V25a2.002,2.002,0,0,0,2,2H28a2.002,2.002,0,0,0,2-2V7A2.002,2.002,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28V25Z\"/>',\n 'bookmark': '<path d=\"M24,4V26.75l-7.1-3.59-.9-.45-.9.45L8,26.75V4H24m0-2H8A2,2,0,0,0,6,4V30L16,25,26,30V4A2,2,0,0,0,24,2Z\"/>',\n 'box': '<path d=\"M20,21H12a2,2,0,0,1-2-2V17a2,2,0,0,1,2-2h8a2,2,0,0,1,2,2v2A2,2,0,0,1,20,21Zm-8-4v2h8V17Z\"/><path d=\"M28,4H4A2,2,0,0,0,2,6v4a2,2,0,0,0,2,2V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V12a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM26,28H6V12H26Zm2-18H4V6H28v4Z\"/>',\n 'building': '<path d=\"M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z\"/><path d=\"M18 8H20V10H18z\"/><path d=\"M24 8H26V10H24z\"/><path d=\"M18 14H20V16H18z\"/><path d=\"M24 14H26V16H24z\"/><path d=\"M18 20H20V22H18z\"/><path d=\"M24 20H26V22H24z\"/>',\n 'building--insights-1': '<path d=\"M28,2H16a2.002,2.002,0,0,0-2,2V14H4a2.002,2.002,0,0,0-2,2V30H30V4A2.0023,2.0023,0,0,0,28,2ZM9,28V21h4v7Zm19,0H15V20a1,1,0,0,0-1-1H8a1,1,0,0,0-1,1v8H4V16H16V4H28Z\"/><path d=\"M18 8H20V10H18z\"/><path d=\"M24 8H26V10H24z\"/><path d=\"M18 14H20V16H18z\"/><path d=\"M24 14H26V16H24z\"/><path d=\"M18 20H20V22H18z\"/><path d=\"M24 20H26V22H24z\"/><path d=\"M9,12H7a5.0059,5.0059,0,0,1,5-5V9A3.0033,3.0033,0,0,0,9,12Z\"/><path d=\"M4,12H2A10.0114,10.0114,0,0,1,12,2V4A8.0092,8.0092,0,0,0,4,12Z\"/>',\n 'calculator': '<path d=\"M26,4V28H6V4H26m0-2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V4A2,2,0,0,0,26,2Z\"/><path d=\"M9 23H11V25H9z\"/><path d=\"M21 23H23V25H21z\"/><path d=\"M9 18H11V20H9z\"/><path d=\"M21 18H23V20H21z\"/><path d=\"M9 13H11V15H9z\"/><path d=\"M15 23H17V25H15z\"/><path d=\"M15 18H17V20H15z\"/><path d=\"M15 13H17V15H15z\"/><path d=\"M21 13H23V15H21z\"/><path d=\"M9 7H23V10H9z\"/>',\n 'calendar': '<path d=\"M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20\tV26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z\"/>',\n 'calendar--add': '<switch><foreignObject width=\"1\" height=\"1\" x=\"0\" y=\"0\" requiredExtensions=\"http://ns.adobe.com/AdobeIllustrator/10.0/\"/><g><path d=\"M30 22 24 22 24 16 22 16 22 22 16 22 16 24 22 24 22 30 24 30 24 24 30 24z\"/><path d=\"M28,6c0-1.1-0.9-2-2-2h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h8v-2H6V6h4v2h2V6h8v2h2V6h4v8h2V6z\"/></g></switch>',\n 'calendar--heat-map': '<path d=\"M26,4H22V2H20V4H12V2H10V4H6A2.0025,2.0025,0,0,0,4,6V26a2.0025,2.0025,0,0,0,2,2H26a2.0025,2.0025,0,0,0,2-2V6A2.0025,2.0025,0,0,0,26,4ZM6,6h4V8h2V6h8V8h2V6h4l0,4H6Zm0,6h5v6H6ZM19,26H13V20h6Zm0-8H13V12h6Zm2,8V20h5l.0012,6Z\"/>',\n 'chart--area': '<path d=\"M20.4761,8.0151,13.4473,4.2109a2.0076,2.0076,0,0,0-2.1158.2051L4,10.001V2H2V28a2,2,0,0,0,2,2H30V5.7354ZM28,20.209l-7.62,1.8022-7.0288-2.8838a1.99,1.99,0,0,0-2.022.37L4,25.8359v-4.455l8.375-9.4,7.0186,5.62a2.0155,2.0155,0,0,0,2.0459.2119L28,14.6025ZM12.5239,5.9849l7.03,3.8042a2.012,2.012,0,0,0,1.3408.16L28,8.2646v4.1138L20.6187,16.02,13.6,10.4a1.99,1.99,0,0,0-2.6885.2642L4,18.3838v-5.87ZM4.5513,28,12.62,20.9888l7.0288,2.8838a1.9977,1.9977,0,0,0,1.147.0771L28,22.2612V28Z\"/>',\n 'chart--bar': '<path d=\"M4,2H2V28a2,2,0,0,0,2,2H30V28H4V25H26V17H4V13H18V5H4ZM24,19v4H4V19ZM16,7v4H4V7Z\"/>',\n 'chart--column': '<path d=\"M27,28V6H19V28H15V14H7V28H4V2H2V28a2,2,0,0,0,2,2H30V28ZM13,28H9V16h4Zm12,0H21V8h4Z\"/>',\n 'chart--line': '<path d=\"M4.67,28l6.39-12,7.3,6.49a2,2,0,0,0,1.7.47,2,2,0,0,0,1.42-1.07L27,10.9,25.18,10,19.69,21l-7.3-6.49A2,2,0,0,0,10.71,14a2,2,0,0,0-1.42,1L4,25V2H2V28a2,2,0,0,0,2,2H30V28Z\"/>',\n 'chart--pie': '<path d=\"M16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4ZM26,15H17V6.05A10,10,0,0,1,26,15ZM15.42,26A10,10,0,0,1,15,6.05v9a2,2,0,0,0,2,2h9A10,10,0,0,1,15.42,26Z\"/>',\n 'checkmark': '<path d=\"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z\"/>',\n 'checkmark--filled': '<path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z\"/><path fill=\"none\" d=\"M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z\" data-icon-path=\"inner-path\"/>',\n 'checkmark--outline': '<path d=\"M14 21.414 9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z\"/><path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"/>',\n 'chevron--down': '<path d=\"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z\"/>',\n 'chevron--left': '<path d=\"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z\"/>',\n 'chevron--right': '<path d=\"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z\"/>',\n 'chevron--sort': '<path d=\"M16 28 9 21 10.41 19.59 16 25.17 21.59 19.59 23 21 16 28z\"/><path d=\"M16 4 23 11 21.59 12.41 16 6.83 10.41 12.41 9 11 16 4z\"/>',\n 'chevron--up': '<path d=\"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z\"/>',\n 'circle-dash': '<path d=\"M7.7,4.7a14.7,14.7,0,0,0-3,3.1L6.3,9A13.26,13.26,0,0,1,8.9,6.3Z\"/><path d=\"M4.6,12.3l-1.9-.6A12.51,12.51,0,0,0,2,16H4A11.48,11.48,0,0,1,4.6,12.3Z\"/><path d=\"M2.7,20.4a14.4,14.4,0,0,0,2,3.9l1.6-1.2a12.89,12.89,0,0,1-1.7-3.3Z\"/><path d=\"M7.8,27.3a14.4,14.4,0,0,0,3.9,2l.6-1.9A12.89,12.89,0,0,1,9,25.7Z\"/><path d=\"M11.7,2.7l.6,1.9A11.48,11.48,0,0,1,16,4V2A12.51,12.51,0,0,0,11.7,2.7Z\"/><path d=\"M24.2,27.3a15.18,15.18,0,0,0,3.1-3.1L25.7,23A11.53,11.53,0,0,1,23,25.7Z\"/><path d=\"M27.4,19.7l1.9.6A15.47,15.47,0,0,0,30,16H28A11.48,11.48,0,0,1,27.4,19.7Z\"/><path d=\"M29.2,11.6a14.4,14.4,0,0,0-2-3.9L25.6,8.9a12.89,12.89,0,0,1,1.7,3.3Z\"/><path d=\"M24.1,4.6a14.4,14.4,0,0,0-3.9-2l-.6,1.9a12.89,12.89,0,0,1,3.3,1.7Z\"/><path d=\"M20.3,29.3l-.6-1.9A11.48,11.48,0,0,1,16,28v2A21.42,21.42,0,0,0,20.3,29.3Z\"/>',\n 'close': '<path d=\"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z\"/>',\n 'cloud--download': '<path d=\"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z\"/><path d=\"M17 26.17 17 14 15 14 15 26.17 12.41 23.59 11 25 16 30 21 25 19.59 23.59 17 26.17z\"/>',\n 'cloud--upload': '<path d=\"M11 18 12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z\"/><path d=\"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z\"/>',\n 'color-palette': '<circle cx=\"10\" cy=\"12\" r=\"2\"/><circle cx=\"16\" cy=\"9\" r=\"2\"/><circle cx=\"22\" cy=\"12\" r=\"2\"/><circle cx=\"23\" cy=\"18\" r=\"2\"/><circle cx=\"19\" cy=\"23\" r=\"2\"/><path d=\"M16.54,2A14,14,0,0,0,2,16a4.82,4.82,0,0,0,6.09,4.65l1.12-.31A3,3,0,0,1,13,23.24V27a3,3,0,0,0,3,3A14,14,0,0,0,30,15.46,14.05,14.05,0,0,0,16.54,2Zm8.11,22.31A11.93,11.93,0,0,1,16,28a1,1,0,0,1-1-1V23.24a5,5,0,0,0-5-5,5.07,5.07,0,0,0-1.33.18l-1.12.31A2.82,2.82,0,0,1,4,16,12,12,0,0,1,16.47,4,12.18,12.18,0,0,1,28,15.53,11.89,11.89,0,0,1,24.65,24.32Z\"/>',\n 'copy': '<path d=\"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z\"/><path d=\"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z\"/>',\n 'currency': '<path d=\"M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z\"/><path d=\"M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z\"/>',\n 'currency--dollar': '<path d=\"M23,20.5151c0-4.6152-3.78-5.1411-6.8171-5.563-3.31-.4609-5.1829-.86-5.1829-3.71C11,8.8491,13.5071,8,15.6538,8a6.7538,6.7538,0,0,1,5.5681,2.6279l1.5562-1.2558A8.6508,8.6508,0,0,0,17,6.0962V3H15V6.022c-3.6152.2192-6,2.26-6,5.22,0,4.73,3.83,5.2627,6.9075,5.69C19.16,17.3848,21,17.7744,21,20.5151,21,23.5474,17.8674,24,16,24c-3.4294,0-4.8782-.9639-6.2219-2.6279L8.2219,22.6279A8.4382,8.4382,0,0,0,15,25.9648V29h2V25.9551C20.7256,25.6509,23,23.6279,23,20.5151Z\"/>',\n 'currency--euro': '<path d=\"M17,26c-3.6162,0-6.3328-2.2974-7.4456-6H19V18H9.1321A15.2782,15.2782,0,0,1,9,16c0-.33.01-.6641.0259-1H19V13H9.2371C9.8447,9.3525,11.81,6,17,6c3.8533,0,5.5315,1.6465,7.1282,4.4893l1.7436-.9786C24.2649,6.6484,22.0779,4,17,4,10.6448,4,7,8.374,7,16c0,7.0654,4.1121,12,10,12,5.0779,0,7.2649-2.6484,8.8718-5.5107l-1.7436-.9786C22.5315,24.3535,20.8533,26,17,26Z\"/>',\n 'data--base': '<path d=\"M24,3H8A2,2,0,0,0,6,5V27a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V5A2,2,0,0,0,24,3Zm0,2v6H8V5ZM8,19V13H24v6Zm0,8V21H24v6Z\"/><circle cx=\"11\" cy=\"8\" r=\"1\"/><circle cx=\"11\" cy=\"16\" r=\"1\"/><circle cx=\"11\" cy=\"24\" r=\"1\"/>',\n 'debug': '<path d=\"M29.83,20l.34-2L25,17.15V13c0-.08,0-.15,0-.23l5.06-1.36-.51-1.93-4.83,1.29A9,9,0,0,0,20,5V2H18V4.23a8.81,8.81,0,0,0-4,0V2H12V5a9,9,0,0,0-4.71,5.82L2.46,9.48,2,11.41,7,12.77c0,.08,0,.15,0,.23v4.15L1.84,18l.32,2L7,19.18a8.9,8.9,0,0,0,.82,3.57L3.29,27.29l1.42,1.42,4.19-4.2a9,9,0,0,0,14.2,0l4.19,4.2,1.42-1.42-4.54-4.54A8.9,8.9,0,0,0,25,19.18ZM15,25.92A7,7,0,0,1,9,19V13h6ZM9.29,11a7,7,0,0,1,13.42,0ZM23,19a7,7,0,0,1-6,6.92V13h6Z\"/>',\n 'delivery--parcel': '<path d=\"M29.4819,8.624l-10-5.5a1,1,0,0,0-.9638,0l-10,5.5a1,1,0,0,0,0,1.752L18,15.5913V26.3086l-3.0362-1.6693L14,26.3912l4.5181,2.4848a.9984.9984,0,0,0,.9638,0l10-5.5A1,1,0,0,0,30,22.5V9.5A1,1,0,0,0,29.4819,8.624ZM19,5.1416,26.9248,9.5,19,13.8584,11.0752,9.5Zm9,16.7671-8,4.4V15.5913l8-4.4Z\"/><path d=\"M2 14H10V16H2z\" transform=\"matrix(-1 0 0 -1 12 30)\"/><path d=\"M4 22H12V24H4z\" transform=\"matrix(-1 0 0 -1 16 46)\"/><path d=\"M6 18H14V20H6z\" transform=\"matrix(-1 0 0 -1 20 38)\"/>',\n 'delivery-truck': '<path d=\"M29.92,16.61l-3-7A1,1,0,0,0,26,9H23V7a1,1,0,0,0-1-1H3A1,1,0,0,0,2,7V24a1,1,0,0,0,1,1H5.14a4,4,0,0,0,7.72,0h6.28a4,4,0,0,0,7.72,0H29a1,1,0,0,0,1-1V17A1,1,0,0,0,29.92,16.61ZM23,11h2.34l2.14,5H23ZM9,26a2,2,0,1,1,2-2A2,2,0,0,1,9,26Zm10.14-3H12.86a4,4,0,0,0-7.72,0H4V8H21V20.56A4,4,0,0,0,19.14,23ZM23,26a2,2,0,1,1,2-2A2,2,0,0,1,23,26Zm5-3H26.86A4,4,0,0,0,23,20V18h5Z\"/>',\n 'document': '<path d=\"M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3\tz M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z\"/><path d=\"M10 22H22V24H10z\"/><path d=\"M10 16H22V18H10z\"/>',\n 'document--add': '<path d=\"M30 24 26 24 26 20 24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24z\"/><path d=\"M16,28H8V4h8v6a2.0058,2.0058,0,0,0,2,2h6v4h2V10a.9092.9092,0,0,0-.3-.7l-7-7A.9087.9087,0,0,0,18,2H8A2.0058,2.0058,0,0,0,6,4V28a2.0058,2.0058,0,0,0,2,2h8ZM18,4.4,23.6,10H18Z\"/>',\n 'download': '<path d=\"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z\"/><path d=\"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z\"/>',\n 'edit': '<path d=\"M2 26H30V28H2z\"/><path d=\"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6\tl-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z\"/>',\n 'email': '<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,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z\"/>',\n 'error--filled': '<path fill=\"none\" d=\"M14.9 7.2H17.1V24.799H14.9z\" data-icon-path=\"inner-path\" transform=\"rotate(-45 16 16)\"/><path d=\"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z\"/>',\n 'events': '<path d=\"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z\"/><path d=\"M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z\"/><path d=\"M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z\"/><path d=\"M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z\"/><path d=\"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z\"/><path d=\"M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z\"/>',\n 'filter': '<path d=\"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z\"/>',\n 'filter--edit': '<path d=\"M26,6H4V9.17l7.41,7.42.59.58V26h4V24h2v2a2,2,0,0,1-2,2H12a2,2,0,0,1-2-2V18L2.59,10.59A2,2,0,0,1,2,9.17V6A2,2,0,0,1,4,4H26Z\"/><path d=\"M29.71,11.29l-3-3a1,1,0,0,0-1.42,0L16,17.59V22h4.41l9.3-9.29A1,1,0,0,0,29.71,11.29ZM19.59,20H18V18.41l5-5L24.59,15ZM26,13.59,24.41,12,26,10.41,27.59,12Z\"/>',\n 'flash': '<path d=\"M11.61,29.92a1,1,0,0,1-.6-1.07L12.83,17H8a1,1,0,0,1-1-1.23l3-13A1,1,0,0,1,11,2H21a1,1,0,0,1,.78.37,1,1,0,0,1,.2.85L20.25,11H25a1,1,0,0,1,.9.56,1,1,0,0,1-.11,1l-13,17A1,1,0,0,1,12,30,1.09,1.09,0,0,1,11.61,29.92ZM17.75,13l2-9H11.8L9.26,15h5.91L13.58,25.28,23,13Z\"/>',\n 'flow': '<path d=\"M27,22.14V17a2,2,0,0,0-2-2H17V9.86a4,4,0,1,0-2,0V15H7a2,2,0,0,0-2,2v5.14a4,4,0,1,0,2,0V17H25v5.14a4,4,0,1,0,2,0ZM8,26a2,2,0,1,1-2-2A2,2,0,0,1,8,26ZM14,6a2,2,0,1,1,2,2A2,2,0,0,1,14,6ZM26,28a2,2,0,1,1,2-2A2,2,0,0,1,26,28Z\"/>',\n 'folder': '<path d=\"M11.17,6l3.42,3.41.58.59H28V26H4V6h7.17m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H16L12.59,4.59A2,2,0,0,0,11.17,4Z\"/>',\n 'function': '<path d=\"M19.6262,29.5256,19.11,27.5935A12.0035,12.0035,0,0,0,25.2312,8.3323l1.5376-1.2788a14.0033,14.0033,0,0,1-7.1426,22.4721Z\"/><path d=\"M10,29H8V25.18l.8037-.1607C10.2617,24.728,12,23.6206,12,20V18.6182l-4-2V14.3818l4-2V12c0-5.4673,3.9253-9,10-9h2V6.82l-.8037.1607C21.7383,7.272,20,8.3794,20,12v.3818l4,2v2.2364l-4,2V20C20,25.4673,16.0747,29,10,29Zm0-2c4.9346,0,8-2.6821,8-7V17.3818L21.7642,15.5,18,13.6182V12c0-4.5781,2.3853-6.1924,4-6.76V5c-4.9346,0-8,2.6821-8,7v1.6182L10.2358,15.5,14,17.3818V20c0,4.5781-2.3853,6.1924-4,6.76Z\"/><path d=\"M5.2312,24.9465A14.0032,14.0032,0,0,1,12.3779,2.4734l.5161,1.9321A12.0035,12.0035,0,0,0,6.7688,23.6677Z\"/>',\n 'globe': '<path d=\"M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z\"/><path d=\"M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z\"/>',\n 'grid': '<path d=\"M12,4H6A2,2,0,0,0,4,6v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,12,4Zm0,8H6V6h6Z\"/><path d=\"M26,4H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,8H20V6h6Z\"/><path d=\"M12,18H6a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,12,18Zm0,8H6V20h6Z\"/><path d=\"M26,18H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,26,18Zm0,8H20V20h6Z\"/>',\n 'hashtag': '<path d=\"M28,12V10H22V4H20v6H12V4H10v6H4v2h6v8H4v2h6v6h2V22h8v6h2V22h6V20H22V12Zm-8,8H12V12h8Z\"/>',\n 'help': '<path d=\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"/><circle cx=\"16\" cy=\"23.5\" r=\"1.5\"/><path d=\"M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z\"/>',\n 'home': '<path d=\"M16.6123,2.2138a1.01,1.01,0,0,0-1.2427,0L1,13.4194l1.2427,1.5717L4,13.6209V26a2.0041,2.0041,0,0,0,2,2H26a2.0037,2.0037,0,0,0,2-2V13.63L29.7573,15,31,13.4282ZM18,26H14V18h4Zm2,0V18a2.0023,2.0023,0,0,0-2-2H14a2.002,2.002,0,0,0-2,2v8H6V12.0615l10-7.79,10,7.8005V26Z\"/>',\n 'idea': '<path d=\"M11 24H21V26H11z\"/><path d=\"M13 28H19V30H13z\"/><path d=\"M16,2A10,10,0,0,0,6,12a9.19,9.19,0,0,0,3.46,7.62c1,.93,1.54,1.46,1.54,2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2,7.2,0,0,1,8,12a8,8,0,0,1,16,0,7.2,7.2,0,0,1-2.82,6.14c-1.07,1-2.18,2-2.18,3.86h2c0-.92.53-1.45,1.54-2.39A9.18,9.18,0,0,0,26,12,10,10,0,0,0,16,2Z\"/>',\n 'identification': '<path d=\"M28,6V26H4V6H28m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6a2,2,0,0,0-2-2Z\"/><path d=\"M6 10H13V12H6z\"/><path d=\"M6 14H10V16H6z\"/><path d=\"M23,18H17a3,3,0,0,0-3,3v2h2V21a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v2h2V21A3,3,0,0,0,23,18Z\"/><path d=\"M20,17a4,4,0,1,0-4-4A4,4,0,0,0,20,17Zm0-6a2,2,0,1,1-2,2A2,2,0,0,1,20,11Z\"/>',\n 'information': '<path d=\"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z\"/><path d=\"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z\"/><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\"/>',\n 'information--square': '<path d=\"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z\"/><path d=\"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z\"/><path d=\"M26,28H6a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,6,4H26a2.0023,2.0023,0,0,1,2,2V26A2.0023,2.0023,0,0,1,26,28ZM6,6V26H26V6Z\"/>',\n 'inventory-management': '<path d=\"M19 24H23V28H19z\"/><path d=\"M26 24H30V28H26z\"/><path d=\"M19 17H23V21H19z\"/><path d=\"M26 17H30V21H26z\"/><path d=\"M17,24H4V10H28v5h2V10a2.0023,2.0023,0,0,0-2-2H22V4a2.0023,2.0023,0,0,0-2-2H12a2.002,2.002,0,0,0-2,2V8H4a2.002,2.002,0,0,0-2,2V24a2.0023,2.0023,0,0,0,2,2H17ZM12,4h8V8H12Z\"/>',\n 'launch': '<path d=\"M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z\"/><path d=\"M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z\"/>',\n 'layers': '<path d=\"M16,24a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,15.12,16,21.8643,28.5259,15.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,24Z\"/><path d=\"M16,30a.9967.9967,0,0,1-.4741-.12l-13-7L3.4741,21.12,16,27.8643,28.5259,21.12l.9482,1.7607-13,7A.9967.9967,0,0,1,16,30Z\"/><path d=\"M16,18a.9967.9967,0,0,1-.4741-.12l-13-7a1,1,0,0,1,0-1.7607l13-7a.9982.9982,0,0,1,.9482,0l13,7a1,1,0,0,1,0,1.7607l-13,7A.9967.9967,0,0,1,16,18ZM5.1094,10,16,15.8643,26.8906,10,16,4.1358Z\"/>',\n 'license': '<path d=\"M10 6H22V8H10z\"/><path d=\"M10 10H22V12H10z\"/><path d=\"M10 24H16V26H10z\"/><path d=\"M10 14H16V16H10z\"/><path d=\"M24,30H8a2.0023,2.0023,0,0,1-2-2V4A2.0023,2.0023,0,0,1,8,2H24a2.0023,2.0023,0,0,1,2,2V28A2.0023,2.0023,0,0,1,24,30ZM8,4V28H24V4Z\"/>',\n 'list': '<path d=\"M10 6H28V8H10z\"/><path d=\"M10 24H28V26H10z\"/><path d=\"M10 15H28V17H10z\"/><path d=\"M4 15H6V17H4z\"/><path d=\"M4 6H6V8H4z\"/><path d=\"M4 24H6V26H4z\"/>',\n 'list--boxes': '<path d=\"M16 8H30V10H16z\"/><path d=\"M16 22H30V24H16z\"/><path d=\"M10,14H4a2.0023,2.0023,0,0,1-2-2V6A2.0023,2.0023,0,0,1,4,4h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,14ZM4,6v6h6.0012L10,6Z\"/><path d=\"M10,28H4a2.0023,2.0023,0,0,1-2-2V20a2.0023,2.0023,0,0,1,2-2h6a2.0023,2.0023,0,0,1,2,2v6A2.0023,2.0023,0,0,1,10,28ZM4,20v6h6.0012L10,20Z\"/>',\n 'list--checked': '<path d=\"M16 22H30V24H16z\"/><path d=\"M14 19.4 12.6 18 6 24.6 3.4 22 2 23.4 6 27.4z\"/><path d=\"M16 8H30V10H16z\"/><path d=\"M14 5.4 12.6 4 6 10.6 3.4 8 2 9.4 6 13.4z\"/>',\n 'location': '<path d=\"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z\"/><path d=\"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z\"/>',\n 'location--company': '<path d=\"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,0,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z\"/><path d=\"M21,18H19V10H13v8H11V10a2.0021,2.0021,0,0,1,2-2h6a2.0021,2.0021,0,0,1,2,2Z\"/><path d=\"M15 16H17V18H15z\"/><path d=\"M15 12H17V14H15z\"/>',\n 'locked': '<path d=\"M24,14H22V8A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14ZM12,8a4,4,0,0,1,8,0v6H12ZM24,28H8V16H24Z\"/>',\n 'login': '<path d=\"M26,30H14a2,2,0,0,1-2-2V25h2v3H26V4H14V7H12V4a2,2,0,0,1,2-2H26a2,2,0,0,1,2,2V28A2,2,0,0,1,26,30Z\"/><path d=\"M14.59 20.59 18.17 17 4 17 4 15 18.17 15 14.59 11.41 16 10 22 16 16 22 14.59 20.59z\"/>',\n 'logout': '<path d=\"M6,30H18a2.0023,2.0023,0,0,0,2-2V25H18v3H6V4H18V7h2V4a2.0023,2.0023,0,0,0-2-2H6A2.0023,2.0023,0,0,0,4,4V28A2.0023,2.0023,0,0,0,6,30Z\"/><path d=\"M20.586 20.586 24.172 17 10 17 10 15 24.172 15 20.586 11.414 22 10 28 16 22 22 20.586 20.586z\"/>',\n 'maximize': '<path d=\"M20 2 20 4 26.586 4 18 12.582 19.414 14 28 5.414 28 12 30 12 30 2 20 2z\"/><path d=\"M14 19.416 12.592 18 4 26.586 4 20 2 20 2 30 12 30 12 28 5.414 28 14 19.416z\"/>',\n 'menu': '<path d=\"M4 6H28V8H4z\"/><path d=\"M4 24H28V26H4z\"/><path d=\"M4 12H28V14H4z\"/><path d=\"M4 18H28V20H4z\"/>',\n 'minimize': '<path d=\"M4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18z\"/><path d=\"M30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z\"/>',\n 'misuse': '<path d=\"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9\tl5.4,5.4L21.4,9l1.6,1.6L17.6,16l5.4,5.4L21.4,23z\"/><path fill=\"none\" d=\"M21.4,23L16,17.6L10.6,23L9,21.4l5.4-5.4L9,10.6L10.6,9l5.4,5.4L21.4,9l1.6,1.6L17.6,16\tl5.4,5.4L21.4,23z\" data-icon-path=\"inner-path\" opacity=\"0\"/>',\n 'money': '<path d=\"M2 22H30V24H2z\"/><path d=\"M2 26H30V28H2z\"/><path d=\"M24,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z\"/><path d=\"M16,16a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,16,16Zm0-6a2,2,0,1,0,2,2A2.002,2.002,0,0,0,16,10Z\"/><path d=\"M8,10a2,2,0,1,0,2,2,2,2,0,0,0-2-2Z\"/><path d=\"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z\"/>',\n 'notebook': '<path d=\"M19 10H26V12H19z\"/><path d=\"M19 15H26V17H19z\"/><path d=\"M19 20H26V22H19z\"/><path d=\"M28,5H4A2.002,2.002,0,0,0,2,7V25a2.0023,2.0023,0,0,0,2,2H28a2.0027,2.0027,0,0,0,2-2V7A2.0023,2.0023,0,0,0,28,5ZM4,7H15V25H4ZM17,25V7H28l.002,18Z\"/>',\n 'notification': '<path d=\"M28.7071,19.293,26,16.5859V13a10.0136,10.0136,0,0,0-9-9.9492V1H15V3.0508A10.0136,10.0136,0,0,0,6,13v3.5859L3.2929,19.293A1,1,0,0,0,3,20v3a1,1,0,0,0,1,1h7v.7768a5.152,5.152,0,0,0,4.5,5.1987A5.0057,5.0057,0,0,0,21,25V24h7a1,1,0,0,0,1-1V20A1,1,0,0,0,28.7071,19.293ZM19,25a3,3,0,0,1-6,0V24h6Zm8-3H5V20.4141L7.707,17.707A1,1,0,0,0,8,17V13a8,8,0,0,1,16,0v4a1,1,0,0,0,.293.707L27,20.4141Z\"/>',\n 'overflow-menu--horizontal': '<circle cx=\"8\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"24\" cy=\"16\" r=\"2\"/>',\n 'overflow-menu--vertical': '<circle cx=\"16\" cy=\"8\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"24\" r=\"2\"/>',\n 'partnership': '<path d=\"M8,9a4,4,0,1,1,4-4A4,4,0,0,1,8,9ZM8,3a2,2,0,1,0,2,2A2,2,0,0,0,8,3Z\"/><path d=\"M24,9a4,4,0,1,1,4-4A4,4,0,0,1,24,9Zm0-6a2,2,0,1,0,2,2A2,2,0,0,0,24,3Z\"/><path d=\"M26,30H22a2,2,0,0,1-2-2V21h2v7h4V19h2V13a1,1,0,0,0-1-1H20.58L16,20l-4.58-8H5a1,1,0,0,0-1,1v6H6v9h4V21h2v7a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V21a2,2,0,0,1-2-2V13a3,3,0,0,1,3-3h7.58L16,16l3.42-6H27a3,3,0,0,1,3,3v6a2,2,0,0,1-2,2v7A2,2,0,0,1,26,30Z\"/>',\n 'payment--methods': '<path d=\"M5,26V15.8281l-3.5859,3.586L0,18l6-6,6,6-1.4141,1.4141-3.5859-3.586v10.1719h12v2H7c-1.104-.0013-1.9987-.896-2-2Z\"/><path d=\"M31,18h-3v-2h-2v2h-1c-1.1046,0-2,.8954-2,2v2c0,1.1046,.8954,2,2,2h4v2h-6s0,2,0,2h3v2h2v-2h1c1.1046,0,2-.8954,2-2v-2c0-1.1046-.8954-2-2-2h-4v-2h6v-2Z\"/><path d=\"M28,12V6c-.0012-1.104-.896-1.9988-2-2H12v2h14v6\"/><path d=\"M2 6H7V8H2z\"/><path d=\"M2 2H10V4H2z\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n 'qr-code': '<path d=\"M24 26H26V28H24z\" transform=\"rotate(-90 25 27)\"/><path d=\"M18 22H20V24H18z\" transform=\"rotate(-90 19 23)\"/><path d=\"M18 30 22 30 22 28 20 28 20 26 18 26 18 30z\"/><path d=\"M25 23H29V25H25z\" transform=\"rotate(-90 27 24)\"/><path d=\"M28 26 30 26 30 30 26 30 26 28 28 28 28 26z\"/><path d=\"M26 20 26 18 30 18 30 22 28 22 28 20 26 20z\"/><path d=\"M24 20 22 20 22 24 20 24 20 26 24 26 24 20z\"/><path d=\"M19 17H21V21H19z\" transform=\"rotate(-90 20 19)\"/><path d=\"M6 22H10V26H6z\"/><path d=\"M14,30H2V18H14ZM4,28h8V20H4Z\"/><path d=\"M22 6H26V10H22z\"/><path d=\"M30,14H18V2H30ZM20,12h8V4H20Z\"/><path d=\"M6 6H10V10H6z\"/><path d=\"M14,14H2V2H14ZM4,12h8V4H4Z\"/>',\n 'receipt': '<path d=\"M21 16H23V18H21z\"/><path d=\"M9 16H17V18H9z\"/><path d=\"M21 12H23V14H21z\"/><path d=\"M9 12H17V14H9z\"/><path d=\"M9 8H23V10H9z\"/><path d=\"M25,2H7A2.002,2.002,0,0,0,5,4V29a1,1,0,0,0,1,1H7a.9987.9987,0,0,0,.8-.4L10,26.667,12.2,29.6a1.0353,1.0353,0,0,0,1.6,0L16,26.667,18.2,29.6a1.0353,1.0353,0,0,0,1.6,0L22,26.667,24.2,29.6a.9993.9993,0,0,0,.8.4h1a1,1,0,0,0,1-1V4A2.0023,2.0023,0,0,0,25,2Zm0,25.333L22.8,24.4a1.0353,1.0353,0,0,0-1.6,0L19,27.333,16.8,24.4a1.0353,1.0353,0,0,0-1.6,0L13,27.333,10.8,24.4a1.0353,1.0353,0,0,0-1.6,0L7,27.333V4H25Z\"/>',\n 'recently-viewed': '<path d=\"M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z\"/><path d=\"M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z\"/>',\n 'redo': '<path d=\"M12,10H24.1851L20.5977,6.4141,22,5,28,11,22,17l-1.4023-1.4146L24.1821,12H12a6,6,0,0,0,0,12h8v2H12a8,8,0,0,1,0-16Z\"/>',\n 'renew': '<path d=\"M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z\"/><path d=\"M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z\"/>',\n 'repeat': '<path d=\"M6,6H26.1719l-3.586-3.5859L24,1l6,6-6,6-1.4141-1.4141L26.1719,8H6v7H4V8A2.0024,2.0024,0,0,1,6,6Z\"/><path d=\"M9.4141,20.4141,5.8281,24H26V17h2v7a2.0024,2.0024,0,0,1-2,2H5.8281L9.414,29.5859,8,31,2,25l6-6Z\"/>',\n 'report': '<path d=\"M10 18H18V20H10z\"/><path d=\"M10 13H22V15H10z\"/><path d=\"M10 23H15V25H10z\"/><path d=\"M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z\"/>',\n 'request-quote': '<path d=\"M22,22v6H6V4H16V2H6A2,2,0,0,0,4,4V28a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V22Z\"/><path d=\"M29.54,5.76l-3.3-3.3a1.6,1.6,0,0,0-2.24,0l-14,14V22h5.53l14-14a1.6,1.6,0,0,0,0-2.24ZM14.7,20H12V17.3l9.44-9.45,2.71,2.71ZM25.56,9.15,22.85,6.44l2.27-2.27,2.71,2.71Z\"/>',\n 'reset': '<path d=\"M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z\"/>',\n 'rule': '<path d=\"M10 16H22V18H10z\"/><path d=\"M10 10H22V12H10z\"/><path d=\"M16,30,9.8242,26.7071A10.9815,10.9815,0,0,1,4,17V4A2.0022,2.0022,0,0,1,6,2H26a2.0022,2.0022,0,0,1,2,2V17a10.9815,10.9815,0,0,1-5.8242,9.7069ZM6,4V17a8.9852,8.9852,0,0,0,4.7656,7.9423L16,27.7333l5.2344-2.791A8.9852,8.9852,0,0,0,26,17V4Z\"/>',\n 'save': '<path d=\"M27.71,9.29l-5-5A1,1,0,0,0,22,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V10A1,1,0,0,0,27.71,9.29ZM12,6h8v4H12Zm8,20H12V18h8Zm2,0V18a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v8H6V6h4v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V6.41l4,4V26Z\"/>',\n 'scales': '<path d=\"M20,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L25.896,7.5562a.8913.8913,0,0,0-.0454-.0816A1,1,0,0,0,25,7H18.8218A3.0155,3.0155,0,0,0,17,5.1841V2H15V5.1841A3.0155,3.0155,0,0,0,13.1782,7H7a1,1,0,0,0-.8945.5527l-4,8A1,1,0,0,0,2,16a5,5,0,0,0,10,0,1,1,0,0,0-.1055-.4473L8.6182,9h4.56A3.0147,3.0147,0,0,0,15,10.8154V28H6v2H26V28H17V10.8159A3.0155,3.0155,0,0,0,18.8218,9h4.56l-3.2763,6.5527A1,1,0,0,0,20,16ZM7,19a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,7,19Zm2.3821-4H4.6179L7,10.2363ZM16,9a1,1,0,1,1,1-1A1.0009,1.0009,0,0,1,16,9Zm9,10a2.9958,2.9958,0,0,1-2.8152-2h5.63A2.9956,2.9956,0,0,1,25,19Zm0-8.7637L27.3821,15H22.6179Z\"/>',\n 'search': '<path d=\"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z\"/>',\n 'send': '<path d=\"M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z\"/>',\n 'settings': '<path d=\"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z\"/><path d=\"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z\"/>',\n 'settings--adjust': '<path d=\"M30,8h-4.1c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2v2h14.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30V8z M21,12c-1.7,0-3-1.3-3-3\ts1.3-3,3-3s3,1.3,3,3S22.7,12,21,12z\"/><path d=\"M2,24h4.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30v-2H15.9c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2V24z M11,20c1.7,0,3,1.3,3,3\ts-1.3,3-3,3s-3-1.3-3-3S9.3,20,11,20z\"/>',\n 'shopping--bag': '<path d=\"M28.76,11.35A1,1,0,0,0,28,11H22V7a3,3,0,0,0-3-3H13a3,3,0,0,0-3,3v4H4a1,1,0,0,0-1,1.15L4.88,24.3a2,2,0,0,0,2,1.7H25.14a2,2,0,0,0,2-1.7L29,12.15A1,1,0,0,0,28.76,11.35ZM12,7a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v4H12ZM25.14,24H6.86L5.17,13H26.83Z\"/>',\n 'shopping--cart': '<circle cx=\"10\" cy=\"28\" r=\"2\"/><circle cx=\"24\" cy=\"28\" r=\"2\"/><path d=\"M28,7H5.82L5,2.8A1,1,0,0,0,4,2H0V4H3.18L7,23.2A1,1,0,0,0,8,24H26V22H8.82L8,18H26a1,1,0,0,0,1-.78l2-9A1,1,0,0,0,28,7Zm-2.8,9H7.62L6.22,9H26.75Z\"/>',\n 'sort--ascending': '<path d=\"M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z\"/><path d=\"M2 18H16V20H2z\"/><path d=\"M6 12H16V14H6z\"/><path d=\"M10 6H16V8H10z\"/>',\n 'sort--descending': '<path d=\"M18 22 19.414 20.586 23 24.172 23 4 25 4 25 24.172 28.586 20.586 30 22 24 28 18 22z\"/><path d=\"M2 6H16V8H2z\"/><path d=\"M6 12H16V14H6z\"/><path d=\"M10 18H16V20H10z\"/>',\n 'star': '<path d=\"M16,6.52l2.76,5.58.46,1,1,.15,6.16.89L22,18.44l-.75.73.18,1,1.05,6.13-5.51-2.89L16,23l-.93.49L9.56,26.34l1-6.13.18-1L10,18.44,5.58,14.09l6.16-.89,1-.15.46-1L16,6.52M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z\"/>',\n 'star--filled': '<path d=\"M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z\"/>',\n 'store': '<path d=\"M30,10.68l-2-6A1,1,0,0,0,27,4H5a1,1,0,0,0-1,.68l-2,6A1.19,1.19,0,0,0,2,11v6a1,1,0,0,0,1,1H4V28H6V18h6V28H28V18h1a1,1,0,0,0,1-1V11A1.19,1.19,0,0,0,30,10.68ZM26,26H14V18H26Zm2-10H24V12H22v4H17V12H15v4H10V12H8v4H4V11.16L5.72,6H26.28L28,11.16Z\"/>',\n 'subtract': '<path d=\"M8 15H24V17H8z\"/>',\n 'table--split': '<path d=\"M27,3H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,2V9H5V5ZM17,11H27v7H17Zm-2,7H5V11H15ZM5,20H15v7H5Zm12,7V20H27v7Z\"/>',\n 'tag': '<path d=\"M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z\"/><path d=\"M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z\"/>',\n 'task': '<path d=\"M14 20.18 10.41 16.59 9 18 14 23 23 14 21.59 12.58 14 20.18z\"/><path d=\"M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z\"/>',\n 'task--complete': '<path d=\"M22 27.18 19.41 24.59 18 26 22 30 30 22 28.59 20.59 22 27.18z\"/><path d=\"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3V18h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z\"/>',\n 'text--font': '<path d=\"M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z\"/><path d=\"M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n '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\"/>',\n 'user--multiple': '<path d=\"M30,30H28V25a5.0057,5.0057,0,0,0-5-5V18a7.0078,7.0078,0,0,1,7,7Z\"/><path d=\"M22,30H20V25a5.0059,5.0059,0,0,0-5-5H9a5.0059,5.0059,0,0,0-5,5v5H2V25a7.0082,7.0082,0,0,1,7-7h6a7.0082,7.0082,0,0,1,7,7Z\"/><path d=\"M20,2V4a5,5,0,0,1,0,10v2A7,7,0,0,0,20,2Z\"/><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\"/>',\n 'user--profile': '<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=\"M22 4H32V6H22z\"/><path d=\"M22 9H32V11H22z\"/><path d=\"M22 14H29V16H22z\"/>',\n 'view': '<path d=\"M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z\"/><path d=\"M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z\"/>',\n 'wallet': '<path d=\"M22 17H24V19H22z\"/><path d=\"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z\"/>',\n 'warning--alt': '<path d=\"M16,23a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,23Z\"/><path d=\"M15 12H17V21H15z\"/><path d=\"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z\"/>',\n 'warning--filled': '<path d=\"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25\tc-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z\"/><path fill=\"none\" d=\"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22\tC16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z\" data-icon-path=\"inner-path\" opacity=\"0\"/>',\n};\n","/** Canonical Pire icon names are Lucide slugs; the shipped IBM Carbon pack is reached through\n * this map, so swapping packs never touches a call site. A new icon name used by a component\n * must be added here — that is the whole registration step.\n *\n * This file is also the single source of truth for *which glyphs get vendored*:\n * `scripts/generate-icon-data.mjs` reads it and inlines the matching SVG from\n * `@carbon/icons` into `icon-data.generated.ts`. The script cannot import TypeScript, so it\n * parses this object textually. **Every entry must stay a literal `'name': 'slug',` pair.**\n * A spread, a computed key or a template literal is invisible to the generator: the glyph\n * never gets vendored and `Icon` warns at runtime instead of rendering. Multiple names may\n * point at one slug (`boxes` and `package` both mean `box`); the generator de-duplicates.\n */\nexport const CARBON_MAP: Record<string, string> = {\n 'menu': 'menu',\n 'search': 'search',\n 'bell': 'notification',\n 'help-circle': 'help',\n 'grid-3x3': 'grid',\n /* The app launcher's trigger. Carbon has no 2x2 grid, and `apps` is the glyph it uses for\n exactly this affordance, so the Lucide name maps onto it rather than onto plain `grid`. */\n 'grid-2x2': 'apps',\n 'home': 'home',\n 'file-text': 'document',\n 'clipboard-list': 'list--checked',\n 'building-2': 'building',\n /* Ribbon and import commands. `task--complete` is Carbon's ticked-list glyph; `check-square`\n already points at it, and the generator de-duplicates by slug, so this costs no bytes. */\n 'list-checks': 'task--complete',\n 'pin': 'pin',\n 'upload': 'upload',\n 'boxes': 'box',\n 'truck': 'delivery-truck',\n 'stamp': 'checkmark--outline',\n 'check': 'checkmark',\n 'x': 'close',\n 'minus': 'subtract',\n 'plus': 'add',\n 'trash-2': 'trash-can',\n 'printer': 'printer',\n 'paperclip': 'attachment',\n 'download': 'download',\n 'calendar': 'calendar',\n 'hash': 'hashtag',\n 'history': 'recently-viewed',\n 'calculator': 'calculator',\n 'zap': 'flash',\n 'palette': 'color-palette',\n 'settings': 'settings',\n 'sliders-horizontal': 'settings--adjust',\n 'filter': 'filter',\n 'rows-3': 'list',\n 'align-justify': 'list--boxes',\n 'more-vertical': 'overflow-menu--vertical',\n 'alert-triangle': 'warning--alt',\n 'alert-octagon': 'error--filled',\n 'alert-circle': 'warning--filled',\n 'check-circle-2': 'checkmark--filled',\n 'x-circle': 'misuse',\n 'info': 'information',\n 'circle': 'circle-dash',\n 'chevron-right': 'chevron--right',\n 'chevron-left': 'chevron--left',\n 'chevron-down': 'chevron--down',\n 'chevrons-up-down': 'chevron--sort',\n 'arrow-right': 'arrow--right',\n 'arrow-up': 'arrow--up',\n 'arrow-down': 'arrow--down',\n 'trending-up': 'arrow--up',\n 'trending-down': 'arrow--down',\n 'shopping-cart': 'shopping--cart',\n 'store': 'store',\n 'user': 'user',\n 'shapes': 'apps',\n 'type': 'text--font',\n 'package': 'box',\n 'warehouse': 'building--insights-1',\n 'arrow-up-down': 'arrows--vertical',\n 'scan-line': 'qr-code',\n 'circle-alert': 'warning--filled',\n 'clock': 'time',\n 'layers': 'layers',\n 'map-pin': 'location',\n 'copy': 'copy',\n 'refresh-cw': 'renew',\n 'external-link': 'launch',\n 'pencil': 'edit',\n 'lock': 'locked',\n 'eye': 'view',\n 'minimize-2': 'minimize',\n\n /* --- Direction and chrome, completing the sets above --------------------\n `chevron-up` and `arrow-left` were missing while their three siblings shipped, so a collapsible\n that pointed down had nothing to point back up with. */\n 'chevron-up': 'chevron--up',\n 'arrow-left': 'arrow--left',\n 'more-horizontal': 'overflow-menu--horizontal',\n 'maximize-2': 'maximize',\n 'log-out': 'logout',\n 'log-in': 'login',\n 'archive': 'archive',\n 'folder': 'folder',\n 'book': 'book',\n 'notebook': 'notebook',\n 'asterisk': 'asterisk',\n 'bookmark': 'bookmark',\n 'star': 'star',\n 'star-filled': 'star--filled',\n 'tag': 'tag',\n 'repeat': 'repeat',\n 'undo-2': 'undo',\n 'redo-2': 'redo',\n 'rotate-ccw': 'reset',\n 'table': 'table--split',\n 'database': 'data--base',\n 'function-square': 'function',\n\n /* --- Money -------------------------------------------------------------\n `credit-card` is here because its absence shipped: it resolved to nothing, rendered an empty\n box, and reached production on the payment notifications. Carbon spells it `payment--methods`,\n which is exactly the kind of mismatch this map exists to absorb. */\n 'credit-card': 'payment--methods',\n 'wallet': 'wallet',\n 'banknote': 'money',\n 'coins': 'currency',\n 'dollar-sign': 'currency--dollar',\n 'euro': 'currency--euro',\n 'receipt': 'receipt',\n 'percent': 'percentage',\n 'piggy-bank': 'piggy-bank',\n 'landmark': 'bank--vault',\n 'scale': 'scales',\n 'purchase': 'purchase',\n\n /* --- Documents and ERP objects ----------------------------------------- */\n 'file-signature': 'request-quote',\n 'scroll-text': 'license',\n 'file-plus': 'document--add',\n 'save': 'save',\n 'file-bar-chart': 'report',\n 'list-todo': 'task',\n 'check-square': 'task--complete',\n 'gavel': 'rule',\n 'id-card': 'identification',\n 'briefcase': 'portfolio',\n 'handshake': 'partnership',\n 'lightbulb': 'idea',\n 'inventory': 'inventory-management',\n 'package-2': 'delivery--parcel',\n 'shopping-bag': 'shopping--bag',\n 'barcode': 'barcode',\n 'qr-code': 'qr-code',\n 'git-branch': 'flow',\n 'bug': 'debug',\n\n /* --- People and contact ------------------------------------------------- */\n 'users': 'user--multiple',\n 'user-plus': 'user--follow',\n 'user-cog': 'user--admin',\n 'user-circle': 'user--profile',\n 'mail': 'email',\n 'phone': 'phone',\n 'send': 'send',\n 'globe': 'globe',\n 'building': 'location--company',\n\n /* --- Charts and time ---------------------------------------------------- */\n 'bar-chart-3': 'chart--column',\n 'bar-chart-horizontal': 'chart--bar',\n 'line-chart': 'chart--line',\n 'pie-chart': 'chart--pie',\n 'area-chart': 'chart--area',\n 'calendar-days': 'events',\n 'calendar-plus': 'calendar--add',\n 'calendar-heatmap': 'calendar--heat-map',\n\n /* --- Transfer ----------------------------------------------------------- */\n 'cloud-upload': 'cloud--upload',\n 'cloud-download': 'cloud--download',\n 'filter-x': 'filter--edit',\n 'arrow-up-narrow-wide': 'sort--ascending',\n 'arrow-down-wide-narrow': 'sort--descending',\n 'badge-info': 'information--square',\n};\n\n/**\n * Every name `Icon` can render, frozen and sorted.\n *\n * Exported because an unknown slug fails quietly — an empty box and one dev-only console warning,\n * which is easy to lose in a busy log. A consumer that generates icon names from data can assert\n * against this list at build time instead of discovering the gap in production, which is how\n * `credit-card` shipped as a blank square.\n */\nexport const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(CARBON_MAP).sort());\n","/** The package has no `@types/node`, and should not need one for a browser library — but the\n * literal token `process.env.NODE_ENV` has to survive into the output for a bundler to\n * substitute it. Declared inside the module so it shadows, and cannot clash with, the `process`\n * that `@types/node` contributes when it is present in a consumer's graph. */\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/** Dev-only diagnostics. Every bundler replaces `process.env.NODE_ENV` statically, so the\n * warnings and their registry are dead code a minifier drops from production builds. Do *not*\n * wrap this in `typeof process !== 'undefined'`: `process` is genuinely undefined in the\n * browser, the `typeof` test is not something a bundler substitutes, and the guard would\n * evaluate false in development — silencing the warnings this exists to emit. This is the same\n * bare check react-aria-components ships, so it is already in every consumer's bundle. */\nexport const IS_DEV = process.env.NODE_ENV !== 'production';\n\nconst warned = new Set<string>();\n\n/** One warning per distinct cause. Fields, icons and charts re-render on every keystroke or filter\n * change, so warning per render would bury the message in its own repetitions. The registry is\n * shared by every component, so prefix keys with the component (`icon:`, `datatable:`, `chart:`). */\nexport function warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(`[pire] ${message}`);\n}\n","import type * as React from 'react';\nimport { ICON_MARKUP } from './icon-data.generated';\nimport { CARBON_MAP } from './icon-map';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\n/** @deprecated Retained only so existing `pack` values still typecheck. Glyphs are bundled from\n * the Carbon pack; there is no second pack and no remote fetch, so the value is ignored. */\nexport type IconPack = 'carbon' | 'lucide';\n\nexport interface IconConfig {\n /** @deprecated Ignored. The bundled Carbon pack is the only pack — `lucide` was a remote-URL\n * pack and no longer exists. Setting this warns in development. */\n pack?: IconPack;\n /** @deprecated Ignored — glyphs are inlined in the bundle, so there is nothing to serve from a\n * folder. Apps that vendored `<slug>.svg` files into `public/` to survive offline can delete\n * both the files and this call. Setting it warns in development. */\n base?: string;\n /** Escape hatch for a glyph Pire does not bundle, or to override one. Return the *inner* markup\n * of a 32x32 SVG (`'<path d=\"…\"/>'`), or `undefined` to fall through to the bundled set. The\n * string is injected as-is, so it must be authored markup, never user input. */\n resolve?: (name: string) => string | undefined;\n}\n\nlet config: IconConfig = {};\n\n/** Optional. The bundled Carbon set needs no configuration — this exists only to register glyphs\n * Pire does not ship, once at startup. */\nexport function configureIcons(next: IconConfig): void {\n config = { ...config, ...next };\n if (!IS_DEV) return;\n if (next.base !== undefined) {\n warnOnce(\n 'icon:config:base',\n 'configureIcons({ base }) is ignored: glyphs are inlined in the bundle and no longer fetched over the network. Remove the call, and the self-hosted SVGs it pointed at.',\n );\n }\n if (next.pack !== undefined) {\n warnOnce(\n 'icon:config:pack',\n 'configureIcons({ pack }) is ignored: the bundled Carbon pack is the only pack. Use configureIcons({ resolve }) to supply a glyph Pire does not ship.',\n );\n }\n}\n\nexport interface IconProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {\n /** Canonical (Lucide) slug, e.g. \"shopping-cart\". Translated to the Carbon pack automatically. */\n name: string;\n /** Pixel box. 16 in dense UI, 20 in headers, 24 in tiles. */\n size?: number;\n /** Accessible name. Omit for decorative icons — they are hidden from assistive tech. */\n label?: string;\n /** @deprecated Ignored. See {@link IconConfig.pack}. */\n pack?: IconPack;\n}\n\n/** Glyph rendered as inline SVG filled with `currentColor`, so it inherits text colour everywhere\n * and paints with no network at all — offline PWAs included.\n *\n * An unknown name still renders nothing, so a typo cannot collapse a layout, but it warns in\n * development: the silent blank gap was the failure mode worth killing. */\nexport function Icon({ name, size = 16, label, pack, style, ...rest }: IconProps) {\n const markup = config.resolve?.(name) ?? ICON_MARKUP[CARBON_MAP[name] ?? name];\n if (IS_DEV) {\n if (pack !== undefined) {\n warnOnce(\n 'icon:prop:pack',\n 'The Icon `pack` prop is ignored: the bundled Carbon pack is the only pack. Drop the prop.',\n );\n }\n if (markup === undefined) {\n warnOnce(\n `icon:missing:${name}`,\n `Unknown icon name \"${name}\" — nothing will render. Add it to CARBON_MAP in src/components/core/icon-map.ts and rebuild, or register it with configureIcons({ resolve }).`,\n );\n }\n }\n return (\n <span\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n data-icon={name}\n {...rest}\n style={{ display: 'inline-block', flex: '0 0 auto', width: size, height: size, ...style }}\n >\n {markup === undefined ? (\n // A broken icon has to look broken. In development the box gets a dashed outline so the\n // gap is visible on screen instead of only in a console warning that is easy to lose.\n // Production still renders nothing at all: a dev diagnostic must never become a user's\n // first sight of a defect. Deliberately not an <svg>, so nothing reads it as a real glyph.\n IS_DEV ? (\n <span className=\"pire-icon-missing\" title={`Unknown icon: ${name}`} />\n ) : null\n ) : (\n <svg\n viewBox=\"0 0 32 32\"\n width={size}\n height={size}\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\"\n style={{ display: 'block' }}\n // The markup is build-time output of scripts/generate-icon-data.mjs, or a string the app\n // itself handed to configureIcons — never user input. Parsing it into React elements\n // would mean shipping an SVG parser to do what the browser already does.\n // biome-ignore lint/security/noDangerouslySetInnerHtml: build-time generated icon markup.\n dangerouslySetInnerHTML={{ __html: markup }}\n />\n )}\n </span>\n );\n}\n","import * as React from 'react';\nimport { Button as AriaButton, type ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { ComingSoonMark, comingSoonProps } from './ComingSoonMark';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** primary = one per view. secondary = default action. tertiary = low-stakes/inline.\n * danger = destructive. emphasized = on the dark shell. */\n variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'emphasized';\n /** sm = table rows & toolbars, md = default forms, lg = full-width CTAs. */\n size?: 'sm' | 'md' | 'lg';\n /** Icon slug rendered before the label. */\n icon?: string;\n /** Icon slug rendered after the label. */\n iconEnd?: string;\n fullWidth?: boolean;\n /**\n * An action the product will have but does not have yet. Draws the button in the tertiary ink\n * with a \"Soon\" mark after the label, keeps it **focusable** with `aria-disabled=\"true\"`, and\n * never fires `onPress` (nor submits a form).\n *\n * Not a kind of `isDisabled`. Disabled means \"not now\" — no selection, no permission, the wrong\n * document state — and takes the control out of the tab order. This means \"not yet\", and the mark\n * is the message: it has to be reachable by keyboard, announced (\"Send by WhatsApp, soon\"), and\n * able to carry a `Tooltip` saying what the action will do. It also does not look disabled, so a\n * user can tell the two apart.\n */\n isComingSoon?: boolean;\n className?: string;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n children,\n variant = 'secondary',\n size = 'md',\n icon,\n iconEnd,\n fullWidth,\n isComingSoon,\n className,\n ...rest\n },\n ref,\n) {\n const msg = usePireMessages();\n const soonLabel = rest['aria-label'] ?? (typeof children === 'string' ? children : undefined);\n return (\n <AriaButton\n ref={ref}\n className={cx('pire-btn', className)}\n data-variant={variant}\n data-size={size}\n data-full-width={fullWidth ? 'true' : undefined}\n {...rest}\n {...(isComingSoon ? comingSoonProps(soonLabel, msg.comingSoon) : {})}\n >\n {icon ? <Icon name={icon} size={16} /> : null}\n {children}\n {iconEnd ? <Icon name={iconEnd} size={16} /> : null}\n {isComingSoon ? <ComingSoonMark announce={soonLabel == null} /> : null}\n </AriaButton>\n );\n});\n","import * as React from 'react';\nimport { type PireMessages, enMessages } from './messages';\n\nconst MessagesContext = React.createContext<PireMessages>(enMessages);\n\nexport interface PireIntlProviderProps {\n /** Overrides merged over the English defaults, so a partial dictionary is enough. */\n messages?: Partial<PireMessages>;\n children?: React.ReactNode;\n}\n\n/**\n * Supplies the strings Pire renders itself. Mount once near the app root, alongside React Aria's\n * `I18nProvider` — that one localises React Aria's internals, this one localises Pire's.\n */\nexport function PireIntlProvider({ messages, children }: PireIntlProviderProps) {\n const value = React.useMemo(() => (messages ? { ...enMessages, ...messages } : enMessages), [messages]);\n\n return <MessagesContext.Provider value={value}>{children}</MessagesContext.Provider>;\n}\n\n/** Reads the active dictionary. Without a provider this returns the English defaults. */\nexport function usePireMessages(): PireMessages {\n return React.useContext(MessagesContext);\n}\n\n/**\n * Resolves one string, letting an explicit prop win over the dictionary.\n *\n * Components call this so a per-instance override is always available — a screen with two navs\n * needs to name them differently even when the dictionary is correct.\n */\nexport function useMessage(key: keyof PireMessages, override?: string): string {\n // Read the context unconditionally — `override ?? useContext(...)` short-circuits, which\n // changes the hook call order between renders.\n const messages = React.useContext(MessagesContext);\n return override ?? messages[key];\n}\n","/**\n * Every string Pire renders that the consumer did not supply.\n *\n * Keys are `<component><thing>`. Values are the English defaults, so a consumer that installs\n * nothing keeps working exactly as before.\n *\n * React Aria localises its own internals (date field segments, table sort announcements) through\n * `I18nProvider`, which Pire re-exports. This dictionary is the parallel for Pire's own strings —\n * install both to fully translate the UI.\n */\nexport interface PireMessages {\n /** FilterBar's landmark name. */\n filterBarLabel: string;\n /** Visible text of the apply button. Filters apply explicitly, never live. */\n filterBarGo: string;\n /** Visible text of the button that removes every active filter. */\n filterBarClearAll: string;\n\n /** Accessible name of the header checkbox that selects every row. */\n dataTableSelectAll: string;\n /** Accessible name of a row's selection checkbox. */\n dataTableSelectRow: string;\n /** Announced-only name of the selection column's header when `hideSelectAll` removes the\n * select-all checkbox that would otherwise name it. */\n dataTableSelectionColumn: string;\n /** Announced while the table body is a skeleton. */\n dataTableLoading: string;\n /** Row header announced for the totals row when the first column carries no summary cell. */\n dataTableSummaryRow: string;\n /** Shown in place of the body when a table has no rows and is not loading. */\n dataTableEmpty: string;\n\n /** Accessible name of the dialog's close affordance. */\n dialogClose: string;\n /** Accessible name of SidePanel's close affordance. */\n sidePanelClose: string;\n\n /** Accessible name of InlineMessage's dismiss affordance. */\n inlineMessageDismiss: string;\n /** Accessible name of a toast's dismiss affordance. */\n toastDismiss: string;\n /** Landmark name of the toast live region. */\n toastRegionLabel: string;\n\n /** Shown in a Select's trigger while nothing is chosen, and — with `isClearable` — reused as\n * the visible label of the row that returns the field to that state. The same string has to\n * read naturally in both places: as trigger text and as a list item. */\n selectPlaceholder: string;\n /** Shown inside the popover when a Select has no options at all. A Select whose list is empty\n * used not to open, so the field read as broken; this is the text that explains it instead. */\n selectEmpty: string;\n\n /** Accessible name of the button that opens a ComboBox's list. */\n comboBoxShowSuggestions: string;\n /** Row shown in the popover while a server search is in flight. */\n comboBoxLoading: string;\n\n /** Accessible name of the button that opens the calendar popover. */\n datePickerOpenCalendar: string;\n datePickerPreviousMonth: string;\n datePickerNextMonth: string;\n /** Groups the shortcut buttons beside the range calendar. */\n dateRangePresetsLabel: string;\n\n /** Accessible names of the NumberField steppers. */\n numberFieldIncrease: string;\n numberFieldDecrease: string;\n\n /** Accessible name of the button that clears a ValueHelpField. */\n /** Accessible name of the clear affordance on a clearable Input. */\n inputClear: string;\n\n /** Accessible name of the help icon beside a field label. The explanation itself is the\n * tooltip, and is also announced as part of the field's description. */\n fieldHelp: string;\n /** Accessible name of a field's help icon when the field's label is a plain string, so that a\n * form with six helped fields does not offer six buttons all called `fieldHelp`. `{label}` is\n * replaced with the field's own label, lowercased for its mid-sentence position — the same\n * shape as `valueHelpFieldOpenNamed`. */\n fieldHelpNamed: string;\n\n /** Placeholder in the closed value-help field when nothing is picked. */\n valueHelpFieldPlaceholder: string;\n valueHelpFieldClear: string;\n /** Opens the value-help dialog. `{label}` is replaced with the field's own label. */\n valueHelpFieldOpenNamed: string;\n /** Same button, when the field has no string label to name it with. */\n valueHelpFieldOpen: string;\n /** Accessible name of ValueHelpDialog's search field. */\n valueHelpDialogSearch: string;\n /** Default dialog heading when the field does not supply one. */\n valueHelpDialogTitle: string;\n /** Placeholder in the value-help search box. */\n valueHelpDialogSearchPlaceholder: string;\n /** Shown when the search returns nothing. */\n valueHelpDialogEmpty: string;\n /** Visible text of ValueHelpDialog's cancel button. */\n valueHelpDialogCancel: string;\n\n /** Pagination's landmark name and its controls. */\n paginationLabel: string;\n /** Record range. `{from}`, `{to}` and `{total}` are replaced with formatted numbers. */\n paginationRange: string;\n /** Current page. `{page}` and `{pages}` are replaced. */\n paginationPageOf: string;\n paginationPrevious: string;\n paginationNext: string;\n paginationRowsPerPage: string;\n /** An option in the rows-per-page picker. `{count}` is the page size. */\n paginationPageSize: string;\n\n /** Landmark name of the main SideNav. Override it when a screen has more than one nav. */\n sideNavLabel: string;\n /** ShellRail's landmark name. Distinct from `sideNavLabel`: the two navs are on screen together,\n * and one of them has to say which level it is. */\n shellRailLabel: string;\n\n /** Accessible name of AppLauncher's trigger, and of the panel it opens. */\n appLauncherLabel: string;\n /** Heading inside the launcher panel. */\n appLauncherTitle: string;\n /** The launcher search box's label and placeholder. */\n appLauncherSearch: string;\n /** Shown when the search matches nothing. */\n appLauncherEmpty: string;\n /** Announced while a server-backed catalogue is loading. */\n appLauncherLoading: string;\n /** Names SplitPane's list column. */\n splitPaneList: string;\n /** Names SplitPane's detail column. */\n splitPaneDetail: string;\n /** Returns to the list when SplitPane is narrow enough to show one column. */\n splitPaneBack: string;\n\n /** Button that opens the OS file picker. */\n fileUploadChoose: string;\n /** Removes one picked file. `{name}` is replaced with the file name. */\n fileUploadRemoveNamed: string;\n /** Label on the progress bar while the app uploads. */\n fileUploadUploading: string;\n /** Instruction inside the drop surface. */\n fileDropZonePrompt: string;\n\n /** Accessible name of the ShellBar avatar once it opens a menu. `{user}` is the person's name. */\n shellBarUserMenu: string;\n /** Accessible name of the shell bar's navigation button, unless `menuLabel` is passed. */\n shellBarMenu: string;\n /** Accessible name of the shell bar's search button, unless `searchLabel` is passed. */\n shellBarSearch: string;\n\n /** Names the command palette dialog. */\n commandPaletteLabel: string;\n /** Accessible name of the palette's search input. */\n commandPaletteSearchLabel: string;\n /** Placeholder in the palette's input. */\n commandPalettePlaceholder: string;\n /** Shown when nothing matches what was typed. */\n commandPaletteEmpty: string;\n /** Shown while a server-backed search is in flight. */\n commandPaletteLoading: string;\n /** Footer hint beside the arrow-key glyphs. */\n commandPaletteHintNavigate: string;\n /** Footer hint beside the Enter glyph. */\n commandPaletteHintSelect: string;\n /** Footer hint beside the Esc glyph. */\n commandPaletteHintClose: string;\n\n /** Heading of the category column in a chart's data table. */\n chartCategoryHeader: string;\n /** Cell text where a chart series has no reading for a category. Never \"0\" — a gap is not a zero. */\n chartNoValue: string;\n /** Shown in place of the plot when a chart has nothing to draw. */\n chartEmpty: string;\n\n /** Accessible name of NumPad's clear key. Its visible glyph is \"C\". */\n numPadClear: string;\n /** Accessible name of NumPad's backspace key. Its visible glyph is \"⌫\". */\n numPadBackspace: string;\n /** Accessible name of NumPad's decimal key. Its visible glyph is the locale's own separator\n * (\",\" or \".\"), which is not a name a screen reader can announce. */\n numPadDecimal: string;\n\n /** Accessible name of the trigger. `{view}` is the view's own name. An `aria-label` on the\n * component replaces this entirely — see the prop's own note. */\n viewSwitcherName: string;\n /** Accessible name when the view has unsaved changes. A comma rather than the middot the\n * visible marker uses: a screen reader announces punctuation, and \"·\" reads as a symbol\n * rather than as the pause it is meant to be. */\n viewSwitcherNameModified: string;\n /** The visible marker beside a modified view's name, separator included. */\n viewSwitcherModifiedMark: string;\n\n /** Accessible name of QuantityStepper's increment button. */\n quantityStepperIncrease: string;\n /** Accessible name of QuantityStepper's decrement button. */\n quantityStepperDecrease: string;\n\n /** Names the key-figure summary inside a ConfirmDialog, for assistive tech. */\n confirmDialogFactsLabel: string;\n /** Commit button text, unless `confirmLabel` is passed. */\n confirmDialogConfirm: string;\n /** Cancel button text, unless `cancelLabel` is passed. */\n confirmDialogCancel: string;\n /** Commit button text while `isBusy`. */\n confirmDialogBusy: string;\n\n /** Visible text of the multi-select value help's \"select every row\" action. Carries the scope\n * it will act on: `{count}` is replaced with how many records the press would tick. */\n valueHelpSelectAllCount: string;\n /** Visible text of the action that empties a multi-select value help's selection. */\n valueHelpClearSelection: string;\n /** How many records are selected. `{count}` is replaced with the number. */\n valueHelpSelectedCount: string;\n /** Visible text of the multi-select value help's commit button. */\n valueHelpConfirm: string;\n\n /** Accessible name of a Tag's remove affordance, with the tag's own text substituted for\n * `{name}`. Same shape as `fileUploadRemoveNamed`, which solves the identical problem. */\n tagRemoveNamed: string;\n /** Accessible name of a Tag's remove affordance when the tag's content is not plain text.\n * Deliberately not \"filter\": a Tag is categorical and carries payment kinds and document\n * types as often as it carries filters. */\n tagRemove: string;\n\n /**\n * Names the expanded ribbon's command band. Separate from the `aria-label` the consumer\n * supplies, which is already spent naming the tab list above it — the band is a second\n * landmark and would otherwise go unnamed.\n */\n ribbonLabel: string;\n /** Accessible name of the toggle while the ribbon is expanded. */\n ribbonCollapse: string;\n /** Accessible name of the toggle while the ribbon is collapsed. */\n ribbonExpand: string;\n\n /** The mark beside an action the product will have but does not have yet (`isComingSoon` on\n * `Button` and `Ribbon.Command`). Short, because it sits inside a 21px ribbon row. Announced\n * after the label as part of the control's name. */\n comingSoon: string;\n\n /** SelectionBar's sentence, one selected record. `{count}` is the formatted number and `{noun}`\n * the noun's `one` form. The four entries exist because a Spanish participle agrees in number\n * *and* gender — \"2 órdenes seleccionadas\", \"2 presupuestos seleccionados\" — and English needs\n * neither, so its feminine entries simply repeat the masculine ones. */\n selectionBarCountOne: string;\n /** As `selectionBarCountOne`, for any count that is not grammatically singular. */\n selectionBarCountOther: string;\n /** As `selectionBarCountOne`, for a noun with `gender=\"feminine\"`. */\n selectionBarCountOneFeminine: string;\n /** As `selectionBarCountOther`, for a noun with `gender=\"feminine\"`. */\n selectionBarCountOtherFeminine: string;\n /** SelectionBar's noun when the consumer names none, singular and plural. Masculine in Spanish. */\n selectionBarNounOne: string;\n selectionBarNounOther: string;\n /** Visible text of SelectionBar's own clear button, rendered once `onClear` is supplied. */\n selectionBarClear: string;\n\n /** Accessible name of the button that stands in for a collapsed breadcrumb's middle steps. */\n breadcrumbMore: string;\n /** Names the shell bar's breadcrumb landmark. */\n breadcrumbLabel: string;\n\n /** Names a Tabs strip when the consumer passes no `aria-label`. */\n tabsLabel: string;\n /** Announced when MultiComboBox gains a value. `{label}` is the value, `{count}` how many are now selected. */\n multiComboBoxAdded: string;\n /** As `multiComboBoxAdded`, when a value is removed. */\n multiComboBoxRemoved: string;\n}\n\nexport const enMessages: PireMessages = {\n filterBarLabel: 'Filters',\n filterBarGo: 'Go',\n filterBarClearAll: 'Clear all',\n\n dataTableSelectAll: 'Select all rows',\n dataTableSelectRow: 'Select row',\n dataTableSelectionColumn: 'Selection',\n dataTableLoading: 'Loading records',\n dataTableSummaryRow: 'Summary',\n dataTableEmpty: 'No records match the current filters.',\n\n dialogClose: 'Close',\n sidePanelClose: 'Close panel',\n\n inlineMessageDismiss: 'Dismiss message',\n toastDismiss: 'Dismiss',\n toastRegionLabel: 'Notifications',\n\n selectPlaceholder: 'Select…',\n\n selectEmpty: 'No options available',\n\n comboBoxShowSuggestions: 'Show suggestions',\n comboBoxLoading: 'Searching…',\n\n datePickerOpenCalendar: 'Open calendar',\n datePickerPreviousMonth: 'Previous month',\n datePickerNextMonth: 'Next month',\n dateRangePresetsLabel: 'Date range shortcuts',\n\n numberFieldIncrease: 'Increase',\n numberFieldDecrease: 'Decrease',\n\n inputClear: 'Clear',\n\n fieldHelp: 'More information',\n fieldHelpNamed: 'More information about {label}',\n\n valueHelpFieldPlaceholder: 'Not selected',\n valueHelpFieldClear: 'Clear selection',\n valueHelpFieldOpenNamed: 'Select {label}',\n valueHelpFieldOpen: 'Open value help',\n valueHelpDialogSearch: 'Search records',\n valueHelpDialogTitle: 'Select a record',\n valueHelpDialogSearchPlaceholder: 'Search by ID or name',\n valueHelpDialogEmpty: 'No records found',\n valueHelpDialogCancel: 'Cancel',\n\n paginationLabel: 'Pagination',\n paginationRange: '{from}–{to} of {total}',\n paginationPageOf: 'Page {page} of {pages}',\n paginationPrevious: 'Previous page',\n paginationNext: 'Next page',\n paginationRowsPerPage: 'Rows per page',\n paginationPageSize: '{count} rows',\n\n sideNavLabel: 'Main navigation',\n shellRailLabel: 'Applications',\n appLauncherLabel: 'All applications',\n appLauncherTitle: 'All applications',\n appLauncherSearch: 'Search for an application',\n appLauncherEmpty: 'No application matches that search.',\n appLauncherLoading: 'Loading applications…',\n splitPaneList: 'List',\n splitPaneDetail: 'Detail',\n splitPaneBack: 'Back to list',\n\n fileUploadChoose: 'Choose files',\n fileUploadRemoveNamed: 'Remove {name}',\n fileUploadUploading: 'Uploading',\n fileDropZonePrompt: 'Drag files here, or choose them',\n\n shellBarUserMenu: 'Account menu for {user}',\n shellBarMenu: 'Open navigation',\n shellBarSearch: 'Search',\n\n commandPaletteLabel: 'Command palette',\n commandPaletteSearchLabel: 'Search commands and records',\n commandPalettePlaceholder: 'Search for a screen, an action or a record…',\n commandPaletteEmpty: 'Nothing matches that',\n commandPaletteLoading: 'Searching…',\n commandPaletteHintNavigate: 'navigate',\n commandPaletteHintSelect: 'open',\n commandPaletteHintClose: 'close',\n\n chartCategoryHeader: 'Category',\n chartNoValue: 'No data',\n chartEmpty: 'No data for this period',\n\n numPadClear: 'Clear',\n numPadBackspace: 'Remove last digit',\n numPadDecimal: 'Decimal separator',\n\n viewSwitcherName: 'Saved views: {view}',\n viewSwitcherNameModified: 'Saved views: {view}, modified',\n viewSwitcherModifiedMark: '· modified',\n quantityStepperIncrease: 'Increase quantity',\n quantityStepperDecrease: 'Decrease quantity',\n confirmDialogFactsLabel: 'Summary',\n confirmDialogConfirm: 'Confirm',\n confirmDialogCancel: 'Cancel',\n confirmDialogBusy: 'Working…',\n valueHelpSelectAllCount: 'Select all ({count})',\n valueHelpClearSelection: 'Clear selection',\n valueHelpSelectedCount: 'Selected: {count}',\n valueHelpConfirm: 'Apply selection',\n tagRemoveNamed: 'Remove {name}',\n tagRemove: 'Remove',\n\n ribbonLabel: 'Commands',\n ribbonCollapse: 'Collapse the ribbon',\n ribbonExpand: 'Expand the ribbon',\n\n comingSoon: 'Soon',\n\n selectionBarCountOne: '{count} {noun} selected',\n selectionBarCountOther: '{count} {noun} selected',\n selectionBarCountOneFeminine: '{count} {noun} selected',\n selectionBarCountOtherFeminine: '{count} {noun} selected',\n selectionBarNounOne: 'record',\n selectionBarNounOther: 'records',\n selectionBarClear: 'Clear selection',\n\n breadcrumbMore: 'Show the full path',\n breadcrumbLabel: 'Breadcrumb',\n\n tabsLabel: 'Views',\n multiComboBoxAdded: '{label} added. {count} selected.',\n multiComboBoxRemoved: '{label} removed. {count} selected.',\n};\n\nexport const esMessages: PireMessages = {\n filterBarLabel: 'Filtros',\n filterBarGo: 'Buscar',\n filterBarClearAll: 'Limpiar todo',\n\n dataTableSelectAll: 'Seleccionar todas las filas',\n dataTableSelectRow: 'Seleccionar fila',\n dataTableSelectionColumn: 'Selección',\n dataTableLoading: 'Cargando registros',\n dataTableSummaryRow: 'Resumen',\n dataTableEmpty: 'Ningún registro coincide con los filtros actuales.',\n\n dialogClose: 'Cerrar',\n sidePanelClose: 'Cerrar panel',\n\n inlineMessageDismiss: 'Descartar mensaje',\n toastDismiss: 'Descartar',\n toastRegionLabel: 'Notificaciones',\n\n selectPlaceholder: 'Seleccionar…',\n\n selectEmpty: 'Sin opciones disponibles',\n\n comboBoxShowSuggestions: 'Mostrar sugerencias',\n comboBoxLoading: 'Buscando…',\n\n datePickerOpenCalendar: 'Abrir calendario',\n datePickerPreviousMonth: 'Mes anterior',\n datePickerNextMonth: 'Mes siguiente',\n dateRangePresetsLabel: 'Atajos de rango de fechas',\n\n numberFieldIncrease: 'Aumentar',\n numberFieldDecrease: 'Disminuir',\n\n inputClear: 'Limpiar',\n\n fieldHelp: 'Más información',\n fieldHelpNamed: 'Más información sobre {label}',\n\n valueHelpFieldPlaceholder: 'Sin seleccionar',\n valueHelpFieldClear: 'Limpiar selección',\n valueHelpFieldOpenNamed: 'Seleccionar {label}',\n valueHelpFieldOpen: 'Abrir ayuda de valores',\n valueHelpDialogSearch: 'Buscar registros',\n valueHelpDialogTitle: 'Seleccionar un registro',\n valueHelpDialogSearchPlaceholder: 'Buscar por código o nombre',\n valueHelpDialogEmpty: 'No se encontraron registros',\n valueHelpDialogCancel: 'Cancelar',\n\n paginationLabel: 'Paginación',\n paginationRange: '{from}–{to} de {total}',\n paginationPageOf: 'Página {page} de {pages}',\n paginationPrevious: 'Página anterior',\n paginationNext: 'Página siguiente',\n paginationRowsPerPage: 'Filas por página',\n paginationPageSize: '{count} filas',\n\n sideNavLabel: 'Navegación principal',\n shellRailLabel: 'Aplicaciones',\n appLauncherLabel: 'Todas las aplicaciones',\n appLauncherTitle: 'Todas las aplicaciones',\n appLauncherSearch: 'Buscá una aplicación',\n appLauncherEmpty: 'Ninguna aplicación coincide con esa búsqueda.',\n appLauncherLoading: 'Cargando aplicaciones…',\n splitPaneList: 'Lista',\n splitPaneDetail: 'Detalle',\n splitPaneBack: 'Volver a la lista',\n\n fileUploadChoose: 'Elegir archivos',\n fileUploadRemoveNamed: 'Quitar {name}',\n fileUploadUploading: 'Subiendo',\n fileDropZonePrompt: 'Arrastrá archivos acá, o elegilos',\n\n shellBarUserMenu: 'Menú de cuenta de {user}',\n shellBarMenu: 'Abrir navegación',\n shellBarSearch: 'Buscar',\n\n commandPaletteLabel: 'Paleta de comandos',\n commandPaletteSearchLabel: 'Buscar comandos y registros',\n commandPalettePlaceholder: 'Buscá una pantalla, una acción o un registro…',\n commandPaletteEmpty: 'No hay coincidencias',\n commandPaletteLoading: 'Buscando…',\n commandPaletteHintNavigate: 'navegar',\n commandPaletteHintSelect: 'abrir',\n commandPaletteHintClose: 'cerrar',\n\n chartCategoryHeader: 'Categoría',\n chartNoValue: 'Sin datos',\n chartEmpty: 'Sin datos para este período',\n\n numPadClear: 'Limpiar',\n numPadBackspace: 'Borrar último dígito',\n numPadDecimal: 'Separador decimal',\n\n viewSwitcherName: 'Vistas guardadas: {view}',\n viewSwitcherNameModified: 'Vistas guardadas: {view}, modificada',\n viewSwitcherModifiedMark: '· modificada',\n quantityStepperIncrease: 'Aumentar cantidad',\n quantityStepperDecrease: 'Disminuir cantidad',\n confirmDialogFactsLabel: 'Resumen',\n confirmDialogConfirm: 'Confirmar',\n confirmDialogCancel: 'Cancelar',\n confirmDialogBusy: 'Procesando…',\n valueHelpSelectAllCount: 'Seleccionar todo ({count})',\n valueHelpClearSelection: 'Limpiar selección',\n valueHelpSelectedCount: 'Seleccionadas: {count}',\n valueHelpConfirm: 'Aplicar selección',\n tagRemoveNamed: 'Quitar {name}',\n tagRemove: 'Quitar',\n\n ribbonLabel: 'Comandos',\n ribbonCollapse: 'Contraer la cinta',\n ribbonExpand: 'Expandir la cinta',\n\n comingSoon: 'Pronto',\n\n selectionBarCountOne: '{count} {noun} seleccionado',\n selectionBarCountOther: '{count} {noun} seleccionados',\n selectionBarCountOneFeminine: '{count} {noun} seleccionada',\n selectionBarCountOtherFeminine: '{count} {noun} seleccionadas',\n selectionBarNounOne: 'registro',\n selectionBarNounOther: 'registros',\n selectionBarClear: 'Quitar selección',\n\n breadcrumbMore: 'Mostrar la ruta completa',\n breadcrumbLabel: 'Ruta de navegación',\n\n tabsLabel: 'Vistas',\n multiComboBoxAdded: 'Se agregó {label}. Seleccionados: {count}.',\n multiComboBoxRemoved: 'Se quitó {label}. Seleccionados: {count}.',\n};\n","import { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/**\n * The \"Soon\" mark `Button` and `Ribbon.Command` draw after their label while `isComingSoon`.\n *\n * Private: the mark means nothing on its own, only beside the label of a control that is focusable\n * and inert. It is drawn, never announced — the announcement is the control's name, which\n * `comingSoonProps` builds whenever the label is plain text. `announce` is the fallback for a label\n * that is not (an element, a formatted fragment): a hidden \", Soon\" read as part of the content.\n * Second best, because the hidden span is absolutely positioned and name computation pads a\n * non-inline box with spaces — \"Registrar cobro , Pronto\".\n */\nexport function ComingSoonMark({ announce }: { announce: boolean }) {\n const msg = usePireMessages();\n return (\n <>\n {announce ? <span className=\"pire-sr-only\">, {msg.comingSoon}</span> : null}\n <span className=\"pire-soon-mark\" aria-hidden=\"true\">\n {msg.comingSoon}\n </span>\n </>\n );\n}\n\n/**\n * What `isComingSoon` does to a React Aria button's props, shared so `Button` and `Ribbon.Command`\n * cannot drift apart.\n *\n * Not `isDisabled`: that takes the control out of the tab order, and the mark is the message — a\n * screen-reader user who can never reach the control never hears it, and a `Tooltip` has nothing to\n * attach to. `aria-disabled` keeps it reachable while saying it does nothing. Every press handler\n * is dropped rather than wrapped, and `type` is forced to `button`, because a submit button that is\n * only *aria*-disabled still submits its form.\n *\n * `label` is the control's name as plain text — an explicit `aria-label`, or the children when they\n * are a string — and comes back as `\"<label>, <Soon>\"`. Pass `undefined` when there is no such text,\n * and render `ComingSoonMark` with `announce` instead.\n */\nexport function comingSoonProps(label: string | undefined, comingSoon: string) {\n return {\n 'aria-disabled': true as const,\n 'data-coming-soon': 'true',\n type: 'button' as const,\n onPress: undefined,\n onPressStart: undefined,\n onPressEnd: undefined,\n onPressUp: undefined,\n onPressChange: undefined,\n onClick: undefined,\n ...(label != null ? { 'aria-label': `${label}, ${comingSoon}` } : {}),\n };\n}\n","/** Joins truthy class names. Kept local so the package has no runtime class-name dependency. */\nexport function cx(...parts: Array<string | false | null | undefined>) {\n return parts.filter(Boolean).join(' ');\n}\n","import * as React from 'react';\nimport { Button as AriaButton, type ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { cx } from '../utils/cx';\n\nexport interface IconButtonProps extends Omit<AriaButtonProps, 'className' | 'children' | 'aria-label'> {\n icon: string;\n /** Required accessible name — also the tooltip text. */\n label: string;\n size?: 'sm' | 'md' | 'lg';\n /** inverse = on the dark shell bar. outlined = standalone beside fields. */\n variant?: 'tertiary' | 'outlined' | 'inverse';\n selected?: boolean;\n /** Suppress the tooltip when the control already sits inside one. */\n hideTooltip?: boolean;\n /**\n * Indicator over the icon. `0` and `undefined` draw nothing — a badge reading \"0\" is noise.\n *\n * Drawn `aria-hidden`, so **`label` must carry the number itself** (\"Notifications, 3 unread\").\n * Pire cannot compose that sentence: it does not know the noun, and word order differs by\n * language. Passing `count` without putting it in `label` hides the count from screen readers.\n */\n count?: number;\n /** Cap before rendering \"N+\". Default 9. */\n countMax?: number;\n /** `dot` when \"something is new\" is the whole message and the number adds nothing. */\n countVariant?: 'number' | 'dot';\n className?: string;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n icon,\n label,\n size = 'md',\n variant = 'tertiary',\n selected,\n hideTooltip,\n count,\n countMax = 9,\n countVariant = 'number',\n className,\n ...rest\n },\n ref,\n) {\n const showsCount = count != null && count > 0;\n const button = (\n <AriaButton\n ref={ref}\n aria-label={label}\n aria-pressed={selected}\n className={cx('pire-iconbtn', className)}\n data-size={size}\n data-variant={variant}\n data-selected={selected ? 'true' : undefined}\n data-has-count={showsCount ? 'true' : undefined}\n {...rest}\n >\n <Icon name={icon} size={size === 'lg' ? 20 : 16} />\n {showsCount ? (\n <span className=\"pire-iconbtn-count\" data-variant={countVariant} aria-hidden=\"true\">\n {countVariant === 'number' ? (count > countMax ? `${countMax}+` : count) : null}\n </span>\n ) : null}\n </AriaButton>\n );\n return hideTooltip ? button : <Tooltip label={label}>{button}</Tooltip>;\n});\n","import * as React from 'react';\nimport { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow, Focusable } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface TooltipProps {\n /** Short clarifying text — never the only source of an instruction. */\n label: React.ReactNode;\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Hover delay in ms. Keyboard focus always shows it immediately. */\n delay?: number;\n /**\n * Anything — a Button, a Badge, a span, plain text.\n *\n * A child that cannot take focus on its own is made focusable for you. That is the point: a\n * tooltip on something unreachable by keyboard is invisible to anyone not using a mouse, and it\n * fails silently — a dead tooltip is indistinguishable from a live one until somebody hovers it.\n *\n * **A `isDisabled` child must be button-shaped.** A disabled control cannot hold focus, so it is\n * wrapped in a focusable `<span role=\"button\" aria-disabled=\"true\">` — the only role React\n * Aria's `Focusable` accepts here that also describes a disabled control the way the control\n * already describes itself (`group` is not in its allow-list; a real `<button>` would nest\n * inside the `IconButton` this most often wraps). `role=\"button\"` is children-presentational, so\n * wrapping a *disabled field* — `<Tooltip label=\"Locked until released\"><Input isDisabled /></Tooltip>`\n * — announces \"button\" and suppresses the textbox semantics inside it. Explain a locked field\n * through its own `description` instead, and keep this for buttons, icon buttons and the\n * button-shaped controls beside them.\n *\n * This is documented rather than warned about: the only runtime signal is the child's rendered\n * role, and sniffing that is both a heuristic and a thing that would fire on every correct call\n * site here — a warning nobody can act on is a warning everybody learns to ignore.\n *\n * Weigh the tab stop, too. On an `IconButton` the tooltip label *is* the button's accessible\n * name, so a disabled one gains a focus stop that tells a screen-reader user nothing it had not\n * already read. A toolbar of eight disabled icon buttons is eight of them.\n */\n children: React.ReactNode;\n}\n\n/**\n * Explains something without adding a step. Shows on hover after `delay`, and immediately on\n * keyboard focus.\n *\n * Never put an instruction here that is not available elsewhere: there is no hover on touch.\n */\nexport function Tooltip({ label, placement = 'top', delay = 500, children }: TooltipProps) {\n /**\n * `Focusable` clones its child rather than wrapping it in a node, so an already-focusable child\n * keeps exactly one tab stop while a non-focusable one simply gains `tabindex=\"0\"`. That is what\n * makes this unconditional — no prop asking the caller whether their child takes focus, and no\n * guessing at render time.\n *\n * The class rides along so the focus ring can live in components.css. React Aria sets only\n * `tabindex` here, no `data-focus-visible`, so the ring would otherwise come from base.css's\n * `[tabindex]:focus-visible` — and base.css is the layer a consumer migrating off Tailwind skips.\n */\n const props = React.isValidElement<{ className?: string; isDisabled?: boolean; disabled?: boolean }>(\n children,\n )\n ? children.props\n : undefined;\n // A disabled control is not focusable, and `Focusable` clones rather than wraps, so it would have\n // nothing to attach to. Wrapping in a focusable span keeps the explanation reachable; the extra\n // tab stop is deliberate — do not \"optimise\" this branch away.\n const isDisabledChild = props?.isDisabled === true || props?.disabled === true;\n const target =\n React.isValidElement<{ className?: string }>(children) && !isDisabledChild ? (\n React.cloneElement(children, { className: cx(children.props.className, 'pire-tooltip-target') })\n ) : isDisabledChild ? (\n // `role=\"button\"` + `aria-disabled` for the reasons in the JSDoc above. No static tabIndex: it\n // would beat the one Focusable merges in. Not a `<button>`: the child often is one.\n // biome-ignore lint/a11y/useFocusableInteractive: tabIndex is added by Focusable's clone, not statically — see above.\n // biome-ignore lint/a11y/useSemanticElements: a real <button> would nest inside the disabled child, which is often one itself — see above.\n <span className=\"pire-tooltip-target\" role=\"button\" aria-disabled=\"true\">\n {children}\n </span>\n ) : (\n <span className=\"pire-tooltip-target\">{children}</span>\n );\n\n return (\n <TooltipTrigger delay={delay} closeDelay={0}>\n <Focusable>{target}</Focusable>\n <AriaTooltip className=\"pire-tooltip\" placement={placement} offset={6}>\n <OverlayArrow>\n <span />\n </OverlayArrow>\n {label}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","import * as React from 'react';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\n\nexport type BadgeStatus = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';\n\nconst STATUS_ICON: Record<BadgeStatus, string> = {\n positive: 'check-circle-2',\n critical: 'alert-triangle',\n negative: 'x-circle',\n informative: 'info',\n neutral: 'circle',\n};\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Semantic value state. Colour is never the only signal — the icon carries the same meaning. */\n status?: BadgeStatus;\n showIcon?: boolean;\n}\n\n/**\n * Value state on an object or row. Text is the label, never a bare colour dot.\n *\n * Takes a ref, which is what lets it be a `Tooltip` target: React Aria's `Focusable` clones its\n * child and hands it one, and a component that cannot accept a ref leaves the tooltip **silently**\n * dead — no error, and a screenshot identical to a working one.\n * `forwardRef` is required: React 18 strips `ref` from props, while React 19 would pass it\n * through `...rest` and hide the missing forward.\n */\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { children, status = 'neutral', showIcon = true, className, ...rest },\n ref,\n) {\n return (\n <span ref={ref} className={cx('pire-badge', className)} data-status={status} {...rest}>\n {showIcon ? <Icon name={STATUS_ICON[status]} size={12} /> : null}\n {children}\n </span>\n );\n});\n","import * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Provide to render the remove affordance — filter tokens, multi-select values. */\n onRemove?: () => void;\n isDisabled?: boolean;\n /**\n * Marks the tag as one of a set of **categories** — kinds of a thing, where none is good or bad.\n * Use it for payment kinds, document types, cost-centre groups.\n *\n * This is what `Badge` is not for. `Badge`'s five values are *states*: painting a category\n * \"negative\" says something went wrong when nothing did.\n *\n * The number is a slot in the shared `--viz` ramp, not a colour. Assign in order and do not\n * cycle past 6 — colour-blind separation is measured between adjacent slots, and a seventh\n * category implies a distinction the eye cannot recover. Fold the tail into one \"Other\".\n *\n * The colour rides on a swatch, never on the text: the label stays in normal ink so it keeps\n * its contrast, and the category is never carried by colour alone.\n */\n category?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\n/**\n * A removable token: applied filters, multi-select values.\n *\n * Takes a ref so it can be a `Tooltip` target — a truncated category label is a common reason to\n * want one.\n */\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(function Tag(\n { children, onRemove, isDisabled, category, className, ...rest },\n ref,\n) {\n const msg = usePireMessages();\n return (\n <span\n ref={ref}\n className={cx('pire-tag', className)}\n data-disabled={isDisabled ? 'true' : undefined}\n {...rest}\n >\n {/* Hidden from assistive tech on purpose: the label already says which category this is, so\n announcing the swatch would repeat it without adding anything. */}\n {category ? <span className=\"pire-tag-swatch\" data-category={category} aria-hidden=\"true\" /> : null}\n {children}\n {onRemove ? (\n <AriaButton\n className=\"pire-tag-remove\"\n isDisabled={isDisabled}\n onPress={onRemove}\n aria-label={\n typeof children === 'string' ? msg.tagRemoveNamed.replace('{name}', children) : msg.tagRemove\n }\n >\n <Icon name=\"x\" size={12} />\n </AriaButton>\n ) : null}\n </span>\n );\n});\n","import type * as React from 'react';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\n\nexport interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n icon?: string;\n /** Header-right actions — usually IconButtons. */\n actions?: React.ReactNode;\n /** Right-aligned footer actions, separated by a hairline. */\n footer?: React.ReactNode;\n /** Raises the shadow on hover and sets a pointer cursor. Pair with onClick and a heading link. */\n interactive?: boolean;\n}\n\nexport function Card({\n title,\n subtitle,\n icon,\n actions,\n footer,\n interactive,\n children,\n className,\n ...rest\n}: CardProps) {\n return (\n <section\n className={cx('pire-card', className)}\n data-interactive={interactive ? 'true' : undefined}\n {...rest}\n >\n {title || actions ? (\n <header className=\"pire-card-head\">\n {icon ? <Icon name={icon} size={20} className=\"pire-card-icon\" /> : null}\n <div className=\"pire-card-heading\">\n <h3 className=\"pire-card-title\">{title}</h3>\n {subtitle ? <p className=\"pire-card-sub\">{subtitle}</p> : null}\n </div>\n {actions ? <div className=\"pire-card-actions\">{actions}</div> : null}\n </header>\n ) : null}\n {children ? <div className=\"pire-card-body\">{children}</div> : null}\n {footer ? <footer className=\"pire-card-foot\">{footer}</footer> : null}\n </section>\n );\n}\n","import * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Full name — initials are derived from the first two words. */\n name: string;\n size?: 'sm' | 'md' | 'lg';\n /** Optional photo. Falls back to initials if it fails to load. */\n src?: string;\n}\n\nconst initials = (name: string) =>\n name\n .trim()\n .split(/\\s+/)\n .slice(0, 2)\n .map((p) => p[0])\n .join('')\n .toUpperCase();\n\n/** Identity chip for the shell bar, approval lists and history rows. Never the only way a person\n * is named — always sits beside or is labelled with the full name. */\nexport function Avatar({ name, size = 'md', src, className, ...rest }: AvatarProps) {\n const [failed, setFailed] = React.useState(false);\n return (\n <span className={cx('pire-avatar', className)} data-size={size} role=\"img\" aria-label={name} {...rest}>\n {src && !failed ? (\n <img src={src} alt=\"\" className=\"pire-avatar-img\" onError={() => setFailed(true)} />\n ) : (\n initials(name)\n )}\n </span>\n );\n}\n","import * as React from 'react';\nimport { ToggleButtonGroup, ToggleButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface SegmentOption {\n id: string;\n label: string;\n icon?: string;\n isDisabled?: boolean;\n}\n\nexport interface SegmentedControlProps {\n /** Names the choice for assistive tech, e.g. \"Row density\". */\n 'aria-label': string;\n options: SegmentOption[];\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Show icons only; labels move into the accessible name and the tooltip. */\n iconOnly?: boolean;\n size?: 'sm' | 'md';\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Two to four mutually exclusive view options that change how data is displayed, not what it is:\n * row density, list vs chart, period. For filtering, use Select or Tabs. */\nexport function SegmentedControl({\n options,\n value,\n defaultValue,\n onChange,\n iconOnly,\n size = 'sm',\n className,\n style,\n 'aria-label': ariaLabel,\n}: SegmentedControlProps) {\n const selected = React.useMemo(\n () => new Set(value ? [value] : defaultValue ? [defaultValue] : []),\n [value, defaultValue],\n );\n return (\n <ToggleButtonGroup\n className={cx('pire-segmented', className)}\n data-size={size}\n style={style}\n aria-label={ariaLabel}\n selectionMode=\"single\"\n disallowEmptySelection\n selectedKeys={selected}\n onSelectionChange={(keys) => {\n const first = [...keys][0];\n if (first != null) onChange?.(String(first));\n }}\n >\n {options.map((option) => (\n <ToggleButton\n key={option.id}\n id={option.id}\n className=\"pire-segmented-item\"\n isDisabled={option.isDisabled}\n aria-label={iconOnly ? option.label : undefined}\n >\n {option.icon ? <Icon name={option.icon} size={16} /> : null}\n {iconOnly ? null : option.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n","import * as React from 'react';\nimport { cx } from '../utils/cx';\n\n/** Colour hierarchy, named after the `--text-*` token each value resolves to. */\nexport type TextColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'inverse';\n\n/** Typographic scale, named after the `--type-*` tokens. */\nexport type TextSize = 'body' | 'body-lg' | 'caption' | 'micro';\n\n/**\n * `truncate` as `Text` and `Heading` take it: `true` clamps to one line, a number to that many. The\n * line count travels as `--pire-text-clamp`, so the stylesheet owns the clamping itself.\n */\nexport function truncateStyle(\n truncate: boolean | number | undefined,\n style: React.CSSProperties | undefined,\n): { isTruncated: boolean; clampStyle: React.CSSProperties | undefined } {\n const lines = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n if (lines == null) return { isTruncated: false, clampStyle: style };\n return { isTruncated: true, clampStyle: { ['--pire-text-clamp' as string]: lines, ...style } };\n}\n\nexport interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {\n /** Typographic scale. `body` covers most copy. */\n size?: TextSize;\n /** `secondary` for supporting copy, `tertiary` for metadata. */\n color?: TextColor;\n /** Raises weight without changing size. Same effect as wrapping in `<Strong>`. */\n weight?: 'regular' | 'strong';\n /** Tabular mono, right-aligned. Use for every amount, quantity and ID. */\n numeric?: boolean;\n /** Uppercase label for a block. Replaces the `.pire-eyebrow` helper. */\n eyebrow?: boolean;\n /** `true` clamps to one line; a number clamps to that many. */\n truncate?: boolean | number;\n /** `span` when inline, `div` when wrapping, `dd`/`li` inside lists. */\n elementType?: 'p' | 'span' | 'div' | 'dd' | 'li';\n className?: string;\n}\n\n/**\n * Body copy, captions, metadata and eyebrows — everything that is text but not a heading.\n *\n * Takes a ref so it can be a `Tooltip` target, and so a clamped line can be measured to decide\n * whether a tooltip is warranted at all.\n */\nexport const Text = React.forwardRef<HTMLElement, TextProps>(function Text(\n {\n size = 'body',\n color = 'primary',\n weight = 'regular',\n numeric,\n eyebrow,\n truncate,\n elementType: Wrapper = 'p',\n className,\n style,\n ...rest\n },\n ref,\n) {\n const { isTruncated, clampStyle } = truncateStyle(truncate, style);\n\n return (\n <Wrapper\n ref={ref as React.Ref<never>}\n className={cx('pire-text', className)}\n data-size={size}\n data-color={color}\n data-weight={weight === 'strong' ? 'strong' : undefined}\n data-numeric={numeric ? 'true' : undefined}\n data-eyebrow={eyebrow ? 'true' : undefined}\n data-truncate={isTruncated ? 'true' : undefined}\n style={clampStyle}\n {...rest}\n />\n );\n});\n\nexport interface StrongProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {\n className?: string;\n}\n\n/** Inline emphasis. Sugar over `<Text weight=\"strong\" elementType=\"span\">`. */\nexport const Strong = React.forwardRef<HTMLElement, StrongProps>(function Strong(\n { className, ...rest },\n ref,\n) {\n return <Text ref={ref} elementType=\"span\" weight=\"strong\" className={className} {...rest} />;\n});\n","import type * as React from 'react';\nimport { Heading as AriaHeading } from 'react-aria-components';\nimport { cx } from '../utils/cx';\nimport { truncateStyle, type TextColor } from './Text';\n\nexport interface HeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'color'> {\n /** Semantic level. Picks the h1–h4 element and defines the document outline. */\n level?: 1 | 2 | 3 | 4;\n /** Visual scale, independent of `level`. Set it when a correct outline needs a different size. */\n size?: 'display' | 'h1' | 'h2' | 'h3' | 'h4';\n /** `secondary` for a supporting title. Same vocabulary as `Text`. */\n color?: TextColor;\n /** `true` clamps to one line; a number clamps to that many. */\n truncate?: boolean | number;\n className?: string;\n}\n\n/** Section and page titles. Built on React Aria's `Heading` so a `Dialog` picks it up as its name. */\nexport function Heading({\n level = 2,\n size,\n color = 'primary',\n truncate,\n className,\n style,\n ...rest\n}: HeadingProps) {\n const { isTruncated, clampStyle } = truncateStyle(truncate, style);\n\n return (\n <AriaHeading\n level={level}\n className={cx('pire-heading', className)}\n data-size={size ?? `h${level}`}\n data-color={color}\n data-truncate={isTruncated ? 'true' : undefined}\n style={clampStyle}\n {...rest}\n />\n );\n}\n","import type * as React from 'react';\nimport { Link as AriaLink, type LinkProps as AriaLinkProps } from 'react-aria-components';\nimport { Icon } from './Icon';\nimport { cx } from '../utils/cx';\nimport type { TextSize } from './Text';\n\nexport interface LinkProps extends Omit<AriaLinkProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** Inherits the surrounding size by default. Set it when the link stands alone. */\n size?: TextSize;\n /** Adds the launch glyph and `rel=\"noopener noreferrer\"`. Does not set `target`. */\n isExternal?: boolean;\n className?: string;\n}\n\n/** A real anchor with the system's link styling. Honours a `RouterProvider` when the app supplies one. */\nexport function Link({ children, size, isExternal, className, rel, ...rest }: LinkProps) {\n return (\n <AriaLink\n className={cx('pire-link', className)}\n data-size={size}\n data-external={isExternal ? 'true' : undefined}\n rel={isExternal ? (rel ?? 'noopener noreferrer') : rel}\n {...rest}\n >\n {children}\n {isExternal ? <Icon name=\"external-link\" size={12} className=\"pire-link-external\" /> : null}\n </AriaLink>\n );\n}\n","import { Separator as AriaSeparator, type SeparatorProps as AriaSeparatorProps } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface SeparatorProps extends Omit<AriaSeparatorProps, 'className'> {\n /** `vertical` to divide actions inside a toolbar. */\n orientation?: 'horizontal' | 'vertical';\n /** `subtle` divides inside a card without chopping it up. */\n emphasis?: 'default' | 'subtle';\n /** `none` when the container already provides the rhythm. */\n spacing?: 'none' | 'sm' | 'md';\n className?: string;\n}\n\n/** A page-level divider. For rules inside a menu use `MenuSeparator`, which follows the menu's rhythm. */\nexport function Separator({\n orientation = 'horizontal',\n emphasis = 'default',\n spacing = 'md',\n className,\n ...rest\n}: SeparatorProps) {\n return (\n <AriaSeparator\n orientation={orientation}\n className={cx('pire-separator', className)}\n data-orientation={orientation}\n data-emphasis={emphasis}\n data-spacing={spacing}\n {...rest}\n />\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface KbdProps extends React.HTMLAttributes<HTMLElement> {\n /** One key per element — compose several for a chord: `<Kbd>⌘</Kbd><Kbd>K</Kbd>`. */\n children: React.ReactNode;\n /** `sm` for inline use inside running text, where a full-size cap sits taller than the line. */\n size?: 'sm' | 'md';\n}\n\n/**\n * A single key, drawn as a key cap.\n *\n * Renders a real `<kbd>`, so assistive tech announces it as keyboard input rather than as loose\n * text. It is painted only — nothing here binds a shortcut; that stays with the app.\n *\n * One key per element. A chord is several of these side by side, which keeps each cap the size of\n * its own glyph instead of stretching one cap across \"Ctrl+Shift+K\".\n */\nexport function Kbd({ children, size = 'md', className, ...rest }: KbdProps) {\n return (\n <kbd className={cx('pire-kbd', className)} data-size={size} {...rest}>\n {children}\n </kbd>\n );\n}\n","import type * as React from 'react';\nimport { ButtonContext } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/** The `help` prop, documented once for every field that draws its own label. */\nexport interface WithFieldHelp {\n /**\n * Contextual explanation, shown as a help icon beside the label and announced as part of the\n * field's description. For the sentence a user needs *occasionally* — `description` is for the\n * one they need every time, and it costs a line of vertical space in every row.\n *\n * Needs a visible `label`: the icon is drawn beside one, so on a field named only by\n * `aria-label` the text still reaches a screen reader through the description but no icon\n * appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.\n */\n help?: React.ReactNode;\n}\n\nexport interface FieldHelpProps {\n /** The explanation. Shown on hover and immediately on keyboard focus. Never put an instruction\n * here that is unavailable elsewhere — there is no hover on touch. */\n children: React.ReactNode;\n /** Overrides the dictionary's `fieldHelp`. This names the *icon* (\"More information\"), not the\n * explanation — say what is being explained when a form has several. */\n label?: string;\n /** Which side the explanation opens on. Change it when the default would put the bubble off\n * screen or over the thing being explained — a field at the top of a dialog, or the last row\n * of a table where `top` covers the row above. */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n}\n\n/**\n * The help icon beside a field label: an explanation reachable by pointer and by keyboard, with\n * the markup a consumer would otherwise hand-write. Fields take a `help` prop that renders this\n * for you; reach for the component directly beside a `FormField` or a bare control.\n */\nexport function FieldHelp({ children, label, placement = 'top' }: FieldHelpProps) {\n const msg = usePireMessages();\n return (\n // React Aria hands every descendant Button the nearest slotted ButtonContext. Inside a\n // NumberField that context has only `increment` and `decrement`, and an unslotted Button\n // throws `A slot prop is required`; inside DatePicker, DateRangePicker and ComboBox the same\n // Button is silently adopted as the field's *trigger*, which is worse than a crash because it\n // renders. `value={null}` is React Aria's own idiom for lifting a subtree back out of a\n // slotted context — the same one `MultiComboBox` and `FieldLabel` use — and is what makes\n // this component safe anywhere.\n <ButtonContext.Provider value={null}>\n <Tooltip label={children} placement={placement}>\n {/* hideTooltip because IconButton builds its own tooltip from `label`, and `label` here is\n the icon's name, not the explanation. The explanation is the Tooltip above. */}\n <IconButton icon=\"help-circle\" label={label ?? msg.fieldHelp} size=\"sm\" hideTooltip />\n </Tooltip>\n </ButtonContext.Provider>\n );\n}\n\n/**\n * `FieldHelp` named after the field it explains — \"More information about delivery date\" — wherever\n * the label is a string. `help` is the path every real use takes, and unnamed, a form with six\n * helped fields has six buttons all called \"More information\". A ReactNode label cannot be\n * flattened into a sentence, so those keep the plain name. Used by `FieldLabel` and `FormField`.\n */\nexport function NamedFieldHelp({ label, children }: { label: React.ReactNode; children: React.ReactNode }) {\n const msg = usePireMessages();\n return (\n <FieldHelp\n label={\n typeof label === 'string' ? msg.fieldHelpNamed.replace('{label}', label.toLowerCase()) : undefined\n }\n >\n {children}\n </FieldHelp>\n );\n}\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\nimport { NamedFieldHelp } from './FieldHelp';\n\nexport interface FormFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n label: React.ReactNode;\n /** id of the control this label points at. Required when wrapping a bare control. */\n htmlFor?: string;\n isRequired?: boolean;\n /** Static help text. Hidden while an error is shown. */\n hint?: React.ReactNode;\n /** Error message; rendered in an alert row with an icon. */\n error?: React.ReactNode;\n /** horizontal = right-aligned 160px label column, the ERP detail-form default. */\n layout?: 'stacked' | 'horizontal';\n /**\n * Contextual explanation, shown as a help icon beside the label.\n *\n * Unlike the fields that render their own control, `FormField` cannot add this to the control's\n * `aria-describedby` — it does not own that control. The explanation reaches a screen reader\n * through the trigger's own tooltip instead. When the text must be announced with the field,\n * pass it as `hint`, or use the control's own `help` prop.\n */\n help?: React.ReactNode;\n children?: React.ReactNode;\n}\n\n/** Label + control + hint/error wrapper for controls that do not manage their own label\n * (most Pire controls do — use their `label` prop first). */\nexport function FormField({\n label,\n htmlFor,\n isRequired,\n hint,\n error,\n layout = 'stacked',\n help,\n children,\n className,\n ...rest\n}: FormFieldProps) {\n const labelEl = (\n <label className=\"pire-field-label\" htmlFor={htmlFor}>\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </label>\n );\n return (\n <div className={cx('pire-field', className)} data-layout={layout} {...rest}>\n {help ? (\n <div className=\"pire-field-labelrow\">\n {labelEl}\n <NamedFieldHelp label={label}>{help}</NamedFieldHelp>\n </div>\n ) : (\n labelEl\n )}\n {children}\n {error ? (\n <span className=\"pire-field-error\" role=\"alert\">\n <Icon name=\"alert-circle\" size={12} />\n {error}\n </span>\n ) : hint ? (\n <span className=\"pire-field-hint\">{hint}</span>\n ) : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport { TextField, Input as AriaInput, Group, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { FieldClearButton } from './FieldClearButton';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport interface InputProps extends WithFieldHelp {\n label?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n /** Receives the raw string value. */\n onChange?: (value: string) => void;\n placeholder?: string;\n /**\n * `date` is accepted for compatibility but reaches for the browser's native picker, which\n * ignores the token palette and behaves differently per browser. Use `DatePicker`, or\n * `DateRangePicker` for two ends.\n */\n type?: 'text' | 'search' | 'email' | 'number' | 'date' | 'password' | 'tel' | 'url';\n /** Leading icon slug — \"search\", \"calendar\", \"hash\". */\n icon?: string;\n /** Trailing static text: unit, currency, \"of 40\". */\n suffix?: React.ReactNode;\n /**\n * Adds a clear affordance once the field has a value.\n *\n * Use it on every search field. `type=\"search\"` gets one from the browser for free, but only in\n * Chrome and Safari, and it cannot be styled or sized — Pire hides that one so a search box does\n * not look different per browser. This is the replacement, and it is a real button: focusable,\n * labelled, and the same shape everywhere.\n *\n * Works controlled or uncontrolled.\n */\n isClearable?: boolean;\n /**\n * The clear button's visible text. Defaults to the dictionary's `inputClear`.\n *\n * Deliberately a word rather than an icon: an \"x\" beside a dialog's own close \"x\" reads as a\n * second way to dismiss the dialog. Keep it short — it sits inside the field.\n */\n clearLabel?: string;\n /** Help text below the field. Replaced by errorMessage when invalid. */\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n /** Right-aligned tabular mono — use for every amount, quantity and ID. */\n numeric?: boolean;\n fullWidth?: boolean;\n name?: string;\n autoFocus?: boolean;\n className?: string;\n style?: React.CSSProperties;\n inputRef?: React.Ref<HTMLInputElement>;\n}\n\n/** Single-line text entry. Labels, descriptions and errors are wired to the input by React Aria,\n * so no manual aria-describedby is ever needed. */\nexport function Input({\n label,\n icon,\n suffix,\n description,\n help,\n errorMessage,\n size = 'md',\n numeric,\n isClearable,\n clearLabel,\n fullWidth = true,\n className,\n style,\n inputRef,\n onChange,\n ...rest\n}: InputProps) {\n const msg = usePireMessages();\n const isControlled = rest.value !== undefined;\n const [ownValue, setOwnValue] = React.useState(rest.defaultValue ?? '');\n const currentValue = isControlled ? rest.value : ownValue;\n const handleChange = (next: string) => {\n setOwnValue(next);\n onChange?.(next);\n };\n\n /**\n * A clearable, uncontrolled field is driven by Pire rather than by React Aria. There is no\n * imperative \"clear\" on TextField, and writing to the DOM node directly would leave React Aria's\n * own state holding the old value. Scoped to `isClearable`.\n */\n const takesOverValue = isClearable && !isControlled;\n const valueProps = takesOverValue ? { value: ownValue, defaultValue: undefined } : {};\n const showsClear = isClearable && currentValue !== '' && !rest.isDisabled && !rest.isReadOnly;\n warnHelpWithoutLabel('Input', label, help);\n\n return (\n <TextField\n className={cx('pire-field', className)}\n style={style}\n onChange={handleChange}\n validationBehavior=\"aria\"\n {...rest}\n {...valueProps}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n {icon ? <Icon name={icon} size={16} className=\"pire-leading-icon\" /> : null}\n <AriaInput ref={inputRef} className=\"pire-input\" data-numeric={numeric ? 'true' : undefined} />\n {showsClear ? (\n <FieldClearButton label={clearLabel ?? msg.inputClear} onClear={() => handleChange('')} />\n ) : null}\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import { Button as AriaButton } from 'react-aria-components';\n\n/**\n * Put focus back into the field the button belongs to. Every clear button unmounts the moment it\n * works — there is nothing left to clear — so without this the browser drops focus on `<body>`\n * and a keyboard or screen-reader user lands at the top of the document. The selector list is\n * ordered: a date field's first segment, otherwise the input.\n */\nfunction focusFieldOf(button: EventTarget | null): void {\n const control = (button as HTMLElement | null)?.closest?.('.pire-control');\n control?.querySelector<HTMLElement>('.pire-datesegment, .pire-input, input, textarea')?.focus();\n}\n\n/**\n * The clear button inside a field's `.pire-control` shell, shared by every clearable field.\n *\n * A labelled text button, not an \"x\": inside a dialog an icon-only x sits next to the dialog's own\n * close x and reads as a second dismiss. `slot={null}` always, because an unslotted button inside\n * `DatePicker`, `DateRangePicker` or `ComboBox` is adopted as that field's trigger — \"Clear\" would\n * open the popover instead of clearing.\n */\nexport function FieldClearButton({ label, onClear }: { label: string; onClear: () => void }) {\n return (\n <AriaButton\n className=\"pire-input-clear\"\n slot={null}\n onPress={(event) => {\n onClear();\n focusFieldOf(event.target);\n }}\n >\n {label}\n </AriaButton>\n );\n}\n","import type * as React from 'react';\nimport { ButtonContext, Label } from 'react-aria-components';\nimport { NamedFieldHelp } from './FieldHelp';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\nexport interface FieldLabelProps {\n label: React.ReactNode;\n isRequired?: boolean;\n /** Contextual explanation, rendered as a help icon beside the label. */\n help?: React.ReactNode;\n}\n\n/**\n * Internal, dev-only. `help` draws its icon beside the label, so a field named only by\n * `aria-label` has nowhere to put it: the explanation still reaches a screen reader through the\n * field's `description`, but the visual affordance is silently missing — the same shape of defect\n * as an icon name that resolves to a blank square. Every field calls this before deciding whether\n * to render a label row.\n *\n * A warning rather than a bare icon: an icon with no label to sit beside is an unanchored control,\n * and supplying the label is a real fix only the consumer can make.\n */\nexport function warnHelpWithoutLabel(component: string, label: React.ReactNode, help: React.ReactNode) {\n if (!IS_DEV || !help || label) return;\n warnOnce(\n `help-without-label:${component}`,\n `${component}: \\`help\\` needs a visible \\`label\\`. Its icon is drawn beside one, so a field named only by \\`aria-label\\` renders no icon at all — the text still reaches a screen reader through the field's description, but nothing on screen offers it. Pass \\`label\\`, or move the sentence to \\`description\\`.`,\n );\n}\n\n/**\n * Internal. The label row every Pire field draws, in one place.\n *\n * It resets `ButtonContext` (see `FieldHelp` for why), so any button in any field's label behaves\n * like a button — not just the help icon.\n *\n * That does not make every shape a good one. `help` renders `FieldHelp` as a **sibling** of\n * `<Label>`, which is the supported shape and the only one this component produces on its own.\n * A consumer-supplied button placed *inside* `label` — now possible instead of throwing or being\n * silently adopted — still sits inside the `<Label>` React Aria points the stepper and\n * calendar-trigger `aria-labelledby` at, so its text is absorbed into every sibling control's\n * accessible name (a `NumberField` stepper reads \"Increase Cantidad Ayuda\"). Lossy, not broken —\n * prefer `help` unless the label truly needs its own button.\n */\nexport function FieldLabel({ label, isRequired, help }: FieldLabelProps) {\n const text = (\n <Label className=\"pire-field-label\">\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </Label>\n );\n return (\n // Lifts the label out of the field's slotted ButtonContext — see `FieldHelp`.\n <ButtonContext.Provider value={null}>\n {/* The wrapper appears only on the help path. Rendering it unconditionally would make it the\n grid item under `.pire-field[data-layout=\"horizontal\"]` and silently change label\n alignment in every existing form. The trigger is a sibling of the Label, never a child:\n a focusable control inside a <label> re-targets its own clicks at the field. */}\n {help ? (\n <div className=\"pire-field-labelrow\">\n {text}\n <NamedFieldHelp label={label}>{help}</NamedFieldHelp>\n </div>\n ) : (\n text\n )}\n </ButtonContext.Provider>\n );\n}\n","import type * as React from 'react';\nimport { Text } from 'react-aria-components';\n\nexport interface FieldDescriptionProps {\n description?: React.ReactNode;\n /** Contextual explanation. Announced with the field, and shown visually by the help icon. */\n help?: React.ReactNode;\n}\n\n/**\n * Internal. The one `Text slot=\"description\"` a field renders.\n *\n * There is exactly one description slot per field — two `Text slot=\"description\"` elements would\n * collide on a single generated id — so `description` and `help` merge here rather than each\n * rendering their own node. `help` is announced with the field as well as shown on the icon,\n * because a tooltip-only explanation is reachable only by visiting a tab stop, and a dense form\n * has one of those per helped field.\n */\nexport function FieldDescription({ description, help }: FieldDescriptionProps) {\n if (!description && !help) return null;\n return (\n // The class is picked, never combined: `.pire-sr-only` is `!important` and pairing it with\n // another pire-* class can grow the document sideways (see CLAUDE.md). Choosing `pire-sr-only`\n // when there is no visible description also keeps the node out of `.pire-field`'s flex gap —\n // a `pire-field-hint` holding only hidden text still opens a visible gap under every field.\n <Text slot=\"description\" className={description ? 'pire-field-hint' : 'pire-sr-only'}>\n {description}\n {help ? <span className=\"pire-sr-only\">{help}</span> : null}\n </Text>\n );\n}\n","import * as React from 'react';\nimport { TextField, TextArea as AriaTextArea, Group, FieldError } from 'react-aria-components';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\n/* Measuring before paint is the whole point of autoGrow — useEffect would show one frame at the\n wrong height — but useLayoutEffect warns when it runs during server rendering, where there is\n nothing to measure anyway. */\nconst useIsomorphicLayoutEffect = typeof document === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nexport interface TextAreaProps extends WithFieldHelp {\n label?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n /** Receives the raw string value. */\n onChange?: (value: string) => void;\n placeholder?: string;\n /** Help text below the field. Replaced by errorMessage when invalid. */\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n /** Visible lines before scrolling. Three is the ERP default: an address or a short note. */\n rows?: number;\n /** Grow with the content instead of scrolling. Off by default — see the component note. */\n autoGrow?: boolean;\n /** Ceiling for `autoGrow`, in lines. Beyond it the field scrolls, so a pasted essay\n * cannot push the form's buttons off screen. */\n maxRows?: number;\n fullWidth?: boolean;\n name?: string;\n autoFocus?: boolean;\n className?: string;\n style?: React.CSSProperties;\n textAreaRef?: React.Ref<HTMLTextAreaElement>;\n}\n\n/** Multi-line text entry — notes, addresses, rejection reasons. The prop API is Input's, so a\n * field can be swapped between the two without relearning; labels, descriptions and errors are\n * wired up by React Aria, so no manual aria-describedby is ever needed.\n *\n * `autoGrow` is opt-in, not always-on, for two reasons. It costs a synchronous measure-and-write\n * on every keystroke, and in a dense form it makes every field below the one being typed in jump\n * — the wrong trade in a screen the user is tabbing through. Turn it on where the content length\n * is genuinely unknown (a long free-text comment) and leave it off everywhere else. When on, the\n * resize grip is removed, since a manual height would be overwritten on the next keystroke. */\nexport function TextArea({\n label,\n description,\n help,\n errorMessage,\n size = 'md',\n rows = 3,\n autoGrow,\n maxRows,\n fullWidth = true,\n className,\n style,\n textAreaRef,\n onChange,\n ...rest\n}: TextAreaProps) {\n const innerRef = React.useRef<HTMLTextAreaElement>(null);\n const ref = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof textAreaRef === 'function') textAreaRef(node);\n else if (textAreaRef) (textAreaRef as React.RefObject<HTMLTextAreaElement | null>).current = node;\n },\n [textAreaRef],\n );\n\n // Read from the DOM rather than from `rest.value`: the same measure has to run for the\n // uncontrolled case, where no value ever reaches this component.\n const grow = React.useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoGrow) return;\n const styles = getComputedStyle(el);\n const lineHeight = Number.parseFloat(styles.lineHeight) || Number.parseFloat(styles.fontSize) * 1.5;\n const chrome = el.offsetHeight - el.clientHeight; // borders, which scrollHeight excludes\n // Collapse first: scrollHeight can never report less than the current height, so without\n // this the field would only ever grow, never shrink back when text is deleted.\n el.style.height = 'auto';\n const wanted = maxRows ? Math.min(el.scrollHeight, Math.ceil(lineHeight * maxRows)) : el.scrollHeight;\n el.style.height = `${wanted + chrome}px`;\n }, [autoGrow, maxRows]);\n\n // Layout effect, not an onChange hook: it has to run for controlled values pushed in from the\n // outside (a reset, a loaded record) as well as for typing, and before paint so the field never\n // renders one frame at the wrong height. It covers typing too when controlled, so `onInput` only\n // measures for an uncontrolled field — otherwise every keystroke measured twice.\n useIsomorphicLayoutEffect(() => {\n if (!autoGrow) {\n if (innerRef.current) innerRef.current.style.height = '';\n return;\n }\n grow();\n }, [autoGrow, grow, rest.value]);\n\n warnHelpWithoutLabel('TextArea', label, help);\n\n return (\n <TextField\n className={cx('pire-field', className)}\n style={style}\n onChange={onChange}\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-multiline=\"true\"\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <AriaTextArea\n ref={ref}\n rows={rows}\n onInput={autoGrow && rest.value === undefined ? grow : undefined}\n className={cx('pire-input', 'pire-textarea')}\n data-auto-grow={autoGrow ? 'true' : undefined}\n />\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import * as React from 'react';\nimport {\n Select as AriaSelect,\n Button as AriaButton,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem,\n FieldError,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport type SelectOption = string | { value: string; label: string; isDisabled?: boolean };\n\n/** Internal id of the clear row. `onSelectionChange` maps it to `null` before `onChange`, so it\n * never reaches a form body or a server. */\nconst CLEAR_KEY = '__pire-select-clear__';\n\nexport interface SelectProps extends WithFieldHelp {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n /**\n * Emits `null` when the field returns to «nothing chosen» — reachable only with `isClearable`,\n * but typed unconditionally, the way React Aria types the `onSelectionChange` below it.\n */\n onChange?: (value: string | null) => void;\n options?: SelectOption[];\n /**\n * Shown when nothing is selected. Defaults to the dictionary's `selectPlaceholder`; with\n * `isClearable` this is also the visible label of the row that clears the field, so a custom\n * value should read naturally as both.\n */\n placeholder?: string;\n /**\n * Adds a row at the top of the list that returns the field to «nothing chosen», labelled with\n * `placeholder`.\n *\n * For an optional field this is the difference between a changeable choice and a permanent one:\n * without it the only way back from a wrong pick is to select something else, and there is no\n * \"something else\" that means *none*. A row rather than a clear button on the control — in a\n * `Select`, unlike a `ComboBox`, the user already expects everything choosable to be in the list.\n *\n * One asymmetry to know about: React Aria suppresses re-picking the key that is already\n * selected, but the clear row is a real row, so choosing it on an already-empty field does emit\n * `onChange(null)` a second time. Deliberate — the row is *visible* on an empty field, and a\n * control that looks pressable and reports nothing is the harder thing to debug. A handler that\n * writes on every call rather than on every change should compare against its own state.\n */\n isClearable?: boolean;\n /**\n * Replaces the dictionary's `selectEmpty` inside the popover when `options` is empty. Worth\n * setting whenever you can say *why* the list is empty — \"Pick a company first\" beats the\n * generic default, and an empty reference table is the usual cause.\n */\n emptyLabel?: React.ReactNode;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst norm = (o: SelectOption) => (typeof o === 'string' ? { value: o, label: o, isDisabled: false } : o);\n/** One shared empty list, so an omitted `options` does not hand the memo below a new array each render. */\nconst NO_OPTIONS: SelectOption[] = [];\n\n/** Single-choice picker. Uses a listbox popover rather than a native <select> so the option\n * rows can carry Pire typography and keyboard behaviour is identical across browsers. */\nexport function Select({\n label,\n value,\n defaultValue,\n onChange,\n options = NO_OPTIONS,\n placeholder,\n isClearable,\n description,\n help,\n errorMessage,\n emptyLabel,\n size = 'md',\n fullWidth = true,\n className,\n style,\n ...rest\n}: SelectProps) {\n const msg = usePireMessages();\n const items = React.useMemo(() => options.map(norm), [options]);\n // `??`, not `||`: a deliberate `placeholder=\"\"` must survive. The dictionary default only\n // applies when the prop is absent.\n const effectivePlaceholder = placeholder ?? msg.selectPlaceholder;\n\n /**\n * A clearable, uncontrolled Select is driven by Pire, the same trade `ComboBox` makes: React\n * Aria's own state would hold `CLEAR_KEY` and `SelectValue` would render it as the value.\n */\n const isSelectionControlled = value !== undefined;\n const [ownSelection, setOwnSelection] = React.useState<string | null>(defaultValue ?? null);\n const takesOverSelection = isClearable === true && !isSelectionControlled;\n\n /**\n * A consumer's own option already carrying the reserved id. Prepending the clear row anyway\n * would give two `ListBoxItem`s one id: React logs a duplicate-key error, and choosing the\n * *real* option reports `null` — silent wrong data on its way to a server. The consumer's option\n * wins; the clear row is what gets dropped.\n */\n const collides = items.some((item) => item.value === CLEAR_KEY);\n\n /**\n * Not shown on an empty list: the clear row would fill the collection, suppress\n * `renderEmptyState`, and turn \"no options available\" into a blank popover. There is also\n * nothing to clear from a list with no options.\n */\n const showsClear = isClearable === true && !rest.isDisabled && items.length > 0 && !collides;\n\n // Gated on the request rather than on `showsClear`, which the collision itself now switches off:\n // folding the check into `showsClear` alone would also silence the warning explaining why.\n if (IS_DEV && isClearable === true && !rest.isDisabled && collides) {\n warnOnce(\n CLEAR_KEY,\n `Select: an option's value is \"${CLEAR_KEY}\", which isClearable reserves for its \"nothing chosen\" row. The clear row has been dropped so the option keeps working — rename the option to get it back.`,\n );\n }\n\n const rows = showsClear\n ? [\n // The row's own label falls back to the dictionary even when `placeholder` is explicitly\n // `''`: an empty trigger is a deliberate, supported shape, but a listbox option with no\n // accessible name is not — it would be unreachable by name and silent to a screen reader.\n { value: CLEAR_KEY, label: effectivePlaceholder || msg.selectPlaceholder, isDisabled: false },\n ...items,\n ]\n : items;\n\n warnHelpWithoutLabel('Select', label, help);\n\n return (\n <AriaSelect\n className={cx('pire-field', className)}\n style={style}\n selectedKey={takesOverSelection ? ownSelection : value}\n defaultSelectedKey={takesOverSelection ? undefined : defaultValue}\n onSelectionChange={(k) => {\n // Map null explicitly; `String(null)` is `'null'`.\n const raw = k == null ? null : String(k);\n // Gated on `showsClear`, not on the id alone: when a consumer's own option collides with\n // the reserved key the clear row stands down, and translating that id to `null` anyway\n // would still report nothing for an option the user really chose.\n const next = showsClear && raw === CLEAR_KEY ? null : raw;\n if (takesOverSelection) setOwnSelection(next);\n onChange?.(next);\n }}\n // Without this React Aria refuses to open on an empty collection — `useSelectState.open()`\n // is guarded by `collection.size !== 0 || props.allowsEmptyCollection`. The trigger then\n // swallows the click while staying enabled and reporting aria-expanded=\"false\", so the\n // field reads as broken rather than as empty.\n allowsEmptyCollection\n placeholder={effectivePlaceholder}\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <AriaButton\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n >\n <SelectValue className=\"pire-select-value\" />\n <Icon name=\"chevron-down\" size={16} className=\"pire-leading-icon\" />\n </AriaButton>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox\n className=\"pire-listbox\"\n items={rows}\n // Same treatment ComboBox gives a server that answered with nothing, so the two\n // components read alike. Announced, because an empty listbox is otherwise silent.\n renderEmptyState={() => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {emptyLabel ?? msg.selectEmpty}\n </div>\n )}\n >\n {(item) => (\n <ListBoxItem\n className=\"pire-option\"\n id={item.value}\n textValue={item.label}\n isDisabled={item.isDisabled}\n data-clear={item.value === CLEAR_KEY ? 'true' : undefined}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n","import type * as React from 'react';\nimport { Checkbox as AriaCheckbox, type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'children'> {\n label?: React.ReactNode;\n hint?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function Checkbox({ label, hint, children, className, ...rest }: CheckboxProps) {\n return (\n <AriaCheckbox className={cx('pire-choice', className)} {...rest}>\n {({ isSelected, isIndeterminate }) => (\n <>\n <span className=\"pire-choice-box\" aria-hidden=\"true\">\n {isIndeterminate ? (\n <Icon name=\"minus\" size={12} />\n ) : isSelected ? (\n <Icon name=\"check\" size={12} />\n ) : null}\n </span>\n <span>\n {label ?? children}\n {hint ? <span className=\"pire-choice-hint\">{hint}</span> : null}\n </span>\n </>\n )}\n </AriaCheckbox>\n );\n}\n","import type * as React from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\n Label,\n Text,\n FieldError,\n type RadioGroupProps as AriaRadioGroupProps,\n type RadioProps as AriaRadioProps,\n} from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'children'> {\n label?: React.ReactNode;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/** Radios must live in a group — that is what gives arrow-key navigation and a single tab stop. */\nexport function RadioGroup({\n label,\n description,\n errorMessage,\n children,\n className,\n ...rest\n}: RadioGroupProps) {\n return (\n <AriaRadioGroup className={cx('pire-field', className)} validationBehavior=\"aria\" {...rest}>\n {label ? <Label className=\"pire-field-label\">{label}</Label> : null}\n <div className=\"pire-radiogroup\">{children}</div>\n {description ? (\n <Text slot=\"description\" className=\"pire-field-hint\">\n {description}\n </Text>\n ) : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaRadioGroup>\n );\n}\n\nexport interface RadioProps extends Omit<AriaRadioProps, 'className' | 'children'> {\n label?: React.ReactNode;\n hint?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function Radio({ label, hint, children, className, ...rest }: RadioProps) {\n return (\n <AriaRadio className={cx('pire-choice', className)} {...rest}>\n <span className=\"pire-choice-box\" data-radio=\"true\" aria-hidden=\"true\" />\n <span>\n {label ?? children}\n {hint ? <span className=\"pire-choice-hint\">{hint}</span> : null}\n </span>\n </AriaRadio>\n );\n}\n","import type * as React from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'children'> {\n label?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\n/** Immediate-effect toggle. For settings that need a save step, use a Checkbox. */\nexport function Switch({ label, children, className, ...rest }: SwitchProps) {\n return (\n <AriaSwitch className={cx('pire-choice', className)} {...rest}>\n <span className=\"pire-switch-track\" aria-hidden=\"true\">\n <span className=\"pire-switch-thumb\" />\n </span>\n <span>{label ?? children}</span>\n </AriaSwitch>\n );\n}\n","import type * as React from 'react';\nimport { RadioGroup as AriaRadioGroup, Radio as AriaRadio, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport interface ChoiceCardOption {\n id: string;\n label: React.ReactNode;\n /** One line on what choosing this means — the cost, the scope, the consequence. */\n description?: React.ReactNode;\n icon?: string;\n /** Decorative illustration under the description, e.g. the density picker's row bars.\n * Marked `aria-hidden` — put anything that carries meaning in `description` instead. */\n preview?: React.ReactNode;\n /** Use for an option the current context makes unavailable, e.g. a scope the record doesn't\n * support. Still shown, so the user knows the choice exists — just not right now. */\n isDisabled?: boolean;\n}\n\nexport interface ChoiceCardGroupProps extends WithFieldHelp {\n /** Names the choice for assistive tech, e.g. \"Count scope\". Required when `label` is omitted. */\n 'aria-label'?: string;\n /** Visible group label. Use when the choice needs a heading of its own on the page; fall back\n * to `aria-label` when the surrounding UI already names the choice (a dialog title, a step\n * heading). */\n label?: React.ReactNode;\n /** Guidance that applies to the group as a whole, below the cards — not a per-option detail,\n * which belongs in that option's `description`. */\n description?: React.ReactNode;\n /** Shown when `isRequired` and nothing has been chosen at validation time. */\n errorMessage?: React.ReactNode;\n options: ChoiceCardOption[];\n /** Controlled selection. Pair with `onChange`; omit and use `defaultValue` for an uncontrolled group. */\n value?: string;\n /** Starting selection for an uncontrolled group. */\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Grid columns. Two by default; four suits short labels (a count-scope picker), one suits a\n * description-led list with a preview underneath (a row-density picker). */\n columns?: number;\n /** Use while the choice is temporarily unavailable for every option — e.g. the record it\n * governs hasn't loaded yet — not for disabling a single option, which is `ChoiceCardOption.isDisabled`. */\n isDisabled?: boolean;\n /** Use when the form cannot be submitted without a selection, so a missing choice surfaces\n * `errorMessage` instead of failing silently downstream. */\n isRequired?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Mutually exclusive options that each need explaining — a count's scope, a row density, a\n * posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough\n * and `SegmentedControl` when the options only change how data is displayed.\n */\nexport function ChoiceCardGroup({\n label,\n description,\n help,\n errorMessage,\n options,\n value,\n defaultValue,\n onChange,\n columns = 2,\n isDisabled,\n isRequired,\n className,\n style,\n 'aria-label': ariaLabel,\n}: ChoiceCardGroupProps) {\n warnHelpWithoutLabel('ChoiceCardGroup', label, help);\n\n return (\n <AriaRadioGroup\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n aria-label={label ? undefined : ariaLabel}\n value={value}\n defaultValue={defaultValue}\n onChange={onChange}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {label ? <FieldLabel label={label} isRequired={isRequired} help={help} /> : null}\n <div className=\"pire-choicecards\" style={{ gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }}>\n {options.map((option) => (\n <AriaRadio\n key={option.id}\n value={option.id}\n className=\"pire-choicecard\"\n isDisabled={option.isDisabled}\n >\n {option.icon ? <Icon name={option.icon} size={20} /> : null}\n <span className=\"pire-choicecard-label\">{option.label}</span>\n {option.description ? <span className=\"pire-choicecard-desc\">{option.description}</span> : null}\n {option.preview ? (\n <span className=\"pire-choicecard-preview\" aria-hidden=\"true\">\n {option.preview}\n </span>\n ) : null}\n </AriaRadio>\n ))}\n </div>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaRadioGroup>\n );\n}\n","import * as React from 'react';\nimport { ComboBox as AriaComboBox, Input as AriaInput, Group, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { FieldClearButton } from './FieldClearButton';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport { ComboBoxListBox, ComboBoxTrigger, useComboBoxItems } from './ComboBoxListBox';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport interface ComboBoxOption {\n value: string;\n label: string;\n secondary?: string;\n isDisabled?: boolean;\n}\n\nexport interface ComboBoxProps extends WithFieldHelp {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n onChange?: (value: string | null) => void;\n /**\n * Free-text as typed, on every keystroke. Debounce it before calling the server.\n *\n * Without `isFilteredExternally`, React Aria also applies its own local \"contains\" filter,\n * so a result whose label does not literally contain the typed text is hidden client-side.\n */\n onInputChange?: (text: string) => void;\n /**\n * The text in the input, controlled. Pair it with `onInputChange` or typing stops working.\n *\n * Needed whenever the parent has to *impose* the text rather than read it: clearing the field\n * on a form reset or a context switch, and rehydrating an edited line whose key is known but\n * whose label is not in `options` until the search comes back. Remounting via `key` also\n * clears the field, but it drops focus.\n */\n inputValue?: string;\n options?: Array<string | ComboBoxOption>;\n /**\n * Adds a button that empties the field — both the text and the selection.\n *\n * A required field still needs this whenever the choice is *changeable*: without it the only way\n * back from a wrong pick is to select something else, so there is no way to say \"not this one\n * yet\" short of reloading the screen.\n */\n isClearable?: boolean;\n /** Overrides the dictionary's `inputClear`. Say what is being cleared when the field is one of several. */\n clearLabel?: string;\n /**\n * `options` is the final list and React Aria filters nothing locally. Required for server\n * search: fuzzy matches, synonyms, code-to-description and server ranking do not survive a\n * local \"contains\" pass.\n *\n * Turns `options` into a controlled collection, so the popover reflects exactly what you\n * pass — including an empty list, which is why `isLoading` and `emptyLabel` exist.\n */\n isFilteredExternally?: boolean;\n /**\n * Shows a loading row instead of closing the popover. Without it a 300ms debounce reads as\n * a menu that flickers open and shut.\n *\n * Also blocks selection while it is set: confirming here would commit an item from the\n * previous response.\n */\n isLoading?: boolean;\n /** Overrides the dictionary's `comboBoxLoading`. */\n loadingLabel?: string;\n /**\n * Shown when the server answered with nothing. Without it the popover closes and the user\n * cannot tell a bad query from a slow one.\n */\n emptyLabel?: React.ReactNode;\n /** Called when the list is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n placeholder?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n /** Allow committing free text that isn't in `options`, instead of reverting to the last valid selection. */\n allowsCustomValue?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Type-ahead picker for lists too long to scroll — material, cost centre, G/L account.\n * Below ~10 fixed options use Select; for master-data search with several columns use ValueHelpField. */\nexport function ComboBox({\n label,\n value,\n defaultValue,\n onChange,\n onInputChange,\n inputValue,\n options = [],\n description,\n help,\n errorMessage,\n size = 'md',\n fullWidth = true,\n isFilteredExternally,\n isLoading,\n loadingLabel,\n emptyLabel,\n isClearable,\n clearLabel,\n onLoadMore,\n className,\n style,\n ...rest\n}: ComboBoxProps) {\n const msg = usePireMessages();\n const { items, collectionProps } = useComboBoxItems(options, isFilteredExternally, isLoading);\n\n /**\n * A clearable, uncontrolled ComboBox is driven by Pire, the same trade `Input` makes: React Aria\n * has no imperative clear, and writing to the DOM node would leave its state holding the old key.\n */\n const isSelectionControlled = value !== undefined;\n const [ownSelection, setOwnSelection] = React.useState<string | null>(defaultValue ?? null);\n const takesOverSelection = isClearable === true && !isSelectionControlled;\n const currentSelection = isSelectionControlled ? value : ownSelection;\n\n /**\n * The typed text is *observed*, never controlled. Controlling it would mean owning the job React\n * Aria does on selection — writing the chosen option's label into the input — and getting that\n * wrong shows an empty box over a real selection. Clearing the key is enough: `useComboBoxState`\n * resyncs the text whenever `selectedKey` changes, so a null key empties the input for free.\n */\n const [typedText, setTypedText] = React.useState('');\n const currentText = inputValue !== undefined ? inputValue : typedText;\n\n // Only a clearable field tracks the text, so every other ComboBox keeps re-rendering exactly as\n // often as it did before — this runs on each keystroke, and the state is unread without the button.\n const handleInputChange = isClearable\n ? (text: string) => {\n setTypedText(text);\n onInputChange?.(text);\n }\n : onInputChange;\n\n const showsClear =\n isClearable && !rest.isDisabled && !rest.isReadOnly && (currentText !== '' || currentSelection != null);\n\n const clear = () => {\n setTypedText('');\n if (takesOverSelection) setOwnSelection(null);\n onChange?.(null);\n onInputChange?.('');\n };\n\n warnHelpWithoutLabel('ComboBox', label, help);\n\n return (\n <AriaComboBox\n className={cx('pire-field', className)}\n style={style}\n selectedKey={takesOverSelection ? ownSelection : value}\n defaultSelectedKey={takesOverSelection ? undefined : defaultValue}\n onSelectionChange={(k) => {\n // Ignore confirmations mid-flight: the highlighted row still belongs to the last response.\n if (isLoading) return;\n const next = k == null ? null : String(k);\n if (takesOverSelection) setOwnSelection(next);\n onChange?.(next);\n }}\n // Forwarded by name rather than left to `...rest`: it is part of Pire's contract, not an\n // accident of prop spreading, and a consumer should not have to know it reaches React Aria.\n inputValue={inputValue}\n onInputChange={handleInputChange}\n {...collectionProps}\n menuTrigger=\"input\"\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n >\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <AriaInput className=\"pire-input\" placeholder={rest.placeholder} />\n {showsClear ? <FieldClearButton label={clearLabel ?? msg.inputClear} onClear={clear} /> : null}\n <ComboBoxTrigger />\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <ComboBoxListBox\n items={items}\n isFilteredExternally={isFilteredExternally}\n isLoading={isLoading}\n loadingLabel={loadingLabel}\n emptyLabel={emptyLabel}\n onLoadMore={onLoadMore}\n />\n </AriaComboBox>\n );\n}\n","import * as React from 'react';\nimport { Button as AriaButton, Popover, ListBox, ListBoxItem } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { useLoadMoreOnScroll } from '../utils/useLoadMoreOnScroll';\nimport type { ComboBoxOption } from './ComboBox';\n\nconst norm = (o: string | ComboBoxOption): ComboBoxOption =>\n typeof o === 'string' ? { value: o, label: o } : o;\n\n/**\n * The normalised options, and the collection props to hand React Aria's `ComboBox`.\n *\n * `items` (controlled) skips React Aria's local filter; `defaultItems` applies it. That single\n * choice is the whole of `isFilteredExternally` — see useComboBoxState, which reads\n * `props.items != null || !defaultFilter ? collection : filterCollection(...)`.\n *\n * `allowsEmptyCollection` is always true under external filtering, not just while a status row\n * shows: gating it on the status closes the popover at the moment results land, because the flag\n * flips false in the same render the collection fills.\n */\nexport function useComboBoxItems(\n options: Array<string | ComboBoxOption>,\n isFilteredExternally: boolean | undefined,\n isLoading: boolean | undefined,\n) {\n const items = React.useMemo(() => options.map(norm), [options]);\n return {\n items,\n collectionProps: {\n ...(isFilteredExternally ? { items } : { defaultItems: items }),\n allowsEmptyCollection: Boolean(isFilteredExternally || isLoading),\n },\n };\n}\n\n/** The chevron that opens the suggestions. React Aria adopts it as the field's trigger. */\nexport function ComboBoxTrigger() {\n const msg = usePireMessages();\n return (\n <AriaButton\n className=\"pire-iconbtn pire-field-trigger\"\n data-size=\"xs\"\n aria-label={msg.comboBoxShowSuggestions}\n >\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n );\n}\n\nexport interface ComboBoxListBoxProps {\n items: ComboBoxOption[];\n isFilteredExternally?: boolean;\n isLoading?: boolean;\n loadingLabel?: string;\n emptyLabel?: React.ReactNode;\n onLoadMore?: () => void;\n}\n\n/** The popover, the option rows and the loading / empty status row, shared by `ComboBox` and `MultiComboBox`. */\nexport function ComboBoxListBox({\n items,\n isFilteredExternally,\n isLoading,\n loadingLabel,\n emptyLabel,\n onLoadMore,\n}: ComboBoxListBoxProps) {\n const msg = usePireMessages();\n const onListScroll = useLoadMoreOnScroll(onLoadMore, isLoading);\n const showsStatus = isLoading || (isFilteredExternally && items.length === 0 && emptyLabel != null);\n return (\n <Popover className=\"pire-popover\">\n <ListBox\n className=\"pire-listbox\"\n onScroll={onListScroll}\n // React Aria strips aria-busy from ListBox, so this live region is the whole announcement:\n // without it a screen-reader user gets silence while the request is in flight and cannot\n // tell pending from empty.\n renderEmptyState={\n showsStatus\n ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n )\n : undefined\n }\n >\n {(item: ComboBoxOption) => (\n <ListBoxItem\n className=\"pire-option\"\n id={item.value}\n textValue={item.label}\n isDisabled={item.isDisabled}\n >\n <span className=\"pire-option-label\">{item.label}</span>\n {item.secondary ? <span className=\"pire-option-secondary\">{item.secondary}</span> : null}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n );\n}\n","import * as React from 'react';\n\n/** How close to the end of the list, in px, the next page is requested. */\nconst THRESHOLD = 64;\n\n/**\n * The `onScroll` handler for a list that pages from the server: asks for the next page once per\n * arrival at the end, not on every scroll event inside the zone. Scroll handlers rather than an\n * intersection observer, so nothing is appended below the virtual focus while the user is still\n * moving through the list.\n *\n * Re-arms when the list grows (the page arrived) or when `isLoading` settles to false, so a\n * failed request can be retried by scrolling again. Returns `undefined` without `onLoadMore`.\n */\nexport function useLoadMoreOnScroll(\n onLoadMore: (() => void) | undefined,\n isLoading: boolean | undefined,\n): React.UIEventHandler<HTMLElement> | undefined {\n /** `scrollHeight` when the last request went out; null when armed. */\n const requestedAt = React.useRef<number | null>(null);\n\n React.useEffect(() => {\n if (!isLoading) requestedAt.current = null;\n }, [isLoading]);\n\n if (!onLoadMore) return undefined;\n return (event) => {\n const el = event.currentTarget;\n if (isLoading || el.scrollHeight - el.scrollTop - el.clientHeight >= THRESHOLD) return;\n if (requestedAt.current === el.scrollHeight) return;\n requestedAt.current = el.scrollHeight;\n onLoadMore();\n };\n}\n","import * as React from 'react';\nimport {\n ComboBox as AriaComboBox,\n Input as AriaInput,\n ButtonContext,\n Group,\n FieldError,\n VisuallyHidden,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Tag } from '../core/Tag';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport type { ComboBoxOption } from './ComboBox';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport { ComboBoxListBox, ComboBoxTrigger, useComboBoxItems } from './ComboBoxListBox';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport interface MultiComboBoxProps extends WithFieldHelp {\n label?: React.ReactNode;\n /** Selected values, in the order they were picked. */\n value?: string[];\n defaultValue?: string[];\n onChange?: (values: string[]) => void;\n /**\n * Free-text as typed, on every keystroke. Debounce it before calling the server.\n *\n * Without `isFilteredExternally`, React Aria also applies its own local \"contains\" filter,\n * so a result whose label does not literally contain the typed text is hidden client-side.\n */\n onInputChange?: (text: string) => void;\n options?: Array<string | ComboBoxOption>;\n /**\n * `options` is the final list and React Aria filters nothing locally. Same meaning and same\n * name as on `ComboBox`. Required for server search, where fuzzy matches, synonyms and\n * server ranking do not survive a local \"contains\" pass.\n */\n isFilteredExternally?: boolean;\n /** Shows a loading row instead of closing the popover, and blocks selection while set. */\n isLoading?: boolean;\n /** Overrides the dictionary's `comboBoxLoading`. */\n loadingLabel?: string;\n /** Shown when the server answered with nothing, so a bad query reads differently from a slow one. */\n emptyLabel?: React.ReactNode;\n /** Called when the list is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n placeholder?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n /** Let Enter commit text that is not in `options` — how product tags get coined. */\n allowsCustomValue?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Multi-value type-ahead: pick several options, each shown as a removable chip, and — with\n * `allowsCustomValue` — coin new ones by typing. Product tags, cost-centre sets, watchers.\n *\n * A separate component rather than a mode on ComboBox: ComboBox's `value` is a `string | null`\n * and its `onChange` emits one key, while multi-select needs an array on both. Folding the two\n * together would put a discriminated union in front of every existing consumer of\n * `ComboBoxProps` — a breaking change in exchange for a purely additive feature.\n *\n * Three things worth knowing before you use it:\n *\n * - **Free text commits on Enter, never on blur.** React Aria treats the input text as\n * independent of the selection in multi-select mode, so leaving the field discards whatever\n * was typed but not committed. The chips are the only record of what was entered.\n * - **Backspace on an empty input removes the last chip.** The handler runs in the capture\n * phase because React Aria's own key handling sits on the same input and would otherwise act\n * on the same key.\n * - **The chips are plain `Tag`s, not a React Aria TagGroup.** React Aria's ComboBox builds its\n * listbox collection by shallow-rendering its entire subtree, which swallows any collection\n * component nested inside it — a TagGroup there registers its tags as listbox items and then\n * crashes looking for grid state. Each chip's remove button is an ordinary Tab stop instead,\n * and removals are announced through the live region below. */\nexport function MultiComboBox({\n label,\n value,\n defaultValue,\n onChange,\n onInputChange,\n options = [],\n description,\n help,\n errorMessage,\n allowsCustomValue,\n size = 'md',\n isFilteredExternally,\n isLoading,\n loadingLabel,\n emptyLabel,\n onLoadMore,\n fullWidth = true,\n className,\n style,\n ...rest\n}: MultiComboBoxProps) {\n const msg = usePireMessages();\n const { items, collectionProps } = useComboBoxItems(options, isFilteredExternally, isLoading);\n const [uncontrolled, setUncontrolled] = React.useState<string[]>(defaultValue ?? []);\n const [announcement, setAnnouncement] = React.useState('');\n const inputRef = React.useRef<HTMLInputElement>(null);\n const raw = value ?? uncontrolled;\n\n // React Aria compares the value array by reference on every render to decide whether the\n // selection changed — and, when it thinks it did, clears the input. An inline `value={['a']}`\n // is a fresh array every render, which would wipe the text mid-typing, so identity here\n // follows the contents rather than the caller's literal.\n const contentKey = raw.join('\\u0000');\n // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on contents by design — see above.\n const values = React.useMemo(() => raw, [contentKey]);\n\n const labels = React.useMemo(() => new Map(items.map((o) => [o.value, o.label])), [items]);\n const labelOf = (v: string) => labels.get(v) ?? v;\n /* A read-only field still lists its chips, but nothing about it may be edited — neither by the\n remove buttons nor by Backspace, neither of which the input's readonly attribute covers. */\n const isEditable = !rest.isDisabled && !rest.isReadOnly;\n\n const commit = (next: string[]) => {\n /* Removing a chip is the only change a screen reader cannot infer from somewhere else: the\n listbox announces its own selected state, but a chip that disappears — by button or by\n Backspace — is silent otherwise. */\n const added = next.find((v) => !values.includes(v));\n const removed = values.find((v) => !next.includes(v));\n const announce = (template: string, value: string) =>\n setAnnouncement(template.replace('{label}', labelOf(value)).replace('{count}', String(next.length)));\n if (added) announce(msg.multiComboBoxAdded, added);\n else if (removed) announce(msg.multiComboBoxRemoved, removed);\n if (value === undefined) setUncontrolled(next);\n onChange?.(next);\n };\n\n const remove = (v: string) => {\n commit(values.filter((x) => x !== v));\n // The pressed button is about to unmount, and focus would fall to <body> with it.\n inputRef.current?.focus();\n };\n\n /* Capture phase: React Aria's input keydown handler is on the same element, and a bubble-phase\n handler cannot stop it from also acting on the key. */\n const onKeyDownCapture = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const el = e.currentTarget;\n if (!isEditable) return;\n if (e.key === 'Backspace' && el.value === '' && values.length > 0) {\n e.preventDefault();\n e.stopPropagation();\n commit(values.slice(0, -1));\n return;\n }\n if (e.key !== 'Enter' || !allowsCustomValue) return;\n const text = el.value.trim();\n // An option is highlighted — this Enter belongs to React Aria, which will select it.\n if (text === '' || el.getAttribute('aria-activedescendant')) return;\n // Typing an option's label in full must resolve to that option, not coin a duplicate under a\n // different key — otherwise \"Fragile\" typed and \"Fragile\" clicked are two chips on one record.\n const match = items.find((o) => o.label.toLowerCase() === text.toLowerCase());\n const next = match ? match.value : text;\n e.preventDefault();\n e.stopPropagation();\n if (!values.includes(next)) commit([...values, next]);\n };\n\n warnHelpWithoutLabel('MultiComboBox', label, help);\n\n return (\n <AriaComboBox\n className={cx('pire-field', className)}\n style={style}\n selectionMode=\"multiple\"\n value={values}\n onChange={(keys) => {\n if (!isLoading) commit(keys.map(String));\n }}\n onInputChange={onInputChange}\n {...collectionProps}\n menuTrigger=\"input\"\n validationBehavior=\"aria\"\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-multiline=\"true\"\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <div className=\"pire-chipfield\">\n {/* React Aria's ComboBox publishes its trigger-button props through ButtonContext, and\n every Button under it — including each chip's remove button — picks them up: the\n trigger's id (duplicated three ways), aria-haspopup, an aria-labelledby that\n outranks the chip's own label, and tabindex=\"-1\", which takes the chips out of the\n keyboard order entirely. Clearing the context is React Aria's own idiom for this\n (see how Popover clears contexts on the way into an overlay). */}\n <ButtonContext.Provider value={null}>\n {values.map((v) => (\n /* Disabled follows the field, not `isEditable`: a read-only field's chips are\n real, current values and should read as such — they simply lose the × . */\n <Tag key={v} isDisabled={rest.isDisabled} onRemove={isEditable ? () => remove(v) : undefined}>\n {labelOf(v)}\n </Tag>\n ))}\n </ButtonContext.Provider>\n <AriaInput\n ref={inputRef}\n className={cx('pire-input', 'pire-chipinput')}\n placeholder={rest.placeholder}\n onKeyDownCapture={onKeyDownCapture}\n />\n </div>\n <ComboBoxTrigger />\n </Group>\n <VisuallyHidden>\n <span aria-live=\"polite\">{announcement}</span>\n </VisuallyHidden>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <ComboBoxListBox\n items={items}\n isFilteredExternally={isFilteredExternally}\n isLoading={isLoading}\n loadingLabel={loadingLabel}\n emptyLabel={emptyLabel}\n onLoadMore={onLoadMore}\n />\n </AriaComboBox>\n );\n}\n","import * as React from 'react';\nimport {\n NumberField as AriaNumberField,\n Input as AriaInput,\n Group,\n Button as AriaButton,\n FieldError,\n useLocale,\n NumberFieldStateContext,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { FieldClearButton } from './FieldClearButton';\nimport { decimalSeparatorFor } from '../utils/decimalSeparator';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\n/**\n * Types `text` into `el` as though the user had.\n *\n * Assigning `el.value` is invisible to React: it caches the last value it wrote on the node\n * and would compare the new one against itself. Going through the prototype's setter leaves\n * that cache holding the previous value, so the dispatched `input` event reaches React Aria's\n * own handler — which is the point. We are supplying a keystroke, not a value; its parser\n * still decides whether the result is acceptable and rejects it if not.\n */\nfunction typeIntoInput(el: HTMLInputElement, text: string): void {\n const start = el.selectionStart ?? el.value.length;\n const end = el.selectionEnd ?? start;\n const setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;\n setValue?.call(el, el.value.slice(0, start) + text + el.value.slice(end));\n el.dispatchEvent(new Event('input', { bubbles: true }));\n const caret = start + text.length;\n el.setSelectionRange(caret, caret);\n}\n\n/** One dot with digits on both sides — the shape a decimal point and a lone group separator share. */\nconst SINGLE_DOT = /^(-?\\d+)\\.(\\d+)$/;\n\n/**\n * Whether grouping could have produced this text, in which case it is genuinely ambiguous and gets\n * left to the locale's own reading — the same ambiguity the typed-dot handler refuses to resolve.\n *\n * Grouping puts *exactly* three digits after its separator and *at most* three before the first\n * one: `1.500` and `123.500` are how a locale writes 1500 and 123500, but `1500.000` is not how it\n * writes anything, because that number would have been grouped `1.500.000`. Both halves of the\n * test matter. Checking only the fraction rejects `1500.000` — a `decimal(_,3)` quantity, which is\n * exactly the shape a backend sends — and hands it to a parser that reads it as 1500000.\n */\nfunction couldBeGrouped(integerPart: string, fractionPart: string): boolean {\n return fractionPart.length === 3 && integerPart.replace('-', '').length <= 3;\n}\n\n/** The pasted text with its decimal point rewritten to the locale's, or unchanged when the text is\n * not unambiguously a machine decimal. */\nfunction localiseMachineDecimal(text: string, separator: string): string {\n const match = SINGLE_DOT.exec(text.trim());\n if (!match || couldBeGrouped(match[1], match[2])) {\n return text;\n }\n return `${match[1]}${separator}${match[2]}`;\n}\n\nexport interface NumberFieldProps<TEmpty extends '' | null = never> extends WithFieldHelp {\n label?: React.ReactNode;\n /** Accessible name when `label` is omitted — e.g. in a table cell where the column header\n * already carries the visible text. A field with neither is unnamed and fails axe. */\n 'aria-label'?: string;\n /** A figure, or the string one arrived as — a `decimal` column serialises as `\"1500.00\"`, so\n * a value straight off a JSON response needs no conversion. Strings are read with `Number`,\n * which is machine format only: `\"1500.00\"`, never the `\"1.500,00\"` the field *displays*\n * under es-PY. Anything unparseable shows as empty rather than as `NaN`. */\n value?: number | string | null;\n defaultValue?: number | string | null;\n // `NoInfer` so the sentinel is read from `emptyValue` alone: without it a handler annotated\n // `(v: number) => void` is itself an inference site, TypeScript tries `TEmpty = number`, and\n // falls back to the constraint — which widens the emitted type for consumers who declared no\n // sentinel at all, the one thing this generic exists to avoid.\n onChange?: (value: number | NoInfer<TEmpty>) => void;\n /**\n * What this field uses to mean \"empty\", in both directions: accepted in `value` and emitted by\n * `onChange`.\n *\n * Defaults to `NaN`, which is what React Aria uses internally. Declare `''` or `null` when the form is serialised to JSON: `NaN` does not\n * survive `JSON.stringify` (it becomes `null`) and compares `false` against everything\n * including itself, so a guard like `Math.abs(total) > 0` reads an empty field as a balanced\n * one.\n */\n emptyValue?: TEmpty;\n minValue?: number;\n maxValue?: number;\n step?: number;\n /** Intl.NumberFormat options — currency, unit, decimals. Locale comes from the app's I18nProvider. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Trailing unit shown after the figure: EA, KG, %. */\n suffix?: React.ReactNode;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n /** Hide the increment/decrement buttons — typical inside dense table cells. */\n hideStepper?: boolean;\n /**\n * `stacked` is the compact spinner beside the input — the default, and right for a dense form.\n * `inline` puts a full-size decrement and increment on either side of the value, for entry with\n * gloves or a scanner. `QuantityStepper` is the named preset for that case; reach for this prop\n * directly only when you need the layout without the preset's other defaults.\n */\n stepperLayout?: 'stacked' | 'inline';\n /**\n * Overrides the dictionary's increment/decrement names, in **both** stepper layouts —\n * QuantityStepper supplies its own.\n *\n * For a field where \"Increase\" is not what the button does to the thing being counted: \"Add one\n * case\", \"Next pallet\". A silently-ignored override is worse than no prop, so the stacked\n * spinner honours these exactly as the inline one does.\n */\n incrementLabel?: string;\n decrementLabel?: string;\n /**\n * Show a button that empties the field, reporting whatever `emptyValue` declares.\n *\n * Worth it wherever \"no figure\" is a meaningful answer rather than zero — an optional discount,\n * a filter bound. Works controlled or uncontrolled.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** What React Aria is given for a value: a figure, or `NaN` for empty — but `undefined` stays\n * `undefined`, since that is what keeps an uncontrolled field uncontrolled. Coercing it to `NaN`\n * would make every field without a `value` prop controlled-empty, which reports keystrokes\n * through `onChange` and displays none of them.\n *\n * The empty check comes before the coercion on purpose: `Number('')` is `0`, not `NaN`, so the\n * other order turns every empty price into a zero — which reads as a real figure. */\nfunction toAriaNumber(value: number | string | null | undefined): number | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (value === null || value === '') {\n return NaN;\n }\n return typeof value === 'number' ? value : Number(value);\n}\n\n/**\n * Visible whenever the field is *showing* something, which React Aria's own state knows and a copy\n * of `onChange` does not: `onChange` fires on commit, not per keystroke, so a mirrored copy stays\n * empty over a figure the user has typed and not committed — exactly when someone reaches for a\n * clear button.\n *\n * The clearing itself goes back through the component, unlike on the date fields. React Aria's\n * `commit()` treats an empty input as invalid and restores the last good figure, so the state\n * cannot be asked to empty itself; the component owns the value instead (see `takesOverValue`).\n */\nfunction ClearButton({ label, onClear }: { label: string; onClear: () => void }) {\n const state = React.useContext(NumberFieldStateContext);\n if (!state?.inputValue) {\n return null;\n }\n return <FieldClearButton label={label} onClear={onClear} />;\n}\n\n/**\n * Quantities, prices and any figure the user edits. Always right-aligned tabular mono, with\n * arrow-key and scroll stepping supplied by React Aria.\n *\n * **`onChange` fires on commit — blur, Enter or a stepper press — never per keystroke.** That is\n * React Aria's design and it is the right one: a formatted number field passes through states like\n * `1,` and `-` that must not reach the form.\n *\n * The consequence is worth knowing before you hit it. **Do not disable an action on this field's\n * value.** Typing `50000` and pressing an `isDisabled={amount <= 0}` button swallows the first\n * press: the field has not committed yet, so the button is still disabled when the pointer goes\n * down, and it takes a second click. It is not a race that can be tuned away — a test that clicks\n * such a button deadlocks outright, waiting for an enabled state that only that click can produce.\n *\n * Enable the action and validate when it is pressed, surfacing the reason. A disabled control that\n * does not say why is a worse affordance regardless, so the fix costs nothing.\n */\nexport function NumberField<TEmpty extends '' | null = never>({\n label,\n suffix,\n description,\n help,\n errorMessage,\n hideStepper,\n stepperLayout = 'stacked',\n incrementLabel,\n decrementLabel,\n size = 'md',\n fullWidth = true,\n className,\n style,\n value,\n defaultValue,\n onChange,\n emptyValue,\n isClearable,\n clearLabel,\n ...rest\n}: NumberFieldProps<TEmpty>) {\n const msg = usePireMessages();\n const { locale } = useLocale();\n const empty: number | TEmpty = emptyValue === undefined ? NaN : emptyValue;\n\n /**\n * A clearable, uncontrolled field is driven by Pire rather than by React Aria, for the same\n * reason `Input` is: the primitive has no imperative clear — `commit()` restores the last good\n * figure rather than emptying — and writing to the DOM node would leave React Aria's own state\n * holding the old one. Scoped to `isClearable`.\n */\n const isControlled = value !== undefined;\n const [ownValue, setOwnValue] = React.useState<number>(() => toAriaNumber(defaultValue) ?? NaN);\n const takesOverValue = Boolean(isClearable) && !isControlled;\n const valueProps = takesOverValue\n ? { value: ownValue, defaultValue: undefined }\n : { value: toAriaNumber(value), defaultValue: toAriaNumber(defaultValue) };\n\n const handleChange = (next: number) => {\n if (takesOverValue) {\n setOwnValue(next);\n }\n onChange?.(Number.isNaN(next) ? empty : next);\n };\n\n const showsClear = Boolean(isClearable) && !rest.isDisabled && !rest.isReadOnly;\n\n /**\n * Treat the `.` key as \"the user means the decimal point\".\n *\n * In a locale that groups with `.`, React Aria reads a typed `3.5` as `35` — correctly, by\n * the locale's own rules, and without complaint: the parser reports it as valid partial\n * input, so nothing surfaces. On a quantity that is an order-of-magnitude error with no\n * error state to notice.\n *\n * This is fixed as an input method rather than by loosening the parser, because loosening it\n * cannot be done safely: `1.500` is genuinely ambiguous between 1500 and 1.5, and no rule\n * resolves it. Remapping the keystroke has no such ambiguity, since grouping separators are\n * output formatting — they are produced when a value is displayed, not typed to enter one.\n *\n * Deliberately narrow: it does nothing where `.` already is the decimal separator, and\n * nothing on integer fields — which is every currency without minor units, PYG included, so\n * the amount fields where someone might genuinely type grouping are excluded by construction.\n * Anything invalid that survives this (a second separator, say) is still React Aria's to\n * reject; everything below only decides which character the keypress produces.\n */\n /** The separator a typed or pasted `.` should become, or null when the dot is left alone: an\n * inert field, a locale that already decimalises with a dot, or a field that takes no decimals. */\n const remapsDotTo = (): string | null => {\n if (rest.isReadOnly || rest.isDisabled) return null;\n const separator = decimalSeparatorFor(locale);\n if (separator === '.') return null;\n const { maximumFractionDigits } = new Intl.NumberFormat(locale, rest.formatOptions).resolvedOptions();\n return maximumFractionDigits ? separator : null;\n };\n\n const handleDecimalKey = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== '.' || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n const separator = remapsDotTo();\n if (!separator) {\n return;\n }\n\n event.preventDefault();\n typeIntoInput(event.currentTarget, separator);\n };\n\n /**\n * The same rule for pasted text, which the key handler never sees. Without it a pasted `3.5`\n * reads as 35: the parser takes the `.` for grouping.\n *\n * Same guards as the keystroke, so a locale that already decimalises with a dot and a field that\n * takes no decimals are both left alone, and anything unparseable is still React Aria's to\n * reject — this only decides which characters the paste delivers.\n */\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n const separator = remapsDotTo();\n if (!separator) {\n return;\n }\n\n const pasted = event.clipboardData.getData('text');\n const localised = localiseMachineDecimal(pasted, separator);\n if (localised === pasted) {\n return;\n }\n\n // Capture phase, and the propagation stopped: React Aria chains its own paste handling onto\n // this input, and `preventDefault` does not stop a chained JavaScript handler — it would\n // sanitise the raw text and insert `35` right over the `3,5` written here.\n event.preventDefault();\n event.stopPropagation();\n typeIntoInput(event.currentTarget, localised);\n };\n\n warnHelpWithoutLabel('NumberField', label, help);\n\n return (\n <AriaNumberField\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n onChange={handleChange}\n {...rest}\n {...valueProps}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n data-stepper={stepperLayout}\n >\n {!hideStepper && stepperLayout === 'inline' ? (\n <AriaButton\n slot=\"decrement\"\n className=\"pire-qty-btn\"\n aria-label={decrementLabel ?? msg.numberFieldDecrease}\n >\n <Icon name=\"minus\" size={16} />\n </AriaButton>\n ) : null}\n <AriaInput\n className=\"pire-input\"\n data-numeric=\"true\"\n onKeyDown={handleDecimalKey}\n onPasteCapture={handlePaste}\n />\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n {showsClear ? (\n <ClearButton label={clearLabel ?? msg.inputClear} onClear={() => handleChange(NaN)} />\n ) : null}\n {!hideStepper && stepperLayout === 'inline' ? (\n <AriaButton\n slot=\"increment\"\n className=\"pire-qty-btn\"\n aria-label={incrementLabel ?? msg.numberFieldIncrease}\n >\n <Icon name=\"plus\" size={16} />\n </AriaButton>\n ) : null}\n {hideStepper ? null : stepperLayout === 'inline' ? null : (\n <span className=\"pire-stepper\">\n {/* The same label fallbacks as the inline branch above. */}\n <AriaButton\n slot=\"increment\"\n className=\"pire-stepper-btn\"\n aria-label={incrementLabel ?? msg.numberFieldIncrease}\n >\n <Icon name=\"plus\" size={10} />\n </AriaButton>\n <AriaButton\n slot=\"decrement\"\n className=\"pire-stepper-btn\"\n aria-label={decrementLabel ?? msg.numberFieldDecrease}\n >\n <Icon name=\"minus\" size={10} />\n </AriaButton>\n </span>\n )}\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaNumberField>\n );\n}\n","/**\n * The character this locale puts before the fractional part — a locale property, not a formatting\n * choice, so it is read without any field's `formatOptions`.\n * Shared by `NumberField` and `NumPad` so the two can never disagree on one screen.\n */\nexport function decimalSeparatorFor(locale: string): string {\n return (\n new Intl.NumberFormat(locale).formatToParts(1.1).find((part) => part.type === 'decimal')?.value ?? '.'\n );\n}\n","import { NumberField, type NumberFieldProps } from './NumberField';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/**\n * Nothing beyond NumberField's own props: this is that field with the layout, the empty sentinel\n * and the button names a stock count needs.\n *\n * `incrementLabel`/`decrementLabel` are deliberately not offered here — unlike `NumberField`,\n * which keeps them for a caller with its own wording. Every `QuantityStepper` on a warehouse\n * screen names its buttons from the dictionary (`quantityStepperIncrease` /\n * `quantityStepperDecrease`), so two counts on the same screen never end up with one stepper\n * labelled in English and the other in Spanish. Wanting different wording means the dictionary is\n * wrong for this locale — fix it there, not at the call site.\n */\nexport interface QuantityStepperProps\n extends Omit<\n NumberFieldProps<null>,\n 'stepperLayout' | 'hideStepper' | 'emptyValue' | 'suffix' | 'incrementLabel' | 'decrementLabel'\n > {\n /** Height of the value box. `sm` for a line-item table cell, where the field competes with the\n * row for space. The two buttons stay 32px square either way — that is the whole point of the\n * component, and a size that shrank them below the touch target would defeat it. */\n size?: 'sm' | 'md';\n}\n\n/**\n * A counted quantity: decrement, value, increment, sized for a warehouse.\n *\n * Use it wherever the number is entered by someone holding a scanner or wearing gloves — a\n * physical count, a picking screen, a returns desk. Everywhere else `NumberField` is the field.\n *\n * `null` means \"not counted yet\", which is not the same fact as zero: conflating the two is how\n * a blind count reports a shortage that never happened.\n */\nexport function QuantityStepper({ size = 'md', ...rest }: QuantityStepperProps) {\n const msg = usePireMessages();\n return (\n <NumberField<null>\n {...rest}\n size={size}\n stepperLayout=\"inline\"\n emptyValue={null}\n incrementLabel={msg.quantityStepperIncrease}\n decrementLabel={msg.quantityStepperDecrease}\n />\n );\n}\n","import * as React from 'react';\nimport {\n DatePicker as AriaDatePicker,\n Group,\n DateInput,\n DateSegment,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n Calendar,\n FieldError,\n DatePickerStateContext,\n} from 'react-aria-components';\nimport type { DateValue } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { CalendarMonth } from './CalendarMonth';\nimport { FieldClearButton } from './FieldClearButton';\nimport { coerceBound, coerceDateValue } from './dateValues';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\nexport interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> extends WithFieldHelp {\n label?: React.ReactNode;\n /** A `DateValue`, or the `YYYY-MM-DD` string one arrived as — a value straight off a JSON\n * response needs no conversion. A datetime is accepted and trimmed to its date (`date`\n * columns commonly serialise as `\"2026-08-14T00:00:00.000000Z\"`); the time and zone are\n * discarded, because a `DateValue` is a calendar date and holds neither. A malformed date\n * shows as an empty field rather than throwing. */\n value?: DateValue | string | null;\n defaultValue?: DateValue | string | null;\n onChange?: (value: (TFormat extends 'iso' ? string : DateValue) | null) => void;\n /**\n * The shape `onChange` emits.\n *\n * `'object'` (the default) emits an `@internationalized/date` `DateValue`. `'iso'` emits the `YYYY-MM-DD` string a consumer sends back to its API, and\n * `null` for an empty field. Input accepts both shapes in either mode.\n */\n valueFormat?: TFormat;\n /** Earliest date that can be picked, in either shape `value` accepts. `null` and `undefined`\n * both mean \"no bound\", so a bound read out of the same state as the value needs no `??\n * undefined` on the way in. An unreadable bound stops applying rather than throwing. */\n minValue?: DateValue | string | null;\n /** Latest date that can be picked — see `minValue`. In a from/to pair each end bounds the\n * other, and both ends come out of the same state in the same shape. */\n maxValue?: DateValue | string | null;\n /** Return true for dates that cannot be picked — factory calendar, blocked periods. */\n isDateUnavailable?: (date: DateValue) => boolean;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n /**\n * Show a button that empties the field.\n *\n * There is otherwise no way for a user to say \"no date\" once one is set: React Aria substitutes\n * a date when a segment is cleared and never reports an empty value back, so a field that has\n * been filled in cannot be emptied from the keyboard at all.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Reads React Aria's own state rather than a copy Pire keeps beside it.\n *\n * Two reasons. The state holds what the field is *showing*, which for a\n * date being filled in is not yet a value the component ever reports — mirroring `onChange` leaves\n * the button hidden over exactly the input a user wants to abandon. And `setValue(null)` is the\n * only thing that resets the segments: handing the field a null from outside leaves whatever was\n * typed on screen, because React Aria only drops its placeholder when the value was complete.\n\n */\nfunction ClearButton({ label }: { label: string }) {\n const state = React.useContext(DatePickerStateContext);\n if (!state?.value) {\n return null;\n }\n return <FieldClearButton label={label} onClear={() => state.setValue(null)} />;\n}\n\n/** Date entry with a segmented field and a calendar popover. Segments follow the user's locale,\n * so a German user types dd.mm.yyyy without any prop change. Wrap the app in React Aria's\n * I18nProvider to pin a locale. */\nexport function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({\n label,\n description,\n help,\n errorMessage,\n size = 'md',\n fullWidth = true,\n className,\n style,\n value,\n defaultValue,\n onChange,\n valueFormat,\n minValue,\n maxValue,\n isClearable,\n clearLabel,\n ...rest\n}: DatePickerProps<TFormat>) {\n const msg = usePireMessages();\n\n const showsClear = Boolean(isClearable) && !rest.isDisabled && !rest.isReadOnly;\n // The cast is the one place the conditional emitted type has to be asserted rather than\n // inferred: `valueFormat` is checked at runtime, which TypeScript cannot tie back to `TFormat`.\n const handleChange = (next: DateValue | null) =>\n onChange?.(\n (valueFormat === 'iso' && next ? next.toString() : next) as\n | (TFormat extends 'iso' ? string : DateValue)\n | null,\n );\n warnHelpWithoutLabel('DatePicker', label, help);\n\n return (\n <AriaDatePicker\n className={cx('pire-field', className)}\n style={style}\n validationBehavior=\"aria\"\n minValue={coerceBound(minValue)}\n maxValue={coerceBound(maxValue)}\n value={coerceDateValue(value)}\n defaultValue={coerceDateValue(defaultValue)}\n onChange={handleChange}\n {...rest}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n <Group\n className=\"pire-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n <DateInput className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n {showsClear ? <ClearButton label={clearLabel ?? msg.inputClear} /> : null}\n <AriaButton\n className=\"pire-iconbtn pire-field-trigger\"\n data-size=\"sm\"\n aria-label={msg.datePickerOpenCalendar}\n >\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <AriaDialog>\n <Calendar className=\"pire-calendar\">\n <CalendarMonth />\n </Calendar>\n </AriaDialog>\n </Popover>\n </AriaDatePicker>\n );\n}\n","import {\n Button as AriaButton,\n CalendarGrid,\n CalendarGridHeader,\n CalendarHeaderCell,\n CalendarGridBody,\n CalendarCell,\n Heading,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\n/**\n * The month header (previous / title / next) and day grid, shared by `DatePicker`'s `Calendar`\n * and `DateRangePicker`'s `RangeCalendar`. Both read the same calendar context, so the markup is\n * identical; only the wrapping calendar differs.\n */\nexport function CalendarMonth() {\n const msg = usePireMessages();\n return (\n <>\n <header className=\"pire-calendar-head\">\n <AriaButton\n slot=\"previous\"\n className=\"pire-iconbtn\"\n data-size=\"sm\"\n aria-label={msg.datePickerPreviousMonth}\n >\n <Icon name=\"chevron-left\" size={16} />\n </AriaButton>\n <Heading className=\"pire-calendar-title\" />\n <AriaButton slot=\"next\" className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerNextMonth}>\n <Icon name=\"chevron-right\" size={16} />\n </AriaButton>\n </header>\n <CalendarGrid className=\"pire-calendar-grid\">\n <CalendarGridHeader>{(day) => <CalendarHeaderCell>{day}</CalendarHeaderCell>}</CalendarGridHeader>\n <CalendarGridBody>\n {(date) => <CalendarCell date={date} className=\"pire-calendar-cell\" />}\n </CalendarGridBody>\n </CalendarGrid>\n </>\n );\n}\n","import { parseDate } from '@internationalized/date';\nimport type { DateValue } from 'react-aria-components';\n\n/** A date, optionally followed by a time this component has no room for. */\nconst ISO_DATE = /^(\\d{4}-\\d{2}-\\d{2})(?:[T ].*)?$/;\n\n/**\n * What React Aria is given for a date. `undefined` stays `undefined`, since that is what keeps an\n * uncontrolled field uncontrolled — coercing it to `null` would silently disable `defaultValue`\n * and freeze the field.\n *\n * The rest is why this belongs in the library: `parseDate` *throws* on a malformed date, and a bad\n * date arriving from a server must empty one field, never unmount the screen. A datetime is\n * trimmed to its date, because a `DateValue` is a calendar date and holds neither time nor zone.\n */\nexport function coerceDateValue(value: DateValue | string | null | undefined): DateValue | null | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (value === null || value === '') {\n return null;\n }\n if (typeof value !== 'string') {\n return value;\n }\n const match = ISO_DATE.exec(value);\n if (!match) {\n return null;\n }\n try {\n return parseDate(match[1]);\n } catch {\n return null;\n }\n}\n\n/**\n * The same coercion for `minValue` / `maxValue`, where the two ways of saying \"no bound\" — `null`\n * and `undefined` — collapse into the one React Aria's own types accept.\n *\n * An unreadable bound silently stops applying (an unreadable value at least shows as empty).\n * Still better than throwing: a malformed bound from a server should not take the screen down.\n */\nexport function coerceBound(value: DateValue | string | null | undefined): DateValue | undefined {\n return coerceDateValue(value) ?? undefined;\n}\n","import * as React from 'react';\nimport {\n DateRangePicker as AriaDateRangePicker,\n Group,\n DateInput,\n DateSegment,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n RangeCalendar,\n FieldError,\n DateRangePickerStateContext,\n} from 'react-aria-components';\nimport type { DateValue } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { CalendarMonth } from './CalendarMonth';\nimport { FieldClearButton } from './FieldClearButton';\nimport { coerceBound, coerceDateValue } from './dateValues';\nimport { FieldLabel, warnHelpWithoutLabel } from './FieldLabel';\nimport { FieldDescription } from './FieldDescription';\nimport type { WithFieldHelp } from './FieldHelp';\n\n/** A complete range: what this component emits, and what `rangeLengthInDays` measures. */\nexport interface DateRange {\n start: DateValue;\n end: DateValue;\n}\n\n/** A complete range as ISO strings — what `onChange` emits under `valueFormat=\"iso\"`. */\nexport interface IsoDateRange {\n start: string;\n end: string;\n}\n\n/**\n * What `value` accepts: either end in either shape, and either end absent.\n *\n * The two ends are read separately on purpose. An unreadable or empty end leaves *that* end\n * without a date instead of voiding the whole range, so a caller can pass the two halves of its\n * state straight through rather than guarding that both parsed before building an object. Deciding\n * what counts as a usable range is this component's job, which is the point of the prop.\n */\nexport interface DateRangeInput {\n start?: DateValue | string | null;\n end?: DateValue | string | null;\n}\n\nexport interface DateRangePreset {\n id: string;\n label: string;\n /** The app computes the range: Pire cannot know when a customer's fiscal year starts. It also\n * computes in whatever shape it stores, so either shape is accepted here. */\n range: () => DateRangeInput;\n}\n\n/** Both ends coerced, each independently missing — the shape React Aria is actually handed. */\ninterface PartialRange {\n start: DateValue | null;\n end: DateValue | null;\n}\n\n/**\n * Both ends read separately. A pair with nothing in either end is no range at all, which is what\n * React Aria wants for an empty field; a pair with one end is handed over as-is, which React Aria\n * renders as one filled end and one on placeholder.\n */\nfunction coerceRange(range: DateRangeInput | null | undefined): PartialRange | null | undefined {\n if (range === undefined) {\n return undefined;\n }\n if (range === null) {\n return null;\n }\n const start = coerceDateValue(range.start) ?? null;\n const end = coerceDateValue(range.end) ?? null;\n return start === null && end === null ? null : { start, end };\n}\n\nexport interface DateRangePickerProps<TFormat extends 'object' | 'iso' = 'object'> extends WithFieldHelp {\n label?: React.ReactNode;\n /** Either end in either shape — see `DateRangeInput`. A range whose ends are both empty is an\n * empty field. */\n value?: DateRangeInput | null;\n defaultValue?: DateRangeInput | null;\n onChange?: (value: (TFormat extends 'iso' ? IsoDateRange : DateRange) | null) => void;\n /**\n * The shape `onChange` emits.\n *\n * `'object'` (the default) emits a `DateValue` pair. `'iso'`\n * emits `{ start: 'YYYY-MM-DD', end: 'YYYY-MM-DD' }`, the shape a consumer sends back to its API.\n *\n * Either way the emitted range is always complete or `null`: React Aria never reports half a\n * range, even though it will happily *display* one while a caller is still filling it in.\n */\n valueFormat?: TFormat;\n /** Earliest date either end can take, in either shape `value` accepts. `null` and `undefined`\n * both mean \"no bound\". An unreadable bound stops applying rather than throwing. */\n minValue?: DateValue | string | null;\n /** Latest date either end can take — see `minValue`. */\n maxValue?: DateValue | string | null;\n /** Return true for dates that cannot be picked — blocked periods, closed books. */\n isDateUnavailable?: (date: DateValue) => boolean;\n /**\n * Longest range the caller accepts, in days. Exceeding it marks the field invalid so\n * `errorMessage` shows — the wording is the app's, since only it knows the limit's reason.\n *\n * Days rather than a duration: \"12 months\" is not a fixed number of days, so pick the bound\n * that matches your rule rather than expecting a calendar-aware one.\n */\n maxRangeDays?: number;\n /** Shortcuts beside the calendar: \"This month\", \"Last 30 days\". */\n presets?: DateRangePreset[];\n /**\n * Show a button that empties both ends at once.\n *\n * Same gap as on `DatePicker`, and worse here: a user who fills one end and changes their mind\n * has no way back to an empty period, since React Aria never reports an emptied field.\n */\n isClearable?: boolean;\n /** The clear button's visible text. Defaults to the dictionary's `inputClear`. */\n clearLabel?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n isRequired?: boolean;\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n /** HTML submit names for the two ends. */\n startName?: string;\n endName?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * Whole days between the two ends, inclusive of both.\n *\n * A complete `DateRange` measures to a number. Anything looser — either end a string or absent —\n * returns `null` when either end is missing or unreadable, so two strings can be passed straight in.\n */\nexport function rangeLengthInDays(range: DateRange): number;\nexport function rangeLengthInDays(range: DateRangeInput | null | undefined): number | null;\nexport function rangeLengthInDays(range: DateRangeInput | null | undefined): number | null {\n const start = coerceDateValue(range?.start) ?? null;\n const end = coerceDateValue(range?.end) ?? null;\n if (start === null || end === null) {\n return null;\n }\n return end.toDate('UTC').getTime() / 86_400_000 - start.toDate('UTC').getTime() / 86_400_000 + 1;\n}\n\n/**\n * Reads React Aria's own state rather than a copy — see the same button on `DatePicker`, where the\n * reasoning is written out. It matters more here: half a range is the state a caller lands in by\n * filling one end, React Aria never reports it, and it is precisely what a user wants to abandon.\n */\nfunction ClearButton({ label }: { label: string }) {\n const state = React.useContext(DateRangePickerStateContext);\n if (!state?.value?.start && !state?.value?.end) {\n return null;\n }\n return <FieldClearButton label={label} onClear={() => state.setValue(null)} />;\n}\n\n/**\n * Two dates that belong together — the default filter on 24 ERP screens.\n *\n * Built on React Aria's `DateRangePicker`, which supplies the segmented ends, the ordering rules\n * between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:\n * `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.\n */\nexport function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({\n label,\n description,\n help,\n errorMessage,\n maxRangeDays,\n presets,\n size = 'md',\n fullWidth = true,\n startName,\n endName,\n className,\n style,\n value,\n defaultValue,\n onChange,\n valueFormat,\n minValue,\n maxValue,\n isClearable,\n clearLabel,\n ...rest\n}: DateRangePickerProps<TFormat>) {\n const msg = usePireMessages();\n\n // Only for measuring the span: whichever of the two props holds the current range. It must not\n // be handed back as `value` — that would make a field with only `defaultValue` controlled, and a\n // controlled field whose parent never updates is a frozen one.\n const current = coerceRange(value) ?? coerceRange(defaultValue) ?? null;\n const span = current === null ? null : rangeLengthInDays(current);\n const tooLong = maxRangeDays != null && span != null && span > maxRangeDays;\n\n /**\n * The one place a range leaves this component, so `valueFormat` is honoured whether the range\n * came from the calendar, the segments or a preset button. A preset that returns something\n * unusable reports no range rather than a half one.\n *\n * The cast is where the conditional emitted type has to be asserted rather than inferred:\n * `valueFormat` is checked at runtime, which TypeScript cannot tie back to `TFormat`.\n */\n const emit = (next: PartialRange | null) => {\n if (!onChange) {\n return;\n }\n if (!next?.start || !next.end) {\n onChange(null);\n return;\n }\n onChange(\n (valueFormat === 'iso'\n ? { start: next.start.toString(), end: next.end.toString() }\n : { start: next.start, end: next.end }) as TFormat extends 'iso' ? IsoDateRange : DateRange,\n );\n };\n\n warnHelpWithoutLabel('DateRangePicker', label, help);\n\n return (\n <AriaDateRangePicker\n className={cx('pire-field', className)}\n style={style}\n startName={startName}\n endName={endName}\n validationBehavior=\"aria\"\n // React Aria types both ends of a range as required, but renders a half one exactly as a\n // half-filled field — which is what a caller passing one end of its state means.\n value={coerceRange(value) as DateRange | null | undefined}\n defaultValue={coerceRange(defaultValue) as DateRange | null | undefined}\n minValue={coerceBound(minValue)}\n maxValue={coerceBound(maxValue)}\n onChange={emit}\n {...rest}\n // `undefined`, never `false`: an explicit `false` overrides React Aria's min/max validation.\n isInvalid={rest.isInvalid || tooLong || undefined}\n >\n {label ? <FieldLabel label={label} isRequired={rest.isRequired} help={help} /> : null}\n\n <Group\n className=\"pire-control pire-daterange-control\"\n data-size={size}\n data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid || tooLong ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}\n >\n {/* Two independent segment groups, each named by React Aria. Do not collapse them under a\n single aria-label: a screen reader then cannot say which end it is editing. */}\n <DateInput slot=\"start\" className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n <span aria-hidden=\"true\" className=\"pire-daterange-dash\">\n –\n </span>\n <DateInput slot=\"end\" className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n {isClearable && !rest.isDisabled && !rest.isReadOnly ? (\n <ClearButton label={clearLabel ?? msg.inputClear} />\n ) : null}\n <AriaButton\n className=\"pire-iconbtn pire-field-trigger\"\n data-size=\"sm\"\n aria-label={msg.datePickerOpenCalendar}\n >\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n\n <FieldDescription description={description} help={help} />\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n\n <Popover className=\"pire-popover\">\n <AriaDialog className=\"pire-daterange-dialog\">\n {presets?.length ? (\n // Before the calendar in the DOM, so keyboard users reach the shortcut without\n // arrowing through a month first.\n <div className=\"pire-daterange-presets\" role=\"group\" aria-label={msg.dateRangePresetsLabel}>\n {presets.map((preset) => (\n <AriaButton\n key={preset.id}\n className=\"pire-daterange-preset\"\n onPress={() => emit(coerceRange(preset.range()) ?? null)}\n >\n {preset.label}\n </AriaButton>\n ))}\n </div>\n ) : null}\n <RangeCalendar className=\"pire-calendar\">\n <CalendarMonth />\n </RangeCalendar>\n </AriaDialog>\n </Popover>\n </AriaDateRangePicker>\n );\n}\n","import * as React from 'react';\nimport { Input } from './Input';\nimport { IconButton } from '../core/IconButton';\nimport { ValueHelpDialog } from '../patterns/ValueHelpDialog';\nimport type { DataTableColumn } from '../data/DataTable';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ValueHelpFieldProps<T extends { id: string | number } = { id: string | number }> {\n label?: React.ReactNode;\n /** The picked record, or null. */\n value?: T | null;\n onChange?: (row: T | null) => void;\n /** How the picked record reads in the closed field. Default: \"id — name\". */\n format?: (row: T) => string;\n /** Records offered in the dialog, and the columns that identify them. */\n rows?: T[];\n columns?: DataTableColumn<T>[];\n dialogTitle?: React.ReactNode;\n /**\n * Forwarded to {@link ValueHelpDialog}. Set `isFilteredExternally` and feed `rows` from\n * `onSearch` when the list is too large to sit in the browser — which is the usual case for\n * suppliers, customers and products.\n */\n onSearch?: (query: string) => void;\n isFilteredExternally?: boolean;\n isLoading?: boolean;\n onLoadMore?: () => void;\n /** Shown in the dialog when the search returns nothing. */\n emptyLabel?: string;\n placeholder?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n /** Renders a clear button once a record is picked. The same name as every other clearable field. */\n isClearable?: boolean;\n /** @deprecated Use `isClearable`. */\n allowsClear?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Falls back to \"<id> — <human label>\", probing the usual master-data label fields in order. */\nconst defaultFormat = (row: { id: string | number; [field: string]: unknown }) =>\n [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(' — ');\n\n/** The ERP field that cannot be typed: a read-only display of the picked master-data record plus\n * the value-help trigger. Pairs Input with ValueHelpDialog so screens stop rewiring both. */\nexport function ValueHelpField<T extends { id: string | number }>({\n label,\n value,\n onChange,\n format = defaultFormat,\n rows = [],\n columns = [],\n dialogTitle,\n onSearch,\n isFilteredExternally,\n isLoading,\n onLoadMore,\n emptyLabel,\n placeholder,\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isRequired,\n isClearable,\n allowsClear,\n className,\n style,\n}: ValueHelpFieldProps<T>) {\n const msg = usePireMessages();\n const [open, setOpen] = React.useState(false);\n return (\n <div className={cx(className)} style={style}>\n {/* The triggers live inside the control so they align to the input row whatever the\n description's length; Input keeps description and error so aria-describedby stays wired. */}\n <Input\n label={label}\n isReadOnly\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n isRequired={isRequired}\n value={value ? format(value) : ''}\n placeholder={placeholder ?? msg.valueHelpFieldPlaceholder}\n description={description}\n errorMessage={errorMessage}\n suffix={\n <span className=\"pire-valuehelp-actions\">\n {(isClearable ?? allowsClear) && value ? (\n <IconButton\n icon=\"x\"\n label={msg.valueHelpFieldClear}\n isDisabled={isDisabled}\n onPress={() => onChange?.(null)}\n />\n ) : null}\n <IconButton\n icon=\"search\"\n label={\n typeof label === 'string'\n ? msg.valueHelpFieldOpenNamed.replace('{label}', label.toLowerCase())\n : msg.valueHelpFieldOpen\n }\n isDisabled={isDisabled}\n onPress={() => setOpen(true)}\n />\n </span>\n }\n />\n <ValueHelpDialog\n isOpen={open}\n onClose={() => setOpen(false)}\n title={dialogTitle ?? label}\n columns={columns}\n rows={rows}\n onSearch={onSearch}\n isFilteredExternally={isFilteredExternally}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n emptyLabel={emptyLabel}\n onSelect={(row) => onChange?.(row)}\n />\n </div>\n );\n}\n","import * as React from 'react';\nimport { useFilter } from 'react-aria-components';\nimport { Dialog } from '../feedback/Dialog';\nimport { Input } from '../forms/Input';\nimport { DataTable, type DataTableColumn } from '../data/DataTable';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { useLoadMoreOnScroll } from '../utils/useLoadMoreOnScroll';\n\nexport interface ValueHelpDialogProps<T extends { id: string | number } = { id: string | number }> {\n isOpen?: boolean;\n title?: React.ReactNode;\n /** Show 2–4 identifying columns, not just the key. */\n columns?: DataTableColumn<T>[];\n rows?: T[];\n searchPlaceholder?: string;\n emptyLabel?: string;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * On its own this only observes; it does not change how `rows` is treated. Pair it with\n * `isFilteredExternally` to actually hand filtering to the server.\n */\n onSearch?: (query: string) => void;\n /**\n * `rows` is the final list and the dialog filters nothing locally. Required for server search:\n * fuzzy matches, synonyms, code-to-description and server ranking do not survive a local\n * \"contains\" pass over the fields that happen to be in the row.\n *\n * Named to match `ComboBox`, deliberately (see CLAUDE.md, server-backed lists).\n */\n isFilteredExternally?: boolean;\n /** Keeps the table's skeleton up instead of showing \"no records\" while a request is in flight. */\n isLoading?: boolean;\n /** Called when the table is scrolled near its end, for paginated results. */\n onLoadMore?: () => void;\n /** Receives the picked row. */\n onSelect?: (row: T) => void;\n onClose?: () => void;\n /**\n * `'single'` (the default) commits on row press. `'multiple'` adds a\n * checkbox column, a running count and select-all / clear shortcuts, and moves the commit to\n * an explicit confirm — a row press only toggles that row.\n */\n selectionMode?: 'single' | 'multiple';\n /**\n * The checked ids, in `'multiple'` mode. Held by the **consumer**, not derived from the\n * rendered rows — a selection tied to the filtered list would empty itself the moment a search\n * narrows the table, silently dropping rows the user already ticked.\n */\n selectedKeys?: Array<string | number>;\n /**\n * Fires on every checkbox toggle and on the select-all / clear shortcuts, in `'multiple'` mode.\n *\n * Always the **whole** selection, never just the part currently on screen: the toolbar's\n * select-all reports every id in `rows`, and a row toggle reports the ids already held plus or\n * minus the one pressed. A caller can therefore assign it straight over its own state.\n */\n onSelectionChange?: (keys: Array<string | number>) => void;\n /** Fires with the current `selectedKeys` when the `'multiple'`-mode footer button is pressed. */\n onConfirm?: (keys: Array<string | number>) => void;\n}\n\n/** The ERP value help: search a master-data list and pick one record back into a field. */\nexport function ValueHelpDialog<T extends { id: string | number }>({\n isOpen,\n title,\n columns = [],\n rows = [],\n searchPlaceholder,\n emptyLabel,\n onSearch,\n isFilteredExternally,\n isLoading,\n onLoadMore,\n onSelect,\n onClose,\n selectionMode = 'single',\n selectedKeys,\n onSelectionChange,\n onConfirm,\n}: ValueHelpDialogProps<T>) {\n const msg = usePireMessages();\n const onListScroll = useLoadMoreOnScroll(onLoadMore, isLoading);\n const [query, setQuery] = React.useState('');\n React.useEffect(() => {\n if (isOpen) setQuery('');\n }, [isOpen]);\n const isMultiple = selectionMode === 'multiple';\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const filtered = React.useMemo(() => {\n // Under external filtering `rows` is already the answer. Filtering it again is not merely\n // redundant: it drops every match the server made on something the row does not contain.\n if (isFilteredExternally) return rows;\n const q = query.trim();\n if (!q) return rows;\n // Accent-blind like AppLauncher and CommandPalette, and only over text and numbers: an object\n // value stringifies to \"[object Object]\", which matched every row on \"object\".\n const searchable = (v: unknown) => typeof v === 'string' || typeof v === 'number';\n return rows.filter((row) => Object.values(row).some((v) => searchable(v) && contains(String(v), q)));\n }, [rows, query, isFilteredExternally, contains]);\n\n const handleSearch = (value: string) => {\n setQuery(value);\n onSearch?.(value);\n };\n\n return (\n <Dialog\n isOpen={isOpen}\n size=\"lg\"\n title={title ?? msg.valueHelpDialogTitle}\n onClose={onClose}\n footer={\n <>\n <Button variant=\"tertiary\" onPress={onClose}>\n {msg.valueHelpDialogCancel}\n </Button>\n {isMultiple ? (\n <Button\n variant=\"primary\"\n onPress={() => {\n onConfirm?.(selectedKeys ?? []);\n onClose?.();\n }}\n >\n {msg.valueHelpConfirm}\n </Button>\n ) : null}\n </>\n }\n >\n <div className=\"pire-valuehelp-body\">\n <Input\n aria-label={msg.valueHelpDialogSearch}\n icon=\"search\"\n type=\"search\"\n value={query}\n onChange={handleSearch}\n isClearable\n placeholder={searchPlaceholder ?? msg.valueHelpDialogSearchPlaceholder}\n autoFocus\n />\n {isMultiple ? (\n <div className=\"pire-valuehelp-selectionbar\">\n {/* The scope is in the label because it is not the scope the table in front of it\n shows: this ticks every record in `rows`, search or no search. An unqualified\n \"Select all\" beside a table narrowed to one row reads as \"select that one\". */}\n <Button size=\"sm\" variant=\"tertiary\" onPress={() => onSelectionChange?.(rows.map((r) => r.id))}>\n {msg.valueHelpSelectAllCount.replace('{count}', String(rows.length))}\n </Button>\n <Button size=\"sm\" variant=\"tertiary\" onPress={() => onSelectionChange?.([])}>\n {msg.valueHelpClearSelection}\n </Button>\n <span className=\"pire-valuehelp-count\">\n {msg.valueHelpSelectedCount.replace('{count}', String(selectedKeys?.length ?? 0))}\n </span>\n </div>\n ) : null}\n <div className=\"pire-valuehelp-list\" onScroll={onListScroll}>\n <DataTable\n aria-label={typeof title === 'string' ? title : msg.valueHelpDialogTitle}\n density=\"condensed\"\n columns={columns}\n rows={filtered}\n isLoading={isLoading}\n emptyLabel={emptyLabel ?? msg.valueHelpDialogEmpty}\n selectable={isMultiple ? 'multiple' : undefined}\n // Two select-alls on one screen, over two different collections, is how a ticked row\n // disappeared: the header box acts on the table's own `rows` — which is `filtered`\n // here — while the toolbar acts on the whole list. The toolbar's is the one that says\n // what it will do, so the header box goes; the per-row checkboxes stay.\n hideSelectAll={isMultiple}\n selected={isMultiple ? selectedKeys : undefined}\n onSelectionChange={isMultiple ? onSelectionChange : undefined}\n onRowAction={\n isMultiple\n ? undefined\n : (row) => {\n onSelect?.(row);\n onClose?.();\n }\n }\n />\n </div>\n </div>\n </Dialog>\n );\n}\n","import * as React from 'react';\nimport { ModalOverlay, Modal, Dialog as AriaDialog, Heading } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface DialogSlotProps {\n children?: React.ReactNode;\n className?: string;\n}\n\n/** The dialog's heading. Wires itself to the dialog's accessible name through React Aria's\n * `slot=\"title\"`, which is why it cannot be replaced by a bare heading element. */\nexport function DialogTitle({ children, className }: DialogSlotProps) {\n return (\n <Heading slot=\"title\" className={cx('pire-dialog-title', className)}>\n {children}\n </Heading>\n );\n}\n\n/** One line under the title. Say what the action affects, not what the button is called. */\nexport function DialogDescription({ children, className }: DialogSlotProps) {\n return <p className={cx('pire-dialog-sub', className)}>{children}</p>;\n}\n\n/** The scrollable middle. Omit it entirely when the title and description say everything. */\nexport function DialogBody({ children, className }: DialogSlotProps) {\n return <div className={cx('pire-dialog-body', className)}>{children}</div>;\n}\n\n/** The action row. Cancel first, the commit or destructive action last. */\nexport function DialogActions({ children, className }: DialogSlotProps) {\n return <footer className={cx('pire-dialog-foot', className)}>{children}</footer>;\n}\n\n/**\n * The title block and close button at the top of `Dialog` and `SidePanel`. Not exported from the\n * package: `DialogTitle` / `DialogDescription` are the public way to fill it.\n */\nexport function DialogHeader({\n heading,\n description,\n closeLabel,\n onClose,\n}: {\n heading?: React.ReactNode;\n description?: React.ReactNode;\n /** Omit to draw no close button. */\n closeLabel?: string;\n onClose?: () => void;\n}) {\n return (\n <header className=\"pire-dialog-head\">\n <div className=\"pire-dialog-heading\">\n {heading}\n {description}\n </div>\n {closeLabel ? <IconButton icon=\"x\" label={closeLabel} size=\"sm\" onPress={onClose} /> : null}\n </header>\n );\n}\n\nexport interface DialogProps {\n isOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n children?: React.ReactNode;\n /** Right-aligned actions: cancel first, primary or danger last. */\n footer?: React.ReactNode;\n onClose?: () => void;\n /** sm = confirm, md = edit form, lg = value help / table picker. */\n size?: 'sm' | 'md' | 'lg';\n /** Blocks dismiss on outside click / Esc — use only when data would be lost silently. */\n isDismissable?: boolean;\n showClose?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Modal dialog. Focus is trapped, the page behind is inert, and Esc closes unless\n * isDismissable is false — all handled by React Aria. */\nexport function Dialog({\n isOpen,\n onOpenChange,\n title,\n subtitle,\n children,\n footer,\n onClose,\n size = 'md',\n isDismissable = true,\n showClose = true,\n className,\n style,\n}: DialogProps) {\n const msg = usePireMessages();\n const close = () => {\n onClose?.();\n onOpenChange?.(false);\n };\n\n /**\n * Both APIs are supported at once. The props form (`title`, `subtitle`, `footer`) is harder to\n * misuse and stays the default; the sub-components exist so a composed dialog can be written the\n * way it reads, and so a migration can change imports before it changes structure.\n *\n * Slots are hoisted rather than rendered where they sit, because the title and description belong\n * inside the header alongside the close button — a caller should not have to know that. Anything\n * that is not a slot falls through to the body, so mixing prose with a `DialogActions` works.\n */\n const parts = React.Children.toArray(children);\n const slotOf = (type: React.ElementType) =>\n parts.find((node) => React.isValidElement(node) && node.type === type);\n const titleSlot = slotOf(DialogTitle);\n const descriptionSlot = slotOf(DialogDescription);\n const bodySlot = slotOf(DialogBody);\n const actionsSlot = slotOf(DialogActions);\n const slots = [titleSlot, descriptionSlot, bodySlot, actionsSlot];\n const loose = parts.filter((node) => !slots.includes(node));\n\n // A slot always wins over the matching prop: passing both is a mistake, and the more specific\n // one is the better guess at intent.\n const heading = titleSlot ?? (title ? <DialogTitle>{title}</DialogTitle> : null);\n const description =\n descriptionSlot ?? (subtitle ? <DialogDescription>{subtitle}</DialogDescription> : null);\n const actions = actionsSlot ?? (footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null);\n // The body keeps its conditional: it carries --sp-5 of padding, so rendering it empty leaves a\n // ~40px band between the description and the buttons. A confirmation that says everything in its\n // title and description is the normal case, not an edge one.\n const body = bodySlot ?? (loose.length ? <div className=\"pire-dialog-body\">{loose}</div> : null);\n\n return (\n <ModalOverlay\n className=\"pire-modal-overlay\"\n isOpen={isOpen}\n isDismissable={isDismissable}\n onOpenChange={(o) => {\n if (!o) close();\n }}\n >\n <Modal className={cx('pire-modal', className)} data-size={size} style={style}>\n <AriaDialog className=\"pire-dialog\">\n {heading || description ? (\n <DialogHeader\n heading={heading}\n description={description}\n closeLabel={showClose ? msg.dialogClose : undefined}\n onClose={close}\n />\n ) : null}\n {body}\n {actions}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import * as React from 'react';\nimport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableStateContext,\n Column,\n Row,\n Cell,\n type Selection,\n type SortDescriptor,\n} from 'react-aria-components';\nimport { Checkbox } from '../forms/Checkbox';\nimport { Icon } from '../core/Icon';\nimport { SkeletonTableRow } from '../feedback/Skeleton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\n/** The selection column's width, in px. Declared once because the pinned offsets are measured\n * from it: the first pinned data column starts where the checkbox column ends. */\nconst CHECKBOX_W = 44;\n\n/** Collection key of `pendingRow`. Not spelled like a `pire-*` class, for the reason given at\n * `expandedKey` below. */\nconst PENDING_KEY = '__pire_pending_row__';\n\n/** What counts as \"a field\" when the edit row puts focus on its first one. */\nconst FIELD_SELECTOR = [\n 'input:not([type=\"hidden\"]):not([disabled])',\n 'textarea:not([disabled])',\n 'select:not([disabled])',\n 'button:not([disabled])',\n '[contenteditable=\"true\"]',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/**\n * The content of one cell of a row being edited.\n *\n * React Aria's table is a grid with its own keyboard model — arrows move between cells, Space\n * selects, a printable key starts a type-ahead search that moves focus to whichever row matches. A\n * field inside a cell loses every one of those fights: \"Faber Castell\" types an F, jumps to the\n * first row starting with F, and the space selects it. So while focus is inside a field of the row,\n * the grid's navigation is switched off through `TableStateContext` — the same switch React Aria's\n * own column resizing uses — and keys and presses stop here instead of reaching the row. Off again\n * the moment focus leaves the row's fields, so the rest of the table navigates normally.\n */\nfunction EditCell({\n children,\n isFirst,\n focusToken,\n onCommit,\n onCancel,\n}: {\n children: React.ReactNode;\n /** The row's first editable cell owns putting focus in on start and back on the row at the end. */\n isFirst: boolean;\n /** Changes when focus must go back to the first field without a remount — a pending row that\n * was just committed and is now blank again. */\n focusToken: number;\n onCommit: () => void;\n onCancel: () => void;\n}) {\n const state = React.useContext(TableStateContext);\n const setNavDisabled = state?.setKeyboardNavigationDisabled;\n const ref = React.useRef<HTMLDivElement>(null);\n const focusedWithin = React.useRef(false);\n\n React.useLayoutEffect(() => {\n if (!isFirst) return;\n const row = ref.current?.closest<HTMLElement>('[role=\"row\"]');\n // `focusToken` is the dependency that matters: every change is a request to refocus.\n void focusToken;\n for (const cell of row?.querySelectorAll<HTMLElement>('.pire-td-edit') ?? []) {\n const field = cell.querySelector<HTMLElement>(FIELD_SELECTOR);\n if (field) {\n field.focus();\n break;\n }\n }\n }, [isFirst, focusToken]);\n\n React.useLayoutEffect(() => {\n if (!isFirst) return;\n const row = ref.current?.closest<HTMLElement>('[role=\"row\"]');\n return () => {\n // The fields are unmounting with focus in one of them, and the browser is about to drop it\n // on <body>. Hand it to the row instead — which stays, for an existing record — so the user\n // is still in the table, on the record they just edited.\n requestAnimationFrame(() => {\n const active = document.activeElement;\n if (row?.isConnected && (!active || active === document.body || !active.isConnected)) row.focus();\n });\n };\n }, [isFirst]);\n\n React.useEffect(\n () => () => {\n if (focusedWithin.current) setNavDisabled?.(false);\n },\n [setNavDisabled],\n );\n\n const stop = (e: React.SyntheticEvent) => e.stopPropagation();\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: not a control — it only intercepts events bubbling out of the fields inside it, so the grid does not act on them\n <div\n ref={ref}\n className=\"pire-td-edit\"\n onFocus={(e) => {\n // Stopped, so the grid never hears that focus entered it. If it does, its collection picks a\n // row to own focus and the row takes it straight back off the field — the field cannot be\n // focused by script or by Tab, only by a pointer.\n e.stopPropagation();\n focusedWithin.current = true;\n setNavDisabled?.(true);\n }}\n onBlur={(e) => {\n const next = e.relatedTarget as HTMLElement | null;\n const row = ref.current?.closest('[role=\"row\"]');\n if (next && row?.contains(next) && next.closest('.pire-td-edit')) return;\n focusedWithin.current = false;\n setNavDisabled?.(false);\n }}\n onKeyDown={(e) => {\n stop(e);\n if (e.nativeEvent.isComposing || e.defaultPrevented) return;\n if (e.key === 'Enter' && !(e.target instanceof HTMLTextAreaElement)) {\n e.preventDefault();\n onCommit();\n } else if (e.key === 'Escape') {\n e.preventDefault();\n onCancel();\n }\n }}\n onPointerDown={stop}\n onMouseDown={stop}\n onClick={stop}\n >\n {children}\n </div>\n );\n}\n\n/** Value states a single cell can carry. The same five `Badge` uses, so a red cell and a red badge\n * mean the same thing on one screen. */\nexport type DataTableCellTone = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';\n\nexport interface DataTableColumn<T = any> {\n key: string;\n label: string;\n align?: 'left' | 'right' | 'center';\n /**\n * Column width. Applied to the DOM for a **pinned** column, where it is the geometry the whole\n * frozen run is measured from and a number is required. Everywhere else the grid still sizes by\n * content: React Aria's `<Column width>` reaches the DOM only inside a `ResizableTableContainer`,\n * which this table is not, so an unpinned width is a hint the browser is free to ignore.\n */\n width?: number | string;\n /** Right-aligns and switches to tabular mono. Use for every amount, quantity and ID. */\n numeric?: boolean;\n sortable?: boolean;\n /**\n * Keeps `label` for assistive tech but not on screen. For a utility column — a disclosure or\n * row-action column — where a visible header is noise. An *empty* label is not the answer: a\n * header with no text leaves its column unnamed for anyone using a screen reader.\n */\n hideLabel?: boolean;\n render?: (row: T) => React.ReactNode;\n /**\n * The field this cell shows while its row is being edited (`editingRowId`, `pendingRow`). Pass an\n * `Input`, `Select`, `NumberField`… with `aria-label` — there is no visible label in a cell — and\n * own its value yourself. A column without one keeps showing its value, or nothing on the pending\n * row, which has no value yet.\n *\n * For the pending row it is called with `pendingRow`, which is not a full record: read nothing\n * off it that the pending row does not carry.\n */\n renderEdit?: (row: T) => React.ReactNode;\n /**\n * Freezes the column at the start of the grid while the rest scroll horizontally. For a\n * comparison matrix — one product across thirty-four branches — where the row is unreadable\n * once its identity has scrolled away.\n *\n * Requires a numeric `width`: every later pinned column's offset is the sum of the ones before\n * it, and there is nothing to sum otherwise. Only a *leading* run may be pinned.\n */\n pinned?: boolean;\n /**\n * Tints the cell by value state — background from `--status-*-bg`, text from `--status-*-fg`.\n *\n * For a matrix where the *cell* carries the state and the row does not: one branch out of stock\n * while the rest of the product's row is fine. Return `undefined` to leave a cell untinted.\n *\n * This is not a substitute for saying so in words. Colour alone is not a value state — pair it\n * with a figure, a badge or a sub-label that reads the same to someone who cannot see the tint.\n */\n tone?: (row: T) => DataTableCellTone | undefined;\n}\n\nexport interface DataTableSort {\n key: string;\n dir: 'asc' | 'desc';\n}\n\nexport interface DataTableRowProps {\n /** Extra class on the `<tr>`. */\n className?: string;\n /**\n * Greys the row and takes it out of selection and row actions. Use it when a row is present for\n * context but cannot be acted on — and pair it with a cell that says *why*, since a greyed row\n * on its own does not explain itself.\n */\n isDisabled?: boolean;\n}\n\nexport interface DataTableProps<T extends { id: string | number } = any> {\n /** Accessible name for the grid — required. */\n 'aria-label': string;\n /**\n * Keep each column's `render` and `tone` functions stable across renders: define the columns\n * outside the component, or memoize them. The table re-renders its rows only when they change,\n * so stable columns are what make a keystroke in an editing row cost that row's fields rather\n * than every cell. `renderEdit` may change freely — swap it in with a spread\n * (`{ ...nameColumn, renderEdit }`) so the column's other functions keep their identity.\n */\n columns: DataTableColumn<T>[];\n /** Keep the array and its objects stable while nothing changed, for the same reason as `columns`. */\n rows: T[];\n /** Row height: 32 / 40 / 48px. Condensed is the analyst default. */\n density?: 'condensed' | 'regular' | 'comfortable';\n /**\n * `true` / `'multiple'` gives a checkbox column and a select-all header box — see\n * `hideSelectAll` for when the header box is the wrong control.\n *\n * `'single'` selects by pressing the row and renders **no** selection column. That is not a\n * shortcut: a checkbox is a claim that more than one can be ticked, and a checkbox column that\n * silently unticks the previous row reads as a bug. Prefer a master/detail list — the pattern\n * `SplitPane` exists for — over a grid with one checkbox per row.\n */\n selectable?: boolean | 'single' | 'multiple';\n selected?: Array<string | number>;\n onSelectionChange?: (ids: Array<string | number>) => void;\n /**\n * Drops the header's select-all checkbox, keeping the per-row ones.\n *\n * For a table whose `rows` are a *view* of a larger selectable set — a searchable picker where\n * the consumer holds ticks for records the current query filtered out of sight — and where the\n * screen already carries a select-all of its own whose scope is the whole set. Two select-alls\n * on one screen acting on two different collections is the defect this exists to remove, not a\n * choice to offer the user; `ValueHelpDialog`'s multi-select is the call site.\n *\n * The column stays (the row checkboxes need it) and keeps an announced-only name, since a\n * header cell with no text leaves its column unnamed.\n */\n hideSelectAll?: boolean;\n sort?: DataTableSort;\n onSortChange?: (sort: DataTableSort) => void;\n onRowAction?: (row: T) => void;\n emptyLabel?: React.ReactNode;\n /**\n * Summary cells keyed by column, rendered in a real `<tfoot>`.\n *\n * Keyed rather than free-form so a total sits under the column it totals, and stays there when\n * columns are reordered or resized. Columns missing from the map get an empty cell. Hidden while\n * `isLoading`, since a total from the previous response next to skeleton rows reads as current.\n */\n footer?: Record<string, React.ReactNode>;\n /** Per-row presentation and interactivity. Called for every row on every render — keep it cheap. */\n rowProps?: (row: T) => DataTableRowProps;\n /**\n * Detail rendered in a full-width row beneath its parent, for the rows named by `expandedIds`.\n *\n * Expansion is controlled: put the trigger in a column's `render` and track the ids yourself.\n * The table has no opinion on what opens a row, because the affordance differs per screen.\n */\n renderExpanded?: (row: T) => React.ReactNode;\n /** Ids whose `renderExpanded` content is currently shown. */\n expandedIds?: Array<string | number>;\n /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */\n isLoading?: boolean;\n /**\n * The row currently being edited in place. Its `renderEdit` cells swap in for their values, focus\n * goes to the first field, and every key typed into a field belongs to that field — Space types a\n * space, arrows move the caret, letters do not start a row search. Enter in any field calls\n * `onCommitRow`, Escape calls `onCancelRow`; the table does not leave edit mode on its own, so\n * clear this (or keep it, if the save failed) in those handlers.\n *\n * For a 1–3 field master — brands, reasons, helpdesk categories — that has no page or dialog of\n * its own. A row with more fields than that wants `SidePanel presentation=\"docked\"` instead.\n */\n editingRowId?: string | number;\n /**\n * A new record that does not exist in `rows` yet, rendered as an editing row above them. Lets\n * \"New brand\" add a row without inventing a placeholder id. Its handlers receive `null` as the id.\n *\n * After `onCommitRow(null)` focus returns to the pending row's first field, so a consumer that\n * saves and passes a fresh blank `pendingRow` gives the \"Enter saves and opens another\" loop with\n * no focus handling of its own.\n */\n pendingRow?: Partial<T>;\n /** Enter in a field of the editing row. `null` for `pendingRow`. */\n onCommitRow?: (id: string | number | null) => void;\n /** Escape in a field of the editing row. `null` for `pendingRow`. */\n onCancelRow?: (id: string | number | null) => void;\n /** Skeleton row count. Defaults to the current `rows` length, or 5 when there are none. */\n loadingRowCount?: number;\n /** Overrides the dictionary's `dataTableLoading`, announced while the body is a skeleton. */\n loadingLabel?: string;\n stickyHeader?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Records grid. React Aria supplies roving focus, type-ahead, shift-click ranges and\n * screen-reader row/column announcements — do not hand-roll a <table> in product code. */\n/**\n * What the edit fields read on every render. They are rendered through this context rather than\n * baked into the table, so a keystroke in an editing row re-renders the fields alone: the table\n * element itself is reused (see `useTableElement`), and React skips the whole grid.\n */\ninterface LiveEdit {\n // biome-ignore lint/suspicious/noExplicitAny: the context is shared by every DataTable<T>\n columns: DataTableColumn<any>[];\n pendingRow: object | undefined;\n}\nconst LiveEditContext = React.createContext<LiveEdit | null>(null);\n\n/** A column's `renderEdit` for one row, or for the pending row when `row` is null. */\nfunction LiveEditField({ columnKey, row }: { columnKey: string; row: object | null }) {\n const live = React.useContext(LiveEditContext);\n const column = live?.columns.find((c) => c.key === columnKey);\n const target = row ?? live?.pendingRow;\n return target && column?.renderEdit ? column.renderEdit(target) : null;\n}\n\n/**\n * Builds the table element only when something it displays changed, and otherwise hands React the\n * previous element so it skips the grid entirely. Without this every parent render — each\n * keystroke in an editing row's controlled field — re-rendered every React Aria row and cell:\n * ~0.5s per commit at 1,000 rows × 10 columns.\n */\nfunction useTableElement(\n deps: readonly unknown[],\n columnFunctions: readonly unknown[],\n isEditing: boolean,\n build: () => React.ReactElement,\n) {\n const cache = React.useRef<{\n deps: readonly unknown[];\n columnFunctions: readonly unknown[];\n element: React.ReactElement;\n }>(null);\n const churn = React.useRef(0);\n const prev = cache.current;\n if (prev && sameValues(prev.deps, deps) && sameValues(prev.columnFunctions, columnFunctions)) {\n churn.current = 0;\n return prev.element;\n }\n // Rebuilt for nothing but new column functions, mid-edit, several renders running: the consumer\n // is recreating `render`/`tone` on every render, and every keystroke pays for the whole grid.\n if (IS_DEV && isEditing && prev && sameValues(prev.deps, deps) && ++churn.current === 3) {\n warnOnce(\n 'datatable:columns-churn',\n 'DataTable columns get new render/tone functions on every render, so each keystroke in an editing row re-renders the whole table. Define the columns outside the component or memoize them; see the `columns` prop.',\n );\n }\n cache.current = { deps, columnFunctions, element: build() };\n return cache.current.element;\n}\nconst sameValues = (a: readonly unknown[], b: readonly unknown[]) =>\n a.length === b.length && a.every((v, i) => Object.is(v, b[i]));\n\nexport function DataTable<T extends { id: string | number }>({\n columns,\n rows,\n density = 'regular',\n selectable,\n selected,\n onSelectionChange,\n hideSelectAll,\n sort,\n onSortChange,\n onRowAction,\n stickyHeader = true,\n emptyLabel,\n isLoading,\n loadingRowCount,\n loadingLabel,\n footer,\n rowProps,\n renderExpanded,\n expandedIds,\n editingRowId,\n pendingRow,\n onCommitRow,\n onCancelRow,\n className,\n style,\n 'aria-label': ariaLabel,\n}: DataTableProps<T>) {\n const msg = usePireMessages();\n const [pendingFocus, setPendingFocus] = React.useState(0);\n // Handlers are read at call time, so an inline arrow from the consumer does not count as a change\n // to the table and rebuild it (see `useTableElement`).\n const latest = React.useRef({ onSelectionChange, onSortChange, onRowAction, onCommitRow, onCancelRow });\n latest.current = { onSelectionChange, onSortChange, onRowAction, onCommitRow, onCancelRow };\n const isEditing = (row: T) => editingRowId != null && String(row.id) === String(editingRowId);\n\n // `true` means `'multiple'`; only that mode gets a checkbox column (see `selectable`).\n const selectionMode =\n selectable === true || selectable === 'multiple'\n ? 'multiple'\n : selectable === 'single'\n ? 'single'\n : 'none';\n const hasCheckboxColumn = selectionMode === 'multiple';\n\n /**\n * The frozen run, and the left offset of each column in it.\n *\n * Only a leading run can be frozen: an offset is the sum of the widths before it, and a\n * scrolling column in the middle has no fixed width to contribute. A gap therefore truncates\n * rather than mispositioning everything after it — and warns, because a column that silently\n * stops being pinned is a layout bug nobody goes looking for. Warned, not thrown: production\n * must not lose the whole table over a misconfigured column.\n */\n const pinnedGeometry = React.useMemo(() => {\n const geometry = new Map<string, { left: number; width: number }>();\n let x = hasCheckboxColumn ? CHECKBOX_W : 0;\n // Which of the two ways the run can end, because they warn about different columns and a\n // column that hits one must not also be reported for the other.\n let broke: 'unpinned' | 'width' | null = null;\n for (const column of columns) {\n if (!column.pinned) {\n broke = 'unpinned';\n break;\n }\n if (typeof column.width !== 'number') {\n if (IS_DEV)\n warnOnce(\n `datatable:pin-width:${column.key}`,\n `DataTable column \"${column.key}\" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`,\n );\n broke = 'width';\n break;\n }\n geometry.set(column.key, { left: x, width: column.width });\n x += column.width;\n }\n // Only an *unpinned* column strands the pinned ones behind it. A column that failed the width\n // check has already been named above, and every pinned column after it is stranded by that\n // one failure rather than by a gap of its own.\n if (IS_DEV && broke === 'unpinned') {\n const stranded = columns.slice(geometry.size).find((c) => c.pinned);\n if (stranded) {\n warnOnce(\n `datatable:pin-gap:${stranded.key}`,\n `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.`,\n );\n }\n }\n return geometry;\n }, [columns, hasCheckboxColumn]);\n const hasPinned = pinnedGeometry.size > 0;\n const lastPinnedKey = hasPinned ? [...pinnedGeometry.keys()][pinnedGeometry.size - 1] : undefined;\n const sortDescriptor: SortDescriptor | undefined = sort\n ? { column: sort.key, direction: sort.dir === 'asc' ? 'ascending' : 'descending' }\n : undefined;\n const handleSelection = (selection: Selection) => {\n // The pending row is a collection item React Aria can select, but not a record the consumer has.\n const keys =\n selection !== 'all' && selection.has(PENDING_KEY)\n ? new Set([...selection].filter((key) => key !== PENDING_KEY))\n : selection;\n // \"Select all\" *adds* the collection to the selection; it never replaces it. `rows` is not\n // always the whole selectable universe — a picker hands this table the filtered list while the\n // consumer holds ticks spanning the unfiltered one — and replacing would silently drop every\n // record the current query happens to hide. Ctrl/Cmd+A reaches this branch too, so the union\n // has to live here rather than at any one affordance. Row order first, so a table whose\n // selection is already a subset of its rows emits exactly what it always did.\n if (keys === 'all') {\n const inCollection = new Set(rows.map((r) => r.id));\n return latest.current.onSelectionChange?.([\n ...rows.map((r) => r.id),\n ...(selected ?? []).filter((id) => !inCollection.has(id)),\n ]);\n }\n latest.current.onSelectionChange?.([...keys] as Array<string | number>);\n };\n\n // Defaulting to the current row count keeps the grid the same height across a reload, so the\n // page does not jump under the pointer that just pressed Go.\n const skeletonRows = loadingRowCount ?? (rows.length || 5);\n const skeletonColumns = [\n ...(hasCheckboxColumn ? [{ width: CHECKBOX_W }] : []),\n ...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric })),\n ];\n // SkeletonTableRow is not a <tr> and cannot live inside React Aria's collection. Feeding the\n // Table an empty collection and rendering the skeletons through renderEmptyState is what keeps\n // the real header — and its sort state — mounted while the body is a placeholder.\n const body = isLoading ? [] : rows;\n\n const firstEditable = columns.find((c) => c.renderEdit);\n const presentation = new Map(rows.map((row) => [row.id, rowProps?.(row) ?? {}]));\n // Row disabling is a collection-level concern in React Aria, not a prop on Row: `disabledKeys`\n // is what removes a row from selection, row actions and the focus order in one go.\n const disabledKeys = rows.filter((row) => presentation.get(row.id)?.isDisabled).map((row) => row.id);\n const expanded = new Set((expandedIds ?? []).map(String));\n const spanAll = columns.length + (hasCheckboxColumn ? 1 : 0);\n /**\n * Detail rows are siblings in the collection, so their keys must not collide with a record id.\n * Deliberately not spelled like a `pire-*` class: `styles.css.test.ts` reads `pire-*` string\n * literals in component source as class references.\n */\n const expandedKey = (id: string | number) => `${id}::__pire_expanded__`;\n\n /**\n * Everything a frozen cell needs on the element itself: where it sticks, and how wide it is.\n *\n * The width is not decoration. Every offset above is the sum of the declared widths before it,\n * so the column has to *be* that wide or the run gapes open and then overlaps — `position:\n * sticky` can push a cell right, never pull it left. `<Column width>` does not reach the DOM\n * (see the `width` prop), so it is applied here, through the `style` React Aria does forward. All three of `width`/`min-width`/\n * `max-width` are set because under `table-layout: auto` a lone `width` is a suggestion the\n * layout algorithm is free to grow past.\n */\n const pinProps = (key: string | null) => {\n if (!hasPinned) return {};\n const box = key === null ? { left: 0, width: CHECKBOX_W } : pinnedGeometry.get(key);\n if (!box) return {};\n return {\n 'data-pinned': 'true',\n 'data-pinned-last': key !== null && key === lastPinnedKey ? 'true' : undefined,\n style: { left: box.left, width: box.width, minWidth: box.width, maxWidth: box.width },\n } as const;\n };\n\n /** What every data cell carries, in the body, the pending row and the footer alike. */\n const cellProps = (c: DataTableColumn<T>) => {\n const pin = pinProps(c.key);\n return {\n 'data-numeric': c.numeric ? 'true' : undefined,\n ...pin,\n style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : undefined },\n } as const;\n };\n\n const renderRecord = (row: T, editing: boolean) => {\n const rowIsDisabled = presentation.get(row.id)?.isDisabled;\n return (\n <Row\n key={row.id}\n id={row.id}\n className={cx('pire-tr', presentation.get(row.id)?.className)}\n data-pressable={onRowAction && !rowIsDisabled && !editing ? 'true' : undefined}\n data-editing={editing ? 'true' : undefined}\n >\n {hasCheckboxColumn ? (\n <Cell className=\"pire-td\" {...pinProps(null)}>\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectRow} />\n </Cell>\n ) : null}\n {columns.map((c) => (\n <Cell key={c.key} className=\"pire-td\" data-tone={c.tone?.(row) ?? undefined} {...cellProps(c)}>\n {editing && c.renderEdit ? (\n <EditCell\n isFirst={c === firstEditable}\n focusToken={0}\n onCommit={() => latest.current.onCommitRow?.(row.id)}\n onCancel={() => latest.current.onCancelRow?.(row.id)}\n >\n <LiveEditField columnKey={c.key} row={row} />\n </EditCell>\n ) : c.render ? (\n c.render(row)\n ) : (\n (row as Record<string, React.ReactNode>)[c.key]\n )}\n </Cell>\n ))}\n </Row>\n );\n };\n const renderDetail = (row: T) => (\n <Row key={expandedKey(row.id)} id={expandedKey(row.id)} className=\"pire-tr-expanded\">\n <Cell className=\"pire-td-expanded\" colSpan={spanAll}>\n {renderExpanded?.(row)}\n </Cell>\n </Row>\n );\n // Everything the table displays. Function props that only run on an event are read through\n // `latest` instead; `renderEdit` and `pendingRow` reach the fields through LiveEditContext. The\n // rest is compared by identity, so a long table re-renders on an edit keystroke only while\n // `columns`, `rows`, `footer` and `expandedIds` keep theirs.\n const table = useTableElement(\n [\n rows,\n isLoading,\n loadingRowCount,\n loadingLabel,\n emptyLabel,\n density,\n stickyHeader,\n hideSelectAll,\n selectionMode,\n ariaLabel,\n selected,\n sort?.key,\n sort?.dir,\n editingRowId,\n pendingRow != null,\n pendingFocus,\n expandedIds,\n renderExpanded,\n footer,\n msg,\n Boolean(onRowAction),\n ...columns.flatMap((c) => [\n c.key,\n c.label,\n c.align,\n c.width,\n c.numeric,\n c.sortable,\n c.hideLabel,\n c.pinned,\n Boolean(c.renderEdit),\n ]),\n ...rows.flatMap((row) => [presentation.get(row.id)?.className, presentation.get(row.id)?.isDisabled]),\n ],\n columns.flatMap((c) => [c.render, c.tone]),\n editingRowId != null || pendingRow != null,\n () => (\n <Table\n className=\"pire-table\"\n data-density={density}\n data-sticky={String(stickyHeader)}\n data-pinned={hasPinned ? 'true' : undefined}\n aria-label={ariaLabel}\n disabledKeys={disabledKeys.length ? new Set(disabledKeys) : undefined}\n selectionMode={selectionMode}\n selectedKeys={selected ? new Set(selected) : undefined}\n onSelectionChange={handleSelection}\n sortDescriptor={sortDescriptor}\n onSortChange={(d) =>\n latest.current.onSortChange?.({\n key: String(d.column),\n dir: d.direction === 'ascending' ? 'asc' : 'desc',\n })\n }\n onRowAction={\n onRowAction\n ? (key) => {\n const row = rows.find((r) => String(r.id) === String(key));\n // A press on an editing row's padding is someone aiming at a field, not opening the\n // record out from under their own unsaved edit.\n if (row && !isEditing(row)) latest.current.onRowAction?.(row);\n }\n : undefined\n }\n >\n <TableHeader className=\"pire-thead-row\">\n {hasCheckboxColumn ? (\n <Column className=\"pire-th\" {...pinProps(null)}>\n {hideSelectAll ? (\n <span className=\"pire-sr-only\">{msg.dataTableSelectionColumn}</span>\n ) : (\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectAll} />\n )}\n </Column>\n ) : null}\n {columns.map((c, i) => (\n // The first *data* column is the row header, checkbox column or not: a selection\n // control does not identify the record, and React Aria throws without a row header.\n <Column\n key={c.key}\n id={c.key}\n className=\"pire-th\"\n isRowHeader={i === 0}\n allowsSorting={c.sortable}\n data-align={c.numeric || c.align === 'right' ? 'right' : c.align}\n data-allows-sorting={c.sortable ? 'true' : undefined}\n {...pinProps(c.key)}\n >\n {/* One class or the other, never both — see `.pire-sr-only` in CLAUDE.md. */}\n <span className={c.hideLabel ? 'pire-sr-only' : 'pire-th-inner'}>\n {c.label}\n {c.sortable ? (\n <Icon\n size={12}\n name={\n sort?.key === c.key\n ? sort.dir === 'asc'\n ? 'arrow-up'\n : 'arrow-down'\n : 'chevrons-up-down'\n }\n className=\"pire-th-sort-icon\"\n data-active={sort?.key === c.key ? 'true' : undefined}\n />\n ) : null}\n </span>\n </Column>\n ))}\n </TableHeader>\n <TableBody\n renderEmptyState={() =>\n isLoading ? (\n <div className=\"pire-table-loading\" role=\"status\" aria-live=\"polite\">\n <span className=\"pire-sr-only\">{loadingLabel ?? msg.dataTableLoading}</span>\n {Array.from({ length: skeletonRows }, (_, i) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.\n <SkeletonTableRow key={i} columns={skeletonColumns} density={density} />\n ))}\n </div>\n ) : (\n <div className=\"pire-table-empty\">{emptyLabel ?? msg.dataTableEmpty}</div>\n )\n }\n >\n {pendingRow && !isLoading ? (\n <Row\n key={PENDING_KEY}\n id={PENDING_KEY}\n className=\"pire-tr\"\n data-editing=\"true\"\n data-pending=\"true\"\n >\n {/* No checkbox: there is no record to select yet. */}\n {hasCheckboxColumn ? <Cell className=\"pire-td\" {...pinProps(null)} /> : null}\n {columns.map((c) => (\n <Cell key={c.key} className=\"pire-td\" {...cellProps(c)}>\n {c.renderEdit ? (\n <EditCell\n isFirst={c === firstEditable}\n focusToken={pendingFocus}\n onCommit={() => {\n latest.current.onCommitRow?.(null);\n setPendingFocus((n) => n + 1);\n }}\n onCancel={() => latest.current.onCancelRow?.(null)}\n >\n <LiveEditField columnKey={c.key} row={null} />\n </EditCell>\n ) : null}\n </Cell>\n ))}\n </Row>\n ) : null}\n {body.flatMap((row) => {\n const record = renderRecord(row, isEditing(row));\n if (!renderExpanded || !expanded.has(String(row.id))) return [record];\n return [record, renderDetail(row)];\n })}\n </TableBody>\n {footer && !isLoading ? (\n <TableFooter className=\"pire-tfoot\">\n <Row id=\"__pire_footer__\" className=\"pire-tr-footer\">\n {hasCheckboxColumn ? <Cell className=\"pire-tf\" {...pinProps(null)} /> : null}\n {columns.map((c, i) => (\n <Cell key={c.key} className=\"pire-tf\" {...cellProps(c)}>\n {/* React Aria makes the row's first cell a rowheader, and an empty rowheader\n leaves every other cell in the row unnamed. Totals usually start in a later\n column, so the first cell falls back to an announced-only label rather than\n to nothing. Unconditional on the checkbox column: the row header is the\n first *data* column either way — the leading `<Cell>` a checkbox column\n contributes to the footer is not one, exactly as in the body. */}\n {footer[c.key] ??\n (i === 0 ? <span className=\"pire-sr-only\">{msg.dataTableSummaryRow}</span> : null)}\n </Cell>\n ))}\n </Row>\n </TableFooter>\n ) : null}\n </Table>\n ),\n );\n\n return (\n <div\n className={cx('pire-table-wrap', className)}\n style={style}\n data-loading={isLoading ? 'true' : undefined}\n aria-busy={isLoading ? 'true' : undefined}\n >\n <LiveEditContext.Provider value={{ columns, pendingRow }}>{table}</LiveEditContext.Provider>\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport type SkeletonShape = 'text' | 'block' | 'circle';\n\nexport interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** text — a line of copy; block — a card, chart or image; circle — an avatar. */\n shape?: SkeletonShape;\n /** Overrides the shape's default. A percentage reads better than a pixel count in a\n * fluid layout, and keeps the placeholder honest when the real value is unknown. */\n width?: number | string;\n height?: number | string;\n}\n\n/** Loading placeholder for content whose shape is known before its value is.\n *\n * Deliberately `aria-hidden`: a screen reader gains nothing from \"graphic, graphic, graphic\",\n * and announcing placeholders as content is worse than silence. Announce the wait once, on the\n * region that is loading — `aria-busy=\"true\"` on the container, or a live-region message — and\n * let the skeleton be purely visual. Nothing inside is focusable, so keyboard order is\n * unaffected while the data is in flight.\n *\n * The shimmer is suppressed under `prefers-reduced-motion`; the placeholder still reads as one\n * because the shape and the surface contrast carry it, not the animation. */\nexport function Skeleton({ shape = 'text', width, height, className, style, ...rest }: SkeletonProps) {\n return (\n <div\n className={cx('pire-skeleton', className)}\n data-shape={shape}\n aria-hidden=\"true\"\n style={{ width, height, ...style }}\n {...rest}\n />\n );\n}\n\nexport interface SkeletonTableColumn {\n align?: 'left' | 'right' | 'center';\n /** Fixed column width. Omit to let the column share the free space, as DataTable does. */\n width?: number | string;\n /** Right-aligns the bar. Mirrors DataTable's column flag so a loading table and a loaded one\n * put their numbers in the same place. */\n numeric?: boolean;\n}\n\nexport interface SkeletonTableRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** A column count, or one descriptor per column when alignment or width matters. */\n columns: number | SkeletonTableColumn[];\n /** Must match the DataTable it stands in for, or the rows jump on load. */\n density?: 'condensed' | 'regular' | 'comfortable';\n}\n\n/* Bar widths cycle instead of being random: a random width would be a different number on every\n render, so the placeholder would twitch under any unrelated re-render. Four values is enough\n for the ragged look of real data without a visible repeat at normal column counts. */\nconst BAR_WIDTHS = ['72%', '54%', '86%', '63%'];\n\n/** One placeholder row, sized to line up with `DataTable` — same row height per density, same\n * cell padding, same bottom rule. Render a handful inside `.pire-table-wrap` (or above a real\n * table's body) while the first page loads, so the grid does not resize when it arrives.\n *\n * It is not a real `<tr>` and cannot be handed to `DataTable` as a row: DataTable builds its\n * collection from `rows`, and React Aria's table owns everything under it. Use it in place of\n * the table, not inside one. */\nexport function SkeletonTableRow({\n columns,\n density = 'regular',\n className,\n style,\n ...rest\n}: SkeletonTableRowProps) {\n const cells: SkeletonTableColumn[] =\n typeof columns === 'number' ? Array.from({ length: columns }, () => ({})) : columns;\n return (\n <div\n className={cx('pire-skeleton-row', className)}\n data-density={density}\n aria-hidden=\"true\"\n style={style}\n {...rest}\n >\n {cells.map((c, i) => {\n const align = c.numeric ? 'right' : (c.align ?? 'left');\n return (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.\n key={i}\n className=\"pire-skeleton-cell\"\n data-align={align}\n style={{ width: c.width, flex: c.width ? '0 0 auto' : undefined }}\n >\n <Skeleton width={BAR_WIDTHS[i % BAR_WIDTHS.length]} />\n </div>\n );\n })}\n </div>\n );\n}\n","import * as React from 'react';\nimport { FileTrigger } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { ProgressBar } from '../feedback/ProgressBar';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface PireFile {\n /** The browser's `File`. Pire uploads nothing — that is the app's job. */\n file: File;\n /** Object URL, only for images with `showPreview`. Revoked once the file leaves the list. */\n previewUrl?: string;\n}\n\nexport interface FileRejection {\n file: File;\n reason: 'size' | 'type';\n}\n\n/**\n * Everything a caller can put on the wrapper: `id`, `data-*`, `aria-describedby`.\n *\n * The omissions are this component's own props under names the DOM also uses, and would otherwise\n * collide: `onChange` and `onError` carry files and rejections rather than DOM events, and\n * `defaultValue` a file list rather than a string.\n */\nexport type FileFieldPassthrough = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'onError' | 'defaultValue' | 'color'\n>;\n\nexport interface FileUploadProps extends FileFieldPassthrough {\n label?: React.ReactNode;\n /** Controlled / uncontrolled, the same pair as `Tabs` and `MultiComboBox`. */\n value?: PireFile[];\n defaultValue?: PireFile[];\n onChange?: (files: PireFile[]) => void;\n /** Mime types or extensions, exactly as `FileTrigger.acceptedFileTypes` takes them. */\n acceptedFileTypes?: readonly string[];\n allowsMultiple?: boolean;\n /** Ceiling in bytes. Oversized files are rejected and reported, never held. */\n maxSize?: number;\n /** Rejections, so the app can word its own message. */\n onError?: (rejections: FileRejection[]) => void;\n /** Thumbnail for images. Turn it off for CSVs, where a thumbnail says nothing. */\n showPreview?: boolean;\n /** Upload progress 0–100, while the app is doing the uploading. */\n uploadProgress?: number;\n /** Overrides the dictionary's `fileUploadChoose`. */\n chooseLabel?: string;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst isImage = (file: File) => file.type.startsWith('image/');\n\n/** Human-readable size. Deliberately not localised digits: `toLocaleString` on the number only. */\nexport function formatFileSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024).toLocaleString()} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\n/** Splits a picked list into keepers and rejections, without uploading or mutating anything. */\nexport function screenFiles(\n files: File[],\n { maxSize, acceptedFileTypes }: { maxSize?: number; acceptedFileTypes?: readonly string[] },\n): { accepted: File[]; rejected: FileRejection[] } {\n const accepted: File[] = [];\n const rejected: FileRejection[] = [];\n\n for (const file of files) {\n if (maxSize != null && file.size > maxSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n // `acceptedFileTypes` mirrors the input's accept attribute, which the OS picker already\n // enforces — but drag-and-drop bypasses that picker entirely, so it is checked here too.\n if (acceptedFileTypes?.length) {\n const ok = acceptedFileTypes.some((t) =>\n t.startsWith('.')\n ? file.name.toLowerCase().endsWith(t.toLowerCase())\n : t.endsWith('/*')\n ? file.type.startsWith(t.slice(0, -1))\n : file.type === t,\n );\n if (!ok) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n }\n accepted.push(file);\n }\n return { accepted, rejected };\n}\n\n/**\n * Creates preview URLs and revokes each one as soon as its file leaves the list — removed,\n * replaced, or dropped by a controlled consumer — and the rest on unmount. Object URLs hold the\n * whole image in memory until revoked; an attachments screen stays open all day.\n */\nfunction usePreviewUrls(files: PireFile[]): (file: File) => string {\n const owned = React.useRef(new Set<string>());\n React.useEffect(() => {\n const live = new Set(files.map((f) => f.previewUrl));\n for (const url of owned.current) {\n if (live.has(url)) continue;\n URL.revokeObjectURL(url);\n owned.current.delete(url);\n }\n }, [files]);\n React.useEffect(() => {\n const urls = owned.current;\n return () => {\n for (const url of urls) URL.revokeObjectURL(url);\n urls.clear();\n };\n }, []);\n return (file) => {\n const url = URL.createObjectURL(file);\n owned.current.add(url);\n return url;\n };\n}\n\ntype FileListOptions = Pick<\n FileUploadProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'acceptedFileTypes'\n | 'allowsMultiple'\n | 'maxSize'\n | 'onError'\n | 'showPreview'\n | 'isDisabled'\n | 'isReadOnly'\n>;\n\n/**\n * The file list behind `FileUpload` and `FileDropZone`: controlled / uncontrolled state, screening,\n * preview URLs, and add / remove. `accept` ignores everything while the field is disabled or\n * read-only, whichever path the files arrived by.\n */\nexport function useFileList({\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview = true,\n isDisabled,\n isReadOnly,\n}: FileListOptions) {\n const [uncontrolled, setUncontrolled] = React.useState<PireFile[]>(defaultValue ?? []);\n const files = value ?? uncontrolled;\n const previewUrlFor = usePreviewUrls(files);\n\n const commit = (next: PireFile[]) => {\n if (value === undefined) setUncontrolled(next);\n onChange?.(next);\n };\n\n const accept = (picked: File[]) => {\n if (isDisabled || isReadOnly || !picked.length) return;\n const { accepted, rejected } = screenFiles(picked, { maxSize, acceptedFileTypes });\n if (rejected.length) onError?.(rejected);\n if (!accepted.length) return;\n\n const wrapped = accepted.map((file) => {\n const previewUrl = showPreview && isImage(file) ? previewUrlFor(file) : undefined;\n return { file, previewUrl };\n });\n commit(allowsMultiple ? [...files, ...wrapped] : wrapped.slice(0, 1));\n };\n\n const remove = (target: File) => commit(files.filter((f) => f.file !== target));\n\n return { files, accept, remove };\n}\n\n/**\n * Ids for the label, hint and error. Neither file field has a React Aria field context, so each\n * wires these to its own control by hand.\n */\nexport function useFileFieldIds({\n label,\n description,\n errorMessage,\n isInvalid,\n}: Pick<FileUploadProps, 'label' | 'description' | 'errorMessage' | 'isInvalid'>) {\n const id = React.useId();\n const labelId = label ? `${id}-label` : undefined;\n const hintId = description ? `${id}-hint` : undefined;\n const errorId = isInvalid && errorMessage ? `${id}-error` : undefined;\n const describedBy = [hintId, errorId].filter(Boolean).join(' ') || undefined;\n return { id, labelId, hintId, errorId, describedBy };\n}\n\nexport function FileFieldLabel({\n id,\n label,\n isRequired,\n}: {\n id?: string;\n label?: React.ReactNode;\n isRequired?: boolean;\n}) {\n if (!label) return null;\n return (\n <span className=\"pire-field-label\" id={id}>\n {label}\n {isRequired ? (\n <span className=\"pire-field-req\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </span>\n );\n}\n\n/** The chosen files, the upload progress, then the hint and the error — everything below the control. */\nexport function FileFieldFooter({\n files,\n onRemove,\n uploadProgress,\n description,\n errorMessage,\n hintId,\n errorId,\n}: {\n files: PireFile[];\n /** Omitted while the field is disabled or read-only, which hides the remove buttons. */\n onRemove?: (file: File) => void;\n uploadProgress?: number;\n description?: React.ReactNode;\n errorMessage?: React.ReactNode;\n hintId?: string;\n errorId?: string;\n}) {\n const msg = usePireMessages();\n return (\n <>\n {files.length ? (\n <ul className=\"pire-fileupload-list\">\n {files.map(({ file, previewUrl }) => (\n <li key={`${file.name}-${file.size}-${file.lastModified}`} className=\"pire-fileupload-item\">\n {previewUrl ? (\n <img className=\"pire-fileupload-thumb\" src={previewUrl} alt=\"\" />\n ) : (\n <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />\n )}\n <span className=\"pire-fileupload-name\">{file.name}</span>\n <span className=\"pire-fileupload-size\">{formatFileSize(file.size)}</span>\n {onRemove ? (\n <IconButton\n icon=\"x\"\n size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => onRemove(file)}\n />\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} /> : null}\n\n {description ? (\n <span className=\"pire-field-hint\" id={hintId}>\n {description}\n </span>\n ) : null}\n {errorId ? (\n <span className=\"pire-field-error\" id={errorId}>\n {errorMessage}\n </span>\n ) : null}\n </>\n );\n}\n\n/**\n * File picker with a list of what was chosen. Pire hands back `File`s through `onChange` and\n * uploads nothing: the app owns the `FormData`, the request and the progress it reports back\n * through `uploadProgress`.\n */\nexport function FileUpload({\n label,\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview = true,\n uploadProgress,\n chooseLabel,\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isReadOnly,\n isRequired,\n fullWidth = true,\n className,\n style,\n ...rest\n}: FileUploadProps) {\n const msg = usePireMessages();\n const { files, accept, remove } = useFileList({\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview,\n isDisabled,\n isReadOnly,\n });\n const { id, labelId, hintId, errorId, describedBy } = useFileFieldIds({\n label,\n description,\n errorMessage,\n isInvalid,\n });\n\n return (\n <div\n className={cx('pire-field', 'pire-fileupload', className)}\n style={style}\n data-full-width={String(fullWidth)}\n data-invalid={isInvalid ? 'true' : undefined}\n {...rest}\n >\n <FileFieldLabel id={labelId} label={label} isRequired={isRequired} />\n\n <FileTrigger\n acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple}\n onSelect={(list) => accept(list ? [...list] : [])}\n >\n <Button\n id={`${id}-button`}\n icon=\"paperclip\"\n isDisabled={isDisabled || isReadOnly}\n aria-labelledby={labelId ? `${labelId} ${id}-button` : undefined}\n aria-describedby={describedBy}\n >\n {chooseLabel ?? msg.fileUploadChoose}\n </Button>\n </FileTrigger>\n\n <FileFieldFooter\n files={files}\n onRemove={isDisabled || isReadOnly ? undefined : remove}\n uploadProgress={uploadProgress}\n description={description}\n errorMessage={errorMessage}\n hintId={hintId}\n errorId={errorId}\n />\n </div>\n );\n}\n","import type * as React from 'react';\nimport { ProgressBar as AriaProgressBar, Label } from 'react-aria-components';\nimport { cx } from '../utils/cx';\n\nexport interface ProgressBarProps {\n value?: number;\n minValue?: number;\n maxValue?: number;\n label?: React.ReactNode;\n showValue?: boolean;\n /** Indeterminate work — no percentage is announced. */\n isIndeterminate?: boolean;\n /** Colours the fill — e.g. negative when a budget is overrun. */\n status?: 'informative' | 'positive' | 'critical' | 'negative';\n size?: 'sm' | 'md';\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function ProgressBar({\n value = 0,\n minValue = 0,\n maxValue = 100,\n label,\n showValue = true,\n isIndeterminate,\n status = 'informative',\n size = 'md',\n className,\n style,\n}: ProgressBarProps) {\n return (\n <AriaProgressBar\n className={cx('pire-progress', className)}\n data-status={status}\n data-size={size}\n value={value}\n minValue={minValue}\n maxValue={maxValue}\n isIndeterminate={isIndeterminate}\n style={style}\n >\n {({ percentage, valueText }) => (\n <>\n {label || showValue ? (\n <div className=\"pire-progress-head\">\n {label ? <Label>{label}</Label> : <span />}\n {showValue && !isIndeterminate ? <span className=\"pire-numeric\">{valueText}</span> : null}\n </div>\n ) : null}\n <div className=\"pire-progress-track\">\n <div className=\"pire-progress-fill\" style={{ width: `${isIndeterminate ? 40 : percentage}%` }} />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n}\n","import type * as React from 'react';\nimport { MenuTrigger, Button as AriaButton, Popover } from 'react-aria-components';\nimport { IconButton } from '../core/IconButton';\nimport { Breadcrumb, type BreadcrumbItem } from './Breadcrumb';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n /** Wordmark at far left, uppercase micro-caps. */\n product?: string;\n /** 1–3 letter monogram tile before the wordmark — stand-in for a customer logo. */\n monogram?: string;\n /** Current app or object title. */\n title?: React.ReactNode;\n /**\n * Where the user is — \"Ventas › Órdenes de venta › OV-000128\" — drawn after `product`, behind a\n * separator, in the bar's own colours. Current step last; it is marked `aria-current=\"page\"` and\n * is never a link. `href`s navigate through `RouterProvider`, like every other Pire link.\n *\n * The trail is the part of the bar that gives way: it takes the room the actions leave, folds its\n * middle steps into a \"…\" menu when it does not fit, and then truncates the current step with an\n * ellipsis. A screen that draws its own `Breadcrumb` above the page can drop it — the bar keeps\n * the trail in one place on every screen without costing a row of height.\n *\n * Prefer this to putting a `Breadcrumb` in `title`, which sets it in bold, on the page's link\n * colours, and with no width management.\n */\n breadcrumb?: BreadcrumbItem[];\n /** Called with a step's `id` (or its `label` when it has none) when it is pressed — for a step\n * without an `href`, or to observe navigation. Same contract as `Breadcrumb`'s `onNavigate`. */\n onBreadcrumbNavigate?: (id: string) => void;\n /**\n * The leftmost cell of the bar — pass an `AppLauncher`.\n *\n * A slot rather than launcher props of its own: the bar's job is placement, and the catalogue,\n * its search and its open state all belong to the launcher. It renders before `onMenu`, sized to\n * `--rail-w` and pulled through the bar's padding, so it sits directly above `ShellRail`.\n */\n launcher?: React.ReactNode;\n onMenu?: () => void;\n onSearch?: () => void;\n /** Accessible name for the menu button. Defaults to the dictionary's `shellBarMenu`. */\n menuLabel?: string;\n /** Accessible name for the search button. Defaults to the dictionary's `shellBarSearch`. */\n searchLabel?: string;\n /** IconButtons with variant=\"inverse\". */\n actions?: React.ReactNode;\n /** Full name — initials render into the avatar. */\n user?: string;\n /**\n * Turns the avatar into a menu trigger. Pass a `Menu` — the entries are the product's, because\n * they differ per app; only the trigger belongs here.\n *\n * Without it the avatar stays a plain `role=\"img\"`, so nothing that renders a bare `user` today\n * changes. With it the avatar becomes a real `<button>` carrying `aria-haspopup` and\n * `aria-expanded`.\n */\n userMenu?: React.ReactNode;\n /** Accessible name of the avatar button. `{user}` is replaced with the name. Defaults to the\n * dictionary's `shellBarUserMenu`, for the same reason as {@link ShellBarProps.menuLabel}. */\n userMenuLabel?: string;\n}\n\nconst initials = (name: string) =>\n name\n .trim()\n .split(/\\s+/)\n .slice(0, 2)\n .map((p) => p[0])\n .join('')\n .toUpperCase();\n\n/** Fixed 48px application chrome. One per page, always the first landmark. */\nexport function ShellBar({\n launcher,\n product,\n monogram,\n title,\n breadcrumb,\n onBreadcrumbNavigate,\n onMenu,\n onSearch,\n menuLabel,\n searchLabel,\n actions,\n user,\n userMenu,\n userMenuLabel,\n className,\n ...rest\n}: ShellBarProps) {\n const msg = usePireMessages();\n return (\n <header className={cx('pire-shellbar', className)} {...rest}>\n {launcher}\n {onMenu ? (\n <IconButton\n icon=\"menu\"\n label={menuLabel ?? msg.shellBarMenu}\n variant=\"inverse\"\n size=\"sm\"\n onPress={onMenu}\n />\n ) : null}\n {monogram ? (\n <span className=\"pire-shellbar-mono\" aria-hidden=\"true\">\n {monogram}\n </span>\n ) : null}\n {product ? <span className=\"pire-shellbar-product\">{product}</span> : null}\n {breadcrumb?.length ? (\n <nav className=\"pire-shellbar-crumbs\" aria-label={msg.breadcrumbLabel}>\n {product || monogram ? <span className=\"pire-shellbar-sep\" aria-hidden=\"true\" /> : null}\n <Breadcrumb items={breadcrumb} onNavigate={onBreadcrumbNavigate} isCollapsible />\n </nav>\n ) : null}\n {title ? <span className=\"pire-shellbar-title\">{title}</span> : null}\n {/* With a trail the spacer would split the free room with it, and the trail would collapse\n while half the bar sat empty. The trail is the flexible item instead. */}\n {breadcrumb?.length ? null : <span className=\"pire-shellbar-spacer\" />}\n {onSearch ? (\n <IconButton\n icon=\"search\"\n label={searchLabel ?? msg.shellBarSearch}\n variant=\"inverse\"\n size=\"sm\"\n onPress={onSearch}\n />\n ) : null}\n {actions}\n {user && userMenu ? (\n // A real button, not the img-role span: the avatar is where \"my profile\", \"switch company\"\n // and \"sign out\" live in any ERP, and a span accepts neither focus nor onPress. Popover is\n // rendered here rather than expected from the consumer so the panel keeps shell placement.\n <MenuTrigger>\n <AriaButton\n className=\"pire-avatar pire-avatar-trigger\"\n aria-label={(userMenuLabel ?? msg.shellBarUserMenu).replace('{user}', user)}\n >\n {initials(user)}\n </AriaButton>\n <Popover className=\"pire-popover\">{userMenu}</Popover>\n </MenuTrigger>\n ) : user ? (\n <span className=\"pire-avatar\" title={user} aria-label={user} role=\"img\">\n {initials(user)}\n </span>\n ) : null}\n </header>\n );\n}\n","import * as React from 'react';\nimport {\n Breadcrumbs as AriaBreadcrumbs,\n Breadcrumb as AriaBreadcrumb,\n Link,\n MenuTrigger,\n Button as AriaButton,\n Popover,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Menu, MenuItem } from './Menu';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface BreadcrumbItem {\n id?: string;\n label: string;\n href?: string;\n}\n\nexport interface BreadcrumbProps {\n /** Ordered trail, current page last. The last item is never a link. */\n items: BreadcrumbItem[];\n onNavigate?: (id: string) => void;\n /**\n * Keeps the trail on one line however narrow its container gets. When the whole trail does not\n * fit, the middle steps fold into a \"…\" button that opens them as a menu, keeping the first and\n * current steps on screen. On a phone-narrow container the first step folds in too. The current\n * step is never folded: it truncates with an ellipsis instead, its full text kept in `title`.\n *\n * Off by default, where the trail wraps instead. `ShellBar`'s `breadcrumb` turns it on, because\n * a 48px bar has no second line to wrap onto.\n */\n isCollapsible?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst keyOf = (item: BreadcrumbItem) => item.id ?? item.label;\n\n/** The narrowest the current step is allowed to get before the first step folds away too: about\n * six characters and an ellipsis, enough to recognise a document number by its prefix. */\nconst MIN_CURRENT = 64;\n\n/**\n * How much of the trail fits: `0` all of it, `1` first + \"…\" + current, `2` \"…\" + current.\n *\n * Measured off an invisible copy of the full trail, never off the visible one: once collapsed, the\n * visible trail always fits, so it can never say when there is room to expand again. The copy\n * carries a \"…\" of its own so the collapsed shapes can be priced before they are drawn.\n */\nfunction useFitLevel(enabled: boolean) {\n const boxRef = React.useRef<HTMLDivElement>(null);\n const measureRef = React.useRef<HTMLDivElement>(null);\n const [level, setLevel] = React.useState<0 | 1 | 2>(0);\n React.useLayoutEffect(() => {\n const box = boxRef.current;\n const measure = measureRef.current;\n if (!enabled || !box || !measure) return;\n const check = () => {\n const avail = box.clientWidth;\n const gap = Number.parseFloat(getComputedStyle(measure).columnGap) || 0;\n const steps = [...measure.querySelectorAll<HTMLElement>('[data-step]')].map((el) => el.offsetWidth);\n const more = measure.querySelector<HTMLElement>('[data-more]')?.offsetWidth ?? 0;\n const full = steps.reduce((sum, w) => sum + w, 0) + gap * Math.max(steps.length - 1, 0);\n if (full <= avail + 0.5) return setLevel(0);\n const first = steps[0] ?? 0;\n setLevel(first + more + MIN_CURRENT + gap * 2 <= avail ? 1 : 2);\n };\n check();\n const observer = new ResizeObserver(check);\n observer.observe(box);\n observer.observe(measure);\n return () => observer.disconnect();\n }, [enabled]);\n return { boxRef, measureRef, level: enabled ? level : 0 };\n}\n\nexport function Breadcrumb({ items, onNavigate, isCollapsible, className, style }: BreadcrumbProps) {\n const msg = usePireMessages();\n const { boxRef, measureRef, level } = useFitLevel(!!isCollapsible);\n const last = items[items.length - 1];\n // Level 2 folds the first step as well, which only buys anything with at least two steps; level 1\n // needs three, or there is no middle to fold.\n const foldFirst = level === 2 && items.length > 1;\n const collapse = foldFirst || (level === 1 && items.length > 2);\n const folded = collapse ? items.slice(foldFirst ? 0 : 1, -1) : [];\n const shown = collapse ? (foldFirst ? [last] : [items[0], last]) : items;\n const moreAt = foldFirst ? 0 : 1;\n\n const separator = <Icon name=\"chevron-right\" size={12} className=\"pire-breadcrumb-sep\" />;\n\n const crumb = (item: BreadcrumbItem) => {\n const isLast = item === last;\n return (\n <AriaBreadcrumb\n key={keyOf(item)}\n className=\"pire-breadcrumb\"\n id={keyOf(item)}\n data-last={isLast ? 'true' : undefined}\n >\n {isCollapsible ? (\n // A Link even for the current step, because that is what React Aria marks\n // `aria-current=\"page\"`. The `title` is what reads the step whole once it truncates.\n // A class, not an `a` selector: React Aria renders a Link with no `href` as a <span>.\n <Link className=\"pire-breadcrumb-link\" href={isLast ? undefined : item.href}>\n <span title={isLast ? item.label : undefined}>{item.label}</span>\n </Link>\n ) : isLast ? (\n item.label\n ) : (\n <Link href={item.href}>{item.label}</Link>\n )}\n {isLast ? null : separator}\n </AriaBreadcrumb>\n );\n };\n\n if (!isCollapsible) {\n return (\n <AriaBreadcrumbs\n className={cx('pire-breadcrumbs', className)}\n style={style}\n items={items}\n onAction={(key) => onNavigate?.(String(key))}\n >\n {(item) => crumb(item)}\n </AriaBreadcrumbs>\n );\n }\n\n return (\n <div ref={boxRef} className={cx('pire-breadcrumbs-fit', className)} style={style}>\n <AriaBreadcrumbs\n className=\"pire-breadcrumbs\"\n data-collapsible=\"true\"\n onAction={(key) => onNavigate?.(String(key))}\n >\n {shown.map((item, i) =>\n collapse && i === moreAt ? (\n <React.Fragment key=\"__more__\">\n <AriaBreadcrumb className=\"pire-breadcrumb\" id=\"__pire_breadcrumb_more__\">\n <MenuTrigger>\n <AriaButton className=\"pire-breadcrumb-more\" aria-label={msg.breadcrumbMore}>\n <Icon name=\"more-horizontal\" size={16} />\n </AriaButton>\n <Popover className=\"pire-popover\">\n <Menu onAction={(key) => onNavigate?.(String(key))}>\n {folded.map((step) => (\n <MenuItem key={keyOf(step)} id={keyOf(step)} href={step.href}>\n {step.label}\n </MenuItem>\n ))}\n </Menu>\n </Popover>\n </MenuTrigger>\n {separator}\n </AriaBreadcrumb>\n {crumb(item)}\n </React.Fragment>\n ) : (\n crumb(item)\n ),\n )}\n </AriaBreadcrumbs>\n {/* The full trail, laid out but never painted, so it can be measured at its natural width.\n `inert` and `aria-hidden` keep it out of the tab order and the accessibility tree. The box\n around it clips, so a trail wider than the bar does not widen the bar's scroll area. */}\n <div className=\"pire-breadcrumbs-measure\" aria-hidden=\"true\" inert>\n <div ref={measureRef} className=\"pire-breadcrumbs\" data-measure=\"true\">\n {items.map((item) => (\n <span\n key={keyOf(item)}\n className=\"pire-breadcrumb\"\n data-step=\"true\"\n data-last={item === last ? 'true' : undefined}\n >\n <span>{item.label}</span>\n {item === last ? null : separator}\n </span>\n ))}\n <span className=\"pire-breadcrumb\" data-more=\"true\">\n <span className=\"pire-breadcrumb-more\">\n <Icon name=\"more-horizontal\" size={16} />\n </span>\n {separator}\n </span>\n </div>\n </div>\n </div>\n );\n}\n","import type * as React from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n Separator as AriaSeparator,\n Header,\n type MenuProps as AriaMenuProps,\n type MenuItemProps as AriaMenuItemProps,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Kbd } from '../core/Kbd';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object = object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {\n /** Accessible name when the trigger does not supply one. `MenuTrigger` usually does. */\n 'aria-label'?: string;\n /** Floor for the panel width. The panel sizes to its content, not to the trigger. */\n minWidth?: number | string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The surface inside a `MenuTrigger`. Wrap it in a `Popover`, the way `Select` does. */\nexport function Menu<T extends object = object>({ minWidth, className, style, ...rest }: MenuProps<T>) {\n const width = typeof minWidth === 'number' ? `${minWidth}px` : minWidth;\n const menuStyle =\n width == null ? style : ({ ['--pire-menu-min-w' as string]: width, ...style } as React.CSSProperties);\n\n return (\n <AriaMenu className={cx('pire-menu', className)} style={menuStyle} {...(rest as AriaMenuProps<T>)} />\n );\n}\n\nexport interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'children'> {\n children?: React.ReactNode;\n /** Icon slug before the label. Same vocabulary as `Button.icon`. */\n icon?: string;\n /** Second line, for an action whose effect is not obvious from its label. */\n description?: React.ReactNode;\n /**\n * Keyboard shortcut, right-aligned and drawn as key caps. Painted only — it registers nothing.\n *\n * A string is split on `+` and spaces, so `\"Ctrl+Shift+P\"` renders as three caps. Pass an array\n * when the split cannot be inferred: `['⌘', 'N']`, since `\"⌘N\"` has no separator to split on.\n */\n shortcut?: string | string[];\n /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */\n tone?: 'default' | 'danger';\n className?: string;\n}\n\n/** Splits `\"Ctrl+Shift+P\"` into its caps. An array is taken as given, because a chord written\n * without separators — `\"⌘N\"` — cannot be split without guessing where one key ends. */\nconst shortcutKeys = (shortcut: string | string[] | undefined): string[] => {\n if (shortcut == null) return [];\n const parts = Array.isArray(shortcut) ? shortcut : shortcut.split(/[+\\s]+/);\n return parts.map((part) => part.trim()).filter(Boolean);\n};\n\n/** A single command. Accepts `href`, so navigation items render a real anchor. */\nexport function MenuItem({\n children,\n icon,\n description,\n shortcut,\n tone = 'default',\n className,\n ...rest\n}: MenuItemProps) {\n const keys = shortcutKeys(shortcut);\n return (\n <AriaMenuItem\n className={cx('pire-menu-item', className)}\n data-tone={tone === 'danger' ? 'danger' : undefined}\n {...rest}\n >\n {icon ? <Icon name={icon} size={16} className=\"pire-menu-item-icon\" /> : null}\n <span className=\"pire-menu-item-body\">\n <span className=\"pire-menu-item-label\">{children}</span>\n {description ? <span className=\"pire-menu-item-desc\">{description}</span> : null}\n </span>\n {keys.length ? (\n <span className=\"pire-menu-item-shortcut\">\n {keys.map((cap, index) => (\n <Kbd\n // biome-ignore lint/suspicious/noArrayIndexKey: position is the identity of a cap in a fixed chord, and a glyph may repeat\n key={`${cap}-${index}`}\n size=\"sm\"\n >\n {cap}\n </Kbd>\n ))}\n </span>\n ) : null}\n </AriaMenuItem>\n );\n}\n\n// `title` shadows the DOM tooltip attribute, so it must be Omitted before being redeclared.\nexport interface MenuSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n /** Section heading. Rendered as a `Header`, not as a focusable item. */\n title?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\n/** Groups related commands under an optional heading. */\nexport function MenuSection({ title, children, className, ...rest }: MenuSectionProps) {\n return (\n <AriaMenuSection className={cx('pire-menu-section', className)} {...rest}>\n {title ? <Header className=\"pire-menu-section-title\">{title}</Header> : null}\n {children}\n </AriaMenuSection>\n );\n}\n\nexport interface MenuSeparatorProps {\n className?: string;\n}\n\n/** Rule between groups of items, on the menu's rhythm rather than the page's. */\nexport function MenuSeparator({ className }: MenuSeparatorProps) {\n return <AriaSeparator className={cx('pire-menu-separator', className)} />;\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport {\n Button as AriaButton,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n MenuTrigger,\n Popover,\n} from 'react-aria-components';\nimport { Menu, MenuItem } from './Menu';\nimport type { Key } from 'react-aria-components';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** A second-level destination, nested under a first-level entry.\n *\n * Deliberately has no `icon`: only the first level carries one, so the second level reads as an\n * indented list of labels under a single glyph rather than a wall of decoration. Leaving `icon` off\n * the *type* is what stops that drifting back in one call site at a time. */\nexport interface SideNavChildItem {\n id: string;\n label: string;\n count?: number;\n}\n\nexport interface SideNavItem {\n id: string;\n label: string;\n icon?: string;\n count?: number;\n /** Second-level destinations. Supplying this turns the entry into a collapsible group: it stops\n * being a destination itself (pressing it expands, never navigates) and `id` becomes the\n * expansion key used by `expandedIds` / `defaultExpandedIds`, not something `onChange` can ever\n * emit. */\n items?: SideNavChildItem[];\n}\n\nexport interface SideNavGroup {\n label?: string;\n items: SideNavItem[];\n}\n\nexport interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Spaces-and-pages hierarchy: one group per space. */\n groups: SideNavGroup[];\n value?: string;\n /** Fires with the selected item id — not a DOM change event. Only ever a destination id: a\n * first-level entry that owns `items` is a disclosure, and toggling it does not fire this. */\n onChange?: (id: string) => void;\n /** Expanded first-level entry ids — the controlled half of the pair. Pass it and you own expansion\n * outright, including expanding the group that holds `value`. */\n expandedIds?: string[];\n /** Initial expanded ids for the uncontrolled case. Omit it and the group holding `value` opens\n * itself; supply it and it is taken literally, so `value`'s group can start closed if that is\n * genuinely what you want. */\n defaultExpandedIds?: string[];\n /** Fires with every expanded id after a toggle, controlled or not. */\n onExpandedChange?: (ids: string[]) => void;\n /** 48px icon rail. Labels move into tooltips or, for a group, into its flyout. */\n collapsed?: boolean;\n /**\n * Draws the trailing rule that separates the nav from the page. On by default, because the nav\n * is normally the shell's own column and is the only thing that knows to draw it.\n *\n * Pass `false` when it is embedded beside something that draws its own border — a panel, a grid\n * track, a card — where the two rules stack into a double line.\n */\n bordered?: boolean;\n /**\n * In the rail, a group opens its children in a flyout beside it. On by default: without it the\n * rail records an expansion nothing can draw, leaving second-level destinations reachable only\n * by expanding the nav again.\n *\n * `false` makes a rail group record its expansion invisibly; kept for compatibility.\n */\n railFlyout?: boolean;\n footer?: React.ReactNode;\n}\n\n/** Which first-level entry owns `value`, if any. Undefined when `value` is a first-level destination. */\nfunction findActiveParent(groups: SideNavGroup[], value: string | undefined): string | undefined {\n if (value == null) return undefined;\n for (const group of groups) {\n for (const item of group.items) {\n if (item.items?.some((child) => child.id === value)) return item.id;\n }\n }\n return undefined;\n}\n\n/** Primary navigation. A first-level entry is either a destination (icon + label, selectable) or a\n * collapsible group (icon + label + chevron) when it carries `items` — the two coexist in one list,\n * which is how a 35-destination ERP menu fits without showing all 35 at once.\n *\n * Both levels are plain `Button`s and the disclosure is React Aria's `Disclosure` /\n * `DisclosureGroup`, so `aria-expanded`, `aria-controls`, the panel's `role=\"group\"` and\n * `aria-labelledby`, and Enter/Space on the trigger all come from React Aria rather than from\n * hand-rolled ARIA here.\n *\n * Three things worth knowing before you use it:\n *\n * - **The panel is always in the DOM.** React Aria hides a collapsed panel with\n * `hidden=\"until-found\"`, applied imperatively in a layout effect, so find-in-page can reveal it.\n * A test asserting a collapsed child is *absent* will fail; assert `aria-expanded` on the trigger,\n * or visibility, instead. The corollary in CSS: any `display` we set on the panel would beat the\n * UA's `[hidden] { display: none }`, leaving collapsed children focusable under\n * `aria-hidden=\"true\"`. `.pire-sidenav-subnav[hidden]` in `components.css` is that guard.\n * - **`collapsed` and expansion are different axes, and the rail wins.** With `collapsed` set there\n * are no labels, and a second level is nothing *but* labels. A group therefore opens its children\n * in a flyout beside the rail rather than inline — see `railFlyout`.\n * - **Several groups can be open at once**, and there is no accordion mode. Closing the group you\n * are in to open another is the wrong trade in a nav whose whole job is showing where you are. */\nexport function SideNav({\n groups,\n value,\n onChange,\n expandedIds,\n defaultExpandedIds,\n onExpandedChange,\n collapsed,\n railFlyout = true,\n bordered = true,\n footer,\n className,\n ...rest\n}: SideNavProps) {\n const msg = usePireMessages();\n const activeParent = findActiveParent(groups, value);\n const isControlled = expandedIds != null;\n const [ownExpanded, setOwnExpanded] = React.useState<Set<string>>(\n () => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : [])),\n );\n const [lastValue, setLastValue] = React.useState(value);\n\n // Reveal the group owning a *newly* selected destination. Seeding state at mount is not enough in a\n // router-driven app: a breadcrumb or a deep link can move `value` into a closed group, and the\n // current location would then be invisible. Keyed off the change rather than off `value` itself, so\n // a group the user closed by hand stays closed. Adjust-state-during-render, not an effect — React\n // re-runs this render before committing, so the panel never paints closed and then open.\n if (value !== lastValue) {\n setLastValue(value);\n if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {\n setOwnExpanded(new Set(ownExpanded).add(activeParent));\n }\n }\n\n const expanded = isControlled ? new Set(expandedIds) : ownExpanded;\n\n const commitExpanded = (next: Set<string>): void => {\n if (!isControlled) setOwnExpanded(next);\n onExpandedChange?.([...next]);\n };\n\n /** React Aria hands back the whole set, typed as `Key` (which widens to number). Ids are strings. */\n const handleExpandedChange = (keys: Set<Key>): void => commitExpanded(new Set([...keys].map(String)));\n\n const toggleExpanded = (id: string): void => {\n const next = new Set(expanded);\n if (!next.delete(id)) next.add(id);\n commitExpanded(next);\n };\n\n /** A first-level row: the leaf case, and the rail-mode rendering of a group. */\n const renderRow = (item: SideNavItem, onPress: () => void, isGroup: boolean) => {\n const selected = !isGroup && item.id === value;\n const button = (\n <AriaButton\n key={item.id}\n className=\"pire-sidenav-item\"\n data-selected={selected ? 'true' : undefined}\n data-active-child={isGroup && item.id === activeParent ? 'true' : undefined}\n aria-current={selected ? 'page' : undefined}\n // In the rail the visible label is dropped and the Icon is decorative, which left the\n // button with no accessible name at all. The Tooltip does not cover this: React Aria\n // wires it up as aria-describedby, and a description is not a name — a screen reader\n // announced these as an unlabelled \"button\". Expanded, the <span> below names it.\n aria-label={collapsed ? item.label : undefined}\n onPress={onPress}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n {collapsed ? null : <span>{item.label}</span>}\n {item.count != null && !collapsed ? <span className=\"pire-sidenav-count\">{item.count}</span> : null}\n </AriaButton>\n );\n // The Tooltip stays: it is the sighted affordance for the same missing label.\n return collapsed ? (\n <Tooltip key={item.id} label={item.label} placement=\"right\">\n {button}\n </Tooltip>\n ) : (\n button\n );\n };\n\n /** A rail group: the icon button, with its children in a flyout beside the rail.\n *\n * Built on MenuTrigger so roving focus, type-ahead and Escape-returns-focus come from React\n * Aria. The trade-off is that a child is a `menuitem` here and a `link` when the nav is\n * expanded — one destination with two roles depending on chrome state. That is deliberate:\n * the interaction genuinely differs, and the alternative was hand-rolling arrow-key handling. */\n const renderRailFlyout = (item: SideNavItem) => (\n <MenuTrigger key={item.id}>\n <AriaButton\n className=\"pire-sidenav-item\"\n aria-label={item.label}\n data-active-child={item.id === activeParent ? 'true' : undefined}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n </AriaButton>\n <Popover className=\"pire-popover\" placement=\"right top\" offset={4}>\n <Menu\n aria-label={item.label}\n className=\"pire-sidenav-flyout\"\n onAction={(key) => onChange?.(String(key))}\n >\n {(item.items ?? []).map((child) => (\n <MenuItem key={child.id} id={child.id}>\n {child.label}\n </MenuItem>\n ))}\n </Menu>\n </Popover>\n </MenuTrigger>\n );\n\n const renderSection = (item: SideNavItem) => (\n <Disclosure key={item.id} id={item.id} className=\"pire-sidenav-section\">\n {/* No onPress of our own: React Aria's ButtonContext supplies the toggle through\n slot=\"trigger\", and one here would navigate as a side effect of expanding. */}\n <AriaButton\n slot=\"trigger\"\n className=\"pire-sidenav-item\"\n data-kind=\"group\"\n data-active-child={item.id === activeParent ? 'true' : undefined}\n >\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n <span>{item.label}</span>\n {item.count != null ? <span className=\"pire-sidenav-count\">{item.count}</span> : null}\n <Icon name=\"chevron-down\" size={16} className=\"pire-sidenav-chevron\" />\n </AriaButton>\n <DisclosurePanel className=\"pire-sidenav-subnav\">\n {item.items?.map((child) => {\n const selected = child.id === value;\n return (\n <AriaButton\n key={child.id}\n className=\"pire-sidenav-item pire-sidenav-subitem\"\n data-selected={selected ? 'true' : undefined}\n aria-current={selected ? 'page' : undefined}\n onPress={() => onChange?.(child.id)}\n >\n <span>{child.label}</span>\n {child.count != null ? <span className=\"pire-sidenav-count\">{child.count}</span> : null}\n </AriaButton>\n );\n })}\n </DisclosurePanel>\n </Disclosure>\n );\n\n return (\n <nav\n className={cx('pire-sidenav', className)}\n data-collapsed={collapsed ? 'true' : undefined}\n data-bordered={bordered ? undefined : 'false'}\n aria-label={msg.sideNavLabel}\n {...rest}\n >\n {groups.map((group, gi) => {\n const hasSections = !collapsed && group.items.some((item) => item.items?.length);\n const rows = group.items.map((item) => {\n const isGroup = Boolean(item.items?.length);\n if (isGroup && !collapsed) return renderSection(item);\n if (isGroup && collapsed && railFlyout) return renderRailFlyout(item);\n return renderRow(item, () => (isGroup ? toggleExpanded(item.id) : onChange?.(item.id)), isGroup);\n });\n return (\n <div className=\"pire-sidenav-group\" key={group.label ?? gi}>\n {group.label && !collapsed ? <div className=\"pire-sidenav-label\">{group.label}</div> : null}\n {/* The DisclosureGroup wrapper appears only where something is actually collapsible, so a\n flat `groups` renders the DOM it rendered before any of this existed. */}\n {hasSections ? (\n <DisclosureGroup\n className=\"pire-sidenav-tree\"\n allowsMultipleExpanded\n expandedKeys={expanded}\n onExpandedChange={handleExpandedChange}\n >\n {rows}\n </DisclosureGroup>\n ) : (\n rows\n )}\n </div>\n );\n })}\n {footer ? <div className=\"pire-sidenav-footer\">{footer}</div> : null}\n </nav>\n );\n}\n","import * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** One application, or one company-wide destination. `icon` is required, not optional: the rail has\n * no room for a label, so an entry without a glyph would render as an empty 48px gap. */\nexport interface ShellRailItem {\n /** Passed back to `onChange`. Unique across every group. */\n id: string;\n /** The tooltip, and the entry's accessible name. Never drawn as text. */\n label: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon: string;\n}\n\nexport interface ShellRailGroup {\n items: ShellRailItem[];\n /**\n * Marks the zone that absorbs overflow, so the zones around it stay pinned while this one\n * scrolls. An ERP rail is a short pinned head, a long list of apps, and a short pinned tail; with\n * no group marked the rail scrolls as a whole and the tail scrolls off with everything else.\n *\n * Only one group should carry it. A second is not an error, but two flexible zones divide the\n * space between them and neither ends up the length it looks like it should be.\n */\n isScrollable?: boolean;\n}\n\nexport interface ShellRailProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {\n /** Zones, in order, separated by a hairline rule. */\n groups: ShellRailGroup[];\n /** Id of the open application. */\n value?: string;\n /** Fires with the chosen item's id — not a DOM change event. */\n onChange?: (id: string) => void;\n}\n\n/**\n * The first of two navigation levels: which **application** is open. `SideNav` is the second — which\n * page is open inside it — and the two are independent, so an app with a single page renders a rail\n * and no nav, and a single-app product renders a nav and no rail.\n *\n * Icon-only by construction. Each entry is a React Aria `Button` carrying its label as\n * `aria-label` and wrapped in a right-placed `Tooltip`, which is the same pairing a collapsed\n * `SideNav` row uses and for the same reason: React Aria wires a tooltip up as `aria-describedby`,\n * and a description is not a name — without the `aria-label` a screen reader announces eleven\n * unlabelled buttons.\n *\n * Two things worth knowing:\n *\n * - **The selected entry is marked `aria-current=\"true\"`, not `\"page\"`.** It names the current\n * application, and the current *page* is the `SideNav` leaf inside it. Both levels claiming\n * `page` would announce two current pages on one screen.\n * - **The selection is a fill plus a ring, and needs both.** The fill is a tint at 1.64:1 against\n * the rail; `--border-rail-selected` is what clears the 3:1 WCAG 1.4.11 asks of a state\n * indicator. Restyling the tile without the ring makes selection invisible to anyone who cannot\n * separate two close blues.\n */\nexport function ShellRail({ groups, value, onChange, className, ...rest }: ShellRailProps) {\n const msg = usePireMessages();\n return (\n <nav className={cx('pire-shellrail', className)} aria-label={msg.shellRailLabel} {...rest}>\n {groups.map((group, gi) => (\n // The divider is a sibling of the groups rather than a pseudo-element on one, because the\n // scrolling zone would carry its own rule out of view on the first wheel event.\n <React.Fragment key={group.items[0]?.id ?? gi}>\n {gi > 0 ? <div className=\"pire-shellrail-divider\" /> : null}\n <div className=\"pire-shellrail-group\" data-scroll={group.isScrollable ? 'true' : undefined}>\n {group.items.map((item) => (\n <Tooltip key={item.id} label={item.label} placement=\"right\">\n <AriaButton\n className=\"pire-shellrail-item\"\n aria-label={item.label}\n data-selected={item.id === value ? 'true' : undefined}\n aria-current={item.id === value ? 'true' : undefined}\n onPress={() => onChange?.(item.id)}\n >\n <span className=\"pire-shellrail-tile\">\n <Icon name={item.icon} size={20} />\n </span>\n </AriaButton>\n </Tooltip>\n ))}\n </div>\n </React.Fragment>\n ))}\n </nav>\n );\n}\n","import type * as React from 'react';\nimport { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface TabItem {\n id: string;\n label: string;\n icon?: string;\n count?: number;\n isDisabled?: boolean;\n}\n\nexport interface TabsProps {\n items: TabItem[];\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Optional panel content keyed by tab id. Omit when the tabs drive an external region —\n * the panel element is still rendered (empty and unstyled) so the tab's `aria-controls`\n * has something to point at. */\n panels?: Record<string, React.ReactNode>;\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Peer views of one object. Arrow keys move between tabs; the panel is one tab stop away. */\nexport function Tabs({\n items,\n value,\n defaultValue,\n onChange,\n panels,\n className,\n style,\n 'aria-label': ariaLabel,\n}: TabsProps) {\n const msg = usePireMessages();\n return (\n <AriaTabs\n className={className}\n style={style}\n selectedKey={value}\n defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => onChange?.(String(k))}\n >\n <TabList className=\"pire-tablist\" items={items} aria-label={ariaLabel ?? msg.tabsLabel}>\n {(item) => (\n <AriaTab className={cx('pire-tab')} id={item.id} isDisabled={item.isDisabled}>\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n {item.label}\n {item.count != null ? <span className=\"pire-tab-count\">{item.count}</span> : null}\n </AriaTab>\n )}\n </TabList>\n {/* Rendered for every tab, with or without `panels`. React Aria puts `aria-controls` on\n the selected tab pointing at that tab's generated tabpanel id unconditionally, so\n omitting the panel leaves the reference dangling: invalid ARIA, and an axe\n `aria-valid-attr-value` failure in any consuming app that drives an external region.\n React Aria mounts only the selected panel, and with no content it is an empty,\n zero-height element — the padded `.pire-tabpanel` box is applied only when there is\n actually content to sit in it. */}\n {items.map((item) => (\n <TabPanel key={item.id} id={item.id} className={panels ? 'pire-tabpanel' : undefined}>\n {panels?.[item.id]}\n </TabPanel>\n ))}\n </AriaTabs>\n );\n}\n","import type * as React from 'react';\nimport { IconButton } from '../core/IconButton';\nimport { Select } from '../forms/Select';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface PaginationProps {\n page?: number;\n pageSize?: number;\n /** Total record count — always shown, so users know the data set size. */\n total?: number;\n onPageChange?: (page: number) => void;\n onPageSizeChange?: (size: number) => void;\n pageSizes?: number[];\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function Pagination({\n page = 1,\n pageSize = 25,\n total = 0,\n onPageChange,\n onPageSizeChange,\n pageSizes = [25, 50, 100],\n className,\n style,\n}: PaginationProps) {\n const msg = usePireMessages();\n const pages = Math.max(1, Math.ceil(total / pageSize));\n const from = total === 0 ? 0 : (page - 1) * pageSize + 1;\n const to = Math.min(total, page * pageSize);\n return (\n <nav className={cx('pire-pagination', className)} style={style} aria-label={msg.paginationLabel}>\n <span className=\"pire-pagination-count\">\n {msg.paginationRange\n .replace('{from}', from.toLocaleString())\n .replace('{to}', to.toLocaleString())\n .replace('{total}', total.toLocaleString())}\n </span>\n <IconButton\n icon=\"chevron-left\"\n label={msg.paginationPrevious}\n size=\"sm\"\n variant=\"outlined\"\n isDisabled={page <= 1}\n onPress={() => onPageChange?.(page - 1)}\n />\n <span className=\"pire-pagination-count\" aria-live=\"polite\">\n {msg.paginationPageOf.replace('{page}', String(page)).replace('{pages}', String(pages))}\n </span>\n <IconButton\n icon=\"chevron-right\"\n label={msg.paginationNext}\n size=\"sm\"\n variant=\"outlined\"\n isDisabled={page >= pages}\n onPress={() => onPageChange?.(page + 1)}\n />\n {onPageSizeChange ? (\n <Select\n aria-label={msg.paginationRowsPerPage}\n size=\"sm\"\n fullWidth={false}\n value={String(pageSize)}\n options={pageSizes.map((s) => ({\n value: String(s),\n label: msg.paginationPageSize.replace('{count}', String(s)),\n }))}\n onChange={(v) => onPageSizeChange(Number(v))}\n style={{ width: 120 }}\n />\n ) : null}\n </nav>\n );\n}\n","import * as React from 'react';\nimport { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel, Toolbar, Button } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { ComingSoonMark, comingSoonProps } from '../core/ComingSoonMark';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface RibbonCommandProps {\n /** Visible text *and* accessible name. Never hand-break it across lines — a large command's\n * tile has a fixed width and wraps the caption itself, so one string stays one name. */\n label: string;\n /** Lucide slug, resolved through CARBON_MAP like every other icon in the library. */\n icon?: string;\n /** `lg` is the stacked icon-over-caption tile that anchors a group; `sm` is the stacked list\n * beside it. A group with no `lg` command reads as a list of options rather than a place. */\n size?: 'sm' | 'lg';\n onPress?: () => void;\n isDisabled?: boolean;\n /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —\n * a command that fires against an empty selection is the bug this prevents. */\n requiresSelection?: boolean;\n /**\n * An action the product will have but does not have yet: drawn in the tertiary ink with a \"Soon\"\n * mark, in the band and in the collapsed bar, focusable with `aria-disabled=\"true\"`, and never\n * pressed. See `Button`'s `isComingSoon` for why this is not `isDisabled`.\n *\n * `requiresSelection` never brings it to life — an action that does not exist does not start\n * existing because rows were selected.\n */\n isComingSoon?: boolean;\n /**\n * The screen's main action — \"Nuevo presupuesto\", \"Facturar\", \"Aprobar\". Declared once and drawn\n * in the primary fill in both modes: as the first large tile of its group while the ribbon is\n * open (it is always `lg`, whatever `size` says), and at the very front of the collapsed bar,\n * before `leading`, without needing `inBar`.\n *\n * One per ribbon. It is what `leading` was being borrowed for, and `leading` keeps its own job:\n * row context such as the saved-view chip, not an action. Ignored on a contextual tab's commands,\n * which never reach the bar.\n */\n isPrimary?: boolean;\n /**\n * Explanation shown on hover and on keyboard focus. Commands are configuration elements, so a\n * `Tooltip` cannot be wrapped around one from outside; this is the slot instead. Its natural\n * partner is `isComingSoon` — \"Sends the order PDF to the customer's WhatsApp\" — but any command\n * can carry one.\n */\n tooltip?: React.ReactNode;\n /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for\n * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */\n inBar?: boolean;\n}\n\nexport interface RibbonGroupProps {\n /** The group's name. Rendered under the commands *and* used as the `role=\"group\"` label, so it\n * has to read as a category on its own — \"Stock\", not \"Actions\". */\n caption: string;\n children?: React.ReactNode;\n}\n\nexport interface RibbonTabProps {\n id: string;\n label: string;\n /** Renders the tab only while `selectionCount > 0`, in the teal that means \"acting on a\n * selection\". Put the commands that only make sense against selected rows here. */\n isContextual?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface RibbonProps {\n /** Names the tab list when expanded, and the bar when collapsed — whichever is on screen. */\n 'aria-label': string;\n /** `Ribbon.Tab` elements. */\n children?: React.ReactNode;\n value?: string;\n defaultValue?: string;\n onChange?: (id: string) => void;\n /** Collapses the band to a single command bar. Controlled when supplied, uncontrolled when not. */\n isCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Rendered at the start of the **collapsed bar only**. Expanded mode has a tab list there.\n * Its reason for existing is the saved-view chip, which a collapsed screen has nowhere else\n * to put. */\n leading?: React.ReactNode;\n /** Trailing slot in both modes, before the collapse toggle — usually the overflow IconButton. */\n actions?: React.ReactNode;\n /** How many records are selected. Drives `requiresSelection` on commands and the visibility of\n * `isContextual` tabs, so the ribbon never offers an action with nothing to act on. */\n selectionCount?: number;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/* --- Configuration elements ------------------------------------------------\n These are never rendered. `Ribbon` reads `props` off them, which is what lets one authored tree\n produce both the expanded band and the collapsed bar. Rendering one directly means it escaped\n the tree, so each throws rather than returning null — a config element that silently vanishes\n takes a whole command group with it and reports nothing. */\n\nconst outside = (what: string, parent: string) => {\n const Config = () => {\n throw new Error(`[pire] ${what} must be a child of ${parent}.`);\n };\n // Named so the misnesting error can print it; `name` is configurable but not writable.\n Object.defineProperty(Config, 'name', { value: what });\n Config.displayName = what;\n return Config;\n};\n\n/** @see RibbonTabProps */\nexport const RibbonTab = outside('Ribbon.Tab', 'Ribbon') as (props: RibbonTabProps) => React.ReactElement;\n/** @see RibbonGroupProps */\nexport const RibbonGroup = outside('Ribbon.Group', 'Ribbon.Tab') as (\n props: RibbonGroupProps,\n) => React.ReactElement;\n/** @see RibbonCommandProps */\nexport const RibbonCommand = outside('Ribbon.Command', 'Ribbon.Group') as (\n props: RibbonCommandProps,\n) => React.ReactElement;\n\n/* --- Reading the tree ------------------------------------------------------ */\n\ntype Keyed<P> = P & { key: string };\ntype ReadCommand = Keyed<RibbonCommandProps>;\ntype ReadGroup = Keyed<RibbonGroupProps> & { commands: ReadCommand[] };\ntype ReadTab = Keyed<RibbonTabProps> & { groups: ReadGroup[] };\n\nconst CONFIG_ELEMENTS = new Set<unknown>([RibbonTab, RibbonGroup, RibbonCommand]);\n\n/** What to call the thing that turned up where a configuration element was expected. */\nfunction describe(child: React.ReactNode): string {\n if (!React.isValidElement(child)) return JSON.stringify(child);\n if (typeof child.type === 'string') return `<${child.type}>`;\n const type = child.type as { displayName?: string; name?: string };\n // `||`, not `??`: an anonymous function has `name === ''`, and `'' ?? x` is `''`.\n return type?.displayName || type?.name || 'a component';\n}\n\n/**\n * Collects children of exactly one type, descending through fragments.\n *\n * `React.Children.forEach` flattens arrays — so `.map()` works — but treats a fragment as a single\n * child, so it is walked by hand. Anything else is an error rather than a skip: the whole point of\n * configuration elements is that the parent can see the tree, and it cannot see through a\n * component boundary.\n */\nfunction childrenOfType<P>(\n children: React.ReactNode,\n type: unknown,\n what: string,\n parent: string,\n): Keyed<P>[] {\n const out: Keyed<P>[] = [];\n const walk = (nodes: React.ReactNode, path: string) => {\n React.Children.forEach(nodes, (child, i) => {\n if (child == null || typeof child === 'boolean') return;\n if (React.isValidElement(child) && child.type === React.Fragment) {\n return walk((child.props as { children?: React.ReactNode }).children, `${path}${i}.`);\n }\n if (!React.isValidElement(child) || child.type !== type) {\n // The wrapper hint only when the child genuinely is one. Appended to a plain misnesting —\n // a `Ribbon.Command` written straight under a `Ribbon.Tab` — it sends the reader hunting\n // for a wrapper component that does not exist.\n const isWrapper =\n React.isValidElement(child) && typeof child.type !== 'string' && !CONFIG_ELEMENTS.has(child.type);\n throw new Error(\n `[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` +\n (isWrapper\n ? ` Configuration elements are read, not rendered, so ${parent} cannot see` +\n ' through a wrapper component.'\n : ''),\n );\n }\n out.push({ ...(child.props as P), key: child.key != null ? String(child.key) : `${path}${i}` });\n });\n };\n walk(children, '');\n return out;\n}\n\nfunction readTabs(children: React.ReactNode): ReadTab[] {\n return childrenOfType<RibbonTabProps>(children, RibbonTab, 'Ribbon.Tab', 'Ribbon').map((tab) => ({\n ...tab,\n groups: childrenOfType<RibbonGroupProps>(tab.children, RibbonGroup, 'Ribbon.Group', 'Ribbon.Tab').map(\n (group) => ({\n ...group,\n commands: childrenOfType<RibbonCommandProps>(\n group.children,\n RibbonCommand,\n 'Ribbon.Command',\n 'Ribbon.Group',\n ),\n }),\n ),\n }));\n}\n\n/* --- Rendering ------------------------------------------------------------- */\n\n/**\n * `inBar` renders the compact presentation regardless of the authored `size`, because `size` is a\n * band concept: `lg` means the stacked 78x68 tile that anchors a group, and the collapsed bar is a\n * 32px row with no groups to anchor. One line, sized to its label.\n */\nfunction Command({\n command,\n selectionCount,\n inBar,\n}: {\n command: ReadCommand;\n selectionCount: number;\n inBar?: boolean;\n}) {\n const size = inBar ? 'sm' : command.isPrimary ? 'lg' : (command.size ?? 'sm');\n // `requiresSelection` only ever *adds* a reason to be disabled. An explicit isDisabled — no\n // permission, wrong document state — must survive a selection appearing.\n // A coming-soon command is never `isDisabled`, whatever the selection says: disabling it would\n // take it out of the toolbar's arrow-key order, and the mark it carries is the message.\n const msg = usePireMessages();\n const comingSoon = command.isComingSoon === true;\n const isDisabled =\n !comingSoon && (command.isDisabled || (command.requiresSelection === true && selectionCount === 0));\n const button = (\n <Button\n className=\"pire-ribbon-command\"\n data-size={size}\n data-primary={command.isPrimary ? 'true' : undefined}\n isDisabled={isDisabled}\n onPress={command.onPress}\n {...(comingSoon ? comingSoonProps(command.label, msg.comingSoon) : {})}\n >\n {comingSoon && size === 'lg' ? (\n // The tile is a column with no room for a third line under a two-line caption, and a mark\n // pinned to its corner lands on the icon. Beside the icon is the one place it fits.\n <span className=\"pire-ribbon-command-head\">\n {command.icon ? <Icon name={command.icon} size={20} /> : null}\n <ComingSoonMark announce={false} />\n </span>\n ) : command.icon ? (\n <Icon name={command.icon} size={size === 'lg' ? 20 : 16} />\n ) : null}\n <span className=\"pire-ribbon-command-label\">{command.label}</span>\n {comingSoon && size !== 'lg' ? <ComingSoonMark announce={false} /> : null}\n </Button>\n );\n return command.tooltip ? <Tooltip label={command.tooltip}>{button}</Tooltip> : button;\n}\n\nfunction Group({ group, selectionCount }: { group: ReadGroup; selectionCount: number }) {\n // The primary command leads its group, and is a tile however it was authored.\n const isLarge = (c: ReadCommand) => c.isPrimary || (c.size ?? 'sm') === 'lg';\n const large = [\n ...group.commands.filter((c) => c.isPrimary),\n ...group.commands.filter((c) => !c.isPrimary && isLarge(c)),\n ];\n const small = group.commands.filter((c) => !isLarge(c));\n return (\n <div className=\"pire-ribbon-group\" role=\"group\" aria-label={group.caption}>\n <div className=\"pire-ribbon-group-body\">\n {large.map((c) => (\n <Command key={c.key} command={c} selectionCount={selectionCount} />\n ))}\n {small.length ? (\n <div className=\"pire-ribbon-stack\">\n {small.map((c) => (\n <Command key={c.key} command={c} selectionCount={selectionCount} />\n ))}\n </div>\n ) : null}\n </div>\n {/* aria-hidden: the same string is already this group's accessible name, and announcing it\n twice makes every command sound like it belongs to \"Stock Stock\". */}\n <div className=\"pire-ribbon-caption\" aria-hidden=\"true\">\n {group.caption}\n </div>\n </div>\n );\n}\n\n/**\n * Reports whether the scroller it is attached to still hides content past its right edge.\n *\n * The freeze line is drawn from this and nothing else. Drawn unconditionally it is a divider the\n * ribbon does not otherwise have, sitting beside the toggle on every screen wide enough to need\n * no scrolling; drawn never, commands slide behind the trailing controls with nothing to say they\n * went somewhere rather than ceasing to exist.\n *\n * Both observers earn their place. The `scroll` listener catches the user reaching the end, and\n * `ResizeObserver` catches the viewport narrowing — but on the *children* as well as the scroller,\n * because a group getting wider changes `scrollWidth` while leaving the scroller's own border box\n * exactly where it was, and an observer watching only the scroller never fires.\n */\nfunction useTrailingOverflow() {\n const ref = React.useRef<HTMLDivElement>(null);\n const [overflow, setOverflow] = React.useState(false);\n React.useEffect(() => {\n const node = ref.current;\n if (!node) return;\n // The 1px slack is for fractional layout: a scroller that fits exactly reports a `scrollWidth`\n // a rounding error above its `clientWidth` often enough to flicker the line on and off.\n const measure = () => setOverflow(node.scrollLeft + node.clientWidth < node.scrollWidth - 1);\n measure();\n node.addEventListener('scroll', measure, { passive: true });\n const resize = new ResizeObserver(measure);\n resize.observe(node);\n for (const child of node.children) resize.observe(child);\n // A group mounted after this effect (a contextual tab, commands gated on loaded permissions)\n // widens the content without resizing anything already observed, so new children are watched\n // as they arrive and the edge is re-measured for both additions and removals.\n const mutation = new MutationObserver((records) => {\n for (const record of records) {\n for (const added of record.addedNodes) if (added instanceof Element) resize.observe(added);\n for (const removed of record.removedNodes) if (removed instanceof Element) resize.unobserve(removed);\n }\n measure();\n });\n mutation.observe(node, { childList: true });\n return () => {\n node.removeEventListener('scroll', measure);\n resize.disconnect();\n mutation.disconnect();\n };\n }, []);\n return [ref, overflow] as const;\n}\n\n/**\n * One ribbon mode: commands that scroll, trailing controls that do not.\n *\n * Both modes are this shape, which is why it is one component. The toggle sits outside the\n * scroller so a narrow screen can never clip it: it is the one way back from an oversized ribbon.\n *\n * The `Toolbar` stays on the outside. React Aria moves focus across every focusable descendant\n * rather than across direct children, so nesting them one element deeper keeps the arrow-key\n * behaviour and the single tab stop intact, and the browser scrolls a focused command into view on\n * its own.\n */\nfunction Surface({\n className,\n id,\n label,\n trailing,\n children,\n}: {\n className: string;\n id?: string;\n label: string;\n trailing: React.ReactNode;\n children: React.ReactNode;\n}) {\n const [scrollRef, overflow] = useTrailingOverflow();\n // Cast because React Aria's `ToolbarProps` does not declare `id` — it forwards one anyway,\n // through `filterDOMProps(props, {global: true})`, and `RibbonToggle.test.tsx` asserts it lands.\n const domId = (id ? { id } : {}) as { id?: string };\n return (\n <Toolbar {...domId} className={className} aria-label={label}>\n <div className=\"pire-ribbon-scroll\" ref={scrollRef}>\n {children}\n </div>\n <div className=\"pire-ribbon-trail\" data-overflow={overflow ? 'true' : undefined}>\n {trailing}\n </div>\n </Toolbar>\n );\n}\n\n/** One block per group that contributes at least one `inBar` command. Contextual tabs are skipped:\n * the bar has no way to say \"these only apply to the selection\", so a command that needs one has\n * no business appearing there unlabelled. */\nfunction barBlocks(tabs: ReadTab[]): { key: string; commands: ReadCommand[] }[] {\n const blocks: { key: string; commands: ReadCommand[] }[] = [];\n for (const tab of tabs) {\n if (tab.isContextual) continue;\n for (const group of tab.groups) {\n // The primary command is drawn at the front of the bar on its own, not in its group's block.\n const commands = group.commands.filter((c) => c.inBar && !c.isPrimary);\n if (commands.length) blocks.push({ key: `${tab.key}:${group.key}`, commands });\n }\n }\n return blocks;\n}\n\n/** The commands marked `isPrimary`, in authored order, from the tabs whose commands reach the bar. */\nfunction barPrimaries(tabs: ReadTab[]): ReadCommand[] {\n return tabs\n .filter((tab) => !tab.isContextual)\n .flatMap((tab) => tab.groups.flatMap((group) => group.commands.filter((c) => c.isPrimary)));\n}\n\n/**\n * The tabbed command surface an ERP list screen carries above its toolbar.\n *\n * Children are configuration elements — `Ribbon.Tab`, `Ribbon.Group`, `Ribbon.Command` — that\n * `Ribbon` reads rather than renders. That is what lets the collapsed bar be *derived* from the\n * same tree instead of authored a second time.\n */\nexport function Ribbon({\n children,\n value,\n defaultValue,\n onChange,\n isCollapsed,\n onCollapsedChange,\n leading,\n actions,\n selectionCount,\n className,\n style,\n 'aria-label': ariaLabel,\n}: RibbonProps) {\n const msg = usePireMessages();\n const tabs = readTabs(children);\n\n const count = selectionCount ?? 0;\n const visible = tabs.filter((tab) => !tab.isContextual || count > 0);\n const fallback = visible[0]?.id;\n\n const [ownTab, setOwnTab] = React.useState<string | undefined>(defaultValue);\n const requested = value ?? ownTab;\n /**\n * Clamped to what is on screen, every render. A `defaultValue` or `value` can name a contextual\n * tab that is not currently visible — an app that persists the last-used tab and restores it on\n * reload does exactly that, on every reload where nothing is selected — and an unclamped id\n * matched no tab at all: no tab selected, no panel, no commands, a blank ribbon, and no\n * `onChange` to tell a controlled consumer anything had gone wrong. Clamping also means the\n * request is honoured the moment its tab reappears, rather than being discarded.\n */\n const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;\n const select = React.useCallback(\n (id: string) => {\n setOwnTab(id);\n onChange?.(id);\n },\n [onChange],\n );\n\n /**\n * The only ribbon state the library owns. When a selection appears the contextual tab takes\n * over; when it goes away the tab unmounts, and handing selection back keeps keyboard focus from\n * falling to <body>.\n *\n * Guarded on the *transition*, not on the count, so a user who deliberately clicks back to\n * \"Inicio\" while rows stay selected is not dragged forward again on the next render.\n *\n * Starts `false`, so mounting with a live selection (a restored screen) opens the contextual tab.\n */\n const hadSelection = React.useRef(false);\n React.useEffect(() => {\n const has = count > 0;\n if (has === hadSelection.current) return;\n hadSelection.current = has;\n const contextual = tabs.find((tab) => tab.isContextual);\n if (!contextual) return;\n if (has) select(contextual.id);\n // `requested`, not `selected`: by the time this runs the render has already clamped `selected`\n // off the tab that is going away, and a controlled consumer still holding that id has to be\n // told to let go of it.\n else if (requested === contextual.id) select(tabs.find((tab) => !tab.isContextual)?.id ?? '');\n }, [count, tabs, requested, select]);\n\n const [ownCollapsed, setOwnCollapsed] = React.useState(false);\n const collapsed = isCollapsed ?? ownCollapsed;\n\n /**\n * The toggle is one element mounted under two different parents — the bar's `Toolbar` when\n * collapsed, the band's when not — so pressing it unmounts the very button that was pressed and\n * keyboard focus falls to `<body>`. The next Tab press then restarts from the top of the page,\n * which is the same failure the contextual-tab guard above exists to prevent, left open on the\n * one control guaranteed to be focused when it fires.\n *\n * It cannot be hoisted out of the branch: the two modes are a row and a column, and the toggle\n * sits inside the trailing edge of each — outside them it would need absolute positioning, which\n * the band's groups would slide underneath. So the button is replaced and the focus is put back\n * on its replacement, before paint.\n */\n const toggleRef = React.useRef<HTMLButtonElement>(null);\n const restoreFocus = React.useRef(false);\n React.useLayoutEffect(() => {\n if (!restoreFocus.current) return;\n restoreFocus.current = false;\n toggleRef.current?.focus();\n });\n\n /**\n * The band's DOM id, so the toggle's `aria-expanded` has something to say it expands. Without an\n * `aria-controls` a screen-reader user is told a state changed and never told what changed.\n * `Surface` is what puts it on the `Toolbar`, and carries the cast that needs.\n */\n const bandId = React.useId();\n\n const toggle = (\n <Button\n ref={toggleRef}\n className=\"pire-ribbon-toggle\"\n aria-expanded={!collapsed}\n aria-controls={bandId}\n aria-label={collapsed ? msg.ribbonExpand : msg.ribbonCollapse}\n onPress={() => {\n restoreFocus.current = document.activeElement === toggleRef.current;\n setOwnCollapsed(!collapsed);\n onCollapsedChange?.(!collapsed);\n }}\n >\n <Icon name={collapsed ? 'chevron-down' : 'chevron-up'} size={16} />\n </Button>\n );\n\n if (collapsed) {\n const blocks = barBlocks(tabs);\n const primaries = barPrimaries(tabs);\n return (\n <div className={cx('pire-ribbon', className)} style={style}>\n <Surface\n className=\"pire-ribbon-bar\"\n label={ariaLabel}\n trailing={\n <>\n {actions}\n {toggle}\n </>\n }\n >\n {/* `leading` scrolls with the commands rather than pinning opposite the toggle. It is\n the saved-view chip — context for the row, not a control the user needs to reach —\n and a bar pinned at both ends leaves a narrow screen almost nothing between them. */}\n {primaries.map((c) => (\n <Command key={c.key} command={c} selectionCount={count} inBar />\n ))}\n {leading ? <div className=\"pire-ribbon-leading\">{leading}</div> : null}\n {blocks.map((block, i) => (\n <React.Fragment key={block.key}>\n {i > 0 || leading || primaries.length ? <span className=\"pire-ribbon-bar-sep\" /> : null}\n {block.commands.map((c) => (\n <Command key={c.key} command={c} selectionCount={count} inBar />\n ))}\n </React.Fragment>\n ))}\n </Surface>\n </div>\n );\n }\n\n return (\n <div className={cx('pire-ribbon', className)} style={style}>\n <AriaTabs selectedKey={selected} onSelectionChange={(k) => select(String(k))}>\n <TabList className=\"pire-ribbon-tablist\" aria-label={ariaLabel}>\n {visible.map((tab) => (\n <AriaTab\n key={tab.key}\n id={tab.id}\n className=\"pire-ribbon-tab\"\n data-contextual={tab.isContextual ? 'true' : undefined}\n >\n {tab.label}\n </AriaTab>\n ))}\n </TabList>\n {visible.map((tab) => (\n <TabPanel key={tab.key} id={tab.id} className=\"pire-ribbon-panel\">\n {/* A real toolbar, so arrow keys move between commands and the whole band is one tab\n stop. Twelve groups of commands as twelve tab stops is why ribbons get a reputation\n for being unusable from the keyboard. */}\n <Surface\n id={bandId}\n className=\"pire-ribbon-band\"\n label={msg.ribbonLabel}\n trailing={\n <>\n {actions}\n {toggle}\n </>\n }\n >\n {tab.groups.map((group) => (\n <Group key={group.key} group={group} selectionCount={count} />\n ))}\n </Surface>\n </TabPanel>\n ))}\n </AriaTabs>\n </div>\n );\n}\n\nRibbon.Tab = RibbonTab;\nRibbon.Group = RibbonGroup;\nRibbon.Command = RibbonCommand;\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport type MessageKind = 'info' | 'success' | 'warning' | 'error';\n/** The glyph for each kind, shared with `Toast` so a kind looks the same wherever it appears. */\nexport const MESSAGE_KIND_ICON: Record<MessageKind, string> = {\n info: 'info',\n success: 'check-circle-2',\n warning: 'alert-triangle',\n error: 'alert-octagon',\n};\n\nexport interface InlineMessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n kind?: MessageKind;\n /** Message heading. Rich content, not the DOM title/tooltip attribute. */\n title?: React.ReactNode;\n /** Follow-up action, usually a tertiary Button. */\n action?: React.ReactNode;\n /** Provide to render a dismiss affordance. */\n onClose?: () => void;\n}\n\n/** In-page message tied to a region or form. Errors and warnings announce themselves. */\nexport function InlineMessage({\n kind = 'info',\n title,\n action,\n onClose,\n children,\n className,\n ...rest\n}: InlineMessageProps) {\n const msg = usePireMessages();\n const assertive = kind === 'error' || kind === 'warning';\n return (\n <div\n className={cx('pire-msg', className)}\n data-kind={kind}\n role={assertive ? 'alert' : 'status'}\n aria-live={assertive ? 'assertive' : 'polite'}\n {...rest}\n >\n <Icon name={MESSAGE_KIND_ICON[kind]} size={16} className=\"pire-msg-icon\" />\n <div className=\"pire-msg-content\">\n {title ? <span className=\"pire-msg-title\">{title}</span> : null}\n {children ? <span className=\"pire-msg-body\">{children}</span> : null}\n {action}\n </div>\n {onClose ? <IconButton icon=\"x\" label={msg.inlineMessageDismiss} size=\"sm\" onPress={onClose} /> : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { IconButton } from '../core/IconButton';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { MESSAGE_KIND_ICON, type MessageKind } from './InlineMessage';\n\nexport interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {\n kind?: MessageKind;\n onClose?: () => void;\n position?: 'bottom-center' | 'bottom-right';\n}\n\n/** Transient confirmation of a completed action. Never use for errors the user must act on —\n * those belong in an InlineMessage next to the cause. */\nexport function Toast({\n kind = 'success',\n onClose,\n position = 'bottom-center',\n children,\n className,\n ...rest\n}: ToastProps) {\n const msg = usePireMessages();\n return (\n <div\n className={cx('pire-toast', className)}\n data-position={position}\n role={kind === 'error' ? 'alert' : 'status'}\n aria-live={kind === 'error' ? 'assertive' : 'polite'}\n {...rest}\n >\n <Icon name={MESSAGE_KIND_ICON[kind]} size={16} />\n <span className=\"pire-toast-text\">{children}</span>\n {onClose ? (\n <IconButton icon=\"x\" label={msg.toastDismiss} size=\"sm\" variant=\"inverse\" onPress={onClose} />\n ) : null}\n </div>\n );\n}\n\nexport interface ToastItem {\n id: string;\n kind?: MessageKind;\n message: React.ReactNode;\n timeout?: number;\n}\n\ninterface ToastContextValue {\n add: (toast: Omit<ToastItem, 'id'>) => string;\n close: (id: string) => void;\n}\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\n/** Queue + live region. Mount once near the app root. */\nexport function ToastProvider({\n children,\n timeout = 6000,\n}: {\n children?: React.ReactNode;\n timeout?: number;\n}) {\n const msg = usePireMessages();\n const [toasts, setToasts] = React.useState<ToastItem[]>([]);\n const timers = React.useRef(new Map<string, ReturnType<typeof setTimeout>>());\n const nextId = React.useRef(0);\n const close = React.useCallback((id: string) => {\n clearTimeout(timers.current.get(id));\n timers.current.delete(id);\n setToasts((t) => t.filter((x) => x.id !== id));\n }, []);\n const add = React.useCallback(\n (toast: Omit<ToastItem, 'id'>) => {\n const id = String(++nextId.current);\n setToasts((t) => [...t, { ...toast, id }]);\n const ms = toast.timeout ?? timeout;\n if (ms > 0)\n timers.current.set(\n id,\n setTimeout(() => close(id), ms),\n );\n return id;\n },\n [close, timeout],\n );\n React.useEffect(() => {\n const pending = timers.current;\n return () => {\n for (const timer of pending.values()) clearTimeout(timer);\n pending.clear();\n };\n }, []);\n const value = React.useMemo(() => ({ add, close }), [add, close]);\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div className=\"pire-toast-region\" role=\"region\" aria-label={msg.toastRegionLabel}>\n {toasts.map((t) => (\n <Toast key={t.id} kind={t.kind} onClose={() => close(t.id)}>\n {t.message}\n </Toast>\n ))}\n </div>\n </ToastContext.Provider>\n );\n}\n\n/** `const toast = useToast(); toast.add({ kind: 'success', message: 'Order 4500012 released.' })` */\nexport function useToast() {\n const ctx = React.useContext(ToastContext);\n if (!ctx) throw new Error('useToast must be used inside <ToastProvider>');\n return ctx;\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface KpiTileProps {\n /** Short metric name. Truncates — the tile shrinks with its grid track. */\n label: React.ReactNode;\n /** Pre-formatted figure — format in the caller's locale, not here. */\n value: React.ReactNode;\n unit?: React.ReactNode;\n /** Comparison figure, e.g. \"+4.2% vs last month\". */\n delta?: React.ReactNode;\n /** Which arrow to draw — purely the direction the number moved. */\n deltaDirection?: 'up' | 'down';\n /** Whether that movement is good news. A rising overdue-invoice count is\n * deltaDirection=\"up\" with deltaTone=\"negative\". Defaults to positive for up. */\n deltaTone?: 'positive' | 'negative' | 'neutral';\n footnote?: React.ReactNode;\n icon?: string;\n /** Tints the value when the KPI itself is out of tolerance. */\n status?: 'neutral' | 'positive' | 'critical' | 'negative';\n onPress?: () => void;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function KpiTile({\n label,\n value,\n unit,\n delta,\n deltaDirection,\n deltaTone,\n footnote,\n icon,\n status = 'neutral',\n onPress,\n className,\n style,\n}: KpiTileProps) {\n const tone = deltaTone ?? (deltaDirection === 'down' ? 'negative' : 'positive');\n const body = (\n <>\n <span className=\"pire-kpi-label\">\n {icon ? <Icon name={icon} size={16} /> : null}\n {label}\n </span>\n <span className=\"pire-kpi-value\">\n {value}\n {unit ? <span className=\"pire-kpi-unit\">{unit}</span> : null}\n </span>\n {delta ? (\n <span className=\"pire-kpi-delta\" data-tone={tone}>\n {deltaDirection ? (\n <Icon name={deltaDirection === 'up' ? 'trending-up' : 'trending-down'} size={12} />\n ) : null}\n {delta}\n </span>\n ) : null}\n {footnote ? <span className=\"pire-kpi-foot\">{footnote}</span> : null}\n </>\n );\n const props = { className: cx('pire-kpi', className), 'data-status': status, style };\n return onPress ? (\n <AriaButton {...props} data-pressable=\"true\" onPress={onPress}>\n {body}\n </AriaButton>\n ) : (\n <div {...props}>{body}</div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface ObjectFact {\n label: string;\n value: React.ReactNode;\n numeric?: boolean;\n}\n\nexport interface ObjectHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'id'> {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n /** Technical key — rendered in mono next to the subtitle. Not the DOM id. */\n id?: React.ReactNode;\n /** A <Breadcrumb /> element. */\n breadcrumb?: React.ReactNode;\n /** A <Badge /> carrying the object's value state. */\n badge?: React.ReactNode;\n /** Key/value summary strip. Set numeric for amounts. */\n facts?: ObjectFact[];\n actions?: React.ReactNode;\n}\n\n/** The identity block at the top of any object page: who this record is, its state, its key figures. */\nexport function ObjectHeader({\n title,\n subtitle,\n id,\n breadcrumb,\n badge,\n facts,\n actions,\n className,\n ...rest\n}: ObjectHeaderProps) {\n return (\n <header className={cx('pire-objheader', className)} {...rest}>\n {breadcrumb}\n <div className=\"pire-objheader-row\">\n <div className=\"pire-objheader-text\">\n <h1 className=\"pire-objheader-title\">{title}</h1>\n {subtitle || id ? (\n <div className=\"pire-objheader-sub\">\n {subtitle}\n {id ? <span className=\"pire-objheader-id\">{id}</span> : null}\n </div>\n ) : null}\n </div>\n {badge}\n {actions ? <div className=\"pire-objheader-actions\">{actions}</div> : null}\n </div>\n {facts?.length ? (\n <dl className=\"pire-facts\">\n {facts.map((fact) => (\n <div key={fact.label}>\n <dt className=\"pire-fact-label\">{fact.label}</dt>\n <dd className=\"pire-fact-value\" data-numeric={fact.numeric ? 'true' : undefined}>\n {fact.value}\n </dd>\n </div>\n ))}\n </dl>\n ) : null}\n </header>\n );\n}\n","import type * as React from 'react';\nimport { Button } from '../core/Button';\nimport { Tag } from '../core/Tag';\nimport { useMessage } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ActiveFilter {\n id: string;\n label: string;\n}\n\nexport interface FilterBarProps extends React.HTMLAttributes<HTMLElement> {\n /** Filter controls — Inputs and Selects with their own labels. */\n children?: React.ReactNode;\n /** Applied filters, shown as removable Tags. */\n activeFilters?: ActiveFilter[];\n onRemoveFilter?: (id: string) => void;\n onClear?: () => void;\n /** Provide to render the \"Go\" trigger. Pire filters apply explicitly, never live. */\n onGo?: () => void;\n /** e.g. \"1,284 orders\". Announced when it changes. */\n resultLabel?: React.ReactNode;\n actions?: React.ReactNode;\n /** Overrides the dictionary's `filterBarGo` for this bar only. */\n goLabel?: string;\n /** Overrides the dictionary's `filterBarClearAll` for this bar only. */\n clearAllLabel?: string;\n /** Overrides the dictionary's `filterBarLabel` — the landmark name. */\n 'aria-label'?: string;\n}\n\nexport function FilterBar({\n children,\n activeFilters = [],\n onRemoveFilter,\n onClear,\n onGo,\n resultLabel,\n actions,\n goLabel,\n clearAllLabel,\n className,\n ...rest\n}: FilterBarProps) {\n const label = useMessage('filterBarLabel', rest['aria-label']);\n const go = useMessage('filterBarGo', goLabel);\n const clearAll = useMessage('filterBarClearAll', clearAllLabel);\n\n return (\n <section className={cx('pire-filterbar', className)} {...rest} aria-label={label}>\n <div className=\"pire-filterbar-controls\">\n {children}\n {onGo ? (\n <Button variant=\"primary\" onPress={onGo}>\n {go}\n </Button>\n ) : null}\n </div>\n {activeFilters.length || resultLabel || actions ? (\n <div className=\"pire-filterbar-foot\">\n {activeFilters.map((filter) => (\n <Tag key={filter.id} onRemove={onRemoveFilter ? () => onRemoveFilter(filter.id) : undefined}>\n {filter.label}\n </Tag>\n ))}\n {activeFilters.length && onClear ? (\n <Button variant=\"tertiary\" size=\"sm\" onPress={onClear}>\n {clearAll}\n </Button>\n ) : null}\n {resultLabel ? (\n <span className=\"pire-filterbar-result\" aria-live=\"polite\">\n {resultLabel}\n </span>\n ) : null}\n {actions ? <div className=\"pire-filterbar-actions\">{actions}</div> : null}\n </div>\n ) : null}\n </section>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface DescriptionItem {\n label: React.ReactNode;\n value: React.ReactNode;\n /** Tabular mono — use for every amount, quantity and ID. */\n numeric?: boolean;\n /** Separates and enlarges the row: totals, gross value, balance. */\n emphasis?: boolean;\n /** Rendered after the term — a Tooltip trigger explaining the figure. */\n hint?: React.ReactNode;\n}\n\nexport interface DescriptionListProps extends React.HTMLAttributes<HTMLDListElement> {\n items: DescriptionItem[];\n /** rows = label left / value right (totals panels). grid = caps label above value (detail facts). */\n layout?: 'rows' | 'grid';\n /** Columns when layout is grid. */\n columns?: number;\n}\n\n/** Key/value readout: order totals, stock figures, master-data summaries. Replaces the hand-rolled\n * <dl> that every ERP screen used to carry. */\nexport function DescriptionList({\n items,\n layout = 'rows',\n columns = 3,\n className,\n style,\n ...rest\n}: DescriptionListProps) {\n return (\n <dl\n className={cx('pire-dl', className)}\n data-layout={layout}\n style={\n { ...(layout === 'grid' ? { '--pire-dl-cols': columns } : null), ...style } as React.CSSProperties\n }\n {...rest}\n >\n {items.map((item, i) => (\n <div className=\"pire-dl-row\" key={i} data-emphasis={item.emphasis ? 'true' : undefined}>\n <dt className=\"pire-dl-term\">\n {item.label}\n {item.hint}\n </dt>\n <dd className=\"pire-dl-value\" data-numeric={item.numeric ? 'true' : undefined}>\n {item.value}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface TimelineEntry {\n id?: string;\n /** Pre-formatted timestamp — format in the caller's locale. */\n time: React.ReactNode;\n event: React.ReactNode;\n /** Who or what caused it: a user name, \"System\", an interface id. */\n actor?: React.ReactNode;\n}\n\nexport interface TimelineProps extends React.HTMLAttributes<HTMLOListElement> {\n entries: TimelineEntry[];\n /** Reverses `entries`, for data that arrives oldest first. Audit trails read newest first. */\n reverse?: boolean;\n}\n\n/** Document history and audit trail: what happened, when, and who did it. */\nexport function Timeline({ entries, reverse = false, className, ...rest }: TimelineProps) {\n const list = reverse ? [...entries].reverse() : entries;\n return (\n <ol className={cx('pire-timeline', className)} {...rest}>\n {list.map((entry, i) => (\n <li className=\"pire-timeline-item\" key={entry.id ?? i}>\n <span className=\"pire-timeline-time\">{entry.time}</span>\n <span className=\"pire-timeline-text\">{entry.event}</span>\n {entry.actor ? <span className=\"pire-timeline-actor\">{entry.actor}</span> : null}\n </li>\n ))}\n </ol>\n );\n}\n","/**\n * Scale maths and slot assignment shared by the chart components.\n *\n * Kept free of React and of the DOM so the arithmetic — which is where charts go quietly\n * wrong — can be tested directly rather than through a rendered SVG.\n */\n\nimport { IS_DEV, warnOnce } from '../utils/devWarn';\n\n/** One measured thing, drawn across every category. */\nexport interface ChartSeries {\n /** Stable across re-renders and across filter changes. Colour follows this, not position. */\n id: string;\n /** Shown in the legend, the tooltip and the data table. */\n label: string;\n /** One entry per category, in the same order. `null` is a gap in the data, never a zero. */\n values: (number | null)[];\n /**\n * Pin this series to a specific `--viz` slot, 1–6. Without it slots are handed out in\n * order. Use it when the same entity appears on several charts and must keep one colour.\n */\n colorIndex?: number;\n}\n\n/** How many distinct series colours the palette defines. Validated as a set; do not extend. */\nexport const VIZ_SLOT_COUNT = 6;\n\nexport interface ChartScale {\n min: number;\n max: number;\n /** Ascending, always including `min` and `max`. */\n ticks: number[];\n}\n\nconst NICE_STEPS = [1, 2, 2.5, 5, 10];\n\n/** Rounds a rough step up to the nearest 1 / 2 / 2.5 / 5 / 10 × 10ⁿ, so axis labels stay readable. */\nfunction niceStep(rough: number): number {\n if (!(rough > 0)) return 1;\n const magnitude = 10 ** Math.floor(Math.log10(rough));\n const normalized = rough / magnitude;\n return (NICE_STEPS.find((candidate) => candidate >= normalized) ?? 10) * magnitude;\n}\n\n/**\n * A rounded axis covering `values`.\n *\n * `startAtZero` defaults to true because a bar's length is only readable when the axis starts\n * at zero — a truncated bar axis exaggerates differences, which is the commonest way a chart\n * misleads. Lines may pass false, since a line encodes change rather than magnitude.\n */\nexport function linearScale(\n values: (number | null | undefined)[],\n tickCount = 4,\n startAtZero = true,\n): ChartScale {\n const present = values.filter((value): value is number => value != null && Number.isFinite(value));\n if (present.length === 0) return { min: 0, max: 1, ticks: [0, 1] };\n\n let low = Math.min(...present);\n let high = Math.max(...present);\n if (startAtZero) {\n low = Math.min(0, low);\n high = Math.max(0, high);\n }\n // A flat series still needs an axis with height, or every bar renders at zero pixels.\n if (low === high) {\n high = low === 0 ? 1 : low + Math.abs(low);\n }\n\n const step = niceStep((high - low) / Math.max(1, tickCount));\n\n // Two float defences, because both failures land straight on the axis labels.\n // The epsilon stops a value that is exactly on a step — 0.5 / 0.1 evaluating to\n // 5.000000000000001 — from rounding up to a whole extra tick. The decimal rounding stops\n // 3 × 0.1 from printing as \"0.30000000000000004\".\n const EDGE_TOLERANCE = 1e-9;\n const decimals = Math.max(0, 1 - Math.floor(Math.log10(step)));\n const toStepPrecision = (value: number) => Number(value.toFixed(decimals));\n\n const min = toStepPrecision(Math.floor(low / step + EDGE_TOLERANCE) * step);\n const max = toStepPrecision(Math.ceil(high / step - EDGE_TOLERANCE) * step);\n\n const stepCount = Math.round((max - min) / step);\n const ticks = Array.from({ length: stepCount + 1 }, (_, index) => toStepPrecision(min + index * step));\n return { min, max, ticks };\n}\n\n/** Where `value` sits on `scale`, as 0–1 from the axis minimum. */\nexport function scalePosition(value: number, scale: ChartScale): number {\n const span = scale.max - scale.min;\n return span === 0 ? 0 : (value - scale.min) / span;\n}\n\n/**\n * The CSS colour for a series.\n *\n * Slots are handed out in declaration order and never cycled: past the sixth, identity by\n * colour alone stops being reliable, so the overflow folds into one \"other\" neutral instead\n * of inventing a seventh hue. Aggregate upstream when you have more than six.\n */\nexport function seriesColor(series: ChartSeries, index: number): string {\n const slot = series.colorIndex ?? index + 1;\n return slot >= 1 && slot <= VIZ_SLOT_COUNT ? `var(--viz-${slot})` : 'var(--viz-other)';\n}\n\n/** Dev-only nudge: more series than the palette can tell apart is a data-shape problem. */\nexport function warnOnSlotOverflow(series: ChartSeries[], chartLabel: string): void {\n if (!IS_DEV || series.length <= VIZ_SLOT_COUNT) return;\n warnOnce(\n `chart:slots:${chartLabel}`,\n `\"${chartLabel}\" has ${series.length} series but the palette defines ` +\n `${VIZ_SLOT_COUNT} distinguishable colours. The extras render in one shared neutral. ` +\n 'Group the tail into an \"Other\" series, or split the chart into small multiples.',\n );\n}\n\n/**\n * Dev-only checks specific to a donut, where the failure modes are about shape rather than count.\n *\n * Negative values are the important one: an arc length cannot be negative, so a refund or a\n * reversal silently draws as its own absolute value and the chart reads as confidently wrong.\n */\nexport function warnOnDonutShape(series: ChartSeries[], categoryCount: number, chartLabel: string): void {\n if (!IS_DEV) return;\n\n const complaints: string[] = [];\n if (series.length > 1) {\n complaints.push(`it has ${series.length} series but a donut draws one — the rest are ignored`);\n }\n if (categoryCount > VIZ_SLOT_COUNT) {\n complaints.push(\n `it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; ` +\n 'past about four, slices stop being readable at all — group the tail into \"Other\"',\n );\n }\n if (series[0]?.values.some((value) => value != null && value < 0)) {\n complaints.push(\n 'it contains negative values, which have no part-to-whole meaning — ' +\n 'a signed measure belongs in a bar chart',\n );\n }\n if (complaints.length === 0) return;\n\n warnOnce(`chart:donut:${chartLabel}`, `DonutChart \"${chartLabel}\": ${complaints.join('; ')}.`);\n}\n\n/** Sum of a category's values across series, skipping gaps. Used for stacked totals. */\nexport function stackTotal(series: ChartSeries[], categoryIndex: number): number {\n return series.reduce((total, one) => total + (one.values[categoryIndex] ?? 0), 0);\n}\n\n/** Every plotted number in one flat list — what the scale is derived from. */\nexport function flatValues(series: ChartSeries[]): (number | null)[] {\n return series.flatMap((one) => one.values);\n}\n\n/**\n * Trims each series to the category count.\n *\n * A series longer than the axis would otherwise plot points past the last category, stacked on\n * top of each other at an undefined position. Shorter series need no padding — reading past the\n * end already yields `undefined`, which every call site treats as a gap.\n */\nexport function alignToCategories(series: ChartSeries[], categoryCount: number): ChartSeries[] {\n return series.map((one) =>\n one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) },\n );\n}\n","import type * as React from 'react';\nimport type { ChartSeries } from './chartGeometry';\nimport { seriesColor } from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** Props every chart shares. Each chart adds its own encoding options on top. */\nexport interface ChartBaseProps {\n /**\n * What the chart shows, in a sentence. Required: a chart with no accessible name is\n * an unlabelled image, and the visible title cannot be relied on — charts are often\n * placed under a heading that already says something different.\n */\n 'aria-label': string;\n /** Category axis labels. `series[].values` line up with these by index. */\n categories: string[];\n series: ChartSeries[];\n /** Shown above the plot. With a single series this is what names it, in place of a legend. */\n title?: React.ReactNode;\n /** Sits under the title in secondary ink — units, period, source. */\n description?: React.ReactNode;\n /**\n * Formats every number that reaches a human: axis ticks, tooltips, the data table.\n * Pire does not format — only the app knows the currency, the locale and the precision.\n */\n formatValue?: (value: number) => string;\n /** Plot height in pixels. Width always fills the container. */\n height?: number;\n /** Replaces the plot when there is nothing to draw. */\n emptyState?: React.ReactNode;\n /** Renders the underlying table visibly beneath the plot, instead of only for screen readers. */\n showDataTable?: boolean;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** One swatch in the legend. What it identifies differs by chart — see `ChartFrameProps.legend`. */\nexport interface ChartLegendItem {\n key: string;\n label: string;\n color: string;\n}\n\nexport interface ChartFrameProps\n extends Pick<\n ChartBaseProps,\n 'title' | 'description' | 'categories' | 'series' | 'showDataTable' | 'className' | 'style'\n > {\n label: string;\n formatValue: (value: number) => string;\n /**\n * Rendered only when there are at least two entries — one thing needs no key to tell it from\n * the others, and the title already names it.\n *\n * The chart decides what an entry stands for: bars and lines colour by series, a donut colours\n * by segment. Passing the list ready-made keeps that decision with the chart that made it.\n */\n legend?: ChartLegendItem[];\n children: React.ReactNode;\n}\n\n/** Legend entries for a chart that colours by series — bars and lines. */\nexport function seriesLegend(series: ChartSeries[]): ChartLegendItem[] {\n return series.map((one, index) => ({\n key: one.id,\n label: one.label,\n color: seriesColor(one, index),\n }));\n}\n\n/** Falls back to the browser's grouping so large figures stay readable without configuration. */\nexport const defaultFormatValue = (value: number): string => value.toLocaleString();\n\n/**\n * The shell around every Pire chart: heading, legend, plot, and the data table.\n *\n * The table is always in the DOM. A chart summarised in prose tells a screen-reader user what\n * someone else concluded; the table gives them the same numbers everyone else is looking at.\n * `showDataTable` only decides whether it is also visible.\n */\nexport function ChartFrame({\n label,\n title,\n description,\n categories,\n series,\n formatValue,\n legend,\n showDataTable,\n className,\n style,\n children,\n}: ChartFrameProps) {\n const msg = usePireMessages();\n return (\n <figure className={cx('pire-chart', className)} style={style}>\n {title || description ? (\n <figcaption className=\"pire-chart-head\">\n {title ? <span className=\"pire-chart-title\">{title}</span> : null}\n {description ? <span className=\"pire-chart-desc\">{description}</span> : null}\n </figcaption>\n ) : null}\n\n {legend && legend.length > 1 ? (\n <ul className=\"pire-chart-legend\">\n {legend.map((item) => (\n <li key={item.key} className=\"pire-chart-legend-item\">\n <span className=\"pire-chart-swatch\" style={{ background: item.color }} />\n {item.label}\n </li>\n ))}\n </ul>\n ) : null}\n\n {/* The plot is decorative to assistive tech — the table below carries the same data,\n and reading out a wall of SVG shapes is worse than nothing. */}\n <div className=\"pire-chart-plot\" aria-hidden=\"true\">\n {children}\n </div>\n\n <div className={showDataTable ? 'pire-chart-table' : 'pire-sr-only'}>\n <table>\n <caption>{label}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{msg.chartCategoryHeader}</th>\n {series.map((one) => (\n <th key={one.id} scope=\"col\">\n {one.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <tr key={categoryIndex}>\n <th scope=\"row\">{category}</th>\n {series.map((one) => {\n const value = one.values[categoryIndex];\n return <td key={one.id}>{value == null ? msg.chartNoValue : formatValue(value)}</td>;\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </figure>\n );\n}\n","import type * as React from 'react';\nimport type { ChartBaseProps } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue, seriesLegend } from './ChartFrame';\nimport {\n alignToCategories,\n flatValues,\n linearScale,\n scalePosition,\n seriesColor,\n stackTotal,\n warnOnSlotOverflow,\n} from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface BarChartProps extends ChartBaseProps {\n /**\n * `horizontal` puts categories down the side, which is what long ERP labels need — product\n * names and account descriptions do not fit under a vertical bar without turning sideways.\n * Use `vertical` when the categories are periods and reading left-to-right means time.\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Stack the series into one bar per category, for parts of a total.\n *\n * Only the first segment and the total are easy to compare across categories, because the\n * middle segments start at different offsets. If the comparison matters more than the total,\n * leave this off and let the bars sit side by side.\n */\n stacked?: boolean;\n /**\n * Print each value beside its bar. Defaults on for a single series — where the chart is a\n * ranking and the number is half the answer — and off beyond that, where a label per bar\n * turns into noise. The tooltip and the data table always carry every value.\n */\n showValues?: boolean;\n}\n\n/**\n * Magnitude and ranking — how big, and in what order.\n *\n * Laid out in HTML rather than SVG so category labels are real text: they wrap, truncate and\n * inherit type tokens, none of which survives a scaled `viewBox`. The bar axis always starts at\n * zero, since a bar encodes length, and a truncated axis overstates the difference.\n */\nexport function BarChart({\n categories,\n series: rawSeries,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 260,\n emptyState,\n showDataTable,\n orientation = 'horizontal',\n stacked = false,\n showValues,\n className,\n style,\n 'aria-label': label,\n}: BarChartProps) {\n const msg = usePireMessages();\n warnOnSlotOverflow(rawSeries, label);\n\n const series = alignToCategories(rawSeries, categories.length);\n const hasData = categories.length > 0 && series.length > 0;\n const withValues = showValues ?? series.length === 1;\n\n // Stacking compares totals, so the axis has to reach the tallest total rather than the\n // tallest single value.\n const scale = linearScale(\n stacked ? categories.map((_, index) => stackTotal(series, index)) : flatValues(series),\n );\n\n const sizeOf = (value: number) => `${scalePosition(value, scale) * 100}%`;\n\n /**\n * The figure in the right-hand column. A missing reading gets the \"no data\" wording rather\n * than a formatted zero — printing ₲ 0 for a month nobody has closed states a number that\n * was never measured.\n */\n const horizontalLabelFor = (categoryIndex: number) => {\n if (stacked) return formatValue(stackTotal(series, categoryIndex));\n const value = series[0].values[categoryIndex];\n return value == null ? msg.chartNoValue : formatValue(value);\n };\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={seriesLegend(series)}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div\n className=\"pire-chart-bars\"\n data-orientation={orientation}\n data-stacked={String(stacked)}\n style={{ '--pire-chart-height': `${height}px` } as React.CSSProperties}\n >\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <div key={categoryIndex} className=\"pire-chart-group\">\n <span className=\"pire-chart-cat\">{category}</span>\n <div className=\"pire-chart-track\">\n {series.map((one, seriesIndex) => {\n const value = one.values[categoryIndex];\n if (value == null) return null;\n return (\n <div\n key={one.id}\n className=\"pire-chart-bar\"\n style={\n {\n '--pire-bar-size': sizeOf(value),\n '--pire-bar-color': seriesColor(one, seriesIndex),\n } as React.CSSProperties\n }\n >\n {/* Vertical bars label themselves. A shared column would put the number at\n a fixed height while the bar it belongs to ends somewhere else. */}\n {withValues && orientation === 'vertical' ? (\n <span className=\"pire-chart-barval\">{formatValue(value)}</span>\n ) : null}\n <span className=\"pire-chart-tip\" role=\"presentation\">\n {series.length > 1 ? `${one.label}: ` : ''}\n {formatValue(value)}\n </span>\n </div>\n );\n })}\n </div>\n {/* Horizontal keeps a shared right-hand column instead: the bars all end at\n different points, so aligned figures are far easier to compare down the list. */}\n {withValues && orientation === 'horizontal' ? (\n <span className=\"pire-chart-val\">{horizontalLabelFor(categoryIndex)}</span>\n ) : null}\n </div>\n ))}\n </div>\n )}\n </ChartFrame>\n );\n}\n","import * as React from 'react';\nimport type { ChartBaseProps } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue, seriesLegend } from './ChartFrame';\nimport {\n alignToCategories,\n flatValues,\n linearScale,\n scalePosition,\n seriesColor,\n warnOnSlotOverflow,\n} from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface LineChartProps extends ChartBaseProps {\n /**\n * Tint the area under each line. Reads well for one series; with several the fills overlap\n * and the lower ones are read as smaller than they are, so it is ignored past the first.\n */\n showArea?: boolean;\n /**\n * Draw a dot at every point. On by default under about twenty points, where the dots show\n * where the real readings are rather than implying data between them.\n */\n showMarkers?: boolean;\n /**\n * Let the axis start above zero, so a small movement in a large number stays visible.\n *\n * Legitimate for a line, which encodes change rather than length — but it does exaggerate,\n * so leave it off whenever the size of the number is part of the point.\n */\n zoomToData?: boolean;\n}\n\n/** Room for the axis labels, in CSS pixels. The plot is what is left inside these. */\nconst PLOT_INSET = { top: 10, right: 14, bottom: 24, left: 58 };\n\n/** Below this many points a dot per reading is informative; above it, it is a smear. */\nconst MARKER_LIMIT = 20;\n\n/**\n * `useLayoutEffect` where there is a DOM, `useEffect` where there is not.\n *\n * Server rendering warns about layout effects, but falling back to `useEffect` on the client\n * would measure after the first paint and show an empty plot frame for a frame.\n */\nconst useIsomorphicLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\n/** Tracks the rendered width, because a line's geometry cannot be expressed in percentages. */\nfunction useMeasuredWidth(): [React.RefObject<HTMLDivElement | null>, number] {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const [width, setWidth] = React.useState(0);\n\n useIsomorphicLayoutEffect(() => {\n const element = ref.current;\n if (!element) return;\n // Measure once up front: ResizeObserver's first callback is asynchronous, so waiting for\n // it would paint an empty frame before the chart appears.\n setWidth(element.getBoundingClientRect().width);\n const observer = new ResizeObserver(([entry]) => setWidth(entry.contentRect.width));\n observer.observe(element);\n return () => observer.disconnect();\n }, []);\n\n return [ref, width];\n}\n\n/**\n * Change over time.\n *\n * Drawn in SVG at measured pixel coordinates rather than a scaled `viewBox`: scaling a viewBox\n * to fit stretches the type and turns markers into ellipses. Gaps in a series break the line\n * instead of interpolating across them — a missing month is not a straight line through it.\n */\nexport function LineChart({\n categories,\n series: rawSeries,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 260,\n emptyState,\n showDataTable,\n showArea = false,\n showMarkers,\n zoomToData = false,\n className,\n style,\n 'aria-label': label,\n}: LineChartProps) {\n const msg = usePireMessages();\n warnOnSlotOverflow(rawSeries, label);\n\n const [plotRef, width] = useMeasuredWidth();\n const series = alignToCategories(rawSeries, categories.length);\n const hasData = categories.length > 0 && series.length > 0;\n const withMarkers = showMarkers ?? categories.length <= MARKER_LIMIT;\n\n const scale = linearScale(flatValues(series), 4, !zoomToData);\n const innerWidth = Math.max(0, width - PLOT_INSET.left - PLOT_INSET.right);\n const innerHeight = Math.max(0, height - PLOT_INSET.top - PLOT_INSET.bottom);\n\n const xAt = (index: number) =>\n PLOT_INSET.left +\n (categories.length <= 1 ? innerWidth / 2 : (index / (categories.length - 1)) * innerWidth);\n const yAt = (value: number) => PLOT_INSET.top + innerHeight - scalePosition(value, scale) * innerHeight;\n\n /** One `M`-prefixed run per unbroken stretch, so nulls leave a hole rather than a shortcut. */\n const pathFor = (values: (number | null)[]) => {\n let path = '';\n let penIsDown = false;\n values.forEach((value, index) => {\n if (value == null) {\n penIsDown = false;\n return;\n }\n path += `${penIsDown ? 'L' : 'M'}${xAt(index)} ${yAt(value)} `;\n penIsDown = true;\n });\n return path.trim();\n };\n\n /** Closed back down to the baseline so the fill has a bottom edge. */\n const areaFor = (values: (number | null)[]) => {\n const present = values\n .map((value, index) => ({ value, index }))\n .filter((point): point is { value: number; index: number } => point.value != null);\n if (present.length < 2) return '';\n const baseline = PLOT_INSET.top + innerHeight;\n const line = present.map((point) => `${xAt(point.index)} ${yAt(point.value)}`).join(' L');\n const last = present[present.length - 1];\n return `M${xAt(present[0].index)} ${baseline} L${line} L${xAt(last.index)} ${baseline} Z`;\n };\n\n // At most one label per 64px of plot, so ticks never collide on a narrow dashboard column.\n const labelEvery = Math.max(1, Math.ceil(categories.length / Math.max(2, Math.floor(innerWidth / 64))));\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={seriesLegend(series)}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div className=\"pire-chart-lines\" ref={plotRef} style={{ height }}>\n {/* The SVG is decorative: the frame's data table carries these numbers, and reading a\n wall of SVG shapes aloud is worse than nothing. It also waits for the first measured\n width, since there is no correct geometry before then. */}\n {width > 0 ? (\n <svg\n width={width}\n height={height}\n className=\"pire-chart-svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <g className=\"pire-chart-grid\">\n {scale.ticks.map((tick) => (\n <line\n key={tick}\n x1={PLOT_INSET.left}\n x2={width - PLOT_INSET.right}\n y1={yAt(tick)}\n y2={yAt(tick)}\n />\n ))}\n </g>\n <g className=\"pire-chart-tick\">\n {scale.ticks.map((tick) => (\n <text\n key={tick}\n x={PLOT_INSET.left - 8}\n y={yAt(tick)}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatValue(tick)}\n </text>\n ))}\n {categories.map((category, index) =>\n index % labelEvery === 0 ? (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <text key={index} x={xAt(index)} y={height - 6} textAnchor=\"middle\">\n {category}\n </text>\n ) : null,\n )}\n </g>\n\n {showArea && series[0] ? (\n <path\n d={areaFor(series[0].values)}\n className=\"pire-chart-area\"\n style={{ fill: seriesColor(series[0], 0) }}\n />\n ) : null}\n\n <g className=\"pire-chart-line\" fill=\"none\">\n {series.map((one, index) => (\n <path key={one.id} d={pathFor(one.values)} stroke={seriesColor(one, index)} />\n ))}\n </g>\n\n {withMarkers ? (\n <g className=\"pire-chart-marker\">\n {series.map((one, seriesIndex) =>\n one.values.map((value, index) =>\n value == null ? null : (\n <circle\n // biome-ignore lint/suspicious/noArrayIndexKey: a series is positional — the index is the point's identity, and category labels repeat.\n key={`${one.id}-${index}`}\n cx={xAt(index)}\n cy={yAt(value)}\n r={4}\n fill={seriesColor(one, seriesIndex)}\n />\n ),\n ),\n )}\n </g>\n ) : null}\n </svg>\n ) : null}\n\n {/* Hover bands sit above the SVG in HTML: a crosshair and a tooltip that inherits the\n type tokens, without hand-positioning text inside the SVG. */}\n <div\n className=\"pire-chart-hover\"\n style={{\n inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px`,\n }}\n >\n {categories.map((category, categoryIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled \"Q1\").\n <div key={categoryIndex} className=\"pire-chart-band\">\n <span className=\"pire-chart-tip\" role=\"presentation\">\n <strong>{category}</strong>\n {series.map((one) => {\n const value = one.values[categoryIndex];\n return (\n <span key={one.id} className=\"pire-chart-tip-row\">\n {one.label}: {value == null ? msg.chartNoValue : formatValue(value)}\n </span>\n );\n })}\n </span>\n </div>\n ))}\n </div>\n </div>\n )}\n </ChartFrame>\n );\n}\n","import * as React from 'react';\nimport type { ChartBaseProps, ChartLegendItem } from './ChartFrame';\nimport { ChartFrame, defaultFormatValue } from './ChartFrame';\nimport { VIZ_SLOT_COUNT, warnOnDonutShape } from './chartGeometry';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface DonutChartProps extends ChartBaseProps {\n /**\n * What sits in the hole. Defaults to the total of every segment, which is the number a\n * part-to-whole chart is implicitly about. Hovering a segment replaces it with that segment.\n */\n centerLabel?: React.ReactNode;\n /** Caption under the centre figure — \"Total\", \"Invoiced\", whatever the total means. */\n centerCaption?: React.ReactNode;\n /** Ring thickness in pixels. Thinner reads as a gauge, thicker as a pie. */\n thickness?: number;\n}\n\n/** Gap between segments, in degrees of arc — the spacer that stops two fills reading as one. */\nconst SEGMENT_GAP_DEGREES = 1.5;\n\n/**\n * Part-to-whole, at a glance.\n *\n * **Use this only when the reader needs the rough shape of a split, not the ranking.** People\n * compare angles far worse than they compare lengths, so any question of the form \"which is\n * bigger\" or \"by how much\" is a `BarChart`. Six segments is the ceiling, and it is a ceiling\n * rather than a target: past three or four the small slices stop being readable at all.\n *\n * Unlike the other charts, colour here follows the *segment*, not the series — a donut draws one\n * series, and its categories are what need telling apart. Pass exactly one series; anything after\n * the first is ignored, with a dev warning.\n */\nexport function DonutChart({\n categories,\n series,\n title,\n description,\n formatValue = defaultFormatValue,\n height = 220,\n emptyState,\n showDataTable,\n centerLabel,\n centerCaption,\n thickness = 28,\n className,\n style,\n 'aria-label': label,\n}: DonutChartProps) {\n const msg = usePireMessages();\n const [hoveredIndex, setHoveredIndex] = React.useState<number | null>(null);\n\n warnOnDonutShape(series, categories.length, label);\n\n // A donut is single-series by definition; the frame's table still wants the array shape.\n const values = (series[0]?.values ?? []).slice(0, categories.length);\n const segments = categories\n .map((category, index) => ({ category, index, value: values[index] ?? 0 }))\n // Zero and missing readings are dropped rather than drawn: a zero-width arc is invisible\n // anyway, and it would still consume a colour slot and a legend row.\n .filter((segment) => segment.value > 0);\n\n const total = segments.reduce((sum, segment) => sum + segment.value, 0);\n const hasData = segments.length > 0 && total > 0;\n\n const size = height;\n const radius = (size - thickness) / 2;\n const circumference = 2 * Math.PI * radius;\n const gapLength = (SEGMENT_GAP_DEGREES / 360) * circumference;\n\n const legend: ChartLegendItem[] = segments.map((segment) => ({\n key: String(segment.index),\n label: segment.category,\n color: colorForSegment(segment.index),\n }));\n\n const hovered =\n hoveredIndex == null ? null : (segments.find((segment) => segment.index === hoveredIndex) ?? null);\n\n let arcStart = 0;\n\n return (\n <ChartFrame\n label={label}\n title={title}\n description={description}\n categories={categories}\n series={series}\n formatValue={formatValue}\n legend={legend}\n showDataTable={showDataTable}\n className={className}\n style={style}\n >\n {!hasData ? (\n <div className=\"pire-chart-empty\">{emptyState ?? msg.chartEmpty}</div>\n ) : (\n <div className=\"pire-chart-donut\" style={{ height: size }}>\n {/* Fixed square rather than fluid: a ring scales uniformly, so there is nothing to\n gain from stretching it, and the centre figure stays at its real type size. */}\n <svg\n width={size}\n height={size}\n aria-hidden=\"true\"\n focusable=\"false\"\n onMouseLeave={() => setHoveredIndex(null)}\n >\n {/* -90° so the first segment starts at twelve o'clock, where a reader looks first. */}\n <g transform={`rotate(-90 ${size / 2} ${size / 2})`}>\n {segments.map((segment) => {\n const arcLength = (segment.value / total) * circumference;\n const offset = arcStart;\n arcStart += arcLength;\n return (\n // 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.\n <circle\n key={segment.index}\n className=\"pire-chart-arc\"\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke={colorForSegment(segment.index)}\n strokeWidth={thickness}\n // The gap is taken off the arc rather than added between arcs, so the\n // segments still sum to the full circle.\n strokeDasharray={`${Math.max(0, arcLength - gapLength)} ${circumference}`}\n strokeDashoffset={-offset}\n data-hovered={hoveredIndex === segment.index ? 'true' : undefined}\n onMouseEnter={() => setHoveredIndex(segment.index)}\n />\n );\n })}\n </g>\n </svg>\n\n {/* HTML rather than SVG <text>: it inherits the type tokens and wraps on its own. */}\n <div className=\"pire-chart-donut-center\" style={{ width: size - thickness * 2 - 8 }}>\n <span className=\"pire-chart-donut-value\">\n {hovered ? formatValue(hovered.value) : (centerLabel ?? formatValue(total))}\n </span>\n <span className=\"pire-chart-donut-caption\">{hovered ? hovered.category : centerCaption}</span>\n </div>\n </div>\n )}\n </ChartFrame>\n );\n}\n\n/** Colour follows the segment here, not the series — see the component note. */\nfunction colorForSegment(index: number): string {\n return index < VIZ_SLOT_COUNT ? `var(--viz-${index + 1})` : 'var(--viz-other)';\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface LinkListItem {\n id: string;\n /** Technical key shown in mono — order number, material number. */\n key?: React.ReactNode;\n /** Secondary description, truncated. */\n text?: React.ReactNode;\n icon?: string;\n trailing?: React.ReactNode;\n}\n\nexport interface LinkListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n items: LinkListItem[];\n onSelect?: (id: string) => void;\n /**\n * Which slot gets the primary treatment. `'key'` (the default) sets `key` in mono and `text`\n * in secondary — right for \"OC-2026-000004 · Alfa S.A.\", where the code is what you scan.\n *\n * Use `'text'` when the name is what you scan and the code is the qualifier — a supplier or\n * customer list. It swaps the two treatments only; the slots keep their meanings, so `key`\n * stays the technical key and sorting or copying it still works.\n */\n emphasis?: 'key' | 'text';\n /** Names the list for assistive tech, e.g. \"Recently viewed orders\". */\n 'aria-label': string;\n}\n\n/** Compact list of records that navigate somewhere: recently viewed, related documents, shortcuts. */\nexport function LinkList({ items, onSelect, emphasis = 'key', className, ...rest }: LinkListProps) {\n return (\n <div className={cx('pire-linklist', className)} role=\"list\" data-emphasis={emphasis} {...rest}>\n {/* `role=\"list\"` requires children with `role=\"listitem\"`, and a button is not one: without\n this wrapper a screen reader announces a list containing nothing. The wrapper is a real\n flex box rather than `display: contents`, which has a history of dropping elements from\n the accessibility tree and would undo the fix it appears to make. */}\n {items.map((item) => {\n const keySlot = item.key ? <span className=\"pire-linklist-key\">{item.key}</span> : null;\n const textSlot = item.text ? <span className=\"pire-linklist-text\">{item.text}</span> : null;\n // Reordered here rather than with CSS `order`, so what a screen reader reads matches what\n // is on screen. A visual-only swap would leave the two disagreeing (WCAG 1.3.2), and the\n // whole row is one button, so there is no focus order to preserve by keeping the markup\n // fixed. The `emphasis` attribute on the root still drives the typography.\n const [first, second] = emphasis === 'text' ? [textSlot, keySlot] : [keySlot, textSlot];\n return (\n <div key={item.id} role=\"listitem\" className=\"pire-linklist-row\">\n <AriaButton className=\"pire-linklist-item\" onPress={() => onSelect?.(item.id)}>\n {item.icon ? <Icon name={item.icon} size={16} className=\"pire-linklist-icon\" /> : null}\n {first}\n {second}\n {item.trailing}\n </AriaButton>\n </div>\n );\n })}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface RecordCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The record as a person names it — the branch, the supplier, the warehouse. */\n title: React.ReactNode;\n /** One line of secondary identity: an address, a code, a contact. Omit when the name is enough. */\n subtitle?: React.ReactNode;\n /** Lucide slug for the leading tile. */\n icon?: string;\n /** Trailing slot — usually a small tertiary Button that reopens the picker. Omit for a\n * read-only card, which is what a transfer's route needs at both ends. */\n action?: React.ReactNode;\n /**\n * Greys the card, and **only** the card: whatever sits in `action` stays fully pressable.\n *\n * The slot takes any node, so there is nothing here that could safely disable it — injecting a\n * prop into a stranger's element is a guess about what that element accepts. Pass `isDisabled`\n * to that control yourself, alongside this one, whenever the record is locked. A card is a\n * readout, not a control: this is presentation, and it carries no disabled semantics for\n * assistive tech either.\n */\n isDisabled?: boolean;\n}\n\n/**\n * A picked master-data record shown as a card rather than a field value: which branch, which\n * warehouse, which counterparty. Use it once a record is chosen — `ValueHelpField` is what\n * chooses one.\n */\nexport function RecordCard({\n title,\n subtitle,\n icon,\n action,\n isDisabled,\n className,\n ...rest\n}: RecordCardProps) {\n return (\n <div\n className={cx('pire-recordcard', className)}\n data-disabled={isDisabled ? 'true' : undefined}\n {...rest}\n >\n {icon ? (\n <span className=\"pire-recordcard-tile\" aria-hidden=\"true\">\n <Icon name={icon} size={20} />\n </span>\n ) : null}\n <span className=\"pire-recordcard-body\">\n <span className=\"pire-recordcard-title\">{title}</span>\n {subtitle ? <span className=\"pire-recordcard-sub\">{subtitle}</span> : null}\n </span>\n {action ? <span className=\"pire-recordcard-action\">{action}</span> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ViewSwitcherProps {\n /** The saved view currently applied. */\n name: string;\n /** The view has unsaved changes. Rendered as text and folded into the accessible name — a\n * colour-only marker is a state nobody using a screen reader ever learns about. */\n isDirty?: boolean;\n /** Leading glyph. Defaults to `star`, which is what saved views are marked with elsewhere. */\n icon?: string;\n /** Opens the consumer's own views menu or dialog. */\n onPress?: () => void;\n /** Set while the view list has nothing to switch to yet — e.g. the screen has not finished its\n * first load, or the consumer's views dialog is already open and re-opening it would be a\n * no-op. Do not use it to mean \"no views exist\"; render nothing in that case instead. */\n isDisabled?: boolean;\n /** Replaces the whole accessible name — the library's usual meaning for `aria-label`, the same\n * as `DataTable`, `SegmentedControl` and `FilterBar` give it. Reach for this when a screen\n * shows more than one saved-view switcher and the default \"Saved views: …\" phrasing would no\n * longer tell them apart. Supplying it hands the consumer the whole string: the dictionary's\n * modified phrasing no longer applies, so an `isDirty` view needs the override to say so\n * itself. */\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * The saved-view trigger every ERP list opens with. A `Button`, not a `Select`: picking a view\n * opens a dialog with scope and sharing, and a select that opens a dialog lies about what it is.\n *\n * Sits in a toolbar row, or in `Ribbon`'s `leading` slot when the ribbon is collapsed.\n */\nexport function ViewSwitcher({\n name,\n isDirty,\n icon = 'star',\n onPress,\n isDisabled,\n 'aria-label': ariaLabel,\n className,\n style,\n}: ViewSwitcherProps) {\n const msg = usePireMessages();\n const label =\n ariaLabel ??\n (isDirty\n ? msg.viewSwitcherNameModified.replace('{view}', name)\n : msg.viewSwitcherName.replace('{view}', name));\n return (\n <AriaButton\n className={cx('pire-viewswitcher', className)}\n style={style}\n aria-label={label}\n isDisabled={isDisabled}\n onPress={onPress}\n >\n <Icon name={icon} size={16} />\n <span className=\"pire-viewswitcher-name\">{name}</span>\n {/* aria-hidden: the marker is already in the button's accessible name above. Announcing it\n twice makes the view sound like \"Quiebres modified modified\". */}\n {isDirty ? (\n <span className=\"pire-viewswitcher-dirty\" aria-hidden=\"true\">\n {msg.viewSwitcherModifiedMark}\n </span>\n ) : null}\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface BarListItem {\n id: string;\n label: React.ReactNode;\n /** The magnitude the bar draws. */\n value: number;\n /** The figure as the reader should see it — formatted in the caller's locale, not here.\n * Defaults to `String(value)`. */\n valueLabel?: React.ReactNode;\n /** A second line under the figure: \"−12 reserved\", \"no stock\". */\n hint?: React.ReactNode;\n /** Tints the figure and the bar from the status ramp. Value states, never series colours. */\n tone?: 'neutral' | 'positive' | 'critical' | 'negative';\n}\n\nexport interface BarListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {\n /** Names the list for assistive tech — required. */\n 'aria-label': string;\n items: BarListItem[];\n /** What a full bar means. Defaults to the largest value present, which makes the list a\n * ranking. Supply it to compare against a target or a total instead. */\n max?: number;\n}\n\n/**\n * Label, proportional bar, figure — a ranked readout where the comparison is between rows.\n * Stock across branches, hours across cost centres, spend across suppliers.\n *\n * Not a chart: it uses the status ramp, not the `--viz-*` series ramp, because these are value\n * states. Not a `ProgressBar` either — that is one value against a known total.\n */\nexport function BarList({ items, max, className, ...rest }: BarListProps) {\n const scale = max ?? Math.max(0, ...items.map((i) => i.value));\n return (\n <ul {...rest} className={cx('pire-barlist', className)}>\n {items.map((item) => {\n const pct = scale > 0 ? Math.max(0, Math.min(100, (item.value / scale) * 100)) : 0;\n return (\n <li key={item.id} className=\"pire-barlist-row\" data-tone={item.tone}>\n <span className=\"pire-barlist-main\">\n <span className=\"pire-barlist-label\">{item.label}</span>\n {/* The bar restates the figure beside it, so it is decoration for assistive tech. */}\n <span className=\"pire-barlist-track\" aria-hidden=\"true\">\n <span className=\"pire-barlist-fill\" style={{ width: `${pct}%` }} />\n </span>\n </span>\n <span className=\"pire-barlist-figure\">\n <span className=\"pire-barlist-value\">{item.valueLabel ?? String(item.value)}</span>\n {item.hint ? <span className=\"pire-barlist-hint\">{item.hint}</span> : null}\n </span>\n </li>\n );\n })}\n </ul>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface PageBandProps extends React.HTMLAttributes<HTMLDivElement> {\n /** `card` for a header band, `page` for a filter band or the body behind the content. */\n surface?: 'card' | 'page';\n /** `false` when the band below continues the same block and a rule would cut it in two. */\n hasBorder?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * The full-bleed horizontal band an ERP screen is built from: header, filters, body.\n *\n * Holds a `PageHeader`, `ObjectHeader`, `FilterBar` or edge-to-edge `Tabs`, supplying the page\n * gutter and the surface those components deliberately leave to their container.\n */\nexport function PageBand({\n surface = 'card',\n hasBorder = true,\n children,\n className,\n ...rest\n}: PageBandProps) {\n return (\n <div\n className={cx('pire-pageband', className)}\n data-surface={surface}\n data-border={hasBorder ? 'true' : undefined}\n {...rest}\n >\n {children}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {\n title: React.ReactNode;\n /** One line of context: scope, plant, data timestamp. */\n subtitle?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\n/** Heading block for pages that are not a single object — launchpads, settings, reports.\n * Object pages use ObjectHeader instead. */\nexport function PageHeader({ title, subtitle, actions, className, ...rest }: PageHeaderProps) {\n return (\n <header className={cx('pire-pageheader', className)} {...rest}>\n <div className=\"pire-pageheader-text\">\n <h1 className=\"pire-pageheader-title\">{title}</h1>\n {subtitle ? <p className=\"pire-pageheader-sub\">{subtitle}</p> : null}\n </div>\n {actions ? <div className=\"pire-pageheader-actions\">{actions}</div> : null}\n </header>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface SectionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Uppercase micro-caps eyebrow — the space or group name. */\n title: React.ReactNode;\n /** Count or qualifier shown beside the title. */\n meta?: React.ReactNode;\n /** Usually one tertiary Button: \"Open space\", \"See all\". */\n actions?: React.ReactNode;\n}\n\n/** Divides a long page into named bands. Pairs with a KPI row or a card grid below it. */\nexport function SectionHeader({ title, meta, actions, className, ...rest }: SectionHeaderProps) {\n return (\n <div className={cx('pire-sectionhead', className)} {...rest}>\n <span className=\"pire-eyebrow\">{title}</span>\n {meta ? <span className=\"pire-sectionhead-meta\">{meta}</span> : null}\n {actions ? <div className=\"pire-sectionhead-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useLocale } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** A noun in the two forms a count needs. `one` for a grammatically singular count, `other` for the\n * rest — the same split `Intl.PluralRules` makes, which is what picks between them. */\nexport interface SelectionBarNoun {\n one: string;\n other: string;\n}\n\nexport interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of selected records. The bar renders nothing at 0. */\n count: number;\n /**\n * The records' noun. Pass both forms — `{ one: 'orden', other: 'órdenes' }` — since a plural is\n * not the singular plus an \"s\" in any language this library ships for.\n *\n * A bare string is pluralised by appending \"s\" (legacy English); do not use it for new screens. Defaults to\n * the dictionary's `selectionBarNounOne` / `selectionBarNounOther`.\n */\n noun?: string | SelectionBarNoun;\n /**\n * Grammatical gender of `noun`, for the participle that agrees with it: \"2 órdenes\n * seleccionadas\", \"2 presupuestos seleccionados\". Picks the dictionary's `…Feminine` entries.\n * Default `masculine`, which is also the gender of the default noun.\n */\n gender?: 'masculine' | 'feminine';\n /** Replaces the whole sentence, for a screen that needs a phrasing the dictionary cannot build.\n * Called with the raw count; format it yourself. */\n label?: (count: number) => React.ReactNode;\n /** Renders the bar's own \"Clear selection\" button after the count. Every selection bar needs\n * one, and the bar is the only place on screen that knows it is the selection being cleared. */\n onClear?: () => void;\n /** Overrides the dictionary's `selectionBarClear`. */\n clearLabel?: string;\n /** What happens on commit — mass posting caveats belong here, not in a toast. */\n children?: React.ReactNode;\n /** Buttons, size=\"sm\". Destructive last. */\n actions?: React.ReactNode;\n}\n\n/** Appears above a table once rows are selected and states exactly how many.\n * The count is announced, so keyboard users know a selection changed. */\nexport function SelectionBar({\n count,\n noun,\n gender = 'masculine',\n label,\n onClear,\n clearLabel,\n children,\n actions,\n className,\n ...rest\n}: SelectionBarProps) {\n const msg = usePireMessages();\n const { locale } = useLocale();\n const plural = React.useMemo(() => new Intl.PluralRules(locale), [locale]);\n const numbers = React.useMemo(() => new Intl.NumberFormat(locale), [locale]);\n if (!count) return null;\n\n const isOne = plural.select(count) === 'one';\n let sentence: React.ReactNode;\n if (label) {\n sentence = label(count);\n } else {\n const word =\n typeof noun === 'string'\n ? `${noun}${count === 1 ? '' : 's'}`\n : noun\n ? isOne\n ? noun.one\n : noun.other\n : isOne\n ? msg.selectionBarNounOne\n : msg.selectionBarNounOther;\n const feminine = gender === 'feminine';\n const template = isOne\n ? feminine\n ? msg.selectionBarCountOneFeminine\n : msg.selectionBarCountOne\n : feminine\n ? msg.selectionBarCountOtherFeminine\n : msg.selectionBarCountOther;\n sentence = template.replace('{count}', numbers.format(count)).replace('{noun}', word);\n }\n\n return (\n <div className={cx('pire-selectionbar', className)} role=\"status\" aria-live=\"polite\" {...rest}>\n <span className=\"pire-selectionbar-count\">{sentence}</span>\n {onClear ? (\n <Button size=\"sm\" variant=\"tertiary\" onPress={onClear}>\n {clearLabel ?? msg.selectionBarClear}\n </Button>\n ) : null}\n {children ? <span className=\"pire-selectionbar-note\">{children}</span> : null}\n {actions ? <div className=\"pire-selectionbar-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface FooterBarProps extends React.HTMLAttributes<HTMLElement> {\n /** Left-hand status: validation summary, draft saved at, total. */\n note?: React.ReactNode;\n /** Commit actions. Cancel first, primary or danger last. */\n actions?: React.ReactNode;\n}\n\n/** Sticky commit bar for create and edit screens: the page scrolls, the decision stays visible.\n * Give the scrolling container bottom padding equal to the bar height. */\nexport function FooterBar({ note, actions, children, className, ...rest }: FooterBarProps) {\n return (\n <footer className={cx('pire-footerbar', className)} {...rest}>\n {note ? <span className=\"pire-footerbar-note\">{note}</span> : null}\n {children}\n {actions ? <div className=\"pire-footerbar-actions\">{actions}</div> : null}\n </footer>\n );\n}\n","import type * as React from 'react';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface SplitPaneProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The narrow column: a list of records, kept in view while one of them is read. */\n list: React.ReactNode;\n /** The wide column. Leave it out when nothing is selected — `emptyDetail` fills the space. */\n detail?: React.ReactNode;\n /** Width of the list column. A number is pixels. */\n listWidth?: number | string;\n /** Names the list region for assistive tech. Both panes are landmarks, so both want a name. */\n listLabel?: string;\n detailLabel?: string;\n /** Shown in place of the detail column when there is no `detail`. */\n emptyDetail?: React.ReactNode;\n /**\n * Returns to the list on a narrow container, where only one column fits at a time.\n *\n * Without it a narrow layout can reach the detail and never leave it, so pass it whenever the\n * pane can be seen on a small screen.\n */\n onBack?: () => void;\n backLabel?: string;\n}\n\n/**\n * Two columns that live side by side and scroll independently — a list on the left, the selected\n * record on the right.\n *\n * Distinct from `SidePanel`, which is an overlay: this one is a layout, the panes coexist, and\n * nothing is dismissed to get back to the list.\n *\n * It fills the box it is given and owns the scrolling inside it, so give it a parent with a\n * definite height and no padding of its own. A wrapper that scrolls as well produces two nested\n * scrollbars, which is the usual way this pattern goes wrong.\n */\nexport function SplitPane({\n list,\n detail,\n listWidth = '24rem',\n listLabel,\n detailLabel,\n emptyDetail,\n onBack,\n backLabel,\n className,\n style,\n ...rest\n}: SplitPaneProps) {\n const msg = usePireMessages();\n const width = typeof listWidth === 'number' ? `${listWidth}px` : listWidth;\n\n return (\n <div\n className={cx('pire-split', className)}\n data-has-detail={detail != null ? 'true' : undefined}\n style={{ ['--pire-split-list-w' as string]: width, ...style } as React.CSSProperties}\n {...rest}\n >\n <section className=\"pire-split-list\" aria-label={listLabel ?? msg.splitPaneList}>\n {list}\n </section>\n <section className=\"pire-split-detail\" aria-label={detailLabel ?? msg.splitPaneDetail}>\n {/* Rendered always and hidden by the container query on wide layouts, rather than switched\n on a measured width. Nothing here depends on JavaScript knowing the size. */}\n {onBack ? (\n <div className=\"pire-split-back\">\n <Button variant=\"tertiary\" size=\"sm\" icon=\"arrow-left\" onPress={onBack}>\n {backLabel ?? msg.splitPaneBack}\n </Button>\n </div>\n ) : null}\n {detail ?? <div className=\"pire-split-empty\">{emptyDetail}</div>}\n </section>\n </div>\n );\n}\n","import type * as React from 'react';\nimport { Dialog } from '../feedback/Dialog';\nimport { InlineMessage } from '../feedback/InlineMessage';\nimport { Button } from '../core/Button';\nimport { DescriptionList } from '../data/DescriptionList';\nimport type { ObjectFact } from '../data/ObjectHeader';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\n\nexport interface ConfirmDialogProps {\n isOpen?: boolean;\n /** Question form, sentence case: \"Release purchase order?\" */\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n /**\n * The key figures the decision rests on, shown above the consequence. Use it when the number\n * *is* the reason to hesitate — units moved, value written off, records affected. A dialog\n * whose figures are buried in prose asks the reader to do arithmetic under time pressure.\n */\n facts?: ObjectFact[];\n /** What will happen — rendered as a warning, or an error when tone is danger. */\n consequence?: React.ReactNode;\n /** Extra detail or an opt-in Checkbox. */\n children?: React.ReactNode;\n confirmLabel?: string;\n cancelLabel?: string;\n /** danger = irreversible: red commit button, error-toned consequence. */\n tone?: 'primary' | 'danger';\n /** Disables both buttons and shows \"Working…\" on the commit button. */\n isBusy?: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\n/** Interrupts one irreversible action. Never use for information — that is an InlineMessage. */\nexport function ConfirmDialog({\n isOpen,\n title,\n subtitle,\n facts,\n consequence,\n children,\n confirmLabel,\n cancelLabel,\n tone = 'primary',\n isBusy,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) {\n const msg = usePireMessages();\n return (\n <Dialog\n isOpen={isOpen}\n size=\"sm\"\n title={title}\n subtitle={subtitle}\n onClose={onCancel}\n isDismissable={!isBusy}\n showClose={false}\n footer={\n <>\n <Button variant=\"tertiary\" isDisabled={isBusy} onPress={onCancel}>\n {cancelLabel ?? msg.confirmDialogCancel}\n </Button>\n <Button variant={tone === 'danger' ? 'danger' : 'primary'} isDisabled={isBusy} onPress={onConfirm}>\n {isBusy ? msg.confirmDialogBusy : (confirmLabel ?? msg.confirmDialogConfirm)}\n </Button>\n </>\n }\n >\n {facts?.length ? (\n // The role is what makes the name stick. A bare <div> resolves to `generic`, which\n // *prohibits* `aria-label` — the label named nothing at all, and axe's\n // `aria-prohibited-attr` fails it on sight. Every other labelled div/span in this library\n // pairs with an explicit role for the same reason.\n <div className=\"pire-confirm-facts\" role=\"group\" aria-label={msg.confirmDialogFactsLabel}>\n <DescriptionList layout=\"rows\" items={facts} />\n </div>\n ) : null}\n {consequence ? (\n <InlineMessage\n kind={tone === 'danger' ? 'error' : 'warning'}\n style={{ marginBottom: children ? 'var(--sp-3)' : 0 }}\n >\n {consequence}\n </InlineMessage>\n ) : null}\n {children}\n </Dialog>\n );\n}\n","import * as React from 'react';\nimport {\n Autocomplete,\n ModalOverlay,\n Modal,\n Dialog as AriaDialog,\n SearchField,\n Input as AriaInput,\n Menu as AriaMenu,\n MenuSection as AriaMenuSection,\n Header,\n useFilter,\n} from 'react-aria-components';\nimport type { Key } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Kbd } from '../core/Kbd';\nimport { MenuItem } from '../navigation/Menu';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { useDocumentKeyDown } from '../utils/useDocumentKeyDown';\n\nexport interface CommandPaletteItem {\n /** Passed back to `onAction`. Must be unique across every group in the palette. */\n id: string;\n label: string;\n /** Second line — what the command does, or what identifies the record. */\n description?: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon?: string;\n /**\n * Painted on the right as key caps. Registers nothing; bind the key yourself.\n *\n * A string is split on `+` and spaces; pass an array when it cannot be — `['⌘', 'N']`.\n */\n shortcut?: string | string[];\n /**\n * Extra terms this item should match on, beyond its label. The place to put synonyms, the\n * English name of a Spanish command, and the abbreviations people actually type — a palette\n * that only matches the visible label makes users guess the wording.\n *\n * Matched against, never announced: the accessible name stays the label alone.\n */\n keywords?: string;\n isDisabled?: boolean;\n}\n\nexport interface CommandPaletteGroup {\n id: string;\n /** Heading above the group. Omit for a single unlabelled list. */\n label?: string;\n items: CommandPaletteItem[];\n}\n\nexport interface CommandPaletteProps {\n isOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Static groups — navigation targets and actions. Filtered locally as the user types, so these\n * are the whole list, not a page of it.\n */\n groups?: CommandPaletteGroup[];\n /**\n * Server-backed results, appended after the static groups and **never filtered locally**: the\n * server already ranked them, and a local \"contains\" pass would drop fuzzy and synonym matches.\n * Feed it from `onSearch`.\n */\n resultsGroup?: CommandPaletteGroup;\n /** The chosen item's `id`. The palette does not close itself — decide in the handler. */\n onAction?: (id: string) => void;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * Only needed for `resultsGroup`; the static groups filter without it.\n */\n onSearch?: (query: string) => void;\n /** Shows a status row rather than an empty list while a request is in flight. */\n isLoading?: boolean;\n /** Overrides the dictionary's `commandPaletteEmpty`. */\n emptyLabel?: React.ReactNode;\n /** Overrides the dictionary's `commandPaletteLoading`. */\n loadingLabel?: string;\n placeholder?: string;\n /**\n * Replaces the default key hints along the bottom. Use it for a product-specific affordance —\n * a scope switch, a \"search everything\" toggle.\n */\n footer?: React.ReactNode;\n /** Drops the footer entirely. The hints are worth their space until an app teaches the keys elsewhere. */\n showFooter?: boolean;\n /** Names the dialog for assistive tech. Defaults to the dictionary's `commandPaletteLabel`. */\n 'aria-label'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * The collection key of the section holding `resultsGroup`. Fixed rather than taken from the\n * consumer's group id, because the filter below has to recognise that section without trusting\n * user input.\n *\n * Deliberately not spelled like a `pire-*` class: it is a collection key, and `styles.css.test.ts`\n * reads `pire-*` string literals in component source as class references.\n */\nconst RESULTS_SECTION_KEY = '__pire_results__';\n\n/** Everything an item should match on. Kept out of `textValue` so screen readers announce the\n * label alone rather than the label plus a bag of synonyms. */\nconst searchableText = (item: CommandPaletteItem) =>\n [item.label, item.description, item.keywords].filter(Boolean).join(' ');\n\n/**\n * Application-wide search over commands, navigation targets and records — the Cmd/Ctrl+K surface.\n *\n * Behaviour is React Aria's `Autocomplete`: focus stays in the input while the arrow keys move\n * `aria-activedescendant` through the list, so typing and choosing never fight each other. Pire\n * supplies the overlay, the grouping and the empty/loading states.\n *\n * Open state is always the product's. Bind the shortcut with {@link useCommandPaletteShortcut},\n * or with anything else — an ERP may already own that key.\n */\nexport function CommandPalette({\n isOpen,\n onOpenChange,\n groups = [],\n resultsGroup,\n onAction,\n onSearch,\n isLoading,\n emptyLabel,\n loadingLabel,\n placeholder,\n footer,\n showFooter = true,\n 'aria-label': ariaLabel,\n className,\n style,\n}: CommandPaletteProps) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n // `contains` with base sensitivity so \"periodo\" finds \"Período\" and \"factura\" finds \"Factura\".\n // Accent- and case-sensitive matching makes a palette feel broken in Spanish.\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Reset on open, not on close: clearing on the way out is visible during the exit transition.\n React.useEffect(() => {\n if (isOpen) setQuery('');\n }, [isOpen]);\n\n const searchableById = React.useMemo(() => {\n const byId = new Map<string, string>();\n for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));\n return byId;\n }, [groups]);\n\n /**\n * The node is typed structurally rather than as React Aria's `Node<T>`, which lives in\n * `@react-types/shared` — a transitive package Pire does not depend on and should not start\n * depending on for one type. A wider parameter type is safe here: the callback is only ever\n * called with a full node.\n */\n const filter = React.useCallback(\n (textValue: string, inputValue: string, node: { key: Key; parentKey?: Key | null }) => {\n // The server's own ranking survives only if nothing filters it again.\n if (node.parentKey === RESULTS_SECTION_KEY) return true;\n return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);\n },\n [contains, searchableById],\n );\n\n const handleInputChange = (value: string) => {\n setQuery(value);\n onSearch?.(value);\n };\n\n const sections = [...groups, ...(resultsGroup ? [{ ...resultsGroup, id: RESULTS_SECTION_KEY }] : [])];\n const status = isLoading\n ? (loadingLabel ?? msg.commandPaletteLoading)\n : (emptyLabel ?? msg.commandPaletteEmpty);\n\n return (\n <ModalOverlay\n className=\"pire-cp-overlay\"\n isOpen={isOpen}\n isDismissable\n onOpenChange={(open) => {\n if (!open) onOpenChange?.(false);\n }}\n >\n <Modal className={cx('pire-cp-modal', className)} style={style}>\n <AriaDialog className=\"pire-cp-dialog\" aria-label={ariaLabel ?? msg.commandPaletteLabel}>\n <Autocomplete filter={filter} inputValue={query} onInputChange={handleInputChange}>\n <SearchField className=\"pire-cp-search\" aria-label={msg.commandPaletteSearchLabel}>\n <Icon name=\"search\" size={18} className=\"pire-cp-search-icon\" />\n {/* autoFocus is correct here specifically: the palette exists to be typed into, and\n it is a modal the user just chose to open, so taking the caret is what they asked\n for rather than a focus steal. */}\n <AriaInput\n className=\"pire-cp-input\"\n autoFocus\n placeholder={placeholder ?? msg.commandPalettePlaceholder}\n />\n </SearchField>\n {isLoading ? (\n <div className=\"pire-cp-loading\" role=\"status\" aria-live=\"polite\">\n {loadingLabel ?? msg.commandPaletteLoading}\n </div>\n ) : null}\n <AriaMenu\n className=\"pire-cp-list\"\n onAction={(key) => onAction?.(String(key))}\n renderEmptyState={() => <div className=\"pire-cp-status\">{status}</div>}\n >\n {sections.map((section) => (\n <AriaMenuSection key={section.id} id={section.id} className=\"pire-cp-section\">\n {section.label ? <Header className=\"pire-cp-section-title\">{section.label}</Header> : null}\n {section.items.map((item) => (\n <MenuItem\n key={item.id}\n id={item.id}\n textValue={item.label}\n icon={item.icon}\n description={item.description}\n shortcut={item.shortcut}\n isDisabled={item.isDisabled}\n >\n {item.label}\n </MenuItem>\n ))}\n </AriaMenuSection>\n ))}\n </AriaMenu>\n </Autocomplete>\n {showFooter ? (\n // aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen\n // reader already announces the listbox semantics that make those keys work, so reading\n // \"up arrow down arrow navigate\" out loud is noise on every open.\n <div className=\"pire-cp-foot\" aria-hidden=\"true\">\n {footer ?? (\n <>\n <span className=\"pire-cp-hint\">\n <Kbd>↑</Kbd>\n <Kbd>↓</Kbd>\n {msg.commandPaletteHintNavigate}\n </span>\n <span className=\"pire-cp-hint\">\n <Kbd>↵</Kbd>\n {msg.commandPaletteHintSelect}\n </span>\n <span className=\"pire-cp-hint\">\n <Kbd>esc</Kbd>\n {msg.commandPaletteHintClose}\n </span>\n </>\n )}\n </div>\n ) : null}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport interface CommandPaletteShortcutOptions {\n /** The key pressed with Cmd (macOS) or Ctrl. Single character, matched case-insensitively. */\n key?: string;\n /** Stop listening — while a modal owns the keyboard, for instance. */\n isDisabled?: boolean;\n}\n\n/**\n * Binds Cmd+K / Ctrl+K to open the palette.\n *\n * Opt-in rather than built into {@link CommandPalette}, because a global key listener is the\n * component's to grant and the app's to own: an ERP may already bind that combination, and a\n * component that claims it on mount takes it silently.\n */\nexport function useCommandPaletteShortcut(\n onTrigger: () => void,\n { key = 'k', isDisabled }: CommandPaletteShortcutOptions = {},\n): void {\n useDocumentKeyDown((event) => {\n if (!(event.metaKey || event.ctrlKey) || event.altKey) return;\n if (event.key.toLowerCase() !== key.toLowerCase()) return;\n // Chrome and Firefox both use Ctrl/Cmd+K for the address bar; without this the palette\n // opens behind a focused omnibox.\n event.preventDefault();\n onTrigger();\n }, isDisabled);\n}\n","import * as React from 'react';\n\n/**\n * Listens for `keydown` on the document while enabled, always calling the latest `onKeyDown` — so\n * a caller can pass an inline handler without re-subscribing on every render.\n */\nexport function useDocumentKeyDown(onKeyDown: (event: KeyboardEvent) => void, isDisabled?: boolean): void {\n const handler = React.useRef(onKeyDown);\n handler.current = onKeyDown;\n\n React.useEffect(() => {\n if (isDisabled) return;\n const listener = (event: KeyboardEvent) => handler.current(event);\n document.addEventListener('keydown', listener);\n return () => document.removeEventListener('keydown', listener);\n }, [isDisabled]);\n}\n","import * as React from 'react';\nimport {\n DialogTrigger,\n Button as AriaButton,\n Popover,\n Dialog as AriaDialog,\n useFilter,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { Input } from '../forms/Input';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface AppLauncherItem {\n /** Passed back to `onAction`. Unique across every section. */\n id: string;\n label: string;\n /** Second line, in a `tile` section. Ignored by `compact`, which has no room for it. */\n description?: string;\n /** Icon slug, same vocabulary as `Button.icon`. */\n icon?: string;\n /**\n * Extra terms this entry should match on, beyond its label and description — the English name of\n * a Spanish app, the abbreviation people actually type, the old name it was renamed from.\n *\n * Matched against, never announced: the accessible name stays the label alone. Named to match\n * `CommandPaletteItem.keywords`, which does the same job in the same way.\n */\n keywords?: string;\n}\n\nexport interface AppLauncherSection {\n /** Heading above the block. Omit for a single unlabelled grid. */\n label?: string;\n items: AppLauncherItem[];\n /**\n * `tile` (the default) is a destination worth describing: an accent plate, the name, and\n * `description` underneath. `compact` is a link that only needs naming, and drops to a muted\n * 16px glyph on one line.\n *\n * The distinction is not decoration. An ERP's app catalogue and its company-wide functions are\n * different kinds of thing, and drawing them at equal weight makes eleven equal choices out of\n * what is really seven plus four.\n */\n variant?: 'tile' | 'compact';\n}\n\nexport interface AppLauncherProps {\n /** The catalogue, in the order it should read. */\n sections: AppLauncherSection[];\n /** Fires with the chosen item's id. The panel closes itself first. */\n onAction?: (id: string) => void;\n /** Id of the open application, marked `aria-current` and highlighted. */\n value?: string;\n /** Heading inside the panel. Defaults to the dictionary's `appLauncherTitle`. */\n title?: React.ReactNode;\n /** Secondary text beside the heading — \"7 applications · 4 company functions\". */\n meta?: React.ReactNode;\n /** Drops the search box. Worth keeping until a catalogue is genuinely short. */\n isSearchable?: boolean;\n /**\n * The query on every keystroke. **Debounce before calling the server.**\n *\n * On its own this only observes; it does not change how `sections` is treated. Pair it with\n * `isFilteredExternally` to actually hand filtering over.\n */\n onSearchChange?: (query: string) => void;\n /**\n * `sections` is the final list and the launcher filters nothing locally. Required for\n * server-backed catalogues: fuzzy matches, synonyms and code-to-description hits do not survive\n * a second local \"contains\" pass.\n *\n * Named to match `ComboBox`, deliberately (see CLAUDE.md, server-backed lists).\n */\n isFilteredExternally?: boolean;\n /** Shows a status row rather than \"nothing found\" while a request is in flight. */\n isLoading?: boolean;\n /** Overrides the dictionary's `appLauncherEmpty`. */\n emptyLabel?: React.ReactNode;\n /** Overrides the dictionary's `appLauncherSearch`, which is both placeholder and field label. */\n searchPlaceholder?: string;\n /** Accessible name of the trigger *and* the panel. Defaults to the dictionary's `appLauncherLabel`. */\n 'aria-label'?: string;\n /** Trigger glyph. `grid-2x2` is the launcher convention; override for a product mark. */\n icon?: string;\n className?: string;\n}\n\n/** Everything an entry matches on. Kept out of the accessible name so a screen reader announces the\n * label alone rather than the label plus a bag of synonyms. */\nconst searchableText = (item: AppLauncherItem) =>\n [item.label, item.description, item.keywords].filter(Boolean).join(' ');\n\n/**\n * The shell's application switcher: the full catalogue, one press from anywhere.\n *\n * Trigger and panel are one component rather than two exports, so nothing in the product has to\n * hold the open state or line the popover up with the button. The trigger is sized to `--rail-w`\n * and pulled through the shell bar's padding, which puts it directly above `ShellRail` — pass it to\n * `ShellBar`'s `launcher` slot and the two columns align on their own.\n *\n * The rail carries the apps a user works in every day; this carries all of them. That is the whole\n * division of labour, and it is why the launcher is not simply a longer rail.\n *\n * Filtering is local by default, over label, description and `keywords`, accent- and\n * case-insensitively — \"compras\" has to find \"Compras\" and \"periodo\" has to find \"Período\", or the\n * box feels broken in Spanish. Hand it to a server with `isFilteredExternally`.\n */\nexport function AppLauncher({\n sections,\n onAction,\n value,\n title,\n meta,\n isSearchable = true,\n onSearchChange,\n isFilteredExternally,\n isLoading,\n emptyLabel,\n searchPlaceholder,\n 'aria-label': ariaLabel,\n icon = 'grid-2x2',\n className,\n}: AppLauncherProps) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const handleSearch = (next: string) => {\n setQuery(next);\n onSearchChange?.(next);\n };\n\n const visible = React.useMemo(() => {\n // Under external filtering `sections` is already the answer. Filtering it again is not merely\n // redundant: it drops every match the server made on something the item does not contain.\n if (isFilteredExternally) return sections;\n const q = query.trim();\n if (!q) return sections;\n return (\n sections\n .map((section) => ({\n ...section,\n items: section.items.filter((i) => contains(searchableText(i), q)),\n }))\n // A heading over nothing reads as a section that failed to load, so empty ones are dropped\n // rather than left standing — which is also what makes the empty state below reachable.\n .filter((section) => section.items.length > 0)\n );\n }, [sections, query, isFilteredExternally, contains]);\n\n const isEmpty = !isLoading && visible.length === 0;\n const label = ariaLabel ?? msg.appLauncherLabel;\n\n return (\n // Each opening starts from the full list, as CommandPalette and ValueHelpDialog do. Reset through\n // `handleSearch` so a consumer filtering on the server clears its query too.\n <DialogTrigger onOpenChange={(open) => open && query && handleSearch('')}>\n <AriaButton className=\"pire-launcher-trigger\" aria-label={label}>\n <Icon name={icon} size={20} />\n </AriaButton>\n {/* Anchored under the trigger and flush with the shell's left edge, so the panel opens over the\n rail it replaces rather than over the work. `containerPadding={0}` keeps that flush edge —\n React Aria otherwise insets an overlay from the viewport and the alignment drifts by 12px. */}\n <Popover\n className={cx('pire-launcher-popover', className)}\n placement=\"bottom start\"\n offset={0}\n crossOffset={0}\n containerPadding={0}\n >\n {/* Dialog, not a bare div: it is what gives the popover a role and a name, and what returns\n focus to the trigger on Escape. `close` comes from React Aria, so choosing an app\n dismisses the panel without the product owning open state. */}\n <AriaDialog className=\"pire-launcher\" aria-label={label}>\n {({ close }) => (\n <>\n <div className=\"pire-launcher-head\">\n <span className=\"pire-launcher-title\">{title ?? msg.appLauncherTitle}</span>\n {meta ? <span className=\"pire-launcher-meta\">{meta}</span> : null}\n </div>\n {isSearchable ? (\n // autoFocus is right here specifically: the panel exists to be searched, and the\n // user just chose to open it, so taking the caret is what they asked for.\n <Input\n aria-label={msg.appLauncherSearch}\n icon=\"search\"\n type=\"search\"\n autoFocus\n isClearable\n value={query}\n onChange={handleSearch}\n placeholder={searchPlaceholder ?? msg.appLauncherSearch}\n />\n ) : null}\n {isLoading ? (\n <div className=\"pire-launcher-empty\" role=\"status\" aria-live=\"polite\">\n {msg.appLauncherLoading}\n </div>\n ) : null}\n {isEmpty ? (\n <div className=\"pire-launcher-empty\">{emptyLabel ?? msg.appLauncherEmpty}</div>\n ) : null}\n {visible.map((section, si) => (\n // Sections are positional zones with no record identity, so the heading is the key\n // where there is one. Same reasoning as ShellRail's groups.\n <div className=\"pire-launcher-section\" key={section.label ?? section.items[0]?.id ?? si}>\n {section.label ? <div className=\"pire-eyebrow\">{section.label}</div> : null}\n <div className=\"pire-launcher-grid\" data-variant={section.variant ?? 'tile'}>\n {section.items.map((item) => {\n const isCurrent = item.id === value;\n const showsDescription =\n (section.variant ?? 'tile') === 'tile' && Boolean(item.description);\n return (\n <AriaButton\n key={item.id}\n className=\"pire-launcher-item\"\n data-selected={isCurrent ? 'true' : undefined}\n aria-current={isCurrent ? 'true' : undefined}\n onPress={() => {\n close();\n onAction?.(item.id);\n }}\n >\n {item.icon ? (\n <span className=\"pire-launcher-item-icon\">\n <Icon\n name={item.icon}\n size={(section.variant ?? 'tile') === 'tile' ? 20 : 16}\n />\n </span>\n ) : null}\n <span className=\"pire-launcher-item-text\">\n <span className=\"pire-launcher-item-label\">{item.label}</span>\n {showsDescription ? (\n <span className=\"pire-launcher-item-desc\">{item.description}</span>\n ) : null}\n </span>\n </AriaButton>\n );\n })}\n </div>\n </div>\n ))}\n </>\n )}\n </AriaDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n","import * as React from 'react';\nimport { ModalOverlay, Modal, Dialog as AriaDialog } from 'react-aria-components';\nimport { DialogDescription, DialogHeader, DialogTitle } from '../feedback/Dialog';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\n/** At or below this viewport width a docked panel is presented as a modal instead: beside a table\n * on a phone there is no room for either. The library's one phone breakpoint — `AppLauncher`\n * drops to a single column at the same width. */\nconst PHONE_MAX_WIDTH = 600;\n\nexport interface SidePanelProps {\n isOpen?: boolean;\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n /** Panel width in px. 400 default; 560 for editable forms. */\n width?: number;\n /**\n * `modal` (default) overlays the page: a scrim, a focus trap, the list behind it inert. Right for\n * a detail that interrupts.\n *\n * `docked` puts the panel *in the flow* — place it beside the table in a flex row — with no scrim\n * and no trap, so the list stays usable and choosing another row switches the record being\n * edited. Right for a 4–8 field master (categories, cost centres, cash boxes) that has no page of\n * its own. `Escape` inside the panel still calls `onClose`.\n *\n * Opening a docked panel does not move focus: it opens because the user picked a row, and pulling\n * them out of the table each time they pick another would make the list unusable from the\n * keyboard. At a phone's width (600px or less) the panel falls back to the modal presentation.\n */\n presentation?: 'modal' | 'docked';\n children?: React.ReactNode;\n footer?: React.ReactNode;\n onClose?: () => void;\n className?: string;\n}\n\nconst narrowQuery = `(max-width: ${PHONE_MAX_WIDTH}px)`;\nconst subscribeNarrow = (notify: () => void) => {\n if (typeof window === 'undefined' || !window.matchMedia) return () => {};\n const query = window.matchMedia(narrowQuery);\n query.addEventListener('change', notify);\n return () => query.removeEventListener('change', notify);\n};\nconst isNarrow = () =>\n typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia(narrowQuery).matches;\n\n/** Right-hand panel for details and edits that must keep the list in view. */\nexport function SidePanel({\n isOpen,\n title,\n subtitle,\n width = 400,\n presentation = 'modal',\n children,\n footer,\n onClose,\n className,\n}: SidePanelProps) {\n const msg = usePireMessages();\n const titleId = React.useId();\n const narrow = React.useSyncExternalStore(subscribeNarrow, isNarrow, () => false);\n\n const head = (heading: React.ReactNode) => (\n <DialogHeader\n heading={heading}\n description={subtitle ? <DialogDescription>{subtitle}</DialogDescription> : null}\n closeLabel={msg.sidePanelClose}\n onClose={onClose}\n />\n );\n\n if (presentation === 'docked' && !narrow) {\n if (!isOpen) return null;\n return (\n // A named `section` (role `region`) rather than the `aside` the shape suggests: `aside` is a\n // complementary landmark, which must sit at the top level of the page, and a docked editor\n // lives inside the app's `main` by definition.\n <section\n className={cx('pire-sidepanel', className)}\n data-presentation=\"docked\"\n aria-labelledby={title ? titleId : undefined}\n style={{ width }}\n onKeyDown={(e) => {\n // A popover or combobox inside the panel that handled Escape itself has already stopped\n // it or marked it handled; only an Escape nobody claimed closes the panel.\n if (e.key !== 'Escape' || e.defaultPrevented || e.nativeEvent.isComposing) return;\n e.preventDefault();\n onClose?.();\n }}\n >\n {head(\n <h2 id={titleId} className=\"pire-dialog-title\">\n {title}\n </h2>,\n )}\n <div className=\"pire-dialog-body\">{children}</div>\n {footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null}\n </section>\n );\n }\n\n return (\n <ModalOverlay\n className=\"pire-sidepanel-overlay\"\n isOpen={isOpen}\n isDismissable\n onOpenChange={(o) => {\n if (!o) onClose?.();\n }}\n >\n <Modal className={cx('pire-sidepanel', className)} style={{ width }}>\n <AriaDialog className=\"pire-dialog\">\n {head(<DialogTitle>{title}</DialogTitle>)}\n <div className=\"pire-dialog-body\">{children}</div>\n {footer ? <footer className=\"pire-dialog-foot\">{footer}</footer> : null}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import type * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Icon slug, 24px. Match the domain: \"search\" for no results, \"file-text\" for no records. */\n icon?: string;\n /** Headline. Rich content, not the DOM title/tooltip attribute. */\n title?: React.ReactNode;\n /** The single action that resolves the emptiness. */\n action?: React.ReactNode;\n /** Tighter padding, for inside cards and panels. */\n compact?: boolean;\n}\n\n/** Says what is missing, why, and the one thing to do about it. */\nexport function EmptyState({\n icon = 'file-text',\n title,\n action,\n compact,\n children,\n className,\n ...rest\n}: EmptyStateProps) {\n return (\n <div className={cx('pire-empty', className)} data-compact={compact ? 'true' : undefined} {...rest}>\n <Icon name={icon} size={24} className=\"pire-empty-icon\" />\n {title ? <p className=\"pire-empty-title\">{title}</p> : null}\n {children ? <p className=\"pire-empty-body\">{children}</p> : null}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { useLocale } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\nimport { useDocumentKeyDown } from '../utils/useDocumentKeyDown';\nimport { decimalSeparatorFor } from '../utils/decimalSeparator';\n\nexport interface NumPadKey {\n /**\n * What the key produces. A digit or a run of digits (`'7'`, `'00'`, `'000'`) is inserted into\n * the buffer directly — that covers the whole base grid plus a money keypad's multi-zero keys\n * for free. Anything else is a value NumPad cannot interpret on its own — an exact-balance\n * button, say — so it is reported through {@link NumPadProps.onAction} instead of touched.\n * `'backspace'`, `'clear'` and `'decimal'` are reserved: they always edit the buffer, never\n * insert. `'decimal'` is placed on the grid by {@link NumPadProps.maxFractionDigits} rather than\n * listed here, and does nothing when that prop is absent.\n */\n value: string;\n /** Visible content. Falls back to `value` for a digit key; required for anything else — an\n * action key has no default text that would make sense to show. */\n label?: React.ReactNode;\n /** Grid columns this key spans, in the 4-column layout. Defaults to 1. */\n span?: 1 | 2;\n}\n\nexport interface NumPadProps {\n /** Names the key grid. Required: it is ~16 individually meaningless buttons (\"7\", \"⌫\"…), and\n * nothing else on screen names the group of them. */\n 'aria-label': string;\n /** What is currently being edited — a selected line, the amount due. Announced through a live\n * region on change, so a screen-reader user knows where their keystrokes are going before they\n * press one. */\n target?: React.ReactNode;\n /** The buffer, controlled. NumPad renders no state of its own — the same principle\n * `NumberField` follows by reading React Aria's state instead of mirroring it — so the grid\n * and the physical keyboard can never disagree about what has been typed. */\n value: string;\n onChange: (value: string) => void;\n /** Extra keys appended after the base grid (`7 8 9 C` / `4 5 6 ⌫` / `1 2 3 0`), in the same\n * 4-column layout — a money keypad's `00`, `000` and a wide \"exact balance\" key. */\n extraKeys?: NumPadKey[];\n /**\n * Fired when a key whose `value` is not purely digits is pressed (the base grid and any\n * numeric `extraKeys` never call this — they go straight to `onChange`). The one place NumPad\n * hands control back to the app: it cannot know what a key like `{ value: 'exact' }` should\n * write into the buffer, only that it was pressed.\n */\n onAction?: (value: string) => void;\n /**\n * How many decimals the buffer accepts. Omitted — the default — no separator key is drawn and\n * the pad types integers, which is all a unit count or a guaraní amount needs.\n *\n * Above 0, the locale's own separator joins the grid as a thirteenth key (the base twelve do not\n * move: this is typed without looking down), the physical `,` and `.` both write it, and the\n * fraction is capped at this many digits. Pass the precision the unit of measure declares — a\n * kilo takes three, a metre two — because a keypad that lets `2,5678` be typed against a\n * `decimal(_,3)` column is a keypad whose figure the database truncates without telling anyone.\n *\n * The separator is read from React Aria's `I18nProvider`, the same source `NumberField` uses.\n * An app that mounts `PireIntlProvider` alone gets `.`, because that provider carries Pire's\n * strings and not the locale.\n */\n maxFractionDigits?: number;\n /** Disables every key at once — real `aria-disabled`, and a press does nothing, not just a\n * colour change. Typical use: no line selected yet to type a quantity into. */\n isDisabled?: boolean;\n size?: 'md' | 'lg';\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The base grid, fixed: `extraKeys` only ever appends to it. `label` is omitted for the digits —\n * their value doubles as their visible text — and set explicitly for the two control keys, whose\n * glyphs are not their accessible names (see the `aria-label` handling in `NumPad` below). */\nconst BASE_KEYS: NumPadKey[] = [\n { value: '7' },\n { value: '8' },\n { value: '9' },\n { value: 'clear', label: 'C' },\n { value: '4' },\n { value: '5' },\n { value: '6' },\n { value: 'backspace', label: '⌫' },\n { value: '1' },\n { value: '2' },\n { value: '3' },\n { value: '0' },\n];\n\n/** Whether a key's `value` is something NumPad knows how to insert on its own — every digit\n * string, including the multi-zero keys a money keypad adds (`'00'`, `'000'`). Anything else,\n * `'backspace'`/`'clear'` included, is handled by name instead. */\nconst isInsertable = (value: string) => /^[0-9]+$/.test(value);\n\n/**\n * As much of `digits` as the fraction still has room for — the whole run while the buffer has no\n * separator in it, since the integer part is never capped.\n *\n * A run rather than a character because `extraKeys` inserts them: a money keypad's `00` pressed\n * with one slot left writes one zero, which is what pressing `0` twice with the second ignored\n * would have done anyway.\n */\nfunction fittingDigits(digits: string, buffer: string, separator: string, maxFractionDigits: number): string {\n const separatorAt = buffer.indexOf(separator);\n if (separatorAt === -1) return digits;\n const room = maxFractionDigits - (buffer.length - separatorAt - 1);\n return room <= 0 ? '' : digits.slice(0, room);\n}\n\n/**\n * Binds the physical keyboard to the same buffer the grid writes to, so the screen this exists\n * for — a counter operated without looking down — never forces a choice between typing and\n * clicking.\n *\n * Unlike {@link useCommandPaletteShortcut}, this is not opt-in: digits are the entire reason\n * NumPad exists, not a global chord an app might already own, so it listens on its own once\n * mounted. Two conditions turn it off without touching `isDisabled`, and both are read from real\n * DOM state rather than trusted to a flag the consumer has to remember to set:\n *\n * - `document.activeElement` being editable is what a click into an ordinary text field\n * elsewhere on the screen looks like.\n * - `containerRef`'s own subtree being `inert` is what a NumPad behind an open `ModalOverlay`\n * looks like (React Aria marks everything outside the overlay inert), so a backgrounded pad goes\n * quiet on its own. It must be `containerRef`, not `activeElement.closest('[inert]')`: focus is\n * inside the overlay by then, not on this instance's DOM.\n */\nfunction useNumPadKeyboard(\n onKey: (value: string) => void,\n isDisabled: boolean | undefined,\n containerRef: React.RefObject<HTMLElement | null>,\n): void {\n const isEditingElsewhere = () => {\n const el = document.activeElement;\n if (!el) return false;\n const tag = el.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || el.hasAttribute('contenteditable');\n };\n\n // `inert` cascades from whichever ancestor React Aria marked, so this instance need not be\n // the element carrying the attribute — only sitting under one that does.\n const isBackgroundedByAnOverlay = () => containerRef.current?.closest('[inert]') != null;\n\n useDocumentKeyDown((event) => {\n if (event.metaKey || event.ctrlKey || event.altKey) return;\n if (isEditingElsewhere() || isBackgroundedByAnOverlay()) return;\n\n if (event.key >= '0' && event.key <= '9') {\n onKey(event.key);\n return;\n }\n if (event.key === 'Backspace') {\n onKey('backspace');\n return;\n }\n if (event.key === 'Escape') {\n onKey('clear');\n return;\n }\n // Both characters, normalised downstream to whichever one the locale uses: a PC numeric\n // block emits `.` whatever the locale, and a cashier in es-PY pressing it means a comma.\n // Whether a separator may be written at all is `applyKey`'s to decide, exactly as it is\n // for a digit — this hook only says which key was pressed.\n if (event.key === ',' || event.key === '.') {\n onKey('decimal');\n return;\n }\n }, isDisabled);\n}\n\n/**\n * An on-screen numeric keypad for a counter operated hands-on-keyboard: a POS quantity or an\n * amount tendered, typed without looking down at the screen.\n *\n * Every press works from the physical keyboard as well as a click (see {@link useNumPadKeyboard},\n * which also keeps a backgrounded pad quiet), and `isDisabled` is a native disabled `<button>`.\n */\nexport function NumPad({\n 'aria-label': ariaLabel,\n target,\n value,\n onChange,\n extraKeys = [],\n onAction,\n maxFractionDigits,\n isDisabled,\n size = 'md',\n className,\n style,\n}: NumPadProps) {\n const msg = usePireMessages();\n const containerRef = React.useRef<HTMLDivElement>(null);\n const { locale } = useLocale();\n const separator = decimalSeparatorFor(locale);\n const allowsDecimal = maxFractionDigits !== undefined && maxFractionDigits > 0;\n\n const applyKey = React.useCallback(\n (key: NumPadKey) => {\n if (isDisabled) return;\n if (key.value === 'backspace') {\n onChange(value.slice(0, -1));\n return;\n }\n if (key.value === 'clear') {\n onChange('');\n return;\n }\n if (key.value === 'decimal') {\n // Two of the three rules live here. The third — the fraction's length — is `fittingDigits`,\n // because it is the digits that get refused, not the separator.\n if (!allowsDecimal || value.includes(separator)) return;\n // Someone who opens the buffer with the separator means `0,5`; `,5` parses as nothing.\n onChange((value === '' ? '0' : value) + separator);\n return;\n }\n if (isInsertable(key.value)) {\n onChange(\n value + (allowsDecimal ? fittingDigits(key.value, value, separator, maxFractionDigits) : key.value),\n );\n return;\n }\n onAction?.(key.value);\n },\n [isDisabled, value, onChange, onAction, allowsDecimal, separator, maxFractionDigits],\n );\n\n useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);\n\n // Appended, never woven in: the base twelve keep their positions so a counter already typing\n // on this pad without looking down does not find them moved.\n const keys: NumPadKey[] = [\n ...BASE_KEYS,\n ...(allowsDecimal ? [{ value: 'decimal', label: separator }] : []),\n ...extraKeys,\n ];\n\n return (\n <div\n ref={containerRef}\n className={cx('pire-numpad', className)}\n style={style}\n data-size={size}\n data-disabled={isDisabled ? 'true' : undefined}\n >\n {target !== undefined ? (\n <div className=\"pire-numpad-target\" role=\"status\" aria-live=\"polite\">\n {target}\n </div>\n ) : null}\n <div className=\"pire-numpad-grid\" role=\"group\" aria-label={ariaLabel}>\n {keys.map((key) => {\n const accessibleLabel =\n key.value === 'backspace'\n ? msg.numPadBackspace\n : key.value === 'clear'\n ? msg.numPadClear\n : key.value === 'decimal'\n ? msg.numPadDecimal\n : undefined;\n return (\n <Button\n key={key.value}\n variant=\"secondary\"\n size={size}\n fullWidth\n className=\"pire-numpad-key\"\n data-span={key.span === 2 ? '2' : undefined}\n data-key={key.value === 'decimal' ? 'decimal' : undefined}\n isDisabled={isDisabled}\n aria-label={accessibleLabel}\n onPress={() => applyKey(key)}\n >\n {key.label ?? key.value}\n </Button>\n );\n })}\n </div>\n </div>\n );\n}\n","import type * as React from 'react';\nimport { DropZone, FileTrigger, isFileDropItem } from 'react-aria-components';\nimport { Button } from '../core/Button';\nimport { Icon } from '../core/Icon';\nimport {\n FileFieldFooter,\n FileFieldLabel,\n useFileFieldIds,\n useFileList,\n type FileUploadProps,\n} from '../forms/FileUpload';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface FileDropZoneProps extends Omit<FileUploadProps, 'chooseLabel'> {\n /** Instruction inside the zone. Overrides the dictionary's `fileDropZonePrompt`. */\n promptLabel?: React.ReactNode;\n /** `compact` for an import modal, where the zone competes with a table for height. */\n height?: 'compact' | 'regular';\n /**\n * Accessible name for the drop target when `label` is omitted.\n *\n * It lands on the `DropZone` rather than the wrapper, because the drop target is the thing\n * being named — React Aria gives it a button role, and an unnamed one fails axe.\n */\n 'aria-label'?: string;\n}\n\n/**\n * The large drop surface, for import screens and anywhere a file is the point of the page.\n *\n * Built on React Aria's `DropZone`, so it is a real drop target for keyboard and assistive tech —\n * not a div with `onDragOver`. It still contains a `FileTrigger`, because drag-and-drop alone is\n * not an accessible way to supply a file.\n */\nexport function FileDropZone({\n label,\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview = true,\n uploadProgress,\n promptLabel,\n height = 'regular',\n description,\n errorMessage,\n isInvalid,\n isDisabled,\n isReadOnly,\n isRequired,\n fullWidth = true,\n className,\n style,\n 'aria-label': ariaLabel,\n ...rest\n}: FileDropZoneProps) {\n const msg = usePireMessages();\n const { files, accept, remove } = useFileList({\n value,\n defaultValue,\n onChange,\n acceptedFileTypes,\n allowsMultiple,\n maxSize,\n onError,\n showPreview,\n isDisabled,\n isReadOnly,\n });\n // DropZone does not forward aria-describedby, so the hint goes on the Choose button below.\n const { labelId, hintId, errorId, describedBy } = useFileFieldIds({\n label,\n description,\n errorMessage,\n isInvalid,\n });\n\n return (\n <div className={cx('pire-field', className)} style={style} data-full-width={String(fullWidth)} {...rest}>\n <FileFieldLabel id={labelId} label={label} isRequired={isRequired} />\n\n <DropZone\n className=\"pire-dropzone\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : labelId}\n data-height={height}\n isDisabled={isDisabled || isReadOnly}\n onDrop={async (e) => {\n // Only file items: a drag can also carry text or a directory, and both would otherwise\n // resolve to nothing halfway through this list.\n const dropped = await Promise.all(e.items.filter(isFileDropItem).map((item) => item.getFile()));\n accept(dropped);\n }}\n >\n <Icon name=\"download\" size={24} className=\"pire-dropzone-icon\" />\n <span className=\"pire-dropzone-prompt\">{promptLabel ?? msg.fileDropZonePrompt}</span>\n <FileTrigger\n acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple}\n onSelect={(list) => accept(list ? [...list] : [])}\n >\n <Button variant=\"secondary\" isDisabled={isDisabled || isReadOnly} aria-describedby={describedBy}>\n {msg.fileUploadChoose}\n </Button>\n </FileTrigger>\n </DropZone>\n\n <FileFieldFooter\n files={files}\n onRemove={isDisabled || isReadOnly ? undefined : remove}\n uploadProgress={uploadProgress}\n description={description}\n errorMessage={errorMessage}\n hintId={hintId}\n errorId={errorId}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAC,SAAI,WAAW,GAAG,cAAc,SAAS,GAAG,OAAc,mBAAiB,OAAO,SAAS,GAAI,GAAG,MACjG;AAAA,kDAAC,kBAAe,IAAI,SAAS,OAAc,YAAwB;AAAA,IAEnE;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,cAAY;AAAA,QACZ,mBAAiB,YAAY,SAAY;AAAA,QACzC,eAAa;AAAA,QACb,YAAY,cAAc;AAAA,QAC1B,QAAQ,OAAO,MAAM;AAGnB,gBAAM,UAAU,MAAM,QAAQ,IAAI,EAAE,MAAM,OAAO,6CAAc,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;AAC9F,iBAAO,OAAO;AAAA,QAChB;AAAA,QAEA;AAAA,wDAAC,QAAK,MAAK,YAAW,MAAM,IAAI,WAAU,sBAAqB;AAAA,UAC/D,8CAAC,UAAK,WAAU,wBAAwB,yBAAe,IAAI,oBAAmB;AAAA,UAC9E;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA,UAAU,CAAC,SAAS,OAAO,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;AAAA,cAEhD,wDAAC,UAAO,SAAQ,aAAY,YAAY,cAAc,YAAY,oBAAkB,aACjF,cAAI,kBACP;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,UAAU,cAAc,aAAa,SAAY;AAAA,QACjD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;;;AzFwEA,IAAAC,iCAOO;AAIP,IAAAA,iCAA0B;","names":["React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Button","AriaButton","React","import_react_aria_components","React","import_react_aria_components","import_jsx_runtime","AriaTooltip","import_jsx_runtime","IconButton","AriaButton","React","import_jsx_runtime","Badge","React","import_react_aria_components","import_jsx_runtime","Tag","AriaButton","import_jsx_runtime","React","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","React","import_jsx_runtime","Text","Strong","import_react_aria_components","import_jsx_runtime","AriaHeading","import_react_aria_components","import_jsx_runtime","AriaLink","import_react_aria_components","import_jsx_runtime","AriaSeparator","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaButton","import_react_aria_components","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","AriaInput","React","import_react_aria_components","import_jsx_runtime","AriaTextArea","React","import_react_aria_components","import_jsx_runtime","AriaSelect","AriaButton","import_react_aria_components","import_jsx_runtime","AriaCheckbox","import_react_aria_components","import_jsx_runtime","AriaRadioGroup","AriaRadio","import_react_aria_components","import_jsx_runtime","AriaSwitch","import_react_aria_components","import_jsx_runtime","AriaRadioGroup","AriaRadio","React","import_react_aria_components","React","import_react_aria_components","React","import_jsx_runtime","norm","AriaButton","import_jsx_runtime","AriaComboBox","AriaInput","React","import_react_aria_components","import_jsx_runtime","value","AriaComboBox","AriaInput","React","import_react_aria_components","import_jsx_runtime","AriaNumberField","AriaButton","AriaInput","import_jsx_runtime","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","ClearButton","AriaDatePicker","AriaButton","AriaDialog","React","import_react_aria_components","import_jsx_runtime","ClearButton","AriaDateRangePicker","AriaButton","AriaDialog","React","React","import_react_aria_components","React","import_react_aria_components","import_jsx_runtime","AriaDialog","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaProgressBar","import_jsx_runtime","import_react_aria_components","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaMenu","AriaMenuItem","AriaMenuSection","AriaSeparator","import_jsx_runtime","AriaBreadcrumb","AriaBreadcrumbs","AriaButton","import_jsx_runtime","initials","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaButton","React","import_react_aria_components","import_jsx_runtime","AriaButton","import_react_aria_components","import_jsx_runtime","AriaTabs","AriaTab","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","Group","AriaTabs","AriaTab","import_jsx_runtime","React","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","useIsomorphicLayoutEffect","React","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_react_aria_components","React","import_jsx_runtime","AriaDialog","AriaInput","AriaMenu","AriaMenuSection","React","import_react_aria_components","import_jsx_runtime","searchableText","AriaButton","AriaDialog","React","import_react_aria_components","import_jsx_runtime","AriaDialog","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","import_react_aria_components"]}