@orianatech/pire 0.9.0 → 0.10.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.
@@ -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/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/forms/FormField.tsx","../src/components/forms/Input.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/ComboBox.tsx","../src/i18n/PireIntlProvider.tsx","../src/i18n/messages.ts","../src/components/forms/MultiComboBox.tsx","../src/components/forms/NumberField.tsx","../src/components/forms/DatePicker.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/SideNav.tsx","../src/components/navigation/Menu.tsx","../src/components/navigation/Tabs.tsx","../src/components/navigation/Breadcrumb.tsx","../src/components/navigation/Pagination.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/LinkList.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/patterns/ConfirmDialog.tsx","../src/components/patterns/SidePanel.tsx","../src/components/patterns/EmptyState.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 { SegmentedControl, type SegmentedControlProps, type SegmentOption } from './components/core/SegmentedControl';\nexport { Text, Strong, type TextProps, type StrongProps, type TextColor, type TextSize } 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';\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 { 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 { DatePicker, type DatePickerProps } from './components/forms/DatePicker';\nexport { ValueHelpField, type ValueHelpFieldProps } from './components/forms/ValueHelpField';\nexport { FileUpload, formatFileSize, type FileUploadProps, type PireFile,\n type FileRejection } from './components/forms/FileUpload';\n\nexport { ShellBar, type ShellBarProps } from './components/navigation/ShellBar';\nexport { SideNav, type SideNavProps, type SideNavItem, type SideNavChildItem,\n type SideNavGroup } from './components/navigation/SideNav';\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 { Menu, MenuItem, MenuSection, MenuSeparator, type MenuProps, type MenuItemProps,\n type MenuSectionProps, type MenuSeparatorProps } from './components/navigation/Menu';\n\nexport { Dialog, type DialogProps } from './components/feedback/Dialog';\nexport { InlineMessage, type InlineMessageProps, type MessageKind } 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 { Skeleton, SkeletonTableRow, type SkeletonProps, type SkeletonShape, type SkeletonTableRowProps,\n type SkeletonTableColumn } from './components/feedback/Skeleton';\n\nexport { DataTable, type DataTableProps, type DataTableColumn, type DataTableSort } 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 { DescriptionList, type DescriptionListProps, type DescriptionItem } from './components/data/DescriptionList';\nexport { Timeline, type TimelineProps, type TimelineEntry } from './components/data/Timeline';\nexport { LinkList, type LinkListProps, type LinkListItem } from './components/data/LinkList';\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 { SelectionBar, type SelectionBarProps } from './components/layout/SelectionBar';\nexport { FooterBar, type FooterBarProps } from './components/layout/FooterBar';\n\nexport { ConfirmDialog, type ConfirmDialogProps } from './components/patterns/ConfirmDialog';\nexport { ValueHelpDialog, type ValueHelpDialogProps } from './components/patterns/ValueHelpDialog';\nexport { SidePanel, type SidePanelProps } from './components/patterns/SidePanel';\nexport { EmptyState, type EmptyStateProps } from './components/patterns/EmptyState';\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 { DialogTrigger, MenuTrigger, SubmenuTrigger, Popover, RouterProvider, I18nProvider } 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 '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--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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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--vertical': '<circle cx=\"16\" cy=\"8\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"24\" r=\"2\"/>',\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 '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 '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 '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 '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 '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--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 'subtract': '<path d=\"M8 15H24V17H8z\"/>',\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 '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 '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 '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','search':'search','bell':'notification','help-circle':'help','grid-3x3':'grid',\n 'home':'home','file-text':'document','clipboard-list':'list--checked','building-2':'building',\n 'boxes':'box','truck':'delivery-truck','stamp':'checkmark--outline','check':'checkmark','x':'close',\n 'minus':'subtract','plus':'add','trash-2':'trash-can','printer':'printer','paperclip':'attachment',\n 'download':'download','calendar':'calendar','hash':'hashtag','history':'recently-viewed',\n 'calculator':'calculator','zap':'flash','palette':'color-palette','settings':'settings',\n 'sliders-horizontal':'settings--adjust','filter':'filter','rows-3':'list','align-justify':'list--boxes',\n 'more-vertical':'overflow-menu--vertical','alert-triangle':'warning--alt','alert-octagon':'error--filled',\n 'alert-circle':'warning--filled','check-circle-2':'checkmark--filled','x-circle':'misuse',\n 'info':'information','circle':'circle-dash','chevron-right':'chevron--right','chevron-left':'chevron--left',\n 'chevron-down':'chevron--down','chevrons-up-down':'chevron--sort','arrow-right':'arrow--right',\n 'arrow-up':'arrow--up','arrow-down':'arrow--down','trending-up':'arrow--up','trending-down':'arrow--down',\n 'shopping-cart':'shopping--cart','user':'user','shapes':'apps','type':'text--font',\n 'package':'box','warehouse':'building--insights-1','arrow-up-down':'arrows--vertical','scan-line':'qr-code',\n 'circle-alert':'warning--filled','clock':'time','layers':'layers','map-pin':'location','copy':'copy',\n 'refresh-cw':'renew','external-link':'launch','pencil':'edit','lock':'locked','eye':'view','minimize-2':'minimize',\n};\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 ? null : (\n <svg viewBox=\"0 0 32 32\" width={size} height={size} fill=\"currentColor\" focusable=\"false\"\n aria-hidden=\"true\" 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 { 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 className?: string;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { children, variant = 'secondary', size = 'md', icon, iconEnd, fullWidth, className, ...rest }, ref,\n) {\n return (\n <AriaButton ref={ref} className={cx('pire-btn', className)} data-variant={variant} data-size={size}\n data-full-width={fullWidth ? 'true' : undefined} {...rest}>\n {icon ? <Icon name={icon} size={16} /> : null}\n {children}\n {iconEnd ? <Icon name={iconEnd} size={16} /> : null}\n </AriaButton>\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 { icon, label, size = 'md', variant = 'tertiary', selected, hideTooltip,\n count, countMax = 9, countVariant = 'number', className, ...rest }, ref,\n) {\n const showsCount = count != null && count > 0;\n const button = (\n <AriaButton ref={ref} aria-label={label} aria-pressed={selected} className={cx('pire-iconbtn', className)}\n data-size={size} data-variant={variant} data-selected={selected ? 'true' : undefined}\n data-has-count={showsCount ? 'true' : undefined} {...rest}>\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 type * as React from 'react';\nimport { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow } from 'react-aria-components';\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 /** A single focusable element (Button, IconButton, Link). */\n children: React.ReactNode;\n}\n\nexport function Tooltip({ label, placement = 'top', delay = 500, children }: TooltipProps) {\n return (\n <TooltipTrigger delay={delay} closeDelay={0}>\n {children}\n <AriaTooltip className=\"pire-tooltip\" placement={placement} offset={6}>\n <OverlayArrow><span /></OverlayArrow>\n {label}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","import type * 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', critical: 'alert-triangle', negative: 'x-circle',\n informative: 'info', 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/** Value state on an object or row. Text is the label, never a bare colour dot. */\nexport function Badge({ children, status = 'neutral', showIcon = true, className, ...rest }: BadgeProps) {\n return (\n <span 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 type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from './Icon';\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\n/** A removable token: applied filters, multi-select values. */\nexport function Tag({ children, onRemove, isDisabled, className, ...rest }: TagProps) {\n return (\n <span className={cx('pire-tag', className)} data-disabled={isDisabled ? 'true' : undefined} {...rest}>\n {children}\n {onRemove ? (\n <AriaButton className=\"pire-tag-remove\" isDisabled={isDisabled} onPress={onRemove}\n aria-label={`Remove ${typeof children === 'string' ? children : 'filter'}`}>\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({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }: CardProps) {\n return (\n <section className={cx('pire-card', className)} data-interactive={interactive ? 'true' : undefined} {...rest}>\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 ? <p className=\"pire-card-sub\" style={{ margin: 0 }}>{subtitle}</p> : 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) => name.trim().split(/\\s+/).slice(0, 2).map((p) => p[0]).join('').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=\"\" onError={() => setFailed(true)}\n style={{ width: '100%', height: '100%', borderRadius: 'inherit', objectFit: 'cover' }} />\n : initials(name)}\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 { id: string; label: string; icon?: string; isDisabled?: boolean }\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({ options, value, defaultValue, onChange, iconOnly, size = 'sm',\n className, style, ...rest }: SegmentedControlProps) {\n const selected = React.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);\n return (\n <ToggleButtonGroup className={cx('pire-segmented', className)} data-size={size} style={style}\n aria-label={rest['aria-label']} selectionMode=\"single\" disallowEmptySelection\n selectedKeys={selected} onSelectionChange={(keys) => {\n const first = [...keys][0];\n if (first != null) onChange?.(String(first));\n }}>\n {options.map((option) => (\n <ToggleButton key={option.id} id={option.id} className=\"pire-segmented-item\"\n isDisabled={option.isDisabled} aria-label={iconOnly ? option.label : undefined}>\n {option.icon ? <Icon name={option.icon} size={16} /> : null}\n {iconOnly ? null : option.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n","import type * 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/** Body copy, captions, metadata and eyebrows — everything that is text but not a heading. */\nexport function Text({\n size = 'body', color = 'primary', weight = 'regular', numeric, eyebrow, truncate,\n elementType: Wrapper = 'p', className, style, ...rest\n}: TextProps) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle = lineClamp == null\n ? style\n : ({ ['--pire-text-clamp' as string]: lineClamp, ...style } as React.CSSProperties);\n\n return (\n <Wrapper\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 function Strong({ className, ...rest }: StrongProps) {\n return <Text 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, size, color = 'primary', truncate, className, style, ...rest\n}: HeadingProps) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle = 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', emphasis = 'default', spacing = 'md', className, ...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 { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\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 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({ label, htmlFor, isRequired, hint, error, layout = 'stacked', children, className, ...rest }: FormFieldProps) {\n return (\n <div className={cx('pire-field', className)} data-layout={layout} {...rest}>\n <label className=\"pire-field-label\" htmlFor={htmlFor}>\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </label>\n {children}\n {error ? (\n <span className=\"pire-field-error\" role=\"alert\"><Icon name=\"alert-circle\" size={12} />{error}</span>\n ) : hint ? <span className=\"pire-field-hint\">{hint}</span> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { TextField, Label, Input as AriaInput, Group, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\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 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 /** 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({ label, icon, suffix, description, errorMessage, size = 'md', numeric,\n fullWidth = true, className, style, inputRef, onChange, ...rest }: InputProps) {\n return (\n <TextField className={cx('pire-field', className)} style={style} onChange={onChange}\n validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\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 {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import * as React from 'react';\nimport { TextField, Label, TextArea as AriaTextArea, Group, Text, FieldError } from 'react-aria-components';\nimport { cx } from '../utils/cx';\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 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({ label, description, errorMessage, size = 'md', rows = 3, autoGrow,\n maxRows, fullWidth = true, className, style, textAreaRef, onChange, ...rest }: TextAreaProps) {\n const innerRef = React.useRef<HTMLTextAreaElement>(null);\n const ref = React.useCallback((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 }, [textAreaRef]);\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 return (\n <TextField className={cx('pire-field', className)} style={style} onChange={onChange}\n validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-multiline=\"true\" data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <AriaTextArea ref={ref} rows={rows} onInput={autoGrow ? grow : undefined}\n className={cx('pire-input', 'pire-textarea')} data-auto-grow={autoGrow ? 'true' : undefined} />\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import type * as React from 'react';\nimport { Select as AriaSelect, Label, Button as AriaButton, SelectValue, Popover, ListBox,\n ListBoxItem, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport type SelectOption = string | { value: string; label: string; isDisabled?: boolean };\n\nexport interface SelectProps {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n onChange?: (value: string) => void;\n options?: SelectOption[];\n /** Shown when nothing is selected. */\n placeholder?: string;\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\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({ label, value, defaultValue, onChange, options = [], placeholder = 'Select…',\n description, errorMessage, size = 'md', fullWidth = true, className, style, ...rest }: SelectProps) {\n const items = options.map(norm);\n return (\n <AriaSelect className={cx('pire-field', className)} style={style} selectedKey={value}\n defaultSelectedKey={defaultValue} onSelectionChange={(k) => onChange?.(String(k))}\n placeholder={placeholder} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <AriaButton className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}>\n <SelectValue className=\"pire-select-value\" />\n <Icon name=\"chevron-down\" size={16} className=\"pire-leading-icon\" />\n </AriaButton>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\" items={items}>\n {(item) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 ? <Icon name=\"minus\" size={12} /> : isSelected ? <Icon name=\"check\" size={12} /> : 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 { RadioGroup as AriaRadioGroup, Radio as AriaRadio, Label, Text, FieldError,\n type RadioGroupProps as AriaRadioGroupProps, type RadioProps as AriaRadioProps } 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({ label, description, errorMessage, children, className, ...rest }: 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 ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : 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\"><span className=\"pire-switch-thumb\" /></span>\n <span>{label ?? children}</span>\n </AriaSwitch>\n );\n}\n","import type * as React from 'react';\nimport { ComboBox as AriaComboBox, Label, Input as AriaInput, Button as AriaButton, Group,\n Popover, ListBox, ListBoxItem, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ComboBoxOption { value: string; label: string; secondary?: string; isDisabled?: boolean }\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 options?: Array<string | ComboBoxOption>;\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\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({ label, value, defaultValue, onChange, onInputChange, options = [],\n description, errorMessage, size = 'md', fullWidth = true, isFilteredExternally, isLoading,\n loadingLabel, emptyLabel, onLoadMore, className, style, ...rest }: ComboBoxProps) {\n const msg = usePireMessages();\n const items = options.map(norm);\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 return (\n <AriaComboBox className={cx('pire-field', className)} style={style} selectedKey={value}\n defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => {\n // Ignore confirmations mid-flight: the highlighted row still belongs to the last response.\n if (isLoading) return;\n onChange?.(k == null ? null : String(k));\n }}\n onInputChange={onInputChange} {...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\" validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}>\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <AriaInput className=\"pire-input\" placeholder={rest.placeholder} />\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.comboBoxShowSuggestions} style={{ width: 20, height: 20 }}>\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\"\n onScroll={onLoadMore ? (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 } : undefined}\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={showsStatus ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n ) : undefined}>\n {(item: ComboBoxOption) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 { 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(\n () => (messages ? { ...enMessages, ...messages } : enMessages),\n [messages],\n );\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 while the table body is a skeleton. */\n dataTableLoading: 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 /** 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\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 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 /** 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\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\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 dataTableLoading: 'Loading records',\n\n dialogClose: 'Close',\n sidePanelClose: 'Close panel',\n\n inlineMessageDismiss: 'Dismiss message',\n toastDismiss: 'Dismiss',\n toastRegionLabel: 'Notifications',\n\n comboBoxShowSuggestions: 'Show suggestions',\n comboBoxLoading: 'Searching…',\n\n datePickerOpenCalendar: 'Open calendar',\n datePickerPreviousMonth: 'Previous month',\n datePickerNextMonth: 'Next month',\n\n numberFieldIncrease: 'Increase',\n numberFieldDecrease: 'Decrease',\n\n valueHelpFieldClear: 'Clear selection',\n valueHelpFieldOpenNamed: 'Select {label}',\n valueHelpFieldOpen: 'Open value help',\n valueHelpDialogSearch: 'Search records',\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\n fileUploadChoose: 'Choose files',\n fileUploadRemoveNamed: 'Remove {name}',\n fileUploadUploading: 'Uploading',\n fileDropZonePrompt: 'Drag files here, or choose them',\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 dataTableLoading: 'Cargando registros',\n\n dialogClose: 'Cerrar',\n sidePanelClose: 'Cerrar panel',\n\n inlineMessageDismiss: 'Descartar mensaje',\n toastDismiss: 'Descartar',\n toastRegionLabel: 'Notificaciones',\n\n comboBoxShowSuggestions: 'Mostrar sugerencias',\n comboBoxLoading: 'Buscando…',\n\n datePickerOpenCalendar: 'Abrir calendario',\n datePickerPreviousMonth: 'Mes anterior',\n datePickerNextMonth: 'Mes siguiente',\n\n numberFieldIncrease: 'Aumentar',\n numberFieldDecrease: 'Disminuir',\n\n valueHelpFieldClear: 'Limpiar selección',\n valueHelpFieldOpenNamed: 'Seleccionar {label}',\n valueHelpFieldOpen: 'Abrir ayuda de valores',\n valueHelpDialogSearch: 'Buscar 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\n fileUploadChoose: 'Elegir archivos',\n fileUploadRemoveNamed: 'Quitar {name}',\n fileUploadUploading: 'Subiendo',\n fileDropZonePrompt: 'Arrastrá archivos acá, o elegilos',\n};\n","import * as React from 'react';\nimport { ComboBox as AriaComboBox, Label, Input as AriaInput, Button as AriaButton, ButtonContext,\n Group, Popover, ListBox, ListBoxItem, Text, FieldError, VisuallyHidden } 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';\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 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({ label, value, defaultValue, onChange, onInputChange, options = [],\n description, errorMessage, allowsCustomValue, size = 'md',\n isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore,\n fullWidth = true, className, style, ...rest }: 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 return (\n <AriaComboBox className={cx('pire-field', className)} style={style} selectionMode=\"multiple\"\n value={values} onChange={(keys) => { if (!isLoading) commit(keys.map(String)); }}\n onInputChange={onInputChange} {...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\" validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-multiline=\"true\" data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}>\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 ref={inputRef} className={cx('pire-input', 'pire-chipinput')}\n placeholder={rest.placeholder} onKeyDownCapture={onKeyDownCapture} />\n </div>\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.comboBoxShowSuggestions} style={{ width: 20, height: 20 }}>\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n <VisuallyHidden><span aria-live=\"polite\">{announcement}</span></VisuallyHidden>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\"\n onScroll={onLoadMore ? (e) => {\n const el = e.currentTarget;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();\n } : undefined}\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={showsStatus ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n ) : undefined}>\n {(item: ComboBoxOption) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 type * as React from 'react';\nimport { NumberField as AriaNumberField, Label, Input as AriaInput, Group, Button as AriaButton,\n Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface NumberFieldProps {\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 value?: number;\n defaultValue?: number;\n onChange?: (value: number) => void;\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 size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\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. */\nexport function NumberField({ label, suffix, description, errorMessage, hideStepper, size = 'md',\n fullWidth = true, className, style, ...rest }: NumberFieldProps) {\n const msg = usePireMessages();\n return (\n <AriaNumberField className={cx('pire-field', className)} style={style} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <AriaInput className=\"pire-input\" data-numeric=\"true\" />\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n {hideStepper ? null : (\n <span className=\"pire-stepper\">\n <AriaButton slot=\"increment\" className=\"pire-stepper-btn\" aria-label={msg.numberFieldIncrease}><Icon name=\"plus\" size={10} /></AriaButton>\n <AriaButton slot=\"decrement\" className=\"pire-stepper-btn\" aria-label={msg.numberFieldDecrease}><Icon name=\"minus\" size={10} /></AriaButton>\n </span>\n )}\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaNumberField>\n );\n}\n","import type * as React from 'react';\nimport { DatePicker as AriaDatePicker, Label, Group, DateInput, DateSegment, Button as AriaButton,\n Popover, Dialog as AriaDialog, Calendar, CalendarGrid, CalendarGridHeader, CalendarHeaderCell,\n CalendarGridBody, CalendarCell, Heading, Text, FieldError } 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';\n\nexport interface DatePickerProps {\n label?: React.ReactNode;\n value?: DateValue | null;\n defaultValue?: DateValue | null;\n onChange?: (value: DateValue | null) => void;\n minValue?: DateValue;\n maxValue?: DateValue;\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 size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\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({ label, description, errorMessage, size = 'md', fullWidth = true,\n className, style, ...rest }: DatePickerProps) {\n const msg = usePireMessages();\n return (\n <AriaDatePicker className={cx('pire-field', className)} style={style} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <DateInput className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerOpenCalendar} style={{ width: 24, height: 24 }}>\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\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 slot=\"previous\" className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerPreviousMonth}>\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>\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 * 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 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 }>({ label, value, onChange, format = defaultFormat,\n rows = [], columns = [], dialogTitle, placeholder = 'Not selected', description, errorMessage,\n isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>) {\n const msg = usePireMessages();\n const [open, setOpen] = React.useState(false);\n return (\n <div className={cx(className)} style={style}>\n <div style={{ display: 'flex', gap: 'var(--sp-2)', alignItems: 'flex-end' }}>\n <Input label={label} isReadOnly isInvalid={isInvalid} isDisabled={isDisabled} isRequired={isRequired}\n value={value ? format(value) : ''} placeholder={placeholder}\n description={description} errorMessage={errorMessage} />\n {allowsClear && value ? (\n <IconButton icon=\"x\" label={msg.valueHelpFieldClear} variant=\"outlined\" isDisabled={isDisabled}\n onPress={() => onChange?.(null)} />\n ) : null}\n <IconButton icon=\"search\" label={typeof label === 'string'\n ? msg.valueHelpFieldOpenNamed.replace('{label}', label.toLowerCase())\n : msg.valueHelpFieldOpen}\n variant=\"outlined\" isDisabled={isDisabled} onPress={() => setOpen(true)} />\n </div>\n <ValueHelpDialog isOpen={open} onClose={() => setOpen(false)} title={dialogTitle ?? label ?? 'Select a record'}\n columns={columns} rows={rows} onSelect={(row) => onChange?.(row)} />\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 /** Receives the picked row. */\n onSelect?: (row: T) => void;\n onClose?: () => 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 }>({ isOpen, title = 'Select a record',\n columns = [], rows = [], searchPlaceholder = 'Search by ID or name', emptyLabel, onSelect, onClose }: ValueHelpDialogProps<T>) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n React.useEffect(() => { if (isOpen) setQuery(''); }, [isOpen]);\n const filtered = React.useMemo(() => {\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]);\n return (\n <Dialog isOpen={isOpen} size=\"lg\" title={title} onClose={onClose}\n footer={<Button variant=\"tertiary\" onPress={onClose}>{msg.valueHelpDialogCancel}</Button>}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--sp-3)' }}>\n <Input aria-label={msg.valueHelpDialogSearch} icon=\"search\" type=\"search\" value={query} onChange={setQuery}\n placeholder={searchPlaceholder} autoFocus />\n <DataTable aria-label={typeof title === 'string' ? title : 'Records'} density=\"condensed\"\n columns={columns} rows={filtered} emptyLabel={emptyLabel ?? `No records match “${query}”.`}\n onRowAction={(row) => { onSelect?.(row); onClose?.(); }} />\n </div>\n </Dialog>\n );\n}\n","import type * 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 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({ isOpen, onOpenChange, title, subtitle, children, footer, onClose,\n size = 'md', isDismissable = true, showClose = true, className, style }: DialogProps) {\n const msg = usePireMessages();\n const close = () => { onClose?.(); onOpenChange?.(false); };\n return (\n <ModalOverlay className=\"pire-modal-overlay\" isOpen={isOpen} isDismissable={isDismissable}\n onOpenChange={(o) => { if (!o) close(); }}>\n <Modal className={cx('pire-modal', className)} data-size={size} style={style}>\n <AriaDialog className=\"pire-dialog\">\n {title ? (\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n <Heading slot=\"title\" className=\"pire-dialog-title\">{title}</Heading>\n {subtitle ? <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>{subtitle}</p> : null}\n </div>\n {showClose ? <IconButton icon=\"x\" label={msg.dialogClose} size=\"sm\" onPress={close} /> : null}\n </header>\n ) : null}\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 { Table, TableHeader, TableBody, Column, Row, Cell, type Selection,\n type SortDescriptor } 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\nexport interface DataTableColumn<T = any> {\n key: string;\n label: string;\n align?: 'left' | 'right' | 'center';\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 render?: (row: T) => React.ReactNode;\n}\n\nexport interface DataTableSort { key: string; dir: 'asc' | 'desc' }\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 selectable?: boolean;\n selected?: Array<string | number>;\n onSelectionChange?: (ids: Array<string | number>) => void;\n sort?: DataTableSort;\n onSortChange?: (sort: DataTableSort) => void;\n onRowAction?: (row: T) => void;\n emptyLabel?: React.ReactNode;\n /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */\n isLoading?: boolean;\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 }>({ columns, rows, density = 'regular',\n selectable, selected, onSelectionChange, sort, onSortChange, onRowAction, stickyHeader = true,\n emptyLabel = 'No records match the current filters.', isLoading, loadingRowCount, loadingLabel,\n className, style, ...rest }: DataTableProps<T>) {\n const msg = usePireMessages();\n const sortDescriptor: SortDescriptor | undefined = sort\n ? { column: sort.key, direction: sort.dir === 'asc' ? 'ascending' : 'descending' } : undefined;\n const handleSelection = (keys: Selection) => {\n if (keys === 'all') return onSelectionChange?.(rows.map((r) => r.id));\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 ...(selectable ? [{ width: 44 }] : []),\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 return (\n <div className={cx('pire-table-wrap', className)} style={style}\n data-loading={isLoading ? 'true' : undefined} aria-busy={isLoading ? 'true' : undefined}>\n <Table className=\"pire-table\" data-density={density} data-sticky={String(stickyHeader)}\n aria-label={rest['aria-label']}\n selectionMode={selectable ? 'multiple' : 'none'}\n selectedKeys={selected ? new Set(selected) : undefined}\n onSelectionChange={handleSelection}\n sortDescriptor={sortDescriptor}\n onSortChange={(d) => onSortChange?.({ key: String(d.column), dir: d.direction === 'ascending' ? 'asc' : 'desc' })}\n onRowAction={onRowAction ? (key) => {\n const row = rows.find((r) => String(r.id) === String(key));\n if (row) onRowAction(row);\n } : undefined}>\n <TableHeader className=\"pire-thead-row\">\n {selectable ? (\n <Column className=\"pire-th\" width={44}>\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectAll} />\n </Column>\n ) : null}\n {columns.map((c, i) => (\n <Column key={c.key} id={c.key} className=\"pire-th\" isRowHeader={i === 0 && !selectable}\n allowsSorting={c.sortable} width={c.width as never}\n data-align={c.numeric || c.align === 'right' ? 'right' : c.align}\n data-allows-sorting={c.sortable ? 'true' : undefined}>\n <span className=\"pire-th-inner\">\n {c.label}\n {c.sortable ? (\n <Icon size={12} name={sort?.key === c.key ? (sort.dir === 'asc' ? 'arrow-up' : 'arrow-down') : 'chevrons-up-down'}\n style={{ color: sort?.key === c.key ? 'var(--accent-subtle-fg)' : 'var(--text-tertiary)' }} />\n ) : null}\n </span>\n </Column>\n ))}\n </TableHeader>\n <TableBody renderEmptyState={() => (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}</div>\n ))}>\n {body.map((row) => (\n <Row key={row.id} id={row.id} className=\"pire-tr\" data-pressable={onRowAction ? 'true' : undefined}>\n {selectable ? <Cell className=\"pire-td\"><Checkbox slot=\"selection\" aria-label={msg.dataTableSelectRow} /></Cell> : null}\n {columns.map((c) => (\n <Cell key={c.key} className=\"pire-td\" data-numeric={c.numeric ? 'true' : undefined}\n style={{ textAlign: c.align && !c.numeric ? c.align : undefined }}>\n {c.render ? c.render(row) : (row as Record<string, React.ReactNode>)[c.key]}\n </Cell>\n ))}\n </Row>\n ))}\n </TableBody>\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 className={cx('pire-skeleton', className)} data-shape={shape} aria-hidden=\"true\"\n style={{ width, height, ...style }} {...rest} />\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({ columns, density = 'regular', className, style, ...rest }: SkeletonTableRowProps) {\n const cells: SkeletonTableColumn[] = typeof columns === 'number'\n ? Array.from({ length: columns }, () => ({}))\n : columns;\n return (\n <div className={cx('pire-skeleton-row', className)} data-density={density} aria-hidden=\"true\"\n style={style} {...rest}>\n {cells.map((c, i) => {\n const align = c.numeric ? 'right' : c.align ?? 'left';\n return (\n // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.\n <div key={i} className=\"pire-skeleton-cell\" data-align={align}\n style={{ width: c.width, flex: c.width ? '0 0 auto' : undefined }}>\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\nexport interface FileUploadProps {\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('.') ? file.name.toLowerCase().endsWith(t.toLowerCase())\n : t.endsWith('/*') ? file.type.startsWith(t.slice(0, -1))\n : file.type === t);\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, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError,\n showPreview = true, uploadProgress, chooseLabel, description, errorMessage,\n isInvalid, isDisabled, isReadOnly, isRequired, fullWidth = true, className, style,\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 for (const url of created.current) URL.revokeObjectURL(url);\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 className={cx('pire-field', 'pire-fileupload', className)} style={style}\n data-full-width={String(fullWidth)} data-invalid={isInvalid ? 'true' : undefined}>\n {label ? (\n <span className=\"pire-field-label\">\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </span>\n ) : null}\n\n <FileTrigger acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple} onSelect={accept}>\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 : <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />}\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 icon=\"x\" size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)} />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? (\n <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} />\n ) : null}\n\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : 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({ value = 0, minValue = 0, maxValue = 100, label, showValue = true,\n isIndeterminate, status = 'informative', size = 'md', className, style }: ProgressBarProps) {\n return (\n <AriaProgressBar className={cx('pire-progress', className)} data-status={status} data-size={size}\n value={value} minValue={minValue} maxValue={maxValue} isIndeterminate={isIndeterminate} style={style}>\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 { IconButton } from '../core/IconButton';\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 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\nconst initials = (name: string) => name.trim().split(/\\s+/).slice(0, 2).map((p) => p[0]).join('').toUpperCase();\n\n/** Fixed 48px application chrome. One per page, always the first landmark. */\nexport function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel = 'Open navigation',\n searchLabel = 'Search', actions, user, className, ...rest }: ShellBarProps) {\n return (\n <header className={cx('pire-shellbar', className)} {...rest}>\n {onMenu ? <IconButton icon=\"menu\" label={menuLabel} variant=\"inverse\" size=\"sm\" onPress={onMenu} /> : null}\n {monogram ? <span className=\"pire-shellbar-mono\" aria-hidden=\"true\">{monogram}</span> : null}\n {product ? <span className=\"pire-shellbar-product\">{product}</span> : null}\n {title ? <span className=\"pire-shellbar-title\">{title}</span> : null}\n <span className=\"pire-shellbar-spacer\" />\n {onSearch ? <IconButton icon=\"search\" label={searchLabel} variant=\"inverse\" size=\"sm\" onPress={onSearch} /> : null}\n {actions}\n {user ? <span className=\"pire-avatar\" title={user} aria-label={user} role=\"img\">{initials(user)}</span> : null}\n </header>\n );\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { Button as AriaButton, Disclosure, DisclosureGroup, DisclosurePanel,\n MenuTrigger, Popover } 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 { id: string; label: string; count?: number }\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 { label?: string; items: SideNavItem[] }\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 * 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({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange,\n collapsed, railFlyout = true, footer, className, ...rest }: 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 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 key={item.id} className=\"pire-sidenav-item\" 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 {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 ? <Tooltip key={item.id} label={item.label} placement=\"right\">{button}</Tooltip> : button;\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 className=\"pire-sidenav-item\" aria-label={item.label}\n data-active-child={item.id === activeParent ? 'true' : undefined}>\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n </AriaButton>\n <Popover className=\"pire-popover\" placement=\"right top\" offset={4}>\n <Menu aria-label={item.label} className=\"pire-sidenav-flyout\"\n onAction={(key) => onChange?.(String(key))}>\n {(item.items ?? []).map((child) => (\n <MenuItem key={child.id} id={child.id}>{child.label}</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 slot=\"trigger\" className=\"pire-sidenav-item\" data-kind=\"group\"\n data-active-child={item.id === activeParent ? 'true' : undefined}>\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 key={child.id} className=\"pire-sidenav-item pire-sidenav-subitem\"\n data-selected={selected ? 'true' : undefined} aria-current={selected ? 'page' : undefined}\n onPress={() => onChange?.(child.id)}>\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 className={cx('pire-sidenav', className)} data-collapsed={collapsed ? 'true' : undefined}\n aria-label={msg.sideNavLabel} {...rest}>\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 className=\"pire-sidenav-tree\" allowsMultipleExpanded\n expandedKeys={expanded} onExpandedChange={handleExpandedChange}>\n {rows}\n </DisclosureGroup>\n ) : rows}\n </div>\n );\n })}\n {footer ? <div className=\"pire-sidenav-footer\">{footer}</div> : null}\n </nav>\n );\n}\n","import type * as React from 'react';\nimport {\n Menu as AriaMenu, MenuItem as AriaMenuItem, MenuSection as AriaMenuSection,\n Separator as AriaSeparator, Header,\n type MenuProps as AriaMenuProps, type MenuItemProps as AriaMenuItemProps,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object = object>\n 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 = width == null\n ? style\n : ({ ['--pire-menu-min-w' as string]: width, ...style } as React.CSSProperties);\n\n return (\n <AriaMenu\n className={cx('pire-menu', className)}\n style={menuStyle}\n {...(rest as AriaMenuProps<T>)}\n />\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 /** Keyboard shortcut, right-aligned. Painted only — it registers nothing. */\n shortcut?: string;\n /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */\n tone?: 'default' | 'danger';\n className?: string;\n}\n\n/** A single command. Accepts `href`, so navigation items render a real anchor. */\nexport function MenuItem({\n children, icon, description, shortcut, tone = 'default', className, ...rest\n}: MenuItemProps) {\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 {shortcut ? <kbd className=\"pire-menu-item-shortcut\">{shortcut}</kbd> : 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 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 { id: string; label: string; icon?: string; count?: number; isDisabled?: boolean }\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 className={className} style={style} selectedKey={value} defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => onChange?.(String(k))}>\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 { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface BreadcrumbItem { id?: string; label: string; href?: string }\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 className?: string;\n style?: React.CSSProperties;\n}\n\nexport function Breadcrumb({ items, onNavigate, className, style }: BreadcrumbProps) {\n return (\n <AriaBreadcrumbs className={cx('pire-breadcrumbs', className)} style={style} items={items}\n onAction={(key) => onNavigate?.(String(key))}>\n {(item) => {\n const last = items[items.length - 1] === item;\n return (\n <AriaBreadcrumb className=\"pire-breadcrumb\" id={item.id ?? item.label}>\n {last ? item.label : <Link href={item.href}>{item.label}</Link>}\n {last ? null : <Icon name=\"chevron-right\" size={12} style={{ color: 'var(--text-tertiary)' }} />}\n </AriaBreadcrumb>\n );\n }}\n </AriaBreadcrumbs>\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({ page = 1, pageSize = 25, total = 0, onPageChange, onPageSizeChange,\n pageSizes = [25, 50, 100], className, style }: 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 icon=\"chevron-left\" label={msg.paginationPrevious} size=\"sm\" variant=\"outlined\"\n isDisabled={page <= 1} onPress={() => onPageChange?.(page - 1)} />\n <span className=\"pire-pagination-count\" aria-live=\"polite\">\n {msg.paginationPageOf.replace('{page}', String(page)).replace('{pages}', String(pages))}\n </span>\n <IconButton icon=\"chevron-right\" label={msg.paginationNext} size=\"sm\" variant=\"outlined\"\n isDisabled={page >= pages} onPress={() => onPageChange?.(page + 1)} />\n {onPageSizeChange ? (\n <Select aria-label={msg.paginationRowsPerPage} size=\"sm\" fullWidth={false} value={String(pageSize)}\n options={pageSizes.map((s) => ({ value: String(s), label: `${s} rows` }))}\n onChange={(v) => onPageSizeChange(Number(v))} style={{ width: 120 }} />\n ) : null}\n </nav>\n );\n}\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', success: 'check-circle-2', warning: 'alert-triangle', 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({ kind = 'info', title, action, onClose, children, className, ...rest }: InlineMessageProps) {\n const msg = usePireMessages();\n const assertive = kind === 'error' || kind === 'warning';\n return (\n <div className={cx('pire-msg', className)} data-kind={kind}\n role={assertive ? 'alert' : 'status'} aria-live={assertive ? 'assertive' : 'polite'} {...rest}>\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', success: 'check-circle-2', warning: 'alert-triangle', 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({ kind = 'success', onClose, position = 'bottom-center', children, className, ...rest }: ToastProps) {\n const msg = usePireMessages();\n return (\n <div className={cx('pire-toast', className)} data-position={position}\n role={kind === 'error' ? 'alert' : 'status'} aria-live={kind === 'error' ? 'assertive' : 'polite'} {...rest}>\n <Icon name={KIND_ICON[kind]} size={16} />\n <span style={{ flex: 1 }}>{children}</span>\n {onClose ? <IconButton icon=\"x\" label={msg.toastDismiss} size=\"sm\" variant=\"inverse\" onPress={onClose} /> : null}\n </div>\n );\n}\n\nexport interface ToastItem { id: string; kind?: MessageKind; message: React.ReactNode; timeout?: number }\n\ninterface ToastContextValue { add: (toast: Omit<ToastItem, 'id'>) => string; close: (id: string) => void }\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\n/** Queue + live region. Mount once near the app root. */\nexport function ToastProvider({ children, timeout = 6000 }: { children?: React.ReactNode; timeout?: number }) {\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((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 }, [close, timeout]);\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)} style={{ position: 'static', transform: 'none' }}>\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({ label, value, unit, delta, deltaDirection, deltaTone, footnote, icon,\n status = 'neutral', onPress, className, style }: 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}{label}\n </span>\n <span className=\"pire-kpi-value\">{value}{unit ? <span className=\"pire-kpi-unit\">{unit}</span> : null}</span>\n {delta ? (\n <span className=\"pire-kpi-delta\" data-tone={tone}>\n {deltaDirection ? <Icon name={deltaDirection === 'up' ? 'trending-up' : 'trending-down'} size={12} /> : 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}>{body}</AriaButton>\n : <div {...props}>{body}</div>;\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface ObjectFact { label: string; value: React.ReactNode; numeric?: boolean }\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({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }: 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 className=\"pire-fact-value\" data-numeric={fact.numeric ? 'true' : undefined} style={{ margin: 0 }}>\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 { id: string; label: string }\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({ children, activeFilters = [], onRemoveFilter, onClear, onGo,\n resultLabel, actions, goLabel, clearAllLabel, className, ...rest }: 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 ? <Button variant=\"primary\" onPress={onGo}>{go}</Button> : 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}>{clearAll}</Button>\n ) : null}\n {resultLabel ? <span className=\"pire-filterbar-result\" aria-live=\"polite\">{resultLabel}</span> : 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({ items, layout = 'rows', columns = 3, className, style, ...rest }: DescriptionListProps) {\n return (\n <dl className={cx('pire-dl', className)} data-layout={layout}\n style={{ ...(layout === 'grid' ? { '--pire-dl-cols': columns } : null), ...style } as React.CSSProperties} {...rest}>\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\">{item.label}{item.hint}</dt>\n <dd className=\"pire-dl-value\" data-numeric={item.numeric ? 'true' : undefined}>{item.value}</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","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 /** 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, className, ...rest }: LinkListProps) {\n return (\n <div className={cx('pire-linklist', className)} role=\"list\" {...rest}>\n {items.map((item) => (\n <AriaButton key={item.id} className=\"pire-linklist-item\" onPress={() => onSelect?.(item.id)}>\n {item.icon ? <Icon name={item.icon} size={16} style={{ color: 'var(--text-secondary)' }} /> : null}\n {item.key ? <span className=\"pire-linklist-key\">{item.key}</span> : null}\n {item.text ? <span className=\"pire-linklist-text\">{item.text}</span> : null}\n {item.trailing}\n </AriaButton>\n ))}\n </div>\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', hasBorder = true, children, className, ...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 ? <span style={{ font: 'var(--type-caption)', color: 'var(--text-tertiary)' }}>{meta}</span> : null}\n {actions ? <div className=\"pire-sectionhead-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of selected records. The bar renders nothing at 0. */\n count: number;\n /** Noun for the records, singular. Default \"record\". */\n noun?: 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({ count, noun = 'record', children, actions, className, ...rest }: SelectionBarProps) {\n if (!count) return null;\n return (\n <div className={cx('pire-selectionbar', className)} role=\"status\" aria-live=\"polite\" {...rest}>\n <span className=\"pire-selectionbar-count\">\n {count.toLocaleString()} {noun}{count === 1 ? '' : 's'} selected\n </span>\n {children ? <span style={{ color: 'var(--text-secondary)', font: 'var(--type-caption)' }}>{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 { Dialog } from '../feedback/Dialog';\nimport { InlineMessage } from '../feedback/InlineMessage';\nimport { Button } from '../core/Button';\n\nexport interface ConfirmDialogProps {\n isOpen?: boolean;\n /** Question form, sentence case: \"Release purchase order?\" */\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\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({ isOpen, title, subtitle, consequence, children, confirmLabel = 'Confirm',\n cancelLabel = 'Cancel', tone = 'primary', isBusy, onConfirm, onCancel }: ConfirmDialogProps) {\n return (\n <Dialog isOpen={isOpen} size=\"sm\" title={title} subtitle={subtitle} onClose={onCancel}\n isDismissable={!isBusy} showClose={false}\n footer={\n <>\n <Button variant=\"tertiary\" isDisabled={isBusy} onPress={onCancel}>{cancelLabel}</Button>\n <Button variant={tone === 'danger' ? 'danger' : 'primary'} isDisabled={isBusy} onPress={onConfirm}>\n {isBusy ? 'Working…' : confirmLabel}\n </Button>\n </>\n }>\n {consequence ? (\n <InlineMessage kind={tone === 'danger' ? 'error' : 'warning'} style={{ marginBottom: children ? 'var(--sp-3)' : 0 }}>\n {consequence}\n </InlineMessage>\n ) : null}\n {children}\n </Dialog>\n );\n}\n","import type * 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 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 children?: React.ReactNode;\n footer?: React.ReactNode;\n onClose?: () => void;\n className?: string;\n}\n\n/** Right-hand overlay for details and edits that must keep the list in view. */\nexport function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }: SidePanelProps) {\n const msg = usePireMessages();\n return (\n <ModalOverlay className=\"pire-sidepanel-overlay\" isOpen={isOpen} isDismissable\n onOpenChange={(o) => { if (!o) onClose?.(); }}>\n <Modal className={cx('pire-sidepanel', className)} style={{ width }}>\n <AriaDialog className=\"pire-dialog\" style={{ height: '100%' }}>\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n <Heading slot=\"title\" className=\"pire-dialog-title\">{title}</Heading>\n {subtitle ? <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>{subtitle}</p> : null}\n </div>\n <IconButton icon=\"x\" label={msg.sidePanelClose} size=\"sm\" onPress={onClose} />\n </header>\n <div className=\"pire-dialog-body\" style={{ flex: 1 }}>{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({ icon = 'file-text', title, action, compact, children, className, ...rest }: 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\" style={{ margin: 0 }}>{title}</p> : null}\n {children ? <p className=\"pire-empty-body\" style={{ margin: 0 }}>{children}</p> : null}\n {action}\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\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, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError,\n showPreview = true, uploadProgress, promptLabel, height = 'regular', description, errorMessage,\n isInvalid, isDisabled, isReadOnly, isRequired, fullWidth = true, className, style,\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 for (const url of created.current) URL.revokeObjectURL(url);\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)}>\n {label ? (\n <span className=\"pire-field-label\">\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </span>\n ) : null}\n\n <DropZone\n className=\"pire-dropzone\"\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(\n e.items.filter(isFileDropItem).map((item) => item.getFile()),\n );\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 acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple} onSelect={(list) => accept(list ? [...list] : [])}>\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 : <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />}\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 icon=\"x\" size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)} />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? (\n <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} />\n ) : null}\n\n {description ? <span className=\"pire-field-hint\">{description}</span> : null}\n {isInvalid && errorMessage ? <span className=\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C,CAAC;AAAA,cAChF,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,mBACG,8CAAC,SAAI,WAAU,yBAAwB,KAAK,YAAY,KAAI,IAAG,IAC/D,8CAAC,QAAK,MAAK,aAAY,MAAM,IAAI,WAAU,wBAAuB;AAAA,MACtE,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,UAAW,MAAK;AAAA,UAAI,MAAK;AAAA,UACxB,OAAO,IAAI,sBAAsB,QAAQ,UAAU,KAAK,IAAI;AAAA,UAC5D,SAAS,MAAM,OAAO,IAAI;AAAA;AAAA,MAAG;AAAA,SAT1B,GAAG,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,YAAY,EAWvD,CACD,GACH,IACE;AAAA,IAEH,kBAAkB,OACjB,8CAAC,eAAY,OAAO,gBAAgB,OAAO,IAAI,qBAAqB,IAClE;AAAA,IAEH,cAAc,8CAAC,UAAK,WAAU,mBAAmB,uBAAY,IAAU;AAAA,IACvE,aAAa,eAAe,8CAAC,UAAK,WAAU,oBAAoB,wBAAa,IAAU;AAAA,KAC1F;AAEJ;;;A3D1CA,IAAAC,iCAAkG;","names":["import_jsx_runtime","Button","AriaButton","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaTooltip","import_jsx_runtime","IconButton","AriaButton","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","React","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","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","AriaInput","React","import_react_aria_components","import_jsx_runtime","AriaTextArea","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","React","import_jsx_runtime","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","React","import_react_aria_components","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","import_react_aria_components","import_jsx_runtime","AriaNumberField","AriaInput","AriaButton","import_react_aria_components","import_jsx_runtime","AriaDatePicker","AriaButton","AriaDialog","React","React","import_react_aria_components","import_jsx_runtime","AriaDialog","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_jsx_runtime","initials","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaMenu","AriaMenuItem","AriaMenuSection","AriaSeparator","import_jsx_runtime","AriaButton","import_react_aria_components","import_jsx_runtime","AriaTabs","AriaTab","import_react_aria_components","import_jsx_runtime","AriaBreadcrumbs","AriaBreadcrumb","import_jsx_runtime","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","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","import_react_aria_components","import_jsx_runtime","AriaDialog","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/core/Icon.tsx","../src/components/core/Button.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/forms/FormField.tsx","../src/components/forms/Input.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/ComboBox.tsx","../src/i18n/PireIntlProvider.tsx","../src/i18n/messages.ts","../src/components/forms/MultiComboBox.tsx","../src/components/forms/NumberField.tsx","../src/components/forms/DatePicker.tsx","../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/SideNav.tsx","../src/components/navigation/Menu.tsx","../src/components/navigation/Tabs.tsx","../src/components/navigation/Breadcrumb.tsx","../src/components/navigation/Pagination.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/LinkList.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/patterns/ConfirmDialog.tsx","../src/components/patterns/SidePanel.tsx","../src/components/patterns/EmptyState.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 { SegmentedControl, type SegmentedControlProps, type SegmentOption } from './components/core/SegmentedControl';\nexport { Text, Strong, type TextProps, type StrongProps, type TextColor, type TextSize } 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';\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 { 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 { DatePicker, type DatePickerProps } from './components/forms/DatePicker';\nexport { DateRangePicker, rangeLengthInDays, type DateRangePickerProps, type DateRange,\n type DateRangePreset } from './components/forms/DateRangePicker';\nexport { ValueHelpField, type ValueHelpFieldProps } from './components/forms/ValueHelpField';\nexport { FileUpload, formatFileSize, type FileUploadProps, type PireFile,\n type FileRejection } from './components/forms/FileUpload';\n\nexport { ShellBar, type ShellBarProps } from './components/navigation/ShellBar';\nexport { SideNav, type SideNavProps, type SideNavItem, type SideNavChildItem,\n type SideNavGroup } from './components/navigation/SideNav';\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 { Menu, MenuItem, MenuSection, MenuSeparator, type MenuProps, type MenuItemProps,\n type MenuSectionProps, type MenuSeparatorProps } from './components/navigation/Menu';\n\nexport { Dialog, type DialogProps } from './components/feedback/Dialog';\nexport { InlineMessage, type InlineMessageProps, type MessageKind } 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 { Skeleton, SkeletonTableRow, type SkeletonProps, type SkeletonShape, type SkeletonTableRowProps,\n type SkeletonTableColumn } from './components/feedback/Skeleton';\n\nexport { DataTable, type DataTableProps, type DataTableColumn, type DataTableSort } 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 { DescriptionList, type DescriptionListProps, type DescriptionItem } from './components/data/DescriptionList';\nexport { Timeline, type TimelineProps, type TimelineEntry } from './components/data/Timeline';\nexport { LinkList, type LinkListProps, type LinkListItem } from './components/data/LinkList';\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 { SelectionBar, type SelectionBarProps } from './components/layout/SelectionBar';\nexport { FooterBar, type FooterBarProps } from './components/layout/FooterBar';\n\nexport { ConfirmDialog, type ConfirmDialogProps } from './components/patterns/ConfirmDialog';\nexport { ValueHelpDialog, type ValueHelpDialogProps } from './components/patterns/ValueHelpDialog';\nexport { SidePanel, type SidePanelProps } from './components/patterns/SidePanel';\nexport { EmptyState, type EmptyStateProps } from './components/patterns/EmptyState';\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 { DialogTrigger, MenuTrigger, SubmenuTrigger, Popover, RouterProvider, I18nProvider } 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 '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--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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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--vertical': '<circle cx=\"16\" cy=\"8\" r=\"2\"/><circle cx=\"16\" cy=\"16\" r=\"2\"/><circle cx=\"16\" cy=\"24\" r=\"2\"/>',\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 '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 '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 '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 '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 '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--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 'subtract': '<path d=\"M8 15H24V17H8z\"/>',\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 '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 '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 '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','search':'search','bell':'notification','help-circle':'help','grid-3x3':'grid',\n 'home':'home','file-text':'document','clipboard-list':'list--checked','building-2':'building',\n 'boxes':'box','truck':'delivery-truck','stamp':'checkmark--outline','check':'checkmark','x':'close',\n 'minus':'subtract','plus':'add','trash-2':'trash-can','printer':'printer','paperclip':'attachment',\n 'download':'download','calendar':'calendar','hash':'hashtag','history':'recently-viewed',\n 'calculator':'calculator','zap':'flash','palette':'color-palette','settings':'settings',\n 'sliders-horizontal':'settings--adjust','filter':'filter','rows-3':'list','align-justify':'list--boxes',\n 'more-vertical':'overflow-menu--vertical','alert-triangle':'warning--alt','alert-octagon':'error--filled',\n 'alert-circle':'warning--filled','check-circle-2':'checkmark--filled','x-circle':'misuse',\n 'info':'information','circle':'circle-dash','chevron-right':'chevron--right','chevron-left':'chevron--left',\n 'chevron-down':'chevron--down','chevrons-up-down':'chevron--sort','arrow-right':'arrow--right',\n 'arrow-up':'arrow--up','arrow-down':'arrow--down','trending-up':'arrow--up','trending-down':'arrow--down',\n 'shopping-cart':'shopping--cart','user':'user','shapes':'apps','type':'text--font',\n 'package':'box','warehouse':'building--insights-1','arrow-up-down':'arrows--vertical','scan-line':'qr-code',\n 'circle-alert':'warning--filled','clock':'time','layers':'layers','map-pin':'location','copy':'copy',\n 'refresh-cw':'renew','external-link':'launch','pencil':'edit','lock':'locked','eye':'view','minimize-2':'minimize',\n};\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 ? null : (\n <svg viewBox=\"0 0 32 32\" width={size} height={size} fill=\"currentColor\" focusable=\"false\"\n aria-hidden=\"true\" 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 { 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 className?: string;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { children, variant = 'secondary', size = 'md', icon, iconEnd, fullWidth, className, ...rest }, ref,\n) {\n return (\n <AriaButton ref={ref} className={cx('pire-btn', className)} data-variant={variant} data-size={size}\n data-full-width={fullWidth ? 'true' : undefined} {...rest}>\n {icon ? <Icon name={icon} size={16} /> : null}\n {children}\n {iconEnd ? <Icon name={iconEnd} size={16} /> : null}\n </AriaButton>\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 { icon, label, size = 'md', variant = 'tertiary', selected, hideTooltip,\n count, countMax = 9, countVariant = 'number', className, ...rest }, ref,\n) {\n const showsCount = count != null && count > 0;\n const button = (\n <AriaButton ref={ref} aria-label={label} aria-pressed={selected} className={cx('pire-iconbtn', className)}\n data-size={size} data-variant={variant} data-selected={selected ? 'true' : undefined}\n data-has-count={showsCount ? 'true' : undefined} {...rest}>\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 type * as React from 'react';\nimport { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow } from 'react-aria-components';\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 /** A single focusable element (Button, IconButton, Link). */\n children: React.ReactNode;\n}\n\nexport function Tooltip({ label, placement = 'top', delay = 500, children }: TooltipProps) {\n return (\n <TooltipTrigger delay={delay} closeDelay={0}>\n {children}\n <AriaTooltip className=\"pire-tooltip\" placement={placement} offset={6}>\n <OverlayArrow><span /></OverlayArrow>\n {label}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","import type * 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', critical: 'alert-triangle', negative: 'x-circle',\n informative: 'info', 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/** Value state on an object or row. Text is the label, never a bare colour dot. */\nexport function Badge({ children, status = 'neutral', showIcon = true, className, ...rest }: BadgeProps) {\n return (\n <span 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 type * as React from 'react';\nimport { Button as AriaButton } from 'react-aria-components';\nimport { Icon } from './Icon';\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\n/** A removable token: applied filters, multi-select values. */\nexport function Tag({ children, onRemove, isDisabled, className, ...rest }: TagProps) {\n return (\n <span className={cx('pire-tag', className)} data-disabled={isDisabled ? 'true' : undefined} {...rest}>\n {children}\n {onRemove ? (\n <AriaButton className=\"pire-tag-remove\" isDisabled={isDisabled} onPress={onRemove}\n aria-label={`Remove ${typeof children === 'string' ? children : 'filter'}`}>\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({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }: CardProps) {\n return (\n <section className={cx('pire-card', className)} data-interactive={interactive ? 'true' : undefined} {...rest}>\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 ? <p className=\"pire-card-sub\" style={{ margin: 0 }}>{subtitle}</p> : 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) => name.trim().split(/\\s+/).slice(0, 2).map((p) => p[0]).join('').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=\"\" onError={() => setFailed(true)}\n style={{ width: '100%', height: '100%', borderRadius: 'inherit', objectFit: 'cover' }} />\n : initials(name)}\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 { id: string; label: string; icon?: string; isDisabled?: boolean }\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({ options, value, defaultValue, onChange, iconOnly, size = 'sm',\n className, style, ...rest }: SegmentedControlProps) {\n const selected = React.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);\n return (\n <ToggleButtonGroup className={cx('pire-segmented', className)} data-size={size} style={style}\n aria-label={rest['aria-label']} selectionMode=\"single\" disallowEmptySelection\n selectedKeys={selected} onSelectionChange={(keys) => {\n const first = [...keys][0];\n if (first != null) onChange?.(String(first));\n }}>\n {options.map((option) => (\n <ToggleButton key={option.id} id={option.id} className=\"pire-segmented-item\"\n isDisabled={option.isDisabled} aria-label={iconOnly ? option.label : undefined}>\n {option.icon ? <Icon name={option.icon} size={16} /> : null}\n {iconOnly ? null : option.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n","import type * 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/** Body copy, captions, metadata and eyebrows — everything that is text but not a heading. */\nexport function Text({\n size = 'body', color = 'primary', weight = 'regular', numeric, eyebrow, truncate,\n elementType: Wrapper = 'p', className, style, ...rest\n}: TextProps) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle = lineClamp == null\n ? style\n : ({ ['--pire-text-clamp' as string]: lineClamp, ...style } as React.CSSProperties);\n\n return (\n <Wrapper\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 function Strong({ className, ...rest }: StrongProps) {\n return <Text 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, size, color = 'primary', truncate, className, style, ...rest\n}: HeadingProps) {\n const lineClamp = typeof truncate === 'number' ? truncate : truncate ? 1 : undefined;\n const clampStyle = 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', emphasis = 'default', spacing = 'md', className, ...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 { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\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 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({ label, htmlFor, isRequired, hint, error, layout = 'stacked', children, className, ...rest }: FormFieldProps) {\n return (\n <div className={cx('pire-field', className)} data-layout={layout} {...rest}>\n <label className=\"pire-field-label\" htmlFor={htmlFor}>\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </label>\n {children}\n {error ? (\n <span className=\"pire-field-error\" role=\"alert\"><Icon name=\"alert-circle\" size={12} />{error}</span>\n ) : hint ? <span className=\"pire-field-hint\">{hint}</span> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { TextField, Label, Input as AriaInput, Group, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\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 /** 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({ label, icon, suffix, description, errorMessage, size = 'md', numeric,\n fullWidth = true, className, style, inputRef, onChange, ...rest }: InputProps) {\n return (\n <TextField className={cx('pire-field', className)} style={style} onChange={onChange}\n validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\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 {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import * as React from 'react';\nimport { TextField, Label, TextArea as AriaTextArea, Group, Text, FieldError } from 'react-aria-components';\nimport { cx } from '../utils/cx';\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 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({ label, description, errorMessage, size = 'md', rows = 3, autoGrow,\n maxRows, fullWidth = true, className, style, textAreaRef, onChange, ...rest }: TextAreaProps) {\n const innerRef = React.useRef<HTMLTextAreaElement>(null);\n const ref = React.useCallback((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 }, [textAreaRef]);\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 return (\n <TextField className={cx('pire-field', className)} style={style} onChange={onChange}\n validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-multiline=\"true\" data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <AriaTextArea ref={ref} rows={rows} onInput={autoGrow ? grow : undefined}\n className={cx('pire-input', 'pire-textarea')} data-auto-grow={autoGrow ? 'true' : undefined} />\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </TextField>\n );\n}\n","import type * as React from 'react';\nimport { Select as AriaSelect, Label, Button as AriaButton, SelectValue, Popover, ListBox,\n ListBoxItem, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport type SelectOption = string | { value: string; label: string; isDisabled?: boolean };\n\nexport interface SelectProps {\n label?: React.ReactNode;\n value?: string | null;\n defaultValue?: string;\n onChange?: (value: string) => void;\n options?: SelectOption[];\n /** Shown when nothing is selected. */\n placeholder?: string;\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\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({ label, value, defaultValue, onChange, options = [], placeholder = 'Select…',\n description, errorMessage, size = 'md', fullWidth = true, className, style, ...rest }: SelectProps) {\n const items = options.map(norm);\n return (\n <AriaSelect className={cx('pire-field', className)} style={style} selectedKey={value}\n defaultSelectedKey={defaultValue} onSelectionChange={(k) => onChange?.(String(k))}\n placeholder={placeholder} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <AriaButton className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}>\n <SelectValue className=\"pire-select-value\" />\n <Icon name=\"chevron-down\" size={16} className=\"pire-leading-icon\" />\n </AriaButton>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\" items={items}>\n {(item) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 ? <Icon name=\"minus\" size={12} /> : isSelected ? <Icon name=\"check\" size={12} /> : 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 { RadioGroup as AriaRadioGroup, Radio as AriaRadio, Label, Text, FieldError,\n type RadioGroupProps as AriaRadioGroupProps, type RadioProps as AriaRadioProps } 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({ label, description, errorMessage, children, className, ...rest }: 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 ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : 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\"><span className=\"pire-switch-thumb\" /></span>\n <span>{label ?? children}</span>\n </AriaSwitch>\n );\n}\n","import type * as React from 'react';\nimport { ComboBox as AriaComboBox, Label, Input as AriaInput, Button as AriaButton, Group,\n Popover, ListBox, ListBoxItem, Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface ComboBoxOption { value: string; label: string; secondary?: string; isDisabled?: boolean }\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 options?: Array<string | ComboBoxOption>;\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\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({ label, value, defaultValue, onChange, onInputChange, options = [],\n description, errorMessage, size = 'md', fullWidth = true, isFilteredExternally, isLoading,\n loadingLabel, emptyLabel, onLoadMore, className, style, ...rest }: ComboBoxProps) {\n const msg = usePireMessages();\n const items = options.map(norm);\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 return (\n <AriaComboBox className={cx('pire-field', className)} style={style} selectedKey={value}\n defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => {\n // Ignore confirmations mid-flight: the highlighted row still belongs to the last response.\n if (isLoading) return;\n onChange?.(k == null ? null : String(k));\n }}\n onInputChange={onInputChange} {...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\" validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined}>\n <Icon name=\"search\" size={16} className=\"pire-leading-icon\" />\n <AriaInput className=\"pire-input\" placeholder={rest.placeholder} />\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.comboBoxShowSuggestions} style={{ width: 20, height: 20 }}>\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\"\n onScroll={onLoadMore ? (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 } : undefined}\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={showsStatus ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n ) : undefined}>\n {(item: ComboBoxOption) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 { 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(\n () => (messages ? { ...enMessages, ...messages } : enMessages),\n [messages],\n );\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 while the table body is a skeleton. */\n dataTableLoading: 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 /** 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 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 /** 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\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\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 dataTableLoading: 'Loading records',\n\n dialogClose: 'Close',\n sidePanelClose: 'Close panel',\n\n inlineMessageDismiss: 'Dismiss message',\n toastDismiss: 'Dismiss',\n toastRegionLabel: 'Notifications',\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 valueHelpFieldClear: 'Clear selection',\n valueHelpFieldOpenNamed: 'Select {label}',\n valueHelpFieldOpen: 'Open value help',\n valueHelpDialogSearch: 'Search records',\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\n fileUploadChoose: 'Choose files',\n fileUploadRemoveNamed: 'Remove {name}',\n fileUploadUploading: 'Uploading',\n fileDropZonePrompt: 'Drag files here, or choose them',\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 dataTableLoading: 'Cargando registros',\n\n dialogClose: 'Cerrar',\n sidePanelClose: 'Cerrar panel',\n\n inlineMessageDismiss: 'Descartar mensaje',\n toastDismiss: 'Descartar',\n toastRegionLabel: 'Notificaciones',\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 valueHelpFieldClear: 'Limpiar selección',\n valueHelpFieldOpenNamed: 'Seleccionar {label}',\n valueHelpFieldOpen: 'Abrir ayuda de valores',\n valueHelpDialogSearch: 'Buscar 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\n fileUploadChoose: 'Elegir archivos',\n fileUploadRemoveNamed: 'Quitar {name}',\n fileUploadUploading: 'Subiendo',\n fileDropZonePrompt: 'Arrastrá archivos acá, o elegilos',\n};\n","import * as React from 'react';\nimport { ComboBox as AriaComboBox, Label, Input as AriaInput, Button as AriaButton, ButtonContext,\n Group, Popover, ListBox, ListBoxItem, Text, FieldError, VisuallyHidden } 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';\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 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({ label, value, defaultValue, onChange, onInputChange, options = [],\n description, errorMessage, allowsCustomValue, size = 'md',\n isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore,\n fullWidth = true, className, style, ...rest }: 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 return (\n <AriaComboBox className={cx('pire-field', className)} style={style} selectionMode=\"multiple\"\n value={values} onChange={(keys) => { if (!isLoading) commit(keys.map(String)); }}\n onInputChange={onInputChange} {...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\" validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-multiline=\"true\" data-invalid={rest.isInvalid ? 'true' : undefined}\n data-readonly={rest.isReadOnly ? 'true' : undefined}>\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 ref={inputRef} className={cx('pire-input', 'pire-chipinput')}\n placeholder={rest.placeholder} onKeyDownCapture={onKeyDownCapture} />\n </div>\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.comboBoxShowSuggestions} style={{ width: 20, height: 20 }}>\n <Icon name=\"chevron-down\" size={16} />\n </AriaButton>\n </Group>\n <VisuallyHidden><span aria-live=\"polite\">{announcement}</span></VisuallyHidden>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n <Popover className=\"pire-popover\">\n <ListBox className=\"pire-listbox\"\n onScroll={onLoadMore ? (e) => {\n const el = e.currentTarget;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();\n } : undefined}\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={showsStatus ? () => (\n <div className=\"pire-listbox-status\" role=\"status\" aria-live=\"polite\">\n {isLoading ? (loadingLabel ?? msg.comboBoxLoading) : emptyLabel}\n </div>\n ) : undefined}>\n {(item: ComboBoxOption) => (\n <ListBoxItem className=\"pire-option\" id={item.value} textValue={item.label} isDisabled={item.isDisabled}>\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 type * as React from 'react';\nimport { NumberField as AriaNumberField, Label, Input as AriaInput, Group, Button as AriaButton,\n Text, FieldError } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { usePireMessages } from '../../i18n/PireIntlProvider';\nimport { cx } from '../utils/cx';\n\nexport interface NumberFieldProps {\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 value?: number;\n defaultValue?: number;\n onChange?: (value: number) => void;\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 size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\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. */\nexport function NumberField({ label, suffix, description, errorMessage, hideStepper, size = 'md',\n fullWidth = true, className, style, ...rest }: NumberFieldProps) {\n const msg = usePireMessages();\n return (\n <AriaNumberField className={cx('pire-field', className)} style={style} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <AriaInput className=\"pire-input\" data-numeric=\"true\" />\n {suffix ? <span className=\"pire-affix\">{suffix}</span> : null}\n {hideStepper ? null : (\n <span className=\"pire-stepper\">\n <AriaButton slot=\"increment\" className=\"pire-stepper-btn\" aria-label={msg.numberFieldIncrease}><Icon name=\"plus\" size={10} /></AriaButton>\n <AriaButton slot=\"decrement\" className=\"pire-stepper-btn\" aria-label={msg.numberFieldDecrease}><Icon name=\"minus\" size={10} /></AriaButton>\n </span>\n )}\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\n <FieldError className=\"pire-field-error\">{errorMessage}</FieldError>\n </AriaNumberField>\n );\n}\n","import type * as React from 'react';\nimport { DatePicker as AriaDatePicker, Label, Group, DateInput, DateSegment, Button as AriaButton,\n Popover, Dialog as AriaDialog, Calendar, CalendarGrid, CalendarGridHeader, CalendarHeaderCell,\n CalendarGridBody, CalendarCell, Heading, Text, FieldError } 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';\n\nexport interface DatePickerProps {\n label?: React.ReactNode;\n value?: DateValue | null;\n defaultValue?: DateValue | null;\n onChange?: (value: DateValue | null) => void;\n minValue?: DateValue;\n maxValue?: DateValue;\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 size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n name?: string;\n className?: string;\n style?: React.CSSProperties;\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({ label, description, errorMessage, size = 'md', fullWidth = true,\n className, style, ...rest }: DatePickerProps) {\n const msg = usePireMessages();\n return (\n <AriaDatePicker className={cx('pire-field', className)} style={style} validationBehavior=\"aria\" {...rest}>\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n <Group className=\"pire-control\" data-size={size} data-full-width={String(fullWidth)}\n data-invalid={rest.isInvalid ? 'true' : undefined} data-readonly={rest.isReadOnly ? 'true' : undefined}>\n <DateInput className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerOpenCalendar} style={{ width: 24, height: 24 }}>\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\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 slot=\"previous\" className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerPreviousMonth}>\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>\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 type * as React from 'react';\nimport {\n DateRangePicker as AriaDateRangePicker, Label, Group, DateInput, DateSegment,\n Button as AriaButton, Popover, Dialog as AriaDialog, RangeCalendar, CalendarGrid,\n CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Heading, Text, FieldError,\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';\n\nexport interface DateRange {\n start: DateValue;\n end: DateValue;\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. */\n range: () => DateRange;\n}\n\nexport interface DateRangePickerProps {\n label?: React.ReactNode;\n value?: DateRange | null;\n defaultValue?: DateRange | null;\n onChange?: (value: DateRange | null) => void;\n minValue?: DateValue;\n maxValue?: DateValue;\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 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/** Whole days between the two ends, inclusive of both. */\nexport function rangeLengthInDays(range: DateRange): number {\n return range.end.toDate('UTC').getTime() / 86_400_000\n - range.start.toDate('UTC').getTime() / 86_400_000 + 1;\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({\n label, description, errorMessage, maxRangeDays, presets, size = 'md', fullWidth = true,\n startName, endName, className, style, ...rest\n}: DateRangePickerProps) {\n const msg = usePireMessages();\n const current = rest.value ?? rest.defaultValue ?? null;\n const tooLong = maxRangeDays != null && current != null\n && rangeLengthInDays(current) > maxRangeDays;\n\n return (\n <AriaDateRangePicker\n className={cx('pire-field', className)} style={style}\n startName={startName} endName={endName}\n validationBehavior=\"aria\"\n {...rest}\n isInvalid={rest.isInvalid || tooLong}\n >\n {label ? (\n <Label className=\"pire-field-label\">\n {label}{rest.isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </Label>\n ) : null}\n\n <Group className=\"pire-control pire-daterange-control\" 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 {/* 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\">–</span>\n <DateInput slot=\"end\" className=\"pire-datefield\">\n {(segment) => <DateSegment segment={segment} className=\"pire-datesegment\" />}\n </DateInput>\n <AriaButton className=\"pire-iconbtn\" data-size=\"sm\" aria-label={msg.datePickerOpenCalendar}\n style={{ width: 24, height: 24 }}>\n <Icon name=\"calendar\" size={16} />\n </AriaButton>\n </Group>\n\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : null}\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 key={preset.id} className=\"pire-daterange-preset\"\n onPress={() => rest.onChange?.(preset.range())}>\n {preset.label}\n </AriaButton>\n ))}\n </div>\n ) : null}\n <RangeCalendar className=\"pire-calendar\">\n <header className=\"pire-calendar-head\">\n <AriaButton slot=\"previous\" className=\"pire-iconbtn\" data-size=\"sm\"\n aria-label={msg.datePickerPreviousMonth}>\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\"\n aria-label={msg.datePickerNextMonth}>\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 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 }>({ label, value, onChange, format = defaultFormat,\n rows = [], columns = [], dialogTitle, placeholder = 'Not selected', description, errorMessage,\n isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>) {\n const msg = usePireMessages();\n const [open, setOpen] = React.useState(false);\n return (\n <div className={cx(className)} style={style}>\n <div style={{ display: 'flex', gap: 'var(--sp-2)', alignItems: 'flex-end' }}>\n <Input label={label} isReadOnly isInvalid={isInvalid} isDisabled={isDisabled} isRequired={isRequired}\n value={value ? format(value) : ''} placeholder={placeholder}\n description={description} errorMessage={errorMessage} />\n {allowsClear && value ? (\n <IconButton icon=\"x\" label={msg.valueHelpFieldClear} variant=\"outlined\" isDisabled={isDisabled}\n onPress={() => onChange?.(null)} />\n ) : null}\n <IconButton icon=\"search\" label={typeof label === 'string'\n ? msg.valueHelpFieldOpenNamed.replace('{label}', label.toLowerCase())\n : msg.valueHelpFieldOpen}\n variant=\"outlined\" isDisabled={isDisabled} onPress={() => setOpen(true)} />\n </div>\n <ValueHelpDialog isOpen={open} onClose={() => setOpen(false)} title={dialogTitle ?? label ?? 'Select a record'}\n columns={columns} rows={rows} onSelect={(row) => onChange?.(row)} />\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 /** Receives the picked row. */\n onSelect?: (row: T) => void;\n onClose?: () => 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 }>({ isOpen, title = 'Select a record',\n columns = [], rows = [], searchPlaceholder = 'Search by ID or name', emptyLabel, onSelect, onClose }: ValueHelpDialogProps<T>) {\n const msg = usePireMessages();\n const [query, setQuery] = React.useState('');\n React.useEffect(() => { if (isOpen) setQuery(''); }, [isOpen]);\n const filtered = React.useMemo(() => {\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]);\n return (\n <Dialog isOpen={isOpen} size=\"lg\" title={title} onClose={onClose}\n footer={<Button variant=\"tertiary\" onPress={onClose}>{msg.valueHelpDialogCancel}</Button>}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--sp-3)' }}>\n <Input aria-label={msg.valueHelpDialogSearch} icon=\"search\" type=\"search\" value={query} onChange={setQuery}\n placeholder={searchPlaceholder} autoFocus />\n <DataTable aria-label={typeof title === 'string' ? title : 'Records'} density=\"condensed\"\n columns={columns} rows={filtered} emptyLabel={emptyLabel ?? `No records match “${query}”.`}\n onRowAction={(row) => { onSelect?.(row); onClose?.(); }} />\n </div>\n </Dialog>\n );\n}\n","import type * 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 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({ isOpen, onOpenChange, title, subtitle, children, footer, onClose,\n size = 'md', isDismissable = true, showClose = true, className, style }: DialogProps) {\n const msg = usePireMessages();\n const close = () => { onClose?.(); onOpenChange?.(false); };\n return (\n <ModalOverlay className=\"pire-modal-overlay\" isOpen={isOpen} isDismissable={isDismissable}\n onOpenChange={(o) => { if (!o) close(); }}>\n <Modal className={cx('pire-modal', className)} data-size={size} style={style}>\n <AriaDialog className=\"pire-dialog\">\n {title ? (\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n <Heading slot=\"title\" className=\"pire-dialog-title\">{title}</Heading>\n {subtitle ? <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>{subtitle}</p> : null}\n </div>\n {showClose ? <IconButton icon=\"x\" label={msg.dialogClose} size=\"sm\" onPress={close} /> : null}\n </header>\n ) : null}\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 { Table, TableHeader, TableBody, Column, Row, Cell, type Selection,\n type SortDescriptor } 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\nexport interface DataTableColumn<T = any> {\n key: string;\n label: string;\n align?: 'left' | 'right' | 'center';\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 render?: (row: T) => React.ReactNode;\n}\n\nexport interface DataTableSort { key: string; dir: 'asc' | 'desc' }\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 selectable?: boolean;\n selected?: Array<string | number>;\n onSelectionChange?: (ids: Array<string | number>) => void;\n sort?: DataTableSort;\n onSortChange?: (sort: DataTableSort) => void;\n onRowAction?: (row: T) => void;\n emptyLabel?: React.ReactNode;\n /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */\n isLoading?: boolean;\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 }>({ columns, rows, density = 'regular',\n selectable, selected, onSelectionChange, sort, onSortChange, onRowAction, stickyHeader = true,\n emptyLabel = 'No records match the current filters.', isLoading, loadingRowCount, loadingLabel,\n className, style, ...rest }: DataTableProps<T>) {\n const msg = usePireMessages();\n const sortDescriptor: SortDescriptor | undefined = sort\n ? { column: sort.key, direction: sort.dir === 'asc' ? 'ascending' : 'descending' } : undefined;\n const handleSelection = (keys: Selection) => {\n if (keys === 'all') return onSelectionChange?.(rows.map((r) => r.id));\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 ...(selectable ? [{ width: 44 }] : []),\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 return (\n <div className={cx('pire-table-wrap', className)} style={style}\n data-loading={isLoading ? 'true' : undefined} aria-busy={isLoading ? 'true' : undefined}>\n <Table className=\"pire-table\" data-density={density} data-sticky={String(stickyHeader)}\n aria-label={rest['aria-label']}\n selectionMode={selectable ? 'multiple' : 'none'}\n selectedKeys={selected ? new Set(selected) : undefined}\n onSelectionChange={handleSelection}\n sortDescriptor={sortDescriptor}\n onSortChange={(d) => onSortChange?.({ key: String(d.column), dir: d.direction === 'ascending' ? 'asc' : 'desc' })}\n onRowAction={onRowAction ? (key) => {\n const row = rows.find((r) => String(r.id) === String(key));\n if (row) onRowAction(row);\n } : undefined}>\n <TableHeader className=\"pire-thead-row\">\n {selectable ? (\n <Column className=\"pire-th\" width={44}>\n <Checkbox slot=\"selection\" aria-label={msg.dataTableSelectAll} />\n </Column>\n ) : null}\n {columns.map((c, i) => (\n <Column key={c.key} id={c.key} className=\"pire-th\" isRowHeader={i === 0 && !selectable}\n allowsSorting={c.sortable} width={c.width as never}\n data-align={c.numeric || c.align === 'right' ? 'right' : c.align}\n data-allows-sorting={c.sortable ? 'true' : undefined}>\n <span className=\"pire-th-inner\">\n {c.label}\n {c.sortable ? (\n <Icon size={12} name={sort?.key === c.key ? (sort.dir === 'asc' ? 'arrow-up' : 'arrow-down') : 'chevrons-up-down'}\n style={{ color: sort?.key === c.key ? 'var(--accent-subtle-fg)' : 'var(--text-tertiary)' }} />\n ) : null}\n </span>\n </Column>\n ))}\n </TableHeader>\n <TableBody renderEmptyState={() => (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}</div>\n ))}>\n {body.map((row) => (\n <Row key={row.id} id={row.id} className=\"pire-tr\" data-pressable={onRowAction ? 'true' : undefined}>\n {selectable ? <Cell className=\"pire-td\"><Checkbox slot=\"selection\" aria-label={msg.dataTableSelectRow} /></Cell> : null}\n {columns.map((c) => (\n <Cell key={c.key} className=\"pire-td\" data-numeric={c.numeric ? 'true' : undefined}\n style={{ textAlign: c.align && !c.numeric ? c.align : undefined }}>\n {c.render ? c.render(row) : (row as Record<string, React.ReactNode>)[c.key]}\n </Cell>\n ))}\n </Row>\n ))}\n </TableBody>\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 className={cx('pire-skeleton', className)} data-shape={shape} aria-hidden=\"true\"\n style={{ width, height, ...style }} {...rest} />\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({ columns, density = 'regular', className, style, ...rest }: SkeletonTableRowProps) {\n const cells: SkeletonTableColumn[] = typeof columns === 'number'\n ? Array.from({ length: columns }, () => ({}))\n : columns;\n return (\n <div className={cx('pire-skeleton-row', className)} data-density={density} aria-hidden=\"true\"\n style={style} {...rest}>\n {cells.map((c, i) => {\n const align = c.numeric ? 'right' : c.align ?? 'left';\n return (\n // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.\n <div key={i} className=\"pire-skeleton-cell\" data-align={align}\n style={{ width: c.width, flex: c.width ? '0 0 auto' : undefined }}>\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\nexport interface FileUploadProps {\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('.') ? file.name.toLowerCase().endsWith(t.toLowerCase())\n : t.endsWith('/*') ? file.type.startsWith(t.slice(0, -1))\n : file.type === t);\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, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError,\n showPreview = true, uploadProgress, chooseLabel, description, errorMessage,\n isInvalid, isDisabled, isReadOnly, isRequired, fullWidth = true, className, style,\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 for (const url of created.current) URL.revokeObjectURL(url);\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 className={cx('pire-field', 'pire-fileupload', className)} style={style}\n data-full-width={String(fullWidth)} data-invalid={isInvalid ? 'true' : undefined}>\n {label ? (\n <span className=\"pire-field-label\">\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </span>\n ) : null}\n\n <FileTrigger acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple} onSelect={accept}>\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 : <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />}\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 icon=\"x\" size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)} />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? (\n <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} />\n ) : null}\n\n {description ? <Text slot=\"description\" className=\"pire-field-hint\">{description}</Text> : 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({ value = 0, minValue = 0, maxValue = 100, label, showValue = true,\n isIndeterminate, status = 'informative', size = 'md', className, style }: ProgressBarProps) {\n return (\n <AriaProgressBar className={cx('pire-progress', className)} data-status={status} data-size={size}\n value={value} minValue={minValue} maxValue={maxValue} isIndeterminate={isIndeterminate} style={style}>\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 { IconButton } from '../core/IconButton';\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 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\nconst initials = (name: string) => name.trim().split(/\\s+/).slice(0, 2).map((p) => p[0]).join('').toUpperCase();\n\n/** Fixed 48px application chrome. One per page, always the first landmark. */\nexport function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel = 'Open navigation',\n searchLabel = 'Search', actions, user, className, ...rest }: ShellBarProps) {\n return (\n <header className={cx('pire-shellbar', className)} {...rest}>\n {onMenu ? <IconButton icon=\"menu\" label={menuLabel} variant=\"inverse\" size=\"sm\" onPress={onMenu} /> : null}\n {monogram ? <span className=\"pire-shellbar-mono\" aria-hidden=\"true\">{monogram}</span> : null}\n {product ? <span className=\"pire-shellbar-product\">{product}</span> : null}\n {title ? <span className=\"pire-shellbar-title\">{title}</span> : null}\n <span className=\"pire-shellbar-spacer\" />\n {onSearch ? <IconButton icon=\"search\" label={searchLabel} variant=\"inverse\" size=\"sm\" onPress={onSearch} /> : null}\n {actions}\n {user ? <span className=\"pire-avatar\" title={user} aria-label={user} role=\"img\">{initials(user)}</span> : null}\n </header>\n );\n}\n","import * as React from 'react';\nimport { Icon } from '../core/Icon';\nimport { Tooltip } from '../feedback/Tooltip';\nimport { Button as AriaButton, Disclosure, DisclosureGroup, DisclosurePanel,\n MenuTrigger, Popover } 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 { id: string; label: string; count?: number }\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 { label?: string; items: SideNavItem[] }\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 * 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({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange,\n collapsed, railFlyout = true, footer, className, ...rest }: 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 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 key={item.id} className=\"pire-sidenav-item\" 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 {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 ? <Tooltip key={item.id} label={item.label} placement=\"right\">{button}</Tooltip> : button;\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 className=\"pire-sidenav-item\" aria-label={item.label}\n data-active-child={item.id === activeParent ? 'true' : undefined}>\n {item.icon ? <Icon name={item.icon} size={16} /> : null}\n </AriaButton>\n <Popover className=\"pire-popover\" placement=\"right top\" offset={4}>\n <Menu aria-label={item.label} className=\"pire-sidenav-flyout\"\n onAction={(key) => onChange?.(String(key))}>\n {(item.items ?? []).map((child) => (\n <MenuItem key={child.id} id={child.id}>{child.label}</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 slot=\"trigger\" className=\"pire-sidenav-item\" data-kind=\"group\"\n data-active-child={item.id === activeParent ? 'true' : undefined}>\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 key={child.id} className=\"pire-sidenav-item pire-sidenav-subitem\"\n data-selected={selected ? 'true' : undefined} aria-current={selected ? 'page' : undefined}\n onPress={() => onChange?.(child.id)}>\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 className={cx('pire-sidenav', className)} data-collapsed={collapsed ? 'true' : undefined}\n aria-label={msg.sideNavLabel} {...rest}>\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 className=\"pire-sidenav-tree\" allowsMultipleExpanded\n expandedKeys={expanded} onExpandedChange={handleExpandedChange}>\n {rows}\n </DisclosureGroup>\n ) : rows}\n </div>\n );\n })}\n {footer ? <div className=\"pire-sidenav-footer\">{footer}</div> : null}\n </nav>\n );\n}\n","import type * as React from 'react';\nimport {\n Menu as AriaMenu, MenuItem as AriaMenuItem, MenuSection as AriaMenuSection,\n Separator as AriaSeparator, Header,\n type MenuProps as AriaMenuProps, type MenuItemProps as AriaMenuItemProps,\n} from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object = object>\n 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 = width == null\n ? style\n : ({ ['--pire-menu-min-w' as string]: width, ...style } as React.CSSProperties);\n\n return (\n <AriaMenu\n className={cx('pire-menu', className)}\n style={menuStyle}\n {...(rest as AriaMenuProps<T>)}\n />\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 /** Keyboard shortcut, right-aligned. Painted only — it registers nothing. */\n shortcut?: string;\n /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */\n tone?: 'default' | 'danger';\n className?: string;\n}\n\n/** A single command. Accepts `href`, so navigation items render a real anchor. */\nexport function MenuItem({\n children, icon, description, shortcut, tone = 'default', className, ...rest\n}: MenuItemProps) {\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 {shortcut ? <kbd className=\"pire-menu-item-shortcut\">{shortcut}</kbd> : 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 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 { id: string; label: string; icon?: string; count?: number; isDisabled?: boolean }\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 className={className} style={style} selectedKey={value} defaultSelectedKey={defaultValue}\n onSelectionChange={(k) => onChange?.(String(k))}>\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 { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link } from 'react-aria-components';\nimport { Icon } from '../core/Icon';\nimport { cx } from '../utils/cx';\n\nexport interface BreadcrumbItem { id?: string; label: string; href?: string }\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 className?: string;\n style?: React.CSSProperties;\n}\n\nexport function Breadcrumb({ items, onNavigate, className, style }: BreadcrumbProps) {\n return (\n <AriaBreadcrumbs className={cx('pire-breadcrumbs', className)} style={style} items={items}\n onAction={(key) => onNavigate?.(String(key))}>\n {(item) => {\n const last = items[items.length - 1] === item;\n return (\n <AriaBreadcrumb className=\"pire-breadcrumb\" id={item.id ?? item.label}>\n {last ? item.label : <Link href={item.href}>{item.label}</Link>}\n {last ? null : <Icon name=\"chevron-right\" size={12} style={{ color: 'var(--text-tertiary)' }} />}\n </AriaBreadcrumb>\n );\n }}\n </AriaBreadcrumbs>\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({ page = 1, pageSize = 25, total = 0, onPageChange, onPageSizeChange,\n pageSizes = [25, 50, 100], className, style }: 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 icon=\"chevron-left\" label={msg.paginationPrevious} size=\"sm\" variant=\"outlined\"\n isDisabled={page <= 1} onPress={() => onPageChange?.(page - 1)} />\n <span className=\"pire-pagination-count\" aria-live=\"polite\">\n {msg.paginationPageOf.replace('{page}', String(page)).replace('{pages}', String(pages))}\n </span>\n <IconButton icon=\"chevron-right\" label={msg.paginationNext} size=\"sm\" variant=\"outlined\"\n isDisabled={page >= pages} onPress={() => onPageChange?.(page + 1)} />\n {onPageSizeChange ? (\n <Select aria-label={msg.paginationRowsPerPage} size=\"sm\" fullWidth={false} value={String(pageSize)}\n options={pageSizes.map((s) => ({ value: String(s), label: `${s} rows` }))}\n onChange={(v) => onPageSizeChange(Number(v))} style={{ width: 120 }} />\n ) : null}\n </nav>\n );\n}\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', success: 'check-circle-2', warning: 'alert-triangle', 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({ kind = 'info', title, action, onClose, children, className, ...rest }: InlineMessageProps) {\n const msg = usePireMessages();\n const assertive = kind === 'error' || kind === 'warning';\n return (\n <div className={cx('pire-msg', className)} data-kind={kind}\n role={assertive ? 'alert' : 'status'} aria-live={assertive ? 'assertive' : 'polite'} {...rest}>\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', success: 'check-circle-2', warning: 'alert-triangle', 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({ kind = 'success', onClose, position = 'bottom-center', children, className, ...rest }: ToastProps) {\n const msg = usePireMessages();\n return (\n <div className={cx('pire-toast', className)} data-position={position}\n role={kind === 'error' ? 'alert' : 'status'} aria-live={kind === 'error' ? 'assertive' : 'polite'} {...rest}>\n <Icon name={KIND_ICON[kind]} size={16} />\n <span style={{ flex: 1 }}>{children}</span>\n {onClose ? <IconButton icon=\"x\" label={msg.toastDismiss} size=\"sm\" variant=\"inverse\" onPress={onClose} /> : null}\n </div>\n );\n}\n\nexport interface ToastItem { id: string; kind?: MessageKind; message: React.ReactNode; timeout?: number }\n\ninterface ToastContextValue { add: (toast: Omit<ToastItem, 'id'>) => string; close: (id: string) => void }\nconst ToastContext = React.createContext<ToastContextValue | null>(null);\n\n/** Queue + live region. Mount once near the app root. */\nexport function ToastProvider({ children, timeout = 6000 }: { children?: React.ReactNode; timeout?: number }) {\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((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 }, [close, timeout]);\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)} style={{ position: 'static', transform: 'none' }}>\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({ label, value, unit, delta, deltaDirection, deltaTone, footnote, icon,\n status = 'neutral', onPress, className, style }: 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}{label}\n </span>\n <span className=\"pire-kpi-value\">{value}{unit ? <span className=\"pire-kpi-unit\">{unit}</span> : null}</span>\n {delta ? (\n <span className=\"pire-kpi-delta\" data-tone={tone}>\n {deltaDirection ? <Icon name={deltaDirection === 'up' ? 'trending-up' : 'trending-down'} size={12} /> : 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}>{body}</AriaButton>\n : <div {...props}>{body}</div>;\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface ObjectFact { label: string; value: React.ReactNode; numeric?: boolean }\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({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }: 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 className=\"pire-fact-value\" data-numeric={fact.numeric ? 'true' : undefined} style={{ margin: 0 }}>\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 { id: string; label: string }\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({ children, activeFilters = [], onRemoveFilter, onClear, onGo,\n resultLabel, actions, goLabel, clearAllLabel, className, ...rest }: 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 ? <Button variant=\"primary\" onPress={onGo}>{go}</Button> : 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}>{clearAll}</Button>\n ) : null}\n {resultLabel ? <span className=\"pire-filterbar-result\" aria-live=\"polite\">{resultLabel}</span> : 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({ items, layout = 'rows', columns = 3, className, style, ...rest }: DescriptionListProps) {\n return (\n <dl className={cx('pire-dl', className)} data-layout={layout}\n style={{ ...(layout === 'grid' ? { '--pire-dl-cols': columns } : null), ...style } as React.CSSProperties} {...rest}>\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\">{item.label}{item.hint}</dt>\n <dd className=\"pire-dl-value\" data-numeric={item.numeric ? 'true' : undefined}>{item.value}</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","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 /** 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, className, ...rest }: LinkListProps) {\n return (\n <div className={cx('pire-linklist', className)} role=\"list\" {...rest}>\n {items.map((item) => (\n <AriaButton key={item.id} className=\"pire-linklist-item\" onPress={() => onSelect?.(item.id)}>\n {item.icon ? <Icon name={item.icon} size={16} style={{ color: 'var(--text-secondary)' }} /> : null}\n {item.key ? <span className=\"pire-linklist-key\">{item.key}</span> : null}\n {item.text ? <span className=\"pire-linklist-text\">{item.text}</span> : null}\n {item.trailing}\n </AriaButton>\n ))}\n </div>\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', hasBorder = true, children, className, ...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 ? <span style={{ font: 'var(--type-caption)', color: 'var(--text-tertiary)' }}>{meta}</span> : null}\n {actions ? <div className=\"pire-sectionhead-actions\">{actions}</div> : null}\n </div>\n );\n}\n","import type * as React from 'react';\nimport { cx } from '../utils/cx';\n\nexport interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of selected records. The bar renders nothing at 0. */\n count: number;\n /** Noun for the records, singular. Default \"record\". */\n noun?: 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({ count, noun = 'record', children, actions, className, ...rest }: SelectionBarProps) {\n if (!count) return null;\n return (\n <div className={cx('pire-selectionbar', className)} role=\"status\" aria-live=\"polite\" {...rest}>\n <span className=\"pire-selectionbar-count\">\n {count.toLocaleString()} {noun}{count === 1 ? '' : 's'} selected\n </span>\n {children ? <span style={{ color: 'var(--text-secondary)', font: 'var(--type-caption)' }}>{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 { Dialog } from '../feedback/Dialog';\nimport { InlineMessage } from '../feedback/InlineMessage';\nimport { Button } from '../core/Button';\n\nexport interface ConfirmDialogProps {\n isOpen?: boolean;\n /** Question form, sentence case: \"Release purchase order?\" */\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\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({ isOpen, title, subtitle, consequence, children, confirmLabel = 'Confirm',\n cancelLabel = 'Cancel', tone = 'primary', isBusy, onConfirm, onCancel }: ConfirmDialogProps) {\n return (\n <Dialog isOpen={isOpen} size=\"sm\" title={title} subtitle={subtitle} onClose={onCancel}\n isDismissable={!isBusy} showClose={false}\n footer={\n <>\n <Button variant=\"tertiary\" isDisabled={isBusy} onPress={onCancel}>{cancelLabel}</Button>\n <Button variant={tone === 'danger' ? 'danger' : 'primary'} isDisabled={isBusy} onPress={onConfirm}>\n {isBusy ? 'Working…' : confirmLabel}\n </Button>\n </>\n }>\n {consequence ? (\n <InlineMessage kind={tone === 'danger' ? 'error' : 'warning'} style={{ marginBottom: children ? 'var(--sp-3)' : 0 }}>\n {consequence}\n </InlineMessage>\n ) : null}\n {children}\n </Dialog>\n );\n}\n","import type * 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 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 children?: React.ReactNode;\n footer?: React.ReactNode;\n onClose?: () => void;\n className?: string;\n}\n\n/** Right-hand overlay for details and edits that must keep the list in view. */\nexport function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }: SidePanelProps) {\n const msg = usePireMessages();\n return (\n <ModalOverlay className=\"pire-sidepanel-overlay\" isOpen={isOpen} isDismissable\n onOpenChange={(o) => { if (!o) onClose?.(); }}>\n <Modal className={cx('pire-sidepanel', className)} style={{ width }}>\n <AriaDialog className=\"pire-dialog\" style={{ height: '100%' }}>\n <header className=\"pire-dialog-head\">\n <div style={{ flex: 1, minWidth: 0 }}>\n <Heading slot=\"title\" className=\"pire-dialog-title\">{title}</Heading>\n {subtitle ? <p className=\"pire-dialog-sub\" style={{ margin: 0 }}>{subtitle}</p> : null}\n </div>\n <IconButton icon=\"x\" label={msg.sidePanelClose} size=\"sm\" onPress={onClose} />\n </header>\n <div className=\"pire-dialog-body\" style={{ flex: 1 }}>{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({ icon = 'file-text', title, action, compact, children, className, ...rest }: 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\" style={{ margin: 0 }}>{title}</p> : null}\n {children ? <p className=\"pire-empty-body\" style={{ margin: 0 }}>{children}</p> : null}\n {action}\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\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, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError,\n showPreview = true, uploadProgress, promptLabel, height = 'regular', description, errorMessage,\n isInvalid, isDisabled, isReadOnly, isRequired, fullWidth = true, className, style,\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 for (const url of created.current) URL.revokeObjectURL(url);\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)}>\n {label ? (\n <span className=\"pire-field-label\">\n {label}{isRequired ? <span className=\"pire-field-req\" aria-hidden=\"true\">*</span> : null}\n </span>\n ) : null}\n\n <DropZone\n className=\"pire-dropzone\"\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(\n e.items.filter(isFileDropItem).map((item) => item.getFile()),\n );\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 acceptedFileTypes={acceptedFileTypes as string[] | undefined}\n allowsMultiple={allowsMultiple} onSelect={(list) => accept(list ? [...list] : [])}>\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 : <Icon name=\"file-text\" size={16} className=\"pire-fileupload-icon\" />}\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 icon=\"x\" size=\"sm\"\n label={msg.fileUploadRemoveNamed.replace('{name}', file.name)}\n onPress={() => remove(file)} />\n )}\n </li>\n ))}\n </ul>\n ) : null}\n\n {uploadProgress != null ? (\n <ProgressBar value={uploadProgress} label={msg.fileUploadUploading} />\n ) : null}\n\n {description ? <span className=\"pire-field-hint\">{description}</span> : null}\n {isInvalid && errorMessage ? <span className=\"pire-field-error\">{errorMessage}</span> : null}\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;AA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_components","import_react_aria_components","import_jsx_runtime","AriaTooltip","import_jsx_runtime","IconButton","AriaButton","import_jsx_runtime","import_react_aria_components","import_jsx_runtime","AriaButton","import_jsx_runtime","React","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","import_jsx_runtime","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","AriaInput","React","import_react_aria_components","import_jsx_runtime","AriaTextArea","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","React","import_jsx_runtime","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","React","import_react_aria_components","import_jsx_runtime","norm","AriaComboBox","AriaInput","AriaButton","import_react_aria_components","import_jsx_runtime","AriaNumberField","AriaInput","AriaButton","import_react_aria_components","import_jsx_runtime","AriaDatePicker","AriaButton","AriaDialog","import_react_aria_components","import_jsx_runtime","AriaDateRangePicker","AriaButton","AriaDialog","React","React","import_react_aria_components","import_jsx_runtime","AriaDialog","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_jsx_runtime","initials","React","import_react_aria_components","import_react_aria_components","import_jsx_runtime","AriaMenu","AriaMenuItem","AriaMenuSection","AriaSeparator","import_jsx_runtime","AriaButton","import_react_aria_components","import_jsx_runtime","AriaTabs","AriaTab","import_react_aria_components","import_jsx_runtime","AriaBreadcrumbs","AriaBreadcrumb","import_jsx_runtime","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","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","import_react_aria_components","import_jsx_runtime","AriaDialog","import_jsx_runtime","React","import_react_aria_components","import_jsx_runtime","isImage","import_react_aria_components"]}