@orianatech/pire 1.4.0 → 1.5.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/Avatar.d.ts.map +1 -1
- package/dist/components/core/Badge.d.ts.map +1 -1
- package/dist/components/core/Button.d.ts.map +1 -1
- package/dist/components/core/Card.d.ts.map +1 -1
- package/dist/components/core/Heading.d.ts.map +1 -1
- package/dist/components/core/Icon.d.ts.map +1 -1
- package/dist/components/core/IconButton.d.ts.map +1 -1
- package/dist/components/core/Kbd.d.ts.map +1 -1
- package/dist/components/core/SegmentedControl.d.ts.map +1 -1
- package/dist/components/core/Separator.d.ts.map +1 -1
- package/dist/components/core/Tag.d.ts.map +1 -1
- package/dist/components/core/Text.d.ts.map +1 -1
- package/dist/components/core/icon-map.d.ts.map +1 -1
- package/dist/components/data/BarChart.d.ts.map +1 -1
- package/dist/components/data/ChartFrame.d.ts.map +1 -1
- package/dist/components/data/DataTable.d.ts.map +1 -1
- package/dist/components/data/DescriptionList.d.ts.map +1 -1
- package/dist/components/data/DonutChart.d.ts.map +1 -1
- package/dist/components/data/FilterBar.d.ts.map +1 -1
- package/dist/components/data/KpiTile.d.cts +1 -1
- package/dist/components/data/KpiTile.d.ts +1 -1
- package/dist/components/data/KpiTile.d.ts.map +1 -1
- package/dist/components/data/LineChart.d.ts.map +1 -1
- package/dist/components/data/LinkList.d.ts.map +1 -1
- package/dist/components/data/ObjectHeader.d.ts.map +1 -1
- package/dist/components/data/RecordCard.d.ts.map +1 -1
- package/dist/components/data/ViewSwitcher.d.cts +1 -1
- package/dist/components/data/ViewSwitcher.d.ts +1 -1
- package/dist/components/data/ViewSwitcher.d.ts.map +1 -1
- package/dist/components/data/chartGeometry.d.ts.map +1 -1
- package/dist/components/feedback/Dialog.d.cts +1 -1
- package/dist/components/feedback/Dialog.d.ts +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/ProgressBar.d.cts +1 -1
- package/dist/components/feedback/ProgressBar.d.ts +1 -1
- package/dist/components/feedback/ProgressBar.d.ts.map +1 -1
- package/dist/components/feedback/Skeleton.d.ts.map +1 -1
- package/dist/components/feedback/Toast.d.cts +1 -1
- package/dist/components/feedback/Toast.d.ts +1 -1
- package/dist/components/feedback/Toast.d.ts.map +1 -1
- package/dist/components/feedback/Tooltip.d.ts.map +1 -1
- package/dist/components/forms/Checkbox.d.ts.map +1 -1
- package/dist/components/forms/ChoiceCardGroup.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/DateRangePicker.d.ts.map +1 -1
- package/dist/components/forms/FileUpload.d.ts.map +1 -1
- package/dist/components/forms/FormField.d.ts.map +1 -1
- package/dist/components/forms/Input.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/QuantityStepper.d.ts.map +1 -1
- package/dist/components/forms/Radio.d.ts.map +1 -1
- package/dist/components/forms/Select.d.ts.map +1 -1
- package/dist/components/forms/Switch.d.ts.map +1 -1
- package/dist/components/forms/TextArea.d.ts.map +1 -1
- package/dist/components/forms/ValueHelpField.d.cts +1 -1
- package/dist/components/forms/ValueHelpField.d.ts +1 -1
- package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
- package/dist/components/forms/dateValues.d.ts.map +1 -1
- package/dist/components/layout/PageBand.d.ts.map +1 -1
- package/dist/components/layout/SectionHeader.d.ts.map +1 -1
- package/dist/components/layout/SelectionBar.d.ts.map +1 -1
- package/dist/components/layout/SplitPane.d.ts.map +1 -1
- package/dist/components/navigation/Breadcrumb.d.ts.map +1 -1
- package/dist/components/navigation/Menu.d.ts.map +1 -1
- package/dist/components/navigation/Pagination.d.cts +1 -1
- package/dist/components/navigation/Pagination.d.ts +1 -1
- package/dist/components/navigation/Pagination.d.ts.map +1 -1
- package/dist/components/navigation/Ribbon.d.ts.map +1 -1
- package/dist/components/navigation/ShellBar.d.ts.map +1 -1
- package/dist/components/navigation/ShellRail.d.ts.map +1 -1
- package/dist/components/navigation/SideNav.d.cts +9 -1
- package/dist/components/navigation/SideNav.d.ts +9 -1
- package/dist/components/navigation/SideNav.d.ts.map +1 -1
- package/dist/components/navigation/Tabs.d.ts.map +1 -1
- package/dist/components/patterns/AppLauncher.d.cts +1 -1
- package/dist/components/patterns/AppLauncher.d.ts +1 -1
- package/dist/components/patterns/AppLauncher.d.ts.map +1 -1
- package/dist/components/patterns/CommandPalette.d.ts.map +1 -1
- package/dist/components/patterns/ConfirmDialog.d.cts +1 -1
- package/dist/components/patterns/ConfirmDialog.d.ts +1 -1
- package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/patterns/EmptyState.d.ts.map +1 -1
- package/dist/components/patterns/FileDropZone.d.ts.map +1 -1
- package/dist/components/patterns/NumPad.d.ts.map +1 -1
- package/dist/components/patterns/SidePanel.d.cts +1 -1
- package/dist/components/patterns/SidePanel.d.ts +1 -1
- package/dist/components/patterns/SidePanel.d.ts.map +1 -1
- package/dist/components/patterns/ValueHelpDialog.d.cts +1 -1
- package/dist/components/patterns/ValueHelpDialog.d.ts +1 -1
- package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
- package/dist/components.css +3685 -678
- package/dist/i18n/PireIntlProvider.d.ts.map +1 -1
- package/dist/index.cjs +669 -265
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +693 -276
- package/dist/index.js.map +1 -1
- package/dist/tokens/base.css +64 -13
- package/dist/tokens/colors.css +156 -78
- package/dist/tokens/elevation.css +20 -16
- package/dist/tokens/fonts.css +49 -7
- package/dist/tokens/motion.css +15 -12
- package/dist/tokens/spacing.css +41 -16
- package/dist/tokens/themes.css +88 -32
- package/dist/tokens/typography.css +43 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -425,9 +425,26 @@ import * as React2 from "react";
|
|
|
425
425
|
import { TooltipTrigger, Tooltip as AriaTooltip, OverlayArrow, Focusable } from "react-aria-components";
|
|
426
426
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
427
427
|
function Tooltip({ label, placement = "top", delay = 500, children }) {
|
|
428
|
-
const props = React2.isValidElement(
|
|
428
|
+
const props = React2.isValidElement(
|
|
429
|
+
children
|
|
430
|
+
) ? children.props : void 0;
|
|
429
431
|
const isDisabledChild = props?.isDisabled === true || props?.disabled === true;
|
|
430
|
-
const target = React2.isValidElement(children) && !isDisabledChild ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : isDisabledChild ?
|
|
432
|
+
const target = React2.isValidElement(children) && !isDisabledChild ? React2.cloneElement(children, { className: cx(children.props.className, "pire-tooltip-target") }) : isDisabledChild ? (
|
|
433
|
+
// `Focusable` also dev-warns when the element it clones onto has neither a native
|
|
434
|
+
// interactive tag nor an ARIA widget role — a bare `<span>` is neither. Every disabled
|
|
435
|
+
// control this wraps (`IconButton`, `Button`, …) is button-shaped, so `role="button"` plus
|
|
436
|
+
// `aria-disabled` describes the wrapper the same way its disabled child already describes
|
|
437
|
+
// itself, and is what lets the accessible name (from the child's own text or `aria-label`)
|
|
438
|
+
// reach the element that actually holds focus. No static `tabIndex` here on purpose: it
|
|
439
|
+
// would win over the one `Focusable` computes at clone time (react-aria's `mergeProps` lets
|
|
440
|
+
// a prop already on this element beat the one it supplies), silently making the span
|
|
441
|
+
// unfocusable again and reintroducing the defect this file exists to fix. A real `<button>`
|
|
442
|
+
// is not an option either: `children` is very often a button itself (`IconButton`), and a
|
|
443
|
+
// button nested in a button is invalid HTML that browsers repair by breaking the DOM tree.
|
|
444
|
+
// biome-ignore lint/a11y/useFocusableInteractive: tabIndex is added by Focusable's clone, not statically — see above.
|
|
445
|
+
// biome-ignore lint/a11y/useSemanticElements: a real <button> would nest inside the disabled child, which is often one itself — see above.
|
|
446
|
+
/* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", role: "button", "aria-disabled": "true", children })
|
|
447
|
+
) : /* @__PURE__ */ jsx3("span", { className: "pire-tooltip-target", children });
|
|
431
448
|
return /* @__PURE__ */ jsxs2(TooltipTrigger, { delay, closeDelay: 0, children: [
|
|
432
449
|
/* @__PURE__ */ jsx3(Focusable, { children: target }),
|
|
433
450
|
/* @__PURE__ */ jsxs2(AriaTooltip, { className: "pire-tooltip", placement, offset: 6, children: [
|
|
@@ -672,10 +689,7 @@ var esMessages = {
|
|
|
672
689
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
673
690
|
var MessagesContext = React5.createContext(enMessages);
|
|
674
691
|
function PireIntlProvider({ messages, children }) {
|
|
675
|
-
const value = React5.useMemo(
|
|
676
|
-
() => messages ? { ...enMessages, ...messages } : enMessages,
|
|
677
|
-
[messages]
|
|
678
|
-
);
|
|
692
|
+
const value = React5.useMemo(() => messages ? { ...enMessages, ...messages } : enMessages, [messages]);
|
|
679
693
|
return /* @__PURE__ */ jsx6(MessagesContext.Provider, { value, children });
|
|
680
694
|
}
|
|
681
695
|
function usePireMessages() {
|
|
@@ -690,37 +704,64 @@ function useMessage(key, override) {
|
|
|
690
704
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
691
705
|
var Tag = React6.forwardRef(function Tag2({ children, onRemove, isDisabled, category, className, ...rest }, ref) {
|
|
692
706
|
const msg = usePireMessages();
|
|
693
|
-
return /* @__PURE__ */ jsxs5(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
+
return /* @__PURE__ */ jsxs5(
|
|
708
|
+
"span",
|
|
709
|
+
{
|
|
710
|
+
ref,
|
|
711
|
+
className: cx("pire-tag", className),
|
|
712
|
+
"data-disabled": isDisabled ? "true" : void 0,
|
|
713
|
+
...rest,
|
|
714
|
+
children: [
|
|
715
|
+
category ? /* @__PURE__ */ jsx7("span", { className: "pire-tag-swatch", "data-category": category, "aria-hidden": "true" }) : null,
|
|
716
|
+
children,
|
|
717
|
+
onRemove ? /* @__PURE__ */ jsx7(
|
|
718
|
+
AriaButton3,
|
|
719
|
+
{
|
|
720
|
+
className: "pire-tag-remove",
|
|
721
|
+
isDisabled,
|
|
722
|
+
onPress: onRemove,
|
|
723
|
+
"aria-label": typeof children === "string" ? msg.tagRemoveNamed.replace("{name}", children) : msg.tagRemove,
|
|
724
|
+
children: /* @__PURE__ */ jsx7(Icon, { name: "x", size: 12 })
|
|
725
|
+
}
|
|
726
|
+
) : null
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
);
|
|
707
730
|
});
|
|
708
731
|
|
|
709
732
|
// src/components/core/Card.tsx
|
|
710
733
|
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
711
|
-
function Card({
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
734
|
+
function Card({
|
|
735
|
+
title,
|
|
736
|
+
subtitle,
|
|
737
|
+
icon,
|
|
738
|
+
actions,
|
|
739
|
+
footer,
|
|
740
|
+
interactive,
|
|
741
|
+
children,
|
|
742
|
+
className,
|
|
743
|
+
...rest
|
|
744
|
+
}) {
|
|
745
|
+
return /* @__PURE__ */ jsxs6(
|
|
746
|
+
"section",
|
|
747
|
+
{
|
|
748
|
+
className: cx("pire-card", className),
|
|
749
|
+
"data-interactive": interactive ? "true" : void 0,
|
|
750
|
+
...rest,
|
|
751
|
+
children: [
|
|
752
|
+
title || actions ? /* @__PURE__ */ jsxs6("header", { className: "pire-card-head", children: [
|
|
753
|
+
icon ? /* @__PURE__ */ jsx8(Icon, { name: icon, size: 20, style: { color: "var(--text-secondary)" } }) : null,
|
|
754
|
+
/* @__PURE__ */ jsxs6("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
755
|
+
/* @__PURE__ */ jsx8("h3", { className: "pire-card-title", children: title }),
|
|
756
|
+
subtitle ? /* @__PURE__ */ jsx8("p", { className: "pire-card-sub", style: { margin: 0 }, children: subtitle }) : null
|
|
757
|
+
] }),
|
|
758
|
+
actions ? /* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: "var(--sp-1)" }, children: actions }) : null
|
|
759
|
+
] }) : null,
|
|
760
|
+
children ? /* @__PURE__ */ jsx8("div", { className: "pire-card-body", children }) : null,
|
|
761
|
+
footer ? /* @__PURE__ */ jsx8("footer", { className: "pire-card-foot", children: footer }) : null
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
);
|
|
724
765
|
}
|
|
725
766
|
|
|
726
767
|
// src/components/core/Avatar.tsx
|
|
@@ -755,7 +796,10 @@ function SegmentedControl({
|
|
|
755
796
|
style,
|
|
756
797
|
...rest
|
|
757
798
|
}) {
|
|
758
|
-
const selected = React8.useMemo(
|
|
799
|
+
const selected = React8.useMemo(
|
|
800
|
+
() => new Set(value ? [value] : defaultValue ? [defaultValue] : []),
|
|
801
|
+
[value, defaultValue]
|
|
802
|
+
);
|
|
759
803
|
return /* @__PURE__ */ jsx10(
|
|
760
804
|
ToggleButtonGroup,
|
|
761
805
|
{
|
|
@@ -904,7 +948,17 @@ function Kbd({ children, size = "md", className, ...rest }) {
|
|
|
904
948
|
|
|
905
949
|
// src/components/forms/FormField.tsx
|
|
906
950
|
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
907
|
-
function FormField({
|
|
951
|
+
function FormField({
|
|
952
|
+
label,
|
|
953
|
+
htmlFor,
|
|
954
|
+
isRequired,
|
|
955
|
+
hint,
|
|
956
|
+
error,
|
|
957
|
+
layout = "stacked",
|
|
958
|
+
children,
|
|
959
|
+
className,
|
|
960
|
+
...rest
|
|
961
|
+
}) {
|
|
908
962
|
return /* @__PURE__ */ jsxs9("div", { className: cx("pire-field", className), "data-layout": layout, ...rest, children: [
|
|
909
963
|
/* @__PURE__ */ jsxs9("label", { className: "pire-field-label", htmlFor, children: [
|
|
910
964
|
label,
|
|
@@ -1034,11 +1088,14 @@ function TextArea({
|
|
|
1034
1088
|
...rest
|
|
1035
1089
|
}) {
|
|
1036
1090
|
const innerRef = React11.useRef(null);
|
|
1037
|
-
const ref = React11.useCallback(
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1091
|
+
const ref = React11.useCallback(
|
|
1092
|
+
(node) => {
|
|
1093
|
+
innerRef.current = node;
|
|
1094
|
+
if (typeof textAreaRef === "function") textAreaRef(node);
|
|
1095
|
+
else if (textAreaRef) textAreaRef.current = node;
|
|
1096
|
+
},
|
|
1097
|
+
[textAreaRef]
|
|
1098
|
+
);
|
|
1042
1099
|
const grow = React11.useCallback(() => {
|
|
1043
1100
|
const el = innerRef.current;
|
|
1044
1101
|
if (!el || !autoGrow) return;
|
|
@@ -1168,7 +1225,16 @@ function Select({
|
|
|
1168
1225
|
className: "pire-listbox",
|
|
1169
1226
|
items,
|
|
1170
1227
|
renderEmptyState: () => /* @__PURE__ */ jsx19("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: emptyLabel ?? msg.selectEmpty }),
|
|
1171
|
-
children: (item) => /* @__PURE__ */ jsx19(
|
|
1228
|
+
children: (item) => /* @__PURE__ */ jsx19(
|
|
1229
|
+
ListBoxItem,
|
|
1230
|
+
{
|
|
1231
|
+
className: "pire-option",
|
|
1232
|
+
id: item.value,
|
|
1233
|
+
textValue: item.label,
|
|
1234
|
+
isDisabled: item.isDisabled,
|
|
1235
|
+
children: item.label
|
|
1236
|
+
}
|
|
1237
|
+
)
|
|
1172
1238
|
}
|
|
1173
1239
|
) })
|
|
1174
1240
|
]
|
|
@@ -1198,7 +1264,14 @@ import {
|
|
|
1198
1264
|
FieldError as FieldError4
|
|
1199
1265
|
} from "react-aria-components";
|
|
1200
1266
|
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1201
|
-
function RadioGroup({
|
|
1267
|
+
function RadioGroup({
|
|
1268
|
+
label,
|
|
1269
|
+
description,
|
|
1270
|
+
errorMessage,
|
|
1271
|
+
children,
|
|
1272
|
+
className,
|
|
1273
|
+
...rest
|
|
1274
|
+
}) {
|
|
1202
1275
|
return /* @__PURE__ */ jsxs14(AriaRadioGroup, { className: cx("pire-field", className), validationBehavior: "aria", ...rest, children: [
|
|
1203
1276
|
label ? /* @__PURE__ */ jsx21(Label4, { className: "pire-field-label", children: label }) : null,
|
|
1204
1277
|
/* @__PURE__ */ jsx21("div", { className: "pire-radiogroup", children }),
|
|
@@ -1227,7 +1300,13 @@ function Switch({ label, children, className, ...rest }) {
|
|
|
1227
1300
|
}
|
|
1228
1301
|
|
|
1229
1302
|
// src/components/forms/ChoiceCardGroup.tsx
|
|
1230
|
-
import {
|
|
1303
|
+
import {
|
|
1304
|
+
RadioGroup as AriaRadioGroup2,
|
|
1305
|
+
Radio as AriaRadio2,
|
|
1306
|
+
Label as Label5,
|
|
1307
|
+
Text as Text7,
|
|
1308
|
+
FieldError as FieldError5
|
|
1309
|
+
} from "react-aria-components";
|
|
1231
1310
|
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1232
1311
|
function ChoiceCardGroup({
|
|
1233
1312
|
label,
|
|
@@ -1261,12 +1340,21 @@ function ChoiceCardGroup({
|
|
|
1261
1340
|
label,
|
|
1262
1341
|
isRequired ? /* @__PURE__ */ jsx23("span", { className: "pire-field-req", "aria-hidden": "true", children: "*" }) : null
|
|
1263
1342
|
] }) : null,
|
|
1264
|
-
/* @__PURE__ */ jsx23("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ jsxs16(
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1343
|
+
/* @__PURE__ */ jsx23("div", { className: "pire-choicecards", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }, children: options.map((option) => /* @__PURE__ */ jsxs16(
|
|
1344
|
+
AriaRadio2,
|
|
1345
|
+
{
|
|
1346
|
+
value: option.id,
|
|
1347
|
+
className: "pire-choicecard",
|
|
1348
|
+
isDisabled: option.isDisabled,
|
|
1349
|
+
children: [
|
|
1350
|
+
option.icon ? /* @__PURE__ */ jsx23(Icon, { name: option.icon, size: 20 }) : null,
|
|
1351
|
+
/* @__PURE__ */ jsx23("span", { className: "pire-choicecard-label", children: option.label }),
|
|
1352
|
+
option.description ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-desc", children: option.description }) : null,
|
|
1353
|
+
option.preview ? /* @__PURE__ */ jsx23("span", { className: "pire-choicecard-preview", "aria-hidden": "true", children: option.preview }) : null
|
|
1354
|
+
]
|
|
1355
|
+
},
|
|
1356
|
+
option.id
|
|
1357
|
+
)) }),
|
|
1270
1358
|
description ? /* @__PURE__ */ jsx23(Text7, { slot: "description", className: "pire-field-hint", children: description }) : null,
|
|
1271
1359
|
/* @__PURE__ */ jsx23(FieldError5, { className: "pire-field-error", children: errorMessage })
|
|
1272
1360
|
]
|
|
@@ -1381,7 +1469,16 @@ function ComboBox({
|
|
|
1381
1469
|
children: clearLabel ?? msg.inputClear
|
|
1382
1470
|
}
|
|
1383
1471
|
) : null,
|
|
1384
|
-
/* @__PURE__ */ jsx24(
|
|
1472
|
+
/* @__PURE__ */ jsx24(
|
|
1473
|
+
AriaButton6,
|
|
1474
|
+
{
|
|
1475
|
+
className: "pire-iconbtn",
|
|
1476
|
+
"data-size": "sm",
|
|
1477
|
+
"aria-label": msg.comboBoxShowSuggestions,
|
|
1478
|
+
style: { width: 20, height: 20 },
|
|
1479
|
+
children: /* @__PURE__ */ jsx24(Icon, { name: "chevron-down", size: 16 })
|
|
1480
|
+
}
|
|
1481
|
+
)
|
|
1385
1482
|
]
|
|
1386
1483
|
}
|
|
1387
1484
|
),
|
|
@@ -1396,10 +1493,19 @@ function ComboBox({
|
|
|
1396
1493
|
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1397
1494
|
} : void 0,
|
|
1398
1495
|
renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx24("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1399
|
-
children: (item) => /* @__PURE__ */ jsxs17(
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1496
|
+
children: (item) => /* @__PURE__ */ jsxs17(
|
|
1497
|
+
ListBoxItem2,
|
|
1498
|
+
{
|
|
1499
|
+
className: "pire-option",
|
|
1500
|
+
id: item.value,
|
|
1501
|
+
textValue: item.label,
|
|
1502
|
+
isDisabled: item.isDisabled,
|
|
1503
|
+
children: [
|
|
1504
|
+
/* @__PURE__ */ jsx24("span", { className: "pire-option-label", children: item.label }),
|
|
1505
|
+
item.secondary ? /* @__PURE__ */ jsx24("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
)
|
|
1403
1509
|
}
|
|
1404
1510
|
) })
|
|
1405
1511
|
]
|
|
@@ -1536,7 +1642,16 @@ function MultiComboBox({
|
|
|
1536
1642
|
}
|
|
1537
1643
|
)
|
|
1538
1644
|
] }),
|
|
1539
|
-
/* @__PURE__ */ jsx25(
|
|
1645
|
+
/* @__PURE__ */ jsx25(
|
|
1646
|
+
AriaButton7,
|
|
1647
|
+
{
|
|
1648
|
+
className: "pire-iconbtn",
|
|
1649
|
+
"data-size": "sm",
|
|
1650
|
+
"aria-label": msg.comboBoxShowSuggestions,
|
|
1651
|
+
style: { width: 20, height: 20 },
|
|
1652
|
+
children: /* @__PURE__ */ jsx25(Icon, { name: "chevron-down", size: 16 })
|
|
1653
|
+
}
|
|
1654
|
+
)
|
|
1540
1655
|
]
|
|
1541
1656
|
}
|
|
1542
1657
|
),
|
|
@@ -1552,10 +1667,19 @@ function MultiComboBox({
|
|
|
1552
1667
|
if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) onLoadMore();
|
|
1553
1668
|
} : void 0,
|
|
1554
1669
|
renderEmptyState: showsStatus ? () => /* @__PURE__ */ jsx25("div", { className: "pire-listbox-status", role: "status", "aria-live": "polite", children: isLoading ? loadingLabel ?? msg.comboBoxLoading : emptyLabel }) : void 0,
|
|
1555
|
-
children: (item) => /* @__PURE__ */ jsxs18(
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1670
|
+
children: (item) => /* @__PURE__ */ jsxs18(
|
|
1671
|
+
ListBoxItem3,
|
|
1672
|
+
{
|
|
1673
|
+
className: "pire-option",
|
|
1674
|
+
id: item.value,
|
|
1675
|
+
textValue: item.label,
|
|
1676
|
+
isDisabled: item.isDisabled,
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ jsx25("span", { className: "pire-option-label", children: item.label }),
|
|
1679
|
+
item.secondary ? /* @__PURE__ */ jsx25("span", { className: "pire-option-secondary", children: item.secondary }) : null
|
|
1680
|
+
]
|
|
1681
|
+
}
|
|
1682
|
+
)
|
|
1559
1683
|
}
|
|
1560
1684
|
) })
|
|
1561
1685
|
]
|
|
@@ -1725,7 +1849,15 @@ function NumberField({
|
|
|
1725
1849
|
"data-readonly": rest.isReadOnly ? "true" : void 0,
|
|
1726
1850
|
"data-stepper": stepperLayout,
|
|
1727
1851
|
children: [
|
|
1728
|
-
!hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
|
|
1852
|
+
!hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
|
|
1853
|
+
AriaButton8,
|
|
1854
|
+
{
|
|
1855
|
+
slot: "decrement",
|
|
1856
|
+
className: "pire-qty-btn",
|
|
1857
|
+
"aria-label": decrementLabel ?? msg.numberFieldDecrease,
|
|
1858
|
+
children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 16 })
|
|
1859
|
+
}
|
|
1860
|
+
) : null,
|
|
1729
1861
|
/* @__PURE__ */ jsx26(
|
|
1730
1862
|
AriaInput4,
|
|
1731
1863
|
{
|
|
@@ -1737,10 +1869,34 @@ function NumberField({
|
|
|
1737
1869
|
),
|
|
1738
1870
|
suffix ? /* @__PURE__ */ jsx26("span", { className: "pire-affix", children: suffix }) : null,
|
|
1739
1871
|
showsClear ? /* @__PURE__ */ jsx26(ClearButton, { label: clearLabel ?? msg.inputClear, onClear: () => handleChange(NaN) }) : null,
|
|
1740
|
-
!hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
|
|
1872
|
+
!hideStepper && stepperLayout === "inline" ? /* @__PURE__ */ jsx26(
|
|
1873
|
+
AriaButton8,
|
|
1874
|
+
{
|
|
1875
|
+
slot: "increment",
|
|
1876
|
+
className: "pire-qty-btn",
|
|
1877
|
+
"aria-label": incrementLabel ?? msg.numberFieldIncrease,
|
|
1878
|
+
children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 16 })
|
|
1879
|
+
}
|
|
1880
|
+
) : null,
|
|
1741
1881
|
hideStepper ? null : stepperLayout === "inline" ? null : /* @__PURE__ */ jsxs19("span", { className: "pire-stepper", children: [
|
|
1742
|
-
/* @__PURE__ */ jsx26(
|
|
1743
|
-
|
|
1882
|
+
/* @__PURE__ */ jsx26(
|
|
1883
|
+
AriaButton8,
|
|
1884
|
+
{
|
|
1885
|
+
slot: "increment",
|
|
1886
|
+
className: "pire-stepper-btn",
|
|
1887
|
+
"aria-label": incrementLabel ?? msg.numberFieldIncrease,
|
|
1888
|
+
children: /* @__PURE__ */ jsx26(Icon, { name: "plus", size: 10 })
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
/* @__PURE__ */ jsx26(
|
|
1892
|
+
AriaButton8,
|
|
1893
|
+
{
|
|
1894
|
+
slot: "decrement",
|
|
1895
|
+
className: "pire-stepper-btn",
|
|
1896
|
+
"aria-label": decrementLabel ?? msg.numberFieldDecrease,
|
|
1897
|
+
children: /* @__PURE__ */ jsx26(Icon, { name: "minus", size: 10 })
|
|
1898
|
+
}
|
|
1899
|
+
)
|
|
1744
1900
|
] })
|
|
1745
1901
|
]
|
|
1746
1902
|
}
|
|
@@ -1890,7 +2046,16 @@ function DatePicker({
|
|
|
1890
2046
|
children: [
|
|
1891
2047
|
/* @__PURE__ */ jsx28(DateInput, { className: "pire-datefield", children: (segment) => /* @__PURE__ */ jsx28(DateSegment, { segment, className: "pire-datesegment" }) }),
|
|
1892
2048
|
showsClear ? /* @__PURE__ */ jsx28(ClearButton2, { label: clearLabel ?? msg.inputClear }) : null,
|
|
1893
|
-
/* @__PURE__ */ jsx28(
|
|
2049
|
+
/* @__PURE__ */ jsx28(
|
|
2050
|
+
AriaButton9,
|
|
2051
|
+
{
|
|
2052
|
+
className: "pire-iconbtn",
|
|
2053
|
+
"data-size": "sm",
|
|
2054
|
+
"aria-label": msg.datePickerOpenCalendar,
|
|
2055
|
+
style: { width: 24, height: 24 },
|
|
2056
|
+
children: /* @__PURE__ */ jsx28(Icon, { name: "calendar", size: 16 })
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
1894
2059
|
]
|
|
1895
2060
|
}
|
|
1896
2061
|
),
|
|
@@ -1898,9 +2063,27 @@ function DatePicker({
|
|
|
1898
2063
|
/* @__PURE__ */ jsx28(FieldError9, { className: "pire-field-error", children: errorMessage }),
|
|
1899
2064
|
/* @__PURE__ */ jsx28(Popover4, { className: "pire-popover", children: /* @__PURE__ */ jsx28(AriaDialog, { children: /* @__PURE__ */ jsxs20(Calendar, { className: "pire-calendar", children: [
|
|
1900
2065
|
/* @__PURE__ */ jsxs20("header", { className: "pire-calendar-head", children: [
|
|
1901
|
-
/* @__PURE__ */ jsx28(
|
|
2066
|
+
/* @__PURE__ */ jsx28(
|
|
2067
|
+
AriaButton9,
|
|
2068
|
+
{
|
|
2069
|
+
slot: "previous",
|
|
2070
|
+
className: "pire-iconbtn",
|
|
2071
|
+
"data-size": "sm",
|
|
2072
|
+
"aria-label": msg.datePickerPreviousMonth,
|
|
2073
|
+
children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-left", size: 16 })
|
|
2074
|
+
}
|
|
2075
|
+
),
|
|
1902
2076
|
/* @__PURE__ */ jsx28(Heading2, { className: "pire-calendar-title" }),
|
|
1903
|
-
/* @__PURE__ */ jsx28(
|
|
2077
|
+
/* @__PURE__ */ jsx28(
|
|
2078
|
+
AriaButton9,
|
|
2079
|
+
{
|
|
2080
|
+
slot: "next",
|
|
2081
|
+
className: "pire-iconbtn",
|
|
2082
|
+
"data-size": "sm",
|
|
2083
|
+
"aria-label": msg.datePickerNextMonth,
|
|
2084
|
+
children: /* @__PURE__ */ jsx28(Icon, { name: "chevron-right", size: 16 })
|
|
2085
|
+
}
|
|
2086
|
+
)
|
|
1904
2087
|
] }),
|
|
1905
2088
|
/* @__PURE__ */ jsxs20(CalendarGrid, { className: "pire-calendar-grid", children: [
|
|
1906
2089
|
/* @__PURE__ */ jsx28(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx28(CalendarHeaderCell, { children: day }) }),
|
|
@@ -2006,7 +2189,9 @@ function DateRangePicker({
|
|
|
2006
2189
|
onChange(null);
|
|
2007
2190
|
return;
|
|
2008
2191
|
}
|
|
2009
|
-
onChange(
|
|
2192
|
+
onChange(
|
|
2193
|
+
valueFormat === "iso" ? { start: next.start.toString(), end: next.end.toString() } : { start: next.start, end: next.end }
|
|
2194
|
+
);
|
|
2010
2195
|
};
|
|
2011
2196
|
return /* @__PURE__ */ jsxs21(
|
|
2012
2197
|
AriaDateRangePicker,
|
|
@@ -2209,7 +2394,13 @@ function Skeleton({ shape = "text", width, height, className, style, ...rest })
|
|
|
2209
2394
|
);
|
|
2210
2395
|
}
|
|
2211
2396
|
var BAR_WIDTHS = ["72%", "54%", "86%", "63%"];
|
|
2212
|
-
function SkeletonTableRow({
|
|
2397
|
+
function SkeletonTableRow({
|
|
2398
|
+
columns,
|
|
2399
|
+
density = "regular",
|
|
2400
|
+
className,
|
|
2401
|
+
style,
|
|
2402
|
+
...rest
|
|
2403
|
+
}) {
|
|
2213
2404
|
const cells = typeof columns === "number" ? Array.from({ length: columns }, () => ({})) : columns;
|
|
2214
2405
|
return /* @__PURE__ */ jsx31(
|
|
2215
2406
|
"div",
|
|
@@ -2221,18 +2412,15 @@ function SkeletonTableRow({ columns, density = "regular", className, style, ...r
|
|
|
2221
2412
|
...rest,
|
|
2222
2413
|
children: cells.map((c, i) => {
|
|
2223
2414
|
const align = c.numeric ? "right" : c.align ?? "left";
|
|
2224
|
-
return (
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
"
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
},
|
|
2234
|
-
i
|
|
2235
|
-
)
|
|
2415
|
+
return /* @__PURE__ */ jsx31(
|
|
2416
|
+
"div",
|
|
2417
|
+
{
|
|
2418
|
+
className: "pire-skeleton-cell",
|
|
2419
|
+
"data-align": align,
|
|
2420
|
+
style: { width: c.width, flex: c.width ? "0 0 auto" : void 0 },
|
|
2421
|
+
children: /* @__PURE__ */ jsx31(Skeleton, { width: BAR_WIDTHS[i % BAR_WIDTHS.length] })
|
|
2422
|
+
},
|
|
2423
|
+
i
|
|
2236
2424
|
);
|
|
2237
2425
|
})
|
|
2238
2426
|
}
|
|
@@ -2286,10 +2474,11 @@ function DataTable({
|
|
|
2286
2474
|
break;
|
|
2287
2475
|
}
|
|
2288
2476
|
if (typeof column.width !== "number") {
|
|
2289
|
-
if (IS_DEV2)
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2477
|
+
if (IS_DEV2)
|
|
2478
|
+
warnOnce2(
|
|
2479
|
+
`pin-width:${column.key}`,
|
|
2480
|
+
`DataTable column "${column.key}" is pinned but has no numeric width, so its offset cannot be computed. It will scroll.`
|
|
2481
|
+
);
|
|
2293
2482
|
broke = "width";
|
|
2294
2483
|
break;
|
|
2295
2484
|
}
|
|
@@ -2393,7 +2582,9 @@ function DataTable({
|
|
|
2393
2582
|
{
|
|
2394
2583
|
size: 12,
|
|
2395
2584
|
name: sort?.key === c.key ? sort.dir === "asc" ? "arrow-up" : "arrow-down" : "chevrons-up-down",
|
|
2396
|
-
style: {
|
|
2585
|
+
style: {
|
|
2586
|
+
color: sort?.key === c.key ? "var(--accent-subtle-fg)" : "var(--text-tertiary)"
|
|
2587
|
+
}
|
|
2397
2588
|
}
|
|
2398
2589
|
) : null
|
|
2399
2590
|
] })
|
|
@@ -2402,44 +2593,53 @@ function DataTable({
|
|
|
2402
2593
|
)
|
|
2403
2594
|
))
|
|
2404
2595
|
] }),
|
|
2405
|
-
/* @__PURE__ */ jsx32(
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
{
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
Cell,
|
|
2425
|
-
{
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2596
|
+
/* @__PURE__ */ jsx32(
|
|
2597
|
+
TableBody,
|
|
2598
|
+
{
|
|
2599
|
+
renderEmptyState: () => isLoading ? /* @__PURE__ */ jsxs23("div", { className: "pire-table-loading", role: "status", "aria-live": "polite", children: [
|
|
2600
|
+
/* @__PURE__ */ jsx32("span", { className: "pire-sr-only", children: loadingLabel ?? msg.dataTableLoading }),
|
|
2601
|
+
Array.from({ length: skeletonRows }, (_, i) => (
|
|
2602
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: placeholder rows are positional.
|
|
2603
|
+
/* @__PURE__ */ jsx32(SkeletonTableRow, { columns: skeletonColumns, density }, i)
|
|
2604
|
+
))
|
|
2605
|
+
] }) : /* @__PURE__ */ jsx32("div", { className: "pire-table-empty", children: emptyLabel ?? msg.dataTableEmpty }),
|
|
2606
|
+
children: body.flatMap((row) => {
|
|
2607
|
+
const rowIsDisabled = presentation.get(row.id)?.isDisabled;
|
|
2608
|
+
const record = /* @__PURE__ */ jsxs23(
|
|
2609
|
+
Row,
|
|
2610
|
+
{
|
|
2611
|
+
id: row.id,
|
|
2612
|
+
className: cx("pire-tr", presentation.get(row.id)?.className),
|
|
2613
|
+
"data-pressable": onRowAction && !rowIsDisabled ? "true" : void 0,
|
|
2614
|
+
children: [
|
|
2615
|
+
hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-td", ...pinProps(null), children: /* @__PURE__ */ jsx32(Checkbox, { slot: "selection", "aria-label": msg.dataTableSelectRow }) }) : null,
|
|
2616
|
+
columns.map((c) => {
|
|
2617
|
+
const pin = pinProps(c.key);
|
|
2618
|
+
return /* @__PURE__ */ jsx32(
|
|
2619
|
+
Cell,
|
|
2620
|
+
{
|
|
2621
|
+
className: "pire-td",
|
|
2622
|
+
"data-numeric": c.numeric ? "true" : void 0,
|
|
2623
|
+
"data-tone": c.tone?.(row) ?? void 0,
|
|
2624
|
+
...pin,
|
|
2625
|
+
style: { ...pin.style, textAlign: c.align && !c.numeric ? c.align : void 0 },
|
|
2626
|
+
children: c.render ? c.render(row) : row[c.key]
|
|
2627
|
+
},
|
|
2628
|
+
c.key
|
|
2629
|
+
);
|
|
2630
|
+
})
|
|
2631
|
+
]
|
|
2632
|
+
},
|
|
2633
|
+
row.id
|
|
2634
|
+
);
|
|
2635
|
+
if (!renderExpanded || !expanded.has(String(row.id))) return [record];
|
|
2636
|
+
return [
|
|
2637
|
+
record,
|
|
2638
|
+
/* @__PURE__ */ jsx32(Row, { id: expandedKey(row.id), className: "pire-tr-expanded", children: /* @__PURE__ */ jsx32(Cell, { className: "pire-td-expanded", colSpan: spanAll, children: renderExpanded(row) }) }, expandedKey(row.id))
|
|
2639
|
+
];
|
|
2640
|
+
})
|
|
2641
|
+
}
|
|
2642
|
+
),
|
|
2443
2643
|
footer && !isLoading ? /* @__PURE__ */ jsx32(TableFooter, { className: "pire-tfoot", children: /* @__PURE__ */ jsxs23(Row, { id: "__pire_footer__", className: "pire-tr-footer", children: [
|
|
2444
2644
|
hasCheckboxColumn ? /* @__PURE__ */ jsx32(Cell, { className: "pire-tf", ...pinProps(null) }) : null,
|
|
2445
2645
|
columns.map((c, i) => {
|
|
@@ -2509,10 +2709,17 @@ function ValueHelpDialog({
|
|
|
2509
2709
|
onClose,
|
|
2510
2710
|
footer: /* @__PURE__ */ jsxs24(Fragment2, { children: [
|
|
2511
2711
|
/* @__PURE__ */ jsx33(Button, { variant: "tertiary", onPress: onClose, children: msg.valueHelpDialogCancel }),
|
|
2512
|
-
isMultiple ? /* @__PURE__ */ jsx33(
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2712
|
+
isMultiple ? /* @__PURE__ */ jsx33(
|
|
2713
|
+
Button,
|
|
2714
|
+
{
|
|
2715
|
+
variant: "primary",
|
|
2716
|
+
onPress: () => {
|
|
2717
|
+
onConfirm?.(selectedKeys ?? []);
|
|
2718
|
+
onClose?.();
|
|
2719
|
+
},
|
|
2720
|
+
children: msg.valueHelpConfirm
|
|
2721
|
+
}
|
|
2722
|
+
) : null
|
|
2516
2723
|
] }),
|
|
2517
2724
|
children: /* @__PURE__ */ jsxs24("div", { style: { display: "flex", flexDirection: "column", gap: "var(--sp-3)" }, children: [
|
|
2518
2725
|
/* @__PURE__ */ jsx33(
|
|
@@ -2533,28 +2740,35 @@ function ValueHelpDialog({
|
|
|
2533
2740
|
/* @__PURE__ */ jsx33(Button, { size: "sm", variant: "tertiary", onPress: () => onSelectionChange?.([]), children: msg.valueHelpClearSelection }),
|
|
2534
2741
|
/* @__PURE__ */ jsx33("span", { className: "pire-valuehelp-count", children: msg.valueHelpSelectedCount.replace("{count}", String(selectedKeys?.length ?? 0)) })
|
|
2535
2742
|
] }) : null,
|
|
2536
|
-
/* @__PURE__ */ jsx33(
|
|
2537
|
-
|
|
2538
|
-
if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
|
|
2539
|
-
} : void 0, style: { overflow: "auto", maxHeight: "48vh" }, children: /* @__PURE__ */ jsx33(
|
|
2540
|
-
DataTable,
|
|
2743
|
+
/* @__PURE__ */ jsx33(
|
|
2744
|
+
"div",
|
|
2541
2745
|
{
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2746
|
+
onScroll: onLoadMore ? (event) => {
|
|
2747
|
+
const el = event.currentTarget;
|
|
2748
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight < 64) onLoadMore();
|
|
2749
|
+
} : void 0,
|
|
2750
|
+
style: { overflow: "auto", maxHeight: "48vh" },
|
|
2751
|
+
children: /* @__PURE__ */ jsx33(
|
|
2752
|
+
DataTable,
|
|
2753
|
+
{
|
|
2754
|
+
"aria-label": typeof title === "string" ? title : msg.valueHelpDialogTitle,
|
|
2755
|
+
density: "condensed",
|
|
2756
|
+
columns,
|
|
2757
|
+
rows: filtered,
|
|
2758
|
+
isLoading,
|
|
2759
|
+
emptyLabel: emptyLabel ?? msg.valueHelpDialogEmpty,
|
|
2760
|
+
selectable: isMultiple ? "multiple" : void 0,
|
|
2761
|
+
hideSelectAll: isMultiple,
|
|
2762
|
+
selected: isMultiple ? selectedKeys : void 0,
|
|
2763
|
+
onSelectionChange: isMultiple ? onSelectionChange : void 0,
|
|
2764
|
+
onRowAction: isMultiple ? void 0 : (row) => {
|
|
2765
|
+
onSelect?.(row);
|
|
2766
|
+
onClose?.();
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
)
|
|
2556
2770
|
}
|
|
2557
|
-
)
|
|
2771
|
+
)
|
|
2558
2772
|
] })
|
|
2559
2773
|
}
|
|
2560
2774
|
);
|
|
@@ -2700,7 +2914,9 @@ function screenFiles(files, { maxSize, acceptedFileTypes }) {
|
|
|
2700
2914
|
continue;
|
|
2701
2915
|
}
|
|
2702
2916
|
if (acceptedFileTypes?.length) {
|
|
2703
|
-
const ok = acceptedFileTypes.some(
|
|
2917
|
+
const ok = acceptedFileTypes.some(
|
|
2918
|
+
(t) => t.startsWith(".") ? file.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? file.type.startsWith(t.slice(0, -1)) : file.type === t
|
|
2919
|
+
);
|
|
2704
2920
|
if (!ok) {
|
|
2705
2921
|
rejected.push({ file, reason: "type" });
|
|
2706
2922
|
continue;
|
|
@@ -2737,9 +2953,12 @@ function FileUpload({
|
|
|
2737
2953
|
const [uncontrolled, setUncontrolled] = React21.useState(defaultValue ?? []);
|
|
2738
2954
|
const files = value ?? uncontrolled;
|
|
2739
2955
|
const created = React21.useRef([]);
|
|
2740
|
-
React21.useEffect(
|
|
2741
|
-
|
|
2742
|
-
|
|
2956
|
+
React21.useEffect(
|
|
2957
|
+
() => () => {
|
|
2958
|
+
for (const url of created.current) URL.revokeObjectURL(url);
|
|
2959
|
+
},
|
|
2960
|
+
[]
|
|
2961
|
+
);
|
|
2743
2962
|
const commit = (next) => {
|
|
2744
2963
|
if (value === void 0) setUncontrolled(next);
|
|
2745
2964
|
onChange?.(next);
|
|
@@ -2873,14 +3092,7 @@ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
|
2873
3092
|
function Menu({ minWidth, className, style, ...rest }) {
|
|
2874
3093
|
const width = typeof minWidth === "number" ? `${minWidth}px` : minWidth;
|
|
2875
3094
|
const menuStyle = width == null ? style : { ["--pire-menu-min-w"]: width, ...style };
|
|
2876
|
-
return /* @__PURE__ */ jsx38(
|
|
2877
|
-
AriaMenu,
|
|
2878
|
-
{
|
|
2879
|
-
className: cx("pire-menu", className),
|
|
2880
|
-
style: menuStyle,
|
|
2881
|
-
...rest
|
|
2882
|
-
}
|
|
2883
|
-
);
|
|
3095
|
+
return /* @__PURE__ */ jsx38(AriaMenu, { className: cx("pire-menu", className), style: menuStyle, ...rest });
|
|
2884
3096
|
}
|
|
2885
3097
|
var shortcutKeys = (shortcut) => {
|
|
2886
3098
|
if (shortcut == null) return [];
|
|
@@ -2909,7 +3121,14 @@ function MenuItem({
|
|
|
2909
3121
|
/* @__PURE__ */ jsx38("span", { className: "pire-menu-item-label", children }),
|
|
2910
3122
|
description ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-desc", children: description }) : null
|
|
2911
3123
|
] }),
|
|
2912
|
-
keys.length ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ jsx38(
|
|
3124
|
+
keys.length ? /* @__PURE__ */ jsx38("span", { className: "pire-menu-item-shortcut", children: keys.map((cap, index) => /* @__PURE__ */ jsx38(
|
|
3125
|
+
Kbd,
|
|
3126
|
+
{
|
|
3127
|
+
size: "sm",
|
|
3128
|
+
children: cap
|
|
3129
|
+
},
|
|
3130
|
+
`${cap}-${index}`
|
|
3131
|
+
)) }) : null
|
|
2913
3132
|
]
|
|
2914
3133
|
}
|
|
2915
3134
|
);
|
|
@@ -2944,6 +3163,7 @@ function SideNav({
|
|
|
2944
3163
|
onExpandedChange,
|
|
2945
3164
|
collapsed,
|
|
2946
3165
|
railFlyout = true,
|
|
3166
|
+
bordered = true,
|
|
2947
3167
|
footer,
|
|
2948
3168
|
className,
|
|
2949
3169
|
...rest
|
|
@@ -3052,6 +3272,7 @@ function SideNav({
|
|
|
3052
3272
|
{
|
|
3053
3273
|
className: cx("pire-sidenav", className),
|
|
3054
3274
|
"data-collapsed": collapsed ? "true" : void 0,
|
|
3275
|
+
"data-bordered": bordered ? void 0 : "false",
|
|
3055
3276
|
"aria-label": msg.sideNavLabel,
|
|
3056
3277
|
...rest,
|
|
3057
3278
|
children: [
|
|
@@ -3214,7 +3435,7 @@ function Pagination({
|
|
|
3214
3435
|
// src/components/navigation/Ribbon.tsx
|
|
3215
3436
|
import * as React24 from "react";
|
|
3216
3437
|
import { Tabs as AriaTabs2, TabList as TabList2, Tab as AriaTab2, TabPanel as TabPanel2, Toolbar, Button as Button3 } from "react-aria-components";
|
|
3217
|
-
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3438
|
+
import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3218
3439
|
var outside = (what, parent) => {
|
|
3219
3440
|
const Config = () => {
|
|
3220
3441
|
throw new Error(`[pire] ${what} must be a child of ${parent}.`);
|
|
@@ -3243,7 +3464,9 @@ function childrenOfType(children, type, what, parent) {
|
|
|
3243
3464
|
}
|
|
3244
3465
|
if (!React24.isValidElement(child) || child.type !== type) {
|
|
3245
3466
|
const isWrapper = React24.isValidElement(child) && typeof child.type !== "string" && !CONFIG_ELEMENTS.has(child.type);
|
|
3246
|
-
throw new Error(
|
|
3467
|
+
throw new Error(
|
|
3468
|
+
`[pire] ${parent} accepts only ${what} as children, and got ${describe(child)}.` + (isWrapper ? ` Configuration elements are read, not rendered, so ${parent} cannot see through a wrapper component.` : "")
|
|
3469
|
+
);
|
|
3247
3470
|
}
|
|
3248
3471
|
out.push({ ...child.props, key: child.key != null ? String(child.key) : `${path}${i}` });
|
|
3249
3472
|
});
|
|
@@ -3254,13 +3477,24 @@ function childrenOfType(children, type, what, parent) {
|
|
|
3254
3477
|
function readTabs(children) {
|
|
3255
3478
|
return childrenOfType(children, RibbonTab, "Ribbon.Tab", "Ribbon").map((tab) => ({
|
|
3256
3479
|
...tab,
|
|
3257
|
-
groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map(
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3480
|
+
groups: childrenOfType(tab.children, RibbonGroup, "Ribbon.Group", "Ribbon.Tab").map(
|
|
3481
|
+
(group) => ({
|
|
3482
|
+
...group,
|
|
3483
|
+
commands: childrenOfType(
|
|
3484
|
+
group.children,
|
|
3485
|
+
RibbonCommand,
|
|
3486
|
+
"Ribbon.Command",
|
|
3487
|
+
"Ribbon.Group"
|
|
3488
|
+
)
|
|
3489
|
+
})
|
|
3490
|
+
)
|
|
3261
3491
|
}));
|
|
3262
3492
|
}
|
|
3263
|
-
function Command({
|
|
3493
|
+
function Command({
|
|
3494
|
+
command,
|
|
3495
|
+
selectionCount,
|
|
3496
|
+
inBar
|
|
3497
|
+
}) {
|
|
3264
3498
|
const size = inBar ? "sm" : command.size ?? "sm";
|
|
3265
3499
|
const isDisabled = command.isDisabled || command.requiresSelection === true && selectionCount === 0;
|
|
3266
3500
|
return /* @__PURE__ */ jsxs35(
|
|
@@ -3288,6 +3522,39 @@ function Group8({ group, selectionCount }) {
|
|
|
3288
3522
|
/* @__PURE__ */ jsx44("div", { className: "pire-ribbon-caption", "aria-hidden": "true", children: group.caption })
|
|
3289
3523
|
] });
|
|
3290
3524
|
}
|
|
3525
|
+
function useTrailingOverflow() {
|
|
3526
|
+
const ref = React24.useRef(null);
|
|
3527
|
+
const [overflow, setOverflow] = React24.useState(false);
|
|
3528
|
+
React24.useEffect(() => {
|
|
3529
|
+
const node = ref.current;
|
|
3530
|
+
if (!node) return;
|
|
3531
|
+
const measure = () => setOverflow(node.scrollLeft + node.clientWidth < node.scrollWidth - 1);
|
|
3532
|
+
measure();
|
|
3533
|
+
node.addEventListener("scroll", measure, { passive: true });
|
|
3534
|
+
const resize = new ResizeObserver(measure);
|
|
3535
|
+
resize.observe(node);
|
|
3536
|
+
for (const child of node.children) resize.observe(child);
|
|
3537
|
+
return () => {
|
|
3538
|
+
node.removeEventListener("scroll", measure);
|
|
3539
|
+
resize.disconnect();
|
|
3540
|
+
};
|
|
3541
|
+
}, []);
|
|
3542
|
+
return [ref, overflow];
|
|
3543
|
+
}
|
|
3544
|
+
function Surface({
|
|
3545
|
+
className,
|
|
3546
|
+
id,
|
|
3547
|
+
label,
|
|
3548
|
+
trailing,
|
|
3549
|
+
children
|
|
3550
|
+
}) {
|
|
3551
|
+
const [scrollRef, overflow] = useTrailingOverflow();
|
|
3552
|
+
const domId = id ? { id } : {};
|
|
3553
|
+
return /* @__PURE__ */ jsxs35(Toolbar, { ...domId, className, "aria-label": label, children: [
|
|
3554
|
+
/* @__PURE__ */ jsx44("div", { className: "pire-ribbon-scroll", ref: scrollRef, children }),
|
|
3555
|
+
/* @__PURE__ */ jsx44("div", { className: "pire-ribbon-trail", "data-overflow": overflow ? "true" : void 0, children: trailing })
|
|
3556
|
+
] });
|
|
3557
|
+
}
|
|
3291
3558
|
function barBlocks(tabs) {
|
|
3292
3559
|
const blocks = [];
|
|
3293
3560
|
for (const tab of tabs) {
|
|
@@ -3321,10 +3588,13 @@ function Ribbon({
|
|
|
3321
3588
|
const [ownTab, setOwnTab] = React24.useState(defaultValue);
|
|
3322
3589
|
const requested = value ?? ownTab;
|
|
3323
3590
|
const selected = visible.some((tab) => tab.id === requested) ? requested : fallback;
|
|
3324
|
-
const select = React24.useCallback(
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3591
|
+
const select = React24.useCallback(
|
|
3592
|
+
(id) => {
|
|
3593
|
+
setOwnTab(id);
|
|
3594
|
+
onChange?.(id);
|
|
3595
|
+
},
|
|
3596
|
+
[onChange]
|
|
3597
|
+
);
|
|
3328
3598
|
const hadSelection = React24.useRef(false);
|
|
3329
3599
|
React24.useEffect(() => {
|
|
3330
3600
|
const has = count > 0;
|
|
@@ -3345,7 +3615,6 @@ function Ribbon({
|
|
|
3345
3615
|
toggleRef.current?.focus();
|
|
3346
3616
|
});
|
|
3347
3617
|
const bandId = React24.useId();
|
|
3348
|
-
const bandDomId = { id: bandId };
|
|
3349
3618
|
const toggle = /* @__PURE__ */ jsx44(
|
|
3350
3619
|
Button3,
|
|
3351
3620
|
{
|
|
@@ -3364,16 +3633,24 @@ function Ribbon({
|
|
|
3364
3633
|
);
|
|
3365
3634
|
if (collapsed) {
|
|
3366
3635
|
const blocks = barBlocks(tabs);
|
|
3367
|
-
return /* @__PURE__ */ jsx44("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ jsxs35(
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3636
|
+
return /* @__PURE__ */ jsx44("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ jsxs35(
|
|
3637
|
+
Surface,
|
|
3638
|
+
{
|
|
3639
|
+
className: "pire-ribbon-bar",
|
|
3640
|
+
label: rest["aria-label"],
|
|
3641
|
+
trailing: /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3642
|
+
actions,
|
|
3643
|
+
toggle
|
|
3644
|
+
] }),
|
|
3645
|
+
children: [
|
|
3646
|
+
leading ? /* @__PURE__ */ jsx44("div", { className: "pire-ribbon-leading", children: leading }) : null,
|
|
3647
|
+
blocks.map((block, i) => /* @__PURE__ */ jsxs35(React24.Fragment, { children: [
|
|
3648
|
+
i > 0 || leading ? /* @__PURE__ */ jsx44("span", { className: "pire-ribbon-bar-sep" }) : null,
|
|
3649
|
+
block.commands.map((c) => /* @__PURE__ */ jsx44(Command, { command: c, selectionCount: count, inBar: true }, c.key))
|
|
3650
|
+
] }, block.key))
|
|
3651
|
+
]
|
|
3652
|
+
}
|
|
3653
|
+
) });
|
|
3377
3654
|
}
|
|
3378
3655
|
return /* @__PURE__ */ jsx44("div", { className: cx("pire-ribbon", className), style, children: /* @__PURE__ */ jsxs35(AriaTabs2, { selectedKey: selected, onSelectionChange: (k) => select(String(k)), children: [
|
|
3379
3656
|
/* @__PURE__ */ jsx44(TabList2, { className: "pire-ribbon-tablist", "aria-label": rest["aria-label"], children: visible.map((tab) => /* @__PURE__ */ jsx44(
|
|
@@ -3386,12 +3663,19 @@ function Ribbon({
|
|
|
3386
3663
|
},
|
|
3387
3664
|
tab.key
|
|
3388
3665
|
)) }),
|
|
3389
|
-
visible.map((tab) => /* @__PURE__ */ jsx44(TabPanel2, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3666
|
+
visible.map((tab) => /* @__PURE__ */ jsx44(TabPanel2, { id: tab.id, className: "pire-ribbon-panel", children: /* @__PURE__ */ jsx44(
|
|
3667
|
+
Surface,
|
|
3668
|
+
{
|
|
3669
|
+
id: bandId,
|
|
3670
|
+
className: "pire-ribbon-band",
|
|
3671
|
+
label: msg.ribbonLabel,
|
|
3672
|
+
trailing: /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3673
|
+
actions,
|
|
3674
|
+
toggle
|
|
3675
|
+
] }),
|
|
3676
|
+
children: tab.groups.map((group) => /* @__PURE__ */ jsx44(Group8, { group, selectionCount: count }, group.key))
|
|
3677
|
+
}
|
|
3678
|
+
) }, tab.key))
|
|
3395
3679
|
] }) });
|
|
3396
3680
|
}
|
|
3397
3681
|
Ribbon.Tab = RibbonTab;
|
|
@@ -3406,7 +3690,15 @@ var KIND_ICON = {
|
|
|
3406
3690
|
warning: "alert-triangle",
|
|
3407
3691
|
error: "alert-octagon"
|
|
3408
3692
|
};
|
|
3409
|
-
function InlineMessage({
|
|
3693
|
+
function InlineMessage({
|
|
3694
|
+
kind = "info",
|
|
3695
|
+
title,
|
|
3696
|
+
action,
|
|
3697
|
+
onClose,
|
|
3698
|
+
children,
|
|
3699
|
+
className,
|
|
3700
|
+
...rest
|
|
3701
|
+
}) {
|
|
3410
3702
|
const msg = usePireMessages();
|
|
3411
3703
|
const assertive = kind === "error" || kind === "warning";
|
|
3412
3704
|
return /* @__PURE__ */ jsxs36(
|
|
@@ -3439,7 +3731,14 @@ var KIND_ICON2 = {
|
|
|
3439
3731
|
warning: "alert-triangle",
|
|
3440
3732
|
error: "alert-octagon"
|
|
3441
3733
|
};
|
|
3442
|
-
function Toast({
|
|
3734
|
+
function Toast({
|
|
3735
|
+
kind = "success",
|
|
3736
|
+
onClose,
|
|
3737
|
+
position = "bottom-center",
|
|
3738
|
+
children,
|
|
3739
|
+
className,
|
|
3740
|
+
...rest
|
|
3741
|
+
}) {
|
|
3443
3742
|
const msg = usePireMessages();
|
|
3444
3743
|
return /* @__PURE__ */ jsxs37(
|
|
3445
3744
|
"div",
|
|
@@ -3458,21 +3757,36 @@ function Toast({ kind = "success", onClose, position = "bottom-center", children
|
|
|
3458
3757
|
);
|
|
3459
3758
|
}
|
|
3460
3759
|
var ToastContext = React25.createContext(null);
|
|
3461
|
-
function ToastProvider({
|
|
3760
|
+
function ToastProvider({
|
|
3761
|
+
children,
|
|
3762
|
+
timeout = 6e3
|
|
3763
|
+
}) {
|
|
3462
3764
|
const msg = usePireMessages();
|
|
3463
3765
|
const [toasts, setToasts] = React25.useState([]);
|
|
3464
3766
|
const close = React25.useCallback((id) => setToasts((t) => t.filter((x) => x.id !== id)), []);
|
|
3465
|
-
const add = React25.useCallback(
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3767
|
+
const add = React25.useCallback(
|
|
3768
|
+
(toast) => {
|
|
3769
|
+
const id = Math.random().toString(36).slice(2);
|
|
3770
|
+
setToasts((t) => [...t, { ...toast, id }]);
|
|
3771
|
+
const ms = toast.timeout ?? timeout;
|
|
3772
|
+
if (ms > 0) setTimeout(() => close(id), ms);
|
|
3773
|
+
return id;
|
|
3774
|
+
},
|
|
3775
|
+
[close, timeout]
|
|
3776
|
+
);
|
|
3472
3777
|
const value = React25.useMemo(() => ({ add, close }), [add, close]);
|
|
3473
3778
|
return /* @__PURE__ */ jsxs37(ToastContext.Provider, { value, children: [
|
|
3474
3779
|
children,
|
|
3475
|
-
/* @__PURE__ */ jsx46("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx46(
|
|
3780
|
+
/* @__PURE__ */ jsx46("div", { className: "pire-toast-region", role: "region", "aria-label": msg.toastRegionLabel, children: toasts.map((t) => /* @__PURE__ */ jsx46(
|
|
3781
|
+
Toast,
|
|
3782
|
+
{
|
|
3783
|
+
kind: t.kind,
|
|
3784
|
+
onClose: () => close(t.id),
|
|
3785
|
+
style: { position: "static", transform: "none" },
|
|
3786
|
+
children: t.message
|
|
3787
|
+
},
|
|
3788
|
+
t.id
|
|
3789
|
+
)) })
|
|
3476
3790
|
] });
|
|
3477
3791
|
}
|
|
3478
3792
|
function useToast() {
|
|
@@ -3483,7 +3797,7 @@ function useToast() {
|
|
|
3483
3797
|
|
|
3484
3798
|
// src/components/data/KpiTile.tsx
|
|
3485
3799
|
import { Button as AriaButton14 } from "react-aria-components";
|
|
3486
|
-
import { Fragment as
|
|
3800
|
+
import { Fragment as Fragment7, jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3487
3801
|
function KpiTile({
|
|
3488
3802
|
label,
|
|
3489
3803
|
value,
|
|
@@ -3499,7 +3813,7 @@ function KpiTile({
|
|
|
3499
3813
|
style
|
|
3500
3814
|
}) {
|
|
3501
3815
|
const tone = deltaTone ?? (deltaDirection === "down" ? "negative" : "positive");
|
|
3502
|
-
const body = /* @__PURE__ */ jsxs38(
|
|
3816
|
+
const body = /* @__PURE__ */ jsxs38(Fragment7, { children: [
|
|
3503
3817
|
/* @__PURE__ */ jsxs38("span", { className: "pire-kpi-label", children: [
|
|
3504
3818
|
icon ? /* @__PURE__ */ jsx47(Icon, { name: icon, size: 16 }) : null,
|
|
3505
3819
|
label
|
|
@@ -3520,7 +3834,17 @@ function KpiTile({
|
|
|
3520
3834
|
|
|
3521
3835
|
// src/components/data/ObjectHeader.tsx
|
|
3522
3836
|
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3523
|
-
function ObjectHeader({
|
|
3837
|
+
function ObjectHeader({
|
|
3838
|
+
title,
|
|
3839
|
+
subtitle,
|
|
3840
|
+
id,
|
|
3841
|
+
breadcrumb,
|
|
3842
|
+
badge,
|
|
3843
|
+
facts,
|
|
3844
|
+
actions,
|
|
3845
|
+
className,
|
|
3846
|
+
...rest
|
|
3847
|
+
}) {
|
|
3524
3848
|
return /* @__PURE__ */ jsxs39("header", { className: cx("pire-objheader", className), ...rest, children: [
|
|
3525
3849
|
breadcrumb,
|
|
3526
3850
|
/* @__PURE__ */ jsxs39("div", { className: "pire-objheader-row", children: [
|
|
@@ -3536,7 +3860,15 @@ function ObjectHeader({ title, subtitle, id, breadcrumb, badge, facts, actions,
|
|
|
3536
3860
|
] }),
|
|
3537
3861
|
facts?.length ? /* @__PURE__ */ jsx48("dl", { className: "pire-facts", style: { margin: 0 }, children: facts.map((fact) => /* @__PURE__ */ jsxs39("div", { children: [
|
|
3538
3862
|
/* @__PURE__ */ jsx48("dt", { className: "pire-fact-label", children: fact.label }),
|
|
3539
|
-
/* @__PURE__ */ jsx48(
|
|
3863
|
+
/* @__PURE__ */ jsx48(
|
|
3864
|
+
"dd",
|
|
3865
|
+
{
|
|
3866
|
+
className: "pire-fact-value",
|
|
3867
|
+
"data-numeric": fact.numeric ? "true" : void 0,
|
|
3868
|
+
style: { margin: 0 },
|
|
3869
|
+
children: fact.value
|
|
3870
|
+
}
|
|
3871
|
+
)
|
|
3540
3872
|
] }, fact.label)) }) : null
|
|
3541
3873
|
] });
|
|
3542
3874
|
}
|
|
@@ -3575,7 +3907,14 @@ function FilterBar({
|
|
|
3575
3907
|
|
|
3576
3908
|
// src/components/data/DescriptionList.tsx
|
|
3577
3909
|
import { jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3578
|
-
function DescriptionList({
|
|
3910
|
+
function DescriptionList({
|
|
3911
|
+
items,
|
|
3912
|
+
layout = "rows",
|
|
3913
|
+
columns = 3,
|
|
3914
|
+
className,
|
|
3915
|
+
style,
|
|
3916
|
+
...rest
|
|
3917
|
+
}) {
|
|
3579
3918
|
return /* @__PURE__ */ jsx50(
|
|
3580
3919
|
"dl",
|
|
3581
3920
|
{
|
|
@@ -3633,10 +3972,7 @@ function linearScale(values, tickCount = 4, startAtZero = true) {
|
|
|
3633
3972
|
const min = toStepPrecision(Math.floor(low / step + EDGE_TOLERANCE) * step);
|
|
3634
3973
|
const max = toStepPrecision(Math.ceil(high / step - EDGE_TOLERANCE) * step);
|
|
3635
3974
|
const stepCount = Math.round((max - min) / step);
|
|
3636
|
-
const ticks = Array.from(
|
|
3637
|
-
{ length: stepCount + 1 },
|
|
3638
|
-
(_, index) => toStepPrecision(min + index * step)
|
|
3639
|
-
);
|
|
3975
|
+
const ticks = Array.from({ length: stepCount + 1 }, (_, index) => toStepPrecision(min + index * step));
|
|
3640
3976
|
return { min, max, ticks };
|
|
3641
3977
|
}
|
|
3642
3978
|
function scalePosition(value, scale) {
|
|
@@ -3664,10 +4000,14 @@ function warnOnDonutShape(series, categoryCount, chartLabel) {
|
|
|
3664
4000
|
complaints.push(`it has ${series.length} series but a donut draws one \u2014 the rest are ignored`);
|
|
3665
4001
|
}
|
|
3666
4002
|
if (categoryCount > VIZ_SLOT_COUNT) {
|
|
3667
|
-
complaints.push(
|
|
4003
|
+
complaints.push(
|
|
4004
|
+
`it has ${categoryCount} segments and the palette defines ${VIZ_SLOT_COUNT}; past about four, slices stop being readable at all \u2014 group the tail into "Other"`
|
|
4005
|
+
);
|
|
3668
4006
|
}
|
|
3669
4007
|
if (series[0]?.values.some((value) => value != null && value < 0)) {
|
|
3670
|
-
complaints.push(
|
|
4008
|
+
complaints.push(
|
|
4009
|
+
"it contains negative values, which have no part-to-whole meaning \u2014 a signed measure belongs in a bar chart"
|
|
4010
|
+
);
|
|
3671
4011
|
}
|
|
3672
4012
|
if (complaints.length === 0) return;
|
|
3673
4013
|
warnedCharts.add(`donut:${chartLabel}`);
|
|
@@ -3680,7 +4020,9 @@ function flatValues(series) {
|
|
|
3680
4020
|
return series.flatMap((one) => one.values);
|
|
3681
4021
|
}
|
|
3682
4022
|
function alignToCategories(series, categoryCount) {
|
|
3683
|
-
return series.map(
|
|
4023
|
+
return series.map(
|
|
4024
|
+
(one) => one.values.length <= categoryCount ? one : { ...one, values: one.values.slice(0, categoryCount) }
|
|
4025
|
+
);
|
|
3684
4026
|
}
|
|
3685
4027
|
|
|
3686
4028
|
// src/components/data/ChartFrame.tsx
|
|
@@ -3939,10 +4281,12 @@ function LineChart({
|
|
|
3939
4281
|
},
|
|
3940
4282
|
tick
|
|
3941
4283
|
)),
|
|
3942
|
-
categories.map(
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
4284
|
+
categories.map(
|
|
4285
|
+
(category, index) => index % labelEvery === 0 ? (
|
|
4286
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
4287
|
+
/* @__PURE__ */ jsx54("text", { x: xAt(index), y: height - 6, textAnchor: "middle", children: category }, index)
|
|
4288
|
+
) : null
|
|
4289
|
+
)
|
|
3946
4290
|
] }),
|
|
3947
4291
|
showArea && series[0] ? /* @__PURE__ */ jsx54(
|
|
3948
4292
|
"path",
|
|
@@ -3953,19 +4297,20 @@ function LineChart({
|
|
|
3953
4297
|
}
|
|
3954
4298
|
) : null,
|
|
3955
4299
|
/* @__PURE__ */ jsx54("g", { className: "pire-chart-line", fill: "none", children: series.map((one, index) => /* @__PURE__ */ jsx54("path", { d: pathFor(one.values), stroke: seriesColor(one, index) }, one.id)) }),
|
|
3956
|
-
withMarkers ? /* @__PURE__ */ jsx54("g", { className: "pire-chart-marker", children: series.map(
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
4300
|
+
withMarkers ? /* @__PURE__ */ jsx54("g", { className: "pire-chart-marker", children: series.map(
|
|
4301
|
+
(one, seriesIndex) => one.values.map(
|
|
4302
|
+
(value, index) => value == null ? null : /* @__PURE__ */ jsx54(
|
|
4303
|
+
"circle",
|
|
4304
|
+
{
|
|
4305
|
+
cx: xAt(index),
|
|
4306
|
+
cy: yAt(value),
|
|
4307
|
+
r: 4,
|
|
4308
|
+
fill: seriesColor(one, seriesIndex)
|
|
4309
|
+
},
|
|
4310
|
+
`${one.id}-${index}`
|
|
4311
|
+
)
|
|
3967
4312
|
)
|
|
3968
|
-
)
|
|
4313
|
+
) }) : null
|
|
3969
4314
|
]
|
|
3970
4315
|
}
|
|
3971
4316
|
) : null,
|
|
@@ -3973,7 +4318,9 @@ function LineChart({
|
|
|
3973
4318
|
"div",
|
|
3974
4319
|
{
|
|
3975
4320
|
className: "pire-chart-hover",
|
|
3976
|
-
style: {
|
|
4321
|
+
style: {
|
|
4322
|
+
inset: `${PLOT_INSET.top}px ${PLOT_INSET.right}px ${PLOT_INSET.bottom}px ${PLOT_INSET.left}px`
|
|
4323
|
+
},
|
|
3977
4324
|
children: categories.map((category, categoryIndex) => (
|
|
3978
4325
|
// biome-ignore lint/suspicious/noArrayIndexKey: categories are positional and repeat legitimately (two quarters both labelled "Q1").
|
|
3979
4326
|
/* @__PURE__ */ jsx54("div", { className: "pire-chart-band", children: /* @__PURE__ */ jsxs45("span", { className: "pire-chart-tip", role: "presentation", children: [
|
|
@@ -4113,15 +4460,31 @@ function LinkList({ items, onSelect, emphasis = "key", className, ...rest }) {
|
|
|
4113
4460
|
|
|
4114
4461
|
// src/components/data/RecordCard.tsx
|
|
4115
4462
|
import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
4116
|
-
function RecordCard({
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4463
|
+
function RecordCard({
|
|
4464
|
+
title,
|
|
4465
|
+
subtitle,
|
|
4466
|
+
icon,
|
|
4467
|
+
action,
|
|
4468
|
+
isDisabled,
|
|
4469
|
+
className,
|
|
4470
|
+
...rest
|
|
4471
|
+
}) {
|
|
4472
|
+
return /* @__PURE__ */ jsxs48(
|
|
4473
|
+
"div",
|
|
4474
|
+
{
|
|
4475
|
+
className: cx("pire-recordcard", className),
|
|
4476
|
+
"data-disabled": isDisabled ? "true" : void 0,
|
|
4477
|
+
...rest,
|
|
4478
|
+
children: [
|
|
4479
|
+
icon ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-tile", "aria-hidden": "true", children: /* @__PURE__ */ jsx57(Icon, { name: icon, size: 20 }) }) : null,
|
|
4480
|
+
/* @__PURE__ */ jsxs48("span", { className: "pire-recordcard-body", children: [
|
|
4481
|
+
/* @__PURE__ */ jsx57("span", { className: "pire-recordcard-title", children: title }),
|
|
4482
|
+
subtitle ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-sub", children: subtitle }) : null
|
|
4483
|
+
] }),
|
|
4484
|
+
action ? /* @__PURE__ */ jsx57("span", { className: "pire-recordcard-action", children: action }) : null
|
|
4485
|
+
]
|
|
4486
|
+
}
|
|
4487
|
+
);
|
|
4125
4488
|
}
|
|
4126
4489
|
|
|
4127
4490
|
// src/components/data/ViewSwitcher.tsx
|
|
@@ -4221,7 +4584,14 @@ function SectionHeader({ title, meta, actions, className, ...rest }) {
|
|
|
4221
4584
|
|
|
4222
4585
|
// src/components/layout/SelectionBar.tsx
|
|
4223
4586
|
import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
4224
|
-
function SelectionBar({
|
|
4587
|
+
function SelectionBar({
|
|
4588
|
+
count,
|
|
4589
|
+
noun = "record",
|
|
4590
|
+
children,
|
|
4591
|
+
actions,
|
|
4592
|
+
className,
|
|
4593
|
+
...rest
|
|
4594
|
+
}) {
|
|
4225
4595
|
if (!count) return null;
|
|
4226
4596
|
return /* @__PURE__ */ jsxs53("div", { className: cx("pire-selectionbar", className), role: "status", "aria-live": "polite", ...rest, children: [
|
|
4227
4597
|
/* @__PURE__ */ jsxs53("span", { className: "pire-selectionbar-count", children: [
|
|
@@ -4282,7 +4652,7 @@ function SplitPane({
|
|
|
4282
4652
|
}
|
|
4283
4653
|
|
|
4284
4654
|
// src/components/patterns/ConfirmDialog.tsx
|
|
4285
|
-
import { Fragment as
|
|
4655
|
+
import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
4286
4656
|
function ConfirmDialog({
|
|
4287
4657
|
isOpen,
|
|
4288
4658
|
title,
|
|
@@ -4308,7 +4678,7 @@ function ConfirmDialog({
|
|
|
4308
4678
|
onClose: onCancel,
|
|
4309
4679
|
isDismissable: !isBusy,
|
|
4310
4680
|
showClose: false,
|
|
4311
|
-
footer: /* @__PURE__ */ jsxs56(
|
|
4681
|
+
footer: /* @__PURE__ */ jsxs56(Fragment8, { children: [
|
|
4312
4682
|
/* @__PURE__ */ jsx66(Button, { variant: "tertiary", isDisabled: isBusy, onPress: onCancel, children: cancelLabel }),
|
|
4313
4683
|
/* @__PURE__ */ jsx66(Button, { variant: tone === "danger" ? "danger" : "primary", isDisabled: isBusy, onPress: onConfirm, children: isBusy ? "Working\u2026" : confirmLabel })
|
|
4314
4684
|
] }),
|
|
@@ -4320,7 +4690,14 @@ function ConfirmDialog({
|
|
|
4320
4690
|
// pairs with an explicit role for the same reason.
|
|
4321
4691
|
/* @__PURE__ */ jsx66("div", { className: "pire-confirm-facts", role: "group", "aria-label": msg.confirmDialogFactsLabel, children: /* @__PURE__ */ jsx66(DescriptionList, { layout: "rows", items: facts }) })
|
|
4322
4692
|
) : null,
|
|
4323
|
-
consequence ? /* @__PURE__ */ jsx66(
|
|
4693
|
+
consequence ? /* @__PURE__ */ jsx66(
|
|
4694
|
+
InlineMessage,
|
|
4695
|
+
{
|
|
4696
|
+
kind: tone === "danger" ? "error" : "warning",
|
|
4697
|
+
style: { marginBottom: children ? "var(--sp-3)" : 0 },
|
|
4698
|
+
children: consequence
|
|
4699
|
+
}
|
|
4700
|
+
) : null,
|
|
4324
4701
|
children
|
|
4325
4702
|
]
|
|
4326
4703
|
}
|
|
@@ -4341,7 +4718,7 @@ import {
|
|
|
4341
4718
|
Header as Header2,
|
|
4342
4719
|
useFilter
|
|
4343
4720
|
} from "react-aria-components";
|
|
4344
|
-
import { Fragment as
|
|
4721
|
+
import { Fragment as Fragment9, jsx as jsx67, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
4345
4722
|
var RESULTS_SECTION_KEY = "__pire_results__";
|
|
4346
4723
|
var searchableText = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
|
|
4347
4724
|
function CommandPalette({
|
|
@@ -4372,10 +4749,13 @@ function CommandPalette({
|
|
|
4372
4749
|
for (const group of groups) for (const item of group.items) byId.set(item.id, searchableText(item));
|
|
4373
4750
|
return byId;
|
|
4374
4751
|
}, [groups]);
|
|
4375
|
-
const filter = React28.useCallback(
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4752
|
+
const filter = React28.useCallback(
|
|
4753
|
+
(textValue, inputValue, node) => {
|
|
4754
|
+
if (node.parentKey === RESULTS_SECTION_KEY) return true;
|
|
4755
|
+
return contains(searchableById.get(String(node.key)) ?? textValue, inputValue);
|
|
4756
|
+
},
|
|
4757
|
+
[contains, searchableById]
|
|
4758
|
+
);
|
|
4379
4759
|
const handleInputChange = (value) => {
|
|
4380
4760
|
setQuery(value);
|
|
4381
4761
|
onSearch?.(value);
|
|
@@ -4434,7 +4814,7 @@ function CommandPalette({
|
|
|
4434
4814
|
// aria-hidden: the glyphs are a sighted affordance for discovering the keys. A screen
|
|
4435
4815
|
// reader already announces the listbox semantics that make those keys work, so reading
|
|
4436
4816
|
// "up arrow down arrow navigate" out loud is noise on every open.
|
|
4437
|
-
/* @__PURE__ */ jsx67("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ jsxs57(
|
|
4817
|
+
/* @__PURE__ */ jsx67("div", { className: "pire-cp-foot", "aria-hidden": "true", children: footer ?? /* @__PURE__ */ jsxs57(Fragment9, { children: [
|
|
4438
4818
|
/* @__PURE__ */ jsxs57("span", { className: "pire-cp-hint", children: [
|
|
4439
4819
|
/* @__PURE__ */ jsx67(Kbd, { children: "\u2191" }),
|
|
4440
4820
|
/* @__PURE__ */ jsx67(Kbd, { children: "\u2193" }),
|
|
@@ -4479,7 +4859,7 @@ import {
|
|
|
4479
4859
|
Dialog as AriaDialog5,
|
|
4480
4860
|
useFilter as useFilter2
|
|
4481
4861
|
} from "react-aria-components";
|
|
4482
|
-
import { Fragment as
|
|
4862
|
+
import { Fragment as Fragment10, jsx as jsx68, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
4483
4863
|
var searchableText2 = (item) => [item.label, item.description, item.keywords].filter(Boolean).join(" ");
|
|
4484
4864
|
function AppLauncher({
|
|
4485
4865
|
sections,
|
|
@@ -4508,7 +4888,10 @@ function AppLauncher({
|
|
|
4508
4888
|
if (isFilteredExternally) return sections;
|
|
4509
4889
|
const q = query.trim();
|
|
4510
4890
|
if (!q) return sections;
|
|
4511
|
-
return sections.map((section) => ({
|
|
4891
|
+
return sections.map((section) => ({
|
|
4892
|
+
...section,
|
|
4893
|
+
items: section.items.filter((i) => contains(searchableText2(i), q))
|
|
4894
|
+
})).filter((section) => section.items.length > 0);
|
|
4512
4895
|
}, [sections, query, isFilteredExternally, contains]);
|
|
4513
4896
|
const isEmpty = !isLoading && visible.length === 0;
|
|
4514
4897
|
const label = ariaLabel ?? msg.appLauncherLabel;
|
|
@@ -4522,7 +4905,7 @@ function AppLauncher({
|
|
|
4522
4905
|
offset: 0,
|
|
4523
4906
|
crossOffset: 0,
|
|
4524
4907
|
containerPadding: 0,
|
|
4525
|
-
children: /* @__PURE__ */ jsx68(AriaDialog5, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ jsxs58(
|
|
4908
|
+
children: /* @__PURE__ */ jsx68(AriaDialog5, { className: "pire-launcher", "aria-label": label, children: ({ close }) => /* @__PURE__ */ jsxs58(Fragment10, { children: [
|
|
4526
4909
|
/* @__PURE__ */ jsxs58("div", { className: "pire-launcher-head", children: [
|
|
4527
4910
|
/* @__PURE__ */ jsx68("span", { className: "pire-launcher-title", children: title ?? msg.appLauncherTitle }),
|
|
4528
4911
|
meta ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-meta", children: meta }) : null
|
|
@@ -4565,7 +4948,13 @@ function AppLauncher({
|
|
|
4565
4948
|
onAction?.(item.id);
|
|
4566
4949
|
},
|
|
4567
4950
|
children: [
|
|
4568
|
-
item.icon ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ jsx68(
|
|
4951
|
+
item.icon ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-icon", children: /* @__PURE__ */ jsx68(
|
|
4952
|
+
Icon,
|
|
4953
|
+
{
|
|
4954
|
+
name: item.icon,
|
|
4955
|
+
size: (section.variant ?? "tile") === "tile" ? 20 : 16
|
|
4956
|
+
}
|
|
4957
|
+
) }) : null,
|
|
4569
4958
|
/* @__PURE__ */ jsxs58("span", { className: "pire-launcher-item-text", children: [
|
|
4570
4959
|
/* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-label", children: item.label }),
|
|
4571
4960
|
showsDescription ? /* @__PURE__ */ jsx68("span", { className: "pire-launcher-item-desc", children: item.description }) : null
|
|
@@ -4586,7 +4975,16 @@ function AppLauncher({
|
|
|
4586
4975
|
// src/components/patterns/SidePanel.tsx
|
|
4587
4976
|
import { ModalOverlay as ModalOverlay3, Modal as Modal3, Dialog as AriaDialog6, Heading as Heading5 } from "react-aria-components";
|
|
4588
4977
|
import { jsx as jsx69, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
4589
|
-
function SidePanel({
|
|
4978
|
+
function SidePanel({
|
|
4979
|
+
isOpen,
|
|
4980
|
+
title,
|
|
4981
|
+
subtitle,
|
|
4982
|
+
width = 400,
|
|
4983
|
+
children,
|
|
4984
|
+
footer,
|
|
4985
|
+
onClose,
|
|
4986
|
+
className
|
|
4987
|
+
}) {
|
|
4590
4988
|
const msg = usePireMessages();
|
|
4591
4989
|
return /* @__PURE__ */ jsx69(
|
|
4592
4990
|
ModalOverlay3,
|
|
@@ -4614,7 +5012,15 @@ function SidePanel({ isOpen, title, subtitle, width = 400, children, footer, onC
|
|
|
4614
5012
|
|
|
4615
5013
|
// src/components/patterns/EmptyState.tsx
|
|
4616
5014
|
import { jsx as jsx70, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
4617
|
-
function EmptyState({
|
|
5015
|
+
function EmptyState({
|
|
5016
|
+
icon = "file-text",
|
|
5017
|
+
title,
|
|
5018
|
+
action,
|
|
5019
|
+
compact,
|
|
5020
|
+
children,
|
|
5021
|
+
className,
|
|
5022
|
+
...rest
|
|
5023
|
+
}) {
|
|
4618
5024
|
return /* @__PURE__ */ jsxs60("div", { className: cx("pire-empty", className), "data-compact": compact ? "true" : void 0, ...rest, children: [
|
|
4619
5025
|
/* @__PURE__ */ jsx70(Icon, { name: icon, size: 24, className: "pire-empty-icon" }),
|
|
4620
5026
|
title ? /* @__PURE__ */ jsx70("p", { className: "pire-empty-title", style: { margin: 0 }, children: title }) : null,
|
|
@@ -4687,22 +5093,25 @@ function NumPad({
|
|
|
4687
5093
|
}) {
|
|
4688
5094
|
const msg = usePireMessages();
|
|
4689
5095
|
const containerRef = React30.useRef(null);
|
|
4690
|
-
const applyKey = React30.useCallback(
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
5096
|
+
const applyKey = React30.useCallback(
|
|
5097
|
+
(key) => {
|
|
5098
|
+
if (isDisabled) return;
|
|
5099
|
+
if (key.value === "backspace") {
|
|
5100
|
+
onChange(value.slice(0, -1));
|
|
5101
|
+
return;
|
|
5102
|
+
}
|
|
5103
|
+
if (key.value === "clear") {
|
|
5104
|
+
onChange("");
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
if (isInsertable(key.value)) {
|
|
5108
|
+
onChange(value + key.value);
|
|
5109
|
+
return;
|
|
5110
|
+
}
|
|
5111
|
+
onAction?.(key.value);
|
|
5112
|
+
},
|
|
5113
|
+
[isDisabled, value, onChange, onAction]
|
|
5114
|
+
);
|
|
4706
5115
|
useNumPadKeyboard((keyValue) => applyKey({ value: keyValue }), isDisabled, containerRef);
|
|
4707
5116
|
const keys = [...BASE_KEYS, ...extraKeys];
|
|
4708
5117
|
return /* @__PURE__ */ jsxs61(
|
|
@@ -4772,9 +5181,12 @@ function FileDropZone({
|
|
|
4772
5181
|
const [uncontrolled, setUncontrolled] = React31.useState(defaultValue ?? []);
|
|
4773
5182
|
const files = value ?? uncontrolled;
|
|
4774
5183
|
const created = React31.useRef([]);
|
|
4775
|
-
React31.useEffect(
|
|
4776
|
-
|
|
4777
|
-
|
|
5184
|
+
React31.useEffect(
|
|
5185
|
+
() => () => {
|
|
5186
|
+
for (const url of created.current) URL.revokeObjectURL(url);
|
|
5187
|
+
},
|
|
5188
|
+
[]
|
|
5189
|
+
);
|
|
4778
5190
|
const commit = (next) => {
|
|
4779
5191
|
if (value === void 0) setUncontrolled(next);
|
|
4780
5192
|
onChange?.(next);
|
|
@@ -4805,9 +5217,7 @@ function FileDropZone({
|
|
|
4805
5217
|
"data-height": height,
|
|
4806
5218
|
isDisabled: isDisabled || isReadOnly,
|
|
4807
5219
|
onDrop: async (e) => {
|
|
4808
|
-
const dropped = await Promise.all(
|
|
4809
|
-
e.items.filter(isFileDropItem).map((item) => item.getFile())
|
|
4810
|
-
);
|
|
5220
|
+
const dropped = await Promise.all(e.items.filter(isFileDropItem).map((item) => item.getFile()));
|
|
4811
5221
|
accept(dropped);
|
|
4812
5222
|
},
|
|
4813
5223
|
children: [
|
|
@@ -4846,7 +5256,14 @@ function FileDropZone({
|
|
|
4846
5256
|
}
|
|
4847
5257
|
|
|
4848
5258
|
// src/index.ts
|
|
4849
|
-
import {
|
|
5259
|
+
import {
|
|
5260
|
+
DialogTrigger as DialogTrigger2,
|
|
5261
|
+
MenuTrigger as MenuTrigger3,
|
|
5262
|
+
SubmenuTrigger,
|
|
5263
|
+
Popover as Popover9,
|
|
5264
|
+
RouterProvider,
|
|
5265
|
+
I18nProvider
|
|
5266
|
+
} from "react-aria-components";
|
|
4850
5267
|
import { Focusable as Focusable2 } from "react-aria-components";
|
|
4851
5268
|
export {
|
|
4852
5269
|
AppLauncher,
|