@orianatech/pire 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +114 -0
  4. package/dist/components/core/Avatar.d.cts +11 -0
  5. package/dist/components/core/Avatar.d.ts +12 -0
  6. package/dist/components/core/Avatar.d.ts.map +1 -0
  7. package/dist/components/core/Badge.d.cts +9 -0
  8. package/dist/components/core/Badge.d.ts +10 -0
  9. package/dist/components/core/Badge.d.ts.map +1 -0
  10. package/dist/components/core/Button.d.cts +17 -0
  11. package/dist/components/core/Button.d.ts +18 -0
  12. package/dist/components/core/Button.d.ts.map +1 -0
  13. package/dist/components/core/Card.d.cts +13 -0
  14. package/dist/components/core/Card.d.ts +14 -0
  15. package/dist/components/core/Card.d.ts.map +1 -0
  16. package/dist/components/core/Icon.d.cts +22 -0
  17. package/dist/components/core/Icon.d.ts +23 -0
  18. package/dist/components/core/Icon.d.ts.map +1 -0
  19. package/dist/components/core/IconButton.d.cts +15 -0
  20. package/dist/components/core/IconButton.d.ts +16 -0
  21. package/dist/components/core/IconButton.d.ts.map +1 -0
  22. package/dist/components/core/SegmentedControl.d.cts +23 -0
  23. package/dist/components/core/SegmentedControl.d.ts +24 -0
  24. package/dist/components/core/SegmentedControl.d.ts.map +1 -0
  25. package/dist/components/core/Tag.d.cts +8 -0
  26. package/dist/components/core/Tag.d.ts +9 -0
  27. package/dist/components/core/Tag.d.ts.map +1 -0
  28. package/dist/components/data/DataTable.d.cts +40 -0
  29. package/dist/components/data/DataTable.d.ts +41 -0
  30. package/dist/components/data/DataTable.d.ts.map +1 -0
  31. package/dist/components/data/DescriptionList.d.cts +21 -0
  32. package/dist/components/data/DescriptionList.d.ts +22 -0
  33. package/dist/components/data/DescriptionList.d.ts.map +1 -0
  34. package/dist/components/data/FilterBar.d.cts +19 -0
  35. package/dist/components/data/FilterBar.d.ts +20 -0
  36. package/dist/components/data/FilterBar.d.ts.map +1 -0
  37. package/dist/components/data/KpiTile.d.cts +23 -0
  38. package/dist/components/data/KpiTile.d.ts +24 -0
  39. package/dist/components/data/KpiTile.d.ts.map +1 -0
  40. package/dist/components/data/LinkList.d.cts +18 -0
  41. package/dist/components/data/LinkList.d.ts +19 -0
  42. package/dist/components/data/LinkList.d.ts.map +1 -0
  43. package/dist/components/data/ObjectHeader.d.cts +21 -0
  44. package/dist/components/data/ObjectHeader.d.ts +22 -0
  45. package/dist/components/data/ObjectHeader.d.ts.map +1 -0
  46. package/dist/components/data/Timeline.d.cts +16 -0
  47. package/dist/components/data/Timeline.d.ts +17 -0
  48. package/dist/components/data/Timeline.d.ts.map +1 -0
  49. package/dist/components/feedback/Dialog.d.cts +21 -0
  50. package/dist/components/feedback/Dialog.d.ts +22 -0
  51. package/dist/components/feedback/Dialog.d.ts.map +1 -0
  52. package/dist/components/feedback/InlineMessage.d.cts +13 -0
  53. package/dist/components/feedback/InlineMessage.d.ts +14 -0
  54. package/dist/components/feedback/InlineMessage.d.ts.map +1 -0
  55. package/dist/components/feedback/ProgressBar.d.cts +16 -0
  56. package/dist/components/feedback/ProgressBar.d.ts +17 -0
  57. package/dist/components/feedback/ProgressBar.d.ts.map +1 -0
  58. package/dist/components/feedback/Toast.d.cts +28 -0
  59. package/dist/components/feedback/Toast.d.ts +29 -0
  60. package/dist/components/feedback/Toast.d.ts.map +1 -0
  61. package/dist/components/feedback/Tooltip.d.cts +11 -0
  62. package/dist/components/feedback/Tooltip.d.ts +12 -0
  63. package/dist/components/feedback/Tooltip.d.ts.map +1 -0
  64. package/dist/components/forms/Checkbox.d.cts +9 -0
  65. package/dist/components/forms/Checkbox.d.ts +10 -0
  66. package/dist/components/forms/Checkbox.d.ts.map +1 -0
  67. package/dist/components/forms/ComboBox.d.cts +45 -0
  68. package/dist/components/forms/ComboBox.d.ts +46 -0
  69. package/dist/components/forms/ComboBox.d.ts.map +1 -0
  70. package/dist/components/forms/DatePicker.d.cts +27 -0
  71. package/dist/components/forms/DatePicker.d.ts +28 -0
  72. package/dist/components/forms/DatePicker.d.ts.map +1 -0
  73. package/dist/components/forms/FormField.d.cts +17 -0
  74. package/dist/components/forms/FormField.d.ts +18 -0
  75. package/dist/components/forms/FormField.d.ts.map +1 -0
  76. package/dist/components/forms/Input.d.cts +33 -0
  77. package/dist/components/forms/Input.d.ts +34 -0
  78. package/dist/components/forms/Input.d.ts.map +1 -0
  79. package/dist/components/forms/NumberField.d.cts +33 -0
  80. package/dist/components/forms/NumberField.d.ts +34 -0
  81. package/dist/components/forms/NumberField.d.ts.map +1 -0
  82. package/dist/components/forms/Radio.d.cts +18 -0
  83. package/dist/components/forms/Radio.d.ts +19 -0
  84. package/dist/components/forms/Radio.d.ts.map +1 -0
  85. package/dist/components/forms/Select.d.cts +28 -0
  86. package/dist/components/forms/Select.d.ts +29 -0
  87. package/dist/components/forms/Select.d.ts.map +1 -0
  88. package/dist/components/forms/Switch.d.cts +9 -0
  89. package/dist/components/forms/Switch.d.ts +10 -0
  90. package/dist/components/forms/Switch.d.ts.map +1 -0
  91. package/dist/components/forms/ValueHelpField.d.cts +31 -0
  92. package/dist/components/forms/ValueHelpField.d.ts +32 -0
  93. package/dist/components/forms/ValueHelpField.d.ts.map +1 -0
  94. package/dist/components/layout/FooterBar.d.cts +10 -0
  95. package/dist/components/layout/FooterBar.d.ts +11 -0
  96. package/dist/components/layout/FooterBar.d.ts.map +1 -0
  97. package/dist/components/layout/PageHeader.d.cts +10 -0
  98. package/dist/components/layout/PageHeader.d.ts +11 -0
  99. package/dist/components/layout/PageHeader.d.ts.map +1 -0
  100. package/dist/components/layout/SectionHeader.d.cts +11 -0
  101. package/dist/components/layout/SectionHeader.d.ts +12 -0
  102. package/dist/components/layout/SectionHeader.d.ts.map +1 -0
  103. package/dist/components/layout/SelectionBar.d.cts +14 -0
  104. package/dist/components/layout/SelectionBar.d.ts +15 -0
  105. package/dist/components/layout/SelectionBar.d.ts.map +1 -0
  106. package/dist/components/navigation/Breadcrumb.d.cts +14 -0
  107. package/dist/components/navigation/Breadcrumb.d.ts +15 -0
  108. package/dist/components/navigation/Breadcrumb.d.ts.map +1 -0
  109. package/dist/components/navigation/Pagination.d.cts +13 -0
  110. package/dist/components/navigation/Pagination.d.ts +14 -0
  111. package/dist/components/navigation/Pagination.d.ts.map +1 -0
  112. package/dist/components/navigation/ShellBar.d.cts +17 -0
  113. package/dist/components/navigation/ShellBar.d.ts +18 -0
  114. package/dist/components/navigation/ShellBar.d.ts.map +1 -0
  115. package/dist/components/navigation/SideNav.d.cts +22 -0
  116. package/dist/components/navigation/SideNav.d.ts +23 -0
  117. package/dist/components/navigation/SideNav.d.ts.map +1 -0
  118. package/dist/components/navigation/Tabs.d.cts +23 -0
  119. package/dist/components/navigation/Tabs.d.ts +24 -0
  120. package/dist/components/navigation/Tabs.d.ts.map +1 -0
  121. package/dist/components/patterns/ConfirmDialog.d.cts +21 -0
  122. package/dist/components/patterns/ConfirmDialog.d.ts +22 -0
  123. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -0
  124. package/dist/components/patterns/EmptyState.d.cts +13 -0
  125. package/dist/components/patterns/EmptyState.d.ts +14 -0
  126. package/dist/components/patterns/EmptyState.d.ts.map +1 -0
  127. package/dist/components/patterns/SidePanel.d.cts +14 -0
  128. package/dist/components/patterns/SidePanel.d.ts +15 -0
  129. package/dist/components/patterns/SidePanel.d.ts.map +1 -0
  130. package/dist/components/patterns/ValueHelpDialog.d.cts +20 -0
  131. package/dist/components/patterns/ValueHelpDialog.d.ts +21 -0
  132. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -0
  133. package/dist/components/utils/cx.d.cts +2 -0
  134. package/dist/components/utils/cx.d.ts +3 -0
  135. package/dist/components/utils/cx.d.ts.map +1 -0
  136. package/dist/components.css +352 -0
  137. package/dist/index.cjs +1590 -0
  138. package/dist/index.cjs.map +1 -0
  139. package/dist/index.d.cts +46 -0
  140. package/dist/index.d.ts +47 -0
  141. package/dist/index.d.ts.map +1 -0
  142. package/dist/index.js +1560 -0
  143. package/dist/index.js.map +1 -0
  144. package/dist/pire.css +11 -0
  145. package/dist/tokens/base.css +18 -0
  146. package/dist/tokens/colors.css +53 -0
  147. package/dist/tokens/elevation.css +21 -0
  148. package/dist/tokens/fonts.css +15 -0
  149. package/dist/tokens/motion.css +13 -0
  150. package/dist/tokens/spacing.css +18 -0
  151. package/dist/tokens/themes.css +23 -0
  152. package/dist/tokens/typography.css +39 -0
  153. package/dist/tokens.css +8 -0
  154. package/package.json +99 -0
