@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.cjs
CHANGED
|
@@ -180,6 +180,7 @@ __export(src_exports, {
|
|
|
180
180
|
Spotlight: () => Spotlight,
|
|
181
181
|
Stack: () => Stack,
|
|
182
182
|
Stat: () => Stat,
|
|
183
|
+
StatusList: () => StatusList,
|
|
183
184
|
StatusTiles: () => StatusTiles,
|
|
184
185
|
Stepper: () => Stepper,
|
|
185
186
|
Switch: () => Switch,
|
|
@@ -24522,8 +24523,14 @@ function SlideoutContent({
|
|
|
24522
24523
|
title,
|
|
24523
24524
|
children,
|
|
24524
24525
|
footer,
|
|
24525
|
-
className
|
|
24526
|
+
className,
|
|
24527
|
+
offsetTop = 0,
|
|
24528
|
+
offsetBottom = 0
|
|
24526
24529
|
}) {
|
|
24530
|
+
const toCss2 = (v) => typeof v === "number" ? `${v}px` : v;
|
|
24531
|
+
const insetStyle = {};
|
|
24532
|
+
if (offsetTop) insetStyle.top = toCss2(offsetTop);
|
|
24533
|
+
if (offsetBottom) insetStyle.bottom = toCss2(offsetBottom);
|
|
24527
24534
|
const overlayRef = (0, import_react130.useRef)(null);
|
|
24528
24535
|
const panelRef = (0, import_react130.useRef)(null);
|
|
24529
24536
|
(0, import_react130.useEffect)(() => {
|
|
@@ -24572,7 +24579,8 @@ function SlideoutContent({
|
|
|
24572
24579
|
transition: { duration: 0.2 },
|
|
24573
24580
|
onClick: onClose,
|
|
24574
24581
|
"data-testid": "slideout-backdrop",
|
|
24575
|
-
"aria-hidden": "true"
|
|
24582
|
+
"aria-hidden": "true",
|
|
24583
|
+
style: insetStyle
|
|
24576
24584
|
}
|
|
24577
24585
|
),
|
|
24578
24586
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react_aria11.FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
@@ -24586,7 +24594,7 @@ function SlideoutContent({
|
|
|
24586
24594
|
panelRef.current = node;
|
|
24587
24595
|
},
|
|
24588
24596
|
className: cn("ods-slideout__panel", `ods-slideout__panel--${position}`, className),
|
|
24589
|
-
style: { width: panelWidth },
|
|
24597
|
+
style: { width: panelWidth, ...insetStyle },
|
|
24590
24598
|
initial: variant.initial,
|
|
24591
24599
|
animate: variant.animate,
|
|
24592
24600
|
exit: variant.exit,
|
|
@@ -24702,7 +24710,9 @@ function VersionHistory({
|
|
|
24702
24710
|
activeTab,
|
|
24703
24711
|
onTabChange,
|
|
24704
24712
|
defaultExpandedId = null,
|
|
24705
|
-
className
|
|
24713
|
+
className,
|
|
24714
|
+
offsetTop,
|
|
24715
|
+
offsetBottom
|
|
24706
24716
|
}) {
|
|
24707
24717
|
const [expandedId, setExpandedId] = (0, import_react132.useState)(defaultExpandedId);
|
|
24708
24718
|
const baseId = (0, import_react132.useId)();
|
|
@@ -24715,6 +24725,8 @@ function VersionHistory({
|
|
|
24715
24725
|
position,
|
|
24716
24726
|
width,
|
|
24717
24727
|
title,
|
|
24728
|
+
offsetTop,
|
|
24729
|
+
offsetBottom,
|
|
24718
24730
|
className: cn("ods-version-history", className),
|
|
24719
24731
|
children: [
|
|
24720
24732
|
showToolbar && /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "ods-version-history__toolbar", children: [
|
|
@@ -24844,9 +24856,90 @@ function VersionHistory({
|
|
|
24844
24856
|
}
|
|
24845
24857
|
VersionHistory.displayName = "VersionHistory";
|
|
24846
24858
|
|
|
24859
|
+
// src/components/StatusList/StatusList.tsx
|
|
24860
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
24861
|
+
var TONE_TO_CHIP2 = {
|
|
24862
|
+
success: "success",
|
|
24863
|
+
running: "primary",
|
|
24864
|
+
warning: "warning",
|
|
24865
|
+
danger: "error",
|
|
24866
|
+
neutral: "default",
|
|
24867
|
+
info: "primary"
|
|
24868
|
+
};
|
|
24869
|
+
function StatusList({
|
|
24870
|
+
items,
|
|
24871
|
+
title,
|
|
24872
|
+
action,
|
|
24873
|
+
dense = false,
|
|
24874
|
+
max,
|
|
24875
|
+
emptyLabel = "Nothing to show",
|
|
24876
|
+
onItemClick,
|
|
24877
|
+
className,
|
|
24878
|
+
...rest
|
|
24879
|
+
}) {
|
|
24880
|
+
const visible = typeof max === "number" ? items.slice(0, max) : items;
|
|
24881
|
+
const overflow = items.length - visible.length;
|
|
24882
|
+
const renderRowInner = (item) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
24883
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24884
|
+
"span",
|
|
24885
|
+
{
|
|
24886
|
+
className: "ods-status-list__lead",
|
|
24887
|
+
"data-tone": item.tone ?? "neutral",
|
|
24888
|
+
"aria-hidden": "true",
|
|
24889
|
+
children: item.icon ?? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ods-status-list__dot" })
|
|
24890
|
+
}
|
|
24891
|
+
),
|
|
24892
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("span", { className: "ods-status-list__text", children: [
|
|
24893
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ods-status-list__name", children: item.name }),
|
|
24894
|
+
item.meta != null && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ods-status-list__meta", children: item.meta })
|
|
24895
|
+
] }),
|
|
24896
|
+
item.sparkline && item.sparkline.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ods-status-list__spark", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Sparkline, { data: item.sparkline, width: 72, height: 22 }) }),
|
|
24897
|
+
item.status != null && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Chip, { size: "sm", variant: TONE_TO_CHIP2[item.tone ?? "neutral"], children: item.status }),
|
|
24898
|
+
item.trailing != null && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ods-status-list__trailing", children: item.trailing })
|
|
24899
|
+
] });
|
|
24900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: cn("ods-status-list", className), ...rest, children: [
|
|
24901
|
+
(title != null || action != null) && /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "ods-status-list__header", children: [
|
|
24902
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("h3", { className: "ods-status-list__title", children: title }),
|
|
24903
|
+
action != null && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "ods-status-list__action", children: action })
|
|
24904
|
+
] }),
|
|
24905
|
+
visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "ods-status-list__empty", children: emptyLabel }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24906
|
+
"ul",
|
|
24907
|
+
{
|
|
24908
|
+
className: cn(
|
|
24909
|
+
"ods-status-list__rows",
|
|
24910
|
+
dense && "ods-status-list__rows--dense"
|
|
24911
|
+
),
|
|
24912
|
+
children: visible.map((item) => {
|
|
24913
|
+
const interactive = Boolean(item.href || onItemClick);
|
|
24914
|
+
const rowClass = cn(
|
|
24915
|
+
"ods-status-list__row",
|
|
24916
|
+
interactive && "ods-status-list__row--interactive",
|
|
24917
|
+
item.muted && "ods-status-list__row--muted"
|
|
24918
|
+
);
|
|
24919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("li", { className: "ods-status-list__item", children: item.href ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("a", { className: rowClass, href: item.href, children: renderRowInner(item) }) : onItemClick ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
24920
|
+
"button",
|
|
24921
|
+
{
|
|
24922
|
+
type: "button",
|
|
24923
|
+
className: rowClass,
|
|
24924
|
+
onClick: () => onItemClick(item),
|
|
24925
|
+
children: renderRowInner(item)
|
|
24926
|
+
}
|
|
24927
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: rowClass, children: renderRowInner(item) }) }, item.id);
|
|
24928
|
+
})
|
|
24929
|
+
}
|
|
24930
|
+
),
|
|
24931
|
+
overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "ods-status-list__more", children: [
|
|
24932
|
+
"+",
|
|
24933
|
+
overflow,
|
|
24934
|
+
" more"
|
|
24935
|
+
] })
|
|
24936
|
+
] });
|
|
24937
|
+
}
|
|
24938
|
+
StatusList.displayName = "StatusList";
|
|
24939
|
+
|
|
24847
24940
|
// src/components/Slider/Slider.tsx
|
|
24848
24941
|
var import_react133 = require("react");
|
|
24849
|
-
var
|
|
24942
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
24850
24943
|
var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
24851
24944
|
label,
|
|
24852
24945
|
value,
|
|
@@ -24880,7 +24973,7 @@ var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
|
24880
24973
|
const valueText = String(display);
|
|
24881
24974
|
const handle = (e) => onChange?.(Number(e.target.value));
|
|
24882
24975
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
24883
|
-
return /* @__PURE__ */ (0,
|
|
24976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
24884
24977
|
"div",
|
|
24885
24978
|
{
|
|
24886
24979
|
className: cn(
|
|
@@ -24892,8 +24985,8 @@ var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
|
24892
24985
|
className
|
|
24893
24986
|
),
|
|
24894
24987
|
children: [
|
|
24895
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
24896
|
-
label && /* @__PURE__ */ (0,
|
|
24988
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "ods-slider__head", children: [
|
|
24989
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24897
24990
|
"label",
|
|
24898
24991
|
{
|
|
24899
24992
|
id: labelId,
|
|
@@ -24902,17 +24995,17 @@ var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
|
24902
24995
|
children: label
|
|
24903
24996
|
}
|
|
24904
24997
|
),
|
|
24905
|
-
showValue && /* @__PURE__ */ (0,
|
|
24998
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "ods-slider__value", "aria-hidden": "true", children: display })
|
|
24906
24999
|
] }),
|
|
24907
|
-
/* @__PURE__ */ (0,
|
|
24908
|
-
/* @__PURE__ */ (0,
|
|
25000
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "ods-slider__track", children: [
|
|
25001
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24909
25002
|
"span",
|
|
24910
25003
|
{
|
|
24911
25004
|
className: "ods-slider__fill",
|
|
24912
25005
|
style: { width: `${pct}%` }
|
|
24913
25006
|
}
|
|
24914
25007
|
),
|
|
24915
|
-
/* @__PURE__ */ (0,
|
|
25008
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24916
25009
|
"input",
|
|
24917
25010
|
{
|
|
24918
25011
|
...rest,
|
|
@@ -24936,22 +25029,22 @@ var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
|
24936
25029
|
] }),
|
|
24937
25030
|
marks && marks.length > 0 && // Marks are decorative — aria-hidden so the screen reader hears
|
|
24938
25031
|
// the formatted value, not "tick mark, tick mark, …".
|
|
24939
|
-
/* @__PURE__ */ (0,
|
|
25032
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "ods-slider__marks", "aria-hidden": "true", children: marks.map((m) => {
|
|
24940
25033
|
const left = (m.value - min) / span * 100;
|
|
24941
|
-
return /* @__PURE__ */ (0,
|
|
25034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
24942
25035
|
"div",
|
|
24943
25036
|
{
|
|
24944
25037
|
className: "ods-slider__mark",
|
|
24945
25038
|
style: { left: `${left}%` },
|
|
24946
25039
|
children: [
|
|
24947
|
-
/* @__PURE__ */ (0,
|
|
24948
|
-
m.label && /* @__PURE__ */ (0,
|
|
25040
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "ods-slider__mark-tick" }),
|
|
25041
|
+
m.label && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "ods-slider__mark-label", children: m.label })
|
|
24949
25042
|
]
|
|
24950
25043
|
},
|
|
24951
25044
|
m.value
|
|
24952
25045
|
);
|
|
24953
25046
|
}) }),
|
|
24954
|
-
error ? /* @__PURE__ */ (0,
|
|
25047
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24955
25048
|
"div",
|
|
24956
25049
|
{
|
|
24957
25050
|
id: hintId,
|
|
@@ -24959,7 +25052,7 @@ var Slider = (0, import_react133.forwardRef)(function Slider2({
|
|
|
24959
25052
|
role: "alert",
|
|
24960
25053
|
children: error
|
|
24961
25054
|
}
|
|
24962
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
25055
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { id: hintId, className: "ods-slider__hint", children: helperText }) : null
|
|
24963
25056
|
]
|
|
24964
25057
|
}
|
|
24965
25058
|
);
|
|
@@ -24969,7 +25062,7 @@ Slider.displayName = "Slider";
|
|
|
24969
25062
|
// src/components/SocialButton/SocialButton.tsx
|
|
24970
25063
|
var import_icons35 = require("@octaviaflow/icons");
|
|
24971
25064
|
var import_react134 = require("react");
|
|
24972
|
-
var
|
|
25065
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
24973
25066
|
var DEFAULT_LABELS = {
|
|
24974
25067
|
google: "Continue with Google",
|
|
24975
25068
|
github: "Continue with GitHub",
|
|
@@ -24979,29 +25072,29 @@ var DEFAULT_LABELS = {
|
|
|
24979
25072
|
microsoft: "Continue with Microsoft",
|
|
24980
25073
|
linkedin: "Continue with LinkedIn"
|
|
24981
25074
|
};
|
|
24982
|
-
var GoogleIcon = () => /* @__PURE__ */ (0,
|
|
24983
|
-
/* @__PURE__ */ (0,
|
|
25075
|
+
var GoogleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
25076
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
24984
25077
|
"path",
|
|
24985
25078
|
{
|
|
24986
25079
|
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",
|
|
24987
25080
|
fill: "#4285F4"
|
|
24988
25081
|
}
|
|
24989
25082
|
),
|
|
24990
|
-
/* @__PURE__ */ (0,
|
|
25083
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
24991
25084
|
"path",
|
|
24992
25085
|
{
|
|
24993
25086
|
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",
|
|
24994
25087
|
fill: "#34A853"
|
|
24995
25088
|
}
|
|
24996
25089
|
),
|
|
24997
|
-
/* @__PURE__ */ (0,
|
|
25090
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
24998
25091
|
"path",
|
|
24999
25092
|
{
|
|
25000
25093
|
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",
|
|
25001
25094
|
fill: "#FBBC05"
|
|
25002
25095
|
}
|
|
25003
25096
|
),
|
|
25004
|
-
/* @__PURE__ */ (0,
|
|
25097
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
25005
25098
|
"path",
|
|
25006
25099
|
{
|
|
25007
25100
|
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",
|
|
@@ -25009,34 +25102,34 @@ var GoogleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("svg", {
|
|
|
25009
25102
|
}
|
|
25010
25103
|
)
|
|
25011
25104
|
] });
|
|
25012
|
-
var AppleIcon = () => /* @__PURE__ */ (0,
|
|
25105
|
+
var AppleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
25013
25106
|
"path",
|
|
25014
25107
|
{
|
|
25015
25108
|
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",
|
|
25016
25109
|
fill: "currentColor"
|
|
25017
25110
|
}
|
|
25018
25111
|
) });
|
|
25019
|
-
var MicrosoftIcon = () => /* @__PURE__ */ (0,
|
|
25020
|
-
/* @__PURE__ */ (0,
|
|
25021
|
-
/* @__PURE__ */ (0,
|
|
25022
|
-
/* @__PURE__ */ (0,
|
|
25023
|
-
/* @__PURE__ */ (0,
|
|
25112
|
+
var MicrosoftIcon = () => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
25113
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("rect", { x: "1", y: "1", width: "7.5", height: "7.5", fill: "#F25022" }),
|
|
25114
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("rect", { x: "9.5", y: "1", width: "7.5", height: "7.5", fill: "#7FBA00" }),
|
|
25115
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("rect", { x: "1", y: "9.5", width: "7.5", height: "7.5", fill: "#00A4EF" }),
|
|
25116
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("rect", { x: "9.5", y: "9.5", width: "7.5", height: "7.5", fill: "#FFB900" })
|
|
25024
25117
|
] });
|
|
25025
25118
|
function resolveIcon2(provider) {
|
|
25026
25119
|
switch (provider) {
|
|
25027
25120
|
case "google":
|
|
25028
|
-
return /* @__PURE__ */ (0,
|
|
25121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(GoogleIcon, {});
|
|
25029
25122
|
case "apple":
|
|
25030
|
-
return /* @__PURE__ */ (0,
|
|
25123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(AppleIcon, {});
|
|
25031
25124
|
case "microsoft":
|
|
25032
|
-
return /* @__PURE__ */ (0,
|
|
25125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(MicrosoftIcon, {});
|
|
25033
25126
|
case "github":
|
|
25034
|
-
return /* @__PURE__ */ (0,
|
|
25127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons35.LogoGithubIcon, { size: "sm" });
|
|
25035
25128
|
case "x":
|
|
25036
25129
|
case "twitter":
|
|
25037
|
-
return /* @__PURE__ */ (0,
|
|
25130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons35.LogoXIcon, { size: "sm" });
|
|
25038
25131
|
case "linkedin":
|
|
25039
|
-
return /* @__PURE__ */ (0,
|
|
25132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons35.LogoLinkedinIcon, { size: "sm" });
|
|
25040
25133
|
case "custom":
|
|
25041
25134
|
return null;
|
|
25042
25135
|
}
|
|
@@ -25058,7 +25151,7 @@ var SocialButton = (0, import_react134.forwardRef)(
|
|
|
25058
25151
|
const resolvedIcon = icon ?? resolveIcon2(provider);
|
|
25059
25152
|
const resolvedLabel = label ?? children ?? (provider !== "custom" ? DEFAULT_LABELS[provider] : null);
|
|
25060
25153
|
const providerClass = provider === "twitter" ? "x" : provider;
|
|
25061
|
-
return /* @__PURE__ */ (0,
|
|
25154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
25062
25155
|
Button,
|
|
25063
25156
|
{
|
|
25064
25157
|
...rest,
|
|
@@ -25086,7 +25179,7 @@ SocialButton.displayName = "SocialButton";
|
|
|
25086
25179
|
// src/components/Sortable/Sortable.tsx
|
|
25087
25180
|
var import_react135 = require("react");
|
|
25088
25181
|
var import_icons36 = require("@octaviaflow/icons");
|
|
25089
|
-
var
|
|
25182
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
25090
25183
|
var DT_TYPE = "application/x-ods-sortable";
|
|
25091
25184
|
function Sortable({
|
|
25092
25185
|
items,
|
|
@@ -25266,7 +25359,7 @@ function Sortable({
|
|
|
25266
25359
|
if (e.key === "ArrowRight") return moveBy(1);
|
|
25267
25360
|
}
|
|
25268
25361
|
};
|
|
25269
|
-
return /* @__PURE__ */ (0,
|
|
25362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
25270
25363
|
"div",
|
|
25271
25364
|
{
|
|
25272
25365
|
...rest,
|
|
@@ -25303,7 +25396,7 @@ function Sortable({
|
|
|
25303
25396
|
isDragging,
|
|
25304
25397
|
isKeyboardActive: isKbActive
|
|
25305
25398
|
};
|
|
25306
|
-
return /* @__PURE__ */ (0,
|
|
25399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
25307
25400
|
"div",
|
|
25308
25401
|
{
|
|
25309
25402
|
ref: (el) => {
|
|
@@ -25319,7 +25412,7 @@ function Sortable({
|
|
|
25319
25412
|
),
|
|
25320
25413
|
onDragOver: onItemDragOver(item.id),
|
|
25321
25414
|
children: [
|
|
25322
|
-
/* @__PURE__ */ (0,
|
|
25415
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
25323
25416
|
"span",
|
|
25324
25417
|
{
|
|
25325
25418
|
className: "ods-sortable__indicator ods-sortable__indicator--before",
|
|
@@ -25327,7 +25420,7 @@ function Sortable({
|
|
|
25327
25420
|
}
|
|
25328
25421
|
),
|
|
25329
25422
|
renderItem(item, idx, dragProps),
|
|
25330
|
-
/* @__PURE__ */ (0,
|
|
25423
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
25331
25424
|
"span",
|
|
25332
25425
|
{
|
|
25333
25426
|
className: "ods-sortable__indicator ods-sortable__indicator--after",
|
|
@@ -25339,7 +25432,7 @@ function Sortable({
|
|
|
25339
25432
|
item.id
|
|
25340
25433
|
);
|
|
25341
25434
|
}),
|
|
25342
|
-
/* @__PURE__ */ (0,
|
|
25435
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("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.` : "" })
|
|
25343
25436
|
]
|
|
25344
25437
|
}
|
|
25345
25438
|
);
|
|
@@ -25352,7 +25445,7 @@ var DragHandle = (0, import_react135.forwardRef)(
|
|
|
25352
25445
|
ariaLabel: legacyAriaLabel,
|
|
25353
25446
|
dragProps
|
|
25354
25447
|
}, ref) {
|
|
25355
|
-
return /* @__PURE__ */ (0,
|
|
25448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
25356
25449
|
"span",
|
|
25357
25450
|
{
|
|
25358
25451
|
ref,
|
|
@@ -25361,7 +25454,7 @@ var DragHandle = (0, import_react135.forwardRef)(
|
|
|
25361
25454
|
className: cn("ods-sortable-handle", className),
|
|
25362
25455
|
style,
|
|
25363
25456
|
...dragProps,
|
|
25364
|
-
children: /* @__PURE__ */ (0,
|
|
25457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_icons36.DraggableIcon, { size: "xs" })
|
|
25365
25458
|
}
|
|
25366
25459
|
);
|
|
25367
25460
|
}
|
|
@@ -25370,7 +25463,7 @@ DragHandle.displayName = "DragHandle";
|
|
|
25370
25463
|
|
|
25371
25464
|
// src/components/Stack/Stack.tsx
|
|
25372
25465
|
var import_react136 = require("react");
|
|
25373
|
-
var
|
|
25466
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
25374
25467
|
function resolveGap2(gap) {
|
|
25375
25468
|
if (typeof gap === "string") return gap;
|
|
25376
25469
|
if (gap === 0) return "0";
|
|
@@ -25409,11 +25502,11 @@ var Stack = (0, import_react136.forwardRef)(function Stack2({
|
|
|
25409
25502
|
const Component = as ?? "div";
|
|
25410
25503
|
const items = divider ? import_react136.Children.toArray(children).flatMap(
|
|
25411
25504
|
(child, i, arr) => i < arr.length - 1 ? [
|
|
25412
|
-
/* @__PURE__ */ (0,
|
|
25413
|
-
/* @__PURE__ */ (0,
|
|
25414
|
-
] : [/* @__PURE__ */ (0,
|
|
25505
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react136.Fragment, { children: child }, `item-${i}`),
|
|
25506
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react136.Fragment, { children: divider }, `divider-${i}`)
|
|
25507
|
+
] : [/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react136.Fragment, { children: child }, `item-${i}`)]
|
|
25415
25508
|
) : children;
|
|
25416
|
-
return /* @__PURE__ */ (0,
|
|
25509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
25417
25510
|
Component,
|
|
25418
25511
|
{
|
|
25419
25512
|
...rest,
|
|
@@ -25441,13 +25534,13 @@ var Stack = (0, import_react136.forwardRef)(function Stack2({
|
|
|
25441
25534
|
Stack.displayName = "Stack";
|
|
25442
25535
|
var HStack = (0, import_react136.forwardRef)(
|
|
25443
25536
|
function HStack2(props, ref) {
|
|
25444
|
-
return /* @__PURE__ */ (0,
|
|
25537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Stack, { ref, direction: "row", ...props });
|
|
25445
25538
|
}
|
|
25446
25539
|
);
|
|
25447
25540
|
HStack.displayName = "HStack";
|
|
25448
25541
|
var VStack = (0, import_react136.forwardRef)(
|
|
25449
25542
|
function VStack2(props, ref) {
|
|
25450
|
-
return /* @__PURE__ */ (0,
|
|
25543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Stack, { ref, direction: "column", ...props });
|
|
25451
25544
|
}
|
|
25452
25545
|
);
|
|
25453
25546
|
VStack.displayName = "VStack";
|
|
@@ -25456,7 +25549,7 @@ VStack.displayName = "VStack";
|
|
|
25456
25549
|
var import_framer_motion31 = require("framer-motion");
|
|
25457
25550
|
var import_react137 = require("react");
|
|
25458
25551
|
var import_react_dom16 = require("react-dom");
|
|
25459
|
-
var
|
|
25552
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
25460
25553
|
var Spotlight = (0, import_react137.forwardRef)(
|
|
25461
25554
|
function Spotlight2({
|
|
25462
25555
|
open,
|
|
@@ -25523,7 +25616,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25523
25616
|
height: rect.height + padding * 2
|
|
25524
25617
|
} : null;
|
|
25525
25618
|
return (0, import_react_dom16.createPortal)(
|
|
25526
|
-
/* @__PURE__ */ (0,
|
|
25619
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_framer_motion31.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
25527
25620
|
import_framer_motion31.motion.div,
|
|
25528
25621
|
{
|
|
25529
25622
|
...rest,
|
|
@@ -25535,7 +25628,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25535
25628
|
exit: disableAnimation || reducedMotion ? void 0 : { opacity: 0 },
|
|
25536
25629
|
transition: { duration: 0.18 },
|
|
25537
25630
|
children: [
|
|
25538
|
-
/* @__PURE__ */ (0,
|
|
25631
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
25539
25632
|
"svg",
|
|
25540
25633
|
{
|
|
25541
25634
|
className: cn(
|
|
@@ -25549,8 +25642,8 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25549
25642
|
"aria-hidden": "true",
|
|
25550
25643
|
onClick: onDismiss,
|
|
25551
25644
|
children: [
|
|
25552
|
-
/* @__PURE__ */ (0,
|
|
25553
|
-
/* @__PURE__ */ (0,
|
|
25645
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("mask", { id: maskId, children: [
|
|
25646
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
25554
25647
|
"rect",
|
|
25555
25648
|
{
|
|
25556
25649
|
x: 0,
|
|
@@ -25560,7 +25653,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25560
25653
|
fill: "white"
|
|
25561
25654
|
}
|
|
25562
25655
|
),
|
|
25563
|
-
cutout && shape === "rect" && /* @__PURE__ */ (0,
|
|
25656
|
+
cutout && shape === "rect" && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
25564
25657
|
"rect",
|
|
25565
25658
|
{
|
|
25566
25659
|
x: cutout.x,
|
|
@@ -25572,7 +25665,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25572
25665
|
fill: "black"
|
|
25573
25666
|
}
|
|
25574
25667
|
),
|
|
25575
|
-
cutout && shape === "circle" && /* @__PURE__ */ (0,
|
|
25668
|
+
cutout && shape === "circle" && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
25576
25669
|
"ellipse",
|
|
25577
25670
|
{
|
|
25578
25671
|
cx: cutout.x + cutout.width / 2,
|
|
@@ -25583,7 +25676,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25583
25676
|
}
|
|
25584
25677
|
)
|
|
25585
25678
|
] }) }),
|
|
25586
|
-
/* @__PURE__ */ (0,
|
|
25679
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
25587
25680
|
"rect",
|
|
25588
25681
|
{
|
|
25589
25682
|
x: 0,
|
|
@@ -25597,7 +25690,7 @@ var Spotlight = (0, import_react137.forwardRef)(
|
|
|
25597
25690
|
]
|
|
25598
25691
|
}
|
|
25599
25692
|
),
|
|
25600
|
-
children && /* @__PURE__ */ (0,
|
|
25693
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "ods-spotlight__content", children })
|
|
25601
25694
|
]
|
|
25602
25695
|
}
|
|
25603
25696
|
) }),
|
|
@@ -25610,7 +25703,7 @@ Spotlight.displayName = "Spotlight";
|
|
|
25610
25703
|
// src/components/Stat/Stat.tsx
|
|
25611
25704
|
var import_react138 = require("react");
|
|
25612
25705
|
var import_icons37 = require("@octaviaflow/icons");
|
|
25613
|
-
var
|
|
25706
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
25614
25707
|
var Stat = (0, import_react138.forwardRef)(function Stat2({
|
|
25615
25708
|
label,
|
|
25616
25709
|
value,
|
|
@@ -25624,23 +25717,23 @@ var Stat = (0, import_react138.forwardRef)(function Stat2({
|
|
|
25624
25717
|
...rest
|
|
25625
25718
|
}, ref) {
|
|
25626
25719
|
const TrendIcon = deltaTrend === "up" ? import_icons37.ArrowUpIcon : deltaTrend === "down" ? import_icons37.ArrowDownIcon : import_icons37.SubtractIcon;
|
|
25627
|
-
return /* @__PURE__ */ (0,
|
|
25720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
25628
25721
|
"div",
|
|
25629
25722
|
{
|
|
25630
25723
|
...rest,
|
|
25631
25724
|
ref,
|
|
25632
25725
|
className: cn("ods-stat", `ods-stat--${size}`, className),
|
|
25633
25726
|
children: [
|
|
25634
|
-
/* @__PURE__ */ (0,
|
|
25635
|
-
/* @__PURE__ */ (0,
|
|
25636
|
-
icon && /* @__PURE__ */ (0,
|
|
25727
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "ods-stat__head", children: [
|
|
25728
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "ods-stat__label", children: label }),
|
|
25729
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "ods-stat__icon", "aria-hidden": "true", children: icon })
|
|
25637
25730
|
] }),
|
|
25638
|
-
/* @__PURE__ */ (0,
|
|
25639
|
-
description && /* @__PURE__ */ (0,
|
|
25640
|
-
delta && /* @__PURE__ */ (0,
|
|
25641
|
-
/* @__PURE__ */ (0,
|
|
25642
|
-
/* @__PURE__ */ (0,
|
|
25643
|
-
deltaSuffix && /* @__PURE__ */ (0,
|
|
25731
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "ods-stat__value", children: value }),
|
|
25732
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "ods-stat__description", children: description }),
|
|
25733
|
+
delta && /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: cn("ods-stat__delta", `ods-stat__delta--${deltaTrend}`), children: [
|
|
25734
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "ods-stat__delta-arrow", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TrendIcon, { size: "xs" }) }),
|
|
25735
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "ods-stat__delta-value", children: delta }),
|
|
25736
|
+
deltaSuffix && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "ods-stat__delta-suffix", children: deltaSuffix })
|
|
25644
25737
|
] })
|
|
25645
25738
|
]
|
|
25646
25739
|
}
|
|
@@ -25651,7 +25744,7 @@ Stat.displayName = "Stat";
|
|
|
25651
25744
|
// src/components/StatusTiles/StatusTiles.tsx
|
|
25652
25745
|
var import_framer_motion32 = require("framer-motion");
|
|
25653
25746
|
var import_react139 = require("react");
|
|
25654
|
-
var
|
|
25747
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
25655
25748
|
var STATUS_COLORS = {
|
|
25656
25749
|
success: "var(--ods-status-success)",
|
|
25657
25750
|
failed: "var(--ods-status-failed)",
|
|
@@ -25723,7 +25816,7 @@ var StatusTiles = (0, import_react139.forwardRef)(
|
|
|
25723
25816
|
return `${t} \u2014 ${visible.length} runs (${summaryText})`;
|
|
25724
25817
|
}, [ariaLabel, title, visible]);
|
|
25725
25818
|
const interactive = Boolean(onTileHover || onTileClick);
|
|
25726
|
-
return /* @__PURE__ */ (0,
|
|
25819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
25727
25820
|
"div",
|
|
25728
25821
|
{
|
|
25729
25822
|
...rest,
|
|
@@ -25732,14 +25825,14 @@ var StatusTiles = (0, import_react139.forwardRef)(
|
|
|
25732
25825
|
role: "group",
|
|
25733
25826
|
"aria-label": resolvedAriaLabel,
|
|
25734
25827
|
children: [
|
|
25735
|
-
(title || summary) && /* @__PURE__ */ (0,
|
|
25736
|
-
title && /* @__PURE__ */ (0,
|
|
25737
|
-
summary && /* @__PURE__ */ (0,
|
|
25828
|
+
(title || summary) && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "ods-status-tiles__head", children: [
|
|
25829
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "ods-status-tiles__title", children: title }),
|
|
25830
|
+
summary && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "ods-status-tiles__summary", children: summary })
|
|
25738
25831
|
] }),
|
|
25739
|
-
/* @__PURE__ */ (0,
|
|
25832
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "ods-status-tiles__row", style: { gap }, children: visible.map((tile, i) => {
|
|
25740
25833
|
const fill = tile.color ?? STATUS_COLORS[tile.status];
|
|
25741
25834
|
const tooltipText = tile.label !== void 0 ? typeof tile.label === "string" ? tile.label : void 0 : STATUS_TEXT[tile.status];
|
|
25742
|
-
return /* @__PURE__ */ (0,
|
|
25835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
25743
25836
|
import_framer_motion32.motion.button,
|
|
25744
25837
|
{
|
|
25745
25838
|
type: "button",
|
|
@@ -25788,7 +25881,7 @@ StatusTiles.displayName = "StatusTiles";
|
|
|
25788
25881
|
// src/components/Stepper/Stepper.tsx
|
|
25789
25882
|
var import_icons38 = require("@octaviaflow/icons");
|
|
25790
25883
|
var import_react140 = require("react");
|
|
25791
|
-
var
|
|
25884
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
25792
25885
|
function deriveStatus(step, index, active) {
|
|
25793
25886
|
if (step.status) return step.status;
|
|
25794
25887
|
if (index < active) return "complete";
|
|
@@ -25856,7 +25949,7 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25856
25949
|
e.preventDefault();
|
|
25857
25950
|
goTo(i);
|
|
25858
25951
|
};
|
|
25859
|
-
return /* @__PURE__ */ (0,
|
|
25952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
25860
25953
|
"ol",
|
|
25861
25954
|
{
|
|
25862
25955
|
...rest,
|
|
@@ -25875,13 +25968,13 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25875
25968
|
const status = deriveStatus(step, i, activeIndex);
|
|
25876
25969
|
const isLast = i === steps.length - 1;
|
|
25877
25970
|
const segmentCompleted = showProgressTrail && i < activeIndex && status !== "error";
|
|
25878
|
-
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */ (0,
|
|
25879
|
-
const labelText = /* @__PURE__ */ (0,
|
|
25880
|
-
/* @__PURE__ */ (0,
|
|
25881
|
-
step.optional && /* @__PURE__ */ (0,
|
|
25882
|
-
step.description && /* @__PURE__ */ (0,
|
|
25971
|
+
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_icons38.CheckmarkIcon, { size: "sm", "aria-hidden": true }) : status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_icons38.ErrorIcon, { size: "sm", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "ods-stepper__indicator-num", children: i + 1 }));
|
|
25972
|
+
const labelText = /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "ods-stepper__label-text", children: [
|
|
25973
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "ods-stepper__label-title", children: step.label }),
|
|
25974
|
+
step.optional && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "ods-stepper__label-optional", children: "Optional" }),
|
|
25975
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "ods-stepper__label-desc", children: step.description })
|
|
25883
25976
|
] });
|
|
25884
|
-
const stepInner = isInteractive ? /* @__PURE__ */ (0,
|
|
25977
|
+
const stepInner = isInteractive ? /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
25885
25978
|
"button",
|
|
25886
25979
|
{
|
|
25887
25980
|
type: "button",
|
|
@@ -25893,7 +25986,7 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25893
25986
|
onClick: handleClick(i),
|
|
25894
25987
|
onKeyDown: (e) => handleKeyDown(e, i),
|
|
25895
25988
|
children: [
|
|
25896
|
-
/* @__PURE__ */ (0,
|
|
25989
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
25897
25990
|
"span",
|
|
25898
25991
|
{
|
|
25899
25992
|
className: cn(
|
|
@@ -25907,13 +26000,13 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25907
26000
|
labelText
|
|
25908
26001
|
]
|
|
25909
26002
|
}
|
|
25910
|
-
) : /* @__PURE__ */ (0,
|
|
26003
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
25911
26004
|
"span",
|
|
25912
26005
|
{
|
|
25913
26006
|
className: "ods-stepper__step-static",
|
|
25914
26007
|
"aria-current": status === "active" ? "step" : void 0,
|
|
25915
26008
|
children: [
|
|
25916
|
-
/* @__PURE__ */ (0,
|
|
26009
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
25917
26010
|
"span",
|
|
25918
26011
|
{
|
|
25919
26012
|
className: cn(
|
|
@@ -25928,7 +26021,7 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25928
26021
|
]
|
|
25929
26022
|
}
|
|
25930
26023
|
);
|
|
25931
|
-
return /* @__PURE__ */ (0,
|
|
26024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
25932
26025
|
"li",
|
|
25933
26026
|
{
|
|
25934
26027
|
className: cn(
|
|
@@ -25938,7 +26031,7 @@ var Stepper = (0, import_react140.forwardRef)(
|
|
|
25938
26031
|
),
|
|
25939
26032
|
children: [
|
|
25940
26033
|
stepInner,
|
|
25941
|
-
!isLast && /* @__PURE__ */ (0,
|
|
26034
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
25942
26035
|
"span",
|
|
25943
26036
|
{
|
|
25944
26037
|
className: cn(
|
|
@@ -25962,7 +26055,7 @@ Stepper.displayName = "Stepper";
|
|
|
25962
26055
|
// src/components/Sankey/Sankey.tsx
|
|
25963
26056
|
var import_framer_motion33 = require("framer-motion");
|
|
25964
26057
|
var import_react141 = require("react");
|
|
25965
|
-
var
|
|
26058
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
25966
26059
|
var defaultFormat7 = (n) => {
|
|
25967
26060
|
if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
25968
26061
|
if (Math.abs(n) >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
|
|
@@ -26186,7 +26279,7 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26186
26279
|
const t = typeof title === "string" ? title : "Sankey";
|
|
26187
26280
|
return `${t} \u2014 ${nodes.length} nodes, ${links.length} flows`;
|
|
26188
26281
|
}, [ariaLabel, title, nodes.length, links.length]);
|
|
26189
|
-
return /* @__PURE__ */ (0,
|
|
26282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
26190
26283
|
"div",
|
|
26191
26284
|
{
|
|
26192
26285
|
...rest,
|
|
@@ -26195,11 +26288,11 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26195
26288
|
role: "group",
|
|
26196
26289
|
"aria-label": resolvedAriaLabel,
|
|
26197
26290
|
children: [
|
|
26198
|
-
(title || total) && /* @__PURE__ */ (0,
|
|
26199
|
-
title && /* @__PURE__ */ (0,
|
|
26200
|
-
total && /* @__PURE__ */ (0,
|
|
26291
|
+
(title || total) && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "ods-sankey__head", children: [
|
|
26292
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "ods-sankey__title", children: title }),
|
|
26293
|
+
total && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "ods-sankey__total", children: total })
|
|
26201
26294
|
] }),
|
|
26202
|
-
/* @__PURE__ */ (0,
|
|
26295
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "ods-sankey__plot", style: { width, height }, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
26203
26296
|
"svg",
|
|
26204
26297
|
{
|
|
26205
26298
|
className: "ods-sankey__svg",
|
|
@@ -26209,7 +26302,7 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26209
26302
|
layoutLinks.map((l) => {
|
|
26210
26303
|
const color = l.color ?? linkColor ?? l.sourceNode.color ?? nodeColor;
|
|
26211
26304
|
const active = hoveredLink === l || hoveredNode?.id === l.source || hoveredNode?.id === l.target;
|
|
26212
|
-
return /* @__PURE__ */ (0,
|
|
26305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
26213
26306
|
import_framer_motion33.motion.path,
|
|
26214
26307
|
{
|
|
26215
26308
|
d: l.path,
|
|
@@ -26237,7 +26330,7 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26237
26330
|
duration: 0.6,
|
|
26238
26331
|
ease: [0.16, 1, 0.3, 1]
|
|
26239
26332
|
},
|
|
26240
|
-
children: /* @__PURE__ */ (0,
|
|
26333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("title", { children: `${l.sourceNode.label} \u2192 ${l.targetNode.label}: ${formatValue(l.value)}` })
|
|
26241
26334
|
},
|
|
26242
26335
|
`${reactId}-link-${l.source}-${l.target}`
|
|
26243
26336
|
);
|
|
@@ -26248,7 +26341,7 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26248
26341
|
const isFirst = n.column === 0;
|
|
26249
26342
|
const isLast = n.column === columnCount - 1;
|
|
26250
26343
|
const active = hoveredNode === n;
|
|
26251
|
-
return /* @__PURE__ */ (0,
|
|
26344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
26252
26345
|
"g",
|
|
26253
26346
|
{
|
|
26254
26347
|
className: "ods-sankey__node-group",
|
|
@@ -26256,7 +26349,7 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26256
26349
|
onMouseLeave: () => fireNode(null),
|
|
26257
26350
|
onClick: onNodeClick ? () => onNodeClick(n) : void 0,
|
|
26258
26351
|
children: [
|
|
26259
|
-
/* @__PURE__ */ (0,
|
|
26352
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
26260
26353
|
import_framer_motion33.motion.rect,
|
|
26261
26354
|
{
|
|
26262
26355
|
x: n.x,
|
|
@@ -26285,10 +26378,10 @@ var Sankey = (0, import_react141.forwardRef)(function Sankey2({
|
|
|
26285
26378
|
delay: disableAnimation ? 0 : 0.2 + n.column * 0.05,
|
|
26286
26379
|
ease: [0.16, 1, 0.3, 1]
|
|
26287
26380
|
},
|
|
26288
|
-
children: /* @__PURE__ */ (0,
|
|
26381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("title", { children: `${n.label} \u2014 in ${formatValue(n.inFlow)} \xB7 out ${formatValue(n.outFlow)}` })
|
|
26289
26382
|
}
|
|
26290
26383
|
),
|
|
26291
|
-
/* @__PURE__ */ (0,
|
|
26384
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
26292
26385
|
"text",
|
|
26293
26386
|
{
|
|
26294
26387
|
x: isFirst ? n.x - 6 : isLast ? n.x + nodeWidth + 6 : n.x + nodeWidth + 6,
|
|
@@ -26316,7 +26409,7 @@ Sankey.displayName = "Sankey";
|
|
|
26316
26409
|
// src/components/Switch/Switch.tsx
|
|
26317
26410
|
var import_react142 = require("react");
|
|
26318
26411
|
var import_react_aria12 = require("react-aria");
|
|
26319
|
-
var
|
|
26412
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
26320
26413
|
var Switch = (0, import_react142.forwardRef)(function Switch2({
|
|
26321
26414
|
checked,
|
|
26322
26415
|
defaultChecked,
|
|
@@ -26365,7 +26458,7 @@ var Switch = (0, import_react142.forwardRef)(function Switch2({
|
|
|
26365
26458
|
onBlur: _onBlur,
|
|
26366
26459
|
...passthroughProps
|
|
26367
26460
|
} = props;
|
|
26368
|
-
return /* @__PURE__ */ (0,
|
|
26461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
26369
26462
|
"label",
|
|
26370
26463
|
{
|
|
26371
26464
|
className: cn(
|
|
@@ -26376,7 +26469,7 @@ var Switch = (0, import_react142.forwardRef)(function Switch2({
|
|
|
26376
26469
|
className
|
|
26377
26470
|
),
|
|
26378
26471
|
children: [
|
|
26379
|
-
/* @__PURE__ */ (0,
|
|
26472
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
26380
26473
|
"input",
|
|
26381
26474
|
{
|
|
26382
26475
|
...passthroughProps,
|
|
@@ -26385,17 +26478,17 @@ var Switch = (0, import_react142.forwardRef)(function Switch2({
|
|
|
26385
26478
|
className: "ods-switch__input"
|
|
26386
26479
|
}
|
|
26387
26480
|
),
|
|
26388
|
-
/* @__PURE__ */ (0,
|
|
26481
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
26389
26482
|
"div",
|
|
26390
26483
|
{
|
|
26391
26484
|
className: cn("ods-switch__track", isOn && "ods-switch__track--on"),
|
|
26392
26485
|
"aria-hidden": "true",
|
|
26393
|
-
children: /* @__PURE__ */ (0,
|
|
26486
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "ods-switch__thumb" })
|
|
26394
26487
|
}
|
|
26395
26488
|
),
|
|
26396
|
-
(label || description) && /* @__PURE__ */ (0,
|
|
26397
|
-
label && /* @__PURE__ */ (0,
|
|
26398
|
-
description && /* @__PURE__ */ (0,
|
|
26489
|
+
(label || description) && /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "ods-switch__text", children: [
|
|
26490
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "ods-switch__label", children: label }),
|
|
26491
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "ods-switch__description", children: description })
|
|
26399
26492
|
] })
|
|
26400
26493
|
]
|
|
26401
26494
|
}
|
|
@@ -26406,7 +26499,7 @@ Switch.displayName = "Switch";
|
|
|
26406
26499
|
// src/components/Table/Table.tsx
|
|
26407
26500
|
var import_react143 = require("react");
|
|
26408
26501
|
var import_icons39 = require("@octaviaflow/icons");
|
|
26409
|
-
var
|
|
26502
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
26410
26503
|
function TableInner({
|
|
26411
26504
|
columns,
|
|
26412
26505
|
data,
|
|
@@ -26457,7 +26550,7 @@ function TableInner({
|
|
|
26457
26550
|
[onSelectionChange, selectedRows]
|
|
26458
26551
|
);
|
|
26459
26552
|
const totalCols = columns.length + (selectable ? 1 : 0) + (expandable ? 1 : 0);
|
|
26460
|
-
return /* @__PURE__ */ (0,
|
|
26553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26461
26554
|
"div",
|
|
26462
26555
|
{
|
|
26463
26556
|
...rest,
|
|
@@ -26465,9 +26558,9 @@ function TableInner({
|
|
|
26465
26558
|
className: cn("ods-table-wrapper", className),
|
|
26466
26559
|
role: "region",
|
|
26467
26560
|
"aria-label": ariaLabel,
|
|
26468
|
-
children: /* @__PURE__ */ (0,
|
|
26469
|
-
/* @__PURE__ */ (0,
|
|
26470
|
-
selectable && /* @__PURE__ */ (0,
|
|
26561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("table", { className: "ods-table", children: [
|
|
26562
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("thead", { className: "ods-table__header", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("tr", { children: [
|
|
26563
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("th", { className: "ods-table__cell--checkbox", scope: "col", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26471
26564
|
"input",
|
|
26472
26565
|
{
|
|
26473
26566
|
type: "checkbox",
|
|
@@ -26476,8 +26569,8 @@ function TableInner({
|
|
|
26476
26569
|
onChange: handleSelectAll
|
|
26477
26570
|
}
|
|
26478
26571
|
) }),
|
|
26479
|
-
expandable && /* @__PURE__ */ (0,
|
|
26480
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
26572
|
+
expandable && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("th", { className: "ods-table__cell--expand", scope: "col", "aria-label": "Expand" }),
|
|
26573
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26481
26574
|
"th",
|
|
26482
26575
|
{
|
|
26483
26576
|
className: cn("ods-table__cell", col.sortable && "ods-table__cell--sortable"),
|
|
@@ -26485,9 +26578,9 @@ function TableInner({
|
|
|
26485
26578
|
scope: "col",
|
|
26486
26579
|
"aria-sort": sortKey === col.key ? sortDirection === "asc" ? "ascending" : "descending" : void 0,
|
|
26487
26580
|
onClick: col.sortable ? () => handleSort(col.key) : void 0,
|
|
26488
|
-
children: /* @__PURE__ */ (0,
|
|
26581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("span", { className: "ods-table__header-content", children: [
|
|
26489
26582
|
col.header,
|
|
26490
|
-
col.sortable && /* @__PURE__ */ (0,
|
|
26583
|
+
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26491
26584
|
"span",
|
|
26492
26585
|
{
|
|
26493
26586
|
className: cn(
|
|
@@ -26495,7 +26588,7 @@ function TableInner({
|
|
|
26495
26588
|
sortKey === col.key && "ods-table__sort-icon--active"
|
|
26496
26589
|
),
|
|
26497
26590
|
"aria-hidden": "true",
|
|
26498
|
-
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */ (0,
|
|
26591
|
+
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_icons39.CaretDownIcon, { size: "xs" }) : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_icons39.CaretUpIcon, { size: "xs" }) : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_icons39.CaretSortIcon, { size: "xs" })
|
|
26499
26592
|
}
|
|
26500
26593
|
)
|
|
26501
26594
|
] })
|
|
@@ -26503,10 +26596,10 @@ function TableInner({
|
|
|
26503
26596
|
col.key
|
|
26504
26597
|
))
|
|
26505
26598
|
] }) }),
|
|
26506
|
-
/* @__PURE__ */ (0,
|
|
26507
|
-
loading && /* @__PURE__ */ (0,
|
|
26508
|
-
!loading && data.length === 0 && /* @__PURE__ */ (0,
|
|
26509
|
-
data.map((row, rowIndex) => /* @__PURE__ */ (0,
|
|
26599
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("tbody", { children: [
|
|
26600
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { colSpan: totalCols, className: "ods-table__loading", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "ods-table__loading-bar" }) }) }),
|
|
26601
|
+
!loading && data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { colSpan: totalCols, className: "ods-table__empty", children: emptyMessage }) }),
|
|
26602
|
+
data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26510
26603
|
TableRow,
|
|
26511
26604
|
{
|
|
26512
26605
|
row,
|
|
@@ -26540,14 +26633,14 @@ function TableRow({
|
|
|
26540
26633
|
}) {
|
|
26541
26634
|
const isSelected = selectedRows?.has(rowIndex) ?? false;
|
|
26542
26635
|
const [expanded, setExpanded] = (0, import_react143.useState)(false);
|
|
26543
|
-
return /* @__PURE__ */ (0,
|
|
26544
|
-
/* @__PURE__ */ (0,
|
|
26636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
26637
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
26545
26638
|
"tr",
|
|
26546
26639
|
{
|
|
26547
26640
|
className: cn("ods-table__row", isSelected && "ods-table__row--selected"),
|
|
26548
26641
|
"data-row-index": rowIndex,
|
|
26549
26642
|
children: [
|
|
26550
|
-
selectable && /* @__PURE__ */ (0,
|
|
26643
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { className: "ods-table__cell--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26551
26644
|
"input",
|
|
26552
26645
|
{
|
|
26553
26646
|
type: "checkbox",
|
|
@@ -26556,7 +26649,7 @@ function TableRow({
|
|
|
26556
26649
|
onChange: () => onSelectRow(rowIndex)
|
|
26557
26650
|
}
|
|
26558
26651
|
) }),
|
|
26559
|
-
expandable && /* @__PURE__ */ (0,
|
|
26652
|
+
expandable && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { className: "ods-table__cell--expand", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
26560
26653
|
"button",
|
|
26561
26654
|
{
|
|
26562
26655
|
type: "button",
|
|
@@ -26564,14 +26657,14 @@ function TableRow({
|
|
|
26564
26657
|
"aria-label": expanded ? "Collapse row" : "Expand row",
|
|
26565
26658
|
"aria-expanded": expanded,
|
|
26566
26659
|
onClick: () => setExpanded(!expanded),
|
|
26567
|
-
children: /* @__PURE__ */ (0,
|
|
26660
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_icons39.CaretRightIcon, { size: "xs" })
|
|
26568
26661
|
}
|
|
26569
26662
|
) }),
|
|
26570
|
-
columns.map((col) => /* @__PURE__ */ (0,
|
|
26663
|
+
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { className: "ods-table__cell", children: col.render ? col.render(row[col.key], row, rowIndex) : row[col.key] }, col.key))
|
|
26571
26664
|
]
|
|
26572
26665
|
}
|
|
26573
26666
|
),
|
|
26574
|
-
expandable && expanded && renderExpanded && /* @__PURE__ */ (0,
|
|
26667
|
+
expandable && expanded && renderExpanded && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("tr", { className: "ods-table__row--expanded", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("td", { colSpan: totalCols, className: "ods-table__expanded-cell", children: renderExpanded(row, rowIndex) }) })
|
|
26575
26668
|
] });
|
|
26576
26669
|
}
|
|
26577
26670
|
|
|
@@ -26579,7 +26672,7 @@ function TableRow({
|
|
|
26579
26672
|
var import_framer_motion34 = require("framer-motion");
|
|
26580
26673
|
var import_react144 = require("react");
|
|
26581
26674
|
var import_react_aria13 = require("react-aria");
|
|
26582
|
-
var
|
|
26675
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
26583
26676
|
function TabButton({
|
|
26584
26677
|
item,
|
|
26585
26678
|
state,
|
|
@@ -26590,7 +26683,7 @@ function TabButton({
|
|
|
26590
26683
|
const isSelected = state.selectedKey === item.key;
|
|
26591
26684
|
const isDisabled = state.disabledKeys.has(item.key);
|
|
26592
26685
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeTabProps } = tabProps;
|
|
26593
|
-
return /* @__PURE__ */ (0,
|
|
26686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
26594
26687
|
import_framer_motion34.motion.div,
|
|
26595
26688
|
{
|
|
26596
26689
|
...safeTabProps,
|
|
@@ -26602,7 +26695,7 @@ function TabButton({
|
|
|
26602
26695
|
),
|
|
26603
26696
|
children: [
|
|
26604
26697
|
item.rendered,
|
|
26605
|
-
isSelected && /* @__PURE__ */ (0,
|
|
26698
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26606
26699
|
import_framer_motion34.motion.div,
|
|
26607
26700
|
{
|
|
26608
26701
|
className: "ods-tabs__indicator",
|
|
@@ -26617,7 +26710,7 @@ function TabButton({
|
|
|
26617
26710
|
function TabPanelContent({ state, panelContent, ...props }) {
|
|
26618
26711
|
const ref = (0, import_react144.useRef)(null);
|
|
26619
26712
|
const { tabPanelProps } = (0, import_react_aria13.useTabPanel)(props, state, ref);
|
|
26620
|
-
return /* @__PURE__ */ (0,
|
|
26713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { ...tabPanelProps, ref, className: "ods-tabs__panel", children: panelContent });
|
|
26621
26714
|
}
|
|
26622
26715
|
var SCROLL_EDGE_EPSILON = 1;
|
|
26623
26716
|
var SCROLL_STEP_PX = 200;
|
|
@@ -26646,9 +26739,9 @@ function Tabs({
|
|
|
26646
26739
|
return map;
|
|
26647
26740
|
}, [items]);
|
|
26648
26741
|
const stateProps = {
|
|
26649
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
26650
|
-
item.icon && /* @__PURE__ */ (0,
|
|
26651
|
-
/* @__PURE__ */ (0,
|
|
26742
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)($05678f3aee5e7d1a$export$6d08773d2e66f8f2, { textValue: item.label, children: [
|
|
26743
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "ods-tabs__icon", children: item.icon }),
|
|
26744
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { children: item.label })
|
|
26652
26745
|
] }, item.value)),
|
|
26653
26746
|
selectedKey,
|
|
26654
26747
|
onSelectionChange: handleSelectionChange,
|
|
@@ -26686,9 +26779,9 @@ function Tabs({
|
|
|
26686
26779
|
el.scrollBy({ left: dir * SCROLL_STEP_PX, behavior: "smooth" });
|
|
26687
26780
|
};
|
|
26688
26781
|
const currentPanelContent = panelContentMap.get(String(selectedKey));
|
|
26689
|
-
return /* @__PURE__ */ (0,
|
|
26690
|
-
/* @__PURE__ */ (0,
|
|
26691
|
-
orientation === "horizontal" && canScrollLeft && /* @__PURE__ */ (0,
|
|
26782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: cn("ods-tabs", `ods-tabs--${orientation}`, className), children: [
|
|
26783
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "ods-tabs__list-wrap", children: [
|
|
26784
|
+
orientation === "horizontal" && canScrollLeft && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26692
26785
|
"button",
|
|
26693
26786
|
{
|
|
26694
26787
|
type: "button",
|
|
@@ -26696,16 +26789,16 @@ function Tabs({
|
|
|
26696
26789
|
onClick: () => scrollBy(-1),
|
|
26697
26790
|
"aria-label": "Scroll tabs left",
|
|
26698
26791
|
tabIndex: -1,
|
|
26699
|
-
children: /* @__PURE__ */ (0,
|
|
26792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChevronSvg, { dir: "left" })
|
|
26700
26793
|
}
|
|
26701
26794
|
),
|
|
26702
|
-
/* @__PURE__ */ (0,
|
|
26795
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26703
26796
|
"div",
|
|
26704
26797
|
{
|
|
26705
26798
|
className: "ods-tabs__scroller",
|
|
26706
26799
|
ref: scrollContainerRef,
|
|
26707
26800
|
onScroll: orientation === "horizontal" ? onScroll : void 0,
|
|
26708
|
-
children: /* @__PURE__ */ (0,
|
|
26801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { ...tabListProps, ref, className: "ods-tabs__list", children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26709
26802
|
TabButton,
|
|
26710
26803
|
{
|
|
26711
26804
|
item,
|
|
@@ -26716,7 +26809,7 @@ function Tabs({
|
|
|
26716
26809
|
)) })
|
|
26717
26810
|
}
|
|
26718
26811
|
),
|
|
26719
|
-
orientation === "horizontal" && canScrollRight && /* @__PURE__ */ (0,
|
|
26812
|
+
orientation === "horizontal" && canScrollRight && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26720
26813
|
"button",
|
|
26721
26814
|
{
|
|
26722
26815
|
type: "button",
|
|
@@ -26724,16 +26817,16 @@ function Tabs({
|
|
|
26724
26817
|
onClick: () => scrollBy(1),
|
|
26725
26818
|
"aria-label": "Scroll tabs right",
|
|
26726
26819
|
tabIndex: -1,
|
|
26727
|
-
children: /* @__PURE__ */ (0,
|
|
26820
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChevronSvg, { dir: "right" })
|
|
26728
26821
|
}
|
|
26729
26822
|
)
|
|
26730
26823
|
] }),
|
|
26731
|
-
/* @__PURE__ */ (0,
|
|
26824
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(TabPanelContent, { state, panelContent: currentPanelContent }, state.selectedKey)
|
|
26732
26825
|
] });
|
|
26733
26826
|
}
|
|
26734
26827
|
function ChevronSvg({ dir }) {
|
|
26735
26828
|
const d = dir === "left" ? "M11 4L5 10l6 6" : "M9 4l6 6-6 6";
|
|
26736
|
-
return /* @__PURE__ */ (0,
|
|
26829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
26737
26830
|
"svg",
|
|
26738
26831
|
{
|
|
26739
26832
|
width: "14",
|
|
@@ -26745,7 +26838,7 @@ function ChevronSvg({ dir }) {
|
|
|
26745
26838
|
strokeLinecap: "round",
|
|
26746
26839
|
strokeLinejoin: "round",
|
|
26747
26840
|
"aria-hidden": "true",
|
|
26748
|
-
children: /* @__PURE__ */ (0,
|
|
26841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("path", { d })
|
|
26749
26842
|
}
|
|
26750
26843
|
);
|
|
26751
26844
|
}
|
|
@@ -26753,7 +26846,7 @@ function ChevronSvg({ dir }) {
|
|
|
26753
26846
|
// src/components/TagsInput/TagsInput.tsx
|
|
26754
26847
|
var import_react145 = require("react");
|
|
26755
26848
|
var import_icons40 = require("@octaviaflow/icons");
|
|
26756
|
-
var
|
|
26849
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
26757
26850
|
var TagsInput = (0, import_react145.forwardRef)(
|
|
26758
26851
|
function TagsInput2({
|
|
26759
26852
|
label,
|
|
@@ -26804,7 +26897,7 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26804
26897
|
}
|
|
26805
26898
|
};
|
|
26806
26899
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
26807
|
-
return /* @__PURE__ */ (0,
|
|
26900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
26808
26901
|
"div",
|
|
26809
26902
|
{
|
|
26810
26903
|
className: cn(
|
|
@@ -26815,7 +26908,7 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26815
26908
|
wrapperClassName
|
|
26816
26909
|
),
|
|
26817
26910
|
children: [
|
|
26818
|
-
label && /* @__PURE__ */ (0,
|
|
26911
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
26819
26912
|
"label",
|
|
26820
26913
|
{
|
|
26821
26914
|
id: labelId,
|
|
@@ -26824,10 +26917,10 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26824
26917
|
children: label
|
|
26825
26918
|
}
|
|
26826
26919
|
),
|
|
26827
|
-
/* @__PURE__ */ (0,
|
|
26828
|
-
value.map((tag, i) => /* @__PURE__ */ (0,
|
|
26829
|
-
/* @__PURE__ */ (0,
|
|
26830
|
-
/* @__PURE__ */ (0,
|
|
26920
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "ods-tags__field", children: [
|
|
26921
|
+
value.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { className: "ods-tags__chip", children: [
|
|
26922
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "ods-tags__chip-text", children: tag }),
|
|
26923
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
26831
26924
|
"button",
|
|
26832
26925
|
{
|
|
26833
26926
|
type: "button",
|
|
@@ -26835,11 +26928,11 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26835
26928
|
onClick: () => removeTag(i),
|
|
26836
26929
|
"aria-label": `Remove ${tag}`,
|
|
26837
26930
|
disabled,
|
|
26838
|
-
children: /* @__PURE__ */ (0,
|
|
26931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons40.CloseIcon, { size: "xs" })
|
|
26839
26932
|
}
|
|
26840
26933
|
)
|
|
26841
26934
|
] }, `${tag}-${i}`)),
|
|
26842
|
-
/* @__PURE__ */ (0,
|
|
26935
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
26843
26936
|
"input",
|
|
26844
26937
|
{
|
|
26845
26938
|
...rest,
|
|
@@ -26859,7 +26952,7 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26859
26952
|
}
|
|
26860
26953
|
)
|
|
26861
26954
|
] }),
|
|
26862
|
-
error ? /* @__PURE__ */ (0,
|
|
26955
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
26863
26956
|
"div",
|
|
26864
26957
|
{
|
|
26865
26958
|
id: hintId,
|
|
@@ -26867,7 +26960,7 @@ var TagsInput = (0, import_react145.forwardRef)(
|
|
|
26867
26960
|
role: "alert",
|
|
26868
26961
|
children: error
|
|
26869
26962
|
}
|
|
26870
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
26963
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { id: hintId, className: "ods-tags__hint", children: helperText }) : null
|
|
26871
26964
|
]
|
|
26872
26965
|
}
|
|
26873
26966
|
);
|
|
@@ -26877,7 +26970,7 @@ TagsInput.displayName = "TagsInput";
|
|
|
26877
26970
|
|
|
26878
26971
|
// src/components/TemplateCard/TemplateCard.tsx
|
|
26879
26972
|
var import_react146 = require("react");
|
|
26880
|
-
var
|
|
26973
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
26881
26974
|
var TemplateCard = (0, import_react146.forwardRef)(
|
|
26882
26975
|
function TemplateCard2({
|
|
26883
26976
|
name,
|
|
@@ -26913,7 +27006,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26913
27006
|
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
26914
27007
|
const hasInternalInteractive = Boolean(cta || footer);
|
|
26915
27008
|
const useStretchedLink = Boolean(href) && !disabled && hasInternalInteractive;
|
|
26916
|
-
const titleContent = useStretchedLink ? /* @__PURE__ */ (0,
|
|
27009
|
+
const titleContent = useStretchedLink ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
26917
27010
|
"a",
|
|
26918
27011
|
{
|
|
26919
27012
|
className: "ods-template-card__stretched-link",
|
|
@@ -26925,8 +27018,8 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26925
27018
|
const renderAuthor = () => {
|
|
26926
27019
|
if (!author) return null;
|
|
26927
27020
|
const derivedInitials = author.avatar?.initials ?? (typeof author.name === "string" ? author.name.charAt(0).toUpperCase() : void 0);
|
|
26928
|
-
return /* @__PURE__ */ (0,
|
|
26929
|
-
(author.avatar || derivedInitials) && /* @__PURE__ */ (0,
|
|
27021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "ods-template-card__author", children: [
|
|
27022
|
+
(author.avatar || derivedInitials) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
26930
27023
|
Avatar,
|
|
26931
27024
|
{
|
|
26932
27025
|
size: "xs",
|
|
@@ -26936,8 +27029,8 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26936
27029
|
className: "ods-template-card__author-avatar"
|
|
26937
27030
|
}
|
|
26938
27031
|
),
|
|
26939
|
-
/* @__PURE__ */ (0,
|
|
26940
|
-
author.byline && /* @__PURE__ */ (0,
|
|
27032
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__author-name", children: author.name }),
|
|
27033
|
+
author.byline && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__author-byline", children: author.byline })
|
|
26941
27034
|
] });
|
|
26942
27035
|
};
|
|
26943
27036
|
const hasImage = Boolean(image);
|
|
@@ -26951,8 +27044,8 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26951
27044
|
if (iconConnector === "plus") return "+";
|
|
26952
27045
|
return iconConnector;
|
|
26953
27046
|
};
|
|
26954
|
-
const body = /* @__PURE__ */ (0,
|
|
26955
|
-
showMedia && /* @__PURE__ */ (0,
|
|
27047
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
27048
|
+
showMedia && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
26956
27049
|
"div",
|
|
26957
27050
|
{
|
|
26958
27051
|
className: cn(
|
|
@@ -26965,9 +27058,9 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26965
27058
|
"aria-hidden": "true",
|
|
26966
27059
|
children: [
|
|
26967
27060
|
hasImage && image,
|
|
26968
|
-
hasIcon && /* @__PURE__ */ (0,
|
|
26969
|
-
hasIconFlow && /* @__PURE__ */ (0,
|
|
26970
|
-
i > 0 && /* @__PURE__ */ (0,
|
|
27061
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__icon", children: icon }),
|
|
27062
|
+
hasIconFlow && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__icon-flow", children: icons.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("span", { className: "ods-template-card__icon-flow-item", children: [
|
|
27063
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
26971
27064
|
"span",
|
|
26972
27065
|
{
|
|
26973
27066
|
className: "ods-template-card__icon-connector",
|
|
@@ -26975,7 +27068,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26975
27068
|
children: renderConnector()
|
|
26976
27069
|
}
|
|
26977
27070
|
),
|
|
26978
|
-
/* @__PURE__ */ (0,
|
|
27071
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
26979
27072
|
"span",
|
|
26980
27073
|
{
|
|
26981
27074
|
className: cn(
|
|
@@ -26988,13 +27081,13 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
26988
27081
|
}
|
|
26989
27082
|
)
|
|
26990
27083
|
] }, i)) }),
|
|
26991
|
-
badge && /* @__PURE__ */ (0,
|
|
27084
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__badge", children: badge })
|
|
26992
27085
|
]
|
|
26993
27086
|
}
|
|
26994
27087
|
),
|
|
26995
|
-
/* @__PURE__ */ (0,
|
|
26996
|
-
category && /* @__PURE__ */ (0,
|
|
26997
|
-
/* @__PURE__ */ (0,
|
|
27088
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "ods-template-card__content", children: [
|
|
27089
|
+
category && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "ods-template-card__category", children: category }),
|
|
27090
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
26998
27091
|
Card.Title,
|
|
26999
27092
|
{
|
|
27000
27093
|
as: nameAs,
|
|
@@ -27003,7 +27096,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27003
27096
|
children: titleContent
|
|
27004
27097
|
}
|
|
27005
27098
|
),
|
|
27006
|
-
description && /* @__PURE__ */ (0,
|
|
27099
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27007
27100
|
Card.Description,
|
|
27008
27101
|
{
|
|
27009
27102
|
id: descId,
|
|
@@ -27011,18 +27104,18 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27011
27104
|
children: description
|
|
27012
27105
|
}
|
|
27013
27106
|
),
|
|
27014
|
-
requirements && requirements.length > 0 && /* @__PURE__ */ (0,
|
|
27107
|
+
requirements && requirements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27015
27108
|
"div",
|
|
27016
27109
|
{
|
|
27017
27110
|
className: "ods-template-card__requirements",
|
|
27018
27111
|
"aria-label": "Requirements",
|
|
27019
|
-
children: requirements.map((r, i) => /* @__PURE__ */ (0,
|
|
27112
|
+
children: requirements.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__requirement", children: r }, i))
|
|
27020
27113
|
}
|
|
27021
27114
|
),
|
|
27022
|
-
stats && stats.length > 0 && /* @__PURE__ */ (0,
|
|
27023
|
-
/* @__PURE__ */ (0,
|
|
27024
|
-
/* @__PURE__ */ (0,
|
|
27025
|
-
s.icon && /* @__PURE__ */ (0,
|
|
27115
|
+
stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("dl", { className: "ods-template-card__stats", children: stats.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "ods-template-card__stat", children: [
|
|
27116
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("dt", { className: "ods-template-card__stat-label", children: s.label }),
|
|
27117
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("dd", { className: "ods-template-card__stat-value", children: [
|
|
27118
|
+
s.icon && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27026
27119
|
"span",
|
|
27027
27120
|
{
|
|
27028
27121
|
className: "ods-template-card__stat-icon",
|
|
@@ -27033,12 +27126,12 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27033
27126
|
s.value
|
|
27034
27127
|
] })
|
|
27035
27128
|
] }, i)) }),
|
|
27036
|
-
tags && tags.length > 0 && /* @__PURE__ */ (0,
|
|
27037
|
-
(author || cta || footer) && /* @__PURE__ */ (0,
|
|
27129
|
+
tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "ods-template-card__tags", children: tags.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ods-template-card__tag", children: t }, i)) }),
|
|
27130
|
+
(author || cta || footer) && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "ods-template-card__footer-row", children: [
|
|
27038
27131
|
renderAuthor(),
|
|
27039
|
-
(cta || footer) && /* @__PURE__ */ (0,
|
|
27040
|
-
cta && /* @__PURE__ */ (0,
|
|
27041
|
-
footer && /* @__PURE__ */ (0,
|
|
27132
|
+
(cta || footer) && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "ods-template-card__footer-actions", children: [
|
|
27133
|
+
cta && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "ods-template-card__cta", children: cta }),
|
|
27134
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "ods-template-card__footer", children: footer })
|
|
27042
27135
|
] })
|
|
27043
27136
|
] })
|
|
27044
27137
|
] })
|
|
@@ -27052,7 +27145,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27052
27145
|
className
|
|
27053
27146
|
);
|
|
27054
27147
|
if (href && !disabled && !useStretchedLink) {
|
|
27055
|
-
return /* @__PURE__ */ (0,
|
|
27148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27056
27149
|
Card,
|
|
27057
27150
|
{
|
|
27058
27151
|
asChild: true,
|
|
@@ -27061,7 +27154,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27061
27154
|
className: sharedClass,
|
|
27062
27155
|
"aria-labelledby": nameId,
|
|
27063
27156
|
"aria-describedby": descId,
|
|
27064
|
-
children: /* @__PURE__ */ (0,
|
|
27157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27065
27158
|
"a",
|
|
27066
27159
|
{
|
|
27067
27160
|
...rest,
|
|
@@ -27075,7 +27168,7 @@ var TemplateCard = (0, import_react146.forwardRef)(
|
|
|
27075
27168
|
}
|
|
27076
27169
|
);
|
|
27077
27170
|
}
|
|
27078
|
-
return /* @__PURE__ */ (0,
|
|
27171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
27079
27172
|
Card,
|
|
27080
27173
|
{
|
|
27081
27174
|
...rest,
|
|
@@ -27098,7 +27191,7 @@ TemplateCard.displayName = "TemplateCard";
|
|
|
27098
27191
|
// src/components/TestimonialCard/TestimonialCard.tsx
|
|
27099
27192
|
var import_icons41 = require("@octaviaflow/icons");
|
|
27100
27193
|
var import_react147 = require("react");
|
|
27101
|
-
var
|
|
27194
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
27102
27195
|
function isAuthorObject(v) {
|
|
27103
27196
|
return typeof v === "object" && v !== null && !("type" in v) && // exclude React elements
|
|
27104
27197
|
"name" in v;
|
|
@@ -27130,7 +27223,7 @@ var TestimonialCard = (0, import_react147.forwardRef)(function TestimonialCard2(
|
|
|
27130
27223
|
};
|
|
27131
27224
|
const renderAvatar = () => {
|
|
27132
27225
|
if (!isAuthorObject(author) && legacyAvatar) {
|
|
27133
|
-
return /* @__PURE__ */ (0,
|
|
27226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
27134
27227
|
"span",
|
|
27135
27228
|
{
|
|
27136
27229
|
className: "ods-testimonial__avatar ods-testimonial__avatar--legacy",
|
|
@@ -27139,7 +27232,7 @@ var TestimonialCard = (0, import_react147.forwardRef)(function TestimonialCard2(
|
|
|
27139
27232
|
}
|
|
27140
27233
|
);
|
|
27141
27234
|
}
|
|
27142
|
-
return /* @__PURE__ */ (0,
|
|
27235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
27143
27236
|
Avatar,
|
|
27144
27237
|
{
|
|
27145
27238
|
size: size === "sm" ? "xs" : size === "lg" ? "md" : "sm",
|
|
@@ -27150,7 +27243,7 @@ var TestimonialCard = (0, import_react147.forwardRef)(function TestimonialCard2(
|
|
|
27150
27243
|
}
|
|
27151
27244
|
);
|
|
27152
27245
|
};
|
|
27153
|
-
return /* @__PURE__ */ (0,
|
|
27246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
27154
27247
|
Card,
|
|
27155
27248
|
{
|
|
27156
27249
|
...rest,
|
|
@@ -27167,26 +27260,26 @@ var TestimonialCard = (0, import_react147.forwardRef)(function TestimonialCard2(
|
|
|
27167
27260
|
"aria-labelledby": authorId,
|
|
27168
27261
|
"aria-describedby": quoteId,
|
|
27169
27262
|
children: [
|
|
27170
|
-
/* @__PURE__ */ (0,
|
|
27171
|
-
/* @__PURE__ */ (0,
|
|
27172
|
-
logo && /* @__PURE__ */ (0,
|
|
27263
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "ods-testimonial__head", children: [
|
|
27264
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "ods-testimonial__quote", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons41.QuotesIcon, { size: "md" }) }),
|
|
27265
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "ods-testimonial__logo", "aria-hidden": "true", children: logo })
|
|
27173
27266
|
] }),
|
|
27174
|
-
/* @__PURE__ */ (0,
|
|
27175
|
-
typeof rating === "number" && /* @__PURE__ */ (0,
|
|
27267
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("blockquote", { id: quoteId, className: "ods-testimonial__text", children: quote }),
|
|
27268
|
+
typeof rating === "number" && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
27176
27269
|
"div",
|
|
27177
27270
|
{
|
|
27178
27271
|
className: "ods-testimonial__rating",
|
|
27179
27272
|
role: "img",
|
|
27180
27273
|
"aria-label": `${rating} out of 5 stars`,
|
|
27181
27274
|
children: Array.from({ length: 5 }).map(
|
|
27182
|
-
(_, i) => i < Math.round(rating) ? /* @__PURE__ */ (0,
|
|
27275
|
+
(_, i) => i < Math.round(rating) ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
27183
27276
|
import_icons41.StarFilledIcon,
|
|
27184
27277
|
{
|
|
27185
27278
|
size: "xs",
|
|
27186
27279
|
className: "ods-testimonial__star ods-testimonial__star--on"
|
|
27187
27280
|
},
|
|
27188
27281
|
i
|
|
27189
|
-
) : /* @__PURE__ */ (0,
|
|
27282
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
27190
27283
|
import_icons41.StarIcon,
|
|
27191
27284
|
{
|
|
27192
27285
|
size: "xs",
|
|
@@ -27197,11 +27290,11 @@ var TestimonialCard = (0, import_react147.forwardRef)(function TestimonialCard2(
|
|
|
27197
27290
|
)
|
|
27198
27291
|
}
|
|
27199
27292
|
),
|
|
27200
|
-
/* @__PURE__ */ (0,
|
|
27293
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("figcaption", { className: "ods-testimonial__author", id: authorId, children: [
|
|
27201
27294
|
renderAvatar(),
|
|
27202
|
-
/* @__PURE__ */ (0,
|
|
27203
|
-
/* @__PURE__ */ (0,
|
|
27204
|
-
resolved.role && /* @__PURE__ */ (0,
|
|
27295
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { className: "ods-testimonial__author-info", children: [
|
|
27296
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "ods-testimonial__author-name", children: resolved.name }),
|
|
27297
|
+
resolved.role && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "ods-testimonial__author-role", children: resolved.role })
|
|
27205
27298
|
] })
|
|
27206
27299
|
] })
|
|
27207
27300
|
]
|
|
@@ -27585,7 +27678,7 @@ function useTextareaSelection({
|
|
|
27585
27678
|
// src/hooks/useTextareaTools.tsx
|
|
27586
27679
|
var import_icons42 = require("@octaviaflow/icons");
|
|
27587
27680
|
var import_react150 = require("react");
|
|
27588
|
-
var
|
|
27681
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
27589
27682
|
function useTextareaTools({
|
|
27590
27683
|
textareaRef,
|
|
27591
27684
|
value,
|
|
@@ -27721,28 +27814,28 @@ var prependLineTool = (id, prefix, label, icon, title) => ({
|
|
|
27721
27814
|
onAction: (h) => h.prependLines(prefix)
|
|
27722
27815
|
});
|
|
27723
27816
|
var textareaTools = {
|
|
27724
|
-
bold: () => wrapTool("bold", "**", "**", "Bold", /* @__PURE__ */ (0,
|
|
27725
|
-
italic: () => wrapTool("italic", "*", "*", "Italic", /* @__PURE__ */ (0,
|
|
27817
|
+
bold: () => wrapTool("bold", "**", "**", "Bold", /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.TextBoldIcon, {}), "Bold (\u2318B)"),
|
|
27818
|
+
italic: () => wrapTool("italic", "*", "*", "Italic", /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.TextItalicIcon, {}), "Italic (\u2318I)"),
|
|
27726
27819
|
strikethrough: () => wrapTool(
|
|
27727
27820
|
"strike",
|
|
27728
27821
|
"~~",
|
|
27729
27822
|
"~~",
|
|
27730
27823
|
"Strikethrough",
|
|
27731
|
-
/* @__PURE__ */ (0,
|
|
27824
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.TextStrikethroughIcon, {}),
|
|
27732
27825
|
"Strikethrough"
|
|
27733
27826
|
),
|
|
27734
|
-
code: () => wrapTool("code", "`", "`", "Code", /* @__PURE__ */ (0,
|
|
27827
|
+
code: () => wrapTool("code", "`", "`", "Code", /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.CodeIcon, {}), "Inline code"),
|
|
27735
27828
|
codeBlock: () => ({
|
|
27736
27829
|
id: "code-block",
|
|
27737
27830
|
label: "Code block",
|
|
27738
|
-
icon: /* @__PURE__ */ (0,
|
|
27831
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.CodeIcon, {}),
|
|
27739
27832
|
title: "Code block",
|
|
27740
27833
|
onAction: (h) => h.wrap("```\n", "\n```")
|
|
27741
27834
|
}),
|
|
27742
27835
|
link: () => ({
|
|
27743
27836
|
id: "link",
|
|
27744
27837
|
label: "Link",
|
|
27745
|
-
icon: /* @__PURE__ */ (0,
|
|
27838
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.TextLinkIcon, {}),
|
|
27746
27839
|
title: "Insert link",
|
|
27747
27840
|
onAction: (h) => {
|
|
27748
27841
|
const sel = h.selection;
|
|
@@ -27755,41 +27848,41 @@ var textareaTools = {
|
|
|
27755
27848
|
`heading-${level}`,
|
|
27756
27849
|
`${"#".repeat(level)} `,
|
|
27757
27850
|
`H${level}`,
|
|
27758
|
-
/* @__PURE__ */ (0,
|
|
27851
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.HeadingIcon, {}),
|
|
27759
27852
|
`Heading ${level}`
|
|
27760
27853
|
),
|
|
27761
27854
|
bulletList: () => prependLineTool(
|
|
27762
27855
|
"ul",
|
|
27763
27856
|
"- ",
|
|
27764
27857
|
"Bullet list",
|
|
27765
|
-
/* @__PURE__ */ (0,
|
|
27858
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.ListBulletedIcon, {}),
|
|
27766
27859
|
"Bullet list"
|
|
27767
27860
|
),
|
|
27768
27861
|
numberedList: () => prependLineTool(
|
|
27769
27862
|
"ol",
|
|
27770
27863
|
"1. ",
|
|
27771
27864
|
"Numbered list",
|
|
27772
|
-
/* @__PURE__ */ (0,
|
|
27865
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.ListNumberedIcon, {}),
|
|
27773
27866
|
"Numbered list"
|
|
27774
27867
|
),
|
|
27775
27868
|
quote: () => prependLineTool(
|
|
27776
27869
|
"quote",
|
|
27777
27870
|
"> ",
|
|
27778
27871
|
"Quote",
|
|
27779
|
-
/* @__PURE__ */ (0,
|
|
27872
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.QuotesIcon, {}),
|
|
27780
27873
|
"Quote"
|
|
27781
27874
|
),
|
|
27782
27875
|
undo: () => ({
|
|
27783
27876
|
id: "undo",
|
|
27784
27877
|
label: "Undo",
|
|
27785
|
-
icon: /* @__PURE__ */ (0,
|
|
27878
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.UndoIcon, {}),
|
|
27786
27879
|
title: "Undo (\u2318Z)",
|
|
27787
27880
|
onAction: (h) => h.undo()
|
|
27788
27881
|
}),
|
|
27789
27882
|
redo: () => ({
|
|
27790
27883
|
id: "redo",
|
|
27791
27884
|
label: "Redo",
|
|
27792
|
-
icon: /* @__PURE__ */ (0,
|
|
27885
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons42.RedoIcon, {}),
|
|
27793
27886
|
title: "Redo (\u2318\u21E7Z)",
|
|
27794
27887
|
onAction: (h) => h.redo()
|
|
27795
27888
|
}),
|
|
@@ -27801,7 +27894,7 @@ var textareaTools = {
|
|
|
27801
27894
|
};
|
|
27802
27895
|
|
|
27803
27896
|
// src/components/Textarea/Textarea.tsx
|
|
27804
|
-
var
|
|
27897
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
27805
27898
|
var Textarea = (0, import_react151.forwardRef)(
|
|
27806
27899
|
function Textarea2({
|
|
27807
27900
|
label,
|
|
@@ -27950,7 +28043,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
27950
28043
|
minWidth: toCss2(minWidth),
|
|
27951
28044
|
resize: resolvedResize
|
|
27952
28045
|
};
|
|
27953
|
-
return /* @__PURE__ */ (0,
|
|
28046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
27954
28047
|
"div",
|
|
27955
28048
|
{
|
|
27956
28049
|
className: cn(
|
|
@@ -27964,7 +28057,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
27964
28057
|
),
|
|
27965
28058
|
style: consumerStyle,
|
|
27966
28059
|
children: [
|
|
27967
|
-
label && /* @__PURE__ */ (0,
|
|
28060
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
27968
28061
|
"label",
|
|
27969
28062
|
{
|
|
27970
28063
|
...labelProps,
|
|
@@ -27973,15 +28066,15 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
27973
28066
|
children: label
|
|
27974
28067
|
}
|
|
27975
28068
|
),
|
|
27976
|
-
toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */ (0,
|
|
28069
|
+
toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
27977
28070
|
TextareaToolbar,
|
|
27978
28071
|
{
|
|
27979
28072
|
tools: toolbar.tools,
|
|
27980
28073
|
onRun: toolbar.runTool
|
|
27981
28074
|
}
|
|
27982
28075
|
),
|
|
27983
|
-
/* @__PURE__ */ (0,
|
|
27984
|
-
/* @__PURE__ */ (0,
|
|
28076
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "ods-textarea__wrapper", children: [
|
|
28077
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
27985
28078
|
"textarea",
|
|
27986
28079
|
{
|
|
27987
28080
|
...props,
|
|
@@ -28006,7 +28099,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28006
28099
|
}
|
|
28007
28100
|
),
|
|
28008
28101
|
cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && (0, import_react_dom17.createPortal)(
|
|
28009
|
-
/* @__PURE__ */ (0,
|
|
28102
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28010
28103
|
"ul",
|
|
28011
28104
|
{
|
|
28012
28105
|
id: `${baseId}-cmd-list`,
|
|
@@ -28018,7 +28111,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28018
28111
|
top: (cmdPalette.caretRect?.bottom ?? 0) + 6,
|
|
28019
28112
|
left: cmdPalette.caretRect?.left ?? 0
|
|
28020
28113
|
},
|
|
28021
|
-
children: cmdPalette.items.map((c, i) => /* @__PURE__ */ (0,
|
|
28114
|
+
children: cmdPalette.items.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
28022
28115
|
"li",
|
|
28023
28116
|
{
|
|
28024
28117
|
id: `${baseId}-cmd-${c.id}`,
|
|
@@ -28035,10 +28128,10 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28035
28128
|
onMouseEnter: () => {
|
|
28036
28129
|
},
|
|
28037
28130
|
children: [
|
|
28038
|
-
c.icon && /* @__PURE__ */ (0,
|
|
28039
|
-
/* @__PURE__ */ (0,
|
|
28040
|
-
/* @__PURE__ */ (0,
|
|
28041
|
-
c.description && /* @__PURE__ */ (0,
|
|
28131
|
+
c.icon && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__cmd-icon", children: c.icon }),
|
|
28132
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "ods-textarea__cmd-text", children: [
|
|
28133
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__cmd-label", children: c.label }),
|
|
28134
|
+
c.description && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__cmd-desc", children: c.description })
|
|
28042
28135
|
] })
|
|
28043
28136
|
]
|
|
28044
28137
|
},
|
|
@@ -28049,7 +28142,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28049
28142
|
document.body
|
|
28050
28143
|
),
|
|
28051
28144
|
selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && (0, import_react_dom17.createPortal)(
|
|
28052
|
-
/* @__PURE__ */ (0,
|
|
28145
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
28053
28146
|
"div",
|
|
28054
28147
|
{
|
|
28055
28148
|
role: "toolbar",
|
|
@@ -28062,7 +28155,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28062
28155
|
},
|
|
28063
28156
|
onMouseDown: (e) => e.preventDefault(),
|
|
28064
28157
|
children: [
|
|
28065
|
-
/* @__PURE__ */ (0,
|
|
28158
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28066
28159
|
"button",
|
|
28067
28160
|
{
|
|
28068
28161
|
type: "button",
|
|
@@ -28070,10 +28163,10 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28070
28163
|
onClick: () => sel.copy(),
|
|
28071
28164
|
"aria-label": "Copy selection",
|
|
28072
28165
|
title: "Copy",
|
|
28073
|
-
children: /* @__PURE__ */ (0,
|
|
28166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons43.CopyIcon, { size: "xs" })
|
|
28074
28167
|
}
|
|
28075
28168
|
),
|
|
28076
|
-
/* @__PURE__ */ (0,
|
|
28169
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28077
28170
|
"button",
|
|
28078
28171
|
{
|
|
28079
28172
|
type: "button",
|
|
@@ -28081,10 +28174,10 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28081
28174
|
onClick: () => sel.cut(),
|
|
28082
28175
|
"aria-label": "Cut selection",
|
|
28083
28176
|
title: "Cut",
|
|
28084
|
-
children: /* @__PURE__ */ (0,
|
|
28177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons43.CutIcon, { size: "xs" })
|
|
28085
28178
|
}
|
|
28086
28179
|
),
|
|
28087
|
-
selectionActions?.map((a) => /* @__PURE__ */ (0,
|
|
28180
|
+
selectionActions?.map((a) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
28088
28181
|
"button",
|
|
28089
28182
|
{
|
|
28090
28183
|
type: "button",
|
|
@@ -28098,7 +28191,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28098
28191
|
title: typeof a.label === "string" ? a.label : void 0,
|
|
28099
28192
|
children: [
|
|
28100
28193
|
a.icon,
|
|
28101
|
-
a.label && /* @__PURE__ */ (0,
|
|
28194
|
+
a.label && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__sel-btn-label", children: a.label })
|
|
28102
28195
|
]
|
|
28103
28196
|
},
|
|
28104
28197
|
a.id
|
|
@@ -28108,7 +28201,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28108
28201
|
),
|
|
28109
28202
|
document.body
|
|
28110
28203
|
),
|
|
28111
|
-
maxLength != null && /* @__PURE__ */ (0,
|
|
28204
|
+
maxLength != null && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
28112
28205
|
"span",
|
|
28113
28206
|
{
|
|
28114
28207
|
className: "ods-textarea__count",
|
|
@@ -28121,14 +28214,14 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28121
28214
|
}
|
|
28122
28215
|
)
|
|
28123
28216
|
] }),
|
|
28124
|
-
toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */ (0,
|
|
28217
|
+
toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28125
28218
|
TextareaToolbar,
|
|
28126
28219
|
{
|
|
28127
28220
|
tools: toolbar.tools,
|
|
28128
28221
|
onRun: toolbar.runTool
|
|
28129
28222
|
}
|
|
28130
28223
|
),
|
|
28131
|
-
error && errorMessage ? /* @__PURE__ */ (0,
|
|
28224
|
+
error && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28132
28225
|
"div",
|
|
28133
28226
|
{
|
|
28134
28227
|
id: hintId,
|
|
@@ -28136,7 +28229,7 @@ var Textarea = (0, import_react151.forwardRef)(
|
|
|
28136
28229
|
role: "alert",
|
|
28137
28230
|
children: errorMessage
|
|
28138
28231
|
}
|
|
28139
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
28232
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { id: hintId, className: "ods-textarea__hint", children: helperText }) : null
|
|
28140
28233
|
]
|
|
28141
28234
|
}
|
|
28142
28235
|
);
|
|
@@ -28147,7 +28240,7 @@ function TextareaToolbar({
|
|
|
28147
28240
|
tools,
|
|
28148
28241
|
onRun
|
|
28149
28242
|
}) {
|
|
28150
|
-
return /* @__PURE__ */ (0,
|
|
28243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28151
28244
|
"div",
|
|
28152
28245
|
{
|
|
28153
28246
|
role: "toolbar",
|
|
@@ -28160,7 +28253,7 @@ function TextareaToolbar({
|
|
|
28160
28253
|
},
|
|
28161
28254
|
children: tools.map((t) => {
|
|
28162
28255
|
if (t.kind === "divider") {
|
|
28163
|
-
return /* @__PURE__ */ (0,
|
|
28256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28164
28257
|
"span",
|
|
28165
28258
|
{
|
|
28166
28259
|
className: "ods-textarea__toolbar-divider",
|
|
@@ -28169,7 +28262,7 @@ function TextareaToolbar({
|
|
|
28169
28262
|
t.id
|
|
28170
28263
|
);
|
|
28171
28264
|
}
|
|
28172
|
-
return /* @__PURE__ */ (0,
|
|
28265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
28173
28266
|
"button",
|
|
28174
28267
|
{
|
|
28175
28268
|
type: "button",
|
|
@@ -28177,7 +28270,7 @@ function TextareaToolbar({
|
|
|
28177
28270
|
title: t.title ?? (typeof t.label === "string" ? t.label : void 0),
|
|
28178
28271
|
"aria-label": typeof t.label === "string" ? t.label : t.id,
|
|
28179
28272
|
onClick: () => onRun(t.id),
|
|
28180
|
-
children: t.icon ? /* @__PURE__ */ (0,
|
|
28273
|
+
children: t.icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__toolbar-icon", children: t.icon }) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "ods-textarea__toolbar-text", children: t.label })
|
|
28181
28274
|
},
|
|
28182
28275
|
t.id
|
|
28183
28276
|
);
|
|
@@ -28189,7 +28282,7 @@ function TextareaToolbar({
|
|
|
28189
28282
|
// src/components/Timeline/Timeline.tsx
|
|
28190
28283
|
var import_framer_motion35 = require("framer-motion");
|
|
28191
28284
|
var import_react152 = require("react");
|
|
28192
|
-
var
|
|
28285
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
28193
28286
|
var Timeline = (0, import_react152.forwardRef)(
|
|
28194
28287
|
function Timeline2({
|
|
28195
28288
|
items,
|
|
@@ -28199,16 +28292,16 @@ var Timeline = (0, import_react152.forwardRef)(
|
|
|
28199
28292
|
className,
|
|
28200
28293
|
...rest
|
|
28201
28294
|
}, ref) {
|
|
28202
|
-
return /* @__PURE__ */ (0,
|
|
28295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
28203
28296
|
"ol",
|
|
28204
28297
|
{
|
|
28205
28298
|
...rest,
|
|
28206
28299
|
ref,
|
|
28207
28300
|
className: cn("ods-timeline", `ods-timeline--${size}`, className),
|
|
28208
|
-
children: /* @__PURE__ */ (0,
|
|
28301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_framer_motion35.AnimatePresence, { initial: false, children: items.map((item, idx) => {
|
|
28209
28302
|
const last = idx === items.length - 1;
|
|
28210
28303
|
const status = item.status ?? "default";
|
|
28211
|
-
return /* @__PURE__ */ (0,
|
|
28304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
28212
28305
|
import_framer_motion35.motion.li,
|
|
28213
28306
|
{
|
|
28214
28307
|
layout: animated,
|
|
@@ -28225,8 +28318,8 @@ var Timeline = (0, import_react152.forwardRef)(
|
|
|
28225
28318
|
delay: animated ? idx * staggerDelay / 1e3 : 0
|
|
28226
28319
|
},
|
|
28227
28320
|
children: [
|
|
28228
|
-
/* @__PURE__ */ (0,
|
|
28229
|
-
/* @__PURE__ */ (0,
|
|
28321
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "ods-timeline__rail", children: [
|
|
28322
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
28230
28323
|
"span",
|
|
28231
28324
|
{
|
|
28232
28325
|
className: cn(
|
|
@@ -28237,12 +28330,12 @@ var Timeline = (0, import_react152.forwardRef)(
|
|
|
28237
28330
|
children: item.icon
|
|
28238
28331
|
}
|
|
28239
28332
|
),
|
|
28240
|
-
!last && /* @__PURE__ */ (0,
|
|
28333
|
+
!last && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "ods-timeline__line", "aria-hidden": "true" })
|
|
28241
28334
|
] }),
|
|
28242
|
-
/* @__PURE__ */ (0,
|
|
28243
|
-
/* @__PURE__ */ (0,
|
|
28244
|
-
item.description && /* @__PURE__ */ (0,
|
|
28245
|
-
item.meta && /* @__PURE__ */ (0,
|
|
28335
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "ods-timeline__body", children: [
|
|
28336
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "ods-timeline__title", children: item.title }),
|
|
28337
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "ods-timeline__desc", children: item.description }),
|
|
28338
|
+
item.meta && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "ods-timeline__meta", children: item.meta })
|
|
28246
28339
|
] })
|
|
28247
28340
|
]
|
|
28248
28341
|
},
|
|
@@ -28259,7 +28352,7 @@ Timeline.displayName = "Timeline";
|
|
|
28259
28352
|
var import_react153 = require("react");
|
|
28260
28353
|
var import_react_dom18 = require("react-dom");
|
|
28261
28354
|
var import_icons44 = require("@octaviaflow/icons");
|
|
28262
|
-
var
|
|
28355
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
28263
28356
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
28264
28357
|
function format(v, use24h, showSeconds) {
|
|
28265
28358
|
const base = `${pad(v.hours)}:${pad(v.minutes)}${showSeconds ? `:${pad(v.seconds ?? 0)}` : ""}`;
|
|
@@ -28491,7 +28584,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28491
28584
|
if (draft && draft.seg === seg) return draft.digits.padStart(2, "0");
|
|
28492
28585
|
return pad(val);
|
|
28493
28586
|
};
|
|
28494
|
-
const segButton = (seg, val) => /* @__PURE__ */ (0,
|
|
28587
|
+
const segButton = (seg, val) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28495
28588
|
"button",
|
|
28496
28589
|
{
|
|
28497
28590
|
ref: refOf(seg),
|
|
@@ -28511,7 +28604,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28511
28604
|
children: segDisplay(seg, val)
|
|
28512
28605
|
}
|
|
28513
28606
|
);
|
|
28514
|
-
return /* @__PURE__ */ (0,
|
|
28607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
28515
28608
|
"div",
|
|
28516
28609
|
{
|
|
28517
28610
|
...rest,
|
|
@@ -28524,7 +28617,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28524
28617
|
className
|
|
28525
28618
|
),
|
|
28526
28619
|
children: [
|
|
28527
|
-
label && /* @__PURE__ */ (0,
|
|
28620
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28528
28621
|
"label",
|
|
28529
28622
|
{
|
|
28530
28623
|
id: labelId,
|
|
@@ -28533,7 +28626,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28533
28626
|
children: label
|
|
28534
28627
|
}
|
|
28535
28628
|
),
|
|
28536
|
-
/* @__PURE__ */ (0,
|
|
28629
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
28537
28630
|
"button",
|
|
28538
28631
|
{
|
|
28539
28632
|
type: "button",
|
|
@@ -28549,9 +28642,9 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28549
28642
|
"aria-describedby": describedBy,
|
|
28550
28643
|
"aria-invalid": error ? true : void 0,
|
|
28551
28644
|
children: [
|
|
28552
|
-
/* @__PURE__ */ (0,
|
|
28553
|
-
/* @__PURE__ */ (0,
|
|
28554
|
-
/* @__PURE__ */ (0,
|
|
28645
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons44.TimeIcon, { size: "xs" }) }),
|
|
28646
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__value", children: format(value, use24h, showSeconds) }),
|
|
28647
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28555
28648
|
"span",
|
|
28556
28649
|
{
|
|
28557
28650
|
className: cn(
|
|
@@ -28559,14 +28652,14 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28559
28652
|
open && "ods-timepicker__chev--open"
|
|
28560
28653
|
),
|
|
28561
28654
|
"aria-hidden": "true",
|
|
28562
|
-
children: /* @__PURE__ */ (0,
|
|
28655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons44.ChevronDownIcon, { size: "xs" })
|
|
28563
28656
|
}
|
|
28564
28657
|
)
|
|
28565
28658
|
]
|
|
28566
28659
|
}
|
|
28567
28660
|
),
|
|
28568
28661
|
open && typeof document !== "undefined" && (0, import_react_dom18.createPortal)(
|
|
28569
|
-
/* @__PURE__ */ (0,
|
|
28662
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
28570
28663
|
"div",
|
|
28571
28664
|
{
|
|
28572
28665
|
ref: popoverRef,
|
|
@@ -28575,18 +28668,18 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28575
28668
|
"aria-label": "Select time",
|
|
28576
28669
|
style: anchoredPopoverStyle(popoverPos),
|
|
28577
28670
|
children: [
|
|
28578
|
-
/* @__PURE__ */ (0,
|
|
28579
|
-
/* @__PURE__ */ (0,
|
|
28671
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "ods-timepicker__head", children: [
|
|
28672
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "ods-timepicker__display", children: [
|
|
28580
28673
|
segButton("hours", value.hours),
|
|
28581
|
-
/* @__PURE__ */ (0,
|
|
28674
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
28582
28675
|
segButton("minutes", value.minutes),
|
|
28583
|
-
showSeconds && /* @__PURE__ */ (0,
|
|
28584
|
-
/* @__PURE__ */ (0,
|
|
28676
|
+
showSeconds && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
28677
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
28585
28678
|
segButton("seconds", value.seconds ?? 0)
|
|
28586
28679
|
] })
|
|
28587
28680
|
] }),
|
|
28588
|
-
!use24h && /* @__PURE__ */ (0,
|
|
28589
|
-
/* @__PURE__ */ (0,
|
|
28681
|
+
!use24h && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "ods-timepicker__period", children: [
|
|
28682
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28590
28683
|
"button",
|
|
28591
28684
|
{
|
|
28592
28685
|
type: "button",
|
|
@@ -28598,7 +28691,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28598
28691
|
children: "AM"
|
|
28599
28692
|
}
|
|
28600
28693
|
),
|
|
28601
|
-
/* @__PURE__ */ (0,
|
|
28694
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28602
28695
|
"button",
|
|
28603
28696
|
{
|
|
28604
28697
|
type: "button",
|
|
@@ -28612,41 +28705,41 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28612
28705
|
)
|
|
28613
28706
|
] })
|
|
28614
28707
|
] }),
|
|
28615
|
-
/* @__PURE__ */ (0,
|
|
28616
|
-
/* @__PURE__ */ (0,
|
|
28617
|
-
/* @__PURE__ */ (0,
|
|
28618
|
-
/* @__PURE__ */ (0,
|
|
28708
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_react153.Fragment, { children: [
|
|
28709
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "ods-timepicker__col", children: [
|
|
28710
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
|
|
28711
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28619
28712
|
"button",
|
|
28620
28713
|
{
|
|
28621
28714
|
type: "button",
|
|
28622
28715
|
className: "ods-timepicker__step",
|
|
28623
28716
|
onClick: () => stepBy(seg, 1),
|
|
28624
28717
|
"aria-label": `${seg} up`,
|
|
28625
|
-
children: /* @__PURE__ */ (0,
|
|
28718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons44.CaretUpIcon, { size: "xs" })
|
|
28626
28719
|
}
|
|
28627
28720
|
),
|
|
28628
|
-
/* @__PURE__ */ (0,
|
|
28721
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__col-val", children: pad(
|
|
28629
28722
|
seg === "hours" ? value.hours : seg === "minutes" ? value.minutes : value.seconds ?? 0
|
|
28630
28723
|
) }),
|
|
28631
|
-
/* @__PURE__ */ (0,
|
|
28724
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28632
28725
|
"button",
|
|
28633
28726
|
{
|
|
28634
28727
|
type: "button",
|
|
28635
28728
|
className: "ods-timepicker__step",
|
|
28636
28729
|
onClick: () => stepBy(seg, -1),
|
|
28637
28730
|
"aria-label": `${seg} down`,
|
|
28638
|
-
children: /* @__PURE__ */ (0,
|
|
28731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons44.CaretDownIcon, { size: "xs" })
|
|
28639
28732
|
}
|
|
28640
28733
|
)
|
|
28641
28734
|
] }),
|
|
28642
|
-
i < arr.length - 1 && /* @__PURE__ */ (0,
|
|
28735
|
+
i < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ods-timepicker__sep", children: ":" })
|
|
28643
28736
|
] }, seg)) })
|
|
28644
28737
|
]
|
|
28645
28738
|
}
|
|
28646
28739
|
),
|
|
28647
28740
|
document.body
|
|
28648
28741
|
),
|
|
28649
|
-
error ? /* @__PURE__ */ (0,
|
|
28742
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
28650
28743
|
"div",
|
|
28651
28744
|
{
|
|
28652
28745
|
id: hintId,
|
|
@@ -28654,7 +28747,7 @@ var TimePicker = (0, import_react153.forwardRef)(
|
|
|
28654
28747
|
role: "alert",
|
|
28655
28748
|
children: error
|
|
28656
28749
|
}
|
|
28657
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
28750
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { id: hintId, className: "ods-timepicker__hint", children: helperText }) : null
|
|
28658
28751
|
]
|
|
28659
28752
|
}
|
|
28660
28753
|
);
|
|
@@ -28665,7 +28758,7 @@ TimePicker.displayName = "TimePicker";
|
|
|
28665
28758
|
// src/components/TimezonePicker/TimezonePicker.tsx
|
|
28666
28759
|
var import_react154 = require("react");
|
|
28667
28760
|
var import_icons45 = require("@octaviaflow/icons");
|
|
28668
|
-
var
|
|
28761
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
28669
28762
|
var DEFAULT_TZS = [
|
|
28670
28763
|
{ iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
|
|
28671
28764
|
{ iana: "America/Denver", label: "Mountain Time", offset: "UTC\u22127" },
|
|
@@ -28800,7 +28893,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28800
28893
|
const setTriggerRef = (node) => {
|
|
28801
28894
|
triggerRef.current = node;
|
|
28802
28895
|
};
|
|
28803
|
-
return /* @__PURE__ */ (0,
|
|
28896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
28804
28897
|
"div",
|
|
28805
28898
|
{
|
|
28806
28899
|
...rest,
|
|
@@ -28813,7 +28906,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28813
28906
|
className
|
|
28814
28907
|
),
|
|
28815
28908
|
children: [
|
|
28816
|
-
label && /* @__PURE__ */ (0,
|
|
28909
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
28817
28910
|
"label",
|
|
28818
28911
|
{
|
|
28819
28912
|
id: labelId,
|
|
@@ -28822,7 +28915,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28822
28915
|
children: label
|
|
28823
28916
|
}
|
|
28824
28917
|
),
|
|
28825
|
-
/* @__PURE__ */ (0,
|
|
28918
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
28826
28919
|
"button",
|
|
28827
28920
|
{
|
|
28828
28921
|
ref: setTriggerRef,
|
|
@@ -28839,17 +28932,17 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28839
28932
|
"aria-describedby": describedBy,
|
|
28840
28933
|
"aria-invalid": error ? true : void 0,
|
|
28841
28934
|
children: [
|
|
28842
|
-
/* @__PURE__ */ (0,
|
|
28843
|
-
/* @__PURE__ */ (0,
|
|
28844
|
-
/* @__PURE__ */ (0,
|
|
28845
|
-
/* @__PURE__ */ (0,
|
|
28935
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons45.GlobeIcon, { size: "xs" }) }),
|
|
28936
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__info", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
|
|
28937
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__name", children: selected.label }),
|
|
28938
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { className: "ods-tzpicker__meta", children: [
|
|
28846
28939
|
selected.iana.split("/").pop()?.replace(/_/g, " "),
|
|
28847
28940
|
" \xB7",
|
|
28848
28941
|
" ",
|
|
28849
28942
|
selected.offset
|
|
28850
28943
|
] })
|
|
28851
|
-
] }) : /* @__PURE__ */ (0,
|
|
28852
|
-
/* @__PURE__ */ (0,
|
|
28944
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__name ods-tzpicker__name--placeholder", children: placeholder }) }),
|
|
28945
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
28853
28946
|
"span",
|
|
28854
28947
|
{
|
|
28855
28948
|
className: cn(
|
|
@@ -28857,13 +28950,13 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28857
28950
|
open && "ods-tzpicker__chev--open"
|
|
28858
28951
|
),
|
|
28859
28952
|
"aria-hidden": "true",
|
|
28860
|
-
children: /* @__PURE__ */ (0,
|
|
28953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons45.ChevronDownIcon, { size: "xs" })
|
|
28861
28954
|
}
|
|
28862
28955
|
)
|
|
28863
28956
|
]
|
|
28864
28957
|
}
|
|
28865
28958
|
),
|
|
28866
|
-
open && /* @__PURE__ */ (0,
|
|
28959
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
28867
28960
|
"div",
|
|
28868
28961
|
{
|
|
28869
28962
|
className: "ods-tzpicker__popover",
|
|
@@ -28871,9 +28964,9 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28871
28964
|
"aria-label": "Select timezone",
|
|
28872
28965
|
onKeyDown: handlePopoverKey,
|
|
28873
28966
|
children: [
|
|
28874
|
-
/* @__PURE__ */ (0,
|
|
28875
|
-
/* @__PURE__ */ (0,
|
|
28876
|
-
/* @__PURE__ */ (0,
|
|
28967
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "ods-tzpicker__search", children: [
|
|
28968
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__search-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons45.SearchIcon, { size: "xs" }) }),
|
|
28969
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
28877
28970
|
"input",
|
|
28878
28971
|
{
|
|
28879
28972
|
ref: inputRef,
|
|
@@ -28889,7 +28982,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28889
28982
|
}
|
|
28890
28983
|
)
|
|
28891
28984
|
] }),
|
|
28892
|
-
/* @__PURE__ */ (0,
|
|
28985
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
28893
28986
|
"ul",
|
|
28894
28987
|
{
|
|
28895
28988
|
ref: listRef,
|
|
@@ -28898,11 +28991,11 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28898
28991
|
role: "listbox",
|
|
28899
28992
|
"aria-labelledby": labelId,
|
|
28900
28993
|
children: [
|
|
28901
|
-
filtered.length === 0 && /* @__PURE__ */ (0,
|
|
28994
|
+
filtered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("li", { className: "ods-tzpicker__empty", role: "presentation", children: "No timezones found" }),
|
|
28902
28995
|
filtered.map((opt, i) => {
|
|
28903
28996
|
const isSelected = opt.iana === value;
|
|
28904
28997
|
const isActive2 = i === activeIndex;
|
|
28905
|
-
return /* @__PURE__ */ (0,
|
|
28998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("li", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
28906
28999
|
"button",
|
|
28907
29000
|
{
|
|
28908
29001
|
type: "button",
|
|
@@ -28919,17 +29012,17 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28919
29012
|
onClick: () => select(opt.iana),
|
|
28920
29013
|
onMouseEnter: () => setActiveIndex(i),
|
|
28921
29014
|
children: [
|
|
28922
|
-
/* @__PURE__ */ (0,
|
|
28923
|
-
/* @__PURE__ */ (0,
|
|
28924
|
-
/* @__PURE__ */ (0,
|
|
29015
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { className: "ods-tzpicker__opt-text", children: [
|
|
29016
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__opt-name", children: opt.label }),
|
|
29017
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__opt-iana", children: opt.iana })
|
|
28925
29018
|
] }),
|
|
28926
|
-
/* @__PURE__ */ (0,
|
|
28927
|
-
isSelected && /* @__PURE__ */ (0,
|
|
29019
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "ods-tzpicker__opt-off", children: opt.offset }),
|
|
29020
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
28928
29021
|
"span",
|
|
28929
29022
|
{
|
|
28930
29023
|
className: "ods-tzpicker__opt-check",
|
|
28931
29024
|
"aria-hidden": "true",
|
|
28932
|
-
children: /* @__PURE__ */ (0,
|
|
29025
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons45.CheckmarkIcon, { size: "xs" })
|
|
28933
29026
|
}
|
|
28934
29027
|
)
|
|
28935
29028
|
]
|
|
@@ -28942,7 +29035,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28942
29035
|
]
|
|
28943
29036
|
}
|
|
28944
29037
|
),
|
|
28945
|
-
error ? /* @__PURE__ */ (0,
|
|
29038
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
28946
29039
|
"div",
|
|
28947
29040
|
{
|
|
28948
29041
|
id: hintId,
|
|
@@ -28950,7 +29043,7 @@ var TimezonePicker = (0, import_react154.forwardRef)(
|
|
|
28950
29043
|
role: "alert",
|
|
28951
29044
|
children: error
|
|
28952
29045
|
}
|
|
28953
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
29046
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { id: hintId, className: "ods-tzpicker__hint", children: helperText }) : null
|
|
28954
29047
|
]
|
|
28955
29048
|
}
|
|
28956
29049
|
);
|
|
@@ -28962,10 +29055,10 @@ TimezonePicker.displayName = "TimezonePicker";
|
|
|
28962
29055
|
var import_framer_motion36 = require("framer-motion");
|
|
28963
29056
|
var import_react155 = require("react");
|
|
28964
29057
|
var import_react_dom19 = require("react-dom");
|
|
28965
|
-
var
|
|
29058
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
28966
29059
|
var defaultIcons = {
|
|
28967
|
-
success: /* @__PURE__ */ (0,
|
|
28968
|
-
/* @__PURE__ */ (0,
|
|
29060
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29061
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
28969
29062
|
"circle",
|
|
28970
29063
|
{
|
|
28971
29064
|
cx: "8",
|
|
@@ -28975,7 +29068,7 @@ var defaultIcons = {
|
|
|
28975
29068
|
stroke: "var(--ods-status-success-bd)"
|
|
28976
29069
|
}
|
|
28977
29070
|
),
|
|
28978
|
-
/* @__PURE__ */ (0,
|
|
29071
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
28979
29072
|
"path",
|
|
28980
29073
|
{
|
|
28981
29074
|
d: "m5 8 2 2 4-4.5",
|
|
@@ -28986,8 +29079,8 @@ var defaultIcons = {
|
|
|
28986
29079
|
}
|
|
28987
29080
|
)
|
|
28988
29081
|
] }),
|
|
28989
|
-
error: /* @__PURE__ */ (0,
|
|
28990
|
-
/* @__PURE__ */ (0,
|
|
29082
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29083
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
28991
29084
|
"circle",
|
|
28992
29085
|
{
|
|
28993
29086
|
cx: "8",
|
|
@@ -28997,7 +29090,7 @@ var defaultIcons = {
|
|
|
28997
29090
|
stroke: "var(--ods-status-failed-bd)"
|
|
28998
29091
|
}
|
|
28999
29092
|
),
|
|
29000
|
-
/* @__PURE__ */ (0,
|
|
29093
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29001
29094
|
"path",
|
|
29002
29095
|
{
|
|
29003
29096
|
d: "M5.5 5.5l5 5M10.5 5.5l-5 5",
|
|
@@ -29007,8 +29100,8 @@ var defaultIcons = {
|
|
|
29007
29100
|
}
|
|
29008
29101
|
)
|
|
29009
29102
|
] }),
|
|
29010
|
-
warning: /* @__PURE__ */ (0,
|
|
29011
|
-
/* @__PURE__ */ (0,
|
|
29103
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29104
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29012
29105
|
"circle",
|
|
29013
29106
|
{
|
|
29014
29107
|
cx: "8",
|
|
@@ -29018,7 +29111,7 @@ var defaultIcons = {
|
|
|
29018
29111
|
stroke: "var(--ods-status-pending-bd)"
|
|
29019
29112
|
}
|
|
29020
29113
|
),
|
|
29021
|
-
/* @__PURE__ */ (0,
|
|
29114
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29022
29115
|
"path",
|
|
29023
29116
|
{
|
|
29024
29117
|
d: "M8 4.5v4.2M8 11v.5",
|
|
@@ -29028,8 +29121,8 @@ var defaultIcons = {
|
|
|
29028
29121
|
}
|
|
29029
29122
|
)
|
|
29030
29123
|
] }),
|
|
29031
|
-
info: /* @__PURE__ */ (0,
|
|
29032
|
-
/* @__PURE__ */ (0,
|
|
29124
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29125
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29033
29126
|
"circle",
|
|
29034
29127
|
{
|
|
29035
29128
|
cx: "8",
|
|
@@ -29039,7 +29132,7 @@ var defaultIcons = {
|
|
|
29039
29132
|
stroke: "var(--ods-status-running-bd)"
|
|
29040
29133
|
}
|
|
29041
29134
|
),
|
|
29042
|
-
/* @__PURE__ */ (0,
|
|
29135
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29043
29136
|
"path",
|
|
29044
29137
|
{
|
|
29045
29138
|
d: "M8 7.5v4M8 4.5v.5",
|
|
@@ -29053,19 +29146,19 @@ var defaultIcons = {
|
|
|
29053
29146
|
var ToastContext = (0, import_react155.createContext)(null);
|
|
29054
29147
|
function ToastBody({ item, onDismiss }) {
|
|
29055
29148
|
const dismiss = () => onDismiss(item.id);
|
|
29056
|
-
if (item.render) return /* @__PURE__ */ (0,
|
|
29149
|
+
if (item.render) return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children: item.render({ id: item.id, dismiss }) });
|
|
29057
29150
|
const title = item.title ?? item.message;
|
|
29058
|
-
return /* @__PURE__ */ (0,
|
|
29059
|
-
/* @__PURE__ */ (0,
|
|
29060
|
-
/* @__PURE__ */ (0,
|
|
29061
|
-
title && /* @__PURE__ */ (0,
|
|
29062
|
-
item.description && /* @__PURE__ */ (0,
|
|
29151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
29152
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "ods-toast__icon", "aria-hidden": "true", children: item.icon ?? defaultIcons[item.variant] }),
|
|
29153
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "ods-toast__body", children: [
|
|
29154
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "ods-toast__title", children: title }),
|
|
29155
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "ods-toast__desc", children: item.description })
|
|
29063
29156
|
] }),
|
|
29064
|
-
(item.actionLabel || item.action) && /* @__PURE__ */ (0,
|
|
29157
|
+
(item.actionLabel || item.action) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "ods-toast__action", children: item.actionLabel ? (
|
|
29065
29158
|
// First-class action chip — consistent styling, auto-dismiss
|
|
29066
29159
|
// after the consumer's onAction runs. This is the path most
|
|
29067
29160
|
// consumers should use ("Undo", "Retry", "View").
|
|
29068
|
-
/* @__PURE__ */ (0,
|
|
29161
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29069
29162
|
"button",
|
|
29070
29163
|
{
|
|
29071
29164
|
type: "button",
|
|
@@ -29084,7 +29177,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
29084
29177
|
// (including any explicit dismiss() they want to call).
|
|
29085
29178
|
item.action
|
|
29086
29179
|
) }),
|
|
29087
|
-
item.closeable && /* @__PURE__ */ (0,
|
|
29180
|
+
item.closeable && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29088
29181
|
"button",
|
|
29089
29182
|
{
|
|
29090
29183
|
type: "button",
|
|
@@ -29094,7 +29187,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
29094
29187
|
e.stopPropagation();
|
|
29095
29188
|
dismiss();
|
|
29096
29189
|
},
|
|
29097
|
-
children: /* @__PURE__ */ (0,
|
|
29190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29098
29191
|
"path",
|
|
29099
29192
|
{
|
|
29100
29193
|
d: "M3 3l8 8M11 3l-8 8",
|
|
@@ -29127,7 +29220,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29127
29220
|
}
|
|
29128
29221
|
return { y: maxStack * 10 * dir, scale: 1 - maxStack * 0.05, opacity: 0 };
|
|
29129
29222
|
};
|
|
29130
|
-
return /* @__PURE__ */ (0,
|
|
29223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
29131
29224
|
"div",
|
|
29132
29225
|
{
|
|
29133
29226
|
className: cn(
|
|
@@ -29140,7 +29233,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29140
29233
|
onMouseLeave: () => setHovered(false),
|
|
29141
29234
|
"aria-live": "polite",
|
|
29142
29235
|
children: [
|
|
29143
|
-
/* @__PURE__ */ (0,
|
|
29236
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29144
29237
|
"div",
|
|
29145
29238
|
{
|
|
29146
29239
|
className: cn("ods-toast-stack__scroll", expanded && "ods-toast-stack__scroll--expanded"),
|
|
@@ -29150,9 +29243,9 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29150
29243
|
setPinned((p) => !p);
|
|
29151
29244
|
}
|
|
29152
29245
|
},
|
|
29153
|
-
children: /* @__PURE__ */ (0,
|
|
29246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_framer_motion36.AnimatePresence, { mode: "popLayout", children: ordered.map((item, idx) => {
|
|
29154
29247
|
const s = stackedStyle(idx);
|
|
29155
|
-
return /* @__PURE__ */ (0,
|
|
29248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29156
29249
|
import_framer_motion36.motion.div,
|
|
29157
29250
|
{
|
|
29158
29251
|
layout: true,
|
|
@@ -29175,14 +29268,14 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
29175
29268
|
setPinned(true);
|
|
29176
29269
|
}
|
|
29177
29270
|
},
|
|
29178
|
-
children: /* @__PURE__ */ (0,
|
|
29271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ToastBody, { item, onDismiss })
|
|
29179
29272
|
},
|
|
29180
29273
|
item.id
|
|
29181
29274
|
);
|
|
29182
29275
|
}) })
|
|
29183
29276
|
}
|
|
29184
29277
|
),
|
|
29185
|
-
expanded && items.length > 1 && pinned && /* @__PURE__ */ (0,
|
|
29278
|
+
expanded && items.length > 1 && pinned && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29186
29279
|
"button",
|
|
29187
29280
|
{
|
|
29188
29281
|
type: "button",
|
|
@@ -29275,10 +29368,10 @@ function ToastProvider({
|
|
|
29275
29368
|
return out;
|
|
29276
29369
|
}, [toasts]);
|
|
29277
29370
|
const ctx = { toast, dismiss, dismissAll };
|
|
29278
|
-
const containers = /* @__PURE__ */ (0,
|
|
29371
|
+
const containers = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children: POSITIONS.map((pos) => {
|
|
29279
29372
|
const list = groups[pos];
|
|
29280
29373
|
if (list.length === 0) return null;
|
|
29281
|
-
return /* @__PURE__ */ (0,
|
|
29374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
29282
29375
|
PositionStack,
|
|
29283
29376
|
{
|
|
29284
29377
|
items: list,
|
|
@@ -29289,7 +29382,7 @@ function ToastProvider({
|
|
|
29289
29382
|
pos
|
|
29290
29383
|
);
|
|
29291
29384
|
}) });
|
|
29292
|
-
return /* @__PURE__ */ (0,
|
|
29385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(ToastContext.Provider, { value: ctx, children: [
|
|
29293
29386
|
children,
|
|
29294
29387
|
typeof document !== "undefined" && (0, import_react_dom19.createPortal)(containers, document.body)
|
|
29295
29388
|
] });
|
|
@@ -29310,7 +29403,7 @@ function useToast() {
|
|
|
29310
29403
|
|
|
29311
29404
|
// src/components/Toggle/Toggle.tsx
|
|
29312
29405
|
var import_react156 = require("react");
|
|
29313
|
-
var
|
|
29406
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
29314
29407
|
function Toggle({
|
|
29315
29408
|
label,
|
|
29316
29409
|
options,
|
|
@@ -29391,7 +29484,7 @@ function Toggle({
|
|
|
29391
29484
|
);
|
|
29392
29485
|
const selectedIdx = options.findIndex((o) => o.value === value);
|
|
29393
29486
|
const fallbackTabIdx = selectedIdx >= 0 ? selectedIdx : findNextEnabled(-1, 1);
|
|
29394
|
-
return /* @__PURE__ */ (0,
|
|
29487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
29395
29488
|
"div",
|
|
29396
29489
|
{
|
|
29397
29490
|
...rest,
|
|
@@ -29403,8 +29496,8 @@ function Toggle({
|
|
|
29403
29496
|
className
|
|
29404
29497
|
),
|
|
29405
29498
|
children: [
|
|
29406
|
-
label && /* @__PURE__ */ (0,
|
|
29407
|
-
/* @__PURE__ */ (0,
|
|
29499
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { id: labelId, className: "ods-toggle-field__label", children: label }),
|
|
29500
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
29408
29501
|
"div",
|
|
29409
29502
|
{
|
|
29410
29503
|
role: "radiogroup",
|
|
@@ -29421,7 +29514,7 @@ function Toggle({
|
|
|
29421
29514
|
children: options.map((opt, i) => {
|
|
29422
29515
|
const active = opt.value === value;
|
|
29423
29516
|
const isDisabled = disabled || opt.disabled;
|
|
29424
|
-
return /* @__PURE__ */ (0,
|
|
29517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
29425
29518
|
"button",
|
|
29426
29519
|
{
|
|
29427
29520
|
ref: (el) => {
|
|
@@ -29439,8 +29532,8 @@ function Toggle({
|
|
|
29439
29532
|
active && "ods-toggle__opt--active"
|
|
29440
29533
|
),
|
|
29441
29534
|
children: [
|
|
29442
|
-
opt.icon && /* @__PURE__ */ (0,
|
|
29443
|
-
/* @__PURE__ */ (0,
|
|
29535
|
+
opt.icon && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "ods-toggle__icon", "aria-hidden": "true", children: opt.icon }),
|
|
29536
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "ods-toggle__label", children: opt.label })
|
|
29444
29537
|
]
|
|
29445
29538
|
},
|
|
29446
29539
|
opt.value
|
|
@@ -29448,7 +29541,7 @@ function Toggle({
|
|
|
29448
29541
|
})
|
|
29449
29542
|
}
|
|
29450
29543
|
),
|
|
29451
|
-
error ? /* @__PURE__ */ (0,
|
|
29544
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
29452
29545
|
"div",
|
|
29453
29546
|
{
|
|
29454
29547
|
id: hintId,
|
|
@@ -29456,7 +29549,7 @@ function Toggle({
|
|
|
29456
29549
|
role: "alert",
|
|
29457
29550
|
children: error
|
|
29458
29551
|
}
|
|
29459
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
29552
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { id: hintId, className: "ods-toggle-field__hint", children: helperText }) : null
|
|
29460
29553
|
]
|
|
29461
29554
|
}
|
|
29462
29555
|
);
|
|
@@ -29464,9 +29557,9 @@ function Toggle({
|
|
|
29464
29557
|
Toggle.displayName = "Toggle";
|
|
29465
29558
|
|
|
29466
29559
|
// src/components/Toolbar/Toolbar.tsx
|
|
29467
|
-
var
|
|
29560
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
29468
29561
|
function Toolbar({ children, className }) {
|
|
29469
|
-
return /* @__PURE__ */ (0,
|
|
29562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { role: "toolbar", className: cn("ods-toolbar", className), children });
|
|
29470
29563
|
}
|
|
29471
29564
|
function ToolbarButton({
|
|
29472
29565
|
icon,
|
|
@@ -29478,7 +29571,7 @@ function ToolbarButton({
|
|
|
29478
29571
|
className,
|
|
29479
29572
|
children
|
|
29480
29573
|
}) {
|
|
29481
|
-
return /* @__PURE__ */ (0,
|
|
29574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
29482
29575
|
"button",
|
|
29483
29576
|
{
|
|
29484
29577
|
type: "button",
|
|
@@ -29488,33 +29581,33 @@ function ToolbarButton({
|
|
|
29488
29581
|
"aria-pressed": active,
|
|
29489
29582
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
29490
29583
|
children: [
|
|
29491
|
-
icon && /* @__PURE__ */ (0,
|
|
29492
|
-
label && /* @__PURE__ */ (0,
|
|
29584
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "ods-toolbar__btn-icon", "aria-hidden": "true", children: icon }),
|
|
29585
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "ods-toolbar__btn-label", children: label }),
|
|
29493
29586
|
children
|
|
29494
29587
|
]
|
|
29495
29588
|
}
|
|
29496
29589
|
);
|
|
29497
29590
|
}
|
|
29498
29591
|
function ToolbarDivider() {
|
|
29499
|
-
return /* @__PURE__ */ (0,
|
|
29592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "ods-toolbar__divider", "aria-hidden": "true" });
|
|
29500
29593
|
}
|
|
29501
29594
|
function ToolbarSpacer() {
|
|
29502
|
-
return /* @__PURE__ */ (0,
|
|
29595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "ods-toolbar__spacer" });
|
|
29503
29596
|
}
|
|
29504
29597
|
|
|
29505
29598
|
// src/components/ToolCard/ToolCard.tsx
|
|
29506
29599
|
var import_react157 = require("react");
|
|
29507
29600
|
var import_icons46 = require("@octaviaflow/icons");
|
|
29508
|
-
var
|
|
29601
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
29509
29602
|
var CATEGORY_GLYPH = {
|
|
29510
|
-
search: /* @__PURE__ */ (0,
|
|
29511
|
-
database: /* @__PURE__ */ (0,
|
|
29512
|
-
web: /* @__PURE__ */ (0,
|
|
29513
|
-
code: /* @__PURE__ */ (0,
|
|
29514
|
-
file: /* @__PURE__ */ (0,
|
|
29515
|
-
api: /* @__PURE__ */ (0,
|
|
29516
|
-
ai: /* @__PURE__ */ (0,
|
|
29517
|
-
custom: /* @__PURE__ */ (0,
|
|
29603
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.SearchIcon, { size: "xs" }),
|
|
29604
|
+
database: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.DataBaseIcon, { size: "xs" }),
|
|
29605
|
+
web: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.GlobeIcon, { size: "xs" }),
|
|
29606
|
+
code: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.CodeIcon, { size: "xs" }),
|
|
29607
|
+
file: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.DocumentIcon, { size: "xs" }),
|
|
29608
|
+
api: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.ApiIcon, { size: "xs" }),
|
|
29609
|
+
ai: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.MagicWandIcon, { size: "xs" }),
|
|
29610
|
+
custom: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons46.ExtensionsIcon, { size: "xs" })
|
|
29518
29611
|
};
|
|
29519
29612
|
var ToolCard = (0, import_react157.forwardRef)(
|
|
29520
29613
|
function ToolCard2({
|
|
@@ -29552,7 +29645,7 @@ var ToolCard = (0, import_react157.forwardRef)(
|
|
|
29552
29645
|
}
|
|
29553
29646
|
};
|
|
29554
29647
|
const showSwitch = !hideToggle && onToggle !== void 0;
|
|
29555
|
-
return /* @__PURE__ */ (0,
|
|
29648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
29556
29649
|
"div",
|
|
29557
29650
|
{
|
|
29558
29651
|
...rest,
|
|
@@ -29575,7 +29668,7 @@ var ToolCard = (0, import_react157.forwardRef)(
|
|
|
29575
29668
|
"aria-label": ariaLabel,
|
|
29576
29669
|
"aria-describedby": descId,
|
|
29577
29670
|
children: [
|
|
29578
|
-
/* @__PURE__ */ (0,
|
|
29671
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
29579
29672
|
"span",
|
|
29580
29673
|
{
|
|
29581
29674
|
className: cn(
|
|
@@ -29586,15 +29679,15 @@ var ToolCard = (0, import_react157.forwardRef)(
|
|
|
29586
29679
|
children: icon ?? CATEGORY_GLYPH[category]
|
|
29587
29680
|
}
|
|
29588
29681
|
),
|
|
29589
|
-
/* @__PURE__ */ (0,
|
|
29590
|
-
/* @__PURE__ */ (0,
|
|
29591
|
-
/* @__PURE__ */ (0,
|
|
29592
|
-
isNew && /* @__PURE__ */ (0,
|
|
29593
|
-
badge && /* @__PURE__ */ (0,
|
|
29682
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ods-tool-card__body", children: [
|
|
29683
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ods-tool-card__head", children: [
|
|
29684
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { id: nameId, className: "ods-tool-card__name", children: name }),
|
|
29685
|
+
isNew && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "ods-tool-card__new", "aria-label": "New", children: "NEW" }),
|
|
29686
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "ods-tool-card__badge", children: badge })
|
|
29594
29687
|
] }),
|
|
29595
|
-
description && /* @__PURE__ */ (0,
|
|
29688
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { id: descId, className: "ods-tool-card__desc", children: description })
|
|
29596
29689
|
] }),
|
|
29597
|
-
showSwitch && /* @__PURE__ */ (0,
|
|
29690
|
+
showSwitch && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
29598
29691
|
"button",
|
|
29599
29692
|
{
|
|
29600
29693
|
type: "button",
|
|
@@ -29615,7 +29708,7 @@ var ToolCard = (0, import_react157.forwardRef)(
|
|
|
29615
29708
|
e.stopPropagation();
|
|
29616
29709
|
}
|
|
29617
29710
|
},
|
|
29618
|
-
children: /* @__PURE__ */ (0,
|
|
29711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "ods-tool-card__switch-thumb", "aria-hidden": "true" })
|
|
29619
29712
|
}
|
|
29620
29713
|
)
|
|
29621
29714
|
]
|
|
@@ -29626,7 +29719,7 @@ var ToolCard = (0, import_react157.forwardRef)(
|
|
|
29626
29719
|
ToolCard.displayName = "ToolCard";
|
|
29627
29720
|
|
|
29628
29721
|
// src/components/TopBar/TopBar.tsx
|
|
29629
|
-
var
|
|
29722
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
29630
29723
|
function TopBar({
|
|
29631
29724
|
brand,
|
|
29632
29725
|
workspaceSwitcher,
|
|
@@ -29646,32 +29739,32 @@ function TopBar({
|
|
|
29646
29739
|
const showDividerAfterBrand = hasBrandBlock && (hasWorkspace || hasCrumbs || hasTitle);
|
|
29647
29740
|
const showDividerAfterWorkspace = hasWorkspace && (hasCrumbs || hasTitle);
|
|
29648
29741
|
const BrandRoot = brand?.href ? "a" : "div";
|
|
29649
|
-
return /* @__PURE__ */ (0,
|
|
29650
|
-
/* @__PURE__ */ (0,
|
|
29651
|
-
brand && /* @__PURE__ */ (0,
|
|
29742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("header", { ...props, className: cn("ods-topbar", className), children: [
|
|
29743
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "ods-topbar__left", children: [
|
|
29744
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
29652
29745
|
BrandRoot,
|
|
29653
29746
|
{
|
|
29654
29747
|
href: brand.href,
|
|
29655
29748
|
className: cn("ods-topbar__brand", brand.href && "ods-topbar__brand--link"),
|
|
29656
29749
|
children: [
|
|
29657
|
-
brand.logo && /* @__PURE__ */ (0,
|
|
29658
|
-
/* @__PURE__ */ (0,
|
|
29750
|
+
brand.logo && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "ods-topbar__brand-mark", children: brand.logo }),
|
|
29751
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "ods-topbar__brand-name", children: brand.name })
|
|
29659
29752
|
]
|
|
29660
29753
|
}
|
|
29661
29754
|
),
|
|
29662
|
-
showDividerAfterBrand && /* @__PURE__ */ (0,
|
|
29663
|
-
workspaceSwitcher && /* @__PURE__ */ (0,
|
|
29664
|
-
showDividerAfterWorkspace && /* @__PURE__ */ (0,
|
|
29665
|
-
hasCrumbs && /* @__PURE__ */ (0,
|
|
29666
|
-
idx > 0 && /* @__PURE__ */ (0,
|
|
29667
|
-
crumb.href ? /* @__PURE__ */ (0,
|
|
29755
|
+
showDividerAfterBrand && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
29756
|
+
workspaceSwitcher && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "ods-topbar__workspace", children: workspaceSwitcher }),
|
|
29757
|
+
showDividerAfterWorkspace && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
29758
|
+
hasCrumbs && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("nav", { className: "ods-topbar__breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("ol", { children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("li", { className: "ods-topbar__crumb", children: [
|
|
29759
|
+
idx > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "ods-topbar__separator", "aria-hidden": "true", children: "/" }),
|
|
29760
|
+
crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("a", { href: crumb.href, children: crumb.label }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { "aria-current": idx === breadcrumbs.length - 1 ? "page" : void 0, children: crumb.label })
|
|
29668
29761
|
] }, idx)) }) }),
|
|
29669
|
-
hasTitle && /* @__PURE__ */ (0,
|
|
29762
|
+
hasTitle && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("h1", { className: "ods-topbar__title", children: title })
|
|
29670
29763
|
] }),
|
|
29671
|
-
children && /* @__PURE__ */ (0,
|
|
29672
|
-
/* @__PURE__ */ (0,
|
|
29673
|
-
onSearch && /* @__PURE__ */ (0,
|
|
29674
|
-
/* @__PURE__ */ (0,
|
|
29764
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "ods-topbar__center", children }),
|
|
29765
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "ods-topbar__right", children: [
|
|
29766
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "ods-topbar__search", children: [
|
|
29767
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
29675
29768
|
"svg",
|
|
29676
29769
|
{
|
|
29677
29770
|
className: "ods-topbar__search-icon",
|
|
@@ -29680,7 +29773,7 @@ function TopBar({
|
|
|
29680
29773
|
viewBox: "0 0 20 20",
|
|
29681
29774
|
fill: "currentColor",
|
|
29682
29775
|
"aria-hidden": "true",
|
|
29683
|
-
children: /* @__PURE__ */ (0,
|
|
29776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
29684
29777
|
"path",
|
|
29685
29778
|
{
|
|
29686
29779
|
fillRule: "evenodd",
|
|
@@ -29690,7 +29783,7 @@ function TopBar({
|
|
|
29690
29783
|
)
|
|
29691
29784
|
}
|
|
29692
29785
|
),
|
|
29693
|
-
/* @__PURE__ */ (0,
|
|
29786
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
29694
29787
|
"input",
|
|
29695
29788
|
{
|
|
29696
29789
|
type: "search",
|
|
@@ -29701,7 +29794,7 @@ function TopBar({
|
|
|
29701
29794
|
}
|
|
29702
29795
|
)
|
|
29703
29796
|
] }),
|
|
29704
|
-
actions && /* @__PURE__ */ (0,
|
|
29797
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "ods-topbar__actions", children: actions })
|
|
29705
29798
|
] })
|
|
29706
29799
|
] });
|
|
29707
29800
|
}
|
|
@@ -29710,13 +29803,13 @@ function TopBar({
|
|
|
29710
29803
|
var import_framer_motion37 = require("framer-motion");
|
|
29711
29804
|
var import_react158 = require("react");
|
|
29712
29805
|
var import_icons47 = require("@octaviaflow/icons");
|
|
29713
|
-
var
|
|
29806
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
29714
29807
|
var DEFAULT_KIND_GLYPH = {
|
|
29715
|
-
thought: /* @__PURE__ */ (0,
|
|
29716
|
-
tool: /* @__PURE__ */ (0,
|
|
29717
|
-
input: /* @__PURE__ */ (0,
|
|
29718
|
-
output: /* @__PURE__ */ (0,
|
|
29719
|
-
error: /* @__PURE__ */ (0,
|
|
29808
|
+
thought: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.IdeaIcon, { size: "xs" }),
|
|
29809
|
+
tool: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.BuildToolIcon, { size: "xs" }),
|
|
29810
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.ConnectionReceiveIcon, { size: "xs" }),
|
|
29811
|
+
output: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.ConnectionSendIcon, { size: "xs" }),
|
|
29812
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.WarningAltIcon, { size: "xs" })
|
|
29720
29813
|
};
|
|
29721
29814
|
var FALLBACK_GLYPH = DEFAULT_KIND_GLYPH.thought;
|
|
29722
29815
|
var TraceStep = (0, import_react158.forwardRef)(
|
|
@@ -29756,7 +29849,7 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29756
29849
|
onOpenChange?.(next);
|
|
29757
29850
|
}, [canExpand, open, isControlled, onOpenChange]);
|
|
29758
29851
|
const resolvedGlyph = icon ?? kindIcons?.[kind] ?? DEFAULT_KIND_GLYPH[kind] ?? FALLBACK_GLYPH;
|
|
29759
|
-
return /* @__PURE__ */ (0,
|
|
29852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
29760
29853
|
"div",
|
|
29761
29854
|
{
|
|
29762
29855
|
...rest,
|
|
@@ -29772,18 +29865,18 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29772
29865
|
className
|
|
29773
29866
|
),
|
|
29774
29867
|
children: [
|
|
29775
|
-
/* @__PURE__ */ (0,
|
|
29776
|
-
/* @__PURE__ */ (0,
|
|
29868
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "ods-trace-step__rail", "aria-hidden": "true", children: [
|
|
29869
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29777
29870
|
import_framer_motion37.motion.span,
|
|
29778
29871
|
{
|
|
29779
29872
|
className: "ods-trace-step__icon",
|
|
29780
29873
|
initial: disableAnimation ? false : { scale: 0.6, opacity: 0 },
|
|
29781
29874
|
animate: { scale: 1, opacity: 1 },
|
|
29782
29875
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
29783
|
-
children: status === "running" ? /* @__PURE__ */ (0,
|
|
29876
|
+
children: status === "running" ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "ods-trace-step__spin", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.CircleDashIcon, { size: "xs" }) }) : resolvedGlyph
|
|
29784
29877
|
}
|
|
29785
29878
|
),
|
|
29786
|
-
!isLast && /* @__PURE__ */ (0,
|
|
29879
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29787
29880
|
import_framer_motion37.motion.span,
|
|
29788
29881
|
{
|
|
29789
29882
|
className: "ods-trace-step__line",
|
|
@@ -29793,8 +29886,8 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29793
29886
|
}
|
|
29794
29887
|
)
|
|
29795
29888
|
] }),
|
|
29796
|
-
/* @__PURE__ */ (0,
|
|
29797
|
-
/* @__PURE__ */ (0,
|
|
29889
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "ods-trace-step__body", children: [
|
|
29890
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
29798
29891
|
"button",
|
|
29799
29892
|
{
|
|
29800
29893
|
id: headId,
|
|
@@ -29805,7 +29898,7 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29805
29898
|
"aria-controls": canExpand ? contentId : void 0,
|
|
29806
29899
|
disabled: !canExpand,
|
|
29807
29900
|
children: [
|
|
29808
|
-
index != null && /* @__PURE__ */ (0,
|
|
29901
|
+
index != null && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29809
29902
|
"span",
|
|
29810
29903
|
{
|
|
29811
29904
|
className: cn(
|
|
@@ -29815,32 +29908,32 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29815
29908
|
children: index
|
|
29816
29909
|
}
|
|
29817
29910
|
),
|
|
29818
|
-
/* @__PURE__ */ (0,
|
|
29819
|
-
tool && /* @__PURE__ */ (0,
|
|
29911
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "ods-trace-step__title", children: title }),
|
|
29912
|
+
tool && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
29820
29913
|
"span",
|
|
29821
29914
|
{
|
|
29822
29915
|
className: "ods-trace-step__tool",
|
|
29823
29916
|
title: tool,
|
|
29824
29917
|
"aria-label": `Tool: ${tool}`,
|
|
29825
29918
|
children: [
|
|
29826
|
-
/* @__PURE__ */ (0,
|
|
29919
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "ods-trace-step__tool-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.BuildToolIcon, { size: "xs" }) }),
|
|
29827
29920
|
tool
|
|
29828
29921
|
]
|
|
29829
29922
|
}
|
|
29830
29923
|
),
|
|
29831
|
-
/* @__PURE__ */ (0,
|
|
29832
|
-
tokens != null && /* @__PURE__ */ (0,
|
|
29924
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "ods-trace-step__meta", children: [
|
|
29925
|
+
tokens != null && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
29833
29926
|
"span",
|
|
29834
29927
|
{
|
|
29835
29928
|
className: "ods-trace-step__tokens",
|
|
29836
29929
|
"aria-label": `${tokens} tokens`,
|
|
29837
29930
|
children: [
|
|
29838
|
-
/* @__PURE__ */ (0,
|
|
29931
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { children: tokens.toLocaleString() }),
|
|
29839
29932
|
" tok"
|
|
29840
29933
|
]
|
|
29841
29934
|
}
|
|
29842
29935
|
),
|
|
29843
|
-
duration && /* @__PURE__ */ (0,
|
|
29936
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29844
29937
|
"span",
|
|
29845
29938
|
{
|
|
29846
29939
|
className: "ods-trace-step__duration",
|
|
@@ -29849,20 +29942,20 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29849
29942
|
}
|
|
29850
29943
|
)
|
|
29851
29944
|
] }),
|
|
29852
|
-
canExpand && /* @__PURE__ */ (0,
|
|
29945
|
+
canExpand && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29853
29946
|
import_framer_motion37.motion.span,
|
|
29854
29947
|
{
|
|
29855
29948
|
className: "ods-trace-step__chev",
|
|
29856
29949
|
"aria-hidden": "true",
|
|
29857
29950
|
animate: { rotate: open ? 180 : 0 },
|
|
29858
29951
|
transition: { duration: 0.18, ease: [0.16, 1, 0.3, 1] },
|
|
29859
|
-
children: /* @__PURE__ */ (0,
|
|
29952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons47.CaretDownIcon, { size: "xs" })
|
|
29860
29953
|
}
|
|
29861
29954
|
)
|
|
29862
29955
|
]
|
|
29863
29956
|
}
|
|
29864
29957
|
),
|
|
29865
|
-
/* @__PURE__ */ (0,
|
|
29958
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_framer_motion37.AnimatePresence, { initial: false, children: canExpand && open && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
29866
29959
|
import_framer_motion37.motion.div,
|
|
29867
29960
|
{
|
|
29868
29961
|
id: contentId,
|
|
@@ -29874,7 +29967,7 @@ var TraceStep = (0, import_react158.forwardRef)(
|
|
|
29874
29967
|
exit: disableAnimation ? void 0 : { height: 0, opacity: 0 },
|
|
29875
29968
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
29876
29969
|
style: { overflow: "hidden" },
|
|
29877
|
-
children: /* @__PURE__ */ (0,
|
|
29970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "ods-trace-step__content-inner", children })
|
|
29878
29971
|
},
|
|
29879
29972
|
"content"
|
|
29880
29973
|
) })
|
|
@@ -29890,7 +29983,7 @@ TraceStep.displayName = "TraceStep";
|
|
|
29890
29983
|
var import_icons48 = require("@octaviaflow/icons");
|
|
29891
29984
|
var import_framer_motion38 = require("framer-motion");
|
|
29892
29985
|
var import_react159 = require("react");
|
|
29893
|
-
var
|
|
29986
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
29894
29987
|
function buildVisibleList(nodes, expanded, out = [], level = 0, parentId = null) {
|
|
29895
29988
|
for (const n of nodes) {
|
|
29896
29989
|
out.push({ node: n, level, parentId });
|
|
@@ -30053,7 +30146,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30053
30146
|
const myIdx = visibleIdx.value;
|
|
30054
30147
|
visibleIdx.value += 1;
|
|
30055
30148
|
const showLoadingChild = isExpanded && isLoading && !kids;
|
|
30056
|
-
return /* @__PURE__ */ (0,
|
|
30149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
30057
30150
|
"li",
|
|
30058
30151
|
{
|
|
30059
30152
|
id: `${baseId}-node-${node.id}`,
|
|
@@ -30073,7 +30166,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30073
30166
|
handleKeyDown(e, myIdx);
|
|
30074
30167
|
},
|
|
30075
30168
|
children: [
|
|
30076
|
-
/* @__PURE__ */ (0,
|
|
30169
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
30077
30170
|
"div",
|
|
30078
30171
|
{
|
|
30079
30172
|
className: "ods-tree__row",
|
|
@@ -30086,7 +30179,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30086
30179
|
handleSelect(node);
|
|
30087
30180
|
},
|
|
30088
30181
|
children: [
|
|
30089
|
-
/* @__PURE__ */ (0,
|
|
30182
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30090
30183
|
"button",
|
|
30091
30184
|
{
|
|
30092
30185
|
type: "button",
|
|
@@ -30101,12 +30194,12 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30101
30194
|
e.stopPropagation();
|
|
30102
30195
|
if (isBranch && !node.disabled) void toggleExpand(node);
|
|
30103
30196
|
},
|
|
30104
|
-
children: isBranch && /* @__PURE__ */ (0,
|
|
30197
|
+
children: isBranch && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons48.ChevronRightIcon, { size: "xs", "aria-hidden": true })
|
|
30105
30198
|
}
|
|
30106
30199
|
),
|
|
30107
|
-
(node.icon || node.iconExpanded) && /* @__PURE__ */ (0,
|
|
30108
|
-
/* @__PURE__ */ (0,
|
|
30109
|
-
node.trailing && /* @__PURE__ */ (0,
|
|
30200
|
+
(node.icon || node.iconExpanded) && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "ods-tree__icon", "aria-hidden": "true", children: isExpanded && node.iconExpanded ? node.iconExpanded : node.icon }),
|
|
30201
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "ods-tree__label", children: node.label }),
|
|
30202
|
+
node.trailing && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30110
30203
|
"span",
|
|
30111
30204
|
{
|
|
30112
30205
|
className: "ods-tree__trailing",
|
|
@@ -30117,7 +30210,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30117
30210
|
]
|
|
30118
30211
|
}
|
|
30119
30212
|
),
|
|
30120
|
-
isBranch && isExpanded && /* @__PURE__ */ (0,
|
|
30213
|
+
isBranch && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30121
30214
|
import_framer_motion38.motion.ul,
|
|
30122
30215
|
{
|
|
30123
30216
|
role: "group",
|
|
@@ -30125,7 +30218,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30125
30218
|
initial: reducedMotion ? false : { height: 0, opacity: 0 },
|
|
30126
30219
|
animate: reducedMotion ? void 0 : { height: "auto", opacity: 1 },
|
|
30127
30220
|
transition: reducedMotion ? { duration: 0 } : { duration: 0.14 },
|
|
30128
|
-
children: showLoadingChild ? /* @__PURE__ */ (0,
|
|
30221
|
+
children: showLoadingChild ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30129
30222
|
"li",
|
|
30130
30223
|
{
|
|
30131
30224
|
className: "ods-tree__loading",
|
|
@@ -30137,7 +30230,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30137
30230
|
"aria-busy": "true",
|
|
30138
30231
|
children: "Loading\u2026"
|
|
30139
30232
|
}
|
|
30140
|
-
) : kids && kids.length > 0 ? kids.map((c) => renderNode(c, level + 1, visibleIdx)) : /* @__PURE__ */ (0,
|
|
30233
|
+
) : kids && kids.length > 0 ? kids.map((c) => renderNode(c, level + 1, visibleIdx)) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30141
30234
|
"li",
|
|
30142
30235
|
{
|
|
30143
30236
|
className: "ods-tree__empty",
|
|
@@ -30159,7 +30252,7 @@ var TreeView = (0, import_react159.forwardRef)(
|
|
|
30159
30252
|
const visibleIdxCursor = { value: 0 };
|
|
30160
30253
|
(0, import_react159.useEffect)(() => {
|
|
30161
30254
|
}, [tabStopId]);
|
|
30162
|
-
return /* @__PURE__ */ (0,
|
|
30255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30163
30256
|
"ul",
|
|
30164
30257
|
{
|
|
30165
30258
|
...rest,
|
|
@@ -30183,7 +30276,7 @@ TreeView.displayName = "TreeView";
|
|
|
30183
30276
|
|
|
30184
30277
|
// src/components/UserCard/UserCard.tsx
|
|
30185
30278
|
var import_react160 = require("react");
|
|
30186
|
-
var
|
|
30279
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
30187
30280
|
var UserCard = (0, import_react160.forwardRef)(
|
|
30188
30281
|
function UserCard2({
|
|
30189
30282
|
name,
|
|
@@ -30211,7 +30304,7 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30211
30304
|
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
30212
30305
|
const renderAvatar = () => {
|
|
30213
30306
|
if (avatarNode) {
|
|
30214
|
-
return /* @__PURE__ */ (0,
|
|
30307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30215
30308
|
"span",
|
|
30216
30309
|
{
|
|
30217
30310
|
className: "ods-user-card__avatar ods-user-card__avatar--legacy",
|
|
@@ -30221,7 +30314,7 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30221
30314
|
);
|
|
30222
30315
|
}
|
|
30223
30316
|
const derivedInitials = avatar?.initials ?? (typeof initial === "string" ? initial : typeof name === "string" ? name.charAt(0).toUpperCase() : void 0);
|
|
30224
|
-
return /* @__PURE__ */ (0,
|
|
30317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30225
30318
|
Avatar,
|
|
30226
30319
|
{
|
|
30227
30320
|
size: orientation === "horizontal" ? "md" : "lg",
|
|
@@ -30233,10 +30326,10 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30233
30326
|
}
|
|
30234
30327
|
);
|
|
30235
30328
|
};
|
|
30236
|
-
const body = /* @__PURE__ */ (0,
|
|
30329
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
30237
30330
|
renderAvatar(),
|
|
30238
|
-
/* @__PURE__ */ (0,
|
|
30239
|
-
/* @__PURE__ */ (0,
|
|
30331
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "ods-user-card__body", children: [
|
|
30332
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30240
30333
|
Card.Title,
|
|
30241
30334
|
{
|
|
30242
30335
|
as: nameAs,
|
|
@@ -30245,14 +30338,14 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30245
30338
|
children: name
|
|
30246
30339
|
}
|
|
30247
30340
|
),
|
|
30248
|
-
role && /* @__PURE__ */ (0,
|
|
30249
|
-
meta && /* @__PURE__ */ (0,
|
|
30341
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__role", children: role }),
|
|
30342
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__meta", children: meta })
|
|
30250
30343
|
] }),
|
|
30251
|
-
stats && stats.length > 0 && /* @__PURE__ */ (0,
|
|
30252
|
-
/* @__PURE__ */ (0,
|
|
30253
|
-
/* @__PURE__ */ (0,
|
|
30344
|
+
stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__stats", children: stats.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "ods-user-card__stat", children: [
|
|
30345
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__stat-value", children: s.value }),
|
|
30346
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__stat-label", children: s.label })
|
|
30254
30347
|
] }, i)) }),
|
|
30255
|
-
action && /* @__PURE__ */ (0,
|
|
30348
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "ods-user-card__action", children: action })
|
|
30256
30349
|
] });
|
|
30257
30350
|
const sharedClass = cn(
|
|
30258
30351
|
"ods-user-card",
|
|
@@ -30262,7 +30355,7 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30262
30355
|
className
|
|
30263
30356
|
);
|
|
30264
30357
|
if (href && !disabled) {
|
|
30265
|
-
return /* @__PURE__ */ (0,
|
|
30358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30266
30359
|
Card,
|
|
30267
30360
|
{
|
|
30268
30361
|
asChild: true,
|
|
@@ -30270,7 +30363,7 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30270
30363
|
padding: "none",
|
|
30271
30364
|
className: sharedClass,
|
|
30272
30365
|
"aria-labelledby": nameId,
|
|
30273
|
-
children: /* @__PURE__ */ (0,
|
|
30366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30274
30367
|
"a",
|
|
30275
30368
|
{
|
|
30276
30369
|
...rest,
|
|
@@ -30284,7 +30377,7 @@ var UserCard = (0, import_react160.forwardRef)(
|
|
|
30284
30377
|
}
|
|
30285
30378
|
);
|
|
30286
30379
|
}
|
|
30287
|
-
return /* @__PURE__ */ (0,
|
|
30380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30288
30381
|
Card,
|
|
30289
30382
|
{
|
|
30290
30383
|
...rest,
|
|
@@ -31339,7 +31432,7 @@ function findContainingGroup(point, nodes, exclude = []) {
|
|
|
31339
31432
|
|
|
31340
31433
|
// src/workflow/components/FlowEdge/FlowEdge.tsx
|
|
31341
31434
|
var import_react162 = require("react");
|
|
31342
|
-
var
|
|
31435
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
31343
31436
|
function FlowEdgeImpl({
|
|
31344
31437
|
edge,
|
|
31345
31438
|
nodes,
|
|
@@ -31413,7 +31506,7 @@ function FlowEdgeImpl({
|
|
|
31413
31506
|
setDraftLabel(edge.label ?? "");
|
|
31414
31507
|
}
|
|
31415
31508
|
};
|
|
31416
|
-
return /* @__PURE__ */ (0,
|
|
31509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
31417
31510
|
"g",
|
|
31418
31511
|
{
|
|
31419
31512
|
className: cn(
|
|
@@ -31439,7 +31532,7 @@ function FlowEdgeImpl({
|
|
|
31439
31532
|
setEditing(true);
|
|
31440
31533
|
},
|
|
31441
31534
|
children: [
|
|
31442
|
-
/* @__PURE__ */ (0,
|
|
31535
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31443
31536
|
"marker",
|
|
31444
31537
|
{
|
|
31445
31538
|
id: markerId,
|
|
@@ -31449,11 +31542,11 @@ function FlowEdgeImpl({
|
|
|
31449
31542
|
markerWidth: "7",
|
|
31450
31543
|
markerHeight: "7",
|
|
31451
31544
|
orient: "auto-start-reverse",
|
|
31452
|
-
children: /* @__PURE__ */ (0,
|
|
31545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("path", { d: "M0 0L10 5L0 10z", fill: stroke })
|
|
31453
31546
|
}
|
|
31454
31547
|
) }),
|
|
31455
|
-
/* @__PURE__ */ (0,
|
|
31456
|
-
/* @__PURE__ */ (0,
|
|
31548
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("path", { d: hitD, stroke: "transparent", strokeWidth: 20, fill: "none" }),
|
|
31549
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31457
31550
|
"path",
|
|
31458
31551
|
{
|
|
31459
31552
|
d,
|
|
@@ -31468,7 +31561,7 @@ function FlowEdgeImpl({
|
|
|
31468
31561
|
} : void 0
|
|
31469
31562
|
}
|
|
31470
31563
|
),
|
|
31471
|
-
showChrome && /* @__PURE__ */ (0,
|
|
31564
|
+
showChrome && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31472
31565
|
"foreignObject",
|
|
31473
31566
|
{
|
|
31474
31567
|
x: midX - 140,
|
|
@@ -31476,8 +31569,8 @@ function FlowEdgeImpl({
|
|
|
31476
31569
|
width: 280,
|
|
31477
31570
|
height: 32,
|
|
31478
31571
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
31479
|
-
children: /* @__PURE__ */ (0,
|
|
31480
|
-
(label || editing) && (editing ? /* @__PURE__ */ (0,
|
|
31572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "ods-flow-edge-v2__chrome", children: [
|
|
31573
|
+
(label || editing) && (editing ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31481
31574
|
"input",
|
|
31482
31575
|
{
|
|
31483
31576
|
ref: inputRef,
|
|
@@ -31491,7 +31584,7 @@ function FlowEdgeImpl({
|
|
|
31491
31584
|
onMouseDown: (e) => e.stopPropagation(),
|
|
31492
31585
|
"aria-label": "Edit edge label"
|
|
31493
31586
|
}
|
|
31494
|
-
) : /* @__PURE__ */ (0,
|
|
31587
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31495
31588
|
"button",
|
|
31496
31589
|
{
|
|
31497
31590
|
type: "button",
|
|
@@ -31508,10 +31601,10 @@ function FlowEdgeImpl({
|
|
|
31508
31601
|
},
|
|
31509
31602
|
title: onLabelChange ? "Double-click to edit" : void 0,
|
|
31510
31603
|
tabIndex: onLabelChange ? 0 : -1,
|
|
31511
|
-
children: /* @__PURE__ */ (0,
|
|
31604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: label })
|
|
31512
31605
|
}
|
|
31513
31606
|
)),
|
|
31514
|
-
hasDelete && /* @__PURE__ */ (0,
|
|
31607
|
+
hasDelete && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31515
31608
|
"button",
|
|
31516
31609
|
{
|
|
31517
31610
|
type: "button",
|
|
@@ -31521,7 +31614,7 @@ function FlowEdgeImpl({
|
|
|
31521
31614
|
onDelete?.(edge.id);
|
|
31522
31615
|
},
|
|
31523
31616
|
"aria-label": "Delete edge",
|
|
31524
|
-
children: /* @__PURE__ */ (0,
|
|
31617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
31525
31618
|
"path",
|
|
31526
31619
|
{
|
|
31527
31620
|
d: "M2 2l6 6M8 2l-6 6",
|
|
@@ -31604,7 +31697,7 @@ function useFlowNodeContext() {
|
|
|
31604
31697
|
}
|
|
31605
31698
|
|
|
31606
31699
|
// src/workflow/components/FlowNode/FlowNode.tsx
|
|
31607
|
-
var
|
|
31700
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
31608
31701
|
function FlowNode3({
|
|
31609
31702
|
node,
|
|
31610
31703
|
selected,
|
|
@@ -31663,7 +31756,7 @@ function FlowNode3({
|
|
|
31663
31756
|
bridge.selectNode(node.id, e.metaKey || e.ctrlKey || e.shiftKey);
|
|
31664
31757
|
bridge.notifyNodeClick(node.id);
|
|
31665
31758
|
};
|
|
31666
|
-
return /* @__PURE__ */ (0,
|
|
31759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
31667
31760
|
"div",
|
|
31668
31761
|
{
|
|
31669
31762
|
ref: wrapperRef,
|
|
@@ -31692,7 +31785,7 @@ function FlowNode3({
|
|
|
31692
31785
|
onPointerDown: handlePointerDown,
|
|
31693
31786
|
onPointerMove: handlePointerMove,
|
|
31694
31787
|
onClick: handleClick,
|
|
31695
|
-
children: /* @__PURE__ */ (0,
|
|
31788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(FlowNodeContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Kind, { node, selected, dragging, isConnecting }) })
|
|
31696
31789
|
}
|
|
31697
31790
|
);
|
|
31698
31791
|
}
|
|
@@ -31704,7 +31797,7 @@ function buildNodeKindRegistry(defaults, overrides) {
|
|
|
31704
31797
|
|
|
31705
31798
|
// src/workflow/components/Handle/Handle.tsx
|
|
31706
31799
|
var import_react166 = require("react");
|
|
31707
|
-
var
|
|
31800
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
31708
31801
|
var DEFAULT_HANDLE_ID = "default";
|
|
31709
31802
|
function Handle({
|
|
31710
31803
|
type,
|
|
@@ -31754,7 +31847,7 @@ function Handle({
|
|
|
31754
31847
|
clientY: e.clientY
|
|
31755
31848
|
});
|
|
31756
31849
|
};
|
|
31757
|
-
return /* @__PURE__ */ (0,
|
|
31850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
31758
31851
|
"div",
|
|
31759
31852
|
{
|
|
31760
31853
|
ref,
|
|
@@ -31776,8 +31869,8 @@ function Handle({
|
|
|
31776
31869
|
},
|
|
31777
31870
|
onPointerDown: handlePointerDown,
|
|
31778
31871
|
children: [
|
|
31779
|
-
/* @__PURE__ */ (0,
|
|
31780
|
-
label && /* @__PURE__ */ (0,
|
|
31872
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "ods-flow-handle__dot" }),
|
|
31873
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "ods-flow-handle__label", children: label })
|
|
31781
31874
|
]
|
|
31782
31875
|
}
|
|
31783
31876
|
);
|
|
@@ -31798,7 +31891,7 @@ function handleSideStyle(side, index, total) {
|
|
|
31798
31891
|
|
|
31799
31892
|
// src/workflow/components/NodeResizer/NodeResizer.tsx
|
|
31800
31893
|
var import_react167 = require("react");
|
|
31801
|
-
var
|
|
31894
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
31802
31895
|
function NodeResizer({
|
|
31803
31896
|
isVisible,
|
|
31804
31897
|
minWidth = 80,
|
|
@@ -31917,7 +32010,7 @@ function NodeResizer({
|
|
|
31917
32010
|
return { ...base, top: "100%", left: "100%" };
|
|
31918
32011
|
}
|
|
31919
32012
|
};
|
|
31920
|
-
return /* @__PURE__ */ (0,
|
|
32013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: cn("ods-node-resizer"), "data-flow-no-drag": "true", children: ["nw", "ne", "sw", "se"].map((corner) => /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
31921
32014
|
"div",
|
|
31922
32015
|
{
|
|
31923
32016
|
style: handleStyle(corner),
|
|
@@ -31944,7 +32037,7 @@ function cursorFor(corner) {
|
|
|
31944
32037
|
// src/workflow/components/kinds/BaseNode.tsx
|
|
31945
32038
|
var import_icons49 = require("@octaviaflow/icons");
|
|
31946
32039
|
var import_react168 = require("react");
|
|
31947
|
-
var
|
|
32040
|
+
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
31948
32041
|
function BaseNode({
|
|
31949
32042
|
kind,
|
|
31950
32043
|
kindIcon,
|
|
@@ -31963,7 +32056,7 @@ function BaseNode({
|
|
|
31963
32056
|
const ctx = (0, import_react168.useContext)(FlowNodeContext);
|
|
31964
32057
|
const bridge = (0, import_react168.useContext)(FlowNodeBridgeContext);
|
|
31965
32058
|
const deleteHandler = onDelete === false ? void 0 : onDelete ?? (ctx && bridge ? () => bridge.deleteNode(ctx.id) : void 0);
|
|
31966
|
-
return /* @__PURE__ */ (0,
|
|
32059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
31967
32060
|
"div",
|
|
31968
32061
|
{
|
|
31969
32062
|
className: cn(
|
|
@@ -31973,31 +32066,31 @@ function BaseNode({
|
|
|
31973
32066
|
className
|
|
31974
32067
|
),
|
|
31975
32068
|
children: [
|
|
31976
|
-
/* @__PURE__ */ (0,
|
|
31977
|
-
kindIcon && /* @__PURE__ */ (0,
|
|
31978
|
-
/* @__PURE__ */ (0,
|
|
32069
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "ods-flow-base-node__pill", children: [
|
|
32070
|
+
kindIcon && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ods-flow-base-node__pill-icon", "aria-hidden": "true", children: kindIcon }),
|
|
32071
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ods-flow-base-node__pill-label", children: kind })
|
|
31979
32072
|
] }),
|
|
31980
|
-
status && status !== "idle" && /* @__PURE__ */ (0,
|
|
32073
|
+
status && status !== "idle" && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31981
32074
|
"span",
|
|
31982
32075
|
{
|
|
31983
32076
|
className: cn("ods-flow-base-node__status", `ods-flow-base-node__status--${status}`),
|
|
31984
32077
|
"aria-hidden": "true"
|
|
31985
32078
|
}
|
|
31986
32079
|
),
|
|
31987
|
-
/* @__PURE__ */ (0,
|
|
31988
|
-
/* @__PURE__ */ (0,
|
|
31989
|
-
/* @__PURE__ */ (0,
|
|
31990
|
-
/* @__PURE__ */ (0,
|
|
31991
|
-
/* @__PURE__ */ (0,
|
|
31992
|
-
(chip !== void 0 || description !== void 0 || valueChip !== void 0) && /* @__PURE__ */ (0,
|
|
31993
|
-
chip !== void 0 && /* @__PURE__ */ (0,
|
|
31994
|
-
description !== void 0 && /* @__PURE__ */ (0,
|
|
31995
|
-
valueChip !== void 0 && /* @__PURE__ */ (0,
|
|
32080
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "ods-flow-base-node__body", children: [
|
|
32081
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "ods-flow-base-node__content", children: [
|
|
32082
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: "ods-flow-base-node__bubble", "aria-hidden": "true", children: icon }),
|
|
32083
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "ods-flow-base-node__content-text", children: [
|
|
32084
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: "ods-flow-base-node__content-title", children: title }),
|
|
32085
|
+
(chip !== void 0 || description !== void 0 || valueChip !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "ods-flow-base-node__content-info", children: [
|
|
32086
|
+
chip !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ods-flow-base-node__chip", children: chip }),
|
|
32087
|
+
description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ods-flow-base-node__description", children: description }),
|
|
32088
|
+
valueChip !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ods-flow-base-node__value-chip", children: valueChip })
|
|
31996
32089
|
] })
|
|
31997
32090
|
] })
|
|
31998
32091
|
] }),
|
|
31999
|
-
footer && /* @__PURE__ */ (0,
|
|
32000
|
-
deleteHandler && /* @__PURE__ */ (0,
|
|
32092
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: "ods-flow-base-node__footer", children: footer }),
|
|
32093
|
+
deleteHandler && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
32001
32094
|
"button",
|
|
32002
32095
|
{
|
|
32003
32096
|
type: "button",
|
|
@@ -32009,7 +32102,7 @@ function BaseNode({
|
|
|
32009
32102
|
"aria-label": "Delete node",
|
|
32010
32103
|
"data-flow-no-drag": "true",
|
|
32011
32104
|
title: "Delete node",
|
|
32012
|
-
children: /* @__PURE__ */ (0,
|
|
32105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_icons49.TrashCanIcon, { size: 16, "aria-hidden": true })
|
|
32013
32106
|
}
|
|
32014
32107
|
)
|
|
32015
32108
|
] }),
|
|
@@ -32020,12 +32113,12 @@ function BaseNode({
|
|
|
32020
32113
|
}
|
|
32021
32114
|
|
|
32022
32115
|
// src/workflow/components/kinds/index.tsx
|
|
32023
|
-
var
|
|
32116
|
+
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
32024
32117
|
var ActionNode = ({
|
|
32025
32118
|
node
|
|
32026
32119
|
}) => {
|
|
32027
32120
|
const d = node.data ?? {};
|
|
32028
|
-
return /* @__PURE__ */ (0,
|
|
32121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32029
32122
|
BaseNode,
|
|
32030
32123
|
{
|
|
32031
32124
|
kind: d.kind ?? "ACTION",
|
|
@@ -32037,8 +32130,8 @@ var ActionNode = ({
|
|
|
32037
32130
|
status: d.status,
|
|
32038
32131
|
accent: "green",
|
|
32039
32132
|
children: [
|
|
32040
|
-
/* @__PURE__ */ (0,
|
|
32041
|
-
/* @__PURE__ */ (0,
|
|
32133
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32134
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32042
32135
|
]
|
|
32043
32136
|
}
|
|
32044
32137
|
);
|
|
@@ -32047,7 +32140,7 @@ var TriggerNode = ({
|
|
|
32047
32140
|
node
|
|
32048
32141
|
}) => {
|
|
32049
32142
|
const d = node.data ?? {};
|
|
32050
|
-
return /* @__PURE__ */ (0,
|
|
32143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32051
32144
|
BaseNode,
|
|
32052
32145
|
{
|
|
32053
32146
|
kind: d.kind ?? "TRIGGER",
|
|
@@ -32058,7 +32151,7 @@ var TriggerNode = ({
|
|
|
32058
32151
|
valueChip: d.valueChip,
|
|
32059
32152
|
status: d.status,
|
|
32060
32153
|
accent: "green",
|
|
32061
|
-
children: /* @__PURE__ */ (0,
|
|
32154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32062
32155
|
}
|
|
32063
32156
|
);
|
|
32064
32157
|
};
|
|
@@ -32070,7 +32163,7 @@ var ConditionNode = ({
|
|
|
32070
32163
|
{ id: "true", label: "true" },
|
|
32071
32164
|
{ id: "false", label: "false" }
|
|
32072
32165
|
];
|
|
32073
|
-
return /* @__PURE__ */ (0,
|
|
32166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32074
32167
|
BaseNode,
|
|
32075
32168
|
{
|
|
32076
32169
|
kind: d.kind ?? "CONDITION",
|
|
@@ -32082,8 +32175,8 @@ var ConditionNode = ({
|
|
|
32082
32175
|
status: d.status,
|
|
32083
32176
|
accent: "amber",
|
|
32084
32177
|
children: [
|
|
32085
|
-
/* @__PURE__ */ (0,
|
|
32086
|
-
branches.map((b, i) => /* @__PURE__ */ (0,
|
|
32178
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32179
|
+
branches.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32087
32180
|
Handle,
|
|
32088
32181
|
{
|
|
32089
32182
|
type: "source",
|
|
@@ -32111,7 +32204,7 @@ var GroupNode = ({
|
|
|
32111
32204
|
e.stopPropagation();
|
|
32112
32205
|
bridge.toggleNodeCollapse(node.id);
|
|
32113
32206
|
};
|
|
32114
|
-
return /* @__PURE__ */ (0,
|
|
32207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32115
32208
|
"div",
|
|
32116
32209
|
{
|
|
32117
32210
|
className: "ods-flow-group",
|
|
@@ -32122,9 +32215,9 @@ var GroupNode = ({
|
|
|
32122
32215
|
height: collapsed ? 36 : node.height ?? 200
|
|
32123
32216
|
},
|
|
32124
32217
|
children: [
|
|
32125
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
32126
|
-
/* @__PURE__ */ (0,
|
|
32127
|
-
/* @__PURE__ */ (0,
|
|
32218
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(NodeResizer, { minWidth: 240, minHeight: 120 }),
|
|
32219
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "ods-flow-group__header", "data-flow-no-drag": "false", children: [
|
|
32220
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32128
32221
|
"button",
|
|
32129
32222
|
{
|
|
32130
32223
|
type: "button",
|
|
@@ -32137,16 +32230,16 @@ var GroupNode = ({
|
|
|
32137
32230
|
children: collapsed ? "\u25B8" : "\u25BE"
|
|
32138
32231
|
}
|
|
32139
32232
|
),
|
|
32140
|
-
/* @__PURE__ */ (0,
|
|
32141
|
-
d.subtitle && /* @__PURE__ */ (0,
|
|
32142
|
-
disabled && /* @__PURE__ */ (0,
|
|
32143
|
-
collapsed && hiddenCount !== void 0 && hiddenCount > 0 && /* @__PURE__ */ (0,
|
|
32233
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "ods-flow-group__title", children: d.title ?? "Group" }),
|
|
32234
|
+
d.subtitle && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "ods-flow-group__subtitle", children: d.subtitle }),
|
|
32235
|
+
disabled && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "ods-flow-group__disabled-badge", "aria-label": "Disabled subflow", children: "Disabled" }),
|
|
32236
|
+
collapsed && hiddenCount !== void 0 && hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("span", { className: "ods-flow-group__count", "aria-label": `${hiddenCount} hidden steps`, children: [
|
|
32144
32237
|
hiddenCount,
|
|
32145
32238
|
" steps"
|
|
32146
32239
|
] })
|
|
32147
32240
|
] }),
|
|
32148
|
-
/* @__PURE__ */ (0,
|
|
32149
|
-
/* @__PURE__ */ (0,
|
|
32241
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top", id: "__group_in" }),
|
|
32242
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom", id: "__group_out" })
|
|
32150
32243
|
]
|
|
32151
32244
|
}
|
|
32152
32245
|
);
|
|
@@ -32159,7 +32252,7 @@ var ForEachNode = ({
|
|
|
32159
32252
|
{ id: "each", label: "Each" },
|
|
32160
32253
|
{ id: "done", label: "Done" }
|
|
32161
32254
|
];
|
|
32162
|
-
return /* @__PURE__ */ (0,
|
|
32255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32163
32256
|
BaseNode,
|
|
32164
32257
|
{
|
|
32165
32258
|
kind: d.kind ?? "FOR EACH",
|
|
@@ -32171,8 +32264,8 @@ var ForEachNode = ({
|
|
|
32171
32264
|
status: d.status,
|
|
32172
32265
|
accent: "amber",
|
|
32173
32266
|
children: [
|
|
32174
|
-
/* @__PURE__ */ (0,
|
|
32175
|
-
branches.map((b, i) => /* @__PURE__ */ (0,
|
|
32267
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32268
|
+
branches.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32176
32269
|
Handle,
|
|
32177
32270
|
{
|
|
32178
32271
|
type: "source",
|
|
@@ -32192,7 +32285,7 @@ var OutputNode = ({
|
|
|
32192
32285
|
node
|
|
32193
32286
|
}) => {
|
|
32194
32287
|
const d = node.data ?? {};
|
|
32195
|
-
return /* @__PURE__ */ (0,
|
|
32288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32196
32289
|
BaseNode,
|
|
32197
32290
|
{
|
|
32198
32291
|
kind: d.kind ?? "OUTPUT",
|
|
@@ -32202,7 +32295,7 @@ var OutputNode = ({
|
|
|
32202
32295
|
description: d.description ?? d.subtitle,
|
|
32203
32296
|
status: d.status,
|
|
32204
32297
|
accent: "green",
|
|
32205
|
-
children: /* @__PURE__ */ (0,
|
|
32298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" })
|
|
32206
32299
|
}
|
|
32207
32300
|
);
|
|
32208
32301
|
};
|
|
@@ -32210,7 +32303,7 @@ var ErrorNode = ({
|
|
|
32210
32303
|
node
|
|
32211
32304
|
}) => {
|
|
32212
32305
|
const d = node.data ?? {};
|
|
32213
|
-
return /* @__PURE__ */ (0,
|
|
32306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32214
32307
|
BaseNode,
|
|
32215
32308
|
{
|
|
32216
32309
|
kind: d.kind ?? "ERROR",
|
|
@@ -32221,8 +32314,8 @@ var ErrorNode = ({
|
|
|
32221
32314
|
status: d.status ?? "error",
|
|
32222
32315
|
accent: "red",
|
|
32223
32316
|
children: [
|
|
32224
|
-
/* @__PURE__ */ (0,
|
|
32225
|
-
/* @__PURE__ */ (0,
|
|
32317
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32318
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32226
32319
|
]
|
|
32227
32320
|
}
|
|
32228
32321
|
);
|
|
@@ -32233,7 +32326,7 @@ var WaitNode = ({
|
|
|
32233
32326
|
const d = node.data ?? {};
|
|
32234
32327
|
const waitMs = d.waitMs;
|
|
32235
32328
|
const durationChip = waitMs ? `${Math.round(waitMs / 100) / 10}s` : void 0;
|
|
32236
|
-
return /* @__PURE__ */ (0,
|
|
32329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32237
32330
|
BaseNode,
|
|
32238
32331
|
{
|
|
32239
32332
|
kind: d.kind ?? "WAIT",
|
|
@@ -32244,8 +32337,8 @@ var WaitNode = ({
|
|
|
32244
32337
|
status: d.status,
|
|
32245
32338
|
accent: "violet",
|
|
32246
32339
|
children: [
|
|
32247
|
-
/* @__PURE__ */ (0,
|
|
32248
|
-
/* @__PURE__ */ (0,
|
|
32340
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32341
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32249
32342
|
]
|
|
32250
32343
|
}
|
|
32251
32344
|
);
|
|
@@ -32258,7 +32351,7 @@ var ParallelNode = ({
|
|
|
32258
32351
|
{ id: "a", label: "a" },
|
|
32259
32352
|
{ id: "b", label: "b" }
|
|
32260
32353
|
];
|
|
32261
|
-
return /* @__PURE__ */ (0,
|
|
32354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32262
32355
|
BaseNode,
|
|
32263
32356
|
{
|
|
32264
32357
|
kind: d.kind ?? "PARALLEL",
|
|
@@ -32269,8 +32362,8 @@ var ParallelNode = ({
|
|
|
32269
32362
|
status: d.status,
|
|
32270
32363
|
accent: "blue",
|
|
32271
32364
|
children: [
|
|
32272
|
-
/* @__PURE__ */ (0,
|
|
32273
|
-
branches.map((b, i) => /* @__PURE__ */ (0,
|
|
32365
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32366
|
+
branches.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32274
32367
|
Handle,
|
|
32275
32368
|
{
|
|
32276
32369
|
type: "source",
|
|
@@ -32290,7 +32383,7 @@ var StickyNode = ({
|
|
|
32290
32383
|
node
|
|
32291
32384
|
}) => {
|
|
32292
32385
|
const d = node.data ?? {};
|
|
32293
|
-
return /* @__PURE__ */ (0,
|
|
32386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32294
32387
|
"div",
|
|
32295
32388
|
{
|
|
32296
32389
|
className: "ods-flow-sticky",
|
|
@@ -32299,8 +32392,8 @@ var StickyNode = ({
|
|
|
32299
32392
|
minHeight: node.height ?? 120
|
|
32300
32393
|
},
|
|
32301
32394
|
children: [
|
|
32302
|
-
d.title && /* @__PURE__ */ (0,
|
|
32303
|
-
d.description && /* @__PURE__ */ (0,
|
|
32395
|
+
d.title && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "ods-flow-sticky__title", children: d.title }),
|
|
32396
|
+
d.description && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "ods-flow-sticky__body", children: d.description })
|
|
32304
32397
|
]
|
|
32305
32398
|
}
|
|
32306
32399
|
);
|
|
@@ -32309,7 +32402,7 @@ var WebhookNode = ({
|
|
|
32309
32402
|
node
|
|
32310
32403
|
}) => {
|
|
32311
32404
|
const d = node.data ?? {};
|
|
32312
|
-
return /* @__PURE__ */ (0,
|
|
32405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
32313
32406
|
BaseNode,
|
|
32314
32407
|
{
|
|
32315
32408
|
kind: d.kind ?? "WEBHOOK",
|
|
@@ -32320,7 +32413,7 @@ var WebhookNode = ({
|
|
|
32320
32413
|
valueChip: d.valueChip,
|
|
32321
32414
|
status: d.status,
|
|
32322
32415
|
accent: "blue",
|
|
32323
|
-
children: /* @__PURE__ */ (0,
|
|
32416
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32324
32417
|
}
|
|
32325
32418
|
);
|
|
32326
32419
|
};
|
|
@@ -32328,7 +32421,7 @@ var HttpRequestNode = ({
|
|
|
32328
32421
|
node
|
|
32329
32422
|
}) => {
|
|
32330
32423
|
const d = node.data ?? {};
|
|
32331
|
-
return /* @__PURE__ */ (0,
|
|
32424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
32332
32425
|
BaseNode,
|
|
32333
32426
|
{
|
|
32334
32427
|
kind: d.kind ?? "HTTP",
|
|
@@ -32340,8 +32433,8 @@ var HttpRequestNode = ({
|
|
|
32340
32433
|
status: d.status,
|
|
32341
32434
|
accent: "blue",
|
|
32342
32435
|
children: [
|
|
32343
|
-
/* @__PURE__ */ (0,
|
|
32344
|
-
/* @__PURE__ */ (0,
|
|
32436
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "target", position: "top" }),
|
|
32437
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Handle, { type: "source", position: "bottom" })
|
|
32345
32438
|
]
|
|
32346
32439
|
}
|
|
32347
32440
|
);
|
|
@@ -32362,7 +32455,7 @@ var DEFAULT_NODE_KINDS = {
|
|
|
32362
32455
|
};
|
|
32363
32456
|
|
|
32364
32457
|
// src/workflow/components/FlowCanvas/FlowCanvas.tsx
|
|
32365
|
-
var
|
|
32458
|
+
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
32366
32459
|
var DEFAULT_VIEWPORT2 = { x: 0, y: 0, zoom: 1 };
|
|
32367
32460
|
function FlowCanvas2(props) {
|
|
32368
32461
|
const viewportPropProvided = props.viewport !== void 0 || props.defaultViewport !== void 0;
|
|
@@ -33270,7 +33363,7 @@ function FlowCanvas2(props) {
|
|
|
33270
33363
|
containers.sort((a, b) => depth(a) - depth(b));
|
|
33271
33364
|
return [...containers, ...others];
|
|
33272
33365
|
}, [visibleNodes]);
|
|
33273
|
-
return /* @__PURE__ */ (0,
|
|
33366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FlowStoreContext.Provider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FlowInstanceContext.Provider, { value: instance, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(HandleRegistryContext.Provider, { value: handleRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FlowDispatchContext.Provider, { value: dispatch, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FlowNodeBridgeContext.Provider, { value: bridge, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
33274
33367
|
"div",
|
|
33275
33368
|
{
|
|
33276
33369
|
ref: containerRef,
|
|
@@ -33315,7 +33408,7 @@ function FlowCanvas2(props) {
|
|
|
33315
33408
|
},
|
|
33316
33409
|
"data-empty": isEmpty ? "true" : void 0,
|
|
33317
33410
|
children: [
|
|
33318
|
-
background !== "none" && /* @__PURE__ */ (0,
|
|
33411
|
+
background !== "none" && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
33319
33412
|
"div",
|
|
33320
33413
|
{
|
|
33321
33414
|
className: cn(
|
|
@@ -33329,7 +33422,7 @@ function FlowCanvas2(props) {
|
|
|
33329
33422
|
}
|
|
33330
33423
|
}
|
|
33331
33424
|
),
|
|
33332
|
-
/* @__PURE__ */ (0,
|
|
33425
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
33333
33426
|
"div",
|
|
33334
33427
|
{
|
|
33335
33428
|
className: "ods-flow-canvas-v2__viewport",
|
|
@@ -33340,7 +33433,7 @@ function FlowCanvas2(props) {
|
|
|
33340
33433
|
transformOrigin: "0 0"
|
|
33341
33434
|
},
|
|
33342
33435
|
children: [
|
|
33343
|
-
/* @__PURE__ */ (0,
|
|
33436
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
33344
33437
|
EdgesLayer,
|
|
33345
33438
|
{
|
|
33346
33439
|
edges: visibleEdges,
|
|
@@ -33355,7 +33448,7 @@ function FlowCanvas2(props) {
|
|
|
33355
33448
|
orderedNodes.map((node) => {
|
|
33356
33449
|
const Kind = kinds[node.type] ?? kinds.action;
|
|
33357
33450
|
if (!Kind) return null;
|
|
33358
|
-
return /* @__PURE__ */ (0,
|
|
33451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
33359
33452
|
FlowNode3,
|
|
33360
33453
|
{
|
|
33361
33454
|
node,
|
|
@@ -33370,7 +33463,7 @@ function FlowCanvas2(props) {
|
|
|
33370
33463
|
]
|
|
33371
33464
|
}
|
|
33372
33465
|
),
|
|
33373
|
-
isEmpty && emptyState && /* @__PURE__ */ (0,
|
|
33466
|
+
isEmpty && emptyState && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "ods-flow-canvas-v2__empty", children: emptyState }),
|
|
33374
33467
|
children
|
|
33375
33468
|
]
|
|
33376
33469
|
}
|
|
@@ -33450,7 +33543,7 @@ var EdgesLayer = (0, import_react169.memo)(function EdgesLayer2({
|
|
|
33450
33543
|
ghost,
|
|
33451
33544
|
handleVersion: _handleVersion
|
|
33452
33545
|
}) {
|
|
33453
|
-
return /* @__PURE__ */ (0,
|
|
33546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
33454
33547
|
"svg",
|
|
33455
33548
|
{
|
|
33456
33549
|
className: "ods-flow-canvas-v2__edges",
|
|
@@ -33458,7 +33551,7 @@ var EdgesLayer = (0, import_react169.memo)(function EdgesLayer2({
|
|
|
33458
33551
|
width: "100%",
|
|
33459
33552
|
height: "100%",
|
|
33460
33553
|
children: [
|
|
33461
|
-
/* @__PURE__ */ (0,
|
|
33554
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("g", { style: { pointerEvents: "auto" }, children: edges.map((edge) => /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
33462
33555
|
FlowEdge2,
|
|
33463
33556
|
{
|
|
33464
33557
|
edge,
|
|
@@ -33470,7 +33563,7 @@ var EdgesLayer = (0, import_react169.memo)(function EdgesLayer2({
|
|
|
33470
33563
|
},
|
|
33471
33564
|
edge.id
|
|
33472
33565
|
)) }),
|
|
33473
|
-
ghost && /* @__PURE__ */ (0,
|
|
33566
|
+
ghost && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
33474
33567
|
"path",
|
|
33475
33568
|
{
|
|
33476
33569
|
d: `M ${ghost.start.x} ${ghost.start.y} L ${ghost.end.x} ${ghost.end.y}`,
|
|
@@ -33486,7 +33579,7 @@ var EdgesLayer = (0, import_react169.memo)(function EdgesLayer2({
|
|
|
33486
33579
|
});
|
|
33487
33580
|
|
|
33488
33581
|
// src/components/WorkflowEditor/WorkflowEditor.tsx
|
|
33489
|
-
var
|
|
33582
|
+
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
33490
33583
|
var NODE_KIND_MAP = {
|
|
33491
33584
|
trigger: "trigger",
|
|
33492
33585
|
action: "action",
|
|
@@ -33531,7 +33624,7 @@ function WorkflowEditor({
|
|
|
33531
33624
|
drawer,
|
|
33532
33625
|
console: consoleSlot,
|
|
33533
33626
|
minimap,
|
|
33534
|
-
emptyState = /* @__PURE__ */ (0,
|
|
33627
|
+
emptyState = /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DefaultEmptyState, {}),
|
|
33535
33628
|
children,
|
|
33536
33629
|
background = "dots",
|
|
33537
33630
|
snapToGrid = true,
|
|
@@ -33687,8 +33780,8 @@ function WorkflowEditor({
|
|
|
33687
33780
|
wf.setViewport({ x: cw / 2 - cx * zoom, y: ch / 2 - cy * zoom, zoom });
|
|
33688
33781
|
}, [workflow.canvas.nodes, canvasSize, wf]);
|
|
33689
33782
|
const defaultToolbar = (0, import_react170.useMemo)(
|
|
33690
|
-
() => /* @__PURE__ */ (0,
|
|
33691
|
-
onSave && /* @__PURE__ */ (0,
|
|
33783
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(FlowToolbar, { placement: "left", children: [
|
|
33784
|
+
onSave && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33692
33785
|
FlowToolbarButton,
|
|
33693
33786
|
{
|
|
33694
33787
|
icon: FlowToolbarIcons.save,
|
|
@@ -33697,7 +33790,7 @@ function WorkflowEditor({
|
|
|
33697
33790
|
onClick: () => onSave(workflow)
|
|
33698
33791
|
}
|
|
33699
33792
|
),
|
|
33700
|
-
onRun && /* @__PURE__ */ (0,
|
|
33793
|
+
onRun && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33701
33794
|
FlowToolbarButton,
|
|
33702
33795
|
{
|
|
33703
33796
|
icon: isExecuting ? FlowToolbarIcons.stop : FlowToolbarIcons.run,
|
|
@@ -33708,7 +33801,7 @@ function WorkflowEditor({
|
|
|
33708
33801
|
onClick: isExecuting ? onStop : onRun
|
|
33709
33802
|
}
|
|
33710
33803
|
),
|
|
33711
|
-
/* @__PURE__ */ (0,
|
|
33804
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33712
33805
|
FlowToolbarButton,
|
|
33713
33806
|
{
|
|
33714
33807
|
icon: isLockMode ? FlowToolbarIcons.lock : FlowToolbarIcons.unlock,
|
|
@@ -33718,7 +33811,7 @@ function WorkflowEditor({
|
|
|
33718
33811
|
onClick: toggleLock
|
|
33719
33812
|
}
|
|
33720
33813
|
),
|
|
33721
|
-
/* @__PURE__ */ (0,
|
|
33814
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33722
33815
|
FlowToolbarButton,
|
|
33723
33816
|
{
|
|
33724
33817
|
icon: FlowToolbarIcons.reset,
|
|
@@ -33726,7 +33819,7 @@ function WorkflowEditor({
|
|
|
33726
33819
|
onClick: handleReset
|
|
33727
33820
|
}
|
|
33728
33821
|
),
|
|
33729
|
-
drawer && /* @__PURE__ */ (0,
|
|
33822
|
+
drawer && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33730
33823
|
FlowToolbarButton,
|
|
33731
33824
|
{
|
|
33732
33825
|
icon: isDrawerOpen ? FlowToolbarIcons.drawerClose : FlowToolbarIcons.drawerOpen,
|
|
@@ -33735,8 +33828,8 @@ function WorkflowEditor({
|
|
|
33735
33828
|
onClick: toggleDrawer
|
|
33736
33829
|
}
|
|
33737
33830
|
),
|
|
33738
|
-
/* @__PURE__ */ (0,
|
|
33739
|
-
onSettings && /* @__PURE__ */ (0,
|
|
33831
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(FlowToolbarDivider, {}),
|
|
33832
|
+
onSettings && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33740
33833
|
FlowToolbarButton,
|
|
33741
33834
|
{
|
|
33742
33835
|
icon: FlowToolbarIcons.settings,
|
|
@@ -33744,7 +33837,7 @@ function WorkflowEditor({
|
|
|
33744
33837
|
onClick: onSettings
|
|
33745
33838
|
}
|
|
33746
33839
|
),
|
|
33747
|
-
/* @__PURE__ */ (0,
|
|
33840
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33748
33841
|
FlowToolbarButton,
|
|
33749
33842
|
{
|
|
33750
33843
|
icon: FlowToolbarIcons.history,
|
|
@@ -33753,7 +33846,7 @@ function WorkflowEditor({
|
|
|
33753
33846
|
onClick: toggleHistory
|
|
33754
33847
|
}
|
|
33755
33848
|
),
|
|
33756
|
-
isDebugModeEnabled && /* @__PURE__ */ (0,
|
|
33849
|
+
isDebugModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33757
33850
|
FlowToolbarButton,
|
|
33758
33851
|
{
|
|
33759
33852
|
icon: FlowToolbarIcons.debug,
|
|
@@ -33762,8 +33855,8 @@ function WorkflowEditor({
|
|
|
33762
33855
|
onClick: toggleDebug
|
|
33763
33856
|
}
|
|
33764
33857
|
),
|
|
33765
|
-
/* @__PURE__ */ (0,
|
|
33766
|
-
/* @__PURE__ */ (0,
|
|
33858
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(FlowToolbarDivider, {}),
|
|
33859
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33767
33860
|
FlowToolbarButton,
|
|
33768
33861
|
{
|
|
33769
33862
|
icon: FlowToolbarIcons.undo,
|
|
@@ -33773,7 +33866,7 @@ function WorkflowEditor({
|
|
|
33773
33866
|
onClick: undo
|
|
33774
33867
|
}
|
|
33775
33868
|
),
|
|
33776
|
-
/* @__PURE__ */ (0,
|
|
33869
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33777
33870
|
FlowToolbarButton,
|
|
33778
33871
|
{
|
|
33779
33872
|
icon: FlowToolbarIcons.redo,
|
|
@@ -33783,8 +33876,8 @@ function WorkflowEditor({
|
|
|
33783
33876
|
onClick: redo
|
|
33784
33877
|
}
|
|
33785
33878
|
),
|
|
33786
|
-
/* @__PURE__ */ (0,
|
|
33787
|
-
/* @__PURE__ */ (0,
|
|
33879
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(FlowToolbarDivider, {}),
|
|
33880
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33788
33881
|
FlowToolbarZoom,
|
|
33789
33882
|
{
|
|
33790
33883
|
zoom: workflow.canvas.viewport.zoom,
|
|
@@ -33823,21 +33916,21 @@ function WorkflowEditor({
|
|
|
33823
33916
|
);
|
|
33824
33917
|
const resolvedToolbar = toolbar === "default" ? defaultToolbar : toolbar === null ? null : toolbar;
|
|
33825
33918
|
const isEmpty = workflow.canvas.nodes.length === 0 && workflow.canvas.edges.length === 0;
|
|
33826
|
-
return /* @__PURE__ */ (0,
|
|
33919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
|
|
33827
33920
|
"div",
|
|
33828
33921
|
{
|
|
33829
33922
|
className: cn("ods-workflow-editor", className),
|
|
33830
33923
|
style: { width, height, position: "relative", display: "flex", overflow: "hidden" },
|
|
33831
33924
|
children: [
|
|
33832
|
-
drawer && isDrawerOpen && /* @__PURE__ */ (0,
|
|
33833
|
-
/* @__PURE__ */ (0,
|
|
33925
|
+
drawer && isDrawerOpen && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "ods-workflow-editor__drawer", children: drawer }),
|
|
33926
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
|
|
33834
33927
|
"div",
|
|
33835
33928
|
{
|
|
33836
33929
|
ref: handleCanvasRef,
|
|
33837
33930
|
className: "ods-workflow-editor__canvas-wrapper",
|
|
33838
33931
|
style: { position: "relative", flex: 1, minWidth: 0 },
|
|
33839
33932
|
children: [
|
|
33840
|
-
/* @__PURE__ */ (0,
|
|
33933
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33841
33934
|
FlowCanvas2,
|
|
33842
33935
|
{
|
|
33843
33936
|
nodes: nextNodes,
|
|
@@ -33851,9 +33944,9 @@ function WorkflowEditor({
|
|
|
33851
33944
|
children: resolvedToolbar
|
|
33852
33945
|
}
|
|
33853
33946
|
),
|
|
33854
|
-
minimap && /* @__PURE__ */ (0,
|
|
33855
|
-
consoleSlot && /* @__PURE__ */ (0,
|
|
33856
|
-
isEmpty && emptyState && /* @__PURE__ */ (0,
|
|
33947
|
+
minimap && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "ods-workflow-editor__minimap", children: minimap }),
|
|
33948
|
+
consoleSlot && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "ods-workflow-editor__console", children: consoleSlot }),
|
|
33949
|
+
isEmpty && emptyState && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "ods-workflow-editor__empty", children: emptyState }),
|
|
33857
33950
|
children
|
|
33858
33951
|
]
|
|
33859
33952
|
}
|
|
@@ -33863,7 +33956,7 @@ function WorkflowEditor({
|
|
|
33863
33956
|
);
|
|
33864
33957
|
}
|
|
33865
33958
|
function DefaultEmptyState() {
|
|
33866
|
-
return /* @__PURE__ */ (0,
|
|
33959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
|
|
33867
33960
|
"div",
|
|
33868
33961
|
{
|
|
33869
33962
|
style: {
|
|
@@ -33878,14 +33971,14 @@ function DefaultEmptyState() {
|
|
|
33878
33971
|
pointerEvents: "none"
|
|
33879
33972
|
},
|
|
33880
33973
|
children: [
|
|
33881
|
-
/* @__PURE__ */ (0,
|
|
33974
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
33882
33975
|
"div",
|
|
33883
33976
|
{
|
|
33884
33977
|
style: { fontSize: 14, fontWeight: 600, color: "var(--ods-text-primary)", marginBottom: 4 },
|
|
33885
33978
|
children: "Start with a trigger"
|
|
33886
33979
|
}
|
|
33887
33980
|
),
|
|
33888
|
-
/* @__PURE__ */ (0,
|
|
33981
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { style: { fontSize: 12 }, children: "Drop an action here, or use the drawer to add your first node." })
|
|
33889
33982
|
]
|
|
33890
33983
|
}
|
|
33891
33984
|
);
|
|
@@ -33922,7 +34015,7 @@ function useWorkflowRuntime(startedAt, active) {
|
|
|
33922
34015
|
}
|
|
33923
34016
|
|
|
33924
34017
|
// src/components/WorkflowHeader/WorkflowHeader.tsx
|
|
33925
|
-
var
|
|
34018
|
+
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
33926
34019
|
function WorkflowHeader({
|
|
33927
34020
|
name,
|
|
33928
34021
|
statusTone,
|
|
@@ -33965,21 +34058,21 @@ function WorkflowHeader({
|
|
|
33965
34058
|
className
|
|
33966
34059
|
);
|
|
33967
34060
|
if (loading) {
|
|
33968
|
-
return /* @__PURE__ */ (0,
|
|
33969
|
-
/* @__PURE__ */ (0,
|
|
33970
|
-
/* @__PURE__ */ (0,
|
|
33971
|
-
/* @__PURE__ */ (0,
|
|
34061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("header", { className: rootCls, "data-loading": "true", children: [
|
|
34062
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "ods-workflow-header__left", children: [
|
|
34063
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Skeleton, { variant: "text", width: "120px" }),
|
|
34064
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Skeleton, { variant: "text", width: "180px" })
|
|
33972
34065
|
] }),
|
|
33973
|
-
/* @__PURE__ */ (0,
|
|
33974
|
-
/* @__PURE__ */ (0,
|
|
33975
|
-
/* @__PURE__ */ (0,
|
|
34066
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "ods-workflow-header__right", children: [
|
|
34067
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Skeleton, { variant: "circular", width: "28px", height: "28px" }),
|
|
34068
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Skeleton, { variant: "circular", width: "28px", height: "28px" })
|
|
33976
34069
|
] })
|
|
33977
34070
|
] });
|
|
33978
34071
|
}
|
|
33979
34072
|
const envAccentStyle = environment?.accent ? { borderLeftColor: environment.accent } : void 0;
|
|
33980
|
-
return /* @__PURE__ */ (0,
|
|
33981
|
-
/* @__PURE__ */ (0,
|
|
33982
|
-
onBack && /* @__PURE__ */ (0,
|
|
34073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("header", { className: rootCls, "data-running": isRunning ? "true" : void 0, children: [
|
|
34074
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "ods-workflow-header__left", children: [
|
|
34075
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
|
|
33983
34076
|
"button",
|
|
33984
34077
|
{
|
|
33985
34078
|
type: "button",
|
|
@@ -33987,13 +34080,13 @@ function WorkflowHeader({
|
|
|
33987
34080
|
onClick: onBack,
|
|
33988
34081
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
33989
34082
|
children: [
|
|
33990
|
-
/* @__PURE__ */ (0,
|
|
33991
|
-
/* @__PURE__ */ (0,
|
|
33992
|
-
/* @__PURE__ */ (0,
|
|
34083
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_icons50.ChevronLeftIcon, { size: "sm" }),
|
|
34084
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__back-label", children: parentLabel }),
|
|
34085
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__back-separator", "aria-hidden": "true", children: "/" })
|
|
33993
34086
|
]
|
|
33994
34087
|
}
|
|
33995
34088
|
),
|
|
33996
|
-
/* @__PURE__ */ (0,
|
|
34089
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
33997
34090
|
"span",
|
|
33998
34091
|
{
|
|
33999
34092
|
className: cn(
|
|
@@ -34004,10 +34097,10 @@ function WorkflowHeader({
|
|
|
34004
34097
|
role: "img"
|
|
34005
34098
|
}
|
|
34006
34099
|
),
|
|
34007
|
-
/* @__PURE__ */ (0,
|
|
34008
|
-
saveIndicator && /* @__PURE__ */ (0,
|
|
34009
|
-
/* @__PURE__ */ (0,
|
|
34010
|
-
/* @__PURE__ */ (0,
|
|
34100
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("h1", { className: "ods-workflow-header__title", title: typeof name === "string" ? name : void 0, children: name }),
|
|
34101
|
+
saveIndicator && /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_jsx_runtime150.Fragment, { children: [
|
|
34102
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__sep", "aria-hidden": "true" }),
|
|
34103
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34011
34104
|
"span",
|
|
34012
34105
|
{
|
|
34013
34106
|
className: cn(
|
|
@@ -34023,11 +34116,11 @@ function WorkflowHeader({
|
|
|
34023
34116
|
] }),
|
|
34024
34117
|
leftSlot
|
|
34025
34118
|
] }),
|
|
34026
|
-
/* @__PURE__ */ (0,
|
|
34119
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "ods-workflow-header__right", children: [
|
|
34027
34120
|
rightSlot,
|
|
34028
34121
|
environment && // Consumer-driven env chip. Accent (left border colour) comes
|
|
34029
34122
|
// from the consumer — we don't bake in environment names.
|
|
34030
|
-
/* @__PURE__ */ (0,
|
|
34123
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34031
34124
|
Chip,
|
|
34032
34125
|
{
|
|
34033
34126
|
size: "sm",
|
|
@@ -34043,72 +34136,72 @@ function WorkflowHeader({
|
|
|
34043
34136
|
children: environment.label
|
|
34044
34137
|
}
|
|
34045
34138
|
),
|
|
34046
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ (0,
|
|
34139
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34047
34140
|
Button,
|
|
34048
34141
|
{
|
|
34049
34142
|
variant: "ghost",
|
|
34050
34143
|
size: "sm",
|
|
34051
34144
|
pressed: !!isConsoleOpen,
|
|
34052
34145
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
34053
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34146
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_icons50.TerminalIcon, { size: "sm" }),
|
|
34054
34147
|
onClick: onToggleConsole,
|
|
34055
34148
|
children: "Console"
|
|
34056
34149
|
}
|
|
34057
34150
|
),
|
|
34058
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ (0,
|
|
34059
|
-
isRunning ? onStop && /* @__PURE__ */ (0,
|
|
34151
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__micro-divider", "aria-hidden": "true" }),
|
|
34152
|
+
isRunning ? onStop && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34060
34153
|
Button,
|
|
34061
34154
|
{
|
|
34062
34155
|
variant: "ghost",
|
|
34063
34156
|
size: "sm",
|
|
34064
34157
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
34065
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34158
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_icons50.StopFilledAltIcon, { size: "sm", className: "ods-workflow-header__stop-glyph" }),
|
|
34066
34159
|
onClick: onStop,
|
|
34067
|
-
children: /* @__PURE__ */ (0,
|
|
34068
|
-
/* @__PURE__ */ (0,
|
|
34069
|
-
runtime && /* @__PURE__ */ (0,
|
|
34070
|
-
/* @__PURE__ */ (0,
|
|
34071
|
-
/* @__PURE__ */ (0,
|
|
34160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("span", { className: "ods-workflow-header__stop-label", children: [
|
|
34161
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { children: "Stop" }),
|
|
34162
|
+
runtime && /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_jsx_runtime150.Fragment, { children: [
|
|
34163
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__stop-dot", "aria-hidden": "true", children: "\xB7" }),
|
|
34164
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__runtime", children: runtime })
|
|
34072
34165
|
] })
|
|
34073
34166
|
] })
|
|
34074
34167
|
}
|
|
34075
|
-
) : onRun && /* @__PURE__ */ (0,
|
|
34168
|
+
) : onRun && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34076
34169
|
Button,
|
|
34077
34170
|
{
|
|
34078
34171
|
variant: "primary",
|
|
34079
34172
|
size: "sm",
|
|
34080
34173
|
"aria-label": "Run workflow",
|
|
34081
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34174
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_icons50.PlayFilledAltIcon, { size: "sm" }),
|
|
34082
34175
|
onClick: onRun,
|
|
34083
34176
|
children: "Run"
|
|
34084
34177
|
}
|
|
34085
34178
|
),
|
|
34086
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ (0,
|
|
34179
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34087
34180
|
DropdownMenu,
|
|
34088
34181
|
{
|
|
34089
34182
|
"aria-label": menuLabel,
|
|
34090
34183
|
align: "end",
|
|
34091
34184
|
triggerClassName: "ods-workflow-header__menu-trigger",
|
|
34092
34185
|
...menuProps,
|
|
34093
|
-
trigger: menuTrigger ?? /* @__PURE__ */ (0,
|
|
34186
|
+
trigger: menuTrigger ?? /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
34094
34187
|
"span",
|
|
34095
34188
|
{
|
|
34096
34189
|
"aria-hidden": "true",
|
|
34097
34190
|
className: "ods-workflow-header__menu-icon",
|
|
34098
|
-
children: /* @__PURE__ */ (0,
|
|
34191
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_icons50.OverflowMenuVerticalIcon, { size: "sm" })
|
|
34099
34192
|
}
|
|
34100
34193
|
),
|
|
34101
34194
|
items: menuItems
|
|
34102
34195
|
}
|
|
34103
34196
|
))
|
|
34104
34197
|
] }),
|
|
34105
|
-
/* @__PURE__ */ (0,
|
|
34198
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ods-workflow-header__progress", "aria-hidden": "true" })
|
|
34106
34199
|
] });
|
|
34107
34200
|
}
|
|
34108
34201
|
|
|
34109
34202
|
// src/components/WorkflowHeader/WorkflowHeaderExpanded.tsx
|
|
34110
34203
|
var import_icons51 = require("@octaviaflow/icons");
|
|
34111
|
-
var
|
|
34204
|
+
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
34112
34205
|
function WorkflowHeaderExpanded({
|
|
34113
34206
|
name,
|
|
34114
34207
|
statusTone = "draft",
|
|
@@ -34136,15 +34229,15 @@ function WorkflowHeaderExpanded({
|
|
|
34136
34229
|
const tickedRuntime = useWorkflowRuntime(runStartedAt, !!isRunning);
|
|
34137
34230
|
const runtime = runtimeOverride ?? tickedRuntime ?? void 0;
|
|
34138
34231
|
const effectiveTone = statusTone === "draft" && isRunning ? "running" : statusTone;
|
|
34139
|
-
return /* @__PURE__ */ (0,
|
|
34232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
34140
34233
|
"header",
|
|
34141
34234
|
{
|
|
34142
34235
|
className: cn("ods-workflow-header-expanded", className),
|
|
34143
34236
|
"data-running": isRunning ? "true" : void 0,
|
|
34144
34237
|
children: [
|
|
34145
|
-
/* @__PURE__ */ (0,
|
|
34146
|
-
/* @__PURE__ */ (0,
|
|
34147
|
-
onBack && /* @__PURE__ */ (0,
|
|
34238
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--top", children: [
|
|
34239
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "ods-workflow-header-expanded__left", children: [
|
|
34240
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
34148
34241
|
"button",
|
|
34149
34242
|
{
|
|
34150
34243
|
type: "button",
|
|
@@ -34152,13 +34245,13 @@ function WorkflowHeaderExpanded({
|
|
|
34152
34245
|
onClick: onBack,
|
|
34153
34246
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
34154
34247
|
children: [
|
|
34155
|
-
/* @__PURE__ */ (0,
|
|
34156
|
-
/* @__PURE__ */ (0,
|
|
34157
|
-
/* @__PURE__ */ (0,
|
|
34248
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_icons51.ChevronLeftIcon, { size: "sm" }),
|
|
34249
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { children: parentLabel }),
|
|
34250
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { "aria-hidden": "true", className: "ods-workflow-header-expanded__back-sep", children: "/" })
|
|
34158
34251
|
]
|
|
34159
34252
|
}
|
|
34160
34253
|
),
|
|
34161
|
-
/* @__PURE__ */ (0,
|
|
34254
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34162
34255
|
"span",
|
|
34163
34256
|
{
|
|
34164
34257
|
className: cn(
|
|
@@ -34169,10 +34262,10 @@ function WorkflowHeaderExpanded({
|
|
|
34169
34262
|
role: "img"
|
|
34170
34263
|
}
|
|
34171
34264
|
),
|
|
34172
|
-
/* @__PURE__ */ (0,
|
|
34265
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("h1", { className: "ods-workflow-header-expanded__title", children: name })
|
|
34173
34266
|
] }),
|
|
34174
|
-
/* @__PURE__ */ (0,
|
|
34175
|
-
environment && /* @__PURE__ */ (0,
|
|
34267
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "ods-workflow-header-expanded__right", children: [
|
|
34268
|
+
environment && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34176
34269
|
Chip,
|
|
34177
34270
|
{
|
|
34178
34271
|
size: "sm",
|
|
@@ -34184,58 +34277,58 @@ function WorkflowHeaderExpanded({
|
|
|
34184
34277
|
children: environment.label
|
|
34185
34278
|
}
|
|
34186
34279
|
),
|
|
34187
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ (0,
|
|
34280
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34188
34281
|
Button,
|
|
34189
34282
|
{
|
|
34190
34283
|
variant: "ghost",
|
|
34191
34284
|
size: "sm",
|
|
34192
34285
|
pressed: !!isConsoleOpen,
|
|
34193
34286
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
34194
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34287
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_icons51.TerminalIcon, { size: "sm" }),
|
|
34195
34288
|
onClick: onToggleConsole,
|
|
34196
34289
|
children: "Console"
|
|
34197
34290
|
}
|
|
34198
34291
|
),
|
|
34199
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ (0,
|
|
34200
|
-
isRunning ? onStop && /* @__PURE__ */ (0,
|
|
34292
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "ods-workflow-header-expanded__micro-divider", "aria-hidden": "true" }),
|
|
34293
|
+
isRunning ? onStop && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34201
34294
|
Button,
|
|
34202
34295
|
{
|
|
34203
34296
|
variant: "ghost",
|
|
34204
34297
|
size: "sm",
|
|
34205
34298
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
34206
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34299
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_icons51.StopFilledAltIcon, { size: "sm", className: "ods-workflow-header-expanded__stop-glyph" }),
|
|
34207
34300
|
onClick: onStop,
|
|
34208
|
-
children: /* @__PURE__ */ (0,
|
|
34209
|
-
/* @__PURE__ */ (0,
|
|
34210
|
-
runtime && /* @__PURE__ */ (0,
|
|
34211
|
-
/* @__PURE__ */ (0,
|
|
34212
|
-
/* @__PURE__ */ (0,
|
|
34301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { style: { display: "inline-flex", gap: 4, alignItems: "center" }, children: [
|
|
34302
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { children: "Stop" }),
|
|
34303
|
+
runtime && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_jsx_runtime151.Fragment, { children: [
|
|
34304
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { "aria-hidden": "true", style: { opacity: 0.6 }, children: "\xB7" }),
|
|
34305
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "ods-workflow-header-expanded__runtime", children: runtime })
|
|
34213
34306
|
] })
|
|
34214
34307
|
] })
|
|
34215
34308
|
}
|
|
34216
|
-
) : onRun && /* @__PURE__ */ (0,
|
|
34309
|
+
) : onRun && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34217
34310
|
Button,
|
|
34218
34311
|
{
|
|
34219
34312
|
variant: "primary",
|
|
34220
34313
|
size: "sm",
|
|
34221
34314
|
"aria-label": "Run workflow",
|
|
34222
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34315
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_icons51.PlayFilledAltIcon, { size: "sm" }),
|
|
34223
34316
|
onClick: onRun,
|
|
34224
34317
|
children: "Run"
|
|
34225
34318
|
}
|
|
34226
34319
|
),
|
|
34227
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ (0,
|
|
34320
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34228
34321
|
DropdownMenu,
|
|
34229
34322
|
{
|
|
34230
34323
|
"aria-label": menuLabel,
|
|
34231
34324
|
align: "end",
|
|
34232
34325
|
...menuProps,
|
|
34233
|
-
trigger: menuTrigger ?? /* @__PURE__ */ (0,
|
|
34326
|
+
trigger: menuTrigger ?? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34234
34327
|
Button,
|
|
34235
34328
|
{
|
|
34236
34329
|
variant: "ghost",
|
|
34237
34330
|
size: "sm",
|
|
34238
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
34331
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_icons51.OverflowMenuVerticalIcon, { size: "sm" })
|
|
34239
34332
|
}
|
|
34240
34333
|
),
|
|
34241
34334
|
items: menuItems
|
|
@@ -34243,10 +34336,10 @@ function WorkflowHeaderExpanded({
|
|
|
34243
34336
|
))
|
|
34244
34337
|
] })
|
|
34245
34338
|
] }),
|
|
34246
|
-
(meta || saveLabel) && /* @__PURE__ */ (0,
|
|
34339
|
+
(meta || saveLabel) && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--bottom", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "ods-workflow-header-expanded__meta", children: [
|
|
34247
34340
|
meta,
|
|
34248
|
-
meta && saveLabel && /* @__PURE__ */ (0,
|
|
34249
|
-
saveLabel && /* @__PURE__ */ (0,
|
|
34341
|
+
meta && saveLabel && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { "aria-hidden": "true", style: { margin: "0 6px", opacity: 0.4 }, children: "\xB7" }),
|
|
34342
|
+
saveLabel && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
34250
34343
|
"span",
|
|
34251
34344
|
{
|
|
34252
34345
|
className: cn(
|
|
@@ -34258,7 +34351,7 @@ function WorkflowHeaderExpanded({
|
|
|
34258
34351
|
}
|
|
34259
34352
|
)
|
|
34260
34353
|
] }) }),
|
|
34261
|
-
/* @__PURE__ */ (0,
|
|
34354
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "ods-workflow-header-expanded__progress", "aria-hidden": "true" })
|
|
34262
34355
|
]
|
|
34263
34356
|
}
|
|
34264
34357
|
);
|
|
@@ -34268,7 +34361,7 @@ function WorkflowHeaderExpanded({
|
|
|
34268
34361
|
var import_icons52 = require("@octaviaflow/icons");
|
|
34269
34362
|
var import_fast_xml_parser = require("fast-xml-parser");
|
|
34270
34363
|
var import_react172 = require("react");
|
|
34271
|
-
var
|
|
34364
|
+
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
34272
34365
|
function parseXml(src) {
|
|
34273
34366
|
if (typeof window !== "undefined" && typeof window.DOMParser !== "undefined") {
|
|
34274
34367
|
try {
|
|
@@ -34359,7 +34452,7 @@ var XmlViewer = (0, import_react172.forwardRef)(
|
|
|
34359
34452
|
const bodyStyle = height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : maxHeight !== void 0 ? {
|
|
34360
34453
|
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
|
|
34361
34454
|
} : void 0;
|
|
34362
|
-
return /* @__PURE__ */ (0,
|
|
34455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
34363
34456
|
"div",
|
|
34364
34457
|
{
|
|
34365
34458
|
...rest,
|
|
@@ -34367,9 +34460,9 @@ var XmlViewer = (0, import_react172.forwardRef)(
|
|
|
34367
34460
|
id: baseId,
|
|
34368
34461
|
className: cn("ods-xml-viewer", className),
|
|
34369
34462
|
children: [
|
|
34370
|
-
(title || status || parsed.error) && /* @__PURE__ */ (0,
|
|
34371
|
-
title && /* @__PURE__ */ (0,
|
|
34372
|
-
parsed.error && /* @__PURE__ */ (0,
|
|
34463
|
+
(title || status || parsed.error) && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__head", children: [
|
|
34464
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__title", children: title }),
|
|
34465
|
+
parsed.error && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34373
34466
|
"span",
|
|
34374
34467
|
{
|
|
34375
34468
|
className: "ods-xml-viewer__status ods-xml-viewer__status--error",
|
|
@@ -34377,9 +34470,9 @@ var XmlViewer = (0, import_react172.forwardRef)(
|
|
|
34377
34470
|
children: "Invalid XML"
|
|
34378
34471
|
}
|
|
34379
34472
|
),
|
|
34380
|
-
status && !parsed.error && /* @__PURE__ */ (0,
|
|
34473
|
+
status && !parsed.error && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__status", children: status })
|
|
34381
34474
|
] }),
|
|
34382
|
-
/* @__PURE__ */ (0,
|
|
34475
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "ods-xml-viewer__body", style: bodyStyle, "data-mode": mode, children: mode === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(XmlEditBody, { text: data, onChange, onValidate }) : parsed.error ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("pre", { className: "ods-xml-viewer__raw", children: data }) : parsed.root ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34383
34476
|
XmlNodeRow,
|
|
34384
34477
|
{
|
|
34385
34478
|
node: parsed.root,
|
|
@@ -34423,8 +34516,8 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
34423
34516
|
(0, import_react172.useEffect)(() => {
|
|
34424
34517
|
validate(initial);
|
|
34425
34518
|
}, []);
|
|
34426
|
-
return /* @__PURE__ */ (0,
|
|
34427
|
-
parseError && /* @__PURE__ */ (0,
|
|
34519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__edit", children: [
|
|
34520
|
+
parseError && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
34428
34521
|
InlineMessage,
|
|
34429
34522
|
{
|
|
34430
34523
|
tone: "danger",
|
|
@@ -34441,7 +34534,7 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
34441
34534
|
]
|
|
34442
34535
|
}
|
|
34443
34536
|
),
|
|
34444
|
-
/* @__PURE__ */ (0,
|
|
34537
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34445
34538
|
CodeEditor,
|
|
34446
34539
|
{
|
|
34447
34540
|
value: text,
|
|
@@ -34484,27 +34577,27 @@ function XmlNodeRow({
|
|
|
34484
34577
|
if (node.type === "text") {
|
|
34485
34578
|
const t = (node.text ?? "").trim();
|
|
34486
34579
|
const truncated = t.length > truncateAt ? `${t.slice(0, truncateAt)}\u2026` : t;
|
|
34487
|
-
return /* @__PURE__ */ (0,
|
|
34488
|
-
/* @__PURE__ */ (0,
|
|
34489
|
-
/* @__PURE__ */ (0,
|
|
34580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34581
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34582
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__text", children: truncated })
|
|
34490
34583
|
] });
|
|
34491
34584
|
}
|
|
34492
34585
|
if (node.type === "comment") {
|
|
34493
|
-
return /* @__PURE__ */ (0,
|
|
34494
|
-
/* @__PURE__ */ (0,
|
|
34495
|
-
/* @__PURE__ */ (0,
|
|
34586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34587
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34588
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__comment", children: `<!-- ${node.text} -->` })
|
|
34496
34589
|
] });
|
|
34497
34590
|
}
|
|
34498
34591
|
if (node.type === "cdata") {
|
|
34499
|
-
return /* @__PURE__ */ (0,
|
|
34500
|
-
/* @__PURE__ */ (0,
|
|
34501
|
-
/* @__PURE__ */ (0,
|
|
34592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34593
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34594
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__cdata", children: `<![CDATA[${node.text}]]>` })
|
|
34502
34595
|
] });
|
|
34503
34596
|
}
|
|
34504
34597
|
if (node.type === "pi") {
|
|
34505
|
-
return /* @__PURE__ */ (0,
|
|
34506
|
-
/* @__PURE__ */ (0,
|
|
34507
|
-
/* @__PURE__ */ (0,
|
|
34598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34599
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34600
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__pi", children: `<?${node.text}?>` })
|
|
34508
34601
|
] });
|
|
34509
34602
|
}
|
|
34510
34603
|
const children = node.children ?? [];
|
|
@@ -34513,58 +34606,58 @@ function XmlNodeRow({
|
|
|
34513
34606
|
const inlineTextChild = children.length === 1 && children[0].type === "text" ? children[0].text ?? "" : null;
|
|
34514
34607
|
if (inlineTextChild !== null) {
|
|
34515
34608
|
const isMultiLine = inlineTextChild.includes("\n");
|
|
34516
|
-
const openTag = /* @__PURE__ */ (0,
|
|
34517
|
-
/* @__PURE__ */ (0,
|
|
34518
|
-
/* @__PURE__ */ (0,
|
|
34519
|
-
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ (0,
|
|
34520
|
-
/* @__PURE__ */ (0,
|
|
34521
|
-
/* @__PURE__ */ (0,
|
|
34522
|
-
/* @__PURE__ */ (0,
|
|
34609
|
+
const openTag = /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
|
|
34610
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: "<" }),
|
|
34611
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
34612
|
+
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("span", { className: "ods-xml-viewer__attr", children: [
|
|
34613
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-name", children: k }),
|
|
34614
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-eq", children: "=" }),
|
|
34615
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-value", children: `"${v}"` })
|
|
34523
34616
|
] }, k)),
|
|
34524
|
-
/* @__PURE__ */ (0,
|
|
34617
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
34525
34618
|
] });
|
|
34526
|
-
const closeTag = /* @__PURE__ */ (0,
|
|
34527
|
-
/* @__PURE__ */ (0,
|
|
34528
|
-
/* @__PURE__ */ (0,
|
|
34529
|
-
/* @__PURE__ */ (0,
|
|
34619
|
+
const closeTag = /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
|
|
34620
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
34621
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
34622
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
34530
34623
|
] });
|
|
34531
34624
|
if (isMultiLine) {
|
|
34532
34625
|
const innerPad = pad2 + 12;
|
|
34533
|
-
return /* @__PURE__ */ (0,
|
|
34534
|
-
/* @__PURE__ */ (0,
|
|
34535
|
-
/* @__PURE__ */ (0,
|
|
34626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { children: [
|
|
34627
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34628
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34536
34629
|
openTag
|
|
34537
34630
|
] }),
|
|
34538
|
-
/* @__PURE__ */ (0,
|
|
34631
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34539
34632
|
"div",
|
|
34540
34633
|
{
|
|
34541
34634
|
className: "ods-xml-viewer__row ods-xml-viewer__row--multiline",
|
|
34542
34635
|
style: { paddingLeft: innerPad },
|
|
34543
|
-
children: /* @__PURE__ */ (0,
|
|
34636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__text", children: inlineTextChild })
|
|
34544
34637
|
}
|
|
34545
34638
|
),
|
|
34546
|
-
/* @__PURE__ */ (0,
|
|
34547
|
-
/* @__PURE__ */ (0,
|
|
34639
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34640
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34548
34641
|
closeTag
|
|
34549
34642
|
] })
|
|
34550
34643
|
] });
|
|
34551
34644
|
}
|
|
34552
|
-
return /* @__PURE__ */ (0,
|
|
34553
|
-
/* @__PURE__ */ (0,
|
|
34645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34646
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34554
34647
|
openTag,
|
|
34555
|
-
/* @__PURE__ */ (0,
|
|
34648
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__text", children: inlineTextChild }),
|
|
34556
34649
|
closeTag
|
|
34557
34650
|
] });
|
|
34558
34651
|
}
|
|
34559
|
-
return /* @__PURE__ */ (0,
|
|
34560
|
-
/* @__PURE__ */ (0,
|
|
34652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { children: [
|
|
34653
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
34561
34654
|
"div",
|
|
34562
34655
|
{
|
|
34563
34656
|
className: "ods-xml-viewer__row ods-xml-viewer__row--element",
|
|
34564
34657
|
style: { paddingLeft: pad2 },
|
|
34565
34658
|
onClick: () => !isSelfClosing && setOpen((o) => !o),
|
|
34566
34659
|
children: [
|
|
34567
|
-
isSelfClosing ? /* @__PURE__ */ (0,
|
|
34660
|
+
isSelfClosing ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }) : /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34568
34661
|
"button",
|
|
34569
34662
|
{
|
|
34570
34663
|
type: "button",
|
|
@@ -34578,30 +34671,30 @@ function XmlNodeRow({
|
|
|
34578
34671
|
e.stopPropagation();
|
|
34579
34672
|
setOpen((o) => !o);
|
|
34580
34673
|
},
|
|
34581
|
-
children: /* @__PURE__ */ (0,
|
|
34674
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_icons52.ChevronRightIcon, { size: "xs" })
|
|
34582
34675
|
}
|
|
34583
34676
|
),
|
|
34584
|
-
/* @__PURE__ */ (0,
|
|
34585
|
-
/* @__PURE__ */ (0,
|
|
34586
|
-
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ (0,
|
|
34587
|
-
/* @__PURE__ */ (0,
|
|
34588
|
-
/* @__PURE__ */ (0,
|
|
34589
|
-
/* @__PURE__ */ (0,
|
|
34677
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: "<" }),
|
|
34678
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
34679
|
+
showAttributes && attrs.map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("span", { className: "ods-xml-viewer__attr", children: [
|
|
34680
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-name", children: k }),
|
|
34681
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-eq", children: "=" }),
|
|
34682
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__attr-value", children: `"${v}"` })
|
|
34590
34683
|
] }, k)),
|
|
34591
|
-
isSelfClosing ? /* @__PURE__ */ (0,
|
|
34592
|
-
/* @__PURE__ */ (0,
|
|
34593
|
-
!open && /* @__PURE__ */ (0,
|
|
34594
|
-
/* @__PURE__ */ (0,
|
|
34684
|
+
isSelfClosing ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: " />" }) : /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
|
|
34685
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: ">" }),
|
|
34686
|
+
!open && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
|
|
34687
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("span", { className: "ods-xml-viewer__preview", children: [
|
|
34595
34688
|
children.length,
|
|
34596
34689
|
" child",
|
|
34597
34690
|
children.length === 1 ? "" : "ren"
|
|
34598
34691
|
] }),
|
|
34599
|
-
/* @__PURE__ */ (0,
|
|
34600
|
-
/* @__PURE__ */ (0,
|
|
34601
|
-
/* @__PURE__ */ (0,
|
|
34692
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
34693
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
34694
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
34602
34695
|
] })
|
|
34603
34696
|
] }),
|
|
34604
|
-
copyable && /* @__PURE__ */ (0,
|
|
34697
|
+
copyable && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34605
34698
|
"button",
|
|
34606
34699
|
{
|
|
34607
34700
|
type: "button",
|
|
@@ -34611,14 +34704,14 @@ function XmlNodeRow({
|
|
|
34611
34704
|
),
|
|
34612
34705
|
"aria-label": copied ? "Copied" : `Copy ${node.name} subtree`,
|
|
34613
34706
|
onClick: onCopy,
|
|
34614
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
34707
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_icons52.CheckmarkIcon, { size: "xs" }) : /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_icons52.CopyIcon, { size: "xs" })
|
|
34615
34708
|
}
|
|
34616
34709
|
)
|
|
34617
34710
|
]
|
|
34618
34711
|
}
|
|
34619
34712
|
),
|
|
34620
|
-
!isSelfClosing && open && /* @__PURE__ */ (0,
|
|
34621
|
-
children.map((c, i) => /* @__PURE__ */ (0,
|
|
34713
|
+
!isSelfClosing && open && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
|
|
34714
|
+
children.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
34622
34715
|
XmlNodeRow,
|
|
34623
34716
|
{
|
|
34624
34717
|
node: c,
|
|
@@ -34630,11 +34723,11 @@ function XmlNodeRow({
|
|
|
34630
34723
|
},
|
|
34631
34724
|
i
|
|
34632
34725
|
)),
|
|
34633
|
-
/* @__PURE__ */ (0,
|
|
34634
|
-
/* @__PURE__ */ (0,
|
|
34635
|
-
/* @__PURE__ */ (0,
|
|
34636
|
-
/* @__PURE__ */ (0,
|
|
34637
|
-
/* @__PURE__ */ (0,
|
|
34726
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "ods-xml-viewer__row", style: { paddingLeft: pad2 }, children: [
|
|
34727
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__caret-spacer" }),
|
|
34728
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: "</" }),
|
|
34729
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__tag", children: node.name }),
|
|
34730
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "ods-xml-viewer__bracket", children: ">" })
|
|
34638
34731
|
] })
|
|
34639
34732
|
] })
|
|
34640
34733
|
] });
|
|
@@ -34644,7 +34737,7 @@ function XmlNodeRow({
|
|
|
34644
34737
|
var import_icons53 = require("@octaviaflow/icons");
|
|
34645
34738
|
var import_react173 = require("react");
|
|
34646
34739
|
var import_yaml = __toESM(require("yaml"), 1);
|
|
34647
|
-
var
|
|
34740
|
+
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
34648
34741
|
function toYaml(value, indent = 0) {
|
|
34649
34742
|
const pad2 = " ".repeat(indent);
|
|
34650
34743
|
if (value === null) return "null";
|
|
@@ -34843,7 +34936,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34843
34936
|
const bodyStyle = height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : maxHeight !== void 0 ? {
|
|
34844
34937
|
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
|
|
34845
34938
|
} : void 0;
|
|
34846
|
-
return /* @__PURE__ */ (0,
|
|
34939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
34847
34940
|
"div",
|
|
34848
34941
|
{
|
|
34849
34942
|
...rest,
|
|
@@ -34855,11 +34948,11 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34855
34948
|
className
|
|
34856
34949
|
),
|
|
34857
34950
|
children: [
|
|
34858
|
-
(title || status || copyable) && /* @__PURE__ */ (0,
|
|
34859
|
-
title && /* @__PURE__ */ (0,
|
|
34860
|
-
/* @__PURE__ */ (0,
|
|
34861
|
-
status && /* @__PURE__ */ (0,
|
|
34862
|
-
copyable && /* @__PURE__ */ (0,
|
|
34951
|
+
(title || status || copyable) && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "ods-yaml-viewer__head", children: [
|
|
34952
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__title", children: title }),
|
|
34953
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("span", { className: "ods-yaml-viewer__head-right", children: [
|
|
34954
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__status", children: status }),
|
|
34955
|
+
copyable && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34863
34956
|
"button",
|
|
34864
34957
|
{
|
|
34865
34958
|
type: "button",
|
|
@@ -34869,16 +34962,16 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34869
34962
|
),
|
|
34870
34963
|
"aria-label": copied ? "Copied" : "Copy YAML",
|
|
34871
34964
|
onClick: onCopy,
|
|
34872
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
34965
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_icons53.CheckmarkIcon, { size: "xs" }) : /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_icons53.CopyIcon, { size: "xs" })
|
|
34873
34966
|
}
|
|
34874
34967
|
)
|
|
34875
34968
|
] })
|
|
34876
34969
|
] }),
|
|
34877
|
-
/* @__PURE__ */ (0,
|
|
34970
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "ods-yaml-viewer__body", style: bodyStyle, "data-mode": mode, children: mode === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(YamlEditBody, { text, onChange, onValidate }) : tokens.map((t) => {
|
|
34878
34971
|
if (hidden.has(t.index)) return null;
|
|
34879
34972
|
const lineNo = t.index + 1;
|
|
34880
34973
|
const isCollapsed = collapsed.has(t.index);
|
|
34881
|
-
return /* @__PURE__ */ (0,
|
|
34974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
34882
34975
|
"div",
|
|
34883
34976
|
{
|
|
34884
34977
|
className: cn(
|
|
@@ -34887,7 +34980,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34887
34980
|
isCollapsed && "ods-yaml-viewer__line--collapsed"
|
|
34888
34981
|
),
|
|
34889
34982
|
children: [
|
|
34890
|
-
showLineNumbers && /* @__PURE__ */ (0,
|
|
34983
|
+
showLineNumbers && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34891
34984
|
"span",
|
|
34892
34985
|
{
|
|
34893
34986
|
className: "ods-yaml-viewer__line-no",
|
|
@@ -34895,7 +34988,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34895
34988
|
children: lineNo
|
|
34896
34989
|
}
|
|
34897
34990
|
),
|
|
34898
|
-
/* @__PURE__ */ (0,
|
|
34991
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34899
34992
|
"span",
|
|
34900
34993
|
{
|
|
34901
34994
|
className: "ods-yaml-viewer__indent",
|
|
@@ -34903,7 +34996,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34903
34996
|
"aria-hidden": "true"
|
|
34904
34997
|
}
|
|
34905
34998
|
),
|
|
34906
|
-
t.hasChildren ? /* @__PURE__ */ (0,
|
|
34999
|
+
t.hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34907
35000
|
"button",
|
|
34908
35001
|
{
|
|
34909
35002
|
type: "button",
|
|
@@ -34914,15 +35007,15 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34914
35007
|
onClick: () => toggle(t.index),
|
|
34915
35008
|
"aria-expanded": !isCollapsed,
|
|
34916
35009
|
"aria-label": isCollapsed ? "Expand" : "Collapse",
|
|
34917
|
-
children: /* @__PURE__ */ (0,
|
|
35010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_icons53.ChevronRightIcon, { size: "xs" })
|
|
34918
35011
|
}
|
|
34919
|
-
) : /* @__PURE__ */ (0,
|
|
34920
|
-
t.kind === "comment" && /* @__PURE__ */ (0,
|
|
34921
|
-
t.kind === "key" && /* @__PURE__ */ (0,
|
|
34922
|
-
t.raw.trim().startsWith("-") && /* @__PURE__ */ (0,
|
|
34923
|
-
/* @__PURE__ */ (0,
|
|
34924
|
-
/* @__PURE__ */ (0,
|
|
34925
|
-
t.inlineValue && /* @__PURE__ */ (0,
|
|
35012
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__caret-spacer" }),
|
|
35013
|
+
t.kind === "comment" && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__comment", children: t.raw.trim() }),
|
|
35014
|
+
t.kind === "key" && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_jsx_runtime153.Fragment, { children: [
|
|
35015
|
+
t.raw.trim().startsWith("-") && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
35016
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__key", children: t.key }),
|
|
35017
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__colon", children: ":" }),
|
|
35018
|
+
t.inlineValue && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
34926
35019
|
"span",
|
|
34927
35020
|
{
|
|
34928
35021
|
className: cn(
|
|
@@ -34935,11 +35028,11 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34935
35028
|
]
|
|
34936
35029
|
}
|
|
34937
35030
|
),
|
|
34938
|
-
isCollapsed && /* @__PURE__ */ (0,
|
|
35031
|
+
isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__preview", children: " \u2026" })
|
|
34939
35032
|
] }),
|
|
34940
|
-
t.kind === "sequence" && /* @__PURE__ */ (0,
|
|
34941
|
-
/* @__PURE__ */ (0,
|
|
34942
|
-
/* @__PURE__ */ (0,
|
|
35033
|
+
t.kind === "sequence" && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_jsx_runtime153.Fragment, { children: [
|
|
35034
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
35035
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34943
35036
|
"span",
|
|
34944
35037
|
{
|
|
34945
35038
|
className: cn(
|
|
@@ -34950,7 +35043,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34950
35043
|
}
|
|
34951
35044
|
)
|
|
34952
35045
|
] }),
|
|
34953
|
-
t.kind === "scalar" && /* @__PURE__ */ (0,
|
|
35046
|
+
t.kind === "scalar" && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
34954
35047
|
"span",
|
|
34955
35048
|
{
|
|
34956
35049
|
className: cn(
|
|
@@ -34960,7 +35053,7 @@ var YamlViewer = (0, import_react173.forwardRef)(
|
|
|
34960
35053
|
children: t.raw.trim()
|
|
34961
35054
|
}
|
|
34962
35055
|
),
|
|
34963
|
-
t.kind === "blank" && /* @__PURE__ */ (0,
|
|
35056
|
+
t.kind === "blank" && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { children: "\xA0" })
|
|
34964
35057
|
]
|
|
34965
35058
|
},
|
|
34966
35059
|
t.index
|
|
@@ -35016,8 +35109,8 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
35016
35109
|
(0, import_react173.useEffect)(() => {
|
|
35017
35110
|
validate(initial);
|
|
35018
35111
|
}, []);
|
|
35019
|
-
return /* @__PURE__ */ (0,
|
|
35020
|
-
parseError && /* @__PURE__ */ (0,
|
|
35112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "ods-yaml-viewer__edit", children: [
|
|
35113
|
+
parseError && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
35021
35114
|
InlineMessage,
|
|
35022
35115
|
{
|
|
35023
35116
|
tone: "danger",
|
|
@@ -35034,7 +35127,7 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
35034
35127
|
]
|
|
35035
35128
|
}
|
|
35036
35129
|
),
|
|
35037
|
-
/* @__PURE__ */ (0,
|
|
35130
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
35038
35131
|
CodeEditor,
|
|
35039
35132
|
{
|
|
35040
35133
|
value: text,
|
|
@@ -35438,7 +35531,7 @@ function useTraceTimeline({
|
|
|
35438
35531
|
var import_config = require("@octaviaflow/config");
|
|
35439
35532
|
var import_react180 = require("react");
|
|
35440
35533
|
var import_react_aria15 = require("react-aria");
|
|
35441
|
-
var
|
|
35534
|
+
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
35442
35535
|
var OdsContext = (0, import_react180.createContext)(null);
|
|
35443
35536
|
function OdsProvider({ config: userConfig, children }) {
|
|
35444
35537
|
const resolved = (0, import_react180.useMemo)(() => (0, import_config.resolveConfig)(userConfig), [userConfig]);
|
|
@@ -35459,7 +35552,7 @@ function OdsProvider({ config: userConfig, children }) {
|
|
|
35459
35552
|
}
|
|
35460
35553
|
}, [resolved]);
|
|
35461
35554
|
const contextValue = (0, import_react180.useMemo)(() => ({ config: resolved }), [resolved]);
|
|
35462
|
-
return /* @__PURE__ */ (0,
|
|
35555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(OdsContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_react_aria15.OverlayProvider, { children }) });
|
|
35463
35556
|
}
|
|
35464
35557
|
function useOds() {
|
|
35465
35558
|
const ctx = (0, import_react180.useContext)(OdsContext);
|
|
@@ -35920,6 +36013,7 @@ function applyVerticalLayout(nodes, edges) {
|
|
|
35920
36013
|
Spotlight,
|
|
35921
36014
|
Stack,
|
|
35922
36015
|
Stat,
|
|
36016
|
+
StatusList,
|
|
35923
36017
|
StatusTiles,
|
|
35924
36018
|
Stepper,
|
|
35925
36019
|
Switch,
|