@tensor_1/react 2.18.0 → 2.19.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/README.md +102 -1
- package/dist/components/Comments.d.ts +18 -2
- package/dist/components/Comments.js +37 -12
- package/dist/components/EditorIcons.d.ts +39 -0
- package/dist/components/EditorIcons.js +51 -0
- package/dist/components/EmojiGlyph.d.ts +10 -0
- package/dist/components/EmojiGlyph.js +18 -0
- package/dist/components/EmojiPicker.d.ts +60 -0
- package/dist/components/EmojiPicker.js +277 -0
- package/dist/components/Markdown.d.ts +36 -0
- package/dist/components/Markdown.js +104 -0
- package/dist/components/ReactionBar.d.ts +57 -0
- package/dist/components/ReactionBar.js +81 -0
- package/dist/components/RelationshipGraph.js +23 -4
- package/dist/components/RichTextEditor.d.ts +128 -0
- package/dist/components/RichTextEditor.js +954 -0
- package/dist/components/SaveStatus.d.ts +32 -0
- package/dist/components/SaveStatus.js +21 -0
- package/dist/components/Tabs.d.ts +10 -3
- package/dist/components/Tabs.js +5 -3
- package/dist/emoji-image-WQLh8ZQP.d.cts +128 -0
- package/dist/emoji-image.d.ts +25 -0
- package/dist/emoji-image.js +80 -0
- package/dist/emoji-model.d.ts +66 -0
- package/dist/emoji-model.js +108 -0
- package/dist/emoji.cjs +871 -0
- package/dist/emoji.d.cts +57 -0
- package/dist/emoji.d.ts +6 -0
- package/dist/emoji.js +18 -0
- package/dist/index.cjs +587 -519
- package/dist/index.d.cts +59 -64
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/markdown-model.d.ts +75 -0
- package/dist/markdown-model.js +438 -0
- package/dist/markdown.cjs +585 -0
- package/dist/markdown.d.cts +115 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.js +9 -0
- package/dist/overlay-position-CEGSz6Z2.d.cts +59 -0
- package/dist/rich-text/emoji-items.d.ts +14 -0
- package/dist/rich-text/emoji-items.js +7 -0
- package/dist/rich-text/pipeline.d.ts +91 -0
- package/dist/rich-text/pipeline.js +379 -0
- package/dist/rich-text/round-trip.d.ts +24 -0
- package/dist/rich-text/round-trip.js +11 -0
- package/dist/rich-text.cjs +2578 -0
- package/dist/rich-text.d.cts +148 -0
- package/dist/rich-text.d.ts +8 -0
- package/dist/rich-text.js +10 -0
- package/dist/url-policy.d.ts +9 -0
- package/dist/url-policy.js +11 -0
- package/package.json +82 -1
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,7 @@ __export(src_exports, {
|
|
|
51
51
|
ContentList: () => ContentList,
|
|
52
52
|
ContentListItem: () => ContentListItem,
|
|
53
53
|
DEFAULT_RELATIONSHIP_GRAPH_LABELS: () => DEFAULT_RELATIONSHIP_GRAPH_LABELS,
|
|
54
|
+
DEFAULT_SAVE_STATUS_LABELS: () => DEFAULT_SAVE_STATUS_LABELS,
|
|
54
55
|
DateRangePicker: () => DateRangePicker,
|
|
55
56
|
DescriptionItem: () => DescriptionItem,
|
|
56
57
|
DescriptionList: () => DescriptionList,
|
|
@@ -117,6 +118,7 @@ __export(src_exports, {
|
|
|
117
118
|
RowAction: () => RowAction,
|
|
118
119
|
RowActions: () => RowActions,
|
|
119
120
|
RuleBuilder: () => RuleBuilder,
|
|
121
|
+
SaveStatus: () => SaveStatus,
|
|
120
122
|
SavedViewMenu: () => SavedViewMenu,
|
|
121
123
|
SchedulingCalendar: () => SchedulingCalendar,
|
|
122
124
|
SectionHead: () => SectionHead,
|
|
@@ -1466,16 +1468,18 @@ function Tab({ value, children, disabled, className, onClick, ...props }) {
|
|
|
1466
1468
|
}
|
|
1467
1469
|
);
|
|
1468
1470
|
}
|
|
1469
|
-
function TabPanel({ value, children, ...props }) {
|
|
1471
|
+
function TabPanel({ value, children, keepMounted, ...props }) {
|
|
1470
1472
|
const ctx = (0, import_react20.useContext)(TabsCtx);
|
|
1471
|
-
|
|
1473
|
+
const selected = ctx.value === value;
|
|
1474
|
+
if (!selected && !keepMounted) return null;
|
|
1472
1475
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1473
1476
|
"div",
|
|
1474
1477
|
{
|
|
1475
1478
|
role: "tabpanel",
|
|
1476
1479
|
id: ctx.baseId ? `${ctx.baseId}-panel-${value}` : void 0,
|
|
1477
1480
|
"aria-labelledby": ctx.baseId ? `${ctx.baseId}-tab-${value}` : void 0,
|
|
1478
|
-
|
|
1481
|
+
hidden: !selected || void 0,
|
|
1482
|
+
tabIndex: selected ? 0 : -1,
|
|
1479
1483
|
...props,
|
|
1480
1484
|
children
|
|
1481
1485
|
}
|
|
@@ -2606,41 +2610,84 @@ var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
|
2606
2610
|
function Comments({ children, className, ...props }) {
|
|
2607
2611
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { role: "log", className: cx("uix-comments", className), ...props, children });
|
|
2608
2612
|
}
|
|
2609
|
-
function Comment({
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2613
|
+
function Comment({
|
|
2614
|
+
avatar,
|
|
2615
|
+
author,
|
|
2616
|
+
meta,
|
|
2617
|
+
children,
|
|
2618
|
+
className,
|
|
2619
|
+
variant = "person",
|
|
2620
|
+
systemLabel = "System",
|
|
2621
|
+
replyTo,
|
|
2622
|
+
replyToLabel = "In reply to",
|
|
2623
|
+
...props
|
|
2624
|
+
}) {
|
|
2625
|
+
const system = variant === "system";
|
|
2626
|
+
const byline = author ?? (system ? systemLabel : void 0);
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
2628
|
+
"div",
|
|
2629
|
+
{
|
|
2630
|
+
className: cx("uix-comment", system && "uix-comment--system", className),
|
|
2631
|
+
"data-variant": system ? "system" : void 0,
|
|
2632
|
+
...props,
|
|
2633
|
+
children: [
|
|
2634
|
+
avatar ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { "aria-hidden": "true" }),
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "uix-comment__body", children: [
|
|
2636
|
+
(byline != null || meta != null) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "uix-comment__meta", children: [
|
|
2637
|
+
byline != null && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "uix-comment__author", children: byline }),
|
|
2638
|
+
byline != null && meta != null ? " \xB7 " : null,
|
|
2639
|
+
meta
|
|
2640
|
+
] }),
|
|
2641
|
+
replyTo != null && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("blockquote", { className: "uix-comment__reply", children: [
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "uix-comment__reply-label", children: replyToLabel }),
|
|
2643
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "uix-comment__reply-body", children: replyTo })
|
|
2644
|
+
] }),
|
|
2645
|
+
children
|
|
2646
|
+
] })
|
|
2647
|
+
]
|
|
2648
|
+
}
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
// src/components/SaveStatus.tsx
|
|
2653
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2654
|
+
var DEFAULT_SAVE_STATUS_LABELS = {
|
|
2655
|
+
saving: "Saving\u2026",
|
|
2656
|
+
saved: "Saved",
|
|
2657
|
+
failed: "Could not save",
|
|
2658
|
+
retry: "Try again"
|
|
2659
|
+
};
|
|
2660
|
+
function SaveStatus({ state, labels, onRetry, className, ...props }) {
|
|
2661
|
+
const text = { ...DEFAULT_SAVE_STATUS_LABELS, ...labels };
|
|
2662
|
+
const message = state === "idle" ? "" : text[state];
|
|
2663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cx("uix-save-status", className), "data-state": state, ...props, children: [
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "uix-save-status__icon", "aria-hidden": "true" }),
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "uix-save-status__text", role: "status", "aria-live": "polite", children: message }),
|
|
2666
|
+
state === "failed" && onRetry && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("button", { type: "button", className: "uix-btn uix-btn--link uix-btn--sm uix-save-status__retry", onClick: onRetry, children: text.retry })
|
|
2620
2667
|
] });
|
|
2621
2668
|
}
|
|
2622
2669
|
|
|
2623
2670
|
// src/components/Composer.tsx
|
|
2624
2671
|
var import_react28 = require("react");
|
|
2625
|
-
var
|
|
2672
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2626
2673
|
function Composer({ children, className, label = "Add a comment", ...props }) {
|
|
2627
|
-
return /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cx("uix-composer", className), ...props, children: import_react28.Children.map(children, (child) => {
|
|
2628
2675
|
if (!(0, import_react28.isValidElement)(child) || child.type !== "textarea") return child;
|
|
2629
2676
|
const p = child.props;
|
|
2630
2677
|
return p["aria-label"] || p["aria-labelledby"] || p.id ? child : (0, import_react28.cloneElement)(child, { "aria-label": label });
|
|
2631
2678
|
}) });
|
|
2632
2679
|
}
|
|
2633
2680
|
function ComposerBar({ children, className, ...props }) {
|
|
2634
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cx("uix-composer__bar", className), ...props, children });
|
|
2635
2682
|
}
|
|
2636
2683
|
|
|
2637
2684
|
// src/components/Segmented.tsx
|
|
2638
2685
|
var import_react29 = require("react");
|
|
2639
|
-
var
|
|
2686
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2640
2687
|
var SegmentedCtx = (0, import_react29.createContext)({});
|
|
2641
2688
|
function Segmented({ value, onChange, children, className, ...props }) {
|
|
2642
2689
|
const contextValue = (0, import_react29.useMemo)(() => ({ value, onChange }), [value, onChange]);
|
|
2643
|
-
return /* @__PURE__ */ (0,
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SegmentedCtx.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { role: "group", className: cx("uix-segmented", className), ...props, children }) });
|
|
2644
2691
|
}
|
|
2645
2692
|
function SegmentedOption({
|
|
2646
2693
|
value,
|
|
@@ -2651,7 +2698,7 @@ function SegmentedOption({
|
|
|
2651
2698
|
}) {
|
|
2652
2699
|
const ctx = (0, import_react29.useContext)(SegmentedCtx);
|
|
2653
2700
|
const selected = ctx.value === value;
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2655
2702
|
"button",
|
|
2656
2703
|
{
|
|
2657
2704
|
type: "button",
|
|
@@ -2669,69 +2716,69 @@ function SegmentedOption({
|
|
|
2669
2716
|
|
|
2670
2717
|
// src/components/TableControls.tsx
|
|
2671
2718
|
var import_react30 = require("react");
|
|
2672
|
-
var
|
|
2719
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2673
2720
|
function ViewMenu({ density, densityLabel, densityOptions, onDensityChange, zebra, freeze, columns, columnsLabel, onColumnVisibilityChange }) {
|
|
2674
2721
|
const densityLabelId = (0, import_react30.useId)();
|
|
2675
2722
|
const zebraLabelId = (0, import_react30.useId)();
|
|
2676
2723
|
const freezeLabelId = (0, import_react30.useId)();
|
|
2677
|
-
return /* @__PURE__ */ (0,
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
2679
|
-
/* @__PURE__ */ (0,
|
|
2680
|
-
/* @__PURE__ */ (0,
|
|
2724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu", children: [
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu__group", children: [
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { id: densityLabelId, className: "uix-view-menu__label", children: densityLabel }),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Segmented, { value: density, onChange: onDensityChange, "aria-labelledby": densityLabelId, children: densityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SegmentedOption, { value: option.value, children: option.label }, option.value)) })
|
|
2681
2728
|
] }),
|
|
2682
|
-
(zebra || freeze) && /* @__PURE__ */ (0,
|
|
2683
|
-
zebra && /* @__PURE__ */ (0,
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
2685
|
-
/* @__PURE__ */ (0,
|
|
2729
|
+
(zebra || freeze) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu__group", children: [
|
|
2730
|
+
zebra && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu__row", children: [
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { id: zebraLabelId, children: zebra.label }),
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Switch, { checked: zebra.checked, "aria-labelledby": zebraLabelId, onChange: (event) => zebra.onChange(event.currentTarget.checked) })
|
|
2686
2733
|
] }),
|
|
2687
|
-
freeze && /* @__PURE__ */ (0,
|
|
2688
|
-
/* @__PURE__ */ (0,
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2734
|
+
freeze && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu__row", children: [
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { id: freezeLabelId, children: freeze.label }),
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Switch, { checked: freeze.checked, "aria-labelledby": freezeLabelId, onChange: (event) => freeze.onChange(event.currentTarget.checked) })
|
|
2690
2737
|
] })
|
|
2691
2738
|
] }),
|
|
2692
|
-
columns && columns.length > 0 && /* @__PURE__ */ (0,
|
|
2693
|
-
columnsLabel != null && /* @__PURE__ */ (0,
|
|
2694
|
-
/* @__PURE__ */ (0,
|
|
2739
|
+
columns && columns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-view-menu__group", children: [
|
|
2740
|
+
columnsLabel != null && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uix-view-menu__label", children: columnsLabel }),
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uix-view-menu__cols", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Checkbox, { label: column.label, checked: column.visible, disabled: column.disabled, onChange: (event) => onColumnVisibilityChange?.(column.id, event.currentTarget.checked) }, column.id)) })
|
|
2695
2742
|
] })
|
|
2696
2743
|
] });
|
|
2697
2744
|
}
|
|
2698
2745
|
function FilterPopover({ label, type = "text", value, onValueChange, options, applyLabel, clearLabel, onApply, onClear, placeholder }) {
|
|
2699
|
-
return /* @__PURE__ */ (0,
|
|
2700
|
-
/* @__PURE__ */ (0,
|
|
2701
|
-
/* @__PURE__ */ (0,
|
|
2702
|
-
type === "select" || type === "enum" || type === "boolean" ? /* @__PURE__ */ (0,
|
|
2746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-filter-popover", children: [
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "uix-label", children: [
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: label }),
|
|
2749
|
+
type === "select" || type === "enum" || type === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("select", { className: "uix-select", value, onChange: (event) => onValueChange(event.currentTarget.value), children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { value: option.value, children: option.label }, option.value)) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Input, { type, value, placeholder, onChange: (event) => onValueChange(event.currentTarget.value) })
|
|
2703
2750
|
] }),
|
|
2704
|
-
/* @__PURE__ */ (0,
|
|
2705
|
-
/* @__PURE__ */ (0,
|
|
2706
|
-
/* @__PURE__ */ (0,
|
|
2751
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uix-filter-popover__actions", children: [
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "button", onClick: onClear, children: clearLabel }),
|
|
2753
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "button", variant: "primary", onClick: onApply, children: applyLabel })
|
|
2707
2754
|
] })
|
|
2708
2755
|
] });
|
|
2709
2756
|
}
|
|
2710
2757
|
function SavedViewMenu({ items, onSelect, onPinChange, pinLabel, unpinLabel, emptyLabel, actions, footer }) {
|
|
2711
|
-
return /* @__PURE__ */ (0,
|
|
2712
|
-
items.length === 0 && emptyLabel != null && /* @__PURE__ */ (0,
|
|
2713
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2715
|
-
onPinChange && /* @__PURE__ */ (0,
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("ul", { className: "uix-menu uix-saved-views", children: [
|
|
2759
|
+
items.length === 0 && emptyLabel != null && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { className: "uix-menu__label", children: emptyLabel }),
|
|
2760
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("li", { className: "uix-saved-views__row", children: [
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { type: "button", className: "uix-menu__item", "data-active": item.active || void 0, onClick: () => onSelect(item.id), children: item.label }),
|
|
2762
|
+
onPinChange && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { type: "button", className: "uix-saved-views__pin", "aria-label": item.pinned ? unpinLabel : pinLabel, "data-on": item.pinned || void 0, onClick: () => onPinChange(item.id, !item.pinned), children: "\u2605" }),
|
|
2716
2763
|
actions?.(item)
|
|
2717
2764
|
] }, item.id)),
|
|
2718
|
-
footer != null && /* @__PURE__ */ (0,
|
|
2765
|
+
footer != null && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { className: "uix-saved-views__footer", children: footer })
|
|
2719
2766
|
] });
|
|
2720
2767
|
}
|
|
2721
2768
|
|
|
2722
2769
|
// src/components/Timeline.tsx
|
|
2723
|
-
var
|
|
2770
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2724
2771
|
function Timeline({ children, className, ...props }) {
|
|
2725
|
-
return /* @__PURE__ */ (0,
|
|
2772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ol", { className: cx("uix-timeline", className), ...props, children });
|
|
2726
2773
|
}
|
|
2727
2774
|
function TimelineItem({ node, meta, children, className, ...props }) {
|
|
2728
|
-
return /* @__PURE__ */ (0,
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2730
|
-
node ?? /* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: cx("uix-timeline__item", className), ...props, children: [
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "uix-timeline__rail", "aria-hidden": "true", children: [
|
|
2777
|
+
node ?? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "uix-timeline__node" }),
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "uix-timeline__line" })
|
|
2732
2779
|
] }),
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
2734
|
-
meta != null && /* @__PURE__ */ (0,
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "uix-timeline__body", children: [
|
|
2781
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "uix-timeline__meta", children: meta }),
|
|
2735
2782
|
children
|
|
2736
2783
|
] })
|
|
2737
2784
|
] });
|
|
@@ -2739,10 +2786,10 @@ function TimelineItem({ node, meta, children, className, ...props }) {
|
|
|
2739
2786
|
|
|
2740
2787
|
// src/components/Pipeline.tsx
|
|
2741
2788
|
var import_react31 = require("react");
|
|
2742
|
-
var
|
|
2789
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2743
2790
|
function Pipeline({ detailed = false, children, className, tabIndex, ...props }) {
|
|
2744
2791
|
const stages = detailed ? import_react31.Children.map(children, (child) => (0, import_react31.isValidElement)(child) && child.type === PipelineStage ? (0, import_react31.cloneElement)(child, { detailed: child.props.detailed ?? true }) : child) : children;
|
|
2745
|
-
return /* @__PURE__ */ (0,
|
|
2792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2746
2793
|
"ol",
|
|
2747
2794
|
{
|
|
2748
2795
|
className: cx("uix-pipeline", detailed && "uix-pipeline--detailed", className),
|
|
@@ -2779,20 +2826,20 @@ function PipelineStage({
|
|
|
2779
2826
|
const current = currentProp ?? (state === "active" || state === "current" || state === "running");
|
|
2780
2827
|
const resolvedStateLabel = stateLabel2 ?? DEFAULT_STATE_LABELS[state];
|
|
2781
2828
|
const showDetails = detailed || description != null || meta != null || marker != null;
|
|
2782
|
-
return /* @__PURE__ */ (0,
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2783
2830
|
"li",
|
|
2784
2831
|
{
|
|
2785
2832
|
className: cx("uix-pipeline__stage", className),
|
|
2786
2833
|
"data-state": state,
|
|
2787
2834
|
"aria-current": current ? "step" : void 0,
|
|
2788
2835
|
...props,
|
|
2789
|
-
children: showDetails ? /* @__PURE__ */ (0,
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2791
|
-
/* @__PURE__ */ (0,
|
|
2792
|
-
/* @__PURE__ */ (0,
|
|
2793
|
-
/* @__PURE__ */ (0,
|
|
2794
|
-
description != null && /* @__PURE__ */ (0,
|
|
2795
|
-
meta != null && /* @__PURE__ */ (0,
|
|
2836
|
+
children: showDetails ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "uix-pipeline__marker", "aria-hidden": "true", children: marker }),
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "uix-pipeline__content", children: [
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "uix-pipeline__eyebrow", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "uix-pipeline__state", children: resolvedStateLabel }) }),
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "uix-pipeline__title", children: label }),
|
|
2841
|
+
description != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "uix-pipeline__description", children: description }),
|
|
2842
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "uix-pipeline__meta", children: meta })
|
|
2796
2843
|
] })
|
|
2797
2844
|
] }) : label
|
|
2798
2845
|
}
|
|
@@ -2800,9 +2847,9 @@ function PipelineStage({
|
|
|
2800
2847
|
}
|
|
2801
2848
|
|
|
2802
2849
|
// src/components/Flow.tsx
|
|
2803
|
-
var
|
|
2850
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2804
2851
|
function Flow({ variant = "linear", panel = false, children, className, role = "group", ...props }) {
|
|
2805
|
-
return /* @__PURE__ */ (0,
|
|
2852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2806
2853
|
"div",
|
|
2807
2854
|
{
|
|
2808
2855
|
className: cx("uix-flow", `uix-flow--${variant}`, panel && "uix-flow--panel", className),
|
|
@@ -2832,33 +2879,33 @@ function FlowNode({
|
|
|
2832
2879
|
...props
|
|
2833
2880
|
}) {
|
|
2834
2881
|
const resolvedStateLabel = stateLabel2 ?? FLOW_STATE_LABELS[state];
|
|
2835
|
-
return /* @__PURE__ */ (0,
|
|
2836
|
-
icon != null && /* @__PURE__ */ (0,
|
|
2837
|
-
/* @__PURE__ */ (0,
|
|
2838
|
-
eyebrow != null && /* @__PURE__ */ (0,
|
|
2839
|
-
/* @__PURE__ */ (0,
|
|
2840
|
-
meta != null && /* @__PURE__ */ (0,
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cx("uix-node", `uix-node--${state}`, icon == null && "uix-node--no-icon", wide && "uix-node--wide", className), ...props, children: [
|
|
2883
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "uix-node__icon", "aria-hidden": "true", children: icon }),
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "uix-node__body", children: [
|
|
2885
|
+
eyebrow != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "uix-node__eyebrow", children: eyebrow }),
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "uix-node__title", children: title }),
|
|
2887
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "uix-node__meta", children: meta }),
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "uix-node__status", children: resolvedStateLabel })
|
|
2842
2889
|
] }),
|
|
2843
|
-
footer != null && /* @__PURE__ */ (0,
|
|
2890
|
+
footer != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "uix-node__footer", children: footer })
|
|
2844
2891
|
] });
|
|
2845
2892
|
}
|
|
2846
2893
|
|
|
2847
2894
|
// src/components/Prose.tsx
|
|
2848
|
-
var
|
|
2895
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2849
2896
|
function Prose({ children, className, ...props }) {
|
|
2850
|
-
return /* @__PURE__ */ (0,
|
|
2897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cx("uix-prose", className), ...props, children });
|
|
2851
2898
|
}
|
|
2852
2899
|
function Note({ tone, icon, children, className, ...props }) {
|
|
2853
|
-
return /* @__PURE__ */ (0,
|
|
2854
|
-
icon != null && /* @__PURE__ */ (0,
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cx("uix-note", tone && `uix-note--${tone}`, className), ...props, children: [
|
|
2901
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "uix-note__icon", children: icon }),
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "uix-note__body", children })
|
|
2856
2903
|
] });
|
|
2857
2904
|
}
|
|
2858
2905
|
|
|
2859
2906
|
// src/components/Popover.tsx
|
|
2860
2907
|
var import_react32 = require("react");
|
|
2861
|
-
var
|
|
2908
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2862
2909
|
function Popover({
|
|
2863
2910
|
popover = "auto",
|
|
2864
2911
|
anchor,
|
|
@@ -2887,12 +2934,12 @@ function Popover({
|
|
|
2887
2934
|
el.addEventListener("toggle", sync);
|
|
2888
2935
|
return () => el.removeEventListener("toggle", sync);
|
|
2889
2936
|
}, [anchor, reposition]);
|
|
2890
|
-
return /* @__PURE__ */ (0,
|
|
2937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref, className: cx("uix-popover", className), ...popoverAttr, ...props, children });
|
|
2891
2938
|
}
|
|
2892
2939
|
|
|
2893
2940
|
// src/components/CommandPalette.tsx
|
|
2894
2941
|
var import_react33 = require("react");
|
|
2895
|
-
var
|
|
2942
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2896
2943
|
var CmdkContext = (0, import_react33.createContext)(null);
|
|
2897
2944
|
function CommandPalette({ inputProps, children, className, ...props }) {
|
|
2898
2945
|
const listId = (0, import_react33.useId)();
|
|
@@ -2911,8 +2958,8 @@ function CommandPalette({ inputProps, children, className, ...props }) {
|
|
|
2911
2958
|
return () => clearTimeout(t);
|
|
2912
2959
|
}, [count]);
|
|
2913
2960
|
const ctx = (0, import_react33.useMemo)(() => ({ listId, setActive, registerItem }), [listId, setActive, registerItem]);
|
|
2914
|
-
return /* @__PURE__ */ (0,
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
2961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CmdkContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cx("uix-cmdk", className), ...props, children: [
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2916
2963
|
"input",
|
|
2917
2964
|
{
|
|
2918
2965
|
className: "uix-cmdk__input",
|
|
@@ -2925,14 +2972,14 @@ function CommandPalette({ inputProps, children, className, ...props }) {
|
|
|
2925
2972
|
...inputProps
|
|
2926
2973
|
}
|
|
2927
2974
|
),
|
|
2928
|
-
/* @__PURE__ */ (0,
|
|
2929
|
-
/* @__PURE__ */ (0,
|
|
2975
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "uix-cmdk__list", role: "listbox", id: listId, children }),
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "uix-visually-hidden", role: "status", children: announced })
|
|
2930
2977
|
] }) });
|
|
2931
2978
|
}
|
|
2932
2979
|
function CommandGroup({ label, children }) {
|
|
2933
2980
|
const labelId = (0, import_react33.useId)();
|
|
2934
|
-
return /* @__PURE__ */ (0,
|
|
2935
|
-
label != null && /* @__PURE__ */ (0,
|
|
2981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { role: "group", "aria-labelledby": label != null ? labelId : void 0, children: [
|
|
2982
|
+
label != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "uix-cmdk__group", id: labelId, children: label }),
|
|
2936
2983
|
children
|
|
2937
2984
|
] });
|
|
2938
2985
|
}
|
|
@@ -2946,7 +2993,7 @@ function CommandItem({ icon, shortcut, active, children, className, id, ...props
|
|
|
2946
2993
|
ctx.setActive(itemId, true);
|
|
2947
2994
|
return () => ctx.setActive(itemId, false);
|
|
2948
2995
|
}, [ctx, itemId, active]);
|
|
2949
|
-
return /* @__PURE__ */ (0,
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2950
2997
|
"div",
|
|
2951
2998
|
{
|
|
2952
2999
|
className: cx("uix-cmdk__item", className),
|
|
@@ -2957,7 +3004,7 @@ function CommandItem({ icon, shortcut, active, children, className, id, ...props
|
|
|
2957
3004
|
...props,
|
|
2958
3005
|
children: [
|
|
2959
3006
|
icon,
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
3007
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children }),
|
|
2961
3008
|
shortcut
|
|
2962
3009
|
]
|
|
2963
3010
|
}
|
|
@@ -2966,9 +3013,9 @@ function CommandItem({ icon, shortcut, active, children, className, id, ...props
|
|
|
2966
3013
|
|
|
2967
3014
|
// src/components/Inbox.tsx
|
|
2968
3015
|
var import_react34 = require("react");
|
|
2969
|
-
var
|
|
3016
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2970
3017
|
function Inbox({ view, children, className, ...props }) {
|
|
2971
|
-
return /* @__PURE__ */ (0,
|
|
3018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cx("uix-inbox", className), "data-view": view, ...props, children });
|
|
2972
3019
|
}
|
|
2973
3020
|
var InboxListCtx = (0, import_react34.createContext)({});
|
|
2974
3021
|
function InboxList({ children, className, ...props }) {
|
|
@@ -3009,7 +3056,7 @@ function InboxList({ children, className, ...props }) {
|
|
|
3009
3056
|
setActiveId(el.id);
|
|
3010
3057
|
el.scrollIntoView({ block: "nearest" });
|
|
3011
3058
|
};
|
|
3012
|
-
return /* @__PURE__ */ (0,
|
|
3059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InboxListCtx.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3013
3060
|
"div",
|
|
3014
3061
|
{
|
|
3015
3062
|
ref: listRef,
|
|
@@ -3038,7 +3085,7 @@ function InboxItem({
|
|
|
3038
3085
|
const autoId = (0, import_react34.useId)();
|
|
3039
3086
|
const itemId = id ?? autoId;
|
|
3040
3087
|
const { activeId } = (0, import_react34.useContext)(InboxListCtx);
|
|
3041
|
-
return /* @__PURE__ */ (0,
|
|
3088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3042
3089
|
"div",
|
|
3043
3090
|
{
|
|
3044
3091
|
role: "option",
|
|
@@ -3050,35 +3097,35 @@ function InboxItem({
|
|
|
3050
3097
|
...props,
|
|
3051
3098
|
children: [
|
|
3052
3099
|
leading,
|
|
3053
|
-
subject != null && /* @__PURE__ */ (0,
|
|
3054
|
-
preview != null && /* @__PURE__ */ (0,
|
|
3100
|
+
subject != null && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "uix-inbox__subject", children: subject }),
|
|
3101
|
+
preview != null && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "uix-inbox__preview", children: preview }),
|
|
3055
3102
|
children
|
|
3056
3103
|
]
|
|
3057
3104
|
}
|
|
3058
3105
|
);
|
|
3059
3106
|
}
|
|
3060
3107
|
function InboxDetail({ children, className, ...props }) {
|
|
3061
|
-
return /* @__PURE__ */ (0,
|
|
3108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cx("uix-inbox__detail", className), ...props, children });
|
|
3062
3109
|
}
|
|
3063
3110
|
|
|
3064
3111
|
// src/components/Kanban.tsx
|
|
3065
3112
|
var import_react35 = require("react");
|
|
3066
|
-
var
|
|
3113
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3067
3114
|
function Kanban({ announcement, children, className, ...props }) {
|
|
3068
|
-
return /* @__PURE__ */ (0,
|
|
3069
|
-
announcement != null && /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cx("uix-kanban", className), ...props, children: [
|
|
3116
|
+
announcement != null && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "status", className: "uix-visually-hidden", children: announcement }),
|
|
3070
3117
|
children
|
|
3071
3118
|
] });
|
|
3072
3119
|
}
|
|
3073
3120
|
function KanbanColumn({ title, count, children, className, ...props }) {
|
|
3074
3121
|
const headId = (0, import_react35.useId)();
|
|
3075
3122
|
const hasHead = title != null || count != null;
|
|
3076
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
-
hasHead && /* @__PURE__ */ (0,
|
|
3123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cx("uix-kanban__col", className), ...props, children: [
|
|
3124
|
+
hasHead && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "uix-kanban__head", id: headId, children: [
|
|
3078
3125
|
title,
|
|
3079
|
-
count != null && /* @__PURE__ */ (0,
|
|
3126
|
+
count != null && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "uix-kanban__count", children: count })
|
|
3080
3127
|
] }),
|
|
3081
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "uix-kanban__body", role: "list", "aria-labelledby": hasHead ? headId : void 0, children })
|
|
3082
3129
|
] });
|
|
3083
3130
|
}
|
|
3084
3131
|
var MOVE_KEYS = {
|
|
@@ -3097,7 +3144,7 @@ function KanbanCard({ title, meta, children, className, onMove, onKeyDown, ...pr
|
|
|
3097
3144
|
onMove(dir);
|
|
3098
3145
|
}
|
|
3099
3146
|
};
|
|
3100
|
-
return /* @__PURE__ */ (0,
|
|
3147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
3101
3148
|
"div",
|
|
3102
3149
|
{
|
|
3103
3150
|
role: "listitem",
|
|
@@ -3106,8 +3153,8 @@ function KanbanCard({ title, meta, children, className, onMove, onKeyDown, ...pr
|
|
|
3106
3153
|
onKeyDown: handleKeyDown,
|
|
3107
3154
|
...props,
|
|
3108
3155
|
children: [
|
|
3109
|
-
title && /* @__PURE__ */ (0,
|
|
3110
|
-
meta && /* @__PURE__ */ (0,
|
|
3156
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "uix-kanban__card-title", children: title }),
|
|
3157
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "uix-kanban__card-meta", children: meta }),
|
|
3111
3158
|
children
|
|
3112
3159
|
]
|
|
3113
3160
|
}
|
|
@@ -3173,12 +3220,12 @@ function treeNav(flat, currentId, key) {
|
|
|
3173
3220
|
}
|
|
3174
3221
|
|
|
3175
3222
|
// src/components/Tree.tsx
|
|
3176
|
-
var
|
|
3177
|
-
var ChevronIcon2 = () => /* @__PURE__ */ (0,
|
|
3223
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3224
|
+
var ChevronIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M2 4l4 4 4-4" }) });
|
|
3178
3225
|
function TreeNode({ node, expanded, selected, selectable, tabbableId, onToggle, onSelect, onFocusNode, level = 1 }) {
|
|
3179
3226
|
const hasChildren = Array.isArray(node.children) && node.children.length > 0;
|
|
3180
3227
|
const isExpanded = expanded.has(node.id);
|
|
3181
|
-
return /* @__PURE__ */ (0,
|
|
3228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
3182
3229
|
"li",
|
|
3183
3230
|
{
|
|
3184
3231
|
role: "treeitem",
|
|
@@ -3198,12 +3245,12 @@ function TreeNode({ node, expanded, selected, selectable, tabbableId, onToggle,
|
|
|
3198
3245
|
onFocusNode(node.id);
|
|
3199
3246
|
},
|
|
3200
3247
|
children: [
|
|
3201
|
-
/* @__PURE__ */ (0,
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3203
|
-
node.icon && /* @__PURE__ */ (0,
|
|
3204
|
-
/* @__PURE__ */ (0,
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "uix-tree__row", children: [
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "uix-tree__toggle", children: hasChildren && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon2, {}) }),
|
|
3250
|
+
node.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { "aria-hidden": "true", children: node.icon }),
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "uix-tree__label", children: node.label })
|
|
3205
3252
|
] }),
|
|
3206
|
-
hasChildren && isExpanded && /* @__PURE__ */ (0,
|
|
3253
|
+
hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { role: "group", className: "uix-tree__group", children: node.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3207
3254
|
TreeNode,
|
|
3208
3255
|
{
|
|
3209
3256
|
node: child,
|
|
@@ -3255,7 +3302,7 @@ function Tree({
|
|
|
3255
3302
|
const useVirtual = virtualize ?? shouldVirtualize(flat.length);
|
|
3256
3303
|
const tabbableId = focusedId ?? selected ?? nodes[0]?.id;
|
|
3257
3304
|
if (useVirtual) {
|
|
3258
|
-
return /* @__PURE__ */ (0,
|
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3259
3306
|
VirtualTreeView,
|
|
3260
3307
|
{
|
|
3261
3308
|
flat,
|
|
@@ -3332,7 +3379,7 @@ function Tree({
|
|
|
3332
3379
|
break;
|
|
3333
3380
|
}
|
|
3334
3381
|
};
|
|
3335
|
-
return /* @__PURE__ */ (0,
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { ref: rootRef, className: cx("uix-tree", className), role: "tree", onKeyDown, ...props, children: nodes.map((node) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3336
3383
|
TreeNode,
|
|
3337
3384
|
{
|
|
3338
3385
|
node,
|
|
@@ -3412,7 +3459,7 @@ function VirtualTreeView({
|
|
|
3412
3459
|
}
|
|
3413
3460
|
if (act.focusId !== void 0) moveTo(act.focusId);
|
|
3414
3461
|
};
|
|
3415
|
-
return /* @__PURE__ */ (0,
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
3416
3463
|
"ul",
|
|
3417
3464
|
{
|
|
3418
3465
|
ref: scrollRef,
|
|
@@ -3430,10 +3477,10 @@ function VirtualTreeView({
|
|
|
3430
3477
|
},
|
|
3431
3478
|
...props,
|
|
3432
3479
|
children: [
|
|
3433
|
-
win.padTop > 0 && /* @__PURE__ */ (0,
|
|
3480
|
+
win.padTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { role: "presentation", "aria-hidden": "true", style: { height: win.padTop } }),
|
|
3434
3481
|
rows.map((f, i) => {
|
|
3435
3482
|
const rowStyle = { height: rowHeight, paddingLeft: `calc(${f.level - 1} * var(--uix-space-5))` };
|
|
3436
|
-
return /* @__PURE__ */ (0,
|
|
3483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3437
3484
|
"li",
|
|
3438
3485
|
{
|
|
3439
3486
|
role: "treeitem",
|
|
@@ -3454,23 +3501,23 @@ function VirtualTreeView({
|
|
|
3454
3501
|
onSelect?.(f.node.id);
|
|
3455
3502
|
setFocusedId(f.node.id);
|
|
3456
3503
|
},
|
|
3457
|
-
children: /* @__PURE__ */ (0,
|
|
3458
|
-
/* @__PURE__ */ (0,
|
|
3459
|
-
f.node.icon && /* @__PURE__ */ (0,
|
|
3460
|
-
/* @__PURE__ */ (0,
|
|
3504
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "uix-tree__row", style: rowStyle, children: [
|
|
3505
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "uix-tree__toggle", children: f.hasChildren && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ChevronIcon2, {}) }),
|
|
3506
|
+
f.node.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { "aria-hidden": "true", children: f.node.icon }),
|
|
3507
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "uix-tree__label", children: f.node.label })
|
|
3461
3508
|
] })
|
|
3462
3509
|
},
|
|
3463
3510
|
f.node.id
|
|
3464
3511
|
);
|
|
3465
3512
|
}),
|
|
3466
|
-
win.padBottom > 0 && /* @__PURE__ */ (0,
|
|
3513
|
+
win.padBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { role: "presentation", "aria-hidden": "true", style: { height: win.padBottom } })
|
|
3467
3514
|
]
|
|
3468
3515
|
}
|
|
3469
3516
|
);
|
|
3470
3517
|
}
|
|
3471
3518
|
|
|
3472
3519
|
// src/components/EditorialHome.tsx
|
|
3473
|
-
var
|
|
3520
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3474
3521
|
function PageIntro({
|
|
3475
3522
|
kicker,
|
|
3476
3523
|
title,
|
|
@@ -3483,39 +3530,39 @@ function PageIntro({
|
|
|
3483
3530
|
children,
|
|
3484
3531
|
...props
|
|
3485
3532
|
}) {
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3488
|
-
kicker != null && /* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3490
|
-
lede != null && /* @__PURE__ */ (0,
|
|
3533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: cx("uix-page-intro", className), ...props, children: [
|
|
3534
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
3535
|
+
kicker != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-page-kicker", children: kicker }),
|
|
3536
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h1", { className: "uix-page-title", children: title }),
|
|
3537
|
+
lede != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-page-lede", children: lede })
|
|
3491
3538
|
] }),
|
|
3492
|
-
search != null && /* @__PURE__ */ (0,
|
|
3493
|
-
searchLabel != null && /* @__PURE__ */ (0,
|
|
3539
|
+
search != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
3540
|
+
searchLabel != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-intro-search__label", children: searchLabel }),
|
|
3494
3541
|
search
|
|
3495
3542
|
] }),
|
|
3496
|
-
shortcuts != null && /* @__PURE__ */ (0,
|
|
3543
|
+
shortcuts != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "uix-shortcut-grid", "aria-label": shortcutsLabel, children: shortcuts }),
|
|
3497
3544
|
children
|
|
3498
3545
|
] });
|
|
3499
3546
|
}
|
|
3500
3547
|
function SectionHead({ title, titleId, action, className, ...props }) {
|
|
3501
|
-
return /* @__PURE__ */ (0,
|
|
3502
|
-
/* @__PURE__ */ (0,
|
|
3548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cx("uix-section-head", className), ...props, children: [
|
|
3549
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "uix-section-title", id: titleId, children: title }),
|
|
3503
3550
|
action
|
|
3504
3551
|
] });
|
|
3505
3552
|
}
|
|
3506
3553
|
function NoticeQueue({ icon, title, summary, meta, position, actions, className, ...props }) {
|
|
3507
|
-
return /* @__PURE__ */ (0,
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: cx("uix-notice", className), ...props, children: [
|
|
3508
3555
|
icon,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
title != null && /* @__PURE__ */ (0,
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-notice__content", "aria-live": "polite", children: [
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("p", { className: "uix-notice__copy", children: [
|
|
3558
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("strong", { children: title }),
|
|
3512
3559
|
title != null && summary != null && " ",
|
|
3513
3560
|
summary
|
|
3514
3561
|
] }),
|
|
3515
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3562
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-notice__meta", children: meta })
|
|
3516
3563
|
] }),
|
|
3517
|
-
(position != null || actions != null) && /* @__PURE__ */ (0,
|
|
3518
|
-
position != null && /* @__PURE__ */ (0,
|
|
3564
|
+
(position != null || actions != null) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-notice__actions", children: [
|
|
3565
|
+
position != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-notice__position", children: position }),
|
|
3519
3566
|
actions
|
|
3520
3567
|
] })
|
|
3521
3568
|
] });
|
|
@@ -3533,8 +3580,8 @@ function FeaturedStage({
|
|
|
3533
3580
|
className,
|
|
3534
3581
|
...props
|
|
3535
3582
|
}) {
|
|
3536
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("article", { className: cx("uix-featured__stage", className), ...props, children: [
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3538
3585
|
"div",
|
|
3539
3586
|
{
|
|
3540
3587
|
className: "uix-featured__visual",
|
|
@@ -3544,32 +3591,32 @@ function FeaturedStage({
|
|
|
3544
3591
|
children: visual
|
|
3545
3592
|
}
|
|
3546
3593
|
),
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3548
|
-
(eyebrow != null || ordinal != null) && /* @__PURE__ */ (0,
|
|
3549
|
-
ordinal != null && /* @__PURE__ */ (0,
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-featured__content", "aria-live": "polite", children: [
|
|
3595
|
+
(eyebrow != null || ordinal != null) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("p", { className: "uix-featured__eyebrow", children: [
|
|
3596
|
+
ordinal != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-featured__now", children: ordinal }),
|
|
3550
3597
|
eyebrow
|
|
3551
3598
|
] }),
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3553
|
-
description != null && /* @__PURE__ */ (0,
|
|
3554
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3599
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "uix-featured__title", id: titleId, children: title }),
|
|
3600
|
+
description != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-featured__description", children: description }),
|
|
3601
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-featured__meta", children: meta }),
|
|
3555
3602
|
action
|
|
3556
3603
|
] })
|
|
3557
3604
|
] });
|
|
3558
3605
|
}
|
|
3559
3606
|
function FeaturedRundown({ eyebrow, title, titleId, meta, children, className, ...props }) {
|
|
3560
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
-
/* @__PURE__ */ (0,
|
|
3562
|
-
/* @__PURE__ */ (0,
|
|
3563
|
-
eyebrow != null && /* @__PURE__ */ (0,
|
|
3564
|
-
/* @__PURE__ */ (0,
|
|
3607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("aside", { className: cx("uix-rundown", className), ...props, children: [
|
|
3608
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-rundown__head", children: [
|
|
3609
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
3610
|
+
eyebrow != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-rundown__eyebrow", children: eyebrow }),
|
|
3611
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "uix-rundown__title", id: titleId, children: title })
|
|
3565
3612
|
] }),
|
|
3566
3613
|
meta
|
|
3567
3614
|
] }),
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3615
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "uix-rundown__items", children })
|
|
3569
3616
|
] });
|
|
3570
3617
|
}
|
|
3571
3618
|
function FeaturedRundownItem({ number, topic, title, selected = false, className, ...props }) {
|
|
3572
|
-
return /* @__PURE__ */ (0,
|
|
3619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
3573
3620
|
"button",
|
|
3574
3621
|
{
|
|
3575
3622
|
type: "button",
|
|
@@ -3578,63 +3625,63 @@ function FeaturedRundownItem({ number, topic, title, selected = false, className
|
|
|
3578
3625
|
"data-selected": selected ? "true" : "false",
|
|
3579
3626
|
...props,
|
|
3580
3627
|
children: [
|
|
3581
|
-
number != null && /* @__PURE__ */ (0,
|
|
3582
|
-
/* @__PURE__ */ (0,
|
|
3583
|
-
topic != null && /* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3628
|
+
number != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-rundown__number", children: number }),
|
|
3629
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { children: [
|
|
3630
|
+
topic != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-rundown__topic", children: topic }),
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-rundown__item-title", children: title })
|
|
3585
3632
|
] })
|
|
3586
3633
|
]
|
|
3587
3634
|
}
|
|
3588
3635
|
);
|
|
3589
3636
|
}
|
|
3590
3637
|
function NewsLead({ meta, title, summary, className, ...props }) {
|
|
3591
|
-
return /* @__PURE__ */ (0,
|
|
3592
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3593
|
-
/* @__PURE__ */ (0,
|
|
3594
|
-
summary != null && /* @__PURE__ */ (0,
|
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("article", { className: cx("uix-news-lead", className), ...props, children: [
|
|
3639
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-news-lead__meta", children: meta }),
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { className: "uix-news-lead__title", children: title }),
|
|
3641
|
+
summary != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-news-lead__summary", children: summary })
|
|
3595
3642
|
] });
|
|
3596
3643
|
}
|
|
3597
3644
|
function ContentList({ children, className, ...props }) {
|
|
3598
|
-
return /* @__PURE__ */ (0,
|
|
3645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: cx("uix-content-list", className), ...props, children });
|
|
3599
3646
|
}
|
|
3600
3647
|
function ContentListItem({ title, meta, trailing, className, ...props }) {
|
|
3601
|
-
return /* @__PURE__ */ (0,
|
|
3602
|
-
/* @__PURE__ */ (0,
|
|
3603
|
-
/* @__PURE__ */ (0,
|
|
3604
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { className: cx("uix-content-list__item", className), ...props, children: [
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-content-list__title", children: title }),
|
|
3651
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-content-list__meta", children: meta })
|
|
3605
3652
|
] }),
|
|
3606
3653
|
trailing
|
|
3607
3654
|
] });
|
|
3608
3655
|
}
|
|
3609
3656
|
function ResourceGrid({ children, className, ...props }) {
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: cx("uix-resource-grid", className), ...props, children });
|
|
3611
3658
|
}
|
|
3612
3659
|
function StatLine({ items, children, className, ...props }) {
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
3614
|
-
items?.map((item, i) => /* @__PURE__ */ (0,
|
|
3615
|
-
/* @__PURE__ */ (0,
|
|
3616
|
-
/* @__PURE__ */ (0,
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cx("uix-stat-line", className), ...props, children: [
|
|
3661
|
+
items?.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-stat-line__item", children: [
|
|
3662
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-stat-line__value", children: item.value }),
|
|
3663
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-stat-line__label", children: item.label })
|
|
3617
3664
|
] }, item.id ?? i)),
|
|
3618
3665
|
children
|
|
3619
3666
|
] });
|
|
3620
3667
|
}
|
|
3621
3668
|
function EventRow({ month, day, title, meta, className, ...props }) {
|
|
3622
|
-
return /* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cx("uix-event-row", className), ...props, children: [
|
|
3670
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "uix-event-date", children: [
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-event-date__month", children: month }),
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-event-date__day", children: day })
|
|
3626
3673
|
] }),
|
|
3627
|
-
/* @__PURE__ */ (0,
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3629
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3674
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
3675
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-event-row__title", children: title }),
|
|
3676
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "uix-event-row__meta", children: meta })
|
|
3630
3677
|
] })
|
|
3631
3678
|
] });
|
|
3632
3679
|
}
|
|
3633
3680
|
function StatusRow({ indicator, name, meta, className, ...props }) {
|
|
3634
|
-
return /* @__PURE__ */ (0,
|
|
3681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cx("uix-status-row", className), ...props, children: [
|
|
3635
3682
|
indicator,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3637
|
-
meta != null && /* @__PURE__ */ (0,
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-status-row__name", children: name }),
|
|
3684
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "uix-list-meta", children: meta })
|
|
3638
3685
|
] });
|
|
3639
3686
|
}
|
|
3640
3687
|
|
|
@@ -3731,7 +3778,7 @@ function summarizeRule(value, labels = {}) {
|
|
|
3731
3778
|
}
|
|
3732
3779
|
|
|
3733
3780
|
// src/components/RuleBuilder.tsx
|
|
3734
|
-
var
|
|
3781
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3735
3782
|
var ruleId = 0;
|
|
3736
3783
|
var nextId = (prefix) => `${prefix}-${Date.now().toString(36)}-${(++ruleId).toString(36)}`;
|
|
3737
3784
|
function defaultCondition(fields, operators) {
|
|
@@ -3747,21 +3794,21 @@ function RuleGroupEditor({ group, depth, root, fields, operators, maxDepth, disa
|
|
|
3747
3794
|
combinator: "and",
|
|
3748
3795
|
conditions: [defaultCondition(fields, operators)]
|
|
3749
3796
|
}, maxDepth));
|
|
3750
|
-
return /* @__PURE__ */ (0,
|
|
3751
|
-
/* @__PURE__ */ (0,
|
|
3752
|
-
/* @__PURE__ */ (0,
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("fieldset", { className: "uix-rule-builder__group", "data-depth": depth, children: [
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("legend", { className: "uix-rule-builder__group-heading", children: [
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: depth === 1 ? "When" : "Group" }),
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("label", { children: [
|
|
3754
3801
|
"Match",
|
|
3755
|
-
/* @__PURE__ */ (0,
|
|
3756
|
-
/* @__PURE__ */ (0,
|
|
3757
|
-
/* @__PURE__ */ (0,
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("select", { className: "uix-select uix-select--sm", value: group.combinator, disabled, onChange: (event) => updateNode(group.id, (node) => ({ ...node, combinator: event.currentTarget.value })), children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: "and", children: "all (AND)" }),
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: "or", children: "any (OR)" })
|
|
3758
3805
|
] })
|
|
3759
3806
|
] })
|
|
3760
3807
|
] }),
|
|
3761
|
-
/* @__PURE__ */ (0,
|
|
3762
|
-
/* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3764
|
-
] }, node.id) : /* @__PURE__ */ (0,
|
|
3808
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "uix-rule-builder__rows", children: group.conditions.map((node, index) => isRuleGroup(node) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "uix-rule-builder__nested", children: [
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RuleGroupEditor, { ...{ group: node, depth: depth + 1, root, fields, operators, maxDepth, disabled, onRootChange, labels } }),
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RowControls, { label: "group", first: index === 0, last: index === group.conditions.length - 1, disabled, onUp: () => onRootChange(moveRuleNode(root, node.id, -1)), onDown: () => onRootChange(moveRuleNode(root, node.id, 1)), onRemove: () => onRootChange(removeRuleNode(root, node.id)) })
|
|
3811
|
+
] }, node.id) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3765
3812
|
ConditionRow,
|
|
3766
3813
|
{
|
|
3767
3814
|
condition: node,
|
|
@@ -3769,13 +3816,13 @@ function RuleGroupEditor({ group, depth, root, fields, operators, maxDepth, disa
|
|
|
3769
3816
|
operators,
|
|
3770
3817
|
disabled,
|
|
3771
3818
|
onChange: (condition) => updateNode(node.id, () => condition),
|
|
3772
|
-
controls: /* @__PURE__ */ (0,
|
|
3819
|
+
controls: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RowControls, { label: "condition", first: index === 0, last: index === group.conditions.length - 1, disabled, onUp: () => onRootChange(moveRuleNode(root, node.id, -1)), onDown: () => onRootChange(moveRuleNode(root, node.id, 1)), onRemove: () => onRootChange(removeRuleNode(root, node.id)) })
|
|
3773
3820
|
},
|
|
3774
3821
|
node.id
|
|
3775
3822
|
)) }),
|
|
3776
|
-
/* @__PURE__ */ (0,
|
|
3777
|
-
/* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "uix-rule-builder__add", children: [
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary uix-btn--sm", onClick: addCondition, disabled: disabled || fields.length === 0 || operators.length === 0, children: labels.addCondition }),
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: addGroup, disabled: disabled || depth >= maxDepth, children: labels.addGroup })
|
|
3779
3826
|
] })
|
|
3780
3827
|
] });
|
|
3781
3828
|
}
|
|
@@ -3788,24 +3835,24 @@ function ConditionRow({ condition, fields, operators, disabled, onChange, contro
|
|
|
3788
3835
|
const nextOperator = operators.find((item) => nextField?.operators?.includes(item.id)) ?? availableOperators[0] ?? operators[0];
|
|
3789
3836
|
onChange({ ...condition, field: id, operator: nextOperator?.id ?? "" });
|
|
3790
3837
|
};
|
|
3791
|
-
return /* @__PURE__ */ (0,
|
|
3792
|
-
/* @__PURE__ */ (0,
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "uix-rule-builder__condition", children: [
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("label", { children: [
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "uix-visually-hidden", children: "Field" }),
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("select", { className: "uix-select", value: condition.field, onChange: (event) => setField(event.currentTarget.value), disabled, children: fields.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: item.id, children: item.label }, item.id)) })
|
|
3795
3842
|
] }),
|
|
3796
|
-
/* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
3798
|
-
/* @__PURE__ */ (0,
|
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("label", { children: [
|
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "uix-visually-hidden", children: "Operator" }),
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("select", { className: "uix-select", value: condition.operator, onChange: (event) => onChange({ ...condition, operator: event.currentTarget.value }), disabled, children: availableOperators.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: item.id, children: item.label }, item.id)) })
|
|
3799
3846
|
] }),
|
|
3800
|
-
operator?.requiresValue !== false && /* @__PURE__ */ (0,
|
|
3847
|
+
operator?.requiresValue !== false && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "uix-rule-builder__value", children: field?.renderValueEditor?.({ condition, onChange: (value) => onChange({ ...condition, value }), disabled }) ?? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("input", { className: "uix-input", value: typeof condition.value === "string" || typeof condition.value === "number" ? condition.value : condition.value == null ? "" : JSON.stringify(condition.value), onChange: (event) => onChange({ ...condition, value: event.currentTarget.value }), disabled, "aria-label": `Value for ${field?.label ?? "condition"}` }) }),
|
|
3801
3848
|
controls
|
|
3802
3849
|
] });
|
|
3803
3850
|
}
|
|
3804
3851
|
function RowControls({ label, first, last, disabled, onUp, onDown, onRemove }) {
|
|
3805
|
-
return /* @__PURE__ */ (0,
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
3807
|
-
/* @__PURE__ */ (0,
|
|
3808
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "uix-rule-builder__row-actions", children: [
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: onUp, disabled: disabled || first, "aria-label": `Move ${label} up`, children: "Up" }),
|
|
3854
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: onDown, disabled: disabled || last, "aria-label": `Move ${label} down`, children: "Down" }),
|
|
3855
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: onRemove, disabled, "aria-label": `Remove ${label}`, children: "Remove" })
|
|
3809
3856
|
] });
|
|
3810
3857
|
}
|
|
3811
3858
|
function RuleBuilder({
|
|
@@ -3826,9 +3873,9 @@ function RuleBuilder({
|
|
|
3826
3873
|
const fieldLabels = Object.fromEntries(fields.map((field) => [field.id, field.label]));
|
|
3827
3874
|
const operatorLabels = Object.fromEntries(operators.map((operator) => [operator.id, operator.label]));
|
|
3828
3875
|
const actionLabels = Object.fromEntries(actions.map((action) => [action.id, action.label]));
|
|
3829
|
-
if (readOnly) return /* @__PURE__ */ (0,
|
|
3830
|
-
/* @__PURE__ */ (0,
|
|
3831
|
-
issues.length > 0 && /* @__PURE__ */ (0,
|
|
3876
|
+
if (readOnly) return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: cx("uix-rule-builder uix-rule-builder--summary", className), "aria-label": "Rule summary", children: [
|
|
3877
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { children: summarizeRule(value, { fields: fieldLabels, operators: operatorLabels, actions: actionLabels }) }),
|
|
3878
|
+
issues.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("p", { className: "uix-rule-builder__invalid", children: [
|
|
3832
3879
|
"Rule has ",
|
|
3833
3880
|
issues.length,
|
|
3834
3881
|
" validation issue",
|
|
@@ -3837,16 +3884,16 @@ function RuleBuilder({
|
|
|
3837
3884
|
] })
|
|
3838
3885
|
] });
|
|
3839
3886
|
const updateActions = (next) => onChange({ ...value, then: next });
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
3841
|
-
/* @__PURE__ */ (0,
|
|
3842
|
-
/* @__PURE__ */ (0,
|
|
3843
|
-
/* @__PURE__ */ (0,
|
|
3887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: cx("uix-rule-builder", className), "aria-label": "Rule builder", children: [
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RuleGroupEditor, { group: value.when, depth: 1, root: value.when, fields, operators, maxDepth, disabled: readOnly, onRootChange: (when) => onChange({ ...value, when }), labels: { addCondition: addConditionLabel, addGroup: addGroupLabel } }),
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("fieldset", { className: "uix-rule-builder__actions", children: [
|
|
3890
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("legend", { children: "Then" }),
|
|
3844
3891
|
value.then.map((action, index) => {
|
|
3845
3892
|
const definition = actions.find((item) => item.id === action.type);
|
|
3846
|
-
return /* @__PURE__ */ (0,
|
|
3847
|
-
/* @__PURE__ */ (0,
|
|
3893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "uix-rule-builder__action", children: [
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("select", { className: "uix-select", value: action.type, onChange: (event) => updateActions(value.then.map((item) => item.id === action.id ? { ...item, type: event.currentTarget.value } : item)), "aria-label": "Action type", children: actions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: item.id, children: item.label }, item.id)) }),
|
|
3848
3895
|
definition?.renderParameters?.(action, (parameters) => updateActions(value.then.map((item) => item.id === action.id ? { ...item, parameters } : item)), false),
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3850
3897
|
RowControls,
|
|
3851
3898
|
{
|
|
3852
3899
|
label: "action",
|
|
@@ -3868,22 +3915,22 @@ function RuleBuilder({
|
|
|
3868
3915
|
)
|
|
3869
3916
|
] }, action.id);
|
|
3870
3917
|
}),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3918
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary uix-btn--sm", disabled: actions.length === 0, onClick: () => updateActions([...value.then, { id: nextId("action"), type: actions[0]?.id ?? "", parameters: {} }]), children: addActionLabel })
|
|
3872
3919
|
] }),
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3920
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "uix-rule-builder__validation", "aria-live": "polite", children: issues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: "Rule is valid." }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
3921
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("strong", { children: [
|
|
3875
3922
|
issues.length,
|
|
3876
3923
|
" validation issue",
|
|
3877
3924
|
issues.length === 1 ? "" : "s"
|
|
3878
3925
|
] }),
|
|
3879
|
-
/* @__PURE__ */ (0,
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { children: issues.map((issue, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", { children: issue.message }, `${issue.path}-${index}`)) })
|
|
3880
3927
|
] }) })
|
|
3881
3928
|
] });
|
|
3882
3929
|
}
|
|
3883
3930
|
|
|
3884
3931
|
// src/components/BuilderCanvas.tsx
|
|
3885
3932
|
var import_react37 = require("react");
|
|
3886
|
-
var
|
|
3933
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3887
3934
|
function BuilderCanvas({
|
|
3888
3935
|
items,
|
|
3889
3936
|
onItemsChange,
|
|
@@ -3938,27 +3985,27 @@ function BuilderCanvas({
|
|
|
3938
3985
|
if (from >= 0 && to >= 0) onItemsChange(reorder(items, from, to));
|
|
3939
3986
|
setDraggedId(void 0);
|
|
3940
3987
|
};
|
|
3941
|
-
return /* @__PURE__ */ (0,
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
3944
|
-
palette.length === 0 ? /* @__PURE__ */ (0,
|
|
3945
|
-
/* @__PURE__ */ (0,
|
|
3946
|
-
item.description && /* @__PURE__ */ (0,
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
3988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("section", { className: cx("uix-builder-canvas", className), "aria-label": "Builder canvas", children: [
|
|
3989
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("aside", { className: "uix-builder-canvas__palette", "aria-label": "Item palette", children: [
|
|
3990
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h3", { children: "Palette" }),
|
|
3991
|
+
palette.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: "No item types available." }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ul", { children: palette.map((item) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("button", { type: "button", onClick: () => add(item), children: [
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("strong", { children: item.label }),
|
|
3993
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: item.description }),
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "aria-hidden": "true", children: "Add" })
|
|
3948
3995
|
] }) }, item.id)) })
|
|
3949
3996
|
] }),
|
|
3950
|
-
/* @__PURE__ */ (0,
|
|
3951
|
-
/* @__PURE__ */ (0,
|
|
3952
|
-
loading ? /* @__PURE__ */ (0,
|
|
3953
|
-
/* @__PURE__ */ (0,
|
|
3954
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3955
|
-
] }) : items.length === 0 ? /* @__PURE__ */ (0,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
palette[0] && /* @__PURE__ */ (0,
|
|
3997
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "uix-builder-canvas__workspace", children: [
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h3", { children: "Canvas" }),
|
|
3999
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "uix-builder-canvas__state", role: "status", children: "Loading canvas\u2026" }) : error ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "uix-builder-canvas__state", role: "alert", children: [
|
|
4000
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: error }),
|
|
4001
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary", onClick: onRetry, children: "Try again" })
|
|
4002
|
+
] }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "uix-builder-canvas__state", children: [
|
|
4003
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: emptyMessage }),
|
|
4004
|
+
palette[0] && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("button", { type: "button", className: "uix-btn uix-btn--primary", onClick: () => add(palette[0]), children: [
|
|
3958
4005
|
"Add ",
|
|
3959
4006
|
palette[0].label
|
|
3960
4007
|
] })
|
|
3961
|
-
] }) : /* @__PURE__ */ (0,
|
|
4008
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ol", { className: "uix-builder-canvas__items", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3962
4009
|
"li",
|
|
3963
4010
|
{
|
|
3964
4011
|
draggable: true,
|
|
@@ -3968,27 +4015,27 @@ function BuilderCanvas({
|
|
|
3968
4015
|
onDrop: (event) => drop(event, item.id),
|
|
3969
4016
|
className: cx("uix-builder-canvas__item", selectedId === item.id && "uix-builder-canvas__item--selected"),
|
|
3970
4017
|
children: [
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
3973
|
-
item.description && /* @__PURE__ */ (0,
|
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", className: "uix-builder-canvas__item-main", "aria-pressed": selectedId === item.id, onClick: () => select(item.id), children: renderItem?.(item, selectedId === item.id) ?? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
4019
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("strong", { children: item.label }),
|
|
4020
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: item.description })
|
|
3974
4021
|
] }) }),
|
|
3975
|
-
/* @__PURE__ */ (0,
|
|
3976
|
-
/* @__PURE__ */ (0,
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "uix-builder-canvas__item-actions", children: [
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", onClick: () => move(item.id, -1), disabled: index === 0, "aria-label": `Move ${item.label} up`, children: "Up" }),
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", onClick: () => move(item.id, 1), disabled: index === items.length - 1, "aria-label": `Move ${item.label} down`, children: "Down" }),
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("button", { type: "button", onClick: () => remove(item.id), "aria-label": `Remove ${item.label}`, children: "Remove" })
|
|
3979
4026
|
] })
|
|
3980
4027
|
]
|
|
3981
4028
|
},
|
|
3982
4029
|
item.id
|
|
3983
4030
|
)) })
|
|
3984
4031
|
] }),
|
|
3985
|
-
/* @__PURE__ */ (0,
|
|
3986
|
-
/* @__PURE__ */ (0,
|
|
3987
|
-
!selected ? /* @__PURE__ */ (0,
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
3989
|
-
/* @__PURE__ */ (0,
|
|
3990
|
-
/* @__PURE__ */ (0,
|
|
3991
|
-
/* @__PURE__ */ (0,
|
|
4032
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("aside", { className: "uix-builder-canvas__properties", "aria-label": "Item properties", children: [
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h3", { ref: propertyHeadingRef, tabIndex: -1, children: "Properties" }),
|
|
4034
|
+
!selected ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: "Select a canvas item to edit its properties." }) : renderProperties?.(selected, (updated) => onItemsChange(items.map((item) => item.id === updated.id ? updated : item))) ?? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("dl", { children: [
|
|
4035
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("dt", { children: "Type" }),
|
|
4036
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("dd", { children: selected.type }),
|
|
4037
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("dt", { children: "Label" }),
|
|
4038
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("dd", { children: selected.label })
|
|
3992
4039
|
] })
|
|
3993
4040
|
] })
|
|
3994
4041
|
] });
|
|
@@ -4076,7 +4123,7 @@ function isDateUnavailable(date, options) {
|
|
|
4076
4123
|
}
|
|
4077
4124
|
|
|
4078
4125
|
// src/components/SchedulingCalendar.tsx
|
|
4079
|
-
var
|
|
4126
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4080
4127
|
var stateLabel = { scheduled: "Scheduled", conflicted: "Conflicted", "in-progress": "In progress", "blackout-violation": "Blackout violation" };
|
|
4081
4128
|
var stateTone = (state) => state === "scheduled" ? "info" : state === "in-progress" ? "success" : "danger";
|
|
4082
4129
|
var dateLabel = (date, locale) => new Intl.DateTimeFormat(locale, { dateStyle: "full", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`${date}T00:00:00Z`));
|
|
@@ -4144,58 +4191,58 @@ function SchedulingCalendar({
|
|
|
4144
4191
|
return date >= span.start && date <= span.end;
|
|
4145
4192
|
});
|
|
4146
4193
|
const formatInstant = (instant) => new Intl.DateTimeFormat(locale, { timeZone, dateStyle: "medium", timeStyle: "short" }).format(new Date(instant));
|
|
4147
|
-
return /* @__PURE__ */ (0,
|
|
4148
|
-
/* @__PURE__ */ (0,
|
|
4149
|
-
/* @__PURE__ */ (0,
|
|
4150
|
-
/* @__PURE__ */ (0,
|
|
4151
|
-
/* @__PURE__ */ (0,
|
|
4194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("section", { className: cx("uix-scheduling-calendar", className), "aria-label": `Scheduling calendar in ${timeZone}`, children: [
|
|
4195
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "uix-scheduling-calendar__header", children: [
|
|
4196
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { children: [
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: () => movePeriod(-1), disabled: !onAnchorDateChange, children: "Previous" }),
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: () => movePeriod(1), disabled: !onAnchorDateChange, children: "Next" })
|
|
4152
4199
|
] }),
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4154
|
-
/* @__PURE__ */ (0,
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("strong", { children: view === "month" ? new Intl.DateTimeFormat(locale, { month: "long", year: "numeric", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`${anchorDate}T00:00:00Z`)) : `${dateLabel(weekStart, locale)} \u2013 ${dateLabel(weekDays[weekDays.length - 1], locale)}` }),
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "uix-segmented", role: "group", "aria-label": "Calendar view", children: ["month", "week", "agenda"].map((option) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("button", { type: "button", className: "uix-segmented__option", "aria-pressed": view === option, "data-selected": view === option || void 0, onClick: () => setView(option), children: [
|
|
4155
4202
|
option[0].toUpperCase(),
|
|
4156
4203
|
option.slice(1)
|
|
4157
4204
|
] }, option)) })
|
|
4158
4205
|
] }),
|
|
4159
|
-
loading ? /* @__PURE__ */ (0,
|
|
4160
|
-
/* @__PURE__ */ (0,
|
|
4161
|
-
onRetry && /* @__PURE__ */ (0,
|
|
4162
|
-
] }) : view === "agenda" ? /* @__PURE__ */ (0,
|
|
4206
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "uix-scheduling-calendar__state", role: "status", children: "Loading schedule\u2026" }) : error ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "uix-scheduling-calendar__state", role: "alert", children: [
|
|
4207
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: error }),
|
|
4208
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary", onClick: onRetry, children: "Try again" })
|
|
4209
|
+
] }) : view === "agenda" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "uix-scheduling-calendar__agenda", role: "region", "aria-label": "Schedule agenda", children: visibleEntries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: "No scheduled entries match the current filters." }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ol", { children: [...visibleEntries].sort((a, b) => a.start.localeCompare(b.start)).map((entry) => {
|
|
4163
4210
|
const state = entry.state ?? "scheduled";
|
|
4164
|
-
return /* @__PURE__ */ (0,
|
|
4165
|
-
/* @__PURE__ */ (0,
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4167
|
-
/* @__PURE__ */ (0,
|
|
4211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("button", { type: "button", onClick: () => onSelectEntry?.(entry), children: [
|
|
4212
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { children: [
|
|
4213
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("strong", { children: renderEntry?.(entry) ?? entry.title }),
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { children: [
|
|
4168
4215
|
formatInstant(entry.start),
|
|
4169
4216
|
" \u2013 ",
|
|
4170
4217
|
formatInstant(entry.end)
|
|
4171
4218
|
] }),
|
|
4172
|
-
entry.meta && /* @__PURE__ */ (0,
|
|
4219
|
+
entry.meta && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: entry.meta })
|
|
4173
4220
|
] }),
|
|
4174
|
-
/* @__PURE__ */ (0,
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(StatusPill, { tone: stateTone(state), children: stateLabel[state] })
|
|
4175
4222
|
] }) }, entry.id);
|
|
4176
|
-
}) }) }) : /* @__PURE__ */ (0,
|
|
4223
|
+
}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ref: gridRef, className: cx("uix-scheduling-calendar__grid", view === "week" && "uix-scheduling-calendar__grid--week"), role: "group", "aria-label": `${view} schedule`, children: days.map((date, index) => {
|
|
4177
4224
|
const dayEntries = entriesFor(date);
|
|
4178
4225
|
const dayOverlays = overlaysFor(date);
|
|
4179
|
-
return /* @__PURE__ */ (0,
|
|
4180
|
-
/* @__PURE__ */ (0,
|
|
4181
|
-
dayOverlays.map((overlay) => /* @__PURE__ */ (0,
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "uix-scheduling-calendar__day", "data-outside": view === "month" && !monthDays[index].inMonth || void 0, children: [
|
|
4227
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { type: "button", className: "uix-scheduling-calendar__date", "data-calendar-date": date, tabIndex: activeDate === date ? 0 : -1, onFocus: () => setActiveDate(date), onKeyDown: (event) => onDayKeyDown(event, date), "aria-label": dateLabel(date, locale), children: Number(date.slice(-2)) }),
|
|
4228
|
+
dayOverlays.map((overlay) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "uix-scheduling-calendar__overlay", "data-kind": overlay.kind, children: overlay.label }, overlay.id)),
|
|
4229
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "uix-scheduling-calendar__entries", children: dayEntries.map((entry) => {
|
|
4183
4230
|
const span = entrySpans.get(entry.id);
|
|
4184
4231
|
const state = entry.state ?? "scheduled";
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("button", { type: "button", className: "uix-scheduling-calendar__entry", "data-state": state, "data-range-start": date === span.start || void 0, "data-range-end": date === span.end || void 0, onClick: () => onSelectEntry?.(entry), "aria-label": `${entry.title}, ${stateLabel[state]}, ${formatInstant(entry.start)} to ${formatInstant(entry.end)}`, children: [
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: renderEntry?.(entry) ?? entry.title }),
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "uix-visually-hidden", children: stateLabel[state] })
|
|
4188
4235
|
] }, entry.id);
|
|
4189
4236
|
}) })
|
|
4190
4237
|
] }, date);
|
|
4191
4238
|
}) }),
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4239
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "uix-scheduling-calendar__legend", "aria-label": "Schedule state legend", children: ["scheduled", "conflicted", "in-progress", "blackout-violation"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { "data-state": state, children: stateLabel[state] }, state)) })
|
|
4193
4240
|
] });
|
|
4194
4241
|
}
|
|
4195
4242
|
|
|
4196
4243
|
// src/components/DateRangePicker.tsx
|
|
4197
4244
|
var import_react39 = require("react");
|
|
4198
|
-
var
|
|
4245
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4199
4246
|
var monthLabel = (date, locale) => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`${date}T00:00:00Z`));
|
|
4200
4247
|
var dateLabel2 = (date, locale) => new Intl.DateTimeFormat(locale, { dateStyle: "full", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`${date}T00:00:00Z`));
|
|
4201
4248
|
function DateRangePicker({
|
|
@@ -4270,23 +4317,23 @@ function DateRangePicker({
|
|
|
4270
4317
|
}
|
|
4271
4318
|
};
|
|
4272
4319
|
const announcement = !value.start ? "No date range selected." : !value.end ? `Start date ${dateLabel2(value.start, locale)} selected. Choose an end date.` : `${dateLabel2(value.start, locale)} to ${dateLabel2(value.end, locale)} selected.`;
|
|
4273
|
-
return /* @__PURE__ */ (0,
|
|
4274
|
-
/* @__PURE__ */ (0,
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4277
|
-
/* @__PURE__ */ (0,
|
|
4278
|
-
/* @__PURE__ */ (0,
|
|
4320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("section", { className: cx("uix-date-range-picker", rangeInvalid && "uix-date-range-picker--invalid", className), "aria-labelledby": `${id}-label`, children: [
|
|
4321
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "uix-date-range-picker__header", children: [
|
|
4322
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h3", { id: `${id}-label`, children: label }),
|
|
4323
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
|
|
4324
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: () => setMonth(addCalendarMonths(visibleMonth, -1)), "aria-label": "Show previous month", children: "Previous" }),
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", onClick: () => setMonth(addCalendarMonths(visibleMonth, 1)), "aria-label": "Show next month", children: "Next" })
|
|
4279
4326
|
] })
|
|
4280
4327
|
] }),
|
|
4281
|
-
/* @__PURE__ */ (0,
|
|
4282
|
-
/* @__PURE__ */ (0,
|
|
4283
|
-
/* @__PURE__ */ (0,
|
|
4284
|
-
/* @__PURE__ */ (0,
|
|
4285
|
-
Array.from({ length: ((/* @__PURE__ */ new Date(`${month}T00:00:00Z`)).getUTCDay() + 6) % 7 }, (_, index) => /* @__PURE__ */ (0,
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { ref: rootRef, className: "uix-date-range-picker__months", children: calendars.map(({ month, days }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "uix-date-range-picker__month", children: [
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h4", { children: monthLabel(month, locale) }),
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "uix-date-range-picker__weekdays", "aria-hidden": "true", children: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"].map((day) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: day }, day)) }),
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "uix-date-range-picker__grid", role: "group", "aria-label": monthLabel(month, locale), children: [
|
|
4332
|
+
Array.from({ length: ((/* @__PURE__ */ new Date(`${month}T00:00:00Z`)).getUTCDay() + 6) % 7 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "aria-hidden": "true" }, `blank-${index}`)),
|
|
4286
4333
|
days.map((day) => {
|
|
4287
4334
|
const unavailable = disabled || isDateUnavailable(day.date, { min, max, isDisabled: isDateDisabled });
|
|
4288
4335
|
const edge = day.date === value.start ? "start" : day.date === value.end ? "end" : void 0;
|
|
4289
|
-
return /* @__PURE__ */ (0,
|
|
4336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
4290
4337
|
"button",
|
|
4291
4338
|
{
|
|
4292
4339
|
type: "button",
|
|
@@ -4307,8 +4354,8 @@ function DateRangePicker({
|
|
|
4307
4354
|
})
|
|
4308
4355
|
] })
|
|
4309
4356
|
] }, month)) }),
|
|
4310
|
-
/* @__PURE__ */ (0,
|
|
4311
|
-
rangeInvalid && /* @__PURE__ */ (0,
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "uix-date-range-picker__selection", "aria-live": "polite", children: announcement }),
|
|
4358
|
+
rangeInvalid && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "uix-field__error", role: "alert", children: invalidMessage })
|
|
4312
4359
|
] });
|
|
4313
4360
|
}
|
|
4314
4361
|
|
|
@@ -4797,7 +4844,7 @@ function layeredNeighbor(layout, currentId, key) {
|
|
|
4797
4844
|
var import_react40 = require("react");
|
|
4798
4845
|
|
|
4799
4846
|
// src/components/RelationshipGraphList.tsx
|
|
4800
|
-
var
|
|
4847
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4801
4848
|
function EquivalentRelationshipList({
|
|
4802
4849
|
nodes,
|
|
4803
4850
|
edges,
|
|
@@ -4808,19 +4855,19 @@ function EquivalentRelationshipList({
|
|
|
4808
4855
|
onOpenDetails
|
|
4809
4856
|
}) {
|
|
4810
4857
|
const labelById = new Map(nodes.map((node) => [node.id, node.label]));
|
|
4811
|
-
return /* @__PURE__ */ (0,
|
|
4812
|
-
/* @__PURE__ */ (0,
|
|
4813
|
-
/* @__PURE__ */ (0,
|
|
4858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "uix-relationship-graph__list", role: "region", "aria-label": labels.list, children: [
|
|
4859
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h3", { children: labels.listHeading }),
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ul", { children: nodes.map((node) => {
|
|
4814
4861
|
const neighbors = relationshipNeighbors(node.id, edges).map((id) => labelById.get(id) ?? id);
|
|
4815
|
-
return /* @__PURE__ */ (0,
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
4817
|
-
/* @__PURE__ */ (0,
|
|
4818
|
-
node.type && /* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
4862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("li", { "data-selected": selectedId === node.id || void 0, children: [
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("button", { type: "button", onClick: () => onSelect(node.id), "aria-pressed": selectedId === node.id, children: [
|
|
4864
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("strong", { children: node.label }),
|
|
4865
|
+
node.type && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: node.type }),
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: neighbors.length ? labels.connectedTo(neighbors.join(", ")) : labels.noConnections })
|
|
4820
4867
|
] }),
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
onExpandNeighbors && /* @__PURE__ */ (0,
|
|
4823
|
-
onOpenDetails && /* @__PURE__ */ (0,
|
|
4868
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "uix-relationship-graph__list-actions", children: [
|
|
4869
|
+
onExpandNeighbors && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("button", { type: "button", onClick: () => onExpandNeighbors(node), children: labels.expandNeighbors }),
|
|
4870
|
+
onOpenDetails && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("button", { type: "button", onClick: () => onOpenDetails(node), children: labels.openDetails })
|
|
4824
4871
|
] })
|
|
4825
4872
|
] }, node.id);
|
|
4826
4873
|
}) })
|
|
@@ -4828,7 +4875,7 @@ function EquivalentRelationshipList({
|
|
|
4828
4875
|
}
|
|
4829
4876
|
|
|
4830
4877
|
// src/components/RelationshipGraphLayered.tsx
|
|
4831
|
-
var
|
|
4878
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4832
4879
|
var EMPTY_IDS = /* @__PURE__ */ new Set();
|
|
4833
4880
|
var MIN_ZOOM = 0.4;
|
|
4834
4881
|
var MAX_ZOOM = 1.5;
|
|
@@ -5101,21 +5148,21 @@ function LayeredRelationshipGraph({
|
|
|
5101
5148
|
height: layout.height,
|
|
5102
5149
|
transform: `translate(${view.x}px, ${view.y}px) scale(${view.zoom})`
|
|
5103
5150
|
};
|
|
5104
|
-
return /* @__PURE__ */ (0,
|
|
5105
|
-
/* @__PURE__ */ (0,
|
|
5106
|
-
/* @__PURE__ */ (0,
|
|
5107
|
-
/* @__PURE__ */ (0,
|
|
5108
|
-
/* @__PURE__ */ (0,
|
|
5109
|
-
/* @__PURE__ */ (0,
|
|
5110
|
-
/* @__PURE__ */ (0,
|
|
5111
|
-
/* @__PURE__ */ (0,
|
|
5112
|
-
/* @__PURE__ */ (0,
|
|
5113
|
-
/* @__PURE__ */ (0,
|
|
5114
|
-
/* @__PURE__ */ (0,
|
|
5151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("section", { className: cx("uix-relationship-graph", "uix-relationship-graph--layered", density === "compact" && "uix-relationship-graph--compact", className), "aria-label": labels.graph, children: [
|
|
5152
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "uix-relationship-graph__toolbar", role: "group", "aria-label": labels.controls, children: [
|
|
5153
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => zoomBy(ZOOM_STEP), disabled: view.zoom >= MAX_ZOOM, children: labels.zoomIn }),
|
|
5154
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => zoomBy(1 / ZOOM_STEP), disabled: view.zoom <= MIN_ZOOM, children: labels.zoomOut }),
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => moveView(fitView(layout, size), true), children: labels.fit }),
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => moveView(initialView(layout, size), true), children: labels.reset }),
|
|
5157
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => panBy(PAN_STEP, 0), "aria-label": labels.panLeft, children: labels.left }),
|
|
5158
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => panBy(0, PAN_STEP), "aria-label": labels.panUp, children: labels.up }),
|
|
5159
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => panBy(0, -PAN_STEP), "aria-label": labels.panDown, children: labels.down }),
|
|
5160
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("button", { type: "button", onClick: () => panBy(-PAN_STEP, 0), "aria-label": labels.panRight, children: labels.right }),
|
|
5161
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { "aria-live": "polite", children: labels.zoomLevel(Math.round(view.zoom * 100)) })
|
|
5115
5162
|
] }),
|
|
5116
|
-
bounded.omittedNodeCount > 0 && /* @__PURE__ */ (0,
|
|
5117
|
-
/* @__PURE__ */ (0,
|
|
5118
|
-
/* @__PURE__ */ (0,
|
|
5163
|
+
bounded.omittedNodeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "uix-relationship-graph__bounded", role: "status", children: labels.bounded(bounded.nodes.length, bounded.omittedNodeCount) }),
|
|
5164
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { id: hintId, className: "uix-visually-hidden", children: labels.keyboardHint }),
|
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5119
5166
|
"div",
|
|
5120
5167
|
{
|
|
5121
5168
|
ref: viewportRef,
|
|
@@ -5125,11 +5172,11 @@ function LayeredRelationshipGraph({
|
|
|
5125
5172
|
onPointerMove,
|
|
5126
5173
|
onPointerUp: onPointerEnd,
|
|
5127
5174
|
onPointerCancel: onPointerEnd,
|
|
5128
|
-
children: /* @__PURE__ */ (0,
|
|
5129
|
-
/* @__PURE__ */ (0,
|
|
5175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "uix-relationship-graph__stage", style: stageStyle, "data-animate": animate || void 0, onTransitionEnd: () => setAnimate(false), children: [
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { className: "uix-relationship-graph__edges", width: layout.width, height: layout.height, "aria-hidden": "true", focusable: "false", children: layout.edges.map((edge) => {
|
|
5130
5177
|
const active = activeIds.has(edge.source) || activeIds.has(edge.target) || edge.edgeIds.some((id) => highlightedEdgeIds.has(id));
|
|
5131
5178
|
const angle = edge.arrowAngle * 180 / Math.PI;
|
|
5132
|
-
return /* @__PURE__ */ (0,
|
|
5179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5133
5180
|
"g",
|
|
5134
5181
|
{
|
|
5135
5182
|
className: "uix-relationship-graph__link",
|
|
@@ -5139,15 +5186,15 @@ function LayeredRelationshipGraph({
|
|
|
5139
5186
|
"data-conflicted": edge.edgeIds.some((id) => conflictedEdgeIds.has(id)) || void 0,
|
|
5140
5187
|
"data-dimmed": dimmedNodeIds.has(edge.source) && dimmedNodeIds.has(edge.target) || void 0,
|
|
5141
5188
|
children: [
|
|
5142
|
-
/* @__PURE__ */ (0,
|
|
5143
|
-
edge.arrow !== "none" && /* @__PURE__ */ (0,
|
|
5144
|
-
showLabel(edge) && /* @__PURE__ */ (0,
|
|
5189
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: edge.path }),
|
|
5190
|
+
edge.arrow !== "none" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("polygon", { points: arrowPoints, transform: `translate(${edge.arrowX} ${edge.arrowY}) rotate(${angle})` }),
|
|
5191
|
+
showLabel(edge) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("text", { x: edge.labelX, y: edge.labelY, textAnchor: "middle", dominantBaseline: "middle", children: (edge.kind === "cycle" ? [...edge.labelLines, labels.cycle] : edge.labelLines).map((line, index, lines) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("tspan", { x: edge.labelX, dy: index === 0 ? `${-(lines.length - 1) * 0.55}em` : "1.1em", children: line }, index)) })
|
|
5145
5192
|
]
|
|
5146
5193
|
},
|
|
5147
5194
|
edge.id
|
|
5148
5195
|
);
|
|
5149
5196
|
}) }),
|
|
5150
|
-
layout.columns.map((column) => /* @__PURE__ */ (0,
|
|
5197
|
+
layout.columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5151
5198
|
"div",
|
|
5152
5199
|
{
|
|
5153
5200
|
className: "uix-relationship-graph__column",
|
|
@@ -5157,17 +5204,17 @@ function LayeredRelationshipGraph({
|
|
|
5157
5204
|
},
|
|
5158
5205
|
column.depth
|
|
5159
5206
|
)),
|
|
5160
|
-
/* @__PURE__ */ (0,
|
|
5207
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { role: "group", "aria-roledescription": labels.roleDescription, "aria-label": labels.graphSummary(bounded.nodes.length, bounded.edges.length), "aria-describedby": hintId, children: layout.items.map((item) => {
|
|
5161
5208
|
const selected = item.id === selectedItemId;
|
|
5162
5209
|
const dimmed = item.node ? dimmedNodeIds.has(item.node.id) : item.cluster.members.every((member) => dimmedNodeIds.has(member.id));
|
|
5163
|
-
const body = item.cluster ? renderCluster?.(item.cluster) ?? /* @__PURE__ */ (0,
|
|
5164
|
-
/* @__PURE__ */ (0,
|
|
5165
|
-
/* @__PURE__ */ (0,
|
|
5166
|
-
] }) : renderNode?.(item.node, { selected, dimmed }) ?? /* @__PURE__ */ (0,
|
|
5167
|
-
/* @__PURE__ */ (0,
|
|
5168
|
-
(item.node.type || item.node.description) && /* @__PURE__ */ (0,
|
|
5210
|
+
const body = item.cluster ? renderCluster?.(item.cluster) ?? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "uix-relationship-graph__item-label", children: labels.cluster(item.cluster.members.length, item.cluster.type, item.cluster.edgeLabel) }),
|
|
5212
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "uix-relationship-graph__item-meta", children: labels.expandCluster })
|
|
5213
|
+
] }) : renderNode?.(item.node, { selected, dimmed }) ?? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
5214
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "uix-relationship-graph__item-label", children: item.node.label }),
|
|
5215
|
+
(item.node.type || item.node.description) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "uix-relationship-graph__item-meta", children: [item.node.type, item.node.description].filter(Boolean).join(" \xB7 ") })
|
|
5169
5216
|
] });
|
|
5170
|
-
return /* @__PURE__ */ (0,
|
|
5217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5171
5218
|
"button",
|
|
5172
5219
|
{
|
|
5173
5220
|
ref: (element) => {
|
|
@@ -5198,7 +5245,7 @@ function LayeredRelationshipGraph({
|
|
|
5198
5245
|
onPointerLeave: () => setHoverId((current) => current === item.id ? void 0 : current),
|
|
5199
5246
|
children: [
|
|
5200
5247
|
body,
|
|
5201
|
-
item.inCycle && /* @__PURE__ */ (0,
|
|
5248
|
+
item.inCycle && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "uix-relationship-graph__item-flag", "aria-hidden": "true", children: labels.cycle })
|
|
5202
5249
|
]
|
|
5203
5250
|
},
|
|
5204
5251
|
item.id
|
|
@@ -5206,7 +5253,7 @@ function LayeredRelationshipGraph({
|
|
|
5206
5253
|
}) }),
|
|
5207
5254
|
layout.items.filter((item) => item.expandedGroup).map((item) => {
|
|
5208
5255
|
const group = item.expandedGroup;
|
|
5209
|
-
return /* @__PURE__ */ (0,
|
|
5256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5210
5257
|
"button",
|
|
5211
5258
|
{
|
|
5212
5259
|
type: "button",
|
|
@@ -5222,8 +5269,8 @@ function LayeredRelationshipGraph({
|
|
|
5222
5269
|
] })
|
|
5223
5270
|
}
|
|
5224
5271
|
),
|
|
5225
|
-
legend.length > 0 && /* @__PURE__ */ (0,
|
|
5226
|
-
showList && /* @__PURE__ */ (0,
|
|
5272
|
+
legend.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("ul", { className: "uix-relationship-graph__legend", "aria-label": labels.legend, children: legend.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("li", { "data-type": entry.id, children: entry.label }, entry.id)) }),
|
|
5273
|
+
showList && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5227
5274
|
EquivalentRelationshipList,
|
|
5228
5275
|
{
|
|
5229
5276
|
nodes: bounded.nodes,
|
|
@@ -5242,7 +5289,7 @@ function LayeredRelationshipGraph({
|
|
|
5242
5289
|
}
|
|
5243
5290
|
|
|
5244
5291
|
// src/components/RelationshipGraph.tsx
|
|
5245
|
-
var
|
|
5292
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5246
5293
|
var DEFAULT_RELATIONSHIP_GRAPH_LABELS = {
|
|
5247
5294
|
graph: "Relationship graph",
|
|
5248
5295
|
controls: "Graph view controls",
|
|
@@ -5285,22 +5332,40 @@ var DEFAULT_RELATIONSHIP_GRAPH_LABELS = {
|
|
|
5285
5332
|
};
|
|
5286
5333
|
var EMPTY_IDS2 = /* @__PURE__ */ new Set();
|
|
5287
5334
|
var EMPTY_LEGEND = [];
|
|
5335
|
+
var RADIAL_SCALE_X = 6;
|
|
5336
|
+
var RADIAL_SCALE_Y = 4;
|
|
5337
|
+
var RADIAL_NODE_HALF_W = 55;
|
|
5338
|
+
var RADIAL_NODE_HALF_H = 18;
|
|
5339
|
+
var RADIAL_MARGIN = 12;
|
|
5340
|
+
function radialViewBox(nodes) {
|
|
5341
|
+
if (nodes.length === 0) return "0 0 600 400";
|
|
5342
|
+
const xs = nodes.map((node) => node.x * RADIAL_SCALE_X);
|
|
5343
|
+
const ys = nodes.map((node) => node.y * RADIAL_SCALE_Y);
|
|
5344
|
+
const minX = Math.min(...xs) - RADIAL_NODE_HALF_W - RADIAL_MARGIN;
|
|
5345
|
+
const maxX = Math.max(...xs) + RADIAL_NODE_HALF_W + RADIAL_MARGIN;
|
|
5346
|
+
const minY = Math.min(...ys) - RADIAL_NODE_HALF_H - RADIAL_MARGIN;
|
|
5347
|
+
const maxY = Math.max(...ys) + RADIAL_NODE_HALF_H + RADIAL_MARGIN;
|
|
5348
|
+
const round = (value) => Number(value.toFixed(2));
|
|
5349
|
+
const width = Math.max(round(maxX - minX), 600);
|
|
5350
|
+
const height = Math.max(round(maxY - minY), 400);
|
|
5351
|
+
return `${round(minX)} ${round(minY)} ${width} ${height}`;
|
|
5352
|
+
}
|
|
5288
5353
|
function RelationshipGraph(props) {
|
|
5289
5354
|
const labels = (0, import_react41.useMemo)(() => ({ ...DEFAULT_RELATIONSHIP_GRAPH_LABELS, ...props.labels }), [props.labels]);
|
|
5290
5355
|
const stateClass = cx("uix-relationship-graph uix-relationship-graph--state", props.className);
|
|
5291
|
-
if (props.loading) return /* @__PURE__ */ (0,
|
|
5356
|
+
if (props.loading) return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: stateClass, role: "status", children: labels.loading });
|
|
5292
5357
|
if (props.error) {
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
5294
|
-
/* @__PURE__ */ (0,
|
|
5295
|
-
props.onRetry && /* @__PURE__ */ (0,
|
|
5358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: stateClass, role: "alert", children: [
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { children: props.error }),
|
|
5360
|
+
props.onRetry && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary", onClick: props.onRetry, children: labels.retry })
|
|
5296
5361
|
] });
|
|
5297
5362
|
}
|
|
5298
|
-
if (props.nodes.length === 0) return /* @__PURE__ */ (0,
|
|
5299
|
-
/* @__PURE__ */ (0,
|
|
5300
|
-
/* @__PURE__ */ (0,
|
|
5363
|
+
if (props.nodes.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: stateClass, children: [
|
|
5364
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { children: labels.emptyTitle }),
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { children: labels.emptyHint })
|
|
5301
5366
|
] });
|
|
5302
|
-
if (props.layout === "layered") return /* @__PURE__ */ (0,
|
|
5303
|
-
return /* @__PURE__ */ (0,
|
|
5367
|
+
if (props.layout === "layered") return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LayeredRelationshipGraph, { ...props, labels });
|
|
5368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(RadialRelationshipGraph, { ...props, labels });
|
|
5304
5369
|
}
|
|
5305
5370
|
function RadialRelationshipGraph({
|
|
5306
5371
|
nodes,
|
|
@@ -5349,28 +5414,28 @@ function RadialRelationshipGraph({
|
|
|
5349
5414
|
setZoom(1);
|
|
5350
5415
|
setPan({ x: 0, y: 0 });
|
|
5351
5416
|
};
|
|
5352
|
-
return /* @__PURE__ */ (0,
|
|
5353
|
-
/* @__PURE__ */ (0,
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5355
|
-
/* @__PURE__ */ (0,
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
5357
|
-
/* @__PURE__ */ (0,
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
5359
|
-
/* @__PURE__ */ (0,
|
|
5360
|
-
/* @__PURE__ */ (0,
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("section", { className: cx("uix-relationship-graph", `uix-relationship-graph--${density}`, className), "aria-label": labels.graph, children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "uix-relationship-graph__toolbar", "aria-label": labels.controls, children: [
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setPan((value) => ({ ...value, x: value.x - 24 })), "aria-label": labels.panLeft, children: labels.left }),
|
|
5420
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setPan((value) => ({ ...value, y: value.y - 24 })), "aria-label": labels.panUp, children: labels.up }),
|
|
5421
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setPan((value) => ({ ...value, y: value.y + 24 })), "aria-label": labels.panDown, children: labels.down }),
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setPan((value) => ({ ...value, x: value.x + 24 })), "aria-label": labels.panRight, children: labels.right }),
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setZoom((value) => Math.min(2, Number((value + 0.2).toFixed(1)))), "aria-label": labels.zoomIn, children: labels.zoomIn }),
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: () => setZoom((value) => Math.max(0.5, Number((value - 0.2).toFixed(1)))), "aria-label": labels.zoomOut, children: labels.zoomOut }),
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { type: "button", onClick: reset, children: labels.reset }),
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { "aria-live": "polite", children: labels.zoomLevel(Math.round(zoom * 100)) })
|
|
5362
5427
|
] }),
|
|
5363
|
-
bounded.omittedNodeCount > 0 && /* @__PURE__ */ (0,
|
|
5364
|
-
/* @__PURE__ */ (0,
|
|
5428
|
+
bounded.omittedNodeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "uix-relationship-graph__bounded", role: "status", children: labels.bounded(bounded.nodes.length, bounded.omittedNodeCount) }),
|
|
5429
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "uix-relationship-graph__visual", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("svg", { ref: svgRef, viewBox: radialViewBox(positioned), role: "group", "aria-label": labels.graphSummary(bounded.nodes.length, bounded.edges.length), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("g", { transform: `translate(${pan.x} ${pan.y}) scale(${zoom})`, children: [
|
|
5365
5430
|
bounded.edges.map((edge) => {
|
|
5366
5431
|
const source = positionedById.get(edge.source);
|
|
5367
5432
|
const target = positionedById.get(edge.target);
|
|
5368
|
-
return /* @__PURE__ */ (0,
|
|
5433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("line", { x1: source.x * RADIAL_SCALE_X, y1: source.y * RADIAL_SCALE_Y, x2: target.x * RADIAL_SCALE_X, y2: target.y * RADIAL_SCALE_Y, className: "uix-relationship-graph__edge", "data-highlighted": highlightedEdgeIds.has(edge.id) || void 0, "data-conflicted": conflictedEdgeIds.has(edge.id) || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("title", { children: edge.label ?? edge.type ?? labels.relationship }) }, edge.id);
|
|
5369
5434
|
}),
|
|
5370
|
-
positioned.map((node) => /* @__PURE__ */ (0,
|
|
5435
|
+
positioned.map((node) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5371
5436
|
"g",
|
|
5372
5437
|
{
|
|
5373
|
-
transform: `translate(${node.x *
|
|
5438
|
+
transform: `translate(${node.x * RADIAL_SCALE_X} ${node.y * RADIAL_SCALE_Y})`,
|
|
5374
5439
|
role: "button",
|
|
5375
5440
|
"aria-label": `${node.label}${node.type ? `, ${node.type}` : ""}${conflictedNodeIds.has(node.id) ? `, ${labels.conflict}` : ""}`,
|
|
5376
5441
|
tabIndex: focusedId === node.id ? 0 : -1,
|
|
@@ -5383,21 +5448,22 @@ function RadialRelationshipGraph({
|
|
|
5383
5448
|
onKeyDown: (event) => onNodeKeyDown(event, node.id),
|
|
5384
5449
|
onClick: () => select(node.id),
|
|
5385
5450
|
children: [
|
|
5386
|
-
/* @__PURE__ */ (0,
|
|
5387
|
-
/* @__PURE__ */ (0,
|
|
5451
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("title", { children: node.label }),
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("rect", { x: -RADIAL_NODE_HALF_W, y: -RADIAL_NODE_HALF_H, width: RADIAL_NODE_HALF_W * 2, height: RADIAL_NODE_HALF_H * 2, rx: "8" }),
|
|
5453
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("text", { textAnchor: "middle", dominantBaseline: "middle", children: node.label.length > 16 ? `${node.label.slice(0, 15)}\u2026` : node.label })
|
|
5388
5454
|
]
|
|
5389
5455
|
},
|
|
5390
5456
|
node.id
|
|
5391
5457
|
))
|
|
5392
5458
|
] }) }) }),
|
|
5393
|
-
legend.length > 0 && /* @__PURE__ */ (0,
|
|
5394
|
-
showList && /* @__PURE__ */ (0,
|
|
5459
|
+
legend.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("ul", { className: "uix-relationship-graph__legend", "aria-label": labels.legend, children: legend.map((item) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("li", { "data-type": item.id, children: item.label }, item.id)) }),
|
|
5460
|
+
showList && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(EquivalentRelationshipList, { nodes: bounded.nodes, edges: bounded.edges, selectedId, labels, onSelect: select, onExpandNeighbors, onOpenDetails })
|
|
5395
5461
|
] });
|
|
5396
5462
|
}
|
|
5397
5463
|
|
|
5398
5464
|
// src/components/MatchReview.tsx
|
|
5399
5465
|
var import_react42 = require("react");
|
|
5400
|
-
var
|
|
5466
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5401
5467
|
var valueText = (value) => value == null ? "\u2014" : typeof value === "string" ? value : JSON.stringify(value);
|
|
5402
5468
|
function MatchReview({
|
|
5403
5469
|
incoming,
|
|
@@ -5445,55 +5511,55 @@ function MatchReview({
|
|
|
5445
5511
|
setBulkPending(false);
|
|
5446
5512
|
}
|
|
5447
5513
|
};
|
|
5448
|
-
if (loading) return /* @__PURE__ */ (0,
|
|
5449
|
-
if (error) return /* @__PURE__ */ (0,
|
|
5450
|
-
/* @__PURE__ */ (0,
|
|
5451
|
-
onRetry && /* @__PURE__ */ (0,
|
|
5514
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: cx("uix-match-review uix-match-review--state", className), role: "status", children: "Loading match candidates\u2026" });
|
|
5515
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cx("uix-match-review uix-match-review--state", className), role: "alert", children: [
|
|
5516
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { children: error }),
|
|
5517
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary", onClick: onRetry, children: "Try again" })
|
|
5452
5518
|
] });
|
|
5453
|
-
if (candidates.length === 0) return /* @__PURE__ */ (0,
|
|
5454
|
-
/* @__PURE__ */ (0,
|
|
5455
|
-
/* @__PURE__ */ (0,
|
|
5519
|
+
if (candidates.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cx("uix-match-review uix-match-review--state", className), children: [
|
|
5520
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { children: "No candidate matches found." }),
|
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { children: "Choose another record source or continue without a match." })
|
|
5456
5522
|
] });
|
|
5457
|
-
return /* @__PURE__ */ (0,
|
|
5458
|
-
/* @__PURE__ */ (0,
|
|
5459
|
-
/* @__PURE__ */ (0,
|
|
5460
|
-
/* @__PURE__ */ (0,
|
|
5461
|
-
/* @__PURE__ */ (0,
|
|
5523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("section", { className: cx("uix-match-review", className), "aria-label": "Match review", children: [
|
|
5524
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "uix-match-review__summary", children: [
|
|
5525
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { children: [
|
|
5526
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("strong", { children: incomingLabel }),
|
|
5527
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { children: [
|
|
5462
5528
|
pending.length,
|
|
5463
5529
|
" pending of ",
|
|
5464
5530
|
candidates.length
|
|
5465
5531
|
] })
|
|
5466
5532
|
] }),
|
|
5467
|
-
/* @__PURE__ */ (0,
|
|
5468
|
-
/* @__PURE__ */ (0,
|
|
5533
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "uix-match-review__incoming", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { children: [
|
|
5534
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("b", { children: field.label }),
|
|
5469
5535
|
field.render?.(incoming[field.id], incoming) ?? valueText(incoming[field.id])
|
|
5470
5536
|
] }, field.id)) })
|
|
5471
5537
|
] }),
|
|
5472
|
-
onBulkDecision && /* @__PURE__ */ (0,
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5538
|
+
onBulkDecision && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "uix-match-review__bulk", "aria-label": "Bulk candidate actions", children: [
|
|
5539
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { children: [
|
|
5474
5540
|
selection.size,
|
|
5475
5541
|
" selected"
|
|
5476
5542
|
] }),
|
|
5477
|
-
/* @__PURE__ */ (0,
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary uix-btn--sm", disabled: selection.size === 0 || bulkPending, onClick: () => void runBulk("accept"), children: bulkPending ? "Applying\u2026" : "Accept selected" }),
|
|
5544
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", disabled: selection.size === 0 || bulkPending, onClick: () => void runBulk("dismiss"), children: bulkPending ? "Applying\u2026" : "Dismiss selected" })
|
|
5479
5545
|
] }),
|
|
5480
|
-
/* @__PURE__ */ (0,
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5483
|
-
/* @__PURE__ */ (0,
|
|
5484
|
-
/* @__PURE__ */ (0,
|
|
5485
|
-
fields.map((field) => /* @__PURE__ */ (0,
|
|
5486
|
-
/* @__PURE__ */ (0,
|
|
5487
|
-
/* @__PURE__ */ (0,
|
|
5546
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "uix-match-review__table-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("table", { className: "uix-table uix-match-review__table", children: [
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("caption", { className: "uix-visually-hidden", children: "Candidate matches and available decisions" }),
|
|
5548
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("tr", { children: [
|
|
5549
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { scope: "col", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "uix-visually-hidden", children: "Select" }) }),
|
|
5550
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { scope: "col", children: "Confidence" }),
|
|
5551
|
+
fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { scope: "col", children: field.label }, field.id)),
|
|
5552
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { scope: "col", children: "Status" }),
|
|
5553
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { scope: "col", children: "Actions" })
|
|
5488
5554
|
] }) }),
|
|
5489
|
-
/* @__PURE__ */ (0,
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("tbody", { children: candidates.map((candidate) => {
|
|
5490
5556
|
const resolved = candidate.status === "resolved";
|
|
5491
|
-
return /* @__PURE__ */ (0,
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
5494
|
-
fields.map((field) => /* @__PURE__ */ (0,
|
|
5495
|
-
/* @__PURE__ */ (0,
|
|
5496
|
-
/* @__PURE__ */ (0,
|
|
5557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("tr", { "data-status": candidate.status ?? "pending", children: [
|
|
5558
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("input", { type: "checkbox", checked: selection.has(candidate.id), onChange: () => toggle(candidate.id), "aria-label": `Select candidate ${candidate.id}` }) }),
|
|
5559
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "uix-match-review__confidence", children: candidate.confidence == null ? "Not scored" : `${Math.round(candidate.confidence * 100)}%` }) }),
|
|
5560
|
+
fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("td", { children: field.render?.(candidate.record[field.id], candidate.record) ?? valueText(candidate.record[field.id]) }, field.id)),
|
|
5561
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(StatusPill, { tone: resolved ? "success" : "warning", children: resolved ? candidate.decision ?? "Resolved" : "Pending" }) }),
|
|
5562
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "uix-match-review__actions", children: ["accept", "dismiss", "split", "pick-other"].map((action) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5497
5563
|
"button",
|
|
5498
5564
|
{
|
|
5499
5565
|
type: "button",
|
|
@@ -5507,7 +5573,7 @@ function MatchReview({
|
|
|
5507
5573
|
] }, candidate.id);
|
|
5508
5574
|
}) })
|
|
5509
5575
|
] }) }),
|
|
5510
|
-
/* @__PURE__ */ (0,
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "uix-visually-hidden", "aria-live": "polite", children: announcement })
|
|
5511
5577
|
] });
|
|
5512
5578
|
}
|
|
5513
5579
|
|
|
@@ -5537,7 +5603,7 @@ function parseMetricValue(value) {
|
|
|
5537
5603
|
}
|
|
5538
5604
|
|
|
5539
5605
|
// src/components/MetricInput.tsx
|
|
5540
|
-
var
|
|
5606
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5541
5607
|
var defaultMetricFormat = (input) => input == null ? "" : String(input);
|
|
5542
5608
|
function MetricInput({
|
|
5543
5609
|
value,
|
|
@@ -5586,10 +5652,10 @@ function MetricInput({
|
|
|
5586
5652
|
const parsed = parse(event.currentTarget.value);
|
|
5587
5653
|
setText(parsed === null && event.currentTarget.value.trim() !== "" ? format(value) : format(parsed));
|
|
5588
5654
|
};
|
|
5589
|
-
return /* @__PURE__ */ (0,
|
|
5590
|
-
/* @__PURE__ */ (0,
|
|
5591
|
-
/* @__PURE__ */ (0,
|
|
5592
|
-
/* @__PURE__ */ (0,
|
|
5655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: cx("uix-metric-input", invalid && "uix-metric-input--invalid", className), children: [
|
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { className: "uix-field__label", htmlFor: id, children: label }),
|
|
5657
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "uix-metric-input__control", children: [
|
|
5658
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5593
5659
|
Input,
|
|
5594
5660
|
{
|
|
5595
5661
|
id,
|
|
@@ -5608,22 +5674,22 @@ function MetricInput({
|
|
|
5608
5674
|
readOnly
|
|
5609
5675
|
}
|
|
5610
5676
|
),
|
|
5611
|
-
unit && /* @__PURE__ */ (0,
|
|
5612
|
-
/* @__PURE__ */ (0,
|
|
5613
|
-
/* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5677
|
+
unit && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "uix-metric-input__unit", "aria-hidden": "true", children: unit }),
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "uix-metric-input__steps", children: [
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("button", { type: "button", className: "uix-metric-input__step", onClick: () => stepBy(1), disabled: disabled || readOnly, "aria-label": `Increase ${label}`, children: "+" }),
|
|
5680
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("button", { type: "button", className: "uix-metric-input__step", onClick: () => stepBy(-1), disabled: disabled || readOnly, "aria-label": `Decrease ${label}`, children: "\u2212" })
|
|
5615
5681
|
] })
|
|
5616
5682
|
] }),
|
|
5617
|
-
unit && /* @__PURE__ */ (0,
|
|
5683
|
+
unit && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "uix-visually-hidden", children: [
|
|
5618
5684
|
"Unit: ",
|
|
5619
5685
|
unit
|
|
5620
5686
|
] }),
|
|
5621
|
-
invalid && errorMessage && /* @__PURE__ */ (0,
|
|
5687
|
+
invalid && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { id: errorId, className: "uix-field__error", children: errorMessage })
|
|
5622
5688
|
] });
|
|
5623
5689
|
}
|
|
5624
5690
|
|
|
5625
5691
|
// src/components/LicensePositionBar.tsx
|
|
5626
|
-
var
|
|
5692
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5627
5693
|
var defaultCapacityFormat = (value) => new Intl.NumberFormat().format(value);
|
|
5628
5694
|
function LicensePositionBar({
|
|
5629
5695
|
consumed,
|
|
@@ -5644,18 +5710,18 @@ function LicensePositionBar({
|
|
|
5644
5710
|
const percent = safeEntitled === 0 ? safeConsumed > 0 ? 100 : 0 : safeConsumed / safeEntitled * 100;
|
|
5645
5711
|
const format = (value) => `${formatValue(value)}${unit ? ` ${unit}` : ""}`;
|
|
5646
5712
|
const summary = `${consumedLabel}: ${format(safeConsumed)}. ${entitledLabel}: ${format(safeEntitled)}. ${over > 0 ? `${format(over)} ${overLabel}` : `${format(available)} ${availableLabel}`}.`;
|
|
5647
|
-
return /* @__PURE__ */ (0,
|
|
5648
|
-
/* @__PURE__ */ (0,
|
|
5649
|
-
/* @__PURE__ */ (0,
|
|
5713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cx("uix-license-position", over > 0 && "uix-license-position--over", className), ...props, children: [
|
|
5714
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "uix-license-position__header", children: [
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "uix-license-position__value", children: [
|
|
5650
5716
|
format(safeConsumed),
|
|
5651
5717
|
" / ",
|
|
5652
5718
|
format(safeEntitled)
|
|
5653
5719
|
] }),
|
|
5654
|
-
/* @__PURE__ */ (0,
|
|
5720
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StatusPill, { tone: over > 0 ? "danger" : percent >= 80 ? "warning" : "success", children: over > 0 ? `${format(over)} ${overLabel}` : `${format(available)} ${availableLabel}` })
|
|
5655
5721
|
] }),
|
|
5656
|
-
/* @__PURE__ */ (0,
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
5658
|
-
over > 0 && /* @__PURE__ */ (0,
|
|
5722
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "uix-license-position__track", children: [
|
|
5723
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Meter, { value: Math.min(100, percent), tone: over > 0 ? "danger" : percent >= 80 ? "warning" : "success", "aria-label": summary, "aria-valuetext": summary }),
|
|
5724
|
+
over > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5659
5725
|
"span",
|
|
5660
5726
|
{
|
|
5661
5727
|
className: "uix-license-position__overflow",
|
|
@@ -5664,7 +5730,7 @@ function LicensePositionBar({
|
|
|
5664
5730
|
}
|
|
5665
5731
|
)
|
|
5666
5732
|
] }),
|
|
5667
|
-
/* @__PURE__ */ (0,
|
|
5733
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "uix-visually-hidden", children: summary })
|
|
5668
5734
|
] });
|
|
5669
5735
|
}
|
|
5670
5736
|
|
|
@@ -5739,7 +5805,7 @@ function meetsContrast(background, foreground, minimum = 4.5) {
|
|
|
5739
5805
|
|
|
5740
5806
|
// src/components/ColorPicker.tsx
|
|
5741
5807
|
var import_react44 = require("react");
|
|
5742
|
-
var
|
|
5808
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5743
5809
|
var EMPTY_COLORS = [];
|
|
5744
5810
|
function ColorPicker({
|
|
5745
5811
|
value,
|
|
@@ -5805,8 +5871,8 @@ function ColorPicker({
|
|
|
5805
5871
|
if (next) onChange(next);
|
|
5806
5872
|
};
|
|
5807
5873
|
const sampleStyle = { backgroundColor: normalized };
|
|
5808
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
-
/* @__PURE__ */ (0,
|
|
5874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cx("uix-color-picker", className), children: [
|
|
5875
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5810
5876
|
"button",
|
|
5811
5877
|
{
|
|
5812
5878
|
ref: triggerRef,
|
|
@@ -5818,12 +5884,12 @@ function ColorPicker({
|
|
|
5818
5884
|
onClick: () => setOpen((current) => !current),
|
|
5819
5885
|
disabled,
|
|
5820
5886
|
children: [
|
|
5821
|
-
/* @__PURE__ */ (0,
|
|
5822
|
-
/* @__PURE__ */ (0,
|
|
5887
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "uix-color-picker__swatch", style: sampleStyle, "aria-hidden": "true" }),
|
|
5888
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: normalized })
|
|
5823
5889
|
]
|
|
5824
5890
|
}
|
|
5825
5891
|
),
|
|
5826
|
-
open && /* @__PURE__ */ (0,
|
|
5892
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5827
5893
|
"div",
|
|
5828
5894
|
{
|
|
5829
5895
|
ref: dialogRef,
|
|
@@ -5834,57 +5900,57 @@ function ColorPicker({
|
|
|
5834
5900
|
className: "uix-color-picker__popover",
|
|
5835
5901
|
onKeyDown: onDialogKeyDown,
|
|
5836
5902
|
children: [
|
|
5837
|
-
/* @__PURE__ */ (0,
|
|
5838
|
-
/* @__PURE__ */ (0,
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "uix-color-picker__preview", style: sampleStyle, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { style: { color: foreground }, children: "Aa" }) }),
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "uix-color-picker__range", children: [
|
|
5839
5905
|
"Hue ",
|
|
5840
|
-
/* @__PURE__ */ (0,
|
|
5906
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { children: [
|
|
5841
5907
|
Math.round(hsv.h),
|
|
5842
5908
|
"\xB0"
|
|
5843
5909
|
] }),
|
|
5844
|
-
/* @__PURE__ */ (0,
|
|
5910
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("input", { type: "range", min: "0", max: "359", value: Math.round(hsv.h), onChange: (event) => updateHsv({ h: Number(event.currentTarget.value) }) })
|
|
5845
5911
|
] }),
|
|
5846
|
-
/* @__PURE__ */ (0,
|
|
5912
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "uix-color-picker__range", children: [
|
|
5847
5913
|
"Saturation ",
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { children: [
|
|
5849
5915
|
Math.round(hsv.s * 100),
|
|
5850
5916
|
"%"
|
|
5851
5917
|
] }),
|
|
5852
|
-
/* @__PURE__ */ (0,
|
|
5918
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("input", { type: "range", min: "0", max: "100", value: Math.round(hsv.s * 100), onChange: (event) => updateHsv({ s: Number(event.currentTarget.value) / 100 }) })
|
|
5853
5919
|
] }),
|
|
5854
|
-
/* @__PURE__ */ (0,
|
|
5920
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "uix-color-picker__range", children: [
|
|
5855
5921
|
"Brightness ",
|
|
5856
|
-
/* @__PURE__ */ (0,
|
|
5922
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { children: [
|
|
5857
5923
|
Math.round(hsv.v * 100),
|
|
5858
5924
|
"%"
|
|
5859
5925
|
] }),
|
|
5860
|
-
/* @__PURE__ */ (0,
|
|
5926
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("input", { type: "range", min: "0", max: "100", value: Math.round(hsv.v * 100), onChange: (event) => updateHsv({ v: Number(event.currentTarget.value) / 100 }) })
|
|
5861
5927
|
] }),
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5928
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "uix-color-picker__hex", children: [
|
|
5863
5929
|
"Hex",
|
|
5864
|
-
/* @__PURE__ */ (0,
|
|
5865
|
-
/* @__PURE__ */ (0,
|
|
5930
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "uix-color-picker__hex-row", children: [
|
|
5931
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("input", { className: "uix-input", value: hexText, onChange: (event) => setHexText(event.currentTarget.value), onBlur: commitHex, onKeyDown: (event) => {
|
|
5866
5932
|
if (event.key === "Enter") commitHex();
|
|
5867
5933
|
}, "aria-invalid": !normalizeHex(hexText) }),
|
|
5868
|
-
/* @__PURE__ */ (0,
|
|
5934
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary uix-btn--sm", onClick: commitHex, disabled: !normalizeHex(hexText), children: "Set" })
|
|
5869
5935
|
] })
|
|
5870
5936
|
] }),
|
|
5871
|
-
(presets.length > 0 || recent.length > 0) && /* @__PURE__ */ (0,
|
|
5872
|
-
presets.length > 0 && /* @__PURE__ */ (0,
|
|
5873
|
-
/* @__PURE__ */ (0,
|
|
5874
|
-
/* @__PURE__ */ (0,
|
|
5937
|
+
(presets.length > 0 || recent.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "uix-color-picker__palettes", children: [
|
|
5938
|
+
presets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("fieldset", { children: [
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("legend", { children: "Presets" }),
|
|
5940
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { children: presets.map((color) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { type: "button", className: "uix-color-picker__preset", style: { backgroundColor: normalizeHex(color) ?? color }, onClick: () => choose(color), "aria-label": `Use preset ${color}` }, color)) })
|
|
5875
5941
|
] }),
|
|
5876
|
-
recent.length > 0 && /* @__PURE__ */ (0,
|
|
5877
|
-
/* @__PURE__ */ (0,
|
|
5878
|
-
/* @__PURE__ */ (0,
|
|
5942
|
+
recent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("fieldset", { children: [
|
|
5943
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("legend", { children: "Recent" }),
|
|
5944
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { children: recent.map((color) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { type: "button", className: "uix-color-picker__preset", style: { backgroundColor: normalizeHex(color) ?? color }, onClick: () => choose(color), "aria-label": `Use recent color ${color}` }, color)) })
|
|
5879
5945
|
] })
|
|
5880
5946
|
] }),
|
|
5881
|
-
/* @__PURE__ */ (0,
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("p", { className: cx("uix-color-picker__contrast", passes ? "uix-color-picker__contrast--pass" : "uix-color-picker__contrast--fail"), role: "status", "aria-live": "polite", children: [
|
|
5882
5948
|
"Contrast ",
|
|
5883
5949
|
ratio.toFixed(2),
|
|
5884
5950
|
":1 \u2014 ",
|
|
5885
5951
|
passes ? `passes WCAG AA (${minimumContrast}:1)` : `does not meet WCAG AA (${minimumContrast}:1)`
|
|
5886
5952
|
] }),
|
|
5887
|
-
/* @__PURE__ */ (0,
|
|
5953
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { type: "button", className: "uix-btn uix-btn--primary uix-btn--sm", onClick: close, children: "Done" })
|
|
5888
5954
|
]
|
|
5889
5955
|
}
|
|
5890
5956
|
)
|
|
@@ -5892,7 +5958,7 @@ function ColorPicker({
|
|
|
5892
5958
|
}
|
|
5893
5959
|
|
|
5894
5960
|
// src/components/BrandProfiles.tsx
|
|
5895
|
-
var
|
|
5961
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5896
5962
|
var PROFILE_PROPERTIES = {
|
|
5897
5963
|
brand: "--uix-brand",
|
|
5898
5964
|
brandForeground: "--uix-brand-fg",
|
|
@@ -5978,54 +6044,54 @@ function BrandProfileEditor({
|
|
|
5978
6044
|
...value.typography?.sans ? { "--uix-font-sans": value.typography.sans } : {},
|
|
5979
6045
|
...value.typography?.heading ? { "--uix-font-heading": value.typography.heading } : {}
|
|
5980
6046
|
};
|
|
5981
|
-
return /* @__PURE__ */ (0,
|
|
5982
|
-
/* @__PURE__ */ (0,
|
|
5983
|
-
profiles.length > 0 && /* @__PURE__ */ (0,
|
|
6047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("section", { className: cx("uix-brand-profiles", className), "aria-label": "Brand profile editor", children: [
|
|
6048
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "uix-brand-profiles__form", children: [
|
|
6049
|
+
profiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "uix-field__label", children: [
|
|
5984
6050
|
"Profile",
|
|
5985
|
-
/* @__PURE__ */ (0,
|
|
6051
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("select", { className: "uix-select", value: value.id, onChange: (event) => {
|
|
5986
6052
|
const selected = profiles.find((profile) => profile.id === event.currentTarget.value);
|
|
5987
6053
|
if (selected) onSelectProfile?.(selected);
|
|
5988
|
-
}, children: profiles.map((profile) => /* @__PURE__ */ (0,
|
|
6054
|
+
}, children: profiles.map((profile) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("option", { value: profile.id, children: profile.name }, profile.id)) })
|
|
5989
6055
|
] }),
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "uix-field__label", children: [
|
|
5991
6057
|
"Name",
|
|
5992
|
-
/* @__PURE__ */ (0,
|
|
6058
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("input", { className: "uix-input", value: value.name, onChange: (event) => update({ name: event.currentTarget.value }) })
|
|
5993
6059
|
] }),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
5995
|
-
/* @__PURE__ */ (0,
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "uix-brand-profiles__colors", children: [
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { children: [
|
|
5996
6062
|
"Brand",
|
|
5997
|
-
/* @__PURE__ */ (0,
|
|
6063
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ColorPicker, { label: "Brand color", value: value.brand, foreground: value.brandForeground, presets: colorPresets, onChange: (brand) => update({ brand }) })
|
|
5998
6064
|
] }),
|
|
5999
|
-
/* @__PURE__ */ (0,
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { children: [
|
|
6000
6066
|
"On brand",
|
|
6001
|
-
/* @__PURE__ */ (0,
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ColorPicker, { label: "Brand foreground color", value: value.brandForeground, foreground: value.brand, presets: colorPresets, onChange: (brandForeground) => update({ brandForeground }) })
|
|
6002
6068
|
] })
|
|
6003
6069
|
] }),
|
|
6004
|
-
/* @__PURE__ */ (0,
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "uix-field__label", children: [
|
|
6005
6071
|
"Body font",
|
|
6006
|
-
/* @__PURE__ */ (0,
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("input", { className: "uix-input", value: value.typography?.sans ?? "", onChange: (event) => update({ typography: { ...value.typography, sans: event.currentTarget.value || void 0 } }) })
|
|
6007
6073
|
] }),
|
|
6008
|
-
/* @__PURE__ */ (0,
|
|
6074
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "uix-field__label", children: [
|
|
6009
6075
|
"Heading font",
|
|
6010
|
-
/* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("input", { className: "uix-input", value: value.typography?.heading ?? "", onChange: (event) => update({ typography: { ...value.typography, heading: event.currentTarget.value || void 0 } }) })
|
|
6011
6077
|
] }),
|
|
6012
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "uix-file-upload uix-brand-profiles__upload", children: [
|
|
6013
6079
|
"Logo file",
|
|
6014
|
-
/* @__PURE__ */ (0,
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("input", { type: "file", accept: "image/*", onChange: onFile })
|
|
6015
6081
|
] }),
|
|
6016
|
-
/* @__PURE__ */ (0,
|
|
6017
|
-
/* @__PURE__ */ (0,
|
|
6082
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", className: "uix-btn uix-btn--primary", onClick: apply, children: "Apply profile" }),
|
|
6083
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "uix-visually-hidden", "aria-live": "polite", children: announcement })
|
|
6018
6084
|
] }),
|
|
6019
|
-
/* @__PURE__ */ (0,
|
|
6020
|
-
/* @__PURE__ */ (0,
|
|
6021
|
-
value.logo ? /* @__PURE__ */ (0,
|
|
6022
|
-
/* @__PURE__ */ (0,
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "uix-brand-profiles__preview", style: previewStyle, "aria-label": `Live preview of ${value.name}`, children: [
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "uix-brand-profiles__preview-header", children: [
|
|
6087
|
+
value.logo ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: value.logo.src, alt: value.logo.alt }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "uix-brand-profiles__logo-placeholder", children: "Logo" }),
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("strong", { children: value.name || "Brand preview" })
|
|
6023
6089
|
] }),
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6026
|
-
/* @__PURE__ */ (0,
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
6028
|
-
/* @__PURE__ */ (0,
|
|
6090
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "uix-brand-profiles__preview-body", children: [
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("h3", { children: "Readable, serializable branding" }),
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: "Accent, links, rings, and muted states continue through the existing UIx token chain." }),
|
|
6093
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", className: "uix-btn uix-btn--primary", children: "Primary action" }),
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("a", { href: "#brand-profile-preview", children: "Preview link" })
|
|
6029
6095
|
] })
|
|
6030
6096
|
] })
|
|
6031
6097
|
] });
|
|
@@ -6084,7 +6150,7 @@ function summarizeDiff(entries, resolutions = {}) {
|
|
|
6084
6150
|
}
|
|
6085
6151
|
|
|
6086
6152
|
// src/components/DiffViewer.tsx
|
|
6087
|
-
var
|
|
6153
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6088
6154
|
var GROUPS = [
|
|
6089
6155
|
{ kind: "conflicted", label: "Conflicted" },
|
|
6090
6156
|
{ kind: "changed", label: "Changed" },
|
|
@@ -6112,56 +6178,56 @@ function DiffViewer({
|
|
|
6112
6178
|
if (controlledResolutions === void 0) setInternalResolutions((currentState) => ({ ...currentState, [path]: resolution }));
|
|
6113
6179
|
onResolutionChange?.(path, resolution);
|
|
6114
6180
|
};
|
|
6115
|
-
if (entries.length === 0) return /* @__PURE__ */ (0,
|
|
6116
|
-
/* @__PURE__ */ (0,
|
|
6117
|
-
/* @__PURE__ */ (0,
|
|
6181
|
+
if (entries.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("section", { className: cx("uix-diff-viewer uix-diff-viewer--empty", className), "aria-label": "Configuration differences", children: [
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h3", { children: "No differences" }),
|
|
6183
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { children: "Base, current, and incoming values are aligned." })
|
|
6118
6184
|
] });
|
|
6119
|
-
return /* @__PURE__ */ (0,
|
|
6120
|
-
/* @__PURE__ */ (0,
|
|
6121
|
-
GROUPS.map((group) => /* @__PURE__ */ (0,
|
|
6122
|
-
/* @__PURE__ */ (0,
|
|
6185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("section", { className: cx("uix-diff-viewer", className), "aria-label": "Configuration differences", children: [
|
|
6186
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "uix-diff-viewer__summary", "aria-label": "Difference summary", children: [
|
|
6187
|
+
GROUPS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { children: [
|
|
6188
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("b", { children: summary[group.kind] }),
|
|
6123
6189
|
" ",
|
|
6124
6190
|
group.label.toLowerCase()
|
|
6125
6191
|
] }, group.kind)),
|
|
6126
|
-
/* @__PURE__ */ (0,
|
|
6127
|
-
/* @__PURE__ */ (0,
|
|
6192
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { children: [
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("b", { children: summary.resolved }),
|
|
6128
6194
|
" resolved"
|
|
6129
6195
|
] }),
|
|
6130
|
-
/* @__PURE__ */ (0,
|
|
6131
|
-
/* @__PURE__ */ (0,
|
|
6196
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { children: [
|
|
6197
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("b", { children: summary.pending }),
|
|
6132
6198
|
" pending"
|
|
6133
6199
|
] })
|
|
6134
6200
|
] }),
|
|
6135
6201
|
GROUPS.map((group) => {
|
|
6136
6202
|
const grouped = entries.filter((entry) => entry.kind === group.kind);
|
|
6137
6203
|
if (!grouped.length) return null;
|
|
6138
|
-
return /* @__PURE__ */ (0,
|
|
6139
|
-
/* @__PURE__ */ (0,
|
|
6204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("section", { className: "uix-diff-viewer__group", "aria-labelledby": `${id}-${group.kind}`, children: [
|
|
6205
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("h3", { id: `${id}-${group.kind}`, children: [
|
|
6140
6206
|
group.label,
|
|
6141
6207
|
" ",
|
|
6142
|
-
/* @__PURE__ */ (0,
|
|
6208
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: grouped.length })
|
|
6143
6209
|
] }),
|
|
6144
6210
|
grouped.map((entry) => {
|
|
6145
6211
|
const resolution = resolutions[entry.path] ?? "pending";
|
|
6146
|
-
return /* @__PURE__ */ (0,
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("details", { className: "uix-diff-viewer__entry", "data-kind": entry.kind, open: entry.kind === "conflicted", children: [
|
|
6213
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("summary", { children: [
|
|
6214
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("code", { children: entry.path }),
|
|
6215
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(StatusPill, { tone: resolution === "pending" ? "warning" : "success", children: resolution })
|
|
6150
6216
|
] }),
|
|
6151
|
-
/* @__PURE__ */ (0,
|
|
6152
|
-
/* @__PURE__ */ (0,
|
|
6153
|
-
/* @__PURE__ */ (0,
|
|
6217
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "uix-diff-viewer__versions", children: ["base", "current", "incoming"].map((version) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { role: "region", "aria-label": `${labels[version] ?? `${version[0].toUpperCase()}${version.slice(1)}`} value for ${entry.path}`, children: [
|
|
6218
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("strong", { children: labels[version] ?? `${version[0].toUpperCase()}${version.slice(1)}` }),
|
|
6219
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("pre", { children: renderValue(entry[version]) })
|
|
6154
6220
|
] }, version)) }),
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6156
|
-
/* @__PURE__ */ (0,
|
|
6157
|
-
/* @__PURE__ */ (0,
|
|
6158
|
-
/* @__PURE__ */ (0,
|
|
6221
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "uix-diff-viewer__actions", "aria-label": `Resolve ${entry.path}`, children: [
|
|
6222
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("button", { type: "button", className: "uix-btn uix-btn--primary uix-btn--sm", "aria-pressed": resolution === "accept", onClick: () => resolve2(entry.path, "accept"), children: "Accept incoming" }),
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("button", { type: "button", className: "uix-btn uix-btn--secondary uix-btn--sm", "aria-pressed": resolution === "skip", onClick: () => resolve2(entry.path, "skip"), children: "Keep current" }),
|
|
6224
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("button", { type: "button", className: "uix-btn uix-btn--ghost uix-btn--sm", "aria-pressed": resolution === "pending", onClick: () => resolve2(entry.path, "pending"), children: "Mark pending" })
|
|
6159
6225
|
] })
|
|
6160
6226
|
] }, entry.path);
|
|
6161
6227
|
})
|
|
6162
6228
|
] }, group.kind);
|
|
6163
6229
|
}),
|
|
6164
|
-
/* @__PURE__ */ (0,
|
|
6230
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("p", { className: "uix-visually-hidden", "aria-live": "polite", children: [
|
|
6165
6231
|
summary.resolved,
|
|
6166
6232
|
" of ",
|
|
6167
6233
|
entries.length,
|
|
@@ -6202,6 +6268,7 @@ function DiffViewer({
|
|
|
6202
6268
|
ContentList,
|
|
6203
6269
|
ContentListItem,
|
|
6204
6270
|
DEFAULT_RELATIONSHIP_GRAPH_LABELS,
|
|
6271
|
+
DEFAULT_SAVE_STATUS_LABELS,
|
|
6205
6272
|
DateRangePicker,
|
|
6206
6273
|
DescriptionItem,
|
|
6207
6274
|
DescriptionList,
|
|
@@ -6268,6 +6335,7 @@ function DiffViewer({
|
|
|
6268
6335
|
RowAction,
|
|
6269
6336
|
RowActions,
|
|
6270
6337
|
RuleBuilder,
|
|
6338
|
+
SaveStatus,
|
|
6271
6339
|
SavedViewMenu,
|
|
6272
6340
|
SchedulingCalendar,
|
|
6273
6341
|
SectionHead,
|