@octaviaflow/core 3.1.0-beta.53 → 3.1.0-beta.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/SlideoutPanel/SlideoutPanel.d.ts +8 -0
- package/dist/components/SlideoutPanel/SlideoutPanel.d.ts.map +1 -1
- package/dist/components/StatusList/StatusList.d.ts +48 -0
- package/dist/components/StatusList/StatusList.d.ts.map +1 -0
- package/dist/components/StatusList/index.d.ts +2 -0
- package/dist/components/StatusList/index.d.ts.map +1 -0
- package/dist/components/VersionHistory/VersionHistory.d.ts +6 -1
- package/dist/components/VersionHistory/VersionHistory.d.ts.map +1 -1
- package/dist/index.cjs +835 -741
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +745 -652
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24469,8 +24469,14 @@ function SlideoutContent({
|
|
|
24469
24469
|
title,
|
|
24470
24470
|
children,
|
|
24471
24471
|
footer,
|
|
24472
|
-
className
|
|
24472
|
+
className,
|
|
24473
|
+
offsetTop = 0,
|
|
24474
|
+
offsetBottom = 0
|
|
24473
24475
|
}) {
|
|
24476
|
+
const toCss2 = (v) => typeof v === "number" ? `${v}px` : v;
|
|
24477
|
+
const insetStyle = {};
|
|
24478
|
+
if (offsetTop) insetStyle.top = toCss2(offsetTop);
|
|
24479
|
+
if (offsetBottom) insetStyle.bottom = toCss2(offsetBottom);
|
|
24474
24480
|
const overlayRef = useRef45(null);
|
|
24475
24481
|
const panelRef = useRef45(null);
|
|
24476
24482
|
useEffect39(() => {
|
|
@@ -24519,7 +24525,8 @@ function SlideoutContent({
|
|
|
24519
24525
|
transition: { duration: 0.2 },
|
|
24520
24526
|
onClick: onClose,
|
|
24521
24527
|
"data-testid": "slideout-backdrop",
|
|
24522
|
-
"aria-hidden": "true"
|
|
24528
|
+
"aria-hidden": "true",
|
|
24529
|
+
style: insetStyle
|
|
24523
24530
|
}
|
|
24524
24531
|
),
|
|
24525
24532
|
/* @__PURE__ */ jsx110(FocusScope2, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsxs105(
|
|
@@ -24533,7 +24540,7 @@ function SlideoutContent({
|
|
|
24533
24540
|
panelRef.current = node;
|
|
24534
24541
|
},
|
|
24535
24542
|
className: cn("ods-slideout__panel", `ods-slideout__panel--${position}`, className),
|
|
24536
|
-
style: { width: panelWidth },
|
|
24543
|
+
style: { width: panelWidth, ...insetStyle },
|
|
24537
24544
|
initial: variant.initial,
|
|
24538
24545
|
animate: variant.animate,
|
|
24539
24546
|
exit: variant.exit,
|
|
@@ -24649,7 +24656,9 @@ function VersionHistory({
|
|
|
24649
24656
|
activeTab,
|
|
24650
24657
|
onTabChange,
|
|
24651
24658
|
defaultExpandedId = null,
|
|
24652
|
-
className
|
|
24659
|
+
className,
|
|
24660
|
+
offsetTop,
|
|
24661
|
+
offsetBottom
|
|
24653
24662
|
}) {
|
|
24654
24663
|
const [expandedId, setExpandedId] = useState51(defaultExpandedId);
|
|
24655
24664
|
const baseId = useId50();
|
|
@@ -24662,6 +24671,8 @@ function VersionHistory({
|
|
|
24662
24671
|
position,
|
|
24663
24672
|
width,
|
|
24664
24673
|
title,
|
|
24674
|
+
offsetTop,
|
|
24675
|
+
offsetBottom,
|
|
24665
24676
|
className: cn("ods-version-history", className),
|
|
24666
24677
|
children: [
|
|
24667
24678
|
showToolbar && /* @__PURE__ */ jsxs106("div", { className: "ods-version-history__toolbar", children: [
|
|
@@ -24791,12 +24802,93 @@ function VersionHistory({
|
|
|
24791
24802
|
}
|
|
24792
24803
|
VersionHistory.displayName = "VersionHistory";
|
|
24793
24804
|
|
|
24805
|
+
// src/components/StatusList/StatusList.tsx
|
|
24806
|
+
import { Fragment as Fragment42, jsx as jsx112, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
24807
|
+
var TONE_TO_CHIP2 = {
|
|
24808
|
+
success: "success",
|
|
24809
|
+
running: "primary",
|
|
24810
|
+
warning: "warning",
|
|
24811
|
+
danger: "error",
|
|
24812
|
+
neutral: "default",
|
|
24813
|
+
info: "primary"
|
|
24814
|
+
};
|
|
24815
|
+
function StatusList({
|
|
24816
|
+
items,
|
|
24817
|
+
title,
|
|
24818
|
+
action,
|
|
24819
|
+
dense = false,
|
|
24820
|
+
max,
|
|
24821
|
+
emptyLabel = "Nothing to show",
|
|
24822
|
+
onItemClick,
|
|
24823
|
+
className,
|
|
24824
|
+
...rest
|
|
24825
|
+
}) {
|
|
24826
|
+
const visible = typeof max === "number" ? items.slice(0, max) : items;
|
|
24827
|
+
const overflow = items.length - visible.length;
|
|
24828
|
+
const renderRowInner = (item) => /* @__PURE__ */ jsxs107(Fragment42, { children: [
|
|
24829
|
+
/* @__PURE__ */ jsx112(
|
|
24830
|
+
"span",
|
|
24831
|
+
{
|
|
24832
|
+
className: "ods-status-list__lead",
|
|
24833
|
+
"data-tone": item.tone ?? "neutral",
|
|
24834
|
+
"aria-hidden": "true",
|
|
24835
|
+
children: item.icon ?? /* @__PURE__ */ jsx112("span", { className: "ods-status-list__dot" })
|
|
24836
|
+
}
|
|
24837
|
+
),
|
|
24838
|
+
/* @__PURE__ */ jsxs107("span", { className: "ods-status-list__text", children: [
|
|
24839
|
+
/* @__PURE__ */ jsx112("span", { className: "ods-status-list__name", children: item.name }),
|
|
24840
|
+
item.meta != null && /* @__PURE__ */ jsx112("span", { className: "ods-status-list__meta", children: item.meta })
|
|
24841
|
+
] }),
|
|
24842
|
+
item.sparkline && item.sparkline.length > 1 && /* @__PURE__ */ jsx112("span", { className: "ods-status-list__spark", children: /* @__PURE__ */ jsx112(Sparkline, { data: item.sparkline, width: 72, height: 22 }) }),
|
|
24843
|
+
item.status != null && /* @__PURE__ */ jsx112(Chip, { size: "sm", variant: TONE_TO_CHIP2[item.tone ?? "neutral"], children: item.status }),
|
|
24844
|
+
item.trailing != null && /* @__PURE__ */ jsx112("span", { className: "ods-status-list__trailing", children: item.trailing })
|
|
24845
|
+
] });
|
|
24846
|
+
return /* @__PURE__ */ jsxs107("div", { className: cn("ods-status-list", className), ...rest, children: [
|
|
24847
|
+
(title != null || action != null) && /* @__PURE__ */ jsxs107("div", { className: "ods-status-list__header", children: [
|
|
24848
|
+
title != null && /* @__PURE__ */ jsx112("h3", { className: "ods-status-list__title", children: title }),
|
|
24849
|
+
action != null && /* @__PURE__ */ jsx112("div", { className: "ods-status-list__action", children: action })
|
|
24850
|
+
] }),
|
|
24851
|
+
visible.length === 0 ? /* @__PURE__ */ jsx112("div", { className: "ods-status-list__empty", children: emptyLabel }) : /* @__PURE__ */ jsx112(
|
|
24852
|
+
"ul",
|
|
24853
|
+
{
|
|
24854
|
+
className: cn(
|
|
24855
|
+
"ods-status-list__rows",
|
|
24856
|
+
dense && "ods-status-list__rows--dense"
|
|
24857
|
+
),
|
|
24858
|
+
children: visible.map((item) => {
|
|
24859
|
+
const interactive = Boolean(item.href || onItemClick);
|
|
24860
|
+
const rowClass = cn(
|
|
24861
|
+
"ods-status-list__row",
|
|
24862
|
+
interactive && "ods-status-list__row--interactive",
|
|
24863
|
+
item.muted && "ods-status-list__row--muted"
|
|
24864
|
+
);
|
|
24865
|
+
return /* @__PURE__ */ jsx112("li", { className: "ods-status-list__item", children: item.href ? /* @__PURE__ */ jsx112("a", { className: rowClass, href: item.href, children: renderRowInner(item) }) : onItemClick ? /* @__PURE__ */ jsx112(
|
|
24866
|
+
"button",
|
|
24867
|
+
{
|
|
24868
|
+
type: "button",
|
|
24869
|
+
className: rowClass,
|
|
24870
|
+
onClick: () => onItemClick(item),
|
|
24871
|
+
children: renderRowInner(item)
|
|
24872
|
+
}
|
|
24873
|
+
) : /* @__PURE__ */ jsx112("div", { className: rowClass, children: renderRowInner(item) }) }, item.id);
|
|
24874
|
+
})
|
|
24875
|
+
}
|
|
24876
|
+
),
|
|
24877
|
+
overflow > 0 && /* @__PURE__ */ jsxs107("div", { className: "ods-status-list__more", children: [
|
|
24878
|
+
"+",
|
|
24879
|
+
overflow,
|
|
24880
|
+
" more"
|
|
24881
|
+
] })
|
|
24882
|
+
] });
|
|
24883
|
+
}
|
|
24884
|
+
StatusList.displayName = "StatusList";
|
|
24885
|
+
|
|
24794
24886
|
// src/components/Slider/Slider.tsx
|
|
24795
24887
|
import {
|
|
24796
24888
|
forwardRef as forwardRef94,
|
|
24797
24889
|
useId as useId51
|
|
24798
24890
|
} from "react";
|
|
24799
|
-
import { jsx as
|
|
24891
|
+
import { jsx as jsx113, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
24800
24892
|
var Slider = forwardRef94(function Slider2({
|
|
24801
24893
|
label,
|
|
24802
24894
|
value,
|
|
@@ -24830,7 +24922,7 @@ var Slider = forwardRef94(function Slider2({
|
|
|
24830
24922
|
const valueText = String(display);
|
|
24831
24923
|
const handle = (e) => onChange?.(Number(e.target.value));
|
|
24832
24924
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
24833
|
-
return /* @__PURE__ */
|
|
24925
|
+
return /* @__PURE__ */ jsxs108(
|
|
24834
24926
|
"div",
|
|
24835
24927
|
{
|
|
24836
24928
|
className: cn(
|
|
@@ -24842,8 +24934,8 @@ var Slider = forwardRef94(function Slider2({
|
|
|
24842
24934
|
className
|
|
24843
24935
|
),
|
|
24844
24936
|
children: [
|
|
24845
|
-
(label || showValue) && /* @__PURE__ */
|
|
24846
|
-
label && /* @__PURE__ */
|
|
24937
|
+
(label || showValue) && /* @__PURE__ */ jsxs108("div", { className: "ods-slider__head", children: [
|
|
24938
|
+
label && /* @__PURE__ */ jsx113(
|
|
24847
24939
|
"label",
|
|
24848
24940
|
{
|
|
24849
24941
|
id: labelId,
|
|
@@ -24852,17 +24944,17 @@ var Slider = forwardRef94(function Slider2({
|
|
|
24852
24944
|
children: label
|
|
24853
24945
|
}
|
|
24854
24946
|
),
|
|
24855
|
-
showValue && /* @__PURE__ */
|
|
24947
|
+
showValue && /* @__PURE__ */ jsx113("span", { className: "ods-slider__value", "aria-hidden": "true", children: display })
|
|
24856
24948
|
] }),
|
|
24857
|
-
/* @__PURE__ */
|
|
24858
|
-
/* @__PURE__ */
|
|
24949
|
+
/* @__PURE__ */ jsxs108("div", { className: "ods-slider__track", children: [
|
|
24950
|
+
/* @__PURE__ */ jsx113(
|
|
24859
24951
|
"span",
|
|
24860
24952
|
{
|
|
24861
24953
|
className: "ods-slider__fill",
|
|
24862
24954
|
style: { width: `${pct}%` }
|
|
24863
24955
|
}
|
|
24864
24956
|
),
|
|
24865
|
-
/* @__PURE__ */
|
|
24957
|
+
/* @__PURE__ */ jsx113(
|
|
24866
24958
|
"input",
|
|
24867
24959
|
{
|
|
24868
24960
|
...rest,
|
|
@@ -24886,22 +24978,22 @@ var Slider = forwardRef94(function Slider2({
|
|
|
24886
24978
|
] }),
|
|
24887
24979
|
marks && marks.length > 0 && // Marks are decorative — aria-hidden so the screen reader hears
|
|
24888
24980
|
// the formatted value, not "tick mark, tick mark, …".
|
|
24889
|
-
/* @__PURE__ */
|
|
24981
|
+
/* @__PURE__ */ jsx113("div", { className: "ods-slider__marks", "aria-hidden": "true", children: marks.map((m) => {
|
|
24890
24982
|
const left = (m.value - min) / span * 100;
|
|
24891
|
-
return /* @__PURE__ */
|
|
24983
|
+
return /* @__PURE__ */ jsxs108(
|
|
24892
24984
|
"div",
|
|
24893
24985
|
{
|
|
24894
24986
|
className: "ods-slider__mark",
|
|
24895
24987
|
style: { left: `${left}%` },
|
|
24896
24988
|
children: [
|
|
24897
|
-
/* @__PURE__ */
|
|
24898
|
-
m.label && /* @__PURE__ */
|
|
24989
|
+
/* @__PURE__ */ jsx113("span", { className: "ods-slider__mark-tick" }),
|
|
24990
|
+
m.label && /* @__PURE__ */ jsx113("span", { className: "ods-slider__mark-label", children: m.label })
|
|
24899
24991
|
]
|
|
24900
24992
|
},
|
|
24901
24993
|
m.value
|
|
24902
24994
|
);
|
|
24903
24995
|
}) }),
|
|
24904
|
-
error ? /* @__PURE__ */
|
|
24996
|
+
error ? /* @__PURE__ */ jsx113(
|
|
24905
24997
|
"div",
|
|
24906
24998
|
{
|
|
24907
24999
|
id: hintId,
|
|
@@ -24909,7 +25001,7 @@ var Slider = forwardRef94(function Slider2({
|
|
|
24909
25001
|
role: "alert",
|
|
24910
25002
|
children: error
|
|
24911
25003
|
}
|
|
24912
|
-
) : helperText ? /* @__PURE__ */
|
|
25004
|
+
) : helperText ? /* @__PURE__ */ jsx113("div", { id: hintId, className: "ods-slider__hint", children: helperText }) : null
|
|
24913
25005
|
]
|
|
24914
25006
|
}
|
|
24915
25007
|
);
|
|
@@ -24921,7 +25013,7 @@ import { LogoGithubIcon, LogoLinkedinIcon, LogoXIcon } from "@octaviaflow/icons"
|
|
|
24921
25013
|
import {
|
|
24922
25014
|
forwardRef as forwardRef95
|
|
24923
25015
|
} from "react";
|
|
24924
|
-
import { jsx as
|
|
25016
|
+
import { jsx as jsx114, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
24925
25017
|
var DEFAULT_LABELS = {
|
|
24926
25018
|
google: "Continue with Google",
|
|
24927
25019
|
github: "Continue with GitHub",
|
|
@@ -24931,29 +25023,29 @@ var DEFAULT_LABELS = {
|
|
|
24931
25023
|
microsoft: "Continue with Microsoft",
|
|
24932
25024
|
linkedin: "Continue with LinkedIn"
|
|
24933
25025
|
};
|
|
24934
|
-
var GoogleIcon = () => /* @__PURE__ */
|
|
24935
|
-
/* @__PURE__ */
|
|
25026
|
+
var GoogleIcon = () => /* @__PURE__ */ jsxs109("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
25027
|
+
/* @__PURE__ */ jsx114(
|
|
24936
25028
|
"path",
|
|
24937
25029
|
{
|
|
24938
25030
|
d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.79 2.72v2.26h2.9c1.69-1.56 2.69-3.85 2.69-6.62z",
|
|
24939
25031
|
fill: "#4285F4"
|
|
24940
25032
|
}
|
|
24941
25033
|
),
|
|
24942
|
-
/* @__PURE__ */
|
|
25034
|
+
/* @__PURE__ */ jsx114(
|
|
24943
25035
|
"path",
|
|
24944
25036
|
{
|
|
24945
25037
|
d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.84.86-3.06.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z",
|
|
24946
25038
|
fill: "#34A853"
|
|
24947
25039
|
}
|
|
24948
25040
|
),
|
|
24949
|
-
/* @__PURE__ */
|
|
25041
|
+
/* @__PURE__ */ jsx114(
|
|
24950
25042
|
"path",
|
|
24951
25043
|
{
|
|
24952
25044
|
d: "M3.96 10.71A5.38 5.38 0 0 1 3.68 9c0-.6.1-1.18.28-1.71V4.96H.96A9 9 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3-2.33z",
|
|
24953
25045
|
fill: "#FBBC05"
|
|
24954
25046
|
}
|
|
24955
25047
|
),
|
|
24956
|
-
/* @__PURE__ */
|
|
25048
|
+
/* @__PURE__ */ jsx114(
|
|
24957
25049
|
"path",
|
|
24958
25050
|
{
|
|
24959
25051
|
d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58A9 9 0 0 0 9 0 9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z",
|
|
@@ -24961,34 +25053,34 @@ var GoogleIcon = () => /* @__PURE__ */ jsxs108("svg", { width: "18", height: "18
|
|
|
24961
25053
|
}
|
|
24962
25054
|
)
|
|
24963
25055
|
] });
|
|
24964
|
-
var AppleIcon = () => /* @__PURE__ */
|
|
25056
|
+
var AppleIcon = () => /* @__PURE__ */ jsx114("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx114(
|
|
24965
25057
|
"path",
|
|
24966
25058
|
{
|
|
24967
25059
|
d: "M13.4 9.5c0-1.7 1.4-2.5 1.5-2.6-.8-1.2-2.1-1.3-2.5-1.3-1.1-.1-2.1.6-2.6.6-.6 0-1.4-.6-2.3-.6-1.2 0-2.3.7-2.9 1.8-1.2 2.1-.3 5.3.9 7 .6.9 1.3 1.8 2.2 1.8.9 0 1.2-.6 2.3-.6s1.4.6 2.3.6 1.5-.9 2.1-1.8c.7-1 1-2 1-2.1 0 0-1.9-.7-2-2.8zM11.5 4.5c.5-.6.8-1.4.7-2.2-.7 0-1.5.5-2 1.1-.4.5-.8 1.3-.7 2.1.8.1 1.6-.4 2-1z",
|
|
24968
25060
|
fill: "currentColor"
|
|
24969
25061
|
}
|
|
24970
25062
|
) });
|
|
24971
|
-
var MicrosoftIcon = () => /* @__PURE__ */
|
|
24972
|
-
/* @__PURE__ */
|
|
24973
|
-
/* @__PURE__ */
|
|
24974
|
-
/* @__PURE__ */
|
|
24975
|
-
/* @__PURE__ */
|
|
25063
|
+
var MicrosoftIcon = () => /* @__PURE__ */ jsxs109("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
25064
|
+
/* @__PURE__ */ jsx114("rect", { x: "1", y: "1", width: "7.5", height: "7.5", fill: "#F25022" }),
|
|
25065
|
+
/* @__PURE__ */ jsx114("rect", { x: "9.5", y: "1", width: "7.5", height: "7.5", fill: "#7FBA00" }),
|
|
25066
|
+
/* @__PURE__ */ jsx114("rect", { x: "1", y: "9.5", width: "7.5", height: "7.5", fill: "#00A4EF" }),
|
|
25067
|
+
/* @__PURE__ */ jsx114("rect", { x: "9.5", y: "9.5", width: "7.5", height: "7.5", fill: "#FFB900" })
|
|
24976
25068
|
] });
|
|
24977
25069
|
function resolveIcon2(provider) {
|
|
24978
25070
|
switch (provider) {
|
|
24979
25071
|
case "google":
|
|
24980
|
-
return /* @__PURE__ */
|
|
25072
|
+
return /* @__PURE__ */ jsx114(GoogleIcon, {});
|
|
24981
25073
|
case "apple":
|
|
24982
|
-
return /* @__PURE__ */
|
|
25074
|
+
return /* @__PURE__ */ jsx114(AppleIcon, {});
|
|
24983
25075
|
case "microsoft":
|
|
24984
|
-
return /* @__PURE__ */
|
|
25076
|
+
return /* @__PURE__ */ jsx114(MicrosoftIcon, {});
|
|
24985
25077
|
case "github":
|
|
24986
|
-
return /* @__PURE__ */
|
|
25078
|
+
return /* @__PURE__ */ jsx114(LogoGithubIcon, { size: "sm" });
|
|
24987
25079
|
case "x":
|
|
24988
25080
|
case "twitter":
|
|
24989
|
-
return /* @__PURE__ */
|
|
25081
|
+
return /* @__PURE__ */ jsx114(LogoXIcon, { size: "sm" });
|
|
24990
25082
|
case "linkedin":
|
|
24991
|
-
return /* @__PURE__ */
|
|
25083
|
+
return /* @__PURE__ */ jsx114(LogoLinkedinIcon, { size: "sm" });
|
|
24992
25084
|
case "custom":
|
|
24993
25085
|
return null;
|
|
24994
25086
|
}
|
|
@@ -25010,7 +25102,7 @@ var SocialButton = forwardRef95(
|
|
|
25010
25102
|
const resolvedIcon = icon ?? resolveIcon2(provider);
|
|
25011
25103
|
const resolvedLabel = label ?? children ?? (provider !== "custom" ? DEFAULT_LABELS[provider] : null);
|
|
25012
25104
|
const providerClass = provider === "twitter" ? "x" : provider;
|
|
25013
|
-
return /* @__PURE__ */
|
|
25105
|
+
return /* @__PURE__ */ jsx114(
|
|
25014
25106
|
Button,
|
|
25015
25107
|
{
|
|
25016
25108
|
...rest,
|
|
@@ -25044,7 +25136,7 @@ import {
|
|
|
25044
25136
|
useState as useState52
|
|
25045
25137
|
} from "react";
|
|
25046
25138
|
import { DraggableIcon } from "@octaviaflow/icons";
|
|
25047
|
-
import { jsx as
|
|
25139
|
+
import { jsx as jsx115, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
25048
25140
|
var DT_TYPE = "application/x-ods-sortable";
|
|
25049
25141
|
function Sortable({
|
|
25050
25142
|
items,
|
|
@@ -25224,7 +25316,7 @@ function Sortable({
|
|
|
25224
25316
|
if (e.key === "ArrowRight") return moveBy(1);
|
|
25225
25317
|
}
|
|
25226
25318
|
};
|
|
25227
|
-
return /* @__PURE__ */
|
|
25319
|
+
return /* @__PURE__ */ jsxs110(
|
|
25228
25320
|
"div",
|
|
25229
25321
|
{
|
|
25230
25322
|
...rest,
|
|
@@ -25261,7 +25353,7 @@ function Sortable({
|
|
|
25261
25353
|
isDragging,
|
|
25262
25354
|
isKeyboardActive: isKbActive
|
|
25263
25355
|
};
|
|
25264
|
-
return /* @__PURE__ */
|
|
25356
|
+
return /* @__PURE__ */ jsxs110(
|
|
25265
25357
|
"div",
|
|
25266
25358
|
{
|
|
25267
25359
|
ref: (el) => {
|
|
@@ -25277,7 +25369,7 @@ function Sortable({
|
|
|
25277
25369
|
),
|
|
25278
25370
|
onDragOver: onItemDragOver(item.id),
|
|
25279
25371
|
children: [
|
|
25280
|
-
/* @__PURE__ */
|
|
25372
|
+
/* @__PURE__ */ jsx115(
|
|
25281
25373
|
"span",
|
|
25282
25374
|
{
|
|
25283
25375
|
className: "ods-sortable__indicator ods-sortable__indicator--before",
|
|
@@ -25285,7 +25377,7 @@ function Sortable({
|
|
|
25285
25377
|
}
|
|
25286
25378
|
),
|
|
25287
25379
|
renderItem(item, idx, dragProps),
|
|
25288
|
-
/* @__PURE__ */
|
|
25380
|
+
/* @__PURE__ */ jsx115(
|
|
25289
25381
|
"span",
|
|
25290
25382
|
{
|
|
25291
25383
|
className: "ods-sortable__indicator ods-sortable__indicator--after",
|
|
@@ -25297,7 +25389,7 @@ function Sortable({
|
|
|
25297
25389
|
item.id
|
|
25298
25390
|
);
|
|
25299
25391
|
}),
|
|
25300
|
-
/* @__PURE__ */
|
|
25392
|
+
/* @__PURE__ */ jsx115("span", { className: "ods-sortable__sr", "aria-live": "polite", "aria-atomic": "true", children: kbActiveId ? `Item picked up. Use arrow keys to reorder, Space or Enter to drop, Escape to cancel.` : "" })
|
|
25301
25393
|
]
|
|
25302
25394
|
}
|
|
25303
25395
|
);
|
|
@@ -25310,7 +25402,7 @@ var DragHandle = forwardRef96(
|
|
|
25310
25402
|
ariaLabel: legacyAriaLabel,
|
|
25311
25403
|
dragProps
|
|
25312
25404
|
}, ref) {
|
|
25313
|
-
return /* @__PURE__ */
|
|
25405
|
+
return /* @__PURE__ */ jsx115(
|
|
25314
25406
|
"span",
|
|
25315
25407
|
{
|
|
25316
25408
|
ref,
|
|
@@ -25319,7 +25411,7 @@ var DragHandle = forwardRef96(
|
|
|
25319
25411
|
className: cn("ods-sortable-handle", className),
|
|
25320
25412
|
style,
|
|
25321
25413
|
...dragProps,
|
|
25322
|
-
children: /* @__PURE__ */
|
|
25414
|
+
children: /* @__PURE__ */ jsx115(DraggableIcon, { size: "xs" })
|
|
25323
25415
|
}
|
|
25324
25416
|
);
|
|
25325
25417
|
}
|
|
@@ -25330,9 +25422,9 @@ DragHandle.displayName = "DragHandle";
|
|
|
25330
25422
|
import {
|
|
25331
25423
|
Children as Children3,
|
|
25332
25424
|
forwardRef as forwardRef97,
|
|
25333
|
-
Fragment as
|
|
25425
|
+
Fragment as Fragment43
|
|
25334
25426
|
} from "react";
|
|
25335
|
-
import { jsx as
|
|
25427
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
25336
25428
|
function resolveGap2(gap) {
|
|
25337
25429
|
if (typeof gap === "string") return gap;
|
|
25338
25430
|
if (gap === 0) return "0";
|
|
@@ -25371,11 +25463,11 @@ var Stack = forwardRef97(function Stack2({
|
|
|
25371
25463
|
const Component = as ?? "div";
|
|
25372
25464
|
const items = divider ? Children3.toArray(children).flatMap(
|
|
25373
25465
|
(child, i, arr) => i < arr.length - 1 ? [
|
|
25374
|
-
/* @__PURE__ */
|
|
25375
|
-
/* @__PURE__ */
|
|
25376
|
-
] : [/* @__PURE__ */
|
|
25466
|
+
/* @__PURE__ */ jsx116(Fragment43, { children: child }, `item-${i}`),
|
|
25467
|
+
/* @__PURE__ */ jsx116(Fragment43, { children: divider }, `divider-${i}`)
|
|
25468
|
+
] : [/* @__PURE__ */ jsx116(Fragment43, { children: child }, `item-${i}`)]
|
|
25377
25469
|
) : children;
|
|
25378
|
-
return /* @__PURE__ */
|
|
25470
|
+
return /* @__PURE__ */ jsx116(
|
|
25379
25471
|
Component,
|
|
25380
25472
|
{
|
|
25381
25473
|
...rest,
|
|
@@ -25403,13 +25495,13 @@ var Stack = forwardRef97(function Stack2({
|
|
|
25403
25495
|
Stack.displayName = "Stack";
|
|
25404
25496
|
var HStack = forwardRef97(
|
|
25405
25497
|
function HStack2(props, ref) {
|
|
25406
|
-
return /* @__PURE__ */
|
|
25498
|
+
return /* @__PURE__ */ jsx116(Stack, { ref, direction: "row", ...props });
|
|
25407
25499
|
}
|
|
25408
25500
|
);
|
|
25409
25501
|
HStack.displayName = "HStack";
|
|
25410
25502
|
var VStack = forwardRef97(
|
|
25411
25503
|
function VStack2(props, ref) {
|
|
25412
|
-
return /* @__PURE__ */
|
|
25504
|
+
return /* @__PURE__ */ jsx116(Stack, { ref, direction: "column", ...props });
|
|
25413
25505
|
}
|
|
25414
25506
|
);
|
|
25415
25507
|
VStack.displayName = "VStack";
|
|
@@ -25425,7 +25517,7 @@ import {
|
|
|
25425
25517
|
useState as useState53
|
|
25426
25518
|
} from "react";
|
|
25427
25519
|
import { createPortal as createPortal16 } from "react-dom";
|
|
25428
|
-
import { jsx as
|
|
25520
|
+
import { jsx as jsx117, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
25429
25521
|
var Spotlight = forwardRef98(
|
|
25430
25522
|
function Spotlight2({
|
|
25431
25523
|
open,
|
|
@@ -25492,7 +25584,7 @@ var Spotlight = forwardRef98(
|
|
|
25492
25584
|
height: rect.height + padding * 2
|
|
25493
25585
|
} : null;
|
|
25494
25586
|
return createPortal16(
|
|
25495
|
-
/* @__PURE__ */
|
|
25587
|
+
/* @__PURE__ */ jsx117(AnimatePresence20, { children: open && /* @__PURE__ */ jsxs111(
|
|
25496
25588
|
motion30.div,
|
|
25497
25589
|
{
|
|
25498
25590
|
...rest,
|
|
@@ -25504,7 +25596,7 @@ var Spotlight = forwardRef98(
|
|
|
25504
25596
|
exit: disableAnimation || reducedMotion ? void 0 : { opacity: 0 },
|
|
25505
25597
|
transition: { duration: 0.18 },
|
|
25506
25598
|
children: [
|
|
25507
|
-
/* @__PURE__ */
|
|
25599
|
+
/* @__PURE__ */ jsxs111(
|
|
25508
25600
|
"svg",
|
|
25509
25601
|
{
|
|
25510
25602
|
className: cn(
|
|
@@ -25518,8 +25610,8 @@ var Spotlight = forwardRef98(
|
|
|
25518
25610
|
"aria-hidden": "true",
|
|
25519
25611
|
onClick: onDismiss,
|
|
25520
25612
|
children: [
|
|
25521
|
-
/* @__PURE__ */
|
|
25522
|
-
/* @__PURE__ */
|
|
25613
|
+
/* @__PURE__ */ jsx117("defs", { children: /* @__PURE__ */ jsxs111("mask", { id: maskId, children: [
|
|
25614
|
+
/* @__PURE__ */ jsx117(
|
|
25523
25615
|
"rect",
|
|
25524
25616
|
{
|
|
25525
25617
|
x: 0,
|
|
@@ -25529,7 +25621,7 @@ var Spotlight = forwardRef98(
|
|
|
25529
25621
|
fill: "white"
|
|
25530
25622
|
}
|
|
25531
25623
|
),
|
|
25532
|
-
cutout && shape === "rect" && /* @__PURE__ */
|
|
25624
|
+
cutout && shape === "rect" && /* @__PURE__ */ jsx117(
|
|
25533
25625
|
"rect",
|
|
25534
25626
|
{
|
|
25535
25627
|
x: cutout.x,
|
|
@@ -25541,7 +25633,7 @@ var Spotlight = forwardRef98(
|
|
|
25541
25633
|
fill: "black"
|
|
25542
25634
|
}
|
|
25543
25635
|
),
|
|
25544
|
-
cutout && shape === "circle" && /* @__PURE__ */
|
|
25636
|
+
cutout && shape === "circle" && /* @__PURE__ */ jsx117(
|
|
25545
25637
|
"ellipse",
|
|
25546
25638
|
{
|
|
25547
25639
|
cx: cutout.x + cutout.width / 2,
|
|
@@ -25552,7 +25644,7 @@ var Spotlight = forwardRef98(
|
|
|
25552
25644
|
}
|
|
25553
25645
|
)
|
|
25554
25646
|
] }) }),
|
|
25555
|
-
/* @__PURE__ */
|
|
25647
|
+
/* @__PURE__ */ jsx117(
|
|
25556
25648
|
"rect",
|
|
25557
25649
|
{
|
|
25558
25650
|
x: 0,
|
|
@@ -25566,7 +25658,7 @@ var Spotlight = forwardRef98(
|
|
|
25566
25658
|
]
|
|
25567
25659
|
}
|
|
25568
25660
|
),
|
|
25569
|
-
children && /* @__PURE__ */
|
|
25661
|
+
children && /* @__PURE__ */ jsx117("div", { className: "ods-spotlight__content", children })
|
|
25570
25662
|
]
|
|
25571
25663
|
}
|
|
25572
25664
|
) }),
|
|
@@ -25581,7 +25673,7 @@ import {
|
|
|
25581
25673
|
forwardRef as forwardRef99
|
|
25582
25674
|
} from "react";
|
|
25583
25675
|
import { ArrowDownIcon as ArrowDownIcon2, ArrowUpIcon as ArrowUpIcon2, SubtractIcon as SubtractIcon3 } from "@octaviaflow/icons";
|
|
25584
|
-
import { jsx as
|
|
25676
|
+
import { jsx as jsx118, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
25585
25677
|
var Stat = forwardRef99(function Stat2({
|
|
25586
25678
|
label,
|
|
25587
25679
|
value,
|
|
@@ -25595,23 +25687,23 @@ var Stat = forwardRef99(function Stat2({
|
|
|
25595
25687
|
...rest
|
|
25596
25688
|
}, ref) {
|
|
25597
25689
|
const TrendIcon = deltaTrend === "up" ? ArrowUpIcon2 : deltaTrend === "down" ? ArrowDownIcon2 : SubtractIcon3;
|
|
25598
|
-
return /* @__PURE__ */
|
|
25690
|
+
return /* @__PURE__ */ jsxs112(
|
|
25599
25691
|
"div",
|
|
25600
25692
|
{
|
|
25601
25693
|
...rest,
|
|
25602
25694
|
ref,
|
|
25603
25695
|
className: cn("ods-stat", `ods-stat--${size}`, className),
|
|
25604
25696
|
children: [
|
|
25605
|
-
/* @__PURE__ */
|
|
25606
|
-
/* @__PURE__ */
|
|
25607
|
-
icon && /* @__PURE__ */
|
|
25697
|
+
/* @__PURE__ */ jsxs112("div", { className: "ods-stat__head", children: [
|
|
25698
|
+
/* @__PURE__ */ jsx118("div", { className: "ods-stat__label", children: label }),
|
|
25699
|
+
icon && /* @__PURE__ */ jsx118("span", { className: "ods-stat__icon", "aria-hidden": "true", children: icon })
|
|
25608
25700
|
] }),
|
|
25609
|
-
/* @__PURE__ */
|
|
25610
|
-
description && /* @__PURE__ */
|
|
25611
|
-
delta && /* @__PURE__ */
|
|
25612
|
-
/* @__PURE__ */
|
|
25613
|
-
/* @__PURE__ */
|
|
25614
|
-
deltaSuffix && /* @__PURE__ */
|
|
25701
|
+
/* @__PURE__ */ jsx118("div", { className: "ods-stat__value", children: value }),
|
|
25702
|
+
description && /* @__PURE__ */ jsx118("div", { className: "ods-stat__description", children: description }),
|
|
25703
|
+
delta && /* @__PURE__ */ jsxs112("div", { className: cn("ods-stat__delta", `ods-stat__delta--${deltaTrend}`), children: [
|
|
25704
|
+
/* @__PURE__ */ jsx118("span", { className: "ods-stat__delta-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsx118(TrendIcon, { size: "xs" }) }),
|
|
25705
|
+
/* @__PURE__ */ jsx118("span", { className: "ods-stat__delta-value", children: delta }),
|
|
25706
|
+
deltaSuffix && /* @__PURE__ */ jsx118("span", { className: "ods-stat__delta-suffix", children: deltaSuffix })
|
|
25615
25707
|
] })
|
|
25616
25708
|
]
|
|
25617
25709
|
}
|
|
@@ -25628,7 +25720,7 @@ import {
|
|
|
25628
25720
|
useMemo as useMemo26,
|
|
25629
25721
|
useState as useState54
|
|
25630
25722
|
} from "react";
|
|
25631
|
-
import { jsx as
|
|
25723
|
+
import { jsx as jsx119, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
25632
25724
|
var STATUS_COLORS = {
|
|
25633
25725
|
success: "var(--ods-status-success)",
|
|
25634
25726
|
failed: "var(--ods-status-failed)",
|
|
@@ -25700,7 +25792,7 @@ var StatusTiles = forwardRef100(
|
|
|
25700
25792
|
return `${t} \u2014 ${visible.length} runs (${summaryText})`;
|
|
25701
25793
|
}, [ariaLabel, title, visible]);
|
|
25702
25794
|
const interactive = Boolean(onTileHover || onTileClick);
|
|
25703
|
-
return /* @__PURE__ */
|
|
25795
|
+
return /* @__PURE__ */ jsxs113(
|
|
25704
25796
|
"div",
|
|
25705
25797
|
{
|
|
25706
25798
|
...rest,
|
|
@@ -25709,14 +25801,14 @@ var StatusTiles = forwardRef100(
|
|
|
25709
25801
|
role: "group",
|
|
25710
25802
|
"aria-label": resolvedAriaLabel,
|
|
25711
25803
|
children: [
|
|
25712
|
-
(title || summary) && /* @__PURE__ */
|
|
25713
|
-
title && /* @__PURE__ */
|
|
25714
|
-
summary && /* @__PURE__ */
|
|
25804
|
+
(title || summary) && /* @__PURE__ */ jsxs113("div", { className: "ods-status-tiles__head", children: [
|
|
25805
|
+
title && /* @__PURE__ */ jsx119("span", { className: "ods-status-tiles__title", children: title }),
|
|
25806
|
+
summary && /* @__PURE__ */ jsx119("span", { className: "ods-status-tiles__summary", children: summary })
|
|
25715
25807
|
] }),
|
|
25716
|
-
/* @__PURE__ */
|
|
25808
|
+
/* @__PURE__ */ jsx119("div", { className: "ods-status-tiles__row", style: { gap }, children: visible.map((tile, i) => {
|
|
25717
25809
|
const fill = tile.color ?? STATUS_COLORS[tile.status];
|
|
25718
25810
|
const tooltipText = tile.label !== void 0 ? typeof tile.label === "string" ? tile.label : void 0 : STATUS_TEXT[tile.status];
|
|
25719
|
-
return /* @__PURE__ */
|
|
25811
|
+
return /* @__PURE__ */ jsx119(
|
|
25720
25812
|
motion31.button,
|
|
25721
25813
|
{
|
|
25722
25814
|
type: "button",
|
|
@@ -25768,7 +25860,7 @@ import {
|
|
|
25768
25860
|
forwardRef as forwardRef101,
|
|
25769
25861
|
useId as useId53
|
|
25770
25862
|
} from "react";
|
|
25771
|
-
import { jsx as
|
|
25863
|
+
import { jsx as jsx120, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
25772
25864
|
function deriveStatus(step, index, active) {
|
|
25773
25865
|
if (step.status) return step.status;
|
|
25774
25866
|
if (index < active) return "complete";
|
|
@@ -25836,7 +25928,7 @@ var Stepper = forwardRef101(
|
|
|
25836
25928
|
e.preventDefault();
|
|
25837
25929
|
goTo(i);
|
|
25838
25930
|
};
|
|
25839
|
-
return /* @__PURE__ */
|
|
25931
|
+
return /* @__PURE__ */ jsx120(
|
|
25840
25932
|
"ol",
|
|
25841
25933
|
{
|
|
25842
25934
|
...rest,
|
|
@@ -25855,13 +25947,13 @@ var Stepper = forwardRef101(
|
|
|
25855
25947
|
const status = deriveStatus(step, i, activeIndex);
|
|
25856
25948
|
const isLast = i === steps.length - 1;
|
|
25857
25949
|
const segmentCompleted = showProgressTrail && i < activeIndex && status !== "error";
|
|
25858
|
-
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */
|
|
25859
|
-
const labelText = /* @__PURE__ */
|
|
25860
|
-
/* @__PURE__ */
|
|
25861
|
-
step.optional && /* @__PURE__ */
|
|
25862
|
-
step.description && /* @__PURE__ */
|
|
25950
|
+
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */ jsx120(CheckmarkIcon11, { size: "sm", "aria-hidden": true }) : status === "error" ? /* @__PURE__ */ jsx120(ErrorIcon2, { size: "sm", "aria-hidden": true }) : /* @__PURE__ */ jsx120("span", { className: "ods-stepper__indicator-num", children: i + 1 }));
|
|
25951
|
+
const labelText = /* @__PURE__ */ jsxs114("span", { className: "ods-stepper__label-text", children: [
|
|
25952
|
+
/* @__PURE__ */ jsx120("span", { className: "ods-stepper__label-title", children: step.label }),
|
|
25953
|
+
step.optional && /* @__PURE__ */ jsx120("span", { className: "ods-stepper__label-optional", children: "Optional" }),
|
|
25954
|
+
step.description && /* @__PURE__ */ jsx120("span", { className: "ods-stepper__label-desc", children: step.description })
|
|
25863
25955
|
] });
|
|
25864
|
-
const stepInner = isInteractive ? /* @__PURE__ */
|
|
25956
|
+
const stepInner = isInteractive ? /* @__PURE__ */ jsxs114(
|
|
25865
25957
|
"button",
|
|
25866
25958
|
{
|
|
25867
25959
|
type: "button",
|
|
@@ -25873,7 +25965,7 @@ var Stepper = forwardRef101(
|
|
|
25873
25965
|
onClick: handleClick(i),
|
|
25874
25966
|
onKeyDown: (e) => handleKeyDown(e, i),
|
|
25875
25967
|
children: [
|
|
25876
|
-
/* @__PURE__ */
|
|
25968
|
+
/* @__PURE__ */ jsx120(
|
|
25877
25969
|
"span",
|
|
25878
25970
|
{
|
|
25879
25971
|
className: cn(
|
|
@@ -25887,13 +25979,13 @@ var Stepper = forwardRef101(
|
|
|
25887
25979
|
labelText
|
|
25888
25980
|
]
|
|
25889
25981
|
}
|
|
25890
|
-
) : /* @__PURE__ */
|
|
25982
|
+
) : /* @__PURE__ */ jsxs114(
|
|
25891
25983
|
"span",
|
|
25892
25984
|
{
|
|
25893
25985
|
className: "ods-stepper__step-static",
|
|
25894
25986
|
"aria-current": status === "active" ? "step" : void 0,
|
|
25895
25987
|
children: [
|
|
25896
|
-
/* @__PURE__ */
|
|
25988
|
+
/* @__PURE__ */ jsx120(
|
|
25897
25989
|
"span",
|
|
25898
25990
|
{
|
|
25899
25991
|
className: cn(
|
|
@@ -25908,7 +26000,7 @@ var Stepper = forwardRef101(
|
|
|
25908
26000
|
]
|
|
25909
26001
|
}
|
|
25910
26002
|
);
|
|
25911
|
-
return /* @__PURE__ */
|
|
26003
|
+
return /* @__PURE__ */ jsxs114(
|
|
25912
26004
|
"li",
|
|
25913
26005
|
{
|
|
25914
26006
|
className: cn(
|
|
@@ -25918,7 +26010,7 @@ var Stepper = forwardRef101(
|
|
|
25918
26010
|
),
|
|
25919
26011
|
children: [
|
|
25920
26012
|
stepInner,
|
|
25921
|
-
!isLast && /* @__PURE__ */
|
|
26013
|
+
!isLast && /* @__PURE__ */ jsx120(
|
|
25922
26014
|
"span",
|
|
25923
26015
|
{
|
|
25924
26016
|
className: cn(
|
|
@@ -25948,7 +26040,7 @@ import {
|
|
|
25948
26040
|
useMemo as useMemo27,
|
|
25949
26041
|
useState as useState55
|
|
25950
26042
|
} from "react";
|
|
25951
|
-
import { jsx as
|
|
26043
|
+
import { jsx as jsx121, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
25952
26044
|
var defaultFormat7 = (n) => {
|
|
25953
26045
|
if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
25954
26046
|
if (Math.abs(n) >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
|
|
@@ -26172,7 +26264,7 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26172
26264
|
const t = typeof title === "string" ? title : "Sankey";
|
|
26173
26265
|
return `${t} \u2014 ${nodes.length} nodes, ${links.length} flows`;
|
|
26174
26266
|
}, [ariaLabel, title, nodes.length, links.length]);
|
|
26175
|
-
return /* @__PURE__ */
|
|
26267
|
+
return /* @__PURE__ */ jsxs115(
|
|
26176
26268
|
"div",
|
|
26177
26269
|
{
|
|
26178
26270
|
...rest,
|
|
@@ -26181,11 +26273,11 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26181
26273
|
role: "group",
|
|
26182
26274
|
"aria-label": resolvedAriaLabel,
|
|
26183
26275
|
children: [
|
|
26184
|
-
(title || total) && /* @__PURE__ */
|
|
26185
|
-
title && /* @__PURE__ */
|
|
26186
|
-
total && /* @__PURE__ */
|
|
26276
|
+
(title || total) && /* @__PURE__ */ jsxs115("div", { className: "ods-sankey__head", children: [
|
|
26277
|
+
title && /* @__PURE__ */ jsx121("div", { className: "ods-sankey__title", children: title }),
|
|
26278
|
+
total && /* @__PURE__ */ jsx121("div", { className: "ods-sankey__total", children: total })
|
|
26187
26279
|
] }),
|
|
26188
|
-
/* @__PURE__ */
|
|
26280
|
+
/* @__PURE__ */ jsx121("div", { className: "ods-sankey__plot", style: { width, height }, children: /* @__PURE__ */ jsxs115(
|
|
26189
26281
|
"svg",
|
|
26190
26282
|
{
|
|
26191
26283
|
className: "ods-sankey__svg",
|
|
@@ -26195,7 +26287,7 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26195
26287
|
layoutLinks.map((l) => {
|
|
26196
26288
|
const color = l.color ?? linkColor ?? l.sourceNode.color ?? nodeColor;
|
|
26197
26289
|
const active = hoveredLink === l || hoveredNode?.id === l.source || hoveredNode?.id === l.target;
|
|
26198
|
-
return /* @__PURE__ */
|
|
26290
|
+
return /* @__PURE__ */ jsx121(
|
|
26199
26291
|
motion32.path,
|
|
26200
26292
|
{
|
|
26201
26293
|
d: l.path,
|
|
@@ -26223,7 +26315,7 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26223
26315
|
duration: 0.6,
|
|
26224
26316
|
ease: [0.16, 1, 0.3, 1]
|
|
26225
26317
|
},
|
|
26226
|
-
children: /* @__PURE__ */
|
|
26318
|
+
children: /* @__PURE__ */ jsx121("title", { children: `${l.sourceNode.label} \u2192 ${l.targetNode.label}: ${formatValue(l.value)}` })
|
|
26227
26319
|
},
|
|
26228
26320
|
`${reactId}-link-${l.source}-${l.target}`
|
|
26229
26321
|
);
|
|
@@ -26234,7 +26326,7 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26234
26326
|
const isFirst = n.column === 0;
|
|
26235
26327
|
const isLast = n.column === columnCount - 1;
|
|
26236
26328
|
const active = hoveredNode === n;
|
|
26237
|
-
return /* @__PURE__ */
|
|
26329
|
+
return /* @__PURE__ */ jsxs115(
|
|
26238
26330
|
"g",
|
|
26239
26331
|
{
|
|
26240
26332
|
className: "ods-sankey__node-group",
|
|
@@ -26242,7 +26334,7 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26242
26334
|
onMouseLeave: () => fireNode(null),
|
|
26243
26335
|
onClick: onNodeClick ? () => onNodeClick(n) : void 0,
|
|
26244
26336
|
children: [
|
|
26245
|
-
/* @__PURE__ */
|
|
26337
|
+
/* @__PURE__ */ jsx121(
|
|
26246
26338
|
motion32.rect,
|
|
26247
26339
|
{
|
|
26248
26340
|
x: n.x,
|
|
@@ -26271,10 +26363,10 @@ var Sankey = forwardRef102(function Sankey2({
|
|
|
26271
26363
|
delay: disableAnimation ? 0 : 0.2 + n.column * 0.05,
|
|
26272
26364
|
ease: [0.16, 1, 0.3, 1]
|
|
26273
26365
|
},
|
|
26274
|
-
children: /* @__PURE__ */
|
|
26366
|
+
children: /* @__PURE__ */ jsx121("title", { children: `${n.label} \u2014 in ${formatValue(n.inFlow)} \xB7 out ${formatValue(n.outFlow)}` })
|
|
26275
26367
|
}
|
|
26276
26368
|
),
|
|
26277
|
-
/* @__PURE__ */
|
|
26369
|
+
/* @__PURE__ */ jsx121(
|
|
26278
26370
|
"text",
|
|
26279
26371
|
{
|
|
26280
26372
|
x: isFirst ? n.x - 6 : isLast ? n.x + nodeWidth + 6 : n.x + nodeWidth + 6,
|
|
@@ -26305,7 +26397,7 @@ import {
|
|
|
26305
26397
|
useRef as useRef47
|
|
26306
26398
|
} from "react";
|
|
26307
26399
|
import { useSwitch } from "react-aria";
|
|
26308
|
-
import { jsx as
|
|
26400
|
+
import { jsx as jsx122, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
26309
26401
|
var Switch = forwardRef103(function Switch2({
|
|
26310
26402
|
checked,
|
|
26311
26403
|
defaultChecked,
|
|
@@ -26354,7 +26446,7 @@ var Switch = forwardRef103(function Switch2({
|
|
|
26354
26446
|
onBlur: _onBlur,
|
|
26355
26447
|
...passthroughProps
|
|
26356
26448
|
} = props;
|
|
26357
|
-
return /* @__PURE__ */
|
|
26449
|
+
return /* @__PURE__ */ jsxs116(
|
|
26358
26450
|
"label",
|
|
26359
26451
|
{
|
|
26360
26452
|
className: cn(
|
|
@@ -26365,7 +26457,7 @@ var Switch = forwardRef103(function Switch2({
|
|
|
26365
26457
|
className
|
|
26366
26458
|
),
|
|
26367
26459
|
children: [
|
|
26368
|
-
/* @__PURE__ */
|
|
26460
|
+
/* @__PURE__ */ jsx122(
|
|
26369
26461
|
"input",
|
|
26370
26462
|
{
|
|
26371
26463
|
...passthroughProps,
|
|
@@ -26374,17 +26466,17 @@ var Switch = forwardRef103(function Switch2({
|
|
|
26374
26466
|
className: "ods-switch__input"
|
|
26375
26467
|
}
|
|
26376
26468
|
),
|
|
26377
|
-
/* @__PURE__ */
|
|
26469
|
+
/* @__PURE__ */ jsx122(
|
|
26378
26470
|
"div",
|
|
26379
26471
|
{
|
|
26380
26472
|
className: cn("ods-switch__track", isOn && "ods-switch__track--on"),
|
|
26381
26473
|
"aria-hidden": "true",
|
|
26382
|
-
children: /* @__PURE__ */
|
|
26474
|
+
children: /* @__PURE__ */ jsx122("div", { className: "ods-switch__thumb" })
|
|
26383
26475
|
}
|
|
26384
26476
|
),
|
|
26385
|
-
(label || description) && /* @__PURE__ */
|
|
26386
|
-
label && /* @__PURE__ */
|
|
26387
|
-
description && /* @__PURE__ */
|
|
26477
|
+
(label || description) && /* @__PURE__ */ jsxs116("div", { className: "ods-switch__text", children: [
|
|
26478
|
+
label && /* @__PURE__ */ jsx122("span", { className: "ods-switch__label", children: label }),
|
|
26479
|
+
description && /* @__PURE__ */ jsx122("span", { className: "ods-switch__description", children: description })
|
|
26388
26480
|
] })
|
|
26389
26481
|
]
|
|
26390
26482
|
}
|
|
@@ -26404,7 +26496,7 @@ import {
|
|
|
26404
26496
|
CaretSortIcon as CaretSortIcon2,
|
|
26405
26497
|
CaretUpIcon as CaretUpIcon2
|
|
26406
26498
|
} from "@octaviaflow/icons";
|
|
26407
|
-
import { Fragment as
|
|
26499
|
+
import { Fragment as Fragment44, jsx as jsx123, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
26408
26500
|
function TableInner({
|
|
26409
26501
|
columns,
|
|
26410
26502
|
data,
|
|
@@ -26455,7 +26547,7 @@ function TableInner({
|
|
|
26455
26547
|
[onSelectionChange, selectedRows]
|
|
26456
26548
|
);
|
|
26457
26549
|
const totalCols = columns.length + (selectable ? 1 : 0) + (expandable ? 1 : 0);
|
|
26458
|
-
return /* @__PURE__ */
|
|
26550
|
+
return /* @__PURE__ */ jsx123(
|
|
26459
26551
|
"div",
|
|
26460
26552
|
{
|
|
26461
26553
|
...rest,
|
|
@@ -26463,9 +26555,9 @@ function TableInner({
|
|
|
26463
26555
|
className: cn("ods-table-wrapper", className),
|
|
26464
26556
|
role: "region",
|
|
26465
26557
|
"aria-label": ariaLabel,
|
|
26466
|
-
children: /* @__PURE__ */
|
|
26467
|
-
/* @__PURE__ */
|
|
26468
|
-
selectable && /* @__PURE__ */
|
|
26558
|
+
children: /* @__PURE__ */ jsxs117("table", { className: "ods-table", children: [
|
|
26559
|
+
/* @__PURE__ */ jsx123("thead", { className: "ods-table__header", children: /* @__PURE__ */ jsxs117("tr", { children: [
|
|
26560
|
+
selectable && /* @__PURE__ */ jsx123("th", { className: "ods-table__cell--checkbox", scope: "col", children: /* @__PURE__ */ jsx123(
|
|
26469
26561
|
"input",
|
|
26470
26562
|
{
|
|
26471
26563
|
type: "checkbox",
|
|
@@ -26474,8 +26566,8 @@ function TableInner({
|
|
|
26474
26566
|
onChange: handleSelectAll
|
|
26475
26567
|
}
|
|
26476
26568
|
) }),
|
|
26477
|
-
expandable && /* @__PURE__ */
|
|
26478
|
-
columns.map((col) => /* @__PURE__ */
|
|
26569
|
+
expandable && /* @__PURE__ */ jsx123("th", { className: "ods-table__cell--expand", scope: "col", "aria-label": "Expand" }),
|
|
26570
|
+
columns.map((col) => /* @__PURE__ */ jsx123(
|
|
26479
26571
|
"th",
|
|
26480
26572
|
{
|
|
26481
26573
|
className: cn("ods-table__cell", col.sortable && "ods-table__cell--sortable"),
|
|
@@ -26483,9 +26575,9 @@ function TableInner({
|
|
|
26483
26575
|
scope: "col",
|
|
26484
26576
|
"aria-sort": sortKey === col.key ? sortDirection === "asc" ? "ascending" : "descending" : void 0,
|
|
26485
26577
|
onClick: col.sortable ? () => handleSort(col.key) : void 0,
|
|
26486
|
-
children: /* @__PURE__ */
|
|
26578
|
+
children: /* @__PURE__ */ jsxs117("span", { className: "ods-table__header-content", children: [
|
|
26487
26579
|
col.header,
|
|
26488
|
-
col.sortable && /* @__PURE__ */
|
|
26580
|
+
col.sortable && /* @__PURE__ */ jsx123(
|
|
26489
26581
|
"span",
|
|
26490
26582
|
{
|
|
26491
26583
|
className: cn(
|
|
@@ -26493,7 +26585,7 @@ function TableInner({
|
|
|
26493
26585
|
sortKey === col.key && "ods-table__sort-icon--active"
|
|
26494
26586
|
),
|
|
26495
26587
|
"aria-hidden": "true",
|
|
26496
|
-
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */
|
|
26588
|
+
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */ jsx123(CaretDownIcon2, { size: "xs" }) : /* @__PURE__ */ jsx123(CaretUpIcon2, { size: "xs" }) : /* @__PURE__ */ jsx123(CaretSortIcon2, { size: "xs" })
|
|
26497
26589
|
}
|
|
26498
26590
|
)
|
|
26499
26591
|
] })
|
|
@@ -26501,10 +26593,10 @@ function TableInner({
|
|
|
26501
26593
|
col.key
|
|
26502
26594
|
))
|
|
26503
26595
|
] }) }),
|
|
26504
|
-
/* @__PURE__ */
|
|
26505
|
-
loading && /* @__PURE__ */
|
|
26506
|
-
!loading && data.length === 0 && /* @__PURE__ */
|
|
26507
|
-
data.map((row, rowIndex) => /* @__PURE__ */
|
|
26596
|
+
/* @__PURE__ */ jsxs117("tbody", { children: [
|
|
26597
|
+
loading && /* @__PURE__ */ jsx123("tr", { children: /* @__PURE__ */ jsx123("td", { colSpan: totalCols, className: "ods-table__loading", children: /* @__PURE__ */ jsx123("div", { className: "ods-table__loading-bar" }) }) }),
|
|
26598
|
+
!loading && data.length === 0 && /* @__PURE__ */ jsx123("tr", { children: /* @__PURE__ */ jsx123("td", { colSpan: totalCols, className: "ods-table__empty", children: emptyMessage }) }),
|
|
26599
|
+
data.map((row, rowIndex) => /* @__PURE__ */ jsx123(
|
|
26508
26600
|
TableRow,
|
|
26509
26601
|
{
|
|
26510
26602
|
row,
|
|
@@ -26538,14 +26630,14 @@ function TableRow({
|
|
|
26538
26630
|
}) {
|
|
26539
26631
|
const isSelected = selectedRows?.has(rowIndex) ?? false;
|
|
26540
26632
|
const [expanded, setExpanded] = useState56(false);
|
|
26541
|
-
return /* @__PURE__ */
|
|
26542
|
-
/* @__PURE__ */
|
|
26633
|
+
return /* @__PURE__ */ jsxs117(Fragment44, { children: [
|
|
26634
|
+
/* @__PURE__ */ jsxs117(
|
|
26543
26635
|
"tr",
|
|
26544
26636
|
{
|
|
26545
26637
|
className: cn("ods-table__row", isSelected && "ods-table__row--selected"),
|
|
26546
26638
|
"data-row-index": rowIndex,
|
|
26547
26639
|
children: [
|
|
26548
|
-
selectable && /* @__PURE__ */
|
|
26640
|
+
selectable && /* @__PURE__ */ jsx123("td", { className: "ods-table__cell--checkbox", children: /* @__PURE__ */ jsx123(
|
|
26549
26641
|
"input",
|
|
26550
26642
|
{
|
|
26551
26643
|
type: "checkbox",
|
|
@@ -26554,7 +26646,7 @@ function TableRow({
|
|
|
26554
26646
|
onChange: () => onSelectRow(rowIndex)
|
|
26555
26647
|
}
|
|
26556
26648
|
) }),
|
|
26557
|
-
expandable && /* @__PURE__ */
|
|
26649
|
+
expandable && /* @__PURE__ */ jsx123("td", { className: "ods-table__cell--expand", children: /* @__PURE__ */ jsx123(
|
|
26558
26650
|
"button",
|
|
26559
26651
|
{
|
|
26560
26652
|
type: "button",
|
|
@@ -26562,14 +26654,14 @@ function TableRow({
|
|
|
26562
26654
|
"aria-label": expanded ? "Collapse row" : "Expand row",
|
|
26563
26655
|
"aria-expanded": expanded,
|
|
26564
26656
|
onClick: () => setExpanded(!expanded),
|
|
26565
|
-
children: /* @__PURE__ */
|
|
26657
|
+
children: /* @__PURE__ */ jsx123(CaretRightIcon, { size: "xs" })
|
|
26566
26658
|
}
|
|
26567
26659
|
) }),
|
|
26568
|
-
columns.map((col) => /* @__PURE__ */
|
|
26660
|
+
columns.map((col) => /* @__PURE__ */ jsx123("td", { className: "ods-table__cell", children: col.render ? col.render(row[col.key], row, rowIndex) : row[col.key] }, col.key))
|
|
26569
26661
|
]
|
|
26570
26662
|
}
|
|
26571
26663
|
),
|
|
26572
|
-
expandable && expanded && renderExpanded && /* @__PURE__ */
|
|
26664
|
+
expandable && expanded && renderExpanded && /* @__PURE__ */ jsx123("tr", { className: "ods-table__row--expanded", children: /* @__PURE__ */ jsx123("td", { colSpan: totalCols, className: "ods-table__expanded-cell", children: renderExpanded(row, rowIndex) }) })
|
|
26573
26665
|
] });
|
|
26574
26666
|
}
|
|
26575
26667
|
|
|
@@ -26577,7 +26669,7 @@ function TableRow({
|
|
|
26577
26669
|
import { motion as motion33 } from "framer-motion";
|
|
26578
26670
|
import { useCallback as useCallback42, useEffect as useEffect43, useId as useId55, useMemo as useMemo28, useRef as useRef48, useState as useState57 } from "react";
|
|
26579
26671
|
import { useTab, useTabList, useTabPanel } from "react-aria";
|
|
26580
|
-
import { jsx as
|
|
26672
|
+
import { jsx as jsx124, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
26581
26673
|
function TabButton({
|
|
26582
26674
|
item,
|
|
26583
26675
|
state,
|
|
@@ -26588,7 +26680,7 @@ function TabButton({
|
|
|
26588
26680
|
const isSelected = state.selectedKey === item.key;
|
|
26589
26681
|
const isDisabled = state.disabledKeys.has(item.key);
|
|
26590
26682
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeTabProps } = tabProps;
|
|
26591
|
-
return /* @__PURE__ */
|
|
26683
|
+
return /* @__PURE__ */ jsxs118(
|
|
26592
26684
|
motion33.div,
|
|
26593
26685
|
{
|
|
26594
26686
|
...safeTabProps,
|
|
@@ -26600,7 +26692,7 @@ function TabButton({
|
|
|
26600
26692
|
),
|
|
26601
26693
|
children: [
|
|
26602
26694
|
item.rendered,
|
|
26603
|
-
isSelected && /* @__PURE__ */
|
|
26695
|
+
isSelected && /* @__PURE__ */ jsx124(
|
|
26604
26696
|
motion33.div,
|
|
26605
26697
|
{
|
|
26606
26698
|
className: "ods-tabs__indicator",
|
|
@@ -26615,7 +26707,7 @@ function TabButton({
|
|
|
26615
26707
|
function TabPanelContent({ state, panelContent, ...props }) {
|
|
26616
26708
|
const ref = useRef48(null);
|
|
26617
26709
|
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
26618
|
-
return /* @__PURE__ */
|
|
26710
|
+
return /* @__PURE__ */ jsx124("div", { ...tabPanelProps, ref, className: "ods-tabs__panel", children: panelContent });
|
|
26619
26711
|
}
|
|
26620
26712
|
var SCROLL_EDGE_EPSILON = 1;
|
|
26621
26713
|
var SCROLL_STEP_PX = 200;
|
|
@@ -26644,9 +26736,9 @@ function Tabs({
|
|
|
26644
26736
|
return map;
|
|
26645
26737
|
}, [items]);
|
|
26646
26738
|
const stateProps = {
|
|
26647
|
-
children: items.map((item) => /* @__PURE__ */
|
|
26648
|
-
item.icon && /* @__PURE__ */
|
|
26649
|
-
/* @__PURE__ */
|
|
26739
|
+
children: items.map((item) => /* @__PURE__ */ jsxs118($05678f3aee5e7d1a$export$6d08773d2e66f8f2, { textValue: item.label, children: [
|
|
26740
|
+
item.icon && /* @__PURE__ */ jsx124("span", { className: "ods-tabs__icon", children: item.icon }),
|
|
26741
|
+
/* @__PURE__ */ jsx124("span", { children: item.label })
|
|
26650
26742
|
] }, item.value)),
|
|
26651
26743
|
selectedKey,
|
|
26652
26744
|
onSelectionChange: handleSelectionChange,
|
|
@@ -26684,9 +26776,9 @@ function Tabs({
|
|
|
26684
26776
|
el.scrollBy({ left: dir * SCROLL_STEP_PX, behavior: "smooth" });
|
|
26685
26777
|
};
|
|
26686
26778
|
const currentPanelContent = panelContentMap.get(String(selectedKey));
|
|
26687
|
-
return /* @__PURE__ */
|
|
26688
|
-
/* @__PURE__ */
|
|
26689
|
-
orientation === "horizontal" && canScrollLeft && /* @__PURE__ */
|
|
26779
|
+
return /* @__PURE__ */ jsxs118("div", { className: cn("ods-tabs", `ods-tabs--${orientation}`, className), children: [
|
|
26780
|
+
/* @__PURE__ */ jsxs118("div", { className: "ods-tabs__list-wrap", children: [
|
|
26781
|
+
orientation === "horizontal" && canScrollLeft && /* @__PURE__ */ jsx124(
|
|
26690
26782
|
"button",
|
|
26691
26783
|
{
|
|
26692
26784
|
type: "button",
|
|
@@ -26694,16 +26786,16 @@ function Tabs({
|
|
|
26694
26786
|
onClick: () => scrollBy(-1),
|
|
26695
26787
|
"aria-label": "Scroll tabs left",
|
|
26696
26788
|
tabIndex: -1,
|
|
26697
|
-
children: /* @__PURE__ */
|
|
26789
|
+
children: /* @__PURE__ */ jsx124(ChevronSvg, { dir: "left" })
|
|
26698
26790
|
}
|
|
26699
26791
|
),
|
|
26700
|
-
/* @__PURE__ */
|
|
26792
|
+
/* @__PURE__ */ jsx124(
|
|
26701
26793
|
"div",
|
|
26702
26794
|
{
|
|
26703
26795
|
className: "ods-tabs__scroller",
|
|
26704
26796
|
ref: scrollContainerRef,
|
|
26705
26797
|
onScroll: orientation === "horizontal" ? onScroll : void 0,
|
|
26706
|
-
children: /* @__PURE__ */
|
|
26798
|
+
children: /* @__PURE__ */ jsx124("div", { ...tabListProps, ref, className: "ods-tabs__list", children: [...state.collection].map((item) => /* @__PURE__ */ jsx124(
|
|
26707
26799
|
TabButton,
|
|
26708
26800
|
{
|
|
26709
26801
|
item,
|
|
@@ -26714,7 +26806,7 @@ function Tabs({
|
|
|
26714
26806
|
)) })
|
|
26715
26807
|
}
|
|
26716
26808
|
),
|
|
26717
|
-
orientation === "horizontal" && canScrollRight && /* @__PURE__ */
|
|
26809
|
+
orientation === "horizontal" && canScrollRight && /* @__PURE__ */ jsx124(
|
|
26718
26810
|
"button",
|
|
26719
26811
|
{
|
|
26720
26812
|
type: "button",
|
|
@@ -26722,16 +26814,16 @@ function Tabs({
|
|
|
26722
26814
|
onClick: () => scrollBy(1),
|
|
26723
26815
|
"aria-label": "Scroll tabs right",
|
|
26724
26816
|
tabIndex: -1,
|
|
26725
|
-
children: /* @__PURE__ */
|
|
26817
|
+
children: /* @__PURE__ */ jsx124(ChevronSvg, { dir: "right" })
|
|
26726
26818
|
}
|
|
26727
26819
|
)
|
|
26728
26820
|
] }),
|
|
26729
|
-
/* @__PURE__ */
|
|
26821
|
+
/* @__PURE__ */ jsx124(TabPanelContent, { state, panelContent: currentPanelContent }, state.selectedKey)
|
|
26730
26822
|
] });
|
|
26731
26823
|
}
|
|
26732
26824
|
function ChevronSvg({ dir }) {
|
|
26733
26825
|
const d = dir === "left" ? "M11 4L5 10l6 6" : "M9 4l6 6-6 6";
|
|
26734
|
-
return /* @__PURE__ */
|
|
26826
|
+
return /* @__PURE__ */ jsx124(
|
|
26735
26827
|
"svg",
|
|
26736
26828
|
{
|
|
26737
26829
|
width: "14",
|
|
@@ -26743,7 +26835,7 @@ function ChevronSvg({ dir }) {
|
|
|
26743
26835
|
strokeLinecap: "round",
|
|
26744
26836
|
strokeLinejoin: "round",
|
|
26745
26837
|
"aria-hidden": "true",
|
|
26746
|
-
children: /* @__PURE__ */
|
|
26838
|
+
children: /* @__PURE__ */ jsx124("path", { d })
|
|
26747
26839
|
}
|
|
26748
26840
|
);
|
|
26749
26841
|
}
|
|
@@ -26755,7 +26847,7 @@ import {
|
|
|
26755
26847
|
useState as useState58
|
|
26756
26848
|
} from "react";
|
|
26757
26849
|
import { CloseIcon as CloseIcon14 } from "@octaviaflow/icons";
|
|
26758
|
-
import { jsx as
|
|
26850
|
+
import { jsx as jsx125, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
26759
26851
|
var TagsInput = forwardRef105(
|
|
26760
26852
|
function TagsInput2({
|
|
26761
26853
|
label,
|
|
@@ -26806,7 +26898,7 @@ var TagsInput = forwardRef105(
|
|
|
26806
26898
|
}
|
|
26807
26899
|
};
|
|
26808
26900
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
26809
|
-
return /* @__PURE__ */
|
|
26901
|
+
return /* @__PURE__ */ jsxs119(
|
|
26810
26902
|
"div",
|
|
26811
26903
|
{
|
|
26812
26904
|
className: cn(
|
|
@@ -26817,7 +26909,7 @@ var TagsInput = forwardRef105(
|
|
|
26817
26909
|
wrapperClassName
|
|
26818
26910
|
),
|
|
26819
26911
|
children: [
|
|
26820
|
-
label && /* @__PURE__ */
|
|
26912
|
+
label && /* @__PURE__ */ jsx125(
|
|
26821
26913
|
"label",
|
|
26822
26914
|
{
|
|
26823
26915
|
id: labelId,
|
|
@@ -26826,10 +26918,10 @@ var TagsInput = forwardRef105(
|
|
|
26826
26918
|
children: label
|
|
26827
26919
|
}
|
|
26828
26920
|
),
|
|
26829
|
-
/* @__PURE__ */
|
|
26830
|
-
value.map((tag, i) => /* @__PURE__ */
|
|
26831
|
-
/* @__PURE__ */
|
|
26832
|
-
/* @__PURE__ */
|
|
26921
|
+
/* @__PURE__ */ jsxs119("div", { className: "ods-tags__field", children: [
|
|
26922
|
+
value.map((tag, i) => /* @__PURE__ */ jsxs119("span", { className: "ods-tags__chip", children: [
|
|
26923
|
+
/* @__PURE__ */ jsx125("span", { className: "ods-tags__chip-text", children: tag }),
|
|
26924
|
+
/* @__PURE__ */ jsx125(
|
|
26833
26925
|
"button",
|
|
26834
26926
|
{
|
|
26835
26927
|
type: "button",
|
|
@@ -26837,11 +26929,11 @@ var TagsInput = forwardRef105(
|
|
|
26837
26929
|
onClick: () => removeTag(i),
|
|
26838
26930
|
"aria-label": `Remove ${tag}`,
|
|
26839
26931
|
disabled,
|
|
26840
|
-
children: /* @__PURE__ */
|
|
26932
|
+
children: /* @__PURE__ */ jsx125(CloseIcon14, { size: "xs" })
|
|
26841
26933
|
}
|
|
26842
26934
|
)
|
|
26843
26935
|
] }, `${tag}-${i}`)),
|
|
26844
|
-
/* @__PURE__ */
|
|
26936
|
+
/* @__PURE__ */ jsx125(
|
|
26845
26937
|
"input",
|
|
26846
26938
|
{
|
|
26847
26939
|
...rest,
|
|
@@ -26861,7 +26953,7 @@ var TagsInput = forwardRef105(
|
|
|
26861
26953
|
}
|
|
26862
26954
|
)
|
|
26863
26955
|
] }),
|
|
26864
|
-
error ? /* @__PURE__ */
|
|
26956
|
+
error ? /* @__PURE__ */ jsx125(
|
|
26865
26957
|
"div",
|
|
26866
26958
|
{
|
|
26867
26959
|
id: hintId,
|
|
@@ -26869,7 +26961,7 @@ var TagsInput = forwardRef105(
|
|
|
26869
26961
|
role: "alert",
|
|
26870
26962
|
children: error
|
|
26871
26963
|
}
|
|
26872
|
-
) : helperText ? /* @__PURE__ */
|
|
26964
|
+
) : helperText ? /* @__PURE__ */ jsx125("div", { id: hintId, className: "ods-tags__hint", children: helperText }) : null
|
|
26873
26965
|
]
|
|
26874
26966
|
}
|
|
26875
26967
|
);
|
|
@@ -26882,7 +26974,7 @@ import {
|
|
|
26882
26974
|
forwardRef as forwardRef106,
|
|
26883
26975
|
useId as useId57
|
|
26884
26976
|
} from "react";
|
|
26885
|
-
import { Fragment as
|
|
26977
|
+
import { Fragment as Fragment45, jsx as jsx126, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
26886
26978
|
var TemplateCard = forwardRef106(
|
|
26887
26979
|
function TemplateCard2({
|
|
26888
26980
|
name,
|
|
@@ -26918,7 +27010,7 @@ var TemplateCard = forwardRef106(
|
|
|
26918
27010
|
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
26919
27011
|
const hasInternalInteractive = Boolean(cta || footer);
|
|
26920
27012
|
const useStretchedLink = Boolean(href) && !disabled && hasInternalInteractive;
|
|
26921
|
-
const titleContent = useStretchedLink ? /* @__PURE__ */
|
|
27013
|
+
const titleContent = useStretchedLink ? /* @__PURE__ */ jsx126(
|
|
26922
27014
|
"a",
|
|
26923
27015
|
{
|
|
26924
27016
|
className: "ods-template-card__stretched-link",
|
|
@@ -26930,8 +27022,8 @@ var TemplateCard = forwardRef106(
|
|
|
26930
27022
|
const renderAuthor = () => {
|
|
26931
27023
|
if (!author) return null;
|
|
26932
27024
|
const derivedInitials = author.avatar?.initials ?? (typeof author.name === "string" ? author.name.charAt(0).toUpperCase() : void 0);
|
|
26933
|
-
return /* @__PURE__ */
|
|
26934
|
-
(author.avatar || derivedInitials) && /* @__PURE__ */
|
|
27025
|
+
return /* @__PURE__ */ jsxs120("div", { className: "ods-template-card__author", children: [
|
|
27026
|
+
(author.avatar || derivedInitials) && /* @__PURE__ */ jsx126(
|
|
26935
27027
|
Avatar,
|
|
26936
27028
|
{
|
|
26937
27029
|
size: "xs",
|
|
@@ -26941,8 +27033,8 @@ var TemplateCard = forwardRef106(
|
|
|
26941
27033
|
className: "ods-template-card__author-avatar"
|
|
26942
27034
|
}
|
|
26943
27035
|
),
|
|
26944
|
-
/* @__PURE__ */
|
|
26945
|
-
author.byline && /* @__PURE__ */
|
|
27036
|
+
/* @__PURE__ */ jsx126("span", { className: "ods-template-card__author-name", children: author.name }),
|
|
27037
|
+
author.byline && /* @__PURE__ */ jsx126("span", { className: "ods-template-card__author-byline", children: author.byline })
|
|
26946
27038
|
] });
|
|
26947
27039
|
};
|
|
26948
27040
|
const hasImage = Boolean(image);
|
|
@@ -26956,8 +27048,8 @@ var TemplateCard = forwardRef106(
|
|
|
26956
27048
|
if (iconConnector === "plus") return "+";
|
|
26957
27049
|
return iconConnector;
|
|
26958
27050
|
};
|
|
26959
|
-
const body = /* @__PURE__ */
|
|
26960
|
-
showMedia && /* @__PURE__ */
|
|
27051
|
+
const body = /* @__PURE__ */ jsxs120(Fragment45, { children: [
|
|
27052
|
+
showMedia && /* @__PURE__ */ jsxs120(
|
|
26961
27053
|
"div",
|
|
26962
27054
|
{
|
|
26963
27055
|
className: cn(
|
|
@@ -26970,9 +27062,9 @@ var TemplateCard = forwardRef106(
|
|
|
26970
27062
|
"aria-hidden": "true",
|
|
26971
27063
|
children: [
|
|
26972
27064
|
hasImage && image,
|
|
26973
|
-
hasIcon && /* @__PURE__ */
|
|
26974
|
-
hasIconFlow && /* @__PURE__ */
|
|
26975
|
-
i > 0 && /* @__PURE__ */
|
|
27065
|
+
hasIcon && /* @__PURE__ */ jsx126("span", { className: "ods-template-card__icon", children: icon }),
|
|
27066
|
+
hasIconFlow && /* @__PURE__ */ jsx126("span", { className: "ods-template-card__icon-flow", children: icons.map((step, i) => /* @__PURE__ */ jsxs120("span", { className: "ods-template-card__icon-flow-item", children: [
|
|
27067
|
+
i > 0 && /* @__PURE__ */ jsx126(
|
|
26976
27068
|
"span",
|
|
26977
27069
|
{
|
|
26978
27070
|
className: "ods-template-card__icon-connector",
|
|
@@ -26980,7 +27072,7 @@ var TemplateCard = forwardRef106(
|
|
|
26980
27072
|
children: renderConnector()
|
|
26981
27073
|
}
|
|
26982
27074
|
),
|
|
26983
|
-
/* @__PURE__ */
|
|
27075
|
+
/* @__PURE__ */ jsx126(
|
|
26984
27076
|
"span",
|
|
26985
27077
|
{
|
|
26986
27078
|
className: cn(
|
|
@@ -26993,13 +27085,13 @@ var TemplateCard = forwardRef106(
|
|
|
26993
27085
|
}
|
|
26994
27086
|
)
|
|
26995
27087
|
] }, i)) }),
|
|
26996
|
-
badge && /* @__PURE__ */
|
|
27088
|
+
badge && /* @__PURE__ */ jsx126("span", { className: "ods-template-card__badge", children: badge })
|
|
26997
27089
|
]
|
|
26998
27090
|
}
|
|
26999
27091
|
),
|
|
27000
|
-
/* @__PURE__ */
|
|
27001
|
-
category && /* @__PURE__ */
|
|
27002
|
-
/* @__PURE__ */
|
|
27092
|
+
/* @__PURE__ */ jsxs120("div", { className: "ods-template-card__content", children: [
|
|
27093
|
+
category && /* @__PURE__ */ jsx126("div", { className: "ods-template-card__category", children: category }),
|
|
27094
|
+
/* @__PURE__ */ jsx126(
|
|
27003
27095
|
Card.Title,
|
|
27004
27096
|
{
|
|
27005
27097
|
as: nameAs,
|
|
@@ -27008,7 +27100,7 @@ var TemplateCard = forwardRef106(
|
|
|
27008
27100
|
children: titleContent
|
|
27009
27101
|
}
|
|
27010
27102
|
),
|
|
27011
|
-
description && /* @__PURE__ */
|
|
27103
|
+
description && /* @__PURE__ */ jsx126(
|
|
27012
27104
|
Card.Description,
|
|
27013
27105
|
{
|
|
27014
27106
|
id: descId,
|
|
@@ -27016,18 +27108,18 @@ var TemplateCard = forwardRef106(
|
|
|
27016
27108
|
children: description
|
|
27017
27109
|
}
|
|
27018
27110
|
),
|
|
27019
|
-
requirements && requirements.length > 0 && /* @__PURE__ */
|
|
27111
|
+
requirements && requirements.length > 0 && /* @__PURE__ */ jsx126(
|
|
27020
27112
|
"div",
|
|
27021
27113
|
{
|
|
27022
27114
|
className: "ods-template-card__requirements",
|
|
27023
27115
|
"aria-label": "Requirements",
|
|
27024
|
-
children: requirements.map((r, i) => /* @__PURE__ */
|
|
27116
|
+
children: requirements.map((r, i) => /* @__PURE__ */ jsx126("span", { className: "ods-template-card__requirement", children: r }, i))
|
|
27025
27117
|
}
|
|
27026
27118
|
),
|
|
27027
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
27028
|
-
/* @__PURE__ */
|
|
27029
|
-
/* @__PURE__ */
|
|
27030
|
-
s.icon && /* @__PURE__ */
|
|
27119
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx126("dl", { className: "ods-template-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs120("div", { className: "ods-template-card__stat", children: [
|
|
27120
|
+
/* @__PURE__ */ jsx126("dt", { className: "ods-template-card__stat-label", children: s.label }),
|
|
27121
|
+
/* @__PURE__ */ jsxs120("dd", { className: "ods-template-card__stat-value", children: [
|
|
27122
|
+
s.icon && /* @__PURE__ */ jsx126(
|
|
27031
27123
|
"span",
|
|
27032
27124
|
{
|
|
27033
27125
|
className: "ods-template-card__stat-icon",
|
|
@@ -27038,12 +27130,12 @@ var TemplateCard = forwardRef106(
|
|
|
27038
27130
|
s.value
|
|
27039
27131
|
] })
|
|
27040
27132
|
] }, i)) }),
|
|
27041
|
-
tags && tags.length > 0 && /* @__PURE__ */
|
|
27042
|
-
(author || cta || footer) && /* @__PURE__ */
|
|
27133
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsx126("div", { className: "ods-template-card__tags", children: tags.map((t, i) => /* @__PURE__ */ jsx126("span", { className: "ods-template-card__tag", children: t }, i)) }),
|
|
27134
|
+
(author || cta || footer) && /* @__PURE__ */ jsxs120("div", { className: "ods-template-card__footer-row", children: [
|
|
27043
27135
|
renderAuthor(),
|
|
27044
|
-
(cta || footer) && /* @__PURE__ */
|
|
27045
|
-
cta && /* @__PURE__ */
|
|
27046
|
-
footer && /* @__PURE__ */
|
|
27136
|
+
(cta || footer) && /* @__PURE__ */ jsxs120("div", { className: "ods-template-card__footer-actions", children: [
|
|
27137
|
+
cta && /* @__PURE__ */ jsx126("div", { className: "ods-template-card__cta", children: cta }),
|
|
27138
|
+
footer && /* @__PURE__ */ jsx126("div", { className: "ods-template-card__footer", children: footer })
|
|
27047
27139
|
] })
|
|
27048
27140
|
] })
|
|
27049
27141
|
] })
|
|
@@ -27057,7 +27149,7 @@ var TemplateCard = forwardRef106(
|
|
|
27057
27149
|
className
|
|
27058
27150
|
);
|
|
27059
27151
|
if (href && !disabled && !useStretchedLink) {
|
|
27060
|
-
return /* @__PURE__ */
|
|
27152
|
+
return /* @__PURE__ */ jsx126(
|
|
27061
27153
|
Card,
|
|
27062
27154
|
{
|
|
27063
27155
|
asChild: true,
|
|
@@ -27066,7 +27158,7 @@ var TemplateCard = forwardRef106(
|
|
|
27066
27158
|
className: sharedClass,
|
|
27067
27159
|
"aria-labelledby": nameId,
|
|
27068
27160
|
"aria-describedby": descId,
|
|
27069
|
-
children: /* @__PURE__ */
|
|
27161
|
+
children: /* @__PURE__ */ jsx126(
|
|
27070
27162
|
"a",
|
|
27071
27163
|
{
|
|
27072
27164
|
...rest,
|
|
@@ -27080,7 +27172,7 @@ var TemplateCard = forwardRef106(
|
|
|
27080
27172
|
}
|
|
27081
27173
|
);
|
|
27082
27174
|
}
|
|
27083
|
-
return /* @__PURE__ */
|
|
27175
|
+
return /* @__PURE__ */ jsx126(
|
|
27084
27176
|
Card,
|
|
27085
27177
|
{
|
|
27086
27178
|
...rest,
|
|
@@ -27110,7 +27202,7 @@ import {
|
|
|
27110
27202
|
forwardRef as forwardRef107,
|
|
27111
27203
|
useId as useId58
|
|
27112
27204
|
} from "react";
|
|
27113
|
-
import { jsx as
|
|
27205
|
+
import { jsx as jsx127, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
27114
27206
|
function isAuthorObject(v) {
|
|
27115
27207
|
return typeof v === "object" && v !== null && !("type" in v) && // exclude React elements
|
|
27116
27208
|
"name" in v;
|
|
@@ -27142,7 +27234,7 @@ var TestimonialCard = forwardRef107(function TestimonialCard2({
|
|
|
27142
27234
|
};
|
|
27143
27235
|
const renderAvatar = () => {
|
|
27144
27236
|
if (!isAuthorObject(author) && legacyAvatar) {
|
|
27145
|
-
return /* @__PURE__ */
|
|
27237
|
+
return /* @__PURE__ */ jsx127(
|
|
27146
27238
|
"span",
|
|
27147
27239
|
{
|
|
27148
27240
|
className: "ods-testimonial__avatar ods-testimonial__avatar--legacy",
|
|
@@ -27151,7 +27243,7 @@ var TestimonialCard = forwardRef107(function TestimonialCard2({
|
|
|
27151
27243
|
}
|
|
27152
27244
|
);
|
|
27153
27245
|
}
|
|
27154
|
-
return /* @__PURE__ */
|
|
27246
|
+
return /* @__PURE__ */ jsx127(
|
|
27155
27247
|
Avatar,
|
|
27156
27248
|
{
|
|
27157
27249
|
size: size === "sm" ? "xs" : size === "lg" ? "md" : "sm",
|
|
@@ -27162,7 +27254,7 @@ var TestimonialCard = forwardRef107(function TestimonialCard2({
|
|
|
27162
27254
|
}
|
|
27163
27255
|
);
|
|
27164
27256
|
};
|
|
27165
|
-
return /* @__PURE__ */
|
|
27257
|
+
return /* @__PURE__ */ jsxs121(
|
|
27166
27258
|
Card,
|
|
27167
27259
|
{
|
|
27168
27260
|
...rest,
|
|
@@ -27179,26 +27271,26 @@ var TestimonialCard = forwardRef107(function TestimonialCard2({
|
|
|
27179
27271
|
"aria-labelledby": authorId,
|
|
27180
27272
|
"aria-describedby": quoteId,
|
|
27181
27273
|
children: [
|
|
27182
|
-
/* @__PURE__ */
|
|
27183
|
-
/* @__PURE__ */
|
|
27184
|
-
logo && /* @__PURE__ */
|
|
27274
|
+
/* @__PURE__ */ jsxs121("div", { className: "ods-testimonial__head", children: [
|
|
27275
|
+
/* @__PURE__ */ jsx127("span", { className: "ods-testimonial__quote", "aria-hidden": "true", children: /* @__PURE__ */ jsx127(QuotesIcon, { size: "md" }) }),
|
|
27276
|
+
logo && /* @__PURE__ */ jsx127("span", { className: "ods-testimonial__logo", "aria-hidden": "true", children: logo })
|
|
27185
27277
|
] }),
|
|
27186
|
-
/* @__PURE__ */
|
|
27187
|
-
typeof rating === "number" && /* @__PURE__ */
|
|
27278
|
+
/* @__PURE__ */ jsx127("blockquote", { id: quoteId, className: "ods-testimonial__text", children: quote }),
|
|
27279
|
+
typeof rating === "number" && /* @__PURE__ */ jsx127(
|
|
27188
27280
|
"div",
|
|
27189
27281
|
{
|
|
27190
27282
|
className: "ods-testimonial__rating",
|
|
27191
27283
|
role: "img",
|
|
27192
27284
|
"aria-label": `${rating} out of 5 stars`,
|
|
27193
27285
|
children: Array.from({ length: 5 }).map(
|
|
27194
|
-
(_, i) => i < Math.round(rating) ? /* @__PURE__ */
|
|
27286
|
+
(_, i) => i < Math.round(rating) ? /* @__PURE__ */ jsx127(
|
|
27195
27287
|
StarFilledIcon3,
|
|
27196
27288
|
{
|
|
27197
27289
|
size: "xs",
|
|
27198
27290
|
className: "ods-testimonial__star ods-testimonial__star--on"
|
|
27199
27291
|
},
|
|
27200
27292
|
i
|
|
27201
|
-
) : /* @__PURE__ */
|
|
27293
|
+
) : /* @__PURE__ */ jsx127(
|
|
27202
27294
|
StarIcon3,
|
|
27203
27295
|
{
|
|
27204
27296
|
size: "xs",
|
|
@@ -27209,11 +27301,11 @@ var TestimonialCard = forwardRef107(function TestimonialCard2({
|
|
|
27209
27301
|
)
|
|
27210
27302
|
}
|
|
27211
27303
|
),
|
|
27212
|
-
/* @__PURE__ */
|
|
27304
|
+
/* @__PURE__ */ jsxs121("figcaption", { className: "ods-testimonial__author", id: authorId, children: [
|
|
27213
27305
|
renderAvatar(),
|
|
27214
|
-
/* @__PURE__ */
|
|
27215
|
-
/* @__PURE__ */
|
|
27216
|
-
resolved.role && /* @__PURE__ */
|
|
27306
|
+
/* @__PURE__ */ jsxs121("span", { className: "ods-testimonial__author-info", children: [
|
|
27307
|
+
/* @__PURE__ */ jsx127("span", { className: "ods-testimonial__author-name", children: resolved.name }),
|
|
27308
|
+
resolved.role && /* @__PURE__ */ jsx127("span", { className: "ods-testimonial__author-role", children: resolved.role })
|
|
27217
27309
|
] })
|
|
27218
27310
|
] })
|
|
27219
27311
|
]
|
|
@@ -27621,7 +27713,7 @@ import {
|
|
|
27621
27713
|
UndoIcon as UndoIcon2
|
|
27622
27714
|
} from "@octaviaflow/icons";
|
|
27623
27715
|
import { useCallback as useCallback45, useMemo as useMemo30, useRef as useRef50 } from "react";
|
|
27624
|
-
import { jsx as
|
|
27716
|
+
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
27625
27717
|
function useTextareaTools({
|
|
27626
27718
|
textareaRef,
|
|
27627
27719
|
value,
|
|
@@ -27757,28 +27849,28 @@ var prependLineTool = (id, prefix, label, icon, title) => ({
|
|
|
27757
27849
|
onAction: (h) => h.prependLines(prefix)
|
|
27758
27850
|
});
|
|
27759
27851
|
var textareaTools = {
|
|
27760
|
-
bold: () => wrapTool("bold", "**", "**", "Bold", /* @__PURE__ */
|
|
27761
|
-
italic: () => wrapTool("italic", "*", "*", "Italic", /* @__PURE__ */
|
|
27852
|
+
bold: () => wrapTool("bold", "**", "**", "Bold", /* @__PURE__ */ jsx128(TextBoldIcon, {}), "Bold (\u2318B)"),
|
|
27853
|
+
italic: () => wrapTool("italic", "*", "*", "Italic", /* @__PURE__ */ jsx128(TextItalicIcon, {}), "Italic (\u2318I)"),
|
|
27762
27854
|
strikethrough: () => wrapTool(
|
|
27763
27855
|
"strike",
|
|
27764
27856
|
"~~",
|
|
27765
27857
|
"~~",
|
|
27766
27858
|
"Strikethrough",
|
|
27767
|
-
/* @__PURE__ */
|
|
27859
|
+
/* @__PURE__ */ jsx128(TextStrikethroughIcon, {}),
|
|
27768
27860
|
"Strikethrough"
|
|
27769
27861
|
),
|
|
27770
|
-
code: () => wrapTool("code", "`", "`", "Code", /* @__PURE__ */
|
|
27862
|
+
code: () => wrapTool("code", "`", "`", "Code", /* @__PURE__ */ jsx128(CodeIcon, {}), "Inline code"),
|
|
27771
27863
|
codeBlock: () => ({
|
|
27772
27864
|
id: "code-block",
|
|
27773
27865
|
label: "Code block",
|
|
27774
|
-
icon: /* @__PURE__ */
|
|
27866
|
+
icon: /* @__PURE__ */ jsx128(CodeIcon, {}),
|
|
27775
27867
|
title: "Code block",
|
|
27776
27868
|
onAction: (h) => h.wrap("```\n", "\n```")
|
|
27777
27869
|
}),
|
|
27778
27870
|
link: () => ({
|
|
27779
27871
|
id: "link",
|
|
27780
27872
|
label: "Link",
|
|
27781
|
-
icon: /* @__PURE__ */
|
|
27873
|
+
icon: /* @__PURE__ */ jsx128(TextLinkIcon, {}),
|
|
27782
27874
|
title: "Insert link",
|
|
27783
27875
|
onAction: (h) => {
|
|
27784
27876
|
const sel = h.selection;
|
|
@@ -27791,41 +27883,41 @@ var textareaTools = {
|
|
|
27791
27883
|
`heading-${level}`,
|
|
27792
27884
|
`${"#".repeat(level)} `,
|
|
27793
27885
|
`H${level}`,
|
|
27794
|
-
/* @__PURE__ */
|
|
27886
|
+
/* @__PURE__ */ jsx128(HeadingIcon, {}),
|
|
27795
27887
|
`Heading ${level}`
|
|
27796
27888
|
),
|
|
27797
27889
|
bulletList: () => prependLineTool(
|
|
27798
27890
|
"ul",
|
|
27799
27891
|
"- ",
|
|
27800
27892
|
"Bullet list",
|
|
27801
|
-
/* @__PURE__ */
|
|
27893
|
+
/* @__PURE__ */ jsx128(ListBulletedIcon, {}),
|
|
27802
27894
|
"Bullet list"
|
|
27803
27895
|
),
|
|
27804
27896
|
numberedList: () => prependLineTool(
|
|
27805
27897
|
"ol",
|
|
27806
27898
|
"1. ",
|
|
27807
27899
|
"Numbered list",
|
|
27808
|
-
/* @__PURE__ */
|
|
27900
|
+
/* @__PURE__ */ jsx128(ListNumberedIcon, {}),
|
|
27809
27901
|
"Numbered list"
|
|
27810
27902
|
),
|
|
27811
27903
|
quote: () => prependLineTool(
|
|
27812
27904
|
"quote",
|
|
27813
27905
|
"> ",
|
|
27814
27906
|
"Quote",
|
|
27815
|
-
/* @__PURE__ */
|
|
27907
|
+
/* @__PURE__ */ jsx128(QuotesIcon2, {}),
|
|
27816
27908
|
"Quote"
|
|
27817
27909
|
),
|
|
27818
27910
|
undo: () => ({
|
|
27819
27911
|
id: "undo",
|
|
27820
27912
|
label: "Undo",
|
|
27821
|
-
icon: /* @__PURE__ */
|
|
27913
|
+
icon: /* @__PURE__ */ jsx128(UndoIcon2, {}),
|
|
27822
27914
|
title: "Undo (\u2318Z)",
|
|
27823
27915
|
onAction: (h) => h.undo()
|
|
27824
27916
|
}),
|
|
27825
27917
|
redo: () => ({
|
|
27826
27918
|
id: "redo",
|
|
27827
27919
|
label: "Redo",
|
|
27828
|
-
icon: /* @__PURE__ */
|
|
27920
|
+
icon: /* @__PURE__ */ jsx128(RedoIcon2, {}),
|
|
27829
27921
|
title: "Redo (\u2318\u21E7Z)",
|
|
27830
27922
|
onAction: (h) => h.redo()
|
|
27831
27923
|
}),
|
|
@@ -27837,7 +27929,7 @@ var textareaTools = {
|
|
|
27837
27929
|
};
|
|
27838
27930
|
|
|
27839
27931
|
// src/components/Textarea/Textarea.tsx
|
|
27840
|
-
import { jsx as
|
|
27932
|
+
import { jsx as jsx129, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
27841
27933
|
var Textarea = forwardRef108(
|
|
27842
27934
|
function Textarea2({
|
|
27843
27935
|
label,
|
|
@@ -27986,7 +28078,7 @@ var Textarea = forwardRef108(
|
|
|
27986
28078
|
minWidth: toCss2(minWidth),
|
|
27987
28079
|
resize: resolvedResize
|
|
27988
28080
|
};
|
|
27989
|
-
return /* @__PURE__ */
|
|
28081
|
+
return /* @__PURE__ */ jsxs122(
|
|
27990
28082
|
"div",
|
|
27991
28083
|
{
|
|
27992
28084
|
className: cn(
|
|
@@ -28000,7 +28092,7 @@ var Textarea = forwardRef108(
|
|
|
28000
28092
|
),
|
|
28001
28093
|
style: consumerStyle,
|
|
28002
28094
|
children: [
|
|
28003
|
-
label && /* @__PURE__ */
|
|
28095
|
+
label && /* @__PURE__ */ jsx129(
|
|
28004
28096
|
"label",
|
|
28005
28097
|
{
|
|
28006
28098
|
...labelProps,
|
|
@@ -28009,15 +28101,15 @@ var Textarea = forwardRef108(
|
|
|
28009
28101
|
children: label
|
|
28010
28102
|
}
|
|
28011
28103
|
),
|
|
28012
|
-
toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */
|
|
28104
|
+
toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */ jsx129(
|
|
28013
28105
|
TextareaToolbar,
|
|
28014
28106
|
{
|
|
28015
28107
|
tools: toolbar.tools,
|
|
28016
28108
|
onRun: toolbar.runTool
|
|
28017
28109
|
}
|
|
28018
28110
|
),
|
|
28019
|
-
/* @__PURE__ */
|
|
28020
|
-
/* @__PURE__ */
|
|
28111
|
+
/* @__PURE__ */ jsxs122("div", { className: "ods-textarea__wrapper", children: [
|
|
28112
|
+
/* @__PURE__ */ jsx129(
|
|
28021
28113
|
"textarea",
|
|
28022
28114
|
{
|
|
28023
28115
|
...props,
|
|
@@ -28042,7 +28134,7 @@ var Textarea = forwardRef108(
|
|
|
28042
28134
|
}
|
|
28043
28135
|
),
|
|
28044
28136
|
cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && createPortal17(
|
|
28045
|
-
/* @__PURE__ */
|
|
28137
|
+
/* @__PURE__ */ jsx129(
|
|
28046
28138
|
"ul",
|
|
28047
28139
|
{
|
|
28048
28140
|
id: `${baseId}-cmd-list`,
|
|
@@ -28054,7 +28146,7 @@ var Textarea = forwardRef108(
|
|
|
28054
28146
|
top: (cmdPalette.caretRect?.bottom ?? 0) + 6,
|
|
28055
28147
|
left: cmdPalette.caretRect?.left ?? 0
|
|
28056
28148
|
},
|
|
28057
|
-
children: cmdPalette.items.map((c, i) => /* @__PURE__ */
|
|
28149
|
+
children: cmdPalette.items.map((c, i) => /* @__PURE__ */ jsxs122(
|
|
28058
28150
|
"li",
|
|
28059
28151
|
{
|
|
28060
28152
|
id: `${baseId}-cmd-${c.id}`,
|
|
@@ -28071,10 +28163,10 @@ var Textarea = forwardRef108(
|
|
|
28071
28163
|
onMouseEnter: () => {
|
|
28072
28164
|
},
|
|
28073
28165
|
children: [
|
|
28074
|
-
c.icon && /* @__PURE__ */
|
|
28075
|
-
/* @__PURE__ */
|
|
28076
|
-
/* @__PURE__ */
|
|
28077
|
-
c.description && /* @__PURE__ */
|
|
28166
|
+
c.icon && /* @__PURE__ */ jsx129("span", { className: "ods-textarea__cmd-icon", children: c.icon }),
|
|
28167
|
+
/* @__PURE__ */ jsxs122("span", { className: "ods-textarea__cmd-text", children: [
|
|
28168
|
+
/* @__PURE__ */ jsx129("span", { className: "ods-textarea__cmd-label", children: c.label }),
|
|
28169
|
+
c.description && /* @__PURE__ */ jsx129("span", { className: "ods-textarea__cmd-desc", children: c.description })
|
|
28078
28170
|
] })
|
|
28079
28171
|
]
|
|
28080
28172
|
},
|
|
@@ -28085,7 +28177,7 @@ var Textarea = forwardRef108(
|
|
|
28085
28177
|
document.body
|
|
28086
28178
|
),
|
|
28087
28179
|
selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && createPortal17(
|
|
28088
|
-
/* @__PURE__ */
|
|
28180
|
+
/* @__PURE__ */ jsxs122(
|
|
28089
28181
|
"div",
|
|
28090
28182
|
{
|
|
28091
28183
|
role: "toolbar",
|
|
@@ -28098,7 +28190,7 @@ var Textarea = forwardRef108(
|
|
|
28098
28190
|
},
|
|
28099
28191
|
onMouseDown: (e) => e.preventDefault(),
|
|
28100
28192
|
children: [
|
|
28101
|
-
/* @__PURE__ */
|
|
28193
|
+
/* @__PURE__ */ jsx129(
|
|
28102
28194
|
"button",
|
|
28103
28195
|
{
|
|
28104
28196
|
type: "button",
|
|
@@ -28106,10 +28198,10 @@ var Textarea = forwardRef108(
|
|
|
28106
28198
|
onClick: () => sel.copy(),
|
|
28107
28199
|
"aria-label": "Copy selection",
|
|
28108
28200
|
title: "Copy",
|
|
28109
|
-
children: /* @__PURE__ */
|
|
28201
|
+
children: /* @__PURE__ */ jsx129(CopyIcon5, { size: "xs" })
|
|
28110
28202
|
}
|
|
28111
28203
|
),
|
|
28112
|
-
/* @__PURE__ */
|
|
28204
|
+
/* @__PURE__ */ jsx129(
|
|
28113
28205
|
"button",
|
|
28114
28206
|
{
|
|
28115
28207
|
type: "button",
|
|
@@ -28117,10 +28209,10 @@ var Textarea = forwardRef108(
|
|
|
28117
28209
|
onClick: () => sel.cut(),
|
|
28118
28210
|
"aria-label": "Cut selection",
|
|
28119
28211
|
title: "Cut",
|
|
28120
|
-
children: /* @__PURE__ */
|
|
28212
|
+
children: /* @__PURE__ */ jsx129(CutIcon, { size: "xs" })
|
|
28121
28213
|
}
|
|
28122
28214
|
),
|
|
28123
|
-
selectionActions?.map((a) => /* @__PURE__ */
|
|
28215
|
+
selectionActions?.map((a) => /* @__PURE__ */ jsxs122(
|
|
28124
28216
|
"button",
|
|
28125
28217
|
{
|
|
28126
28218
|
type: "button",
|
|
@@ -28134,7 +28226,7 @@ var Textarea = forwardRef108(
|
|
|
28134
28226
|
title: typeof a.label === "string" ? a.label : void 0,
|
|
28135
28227
|
children: [
|
|
28136
28228
|
a.icon,
|
|
28137
|
-
a.label && /* @__PURE__ */
|
|
28229
|
+
a.label && /* @__PURE__ */ jsx129("span", { className: "ods-textarea__sel-btn-label", children: a.label })
|
|
28138
28230
|
]
|
|
28139
28231
|
},
|
|
28140
28232
|
a.id
|
|
@@ -28144,7 +28236,7 @@ var Textarea = forwardRef108(
|
|
|
28144
28236
|
),
|
|
28145
28237
|
document.body
|
|
28146
28238
|
),
|
|
28147
|
-
maxLength != null && /* @__PURE__ */
|
|
28239
|
+
maxLength != null && /* @__PURE__ */ jsxs122(
|
|
28148
28240
|
"span",
|
|
28149
28241
|
{
|
|
28150
28242
|
className: "ods-textarea__count",
|
|
@@ -28157,14 +28249,14 @@ var Textarea = forwardRef108(
|
|
|
28157
28249
|
}
|
|
28158
28250
|
)
|
|
28159
28251
|
] }),
|
|
28160
|
-
toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */
|
|
28252
|
+
toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */ jsx129(
|
|
28161
28253
|
TextareaToolbar,
|
|
28162
28254
|
{
|
|
28163
28255
|
tools: toolbar.tools,
|
|
28164
28256
|
onRun: toolbar.runTool
|
|
28165
28257
|
}
|
|
28166
28258
|
),
|
|
28167
|
-
error && errorMessage ? /* @__PURE__ */
|
|
28259
|
+
error && errorMessage ? /* @__PURE__ */ jsx129(
|
|
28168
28260
|
"div",
|
|
28169
28261
|
{
|
|
28170
28262
|
id: hintId,
|
|
@@ -28172,7 +28264,7 @@ var Textarea = forwardRef108(
|
|
|
28172
28264
|
role: "alert",
|
|
28173
28265
|
children: errorMessage
|
|
28174
28266
|
}
|
|
28175
|
-
) : helperText ? /* @__PURE__ */
|
|
28267
|
+
) : helperText ? /* @__PURE__ */ jsx129("div", { id: hintId, className: "ods-textarea__hint", children: helperText }) : null
|
|
28176
28268
|
]
|
|
28177
28269
|
}
|
|
28178
28270
|
);
|
|
@@ -28183,7 +28275,7 @@ function TextareaToolbar({
|
|
|
28183
28275
|
tools,
|
|
28184
28276
|
onRun
|
|
28185
28277
|
}) {
|
|
28186
|
-
return /* @__PURE__ */
|
|
28278
|
+
return /* @__PURE__ */ jsx129(
|
|
28187
28279
|
"div",
|
|
28188
28280
|
{
|
|
28189
28281
|
role: "toolbar",
|
|
@@ -28196,7 +28288,7 @@ function TextareaToolbar({
|
|
|
28196
28288
|
},
|
|
28197
28289
|
children: tools.map((t) => {
|
|
28198
28290
|
if (t.kind === "divider") {
|
|
28199
|
-
return /* @__PURE__ */
|
|
28291
|
+
return /* @__PURE__ */ jsx129(
|
|
28200
28292
|
"span",
|
|
28201
28293
|
{
|
|
28202
28294
|
className: "ods-textarea__toolbar-divider",
|
|
@@ -28205,7 +28297,7 @@ function TextareaToolbar({
|
|
|
28205
28297
|
t.id
|
|
28206
28298
|
);
|
|
28207
28299
|
}
|
|
28208
|
-
return /* @__PURE__ */
|
|
28300
|
+
return /* @__PURE__ */ jsx129(
|
|
28209
28301
|
"button",
|
|
28210
28302
|
{
|
|
28211
28303
|
type: "button",
|
|
@@ -28213,7 +28305,7 @@ function TextareaToolbar({
|
|
|
28213
28305
|
title: t.title ?? (typeof t.label === "string" ? t.label : void 0),
|
|
28214
28306
|
"aria-label": typeof t.label === "string" ? t.label : t.id,
|
|
28215
28307
|
onClick: () => onRun(t.id),
|
|
28216
|
-
children: t.icon ? /* @__PURE__ */
|
|
28308
|
+
children: t.icon ? /* @__PURE__ */ jsx129("span", { className: "ods-textarea__toolbar-icon", children: t.icon }) : /* @__PURE__ */ jsx129("span", { className: "ods-textarea__toolbar-text", children: t.label })
|
|
28217
28309
|
},
|
|
28218
28310
|
t.id
|
|
28219
28311
|
);
|
|
@@ -28227,7 +28319,7 @@ import { AnimatePresence as AnimatePresence21, motion as motion34 } from "framer
|
|
|
28227
28319
|
import {
|
|
28228
28320
|
forwardRef as forwardRef109
|
|
28229
28321
|
} from "react";
|
|
28230
|
-
import { jsx as
|
|
28322
|
+
import { jsx as jsx130, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
28231
28323
|
var Timeline = forwardRef109(
|
|
28232
28324
|
function Timeline2({
|
|
28233
28325
|
items,
|
|
@@ -28237,16 +28329,16 @@ var Timeline = forwardRef109(
|
|
|
28237
28329
|
className,
|
|
28238
28330
|
...rest
|
|
28239
28331
|
}, ref) {
|
|
28240
|
-
return /* @__PURE__ */
|
|
28332
|
+
return /* @__PURE__ */ jsx130(
|
|
28241
28333
|
"ol",
|
|
28242
28334
|
{
|
|
28243
28335
|
...rest,
|
|
28244
28336
|
ref,
|
|
28245
28337
|
className: cn("ods-timeline", `ods-timeline--${size}`, className),
|
|
28246
|
-
children: /* @__PURE__ */
|
|
28338
|
+
children: /* @__PURE__ */ jsx130(AnimatePresence21, { initial: false, children: items.map((item, idx) => {
|
|
28247
28339
|
const last = idx === items.length - 1;
|
|
28248
28340
|
const status = item.status ?? "default";
|
|
28249
|
-
return /* @__PURE__ */
|
|
28341
|
+
return /* @__PURE__ */ jsxs123(
|
|
28250
28342
|
motion34.li,
|
|
28251
28343
|
{
|
|
28252
28344
|
layout: animated,
|
|
@@ -28263,8 +28355,8 @@ var Timeline = forwardRef109(
|
|
|
28263
28355
|
delay: animated ? idx * staggerDelay / 1e3 : 0
|
|
28264
28356
|
},
|
|
28265
28357
|
children: [
|
|
28266
|
-
/* @__PURE__ */
|
|
28267
|
-
/* @__PURE__ */
|
|
28358
|
+
/* @__PURE__ */ jsxs123("div", { className: "ods-timeline__rail", children: [
|
|
28359
|
+
/* @__PURE__ */ jsx130(
|
|
28268
28360
|
"span",
|
|
28269
28361
|
{
|
|
28270
28362
|
className: cn(
|
|
@@ -28275,12 +28367,12 @@ var Timeline = forwardRef109(
|
|
|
28275
28367
|
children: item.icon
|
|
28276
28368
|
}
|
|
28277
28369
|
),
|
|
28278
|
-
!last && /* @__PURE__ */
|
|
28370
|
+
!last && /* @__PURE__ */ jsx130("span", { className: "ods-timeline__line", "aria-hidden": "true" })
|
|
28279
28371
|
] }),
|
|
28280
|
-
/* @__PURE__ */
|
|
28281
|
-
/* @__PURE__ */
|
|
28282
|
-
item.description && /* @__PURE__ */
|
|
28283
|
-
item.meta && /* @__PURE__ */
|
|
28372
|
+
/* @__PURE__ */ jsxs123("div", { className: "ods-timeline__body", children: [
|
|
28373
|
+
/* @__PURE__ */ jsx130("div", { className: "ods-timeline__title", children: item.title }),
|
|
28374
|
+
item.description && /* @__PURE__ */ jsx130("div", { className: "ods-timeline__desc", children: item.description }),
|
|
28375
|
+
item.meta && /* @__PURE__ */ jsx130("div", { className: "ods-timeline__meta", children: item.meta })
|
|
28284
28376
|
] })
|
|
28285
28377
|
]
|
|
28286
28378
|
},
|
|
@@ -28296,7 +28388,7 @@ Timeline.displayName = "Timeline";
|
|
|
28296
28388
|
// src/components/TimePicker/TimePicker.tsx
|
|
28297
28389
|
import {
|
|
28298
28390
|
forwardRef as forwardRef110,
|
|
28299
|
-
Fragment as
|
|
28391
|
+
Fragment as Fragment46,
|
|
28300
28392
|
useCallback as useCallback46,
|
|
28301
28393
|
useEffect as useEffect47,
|
|
28302
28394
|
useId as useId60,
|
|
@@ -28310,7 +28402,7 @@ import {
|
|
|
28310
28402
|
ChevronDownIcon as ChevronDownIcon8,
|
|
28311
28403
|
TimeIcon as TimeIcon2
|
|
28312
28404
|
} from "@octaviaflow/icons";
|
|
28313
|
-
import { Fragment as
|
|
28405
|
+
import { Fragment as Fragment47, jsx as jsx131, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
28314
28406
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
28315
28407
|
function format(v, use24h, showSeconds) {
|
|
28316
28408
|
const base = `${pad(v.hours)}:${pad(v.minutes)}${showSeconds ? `:${pad(v.seconds ?? 0)}` : ""}`;
|
|
@@ -28542,7 +28634,7 @@ var TimePicker = forwardRef110(
|
|
|
28542
28634
|
if (draft && draft.seg === seg) return draft.digits.padStart(2, "0");
|
|
28543
28635
|
return pad(val);
|
|
28544
28636
|
};
|
|
28545
|
-
const segButton = (seg, val) => /* @__PURE__ */
|
|
28637
|
+
const segButton = (seg, val) => /* @__PURE__ */ jsx131(
|
|
28546
28638
|
"button",
|
|
28547
28639
|
{
|
|
28548
28640
|
ref: refOf(seg),
|
|
@@ -28562,7 +28654,7 @@ var TimePicker = forwardRef110(
|
|
|
28562
28654
|
children: segDisplay(seg, val)
|
|
28563
28655
|
}
|
|
28564
28656
|
);
|
|
28565
|
-
return /* @__PURE__ */
|
|
28657
|
+
return /* @__PURE__ */ jsxs124(
|
|
28566
28658
|
"div",
|
|
28567
28659
|
{
|
|
28568
28660
|
...rest,
|
|
@@ -28575,7 +28667,7 @@ var TimePicker = forwardRef110(
|
|
|
28575
28667
|
className
|
|
28576
28668
|
),
|
|
28577
28669
|
children: [
|
|
28578
|
-
label && /* @__PURE__ */
|
|
28670
|
+
label && /* @__PURE__ */ jsx131(
|
|
28579
28671
|
"label",
|
|
28580
28672
|
{
|
|
28581
28673
|
id: labelId,
|
|
@@ -28584,7 +28676,7 @@ var TimePicker = forwardRef110(
|
|
|
28584
28676
|
children: label
|
|
28585
28677
|
}
|
|
28586
28678
|
),
|
|
28587
|
-
/* @__PURE__ */
|
|
28679
|
+
/* @__PURE__ */ jsxs124(
|
|
28588
28680
|
"button",
|
|
28589
28681
|
{
|
|
28590
28682
|
type: "button",
|
|
@@ -28600,9 +28692,9 @@ var TimePicker = forwardRef110(
|
|
|
28600
28692
|
"aria-describedby": describedBy,
|
|
28601
28693
|
"aria-invalid": error ? true : void 0,
|
|
28602
28694
|
children: [
|
|
28603
|
-
/* @__PURE__ */
|
|
28604
|
-
/* @__PURE__ */
|
|
28605
|
-
/* @__PURE__ */
|
|
28695
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx131(TimeIcon2, { size: "xs" }) }),
|
|
28696
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__value", children: format(value, use24h, showSeconds) }),
|
|
28697
|
+
/* @__PURE__ */ jsx131(
|
|
28606
28698
|
"span",
|
|
28607
28699
|
{
|
|
28608
28700
|
className: cn(
|
|
@@ -28610,14 +28702,14 @@ var TimePicker = forwardRef110(
|
|
|
28610
28702
|
open && "ods-timepicker__chev--open"
|
|
28611
28703
|
),
|
|
28612
28704
|
"aria-hidden": "true",
|
|
28613
|
-
children: /* @__PURE__ */
|
|
28705
|
+
children: /* @__PURE__ */ jsx131(ChevronDownIcon8, { size: "xs" })
|
|
28614
28706
|
}
|
|
28615
28707
|
)
|
|
28616
28708
|
]
|
|
28617
28709
|
}
|
|
28618
28710
|
),
|
|
28619
28711
|
open && typeof document !== "undefined" && createPortal18(
|
|
28620
|
-
/* @__PURE__ */
|
|
28712
|
+
/* @__PURE__ */ jsxs124(
|
|
28621
28713
|
"div",
|
|
28622
28714
|
{
|
|
28623
28715
|
ref: popoverRef,
|
|
@@ -28626,18 +28718,18 @@ var TimePicker = forwardRef110(
|
|
|
28626
28718
|
"aria-label": "Select time",
|
|
28627
28719
|
style: anchoredPopoverStyle(popoverPos),
|
|
28628
28720
|
children: [
|
|
28629
|
-
/* @__PURE__ */
|
|
28630
|
-
/* @__PURE__ */
|
|
28721
|
+
/* @__PURE__ */ jsxs124("div", { className: "ods-timepicker__head", children: [
|
|
28722
|
+
/* @__PURE__ */ jsxs124("div", { className: "ods-timepicker__display", children: [
|
|
28631
28723
|
segButton("hours", value.hours),
|
|
28632
|
-
/* @__PURE__ */
|
|
28724
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
28633
28725
|
segButton("minutes", value.minutes),
|
|
28634
|
-
showSeconds && /* @__PURE__ */
|
|
28635
|
-
/* @__PURE__ */
|
|
28726
|
+
showSeconds && /* @__PURE__ */ jsxs124(Fragment47, { children: [
|
|
28727
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
28636
28728
|
segButton("seconds", value.seconds ?? 0)
|
|
28637
28729
|
] })
|
|
28638
28730
|
] }),
|
|
28639
|
-
!use24h && /* @__PURE__ */
|
|
28640
|
-
/* @__PURE__ */
|
|
28731
|
+
!use24h && /* @__PURE__ */ jsxs124("div", { className: "ods-timepicker__period", children: [
|
|
28732
|
+
/* @__PURE__ */ jsx131(
|
|
28641
28733
|
"button",
|
|
28642
28734
|
{
|
|
28643
28735
|
type: "button",
|
|
@@ -28649,7 +28741,7 @@ var TimePicker = forwardRef110(
|
|
|
28649
28741
|
children: "AM"
|
|
28650
28742
|
}
|
|
28651
28743
|
),
|
|
28652
|
-
/* @__PURE__ */
|
|
28744
|
+
/* @__PURE__ */ jsx131(
|
|
28653
28745
|
"button",
|
|
28654
28746
|
{
|
|
28655
28747
|
type: "button",
|
|
@@ -28663,41 +28755,41 @@ var TimePicker = forwardRef110(
|
|
|
28663
28755
|
)
|
|
28664
28756
|
] })
|
|
28665
28757
|
] }),
|
|
28666
|
-
/* @__PURE__ */
|
|
28667
|
-
/* @__PURE__ */
|
|
28668
|
-
/* @__PURE__ */
|
|
28669
|
-
/* @__PURE__ */
|
|
28758
|
+
/* @__PURE__ */ jsx131("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs124(Fragment46, { children: [
|
|
28759
|
+
/* @__PURE__ */ jsxs124("div", { className: "ods-timepicker__col", children: [
|
|
28760
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
|
|
28761
|
+
/* @__PURE__ */ jsx131(
|
|
28670
28762
|
"button",
|
|
28671
28763
|
{
|
|
28672
28764
|
type: "button",
|
|
28673
28765
|
className: "ods-timepicker__step",
|
|
28674
28766
|
onClick: () => stepBy(seg, 1),
|
|
28675
28767
|
"aria-label": `${seg} up`,
|
|
28676
|
-
children: /* @__PURE__ */
|
|
28768
|
+
children: /* @__PURE__ */ jsx131(CaretUpIcon3, { size: "xs" })
|
|
28677
28769
|
}
|
|
28678
28770
|
),
|
|
28679
|
-
/* @__PURE__ */
|
|
28771
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-timepicker__col-val", children: pad(
|
|
28680
28772
|
seg === "hours" ? value.hours : seg === "minutes" ? value.minutes : value.seconds ?? 0
|
|
28681
28773
|
) }),
|
|
28682
|
-
/* @__PURE__ */
|
|
28774
|
+
/* @__PURE__ */ jsx131(
|
|
28683
28775
|
"button",
|
|
28684
28776
|
{
|
|
28685
28777
|
type: "button",
|
|
28686
28778
|
className: "ods-timepicker__step",
|
|
28687
28779
|
onClick: () => stepBy(seg, -1),
|
|
28688
28780
|
"aria-label": `${seg} down`,
|
|
28689
|
-
children: /* @__PURE__ */
|
|
28781
|
+
children: /* @__PURE__ */ jsx131(CaretDownIcon3, { size: "xs" })
|
|
28690
28782
|
}
|
|
28691
28783
|
)
|
|
28692
28784
|
] }),
|
|
28693
|
-
i < arr.length - 1 && /* @__PURE__ */
|
|
28785
|
+
i < arr.length - 1 && /* @__PURE__ */ jsx131("span", { className: "ods-timepicker__sep", children: ":" })
|
|
28694
28786
|
] }, seg)) })
|
|
28695
28787
|
]
|
|
28696
28788
|
}
|
|
28697
28789
|
),
|
|
28698
28790
|
document.body
|
|
28699
28791
|
),
|
|
28700
|
-
error ? /* @__PURE__ */
|
|
28792
|
+
error ? /* @__PURE__ */ jsx131(
|
|
28701
28793
|
"div",
|
|
28702
28794
|
{
|
|
28703
28795
|
id: hintId,
|
|
@@ -28705,7 +28797,7 @@ var TimePicker = forwardRef110(
|
|
|
28705
28797
|
role: "alert",
|
|
28706
28798
|
children: error
|
|
28707
28799
|
}
|
|
28708
|
-
) : helperText ? /* @__PURE__ */
|
|
28800
|
+
) : helperText ? /* @__PURE__ */ jsx131("div", { id: hintId, className: "ods-timepicker__hint", children: helperText }) : null
|
|
28709
28801
|
]
|
|
28710
28802
|
}
|
|
28711
28803
|
);
|
|
@@ -28729,7 +28821,7 @@ import {
|
|
|
28729
28821
|
GlobeIcon,
|
|
28730
28822
|
SearchIcon as SearchIcon10
|
|
28731
28823
|
} from "@octaviaflow/icons";
|
|
28732
|
-
import { Fragment as
|
|
28824
|
+
import { Fragment as Fragment48, jsx as jsx132, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
28733
28825
|
var DEFAULT_TZS = [
|
|
28734
28826
|
{ iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
|
|
28735
28827
|
{ iana: "America/Denver", label: "Mountain Time", offset: "UTC\u22127" },
|
|
@@ -28864,7 +28956,7 @@ var TimezonePicker = forwardRef111(
|
|
|
28864
28956
|
const setTriggerRef = (node) => {
|
|
28865
28957
|
triggerRef.current = node;
|
|
28866
28958
|
};
|
|
28867
|
-
return /* @__PURE__ */
|
|
28959
|
+
return /* @__PURE__ */ jsxs125(
|
|
28868
28960
|
"div",
|
|
28869
28961
|
{
|
|
28870
28962
|
...rest,
|
|
@@ -28877,7 +28969,7 @@ var TimezonePicker = forwardRef111(
|
|
|
28877
28969
|
className
|
|
28878
28970
|
),
|
|
28879
28971
|
children: [
|
|
28880
|
-
label && /* @__PURE__ */
|
|
28972
|
+
label && /* @__PURE__ */ jsx132(
|
|
28881
28973
|
"label",
|
|
28882
28974
|
{
|
|
28883
28975
|
id: labelId,
|
|
@@ -28886,7 +28978,7 @@ var TimezonePicker = forwardRef111(
|
|
|
28886
28978
|
children: label
|
|
28887
28979
|
}
|
|
28888
28980
|
),
|
|
28889
|
-
/* @__PURE__ */
|
|
28981
|
+
/* @__PURE__ */ jsxs125(
|
|
28890
28982
|
"button",
|
|
28891
28983
|
{
|
|
28892
28984
|
ref: setTriggerRef,
|
|
@@ -28903,17 +28995,17 @@ var TimezonePicker = forwardRef111(
|
|
|
28903
28995
|
"aria-describedby": describedBy,
|
|
28904
28996
|
"aria-invalid": error ? true : void 0,
|
|
28905
28997
|
children: [
|
|
28906
|
-
/* @__PURE__ */
|
|
28907
|
-
/* @__PURE__ */
|
|
28908
|
-
/* @__PURE__ */
|
|
28909
|
-
/* @__PURE__ */
|
|
28998
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx132(GlobeIcon, { size: "xs" }) }),
|
|
28999
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__info", children: selected ? /* @__PURE__ */ jsxs125(Fragment48, { children: [
|
|
29000
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__name", children: selected.label }),
|
|
29001
|
+
/* @__PURE__ */ jsxs125("span", { className: "ods-tzpicker__meta", children: [
|
|
28910
29002
|
selected.iana.split("/").pop()?.replace(/_/g, " "),
|
|
28911
29003
|
" \xB7",
|
|
28912
29004
|
" ",
|
|
28913
29005
|
selected.offset
|
|
28914
29006
|
] })
|
|
28915
|
-
] }) : /* @__PURE__ */
|
|
28916
|
-
/* @__PURE__ */
|
|
29007
|
+
] }) : /* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__name ods-tzpicker__name--placeholder", children: placeholder }) }),
|
|
29008
|
+
/* @__PURE__ */ jsx132(
|
|
28917
29009
|
"span",
|
|
28918
29010
|
{
|
|
28919
29011
|
className: cn(
|
|
@@ -28921,13 +29013,13 @@ var TimezonePicker = forwardRef111(
|
|
|
28921
29013
|
open && "ods-tzpicker__chev--open"
|
|
28922
29014
|
),
|
|
28923
29015
|
"aria-hidden": "true",
|
|
28924
|
-
children: /* @__PURE__ */
|
|
29016
|
+
children: /* @__PURE__ */ jsx132(ChevronDownIcon9, { size: "xs" })
|
|
28925
29017
|
}
|
|
28926
29018
|
)
|
|
28927
29019
|
]
|
|
28928
29020
|
}
|
|
28929
29021
|
),
|
|
28930
|
-
open && /* @__PURE__ */
|
|
29022
|
+
open && /* @__PURE__ */ jsxs125(
|
|
28931
29023
|
"div",
|
|
28932
29024
|
{
|
|
28933
29025
|
className: "ods-tzpicker__popover",
|
|
@@ -28935,9 +29027,9 @@ var TimezonePicker = forwardRef111(
|
|
|
28935
29027
|
"aria-label": "Select timezone",
|
|
28936
29028
|
onKeyDown: handlePopoverKey,
|
|
28937
29029
|
children: [
|
|
28938
|
-
/* @__PURE__ */
|
|
28939
|
-
/* @__PURE__ */
|
|
28940
|
-
/* @__PURE__ */
|
|
29030
|
+
/* @__PURE__ */ jsxs125("div", { className: "ods-tzpicker__search", children: [
|
|
29031
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__search-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx132(SearchIcon10, { size: "xs" }) }),
|
|
29032
|
+
/* @__PURE__ */ jsx132(
|
|
28941
29033
|
"input",
|
|
28942
29034
|
{
|
|
28943
29035
|
ref: inputRef,
|
|
@@ -28953,7 +29045,7 @@ var TimezonePicker = forwardRef111(
|
|
|
28953
29045
|
}
|
|
28954
29046
|
)
|
|
28955
29047
|
] }),
|
|
28956
|
-
/* @__PURE__ */
|
|
29048
|
+
/* @__PURE__ */ jsxs125(
|
|
28957
29049
|
"ul",
|
|
28958
29050
|
{
|
|
28959
29051
|
ref: listRef,
|
|
@@ -28962,11 +29054,11 @@ var TimezonePicker = forwardRef111(
|
|
|
28962
29054
|
role: "listbox",
|
|
28963
29055
|
"aria-labelledby": labelId,
|
|
28964
29056
|
children: [
|
|
28965
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
29057
|
+
filtered.length === 0 && /* @__PURE__ */ jsx132("li", { className: "ods-tzpicker__empty", role: "presentation", children: "No timezones found" }),
|
|
28966
29058
|
filtered.map((opt, i) => {
|
|
28967
29059
|
const isSelected = opt.iana === value;
|
|
28968
29060
|
const isActive2 = i === activeIndex;
|
|
28969
|
-
return /* @__PURE__ */
|
|
29061
|
+
return /* @__PURE__ */ jsx132("li", { role: "presentation", children: /* @__PURE__ */ jsxs125(
|
|
28970
29062
|
"button",
|
|
28971
29063
|
{
|
|
28972
29064
|
type: "button",
|
|
@@ -28983,17 +29075,17 @@ var TimezonePicker = forwardRef111(
|
|
|
28983
29075
|
onClick: () => select(opt.iana),
|
|
28984
29076
|
onMouseEnter: () => setActiveIndex(i),
|
|
28985
29077
|
children: [
|
|
28986
|
-
/* @__PURE__ */
|
|
28987
|
-
/* @__PURE__ */
|
|
28988
|
-
/* @__PURE__ */
|
|
29078
|
+
/* @__PURE__ */ jsxs125("span", { className: "ods-tzpicker__opt-text", children: [
|
|
29079
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__opt-name", children: opt.label }),
|
|
29080
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__opt-iana", children: opt.iana })
|
|
28989
29081
|
] }),
|
|
28990
|
-
/* @__PURE__ */
|
|
28991
|
-
isSelected && /* @__PURE__ */
|
|
29082
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-tzpicker__opt-off", children: opt.offset }),
|
|
29083
|
+
isSelected && /* @__PURE__ */ jsx132(
|
|
28992
29084
|
"span",
|
|
28993
29085
|
{
|
|
28994
29086
|
className: "ods-tzpicker__opt-check",
|
|
28995
29087
|
"aria-hidden": "true",
|
|
28996
|
-
children: /* @__PURE__ */
|
|
29088
|
+
children: /* @__PURE__ */ jsx132(CheckmarkIcon12, { size: "xs" })
|
|
28997
29089
|
}
|
|
28998
29090
|
)
|
|
28999
29091
|
]
|
|
@@ -29006,7 +29098,7 @@ var TimezonePicker = forwardRef111(
|
|
|
29006
29098
|
]
|
|
29007
29099
|
}
|
|
29008
29100
|
),
|
|
29009
|
-
error ? /* @__PURE__ */
|
|
29101
|
+
error ? /* @__PURE__ */ jsx132(
|
|
29010
29102
|
"div",
|
|
29011
29103
|
{
|
|
29012
29104
|
id: hintId,
|
|
@@ -29014,7 +29106,7 @@ var TimezonePicker = forwardRef111(
|
|
|
29014
29106
|
role: "alert",
|
|
29015
29107
|
children: error
|
|
29016
29108
|
}
|
|
29017
|
-
) : helperText ? /* @__PURE__ */
|
|
29109
|
+
) : helperText ? /* @__PURE__ */ jsx132("div", { id: hintId, className: "ods-tzpicker__hint", children: helperText }) : null
|
|
29018
29110
|
]
|
|
29019
29111
|
}
|
|
29020
29112
|
);
|
|
@@ -29033,10 +29125,10 @@ import {
|
|
|
29033
29125
|
useState as useState64
|
|
29034
29126
|
} from "react";
|
|
29035
29127
|
import { createPortal as createPortal19 } from "react-dom";
|
|
29036
|
-
import { Fragment as
|
|
29128
|
+
import { Fragment as Fragment49, jsx as jsx133, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
29037
29129
|
var defaultIcons = {
|
|
29038
|
-
success: /* @__PURE__ */
|
|
29039
|
-
/* @__PURE__ */
|
|
29130
|
+
success: /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29131
|
+
/* @__PURE__ */ jsx133(
|
|
29040
29132
|
"circle",
|
|
29041
29133
|
{
|
|
29042
29134
|
cx: "8",
|
|
@@ -29046,7 +29138,7 @@ var defaultIcons = {
|
|
|
29046
29138
|
stroke: "var(--ods-status-success-bd)"
|
|
29047
29139
|
}
|
|
29048
29140
|
),
|
|
29049
|
-
/* @__PURE__ */
|
|
29141
|
+
/* @__PURE__ */ jsx133(
|
|
29050
29142
|
"path",
|
|
29051
29143
|
{
|
|
29052
29144
|
d: "m5 8 2 2 4-4.5",
|
|
@@ -29057,8 +29149,8 @@ var defaultIcons = {
|
|
|
29057
29149
|
}
|
|
29058
29150
|
)
|
|
29059
29151
|
] }),
|
|
29060
|
-
error: /* @__PURE__ */
|
|
29061
|
-
/* @__PURE__ */
|
|
29152
|
+
error: /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29153
|
+
/* @__PURE__ */ jsx133(
|
|
29062
29154
|
"circle",
|
|
29063
29155
|
{
|
|
29064
29156
|
cx: "8",
|
|
@@ -29068,7 +29160,7 @@ var defaultIcons = {
|
|
|
29068
29160
|
stroke: "var(--ods-status-failed-bd)"
|
|
29069
29161
|
}
|
|
29070
29162
|
),
|
|
29071
|
-
/* @__PURE__ */
|
|
29163
|
+
/* @__PURE__ */ jsx133(
|
|
29072
29164
|
"path",
|
|
29073
29165
|
{
|
|
29074
29166
|
d: "M5.5 5.5l5 5M10.5 5.5l-5 5",
|
|
@@ -29078,8 +29170,8 @@ var defaultIcons = {
|
|
|
29078
29170
|
}
|
|
29079
29171
|
)
|
|
29080
29172
|
] }),
|
|
29081
|
-
warning: /* @__PURE__ */
|
|
29082
|
-
/* @__PURE__ */
|
|
29173
|
+
warning: /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29174
|
+
/* @__PURE__ */ jsx133(
|
|
29083
29175
|
"circle",
|
|
29084
29176
|
{
|
|
29085
29177
|
cx: "8",
|
|
@@ -29089,7 +29181,7 @@ var defaultIcons = {
|
|
|
29089
29181
|
stroke: "var(--ods-status-pending-bd)"
|
|
29090
29182
|
}
|
|
29091
29183
|
),
|
|
29092
|
-
/* @__PURE__ */
|
|
29184
|
+
/* @__PURE__ */ jsx133(
|
|
29093
29185
|
"path",
|
|
29094
29186
|
{
|
|
29095
29187
|
d: "M8 4.5v4.2M8 11v.5",
|
|
@@ -29099,8 +29191,8 @@ var defaultIcons = {
|
|
|
29099
29191
|
}
|
|
29100
29192
|
)
|
|
29101
29193
|
] }),
|
|
29102
|
-
info: /* @__PURE__ */
|
|
29103
|
-
/* @__PURE__ */
|
|
29194
|
+
info: /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29195
|
+
/* @__PURE__ */ jsx133(
|
|
29104
29196
|
"circle",
|
|
29105
29197
|
{
|
|
29106
29198
|
cx: "8",
|
|
@@ -29110,7 +29202,7 @@ var defaultIcons = {
|
|
|
29110
29202
|
stroke: "var(--ods-status-running-bd)"
|
|
29111
29203
|
}
|
|
29112
29204
|
),
|
|
29113
|
-
/* @__PURE__ */
|
|
29205
|
+
/* @__PURE__ */ jsx133(
|
|
29114
29206
|
"path",
|
|
29115
29207
|
{
|
|
29116
29208
|
d: "M8 7.5v4M8 4.5v.5",
|
|
@@ -29124,19 +29216,19 @@ var defaultIcons = {
|
|
|
29124
29216
|
var ToastContext = createContext2(null);
|
|
29125
29217
|
function ToastBody({ item, onDismiss }) {
|
|
29126
29218
|
const dismiss = () => onDismiss(item.id);
|
|
29127
|
-
if (item.render) return /* @__PURE__ */
|
|
29219
|
+
if (item.render) return /* @__PURE__ */ jsx133(Fragment49, { children: item.render({ id: item.id, dismiss }) });
|
|
29128
29220
|
const title = item.title ?? item.message;
|
|
29129
|
-
return /* @__PURE__ */
|
|
29130
|
-
/* @__PURE__ */
|
|
29131
|
-
/* @__PURE__ */
|
|
29132
|
-
title && /* @__PURE__ */
|
|
29133
|
-
item.description && /* @__PURE__ */
|
|
29221
|
+
return /* @__PURE__ */ jsxs126(Fragment49, { children: [
|
|
29222
|
+
/* @__PURE__ */ jsx133("span", { className: "ods-toast__icon", "aria-hidden": "true", children: item.icon ?? defaultIcons[item.variant] }),
|
|
29223
|
+
/* @__PURE__ */ jsxs126("div", { className: "ods-toast__body", children: [
|
|
29224
|
+
title && /* @__PURE__ */ jsx133("div", { className: "ods-toast__title", children: title }),
|
|
29225
|
+
item.description && /* @__PURE__ */ jsx133("div", { className: "ods-toast__desc", children: item.description })
|
|
29134
29226
|
] }),
|
|
29135
|
-
(item.actionLabel || item.action) && /* @__PURE__ */
|
|
29227
|
+
(item.actionLabel || item.action) && /* @__PURE__ */ jsx133("div", { className: "ods-toast__action", children: item.actionLabel ? (
|
|
29136
29228
|
// First-class action chip — consistent styling, auto-dismiss
|
|
29137
29229
|
// after the consumer's onAction runs. This is the path most
|
|
29138
29230
|
// consumers should use ("Undo", "Retry", "View").
|
|
29139
|
-
/* @__PURE__ */
|
|
29231
|
+
/* @__PURE__ */ jsx133(
|
|
29140
29232
|
"button",
|
|
29141
29233
|
{
|
|
29142
29234
|
type: "button",
|
|
@@ -29155,7 +29247,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
29155
29247
|
// (including any explicit dismiss() they want to call).
|
|
29156
29248
|
item.action
|
|
29157
29249
|
) }),
|
|
29158
|
-
item.closeable && /* @__PURE__ */
|
|
29250
|
+
item.closeable && /* @__PURE__ */ jsx133(
|
|
29159
29251
|
"button",
|
|
29160
29252
|
{
|
|
29161
29253
|
type: "button",
|
|
@@ -29165,7 +29257,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
29165
29257
|
e.stopPropagation();
|
|
29166
29258
|
dismiss();
|
|
29167
29259
|
},
|
|
29168
|
-
children: /* @__PURE__ */
|
|
29260
|
+
children: /* @__PURE__ */ jsx133("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx133(
|
|
29169
29261
|
"path",
|
|
29170
29262
|
{
|
|
29171
29263
|
d: "M3 3l8 8M11 3l-8 8",
|
|
@@ -29198,7 +29290,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29198
29290
|
}
|
|
29199
29291
|
return { y: maxStack * 10 * dir, scale: 1 - maxStack * 0.05, opacity: 0 };
|
|
29200
29292
|
};
|
|
29201
|
-
return /* @__PURE__ */
|
|
29293
|
+
return /* @__PURE__ */ jsxs126(
|
|
29202
29294
|
"div",
|
|
29203
29295
|
{
|
|
29204
29296
|
className: cn(
|
|
@@ -29211,7 +29303,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29211
29303
|
onMouseLeave: () => setHovered(false),
|
|
29212
29304
|
"aria-live": "polite",
|
|
29213
29305
|
children: [
|
|
29214
|
-
/* @__PURE__ */
|
|
29306
|
+
/* @__PURE__ */ jsx133(
|
|
29215
29307
|
"div",
|
|
29216
29308
|
{
|
|
29217
29309
|
className: cn("ods-toast-stack__scroll", expanded && "ods-toast-stack__scroll--expanded"),
|
|
@@ -29221,9 +29313,9 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29221
29313
|
setPinned((p) => !p);
|
|
29222
29314
|
}
|
|
29223
29315
|
},
|
|
29224
|
-
children: /* @__PURE__ */
|
|
29316
|
+
children: /* @__PURE__ */ jsx133(AnimatePresence22, { mode: "popLayout", children: ordered.map((item, idx) => {
|
|
29225
29317
|
const s = stackedStyle(idx);
|
|
29226
|
-
return /* @__PURE__ */
|
|
29318
|
+
return /* @__PURE__ */ jsx133(
|
|
29227
29319
|
motion35.div,
|
|
29228
29320
|
{
|
|
29229
29321
|
layout: true,
|
|
@@ -29246,14 +29338,14 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29246
29338
|
setPinned(true);
|
|
29247
29339
|
}
|
|
29248
29340
|
},
|
|
29249
|
-
children: /* @__PURE__ */
|
|
29341
|
+
children: /* @__PURE__ */ jsx133(ToastBody, { item, onDismiss })
|
|
29250
29342
|
},
|
|
29251
29343
|
item.id
|
|
29252
29344
|
);
|
|
29253
29345
|
}) })
|
|
29254
29346
|
}
|
|
29255
29347
|
),
|
|
29256
|
-
expanded && items.length > 1 && pinned && /* @__PURE__ */
|
|
29348
|
+
expanded && items.length > 1 && pinned && /* @__PURE__ */ jsx133(
|
|
29257
29349
|
"button",
|
|
29258
29350
|
{
|
|
29259
29351
|
type: "button",
|
|
@@ -29346,10 +29438,10 @@ function ToastProvider({
|
|
|
29346
29438
|
return out;
|
|
29347
29439
|
}, [toasts]);
|
|
29348
29440
|
const ctx = { toast, dismiss, dismissAll };
|
|
29349
|
-
const containers = /* @__PURE__ */
|
|
29441
|
+
const containers = /* @__PURE__ */ jsx133(Fragment49, { children: POSITIONS.map((pos) => {
|
|
29350
29442
|
const list = groups[pos];
|
|
29351
29443
|
if (list.length === 0) return null;
|
|
29352
|
-
return /* @__PURE__ */
|
|
29444
|
+
return /* @__PURE__ */ jsx133(
|
|
29353
29445
|
PositionStack,
|
|
29354
29446
|
{
|
|
29355
29447
|
items: list,
|
|
@@ -29360,7 +29452,7 @@ function ToastProvider({
|
|
|
29360
29452
|
pos
|
|
29361
29453
|
);
|
|
29362
29454
|
}) });
|
|
29363
|
-
return /* @__PURE__ */
|
|
29455
|
+
return /* @__PURE__ */ jsxs126(ToastContext.Provider, { value: ctx, children: [
|
|
29364
29456
|
children,
|
|
29365
29457
|
typeof document !== "undefined" && createPortal19(containers, document.body)
|
|
29366
29458
|
] });
|
|
@@ -29385,7 +29477,7 @@ import {
|
|
|
29385
29477
|
useId as useId62,
|
|
29386
29478
|
useRef as useRef55
|
|
29387
29479
|
} from "react";
|
|
29388
|
-
import { jsx as
|
|
29480
|
+
import { jsx as jsx134, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
29389
29481
|
function Toggle({
|
|
29390
29482
|
label,
|
|
29391
29483
|
options,
|
|
@@ -29466,7 +29558,7 @@ function Toggle({
|
|
|
29466
29558
|
);
|
|
29467
29559
|
const selectedIdx = options.findIndex((o) => o.value === value);
|
|
29468
29560
|
const fallbackTabIdx = selectedIdx >= 0 ? selectedIdx : findNextEnabled(-1, 1);
|
|
29469
|
-
return /* @__PURE__ */
|
|
29561
|
+
return /* @__PURE__ */ jsxs127(
|
|
29470
29562
|
"div",
|
|
29471
29563
|
{
|
|
29472
29564
|
...rest,
|
|
@@ -29478,8 +29570,8 @@ function Toggle({
|
|
|
29478
29570
|
className
|
|
29479
29571
|
),
|
|
29480
29572
|
children: [
|
|
29481
|
-
label && /* @__PURE__ */
|
|
29482
|
-
/* @__PURE__ */
|
|
29573
|
+
label && /* @__PURE__ */ jsx134("span", { id: labelId, className: "ods-toggle-field__label", children: label }),
|
|
29574
|
+
/* @__PURE__ */ jsx134(
|
|
29483
29575
|
"div",
|
|
29484
29576
|
{
|
|
29485
29577
|
role: "radiogroup",
|
|
@@ -29496,7 +29588,7 @@ function Toggle({
|
|
|
29496
29588
|
children: options.map((opt, i) => {
|
|
29497
29589
|
const active = opt.value === value;
|
|
29498
29590
|
const isDisabled = disabled || opt.disabled;
|
|
29499
|
-
return /* @__PURE__ */
|
|
29591
|
+
return /* @__PURE__ */ jsxs127(
|
|
29500
29592
|
"button",
|
|
29501
29593
|
{
|
|
29502
29594
|
ref: (el) => {
|
|
@@ -29514,8 +29606,8 @@ function Toggle({
|
|
|
29514
29606
|
active && "ods-toggle__opt--active"
|
|
29515
29607
|
),
|
|
29516
29608
|
children: [
|
|
29517
|
-
opt.icon && /* @__PURE__ */
|
|
29518
|
-
/* @__PURE__ */
|
|
29609
|
+
opt.icon && /* @__PURE__ */ jsx134("span", { className: "ods-toggle__icon", "aria-hidden": "true", children: opt.icon }),
|
|
29610
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-toggle__label", children: opt.label })
|
|
29519
29611
|
]
|
|
29520
29612
|
},
|
|
29521
29613
|
opt.value
|
|
@@ -29523,7 +29615,7 @@ function Toggle({
|
|
|
29523
29615
|
})
|
|
29524
29616
|
}
|
|
29525
29617
|
),
|
|
29526
|
-
error ? /* @__PURE__ */
|
|
29618
|
+
error ? /* @__PURE__ */ jsx134(
|
|
29527
29619
|
"div",
|
|
29528
29620
|
{
|
|
29529
29621
|
id: hintId,
|
|
@@ -29531,7 +29623,7 @@ function Toggle({
|
|
|
29531
29623
|
role: "alert",
|
|
29532
29624
|
children: error
|
|
29533
29625
|
}
|
|
29534
|
-
) : helperText ? /* @__PURE__ */
|
|
29626
|
+
) : helperText ? /* @__PURE__ */ jsx134("div", { id: hintId, className: "ods-toggle-field__hint", children: helperText }) : null
|
|
29535
29627
|
]
|
|
29536
29628
|
}
|
|
29537
29629
|
);
|
|
@@ -29539,9 +29631,9 @@ function Toggle({
|
|
|
29539
29631
|
Toggle.displayName = "Toggle";
|
|
29540
29632
|
|
|
29541
29633
|
// src/components/Toolbar/Toolbar.tsx
|
|
29542
|
-
import { jsx as
|
|
29634
|
+
import { jsx as jsx135, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
29543
29635
|
function Toolbar({ children, className }) {
|
|
29544
|
-
return /* @__PURE__ */
|
|
29636
|
+
return /* @__PURE__ */ jsx135("div", { role: "toolbar", className: cn("ods-toolbar", className), children });
|
|
29545
29637
|
}
|
|
29546
29638
|
function ToolbarButton({
|
|
29547
29639
|
icon,
|
|
@@ -29553,7 +29645,7 @@ function ToolbarButton({
|
|
|
29553
29645
|
className,
|
|
29554
29646
|
children
|
|
29555
29647
|
}) {
|
|
29556
|
-
return /* @__PURE__ */
|
|
29648
|
+
return /* @__PURE__ */ jsxs128(
|
|
29557
29649
|
"button",
|
|
29558
29650
|
{
|
|
29559
29651
|
type: "button",
|
|
@@ -29563,18 +29655,18 @@ function ToolbarButton({
|
|
|
29563
29655
|
"aria-pressed": active,
|
|
29564
29656
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
29565
29657
|
children: [
|
|
29566
|
-
icon && /* @__PURE__ */
|
|
29567
|
-
label && /* @__PURE__ */
|
|
29658
|
+
icon && /* @__PURE__ */ jsx135("span", { className: "ods-toolbar__btn-icon", "aria-hidden": "true", children: icon }),
|
|
29659
|
+
label && /* @__PURE__ */ jsx135("span", { className: "ods-toolbar__btn-label", children: label }),
|
|
29568
29660
|
children
|
|
29569
29661
|
]
|
|
29570
29662
|
}
|
|
29571
29663
|
);
|
|
29572
29664
|
}
|
|
29573
29665
|
function ToolbarDivider() {
|
|
29574
|
-
return /* @__PURE__ */
|
|
29666
|
+
return /* @__PURE__ */ jsx135("span", { className: "ods-toolbar__divider", "aria-hidden": "true" });
|
|
29575
29667
|
}
|
|
29576
29668
|
function ToolbarSpacer() {
|
|
29577
|
-
return /* @__PURE__ */
|
|
29669
|
+
return /* @__PURE__ */ jsx135("span", { className: "ods-toolbar__spacer" });
|
|
29578
29670
|
}
|
|
29579
29671
|
|
|
29580
29672
|
// src/components/ToolCard/ToolCard.tsx
|
|
@@ -29592,16 +29684,16 @@ import {
|
|
|
29592
29684
|
MagicWandIcon as MagicWandIcon2,
|
|
29593
29685
|
SearchIcon as SearchIcon11
|
|
29594
29686
|
} from "@octaviaflow/icons";
|
|
29595
|
-
import { jsx as
|
|
29687
|
+
import { jsx as jsx136, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
29596
29688
|
var CATEGORY_GLYPH = {
|
|
29597
|
-
search: /* @__PURE__ */
|
|
29598
|
-
database: /* @__PURE__ */
|
|
29599
|
-
web: /* @__PURE__ */
|
|
29600
|
-
code: /* @__PURE__ */
|
|
29601
|
-
file: /* @__PURE__ */
|
|
29602
|
-
api: /* @__PURE__ */
|
|
29603
|
-
ai: /* @__PURE__ */
|
|
29604
|
-
custom: /* @__PURE__ */
|
|
29689
|
+
search: /* @__PURE__ */ jsx136(SearchIcon11, { size: "xs" }),
|
|
29690
|
+
database: /* @__PURE__ */ jsx136(DataBaseIcon, { size: "xs" }),
|
|
29691
|
+
web: /* @__PURE__ */ jsx136(GlobeIcon2, { size: "xs" }),
|
|
29692
|
+
code: /* @__PURE__ */ jsx136(CodeIcon2, { size: "xs" }),
|
|
29693
|
+
file: /* @__PURE__ */ jsx136(DocumentIcon2, { size: "xs" }),
|
|
29694
|
+
api: /* @__PURE__ */ jsx136(ApiIcon, { size: "xs" }),
|
|
29695
|
+
ai: /* @__PURE__ */ jsx136(MagicWandIcon2, { size: "xs" }),
|
|
29696
|
+
custom: /* @__PURE__ */ jsx136(ExtensionsIcon, { size: "xs" })
|
|
29605
29697
|
};
|
|
29606
29698
|
var ToolCard = forwardRef112(
|
|
29607
29699
|
function ToolCard2({
|
|
@@ -29639,7 +29731,7 @@ var ToolCard = forwardRef112(
|
|
|
29639
29731
|
}
|
|
29640
29732
|
};
|
|
29641
29733
|
const showSwitch = !hideToggle && onToggle !== void 0;
|
|
29642
|
-
return /* @__PURE__ */
|
|
29734
|
+
return /* @__PURE__ */ jsxs129(
|
|
29643
29735
|
"div",
|
|
29644
29736
|
{
|
|
29645
29737
|
...rest,
|
|
@@ -29662,7 +29754,7 @@ var ToolCard = forwardRef112(
|
|
|
29662
29754
|
"aria-label": ariaLabel,
|
|
29663
29755
|
"aria-describedby": descId,
|
|
29664
29756
|
children: [
|
|
29665
|
-
/* @__PURE__ */
|
|
29757
|
+
/* @__PURE__ */ jsx136(
|
|
29666
29758
|
"span",
|
|
29667
29759
|
{
|
|
29668
29760
|
className: cn(
|
|
@@ -29673,15 +29765,15 @@ var ToolCard = forwardRef112(
|
|
|
29673
29765
|
children: icon ?? CATEGORY_GLYPH[category]
|
|
29674
29766
|
}
|
|
29675
29767
|
),
|
|
29676
|
-
/* @__PURE__ */
|
|
29677
|
-
/* @__PURE__ */
|
|
29678
|
-
/* @__PURE__ */
|
|
29679
|
-
isNew && /* @__PURE__ */
|
|
29680
|
-
badge && /* @__PURE__ */
|
|
29768
|
+
/* @__PURE__ */ jsxs129("div", { className: "ods-tool-card__body", children: [
|
|
29769
|
+
/* @__PURE__ */ jsxs129("div", { className: "ods-tool-card__head", children: [
|
|
29770
|
+
/* @__PURE__ */ jsx136("span", { id: nameId, className: "ods-tool-card__name", children: name }),
|
|
29771
|
+
isNew && /* @__PURE__ */ jsx136("span", { className: "ods-tool-card__new", "aria-label": "New", children: "NEW" }),
|
|
29772
|
+
badge && /* @__PURE__ */ jsx136("span", { className: "ods-tool-card__badge", children: badge })
|
|
29681
29773
|
] }),
|
|
29682
|
-
description && /* @__PURE__ */
|
|
29774
|
+
description && /* @__PURE__ */ jsx136("div", { id: descId, className: "ods-tool-card__desc", children: description })
|
|
29683
29775
|
] }),
|
|
29684
|
-
showSwitch && /* @__PURE__ */
|
|
29776
|
+
showSwitch && /* @__PURE__ */ jsx136(
|
|
29685
29777
|
"button",
|
|
29686
29778
|
{
|
|
29687
29779
|
type: "button",
|
|
@@ -29702,7 +29794,7 @@ var ToolCard = forwardRef112(
|
|
|
29702
29794
|
e.stopPropagation();
|
|
29703
29795
|
}
|
|
29704
29796
|
},
|
|
29705
|
-
children: /* @__PURE__ */
|
|
29797
|
+
children: /* @__PURE__ */ jsx136("span", { className: "ods-tool-card__switch-thumb", "aria-hidden": "true" })
|
|
29706
29798
|
}
|
|
29707
29799
|
)
|
|
29708
29800
|
]
|
|
@@ -29713,7 +29805,7 @@ var ToolCard = forwardRef112(
|
|
|
29713
29805
|
ToolCard.displayName = "ToolCard";
|
|
29714
29806
|
|
|
29715
29807
|
// src/components/TopBar/TopBar.tsx
|
|
29716
|
-
import { jsx as
|
|
29808
|
+
import { jsx as jsx137, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
29717
29809
|
function TopBar({
|
|
29718
29810
|
brand,
|
|
29719
29811
|
workspaceSwitcher,
|
|
@@ -29733,32 +29825,32 @@ function TopBar({
|
|
|
29733
29825
|
const showDividerAfterBrand = hasBrandBlock && (hasWorkspace || hasCrumbs || hasTitle);
|
|
29734
29826
|
const showDividerAfterWorkspace = hasWorkspace && (hasCrumbs || hasTitle);
|
|
29735
29827
|
const BrandRoot = brand?.href ? "a" : "div";
|
|
29736
|
-
return /* @__PURE__ */
|
|
29737
|
-
/* @__PURE__ */
|
|
29738
|
-
brand && /* @__PURE__ */
|
|
29828
|
+
return /* @__PURE__ */ jsxs130("header", { ...props, className: cn("ods-topbar", className), children: [
|
|
29829
|
+
/* @__PURE__ */ jsxs130("div", { className: "ods-topbar__left", children: [
|
|
29830
|
+
brand && /* @__PURE__ */ jsxs130(
|
|
29739
29831
|
BrandRoot,
|
|
29740
29832
|
{
|
|
29741
29833
|
href: brand.href,
|
|
29742
29834
|
className: cn("ods-topbar__brand", brand.href && "ods-topbar__brand--link"),
|
|
29743
29835
|
children: [
|
|
29744
|
-
brand.logo && /* @__PURE__ */
|
|
29745
|
-
/* @__PURE__ */
|
|
29836
|
+
brand.logo && /* @__PURE__ */ jsx137("span", { className: "ods-topbar__brand-mark", children: brand.logo }),
|
|
29837
|
+
/* @__PURE__ */ jsx137("span", { className: "ods-topbar__brand-name", children: brand.name })
|
|
29746
29838
|
]
|
|
29747
29839
|
}
|
|
29748
29840
|
),
|
|
29749
|
-
showDividerAfterBrand && /* @__PURE__ */
|
|
29750
|
-
workspaceSwitcher && /* @__PURE__ */
|
|
29751
|
-
showDividerAfterWorkspace && /* @__PURE__ */
|
|
29752
|
-
hasCrumbs && /* @__PURE__ */
|
|
29753
|
-
idx > 0 && /* @__PURE__ */
|
|
29754
|
-
crumb.href ? /* @__PURE__ */
|
|
29841
|
+
showDividerAfterBrand && /* @__PURE__ */ jsx137("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
29842
|
+
workspaceSwitcher && /* @__PURE__ */ jsx137("div", { className: "ods-topbar__workspace", children: workspaceSwitcher }),
|
|
29843
|
+
showDividerAfterWorkspace && /* @__PURE__ */ jsx137("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
29844
|
+
hasCrumbs && /* @__PURE__ */ jsx137("nav", { className: "ods-topbar__breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx137("ol", { children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs130("li", { className: "ods-topbar__crumb", children: [
|
|
29845
|
+
idx > 0 && /* @__PURE__ */ jsx137("span", { className: "ods-topbar__separator", "aria-hidden": "true", children: "/" }),
|
|
29846
|
+
crumb.href ? /* @__PURE__ */ jsx137("a", { href: crumb.href, children: crumb.label }) : /* @__PURE__ */ jsx137("span", { "aria-current": idx === breadcrumbs.length - 1 ? "page" : void 0, children: crumb.label })
|
|
29755
29847
|
] }, idx)) }) }),
|
|
29756
|
-
hasTitle && /* @__PURE__ */
|
|
29848
|
+
hasTitle && /* @__PURE__ */ jsx137("h1", { className: "ods-topbar__title", children: title })
|
|
29757
29849
|
] }),
|
|
29758
|
-
children && /* @__PURE__ */
|
|
29759
|
-
/* @__PURE__ */
|
|
29760
|
-
onSearch && /* @__PURE__ */
|
|
29761
|
-
/* @__PURE__ */
|
|
29850
|
+
children && /* @__PURE__ */ jsx137("div", { className: "ods-topbar__center", children }),
|
|
29851
|
+
/* @__PURE__ */ jsxs130("div", { className: "ods-topbar__right", children: [
|
|
29852
|
+
onSearch && /* @__PURE__ */ jsxs130("div", { className: "ods-topbar__search", children: [
|
|
29853
|
+
/* @__PURE__ */ jsx137(
|
|
29762
29854
|
"svg",
|
|
29763
29855
|
{
|
|
29764
29856
|
className: "ods-topbar__search-icon",
|
|
@@ -29767,7 +29859,7 @@ function TopBar({
|
|
|
29767
29859
|
viewBox: "0 0 20 20",
|
|
29768
29860
|
fill: "currentColor",
|
|
29769
29861
|
"aria-hidden": "true",
|
|
29770
|
-
children: /* @__PURE__ */
|
|
29862
|
+
children: /* @__PURE__ */ jsx137(
|
|
29771
29863
|
"path",
|
|
29772
29864
|
{
|
|
29773
29865
|
fillRule: "evenodd",
|
|
@@ -29777,7 +29869,7 @@ function TopBar({
|
|
|
29777
29869
|
)
|
|
29778
29870
|
}
|
|
29779
29871
|
),
|
|
29780
|
-
/* @__PURE__ */
|
|
29872
|
+
/* @__PURE__ */ jsx137(
|
|
29781
29873
|
"input",
|
|
29782
29874
|
{
|
|
29783
29875
|
type: "search",
|
|
@@ -29788,7 +29880,7 @@ function TopBar({
|
|
|
29788
29880
|
}
|
|
29789
29881
|
)
|
|
29790
29882
|
] }),
|
|
29791
|
-
actions && /* @__PURE__ */
|
|
29883
|
+
actions && /* @__PURE__ */ jsx137("div", { className: "ods-topbar__actions", children: actions })
|
|
29792
29884
|
] })
|
|
29793
29885
|
] });
|
|
29794
29886
|
}
|
|
@@ -29810,13 +29902,13 @@ import {
|
|
|
29810
29902
|
IdeaIcon,
|
|
29811
29903
|
WarningAltIcon as WarningAltIcon2
|
|
29812
29904
|
} from "@octaviaflow/icons";
|
|
29813
|
-
import { jsx as
|
|
29905
|
+
import { jsx as jsx138, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
29814
29906
|
var DEFAULT_KIND_GLYPH = {
|
|
29815
|
-
thought: /* @__PURE__ */
|
|
29816
|
-
tool: /* @__PURE__ */
|
|
29817
|
-
input: /* @__PURE__ */
|
|
29818
|
-
output: /* @__PURE__ */
|
|
29819
|
-
error: /* @__PURE__ */
|
|
29907
|
+
thought: /* @__PURE__ */ jsx138(IdeaIcon, { size: "xs" }),
|
|
29908
|
+
tool: /* @__PURE__ */ jsx138(BuildToolIcon, { size: "xs" }),
|
|
29909
|
+
input: /* @__PURE__ */ jsx138(ConnectionReceiveIcon, { size: "xs" }),
|
|
29910
|
+
output: /* @__PURE__ */ jsx138(ConnectionSendIcon, { size: "xs" }),
|
|
29911
|
+
error: /* @__PURE__ */ jsx138(WarningAltIcon2, { size: "xs" })
|
|
29820
29912
|
};
|
|
29821
29913
|
var FALLBACK_GLYPH = DEFAULT_KIND_GLYPH.thought;
|
|
29822
29914
|
var TraceStep = forwardRef113(
|
|
@@ -29856,7 +29948,7 @@ var TraceStep = forwardRef113(
|
|
|
29856
29948
|
onOpenChange?.(next);
|
|
29857
29949
|
}, [canExpand, open, isControlled, onOpenChange]);
|
|
29858
29950
|
const resolvedGlyph = icon ?? kindIcons?.[kind] ?? DEFAULT_KIND_GLYPH[kind] ?? FALLBACK_GLYPH;
|
|
29859
|
-
return /* @__PURE__ */
|
|
29951
|
+
return /* @__PURE__ */ jsxs131(
|
|
29860
29952
|
"div",
|
|
29861
29953
|
{
|
|
29862
29954
|
...rest,
|
|
@@ -29872,18 +29964,18 @@ var TraceStep = forwardRef113(
|
|
|
29872
29964
|
className
|
|
29873
29965
|
),
|
|
29874
29966
|
children: [
|
|
29875
|
-
/* @__PURE__ */
|
|
29876
|
-
/* @__PURE__ */
|
|
29967
|
+
/* @__PURE__ */ jsxs131("div", { className: "ods-trace-step__rail", "aria-hidden": "true", children: [
|
|
29968
|
+
/* @__PURE__ */ jsx138(
|
|
29877
29969
|
motion36.span,
|
|
29878
29970
|
{
|
|
29879
29971
|
className: "ods-trace-step__icon",
|
|
29880
29972
|
initial: disableAnimation ? false : { scale: 0.6, opacity: 0 },
|
|
29881
29973
|
animate: { scale: 1, opacity: 1 },
|
|
29882
29974
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
29883
|
-
children: status === "running" ? /* @__PURE__ */
|
|
29975
|
+
children: status === "running" ? /* @__PURE__ */ jsx138("span", { className: "ods-trace-step__spin", children: /* @__PURE__ */ jsx138(CircleDashIcon, { size: "xs" }) }) : resolvedGlyph
|
|
29884
29976
|
}
|
|
29885
29977
|
),
|
|
29886
|
-
!isLast && /* @__PURE__ */
|
|
29978
|
+
!isLast && /* @__PURE__ */ jsx138(
|
|
29887
29979
|
motion36.span,
|
|
29888
29980
|
{
|
|
29889
29981
|
className: "ods-trace-step__line",
|
|
@@ -29893,8 +29985,8 @@ var TraceStep = forwardRef113(
|
|
|
29893
29985
|
}
|
|
29894
29986
|
)
|
|
29895
29987
|
] }),
|
|
29896
|
-
/* @__PURE__ */
|
|
29897
|
-
/* @__PURE__ */
|
|
29988
|
+
/* @__PURE__ */ jsxs131("div", { className: "ods-trace-step__body", children: [
|
|
29989
|
+
/* @__PURE__ */ jsxs131(
|
|
29898
29990
|
"button",
|
|
29899
29991
|
{
|
|
29900
29992
|
id: headId,
|
|
@@ -29905,7 +29997,7 @@ var TraceStep = forwardRef113(
|
|
|
29905
29997
|
"aria-controls": canExpand ? contentId : void 0,
|
|
29906
29998
|
disabled: !canExpand,
|
|
29907
29999
|
children: [
|
|
29908
|
-
index != null && /* @__PURE__ */
|
|
30000
|
+
index != null && /* @__PURE__ */ jsx138(
|
|
29909
30001
|
"span",
|
|
29910
30002
|
{
|
|
29911
30003
|
className: cn(
|
|
@@ -29915,32 +30007,32 @@ var TraceStep = forwardRef113(
|
|
|
29915
30007
|
children: index
|
|
29916
30008
|
}
|
|
29917
30009
|
),
|
|
29918
|
-
/* @__PURE__ */
|
|
29919
|
-
tool && /* @__PURE__ */
|
|
30010
|
+
/* @__PURE__ */ jsx138("span", { className: "ods-trace-step__title", children: title }),
|
|
30011
|
+
tool && /* @__PURE__ */ jsxs131(
|
|
29920
30012
|
"span",
|
|
29921
30013
|
{
|
|
29922
30014
|
className: "ods-trace-step__tool",
|
|
29923
30015
|
title: tool,
|
|
29924
30016
|
"aria-label": `Tool: ${tool}`,
|
|
29925
30017
|
children: [
|
|
29926
|
-
/* @__PURE__ */
|
|
30018
|
+
/* @__PURE__ */ jsx138("span", { className: "ods-trace-step__tool-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx138(BuildToolIcon, { size: "xs" }) }),
|
|
29927
30019
|
tool
|
|
29928
30020
|
]
|
|
29929
30021
|
}
|
|
29930
30022
|
),
|
|
29931
|
-
/* @__PURE__ */
|
|
29932
|
-
tokens != null && /* @__PURE__ */
|
|
30023
|
+
/* @__PURE__ */ jsxs131("span", { className: "ods-trace-step__meta", children: [
|
|
30024
|
+
tokens != null && /* @__PURE__ */ jsxs131(
|
|
29933
30025
|
"span",
|
|
29934
30026
|
{
|
|
29935
30027
|
className: "ods-trace-step__tokens",
|
|
29936
30028
|
"aria-label": `${tokens} tokens`,
|
|
29937
30029
|
children: [
|
|
29938
|
-
/* @__PURE__ */
|
|
30030
|
+
/* @__PURE__ */ jsx138("span", { children: tokens.toLocaleString() }),
|
|
29939
30031
|
" tok"
|
|
29940
30032
|
]
|
|
29941
30033
|
}
|
|
29942
30034
|
),
|
|
29943
|
-
duration && /* @__PURE__ */
|
|
30035
|
+
duration && /* @__PURE__ */ jsx138(
|
|
29944
30036
|
"span",
|
|
29945
30037
|
{
|
|
29946
30038
|
className: "ods-trace-step__duration",
|
|
@@ -29949,20 +30041,20 @@ var TraceStep = forwardRef113(
|
|
|
29949
30041
|
}
|
|
29950
30042
|
)
|
|
29951
30043
|
] }),
|
|
29952
|
-
canExpand && /* @__PURE__ */
|
|
30044
|
+
canExpand && /* @__PURE__ */ jsx138(
|
|
29953
30045
|
motion36.span,
|
|
29954
30046
|
{
|
|
29955
30047
|
className: "ods-trace-step__chev",
|
|
29956
30048
|
"aria-hidden": "true",
|
|
29957
30049
|
animate: { rotate: open ? 180 : 0 },
|
|
29958
30050
|
transition: { duration: 0.18, ease: [0.16, 1, 0.3, 1] },
|
|
29959
|
-
children: /* @__PURE__ */
|
|
30051
|
+
children: /* @__PURE__ */ jsx138(CaretDownIcon4, { size: "xs" })
|
|
29960
30052
|
}
|
|
29961
30053
|
)
|
|
29962
30054
|
]
|
|
29963
30055
|
}
|
|
29964
30056
|
),
|
|
29965
|
-
/* @__PURE__ */
|
|
30057
|
+
/* @__PURE__ */ jsx138(AnimatePresence23, { initial: false, children: canExpand && open && /* @__PURE__ */ jsx138(
|
|
29966
30058
|
motion36.div,
|
|
29967
30059
|
{
|
|
29968
30060
|
id: contentId,
|
|
@@ -29974,7 +30066,7 @@ var TraceStep = forwardRef113(
|
|
|
29974
30066
|
exit: disableAnimation ? void 0 : { height: 0, opacity: 0 },
|
|
29975
30067
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
29976
30068
|
style: { overflow: "hidden" },
|
|
29977
|
-
children: /* @__PURE__ */
|
|
30069
|
+
children: /* @__PURE__ */ jsx138("div", { className: "ods-trace-step__content-inner", children })
|
|
29978
30070
|
},
|
|
29979
30071
|
"content"
|
|
29980
30072
|
) })
|
|
@@ -29997,7 +30089,7 @@ import {
|
|
|
29997
30089
|
useMemo as useMemo33,
|
|
29998
30090
|
useState as useState66
|
|
29999
30091
|
} from "react";
|
|
30000
|
-
import { jsx as
|
|
30092
|
+
import { jsx as jsx139, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
30001
30093
|
function buildVisibleList(nodes, expanded, out = [], level = 0, parentId = null) {
|
|
30002
30094
|
for (const n of nodes) {
|
|
30003
30095
|
out.push({ node: n, level, parentId });
|
|
@@ -30160,7 +30252,7 @@ var TreeView = forwardRef114(
|
|
|
30160
30252
|
const myIdx = visibleIdx.value;
|
|
30161
30253
|
visibleIdx.value += 1;
|
|
30162
30254
|
const showLoadingChild = isExpanded && isLoading && !kids;
|
|
30163
|
-
return /* @__PURE__ */
|
|
30255
|
+
return /* @__PURE__ */ jsxs132(
|
|
30164
30256
|
"li",
|
|
30165
30257
|
{
|
|
30166
30258
|
id: `${baseId}-node-${node.id}`,
|
|
@@ -30180,7 +30272,7 @@ var TreeView = forwardRef114(
|
|
|
30180
30272
|
handleKeyDown(e, myIdx);
|
|
30181
30273
|
},
|
|
30182
30274
|
children: [
|
|
30183
|
-
/* @__PURE__ */
|
|
30275
|
+
/* @__PURE__ */ jsxs132(
|
|
30184
30276
|
"div",
|
|
30185
30277
|
{
|
|
30186
30278
|
className: "ods-tree__row",
|
|
@@ -30193,7 +30285,7 @@ var TreeView = forwardRef114(
|
|
|
30193
30285
|
handleSelect(node);
|
|
30194
30286
|
},
|
|
30195
30287
|
children: [
|
|
30196
|
-
/* @__PURE__ */
|
|
30288
|
+
/* @__PURE__ */ jsx139(
|
|
30197
30289
|
"button",
|
|
30198
30290
|
{
|
|
30199
30291
|
type: "button",
|
|
@@ -30208,12 +30300,12 @@ var TreeView = forwardRef114(
|
|
|
30208
30300
|
e.stopPropagation();
|
|
30209
30301
|
if (isBranch && !node.disabled) void toggleExpand(node);
|
|
30210
30302
|
},
|
|
30211
|
-
children: isBranch && /* @__PURE__ */
|
|
30303
|
+
children: isBranch && /* @__PURE__ */ jsx139(ChevronRightIcon5, { size: "xs", "aria-hidden": true })
|
|
30212
30304
|
}
|
|
30213
30305
|
),
|
|
30214
|
-
(node.icon || node.iconExpanded) && /* @__PURE__ */
|
|
30215
|
-
/* @__PURE__ */
|
|
30216
|
-
node.trailing && /* @__PURE__ */
|
|
30306
|
+
(node.icon || node.iconExpanded) && /* @__PURE__ */ jsx139("span", { className: "ods-tree__icon", "aria-hidden": "true", children: isExpanded && node.iconExpanded ? node.iconExpanded : node.icon }),
|
|
30307
|
+
/* @__PURE__ */ jsx139("span", { className: "ods-tree__label", children: node.label }),
|
|
30308
|
+
node.trailing && /* @__PURE__ */ jsx139(
|
|
30217
30309
|
"span",
|
|
30218
30310
|
{
|
|
30219
30311
|
className: "ods-tree__trailing",
|
|
@@ -30224,7 +30316,7 @@ var TreeView = forwardRef114(
|
|
|
30224
30316
|
]
|
|
30225
30317
|
}
|
|
30226
30318
|
),
|
|
30227
|
-
isBranch && isExpanded && /* @__PURE__ */
|
|
30319
|
+
isBranch && isExpanded && /* @__PURE__ */ jsx139(
|
|
30228
30320
|
motion37.ul,
|
|
30229
30321
|
{
|
|
30230
30322
|
role: "group",
|
|
@@ -30232,7 +30324,7 @@ var TreeView = forwardRef114(
|
|
|
30232
30324
|
initial: reducedMotion ? false : { height: 0, opacity: 0 },
|
|
30233
30325
|
animate: reducedMotion ? void 0 : { height: "auto", opacity: 1 },
|
|
30234
30326
|
transition: reducedMotion ? { duration: 0 } : { duration: 0.14 },
|
|
30235
|
-
children: showLoadingChild ? /* @__PURE__ */
|
|
30327
|
+
children: showLoadingChild ? /* @__PURE__ */ jsx139(
|
|
30236
30328
|
"li",
|
|
30237
30329
|
{
|
|
30238
30330
|
className: "ods-tree__loading",
|
|
@@ -30244,7 +30336,7 @@ var TreeView = forwardRef114(
|
|
|
30244
30336
|
"aria-busy": "true",
|
|
30245
30337
|
children: "Loading\u2026"
|
|
30246
30338
|
}
|
|
30247
|
-
) : kids && kids.length > 0 ? kids.map((c) => renderNode(c, level + 1, visibleIdx)) : /* @__PURE__ */
|
|
30339
|
+
) : kids && kids.length > 0 ? kids.map((c) => renderNode(c, level + 1, visibleIdx)) : /* @__PURE__ */ jsx139(
|
|
30248
30340
|
"li",
|
|
30249
30341
|
{
|
|
30250
30342
|
className: "ods-tree__empty",
|
|
@@ -30266,7 +30358,7 @@ var TreeView = forwardRef114(
|
|
|
30266
30358
|
const visibleIdxCursor = { value: 0 };
|
|
30267
30359
|
useEffect49(() => {
|
|
30268
30360
|
}, [tabStopId]);
|
|
30269
|
-
return /* @__PURE__ */
|
|
30361
|
+
return /* @__PURE__ */ jsx139(
|
|
30270
30362
|
"ul",
|
|
30271
30363
|
{
|
|
30272
30364
|
...rest,
|
|
@@ -30293,7 +30385,7 @@ import {
|
|
|
30293
30385
|
forwardRef as forwardRef115,
|
|
30294
30386
|
useId as useId66
|
|
30295
30387
|
} from "react";
|
|
30296
|
-
import { Fragment as
|
|
30388
|
+
import { Fragment as Fragment50, jsx as jsx140, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
30297
30389
|
var UserCard = forwardRef115(
|
|
30298
30390
|
function UserCard2({
|
|
30299
30391
|
name,
|
|
@@ -30321,7 +30413,7 @@ var UserCard = forwardRef115(
|
|
|
30321
30413
|
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
30322
30414
|
const renderAvatar = () => {
|
|
30323
30415
|
if (avatarNode) {
|
|
30324
|
-
return /* @__PURE__ */
|
|
30416
|
+
return /* @__PURE__ */ jsx140(
|
|
30325
30417
|
"span",
|
|
30326
30418
|
{
|
|
30327
30419
|
className: "ods-user-card__avatar ods-user-card__avatar--legacy",
|
|
@@ -30331,7 +30423,7 @@ var UserCard = forwardRef115(
|
|
|
30331
30423
|
);
|
|
30332
30424
|
}
|
|
30333
30425
|
const derivedInitials = avatar?.initials ?? (typeof initial === "string" ? initial : typeof name === "string" ? name.charAt(0).toUpperCase() : void 0);
|
|
30334
|
-
return /* @__PURE__ */
|
|
30426
|
+
return /* @__PURE__ */ jsx140(
|
|
30335
30427
|
Avatar,
|
|
30336
30428
|
{
|
|
30337
30429
|
size: orientation === "horizontal" ? "md" : "lg",
|
|
@@ -30343,10 +30435,10 @@ var UserCard = forwardRef115(
|
|
|
30343
30435
|
}
|
|
30344
30436
|
);
|
|
30345
30437
|
};
|
|
30346
|
-
const body = /* @__PURE__ */
|
|
30438
|
+
const body = /* @__PURE__ */ jsxs133(Fragment50, { children: [
|
|
30347
30439
|
renderAvatar(),
|
|
30348
|
-
/* @__PURE__ */
|
|
30349
|
-
/* @__PURE__ */
|
|
30440
|
+
/* @__PURE__ */ jsxs133("div", { className: "ods-user-card__body", children: [
|
|
30441
|
+
/* @__PURE__ */ jsx140(
|
|
30350
30442
|
Card.Title,
|
|
30351
30443
|
{
|
|
30352
30444
|
as: nameAs,
|
|
@@ -30355,14 +30447,14 @@ var UserCard = forwardRef115(
|
|
|
30355
30447
|
children: name
|
|
30356
30448
|
}
|
|
30357
30449
|
),
|
|
30358
|
-
role && /* @__PURE__ */
|
|
30359
|
-
meta && /* @__PURE__ */
|
|
30450
|
+
role && /* @__PURE__ */ jsx140("div", { className: "ods-user-card__role", children: role }),
|
|
30451
|
+
meta && /* @__PURE__ */ jsx140("div", { className: "ods-user-card__meta", children: meta })
|
|
30360
30452
|
] }),
|
|
30361
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
30362
|
-
/* @__PURE__ */
|
|
30363
|
-
/* @__PURE__ */
|
|
30453
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx140("div", { className: "ods-user-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs133("div", { className: "ods-user-card__stat", children: [
|
|
30454
|
+
/* @__PURE__ */ jsx140("div", { className: "ods-user-card__stat-value", children: s.value }),
|
|
30455
|
+
/* @__PURE__ */ jsx140("div", { className: "ods-user-card__stat-label", children: s.label })
|
|
30364
30456
|
] }, i)) }),
|
|
30365
|
-
action && /* @__PURE__ */
|
|
30457
|
+
action && /* @__PURE__ */ jsx140("div", { className: "ods-user-card__action", children: action })
|
|
30366
30458
|
] });
|
|
30367
30459
|
const sharedClass = cn(
|
|
30368
30460
|
"ods-user-card",
|
|
@@ -30372,7 +30464,7 @@ var UserCard = forwardRef115(
|
|
|
30372
30464
|
className
|
|
30373
30465
|
);
|
|
30374
30466
|
if (href && !disabled) {
|
|
30375
|
-
return /* @__PURE__ */
|
|
30467
|
+
return /* @__PURE__ */ jsx140(
|
|
30376
30468
|
Card,
|
|
30377
30469
|
{
|
|
30378
30470
|
asChild: true,
|
|
@@ -30380,7 +30472,7 @@ var UserCard = forwardRef115(
|
|
|
30380
30472
|
padding: "none",
|
|
30381
30473
|
className: sharedClass,
|
|
30382
30474
|
"aria-labelledby": nameId,
|
|
30383
|
-
children: /* @__PURE__ */
|
|
30475
|
+
children: /* @__PURE__ */ jsx140(
|
|
30384
30476
|
"a",
|
|
30385
30477
|
{
|
|
30386
30478
|
...rest,
|
|
@@ -30394,7 +30486,7 @@ var UserCard = forwardRef115(
|
|
|
30394
30486
|
}
|
|
30395
30487
|
);
|
|
30396
30488
|
}
|
|
30397
|
-
return /* @__PURE__ */
|
|
30489
|
+
return /* @__PURE__ */ jsx140(
|
|
30398
30490
|
Card,
|
|
30399
30491
|
{
|
|
30400
30492
|
...rest,
|
|
@@ -31109,7 +31201,7 @@ function useWorkflow(options = {}) {
|
|
|
31109
31201
|
}
|
|
31110
31202
|
|
|
31111
31203
|
// src/components/WorkflowEditor/WorkflowEditor.tsx
|
|
31112
|
-
import { jsx as
|
|
31204
|
+
import { jsx as jsx141, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
31113
31205
|
var NODE_KIND_MAP = {
|
|
31114
31206
|
trigger: "trigger",
|
|
31115
31207
|
action: "action",
|
|
@@ -31154,7 +31246,7 @@ function WorkflowEditor({
|
|
|
31154
31246
|
drawer,
|
|
31155
31247
|
console: consoleSlot,
|
|
31156
31248
|
minimap,
|
|
31157
|
-
emptyState = /* @__PURE__ */
|
|
31249
|
+
emptyState = /* @__PURE__ */ jsx141(DefaultEmptyState, {}),
|
|
31158
31250
|
children,
|
|
31159
31251
|
background = "dots",
|
|
31160
31252
|
snapToGrid = true,
|
|
@@ -31310,8 +31402,8 @@ function WorkflowEditor({
|
|
|
31310
31402
|
wf.setViewport({ x: cw / 2 - cx * zoom, y: ch / 2 - cy * zoom, zoom });
|
|
31311
31403
|
}, [workflow.canvas.nodes, canvasSize, wf]);
|
|
31312
31404
|
const defaultToolbar = useMemo35(
|
|
31313
|
-
() => /* @__PURE__ */
|
|
31314
|
-
onSave && /* @__PURE__ */
|
|
31405
|
+
() => /* @__PURE__ */ jsxs134(FlowToolbar, { placement: "left", children: [
|
|
31406
|
+
onSave && /* @__PURE__ */ jsx141(
|
|
31315
31407
|
FlowToolbarButton,
|
|
31316
31408
|
{
|
|
31317
31409
|
icon: FlowToolbarIcons.save,
|
|
@@ -31320,7 +31412,7 @@ function WorkflowEditor({
|
|
|
31320
31412
|
onClick: () => onSave(workflow)
|
|
31321
31413
|
}
|
|
31322
31414
|
),
|
|
31323
|
-
onRun && /* @__PURE__ */
|
|
31415
|
+
onRun && /* @__PURE__ */ jsx141(
|
|
31324
31416
|
FlowToolbarButton,
|
|
31325
31417
|
{
|
|
31326
31418
|
icon: isExecuting ? FlowToolbarIcons.stop : FlowToolbarIcons.run,
|
|
@@ -31331,7 +31423,7 @@ function WorkflowEditor({
|
|
|
31331
31423
|
onClick: isExecuting ? onStop : onRun
|
|
31332
31424
|
}
|
|
31333
31425
|
),
|
|
31334
|
-
/* @__PURE__ */
|
|
31426
|
+
/* @__PURE__ */ jsx141(
|
|
31335
31427
|
FlowToolbarButton,
|
|
31336
31428
|
{
|
|
31337
31429
|
icon: isLockMode ? FlowToolbarIcons.lock : FlowToolbarIcons.unlock,
|
|
@@ -31341,7 +31433,7 @@ function WorkflowEditor({
|
|
|
31341
31433
|
onClick: toggleLock
|
|
31342
31434
|
}
|
|
31343
31435
|
),
|
|
31344
|
-
/* @__PURE__ */
|
|
31436
|
+
/* @__PURE__ */ jsx141(
|
|
31345
31437
|
FlowToolbarButton,
|
|
31346
31438
|
{
|
|
31347
31439
|
icon: FlowToolbarIcons.reset,
|
|
@@ -31349,7 +31441,7 @@ function WorkflowEditor({
|
|
|
31349
31441
|
onClick: handleReset
|
|
31350
31442
|
}
|
|
31351
31443
|
),
|
|
31352
|
-
drawer && /* @__PURE__ */
|
|
31444
|
+
drawer && /* @__PURE__ */ jsx141(
|
|
31353
31445
|
FlowToolbarButton,
|
|
31354
31446
|
{
|
|
31355
31447
|
icon: isDrawerOpen ? FlowToolbarIcons.drawerClose : FlowToolbarIcons.drawerOpen,
|
|
@@ -31358,8 +31450,8 @@ function WorkflowEditor({
|
|
|
31358
31450
|
onClick: toggleDrawer
|
|
31359
31451
|
}
|
|
31360
31452
|
),
|
|
31361
|
-
/* @__PURE__ */
|
|
31362
|
-
onSettings && /* @__PURE__ */
|
|
31453
|
+
/* @__PURE__ */ jsx141(FlowToolbarDivider, {}),
|
|
31454
|
+
onSettings && /* @__PURE__ */ jsx141(
|
|
31363
31455
|
FlowToolbarButton,
|
|
31364
31456
|
{
|
|
31365
31457
|
icon: FlowToolbarIcons.settings,
|
|
@@ -31367,7 +31459,7 @@ function WorkflowEditor({
|
|
|
31367
31459
|
onClick: onSettings
|
|
31368
31460
|
}
|
|
31369
31461
|
),
|
|
31370
|
-
/* @__PURE__ */
|
|
31462
|
+
/* @__PURE__ */ jsx141(
|
|
31371
31463
|
FlowToolbarButton,
|
|
31372
31464
|
{
|
|
31373
31465
|
icon: FlowToolbarIcons.history,
|
|
@@ -31376,7 +31468,7 @@ function WorkflowEditor({
|
|
|
31376
31468
|
onClick: toggleHistory
|
|
31377
31469
|
}
|
|
31378
31470
|
),
|
|
31379
|
-
isDebugModeEnabled && /* @__PURE__ */
|
|
31471
|
+
isDebugModeEnabled && /* @__PURE__ */ jsx141(
|
|
31380
31472
|
FlowToolbarButton,
|
|
31381
31473
|
{
|
|
31382
31474
|
icon: FlowToolbarIcons.debug,
|
|
@@ -31385,8 +31477,8 @@ function WorkflowEditor({
|
|
|
31385
31477
|
onClick: toggleDebug
|
|
31386
31478
|
}
|
|
31387
31479
|
),
|
|
31388
|
-
/* @__PURE__ */
|
|
31389
|
-
/* @__PURE__ */
|
|
31480
|
+
/* @__PURE__ */ jsx141(FlowToolbarDivider, {}),
|
|
31481
|
+
/* @__PURE__ */ jsx141(
|
|
31390
31482
|
FlowToolbarButton,
|
|
31391
31483
|
{
|
|
31392
31484
|
icon: FlowToolbarIcons.undo,
|
|
@@ -31396,7 +31488,7 @@ function WorkflowEditor({
|
|
|
31396
31488
|
onClick: undo
|
|
31397
31489
|
}
|
|
31398
31490
|
),
|
|
31399
|
-
/* @__PURE__ */
|
|
31491
|
+
/* @__PURE__ */ jsx141(
|
|
31400
31492
|
FlowToolbarButton,
|
|
31401
31493
|
{
|
|
31402
31494
|
icon: FlowToolbarIcons.redo,
|
|
@@ -31406,8 +31498,8 @@ function WorkflowEditor({
|
|
|
31406
31498
|
onClick: redo
|
|
31407
31499
|
}
|
|
31408
31500
|
),
|
|
31409
|
-
/* @__PURE__ */
|
|
31410
|
-
/* @__PURE__ */
|
|
31501
|
+
/* @__PURE__ */ jsx141(FlowToolbarDivider, {}),
|
|
31502
|
+
/* @__PURE__ */ jsx141(
|
|
31411
31503
|
FlowToolbarZoom,
|
|
31412
31504
|
{
|
|
31413
31505
|
zoom: workflow.canvas.viewport.zoom,
|
|
@@ -31446,21 +31538,21 @@ function WorkflowEditor({
|
|
|
31446
31538
|
);
|
|
31447
31539
|
const resolvedToolbar = toolbar === "default" ? defaultToolbar : toolbar === null ? null : toolbar;
|
|
31448
31540
|
const isEmpty = workflow.canvas.nodes.length === 0 && workflow.canvas.edges.length === 0;
|
|
31449
|
-
return /* @__PURE__ */
|
|
31541
|
+
return /* @__PURE__ */ jsxs134(
|
|
31450
31542
|
"div",
|
|
31451
31543
|
{
|
|
31452
31544
|
className: cn("ods-workflow-editor", className),
|
|
31453
31545
|
style: { width, height, position: "relative", display: "flex", overflow: "hidden" },
|
|
31454
31546
|
children: [
|
|
31455
|
-
drawer && isDrawerOpen && /* @__PURE__ */
|
|
31456
|
-
/* @__PURE__ */
|
|
31547
|
+
drawer && isDrawerOpen && /* @__PURE__ */ jsx141("div", { className: "ods-workflow-editor__drawer", children: drawer }),
|
|
31548
|
+
/* @__PURE__ */ jsxs134(
|
|
31457
31549
|
"div",
|
|
31458
31550
|
{
|
|
31459
31551
|
ref: handleCanvasRef,
|
|
31460
31552
|
className: "ods-workflow-editor__canvas-wrapper",
|
|
31461
31553
|
style: { position: "relative", flex: 1, minWidth: 0 },
|
|
31462
31554
|
children: [
|
|
31463
|
-
/* @__PURE__ */
|
|
31555
|
+
/* @__PURE__ */ jsx141(
|
|
31464
31556
|
FlowCanvas,
|
|
31465
31557
|
{
|
|
31466
31558
|
nodes: nextNodes,
|
|
@@ -31474,9 +31566,9 @@ function WorkflowEditor({
|
|
|
31474
31566
|
children: resolvedToolbar
|
|
31475
31567
|
}
|
|
31476
31568
|
),
|
|
31477
|
-
minimap && /* @__PURE__ */
|
|
31478
|
-
consoleSlot && /* @__PURE__ */
|
|
31479
|
-
isEmpty && emptyState && /* @__PURE__ */
|
|
31569
|
+
minimap && /* @__PURE__ */ jsx141("div", { className: "ods-workflow-editor__minimap", children: minimap }),
|
|
31570
|
+
consoleSlot && /* @__PURE__ */ jsx141("div", { className: "ods-workflow-editor__console", children: consoleSlot }),
|
|
31571
|
+
isEmpty && emptyState && /* @__PURE__ */ jsx141("div", { className: "ods-workflow-editor__empty", children: emptyState }),
|
|
31480
31572
|
children
|
|
31481
31573
|
]
|
|
31482
31574
|
}
|
|
@@ -31486,7 +31578,7 @@ function WorkflowEditor({
|
|
|
31486
31578
|
);
|
|
31487
31579
|
}
|
|
31488
31580
|
function DefaultEmptyState() {
|
|
31489
|
-
return /* @__PURE__ */
|
|
31581
|
+
return /* @__PURE__ */ jsxs134(
|
|
31490
31582
|
"div",
|
|
31491
31583
|
{
|
|
31492
31584
|
style: {
|
|
@@ -31501,14 +31593,14 @@ function DefaultEmptyState() {
|
|
|
31501
31593
|
pointerEvents: "none"
|
|
31502
31594
|
},
|
|
31503
31595
|
children: [
|
|
31504
|
-
/* @__PURE__ */
|
|
31596
|
+
/* @__PURE__ */ jsx141(
|
|
31505
31597
|
"div",
|
|
31506
31598
|
{
|
|
31507
31599
|
style: { fontSize: 14, fontWeight: 600, color: "var(--ods-text-primary)", marginBottom: 4 },
|
|
31508
31600
|
children: "Start with a trigger"
|
|
31509
31601
|
}
|
|
31510
31602
|
),
|
|
31511
|
-
/* @__PURE__ */
|
|
31603
|
+
/* @__PURE__ */ jsx141("div", { style: { fontSize: 12 }, children: "Drop an action here, or use the drawer to add your first node." })
|
|
31512
31604
|
]
|
|
31513
31605
|
}
|
|
31514
31606
|
);
|
|
@@ -31551,7 +31643,7 @@ function useWorkflowRuntime(startedAt, active) {
|
|
|
31551
31643
|
}
|
|
31552
31644
|
|
|
31553
31645
|
// src/components/WorkflowHeader/WorkflowHeader.tsx
|
|
31554
|
-
import { Fragment as
|
|
31646
|
+
import { Fragment as Fragment51, jsx as jsx142, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
31555
31647
|
function WorkflowHeader({
|
|
31556
31648
|
name,
|
|
31557
31649
|
statusTone,
|
|
@@ -31594,21 +31686,21 @@ function WorkflowHeader({
|
|
|
31594
31686
|
className
|
|
31595
31687
|
);
|
|
31596
31688
|
if (loading) {
|
|
31597
|
-
return /* @__PURE__ */
|
|
31598
|
-
/* @__PURE__ */
|
|
31599
|
-
/* @__PURE__ */
|
|
31600
|
-
/* @__PURE__ */
|
|
31689
|
+
return /* @__PURE__ */ jsxs135("header", { className: rootCls, "data-loading": "true", children: [
|
|
31690
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-workflow-header__left", children: [
|
|
31691
|
+
/* @__PURE__ */ jsx142(Skeleton, { variant: "text", width: "120px" }),
|
|
31692
|
+
/* @__PURE__ */ jsx142(Skeleton, { variant: "text", width: "180px" })
|
|
31601
31693
|
] }),
|
|
31602
|
-
/* @__PURE__ */
|
|
31603
|
-
/* @__PURE__ */
|
|
31604
|
-
/* @__PURE__ */
|
|
31694
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-workflow-header__right", children: [
|
|
31695
|
+
/* @__PURE__ */ jsx142(Skeleton, { variant: "circular", width: "28px", height: "28px" }),
|
|
31696
|
+
/* @__PURE__ */ jsx142(Skeleton, { variant: "circular", width: "28px", height: "28px" })
|
|
31605
31697
|
] })
|
|
31606
31698
|
] });
|
|
31607
31699
|
}
|
|
31608
31700
|
const envAccentStyle = environment?.accent ? { borderLeftColor: environment.accent } : void 0;
|
|
31609
|
-
return /* @__PURE__ */
|
|
31610
|
-
/* @__PURE__ */
|
|
31611
|
-
onBack && /* @__PURE__ */
|
|
31701
|
+
return /* @__PURE__ */ jsxs135("header", { className: rootCls, "data-running": isRunning ? "true" : void 0, children: [
|
|
31702
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-workflow-header__left", children: [
|
|
31703
|
+
onBack && /* @__PURE__ */ jsxs135(
|
|
31612
31704
|
"button",
|
|
31613
31705
|
{
|
|
31614
31706
|
type: "button",
|
|
@@ -31616,13 +31708,13 @@ function WorkflowHeader({
|
|
|
31616
31708
|
onClick: onBack,
|
|
31617
31709
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
31618
31710
|
children: [
|
|
31619
|
-
/* @__PURE__ */
|
|
31620
|
-
/* @__PURE__ */
|
|
31621
|
-
/* @__PURE__ */
|
|
31711
|
+
/* @__PURE__ */ jsx142(ChevronLeftIcon3, { size: "sm" }),
|
|
31712
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__back-label", children: parentLabel }),
|
|
31713
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__back-separator", "aria-hidden": "true", children: "/" })
|
|
31622
31714
|
]
|
|
31623
31715
|
}
|
|
31624
31716
|
),
|
|
31625
|
-
/* @__PURE__ */
|
|
31717
|
+
/* @__PURE__ */ jsx142(
|
|
31626
31718
|
"span",
|
|
31627
31719
|
{
|
|
31628
31720
|
className: cn(
|
|
@@ -31633,10 +31725,10 @@ function WorkflowHeader({
|
|
|
31633
31725
|
role: "img"
|
|
31634
31726
|
}
|
|
31635
31727
|
),
|
|
31636
|
-
/* @__PURE__ */
|
|
31637
|
-
saveIndicator && /* @__PURE__ */
|
|
31638
|
-
/* @__PURE__ */
|
|
31639
|
-
/* @__PURE__ */
|
|
31728
|
+
/* @__PURE__ */ jsx142("h1", { className: "ods-workflow-header__title", title: typeof name === "string" ? name : void 0, children: name }),
|
|
31729
|
+
saveIndicator && /* @__PURE__ */ jsxs135(Fragment51, { children: [
|
|
31730
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__sep", "aria-hidden": "true" }),
|
|
31731
|
+
/* @__PURE__ */ jsx142(
|
|
31640
31732
|
"span",
|
|
31641
31733
|
{
|
|
31642
31734
|
className: cn(
|
|
@@ -31652,11 +31744,11 @@ function WorkflowHeader({
|
|
|
31652
31744
|
] }),
|
|
31653
31745
|
leftSlot
|
|
31654
31746
|
] }),
|
|
31655
|
-
/* @__PURE__ */
|
|
31747
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-workflow-header__right", children: [
|
|
31656
31748
|
rightSlot,
|
|
31657
31749
|
environment && // Consumer-driven env chip. Accent (left border colour) comes
|
|
31658
31750
|
// from the consumer — we don't bake in environment names.
|
|
31659
|
-
/* @__PURE__ */
|
|
31751
|
+
/* @__PURE__ */ jsx142(
|
|
31660
31752
|
Chip,
|
|
31661
31753
|
{
|
|
31662
31754
|
size: "sm",
|
|
@@ -31672,66 +31764,66 @@ function WorkflowHeader({
|
|
|
31672
31764
|
children: environment.label
|
|
31673
31765
|
}
|
|
31674
31766
|
),
|
|
31675
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */
|
|
31767
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ jsx142(
|
|
31676
31768
|
Button,
|
|
31677
31769
|
{
|
|
31678
31770
|
variant: "ghost",
|
|
31679
31771
|
size: "sm",
|
|
31680
31772
|
pressed: !!isConsoleOpen,
|
|
31681
31773
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
31682
|
-
leftIcon: /* @__PURE__ */
|
|
31774
|
+
leftIcon: /* @__PURE__ */ jsx142(TerminalIcon, { size: "sm" }),
|
|
31683
31775
|
onClick: onToggleConsole,
|
|
31684
31776
|
children: "Console"
|
|
31685
31777
|
}
|
|
31686
31778
|
),
|
|
31687
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */
|
|
31688
|
-
isRunning ? onStop && /* @__PURE__ */
|
|
31779
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__micro-divider", "aria-hidden": "true" }),
|
|
31780
|
+
isRunning ? onStop && /* @__PURE__ */ jsx142(
|
|
31689
31781
|
Button,
|
|
31690
31782
|
{
|
|
31691
31783
|
variant: "ghost",
|
|
31692
31784
|
size: "sm",
|
|
31693
31785
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
31694
|
-
leftIcon: /* @__PURE__ */
|
|
31786
|
+
leftIcon: /* @__PURE__ */ jsx142(StopFilledAltIcon2, { size: "sm", className: "ods-workflow-header__stop-glyph" }),
|
|
31695
31787
|
onClick: onStop,
|
|
31696
|
-
children: /* @__PURE__ */
|
|
31697
|
-
/* @__PURE__ */
|
|
31698
|
-
runtime && /* @__PURE__ */
|
|
31699
|
-
/* @__PURE__ */
|
|
31700
|
-
/* @__PURE__ */
|
|
31788
|
+
children: /* @__PURE__ */ jsxs135("span", { className: "ods-workflow-header__stop-label", children: [
|
|
31789
|
+
/* @__PURE__ */ jsx142("span", { children: "Stop" }),
|
|
31790
|
+
runtime && /* @__PURE__ */ jsxs135(Fragment51, { children: [
|
|
31791
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__stop-dot", "aria-hidden": "true", children: "\xB7" }),
|
|
31792
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__runtime", children: runtime })
|
|
31701
31793
|
] })
|
|
31702
31794
|
] })
|
|
31703
31795
|
}
|
|
31704
|
-
) : onRun && /* @__PURE__ */
|
|
31796
|
+
) : onRun && /* @__PURE__ */ jsx142(
|
|
31705
31797
|
Button,
|
|
31706
31798
|
{
|
|
31707
31799
|
variant: "primary",
|
|
31708
31800
|
size: "sm",
|
|
31709
31801
|
"aria-label": "Run workflow",
|
|
31710
|
-
leftIcon: /* @__PURE__ */
|
|
31802
|
+
leftIcon: /* @__PURE__ */ jsx142(PlayFilledAltIcon2, { size: "sm" }),
|
|
31711
31803
|
onClick: onRun,
|
|
31712
31804
|
children: "Run"
|
|
31713
31805
|
}
|
|
31714
31806
|
),
|
|
31715
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */
|
|
31807
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ jsx142(
|
|
31716
31808
|
DropdownMenu,
|
|
31717
31809
|
{
|
|
31718
31810
|
"aria-label": menuLabel,
|
|
31719
31811
|
align: "end",
|
|
31720
31812
|
triggerClassName: "ods-workflow-header__menu-trigger",
|
|
31721
31813
|
...menuProps,
|
|
31722
|
-
trigger: menuTrigger ?? /* @__PURE__ */
|
|
31814
|
+
trigger: menuTrigger ?? /* @__PURE__ */ jsx142(
|
|
31723
31815
|
"span",
|
|
31724
31816
|
{
|
|
31725
31817
|
"aria-hidden": "true",
|
|
31726
31818
|
className: "ods-workflow-header__menu-icon",
|
|
31727
|
-
children: /* @__PURE__ */
|
|
31819
|
+
children: /* @__PURE__ */ jsx142(OverflowMenuVerticalIcon, { size: "sm" })
|
|
31728
31820
|
}
|
|
31729
31821
|
),
|
|
31730
31822
|
items: menuItems
|
|
31731
31823
|
}
|
|
31732
31824
|
))
|
|
31733
31825
|
] }),
|
|
31734
|
-
/* @__PURE__ */
|
|
31826
|
+
/* @__PURE__ */ jsx142("span", { className: "ods-workflow-header__progress", "aria-hidden": "true" })
|
|
31735
31827
|
] });
|
|
31736
31828
|
}
|
|
31737
31829
|
|
|
@@ -31743,7 +31835,7 @@ import {
|
|
|
31743
31835
|
StopFilledAltIcon as StopFilledAltIcon3,
|
|
31744
31836
|
TerminalIcon as TerminalIcon2
|
|
31745
31837
|
} from "@octaviaflow/icons";
|
|
31746
|
-
import { Fragment as
|
|
31838
|
+
import { Fragment as Fragment52, jsx as jsx143, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
31747
31839
|
function WorkflowHeaderExpanded({
|
|
31748
31840
|
name,
|
|
31749
31841
|
statusTone = "draft",
|
|
@@ -31771,15 +31863,15 @@ function WorkflowHeaderExpanded({
|
|
|
31771
31863
|
const tickedRuntime = useWorkflowRuntime(runStartedAt, !!isRunning);
|
|
31772
31864
|
const runtime = runtimeOverride ?? tickedRuntime ?? void 0;
|
|
31773
31865
|
const effectiveTone = statusTone === "draft" && isRunning ? "running" : statusTone;
|
|
31774
|
-
return /* @__PURE__ */
|
|
31866
|
+
return /* @__PURE__ */ jsxs136(
|
|
31775
31867
|
"header",
|
|
31776
31868
|
{
|
|
31777
31869
|
className: cn("ods-workflow-header-expanded", className),
|
|
31778
31870
|
"data-running": isRunning ? "true" : void 0,
|
|
31779
31871
|
children: [
|
|
31780
|
-
/* @__PURE__ */
|
|
31781
|
-
/* @__PURE__ */
|
|
31782
|
-
onBack && /* @__PURE__ */
|
|
31872
|
+
/* @__PURE__ */ jsxs136("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--top", children: [
|
|
31873
|
+
/* @__PURE__ */ jsxs136("div", { className: "ods-workflow-header-expanded__left", children: [
|
|
31874
|
+
onBack && /* @__PURE__ */ jsxs136(
|
|
31783
31875
|
"button",
|
|
31784
31876
|
{
|
|
31785
31877
|
type: "button",
|
|
@@ -31787,13 +31879,13 @@ function WorkflowHeaderExpanded({
|
|
|
31787
31879
|
onClick: onBack,
|
|
31788
31880
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
31789
31881
|
children: [
|
|
31790
|
-
/* @__PURE__ */
|
|
31791
|
-
/* @__PURE__ */
|
|
31792
|
-
/* @__PURE__ */
|
|
31882
|
+
/* @__PURE__ */ jsx143(ChevronLeftIcon4, { size: "sm" }),
|
|
31883
|
+
/* @__PURE__ */ jsx143("span", { children: parentLabel }),
|
|
31884
|
+
/* @__PURE__ */ jsx143("span", { "aria-hidden": "true", className: "ods-workflow-header-expanded__back-sep", children: "/" })
|
|
31793
31885
|
]
|
|
31794
31886
|
}
|
|
31795
31887
|
),
|
|
31796
|
-
/* @__PURE__ */
|
|
31888
|
+
/* @__PURE__ */ jsx143(
|
|
31797
31889
|
"span",
|
|
31798
31890
|
{
|
|
31799
31891
|
className: cn(
|
|
@@ -31804,10 +31896,10 @@ function WorkflowHeaderExpanded({
|
|
|
31804
31896
|
role: "img"
|
|
31805
31897
|
}
|
|
31806
31898
|
),
|
|
31807
|
-
/* @__PURE__ */
|
|
31899
|
+
/* @__PURE__ */ jsx143("h1", { className: "ods-workflow-header-expanded__title", children: name })
|
|
31808
31900
|
] }),
|
|
31809
|
-
/* @__PURE__ */
|
|
31810
|
-
environment && /* @__PURE__ */
|
|
31901
|
+
/* @__PURE__ */ jsxs136("div", { className: "ods-workflow-header-expanded__right", children: [
|
|
31902
|
+
environment && /* @__PURE__ */ jsx143(
|
|
31811
31903
|
Chip,
|
|
31812
31904
|
{
|
|
31813
31905
|
size: "sm",
|
|
@@ -31819,58 +31911,58 @@ function WorkflowHeaderExpanded({
|
|
|
31819
31911
|
children: environment.label
|
|
31820
31912
|
}
|
|
31821
31913
|
),
|
|
31822
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */
|
|
31914
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ jsx143(
|
|
31823
31915
|
Button,
|
|
31824
31916
|
{
|
|
31825
31917
|
variant: "ghost",
|
|
31826
31918
|
size: "sm",
|
|
31827
31919
|
pressed: !!isConsoleOpen,
|
|
31828
31920
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
31829
|
-
leftIcon: /* @__PURE__ */
|
|
31921
|
+
leftIcon: /* @__PURE__ */ jsx143(TerminalIcon2, { size: "sm" }),
|
|
31830
31922
|
onClick: onToggleConsole,
|
|
31831
31923
|
children: "Console"
|
|
31832
31924
|
}
|
|
31833
31925
|
),
|
|
31834
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */
|
|
31835
|
-
isRunning ? onStop && /* @__PURE__ */
|
|
31926
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ jsx143("span", { className: "ods-workflow-header-expanded__micro-divider", "aria-hidden": "true" }),
|
|
31927
|
+
isRunning ? onStop && /* @__PURE__ */ jsx143(
|
|
31836
31928
|
Button,
|
|
31837
31929
|
{
|
|
31838
31930
|
variant: "ghost",
|
|
31839
31931
|
size: "sm",
|
|
31840
31932
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
31841
|
-
leftIcon: /* @__PURE__ */
|
|
31933
|
+
leftIcon: /* @__PURE__ */ jsx143(StopFilledAltIcon3, { size: "sm", className: "ods-workflow-header-expanded__stop-glyph" }),
|
|
31842
31934
|
onClick: onStop,
|
|
31843
|
-
children: /* @__PURE__ */
|
|
31844
|
-
/* @__PURE__ */
|
|
31845
|
-
runtime && /* @__PURE__ */
|
|
31846
|
-
/* @__PURE__ */
|
|
31847
|
-
/* @__PURE__ */
|
|
31935
|
+
children: /* @__PURE__ */ jsxs136("span", { style: { display: "inline-flex", gap: 4, alignItems: "center" }, children: [
|
|
31936
|
+
/* @__PURE__ */ jsx143("span", { children: "Stop" }),
|
|
31937
|
+
runtime && /* @__PURE__ */ jsxs136(Fragment52, { children: [
|
|
31938
|
+
/* @__PURE__ */ jsx143("span", { "aria-hidden": "true", style: { opacity: 0.6 }, children: "\xB7" }),
|
|
31939
|
+
/* @__PURE__ */ jsx143("span", { className: "ods-workflow-header-expanded__runtime", children: runtime })
|
|
31848
31940
|
] })
|
|
31849
31941
|
] })
|
|
31850
31942
|
}
|
|
31851
|
-
) : onRun && /* @__PURE__ */
|
|
31943
|
+
) : onRun && /* @__PURE__ */ jsx143(
|
|
31852
31944
|
Button,
|
|
31853
31945
|
{
|
|
31854
31946
|
variant: "primary",
|
|
31855
31947
|
size: "sm",
|
|
31856
31948
|
"aria-label": "Run workflow",
|
|
31857
|
-
leftIcon: /* @__PURE__ */
|
|
31949
|
+
leftIcon: /* @__PURE__ */ jsx143(PlayFilledAltIcon3, { size: "sm" }),
|
|
31858
31950
|
onClick: onRun,
|
|
31859
31951
|
children: "Run"
|
|
31860
31952
|
}
|
|
31861
31953
|
),
|
|
31862
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */
|
|
31954
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ jsx143(
|
|
31863
31955
|
DropdownMenu,
|
|
31864
31956
|
{
|
|
31865
31957
|
"aria-label": menuLabel,
|
|
31866
31958
|
align: "end",
|
|
31867
31959
|
...menuProps,
|
|
31868
|
-
trigger: menuTrigger ?? /* @__PURE__ */
|
|
31960
|
+
trigger: menuTrigger ?? /* @__PURE__ */ jsx143(
|
|
31869
31961
|
Button,
|
|
31870
31962
|
{
|
|
31871
31963
|
variant: "ghost",
|
|
31872
31964
|
size: "sm",
|
|
31873
|
-
leftIcon: /* @__PURE__ */
|
|
31965
|
+
leftIcon: /* @__PURE__ */ jsx143(OverflowMenuVerticalIcon2, { size: "sm" })
|
|
31874
31966
|
}
|
|
31875
31967
|
),
|
|
31876
31968
|
items: menuItems
|
|
@@ -31878,10 +31970,10 @@ function WorkflowHeaderExpanded({
|
|
|
31878
31970
|
))
|
|
31879
31971
|
] })
|
|
31880
31972
|
] }),
|
|
31881
|
-
(meta || saveLabel) && /* @__PURE__ */
|
|
31973
|
+
(meta || saveLabel) && /* @__PURE__ */ jsx143("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--bottom", children: /* @__PURE__ */ jsxs136("span", { className: "ods-workflow-header-expanded__meta", children: [
|
|
31882
31974
|
meta,
|
|
31883
|
-
meta && saveLabel && /* @__PURE__ */
|
|
31884
|
-
saveLabel && /* @__PURE__ */
|
|
31975
|
+
meta && saveLabel && /* @__PURE__ */ jsx143("span", { "aria-hidden": "true", style: { margin: "0 6px", opacity: 0.4 }, children: "\xB7" }),
|
|
31976
|
+
saveLabel && /* @__PURE__ */ jsx143(
|
|
31885
31977
|
"span",
|
|
31886
31978
|
{
|
|
31887
31979
|
className: cn(
|
|
@@ -31893,7 +31985,7 @@ function WorkflowHeaderExpanded({
|
|
|
31893
31985
|
}
|
|
31894
31986
|
)
|
|
31895
31987
|
] }) }),
|
|
31896
|
-
/* @__PURE__ */
|
|
31988
|
+
/* @__PURE__ */ jsx143("span", { className: "ods-workflow-header-expanded__progress", "aria-hidden": "true" })
|
|
31897
31989
|
]
|
|
31898
31990
|
}
|
|
31899
31991
|
);
|
|
@@ -31914,7 +32006,7 @@ import {
|
|
|
31914
32006
|
useMemo as useMemo36,
|
|
31915
32007
|
useState as useState69
|
|
31916
32008
|
} from "react";
|
|
31917
|
-
import { Fragment as
|
|
32009
|
+
import { Fragment as Fragment53, jsx as jsx144, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
31918
32010
|
function parseXml(src) {
|
|
31919
32011
|
if (typeof window !== "undefined" && typeof window.DOMParser !== "undefined") {
|
|
31920
32012
|
try {
|
|
@@ -32005,7 +32097,7 @@ var XmlViewer = forwardRef116(
|
|
|
32005
32097
|
const bodyStyle = height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : maxHeight !== void 0 ? {
|
|
32006
32098
|
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
|
|
32007
32099
|
} : void 0;
|
|
32008
|
-
return /* @__PURE__ */
|
|
32100
|
+
return /* @__PURE__ */ jsxs137(
|
|
32009
32101
|
"div",
|
|
32010
32102
|
{
|
|
32011
32103
|
...rest,
|
|
@@ -32013,9 +32105,9 @@ var XmlViewer = forwardRef116(
|
|
|
32013
32105
|
id: baseId,
|
|
32014
32106
|
className: cn("ods-xml-viewer", className),
|
|
32015
32107
|
children: [
|
|
32016
|
-
(title || status || parsed.error) && /* @__PURE__ */
|
|
32017
|
-
title && /* @__PURE__ */
|
|
32018
|
-
parsed.error && /* @__PURE__ */
|
|
32108
|
+
(title || status || parsed.error) && /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__head", children: [
|
|
32109
|
+
title && /* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__title", children: title }),
|
|
32110
|
+
parsed.error && /* @__PURE__ */ jsx144(
|
|
32019
32111
|
"span",
|
|
32020
32112
|
{
|
|
32021
32113
|
className: "ods-xml-viewer__status ods-xml-viewer__status--error",
|
|
@@ -32023,9 +32115,9 @@ var XmlViewer = forwardRef116(
|
|
|
32023
32115
|
children: "Invalid XML"
|
|
32024
32116
|
}
|
|
32025
32117
|
),
|
|
32026
|
-
status && !parsed.error && /* @__PURE__ */
|
|
32118
|
+
status && !parsed.error && /* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__status", children: status })
|
|
32027
32119
|
] }),
|
|
32028
|
-
/* @__PURE__ */
|
|
32120
|
+
/* @__PURE__ */ jsx144("div", { className: "ods-xml-viewer__body", style: bodyStyle, "data-mode": mode, children: mode === "edit" ? /* @__PURE__ */ jsx144(XmlEditBody, { text: data, onChange, onValidate }) : parsed.error ? /* @__PURE__ */ jsx144("pre", { className: "ods-xml-viewer__raw", children: data }) : parsed.root ? /* @__PURE__ */ jsx144(
|
|
32029
32121
|
XmlNodeRow,
|
|
32030
32122
|
{
|
|
32031
32123
|
node: parsed.root,
|
|
@@ -32069,8 +32161,8 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
32069
32161
|
useEffect51(() => {
|
|
32070
32162
|
validate(initial);
|
|
32071
32163
|
}, []);
|
|
32072
|
-
return /* @__PURE__ */
|
|
32073
|
-
parseError && /* @__PURE__ */
|
|
32164
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__edit", children: [
|
|
32165
|
+
parseError && /* @__PURE__ */ jsxs137(
|
|
32074
32166
|
InlineMessage,
|
|
32075
32167
|
{
|
|
32076
32168
|
tone: "danger",
|
|
@@ -32087,7 +32179,7 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
32087
32179
|
]
|
|
32088
32180
|
}
|
|
32089
32181
|
),
|
|
32090
|
-
/* @__PURE__ */
|
|
32182
|
+
/* @__PURE__ */ jsx144(
|
|
32091
32183
|
CodeEditor,
|
|
32092
32184
|
{
|
|
32093
32185
|
value: text,
|
|
@@ -32130,27 +32222,27 @@ function XmlNodeRow({
|
|
|
32130
32222
|
if (node.type === "text") {
|
|
32131
32223
|
const t = (node.text ?? "").trim();
|
|
32132
32224
|
const truncated = t.length > truncateAt ? `${t.slice(0, truncateAt)}\u2026` : t;
|
|
32133
|
-
return /* @__PURE__ */
|
|
32134
|
-
/* @__PURE__ */
|
|
32135
|
-
/* @__PURE__ */
|
|
32225
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32226
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32227
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__text", children: truncated })
|
|
32136
32228
|
] });
|
|
32137
32229
|
}
|
|
32138
32230
|
if (node.type === "comment") {
|
|
32139
|
-
return /* @__PURE__ */
|
|
32140
|
-
/* @__PURE__ */
|
|
32141
|
-
/* @__PURE__ */
|
|
32231
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32232
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32233
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__comment", children: `<!-- ${node.text} -->` })
|
|
32142
32234
|
] });
|
|
32143
32235
|
}
|
|
32144
32236
|
if (node.type === "cdata") {
|
|
32145
|
-
return /* @__PURE__ */
|
|
32146
|
-
/* @__PURE__ */
|
|
32147
|
-
/* @__PURE__ */
|
|
32237
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32238
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32239
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__cdata", children: `<![CDATA[${node.text}]]>` })
|
|
32148
32240
|
] });
|
|
32149
32241
|
}
|
|
32150
32242
|
if (node.type === "pi") {
|
|
32151
|
-
return /* @__PURE__ */
|
|
32152
|
-
/* @__PURE__ */
|
|
32153
|
-
/* @__PURE__ */
|
|
32243
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32244
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32245
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__pi", children: `<?${node.text}?>` })
|
|
32154
32246
|
] });
|
|
32155
32247
|
}
|
|
32156
32248
|
const children = node.children ?? [];
|
|
@@ -32159,58 +32251,58 @@ function XmlNodeRow({
|
|
|
32159
32251
|
const inlineTextChild = children.length === 1 && children[0].type === "text" ? children[0].text ?? "" : null;
|
|
32160
32252
|
if (inlineTextChild !== null) {
|
|
32161
32253
|
const isMultiLine = inlineTextChild.includes("\n");
|
|
32162
|
-
const openTag = /* @__PURE__ */
|
|
32163
|
-
/* @__PURE__ */
|
|
32164
|
-
/* @__PURE__ */
|
|
32165
|
-
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */
|
|
32166
|
-
/* @__PURE__ */
|
|
32167
|
-
/* @__PURE__ */
|
|
32168
|
-
/* @__PURE__ */
|
|
32254
|
+
const openTag = /* @__PURE__ */ jsxs137(Fragment53, { children: [
|
|
32255
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: "<" }),
|
|
32256
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
32257
|
+
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ jsxs137("span", { className: "ods-xml-viewer__attr", children: [
|
|
32258
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-name", children: k }),
|
|
32259
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-eq", children: "=" }),
|
|
32260
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-value", children: `"${v}"` })
|
|
32169
32261
|
] }, k)),
|
|
32170
|
-
/* @__PURE__ */
|
|
32262
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
32171
32263
|
] });
|
|
32172
|
-
const closeTag = /* @__PURE__ */
|
|
32173
|
-
/* @__PURE__ */
|
|
32174
|
-
/* @__PURE__ */
|
|
32175
|
-
/* @__PURE__ */
|
|
32264
|
+
const closeTag = /* @__PURE__ */ jsxs137(Fragment53, { children: [
|
|
32265
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
32266
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
32267
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
32176
32268
|
] });
|
|
32177
32269
|
if (isMultiLine) {
|
|
32178
32270
|
const innerPad = pad2 + 12;
|
|
32179
|
-
return /* @__PURE__ */
|
|
32180
|
-
/* @__PURE__ */
|
|
32181
|
-
/* @__PURE__ */
|
|
32271
|
+
return /* @__PURE__ */ jsxs137("div", { children: [
|
|
32272
|
+
/* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32273
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32182
32274
|
openTag
|
|
32183
32275
|
] }),
|
|
32184
|
-
/* @__PURE__ */
|
|
32276
|
+
/* @__PURE__ */ jsx144(
|
|
32185
32277
|
"div",
|
|
32186
32278
|
{
|
|
32187
32279
|
className: "ods-xml-viewer__row ods-xml-viewer__row--multiline",
|
|
32188
32280
|
style: { paddingLeft: innerPad },
|
|
32189
|
-
children: /* @__PURE__ */
|
|
32281
|
+
children: /* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__text", children: inlineTextChild })
|
|
32190
32282
|
}
|
|
32191
32283
|
),
|
|
32192
|
-
/* @__PURE__ */
|
|
32193
|
-
/* @__PURE__ */
|
|
32284
|
+
/* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32285
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32194
32286
|
closeTag
|
|
32195
32287
|
] })
|
|
32196
32288
|
] });
|
|
32197
32289
|
}
|
|
32198
|
-
return /* @__PURE__ */
|
|
32199
|
-
/* @__PURE__ */
|
|
32290
|
+
return /* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32291
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32200
32292
|
openTag,
|
|
32201
|
-
/* @__PURE__ */
|
|
32293
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__text", children: inlineTextChild }),
|
|
32202
32294
|
closeTag
|
|
32203
32295
|
] });
|
|
32204
32296
|
}
|
|
32205
|
-
return /* @__PURE__ */
|
|
32206
|
-
/* @__PURE__ */
|
|
32297
|
+
return /* @__PURE__ */ jsxs137("div", { children: [
|
|
32298
|
+
/* @__PURE__ */ jsxs137(
|
|
32207
32299
|
"div",
|
|
32208
32300
|
{
|
|
32209
32301
|
className: "ods-xml-viewer__row ods-xml-viewer__row--element",
|
|
32210
32302
|
style: { paddingLeft: pad2 },
|
|
32211
32303
|
onClick: () => !isSelfClosing && setOpen((o) => !o),
|
|
32212
32304
|
children: [
|
|
32213
|
-
isSelfClosing ? /* @__PURE__ */
|
|
32305
|
+
isSelfClosing ? /* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }) : /* @__PURE__ */ jsx144(
|
|
32214
32306
|
"button",
|
|
32215
32307
|
{
|
|
32216
32308
|
type: "button",
|
|
@@ -32224,30 +32316,30 @@ function XmlNodeRow({
|
|
|
32224
32316
|
e.stopPropagation();
|
|
32225
32317
|
setOpen((o) => !o);
|
|
32226
32318
|
},
|
|
32227
|
-
children: /* @__PURE__ */
|
|
32319
|
+
children: /* @__PURE__ */ jsx144(ChevronRightIcon6, { size: "xs" })
|
|
32228
32320
|
}
|
|
32229
32321
|
),
|
|
32230
|
-
/* @__PURE__ */
|
|
32231
|
-
/* @__PURE__ */
|
|
32232
|
-
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */
|
|
32233
|
-
/* @__PURE__ */
|
|
32234
|
-
/* @__PURE__ */
|
|
32235
|
-
/* @__PURE__ */
|
|
32322
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: "<" }),
|
|
32323
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
32324
|
+
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ jsxs137("span", { className: "ods-xml-viewer__attr", children: [
|
|
32325
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-name", children: k }),
|
|
32326
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-eq", children: "=" }),
|
|
32327
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__attr-value", children: `"${v}"` })
|
|
32236
32328
|
] }, k)),
|
|
32237
|
-
isSelfClosing ? /* @__PURE__ */
|
|
32238
|
-
/* @__PURE__ */
|
|
32239
|
-
!open && /* @__PURE__ */
|
|
32240
|
-
/* @__PURE__ */
|
|
32329
|
+
isSelfClosing ? /* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: " />" }) : /* @__PURE__ */ jsxs137(Fragment53, { children: [
|
|
32330
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: ">" }),
|
|
32331
|
+
!open && /* @__PURE__ */ jsxs137(Fragment53, { children: [
|
|
32332
|
+
/* @__PURE__ */ jsxs137("span", { className: "ods-xml-viewer__preview", children: [
|
|
32241
32333
|
children.length,
|
|
32242
32334
|
" child",
|
|
32243
32335
|
children.length === 1 ? "" : "ren"
|
|
32244
32336
|
] }),
|
|
32245
|
-
/* @__PURE__ */
|
|
32246
|
-
/* @__PURE__ */
|
|
32247
|
-
/* @__PURE__ */
|
|
32337
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
32338
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
32339
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
32248
32340
|
] })
|
|
32249
32341
|
] }),
|
|
32250
|
-
copyable && /* @__PURE__ */
|
|
32342
|
+
copyable && /* @__PURE__ */ jsx144(
|
|
32251
32343
|
"button",
|
|
32252
32344
|
{
|
|
32253
32345
|
type: "button",
|
|
@@ -32257,14 +32349,14 @@ function XmlNodeRow({
|
|
|
32257
32349
|
),
|
|
32258
32350
|
"aria-label": copied ? "Copied" : `Copy ${node.name} subtree`,
|
|
32259
32351
|
onClick: onCopy,
|
|
32260
|
-
children: copied ? /* @__PURE__ */
|
|
32352
|
+
children: copied ? /* @__PURE__ */ jsx144(CheckmarkIcon13, { size: "xs" }) : /* @__PURE__ */ jsx144(CopyIcon6, { size: "xs" })
|
|
32261
32353
|
}
|
|
32262
32354
|
)
|
|
32263
32355
|
]
|
|
32264
32356
|
}
|
|
32265
32357
|
),
|
|
32266
|
-
!isSelfClosing && open && /* @__PURE__ */
|
|
32267
|
-
children.map((c, i) => /* @__PURE__ */
|
|
32358
|
+
!isSelfClosing && open && /* @__PURE__ */ jsxs137(Fragment53, { children: [
|
|
32359
|
+
children.map((c, i) => /* @__PURE__ */ jsx144(
|
|
32268
32360
|
XmlNodeRow,
|
|
32269
32361
|
{
|
|
32270
32362
|
node: c,
|
|
@@ -32276,11 +32368,11 @@ function XmlNodeRow({
|
|
|
32276
32368
|
},
|
|
32277
32369
|
i
|
|
32278
32370
|
)),
|
|
32279
|
-
/* @__PURE__ */
|
|
32280
|
-
/* @__PURE__ */
|
|
32281
|
-
/* @__PURE__ */
|
|
32282
|
-
/* @__PURE__ */
|
|
32283
|
-
/* @__PURE__ */
|
|
32371
|
+
/* @__PURE__ */ jsxs137("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
32372
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
32373
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
32374
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
32375
|
+
/* @__PURE__ */ jsx144("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
32284
32376
|
] })
|
|
32285
32377
|
] })
|
|
32286
32378
|
] });
|
|
@@ -32301,7 +32393,7 @@ import {
|
|
|
32301
32393
|
useState as useState70
|
|
32302
32394
|
} from "react";
|
|
32303
32395
|
import YAML from "yaml";
|
|
32304
|
-
import { Fragment as
|
|
32396
|
+
import { Fragment as Fragment54, jsx as jsx145, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
32305
32397
|
function toYaml(value, indent = 0) {
|
|
32306
32398
|
const pad2 = " ".repeat(indent);
|
|
32307
32399
|
if (value === null) return "null";
|
|
@@ -32500,7 +32592,7 @@ var YamlViewer = forwardRef117(
|
|
|
32500
32592
|
const bodyStyle = height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : maxHeight !== void 0 ? {
|
|
32501
32593
|
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
|
|
32502
32594
|
} : void 0;
|
|
32503
|
-
return /* @__PURE__ */
|
|
32595
|
+
return /* @__PURE__ */ jsxs138(
|
|
32504
32596
|
"div",
|
|
32505
32597
|
{
|
|
32506
32598
|
...rest,
|
|
@@ -32512,11 +32604,11 @@ var YamlViewer = forwardRef117(
|
|
|
32512
32604
|
className
|
|
32513
32605
|
),
|
|
32514
32606
|
children: [
|
|
32515
|
-
(title || status || copyable) && /* @__PURE__ */
|
|
32516
|
-
title && /* @__PURE__ */
|
|
32517
|
-
/* @__PURE__ */
|
|
32518
|
-
status && /* @__PURE__ */
|
|
32519
|
-
copyable && /* @__PURE__ */
|
|
32607
|
+
(title || status || copyable) && /* @__PURE__ */ jsxs138("div", { className: "ods-yaml-viewer__head", children: [
|
|
32608
|
+
title && /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__title", children: title }),
|
|
32609
|
+
/* @__PURE__ */ jsxs138("span", { className: "ods-yaml-viewer__head-right", children: [
|
|
32610
|
+
status && /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__status", children: status }),
|
|
32611
|
+
copyable && /* @__PURE__ */ jsx145(
|
|
32520
32612
|
"button",
|
|
32521
32613
|
{
|
|
32522
32614
|
type: "button",
|
|
@@ -32526,16 +32618,16 @@ var YamlViewer = forwardRef117(
|
|
|
32526
32618
|
),
|
|
32527
32619
|
"aria-label": copied ? "Copied" : "Copy YAML",
|
|
32528
32620
|
onClick: onCopy,
|
|
32529
|
-
children: copied ? /* @__PURE__ */
|
|
32621
|
+
children: copied ? /* @__PURE__ */ jsx145(CheckmarkIcon14, { size: "xs" }) : /* @__PURE__ */ jsx145(CopyIcon7, { size: "xs" })
|
|
32530
32622
|
}
|
|
32531
32623
|
)
|
|
32532
32624
|
] })
|
|
32533
32625
|
] }),
|
|
32534
|
-
/* @__PURE__ */
|
|
32626
|
+
/* @__PURE__ */ jsx145("div", { className: "ods-yaml-viewer__body", style: bodyStyle, "data-mode": mode, children: mode === "edit" ? /* @__PURE__ */ jsx145(YamlEditBody, { text, onChange, onValidate }) : tokens.map((t) => {
|
|
32535
32627
|
if (hidden.has(t.index)) return null;
|
|
32536
32628
|
const lineNo = t.index + 1;
|
|
32537
32629
|
const isCollapsed = collapsed.has(t.index);
|
|
32538
|
-
return /* @__PURE__ */
|
|
32630
|
+
return /* @__PURE__ */ jsxs138(
|
|
32539
32631
|
"div",
|
|
32540
32632
|
{
|
|
32541
32633
|
className: cn(
|
|
@@ -32544,7 +32636,7 @@ var YamlViewer = forwardRef117(
|
|
|
32544
32636
|
isCollapsed && "ods-yaml-viewer__line--collapsed"
|
|
32545
32637
|
),
|
|
32546
32638
|
children: [
|
|
32547
|
-
showLineNumbers && /* @__PURE__ */
|
|
32639
|
+
showLineNumbers && /* @__PURE__ */ jsx145(
|
|
32548
32640
|
"span",
|
|
32549
32641
|
{
|
|
32550
32642
|
className: "ods-yaml-viewer__line-no",
|
|
@@ -32552,7 +32644,7 @@ var YamlViewer = forwardRef117(
|
|
|
32552
32644
|
children: lineNo
|
|
32553
32645
|
}
|
|
32554
32646
|
),
|
|
32555
|
-
/* @__PURE__ */
|
|
32647
|
+
/* @__PURE__ */ jsx145(
|
|
32556
32648
|
"span",
|
|
32557
32649
|
{
|
|
32558
32650
|
className: "ods-yaml-viewer__indent",
|
|
@@ -32560,7 +32652,7 @@ var YamlViewer = forwardRef117(
|
|
|
32560
32652
|
"aria-hidden": "true"
|
|
32561
32653
|
}
|
|
32562
32654
|
),
|
|
32563
|
-
t.hasChildren ? /* @__PURE__ */
|
|
32655
|
+
t.hasChildren ? /* @__PURE__ */ jsx145(
|
|
32564
32656
|
"button",
|
|
32565
32657
|
{
|
|
32566
32658
|
type: "button",
|
|
@@ -32571,15 +32663,15 @@ var YamlViewer = forwardRef117(
|
|
|
32571
32663
|
onClick: () => toggle(t.index),
|
|
32572
32664
|
"aria-expanded": !isCollapsed,
|
|
32573
32665
|
"aria-label": isCollapsed ? "Expand" : "Collapse",
|
|
32574
|
-
children: /* @__PURE__ */
|
|
32666
|
+
children: /* @__PURE__ */ jsx145(ChevronRightIcon7, { size: "xs" })
|
|
32575
32667
|
}
|
|
32576
|
-
) : /* @__PURE__ */
|
|
32577
|
-
t.kind === "comment" && /* @__PURE__ */
|
|
32578
|
-
t.kind === "key" && /* @__PURE__ */
|
|
32579
|
-
t.raw.trim().startsWith("-") && /* @__PURE__ */
|
|
32580
|
-
/* @__PURE__ */
|
|
32581
|
-
/* @__PURE__ */
|
|
32582
|
-
t.inlineValue && /* @__PURE__ */
|
|
32668
|
+
) : /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__caret-spacer" }),
|
|
32669
|
+
t.kind === "comment" && /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__comment", children: t.raw.trim() }),
|
|
32670
|
+
t.kind === "key" && /* @__PURE__ */ jsxs138(Fragment54, { children: [
|
|
32671
|
+
t.raw.trim().startsWith("-") && /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
32672
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__key", children: t.key }),
|
|
32673
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__colon", children: ":" }),
|
|
32674
|
+
t.inlineValue && /* @__PURE__ */ jsxs138(
|
|
32583
32675
|
"span",
|
|
32584
32676
|
{
|
|
32585
32677
|
className: cn(
|
|
@@ -32592,11 +32684,11 @@ var YamlViewer = forwardRef117(
|
|
|
32592
32684
|
]
|
|
32593
32685
|
}
|
|
32594
32686
|
),
|
|
32595
|
-
isCollapsed && /* @__PURE__ */
|
|
32687
|
+
isCollapsed && /* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__preview", children: " \u2026" })
|
|
32596
32688
|
] }),
|
|
32597
|
-
t.kind === "sequence" && /* @__PURE__ */
|
|
32598
|
-
/* @__PURE__ */
|
|
32599
|
-
/* @__PURE__ */
|
|
32689
|
+
t.kind === "sequence" && /* @__PURE__ */ jsxs138(Fragment54, { children: [
|
|
32690
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
32691
|
+
/* @__PURE__ */ jsx145(
|
|
32600
32692
|
"span",
|
|
32601
32693
|
{
|
|
32602
32694
|
className: cn(
|
|
@@ -32607,7 +32699,7 @@ var YamlViewer = forwardRef117(
|
|
|
32607
32699
|
}
|
|
32608
32700
|
)
|
|
32609
32701
|
] }),
|
|
32610
|
-
t.kind === "scalar" && /* @__PURE__ */
|
|
32702
|
+
t.kind === "scalar" && /* @__PURE__ */ jsx145(
|
|
32611
32703
|
"span",
|
|
32612
32704
|
{
|
|
32613
32705
|
className: cn(
|
|
@@ -32617,7 +32709,7 @@ var YamlViewer = forwardRef117(
|
|
|
32617
32709
|
children: t.raw.trim()
|
|
32618
32710
|
}
|
|
32619
32711
|
),
|
|
32620
|
-
t.kind === "blank" && /* @__PURE__ */
|
|
32712
|
+
t.kind === "blank" && /* @__PURE__ */ jsx145("span", { children: "\xA0" })
|
|
32621
32713
|
]
|
|
32622
32714
|
},
|
|
32623
32715
|
t.index
|
|
@@ -32673,8 +32765,8 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
32673
32765
|
useEffect52(() => {
|
|
32674
32766
|
validate(initial);
|
|
32675
32767
|
}, []);
|
|
32676
|
-
return /* @__PURE__ */
|
|
32677
|
-
parseError && /* @__PURE__ */
|
|
32768
|
+
return /* @__PURE__ */ jsxs138("div", { className: "ods-yaml-viewer__edit", children: [
|
|
32769
|
+
parseError && /* @__PURE__ */ jsxs138(
|
|
32678
32770
|
InlineMessage,
|
|
32679
32771
|
{
|
|
32680
32772
|
tone: "danger",
|
|
@@ -32691,7 +32783,7 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
32691
32783
|
]
|
|
32692
32784
|
}
|
|
32693
32785
|
),
|
|
32694
|
-
/* @__PURE__ */
|
|
32786
|
+
/* @__PURE__ */ jsx145(
|
|
32695
32787
|
CodeEditor,
|
|
32696
32788
|
{
|
|
32697
32789
|
value: text,
|
|
@@ -33095,7 +33187,7 @@ function useTraceTimeline({
|
|
|
33095
33187
|
import { generateCssVars, resolveConfig } from "@octaviaflow/config";
|
|
33096
33188
|
import { createContext as createContext3, useContext as useContext4, useEffect as useEffect55, useMemo as useMemo38 } from "react";
|
|
33097
33189
|
import { OverlayProvider as OverlayProvider3 } from "react-aria";
|
|
33098
|
-
import { jsx as
|
|
33190
|
+
import { jsx as jsx146 } from "react/jsx-runtime";
|
|
33099
33191
|
var OdsContext = createContext3(null);
|
|
33100
33192
|
function OdsProvider({ config: userConfig, children }) {
|
|
33101
33193
|
const resolved = useMemo38(() => resolveConfig(userConfig), [userConfig]);
|
|
@@ -33116,7 +33208,7 @@ function OdsProvider({ config: userConfig, children }) {
|
|
|
33116
33208
|
}
|
|
33117
33209
|
}, [resolved]);
|
|
33118
33210
|
const contextValue = useMemo38(() => ({ config: resolved }), [resolved]);
|
|
33119
|
-
return /* @__PURE__ */
|
|
33211
|
+
return /* @__PURE__ */ jsx146(OdsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx146(OverlayProvider3, { children }) });
|
|
33120
33212
|
}
|
|
33121
33213
|
function useOds() {
|
|
33122
33214
|
const ctx = useContext4(OdsContext);
|
|
@@ -33576,6 +33668,7 @@ export {
|
|
|
33576
33668
|
Spotlight,
|
|
33577
33669
|
Stack,
|
|
33578
33670
|
Stat,
|
|
33671
|
+
StatusList,
|
|
33579
33672
|
StatusTiles,
|
|
33580
33673
|
Stepper,
|
|
33581
33674
|
Switch,
|