package/dist/index.js ADDED
@@ -0,0 +1,1560 @@
1
+ // src/components/core/Icon.tsx
2
+ import * as React from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var CARBON_MAP = {
5
+ "menu": "menu",
6
+ "search": "search",
7
+ "bell": "notification",
8
+ "help-circle": "help",
9
+ "grid-3x3": "grid",
10
+ "home": "home",
11
+ "file-text": "document",
12
+ "clipboard-list": "list--checked",
13
+ "building-2": "building",
14
+ "boxes": "box",
15
+ "truck": "delivery-truck",
16
+ "stamp": "checkmark--outline",
17
+ "check": "checkmark",
18
+ "x": "close",
19
+ "minus": "subtract",
20
+ "plus": "add",
21
+ "trash-2": "trash-can",
22
+ "printer": "printer",
23
+ "paperclip": "attachment",
24
+ "download": "download",
25
+ "calendar": "calendar",
26
+ "hash": "hashtag",
27
+ "history": "recently-viewed",
28
+ "calculator": "calculator",
29
+ "zap": "flash",
30
+ "palette": "color-palette",
31
+ "settings": "settings",
32
+ "sliders-horizontal": "settings--adjust",
33
+ "filter": "filter",
34
+ "rows-3": "list",
35
+ "align-justify": "list--boxes",
36
+ "more-vertical": "overflow-menu--vertical",
37
+ "alert-triangle": "warning--alt",
38
+ "alert-octagon": "error--filled",
39
+ "alert-circle": "warning--filled",
40
+ "check-circle-2": "checkmark--filled",
41
+ "x-circle": "misuse",
42
+ "info": "information",
43
+ "circle": "circle-dash",
44
+ "chevron-right": "chevron--right",
45
+ "chevron-left": "chevron--left",
46
+ "chevron-down": "chevron--down",
47
+ "chevrons-up-down": "chevron--sort",
48
+ "arrow-right": "arrow--right",
49
+ "arrow-up": "arrow--up",
50
+ "arrow-down": "arrow--down",
51
+ "trending-up": "arrow--up",
52
+ "trending-down": "arrow--down",
53
+ "shopping-cart": "shopping--cart",
54
+ "user": "user",
55
+ "shapes": "apps",
56
+ "type": "text--font",
57
+ "package": "box",
58
+ "warehouse": "building--insights-1",
59
+ "arrow-up-down": "arrows--vertical",
60
+ "scan-line": "qr-code",
61
+ "circle-alert": "warning--filled",
62
+ "clock": "time",
63
+ "layers": "layers",
64
+ "map-pin": "location",
65
+ "copy": "copy",
66
+ "refresh-cw": "renew",
67
+ "external-link": "launch",
68
+ "pencil": "edit",
69
+ "lock": "locked",
70
+ "eye": "view",
71
+ "minimize-2": "minimize"
72
+ };
73
+ var PACKS = {
74
+ carbon: { base: "https://cdn.jsdelivr.net/npm/@carbon/icons@11/svg/32/", map: CARBON_MAP },
75
+ lucide: { base: "https://cdn.jsdelivr.net/npm/lucide-static/icons/", map: null }
76
+ };
77
+ var config = {};
78
+ function configureIcons(next) {
79
+ config = { ...config, ...next };
80
+ }
81
+ function Icon({ name, size = 16, label, pack, style, ...rest }) {
82
+ const cfg = PACKS[pack ?? config.pack ?? "carbon"] ?? PACKS.lucide;
83
+ const slug = cfg.map ? cfg.map[name] ?? name : name;
84
+ const url = `${config.base ?? cfg.base}${slug}.svg`;
85
+ const [failed, setFailed] = React.useState(false);
86
+ React.useEffect(() => setFailed(false), [url]);
87
+ const mask = `url("${url}") center / ${size}px ${size}px no-repeat`;
88
+ return /* @__PURE__ */ jsx(
89
+ "span",
90
+ {
91
+ role: label ? "img" : void 0,
92
+ "aria-label": label,
93
+ "aria-hidden": label ? void 0 : true,
94
+ "data-icon": name,
95
+ ...rest,
96
+ style: {
97
+ position: "relative",
98
+ display: "inline-block",
99
+ flex: "0 0 auto",
100
+ width: size,
101
+ height: size,
102
+ backgroundColor: failed ? "transparent" : "currentColor",
103
+ WebkitMaskImage: failed ? void 0 : `url("${url}")`,
104
+ WebkitMask: failed ? void 0 : mask,
105
+ mask: failed ? void 0 : mask,
106
+ ...style
107
+ },
108
+ children: /* @__PURE__ */ jsx(
109
+ "img",
110
+ {
111
+ src: url,
112
+ alt: "",
113
+ "aria-hidden": "true",
114
+ onError: () => setFailed(true),
115
+ style: { position: "absolute", width: 1, height: 1, opacity: 0, pointerEvents: "none" }
116
+ }
117
+ )
118
+ }
119
+ );
120
+ }
121
+
122
+ // src/components/core/Button.tsx
123
+ import * as React2 from "react";
124
+ import { Button as AriaButton } from "react-aria-components";
125
+
126
+ // src/components/utils/cx.ts
127
+ function cx(...parts) {
128
+ return parts.filter(Boolean).join(" ");
129
+ }
130
+
131
+ // src/components/core/Button.tsx
132
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
133
+ var Button = React2.forwardRef(function Button2({ children, variant = "secondary", size = "md", icon, iconEnd, fullWidth, className, ...rest }, ref) {
134
+ return /* @__PURE__ */ jsxs(
135
+ AriaButton,
136
+ {
137
+ ref,
138
+ className: cx("pire-btn", className),
139
+ "data-variant": variant,
140
+ "data-size": size,
141
+ "data-full-width": fullWidth ? "true" : void 0,
142
+ ...rest,
143
+ children: [
144
+ icon ? /* @__PURE__ */ jsx2(Icon, { name: icon, size: 16 }) : null,
145
+ children,
146
+ iconEnd ? /* @__PURE__ */ jsx2(Icon, { name: iconEnd, size: 16 }) : null
147
+ ]
148
+ }
149
+ );
150
+ });
151
+
152
+ // src/components/core/IconButton.tsx
153
+ import * as React3 from "react";
154
+ import { Button as AriaButton2 } from "react-aria-components";
155
+
156
+ // src/components/feedback/Tooltip.tsx
157
+ import { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow } from "react-aria-components";
158
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
159
+ function Tooltip({ label, placement = "top", delay = 500, children }) {
160
+ return /* @__PURE__ */ jsxs2(TooltipTrigger, { delay, closeDelay: 0, children: [
161
+ children,
162
+ /* @__PURE__ */ jsxs2(AriaTooltip, { className: "pire-tooltip", placement, offset: 6, children: [
163
+ /* @__PURE__ */ jsx3(OverlayArrow, { children: /* @__PURE__ */ jsx3("span", {}) }),
164
+ label
165
+ ] })
166
+ ] });
167
+ }
168
+
169
+ // src/components/core/IconButton.tsx
170
+ import { jsx as jsx4 } from "react/jsx-runtime";
171
+ var IconButton = React3.forwardRef(function IconButton2({ icon, label, size = "md", variant = "tertiary", selected, hideTooltip, className, ...rest }, ref) {
172
+ const button = /* @__PURE__ */ jsx4(
173
+ AriaButton2,
174
+ {
175
+ ref,
176
+ "aria-label": label,
177
+ "aria-pressed": selected,
178
+ className: cx("pire-iconbtn", className),
179
+ "data-size": size,
180
+ "data-variant": variant,
181
+ "data-selected": selected ? "true" : void 0,
182
+ ...rest,
183
+ children: /* @__PURE__ */ jsx4(Icon, { name: icon, size: size === "lg" ? 20 : 16 })
184
+ }
185
+ );
186
+ return hideTooltip ? button : /* @__PURE__ */ jsx4(Tooltip, { label, children: button });
187
+ });
188
+
189
+ // src/components/core/Badge.tsx
190
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
191
+ var STATUS_ICON = {
192
+ positive: "check-circle-2",
193
+ critical: "alert-triangle",
194
+ negative: "x-circle",
195
+ informative: "info",
196
+ neutral: "circle"
197
+ };
198
+ function Badge({ children, status = "neutral", showIcon = true, className, ...rest }) {
199
+ return /* @__PURE__ */ jsxs3("span", { className: cx("pire-badge", className), "data-status": status, ...rest, children: [
200
+ showIcon ? /* @__PURE__ */ jsx5(Icon, { name: STATUS_ICON[status], size: 12 }) : null,
201
+ children
202
+ ] });
203
+ }
204
+
205
+ // src/components/core/Tag.tsx
206
+ import { Button as AriaButton3 } from "react-aria-components";
207
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
208
+ function Tag({ children, onRemove, isDisabled, className, ...rest }) {
209
+ return /* @__PURE__ */ jsxs4("span", { className: cx("pire-tag", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
210
+ children,
211
+ onRemove ? /* @__PURE__ */ jsx6(
212
+ AriaButton3,
213
+ {
214
+ className: "pire-tag-remove",
215
+ isDisabled,
216
+ onPress: onRemove,
217
+ "aria-label": `Remove ${typeof children === "string" ? children : "filter"}`,
218
+ children: /* @__PURE__ */ jsx6(Icon, { name: "x", size: 12 })
219
+ }
220
+ ) : null
221
+ ] });
222
+ }
223
+
224
+ // src/components/core/Card.tsx
225
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
226
+ function Card({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }) {
227
+ return /* @__PURE__ */ jsxs5("section", { className: cx("pire-card", className), "data-interactive": interactive ? "true" : void 0, ...rest, children: [
228
+ title || actions ? /* @__PURE__ */ jsxs5("header", { className: "pire-card-head", children: [
229
+ icon ? /* @__PURE__ */ jsx7(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
230
+ /* @__PURE__ */ jsxs5("div", { style: { flex: 1, minWidth: 0 }, children: [
231
+ /* @__PURE__ */ jsx7("h3", { className: "pire-card-title", children: title }),
232
+ subtitle ? /* @__PURE__ */ jsx7("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
233
+ ] }),
234
+ actions ? /* @__PURE__ */ jsx7("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
235
+ ] }) : null,
236
+ children ? /* @__PURE__ */ jsx7("div", { className: "pire-card-body", children }) : null,
237
+ footer ? /* @__PURE__ */ jsx7("footer", { className: "pire-card-foot", children: footer }) : null
238
+ ] });
239
+ }
240
+
241
+ // src/components/core/Avatar.tsx
242
+ import * as React4 from "react";
243
+ import { jsx as jsx8 } from "react/jsx-runtime";
244
+ var initials = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
245
+ function Avatar({ name, size = "md", src, className, ...rest }) {
246
+ const [failed, setFailed] = React4.useState(false);
247
+ return /* @__PURE__ */ jsx8("span", { className: cx("pire-avatar", className), "data-size": size, role: "img", "aria-label": name, ...rest, children: src && !failed ? /* @__PURE__ */ jsx8(
248
+ "img",
249
+ {
250
+ src,
251
+ alt: "",
252
+ onError: () => setFailed(true),
253
+ style: { width: "100%", height: "100%", borderRadius: "inherit", objectFit: "cover" }
254
+ }
255
+ ) : initials(name) });
256
+ }
257
+
258
+ // src/components/core/SegmentedControl.tsx
259
+ import * as React5 from "react";
260
+ import { ToggleButtonGroup, ToggleButton } from "react-aria-components";
261
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
262
+ function SegmentedControl({
263
+ options,
264
+ value,
265
+ defaultValue,
266
+ onChange,
267
+ iconOnly,
268
+ size = "sm",
269
+ className,
270
+ style,
271
+ ...rest
272
+ }) {
273
+ const selected = React5.useMemo(() => new Set(value ? [value] : defaultValue ? [defaultValue] : []), [value, defaultValue]);
274
+ return /* @__PURE__ */ jsx9(
275
+ ToggleButtonGroup,
276
+ {
277
+ className: cx("pire-segmented", className),
278
+ "data-size": size,
279
+ style,
280
+ "aria-label": rest["aria-label"],
281
+ selectionMode: "single",
282
+ disallowEmptySelection: true,
283
+ selectedKeys: selected,
284
+ onSelectionChange: (keys) => {
285
+ const first = [...keys][0];
286
+ if (first != null) onChange?.(String(first));
287
+ },
288
+ children: options.map((option) => /* @__PURE__ */ jsxs6(
289
+ ToggleButton,
290
+ {
291
+ id: option.id,
292
+ className: "pire-segmented-item",
293
+ isDisabled: option.isDisabled,
294
+ "aria-label": iconOnly ? option.label : void 0,
295
+ children: [
296
+ option.icon ? /* @__PURE__ */ jsx9(Icon, { name: option.icon, size: 16 }) : null,
297
+ iconOnly ? null : option.label
298
+ ]
299
+ },
300
+ option.id
301
+ ))
302
+ }
303
+ );
304
+ }
305
+
306
+ // src/components/forms/FormField.tsx
307
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
308
+ function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
309
+ return /* @__PURE__ */ jsxs7("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
310
+ /* @__PURE__ */ jsxs7("label", { className: "pire-field-label", htmlFor, children: [
311
+ label,
312
+ isRequired ? /* @__PURE__ */ jsx10("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
313
+ ] }),
314
+ children,
315
+ error ? /* @__PURE__ */ jsxs7("span", { className: "pire-field-error", role: "alert", children: [
316
+ /* @__PURE__ */ jsx10(Icon, { name: "alert-circle", size: 12 }),
317
+ error
318
+ ] }) : hint ? /* @__PURE__ */ jsx10("span", { className: "pire-field-hint", children: hint }) : null
319
+ ] });
320
+ }
321
+
322
+ // src/components/forms/Input.tsx
323
+ import { TextField, Label, Input as AriaInput, Group, Text, FieldError } from "react-aria-components";
324
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
325
+ function Input({
326
+ label,
327
+ icon,
328
+ suffix,
329
+ description,
330
+ errorMessage,
331
+ size = "md",
332
+ numeric,
333
+ fullWidth = true,
334
+ className,
335
+ style,
336
+ inputRef,
337
+ onChange,
338
+ ...rest
339
+ }) {
340
+ return /* @__PURE__ */ jsxs8(
341
+ TextField,
342
+ {
343
+ className: cx("pire-field", className),
344
+ style,
345
+ onChange,
346
+ validationBehavior: "aria",
347
+ ...rest,
348
+ children: [
349
+ label ? /* @__PURE__ */ jsxs8(Label, { className: "pire-field-label", children: [
350
+ label,
351
+ rest.isRequired ? /* @__PURE__ */ jsx11("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
352
+ ] }) : null,
353
+ /* @__PURE__ */ jsxs8(
354
+ Group,
355
+ {
356
+ className: "pire-control",
357
+ "data-size": size,
358
+ "data-full-width": String(fullWidth),
359
+ "data-invalid": rest.isInvalid ? "true" : void 0,
360
+ "data-readonly": rest.isReadOnly ? "true" : void 0,
361
+ children: [
362
+ icon ? /* @__PURE__ */ jsx11(Icon, { name: icon, size: 16, className: "pire-leading-icon" }) : null,
363
+ /* @__PURE__ */ jsx11(AriaInput, { ref: inputRef, className: "pire-input", "data-numeric": numeric ? "true" : void 0 }),
364
+ suffix ? /* @__PURE__ */ jsx11("span", { className: "pire-affix", children: suffix }) : null
365
+ ]
366
+ }
367
+ ),
368
+ description ? /* @__PURE__ */ jsx11(Text, { slot: "description", className: "pire-field-hint", children: description }) : null,
369
+ /* @__PURE__ */ jsx11(FieldError, { className: "pire-field-error", children: errorMessage })
370
+ ]
371
+ }
372
+ );
373
+ }
374
+
375
+ // src/components/forms/Select.tsx
376
+ import {
377
+ Select as AriaSelect,
378
+ Label as Label2,
379
+ Button as AriaButton4,
380
+ SelectValue,
381
+ Popover,
382
+ ListBox,
383
+ ListBoxItem,
384
+ Text as Text2,
385
+ FieldError as FieldError2
386
+ } from "react-aria-components";
387
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
388
+ var norm = (o) => typeof o === "string" ? { value: o, label: o, isDisabled: false } : o;
389
+ function Select({
390
+ label,
391
+ value,
392
+ defaultValue,
393
+ onChange,
394
+ options = [],
395
+ placeholder = "Select\u2026",
396
+ description,
397
+ errorMessage,
398
+ size = "md",
399
+ fullWidth = true,
400
+ className,
401
+ style,
402
+ ...rest
403
+ }) {
404
+ const items = options.map(norm);
405
+ return /* @__PURE__ */ jsxs9(
406
+ AriaSelect,
407
+ {
408
+ className: cx("pire-field", className),
409
+ style,
410
+ selectedKey: value,
411
+ defaultSelectedKey: defaultValue,
412
+ onSelectionChange: (k) => onChange?.(String(k)),
413
+ placeholder,
414
+ validationBehavior: "aria",
415
+ ...rest,
416
+ children: [
417
+ label ? /* @__PURE__ */ jsxs9(Label2, { className: "pire-field-label", children: [
418
+ label,
419
+ rest.isRequired ? /* @__PURE__ */ jsx12("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
420
+ ] }) : null,
421
+ /* @__PURE__ */ jsxs9(
422
+ AriaButton4,
423
+ {
424
+ className: "pire-control",
425
+ "data-size": size,
426
+ "data-full-width": String(fullWidth),
427
+ "data-invalid": rest.isInvalid ? "true" : void 0,
428
+ children: [
429
+ /* @__PURE__ */ jsx12(SelectValue, { className: "pire-select-value" }),
430
+ /* @__PURE__ */ jsx12(Icon, { name: "chevron-down", size: 16, className: "pire-leading-icon" })
431
+ ]
432
+ }
433
+ ),
434
+ description ? /* @__PURE__ */ jsx12(Text2, { slot: "description", className: "pire-field-hint", children: description }) : null,
435
+ /* @__PURE__ */ jsx12(FieldError2, { className: "pire-field-error", children: errorMessage }),
436
+ /* @__PURE__ */ jsx12(Popover, { className: "pire-popover", children: /* @__PURE__ */ jsx12(ListBox, { className: "pire-listbox", items, children: (item) => /* @__PURE__ */ jsx12(ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: item.label }) }) })
437
+ ]
438
+ }
439
+ );
440
+ }
441
+
442
+ // src/components/forms/Checkbox.tsx
443
+ import { Checkbox as AriaCheckbox } from "react-aria-components";
444
+ import { Fragment, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
445
+ function Checkbox({ label, hint, children, className, ...rest }) {
446
+ return /* @__PURE__ */ jsx13(AriaCheckbox, { className: cx("pire-choice", className), ...rest, children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment, { children: [
447
+ /* @__PURE__ */ jsx13("span", { className: "pire-choice-box", "aria-hidden": "true", children: isIndeterminate ? /* @__PURE__ */ jsx13(Icon, { name: "minus", size: 12 }) : isSelected ? /* @__PURE__ */ jsx13(Icon, { name: "check", size: 12 }) : null }),
448
+ /* @__PURE__ */ jsxs10("span", { children: [
449
+ label ?? children,
450
+ hint ? /* @__PURE__ */ jsx13("span", { className: "pire-choice-hint", children: hint }) : null
451
+ ] })
452
+ ] }) });
453
+ }
454
+
455
+ // src/components/forms/Radio.tsx
456
+ import {
457
+ RadioGroup as AriaRadioGroup,
458
+ Radio as AriaRadio,
459
+ Label as Label3,
460
+ Text as Text3,
461
+ FieldError as FieldError3
462
+ } from "react-aria-components";
463
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
464
+ function RadioGroup({ label, description, errorMessage, children, className, ...rest }) {
465
+ return /* @__PURE__ */ jsxs11(AriaRadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
466
+ label ? /* @__PURE__ */ jsx14(Label3, { className: "pire-field-label", children: label }) : null,
467
+ /* @__PURE__ */ jsx14("div", { className: "pire-radiogroup", children }),
468
+ description ? /* @__PURE__ */ jsx14(Text3, { slot: "description", className: "pire-field-hint", children: description }) : null,
469
+ /* @__PURE__ */ jsx14(FieldError3, { className: "pire-field-error", children: errorMessage })
470
+ ] });
471
+ }
472
+ function Radio({ label, hint, children, className, ...rest }) {
473
+ return /* @__PURE__ */ jsxs11(AriaRadio, { className: cx("pire-choice", className), ...rest, children: [
474
+ /* @__PURE__ */ jsx14("span", { className: "pire-choice-box", "data-radio": "true", "aria-hidden": "true" }),
475
+ /* @__PURE__ */ jsxs11("span", { children: [
476
+ label ?? children,
477
+ hint ? /* @__PURE__ */ jsx14("span", { className: "pire-choice-hint", children: hint }) : null
478
+ ] })
479
+ ] });
480
+ }
481
+
482
+ // src/components/forms/Switch.tsx
483
+ import { Switch as AriaSwitch } from "react-aria-components";
484
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
485
+ function Switch({ label, children, className, ...rest }) {
486
+ return /* @__PURE__ */ jsxs12(AriaSwitch, { className: cx("pire-choice", className), ...rest, children: [
487
+ /* @__PURE__ */ jsx15("span", { className: "pire-switch-track", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("span", { className: "pire-switch-thumb" }) }),
488
+ /* @__PURE__ */ jsx15("span", { children: label ?? children })
489
+ ] });
490
+ }
491
+
492
+ // src/components/forms/ComboBox.tsx
493
+ import {
494
+ ComboBox as AriaComboBox,
495
+ Label as Label4,
496
+ Input as AriaInput2,
497
+ Button as AriaButton5,
498
+ Group as Group2,
499
+ Popover as Popover2,
500
+ ListBox as ListBox2,
501
+ ListBoxItem as ListBoxItem2,
502
+ Text as Text4,
503
+ FieldError as FieldError4
504
+ } from "react-aria-components";
505
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
506
+ var norm2 = (o) => typeof o === "string" ? { value: o, label: o } : o;
507
+ function ComboBox({
508
+ label,
509
+ value,
510
+ defaultValue,
511
+ onChange,
512
+ onInputChange,
513
+ options = [],
514
+ description,
515
+ errorMessage,
516
+ size = "md",
517
+ fullWidth = true,
518
+ className,
519
+ style,
520
+ ...rest
521
+ }) {
522
+ const items = options.map(norm2);
523
+ return /* @__PURE__ */ jsxs13(
524
+ AriaComboBox,
525
+ {
526
+ className: cx("pire-field", className),
527
+ style,
528
+ selectedKey: value,
529
+ defaultSelectedKey: defaultValue,
530
+ onSelectionChange: (k) => onChange?.(k == null ? null : String(k)),
531
+ onInputChange,
532
+ defaultItems: items,
533
+ menuTrigger: "input",
534
+ validationBehavior: "aria",
535
+ ...rest,
536
+ children: [
537
+ label ? /* @__PURE__ */ jsxs13(Label4, { className: "pire-field-label", children: [
538
+ label,
539
+ rest.isRequired ? /* @__PURE__ */ jsx16("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
540
+ ] }) : null,
541
+ /* @__PURE__ */ jsxs13(
542
+ Group2,
543
+ {
544
+ className: "pire-control",
545
+ "data-size": size,
546
+ "data-full-width": String(fullWidth),
547
+ "data-invalid": rest.isInvalid ? "true" : void 0,
548
+ children: [
549
+ /* @__PURE__ */ jsx16(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
550
+ /* @__PURE__ */ jsx16(AriaInput2, { className: "pire-input", placeholder: rest.placeholder }),
551
+ /* @__PURE__ */ jsx16(AriaButton5, { className: "pire-iconbtn", "data-size": "sm", "aria-label": "Show suggestions", style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx16(Icon, { name: "chevron-down", size: 16 }) })
552
+ ]
553
+ }
554
+ ),
555
+ description ? /* @__PURE__ */ jsx16(Text4, { slot: "description", className: "pire-field-hint", children: description }) : null,
556
+ /* @__PURE__ */ jsx16(FieldError4, { className: "pire-field-error", children: errorMessage }),
557
+ /* @__PURE__ */ jsx16(Popover2, { className: "pire-popover", children: /* @__PURE__ */ jsx16(ListBox2, { className: "pire-listbox", children: (item) => /* @__PURE__ */ jsxs13(ListBoxItem2, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
558
+ /* @__PURE__ */ jsx16("span", { style: { flex: 1 }, children: item.label }),
559
+ item.secondary ? /* @__PURE__ */ jsx16("span", { style: { font: "var(--type-code)", color: "var(--text-tertiary)" }, children: item.secondary }) : null
560
+ ] }) }) })
561
+ ]
562
+ }
563
+ );
564
+ }
565
+
566
+ // src/components/forms/NumberField.tsx
567
+ import {
568
+ NumberField as AriaNumberField,
569
+ Label as Label5,
570
+ Input as AriaInput3,
571
+ Group as Group3,
572
+ Button as AriaButton6,
573
+ Text as Text5,
574
+ FieldError as FieldError5
575
+ } from "react-aria-components";
576
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
577
+ function NumberField({
578
+ label,
579
+ suffix,
580
+ description,
581
+ errorMessage,
582
+ hideStepper,
583
+ size = "md",
584
+ fullWidth = true,
585
+ className,
586
+ style,
587
+ ...rest
588
+ }) {
589
+ return /* @__PURE__ */ jsxs14(AriaNumberField, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
590
+ label ? /* @__PURE__ */ jsxs14(Label5, { className: "pire-field-label", children: [
591
+ label,
592
+ rest.isRequired ? /* @__PURE__ */ jsx17("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
593
+ ] }) : null,
594
+ /* @__PURE__ */ jsxs14(
595
+ Group3,
596
+ {
597
+ className: "pire-control",
598
+ "data-size": size,
599
+ "data-full-width": String(fullWidth),
600
+ "data-invalid": rest.isInvalid ? "true" : void 0,
601
+ "data-readonly": rest.isReadOnly ? "true" : void 0,
602
+ children: [
603
+ /* @__PURE__ */ jsx17(AriaInput3, { className: "pire-input", "data-numeric": "true" }),
604
+ suffix ? /* @__PURE__ */ jsx17("span", { className: "pire-affix", children: suffix }) : null,
605
+ hideStepper ? null : /* @__PURE__ */ jsxs14("span", { className: "pire-stepper", children: [
606
+ /* @__PURE__ */ jsx17(AriaButton6, { slot: "increment", className: "pire-stepper-btn", "aria-label": "Increase", children: /* @__PURE__ */ jsx17(Icon, { name: "plus", size: 10 }) }),
607
+ /* @__PURE__ */ jsx17(AriaButton6, { slot: "decrement", className: "pire-stepper-btn", "aria-label": "Decrease", children: /* @__PURE__ */ jsx17(Icon, { name: "minus", size: 10 }) })
608
+ ] })
609
+ ]
610
+ }
611
+ ),
612
+ description ? /* @__PURE__ */ jsx17(Text5, { slot: "description", className: "pire-field-hint", children: description }) : null,
613
+ /* @__PURE__ */ jsx17(FieldError5, { className: "pire-field-error", children: errorMessage })
614
+ ] });
615
+ }
616
+
617
+ // src/components/forms/DatePicker.tsx
618
+ import {
619
+ DatePicker as AriaDatePicker,
620
+ Label as Label6,
621
+ Group as Group4,
622
+ DateInput,
623
+ DateSegment,
624
+ Button as AriaButton7,
625
+ Popover as Popover3,
626
+ Dialog as AriaDialog,
627
+ Calendar,
628
+ CalendarGrid,
629
+ CalendarGridHeader,
630
+ CalendarHeaderCell,
631
+ CalendarGridBody,
632
+ CalendarCell,
633
+ Heading,
634
+ Text as Text6,
635
+ FieldError as FieldError6
636
+ } from "react-aria-components";
637
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
638
+ function DatePicker({
639
+ label,
640
+ description,
641
+ errorMessage,
642
+ size = "md",
643
+ fullWidth = true,
644
+ className,
645
+ style,
646
+ ...rest
647
+ }) {
648
+ return /* @__PURE__ */ jsxs15(AriaDatePicker, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
649
+ label ? /* @__PURE__ */ jsxs15(Label6, { className: "pire-field-label", children: [
650
+ label,
651
+ rest.isRequired ? /* @__PURE__ */ jsx18("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
652
+ ] }) : null,
653
+ /* @__PURE__ */ jsxs15(
654
+ Group4,
655
+ {
656
+ className: "pire-control",
657
+ "data-size": size,
658
+ "data-full-width": String(fullWidth),
659
+ "data-invalid": rest.isInvalid ? "true" : void 0,
660
+ "data-readonly": rest.isReadOnly ? "true" : void 0,
661
+ children: [
662
+ /* @__PURE__ */ jsx18(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx18(DateSegment, { segment, className: "pire-datesegment" }) }),
663
+ /* @__PURE__ */ jsx18(AriaButton7, { className: "pire-iconbtn", "data-size": "sm", "aria-label": "Open calendar", style: { width: 24, height: 24 }, children: /* @__PURE__ */ jsx18(Icon, { name: "calendar", size: 16 }) })
664
+ ]
665
+ }
666
+ ),
667
+ description ? /* @__PURE__ */ jsx18(Text6, { slot: "description", className: "pire-field-hint", children: description }) : null,
668
+ /* @__PURE__ */ jsx18(FieldError6, { className: "pire-field-error", children: errorMessage }),
669
+ /* @__PURE__ */ jsx18(Popover3, { className: "pire-popover", children: /* @__PURE__ */ jsx18(AriaDialog, { children: /* @__PURE__ */ jsxs15(Calendar, { className: "pire-calendar", children: [
670
+ /* @__PURE__ */ jsxs15("header", { className: "pire-calendar-head", children: [
671
+ /* @__PURE__ */ jsx18(AriaButton7, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": "Previous month", children: /* @__PURE__ */ jsx18(Icon, { name: "chevron-left", size: 16 }) }),
672
+ /* @__PURE__ */ jsx18(Heading, { className: "pire-calendar-title" }),
673
+ /* @__PURE__ */ jsx18(AriaButton7, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": "Next month", children: /* @__PURE__ */ jsx18(Icon, { name: "chevron-right", size: 16 }) })
674
+ ] }),
675
+ /* @__PURE__ */ jsxs15(CalendarGrid, { className: "pire-calendar-grid", children: [
676
+ /* @__PURE__ */ jsx18(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx18(CalendarHeaderCell, { children: day }) }),
677
+ /* @__PURE__ */ jsx18(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx18(CalendarCell, { date, className: "pire-calendar-cell" }) })
678
+ ] })
679
+ ] }) }) })
680
+ ] });
681
+ }
682
+
683
+ // src/components/forms/ValueHelpField.tsx
684
+ import * as React7 from "react";
685
+
686
+ // src/components/patterns/ValueHelpDialog.tsx
687
+ import * as React6 from "react";
688
+
689
+ // src/components/feedback/Dialog.tsx
690
+ import { ModalOverlay, Modal, Dialog as AriaDialog2, Heading as Heading2 } from "react-aria-components";
691
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
692
+ function Dialog({
693
+ isOpen,
694
+ onOpenChange,
695
+ title,
696
+ subtitle,
697
+ children,
698
+ footer,
699
+ onClose,
700
+ size = "md",
701
+ isDismissable = true,
702
+ showClose = true,
703
+ className,
704
+ style
705
+ }) {
706
+ const close = () => {
707
+ onClose?.();
708
+ onOpenChange?.(false);
709
+ };
710
+ return /* @__PURE__ */ jsx19(
711
+ ModalOverlay,
712
+ {
713
+ className: "pire-modal-overlay",
714
+ isOpen,
715
+ isDismissable,
716
+ onOpenChange: (o) => {
717
+ if (!o) close();
718
+ },
719
+ children: /* @__PURE__ */ jsx19(Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ jsxs16(AriaDialog2, { className: "pire-dialog", children: [
720
+ title ? /* @__PURE__ */ jsxs16("header", { className: "pire-dialog-head", children: [
721
+ /* @__PURE__ */ jsxs16("div", { style: { flex: 1, minWidth: 0 }, children: [
722
+ /* @__PURE__ */ jsx19(Heading2, { slot: "title", className: "pire-dialog-title", children: title }),
723
+ subtitle ? /* @__PURE__ */ jsx19("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
724
+ ] }),
725
+ showClose ? /* @__PURE__ */ jsx19(IconButton, { icon: "x", label: "Close", size: "sm", onPress: close }) : null
726
+ ] }) : null,
727
+ /* @__PURE__ */ jsx19("div", { className: "pire-dialog-body", children }),
728
+ footer ? /* @__PURE__ */ jsx19("footer", { className: "pire-dialog-foot", children: footer }) : null
729
+ ] }) })
730
+ }
731
+ );
732
+ }
733
+
734
+ // src/components/data/DataTable.tsx
735
+ import {
736
+ Table,
737
+ TableHeader,
738
+ TableBody,
739
+ Column,
740
+ Row,
741
+ Cell
742
+ } from "react-aria-components";
743
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
744
+ function DataTable({
745
+ columns,
746
+ rows,
747
+ density = "regular",
748
+ selectable,
749
+ selected,
750
+ onSelectionChange,
751
+ sort,
752
+ onSortChange,
753
+ onRowAction,
754
+ stickyHeader = true,
755
+ emptyLabel = "No records match the current filters.",
756
+ className,
757
+ style,
758
+ ...rest
759
+ }) {
760
+ const sortDescriptor = sort ? { column: sort.key, direction: sort.dir === "asc" ? "ascending" : "descending" } : void 0;
761
+ const handleSelection = (keys) => {
762
+ if (keys === "all") return onSelectionChange?.(rows.map((r) => r.id));
763
+ onSelectionChange?.([...keys]);
764
+ };
765
+ return /* @__PURE__ */ jsx20("div", { className: cx("pire-table-wrap", className), style, children: /* @__PURE__ */ jsxs17(
766
+ Table,
767
+ {
768
+ className: "pire-table",
769
+ "data-density": density,
770
+ "data-sticky": String(stickyHeader),
771
+ "aria-label": rest["aria-label"],
772
+ selectionMode: selectable ? "multiple" : "none",
773
+ selectedKeys: selected ? new Set(selected) : void 0,
774
+ onSelectionChange: handleSelection,
775
+ sortDescriptor,
776
+ onSortChange: (d) => onSortChange?.({ key: String(d.column), dir: d.direction === "ascending" ? "asc" : "desc" }),
777
+ onRowAction: onRowAction ? (key) => {
778
+ const row = rows.find((r) => String(r.id) === String(key));
779
+ if (row) onRowAction(row);
780
+ } : void 0,
781
+ children: [
782
+ /* @__PURE__ */ jsxs17(TableHeader, { className: "pire-thead-row", children: [
783
+ selectable ? /* @__PURE__ */ jsx20(Column, { className: "pire-th", width: 44, children: /* @__PURE__ */ jsx20(Checkbox, { slot: "selection", "aria-label": "Select all rows" }) }) : null,
784
+ columns.map((c, i) => /* @__PURE__ */ jsx20(
785
+ Column,
786
+ {
787
+ id: c.key,
788
+ className: "pire-th",
789
+ isRowHeader: i === 0 && !selectable,
790
+ allowsSorting: c.sortable,
791
+ width: c.width,
792
+ "data-align": c.numeric || c.align === "right" ? "right" : c.align,
793
+ "data-allows-sorting": c.sortable ? "true" : void 0,
794
+ children: /* @__PURE__ */ jsxs17("span", { className: "pire-th-inner", children: [
795
+ c.label,
796
+ c.sortable ? /* @__PURE__ */ jsx20(
797
+ Icon,
798
+ {
799
+ size: 12,
800
+ name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
801
+ style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
802
+ }
803
+ ) : null
804
+ ] })
805
+ },
806
+ c.key
807
+ ))
808
+ ] }),
809
+ /* @__PURE__ */ jsx20(TableBody, { renderEmptyState: () => /* @__PURE__ */ jsx20("div", { className: "pire-table-empty", children: emptyLabel }), children: rows.map((row) => /* @__PURE__ */ jsxs17(Row, { id: row.id, className: "pire-tr", "data-pressable": onRowAction ? "true" : void 0, children: [
810
+ selectable ? /* @__PURE__ */ jsx20(Cell, { className: "pire-td", children: /* @__PURE__ */ jsx20(Checkbox, { slot: "selection", "aria-label": "Select row" }) }) : null,
811
+ columns.map((c) => /* @__PURE__ */ jsx20(
812
+ Cell,
813
+ {
814
+ className: "pire-td",
815
+ "data-numeric": c.numeric ? "true" : void 0,
816
+ style: { textAlign: c.align && !c.numeric ? c.align : void 0 },
817
+ children: c.render ? c.render(row) : row[c.key]
818
+ },
819
+ c.key
820
+ ))
821
+ ] }, row.id)) })
822
+ ]
823
+ }
824
+ ) });
825
+ }
826
+
827
+ // src/components/patterns/ValueHelpDialog.tsx
828
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
829
+ function ValueHelpDialog({
830
+ isOpen,
831
+ title = "Select a record",
832
+ columns = [],
833
+ rows = [],
834
+ searchPlaceholder = "Search by ID or name",
835
+ emptyLabel,
836
+ onSelect,
837
+ onClose
838
+ }) {
839
+ const [query, setQuery] = React6.useState("");
840
+ React6.useEffect(() => {
841
+ if (isOpen) setQuery("");
842
+ }, [isOpen]);
843
+ const filtered = React6.useMemo(() => {
844
+ const q = query.trim().toLowerCase();
845
+ if (!q) return rows;
846
+ return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));
847
+ }, [rows, query]);
848
+ return /* @__PURE__ */ jsx21(
849
+ Dialog,
850
+ {
851
+ isOpen,
852
+ size: "lg",
853
+ title,
854
+ onClose,
855
+ footer: /* @__PURE__ */ jsx21(Button, { variant: "tertiary", onPress: onClose, children: "Cancel" }),
856
+ children: /* @__PURE__ */ jsxs18("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
857
+ /* @__PURE__ */ jsx21(
858
+ Input,
859
+ {
860
+ "aria-label": "Search records",
861
+ icon: "search",
862
+ type: "search",
863
+ value: query,
864
+ onChange: setQuery,
865
+ placeholder: searchPlaceholder,
866
+ autoFocus: true
867
+ }
868
+ ),
869
+ /* @__PURE__ */ jsx21(
870
+ DataTable,
871
+ {
872
+ "aria-label": typeof title === "string" ? title : "Records",
873
+ density: "condensed",
874
+ columns,
875
+ rows: filtered,
876
+ emptyLabel: emptyLabel ?? `No records match \u201C${query}\u201D.`,
877
+ onRowAction: (row) => {
878
+ onSelect?.(row);
879
+ onClose?.();
880
+ }
881
+ }
882
+ )
883
+ ] })
884
+ }
885
+ );
886
+ }
887
+
888
+ // src/components/forms/ValueHelpField.tsx
889
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
890
+ var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
891
+ function ValueHelpField({
892
+ label,
893
+ value,
894
+ onChange,
895
+ format = defaultFormat,
896
+ rows = [],
897
+ columns = [],
898
+ dialogTitle,
899
+ placeholder = "Not selected",
900
+ description,
901
+ errorMessage,
902
+ isInvalid,
903
+ isDisabled,
904
+ isRequired,
905
+ allowsClear,
906
+ className,
907
+ style
908
+ }) {
909
+ const [open, setOpen] = React7.useState(false);
910
+ return /* @__PURE__ */ jsxs19("div", { className: cx(className), style, children: [
911
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "var(--sp-2)", alignItems: "flex-end" }, children: [
912
+ /* @__PURE__ */ jsx22(
913
+ Input,
914
+ {
915
+ label,
916
+ isReadOnly: true,
917
+ isInvalid,
918
+ isDisabled,
919
+ isRequired,
920
+ value: value ? format(value) : "",
921
+ placeholder,
922
+ description,
923
+ errorMessage
924
+ }
925
+ ),
926
+ allowsClear && value ? /* @__PURE__ */ jsx22(
927
+ IconButton,
928
+ {
929
+ icon: "x",
930
+ label: "Clear selection",
931
+ variant: "outlined",
932
+ isDisabled,
933
+ onPress: () => onChange?.(null)
934
+ }
935
+ ) : null,
936
+ /* @__PURE__ */ jsx22(
937
+ IconButton,
938
+ {
939
+ icon: "search",
940
+ label: typeof label === "string" ? `Select ${label.toLowerCase()}` : "Open value help",
941
+ variant: "outlined",
942
+ isDisabled,
943
+ onPress: () => setOpen(true)
944
+ }
945
+ )
946
+ ] }),
947
+ /* @__PURE__ */ jsx22(
948
+ ValueHelpDialog,
949
+ {
950
+ isOpen: open,
951
+ onClose: () => setOpen(false),
952
+ title: dialogTitle ?? label ?? "Select a record",
953
+ columns,
954
+ rows,
955
+ onSelect: (row) => onChange?.(row)
956
+ }
957
+ )
958
+ ] });
959
+ }
960
+
961
+ // src/components/navigation/ShellBar.tsx
962
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
963
+ var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
964
+ function ShellBar({ product, monogram, title, onMenu, onSearch, actions, user, className, ...rest }) {
965
+ return /* @__PURE__ */ jsxs20("header", { className: cx("pire-shellbar", className), ...rest, children: [
966
+ onMenu ? /* @__PURE__ */ jsx23(IconButton, { icon: "menu", label: "Open navigation", variant: "inverse", size: "sm", onPress: onMenu }) : null,
967
+ monogram ? /* @__PURE__ */ jsx23("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
968
+ product ? /* @__PURE__ */ jsx23("span", { className: "pire-shellbar-product", children: product }) : null,
969
+ title ? /* @__PURE__ */ jsx23("span", { className: "pire-shellbar-title", children: title }) : null,
970
+ /* @__PURE__ */ jsx23("span", { className: "pire-shellbar-spacer" }),
971
+ onSearch ? /* @__PURE__ */ jsx23(IconButton, { icon: "search", label: "Search", variant: "inverse", size: "sm", onPress: onSearch }) : null,
972
+ actions,
973
+ user ? /* @__PURE__ */ jsx23("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
974
+ ] });
975
+ }
976
+
977
+ // src/components/navigation/SideNav.tsx
978
+ import { Button as AriaButton8 } from "react-aria-components";
979
+ import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
980
+ function SideNav({ groups, value, onChange, collapsed, footer, className, ...rest }) {
981
+ return /* @__PURE__ */ jsxs21(
982
+ "nav",
983
+ {
984
+ className: cx("pire-sidenav", className),
985
+ "data-collapsed": collapsed ? "true" : void 0,
986
+ "aria-label": "Main navigation",
987
+ ...rest,
988
+ children: [
989
+ groups.map((group, gi) => /* @__PURE__ */ jsxs21("div", { className: "pire-sidenav-group", children: [
990
+ group.label && !collapsed ? /* @__PURE__ */ jsx24("div", { className: "pire-sidenav-label", children: group.label }) : null,
991
+ group.items.map((item) => {
992
+ const selected = item.id === value;
993
+ const button = /* @__PURE__ */ jsxs21(
994
+ AriaButton8,
995
+ {
996
+ className: "pire-sidenav-item",
997
+ "data-selected": selected ? "true" : void 0,
998
+ "aria-current": selected ? "page" : void 0,
999
+ onPress: () => onChange?.(item.id),
1000
+ children: [
1001
+ item.icon ? /* @__PURE__ */ jsx24(Icon, { name: item.icon, size: 16 }) : null,
1002
+ collapsed ? null : /* @__PURE__ */ jsx24("span", { children: item.label }),
1003
+ item.count != null && !collapsed ? /* @__PURE__ */ jsx24("span", { className: "pire-sidenav-count", children: item.count }) : null
1004
+ ]
1005
+ },
1006
+ item.id
1007
+ );
1008
+ return collapsed ? /* @__PURE__ */ jsx24(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
1009
+ })
1010
+ ] }, group.label ?? gi)),
1011
+ footer ? /* @__PURE__ */ jsx24("div", { className: "pire-sidenav-footer", children: footer }) : null
1012
+ ]
1013
+ }
1014
+ );
1015
+ }
1016
+
1017
+ // src/components/navigation/Tabs.tsx
1018
+ import { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel } from "react-aria-components";
1019
+ import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
1020
+ function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
1021
+ return /* @__PURE__ */ jsxs22(
1022
+ AriaTabs,
1023
+ {
1024
+ className,
1025
+ style,
1026
+ selectedKey: value,
1027
+ defaultSelectedKey: defaultValue,
1028
+ onSelectionChange: (k) => onChange?.(String(k)),
1029
+ children: [
1030
+ /* @__PURE__ */ jsx25(TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ jsxs22(AriaTab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
1031
+ item.icon ? /* @__PURE__ */ jsx25(Icon, { name: item.icon, size: 16 }) : null,
1032
+ item.label,
1033
+ item.count != null ? /* @__PURE__ */ jsx25("span", { className: "pire-tab-count", children: item.count }) : null
1034
+ ] }) }),
1035
+ items.map((item) => /* @__PURE__ */ jsx25(TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
1036
+ ]
1037
+ }
1038
+ );
1039
+ }
1040
+
1041
+ // src/components/navigation/Breadcrumb.tsx
1042
+ import { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link } from "react-aria-components";
1043
+ import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
1044
+ function Breadcrumb({ items, onNavigate, className, style }) {
1045
+ return /* @__PURE__ */ jsx26(
1046
+ AriaBreadcrumbs,
1047
+ {
1048
+ className: cx("pire-breadcrumbs", className),
1049
+ style,
1050
+ items,
1051
+ onAction: (key) => onNavigate?.(String(key)),
1052
+ children: (item) => {
1053
+ const last = items[items.length - 1] === item;
1054
+ return /* @__PURE__ */ jsxs23(AriaBreadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
1055
+ last ? item.label : /* @__PURE__ */ jsx26(Link, { href: item.href, children: item.label }),
1056
+ last ? null : /* @__PURE__ */ jsx26(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
1057
+ ] });
1058
+ }
1059
+ }
1060
+ );
1061
+ }
1062
+
1063
+ // src/components/navigation/Pagination.tsx
1064
+ import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
1065
+ function Pagination({
1066
+ page = 1,
1067
+ pageSize = 25,
1068
+ total = 0,
1069
+ onPageChange,
1070
+ onPageSizeChange,
1071
+ pageSizes = [25, 50, 100],
1072
+ className,
1073
+ style
1074
+ }) {
1075
+ const pages = Math.max(1, Math.ceil(total / pageSize));
1076
+ const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
1077
+ const to = Math.min(total, page * pageSize);
1078
+ return /* @__PURE__ */ jsxs24("nav", { className: cx("pire-pagination", className), style, "aria-label": "Pagination", children: [
1079
+ /* @__PURE__ */ jsxs24("span", { className: "pire-pagination-count", children: [
1080
+ from.toLocaleString(),
1081
+ "\u2013",
1082
+ to.toLocaleString(),
1083
+ " of ",
1084
+ total.toLocaleString()
1085
+ ] }),
1086
+ /* @__PURE__ */ jsx27(
1087
+ IconButton,
1088
+ {
1089
+ icon: "chevron-left",
1090
+ label: "Previous page",
1091
+ size: "sm",
1092
+ variant: "outlined",
1093
+ isDisabled: page <= 1,
1094
+ onPress: () => onPageChange?.(page - 1)
1095
+ }
1096
+ ),
1097
+ /* @__PURE__ */ jsxs24("span", { className: "pire-pagination-count", "aria-live": "polite", children: [
1098
+ "Page ",
1099
+ page,
1100
+ " of ",
1101
+ pages
1102
+ ] }),
1103
+ /* @__PURE__ */ jsx27(
1104
+ IconButton,
1105
+ {
1106
+ icon: "chevron-right",
1107
+ label: "Next page",
1108
+ size: "sm",
1109
+ variant: "outlined",
1110
+ isDisabled: page >= pages,
1111
+ onPress: () => onPageChange?.(page + 1)
1112
+ }
1113
+ ),
1114
+ onPageSizeChange ? /* @__PURE__ */ jsx27(
1115
+ Select,
1116
+ {
1117
+ "aria-label": "Rows per page",
1118
+ size: "sm",
1119
+ fullWidth: false,
1120
+ value: String(pageSize),
1121
+ options: pageSizes.map((s) => ({ value: String(s), label: `${s} rows` })),
1122
+ onChange: (v) => onPageSizeChange(Number(v)),
1123
+ style: { width: 120 }
1124
+ }
1125
+ ) : null
1126
+ ] });
1127
+ }
1128
+
1129
+ // src/components/feedback/InlineMessage.tsx
1130
+ import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
1131
+ var KIND_ICON = {
1132
+ info: "info",
1133
+ success: "check-circle-2",
1134
+ warning: "alert-triangle",
1135
+ error: "alert-octagon"
1136
+ };
1137
+ function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
1138
+ const assertive = kind === "error" || kind === "warning";
1139
+ return /* @__PURE__ */ jsxs25(
1140
+ "div",
1141
+ {
1142
+ className: cx("pire-msg", className),
1143
+ "data-kind": kind,
1144
+ role: assertive ? "alert" : "status",
1145
+ "aria-live": assertive ? "assertive" : "polite",
1146
+ ...rest,
1147
+ children: [
1148
+ /* @__PURE__ */ jsx28(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
1149
+ /* @__PURE__ */ jsxs25("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
1150
+ title ? /* @__PURE__ */ jsx28("span", { className: "pire-msg-title", children: title }) : null,
1151
+ children ? /* @__PURE__ */ jsx28("span", { className: "pire-msg-body", children }) : null,
1152
+ action
1153
+ ] }),
1154
+ onClose ? /* @__PURE__ */ jsx28(IconButton, { icon: "x", label: "Dismiss message", size: "sm", onPress: onClose }) : null
1155
+ ]
1156
+ }
1157
+ );
1158
+ }
1159
+
1160
+ // src/components/feedback/ProgressBar.tsx
1161
+ import { ProgressBar as AriaProgressBar, Label as Label7 } from "react-aria-components";
1162
+ import { Fragment as Fragment2, jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
1163
+ function ProgressBar({
1164
+ value = 0,
1165
+ minValue = 0,
1166
+ maxValue = 100,
1167
+ label,
1168
+ showValue = true,
1169
+ isIndeterminate,
1170
+ status = "informative",
1171
+ size = "md",
1172
+ className,
1173
+ style
1174
+ }) {
1175
+ return /* @__PURE__ */ jsx29(
1176
+ AriaProgressBar,
1177
+ {
1178
+ className: cx("pire-progress", className),
1179
+ "data-status": status,
1180
+ "data-size": size,
1181
+ value,
1182
+ minValue,
1183
+ maxValue,
1184
+ isIndeterminate,
1185
+ style,
1186
+ children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs26(Fragment2, { children: [
1187
+ label || showValue ? /* @__PURE__ */ jsxs26("div", { className: "pire-progress-head", children: [
1188
+ label ? /* @__PURE__ */ jsx29(Label7, { children: label }) : /* @__PURE__ */ jsx29("span", {}),
1189
+ showValue && !isIndeterminate ? /* @__PURE__ */ jsx29("span", { className: "pire-numeric", children: valueText }) : null
1190
+ ] }) : null,
1191
+ /* @__PURE__ */ jsx29("div", { className: "pire-progress-track", children: /* @__PURE__ */ jsx29("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
1192
+ ] })
1193
+ }
1194
+ );
1195
+ }
1196
+
1197
+ // src/components/feedback/Toast.tsx
1198
+ import * as React8 from "react";
1199
+ import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
1200
+ var KIND_ICON2 = {
1201
+ info: "info",
1202
+ success: "check-circle-2",
1203
+ warning: "alert-triangle",
1204
+ error: "alert-octagon"
1205
+ };
1206
+ function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
1207
+ return /* @__PURE__ */ jsxs27(
1208
+ "div",
1209
+ {
1210
+ className: cx("pire-toast", className),
1211
+ "data-position": position,
1212
+ role: kind === "error" ? "alert" : "status",
1213
+ "aria-live": kind === "error" ? "assertive" : "polite",
1214
+ ...rest,
1215
+ children: [
1216
+ /* @__PURE__ */ jsx30(Icon, { name: KIND_ICON2[kind], size: 16 }),
1217
+ /* @__PURE__ */ jsx30("span", { style: { flex: 1 }, children }),
1218
+ onClose ? /* @__PURE__ */ jsx30(IconButton, { icon: "x", label: "Dismiss", size: "sm", variant: "inverse", onPress: onClose }) : null
1219
+ ]
1220
+ }
1221
+ );
1222
+ }
1223
+ var ToastContext = React8.createContext(null);
1224
+ function ToastProvider({ children, timeout = 6e3 }) {
1225
+ const [toasts, setToasts] = React8.useState([]);
1226
+ const close = React8.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
1227
+ const add = React8.useCallback((toast) => {
1228
+ const id = Math.random().toString(36).slice(2);
1229
+ setToasts((t) => [...t, { ...toast, id }]);
1230
+ const ms = toast.timeout ?? timeout;
1231
+ if (ms > 0) setTimeout(() => close(id), ms);
1232
+ return id;
1233
+ }, [close, timeout]);
1234
+ const value = React8.useMemo(() => ({ add, close }), [add, close]);
1235
+ return /* @__PURE__ */ jsxs27(ToastContext.Provider, { value, children: [
1236
+ children,
1237
+ /* @__PURE__ */ jsx30("div", { className: "pire-toast-region", role: "region", "aria-label": "Notifications", children: toasts.map((t) => /* @__PURE__ */ jsx30(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
1238
+ ] });
1239
+ }
1240
+ function useToast() {
1241
+ const ctx = React8.useContext(ToastContext);
1242
+ if (!ctx) throw new Error("useToast must be used inside <ToastProvider>");
1243
+ return ctx;
1244
+ }
1245
+
1246
+ // src/components/data/KpiTile.tsx
1247
+ import { Button as AriaButton9 } from "react-aria-components";
1248
+ import { Fragment as Fragment3, jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
1249
+ function KpiTile({
1250
+ label,
1251
+ value,
1252
+ unit,
1253
+ delta,
1254
+ deltaDirection,
1255
+ deltaTone,
1256
+ footnote,
1257
+ icon,
1258
+ status = "neutral",
1259
+ onPress,
1260
+ className,
1261
+ style
1262
+ }) {
1263
+ const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
1264
+ const body = /* @__PURE__ */ jsxs28(Fragment3, { children: [
1265
+ /* @__PURE__ */ jsxs28("span", { className: "pire-kpi-label", children: [
1266
+ icon ? /* @__PURE__ */ jsx31(Icon, { name: icon, size: 16 }) : null,
1267
+ label
1268
+ ] }),
1269
+ /* @__PURE__ */ jsxs28("span", { className: "pire-kpi-value", children: [
1270
+ value,
1271
+ unit ? /* @__PURE__ */ jsx31("span", { className: "pire-kpi-unit", children: unit }) : null
1272
+ ] }),
1273
+ delta ? /* @__PURE__ */ jsxs28("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
1274
+ deltaDirection ? /* @__PURE__ */ jsx31(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
1275
+ delta
1276
+ ] }) : null,
1277
+ footnote ? /* @__PURE__ */ jsx31("span", { className: "pire-kpi-foot", children: footnote }) : null
1278
+ ] });
1279
+ const props = { className: cx("pire-kpi", className), "data-status": status, style };
1280
+ return onPress ? /* @__PURE__ */ jsx31(AriaButton9, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ jsx31("div", { ...props, children: body });
1281
+ }
1282
+
1283
+ // src/components/data/ObjectHeader.tsx
1284
+ import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
1285
+ function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
1286
+ return /* @__PURE__ */ jsxs29("header", { className: cx("pire-objheader", className), ...rest, children: [
1287
+ breadcrumb,
1288
+ /* @__PURE__ */ jsxs29("div", { className: "pire-objheader-row", children: [
1289
+ /* @__PURE__ */ jsxs29("div", { style: { minWidth: 0 }, children: [
1290
+ /* @__PURE__ */ jsx32("h1", { className: "pire-objheader-title", children: title }),
1291
+ subtitle || id ? /* @__PURE__ */ jsxs29("div", { className: "pire-objheader-sub", children: [
1292
+ subtitle,
1293
+ id ? /* @__PURE__ */ jsx32("span", { className: "pire-objheader-id", children: id }) : null
1294
+ ] }) : null
1295
+ ] }),
1296
+ badge,
1297
+ actions ? /* @__PURE__ */ jsx32("div", { className: "pire-objheader-actions", children: actions }) : null
1298
+ ] }),
1299
+ facts?.length ? /* @__PURE__ */ jsx32("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs29("div", { children: [
1300
+ /* @__PURE__ */ jsx32("dt", { className: "pire-fact-label", children: fact.label }),
1301
+ /* @__PURE__ */ jsx32("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
1302
+ ] }, fact.label)) }) : null
1303
+ ] });
1304
+ }
1305
+
1306
+ // src/components/data/FilterBar.tsx
1307
+ import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
1308
+ function FilterBar({
1309
+ children,
1310
+ activeFilters = [],
1311
+ onRemoveFilter,
1312
+ onClear,
1313
+ onGo,
1314
+ resultLabel,
1315
+ actions,
1316
+ className,
1317
+ ...rest
1318
+ }) {
1319
+ return /* @__PURE__ */ jsxs30("section", { className: cx("pire-filterbar", className), "aria-label": "Filters", ...rest, children: [
1320
+ /* @__PURE__ */ jsxs30("div", { className: "pire-filterbar-controls", children: [
1321
+ children,
1322
+ onGo ? /* @__PURE__ */ jsx33(Button, { variant: "primary", onPress: onGo, children: "Go" }) : null
1323
+ ] }),
1324
+ activeFilters.length || resultLabel || actions ? /* @__PURE__ */ jsxs30("div", { className: "pire-filterbar-foot", children: [
1325
+ activeFilters.map((filter) => /* @__PURE__ */ jsx33(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
1326
+ activeFilters.length && onClear ? /* @__PURE__ */ jsx33(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: "Clear all" }) : null,
1327
+ resultLabel ? /* @__PURE__ */ jsx33("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
1328
+ actions ? /* @__PURE__ */ jsx33("div", { className: "pire-filterbar-actions", children: actions }) : null
1329
+ ] }) : null
1330
+ ] });
1331
+ }
1332
+
1333
+ // src/components/data/DescriptionList.tsx
1334
+ import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
1335
+ function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
1336
+ return /* @__PURE__ */ jsx34(
1337
+ "dl",
1338
+ {
1339
+ className: cx("pire-dl", className),
1340
+ "data-layout": layout,
1341
+ style: { ...layout === "grid" ? { "--pire-dl-cols": columns } : null, ...style },
1342
+ ...rest,
1343
+ children: items.map((item, i) => /* @__PURE__ */ jsxs31("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
1344
+ /* @__PURE__ */ jsxs31("dt", { className: "pire-dl-term", children: [
1345
+ item.label,
1346
+ item.hint
1347
+ ] }),
1348
+ /* @__PURE__ */ jsx34("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
1349
+ ] }, i))
1350
+ }
1351
+ );
1352
+ }
1353
+
1354
+ // src/components/data/Timeline.tsx
1355
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
1356
+ function Timeline({ entries, reverse = false, className, ...rest }) {
1357
+ const list = reverse ? [...entries].reverse() : entries;
1358
+ return /* @__PURE__ */ jsx35("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ jsxs32("li", { className: "pire-timeline-item", children: [
1359
+ /* @__PURE__ */ jsx35("span", { className: "pire-timeline-time", children: entry.time }),
1360
+ /* @__PURE__ */ jsx35("span", { className: "pire-timeline-text", children: entry.event }),
1361
+ entry.actor ? /* @__PURE__ */ jsx35("span", { className: "pire-timeline-actor", children: entry.actor }) : null
1362
+ ] }, entry.id ?? i)) });
1363
+ }
1364
+
1365
+ // src/components/data/LinkList.tsx
1366
+ import { Button as AriaButton10 } from "react-aria-components";
1367
+ import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
1368
+ function LinkList({ items, onSelect, className, ...rest }) {
1369
+ return /* @__PURE__ */ jsx36("div", { className: cx("pire-linklist", className), role: "list", ...rest, children: items.map((item) => /* @__PURE__ */ jsxs33(AriaButton10, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
1370
+ item.icon ? /* @__PURE__ */ jsx36(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
1371
+ item.key ? /* @__PURE__ */ jsx36("span", { className: "pire-linklist-key", children: item.key }) : null,
1372
+ item.text ? /* @__PURE__ */ jsx36("span", { className: "pire-linklist-text", children: item.text }) : null,
1373
+ item.trailing
1374
+ ] }, item.id)) });
1375
+ }
1376
+
1377
+ // src/components/layout/PageHeader.tsx
1378
+ import { jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
1379
+ function PageHeader({ title, subtitle, actions, className, ...rest }) {
1380
+ return /* @__PURE__ */ jsxs34("header", { className: cx("pire-pageheader", className), ...rest, children: [
1381
+ /* @__PURE__ */ jsxs34("div", { style: { minWidth: 0 }, children: [
1382
+ /* @__PURE__ */ jsx37("h1", { className: "pire-pageheader-title", children: title }),
1383
+ subtitle ? /* @__PURE__ */ jsx37("p", { className: "pire-pageheader-sub", children: subtitle }) : null
1384
+ ] }),
1385
+ actions ? /* @__PURE__ */ jsx37("div", { className: "pire-pageheader-actions", children: actions }) : null
1386
+ ] });
1387
+ }
1388
+
1389
+ // src/components/layout/SectionHeader.tsx
1390
+ import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
1391
+ function SectionHeader({ title, meta, actions, className, ...rest }) {
1392
+ return /* @__PURE__ */ jsxs35("div", { className: cx("pire-sectionhead", className), ...rest, children: [
1393
+ /* @__PURE__ */ jsx38("span", { className: "pire-eyebrow", children: title }),
1394
+ meta ? /* @__PURE__ */ jsx38("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
1395
+ actions ? /* @__PURE__ */ jsx38("div", { className: "pire-sectionhead-actions", children: actions }) : null
1396
+ ] });
1397
+ }
1398
+
1399
+ // src/components/layout/SelectionBar.tsx
1400
+ import { jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
1401
+ function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
1402
+ if (!count) return null;
1403
+ return /* @__PURE__ */ jsxs36("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
1404
+ /* @__PURE__ */ jsxs36("span", { className: "pire-selectionbar-count", children: [
1405
+ count.toLocaleString(),
1406
+ " ",
1407
+ noun,
1408
+ count === 1 ? "" : "s",
1409
+ " selected"
1410
+ ] }),
1411
+ children ? /* @__PURE__ */ jsx39("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
1412
+ actions ? /* @__PURE__ */ jsx39("div", { className: "pire-selectionbar-actions", children: actions }) : null
1413
+ ] });
1414
+ }
1415
+
1416
+ // src/components/layout/FooterBar.tsx
1417
+ import { jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
1418
+ function FooterBar({ note, actions, children, className, ...rest }) {
1419
+ return /* @__PURE__ */ jsxs37("footer", { className: cx("pire-footerbar", className), ...rest, children: [
1420
+ note ? /* @__PURE__ */ jsx40("span", { className: "pire-footerbar-note", children: note }) : null,
1421
+ children,
1422
+ actions ? /* @__PURE__ */ jsx40("div", { className: "pire-footerbar-actions", children: actions }) : null
1423
+ ] });
1424
+ }
1425
+
1426
+ // src/components/patterns/ConfirmDialog.tsx
1427
+ import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
1428
+ function ConfirmDialog({
1429
+ isOpen,
1430
+ title,
1431
+ subtitle,
1432
+ consequence,
1433
+ children,
1434
+ confirmLabel = "Confirm",
1435
+ cancelLabel = "Cancel",
1436
+ tone = "primary",
1437
+ isBusy,
1438
+ onConfirm,
1439
+ onCancel
1440
+ }) {
1441
+ return /* @__PURE__ */ jsxs38(
1442
+ Dialog,
1443
+ {
1444
+ isOpen,
1445
+ size: "sm",
1446
+ title,
1447
+ subtitle,
1448
+ onClose: onCancel,
1449
+ isDismissable: !isBusy,
1450
+ showClose: false,
1451
+ footer: /* @__PURE__ */ jsxs38(Fragment4, { children: [
1452
+ /* @__PURE__ */ jsx41(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
1453
+ /* @__PURE__ */ jsx41(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
1454
+ ] }),
1455
+ children: [
1456
+ consequence ? /* @__PURE__ */ jsx41(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
1457
+ children
1458
+ ]
1459
+ }
1460
+ );
1461
+ }
1462
+
1463
+ // src/components/patterns/SidePanel.tsx
1464
+ import { ModalOverlay as ModalOverlay2, Modal as Modal2, Dialog as AriaDialog3, Heading as Heading3 } from "react-aria-components";
1465
+ import { jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
1466
+ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
1467
+ return /* @__PURE__ */ jsx42(
1468
+ ModalOverlay2,
1469
+ {
1470
+ className: "pire-sidepanel-overlay",
1471
+ isOpen,
1472
+ isDismissable: true,
1473
+ onOpenChange: (o) => {
1474
+ if (!o) onClose?.();
1475
+ },
1476
+ children: /* @__PURE__ */ jsx42(Modal2, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ jsxs39(AriaDialog3, { className: "pire-dialog", style: { height: "100%" }, children: [
1477
+ /* @__PURE__ */ jsxs39("header", { className: "pire-dialog-head", children: [
1478
+ /* @__PURE__ */ jsxs39("div", { style: { flex: 1, minWidth: 0 }, children: [
1479
+ /* @__PURE__ */ jsx42(Heading3, { slot: "title", className: "pire-dialog-title", children: title }),
1480
+ subtitle ? /* @__PURE__ */ jsx42("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
1481
+ ] }),
1482
+ /* @__PURE__ */ jsx42(IconButton, { icon: "x", label: "Close panel", size: "sm", onPress: onClose })
1483
+ ] }),
1484
+ /* @__PURE__ */ jsx42("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
1485
+ footer ? /* @__PURE__ */ jsx42("footer", { className: "pire-dialog-foot", children: footer }) : null
1486
+ ] }) })
1487
+ }
1488
+ );
1489
+ }
1490
+
1491
+ // src/components/patterns/EmptyState.tsx
1492
+ import { jsx as jsx43, jsxs as jsxs40 } from "react/jsx-runtime";
1493
+ function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
1494
+ return /* @__PURE__ */ jsxs40("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
1495
+ /* @__PURE__ */ jsx43(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
1496
+ title ? /* @__PURE__ */ jsx43("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
1497
+ children ? /* @__PURE__ */ jsx43("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
1498
+ action
1499
+ ] });
1500
+ }
1501
+
1502
+ // src/index.ts
1503
+ import { DialogTrigger, MenuTrigger, Menu, MenuItem, Popover as Popover4, Separator, I18nProvider } from "react-aria-components";
1504
+ export {
1505
+ Avatar,
1506
+ Badge,
1507
+ Breadcrumb,
1508
+ Button,
1509
+ Card,
1510
+ Checkbox,
1511
+ ComboBox,
1512
+ ConfirmDialog,
1513
+ DataTable,
1514
+ DatePicker,
1515
+ DescriptionList,
1516
+ Dialog,
1517
+ DialogTrigger,
1518
+ EmptyState,
1519
+ FilterBar,
1520
+ FooterBar,
1521
+ FormField,
1522
+ I18nProvider,
1523
+ Icon,
1524
+ IconButton,
1525
+ InlineMessage,
1526
+ Input,
1527
+ KpiTile,
1528
+ LinkList,
1529
+ Menu,
1530
+ MenuItem,
1531
+ MenuTrigger,
1532
+ NumberField,
1533
+ ObjectHeader,
1534
+ PageHeader,
1535
+ Pagination,
1536
+ Popover4 as Popover,
1537
+ ProgressBar,
1538
+ Radio,
1539
+ RadioGroup,
1540
+ SectionHeader,
1541
+ SegmentedControl,
1542
+ Select,
1543
+ SelectionBar,
1544
+ Separator,
1545
+ ShellBar,
1546
+ SideNav,
1547
+ SidePanel,
1548
+ Switch,
1549
+ Tabs,
1550
+ Tag,
1551
+ Timeline,
1552
+ Toast,
1553
+ ToastProvider,
1554
+ Tooltip,
1555
+ ValueHelpDialog,
1556
+ ValueHelpField,
1557
+ configureIcons,
1558
+ useToast
1559
+ };
1560
+ //# sourceMappingURL=index.js.map