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