@orianatech/pire 0.5.0 → 0.7.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/dist/components/core/Heading.d.cts +15 -0
- package/dist/components/core/Heading.d.ts +16 -0
- package/dist/components/core/Heading.d.ts.map +1 -0
- package/dist/components/core/IconButton.d.cts +12 -0
- package/dist/components/core/IconButton.d.ts +12 -0
- package/dist/components/core/IconButton.d.ts.map +1 -1
- package/dist/components/core/Link.d.cts +13 -0
- package/dist/components/core/Link.d.ts +14 -0
- package/dist/components/core/Link.d.ts.map +1 -0
- package/dist/components/core/Separator.d.cts +12 -0
- package/dist/components/core/Separator.d.ts +13 -0
- package/dist/components/core/Separator.d.ts.map +1 -0
- package/dist/components/core/Text.d.cts +29 -0
- package/dist/components/core/Text.d.ts +30 -0
- package/dist/components/core/Text.d.ts.map +1 -0
- package/dist/components/data/DataTable.d.cts +7 -1
- package/dist/components/data/DataTable.d.ts +7 -1
- package/dist/components/data/DataTable.d.ts.map +1 -1
- package/dist/components/data/FilterBar.d.cts +7 -1
- package/dist/components/data/FilterBar.d.ts +7 -1
- package/dist/components/data/FilterBar.d.ts.map +1 -1
- package/dist/components/feedback/Dialog.d.ts.map +1 -1
- package/dist/components/feedback/InlineMessage.d.ts.map +1 -1
- package/dist/components/feedback/Toast.d.ts.map +1 -1
- package/dist/components/forms/ComboBox.d.ts.map +1 -1
- package/dist/components/forms/DatePicker.d.ts.map +1 -1
- package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
- package/dist/components/forms/NumberField.d.ts.map +1 -1
- package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
- package/dist/components/layout/PageBand.d.cts +15 -0
- package/dist/components/layout/PageBand.d.ts +16 -0
- package/dist/components/layout/PageBand.d.ts.map +1 -0
- package/dist/components/navigation/Menu.d.cts +39 -0
- package/dist/components/navigation/Menu.d.ts +40 -0
- package/dist/components/navigation/Menu.d.ts.map +1 -0
- package/dist/components/navigation/Pagination.d.ts.map +1 -1
- package/dist/components/navigation/SideNav.d.ts.map +1 -1
- package/dist/components/patterns/SidePanel.d.ts.map +1 -1
- package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
- package/dist/components.css +85 -0
- package/dist/i18n/PireIntlProvider.d.cts +21 -0
- package/dist/i18n/PireIntlProvider.d.ts +22 -0
- package/dist/i18n/PireIntlProvider.d.ts.map +1 -0
- package/dist/i18n/messages.d.cts +66 -0
- package/dist/i18n/messages.d.ts +67 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/index.cjs +830 -488
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +797 -462
- package/dist/index.js.map +1 -1
- package/dist/tokens/base.css +3 -0
- package/dist/tokens/typography.css +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -252,9 +252,22 @@ function Tooltip({ label, placement = "top", delay = 500, children }) {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
// src/components/core/IconButton.tsx
|
|
255
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
256
|
-
var IconButton = React2.forwardRef(function IconButton2({
|
|
257
|
-
|
|
255
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
256
|
+
var IconButton = React2.forwardRef(function IconButton2({
|
|
257
|
+
icon,
|
|
258
|
+
label,
|
|
259
|
+
size = "md",
|
|
260
|
+
variant = "tertiary",
|
|
261
|
+
selected,
|
|
262
|
+
hideTooltip,
|
|
263
|
+
count,
|
|
264
|
+
countMax = 9,
|
|
265
|
+
countVariant = "number",
|
|
266
|
+
className,
|
|
267
|
+
...rest
|
|
268
|
+
}, ref) {
|
|
269
|
+
const showsCount = count != null && count > 0;
|
|
270
|
+
const button = /* @__PURE__ */ jsxs3(
|
|
258
271
|
AriaButton2,
|
|
259
272
|
{
|
|
260
273
|
ref,
|
|
@@ -264,15 +277,19 @@ var IconButton = React2.forwardRef(function IconButton2({ icon, label, size = "m
|
|
|
264
277
|
"data-size": size,
|
|
265
278
|
"data-variant": variant,
|
|
266
279
|
"data-selected": selected ? "true" : void 0,
|
|
280
|
+
"data-has-count": showsCount ? "true" : void 0,
|
|
267
281
|
...rest,
|
|
268
|
-
children:
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsx4(Icon, { name: icon, size: size === "lg" ? 20 : 16 }),
|
|
284
|
+
showsCount ? /* @__PURE__ */ jsx4("span", { className: "pire-iconbtn-count", "data-variant": countVariant, "aria-hidden": "true", children: countVariant === "number" ? count > countMax ? `${countMax}+` : count : null }) : null
|
|
285
|
+
]
|
|
269
286
|
}
|
|
270
287
|
);
|
|
271
288
|
return hideTooltip ? button : /* @__PURE__ */ jsx4(Tooltip, { label, children: button });
|
|
272
289
|
});
|
|
273
290
|
|
|
274
291
|
// src/components/core/Badge.tsx
|
|
275
|
-
import { jsx as jsx5, jsxs as
|
|
292
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
276
293
|
var STATUS_ICON = {
|
|
277
294
|
positive: "check-circle-2",
|
|
278
295
|
critical: "alert-triangle",
|
|
@@ -281,7 +298,7 @@ var STATUS_ICON = {
|
|
|
281
298
|
neutral: "circle"
|
|
282
299
|
};
|
|
283
300
|
function Badge({ children, status = "neutral", showIcon = true, className, ...rest }) {
|
|
284
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ jsxs4("span", { className: cx("pire-badge", className), "data-status": status, ...rest, children: [
|
|
285
302
|
showIcon ? /* @__PURE__ */ jsx5(Icon, { name: STATUS_ICON[status], size: 12 }) : null,
|
|
286
303
|
children
|
|
287
304
|
] });
|
|
@@ -289,9 +306,9 @@ function Badge({ children, status = "neutral", showIcon = true, className, ...re
|
|
|
289
306
|
|
|
290
307
|
// src/components/core/Tag.tsx
|
|
291
308
|
import { Button as AriaButton3 } from "react-aria-components";
|
|
292
|
-
import { jsx as jsx6, jsxs as
|
|
309
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
293
310
|
function Tag({ children, onRemove, isDisabled, className, ...rest }) {
|
|
294
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ jsxs5("span", { className: cx("pire-tag", className), "data-disabled": isDisabled ? "true" : void 0, ...rest, children: [
|
|
295
312
|
children,
|
|
296
313
|
onRemove ? /* @__PURE__ */ jsx6(
|
|
297
314
|
AriaButton3,
|
|
@@ -307,12 +324,12 @@ function Tag({ children, onRemove, isDisabled, className, ...rest }) {
|
|
|
307
324
|
}
|
|
308
325
|
|
|
309
326
|
// src/components/core/Card.tsx
|
|
310
|
-
import { jsx as jsx7, jsxs as
|
|
327
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
311
328
|
function Card({ title, subtitle, icon, actions, footer, interactive, children, className, ...rest }) {
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
title || actions ? /* @__PURE__ */
|
|
329
|
+
return /* @__PURE__ */ jsxs6("section", { className: cx("pire-card", className), "data-interactive": interactive ? "true" : void 0, ...rest, children: [
|
|
330
|
+
title || actions ? /* @__PURE__ */ jsxs6("header", { className: "pire-card-head", children: [
|
|
314
331
|
icon ? /* @__PURE__ */ jsx7(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
|
|
315
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ jsxs6("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
316
333
|
/* @__PURE__ */ jsx7("h3", { className: "pire-card-title", children: title }),
|
|
317
334
|
subtitle ? /* @__PURE__ */ jsx7("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
318
335
|
] }),
|
|
@@ -343,7 +360,7 @@ function Avatar({ name, size = "md", src, className, ...rest }) {
|
|
|
343
360
|
// src/components/core/SegmentedControl.tsx
|
|
344
361
|
import * as React4 from "react";
|
|
345
362
|
import { ToggleButtonGroup, ToggleButton } from "react-aria-components";
|
|
346
|
-
import { jsx as jsx9, jsxs as
|
|
363
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
347
364
|
function SegmentedControl({
|
|
348
365
|
options,
|
|
349
366
|
value,
|
|
@@ -370,7 +387,7 @@ function SegmentedControl({
|
|
|
370
387
|
const first = [...keys][0];
|
|
371
388
|
if (first != null) onChange?.(String(first));
|
|
372
389
|
},
|
|
373
|
-
children: options.map((option) => /* @__PURE__ */
|
|
390
|
+
children: options.map((option) => /* @__PURE__ */ jsxs7(
|
|
374
391
|
ToggleButton,
|
|
375
392
|
{
|
|
376
393
|
id: option.id,
|
|
@@ -388,25 +405,131 @@ function SegmentedControl({
|
|
|
388
405
|
);
|
|
389
406
|
}
|
|
390
407
|
|
|
408
|
+
// src/components/core/Text.tsx
|
|
409
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
410
|
+
function Text({
|
|
411
|
+
size = "body",
|
|
412
|
+
color = "primary",
|
|
413
|
+
weight = "regular",
|
|
414
|
+
numeric,
|
|
415
|
+
eyebrow,
|
|
416
|
+
truncate,
|
|
417
|
+
elementType: Wrapper = "p",
|
|
418
|
+
className,
|
|
419
|
+
style,
|
|
420
|
+
...rest
|
|
421
|
+
}) {
|
|
422
|
+
const lineClamp = typeof truncate === "number" ? truncate : truncate ? 1 : void 0;
|
|
423
|
+
const clampStyle = lineClamp == null ? style : { ["--pire-text-clamp"]: lineClamp, ...style };
|
|
424
|
+
return /* @__PURE__ */ jsx10(
|
|
425
|
+
Wrapper,
|
|
426
|
+
{
|
|
427
|
+
className: cx("pire-text", className),
|
|
428
|
+
"data-size": size,
|
|
429
|
+
"data-color": color,
|
|
430
|
+
"data-weight": weight === "strong" ? "strong" : void 0,
|
|
431
|
+
"data-numeric": numeric ? "true" : void 0,
|
|
432
|
+
"data-eyebrow": eyebrow ? "true" : void 0,
|
|
433
|
+
"data-truncate": lineClamp != null ? "true" : void 0,
|
|
434
|
+
style: clampStyle,
|
|
435
|
+
...rest
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
function Strong({ className, ...rest }) {
|
|
440
|
+
return /* @__PURE__ */ jsx10(Text, { elementType: "span", weight: "strong", className, ...rest });
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// src/components/core/Heading.tsx
|
|
444
|
+
import { Heading as AriaHeading } from "react-aria-components";
|
|
445
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
446
|
+
function Heading({
|
|
447
|
+
level = 2,
|
|
448
|
+
size,
|
|
449
|
+
color = "primary",
|
|
450
|
+
truncate,
|
|
451
|
+
className,
|
|
452
|
+
style,
|
|
453
|
+
...rest
|
|
454
|
+
}) {
|
|
455
|
+
const lineClamp = typeof truncate === "number" ? truncate : truncate ? 1 : void 0;
|
|
456
|
+
const clampStyle = lineClamp == null ? style : { ["--pire-text-clamp"]: lineClamp, ...style };
|
|
457
|
+
return /* @__PURE__ */ jsx11(
|
|
458
|
+
AriaHeading,
|
|
459
|
+
{
|
|
460
|
+
level,
|
|
461
|
+
className: cx("pire-heading", className),
|
|
462
|
+
"data-size": size ?? `h${level}`,
|
|
463
|
+
"data-color": color,
|
|
464
|
+
"data-truncate": lineClamp != null ? "true" : void 0,
|
|
465
|
+
style: clampStyle,
|
|
466
|
+
...rest
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// src/components/core/Link.tsx
|
|
472
|
+
import { Link as AriaLink } from "react-aria-components";
|
|
473
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
474
|
+
function Link({ children, size, isExternal, className, rel, ...rest }) {
|
|
475
|
+
return /* @__PURE__ */ jsxs8(
|
|
476
|
+
AriaLink,
|
|
477
|
+
{
|
|
478
|
+
className: cx("pire-link", className),
|
|
479
|
+
"data-size": size,
|
|
480
|
+
"data-external": isExternal ? "true" : void 0,
|
|
481
|
+
rel: isExternal ? rel ?? "noopener noreferrer" : rel,
|
|
482
|
+
...rest,
|
|
483
|
+
children: [
|
|
484
|
+
children,
|
|
485
|
+
isExternal ? /* @__PURE__ */ jsx12(Icon, { name: "external-link", size: 12, className: "pire-link-external" }) : null
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// src/components/core/Separator.tsx
|
|
492
|
+
import { Separator as AriaSeparator } from "react-aria-components";
|
|
493
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
494
|
+
function Separator({
|
|
495
|
+
orientation = "horizontal",
|
|
496
|
+
emphasis = "default",
|
|
497
|
+
spacing = "md",
|
|
498
|
+
className,
|
|
499
|
+
...rest
|
|
500
|
+
}) {
|
|
501
|
+
return /* @__PURE__ */ jsx13(
|
|
502
|
+
AriaSeparator,
|
|
503
|
+
{
|
|
504
|
+
orientation,
|
|
505
|
+
className: cx("pire-separator", className),
|
|
506
|
+
"data-orientation": orientation,
|
|
507
|
+
"data-emphasis": emphasis,
|
|
508
|
+
"data-spacing": spacing,
|
|
509
|
+
...rest
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
391
514
|
// src/components/forms/FormField.tsx
|
|
392
|
-
import { jsx as
|
|
515
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
393
516
|
function FormField({ label, htmlFor, isRequired, hint, error, layout = "stacked", children, className, ...rest }) {
|
|
394
|
-
return /* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
517
|
+
return /* @__PURE__ */ jsxs9("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
|
|
518
|
+
/* @__PURE__ */ jsxs9("label", { className: "pire-field-label", htmlFor, children: [
|
|
396
519
|
label,
|
|
397
|
-
isRequired ? /* @__PURE__ */
|
|
520
|
+
isRequired ? /* @__PURE__ */ jsx14("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
398
521
|
] }),
|
|
399
522
|
children,
|
|
400
|
-
error ? /* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
523
|
+
error ? /* @__PURE__ */ jsxs9("span", { className: "pire-field-error", role: "alert", children: [
|
|
524
|
+
/* @__PURE__ */ jsx14(Icon, { name: "alert-circle", size: 12 }),
|
|
402
525
|
error
|
|
403
|
-
] }) : hint ? /* @__PURE__ */
|
|
526
|
+
] }) : hint ? /* @__PURE__ */ jsx14("span", { className: "pire-field-hint", children: hint }) : null
|
|
404
527
|
] });
|
|
405
528
|
}
|
|
406
529
|
|
|
407
530
|
// src/components/forms/Input.tsx
|
|
408
|
-
import { TextField, Label, Input as AriaInput, Group, Text, FieldError } from "react-aria-components";
|
|
409
|
-
import { jsx as
|
|
531
|
+
import { TextField, Label, Input as AriaInput, Group, Text as Text2, FieldError } from "react-aria-components";
|
|
532
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
410
533
|
function Input({
|
|
411
534
|
label,
|
|
412
535
|
icon,
|
|
@@ -422,7 +545,7 @@ function Input({
|
|
|
422
545
|
onChange,
|
|
423
546
|
...rest
|
|
424
547
|
}) {
|
|
425
|
-
return /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ jsxs10(
|
|
426
549
|
TextField,
|
|
427
550
|
{
|
|
428
551
|
className: cx("pire-field", className),
|
|
@@ -431,11 +554,11 @@ function Input({
|
|
|
431
554
|
validationBehavior: "aria",
|
|
432
555
|
...rest,
|
|
433
556
|
children: [
|
|
434
|
-
label ? /* @__PURE__ */
|
|
557
|
+
label ? /* @__PURE__ */ jsxs10(Label, { className: "pire-field-label", children: [
|
|
435
558
|
label,
|
|
436
|
-
rest.isRequired ? /* @__PURE__ */
|
|
559
|
+
rest.isRequired ? /* @__PURE__ */ jsx15("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
437
560
|
] }) : null,
|
|
438
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ jsxs10(
|
|
439
562
|
Group,
|
|
440
563
|
{
|
|
441
564
|
className: "pire-control",
|
|
@@ -444,14 +567,14 @@ function Input({
|
|
|
444
567
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
445
568
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
446
569
|
children: [
|
|
447
|
-
icon ? /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
suffix ? /* @__PURE__ */
|
|
570
|
+
icon ? /* @__PURE__ */ jsx15(Icon, { name: icon, size: 16, className: "pire-leading-icon" }) : null,
|
|
571
|
+
/* @__PURE__ */ jsx15(AriaInput, { ref: inputRef, className: "pire-input", "data-numeric": numeric ? "true" : void 0 }),
|
|
572
|
+
suffix ? /* @__PURE__ */ jsx15("span", { className: "pire-affix", children: suffix }) : null
|
|
450
573
|
]
|
|
451
574
|
}
|
|
452
575
|
),
|
|
453
|
-
description ? /* @__PURE__ */
|
|
454
|
-
/* @__PURE__ */
|
|
576
|
+
description ? /* @__PURE__ */ jsx15(Text2, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
577
|
+
/* @__PURE__ */ jsx15(FieldError, { className: "pire-field-error", children: errorMessage })
|
|
455
578
|
]
|
|
456
579
|
}
|
|
457
580
|
);
|
|
@@ -459,8 +582,8 @@ function Input({
|
|
|
459
582
|
|
|
460
583
|
// src/components/forms/TextArea.tsx
|
|
461
584
|
import * as React5 from "react";
|
|
462
|
-
import { TextField as TextField2, Label as Label2, TextArea as AriaTextArea, Group as Group2, Text as
|
|
463
|
-
import { jsx as
|
|
585
|
+
import { TextField as TextField2, Label as Label2, TextArea as AriaTextArea, Group as Group2, Text as Text3, FieldError as FieldError2 } from "react-aria-components";
|
|
586
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
464
587
|
var useIsomorphicLayoutEffect = typeof document === "undefined" ? React5.useEffect : React5.useLayoutEffect;
|
|
465
588
|
function TextArea({
|
|
466
589
|
label,
|
|
@@ -501,7 +624,7 @@ function TextArea({
|
|
|
501
624
|
}
|
|
502
625
|
grow();
|
|
503
626
|
}, [autoGrow, grow, rest.value]);
|
|
504
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ jsxs11(
|
|
505
628
|
TextField2,
|
|
506
629
|
{
|
|
507
630
|
className: cx("pire-field", className),
|
|
@@ -510,11 +633,11 @@ function TextArea({
|
|
|
510
633
|
validationBehavior: "aria",
|
|
511
634
|
...rest,
|
|
512
635
|
children: [
|
|
513
|
-
label ? /* @__PURE__ */
|
|
636
|
+
label ? /* @__PURE__ */ jsxs11(Label2, { className: "pire-field-label", children: [
|
|
514
637
|
label,
|
|
515
|
-
rest.isRequired ? /* @__PURE__ */
|
|
638
|
+
rest.isRequired ? /* @__PURE__ */ jsx16("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
516
639
|
] }) : null,
|
|
517
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ jsx16(
|
|
518
641
|
Group2,
|
|
519
642
|
{
|
|
520
643
|
className: "pire-control",
|
|
@@ -523,7 +646,7 @@ function TextArea({
|
|
|
523
646
|
"data-multiline": "true",
|
|
524
647
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
525
648
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
526
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ jsx16(
|
|
527
650
|
AriaTextArea,
|
|
528
651
|
{
|
|
529
652
|
ref,
|
|
@@ -535,8 +658,8 @@ function TextArea({
|
|
|
535
658
|
)
|
|
536
659
|
}
|
|
537
660
|
),
|
|
538
|
-
description ? /* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
661
|
+
description ? /* @__PURE__ */ jsx16(Text3, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
662
|
+
/* @__PURE__ */ jsx16(FieldError2, { className: "pire-field-error", children: errorMessage })
|
|
540
663
|
]
|
|
541
664
|
}
|
|
542
665
|
);
|
|
@@ -551,10 +674,10 @@ import {
|
|
|
551
674
|
Popover,
|
|
552
675
|
ListBox,
|
|
553
676
|
ListBoxItem,
|
|
554
|
-
Text as
|
|
677
|
+
Text as Text4,
|
|
555
678
|
FieldError as FieldError3
|
|
556
679
|
} from "react-aria-components";
|
|
557
|
-
import { jsx as
|
|
680
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
558
681
|
var norm = (o) => typeof o === "string" ? { value: o, label: o, isDisabled: false } : o;
|
|
559
682
|
function Select({
|
|
560
683
|
label,
|
|
@@ -572,7 +695,7 @@ function Select({
|
|
|
572
695
|
...rest
|
|
573
696
|
}) {
|
|
574
697
|
const items = options.map(norm);
|
|
575
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ jsxs12(
|
|
576
699
|
AriaSelect,
|
|
577
700
|
{
|
|
578
701
|
className: cx("pire-field", className),
|
|
@@ -584,11 +707,11 @@ function Select({
|
|
|
584
707
|
validationBehavior: "aria",
|
|
585
708
|
...rest,
|
|
586
709
|
children: [
|
|
587
|
-
label ? /* @__PURE__ */
|
|
710
|
+
label ? /* @__PURE__ */ jsxs12(Label3, { className: "pire-field-label", children: [
|
|
588
711
|
label,
|
|
589
|
-
rest.isRequired ? /* @__PURE__ */
|
|
712
|
+
rest.isRequired ? /* @__PURE__ */ jsx17("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
590
713
|
] }) : null,
|
|
591
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ jsxs12(
|
|
592
715
|
AriaButton4,
|
|
593
716
|
{
|
|
594
717
|
className: "pire-control",
|
|
@@ -596,14 +719,14 @@ function Select({
|
|
|
596
719
|
"data-full-width": String(fullWidth),
|
|
597
720
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
598
721
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ jsx17(SelectValue, { className: "pire-select-value" }),
|
|
723
|
+
/* @__PURE__ */ jsx17(Icon, { name: "chevron-down", size: 16, className: "pire-leading-icon" })
|
|
601
724
|
]
|
|
602
725
|
}
|
|
603
726
|
),
|
|
604
|
-
description ? /* @__PURE__ */
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
727
|
+
description ? /* @__PURE__ */ jsx17(Text4, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
728
|
+
/* @__PURE__ */ jsx17(FieldError3, { className: "pire-field-error", children: errorMessage }),
|
|
729
|
+
/* @__PURE__ */ jsx17(Popover, { className: "pire-popover", children: /* @__PURE__ */ jsx17(ListBox, { className: "pire-listbox", items, children: (item) => /* @__PURE__ */ jsx17(ListBoxItem, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: item.label }) }) })
|
|
607
730
|
]
|
|
608
731
|
}
|
|
609
732
|
);
|
|
@@ -611,13 +734,13 @@ function Select({
|
|
|
611
734
|
|
|
612
735
|
// src/components/forms/Checkbox.tsx
|
|
613
736
|
import { Checkbox as AriaCheckbox } from "react-aria-components";
|
|
614
|
-
import { Fragment, jsx as
|
|
737
|
+
import { Fragment, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
615
738
|
function Checkbox({ label, hint, children, className, ...rest }) {
|
|
616
|
-
return /* @__PURE__ */
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
/* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ jsx18(AriaCheckbox, { className: cx("pire-choice", className), ...rest, children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
740
|
+
/* @__PURE__ */ jsx18("span", { className: "pire-choice-box", "aria-hidden": "true", children: isIndeterminate ? /* @__PURE__ */ jsx18(Icon, { name: "minus", size: 12 }) : isSelected ? /* @__PURE__ */ jsx18(Icon, { name: "check", size: 12 }) : null }),
|
|
741
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
619
742
|
label ?? children,
|
|
620
|
-
hint ? /* @__PURE__ */
|
|
743
|
+
hint ? /* @__PURE__ */ jsx18("span", { className: "pire-choice-hint", children: hint }) : null
|
|
621
744
|
] })
|
|
622
745
|
] }) });
|
|
623
746
|
}
|
|
@@ -627,35 +750,35 @@ import {
|
|
|
627
750
|
RadioGroup as AriaRadioGroup,
|
|
628
751
|
Radio as AriaRadio,
|
|
629
752
|
Label as Label4,
|
|
630
|
-
Text as
|
|
753
|
+
Text as Text5,
|
|
631
754
|
FieldError as FieldError4
|
|
632
755
|
} from "react-aria-components";
|
|
633
|
-
import { jsx as
|
|
756
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
634
757
|
function RadioGroup({ label, description, errorMessage, children, className, ...rest }) {
|
|
635
|
-
return /* @__PURE__ */
|
|
636
|
-
label ? /* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
description ? /* @__PURE__ */
|
|
639
|
-
/* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsxs14(AriaRadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
|
|
759
|
+
label ? /* @__PURE__ */ jsx19(Label4, { className: "pire-field-label", children: label }) : null,
|
|
760
|
+
/* @__PURE__ */ jsx19("div", { className: "pire-radiogroup", children }),
|
|
761
|
+
description ? /* @__PURE__ */ jsx19(Text5, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
762
|
+
/* @__PURE__ */ jsx19(FieldError4, { className: "pire-field-error", children: errorMessage })
|
|
640
763
|
] });
|
|
641
764
|
}
|
|
642
765
|
function Radio({ label, hint, children, className, ...rest }) {
|
|
643
|
-
return /* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
766
|
+
return /* @__PURE__ */ jsxs14(AriaRadio, { className: cx("pire-choice", className), ...rest, children: [
|
|
767
|
+
/* @__PURE__ */ jsx19("span", { className: "pire-choice-box", "data-radio": "true", "aria-hidden": "true" }),
|
|
768
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
646
769
|
label ?? children,
|
|
647
|
-
hint ? /* @__PURE__ */
|
|
770
|
+
hint ? /* @__PURE__ */ jsx19("span", { className: "pire-choice-hint", children: hint }) : null
|
|
648
771
|
] })
|
|
649
772
|
] });
|
|
650
773
|
}
|
|
651
774
|
|
|
652
775
|
// src/components/forms/Switch.tsx
|
|
653
776
|
import { Switch as AriaSwitch } from "react-aria-components";
|
|
654
|
-
import { jsx as
|
|
777
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
655
778
|
function Switch({ label, children, className, ...rest }) {
|
|
656
|
-
return /* @__PURE__ */
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
/* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ jsxs15(AriaSwitch, { className: cx("pire-choice", className), ...rest, children: [
|
|
780
|
+
/* @__PURE__ */ jsx20("span", { className: "pire-switch-track", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("span", { className: "pire-switch-thumb" }) }),
|
|
781
|
+
/* @__PURE__ */ jsx20("span", { children: label ?? children })
|
|
659
782
|
] });
|
|
660
783
|
}
|
|
661
784
|
|
|
@@ -669,10 +792,97 @@ import {
|
|
|
669
792
|
Popover as Popover2,
|
|
670
793
|
ListBox as ListBox2,
|
|
671
794
|
ListBoxItem as ListBoxItem2,
|
|
672
|
-
Text as
|
|
795
|
+
Text as Text6,
|
|
673
796
|
FieldError as FieldError5
|
|
674
797
|
} from "react-aria-components";
|
|
675
|
-
|
|
798
|
+
|
|
799
|
+
// src/i18n/PireIntlProvider.tsx
|
|
800
|
+
import * as React6 from "react";
|
|
801
|
+
|
|
802
|
+
// src/i18n/messages.ts
|
|
803
|
+
var enMessages = {
|
|
804
|
+
filterBarLabel: "Filters",
|
|
805
|
+
filterBarGo: "Go",
|
|
806
|
+
filterBarClearAll: "Clear all",
|
|
807
|
+
dataTableSelectAll: "Select all rows",
|
|
808
|
+
dataTableSelectRow: "Select row",
|
|
809
|
+
dataTableLoading: "Loading records",
|
|
810
|
+
dialogClose: "Close",
|
|
811
|
+
sidePanelClose: "Close panel",
|
|
812
|
+
inlineMessageDismiss: "Dismiss message",
|
|
813
|
+
toastDismiss: "Dismiss",
|
|
814
|
+
toastRegionLabel: "Notifications",
|
|
815
|
+
comboBoxShowSuggestions: "Show suggestions",
|
|
816
|
+
datePickerOpenCalendar: "Open calendar",
|
|
817
|
+
datePickerPreviousMonth: "Previous month",
|
|
818
|
+
datePickerNextMonth: "Next month",
|
|
819
|
+
numberFieldIncrease: "Increase",
|
|
820
|
+
numberFieldDecrease: "Decrease",
|
|
821
|
+
valueHelpFieldClear: "Clear selection",
|
|
822
|
+
valueHelpFieldOpenNamed: "Select {label}",
|
|
823
|
+
valueHelpFieldOpen: "Open value help",
|
|
824
|
+
valueHelpDialogSearch: "Search records",
|
|
825
|
+
valueHelpDialogCancel: "Cancel",
|
|
826
|
+
paginationLabel: "Pagination",
|
|
827
|
+
paginationRange: "{from}\u2013{to} of {total}",
|
|
828
|
+
paginationPageOf: "Page {page} of {pages}",
|
|
829
|
+
paginationPrevious: "Previous page",
|
|
830
|
+
paginationNext: "Next page",
|
|
831
|
+
paginationRowsPerPage: "Rows per page",
|
|
832
|
+
sideNavLabel: "Main navigation"
|
|
833
|
+
};
|
|
834
|
+
var esMessages = {
|
|
835
|
+
filterBarLabel: "Filtros",
|
|
836
|
+
filterBarGo: "Buscar",
|
|
837
|
+
filterBarClearAll: "Limpiar todo",
|
|
838
|
+
dataTableSelectAll: "Seleccionar todas las filas",
|
|
839
|
+
dataTableSelectRow: "Seleccionar fila",
|
|
840
|
+
dataTableLoading: "Cargando registros",
|
|
841
|
+
dialogClose: "Cerrar",
|
|
842
|
+
sidePanelClose: "Cerrar panel",
|
|
843
|
+
inlineMessageDismiss: "Descartar mensaje",
|
|
844
|
+
toastDismiss: "Descartar",
|
|
845
|
+
toastRegionLabel: "Notificaciones",
|
|
846
|
+
comboBoxShowSuggestions: "Mostrar sugerencias",
|
|
847
|
+
datePickerOpenCalendar: "Abrir calendario",
|
|
848
|
+
datePickerPreviousMonth: "Mes anterior",
|
|
849
|
+
datePickerNextMonth: "Mes siguiente",
|
|
850
|
+
numberFieldIncrease: "Aumentar",
|
|
851
|
+
numberFieldDecrease: "Disminuir",
|
|
852
|
+
valueHelpFieldClear: "Limpiar selecci\xF3n",
|
|
853
|
+
valueHelpFieldOpenNamed: "Seleccionar {label}",
|
|
854
|
+
valueHelpFieldOpen: "Abrir ayuda de valores",
|
|
855
|
+
valueHelpDialogSearch: "Buscar registros",
|
|
856
|
+
valueHelpDialogCancel: "Cancelar",
|
|
857
|
+
paginationLabel: "Paginaci\xF3n",
|
|
858
|
+
paginationRange: "{from}\u2013{to} de {total}",
|
|
859
|
+
paginationPageOf: "P\xE1gina {page} de {pages}",
|
|
860
|
+
paginationPrevious: "P\xE1gina anterior",
|
|
861
|
+
paginationNext: "P\xE1gina siguiente",
|
|
862
|
+
paginationRowsPerPage: "Filas por p\xE1gina",
|
|
863
|
+
sideNavLabel: "Navegaci\xF3n principal"
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
// src/i18n/PireIntlProvider.tsx
|
|
867
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
868
|
+
var MessagesContext = React6.createContext(enMessages);
|
|
869
|
+
function PireIntlProvider({ messages, children }) {
|
|
870
|
+
const value = React6.useMemo(
|
|
871
|
+
() => messages ? { ...enMessages, ...messages } : enMessages,
|
|
872
|
+
[messages]
|
|
873
|
+
);
|
|
874
|
+
return /* @__PURE__ */ jsx21(MessagesContext.Provider, { value, children });
|
|
875
|
+
}
|
|
876
|
+
function usePireMessages() {
|
|
877
|
+
return React6.useContext(MessagesContext);
|
|
878
|
+
}
|
|
879
|
+
function useMessage(key, override) {
|
|
880
|
+
const messages = React6.useContext(MessagesContext);
|
|
881
|
+
return override ?? messages[key];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
// src/components/forms/ComboBox.tsx
|
|
885
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
676
886
|
var norm2 = (o) => typeof o === "string" ? { value: o, label: o } : o;
|
|
677
887
|
function ComboBox({
|
|
678
888
|
label,
|
|
@@ -689,8 +899,9 @@ function ComboBox({
|
|
|
689
899
|
style,
|
|
690
900
|
...rest
|
|
691
901
|
}) {
|
|
902
|
+
const msg = usePireMessages();
|
|
692
903
|
const items = options.map(norm2);
|
|
693
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsxs16(
|
|
694
905
|
AriaComboBox,
|
|
695
906
|
{
|
|
696
907
|
className: cx("pire-field", className),
|
|
@@ -704,11 +915,11 @@ function ComboBox({
|
|
|
704
915
|
validationBehavior: "aria",
|
|
705
916
|
...rest,
|
|
706
917
|
children: [
|
|
707
|
-
label ? /* @__PURE__ */
|
|
918
|
+
label ? /* @__PURE__ */ jsxs16(Label5, { className: "pire-field-label", children: [
|
|
708
919
|
label,
|
|
709
|
-
rest.isRequired ? /* @__PURE__ */
|
|
920
|
+
rest.isRequired ? /* @__PURE__ */ jsx22("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
710
921
|
] }) : null,
|
|
711
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ jsxs16(
|
|
712
923
|
Group3,
|
|
713
924
|
{
|
|
714
925
|
className: "pire-control",
|
|
@@ -716,17 +927,17 @@ function ComboBox({
|
|
|
716
927
|
"data-full-width": String(fullWidth),
|
|
717
928
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
718
929
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ jsx22(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
|
|
931
|
+
/* @__PURE__ */ jsx22(AriaInput2, { className: "pire-input", placeholder: rest.placeholder }),
|
|
932
|
+
/* @__PURE__ */ jsx22(AriaButton5, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx22(Icon, { name: "chevron-down", size: 16 }) })
|
|
722
933
|
]
|
|
723
934
|
}
|
|
724
935
|
),
|
|
725
|
-
description ? /* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
item.secondary ? /* @__PURE__ */
|
|
936
|
+
description ? /* @__PURE__ */ jsx22(Text6, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
937
|
+
/* @__PURE__ */ jsx22(FieldError5, { className: "pire-field-error", children: errorMessage }),
|
|
938
|
+
/* @__PURE__ */ jsx22(Popover2, { className: "pire-popover", children: /* @__PURE__ */ jsx22(ListBox2, { className: "pire-listbox", children: (item) => /* @__PURE__ */ jsxs16(ListBoxItem2, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
939
|
+
/* @__PURE__ */ jsx22("span", { style: { flex: 1 }, children: item.label }),
|
|
940
|
+
item.secondary ? /* @__PURE__ */ jsx22("span", { style: { font: "var(--type-code)", color: "var(--text-tertiary)" }, children: item.secondary }) : null
|
|
730
941
|
] }) }) })
|
|
731
942
|
]
|
|
732
943
|
}
|
|
@@ -734,7 +945,7 @@ function ComboBox({
|
|
|
734
945
|
}
|
|
735
946
|
|
|
736
947
|
// src/components/forms/MultiComboBox.tsx
|
|
737
|
-
import * as
|
|
948
|
+
import * as React7 from "react";
|
|
738
949
|
import {
|
|
739
950
|
ComboBox as AriaComboBox2,
|
|
740
951
|
Label as Label6,
|
|
@@ -745,11 +956,11 @@ import {
|
|
|
745
956
|
Popover as Popover3,
|
|
746
957
|
ListBox as ListBox3,
|
|
747
958
|
ListBoxItem as ListBoxItem3,
|
|
748
|
-
Text as
|
|
959
|
+
Text as Text7,
|
|
749
960
|
FieldError as FieldError6,
|
|
750
961
|
VisuallyHidden
|
|
751
962
|
} from "react-aria-components";
|
|
752
|
-
import { jsx as
|
|
963
|
+
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
753
964
|
var norm3 = (o) => typeof o === "string" ? { value: o, label: o } : o;
|
|
754
965
|
function MultiComboBox({
|
|
755
966
|
label,
|
|
@@ -767,13 +978,14 @@ function MultiComboBox({
|
|
|
767
978
|
style,
|
|
768
979
|
...rest
|
|
769
980
|
}) {
|
|
770
|
-
const
|
|
771
|
-
const
|
|
772
|
-
const [
|
|
773
|
-
const
|
|
981
|
+
const msg = usePireMessages();
|
|
982
|
+
const items = React7.useMemo(() => options.map(norm3), [options]);
|
|
983
|
+
const [uncontrolled, setUncontrolled] = React7.useState(defaultValue ?? []);
|
|
984
|
+
const [announcement, setAnnouncement] = React7.useState("");
|
|
985
|
+
const inputRef = React7.useRef(null);
|
|
774
986
|
const raw = value ?? uncontrolled;
|
|
775
987
|
const contentKey = raw.join("\0");
|
|
776
|
-
const values =
|
|
988
|
+
const values = React7.useMemo(() => raw, [contentKey]);
|
|
777
989
|
const labelOf = (v) => items.find((o) => o.value === v)?.label ?? v;
|
|
778
990
|
const isEditable = !rest.isDisabled && !rest.isReadOnly;
|
|
779
991
|
const commit = (next) => {
|
|
@@ -806,7 +1018,7 @@ function MultiComboBox({
|
|
|
806
1018
|
e.stopPropagation();
|
|
807
1019
|
if (!values.includes(next)) commit([...values, next]);
|
|
808
1020
|
};
|
|
809
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ jsxs17(
|
|
810
1022
|
AriaComboBox2,
|
|
811
1023
|
{
|
|
812
1024
|
className: cx("pire-field", className),
|
|
@@ -820,11 +1032,11 @@ function MultiComboBox({
|
|
|
820
1032
|
validationBehavior: "aria",
|
|
821
1033
|
...rest,
|
|
822
1034
|
children: [
|
|
823
|
-
label ? /* @__PURE__ */
|
|
1035
|
+
label ? /* @__PURE__ */ jsxs17(Label6, { className: "pire-field-label", children: [
|
|
824
1036
|
label,
|
|
825
|
-
rest.isRequired ? /* @__PURE__ */
|
|
1037
|
+
rest.isRequired ? /* @__PURE__ */ jsx23("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
826
1038
|
] }) : null,
|
|
827
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ jsxs17(
|
|
828
1040
|
Group4,
|
|
829
1041
|
{
|
|
830
1042
|
className: "pire-control",
|
|
@@ -834,14 +1046,14 @@ function MultiComboBox({
|
|
|
834
1046
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
835
1047
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
836
1048
|
children: [
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ jsx23(Icon, { name: "search", size: 16, className: "pire-leading-icon" }),
|
|
1050
|
+
/* @__PURE__ */ jsxs17("div", { className: "pire-chipfield", children: [
|
|
1051
|
+
/* @__PURE__ */ jsx23(ButtonContext.Provider, { value: null, children: values.map((v) => (
|
|
840
1052
|
/* Disabled follows the field, not `isEditable`: a read-only field's chips are
|
|
841
1053
|
real, current values and should read as such — they simply lose the × . */
|
|
842
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ jsx23(Tag, { isDisabled: rest.isDisabled, onRemove: isEditable ? () => remove(v) : void 0, children: labelOf(v) }, v)
|
|
843
1055
|
)) }),
|
|
844
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ jsx23(
|
|
845
1057
|
AriaInput3,
|
|
846
1058
|
{
|
|
847
1059
|
ref: inputRef,
|
|
@@ -851,16 +1063,16 @@ function MultiComboBox({
|
|
|
851
1063
|
}
|
|
852
1064
|
)
|
|
853
1065
|
] }),
|
|
854
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ jsx23(AriaButton6, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.comboBoxShowSuggestions, style: { width: 20, height: 20 }, children: /* @__PURE__ */ jsx23(Icon, { name: "chevron-down", size: 16 }) })
|
|
855
1067
|
]
|
|
856
1068
|
}
|
|
857
1069
|
),
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
description ? /* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
item.secondary ? /* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ jsx23(VisuallyHidden, { children: /* @__PURE__ */ jsx23("span", { "aria-live": "polite", children: announcement }) }),
|
|
1071
|
+
description ? /* @__PURE__ */ jsx23(Text7, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1072
|
+
/* @__PURE__ */ jsx23(FieldError6, { className: "pire-field-error", children: errorMessage }),
|
|
1073
|
+
/* @__PURE__ */ jsx23(Popover3, { className: "pire-popover", children: /* @__PURE__ */ jsx23(ListBox3, { className: "pire-listbox", children: (item) => /* @__PURE__ */ jsxs17(ListBoxItem3, { className: "pire-option", id: item.value, textValue: item.label, isDisabled: item.isDisabled, children: [
|
|
1074
|
+
/* @__PURE__ */ jsx23("span", { style: { flex: 1 }, children: item.label }),
|
|
1075
|
+
item.secondary ? /* @__PURE__ */ jsx23("span", { style: { font: "var(--type-code)", color: "var(--text-tertiary)" }, children: item.secondary }) : null
|
|
864
1076
|
] }) }) })
|
|
865
1077
|
]
|
|
866
1078
|
}
|
|
@@ -874,10 +1086,10 @@ import {
|
|
|
874
1086
|
Input as AriaInput4,
|
|
875
1087
|
Group as Group5,
|
|
876
1088
|
Button as AriaButton7,
|
|
877
|
-
Text as
|
|
1089
|
+
Text as Text8,
|
|
878
1090
|
FieldError as FieldError7
|
|
879
1091
|
} from "react-aria-components";
|
|
880
|
-
import { jsx as
|
|
1092
|
+
import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
881
1093
|
function NumberField({
|
|
882
1094
|
label,
|
|
883
1095
|
suffix,
|
|
@@ -890,12 +1102,13 @@ function NumberField({
|
|
|
890
1102
|
style,
|
|
891
1103
|
...rest
|
|
892
1104
|
}) {
|
|
893
|
-
|
|
894
|
-
|
|
1105
|
+
const msg = usePireMessages();
|
|
1106
|
+
return /* @__PURE__ */ jsxs18(AriaNumberField, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
|
|
1107
|
+
label ? /* @__PURE__ */ jsxs18(Label7, { className: "pire-field-label", children: [
|
|
895
1108
|
label,
|
|
896
|
-
rest.isRequired ? /* @__PURE__ */
|
|
1109
|
+
rest.isRequired ? /* @__PURE__ */ jsx24("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
897
1110
|
] }) : null,
|
|
898
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ jsxs18(
|
|
899
1112
|
Group5,
|
|
900
1113
|
{
|
|
901
1114
|
className: "pire-control",
|
|
@@ -904,17 +1117,17 @@ function NumberField({
|
|
|
904
1117
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
905
1118
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
906
1119
|
children: [
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
suffix ? /* @__PURE__ */
|
|
909
|
-
hideStepper ? null : /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ jsx24(AriaInput4, { className: "pire-input", "data-numeric": "true" }),
|
|
1121
|
+
suffix ? /* @__PURE__ */ jsx24("span", { className: "pire-affix", children: suffix }) : null,
|
|
1122
|
+
hideStepper ? null : /* @__PURE__ */ jsxs18("span", { className: "pire-stepper", children: [
|
|
1123
|
+
/* @__PURE__ */ jsx24(AriaButton7, { slot: "increment", className: "pire-stepper-btn", "aria-label": msg.numberFieldIncrease, children: /* @__PURE__ */ jsx24(Icon, { name: "plus", size: 10 }) }),
|
|
1124
|
+
/* @__PURE__ */ jsx24(AriaButton7, { slot: "decrement", className: "pire-stepper-btn", "aria-label": msg.numberFieldDecrease, children: /* @__PURE__ */ jsx24(Icon, { name: "minus", size: 10 }) })
|
|
912
1125
|
] })
|
|
913
1126
|
]
|
|
914
1127
|
}
|
|
915
1128
|
),
|
|
916
|
-
description ? /* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
1129
|
+
description ? /* @__PURE__ */ jsx24(Text8, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1130
|
+
/* @__PURE__ */ jsx24(FieldError7, { className: "pire-field-error", children: errorMessage })
|
|
918
1131
|
] });
|
|
919
1132
|
}
|
|
920
1133
|
|
|
@@ -934,11 +1147,11 @@ import {
|
|
|
934
1147
|
CalendarHeaderCell,
|
|
935
1148
|
CalendarGridBody,
|
|
936
1149
|
CalendarCell,
|
|
937
|
-
Heading,
|
|
938
|
-
Text as
|
|
1150
|
+
Heading as Heading2,
|
|
1151
|
+
Text as Text9,
|
|
939
1152
|
FieldError as FieldError8
|
|
940
1153
|
} from "react-aria-components";
|
|
941
|
-
import { jsx as
|
|
1154
|
+
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
942
1155
|
function DatePicker({
|
|
943
1156
|
label,
|
|
944
1157
|
description,
|
|
@@ -949,12 +1162,13 @@ function DatePicker({
|
|
|
949
1162
|
style,
|
|
950
1163
|
...rest
|
|
951
1164
|
}) {
|
|
952
|
-
|
|
953
|
-
|
|
1165
|
+
const msg = usePireMessages();
|
|
1166
|
+
return /* @__PURE__ */ jsxs19(AriaDatePicker, { className: cx("pire-field", className), style, validationBehavior: "aria", ...rest, children: [
|
|
1167
|
+
label ? /* @__PURE__ */ jsxs19(Label8, { className: "pire-field-label", children: [
|
|
954
1168
|
label,
|
|
955
|
-
rest.isRequired ? /* @__PURE__ */
|
|
1169
|
+
rest.isRequired ? /* @__PURE__ */ jsx25("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
956
1170
|
] }) : null,
|
|
957
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ jsxs19(
|
|
958
1172
|
Group6,
|
|
959
1173
|
{
|
|
960
1174
|
className: "pire-control",
|
|
@@ -963,36 +1177,36 @@ function DatePicker({
|
|
|
963
1177
|
"data-invalid": rest.isInvalid ? "true" : void 0,
|
|
964
1178
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
965
1179
|
children: [
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ jsx25(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx25(DateSegment, { segment, className: "pire-datesegment" }) }),
|
|
1181
|
+
/* @__PURE__ */ jsx25(AriaButton8, { className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerOpenCalendar, style: { width: 24, height: 24 }, children: /* @__PURE__ */ jsx25(Icon, { name: "calendar", size: 16 }) })
|
|
968
1182
|
]
|
|
969
1183
|
}
|
|
970
1184
|
),
|
|
971
|
-
description ? /* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
1185
|
+
description ? /* @__PURE__ */ jsx25(Text9, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1186
|
+
/* @__PURE__ */ jsx25(FieldError8, { className: "pire-field-error", children: errorMessage }),
|
|
1187
|
+
/* @__PURE__ */ jsx25(Popover4, { className: "pire-popover", children: /* @__PURE__ */ jsx25(AriaDialog, { children: /* @__PURE__ */ jsxs19(Calendar, { className: "pire-calendar", children: [
|
|
1188
|
+
/* @__PURE__ */ jsxs19("header", { className: "pire-calendar-head", children: [
|
|
1189
|
+
/* @__PURE__ */ jsx25(AriaButton8, { slot: "previous", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerPreviousMonth, children: /* @__PURE__ */ jsx25(Icon, { name: "chevron-left", size: 16 }) }),
|
|
1190
|
+
/* @__PURE__ */ jsx25(Heading2, { className: "pire-calendar-title" }),
|
|
1191
|
+
/* @__PURE__ */ jsx25(AriaButton8, { slot: "next", className: "pire-iconbtn", "data-size": "sm", "aria-label": msg.datePickerNextMonth, children: /* @__PURE__ */ jsx25(Icon, { name: "chevron-right", size: 16 }) })
|
|
978
1192
|
] }),
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ jsxs19(CalendarGrid, { className: "pire-calendar-grid", children: [
|
|
1194
|
+
/* @__PURE__ */ jsx25(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx25(CalendarHeaderCell, { children: day }) }),
|
|
1195
|
+
/* @__PURE__ */ jsx25(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx25(CalendarCell, { date, className: "pire-calendar-cell" }) })
|
|
982
1196
|
] })
|
|
983
1197
|
] }) }) })
|
|
984
1198
|
] });
|
|
985
1199
|
}
|
|
986
1200
|
|
|
987
1201
|
// src/components/forms/ValueHelpField.tsx
|
|
988
|
-
import * as
|
|
1202
|
+
import * as React9 from "react";
|
|
989
1203
|
|
|
990
1204
|
// src/components/patterns/ValueHelpDialog.tsx
|
|
991
|
-
import * as
|
|
1205
|
+
import * as React8 from "react";
|
|
992
1206
|
|
|
993
1207
|
// src/components/feedback/Dialog.tsx
|
|
994
|
-
import { ModalOverlay, Modal, Dialog as AriaDialog2, Heading as
|
|
995
|
-
import { jsx as
|
|
1208
|
+
import { ModalOverlay, Modal, Dialog as AriaDialog2, Heading as Heading3 } from "react-aria-components";
|
|
1209
|
+
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
996
1210
|
function Dialog({
|
|
997
1211
|
isOpen,
|
|
998
1212
|
onOpenChange,
|
|
@@ -1007,11 +1221,12 @@ function Dialog({
|
|
|
1007
1221
|
className,
|
|
1008
1222
|
style
|
|
1009
1223
|
}) {
|
|
1224
|
+
const msg = usePireMessages();
|
|
1010
1225
|
const close = () => {
|
|
1011
1226
|
onClose?.();
|
|
1012
1227
|
onOpenChange?.(false);
|
|
1013
1228
|
};
|
|
1014
|
-
return /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsx26(
|
|
1015
1230
|
ModalOverlay,
|
|
1016
1231
|
{
|
|
1017
1232
|
className: "pire-modal-overlay",
|
|
@@ -1020,16 +1235,16 @@ function Dialog({
|
|
|
1020
1235
|
onOpenChange: (o) => {
|
|
1021
1236
|
if (!o) close();
|
|
1022
1237
|
},
|
|
1023
|
-
children: /* @__PURE__ */
|
|
1024
|
-
title ? /* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
subtitle ? /* @__PURE__ */
|
|
1238
|
+
children: /* @__PURE__ */ jsx26(Modal, { className: cx("pire-modal", className), "data-size": size, style, children: /* @__PURE__ */ jsxs20(AriaDialog2, { className: "pire-dialog", children: [
|
|
1239
|
+
title ? /* @__PURE__ */ jsxs20("header", { className: "pire-dialog-head", children: [
|
|
1240
|
+
/* @__PURE__ */ jsxs20("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1241
|
+
/* @__PURE__ */ jsx26(Heading3, { slot: "title", className: "pire-dialog-title", children: title }),
|
|
1242
|
+
subtitle ? /* @__PURE__ */ jsx26("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
1028
1243
|
] }),
|
|
1029
|
-
showClose ? /* @__PURE__ */
|
|
1244
|
+
showClose ? /* @__PURE__ */ jsx26(IconButton, { icon: "x", label: msg.dialogClose, size: "sm", onPress: close }) : null
|
|
1030
1245
|
] }) : null,
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
footer ? /* @__PURE__ */
|
|
1246
|
+
/* @__PURE__ */ jsx26("div", { className: "pire-dialog-body", children }),
|
|
1247
|
+
footer ? /* @__PURE__ */ jsx26("footer", { className: "pire-dialog-foot", children: footer }) : null
|
|
1033
1248
|
] }) })
|
|
1034
1249
|
}
|
|
1035
1250
|
);
|
|
@@ -1044,7 +1259,54 @@ import {
|
|
|
1044
1259
|
Row,
|
|
1045
1260
|
Cell
|
|
1046
1261
|
} from "react-aria-components";
|
|
1047
|
-
|
|
1262
|
+
|
|
1263
|
+
// src/components/feedback/Skeleton.tsx
|
|
1264
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1265
|
+
function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
|
|
1266
|
+
return /* @__PURE__ */ jsx27(
|
|
1267
|
+
"div",
|
|
1268
|
+
{
|
|
1269
|
+
className: cx("pire-skeleton", className),
|
|
1270
|
+
"data-shape": shape,
|
|
1271
|
+
"aria-hidden": "true",
|
|
1272
|
+
style: { width, height, ...style },
|
|
1273
|
+
...rest
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
1278
|
+
function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
|
|
1279
|
+
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
1280
|
+
return /* @__PURE__ */ jsx27(
|
|
1281
|
+
"div",
|
|
1282
|
+
{
|
|
1283
|
+
className: cx("pire-skeleton-row", className),
|
|
1284
|
+
"data-density": density,
|
|
1285
|
+
"aria-hidden": "true",
|
|
1286
|
+
style,
|
|
1287
|
+
...rest,
|
|
1288
|
+
children: cells.map((c, i) => {
|
|
1289
|
+
const align = c.numeric ? "right" : c.align ?? "left";
|
|
1290
|
+
return (
|
|
1291
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
|
|
1292
|
+
/* @__PURE__ */ jsx27(
|
|
1293
|
+
"div",
|
|
1294
|
+
{
|
|
1295
|
+
className: "pire-skeleton-cell",
|
|
1296
|
+
"data-align": align,
|
|
1297
|
+
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
1298
|
+
children: /* @__PURE__ */ jsx27(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
1299
|
+
},
|
|
1300
|
+
i
|
|
1301
|
+
)
|
|
1302
|
+
);
|
|
1303
|
+
})
|
|
1304
|
+
}
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
// src/components/data/DataTable.tsx
|
|
1309
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1048
1310
|
function DataTable({
|
|
1049
1311
|
columns,
|
|
1050
1312
|
rows,
|
|
@@ -1057,79 +1319,104 @@ function DataTable({
|
|
|
1057
1319
|
onRowAction,
|
|
1058
1320
|
stickyHeader = true,
|
|
1059
1321
|
emptyLabel = "No records match the current filters.",
|
|
1322
|
+
isLoading,
|
|
1323
|
+
loadingRowCount,
|
|
1324
|
+
loadingLabel,
|
|
1060
1325
|
className,
|
|
1061
1326
|
style,
|
|
1062
1327
|
...rest
|
|
1063
1328
|
}) {
|
|
1329
|
+
const msg = usePireMessages();
|
|
1064
1330
|
const sortDescriptor = sort ? { column: sort.key, direction: sort.dir === "asc" ? "ascending" : "descending" } : void 0;
|
|
1065
1331
|
const handleSelection = (keys) => {
|
|
1066
1332
|
if (keys === "all") return onSelectionChange?.(rows.map((r) => r.id));
|
|
1067
1333
|
onSelectionChange?.([...keys]);
|
|
1068
1334
|
};
|
|
1069
|
-
|
|
1070
|
-
|
|
1335
|
+
const skeletonRows = loadingRowCount ?? (rows.length || 5);
|
|
1336
|
+
const skeletonColumns = [
|
|
1337
|
+
...selectable ? [{ width: 44 }] : [],
|
|
1338
|
+
...columns.map((c) => ({ width: c.width, align: c.align, numeric: c.numeric }))
|
|
1339
|
+
];
|
|
1340
|
+
const body = isLoading ? [] : rows;
|
|
1341
|
+
return /* @__PURE__ */ jsx28(
|
|
1342
|
+
"div",
|
|
1071
1343
|
{
|
|
1072
|
-
className: "pire-table",
|
|
1073
|
-
|
|
1074
|
-
"data-
|
|
1075
|
-
"aria-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1344
|
+
className: cx("pire-table-wrap", className),
|
|
1345
|
+
style,
|
|
1346
|
+
"data-loading": isLoading ? "true" : void 0,
|
|
1347
|
+
"aria-busy": isLoading ? "true" : void 0,
|
|
1348
|
+
children: /* @__PURE__ */ jsxs21(
|
|
1349
|
+
Table,
|
|
1350
|
+
{
|
|
1351
|
+
className: "pire-table",
|
|
1352
|
+
"data-density": density,
|
|
1353
|
+
"data-sticky": String(stickyHeader),
|
|
1354
|
+
"aria-label": rest["aria-label"],
|
|
1355
|
+
selectionMode: selectable ? "multiple" : "none",
|
|
1356
|
+
selectedKeys: selected ? new Set(selected) : void 0,
|
|
1357
|
+
onSelectionChange: handleSelection,
|
|
1358
|
+
sortDescriptor,
|
|
1359
|
+
onSortChange: (d) => onSortChange?.({ key: String(d.column), dir: d.direction === "ascending" ? "asc" : "desc" }),
|
|
1360
|
+
onRowAction: onRowAction ? (key) => {
|
|
1361
|
+
const row = rows.find((r) => String(r.id) === String(key));
|
|
1362
|
+
if (row) onRowAction(row);
|
|
1363
|
+
} : void 0,
|
|
1364
|
+
children: [
|
|
1365
|
+
/* @__PURE__ */ jsxs21(TableHeader, { className: "pire-thead-row", children: [
|
|
1366
|
+
selectable ? /* @__PURE__ */ jsx28(Column, { className: "pire-th", width: 44, children: /* @__PURE__ */ jsx28(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectAll }) }) : null,
|
|
1367
|
+
columns.map((c, i) => /* @__PURE__ */ jsx28(
|
|
1368
|
+
Column,
|
|
1369
|
+
{
|
|
1370
|
+
id: c.key,
|
|
1371
|
+
className: "pire-th",
|
|
1372
|
+
isRowHeader: i === 0 && !selectable,
|
|
1373
|
+
allowsSorting: c.sortable,
|
|
1374
|
+
width: c.width,
|
|
1375
|
+
"data-align": c.numeric || c.align === "right" ? "right" : c.align,
|
|
1376
|
+
"data-allows-sorting": c.sortable ? "true" : void 0,
|
|
1377
|
+
children: /* @__PURE__ */ jsxs21("span", { className: "pire-th-inner", children: [
|
|
1378
|
+
c.label,
|
|
1379
|
+
c.sortable ? /* @__PURE__ */ jsx28(
|
|
1380
|
+
Icon,
|
|
1381
|
+
{
|
|
1382
|
+
size: 12,
|
|
1383
|
+
name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
|
|
1384
|
+
style: { color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)" }
|
|
1385
|
+
}
|
|
1386
|
+
) : null
|
|
1387
|
+
] })
|
|
1388
|
+
},
|
|
1389
|
+
c.key
|
|
1390
|
+
))
|
|
1391
|
+
] }),
|
|
1392
|
+
/* @__PURE__ */ jsx28(TableBody, { renderEmptyState: () => isLoading ? /* @__PURE__ */ jsxs21("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
|
|
1393
|
+
/* @__PURE__ */ jsx28("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
|
|
1394
|
+
Array.from({ length: skeletonRows }, (_, i) => (
|
|
1395
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
|
|
1396
|
+
/* @__PURE__ */ jsx28(SkeletonTableRow, { columns: skeletonColumns, density }, i)
|
|
1397
|
+
))
|
|
1398
|
+
] }) : /* @__PURE__ */ jsx28("div", { className: "pire-table-empty", children: emptyLabel }), children: body.map((row) => /* @__PURE__ */ jsxs21(Row, { id: row.id, className: "pire-tr", "data-pressable": onRowAction ? "true" : void 0, children: [
|
|
1399
|
+
selectable ? /* @__PURE__ */ jsx28(Cell, { className: "pire-td", children: /* @__PURE__ */ jsx28(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
|
|
1400
|
+
columns.map((c) => /* @__PURE__ */ jsx28(
|
|
1401
|
+
Cell,
|
|
1402
|
+
{
|
|
1403
|
+
className: "pire-td",
|
|
1404
|
+
"data-numeric": c.numeric ? "true" : void 0,
|
|
1405
|
+
style: { textAlign: c.align && !c.numeric ? c.align : void 0 },
|
|
1406
|
+
children: c.render ? c.render(row) : row[c.key]
|
|
1407
|
+
},
|
|
1408
|
+
c.key
|
|
1409
|
+
))
|
|
1410
|
+
] }, row.id)) })
|
|
1411
|
+
]
|
|
1412
|
+
}
|
|
1413
|
+
)
|
|
1127
1414
|
}
|
|
1128
|
-
)
|
|
1415
|
+
);
|
|
1129
1416
|
}
|
|
1130
1417
|
|
|
1131
1418
|
// src/components/patterns/ValueHelpDialog.tsx
|
|
1132
|
-
import { jsx as
|
|
1419
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1133
1420
|
function ValueHelpDialog({
|
|
1134
1421
|
isOpen,
|
|
1135
1422
|
title = "Select a record",
|
|
@@ -1140,28 +1427,29 @@ function ValueHelpDialog({
|
|
|
1140
1427
|
onSelect,
|
|
1141
1428
|
onClose
|
|
1142
1429
|
}) {
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1430
|
+
const msg = usePireMessages();
|
|
1431
|
+
const [query, setQuery] = React8.useState("");
|
|
1432
|
+
React8.useEffect(() => {
|
|
1145
1433
|
if (isOpen) setQuery("");
|
|
1146
1434
|
}, [isOpen]);
|
|
1147
|
-
const filtered =
|
|
1435
|
+
const filtered = React8.useMemo(() => {
|
|
1148
1436
|
const q = query.trim().toLowerCase();
|
|
1149
1437
|
if (!q) return rows;
|
|
1150
1438
|
return rows.filter((row) => Object.values(row).some((v) => String(v).toLowerCase().includes(q)));
|
|
1151
1439
|
}, [rows, query]);
|
|
1152
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ jsx29(
|
|
1153
1441
|
Dialog,
|
|
1154
1442
|
{
|
|
1155
1443
|
isOpen,
|
|
1156
1444
|
size: "lg",
|
|
1157
1445
|
title,
|
|
1158
1446
|
onClose,
|
|
1159
|
-
footer: /* @__PURE__ */
|
|
1160
|
-
children: /* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1447
|
+
footer: /* @__PURE__ */ jsx29(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
|
|
1448
|
+
children: /* @__PURE__ */ jsxs22("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
|
|
1449
|
+
/* @__PURE__ */ jsx29(
|
|
1162
1450
|
Input,
|
|
1163
1451
|
{
|
|
1164
|
-
"aria-label":
|
|
1452
|
+
"aria-label": msg.valueHelpDialogSearch,
|
|
1165
1453
|
icon: "search",
|
|
1166
1454
|
type: "search",
|
|
1167
1455
|
value: query,
|
|
@@ -1170,7 +1458,7 @@ function ValueHelpDialog({
|
|
|
1170
1458
|
autoFocus: true
|
|
1171
1459
|
}
|
|
1172
1460
|
),
|
|
1173
|
-
/* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ jsx29(
|
|
1174
1462
|
DataTable,
|
|
1175
1463
|
{
|
|
1176
1464
|
"aria-label": typeof title === "string" ? title : "Records",
|
|
@@ -1190,7 +1478,7 @@ function ValueHelpDialog({
|
|
|
1190
1478
|
}
|
|
1191
1479
|
|
|
1192
1480
|
// src/components/forms/ValueHelpField.tsx
|
|
1193
|
-
import { jsx as
|
|
1481
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1194
1482
|
var defaultFormat = (row) => [row.id, row.name ?? row.label ?? row.text].filter(Boolean).join(" \u2014 ");
|
|
1195
1483
|
function ValueHelpField({
|
|
1196
1484
|
label,
|
|
@@ -1210,10 +1498,11 @@ function ValueHelpField({
|
|
|
1210
1498
|
className,
|
|
1211
1499
|
style
|
|
1212
1500
|
}) {
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1501
|
+
const msg = usePireMessages();
|
|
1502
|
+
const [open, setOpen] = React9.useState(false);
|
|
1503
|
+
return /* @__PURE__ */ jsxs23("div", { className: cx(className), style, children: [
|
|
1504
|
+
/* @__PURE__ */ jsxs23("div", { style: { display: "flex", gap: "var(--sp-2)", alignItems: "flex-end" }, children: [
|
|
1505
|
+
/* @__PURE__ */ jsx30(
|
|
1217
1506
|
Input,
|
|
1218
1507
|
{
|
|
1219
1508
|
label,
|
|
@@ -1227,28 +1516,28 @@ function ValueHelpField({
|
|
|
1227
1516
|
errorMessage
|
|
1228
1517
|
}
|
|
1229
1518
|
),
|
|
1230
|
-
allowsClear && value ? /* @__PURE__ */
|
|
1519
|
+
allowsClear && value ? /* @__PURE__ */ jsx30(
|
|
1231
1520
|
IconButton,
|
|
1232
1521
|
{
|
|
1233
1522
|
icon: "x",
|
|
1234
|
-
label:
|
|
1523
|
+
label: msg.valueHelpFieldClear,
|
|
1235
1524
|
variant: "outlined",
|
|
1236
1525
|
isDisabled,
|
|
1237
1526
|
onPress: () => onChange?.(null)
|
|
1238
1527
|
}
|
|
1239
1528
|
) : null,
|
|
1240
|
-
/* @__PURE__ */
|
|
1529
|
+
/* @__PURE__ */ jsx30(
|
|
1241
1530
|
IconButton,
|
|
1242
1531
|
{
|
|
1243
1532
|
icon: "search",
|
|
1244
|
-
label: typeof label === "string" ?
|
|
1533
|
+
label: typeof label === "string" ? msg.valueHelpFieldOpenNamed.replace("{label}", label.toLowerCase()) : msg.valueHelpFieldOpen,
|
|
1245
1534
|
variant: "outlined",
|
|
1246
1535
|
isDisabled,
|
|
1247
1536
|
onPress: () => setOpen(true)
|
|
1248
1537
|
}
|
|
1249
1538
|
)
|
|
1250
1539
|
] }),
|
|
1251
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ jsx30(
|
|
1252
1541
|
ValueHelpDialog,
|
|
1253
1542
|
{
|
|
1254
1543
|
isOpen: open,
|
|
@@ -1263,7 +1552,7 @@ function ValueHelpField({
|
|
|
1263
1552
|
}
|
|
1264
1553
|
|
|
1265
1554
|
// src/components/navigation/ShellBar.tsx
|
|
1266
|
-
import { jsx as
|
|
1555
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1267
1556
|
var initials2 = (name) => name.trim().split(/\s+/).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
|
|
1268
1557
|
function ShellBar({
|
|
1269
1558
|
product,
|
|
@@ -1278,22 +1567,22 @@ function ShellBar({
|
|
|
1278
1567
|
className,
|
|
1279
1568
|
...rest
|
|
1280
1569
|
}) {
|
|
1281
|
-
return /* @__PURE__ */
|
|
1282
|
-
onMenu ? /* @__PURE__ */
|
|
1283
|
-
monogram ? /* @__PURE__ */
|
|
1284
|
-
product ? /* @__PURE__ */
|
|
1285
|
-
title ? /* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
onSearch ? /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ jsxs24("header", { className: cx("pire-shellbar", className), ...rest, children: [
|
|
1571
|
+
onMenu ? /* @__PURE__ */ jsx31(IconButton, { icon: "menu", label: menuLabel, variant: "inverse", size: "sm", onPress: onMenu }) : null,
|
|
1572
|
+
monogram ? /* @__PURE__ */ jsx31("span", { className: "pire-shellbar-mono", "aria-hidden": "true", children: monogram }) : null,
|
|
1573
|
+
product ? /* @__PURE__ */ jsx31("span", { className: "pire-shellbar-product", children: product }) : null,
|
|
1574
|
+
title ? /* @__PURE__ */ jsx31("span", { className: "pire-shellbar-title", children: title }) : null,
|
|
1575
|
+
/* @__PURE__ */ jsx31("span", { className: "pire-shellbar-spacer" }),
|
|
1576
|
+
onSearch ? /* @__PURE__ */ jsx31(IconButton, { icon: "search", label: searchLabel, variant: "inverse", size: "sm", onPress: onSearch }) : null,
|
|
1288
1577
|
actions,
|
|
1289
|
-
user ? /* @__PURE__ */
|
|
1578
|
+
user ? /* @__PURE__ */ jsx31("span", { className: "pire-avatar", title: user, "aria-label": user, role: "img", children: initials2(user) }) : null
|
|
1290
1579
|
] });
|
|
1291
1580
|
}
|
|
1292
1581
|
|
|
1293
1582
|
// src/components/navigation/SideNav.tsx
|
|
1294
|
-
import * as
|
|
1583
|
+
import * as React10 from "react";
|
|
1295
1584
|
import { Button as AriaButton9, Disclosure, DisclosureGroup, DisclosurePanel } from "react-aria-components";
|
|
1296
|
-
import { jsx as
|
|
1585
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1297
1586
|
function findActiveParent(groups, value) {
|
|
1298
1587
|
if (value == null) return void 0;
|
|
1299
1588
|
for (const group of groups) {
|
|
@@ -1315,12 +1604,13 @@ function SideNav({
|
|
|
1315
1604
|
className,
|
|
1316
1605
|
...rest
|
|
1317
1606
|
}) {
|
|
1607
|
+
const msg = usePireMessages();
|
|
1318
1608
|
const activeParent = findActiveParent(groups, value);
|
|
1319
1609
|
const isControlled = expandedIds != null;
|
|
1320
|
-
const [ownExpanded, setOwnExpanded] =
|
|
1610
|
+
const [ownExpanded, setOwnExpanded] = React10.useState(
|
|
1321
1611
|
() => new Set(defaultExpandedIds ?? (activeParent ? [activeParent] : []))
|
|
1322
1612
|
);
|
|
1323
|
-
const [lastValue, setLastValue] =
|
|
1613
|
+
const [lastValue, setLastValue] = React10.useState(value);
|
|
1324
1614
|
if (value !== lastValue) {
|
|
1325
1615
|
setLastValue(value);
|
|
1326
1616
|
if (!isControlled && activeParent && !ownExpanded.has(activeParent)) {
|
|
@@ -1340,7 +1630,7 @@ function SideNav({
|
|
|
1340
1630
|
};
|
|
1341
1631
|
const renderRow = (item, onPress, isGroup) => {
|
|
1342
1632
|
const selected = !isGroup && item.id === value;
|
|
1343
|
-
const button = /* @__PURE__ */
|
|
1633
|
+
const button = /* @__PURE__ */ jsxs25(
|
|
1344
1634
|
AriaButton9,
|
|
1345
1635
|
{
|
|
1346
1636
|
className: "pire-sidenav-item",
|
|
@@ -1350,17 +1640,17 @@ function SideNav({
|
|
|
1350
1640
|
"aria-label": collapsed ? item.label : void 0,
|
|
1351
1641
|
onPress,
|
|
1352
1642
|
children: [
|
|
1353
|
-
item.icon ? /* @__PURE__ */
|
|
1354
|
-
collapsed ? null : /* @__PURE__ */
|
|
1355
|
-
item.count != null && !collapsed ? /* @__PURE__ */
|
|
1643
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: 16 }) : null,
|
|
1644
|
+
collapsed ? null : /* @__PURE__ */ jsx32("span", { children: item.label }),
|
|
1645
|
+
item.count != null && !collapsed ? /* @__PURE__ */ jsx32("span", { className: "pire-sidenav-count", children: item.count }) : null
|
|
1356
1646
|
]
|
|
1357
1647
|
},
|
|
1358
1648
|
item.id
|
|
1359
1649
|
);
|
|
1360
|
-
return collapsed ? /* @__PURE__ */
|
|
1650
|
+
return collapsed ? /* @__PURE__ */ jsx32(Tooltip, { label: item.label, placement: "right", children: button }, item.id) : button;
|
|
1361
1651
|
};
|
|
1362
|
-
const renderSection = (item) => /* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */
|
|
1652
|
+
const renderSection = (item) => /* @__PURE__ */ jsxs25(Disclosure, { id: item.id, className: "pire-sidenav-section", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxs25(
|
|
1364
1654
|
AriaButton9,
|
|
1365
1655
|
{
|
|
1366
1656
|
slot: "trigger",
|
|
@@ -1368,16 +1658,16 @@ function SideNav({
|
|
|
1368
1658
|
"data-kind": "group",
|
|
1369
1659
|
"data-active-child": item.id === activeParent ? "true" : void 0,
|
|
1370
1660
|
children: [
|
|
1371
|
-
item.icon ? /* @__PURE__ */
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
item.count != null ? /* @__PURE__ */
|
|
1374
|
-
/* @__PURE__ */
|
|
1661
|
+
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: 16 }) : null,
|
|
1662
|
+
/* @__PURE__ */ jsx32("span", { children: item.label }),
|
|
1663
|
+
item.count != null ? /* @__PURE__ */ jsx32("span", { className: "pire-sidenav-count", children: item.count }) : null,
|
|
1664
|
+
/* @__PURE__ */ jsx32(Icon, { name: "chevron-down", size: 16, className: "pire-sidenav-chevron" })
|
|
1375
1665
|
]
|
|
1376
1666
|
}
|
|
1377
1667
|
),
|
|
1378
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx32(DisclosurePanel, { className: "pire-sidenav-subnav", children: item.items?.map((child) => {
|
|
1379
1669
|
const selected = child.id === value;
|
|
1380
|
-
return /* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ jsxs25(
|
|
1381
1671
|
AriaButton9,
|
|
1382
1672
|
{
|
|
1383
1673
|
className: "pire-sidenav-item pire-sidenav-subitem",
|
|
@@ -1385,20 +1675,20 @@ function SideNav({
|
|
|
1385
1675
|
"aria-current": selected ? "page" : void 0,
|
|
1386
1676
|
onPress: () => onChange?.(child.id),
|
|
1387
1677
|
children: [
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
child.count != null ? /* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsx32("span", { children: child.label }),
|
|
1679
|
+
child.count != null ? /* @__PURE__ */ jsx32("span", { className: "pire-sidenav-count", children: child.count }) : null
|
|
1390
1680
|
]
|
|
1391
1681
|
},
|
|
1392
1682
|
child.id
|
|
1393
1683
|
);
|
|
1394
1684
|
}) })
|
|
1395
1685
|
] }, item.id);
|
|
1396
|
-
return /* @__PURE__ */
|
|
1686
|
+
return /* @__PURE__ */ jsxs25(
|
|
1397
1687
|
"nav",
|
|
1398
1688
|
{
|
|
1399
1689
|
className: cx("pire-sidenav", className),
|
|
1400
1690
|
"data-collapsed": collapsed ? "true" : void 0,
|
|
1401
|
-
"aria-label":
|
|
1691
|
+
"aria-label": msg.sideNavLabel,
|
|
1402
1692
|
...rest,
|
|
1403
1693
|
children: [
|
|
1404
1694
|
groups.map((group, gi) => {
|
|
@@ -1408,9 +1698,9 @@ function SideNav({
|
|
|
1408
1698
|
if (isGroup && !collapsed) return renderSection(item);
|
|
1409
1699
|
return renderRow(item, () => isGroup ? toggleExpanded(item.id) : onChange?.(item.id), isGroup);
|
|
1410
1700
|
});
|
|
1411
|
-
return /* @__PURE__ */
|
|
1412
|
-
group.label && !collapsed ? /* @__PURE__ */
|
|
1413
|
-
hasSections ? /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsxs25("div", { className: "pire-sidenav-group", children: [
|
|
1702
|
+
group.label && !collapsed ? /* @__PURE__ */ jsx32("div", { className: "pire-sidenav-label", children: group.label }) : null,
|
|
1703
|
+
hasSections ? /* @__PURE__ */ jsx32(
|
|
1414
1704
|
DisclosureGroup,
|
|
1415
1705
|
{
|
|
1416
1706
|
className: "pire-sidenav-tree",
|
|
@@ -1422,7 +1712,7 @@ function SideNav({
|
|
|
1422
1712
|
) : rows
|
|
1423
1713
|
] }, group.label ?? gi);
|
|
1424
1714
|
}),
|
|
1425
|
-
footer ? /* @__PURE__ */
|
|
1715
|
+
footer ? /* @__PURE__ */ jsx32("div", { className: "pire-sidenav-footer", children: footer }) : null
|
|
1426
1716
|
]
|
|
1427
1717
|
}
|
|
1428
1718
|
);
|
|
@@ -1430,9 +1720,9 @@ function SideNav({
|
|
|
1430
1720
|
|
|
1431
1721
|
// src/components/navigation/Tabs.tsx
|
|
1432
1722
|
import { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanel } from "react-aria-components";
|
|
1433
|
-
import { jsx as
|
|
1723
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1434
1724
|
function Tabs({ items, value, defaultValue, onChange, panels, className, style, ...rest }) {
|
|
1435
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ jsxs26(
|
|
1436
1726
|
AriaTabs,
|
|
1437
1727
|
{
|
|
1438
1728
|
className,
|
|
@@ -1441,22 +1731,22 @@ function Tabs({ items, value, defaultValue, onChange, panels, className, style,
|
|
|
1441
1731
|
defaultSelectedKey: defaultValue,
|
|
1442
1732
|
onSelectionChange: (k) => onChange?.(String(k)),
|
|
1443
1733
|
children: [
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
item.icon ? /* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ jsx33(TabList, { className: "pire-tablist", items, "aria-label": rest["aria-label"] ?? "Views", children: (item) => /* @__PURE__ */ jsxs26(AriaTab, { className: cx("pire-tab"), id: item.id, isDisabled: item.isDisabled, children: [
|
|
1735
|
+
item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: 16 }) : null,
|
|
1446
1736
|
item.label,
|
|
1447
|
-
item.count != null ? /* @__PURE__ */
|
|
1737
|
+
item.count != null ? /* @__PURE__ */ jsx33("span", { className: "pire-tab-count", children: item.count }) : null
|
|
1448
1738
|
] }) }),
|
|
1449
|
-
items.map((item) => /* @__PURE__ */
|
|
1739
|
+
items.map((item) => /* @__PURE__ */ jsx33(TabPanel, { id: item.id, className: panels ? "pire-tabpanel" : void 0, children: panels?.[item.id] }, item.id))
|
|
1450
1740
|
]
|
|
1451
1741
|
}
|
|
1452
1742
|
);
|
|
1453
1743
|
}
|
|
1454
1744
|
|
|
1455
1745
|
// src/components/navigation/Breadcrumb.tsx
|
|
1456
|
-
import { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link } from "react-aria-components";
|
|
1457
|
-
import { jsx as
|
|
1746
|
+
import { Breadcrumbs as AriaBreadcrumbs, Breadcrumb as AriaBreadcrumb, Link as Link2 } from "react-aria-components";
|
|
1747
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1458
1748
|
function Breadcrumb({ items, onNavigate, className, style }) {
|
|
1459
|
-
return /* @__PURE__ */
|
|
1749
|
+
return /* @__PURE__ */ jsx34(
|
|
1460
1750
|
AriaBreadcrumbs,
|
|
1461
1751
|
{
|
|
1462
1752
|
className: cx("pire-breadcrumbs", className),
|
|
@@ -1465,9 +1755,9 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
1465
1755
|
onAction: (key) => onNavigate?.(String(key)),
|
|
1466
1756
|
children: (item) => {
|
|
1467
1757
|
const last = items[items.length - 1] === item;
|
|
1468
|
-
return /* @__PURE__ */
|
|
1469
|
-
last ? item.label : /* @__PURE__ */
|
|
1470
|
-
last ? null : /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ jsxs27(AriaBreadcrumb, { className: "pire-breadcrumb", id: item.id ?? item.label, children: [
|
|
1759
|
+
last ? item.label : /* @__PURE__ */ jsx34(Link2, { href: item.href, children: item.label }),
|
|
1760
|
+
last ? null : /* @__PURE__ */ jsx34(Icon, { name: "chevron-right", size: 12, style: { color: "var(--text-tertiary)" } })
|
|
1471
1761
|
] });
|
|
1472
1762
|
}
|
|
1473
1763
|
}
|
|
@@ -1475,7 +1765,7 @@ function Breadcrumb({ items, onNavigate, className, style }) {
|
|
|
1475
1765
|
}
|
|
1476
1766
|
|
|
1477
1767
|
// src/components/navigation/Pagination.tsx
|
|
1478
|
-
import { jsx as
|
|
1768
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1479
1769
|
function Pagination({
|
|
1480
1770
|
page = 1,
|
|
1481
1771
|
pageSize = 25,
|
|
@@ -1486,49 +1776,39 @@ function Pagination({
|
|
|
1486
1776
|
className,
|
|
1487
1777
|
style
|
|
1488
1778
|
}) {
|
|
1779
|
+
const msg = usePireMessages();
|
|
1489
1780
|
const pages = Math.max(1, Math.ceil(total / pageSize));
|
|
1490
1781
|
const from = total === 0 ? 0 : (page - 1) * pageSize + 1;
|
|
1491
1782
|
const to = Math.min(total, page * pageSize);
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
|
|
1495
|
-
"\u2013",
|
|
1496
|
-
to.toLocaleString(),
|
|
1497
|
-
" of ",
|
|
1498
|
-
total.toLocaleString()
|
|
1499
|
-
] }),
|
|
1500
|
-
/* @__PURE__ */ jsx29(
|
|
1783
|
+
return /* @__PURE__ */ jsxs28("nav", { className: cx("pire-pagination", className), style, "aria-label": msg.paginationLabel, children: [
|
|
1784
|
+
/* @__PURE__ */ jsx35("span", { className: "pire-pagination-count", children: msg.paginationRange.replace("{from}", from.toLocaleString()).replace("{to}", to.toLocaleString()).replace("{total}", total.toLocaleString()) }),
|
|
1785
|
+
/* @__PURE__ */ jsx35(
|
|
1501
1786
|
IconButton,
|
|
1502
1787
|
{
|
|
1503
1788
|
icon: "chevron-left",
|
|
1504
|
-
label:
|
|
1789
|
+
label: msg.paginationPrevious,
|
|
1505
1790
|
size: "sm",
|
|
1506
1791
|
variant: "outlined",
|
|
1507
1792
|
isDisabled: page <= 1,
|
|
1508
1793
|
onPress: () => onPageChange?.(page - 1)
|
|
1509
1794
|
}
|
|
1510
1795
|
),
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
|
|
1513
|
-
page,
|
|
1514
|
-
" of ",
|
|
1515
|
-
pages
|
|
1516
|
-
] }),
|
|
1517
|
-
/* @__PURE__ */ jsx29(
|
|
1796
|
+
/* @__PURE__ */ jsx35("span", { className: "pire-pagination-count", "aria-live": "polite", children: msg.paginationPageOf.replace("{page}", String(page)).replace("{pages}", String(pages)) }),
|
|
1797
|
+
/* @__PURE__ */ jsx35(
|
|
1518
1798
|
IconButton,
|
|
1519
1799
|
{
|
|
1520
1800
|
icon: "chevron-right",
|
|
1521
|
-
label:
|
|
1801
|
+
label: msg.paginationNext,
|
|
1522
1802
|
size: "sm",
|
|
1523
1803
|
variant: "outlined",
|
|
1524
1804
|
isDisabled: page >= pages,
|
|
1525
1805
|
onPress: () => onPageChange?.(page + 1)
|
|
1526
1806
|
}
|
|
1527
1807
|
),
|
|
1528
|
-
onPageSizeChange ? /* @__PURE__ */
|
|
1808
|
+
onPageSizeChange ? /* @__PURE__ */ jsx35(
|
|
1529
1809
|
Select,
|
|
1530
1810
|
{
|
|
1531
|
-
"aria-label":
|
|
1811
|
+
"aria-label": msg.paginationRowsPerPage,
|
|
1532
1812
|
size: "sm",
|
|
1533
1813
|
fullWidth: false,
|
|
1534
1814
|
value: String(pageSize),
|
|
@@ -1540,8 +1820,65 @@ function Pagination({
|
|
|
1540
1820
|
] });
|
|
1541
1821
|
}
|
|
1542
1822
|
|
|
1823
|
+
// src/components/navigation/Menu.tsx
|
|
1824
|
+
import {
|
|
1825
|
+
Menu as AriaMenu,
|
|
1826
|
+
MenuItem as AriaMenuItem,
|
|
1827
|
+
MenuSection as AriaMenuSection,
|
|
1828
|
+
Separator as AriaSeparator2,
|
|
1829
|
+
Header
|
|
1830
|
+
} from "react-aria-components";
|
|
1831
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1832
|
+
function Menu({ minWidth, className, style, ...rest }) {
|
|
1833
|
+
const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
|
|
1834
|
+
const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
|
|
1835
|
+
return /* @__PURE__ */ jsx36(
|
|
1836
|
+
AriaMenu,
|
|
1837
|
+
{
|
|
1838
|
+
className: cx("pire-menu", className),
|
|
1839
|
+
style: menuStyle,
|
|
1840
|
+
...rest
|
|
1841
|
+
}
|
|
1842
|
+
);
|
|
1843
|
+
}
|
|
1844
|
+
function MenuItem({
|
|
1845
|
+
children,
|
|
1846
|
+
icon,
|
|
1847
|
+
description,
|
|
1848
|
+
shortcut,
|
|
1849
|
+
tone = "default",
|
|
1850
|
+
className,
|
|
1851
|
+
...rest
|
|
1852
|
+
}) {
|
|
1853
|
+
return /* @__PURE__ */ jsxs29(
|
|
1854
|
+
AriaMenuItem,
|
|
1855
|
+
{
|
|
1856
|
+
className: cx("pire-menu-item", className),
|
|
1857
|
+
"data-tone": tone === "danger" ? "danger" : void 0,
|
|
1858
|
+
...rest,
|
|
1859
|
+
children: [
|
|
1860
|
+
icon ? /* @__PURE__ */ jsx36(Icon, { name: icon, size: 16, className: "pire-menu-item-icon" }) : null,
|
|
1861
|
+
/* @__PURE__ */ jsxs29("span", { className: "pire-menu-item-body", children: [
|
|
1862
|
+
/* @__PURE__ */ jsx36("span", { className: "pire-menu-item-label", children }),
|
|
1863
|
+
description ? /* @__PURE__ */ jsx36("span", { className: "pire-menu-item-desc", children: description }) : null
|
|
1864
|
+
] }),
|
|
1865
|
+
shortcut ? /* @__PURE__ */ jsx36("kbd", { className: "pire-menu-item-shortcut", children: shortcut }) : null
|
|
1866
|
+
]
|
|
1867
|
+
}
|
|
1868
|
+
);
|
|
1869
|
+
}
|
|
1870
|
+
function MenuSection({ title, children, className, ...rest }) {
|
|
1871
|
+
return /* @__PURE__ */ jsxs29(AriaMenuSection, { className: cx("pire-menu-section", className), ...rest, children: [
|
|
1872
|
+
title ? /* @__PURE__ */ jsx36(Header, { className: "pire-menu-section-title", children: title }) : null,
|
|
1873
|
+
children
|
|
1874
|
+
] });
|
|
1875
|
+
}
|
|
1876
|
+
function MenuSeparator({ className }) {
|
|
1877
|
+
return /* @__PURE__ */ jsx36(AriaSeparator2, { className: cx("pire-menu-separator", className) });
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1543
1880
|
// src/components/feedback/InlineMessage.tsx
|
|
1544
|
-
import { jsx as
|
|
1881
|
+
import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1545
1882
|
var KIND_ICON = {
|
|
1546
1883
|
info: "info",
|
|
1547
1884
|
success: "check-circle-2",
|
|
@@ -1549,8 +1886,9 @@ var KIND_ICON = {
|
|
|
1549
1886
|
error: "alert-octagon"
|
|
1550
1887
|
};
|
|
1551
1888
|
function InlineMessage({ kind = "info", title, action, onClose, children, className, ...rest }) {
|
|
1889
|
+
const msg = usePireMessages();
|
|
1552
1890
|
const assertive = kind === "error" || kind === "warning";
|
|
1553
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsxs30(
|
|
1554
1892
|
"div",
|
|
1555
1893
|
{
|
|
1556
1894
|
className: cx("pire-msg", className),
|
|
@@ -1559,13 +1897,13 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
|
|
|
1559
1897
|
"aria-live": assertive ? "assertive" : "polite",
|
|
1560
1898
|
...rest,
|
|
1561
1899
|
children: [
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
title ? /* @__PURE__ */
|
|
1565
|
-
children ? /* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ jsx37(Icon, { name: KIND_ICON[kind], size: 16, style: { marginTop: 2 } }),
|
|
1901
|
+
/* @__PURE__ */ jsxs30("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--sp-1)" }, children: [
|
|
1902
|
+
title ? /* @__PURE__ */ jsx37("span", { className: "pire-msg-title", children: title }) : null,
|
|
1903
|
+
children ? /* @__PURE__ */ jsx37("span", { className: "pire-msg-body", children }) : null,
|
|
1566
1904
|
action
|
|
1567
1905
|
] }),
|
|
1568
|
-
onClose ? /* @__PURE__ */
|
|
1906
|
+
onClose ? /* @__PURE__ */ jsx37(IconButton, { icon: "x", label: msg.inlineMessageDismiss, size: "sm", onPress: onClose }) : null
|
|
1569
1907
|
]
|
|
1570
1908
|
}
|
|
1571
1909
|
);
|
|
@@ -1573,7 +1911,7 @@ function InlineMessage({ kind = "info", title, action, onClose, children, classN
|
|
|
1573
1911
|
|
|
1574
1912
|
// src/components/feedback/ProgressBar.tsx
|
|
1575
1913
|
import { ProgressBar as AriaProgressBar, Label as Label9 } from "react-aria-components";
|
|
1576
|
-
import { Fragment as Fragment2, jsx as
|
|
1914
|
+
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1577
1915
|
function ProgressBar({
|
|
1578
1916
|
value = 0,
|
|
1579
1917
|
minValue = 0,
|
|
@@ -1586,7 +1924,7 @@ function ProgressBar({
|
|
|
1586
1924
|
className,
|
|
1587
1925
|
style
|
|
1588
1926
|
}) {
|
|
1589
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ jsx38(
|
|
1590
1928
|
AriaProgressBar,
|
|
1591
1929
|
{
|
|
1592
1930
|
className: cx("pire-progress", className),
|
|
@@ -1597,20 +1935,20 @@ function ProgressBar({
|
|
|
1597
1935
|
maxValue,
|
|
1598
1936
|
isIndeterminate,
|
|
1599
1937
|
style,
|
|
1600
|
-
children: ({ percentage, valueText }) => /* @__PURE__ */
|
|
1601
|
-
label || showValue ? /* @__PURE__ */
|
|
1602
|
-
label ? /* @__PURE__ */
|
|
1603
|
-
showValue && !isIndeterminate ? /* @__PURE__ */
|
|
1938
|
+
children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs31(Fragment2, { children: [
|
|
1939
|
+
label || showValue ? /* @__PURE__ */ jsxs31("div", { className: "pire-progress-head", children: [
|
|
1940
|
+
label ? /* @__PURE__ */ jsx38(Label9, { children: label }) : /* @__PURE__ */ jsx38("span", {}),
|
|
1941
|
+
showValue && !isIndeterminate ? /* @__PURE__ */ jsx38("span", { className: "pire-numeric", children: valueText }) : null
|
|
1604
1942
|
] }) : null,
|
|
1605
|
-
/* @__PURE__ */
|
|
1943
|
+
/* @__PURE__ */ jsx38("div", { className: "pire-progress-track", children: /* @__PURE__ */ jsx38("div", { className: "pire-progress-fill", style: { width: `${isIndeterminate ? 40 : percentage}%` } }) })
|
|
1606
1944
|
] })
|
|
1607
1945
|
}
|
|
1608
1946
|
);
|
|
1609
1947
|
}
|
|
1610
1948
|
|
|
1611
1949
|
// src/components/feedback/Toast.tsx
|
|
1612
|
-
import * as
|
|
1613
|
-
import { jsx as
|
|
1950
|
+
import * as React11 from "react";
|
|
1951
|
+
import { jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1614
1952
|
var KIND_ICON2 = {
|
|
1615
1953
|
info: "info",
|
|
1616
1954
|
success: "check-circle-2",
|
|
@@ -1618,7 +1956,8 @@ var KIND_ICON2 = {
|
|
|
1618
1956
|
error: "alert-octagon"
|
|
1619
1957
|
};
|
|
1620
1958
|
function Toast({ kind = "success", onClose, position = "bottom-center", children, className, ...rest }) {
|
|
1621
|
-
|
|
1959
|
+
const msg = usePireMessages();
|
|
1960
|
+
return /* @__PURE__ */ jsxs32(
|
|
1622
1961
|
"div",
|
|
1623
1962
|
{
|
|
1624
1963
|
className: cx("pire-toast", className),
|
|
@@ -1627,84 +1966,40 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
|
|
|
1627
1966
|
"aria-live": kind === "error" ? "assertive" : "polite",
|
|
1628
1967
|
...rest,
|
|
1629
1968
|
children: [
|
|
1630
|
-
/* @__PURE__ */
|
|
1631
|
-
/* @__PURE__ */
|
|
1632
|
-
onClose ? /* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx39(Icon, { name: KIND_ICON2[kind], size: 16 }),
|
|
1970
|
+
/* @__PURE__ */ jsx39("span", { style: { flex: 1 }, children }),
|
|
1971
|
+
onClose ? /* @__PURE__ */ jsx39(IconButton, { icon: "x", label: msg.toastDismiss, size: "sm", variant: "inverse", onPress: onClose }) : null
|
|
1633
1972
|
]
|
|
1634
1973
|
}
|
|
1635
1974
|
);
|
|
1636
1975
|
}
|
|
1637
|
-
var ToastContext =
|
|
1976
|
+
var ToastContext = React11.createContext(null);
|
|
1638
1977
|
function ToastProvider({ children, timeout = 6e3 }) {
|
|
1639
|
-
const
|
|
1640
|
-
const
|
|
1641
|
-
const
|
|
1978
|
+
const msg = usePireMessages();
|
|
1979
|
+
const [toasts, setToasts] = React11.useState([]);
|
|
1980
|
+
const close = React11.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
|
|
1981
|
+
const add = React11.useCallback((toast) => {
|
|
1642
1982
|
const id = Math.random().toString(36).slice(2);
|
|
1643
1983
|
setToasts((t) => [...t, { ...toast, id }]);
|
|
1644
1984
|
const ms = toast.timeout ?? timeout;
|
|
1645
1985
|
if (ms > 0) setTimeout(() => close(id), ms);
|
|
1646
1986
|
return id;
|
|
1647
1987
|
}, [close, timeout]);
|
|
1648
|
-
const value =
|
|
1649
|
-
return /* @__PURE__ */
|
|
1988
|
+
const value = React11.useMemo(() => ({ add, close }), [add, close]);
|
|
1989
|
+
return /* @__PURE__ */ jsxs32(ToastContext.Provider, { value, children: [
|
|
1650
1990
|
children,
|
|
1651
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ jsx39("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx39(Toast, { kind: t.kind, onClose: () => close(t.id), style: { position: "static", transform: "none" }, children: t.message }, t.id)) })
|
|
1652
1992
|
] });
|
|
1653
1993
|
}
|
|
1654
1994
|
function useToast() {
|
|
1655
|
-
const ctx =
|
|
1995
|
+
const ctx = React11.useContext(ToastContext);
|
|
1656
1996
|
if (!ctx) throw new Error("useToast must be used inside <ToastProvider>");
|
|
1657
1997
|
return ctx;
|
|
1658
1998
|
}
|
|
1659
1999
|
|
|
1660
|
-
// src/components/feedback/Skeleton.tsx
|
|
1661
|
-
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1662
|
-
function Skeleton({ shape = "text", width, height, className, style, ...rest }) {
|
|
1663
|
-
return /* @__PURE__ */ jsx33(
|
|
1664
|
-
"div",
|
|
1665
|
-
{
|
|
1666
|
-
className: cx("pire-skeleton", className),
|
|
1667
|
-
"data-shape": shape,
|
|
1668
|
-
"aria-hidden": "true",
|
|
1669
|
-
style: { width, height, ...style },
|
|
1670
|
-
...rest
|
|
1671
|
-
}
|
|
1672
|
-
);
|
|
1673
|
-
}
|
|
1674
|
-
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
1675
|
-
function SkeletonTableRow({ columns, density = "regular", className, style, ...rest }) {
|
|
1676
|
-
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
1677
|
-
return /* @__PURE__ */ jsx33(
|
|
1678
|
-
"div",
|
|
1679
|
-
{
|
|
1680
|
-
className: cx("pire-skeleton-row", className),
|
|
1681
|
-
"data-density": density,
|
|
1682
|
-
"aria-hidden": "true",
|
|
1683
|
-
style,
|
|
1684
|
-
...rest,
|
|
1685
|
-
children: cells.map((c, i) => {
|
|
1686
|
-
const align = c.numeric ? "right" : c.align ?? "left";
|
|
1687
|
-
return (
|
|
1688
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: columns are positional and never reordered.
|
|
1689
|
-
/* @__PURE__ */ jsx33(
|
|
1690
|
-
"div",
|
|
1691
|
-
{
|
|
1692
|
-
className: "pire-skeleton-cell",
|
|
1693
|
-
"data-align": align,
|
|
1694
|
-
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
1695
|
-
children: /* @__PURE__ */ jsx33(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
1696
|
-
},
|
|
1697
|
-
i
|
|
1698
|
-
)
|
|
1699
|
-
);
|
|
1700
|
-
})
|
|
1701
|
-
}
|
|
1702
|
-
);
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
2000
|
// src/components/data/KpiTile.tsx
|
|
1706
2001
|
import { Button as AriaButton10 } from "react-aria-components";
|
|
1707
|
-
import { Fragment as Fragment3, jsx as
|
|
2002
|
+
import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1708
2003
|
function KpiTile({
|
|
1709
2004
|
label,
|
|
1710
2005
|
value,
|
|
@@ -1720,50 +2015,50 @@ function KpiTile({
|
|
|
1720
2015
|
style
|
|
1721
2016
|
}) {
|
|
1722
2017
|
const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
|
|
1723
|
-
const body = /* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
icon ? /* @__PURE__ */
|
|
2018
|
+
const body = /* @__PURE__ */ jsxs33(Fragment3, { children: [
|
|
2019
|
+
/* @__PURE__ */ jsxs33("span", { className: "pire-kpi-label", children: [
|
|
2020
|
+
icon ? /* @__PURE__ */ jsx40(Icon, { name: icon, size: 16 }) : null,
|
|
1726
2021
|
label
|
|
1727
2022
|
] }),
|
|
1728
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsxs33("span", { className: "pire-kpi-value", children: [
|
|
1729
2024
|
value,
|
|
1730
|
-
unit ? /* @__PURE__ */
|
|
2025
|
+
unit ? /* @__PURE__ */ jsx40("span", { className: "pire-kpi-unit", children: unit }) : null
|
|
1731
2026
|
] }),
|
|
1732
|
-
delta ? /* @__PURE__ */
|
|
1733
|
-
deltaDirection ? /* @__PURE__ */
|
|
2027
|
+
delta ? /* @__PURE__ */ jsxs33("span", { className: "pire-kpi-delta", "data-tone": tone, children: [
|
|
2028
|
+
deltaDirection ? /* @__PURE__ */ jsx40(Icon, { name: deltaDirection === "up" ? "trending-up" : "trending-down", size: 12 }) : null,
|
|
1734
2029
|
delta
|
|
1735
2030
|
] }) : null,
|
|
1736
|
-
footnote ? /* @__PURE__ */
|
|
2031
|
+
footnote ? /* @__PURE__ */ jsx40("span", { className: "pire-kpi-foot", children: footnote }) : null
|
|
1737
2032
|
] });
|
|
1738
2033
|
const props = { className: cx("pire-kpi", className), "data-status": status, style };
|
|
1739
|
-
return onPress ? /* @__PURE__ */
|
|
2034
|
+
return onPress ? /* @__PURE__ */ jsx40(AriaButton10, { ...props, "data-pressable": "true", onPress, children: body }) : /* @__PURE__ */ jsx40("div", { ...props, children: body });
|
|
1740
2035
|
}
|
|
1741
2036
|
|
|
1742
2037
|
// src/components/data/ObjectHeader.tsx
|
|
1743
|
-
import { jsx as
|
|
2038
|
+
import { jsx as jsx41, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1744
2039
|
function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions, className, ...rest }) {
|
|
1745
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ jsxs34("header", { className: cx("pire-objheader", className), ...rest, children: [
|
|
1746
2041
|
breadcrumb,
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
subtitle || id ? /* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ jsxs34("div", { className: "pire-objheader-row", children: [
|
|
2043
|
+
/* @__PURE__ */ jsxs34("div", { style: { minWidth: 0 }, children: [
|
|
2044
|
+
/* @__PURE__ */ jsx41("h1", { className: "pire-objheader-title", children: title }),
|
|
2045
|
+
subtitle || id ? /* @__PURE__ */ jsxs34("div", { className: "pire-objheader-sub", children: [
|
|
1751
2046
|
subtitle,
|
|
1752
|
-
id ? /* @__PURE__ */
|
|
2047
|
+
id ? /* @__PURE__ */ jsx41("span", { className: "pire-objheader-id", children: id }) : null
|
|
1753
2048
|
] }) : null
|
|
1754
2049
|
] }),
|
|
1755
2050
|
badge,
|
|
1756
|
-
actions ? /* @__PURE__ */
|
|
2051
|
+
actions ? /* @__PURE__ */ jsx41("div", { className: "pire-objheader-actions", children: actions }) : null
|
|
1757
2052
|
] }),
|
|
1758
|
-
facts?.length ? /* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
2053
|
+
facts?.length ? /* @__PURE__ */ jsx41("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs34("div", { children: [
|
|
2054
|
+
/* @__PURE__ */ jsx41("dt", { className: "pire-fact-label", children: fact.label }),
|
|
2055
|
+
/* @__PURE__ */ jsx41("dd", { className: "pire-fact-value", "data-numeric": fact.numeric ? "true" : void 0, style: { margin: 0 }, children: fact.value })
|
|
1761
2056
|
] }, fact.label)) }) : null
|
|
1762
2057
|
] });
|
|
1763
2058
|
}
|
|
1764
2059
|
|
|
1765
2060
|
// src/components/data/FilterBar.tsx
|
|
1766
|
-
import { jsx as
|
|
2061
|
+
import { jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1767
2062
|
function FilterBar({
|
|
1768
2063
|
children,
|
|
1769
2064
|
activeFilters = [],
|
|
@@ -1772,118 +2067,144 @@ function FilterBar({
|
|
|
1772
2067
|
onGo,
|
|
1773
2068
|
resultLabel,
|
|
1774
2069
|
actions,
|
|
2070
|
+
goLabel,
|
|
2071
|
+
clearAllLabel,
|
|
1775
2072
|
className,
|
|
1776
2073
|
...rest
|
|
1777
2074
|
}) {
|
|
1778
|
-
|
|
1779
|
-
|
|
2075
|
+
const label = useMessage("filterBarLabel", rest["aria-label"]);
|
|
2076
|
+
const go = useMessage("filterBarGo", goLabel);
|
|
2077
|
+
const clearAll = useMessage("filterBarClearAll", clearAllLabel);
|
|
2078
|
+
return /* @__PURE__ */ jsxs35("section", { className: cx("pire-filterbar", className), ...rest, "aria-label": label, children: [
|
|
2079
|
+
/* @__PURE__ */ jsxs35("div", { className: "pire-filterbar-controls", children: [
|
|
1780
2080
|
children,
|
|
1781
|
-
onGo ? /* @__PURE__ */
|
|
2081
|
+
onGo ? /* @__PURE__ */ jsx42(Button, { variant: "primary", onPress: onGo, children: go }) : null
|
|
1782
2082
|
] }),
|
|
1783
|
-
activeFilters.length || resultLabel || actions ? /* @__PURE__ */
|
|
1784
|
-
activeFilters.map((filter) => /* @__PURE__ */
|
|
1785
|
-
activeFilters.length && onClear ? /* @__PURE__ */
|
|
1786
|
-
resultLabel ? /* @__PURE__ */
|
|
1787
|
-
actions ? /* @__PURE__ */
|
|
2083
|
+
activeFilters.length || resultLabel || actions ? /* @__PURE__ */ jsxs35("div", { className: "pire-filterbar-foot", children: [
|
|
2084
|
+
activeFilters.map((filter) => /* @__PURE__ */ jsx42(Tag, { onRemove: onRemoveFilter ? () => onRemoveFilter(filter.id) : void 0, children: filter.label }, filter.id)),
|
|
2085
|
+
activeFilters.length && onClear ? /* @__PURE__ */ jsx42(Button, { variant: "tertiary", size: "sm", onPress: onClear, children: clearAll }) : null,
|
|
2086
|
+
resultLabel ? /* @__PURE__ */ jsx42("span", { className: "pire-filterbar-result", "aria-live": "polite", children: resultLabel }) : null,
|
|
2087
|
+
actions ? /* @__PURE__ */ jsx42("div", { className: "pire-filterbar-actions", children: actions }) : null
|
|
1788
2088
|
] }) : null
|
|
1789
2089
|
] });
|
|
1790
2090
|
}
|
|
1791
2091
|
|
|
1792
2092
|
// src/components/data/DescriptionList.tsx
|
|
1793
|
-
import { jsx as
|
|
2093
|
+
import { jsx as jsx43, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1794
2094
|
function DescriptionList({ items, layout = "rows", columns = 3, className, style, ...rest }) {
|
|
1795
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ jsx43(
|
|
1796
2096
|
"dl",
|
|
1797
2097
|
{
|
|
1798
2098
|
className: cx("pire-dl", className),
|
|
1799
2099
|
"data-layout": layout,
|
|
1800
2100
|
style: { ...layout === "grid" ? { "--pire-dl-cols": columns } : null, ...style },
|
|
1801
2101
|
...rest,
|
|
1802
|
-
children: items.map((item, i) => /* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
2102
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs36("div", { className: "pire-dl-row", "data-emphasis": item.emphasis ? "true" : void 0, children: [
|
|
2103
|
+
/* @__PURE__ */ jsxs36("dt", { className: "pire-dl-term", children: [
|
|
1804
2104
|
item.label,
|
|
1805
2105
|
item.hint
|
|
1806
2106
|
] }),
|
|
1807
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx43("dd", { className: "pire-dl-value", "data-numeric": item.numeric ? "true" : void 0, children: item.value })
|
|
1808
2108
|
] }, i))
|
|
1809
2109
|
}
|
|
1810
2110
|
);
|
|
1811
2111
|
}
|
|
1812
2112
|
|
|
1813
2113
|
// src/components/data/Timeline.tsx
|
|
1814
|
-
import { jsx as
|
|
2114
|
+
import { jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1815
2115
|
function Timeline({ entries, reverse = false, className, ...rest }) {
|
|
1816
2116
|
const list = reverse ? [...entries].reverse() : entries;
|
|
1817
|
-
return /* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
entry.actor ? /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ jsx44("ol", { className: cx("pire-timeline", className), ...rest, children: list.map((entry, i) => /* @__PURE__ */ jsxs37("li", { className: "pire-timeline-item", children: [
|
|
2118
|
+
/* @__PURE__ */ jsx44("span", { className: "pire-timeline-time", children: entry.time }),
|
|
2119
|
+
/* @__PURE__ */ jsx44("span", { className: "pire-timeline-text", children: entry.event }),
|
|
2120
|
+
entry.actor ? /* @__PURE__ */ jsx44("span", { className: "pire-timeline-actor", children: entry.actor }) : null
|
|
1821
2121
|
] }, entry.id ?? i)) });
|
|
1822
2122
|
}
|
|
1823
2123
|
|
|
1824
2124
|
// src/components/data/LinkList.tsx
|
|
1825
2125
|
import { Button as AriaButton11 } from "react-aria-components";
|
|
1826
|
-
import { jsx as
|
|
2126
|
+
import { jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
1827
2127
|
function LinkList({ items, onSelect, className, ...rest }) {
|
|
1828
|
-
return /* @__PURE__ */
|
|
1829
|
-
item.icon ? /* @__PURE__ */
|
|
1830
|
-
item.key ? /* @__PURE__ */
|
|
1831
|
-
item.text ? /* @__PURE__ */
|
|
2128
|
+
return /* @__PURE__ */ jsx45("div", { className: cx("pire-linklist", className), role: "list", ...rest, children: items.map((item) => /* @__PURE__ */ jsxs38(AriaButton11, { className: "pire-linklist-item", onPress: () => onSelect?.(item.id), children: [
|
|
2129
|
+
item.icon ? /* @__PURE__ */ jsx45(Icon, { name: item.icon, size: 16, style: { color: "var(--text-secondary)" } }) : null,
|
|
2130
|
+
item.key ? /* @__PURE__ */ jsx45("span", { className: "pire-linklist-key", children: item.key }) : null,
|
|
2131
|
+
item.text ? /* @__PURE__ */ jsx45("span", { className: "pire-linklist-text", children: item.text }) : null,
|
|
1832
2132
|
item.trailing
|
|
1833
2133
|
] }, item.id)) });
|
|
1834
2134
|
}
|
|
1835
2135
|
|
|
2136
|
+
// src/components/layout/PageBand.tsx
|
|
2137
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2138
|
+
function PageBand({
|
|
2139
|
+
surface = "card",
|
|
2140
|
+
hasBorder = true,
|
|
2141
|
+
children,
|
|
2142
|
+
className,
|
|
2143
|
+
...rest
|
|
2144
|
+
}) {
|
|
2145
|
+
return /* @__PURE__ */ jsx46(
|
|
2146
|
+
"div",
|
|
2147
|
+
{
|
|
2148
|
+
className: cx("pire-pageband", className),
|
|
2149
|
+
"data-surface": surface,
|
|
2150
|
+
"data-border": hasBorder ? "true" : void 0,
|
|
2151
|
+
...rest,
|
|
2152
|
+
children
|
|
2153
|
+
}
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
|
|
1836
2157
|
// src/components/layout/PageHeader.tsx
|
|
1837
|
-
import { jsx as
|
|
2158
|
+
import { jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
1838
2159
|
function PageHeader({ title, subtitle, actions, className, ...rest }) {
|
|
1839
|
-
return /* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
subtitle ? /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ jsxs39("header", { className: cx("pire-pageheader", className), ...rest, children: [
|
|
2161
|
+
/* @__PURE__ */ jsxs39("div", { style: { minWidth: 0 }, children: [
|
|
2162
|
+
/* @__PURE__ */ jsx47("h1", { className: "pire-pageheader-title", children: title }),
|
|
2163
|
+
subtitle ? /* @__PURE__ */ jsx47("p", { className: "pire-pageheader-sub", children: subtitle }) : null
|
|
1843
2164
|
] }),
|
|
1844
|
-
actions ? /* @__PURE__ */
|
|
2165
|
+
actions ? /* @__PURE__ */ jsx47("div", { className: "pire-pageheader-actions", children: actions }) : null
|
|
1845
2166
|
] });
|
|
1846
2167
|
}
|
|
1847
2168
|
|
|
1848
2169
|
// src/components/layout/SectionHeader.tsx
|
|
1849
|
-
import { jsx as
|
|
2170
|
+
import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
1850
2171
|
function SectionHeader({ title, meta, actions, className, ...rest }) {
|
|
1851
|
-
return /* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
meta ? /* @__PURE__ */
|
|
1854
|
-
actions ? /* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ jsxs40("div", { className: cx("pire-sectionhead", className), ...rest, children: [
|
|
2173
|
+
/* @__PURE__ */ jsx48("span", { className: "pire-eyebrow", children: title }),
|
|
2174
|
+
meta ? /* @__PURE__ */ jsx48("span", { style: { font: "var(--type-caption)", color: "var(--text-tertiary)" }, children: meta }) : null,
|
|
2175
|
+
actions ? /* @__PURE__ */ jsx48("div", { className: "pire-sectionhead-actions", children: actions }) : null
|
|
1855
2176
|
] });
|
|
1856
2177
|
}
|
|
1857
2178
|
|
|
1858
2179
|
// src/components/layout/SelectionBar.tsx
|
|
1859
|
-
import { jsx as
|
|
2180
|
+
import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
1860
2181
|
function SelectionBar({ count, noun = "record", children, actions, className, ...rest }) {
|
|
1861
2182
|
if (!count) return null;
|
|
1862
|
-
return /* @__PURE__ */
|
|
1863
|
-
/* @__PURE__ */
|
|
2183
|
+
return /* @__PURE__ */ jsxs41("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
|
|
2184
|
+
/* @__PURE__ */ jsxs41("span", { className: "pire-selectionbar-count", children: [
|
|
1864
2185
|
count.toLocaleString(),
|
|
1865
2186
|
" ",
|
|
1866
2187
|
noun,
|
|
1867
2188
|
count === 1 ? "" : "s",
|
|
1868
2189
|
" selected"
|
|
1869
2190
|
] }),
|
|
1870
|
-
children ? /* @__PURE__ */
|
|
1871
|
-
actions ? /* @__PURE__ */
|
|
2191
|
+
children ? /* @__PURE__ */ jsx49("span", { style: { color: "var(--text-secondary)", font: "var(--type-caption)" }, children }) : null,
|
|
2192
|
+
actions ? /* @__PURE__ */ jsx49("div", { className: "pire-selectionbar-actions", children: actions }) : null
|
|
1872
2193
|
] });
|
|
1873
2194
|
}
|
|
1874
2195
|
|
|
1875
2196
|
// src/components/layout/FooterBar.tsx
|
|
1876
|
-
import { jsx as
|
|
2197
|
+
import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
1877
2198
|
function FooterBar({ note, actions, children, className, ...rest }) {
|
|
1878
|
-
return /* @__PURE__ */
|
|
1879
|
-
note ? /* @__PURE__ */
|
|
2199
|
+
return /* @__PURE__ */ jsxs42("footer", { className: cx("pire-footerbar", className), ...rest, children: [
|
|
2200
|
+
note ? /* @__PURE__ */ jsx50("span", { className: "pire-footerbar-note", children: note }) : null,
|
|
1880
2201
|
children,
|
|
1881
|
-
actions ? /* @__PURE__ */
|
|
2202
|
+
actions ? /* @__PURE__ */ jsx50("div", { className: "pire-footerbar-actions", children: actions }) : null
|
|
1882
2203
|
] });
|
|
1883
2204
|
}
|
|
1884
2205
|
|
|
1885
2206
|
// src/components/patterns/ConfirmDialog.tsx
|
|
1886
|
-
import { Fragment as Fragment4, jsx as
|
|
2207
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
1887
2208
|
function ConfirmDialog({
|
|
1888
2209
|
isOpen,
|
|
1889
2210
|
title,
|
|
@@ -1897,7 +2218,7 @@ function ConfirmDialog({
|
|
|
1897
2218
|
onConfirm,
|
|
1898
2219
|
onCancel
|
|
1899
2220
|
}) {
|
|
1900
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ jsxs43(
|
|
1901
2222
|
Dialog,
|
|
1902
2223
|
{
|
|
1903
2224
|
isOpen,
|
|
@@ -1907,12 +2228,12 @@ function ConfirmDialog({
|
|
|
1907
2228
|
onClose: onCancel,
|
|
1908
2229
|
isDismissable: !isBusy,
|
|
1909
2230
|
showClose: false,
|
|
1910
|
-
footer: /* @__PURE__ */
|
|
1911
|
-
/* @__PURE__ */
|
|
1912
|
-
/* @__PURE__ */
|
|
2231
|
+
footer: /* @__PURE__ */ jsxs43(Fragment4, { children: [
|
|
2232
|
+
/* @__PURE__ */ jsx51(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
|
|
2233
|
+
/* @__PURE__ */ jsx51(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
|
|
1913
2234
|
] }),
|
|
1914
2235
|
children: [
|
|
1915
|
-
consequence ? /* @__PURE__ */
|
|
2236
|
+
consequence ? /* @__PURE__ */ jsx51(InlineMessage, { kind: tone === "danger" ? "error" : "warning", style: { marginBottom: children ? "var(--sp-3)" : 0 }, children: consequence }) : null,
|
|
1916
2237
|
children
|
|
1917
2238
|
]
|
|
1918
2239
|
}
|
|
@@ -1920,10 +2241,11 @@ function ConfirmDialog({
|
|
|
1920
2241
|
}
|
|
1921
2242
|
|
|
1922
2243
|
// src/components/patterns/SidePanel.tsx
|
|
1923
|
-
import { ModalOverlay as ModalOverlay2, Modal as Modal2, Dialog as AriaDialog3, Heading as
|
|
1924
|
-
import { jsx as
|
|
2244
|
+
import { ModalOverlay as ModalOverlay2, Modal as Modal2, Dialog as AriaDialog3, Heading as Heading4 } from "react-aria-components";
|
|
2245
|
+
import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
1925
2246
|
function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onClose, className }) {
|
|
1926
|
-
|
|
2247
|
+
const msg = usePireMessages();
|
|
2248
|
+
return /* @__PURE__ */ jsx52(
|
|
1927
2249
|
ModalOverlay2,
|
|
1928
2250
|
{
|
|
1929
2251
|
className: "pire-sidepanel-overlay",
|
|
@@ -1932,34 +2254,34 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
|
|
|
1932
2254
|
onOpenChange: (o) => {
|
|
1933
2255
|
if (!o) onClose?.();
|
|
1934
2256
|
},
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
subtitle ? /* @__PURE__ */
|
|
2257
|
+
children: /* @__PURE__ */ jsx52(Modal2, { className: cx("pire-sidepanel", className), style: { width }, children: /* @__PURE__ */ jsxs44(AriaDialog3, { className: "pire-dialog", style: { height: "100%" }, children: [
|
|
2258
|
+
/* @__PURE__ */ jsxs44("header", { className: "pire-dialog-head", children: [
|
|
2259
|
+
/* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2260
|
+
/* @__PURE__ */ jsx52(Heading4, { slot: "title", className: "pire-dialog-title", children: title }),
|
|
2261
|
+
subtitle ? /* @__PURE__ */ jsx52("p", { className: "pire-dialog-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
1940
2262
|
] }),
|
|
1941
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ jsx52(IconButton, { icon: "x", label: msg.sidePanelClose, size: "sm", onPress: onClose })
|
|
1942
2264
|
] }),
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
footer ? /* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx52("div", { className: "pire-dialog-body", style: { flex: 1 }, children }),
|
|
2266
|
+
footer ? /* @__PURE__ */ jsx52("footer", { className: "pire-dialog-foot", children: footer }) : null
|
|
1945
2267
|
] }) })
|
|
1946
2268
|
}
|
|
1947
2269
|
);
|
|
1948
2270
|
}
|
|
1949
2271
|
|
|
1950
2272
|
// src/components/patterns/EmptyState.tsx
|
|
1951
|
-
import { jsx as
|
|
2273
|
+
import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
1952
2274
|
function EmptyState({ icon = "file-text", title, action, compact, children, className, ...rest }) {
|
|
1953
|
-
return /* @__PURE__ */
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
title ? /* @__PURE__ */
|
|
1956
|
-
children ? /* @__PURE__ */
|
|
2275
|
+
return /* @__PURE__ */ jsxs45("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
|
|
2276
|
+
/* @__PURE__ */ jsx53(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
|
|
2277
|
+
title ? /* @__PURE__ */ jsx53("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
|
|
2278
|
+
children ? /* @__PURE__ */ jsx53("p", { className: "pire-empty-body", style: { margin: 0 }, children }) : null,
|
|
1957
2279
|
action
|
|
1958
2280
|
] });
|
|
1959
2281
|
}
|
|
1960
2282
|
|
|
1961
2283
|
// src/index.ts
|
|
1962
|
-
import { DialogTrigger, MenuTrigger,
|
|
2284
|
+
import { DialogTrigger, MenuTrigger, SubmenuTrigger, Popover as Popover5, RouterProvider, I18nProvider } from "react-aria-components";
|
|
1963
2285
|
export {
|
|
1964
2286
|
Avatar,
|
|
1965
2287
|
Badge,
|
|
@@ -1978,25 +2300,32 @@ export {
|
|
|
1978
2300
|
FilterBar,
|
|
1979
2301
|
FooterBar,
|
|
1980
2302
|
FormField,
|
|
2303
|
+
Heading,
|
|
1981
2304
|
I18nProvider,
|
|
1982
2305
|
Icon,
|
|
1983
2306
|
IconButton,
|
|
1984
2307
|
InlineMessage,
|
|
1985
2308
|
Input,
|
|
1986
2309
|
KpiTile,
|
|
2310
|
+
Link,
|
|
1987
2311
|
LinkList,
|
|
1988
2312
|
Menu,
|
|
1989
2313
|
MenuItem,
|
|
2314
|
+
MenuSection,
|
|
2315
|
+
MenuSeparator,
|
|
1990
2316
|
MenuTrigger,
|
|
1991
2317
|
MultiComboBox,
|
|
1992
2318
|
NumberField,
|
|
1993
2319
|
ObjectHeader,
|
|
2320
|
+
PageBand,
|
|
1994
2321
|
PageHeader,
|
|
1995
2322
|
Pagination,
|
|
2323
|
+
PireIntlProvider,
|
|
1996
2324
|
Popover5 as Popover,
|
|
1997
2325
|
ProgressBar,
|
|
1998
2326
|
Radio,
|
|
1999
2327
|
RadioGroup,
|
|
2328
|
+
RouterProvider,
|
|
2000
2329
|
SectionHeader,
|
|
2001
2330
|
SegmentedControl,
|
|
2002
2331
|
Select,
|
|
@@ -2007,9 +2336,12 @@ export {
|
|
|
2007
2336
|
SidePanel,
|
|
2008
2337
|
Skeleton,
|
|
2009
2338
|
SkeletonTableRow,
|
|
2339
|
+
Strong,
|
|
2340
|
+
SubmenuTrigger,
|
|
2010
2341
|
Switch,
|
|
2011
2342
|
Tabs,
|
|
2012
2343
|
Tag,
|
|
2344
|
+
Text,
|
|
2013
2345
|
TextArea,
|
|
2014
2346
|
Timeline,
|
|
2015
2347
|
Toast,
|
|
@@ -2018,6 +2350,9 @@ export {
|
|
|
2018
2350
|
ValueHelpDialog,
|
|
2019
2351
|
ValueHelpField,
|
|
2020
2352
|
configureIcons,
|
|
2353
|
+
enMessages,
|
|
2354
|
+
esMessages,
|
|
2355
|
+
usePireMessages,
|
|
2021
2356
|
useToast
|
|
2022
2357
|
};
|
|
2023
2358
|
//# sourceMappingURL=index.js.map
|