@octaviaflow/core 3.1.0-beta.75 → 3.1.0-beta.76
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/chunk-CVU6QDOL.js +1696 -0
- package/dist/chunk-CVU6QDOL.js.map +1 -0
- package/dist/chunk-PZIWTCI6.js +1690 -0
- package/dist/chunk-PZIWTCI6.js.map +1 -0
- package/dist/chunk-REEBXURQ.js +1646 -0
- package/dist/chunk-REEBXURQ.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +17 -3
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/BlogCard/BlogCard.d.ts +1 -1
- package/dist/components/BlogCard/BlogCard.d.ts.map +1 -1
- package/dist/components/KanbanCard/KanbanCard.d.ts +1 -1
- package/dist/components/KanbanCard/KanbanCard.d.ts.map +1 -1
- package/dist/components/MembersSettings/MembersSettings.d.ts.map +1 -1
- package/dist/components/OrganizationSettings/OrganizationSettings.d.ts.map +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts +1 -1
- package/dist/components/SettingsLayout/SettingsLayout.d.ts.map +1 -1
- package/dist/components/TemplateCard/TemplateCard.d.ts +1 -1
- package/dist/components/TemplateCard/TemplateCard.d.ts.map +1 -1
- package/dist/components/TestimonialCard/TestimonialCard.d.ts +1 -1
- package/dist/components/TestimonialCard/TestimonialCard.d.ts.map +1 -1
- package/dist/components/UserCard/UserCard.d.ts +1 -1
- package/dist/components/UserCard/UserCard.d.ts.map +1 -1
- package/dist/index.cjs +1477 -1482
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1137 -1119
- package/dist/index.js.map +1 -1
- package/dist/marketing.cjs +228 -260
- package/dist/marketing.cjs.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
useViewportOrNull
|
|
29
29
|
} from "./chunk-2N74IQCL.js";
|
|
30
30
|
import {
|
|
31
|
+
AVATAR_PALETTE_SIZE,
|
|
31
32
|
Avatar,
|
|
32
33
|
AvatarStack,
|
|
33
34
|
BlogCard,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
CountUp,
|
|
41
42
|
TestimonialCard,
|
|
42
43
|
Textarea,
|
|
44
|
+
avatarPaletteIndex,
|
|
43
45
|
easeLinear,
|
|
44
46
|
easeOutCubic,
|
|
45
47
|
easeOutExpo,
|
|
@@ -48,7 +50,7 @@ import {
|
|
|
48
50
|
useTextareaCommands,
|
|
49
51
|
useTextareaSelection,
|
|
50
52
|
useTextareaTools
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-REEBXURQ.js";
|
|
52
54
|
import {
|
|
53
55
|
$05678f3aee5e7d1a$export$6d08773d2e66f8f2,
|
|
54
56
|
$384704861d32dbed$export$bca9d026f8e704eb,
|
|
@@ -17121,7 +17123,7 @@ function MembersSettings({
|
|
|
17121
17123
|
src: m.avatar?.src,
|
|
17122
17124
|
initials: m.avatar?.initials,
|
|
17123
17125
|
alt: "",
|
|
17124
|
-
seed: m.
|
|
17126
|
+
seed: m.name
|
|
17125
17127
|
}
|
|
17126
17128
|
),
|
|
17127
17129
|
/* @__PURE__ */ jsxs71("span", { className: "ods-members-settings__person-text", children: [
|
|
@@ -17181,6 +17183,8 @@ function MembersSettings({
|
|
|
17181
17183
|
/* @__PURE__ */ jsx72(
|
|
17182
17184
|
FormSection,
|
|
17183
17185
|
{
|
|
17186
|
+
className: "ods-settings-section",
|
|
17187
|
+
divided: false,
|
|
17184
17188
|
title: "Members",
|
|
17185
17189
|
description: `${members.length} ${members.length === 1 ? "person" : "people"} in this workspace.`,
|
|
17186
17190
|
footer: canManage && onInvite ? /* @__PURE__ */ jsx72(Button, { variant: "primary", size: "sm", onClick: () => setInviteOpen(true), children: "Invite member" }) : void 0,
|
|
@@ -17193,43 +17197,52 @@ function MembersSettings({
|
|
|
17193
17197
|
) : /* @__PURE__ */ jsx72(DataTable, { columns, data: members, getRowId: (m) => m.id })
|
|
17194
17198
|
}
|
|
17195
17199
|
),
|
|
17196
|
-
joinRequests && (onApproveRequest || onRejectRequest) && /* @__PURE__ */ jsx72(
|
|
17197
|
-
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
|
|
17218
|
-
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
|
|
17222
|
-
|
|
17223
|
-
|
|
17224
|
-
onClick: () => runMaybeAsync(
|
|
17225
|
-
onApproveRequest(request),
|
|
17226
|
-
(v) => setBusyId(v ? `approve-${request.id}` : null)
|
|
17200
|
+
joinRequests && (onApproveRequest || onRejectRequest) && /* @__PURE__ */ jsx72(
|
|
17201
|
+
FormSection,
|
|
17202
|
+
{
|
|
17203
|
+
className: "ods-settings-section",
|
|
17204
|
+
divided: false,
|
|
17205
|
+
title: "Join requests",
|
|
17206
|
+
description: "People who asked to join this workspace.",
|
|
17207
|
+
children: joinRequests.length === 0 ? /* @__PURE__ */ jsx72(EmptyState, { title: "No pending requests", size: "sm" }) : /* @__PURE__ */ jsx72("ul", { className: "ods-members-settings__requests", children: joinRequests.map((request) => /* @__PURE__ */ jsxs71("li", { className: "ods-members-settings__request", children: [
|
|
17208
|
+
/* @__PURE__ */ jsxs71("span", { className: "ods-members-settings__person", children: [
|
|
17209
|
+
/* @__PURE__ */ jsx72(Avatar, { size: "sm", alt: "", seed: request.name ?? request.email }),
|
|
17210
|
+
/* @__PURE__ */ jsxs71("span", { className: "ods-members-settings__person-text", children: [
|
|
17211
|
+
/* @__PURE__ */ jsx72("span", { className: "ods-members-settings__person-name", children: request.name ?? request.email }),
|
|
17212
|
+
/* @__PURE__ */ jsx72("span", { className: "ods-members-settings__person-email", children: request.name ? request.email : request.requestedAt ?? "" })
|
|
17213
|
+
] })
|
|
17214
|
+
] }),
|
|
17215
|
+
/* @__PURE__ */ jsxs71("span", { className: "ods-members-settings__request-actions", children: [
|
|
17216
|
+
onRejectRequest && /* @__PURE__ */ jsx72(
|
|
17217
|
+
Button,
|
|
17218
|
+
{
|
|
17219
|
+
variant: "ghost",
|
|
17220
|
+
size: "sm",
|
|
17221
|
+
loading: busyId === `reject-${request.id}`,
|
|
17222
|
+
onClick: () => runMaybeAsync(
|
|
17223
|
+
onRejectRequest(request),
|
|
17224
|
+
(v) => setBusyId(v ? `reject-${request.id}` : null)
|
|
17225
|
+
),
|
|
17226
|
+
children: "Decline"
|
|
17227
|
+
}
|
|
17227
17228
|
),
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
|
|
17229
|
+
onApproveRequest && /* @__PURE__ */ jsx72(
|
|
17230
|
+
Button,
|
|
17231
|
+
{
|
|
17232
|
+
variant: "secondary",
|
|
17233
|
+
size: "sm",
|
|
17234
|
+
loading: busyId === `approve-${request.id}`,
|
|
17235
|
+
onClick: () => runMaybeAsync(
|
|
17236
|
+
onApproveRequest(request),
|
|
17237
|
+
(v) => setBusyId(v ? `approve-${request.id}` : null)
|
|
17238
|
+
),
|
|
17239
|
+
children: "Approve"
|
|
17240
|
+
}
|
|
17241
|
+
)
|
|
17242
|
+
] })
|
|
17243
|
+
] }, request.id)) })
|
|
17244
|
+
}
|
|
17245
|
+
),
|
|
17233
17246
|
/* @__PURE__ */ jsx72(
|
|
17234
17247
|
ConfirmDialog,
|
|
17235
17248
|
{
|
|
@@ -17353,7 +17366,7 @@ function OrganizationSettings({
|
|
|
17353
17366
|
}
|
|
17354
17367
|
};
|
|
17355
17368
|
return /* @__PURE__ */ jsxs73("div", { className: "ods-org-settings", children: [
|
|
17356
|
-
/* @__PURE__ */ jsx74(FormSection, { title: "Workspace", children: /* @__PURE__ */ jsxs73("div", { className: "ods-org-settings__fields", children: [
|
|
17369
|
+
/* @__PURE__ */ jsx74(FormSection, { className: "ods-settings-section", divided: false, title: "Workspace", children: /* @__PURE__ */ jsxs73("div", { className: "ods-org-settings__fields", children: [
|
|
17357
17370
|
/* @__PURE__ */ jsx74(
|
|
17358
17371
|
Input,
|
|
17359
17372
|
{
|
|
@@ -17406,56 +17419,74 @@ function OrganizationSettings({
|
|
|
17406
17419
|
),
|
|
17407
17420
|
domain && /* @__PURE__ */ jsx74(Input, { label: "Domain", value: domain, disabled: true, readOnly: true })
|
|
17408
17421
|
] }) }),
|
|
17409
|
-
(values.requireApproval !== void 0 || values.discoverability !== void 0) && /* @__PURE__ */ jsxs73(
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17422
|
+
(values.requireApproval !== void 0 || values.discoverability !== void 0) && /* @__PURE__ */ jsxs73(
|
|
17423
|
+
FormSection,
|
|
17424
|
+
{
|
|
17425
|
+
className: "ods-settings-section",
|
|
17426
|
+
divided: false,
|
|
17427
|
+
title: "Access",
|
|
17428
|
+
description: "How new people get into this workspace.",
|
|
17429
|
+
children: [
|
|
17430
|
+
values.requireApproval !== void 0 && /* @__PURE__ */ jsx74(
|
|
17431
|
+
SettingsRow,
|
|
17417
17432
|
{
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17433
|
+
title: "Require approval",
|
|
17434
|
+
description: "An admin must approve every join request.",
|
|
17435
|
+
control: /* @__PURE__ */ jsx74(
|
|
17436
|
+
Switch,
|
|
17437
|
+
{
|
|
17438
|
+
"aria-label": "Require approval",
|
|
17439
|
+
checked: draft.requireApproval ?? false,
|
|
17440
|
+
onChange: (v) => set("requireApproval", v),
|
|
17441
|
+
disabled: busy
|
|
17442
|
+
}
|
|
17443
|
+
)
|
|
17422
17444
|
}
|
|
17423
|
-
)
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
values.discoverability !== void 0 && /* @__PURE__ */ jsx74(
|
|
17427
|
-
SettingsRow,
|
|
17428
|
-
{
|
|
17429
|
-
title: "Domain discovery",
|
|
17430
|
-
description: "Let verified same-domain signups find this workspace and request to join. Off = invisible; invitation only.",
|
|
17431
|
-
control: /* @__PURE__ */ jsx74(
|
|
17432
|
-
Switch,
|
|
17445
|
+
),
|
|
17446
|
+
values.discoverability !== void 0 && /* @__PURE__ */ jsx74(
|
|
17447
|
+
SettingsRow,
|
|
17433
17448
|
{
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17449
|
+
title: "Domain discovery",
|
|
17450
|
+
description: "Let verified same-domain signups find this workspace and request to join. Off = invisible; invitation only.",
|
|
17451
|
+
control: /* @__PURE__ */ jsx74(
|
|
17452
|
+
Switch,
|
|
17453
|
+
{
|
|
17454
|
+
"aria-label": "Domain discovery",
|
|
17455
|
+
checked: draft.discoverability === "request",
|
|
17456
|
+
onChange: (v) => set("discoverability", v ? "request" : "private"),
|
|
17457
|
+
disabled: busy
|
|
17458
|
+
}
|
|
17459
|
+
)
|
|
17438
17460
|
}
|
|
17439
17461
|
)
|
|
17440
|
-
}
|
|
17441
|
-
)
|
|
17442
|
-
] }),
|
|
17443
|
-
summary && /* @__PURE__ */ jsx74(FormSection, { title: "Plan & usage", description: "Managed by the platform.", children: /* @__PURE__ */ jsx74(
|
|
17444
|
-
DescriptionList,
|
|
17445
|
-
{
|
|
17446
|
-
items: [
|
|
17447
|
-
...summary.plan !== void 0 ? [
|
|
17448
|
-
{
|
|
17449
|
-
label: "Plan",
|
|
17450
|
-
value: /* @__PURE__ */ jsx74(Badge, { variant: "info", children: summary.plan })
|
|
17451
|
-
}
|
|
17452
|
-
] : [],
|
|
17453
|
-
...summary.memberCount !== void 0 ? [{ label: "Members", value: String(summary.memberCount) }] : [],
|
|
17454
|
-
...summary.type !== void 0 ? [{ label: "Type", value: summary.type }] : [],
|
|
17455
|
-
...summary.createdAt !== void 0 ? [{ label: "Created", value: summary.createdAt }] : []
|
|
17456
17462
|
]
|
|
17457
17463
|
}
|
|
17458
|
-
)
|
|
17464
|
+
),
|
|
17465
|
+
summary && /* @__PURE__ */ jsx74(
|
|
17466
|
+
FormSection,
|
|
17467
|
+
{
|
|
17468
|
+
className: "ods-settings-section",
|
|
17469
|
+
divided: false,
|
|
17470
|
+
title: "Plan & usage",
|
|
17471
|
+
description: "Managed by the platform.",
|
|
17472
|
+
children: /* @__PURE__ */ jsx74(
|
|
17473
|
+
DescriptionList,
|
|
17474
|
+
{
|
|
17475
|
+
items: [
|
|
17476
|
+
...summary.plan !== void 0 ? [
|
|
17477
|
+
{
|
|
17478
|
+
label: "Plan",
|
|
17479
|
+
value: /* @__PURE__ */ jsx74(Badge, { variant: "info", children: summary.plan })
|
|
17480
|
+
}
|
|
17481
|
+
] : [],
|
|
17482
|
+
...summary.memberCount !== void 0 ? [{ label: "Members", value: String(summary.memberCount) }] : [],
|
|
17483
|
+
...summary.type !== void 0 ? [{ label: "Type", value: summary.type }] : [],
|
|
17484
|
+
...summary.createdAt !== void 0 ? [{ label: "Created", value: summary.createdAt }] : []
|
|
17485
|
+
]
|
|
17486
|
+
}
|
|
17487
|
+
)
|
|
17488
|
+
}
|
|
17489
|
+
),
|
|
17459
17490
|
children,
|
|
17460
17491
|
onSave && !readOnly && /* @__PURE__ */ jsx74("div", { className: "ods-org-settings__footer", children: /* @__PURE__ */ jsx74(
|
|
17461
17492
|
Button,
|
|
@@ -17537,7 +17568,7 @@ function ProfileSettings({
|
|
|
17537
17568
|
}
|
|
17538
17569
|
};
|
|
17539
17570
|
return /* @__PURE__ */ jsxs74("div", { className: "ods-profile-settings", children: [
|
|
17540
|
-
/* @__PURE__ */ jsx75(FormSection, { title: "Identity", children: /* @__PURE__ */ jsxs74("div", { className: "ods-profile-settings__identity", children: [
|
|
17571
|
+
/* @__PURE__ */ jsx75(FormSection, { className: "ods-settings-section", divided: false, title: "Identity", children: /* @__PURE__ */ jsxs74("div", { className: "ods-profile-settings__identity", children: [
|
|
17541
17572
|
/* @__PURE__ */ jsxs74("div", { className: "ods-profile-settings__avatar", children: [
|
|
17542
17573
|
/* @__PURE__ */ jsx75(
|
|
17543
17574
|
Avatar,
|
|
@@ -17546,7 +17577,7 @@ function ProfileSettings({
|
|
|
17546
17577
|
src: avatar?.src,
|
|
17547
17578
|
initials: avatar?.initials,
|
|
17548
17579
|
alt: "Your avatar",
|
|
17549
|
-
seed: email
|
|
17580
|
+
seed: `${values.firstName} ${values.lastName}`.trim() || email
|
|
17550
17581
|
}
|
|
17551
17582
|
),
|
|
17552
17583
|
onAvatarChange && /* @__PURE__ */ jsx75(Button, { variant: "ghost", size: "sm", onClick: onAvatarChange, disabled: busy, children: "Change avatar" })
|
|
@@ -17624,7 +17655,7 @@ function ProfileSettings({
|
|
|
17624
17655
|
)
|
|
17625
17656
|
] })
|
|
17626
17657
|
] }) }),
|
|
17627
|
-
showPreferences && /* @__PURE__ */ jsxs74(FormSection, { title: "Preferences", children: [
|
|
17658
|
+
showPreferences && /* @__PURE__ */ jsxs74(FormSection, { className: "ods-settings-section", divided: false, title: "Preferences", children: [
|
|
17628
17659
|
values.theme !== void 0 && /* @__PURE__ */ jsx75(
|
|
17629
17660
|
SettingsRow,
|
|
17630
17661
|
{
|
|
@@ -17682,7 +17713,7 @@ function ProfileSettings({
|
|
|
17682
17713
|
}
|
|
17683
17714
|
)
|
|
17684
17715
|
] }),
|
|
17685
|
-
showNotifications && /* @__PURE__ */ jsxs74(FormSection, { title: "Notifications", children: [
|
|
17716
|
+
showNotifications && /* @__PURE__ */ jsxs74(FormSection, { className: "ods-settings-section", divided: false, title: "Notifications", children: [
|
|
17686
17717
|
values.notifyEmail !== void 0 && /* @__PURE__ */ jsx75(
|
|
17687
17718
|
SettingsRow,
|
|
17688
17719
|
{
|
|
@@ -17729,7 +17760,7 @@ function ProfileSettings({
|
|
|
17729
17760
|
}
|
|
17730
17761
|
)
|
|
17731
17762
|
] }),
|
|
17732
|
-
onChangePassword && /* @__PURE__ */ jsx75(FormSection, { title: "Security", children: /* @__PURE__ */ jsx75(
|
|
17763
|
+
onChangePassword && /* @__PURE__ */ jsx75(FormSection, { className: "ods-settings-section", divided: false, title: "Security", children: /* @__PURE__ */ jsx75(
|
|
17733
17764
|
SettingsRow,
|
|
17734
17765
|
{
|
|
17735
17766
|
title: "Password",
|
|
@@ -18739,11 +18770,7 @@ var IntegrationCard = forwardRef53(function IntegrationCard2({
|
|
|
18739
18770
|
IntegrationCard.displayName = "IntegrationCard";
|
|
18740
18771
|
|
|
18741
18772
|
// src/components/KanbanCard/KanbanCard.tsx
|
|
18742
|
-
import {
|
|
18743
|
-
CalendarIcon as CalendarIcon2,
|
|
18744
|
-
ChatIcon,
|
|
18745
|
-
OverflowMenuHorizontalIcon as OverflowMenuHorizontalIcon2
|
|
18746
|
-
} from "@octaviaflow/icons";
|
|
18773
|
+
import { CalendarIcon as CalendarIcon2, ChatIcon, OverflowMenuHorizontalIcon as OverflowMenuHorizontalIcon2 } from "@octaviaflow/icons";
|
|
18747
18774
|
import {
|
|
18748
18775
|
forwardRef as forwardRef54,
|
|
18749
18776
|
useId as useId32
|
|
@@ -18752,144 +18779,136 @@ import { Fragment as Fragment34, jsx as jsx81, jsxs as jsxs79 } from "react/jsx-
|
|
|
18752
18779
|
function isAssigneeObject(v) {
|
|
18753
18780
|
return typeof v === "object" && v !== null && "name" in v;
|
|
18754
18781
|
}
|
|
18755
|
-
var KanbanCard = forwardRef54(
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
const altText = assignee.avatar?.alt ?? (typeof assignee.name === "string" ? assignee.name : void 0);
|
|
18785
|
-
return /* @__PURE__ */ jsx81(
|
|
18786
|
-
Avatar,
|
|
18787
|
-
{
|
|
18788
|
-
size: "xs",
|
|
18789
|
-
src: assignee.avatar?.src,
|
|
18790
|
-
initials: assignee.avatar?.initials,
|
|
18791
|
-
alt: altText,
|
|
18792
|
-
className: "ods-kanban-card__assignee"
|
|
18793
|
-
}
|
|
18794
|
-
);
|
|
18795
|
-
}
|
|
18782
|
+
var KanbanCard = forwardRef54(function KanbanCard2({
|
|
18783
|
+
title,
|
|
18784
|
+
titleAs = "h3",
|
|
18785
|
+
tag,
|
|
18786
|
+
tags,
|
|
18787
|
+
badge,
|
|
18788
|
+
date,
|
|
18789
|
+
comments,
|
|
18790
|
+
assignee,
|
|
18791
|
+
priority,
|
|
18792
|
+
onClick,
|
|
18793
|
+
onMore,
|
|
18794
|
+
moreLabel = "More options",
|
|
18795
|
+
href,
|
|
18796
|
+
disabled = false,
|
|
18797
|
+
radius = "sm",
|
|
18798
|
+
id: providedId,
|
|
18799
|
+
className,
|
|
18800
|
+
...rest
|
|
18801
|
+
}, ref) {
|
|
18802
|
+
const reactId = useId32();
|
|
18803
|
+
const baseId = providedId ?? `ods-kanban-card-${reactId}`;
|
|
18804
|
+
const titleId = `${baseId}-title`;
|
|
18805
|
+
const tagList = tags ?? (tag ? [tag] : []);
|
|
18806
|
+
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
18807
|
+
const renderAssignee = () => {
|
|
18808
|
+
if (!assignee) return null;
|
|
18809
|
+
if (isAssigneeObject(assignee)) {
|
|
18810
|
+
const altText = assignee.avatar?.alt ?? (typeof assignee.name === "string" ? assignee.name : void 0);
|
|
18796
18811
|
return /* @__PURE__ */ jsx81(
|
|
18797
|
-
|
|
18812
|
+
Avatar,
|
|
18798
18813
|
{
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18814
|
+
size: "xs",
|
|
18815
|
+
src: assignee.avatar?.src,
|
|
18816
|
+
initials: assignee.avatar?.initials,
|
|
18817
|
+
seed: assignee.avatar?.seed,
|
|
18818
|
+
palette: assignee.avatar?.palette,
|
|
18819
|
+
alt: altText,
|
|
18820
|
+
className: "ods-kanban-card__assignee"
|
|
18802
18821
|
}
|
|
18803
18822
|
);
|
|
18804
|
-
}
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
type: "button",
|
|
18813
|
-
className: "ods-kanban-card__more",
|
|
18814
|
-
"aria-label": moreLabel,
|
|
18815
|
-
onClick: (e) => {
|
|
18816
|
-
e.stopPropagation();
|
|
18817
|
-
onMore(e);
|
|
18818
|
-
},
|
|
18819
|
-
children: /* @__PURE__ */ jsx81(OverflowMenuHorizontalIcon2, { size: "xs" })
|
|
18820
|
-
}
|
|
18821
|
-
)
|
|
18822
|
-
] }),
|
|
18823
|
-
/* @__PURE__ */ jsx81(
|
|
18824
|
-
Card.Title,
|
|
18825
|
-
{
|
|
18826
|
-
as: titleAs,
|
|
18827
|
-
id: titleId,
|
|
18828
|
-
className: "ods-kanban-card__title",
|
|
18829
|
-
children: title
|
|
18830
|
-
}
|
|
18831
|
-
),
|
|
18832
|
-
(date || typeof comments === "number" || assignee) && /* @__PURE__ */ jsxs79("div", { className: "ods-kanban-card__footer", children: [
|
|
18833
|
-
/* @__PURE__ */ jsxs79("div", { className: "ods-kanban-card__meta", children: [
|
|
18834
|
-
date && /* @__PURE__ */ jsxs79("span", { className: "ods-kanban-card__date", children: [
|
|
18835
|
-
/* @__PURE__ */ jsx81(CalendarIcon2, { size: "xs" }),
|
|
18836
|
-
date
|
|
18837
|
-
] }),
|
|
18838
|
-
typeof comments === "number" && /* @__PURE__ */ jsxs79("span", { className: "ods-kanban-card__comments", children: [
|
|
18839
|
-
/* @__PURE__ */ jsx81(ChatIcon, { size: "xs" }),
|
|
18840
|
-
comments
|
|
18841
|
-
] })
|
|
18842
|
-
] }),
|
|
18843
|
-
renderAssignee()
|
|
18844
|
-
] })
|
|
18845
|
-
] });
|
|
18846
|
-
const sharedClass = cn(
|
|
18847
|
-
"ods-kanban-card",
|
|
18848
|
-
priority && `ods-kanban-card--${priority}`,
|
|
18849
|
-
isInteractive && "ods-kanban-card--interactive",
|
|
18850
|
-
disabled && "ods-kanban-card--disabled",
|
|
18851
|
-
className
|
|
18823
|
+
}
|
|
18824
|
+
return /* @__PURE__ */ jsx81(
|
|
18825
|
+
"div",
|
|
18826
|
+
{
|
|
18827
|
+
className: "ods-kanban-card__assignee ods-kanban-card__assignee--legacy",
|
|
18828
|
+
"aria-hidden": "true",
|
|
18829
|
+
children: assignee
|
|
18830
|
+
}
|
|
18852
18831
|
);
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18832
|
+
};
|
|
18833
|
+
const body = /* @__PURE__ */ jsxs79(Fragment34, { children: [
|
|
18834
|
+
(tagList.length > 0 || badge || onMore) && /* @__PURE__ */ jsxs79("div", { className: "ods-kanban-card__head", children: [
|
|
18835
|
+
tagList.length > 0 && /* @__PURE__ */ jsx81("span", { className: "ods-kanban-card__tags", children: tagList.map((t, i) => /* @__PURE__ */ jsx81("span", { className: "ods-kanban-card__tag", children: t }, i)) }),
|
|
18836
|
+
badge && /* @__PURE__ */ jsx81("span", { className: "ods-kanban-card__badge", children: badge }),
|
|
18837
|
+
onMore && /* @__PURE__ */ jsx81(
|
|
18838
|
+
"button",
|
|
18856
18839
|
{
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
...rest,
|
|
18866
|
-
ref,
|
|
18867
|
-
href,
|
|
18868
|
-
id: baseId,
|
|
18869
|
-
onClick,
|
|
18870
|
-
children: body
|
|
18871
|
-
}
|
|
18872
|
-
)
|
|
18840
|
+
type: "button",
|
|
18841
|
+
className: "ods-kanban-card__more",
|
|
18842
|
+
"aria-label": moreLabel,
|
|
18843
|
+
onClick: (e) => {
|
|
18844
|
+
e.stopPropagation();
|
|
18845
|
+
onMore(e);
|
|
18846
|
+
},
|
|
18847
|
+
children: /* @__PURE__ */ jsx81(OverflowMenuHorizontalIcon2, { size: "xs" })
|
|
18873
18848
|
}
|
|
18874
|
-
)
|
|
18875
|
-
}
|
|
18849
|
+
)
|
|
18850
|
+
] }),
|
|
18851
|
+
/* @__PURE__ */ jsx81(Card.Title, { as: titleAs, id: titleId, className: "ods-kanban-card__title", children: title }),
|
|
18852
|
+
(date || typeof comments === "number" || assignee) && /* @__PURE__ */ jsxs79("div", { className: "ods-kanban-card__footer", children: [
|
|
18853
|
+
/* @__PURE__ */ jsxs79("div", { className: "ods-kanban-card__meta", children: [
|
|
18854
|
+
date && /* @__PURE__ */ jsxs79("span", { className: "ods-kanban-card__date", children: [
|
|
18855
|
+
/* @__PURE__ */ jsx81(CalendarIcon2, { size: "xs" }),
|
|
18856
|
+
date
|
|
18857
|
+
] }),
|
|
18858
|
+
typeof comments === "number" && /* @__PURE__ */ jsxs79("span", { className: "ods-kanban-card__comments", children: [
|
|
18859
|
+
/* @__PURE__ */ jsx81(ChatIcon, { size: "xs" }),
|
|
18860
|
+
comments
|
|
18861
|
+
] })
|
|
18862
|
+
] }),
|
|
18863
|
+
renderAssignee()
|
|
18864
|
+
] })
|
|
18865
|
+
] });
|
|
18866
|
+
const sharedClass = cn(
|
|
18867
|
+
"ods-kanban-card",
|
|
18868
|
+
priority && `ods-kanban-card--${priority}`,
|
|
18869
|
+
isInteractive && "ods-kanban-card--interactive",
|
|
18870
|
+
disabled && "ods-kanban-card--disabled",
|
|
18871
|
+
className
|
|
18872
|
+
);
|
|
18873
|
+
if (href && !disabled) {
|
|
18876
18874
|
return /* @__PURE__ */ jsx81(
|
|
18877
18875
|
Card,
|
|
18878
18876
|
{
|
|
18879
|
-
|
|
18880
|
-
ref,
|
|
18881
|
-
id: baseId,
|
|
18877
|
+
asChild: true,
|
|
18882
18878
|
radius,
|
|
18883
18879
|
padding: "none",
|
|
18884
|
-
onClick: isInteractive ? onClick : void 0,
|
|
18885
|
-
disabled,
|
|
18886
18880
|
className: sharedClass,
|
|
18887
18881
|
"aria-labelledby": titleId,
|
|
18888
|
-
children:
|
|
18882
|
+
children: /* @__PURE__ */ jsx81(
|
|
18883
|
+
"a",
|
|
18884
|
+
{
|
|
18885
|
+
...rest,
|
|
18886
|
+
ref,
|
|
18887
|
+
href,
|
|
18888
|
+
id: baseId,
|
|
18889
|
+
onClick,
|
|
18890
|
+
children: body
|
|
18891
|
+
}
|
|
18892
|
+
)
|
|
18889
18893
|
}
|
|
18890
18894
|
);
|
|
18891
18895
|
}
|
|
18892
|
-
|
|
18896
|
+
return /* @__PURE__ */ jsx81(
|
|
18897
|
+
Card,
|
|
18898
|
+
{
|
|
18899
|
+
...rest,
|
|
18900
|
+
ref,
|
|
18901
|
+
id: baseId,
|
|
18902
|
+
radius,
|
|
18903
|
+
padding: "none",
|
|
18904
|
+
onClick: isInteractive ? onClick : void 0,
|
|
18905
|
+
disabled,
|
|
18906
|
+
className: sharedClass,
|
|
18907
|
+
"aria-labelledby": titleId,
|
|
18908
|
+
children: body
|
|
18909
|
+
}
|
|
18910
|
+
);
|
|
18911
|
+
});
|
|
18893
18912
|
KanbanCard.displayName = "KanbanCard";
|
|
18894
18913
|
|
|
18895
18914
|
// src/components/Kbd/Kbd.tsx
|
|
@@ -28368,11 +28387,68 @@ var ScrollArea = forwardRef81(
|
|
|
28368
28387
|
);
|
|
28369
28388
|
ScrollArea.displayName = "ScrollArea";
|
|
28370
28389
|
|
|
28390
|
+
// src/components/SettingsLayout/SettingsLayout.tsx
|
|
28391
|
+
import { Fragment as Fragment47, jsx as jsx116, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
28392
|
+
function SettingsLayout({
|
|
28393
|
+
groups,
|
|
28394
|
+
activeId,
|
|
28395
|
+
onNavigate,
|
|
28396
|
+
navLabel = "Settings",
|
|
28397
|
+
children,
|
|
28398
|
+
className,
|
|
28399
|
+
...rest
|
|
28400
|
+
}) {
|
|
28401
|
+
return /* @__PURE__ */ jsxs112("div", { className: cn("ods-settings-layout", className), ...rest, children: [
|
|
28402
|
+
/* @__PURE__ */ jsx116("nav", { className: "ods-settings-layout__nav", "aria-label": navLabel, children: groups.map((group, gi) => /* @__PURE__ */ jsxs112(
|
|
28403
|
+
"div",
|
|
28404
|
+
{
|
|
28405
|
+
className: "ods-settings-layout__group",
|
|
28406
|
+
children: [
|
|
28407
|
+
group.label && /* @__PURE__ */ jsx116("div", { className: "ods-settings-layout__group-label", children: group.label }),
|
|
28408
|
+
/* @__PURE__ */ jsx116("ul", { className: "ods-settings-layout__list", children: group.items.map((item) => {
|
|
28409
|
+
const active = item.id === activeId;
|
|
28410
|
+
const content = /* @__PURE__ */ jsxs112(Fragment47, { children: [
|
|
28411
|
+
item.icon && /* @__PURE__ */ jsx116("span", { className: "ods-settings-layout__item-icon", "aria-hidden": "true", children: item.icon }),
|
|
28412
|
+
/* @__PURE__ */ jsx116("span", { className: "ods-settings-layout__item-label", children: item.label })
|
|
28413
|
+
] });
|
|
28414
|
+
const itemClass = cn(
|
|
28415
|
+
"ods-settings-layout__item",
|
|
28416
|
+
active && "ods-settings-layout__item--active"
|
|
28417
|
+
);
|
|
28418
|
+
return /* @__PURE__ */ jsx116("li", { children: item.href ? /* @__PURE__ */ jsx116(
|
|
28419
|
+
"a",
|
|
28420
|
+
{
|
|
28421
|
+
className: itemClass,
|
|
28422
|
+
href: item.href,
|
|
28423
|
+
"aria-current": active ? "page" : void 0,
|
|
28424
|
+
onClick: () => onNavigate?.(item.id),
|
|
28425
|
+
children: content
|
|
28426
|
+
}
|
|
28427
|
+
) : /* @__PURE__ */ jsx116(
|
|
28428
|
+
"button",
|
|
28429
|
+
{
|
|
28430
|
+
type: "button",
|
|
28431
|
+
className: itemClass,
|
|
28432
|
+
"aria-current": active ? "page" : void 0,
|
|
28433
|
+
disabled: item.disabled,
|
|
28434
|
+
onClick: () => onNavigate?.(item.id),
|
|
28435
|
+
children: content
|
|
28436
|
+
}
|
|
28437
|
+
) }, item.id);
|
|
28438
|
+
}) })
|
|
28439
|
+
]
|
|
28440
|
+
},
|
|
28441
|
+
gi
|
|
28442
|
+
)) }),
|
|
28443
|
+
/* @__PURE__ */ jsx116("div", { className: "ods-settings-layout__content", children })
|
|
28444
|
+
] });
|
|
28445
|
+
}
|
|
28446
|
+
|
|
28371
28447
|
// src/components/Sheet/Sheet.tsx
|
|
28372
28448
|
import { AnimatePresence as AnimatePresence14, motion as motion22 } from "framer-motion";
|
|
28373
28449
|
import { useEffect as useEffect45 } from "react";
|
|
28374
28450
|
import { createPortal as createPortal14 } from "react-dom";
|
|
28375
|
-
import { Fragment as
|
|
28451
|
+
import { Fragment as Fragment48, jsx as jsx117, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
28376
28452
|
var slideVariants = {
|
|
28377
28453
|
top: { initial: { y: "-100%" }, animate: { y: 0 }, exit: { y: "-100%" } },
|
|
28378
28454
|
bottom: { initial: { y: "100%" }, animate: { y: 0 }, exit: { y: "100%" } },
|
|
@@ -28416,8 +28492,8 @@ function Sheet({
|
|
|
28416
28492
|
const variant = slideVariants[side];
|
|
28417
28493
|
const resolved = resolveSize(side, size);
|
|
28418
28494
|
const isVertical = side === "left" || side === "right";
|
|
28419
|
-
const content = /* @__PURE__ */
|
|
28420
|
-
/* @__PURE__ */
|
|
28495
|
+
const content = /* @__PURE__ */ jsx117(AnimatePresence14, { children: open && /* @__PURE__ */ jsxs113(Fragment48, { children: [
|
|
28496
|
+
/* @__PURE__ */ jsx117(
|
|
28421
28497
|
motion22.div,
|
|
28422
28498
|
{
|
|
28423
28499
|
className: "ods-sheet__backdrop",
|
|
@@ -28429,7 +28505,7 @@ function Sheet({
|
|
|
28429
28505
|
"aria-hidden": "true"
|
|
28430
28506
|
}
|
|
28431
28507
|
),
|
|
28432
|
-
/* @__PURE__ */
|
|
28508
|
+
/* @__PURE__ */ jsxs113(
|
|
28433
28509
|
motion22.div,
|
|
28434
28510
|
{
|
|
28435
28511
|
className: cn("ods-sheet", `ods-sheet--${side}`, className),
|
|
@@ -28442,13 +28518,13 @@ function Sheet({
|
|
|
28442
28518
|
exit: variant.exit,
|
|
28443
28519
|
transition: { type: "tween", ease: [0.32, 0.72, 0, 1], duration: 0.28 },
|
|
28444
28520
|
children: [
|
|
28445
|
-
(side === "bottom" || side === "top") && dragHandle && /* @__PURE__ */
|
|
28446
|
-
(title || description) && /* @__PURE__ */
|
|
28447
|
-
title && /* @__PURE__ */
|
|
28448
|
-
description && /* @__PURE__ */
|
|
28521
|
+
(side === "bottom" || side === "top") && dragHandle && /* @__PURE__ */ jsx117("div", { className: "ods-sheet__handle", "aria-hidden": "true" }),
|
|
28522
|
+
(title || description) && /* @__PURE__ */ jsxs113("header", { className: "ods-sheet__head", children: [
|
|
28523
|
+
title && /* @__PURE__ */ jsx117("h2", { className: "ods-sheet__title", children: title }),
|
|
28524
|
+
description && /* @__PURE__ */ jsx117("p", { className: "ods-sheet__desc", children: description })
|
|
28449
28525
|
] }),
|
|
28450
|
-
/* @__PURE__ */
|
|
28451
|
-
footer && /* @__PURE__ */
|
|
28526
|
+
/* @__PURE__ */ jsx117("div", { className: "ods-sheet__body", children }),
|
|
28527
|
+
footer && /* @__PURE__ */ jsx117("footer", { className: "ods-sheet__footer", children: footer })
|
|
28452
28528
|
]
|
|
28453
28529
|
}
|
|
28454
28530
|
)
|
|
@@ -28458,9 +28534,9 @@ function Sheet({
|
|
|
28458
28534
|
}
|
|
28459
28535
|
|
|
28460
28536
|
// src/components/Show/Show.tsx
|
|
28461
|
-
import { jsx as
|
|
28537
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
28462
28538
|
function Show({ above, below, children, ...rest }) {
|
|
28463
|
-
return /* @__PURE__ */
|
|
28539
|
+
return /* @__PURE__ */ jsx118(
|
|
28464
28540
|
"span",
|
|
28465
28541
|
{
|
|
28466
28542
|
"data-ods-show": "",
|
|
@@ -28475,7 +28551,7 @@ Show.displayName = "Show";
|
|
|
28475
28551
|
|
|
28476
28552
|
// src/components/Sidebar/Sidebar.tsx
|
|
28477
28553
|
import { useCallback as useCallback39, useEffect as useEffect46, useRef as useRef42, useState as useState56 } from "react";
|
|
28478
|
-
import { Fragment as
|
|
28554
|
+
import { Fragment as Fragment49, jsx as jsx119, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
28479
28555
|
function Sidebar({
|
|
28480
28556
|
variant = "expanded",
|
|
28481
28557
|
sections,
|
|
@@ -28553,7 +28629,7 @@ function Sidebar({
|
|
|
28553
28629
|
window.addEventListener("keydown", handler);
|
|
28554
28630
|
return () => window.removeEventListener("keydown", handler);
|
|
28555
28631
|
}, [overlayOpen]);
|
|
28556
|
-
return /* @__PURE__ */
|
|
28632
|
+
return /* @__PURE__ */ jsxs114(
|
|
28557
28633
|
"nav",
|
|
28558
28634
|
{
|
|
28559
28635
|
className: cn(
|
|
@@ -28568,7 +28644,7 @@ function Sidebar({
|
|
|
28568
28644
|
onMouseEnter: autoMode && !pinned ? handleEnter : void 0,
|
|
28569
28645
|
onMouseLeave: autoMode && !pinned ? handleLeave : void 0,
|
|
28570
28646
|
children: [
|
|
28571
|
-
showAsRail ? /* @__PURE__ */
|
|
28647
|
+
showAsRail ? /* @__PURE__ */ jsx119(
|
|
28572
28648
|
RailLayout,
|
|
28573
28649
|
{
|
|
28574
28650
|
sections: allSections,
|
|
@@ -28578,7 +28654,7 @@ function Sidebar({
|
|
|
28578
28654
|
tooltipDelay,
|
|
28579
28655
|
suppressTooltips: overlayOpen
|
|
28580
28656
|
}
|
|
28581
|
-
) : /* @__PURE__ */
|
|
28657
|
+
) : /* @__PURE__ */ jsx119(
|
|
28582
28658
|
ExpandedLayout,
|
|
28583
28659
|
{
|
|
28584
28660
|
sections: allSections,
|
|
@@ -28589,7 +28665,7 @@ function Sidebar({
|
|
|
28589
28665
|
onPinToggle: autoMode ? () => setPinned(!pinned) : void 0
|
|
28590
28666
|
}
|
|
28591
28667
|
),
|
|
28592
|
-
overlayOpen && /* @__PURE__ */
|
|
28668
|
+
overlayOpen && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__overlay", onMouseEnter: handleEnter, onMouseLeave: handleLeave, children: /* @__PURE__ */ jsx119(
|
|
28593
28669
|
ExpandedLayout,
|
|
28594
28670
|
{
|
|
28595
28671
|
sections: allSections,
|
|
@@ -28612,8 +28688,8 @@ function RailLayout({
|
|
|
28612
28688
|
tooltipDelay,
|
|
28613
28689
|
suppressTooltips
|
|
28614
28690
|
}) {
|
|
28615
|
-
return /* @__PURE__ */
|
|
28616
|
-
/* @__PURE__ */
|
|
28691
|
+
return /* @__PURE__ */ jsxs114(Fragment49, { children: [
|
|
28692
|
+
/* @__PURE__ */ jsx119("div", { className: "ods-sidebar__nav-rail", children: sections.flatMap((s) => s.items).map((item) => /* @__PURE__ */ jsx119(
|
|
28617
28693
|
RailItem,
|
|
28618
28694
|
{
|
|
28619
28695
|
item,
|
|
@@ -28622,8 +28698,8 @@ function RailLayout({
|
|
|
28622
28698
|
},
|
|
28623
28699
|
item.id
|
|
28624
28700
|
)) }),
|
|
28625
|
-
/* @__PURE__ */
|
|
28626
|
-
footerItems && footerItems.length > 0 && /* @__PURE__ */
|
|
28701
|
+
/* @__PURE__ */ jsx119("div", { className: "ods-sidebar__spacer" }),
|
|
28702
|
+
footerItems && footerItems.length > 0 && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__footer-rail", children: footerItems.map((item) => /* @__PURE__ */ jsx119(
|
|
28627
28703
|
RailItem,
|
|
28628
28704
|
{
|
|
28629
28705
|
item,
|
|
@@ -28632,24 +28708,24 @@ function RailLayout({
|
|
|
28632
28708
|
},
|
|
28633
28709
|
item.id
|
|
28634
28710
|
)) }),
|
|
28635
|
-
onToggle && /* @__PURE__ */
|
|
28711
|
+
onToggle && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__footer-control ods-sidebar__footer-control--rail", children: /* @__PURE__ */ jsx119(
|
|
28636
28712
|
"button",
|
|
28637
28713
|
{
|
|
28638
28714
|
type: "button",
|
|
28639
28715
|
className: "ods-sidebar__collapse ods-sidebar__collapse--rail",
|
|
28640
28716
|
onClick: onToggle,
|
|
28641
28717
|
"aria-label": "Expand sidebar",
|
|
28642
|
-
children: /* @__PURE__ */
|
|
28718
|
+
children: /* @__PURE__ */ jsx119(SidebarToggleIcon, { collapsed: true })
|
|
28643
28719
|
}
|
|
28644
28720
|
) }),
|
|
28645
|
-
user && /* @__PURE__ */
|
|
28721
|
+
user && /* @__PURE__ */ jsx119(SidebarUserRail, { user })
|
|
28646
28722
|
] });
|
|
28647
28723
|
}
|
|
28648
28724
|
function SidebarUserRail({ user }) {
|
|
28649
28725
|
const labelText = typeof user.name === "string" ? user.name : "User";
|
|
28650
|
-
const avatar = user.avatar ?? /* @__PURE__ */
|
|
28726
|
+
const avatar = user.avatar ?? /* @__PURE__ */ jsx119("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") });
|
|
28651
28727
|
if (user.menu && user.menu.length > 0) {
|
|
28652
|
-
return /* @__PURE__ */
|
|
28728
|
+
return /* @__PURE__ */ jsx119(
|
|
28653
28729
|
DropdownMenu,
|
|
28654
28730
|
{
|
|
28655
28731
|
trigger: avatar,
|
|
@@ -28660,7 +28736,7 @@ function SidebarUserRail({ user }) {
|
|
|
28660
28736
|
}
|
|
28661
28737
|
);
|
|
28662
28738
|
}
|
|
28663
|
-
return /* @__PURE__ */
|
|
28739
|
+
return /* @__PURE__ */ jsx119(
|
|
28664
28740
|
"button",
|
|
28665
28741
|
{
|
|
28666
28742
|
type: "button",
|
|
@@ -28697,7 +28773,7 @@ function RailItem({
|
|
|
28697
28773
|
};
|
|
28698
28774
|
const Comp = item.href ? "a" : "button";
|
|
28699
28775
|
const labelText = typeof item.label === "string" ? item.label : void 0;
|
|
28700
|
-
return /* @__PURE__ */
|
|
28776
|
+
return /* @__PURE__ */ jsxs114(
|
|
28701
28777
|
"div",
|
|
28702
28778
|
{
|
|
28703
28779
|
className: "ods-sidebar__rail-wrap",
|
|
@@ -28706,7 +28782,7 @@ function RailItem({
|
|
|
28706
28782
|
onFocus: show,
|
|
28707
28783
|
onBlur: hide,
|
|
28708
28784
|
children: [
|
|
28709
|
-
/* @__PURE__ */
|
|
28785
|
+
/* @__PURE__ */ jsx119(
|
|
28710
28786
|
Comp,
|
|
28711
28787
|
{
|
|
28712
28788
|
type: item.href ? void 0 : "button",
|
|
@@ -28721,24 +28797,24 @@ function RailItem({
|
|
|
28721
28797
|
"aria-label": labelText,
|
|
28722
28798
|
"aria-haspopup": hasChildren ? "menu" : void 0,
|
|
28723
28799
|
"aria-expanded": hasChildren ? open : void 0,
|
|
28724
|
-
children: /* @__PURE__ */
|
|
28800
|
+
children: /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-icon", children: item.icon })
|
|
28725
28801
|
}
|
|
28726
28802
|
),
|
|
28727
|
-
open && labelText && hasChildren && /* @__PURE__ */
|
|
28728
|
-
open && labelText && !hasChildren && /* @__PURE__ */
|
|
28729
|
-
/* @__PURE__ */
|
|
28730
|
-
item.shortcut && /* @__PURE__ */
|
|
28803
|
+
open && labelText && hasChildren && /* @__PURE__ */ jsx119(RailFlyout, { title: labelText, items: item.children ?? [] }),
|
|
28804
|
+
open && labelText && !hasChildren && /* @__PURE__ */ jsxs114("div", { className: "ods-sidebar__rail-tooltip", role: "tooltip", children: [
|
|
28805
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-tooltip-label", children: labelText }),
|
|
28806
|
+
item.shortcut && /* @__PURE__ */ jsx119("kbd", { className: "ods-sidebar__rail-kbd", children: item.shortcut })
|
|
28731
28807
|
] })
|
|
28732
28808
|
]
|
|
28733
28809
|
}
|
|
28734
28810
|
);
|
|
28735
28811
|
}
|
|
28736
28812
|
function RailFlyout({ title, items }) {
|
|
28737
|
-
return /* @__PURE__ */
|
|
28738
|
-
/* @__PURE__ */
|
|
28739
|
-
/* @__PURE__ */
|
|
28813
|
+
return /* @__PURE__ */ jsxs114("div", { className: "ods-sidebar__rail-flyout", role: "menu", children: [
|
|
28814
|
+
/* @__PURE__ */ jsx119("div", { className: "ods-sidebar__rail-flyout-header", children: /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-flyout-title", children: title }) }),
|
|
28815
|
+
/* @__PURE__ */ jsx119("ul", { className: "ods-sidebar__rail-flyout-list", children: items.map((child) => {
|
|
28740
28816
|
const ChildComp = child.href ? "a" : "button";
|
|
28741
|
-
return /* @__PURE__ */
|
|
28817
|
+
return /* @__PURE__ */ jsx119("li", { children: /* @__PURE__ */ jsxs114(
|
|
28742
28818
|
ChildComp,
|
|
28743
28819
|
{
|
|
28744
28820
|
type: child.href ? void 0 : "button",
|
|
@@ -28751,10 +28827,10 @@ function RailFlyout({ title, items }) {
|
|
|
28751
28827
|
),
|
|
28752
28828
|
"aria-current": child.active ? "page" : void 0,
|
|
28753
28829
|
children: [
|
|
28754
|
-
/* @__PURE__ */
|
|
28755
|
-
/* @__PURE__ */
|
|
28756
|
-
child.tag && /* @__PURE__ */
|
|
28757
|
-
child.badge && /* @__PURE__ */
|
|
28830
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-flyout-icon", children: child.icon }),
|
|
28831
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-flyout-label", children: child.label }),
|
|
28832
|
+
child.tag && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-flyout-tag", children: child.tag }),
|
|
28833
|
+
child.badge && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__rail-flyout-badge", children: child.badge })
|
|
28758
28834
|
]
|
|
28759
28835
|
}
|
|
28760
28836
|
) }, child.id);
|
|
@@ -28770,14 +28846,14 @@ function ExpandedLayout({
|
|
|
28770
28846
|
onPinToggle
|
|
28771
28847
|
}) {
|
|
28772
28848
|
const hasFooterControl = Boolean(onPinToggle || onToggle);
|
|
28773
|
-
return /* @__PURE__ */
|
|
28774
|
-
/* @__PURE__ */
|
|
28775
|
-
section.label && /* @__PURE__ */
|
|
28776
|
-
section.items.map((item) => /* @__PURE__ */
|
|
28849
|
+
return /* @__PURE__ */ jsxs114(Fragment49, { children: [
|
|
28850
|
+
/* @__PURE__ */ jsx119("div", { className: "ods-sidebar__body", children: sections.map((section, sIdx) => /* @__PURE__ */ jsxs114("div", { className: "ods-sidebar__section", children: [
|
|
28851
|
+
section.label && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__section-label", children: section.label }),
|
|
28852
|
+
section.items.map((item) => /* @__PURE__ */ jsx119(ExpandedItem, { item, level: 0 }, item.id))
|
|
28777
28853
|
] }, section.id ?? sIdx)) }),
|
|
28778
|
-
(footerItems || user || hasFooterControl) && /* @__PURE__ */
|
|
28779
|
-
footerItems && footerItems.length > 0 && /* @__PURE__ */
|
|
28780
|
-
hasFooterControl && /* @__PURE__ */
|
|
28854
|
+
(footerItems || user || hasFooterControl) && /* @__PURE__ */ jsxs114("div", { className: "ods-sidebar__footer", children: [
|
|
28855
|
+
footerItems && footerItems.length > 0 && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ jsx119(ExpandedItem, { item, level: 0 }, item.id)) }),
|
|
28856
|
+
hasFooterControl && /* @__PURE__ */ jsx119("div", { className: "ods-sidebar__footer-control", children: onPinToggle ? /* @__PURE__ */ jsxs114(
|
|
28781
28857
|
"button",
|
|
28782
28858
|
{
|
|
28783
28859
|
type: "button",
|
|
@@ -28786,11 +28862,11 @@ function ExpandedLayout({
|
|
|
28786
28862
|
"aria-label": pinned ? "Unpin sidebar" : "Pin sidebar",
|
|
28787
28863
|
"aria-pressed": pinned,
|
|
28788
28864
|
children: [
|
|
28789
|
-
/* @__PURE__ */
|
|
28790
|
-
/* @__PURE__ */
|
|
28865
|
+
/* @__PURE__ */ jsx119(SidebarToggleIcon, { collapsed: false }),
|
|
28866
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__pin-label", children: pinned ? "Unpin" : "Pin sidebar" })
|
|
28791
28867
|
]
|
|
28792
28868
|
}
|
|
28793
|
-
) : /* @__PURE__ */
|
|
28869
|
+
) : /* @__PURE__ */ jsxs114(
|
|
28794
28870
|
"button",
|
|
28795
28871
|
{
|
|
28796
28872
|
type: "button",
|
|
@@ -28798,17 +28874,17 @@ function ExpandedLayout({
|
|
|
28798
28874
|
onClick: onToggle,
|
|
28799
28875
|
"aria-label": "Collapse sidebar",
|
|
28800
28876
|
children: [
|
|
28801
|
-
/* @__PURE__ */
|
|
28802
|
-
/* @__PURE__ */
|
|
28877
|
+
/* @__PURE__ */ jsx119(SidebarToggleIcon, { collapsed: false }),
|
|
28878
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__pin-label", children: "Collapse" })
|
|
28803
28879
|
]
|
|
28804
28880
|
}
|
|
28805
28881
|
) }),
|
|
28806
|
-
user && /* @__PURE__ */
|
|
28882
|
+
user && /* @__PURE__ */ jsx119(SidebarUserCard, { user })
|
|
28807
28883
|
] })
|
|
28808
28884
|
] });
|
|
28809
28885
|
}
|
|
28810
28886
|
function SidebarToggleIcon({ collapsed }) {
|
|
28811
|
-
return /* @__PURE__ */
|
|
28887
|
+
return /* @__PURE__ */ jsxs114(
|
|
28812
28888
|
"svg",
|
|
28813
28889
|
{
|
|
28814
28890
|
width: "14",
|
|
@@ -28821,8 +28897,8 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
28821
28897
|
strokeLinejoin: "round",
|
|
28822
28898
|
"aria-hidden": "true",
|
|
28823
28899
|
children: [
|
|
28824
|
-
/* @__PURE__ */
|
|
28825
|
-
/* @__PURE__ */
|
|
28900
|
+
/* @__PURE__ */ jsx119("path", { d: "M3 2v12" }),
|
|
28901
|
+
/* @__PURE__ */ jsx119("path", { d: collapsed ? "M8 5l3 3-3 3" : "M11 5l-3 3 3 3" })
|
|
28826
28902
|
]
|
|
28827
28903
|
}
|
|
28828
28904
|
);
|
|
@@ -28833,8 +28909,8 @@ function ExpandedItem({ item, level }) {
|
|
|
28833
28909
|
item.defaultExpanded ?? (hasChildren && hasActiveDescendant(item))
|
|
28834
28910
|
);
|
|
28835
28911
|
if (hasChildren) {
|
|
28836
|
-
return /* @__PURE__ */
|
|
28837
|
-
/* @__PURE__ */
|
|
28912
|
+
return /* @__PURE__ */ jsxs114(Fragment49, { children: [
|
|
28913
|
+
/* @__PURE__ */ jsxs114(
|
|
28838
28914
|
"button",
|
|
28839
28915
|
{
|
|
28840
28916
|
type: "button",
|
|
@@ -28851,11 +28927,11 @@ function ExpandedItem({ item, level }) {
|
|
|
28851
28927
|
},
|
|
28852
28928
|
"aria-expanded": open,
|
|
28853
28929
|
children: [
|
|
28854
|
-
/* @__PURE__ */
|
|
28855
|
-
/* @__PURE__ */
|
|
28856
|
-
item.tag && /* @__PURE__ */
|
|
28857
|
-
item.badge && /* @__PURE__ */
|
|
28858
|
-
/* @__PURE__ */
|
|
28930
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__icon", children: item.icon }),
|
|
28931
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__label", children: item.label }),
|
|
28932
|
+
item.tag && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__tag", children: item.tag }),
|
|
28933
|
+
item.badge && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__badge", children: item.badge }),
|
|
28934
|
+
/* @__PURE__ */ jsx119(
|
|
28859
28935
|
"svg",
|
|
28860
28936
|
{
|
|
28861
28937
|
className: cn("ods-sidebar__chevron", open && "ods-sidebar__chevron--open"),
|
|
@@ -28864,7 +28940,7 @@ function ExpandedItem({ item, level }) {
|
|
|
28864
28940
|
viewBox: "0 0 12 12",
|
|
28865
28941
|
fill: "none",
|
|
28866
28942
|
"aria-hidden": "true",
|
|
28867
|
-
children: /* @__PURE__ */
|
|
28943
|
+
children: /* @__PURE__ */ jsx119(
|
|
28868
28944
|
"path",
|
|
28869
28945
|
{
|
|
28870
28946
|
d: "M4.5 3l3 3-3 3",
|
|
@@ -28879,20 +28955,20 @@ function ExpandedItem({ item, level }) {
|
|
|
28879
28955
|
]
|
|
28880
28956
|
}
|
|
28881
28957
|
),
|
|
28882
|
-
open && /* @__PURE__ */
|
|
28958
|
+
open && /* @__PURE__ */ jsx119(
|
|
28883
28959
|
"div",
|
|
28884
28960
|
{
|
|
28885
28961
|
className: cn(
|
|
28886
28962
|
"ods-sidebar__subtree",
|
|
28887
28963
|
`ods-sidebar__subtree--l${Math.min(level + 1, 3)}`
|
|
28888
28964
|
),
|
|
28889
|
-
children: item.children.map((child) => /* @__PURE__ */
|
|
28965
|
+
children: item.children.map((child) => /* @__PURE__ */ jsx119(ExpandedItem, { item: child, level: level + 1 }, child.id))
|
|
28890
28966
|
}
|
|
28891
28967
|
)
|
|
28892
28968
|
] });
|
|
28893
28969
|
}
|
|
28894
28970
|
const Comp = item.href ? "a" : "button";
|
|
28895
|
-
return /* @__PURE__ */
|
|
28971
|
+
return /* @__PURE__ */ jsxs114(
|
|
28896
28972
|
Comp,
|
|
28897
28973
|
{
|
|
28898
28974
|
type: item.href ? void 0 : "button",
|
|
@@ -28905,30 +28981,30 @@ function ExpandedItem({ item, level }) {
|
|
|
28905
28981
|
),
|
|
28906
28982
|
"aria-current": item.active ? "page" : void 0,
|
|
28907
28983
|
children: [
|
|
28908
|
-
/* @__PURE__ */
|
|
28909
|
-
/* @__PURE__ */
|
|
28910
|
-
item.tag && /* @__PURE__ */
|
|
28911
|
-
item.badge && /* @__PURE__ */
|
|
28984
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__icon", children: item.icon }),
|
|
28985
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__label", children: item.label }),
|
|
28986
|
+
item.tag && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__tag", children: item.tag }),
|
|
28987
|
+
item.badge && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__badge", children: item.badge })
|
|
28912
28988
|
]
|
|
28913
28989
|
}
|
|
28914
28990
|
);
|
|
28915
28991
|
}
|
|
28916
28992
|
function SidebarUserCard({ user }) {
|
|
28917
28993
|
const labelText = typeof user.name === "string" ? user.name : "User";
|
|
28918
|
-
const body = /* @__PURE__ */
|
|
28919
|
-
/* @__PURE__ */
|
|
28920
|
-
/* @__PURE__ */
|
|
28921
|
-
/* @__PURE__ */
|
|
28922
|
-
user.email && /* @__PURE__ */
|
|
28994
|
+
const body = /* @__PURE__ */ jsxs114(Fragment49, { children: [
|
|
28995
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__user-avatar", children: user.avatar ?? /* @__PURE__ */ jsx119("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") }) }),
|
|
28996
|
+
/* @__PURE__ */ jsxs114("span", { className: "ods-sidebar__user-info", children: [
|
|
28997
|
+
/* @__PURE__ */ jsx119("span", { className: "ods-sidebar__user-name", children: user.name }),
|
|
28998
|
+
user.email && /* @__PURE__ */ jsx119("span", { className: "ods-sidebar__user-email", children: user.email })
|
|
28923
28999
|
] }),
|
|
28924
|
-
/* @__PURE__ */
|
|
28925
|
-
/* @__PURE__ */
|
|
28926
|
-
/* @__PURE__ */
|
|
28927
|
-
/* @__PURE__ */
|
|
29000
|
+
/* @__PURE__ */ jsxs114("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
29001
|
+
/* @__PURE__ */ jsx119("circle", { cx: "8", cy: "3", r: "1.3", fill: "currentColor" }),
|
|
29002
|
+
/* @__PURE__ */ jsx119("circle", { cx: "8", cy: "8", r: "1.3", fill: "currentColor" }),
|
|
29003
|
+
/* @__PURE__ */ jsx119("circle", { cx: "8", cy: "13", r: "1.3", fill: "currentColor" })
|
|
28928
29004
|
] })
|
|
28929
29005
|
] });
|
|
28930
29006
|
if (user.menu && user.menu.length > 0) {
|
|
28931
|
-
return /* @__PURE__ */
|
|
29007
|
+
return /* @__PURE__ */ jsx119(
|
|
28932
29008
|
DropdownMenu,
|
|
28933
29009
|
{
|
|
28934
29010
|
trigger: body,
|
|
@@ -28940,7 +29016,7 @@ function SidebarUserCard({ user }) {
|
|
|
28940
29016
|
}
|
|
28941
29017
|
);
|
|
28942
29018
|
}
|
|
28943
|
-
return /* @__PURE__ */
|
|
29019
|
+
return /* @__PURE__ */ jsx119("button", { type: "button", className: "ods-sidebar__user-card", onClick: user.onClick, children: body });
|
|
28944
29020
|
}
|
|
28945
29021
|
function hasActiveDescendant(item) {
|
|
28946
29022
|
if (!item.children) return false;
|
|
@@ -28956,7 +29032,7 @@ import { AnimatePresence as AnimatePresence15, motion as motion23 } from "framer
|
|
|
28956
29032
|
import { useEffect as useEffect47, useRef as useRef43 } from "react";
|
|
28957
29033
|
import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
|
|
28958
29034
|
import { createPortal as createPortal15 } from "react-dom";
|
|
28959
|
-
import { Fragment as
|
|
29035
|
+
import { Fragment as Fragment50, jsx as jsx120, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
28960
29036
|
var slideVariants2 = {
|
|
28961
29037
|
left: {
|
|
28962
29038
|
initial: { x: "-100%" },
|
|
@@ -29022,8 +29098,8 @@ function SlideoutContent({
|
|
|
29022
29098
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeOverlayProps } = overlayProps;
|
|
29023
29099
|
const variant = slideVariants2[position];
|
|
29024
29100
|
const panelWidth = typeof width === "number" ? `${width}px` : width;
|
|
29025
|
-
return /* @__PURE__ */
|
|
29026
|
-
/* @__PURE__ */
|
|
29101
|
+
return /* @__PURE__ */ jsx120(AnimatePresence15, { children: open && /* @__PURE__ */ jsxs115(Fragment50, { children: [
|
|
29102
|
+
/* @__PURE__ */ jsx120(
|
|
29027
29103
|
motion23.div,
|
|
29028
29104
|
{
|
|
29029
29105
|
className: "ods-slideout__backdrop",
|
|
@@ -29037,7 +29113,7 @@ function SlideoutContent({
|
|
|
29037
29113
|
style: insetStyle
|
|
29038
29114
|
}
|
|
29039
29115
|
),
|
|
29040
|
-
/* @__PURE__ */
|
|
29116
|
+
/* @__PURE__ */ jsx120(FocusScope2, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsxs115(
|
|
29041
29117
|
motion23.div,
|
|
29042
29118
|
{
|
|
29043
29119
|
...safeOverlayProps,
|
|
@@ -29054,21 +29130,21 @@ function SlideoutContent({
|
|
|
29054
29130
|
exit: variant.exit,
|
|
29055
29131
|
transition: { type: "tween", ease: [0.32, 0.72, 0, 1], duration: 0.28 },
|
|
29056
29132
|
children: [
|
|
29057
|
-
title && /* @__PURE__ */
|
|
29058
|
-
/* @__PURE__ */
|
|
29059
|
-
/* @__PURE__ */
|
|
29133
|
+
title && /* @__PURE__ */ jsxs115("div", { className: "ods-slideout__header", children: [
|
|
29134
|
+
/* @__PURE__ */ jsx120("h2", { ...titleProps, className: "ods-slideout__title", children: title }),
|
|
29135
|
+
/* @__PURE__ */ jsx120(
|
|
29060
29136
|
"button",
|
|
29061
29137
|
{
|
|
29062
29138
|
className: "ods-slideout__close",
|
|
29063
29139
|
onClick: onClose,
|
|
29064
29140
|
"aria-label": "Close panel",
|
|
29065
29141
|
type: "button",
|
|
29066
|
-
children: /* @__PURE__ */
|
|
29142
|
+
children: /* @__PURE__ */ jsx120("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx120("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" }) })
|
|
29067
29143
|
}
|
|
29068
29144
|
)
|
|
29069
29145
|
] }),
|
|
29070
|
-
/* @__PURE__ */
|
|
29071
|
-
footer && /* @__PURE__ */
|
|
29146
|
+
/* @__PURE__ */ jsx120("div", { className: "ods-slideout__body", children }),
|
|
29147
|
+
footer && /* @__PURE__ */ jsx120("div", { className: "ods-slideout__footer", children: footer })
|
|
29072
29148
|
]
|
|
29073
29149
|
}
|
|
29074
29150
|
) })
|
|
@@ -29077,7 +29153,7 @@ function SlideoutContent({
|
|
|
29077
29153
|
function SlideoutPanel(props) {
|
|
29078
29154
|
if (typeof document === "undefined") return null;
|
|
29079
29155
|
return createPortal15(
|
|
29080
|
-
/* @__PURE__ */
|
|
29156
|
+
/* @__PURE__ */ jsx120(OverlayProvider2, { children: /* @__PURE__ */ jsx120(SlideoutContent, { ...props }) }),
|
|
29081
29157
|
document.body
|
|
29082
29158
|
);
|
|
29083
29159
|
}
|
|
@@ -29115,8 +29191,8 @@ function useRelativeTime(date, options2 = {}) {
|
|
|
29115
29191
|
}
|
|
29116
29192
|
|
|
29117
29193
|
// src/components/VersionHistory/VersionHistory.tsx
|
|
29118
|
-
import { jsx as
|
|
29119
|
-
var ChevronGlyph = ({ open }) => /* @__PURE__ */
|
|
29194
|
+
import { jsx as jsx121, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
29195
|
+
var ChevronGlyph = ({ open }) => /* @__PURE__ */ jsx121(
|
|
29120
29196
|
"svg",
|
|
29121
29197
|
{
|
|
29122
29198
|
width: "16",
|
|
@@ -29125,12 +29201,12 @@ var ChevronGlyph = ({ open }) => /* @__PURE__ */ jsx120(
|
|
|
29125
29201
|
fill: "currentColor",
|
|
29126
29202
|
"aria-hidden": "true",
|
|
29127
29203
|
style: { transform: open ? "rotate(180deg)" : "none", transition: "transform 120ms ease" },
|
|
29128
|
-
children: /* @__PURE__ */
|
|
29204
|
+
children: /* @__PURE__ */ jsx121("path", { d: "M5.22 7.22a.75.75 0 011.06 0L10 10.94l3.72-3.72a.75.75 0 111.06 1.06l-4.25 4.25a.75.75 0 01-1.06 0L5.22 8.28a.75.75 0 010-1.06z" })
|
|
29129
29205
|
}
|
|
29130
29206
|
);
|
|
29131
|
-
var RefreshGlyph = () => /* @__PURE__ */
|
|
29132
|
-
var RestoreGlyph = () => /* @__PURE__ */
|
|
29133
|
-
var ArrowGlyph = () => /* @__PURE__ */
|
|
29207
|
+
var RefreshGlyph = () => /* @__PURE__ */ jsx121("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx121("path", { d: "M10 3.5a6.5 6.5 0 015.74 3.46.75.75 0 11-1.32.71A5 5 0 005 8.5h1.75a.5.5 0 01.35.85L4.6 11.85a.5.5 0 01-.7 0L1.4 9.35A.5.5 0 011.75 8.5H3.5A6.5 6.5 0 0110 3.5zm4.4 4.65a.5.5 0 01.7 0l2.5 2.5a.5.5 0 01-.35.85H15.5A6.5 6.5 0 014.26 12.54a.75.75 0 011.32-.71A5 5 0 0015 11.5h-1.75a.5.5 0 01-.35-.85l2.5-2.5z" }) });
|
|
29208
|
+
var RestoreGlyph = () => /* @__PURE__ */ jsx121("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx121("path", { d: "M9 3.5a6.5 6.5 0 106.4 7.62.75.75 0 10-1.48-.24A5 5 0 119 5v1.94a.4.4 0 00.66.3l3.13-2.69a.4.4 0 000-.6L9.66 1.26a.4.4 0 00-.66.3V3.5z" }) });
|
|
29209
|
+
var ArrowGlyph = () => /* @__PURE__ */ jsx121("svg", { width: "12", height: "12", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx121("path", { d: "M3 10a.75.75 0 01.75-.75h9.69L10.22 6.03a.75.75 0 011.06-1.06l4.5 4.5a.75.75 0 010 1.06l-4.5 4.5a.75.75 0 11-1.06-1.06l3.22-3.22H3.75A.75.75 0 013 10z" }) });
|
|
29134
29210
|
var TONE_TO_CHIP = {
|
|
29135
29211
|
neutral: "default",
|
|
29136
29212
|
accent: "primary",
|
|
@@ -29171,7 +29247,7 @@ function VersionHistory({
|
|
|
29171
29247
|
const [expandedId, setExpandedId] = useState58(defaultExpandedId);
|
|
29172
29248
|
const baseId = useId47();
|
|
29173
29249
|
const showToolbar = Boolean(tabs && tabs.length > 0 || onRefresh);
|
|
29174
|
-
return /* @__PURE__ */
|
|
29250
|
+
return /* @__PURE__ */ jsxs116(
|
|
29175
29251
|
SlideoutPanel,
|
|
29176
29252
|
{
|
|
29177
29253
|
open,
|
|
@@ -29183,10 +29259,10 @@ function VersionHistory({
|
|
|
29183
29259
|
offsetBottom,
|
|
29184
29260
|
className: cn("ods-version-history", className),
|
|
29185
29261
|
children: [
|
|
29186
|
-
showToolbar && /* @__PURE__ */
|
|
29187
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
29262
|
+
showToolbar && /* @__PURE__ */ jsxs116("div", { className: "ods-version-history__toolbar", children: [
|
|
29263
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx121("div", { className: "ods-version-history__tabs", role: "tablist", "aria-label": "History source", children: tabs.map((tab) => {
|
|
29188
29264
|
const selected = tab.id === activeTab;
|
|
29189
|
-
return /* @__PURE__ */
|
|
29265
|
+
return /* @__PURE__ */ jsxs116(
|
|
29190
29266
|
"button",
|
|
29191
29267
|
{
|
|
29192
29268
|
type: "button",
|
|
@@ -29198,15 +29274,15 @@ function VersionHistory({
|
|
|
29198
29274
|
),
|
|
29199
29275
|
onClick: () => onTabChange?.(tab.id),
|
|
29200
29276
|
children: [
|
|
29201
|
-
tab.icon && /* @__PURE__ */
|
|
29277
|
+
tab.icon && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__tab-icon", children: tab.icon }),
|
|
29202
29278
|
tab.label,
|
|
29203
|
-
typeof tab.count === "number" && /* @__PURE__ */
|
|
29279
|
+
typeof tab.count === "number" && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__tab-count", children: tab.count })
|
|
29204
29280
|
]
|
|
29205
29281
|
},
|
|
29206
29282
|
tab.id
|
|
29207
29283
|
);
|
|
29208
|
-
}) }) : /* @__PURE__ */
|
|
29209
|
-
onRefresh && /* @__PURE__ */
|
|
29284
|
+
}) }) : /* @__PURE__ */ jsx121("span", {}),
|
|
29285
|
+
onRefresh && /* @__PURE__ */ jsx121(
|
|
29210
29286
|
"button",
|
|
29211
29287
|
{
|
|
29212
29288
|
type: "button",
|
|
@@ -29216,22 +29292,22 @@ function VersionHistory({
|
|
|
29216
29292
|
"aria-label": "Refresh history",
|
|
29217
29293
|
title: "Refresh",
|
|
29218
29294
|
"data-spinning": refreshing || void 0,
|
|
29219
|
-
children: /* @__PURE__ */
|
|
29295
|
+
children: /* @__PURE__ */ jsx121(RefreshGlyph, {})
|
|
29220
29296
|
}
|
|
29221
29297
|
)
|
|
29222
29298
|
] }),
|
|
29223
|
-
error && /* @__PURE__ */
|
|
29224
|
-
/* @__PURE__ */
|
|
29225
|
-
/* @__PURE__ */
|
|
29226
|
-
/* @__PURE__ */
|
|
29227
|
-
] }) : entries.length === 0 ? /* @__PURE__ */
|
|
29299
|
+
error && /* @__PURE__ */ jsx121("div", { className: "ods-version-history__banner", children: /* @__PURE__ */ jsx121(Banner, { variant: "error", appearance: "subtle", title: "Couldn't load history", description: error }) }),
|
|
29300
|
+
/* @__PURE__ */ jsx121("div", { className: "ods-version-history__body", role: "tabpanel", children: loading ? /* @__PURE__ */ jsxs116("div", { className: "ods-version-history__status", role: "status", "aria-live": "polite", children: [
|
|
29301
|
+
/* @__PURE__ */ jsx121(Spinner, { size: "md", tone: "accent", label: "Loading history" }),
|
|
29302
|
+
/* @__PURE__ */ jsx121("span", { className: "ods-version-history__status-label", children: "Loading history\u2026" })
|
|
29303
|
+
] }) : entries.length === 0 ? /* @__PURE__ */ jsx121("div", { className: "ods-version-history__status ods-version-history__status--empty", children: /* @__PURE__ */ jsx121("span", { className: "ods-version-history__status-label", children: emptyLabel }) }) : /* @__PURE__ */ jsx121("ol", { className: "ods-version-history__list", children: entries.map((entry) => {
|
|
29228
29304
|
const tone = entry.tone ?? "neutral";
|
|
29229
29305
|
const isExpanded = expandedId === entry.id;
|
|
29230
29306
|
const hasDetails = Boolean(entry.diff && entry.diff.length > 0 || entry.details);
|
|
29231
29307
|
const detailsId = `${baseId}-${entry.id}-details`;
|
|
29232
29308
|
const reversible = entry.reversible !== false;
|
|
29233
29309
|
const time = renderTime(entry.timestamp);
|
|
29234
|
-
return /* @__PURE__ */
|
|
29310
|
+
return /* @__PURE__ */ jsxs116(
|
|
29235
29311
|
"li",
|
|
29236
29312
|
{
|
|
29237
29313
|
className: cn(
|
|
@@ -29240,26 +29316,26 @@ function VersionHistory({
|
|
|
29240
29316
|
),
|
|
29241
29317
|
"aria-current": entry.current ? "true" : void 0,
|
|
29242
29318
|
children: [
|
|
29243
|
-
/* @__PURE__ */
|
|
29319
|
+
/* @__PURE__ */ jsx121("div", { className: "ods-version-history__rail", "aria-hidden": "true", children: /* @__PURE__ */ jsx121(
|
|
29244
29320
|
"span",
|
|
29245
29321
|
{
|
|
29246
29322
|
className: "ods-version-history__dot",
|
|
29247
29323
|
"data-tone": tone
|
|
29248
29324
|
}
|
|
29249
29325
|
) }),
|
|
29250
|
-
/* @__PURE__ */
|
|
29251
|
-
/* @__PURE__ */
|
|
29252
|
-
/* @__PURE__ */
|
|
29253
|
-
entry.current && /* @__PURE__ */
|
|
29254
|
-
entry.tag != null && /* @__PURE__ */
|
|
29326
|
+
/* @__PURE__ */ jsxs116("div", { className: "ods-version-history__main", children: [
|
|
29327
|
+
/* @__PURE__ */ jsxs116("div", { className: "ods-version-history__head", children: [
|
|
29328
|
+
/* @__PURE__ */ jsx121("span", { className: "ods-version-history__title", children: entry.title }),
|
|
29329
|
+
entry.current && /* @__PURE__ */ jsx121(Chip, { size: "sm", variant: "success", children: "Current" }),
|
|
29330
|
+
entry.tag != null && /* @__PURE__ */ jsx121(Chip, { size: "sm", variant: TONE_TO_CHIP[tone], children: entry.tag })
|
|
29255
29331
|
] }),
|
|
29256
|
-
(entry.author || time) && /* @__PURE__ */
|
|
29257
|
-
entry.author && /* @__PURE__ */
|
|
29258
|
-
entry.author && time && /* @__PURE__ */
|
|
29259
|
-
time && /* @__PURE__ */
|
|
29332
|
+
(entry.author || time) && /* @__PURE__ */ jsxs116("div", { className: "ods-version-history__meta", children: [
|
|
29333
|
+
entry.author && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__author", children: entry.author }),
|
|
29334
|
+
entry.author && time && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__dot-sep", "aria-hidden": "true", children: "\xB7" }),
|
|
29335
|
+
time && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__time", children: time })
|
|
29260
29336
|
] }),
|
|
29261
|
-
entry.description && /* @__PURE__ */
|
|
29262
|
-
hasDetails && /* @__PURE__ */
|
|
29337
|
+
entry.description && /* @__PURE__ */ jsx121("p", { className: "ods-version-history__desc", children: entry.description }),
|
|
29338
|
+
hasDetails && /* @__PURE__ */ jsxs116(
|
|
29263
29339
|
"button",
|
|
29264
29340
|
{
|
|
29265
29341
|
type: "button",
|
|
@@ -29268,30 +29344,30 @@ function VersionHistory({
|
|
|
29268
29344
|
"aria-controls": detailsId,
|
|
29269
29345
|
onClick: () => setExpandedId(isExpanded ? null : entry.id),
|
|
29270
29346
|
children: [
|
|
29271
|
-
/* @__PURE__ */
|
|
29347
|
+
/* @__PURE__ */ jsx121(ChevronGlyph, { open: isExpanded }),
|
|
29272
29348
|
isExpanded ? "Hide changes" : "Show changes"
|
|
29273
29349
|
]
|
|
29274
29350
|
}
|
|
29275
29351
|
),
|
|
29276
|
-
hasDetails && isExpanded && /* @__PURE__ */
|
|
29277
|
-
entry.diff && entry.diff.length > 0 && /* @__PURE__ */
|
|
29278
|
-
/* @__PURE__ */
|
|
29279
|
-
/* @__PURE__ */
|
|
29280
|
-
row.from != null && /* @__PURE__ */
|
|
29281
|
-
row.from != null && row.to != null && /* @__PURE__ */
|
|
29282
|
-
row.to != null && /* @__PURE__ */
|
|
29352
|
+
hasDetails && isExpanded && /* @__PURE__ */ jsxs116("div", { id: detailsId, className: "ods-version-history__details", children: [
|
|
29353
|
+
entry.diff && entry.diff.length > 0 && /* @__PURE__ */ jsx121("dl", { className: "ods-version-history__diff", children: entry.diff.map((row, i) => /* @__PURE__ */ jsxs116("div", { className: "ods-version-history__diff-row", children: [
|
|
29354
|
+
/* @__PURE__ */ jsx121("dt", { className: "ods-version-history__diff-field", children: row.field }),
|
|
29355
|
+
/* @__PURE__ */ jsxs116("dd", { className: "ods-version-history__diff-change", children: [
|
|
29356
|
+
row.from != null && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__diff-from", children: row.from }),
|
|
29357
|
+
row.from != null && row.to != null && /* @__PURE__ */ jsx121(ArrowGlyph, {}),
|
|
29358
|
+
row.to != null && /* @__PURE__ */ jsx121("span", { className: "ods-version-history__diff-to", children: row.to })
|
|
29283
29359
|
] })
|
|
29284
29360
|
] }, i)) }),
|
|
29285
29361
|
entry.details
|
|
29286
29362
|
] }),
|
|
29287
|
-
(onPreview || onApply && reversible) && /* @__PURE__ */
|
|
29288
|
-
onPreview && /* @__PURE__ */
|
|
29289
|
-
onApply && reversible && /* @__PURE__ */
|
|
29363
|
+
(onPreview || onApply && reversible) && /* @__PURE__ */ jsxs116("div", { className: "ods-version-history__actions", children: [
|
|
29364
|
+
onPreview && /* @__PURE__ */ jsx121(Button, { size: "sm", variant: "ghost", onClick: () => onPreview(entry), children: previewLabel }),
|
|
29365
|
+
onApply && reversible && /* @__PURE__ */ jsx121(
|
|
29290
29366
|
Button,
|
|
29291
29367
|
{
|
|
29292
29368
|
size: "sm",
|
|
29293
29369
|
variant: "secondary",
|
|
29294
|
-
leftIcon: /* @__PURE__ */
|
|
29370
|
+
leftIcon: /* @__PURE__ */ jsx121(RestoreGlyph, {}),
|
|
29295
29371
|
disabled: entry.current,
|
|
29296
29372
|
onClick: () => onApply(entry),
|
|
29297
29373
|
children: applyLabel
|
|
@@ -29311,7 +29387,7 @@ function VersionHistory({
|
|
|
29311
29387
|
VersionHistory.displayName = "VersionHistory";
|
|
29312
29388
|
|
|
29313
29389
|
// src/components/StatusList/StatusList.tsx
|
|
29314
|
-
import { Fragment as
|
|
29390
|
+
import { Fragment as Fragment51, jsx as jsx122, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
29315
29391
|
var TONE_TO_CHIP2 = {
|
|
29316
29392
|
success: "success",
|
|
29317
29393
|
running: "primary",
|
|
@@ -29333,30 +29409,30 @@ function StatusList({
|
|
|
29333
29409
|
}) {
|
|
29334
29410
|
const visible = typeof max === "number" ? items.slice(0, max) : items;
|
|
29335
29411
|
const overflow = items.length - visible.length;
|
|
29336
|
-
const renderRowInner = (item) => /* @__PURE__ */
|
|
29337
|
-
/* @__PURE__ */
|
|
29412
|
+
const renderRowInner = (item) => /* @__PURE__ */ jsxs117(Fragment51, { children: [
|
|
29413
|
+
/* @__PURE__ */ jsx122(
|
|
29338
29414
|
"span",
|
|
29339
29415
|
{
|
|
29340
29416
|
className: "ods-status-list__lead",
|
|
29341
29417
|
"data-tone": item.tone ?? "neutral",
|
|
29342
29418
|
"aria-hidden": "true",
|
|
29343
|
-
children: item.icon ?? /* @__PURE__ */
|
|
29419
|
+
children: item.icon ?? /* @__PURE__ */ jsx122("span", { className: "ods-status-list__dot" })
|
|
29344
29420
|
}
|
|
29345
29421
|
),
|
|
29346
|
-
/* @__PURE__ */
|
|
29347
|
-
/* @__PURE__ */
|
|
29348
|
-
item.meta != null && /* @__PURE__ */
|
|
29422
|
+
/* @__PURE__ */ jsxs117("span", { className: "ods-status-list__text", children: [
|
|
29423
|
+
/* @__PURE__ */ jsx122("span", { className: "ods-status-list__name", children: item.name }),
|
|
29424
|
+
item.meta != null && /* @__PURE__ */ jsx122("span", { className: "ods-status-list__meta", children: item.meta })
|
|
29349
29425
|
] }),
|
|
29350
|
-
item.sparkline && item.sparkline.length > 1 && /* @__PURE__ */
|
|
29351
|
-
item.status != null && /* @__PURE__ */
|
|
29352
|
-
item.trailing != null && /* @__PURE__ */
|
|
29426
|
+
item.sparkline && item.sparkline.length > 1 && /* @__PURE__ */ jsx122("span", { className: "ods-status-list__spark", children: /* @__PURE__ */ jsx122(Sparkline, { data: item.sparkline, width: 72, height: 22 }) }),
|
|
29427
|
+
item.status != null && /* @__PURE__ */ jsx122(Chip, { size: "sm", variant: TONE_TO_CHIP2[item.tone ?? "neutral"], children: item.status }),
|
|
29428
|
+
item.trailing != null && /* @__PURE__ */ jsx122("span", { className: "ods-status-list__trailing", children: item.trailing })
|
|
29353
29429
|
] });
|
|
29354
|
-
return /* @__PURE__ */
|
|
29355
|
-
(title != null || action != null) && /* @__PURE__ */
|
|
29356
|
-
title != null && /* @__PURE__ */
|
|
29357
|
-
action != null && /* @__PURE__ */
|
|
29430
|
+
return /* @__PURE__ */ jsxs117("div", { className: cn("ods-status-list", className), ...rest, children: [
|
|
29431
|
+
(title != null || action != null) && /* @__PURE__ */ jsxs117("div", { className: "ods-status-list__header", children: [
|
|
29432
|
+
title != null && /* @__PURE__ */ jsx122("h3", { className: "ods-status-list__title", children: title }),
|
|
29433
|
+
action != null && /* @__PURE__ */ jsx122("div", { className: "ods-status-list__action", children: action })
|
|
29358
29434
|
] }),
|
|
29359
|
-
visible.length === 0 ? /* @__PURE__ */
|
|
29435
|
+
visible.length === 0 ? /* @__PURE__ */ jsx122("div", { className: "ods-status-list__empty", children: emptyLabel }) : /* @__PURE__ */ jsx122(
|
|
29360
29436
|
"ul",
|
|
29361
29437
|
{
|
|
29362
29438
|
className: cn(
|
|
@@ -29370,7 +29446,7 @@ function StatusList({
|
|
|
29370
29446
|
interactive && "ods-status-list__row--interactive",
|
|
29371
29447
|
item.muted && "ods-status-list__row--muted"
|
|
29372
29448
|
);
|
|
29373
|
-
return /* @__PURE__ */
|
|
29449
|
+
return /* @__PURE__ */ jsx122("li", { className: "ods-status-list__item", children: item.href ? /* @__PURE__ */ jsx122("a", { className: rowClass, href: item.href, children: renderRowInner(item) }) : onItemClick ? /* @__PURE__ */ jsx122(
|
|
29374
29450
|
"button",
|
|
29375
29451
|
{
|
|
29376
29452
|
type: "button",
|
|
@@ -29378,11 +29454,11 @@ function StatusList({
|
|
|
29378
29454
|
onClick: () => onItemClick(item),
|
|
29379
29455
|
children: renderRowInner(item)
|
|
29380
29456
|
}
|
|
29381
|
-
) : /* @__PURE__ */
|
|
29457
|
+
) : /* @__PURE__ */ jsx122("div", { className: rowClass, children: renderRowInner(item) }) }, item.id);
|
|
29382
29458
|
})
|
|
29383
29459
|
}
|
|
29384
29460
|
),
|
|
29385
|
-
overflow > 0 && /* @__PURE__ */
|
|
29461
|
+
overflow > 0 && /* @__PURE__ */ jsxs117("div", { className: "ods-status-list__more", children: [
|
|
29386
29462
|
"+",
|
|
29387
29463
|
overflow,
|
|
29388
29464
|
" more"
|
|
@@ -29396,7 +29472,7 @@ import {
|
|
|
29396
29472
|
forwardRef as forwardRef82,
|
|
29397
29473
|
useId as useId48
|
|
29398
29474
|
} from "react";
|
|
29399
|
-
import { jsx as
|
|
29475
|
+
import { jsx as jsx123, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
29400
29476
|
var Slider = forwardRef82(function Slider2({
|
|
29401
29477
|
label,
|
|
29402
29478
|
value,
|
|
@@ -29430,7 +29506,7 @@ var Slider = forwardRef82(function Slider2({
|
|
|
29430
29506
|
const valueText = String(display);
|
|
29431
29507
|
const handle = (e) => onChange?.(Number(e.target.value));
|
|
29432
29508
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
29433
|
-
return /* @__PURE__ */
|
|
29509
|
+
return /* @__PURE__ */ jsxs118(
|
|
29434
29510
|
"div",
|
|
29435
29511
|
{
|
|
29436
29512
|
className: cn(
|
|
@@ -29442,8 +29518,8 @@ var Slider = forwardRef82(function Slider2({
|
|
|
29442
29518
|
className
|
|
29443
29519
|
),
|
|
29444
29520
|
children: [
|
|
29445
|
-
(label || showValue) && /* @__PURE__ */
|
|
29446
|
-
label && /* @__PURE__ */
|
|
29521
|
+
(label || showValue) && /* @__PURE__ */ jsxs118("div", { className: "ods-slider__head", children: [
|
|
29522
|
+
label && /* @__PURE__ */ jsx123(
|
|
29447
29523
|
"label",
|
|
29448
29524
|
{
|
|
29449
29525
|
id: labelId,
|
|
@@ -29452,17 +29528,17 @@ var Slider = forwardRef82(function Slider2({
|
|
|
29452
29528
|
children: label
|
|
29453
29529
|
}
|
|
29454
29530
|
),
|
|
29455
|
-
showValue && /* @__PURE__ */
|
|
29531
|
+
showValue && /* @__PURE__ */ jsx123("span", { className: "ods-slider__value", "aria-hidden": "true", children: display })
|
|
29456
29532
|
] }),
|
|
29457
|
-
/* @__PURE__ */
|
|
29458
|
-
/* @__PURE__ */
|
|
29533
|
+
/* @__PURE__ */ jsxs118("div", { className: "ods-slider__track", children: [
|
|
29534
|
+
/* @__PURE__ */ jsx123(
|
|
29459
29535
|
"span",
|
|
29460
29536
|
{
|
|
29461
29537
|
className: "ods-slider__fill",
|
|
29462
29538
|
style: { width: `${pct}%` }
|
|
29463
29539
|
}
|
|
29464
29540
|
),
|
|
29465
|
-
/* @__PURE__ */
|
|
29541
|
+
/* @__PURE__ */ jsx123(
|
|
29466
29542
|
"input",
|
|
29467
29543
|
{
|
|
29468
29544
|
...rest,
|
|
@@ -29486,22 +29562,22 @@ var Slider = forwardRef82(function Slider2({
|
|
|
29486
29562
|
] }),
|
|
29487
29563
|
marks && marks.length > 0 && // Marks are decorative — aria-hidden so the screen reader hears
|
|
29488
29564
|
// the formatted value, not "tick mark, tick mark, …".
|
|
29489
|
-
/* @__PURE__ */
|
|
29565
|
+
/* @__PURE__ */ jsx123("div", { className: "ods-slider__marks", "aria-hidden": "true", children: marks.map((m) => {
|
|
29490
29566
|
const left = (m.value - min) / span * 100;
|
|
29491
|
-
return /* @__PURE__ */
|
|
29567
|
+
return /* @__PURE__ */ jsxs118(
|
|
29492
29568
|
"div",
|
|
29493
29569
|
{
|
|
29494
29570
|
className: "ods-slider__mark",
|
|
29495
29571
|
style: { left: `${left}%` },
|
|
29496
29572
|
children: [
|
|
29497
|
-
/* @__PURE__ */
|
|
29498
|
-
m.label && /* @__PURE__ */
|
|
29573
|
+
/* @__PURE__ */ jsx123("span", { className: "ods-slider__mark-tick" }),
|
|
29574
|
+
m.label && /* @__PURE__ */ jsx123("span", { className: "ods-slider__mark-label", children: m.label })
|
|
29499
29575
|
]
|
|
29500
29576
|
},
|
|
29501
29577
|
m.value
|
|
29502
29578
|
);
|
|
29503
29579
|
}) }),
|
|
29504
|
-
error ? /* @__PURE__ */
|
|
29580
|
+
error ? /* @__PURE__ */ jsx123(
|
|
29505
29581
|
"div",
|
|
29506
29582
|
{
|
|
29507
29583
|
id: hintId,
|
|
@@ -29509,7 +29585,7 @@ var Slider = forwardRef82(function Slider2({
|
|
|
29509
29585
|
role: "alert",
|
|
29510
29586
|
children: error
|
|
29511
29587
|
}
|
|
29512
|
-
) : helperText ? /* @__PURE__ */
|
|
29588
|
+
) : helperText ? /* @__PURE__ */ jsx123("div", { id: hintId, className: "ods-slider__hint", children: helperText }) : null
|
|
29513
29589
|
]
|
|
29514
29590
|
}
|
|
29515
29591
|
);
|
|
@@ -29520,9 +29596,9 @@ Slider.displayName = "Slider";
|
|
|
29520
29596
|
import {
|
|
29521
29597
|
Children as Children2,
|
|
29522
29598
|
forwardRef as forwardRef83,
|
|
29523
|
-
Fragment as
|
|
29599
|
+
Fragment as Fragment52
|
|
29524
29600
|
} from "react";
|
|
29525
|
-
import { jsx as
|
|
29601
|
+
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
29526
29602
|
function resolveGap2(gap) {
|
|
29527
29603
|
if (typeof gap === "string") return gap;
|
|
29528
29604
|
if (gap === 0) return "0";
|
|
@@ -29561,11 +29637,11 @@ var Stack = forwardRef83(function Stack2({
|
|
|
29561
29637
|
const Component = as ?? "div";
|
|
29562
29638
|
const items = divider ? Children2.toArray(children).flatMap(
|
|
29563
29639
|
(child, i, arr) => i < arr.length - 1 ? [
|
|
29564
|
-
/* @__PURE__ */
|
|
29565
|
-
/* @__PURE__ */
|
|
29566
|
-
] : [/* @__PURE__ */
|
|
29640
|
+
/* @__PURE__ */ jsx124(Fragment52, { children: child }, `item-${i}`),
|
|
29641
|
+
/* @__PURE__ */ jsx124(Fragment52, { children: divider }, `divider-${i}`)
|
|
29642
|
+
] : [/* @__PURE__ */ jsx124(Fragment52, { children: child }, `item-${i}`)]
|
|
29567
29643
|
) : children;
|
|
29568
|
-
return /* @__PURE__ */
|
|
29644
|
+
return /* @__PURE__ */ jsx124(
|
|
29569
29645
|
Component,
|
|
29570
29646
|
{
|
|
29571
29647
|
...rest,
|
|
@@ -29593,13 +29669,13 @@ var Stack = forwardRef83(function Stack2({
|
|
|
29593
29669
|
Stack.displayName = "Stack";
|
|
29594
29670
|
var HStack = forwardRef83(
|
|
29595
29671
|
function HStack2(props, ref) {
|
|
29596
|
-
return /* @__PURE__ */
|
|
29672
|
+
return /* @__PURE__ */ jsx124(Stack, { ref, direction: "row", ...props });
|
|
29597
29673
|
}
|
|
29598
29674
|
);
|
|
29599
29675
|
HStack.displayName = "HStack";
|
|
29600
29676
|
var VStack = forwardRef83(
|
|
29601
29677
|
function VStack2(props, ref) {
|
|
29602
|
-
return /* @__PURE__ */
|
|
29678
|
+
return /* @__PURE__ */ jsx124(Stack, { ref, direction: "column", ...props });
|
|
29603
29679
|
}
|
|
29604
29680
|
);
|
|
29605
29681
|
VStack.displayName = "VStack";
|
|
@@ -29615,7 +29691,7 @@ import {
|
|
|
29615
29691
|
useState as useState59
|
|
29616
29692
|
} from "react";
|
|
29617
29693
|
import { createPortal as createPortal16 } from "react-dom";
|
|
29618
|
-
import { jsx as
|
|
29694
|
+
import { jsx as jsx125, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
29619
29695
|
var Spotlight = forwardRef84(
|
|
29620
29696
|
function Spotlight2({
|
|
29621
29697
|
open,
|
|
@@ -29682,7 +29758,7 @@ var Spotlight = forwardRef84(
|
|
|
29682
29758
|
height: rect.height + padding * 2
|
|
29683
29759
|
} : null;
|
|
29684
29760
|
return createPortal16(
|
|
29685
|
-
/* @__PURE__ */
|
|
29761
|
+
/* @__PURE__ */ jsx125(AnimatePresence16, { children: open && /* @__PURE__ */ jsxs119(
|
|
29686
29762
|
motion24.div,
|
|
29687
29763
|
{
|
|
29688
29764
|
...rest,
|
|
@@ -29694,7 +29770,7 @@ var Spotlight = forwardRef84(
|
|
|
29694
29770
|
exit: disableAnimation || reducedMotion ? void 0 : { opacity: 0 },
|
|
29695
29771
|
transition: { duration: 0.18 },
|
|
29696
29772
|
children: [
|
|
29697
|
-
/* @__PURE__ */
|
|
29773
|
+
/* @__PURE__ */ jsxs119(
|
|
29698
29774
|
"svg",
|
|
29699
29775
|
{
|
|
29700
29776
|
className: cn(
|
|
@@ -29708,8 +29784,8 @@ var Spotlight = forwardRef84(
|
|
|
29708
29784
|
"aria-hidden": "true",
|
|
29709
29785
|
onClick: onDismiss,
|
|
29710
29786
|
children: [
|
|
29711
|
-
/* @__PURE__ */
|
|
29712
|
-
/* @__PURE__ */
|
|
29787
|
+
/* @__PURE__ */ jsx125("defs", { children: /* @__PURE__ */ jsxs119("mask", { id: maskId, children: [
|
|
29788
|
+
/* @__PURE__ */ jsx125(
|
|
29713
29789
|
"rect",
|
|
29714
29790
|
{
|
|
29715
29791
|
x: 0,
|
|
@@ -29719,7 +29795,7 @@ var Spotlight = forwardRef84(
|
|
|
29719
29795
|
fill: "white"
|
|
29720
29796
|
}
|
|
29721
29797
|
),
|
|
29722
|
-
cutout && shape === "rect" && /* @__PURE__ */
|
|
29798
|
+
cutout && shape === "rect" && /* @__PURE__ */ jsx125(
|
|
29723
29799
|
"rect",
|
|
29724
29800
|
{
|
|
29725
29801
|
x: cutout.x,
|
|
@@ -29731,7 +29807,7 @@ var Spotlight = forwardRef84(
|
|
|
29731
29807
|
fill: "black"
|
|
29732
29808
|
}
|
|
29733
29809
|
),
|
|
29734
|
-
cutout && shape === "circle" && /* @__PURE__ */
|
|
29810
|
+
cutout && shape === "circle" && /* @__PURE__ */ jsx125(
|
|
29735
29811
|
"ellipse",
|
|
29736
29812
|
{
|
|
29737
29813
|
cx: cutout.x + cutout.width / 2,
|
|
@@ -29742,7 +29818,7 @@ var Spotlight = forwardRef84(
|
|
|
29742
29818
|
}
|
|
29743
29819
|
)
|
|
29744
29820
|
] }) }),
|
|
29745
|
-
/* @__PURE__ */
|
|
29821
|
+
/* @__PURE__ */ jsx125(
|
|
29746
29822
|
"rect",
|
|
29747
29823
|
{
|
|
29748
29824
|
x: 0,
|
|
@@ -29756,7 +29832,7 @@ var Spotlight = forwardRef84(
|
|
|
29756
29832
|
]
|
|
29757
29833
|
}
|
|
29758
29834
|
),
|
|
29759
|
-
children && /* @__PURE__ */
|
|
29835
|
+
children && /* @__PURE__ */ jsx125("div", { className: "ods-spotlight__content", children })
|
|
29760
29836
|
]
|
|
29761
29837
|
}
|
|
29762
29838
|
) }),
|
|
@@ -29771,7 +29847,7 @@ import {
|
|
|
29771
29847
|
forwardRef as forwardRef85
|
|
29772
29848
|
} from "react";
|
|
29773
29849
|
import { ArrowDownIcon as ArrowDownIcon4, ArrowUpIcon as ArrowUpIcon4, SubtractIcon as SubtractIcon2 } from "@octaviaflow/icons";
|
|
29774
|
-
import { jsx as
|
|
29850
|
+
import { jsx as jsx126, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
29775
29851
|
var Stat = forwardRef85(function Stat2({
|
|
29776
29852
|
label,
|
|
29777
29853
|
value,
|
|
@@ -29785,23 +29861,23 @@ var Stat = forwardRef85(function Stat2({
|
|
|
29785
29861
|
...rest
|
|
29786
29862
|
}, ref) {
|
|
29787
29863
|
const TrendIcon = deltaTrend === "up" ? ArrowUpIcon4 : deltaTrend === "down" ? ArrowDownIcon4 : SubtractIcon2;
|
|
29788
|
-
return /* @__PURE__ */
|
|
29864
|
+
return /* @__PURE__ */ jsxs120(
|
|
29789
29865
|
"div",
|
|
29790
29866
|
{
|
|
29791
29867
|
...rest,
|
|
29792
29868
|
ref,
|
|
29793
29869
|
className: cn("ods-stat", `ods-stat--${size}`, className),
|
|
29794
29870
|
children: [
|
|
29795
|
-
/* @__PURE__ */
|
|
29796
|
-
/* @__PURE__ */
|
|
29797
|
-
icon && /* @__PURE__ */
|
|
29871
|
+
/* @__PURE__ */ jsxs120("div", { className: "ods-stat__head", children: [
|
|
29872
|
+
/* @__PURE__ */ jsx126("div", { className: "ods-stat__label", children: label }),
|
|
29873
|
+
icon && /* @__PURE__ */ jsx126("span", { className: "ods-stat__icon", "aria-hidden": "true", children: icon })
|
|
29798
29874
|
] }),
|
|
29799
|
-
/* @__PURE__ */
|
|
29800
|
-
description && /* @__PURE__ */
|
|
29801
|
-
delta && /* @__PURE__ */
|
|
29802
|
-
/* @__PURE__ */
|
|
29803
|
-
/* @__PURE__ */
|
|
29804
|
-
deltaSuffix && /* @__PURE__ */
|
|
29875
|
+
/* @__PURE__ */ jsx126("div", { className: "ods-stat__value", children: value }),
|
|
29876
|
+
description && /* @__PURE__ */ jsx126("div", { className: "ods-stat__description", children: description }),
|
|
29877
|
+
delta && /* @__PURE__ */ jsxs120("div", { className: cn("ods-stat__delta", `ods-stat__delta--${deltaTrend}`), children: [
|
|
29878
|
+
/* @__PURE__ */ jsx126("span", { className: "ods-stat__delta-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsx126(TrendIcon, { size: "xs" }) }),
|
|
29879
|
+
/* @__PURE__ */ jsx126("span", { className: "ods-stat__delta-value", children: delta }),
|
|
29880
|
+
deltaSuffix && /* @__PURE__ */ jsx126("span", { className: "ods-stat__delta-suffix", children: deltaSuffix })
|
|
29805
29881
|
] })
|
|
29806
29882
|
]
|
|
29807
29883
|
}
|
|
@@ -29818,7 +29894,7 @@ import {
|
|
|
29818
29894
|
useMemo as useMemo32,
|
|
29819
29895
|
useState as useState60
|
|
29820
29896
|
} from "react";
|
|
29821
|
-
import { jsx as
|
|
29897
|
+
import { jsx as jsx127, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
29822
29898
|
var STATUS_COLORS = {
|
|
29823
29899
|
success: "var(--ods-status-success)",
|
|
29824
29900
|
failed: "var(--ods-status-failed)",
|
|
@@ -29890,7 +29966,7 @@ var StatusTiles = forwardRef86(
|
|
|
29890
29966
|
return `${t} \u2014 ${visible.length} runs (${summaryText})`;
|
|
29891
29967
|
}, [ariaLabel, title, visible]);
|
|
29892
29968
|
const interactive = Boolean(onTileHover || onTileClick);
|
|
29893
|
-
return /* @__PURE__ */
|
|
29969
|
+
return /* @__PURE__ */ jsxs121(
|
|
29894
29970
|
"div",
|
|
29895
29971
|
{
|
|
29896
29972
|
...rest,
|
|
@@ -29899,14 +29975,14 @@ var StatusTiles = forwardRef86(
|
|
|
29899
29975
|
role: "group",
|
|
29900
29976
|
"aria-label": resolvedAriaLabel,
|
|
29901
29977
|
children: [
|
|
29902
|
-
(title || summary) && /* @__PURE__ */
|
|
29903
|
-
title && /* @__PURE__ */
|
|
29904
|
-
summary && /* @__PURE__ */
|
|
29978
|
+
(title || summary) && /* @__PURE__ */ jsxs121("div", { className: "ods-status-tiles__head", children: [
|
|
29979
|
+
title && /* @__PURE__ */ jsx127("span", { className: "ods-status-tiles__title", children: title }),
|
|
29980
|
+
summary && /* @__PURE__ */ jsx127("span", { className: "ods-status-tiles__summary", children: summary })
|
|
29905
29981
|
] }),
|
|
29906
|
-
/* @__PURE__ */
|
|
29982
|
+
/* @__PURE__ */ jsx127("div", { className: "ods-status-tiles__row", style: { gap }, children: visible.map((tile, i) => {
|
|
29907
29983
|
const fill2 = tile.color ?? STATUS_COLORS[tile.status];
|
|
29908
29984
|
const tooltipText = tile.label !== void 0 ? typeof tile.label === "string" ? tile.label : void 0 : STATUS_TEXT[tile.status];
|
|
29909
|
-
return /* @__PURE__ */
|
|
29985
|
+
return /* @__PURE__ */ jsx127(
|
|
29910
29986
|
motion25.button,
|
|
29911
29987
|
{
|
|
29912
29988
|
type: "button",
|
|
@@ -29958,7 +30034,7 @@ import {
|
|
|
29958
30034
|
forwardRef as forwardRef87,
|
|
29959
30035
|
useId as useId50
|
|
29960
30036
|
} from "react";
|
|
29961
|
-
import { jsx as
|
|
30037
|
+
import { jsx as jsx128, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
29962
30038
|
function deriveStatus(step, index, active) {
|
|
29963
30039
|
if (step.status) return step.status;
|
|
29964
30040
|
if (index < active) return "complete";
|
|
@@ -30026,7 +30102,7 @@ var Stepper = forwardRef87(
|
|
|
30026
30102
|
e.preventDefault();
|
|
30027
30103
|
goTo(i);
|
|
30028
30104
|
};
|
|
30029
|
-
return /* @__PURE__ */
|
|
30105
|
+
return /* @__PURE__ */ jsx128(
|
|
30030
30106
|
"ol",
|
|
30031
30107
|
{
|
|
30032
30108
|
...rest,
|
|
@@ -30045,13 +30121,13 @@ var Stepper = forwardRef87(
|
|
|
30045
30121
|
const status = deriveStatus(step, i, activeIndex);
|
|
30046
30122
|
const isLast = i === steps.length - 1;
|
|
30047
30123
|
const segmentCompleted = showProgressTrail && i < activeIndex && status !== "error";
|
|
30048
|
-
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */
|
|
30049
|
-
const labelText = /* @__PURE__ */
|
|
30050
|
-
/* @__PURE__ */
|
|
30051
|
-
step.optional && /* @__PURE__ */
|
|
30052
|
-
step.description && /* @__PURE__ */
|
|
30124
|
+
const indicatorContent = step.indicator ?? (status === "complete" ? /* @__PURE__ */ jsx128(CheckmarkIcon12, { size: "sm", "aria-hidden": true }) : status === "error" ? /* @__PURE__ */ jsx128(ErrorIcon, { size: "sm", "aria-hidden": true }) : /* @__PURE__ */ jsx128("span", { className: "ods-stepper__indicator-num", children: i + 1 }));
|
|
30125
|
+
const labelText = /* @__PURE__ */ jsxs122("span", { className: "ods-stepper__label-text", children: [
|
|
30126
|
+
/* @__PURE__ */ jsx128("span", { className: "ods-stepper__label-title", children: step.label }),
|
|
30127
|
+
step.optional && /* @__PURE__ */ jsx128("span", { className: "ods-stepper__label-optional", children: "Optional" }),
|
|
30128
|
+
step.description && /* @__PURE__ */ jsx128("span", { className: "ods-stepper__label-desc", children: step.description })
|
|
30053
30129
|
] });
|
|
30054
|
-
const stepInner = isInteractive ? /* @__PURE__ */
|
|
30130
|
+
const stepInner = isInteractive ? /* @__PURE__ */ jsxs122(
|
|
30055
30131
|
"button",
|
|
30056
30132
|
{
|
|
30057
30133
|
type: "button",
|
|
@@ -30063,7 +30139,7 @@ var Stepper = forwardRef87(
|
|
|
30063
30139
|
onClick: handleClick(i),
|
|
30064
30140
|
onKeyDown: (e) => handleKeyDown(e, i),
|
|
30065
30141
|
children: [
|
|
30066
|
-
/* @__PURE__ */
|
|
30142
|
+
/* @__PURE__ */ jsx128(
|
|
30067
30143
|
"span",
|
|
30068
30144
|
{
|
|
30069
30145
|
className: cn(
|
|
@@ -30077,13 +30153,13 @@ var Stepper = forwardRef87(
|
|
|
30077
30153
|
labelText
|
|
30078
30154
|
]
|
|
30079
30155
|
}
|
|
30080
|
-
) : /* @__PURE__ */
|
|
30156
|
+
) : /* @__PURE__ */ jsxs122(
|
|
30081
30157
|
"span",
|
|
30082
30158
|
{
|
|
30083
30159
|
className: "ods-stepper__step-static",
|
|
30084
30160
|
"aria-current": status === "active" ? "step" : void 0,
|
|
30085
30161
|
children: [
|
|
30086
|
-
/* @__PURE__ */
|
|
30162
|
+
/* @__PURE__ */ jsx128(
|
|
30087
30163
|
"span",
|
|
30088
30164
|
{
|
|
30089
30165
|
className: cn(
|
|
@@ -30098,7 +30174,7 @@ var Stepper = forwardRef87(
|
|
|
30098
30174
|
]
|
|
30099
30175
|
}
|
|
30100
30176
|
);
|
|
30101
|
-
return /* @__PURE__ */
|
|
30177
|
+
return /* @__PURE__ */ jsxs122(
|
|
30102
30178
|
"li",
|
|
30103
30179
|
{
|
|
30104
30180
|
className: cn(
|
|
@@ -30108,7 +30184,7 @@ var Stepper = forwardRef87(
|
|
|
30108
30184
|
),
|
|
30109
30185
|
children: [
|
|
30110
30186
|
stepInner,
|
|
30111
|
-
!isLast && /* @__PURE__ */
|
|
30187
|
+
!isLast && /* @__PURE__ */ jsx128(
|
|
30112
30188
|
"span",
|
|
30113
30189
|
{
|
|
30114
30190
|
className: cn(
|
|
@@ -30138,7 +30214,7 @@ import {
|
|
|
30138
30214
|
useMemo as useMemo33,
|
|
30139
30215
|
useState as useState61
|
|
30140
30216
|
} from "react";
|
|
30141
|
-
import { jsx as
|
|
30217
|
+
import { jsx as jsx129, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
30142
30218
|
var defaultFormat7 = (n) => {
|
|
30143
30219
|
if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
30144
30220
|
if (Math.abs(n) >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
|
|
@@ -30362,7 +30438,7 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30362
30438
|
const t = typeof title === "string" ? title : "Sankey";
|
|
30363
30439
|
return `${t} \u2014 ${nodes.length} nodes, ${links.length} flows`;
|
|
30364
30440
|
}, [ariaLabel, title, nodes.length, links.length]);
|
|
30365
|
-
return /* @__PURE__ */
|
|
30441
|
+
return /* @__PURE__ */ jsxs123(
|
|
30366
30442
|
"div",
|
|
30367
30443
|
{
|
|
30368
30444
|
...rest,
|
|
@@ -30371,11 +30447,11 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30371
30447
|
role: "group",
|
|
30372
30448
|
"aria-label": resolvedAriaLabel,
|
|
30373
30449
|
children: [
|
|
30374
|
-
(title || total) && /* @__PURE__ */
|
|
30375
|
-
title && /* @__PURE__ */
|
|
30376
|
-
total && /* @__PURE__ */
|
|
30450
|
+
(title || total) && /* @__PURE__ */ jsxs123("div", { className: "ods-sankey__head", children: [
|
|
30451
|
+
title && /* @__PURE__ */ jsx129("div", { className: "ods-sankey__title", children: title }),
|
|
30452
|
+
total && /* @__PURE__ */ jsx129("div", { className: "ods-sankey__total", children: total })
|
|
30377
30453
|
] }),
|
|
30378
|
-
/* @__PURE__ */
|
|
30454
|
+
/* @__PURE__ */ jsx129("div", { className: "ods-sankey__plot", style: { width, height }, children: /* @__PURE__ */ jsxs123(
|
|
30379
30455
|
"svg",
|
|
30380
30456
|
{
|
|
30381
30457
|
className: "ods-sankey__svg",
|
|
@@ -30385,7 +30461,7 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30385
30461
|
layoutLinks.map((l) => {
|
|
30386
30462
|
const color = l.color ?? linkColor ?? l.sourceNode.color ?? nodeColor;
|
|
30387
30463
|
const active = hoveredLink === l || hoveredNode?.id === l.source || hoveredNode?.id === l.target;
|
|
30388
|
-
return /* @__PURE__ */
|
|
30464
|
+
return /* @__PURE__ */ jsx129(
|
|
30389
30465
|
motion26.path,
|
|
30390
30466
|
{
|
|
30391
30467
|
d: l.path,
|
|
@@ -30413,7 +30489,7 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30413
30489
|
duration: 0.6,
|
|
30414
30490
|
ease: [0.16, 1, 0.3, 1]
|
|
30415
30491
|
},
|
|
30416
|
-
children: /* @__PURE__ */
|
|
30492
|
+
children: /* @__PURE__ */ jsx129("title", { children: `${l.sourceNode.label} \u2192 ${l.targetNode.label}: ${formatValue(l.value)}` })
|
|
30417
30493
|
},
|
|
30418
30494
|
`${reactId}-link-${l.source}-${l.target}`
|
|
30419
30495
|
);
|
|
@@ -30424,7 +30500,7 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30424
30500
|
const isFirst = n.column === 0;
|
|
30425
30501
|
const isLast = n.column === columnCount - 1;
|
|
30426
30502
|
const active = hoveredNode === n;
|
|
30427
|
-
return /* @__PURE__ */
|
|
30503
|
+
return /* @__PURE__ */ jsxs123(
|
|
30428
30504
|
"g",
|
|
30429
30505
|
{
|
|
30430
30506
|
className: "ods-sankey__node-group",
|
|
@@ -30432,7 +30508,7 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30432
30508
|
onMouseLeave: () => fireNode(null),
|
|
30433
30509
|
onClick: onNodeClick ? () => onNodeClick(n) : void 0,
|
|
30434
30510
|
children: [
|
|
30435
|
-
/* @__PURE__ */
|
|
30511
|
+
/* @__PURE__ */ jsx129(
|
|
30436
30512
|
motion26.rect,
|
|
30437
30513
|
{
|
|
30438
30514
|
x: n.x,
|
|
@@ -30461,10 +30537,10 @@ var Sankey = forwardRef88(function Sankey2({
|
|
|
30461
30537
|
delay: disableAnimation ? 0 : 0.2 + n.column * 0.05,
|
|
30462
30538
|
ease: [0.16, 1, 0.3, 1]
|
|
30463
30539
|
},
|
|
30464
|
-
children: /* @__PURE__ */
|
|
30540
|
+
children: /* @__PURE__ */ jsx129("title", { children: `${n.label} \u2014 in ${formatValue(n.inFlow)} \xB7 out ${formatValue(n.outFlow)}` })
|
|
30465
30541
|
}
|
|
30466
30542
|
),
|
|
30467
|
-
/* @__PURE__ */
|
|
30543
|
+
/* @__PURE__ */ jsx129(
|
|
30468
30544
|
"text",
|
|
30469
30545
|
{
|
|
30470
30546
|
x: isFirst ? n.x - 6 : isLast ? n.x + nodeWidth + 6 : n.x + nodeWidth + 6,
|
|
@@ -30501,7 +30577,7 @@ import {
|
|
|
30501
30577
|
CaretSortIcon as CaretSortIcon2,
|
|
30502
30578
|
CaretUpIcon as CaretUpIcon3
|
|
30503
30579
|
} from "@octaviaflow/icons";
|
|
30504
|
-
import { Fragment as
|
|
30580
|
+
import { Fragment as Fragment53, jsx as jsx130, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
30505
30581
|
function TableInner({
|
|
30506
30582
|
columns,
|
|
30507
30583
|
data,
|
|
@@ -30552,7 +30628,7 @@ function TableInner({
|
|
|
30552
30628
|
[onSelectionChange, selectedRows]
|
|
30553
30629
|
);
|
|
30554
30630
|
const totalCols = columns.length + (selectable ? 1 : 0) + (expandable ? 1 : 0);
|
|
30555
|
-
return /* @__PURE__ */
|
|
30631
|
+
return /* @__PURE__ */ jsx130(
|
|
30556
30632
|
"div",
|
|
30557
30633
|
{
|
|
30558
30634
|
...rest,
|
|
@@ -30560,9 +30636,9 @@ function TableInner({
|
|
|
30560
30636
|
className: cn("ods-table-wrapper", className),
|
|
30561
30637
|
role: "region",
|
|
30562
30638
|
"aria-label": ariaLabel,
|
|
30563
|
-
children: /* @__PURE__ */
|
|
30564
|
-
/* @__PURE__ */
|
|
30565
|
-
selectable && /* @__PURE__ */
|
|
30639
|
+
children: /* @__PURE__ */ jsxs124("table", { className: "ods-table", children: [
|
|
30640
|
+
/* @__PURE__ */ jsx130("thead", { className: "ods-table__header", children: /* @__PURE__ */ jsxs124("tr", { children: [
|
|
30641
|
+
selectable && /* @__PURE__ */ jsx130("th", { className: "ods-table__cell--checkbox", scope: "col", children: /* @__PURE__ */ jsx130(
|
|
30566
30642
|
"input",
|
|
30567
30643
|
{
|
|
30568
30644
|
type: "checkbox",
|
|
@@ -30571,8 +30647,8 @@ function TableInner({
|
|
|
30571
30647
|
onChange: handleSelectAll
|
|
30572
30648
|
}
|
|
30573
30649
|
) }),
|
|
30574
|
-
expandable && /* @__PURE__ */
|
|
30575
|
-
columns.map((col) => /* @__PURE__ */
|
|
30650
|
+
expandable && /* @__PURE__ */ jsx130("th", { className: "ods-table__cell--expand", scope: "col", "aria-label": "Expand" }),
|
|
30651
|
+
columns.map((col) => /* @__PURE__ */ jsx130(
|
|
30576
30652
|
"th",
|
|
30577
30653
|
{
|
|
30578
30654
|
className: cn("ods-table__cell", col.sortable && "ods-table__cell--sortable"),
|
|
@@ -30580,9 +30656,9 @@ function TableInner({
|
|
|
30580
30656
|
scope: "col",
|
|
30581
30657
|
"aria-sort": sortKey === col.key ? sortDirection === "asc" ? "ascending" : "descending" : void 0,
|
|
30582
30658
|
onClick: col.sortable ? () => handleSort(col.key) : void 0,
|
|
30583
|
-
children: /* @__PURE__ */
|
|
30659
|
+
children: /* @__PURE__ */ jsxs124("span", { className: "ods-table__header-content", children: [
|
|
30584
30660
|
col.header,
|
|
30585
|
-
col.sortable && /* @__PURE__ */
|
|
30661
|
+
col.sortable && /* @__PURE__ */ jsx130(
|
|
30586
30662
|
"span",
|
|
30587
30663
|
{
|
|
30588
30664
|
className: cn(
|
|
@@ -30590,7 +30666,7 @@ function TableInner({
|
|
|
30590
30666
|
sortKey === col.key && "ods-table__sort-icon--active"
|
|
30591
30667
|
),
|
|
30592
30668
|
"aria-hidden": "true",
|
|
30593
|
-
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */
|
|
30669
|
+
children: sortKey === col.key ? sortDirection === "desc" ? /* @__PURE__ */ jsx130(CaretDownIcon3, { size: "xs" }) : /* @__PURE__ */ jsx130(CaretUpIcon3, { size: "xs" }) : /* @__PURE__ */ jsx130(CaretSortIcon2, { size: "xs" })
|
|
30594
30670
|
}
|
|
30595
30671
|
)
|
|
30596
30672
|
] })
|
|
@@ -30598,10 +30674,10 @@ function TableInner({
|
|
|
30598
30674
|
col.key
|
|
30599
30675
|
))
|
|
30600
30676
|
] }) }),
|
|
30601
|
-
/* @__PURE__ */
|
|
30602
|
-
loading && /* @__PURE__ */
|
|
30603
|
-
!loading && data.length === 0 && /* @__PURE__ */
|
|
30604
|
-
data.map((row, rowIndex) => /* @__PURE__ */
|
|
30677
|
+
/* @__PURE__ */ jsxs124("tbody", { children: [
|
|
30678
|
+
loading && /* @__PURE__ */ jsx130("tr", { children: /* @__PURE__ */ jsx130("td", { colSpan: totalCols, className: "ods-table__loading", children: /* @__PURE__ */ jsx130("div", { className: "ods-table__loading-bar" }) }) }),
|
|
30679
|
+
!loading && data.length === 0 && /* @__PURE__ */ jsx130("tr", { children: /* @__PURE__ */ jsx130("td", { colSpan: totalCols, className: "ods-table__empty", children: emptyMessage }) }),
|
|
30680
|
+
data.map((row, rowIndex) => /* @__PURE__ */ jsx130(
|
|
30605
30681
|
TableRow,
|
|
30606
30682
|
{
|
|
30607
30683
|
row,
|
|
@@ -30635,14 +30711,14 @@ function TableRow({
|
|
|
30635
30711
|
}) {
|
|
30636
30712
|
const isSelected = selectedRows?.has(rowIndex) ?? false;
|
|
30637
30713
|
const [expanded, setExpanded] = useState62(false);
|
|
30638
|
-
return /* @__PURE__ */
|
|
30639
|
-
/* @__PURE__ */
|
|
30714
|
+
return /* @__PURE__ */ jsxs124(Fragment53, { children: [
|
|
30715
|
+
/* @__PURE__ */ jsxs124(
|
|
30640
30716
|
"tr",
|
|
30641
30717
|
{
|
|
30642
30718
|
className: cn("ods-table__row", isSelected && "ods-table__row--selected"),
|
|
30643
30719
|
"data-row-index": rowIndex,
|
|
30644
30720
|
children: [
|
|
30645
|
-
selectable && /* @__PURE__ */
|
|
30721
|
+
selectable && /* @__PURE__ */ jsx130("td", { className: "ods-table__cell--checkbox", children: /* @__PURE__ */ jsx130(
|
|
30646
30722
|
"input",
|
|
30647
30723
|
{
|
|
30648
30724
|
type: "checkbox",
|
|
@@ -30651,7 +30727,7 @@ function TableRow({
|
|
|
30651
30727
|
onChange: () => onSelectRow(rowIndex)
|
|
30652
30728
|
}
|
|
30653
30729
|
) }),
|
|
30654
|
-
expandable && /* @__PURE__ */
|
|
30730
|
+
expandable && /* @__PURE__ */ jsx130("td", { className: "ods-table__cell--expand", children: /* @__PURE__ */ jsx130(
|
|
30655
30731
|
"button",
|
|
30656
30732
|
{
|
|
30657
30733
|
type: "button",
|
|
@@ -30659,14 +30735,14 @@ function TableRow({
|
|
|
30659
30735
|
"aria-label": expanded ? "Collapse row" : "Expand row",
|
|
30660
30736
|
"aria-expanded": expanded,
|
|
30661
30737
|
onClick: () => setExpanded(!expanded),
|
|
30662
|
-
children: /* @__PURE__ */
|
|
30738
|
+
children: /* @__PURE__ */ jsx130(CaretRightIcon, { size: "xs" })
|
|
30663
30739
|
}
|
|
30664
30740
|
) }),
|
|
30665
|
-
columns.map((col) => /* @__PURE__ */
|
|
30741
|
+
columns.map((col) => /* @__PURE__ */ jsx130("td", { className: "ods-table__cell", children: col.render ? col.render(row[col.key], row, rowIndex) : row[col.key] }, col.key))
|
|
30666
30742
|
]
|
|
30667
30743
|
}
|
|
30668
30744
|
),
|
|
30669
|
-
expandable && expanded && renderExpanded && /* @__PURE__ */
|
|
30745
|
+
expandable && expanded && renderExpanded && /* @__PURE__ */ jsx130("tr", { className: "ods-table__row--expanded", children: /* @__PURE__ */ jsx130("td", { colSpan: totalCols, className: "ods-table__expanded-cell", children: renderExpanded(row, rowIndex) }) })
|
|
30670
30746
|
] });
|
|
30671
30747
|
}
|
|
30672
30748
|
|
|
@@ -30677,7 +30753,7 @@ import {
|
|
|
30677
30753
|
useState as useState63
|
|
30678
30754
|
} from "react";
|
|
30679
30755
|
import { CloseIcon as CloseIcon19 } from "@octaviaflow/icons";
|
|
30680
|
-
import { jsx as
|
|
30756
|
+
import { jsx as jsx131, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
30681
30757
|
var TagsInput = forwardRef90(
|
|
30682
30758
|
function TagsInput2({
|
|
30683
30759
|
label,
|
|
@@ -30728,7 +30804,7 @@ var TagsInput = forwardRef90(
|
|
|
30728
30804
|
}
|
|
30729
30805
|
};
|
|
30730
30806
|
const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
|
|
30731
|
-
return /* @__PURE__ */
|
|
30807
|
+
return /* @__PURE__ */ jsxs125(
|
|
30732
30808
|
"div",
|
|
30733
30809
|
{
|
|
30734
30810
|
className: cn(
|
|
@@ -30739,7 +30815,7 @@ var TagsInput = forwardRef90(
|
|
|
30739
30815
|
wrapperClassName
|
|
30740
30816
|
),
|
|
30741
30817
|
children: [
|
|
30742
|
-
label && /* @__PURE__ */
|
|
30818
|
+
label && /* @__PURE__ */ jsx131(
|
|
30743
30819
|
"label",
|
|
30744
30820
|
{
|
|
30745
30821
|
id: labelId,
|
|
@@ -30748,10 +30824,10 @@ var TagsInput = forwardRef90(
|
|
|
30748
30824
|
children: label
|
|
30749
30825
|
}
|
|
30750
30826
|
),
|
|
30751
|
-
/* @__PURE__ */
|
|
30752
|
-
value.map((tag, i) => /* @__PURE__ */
|
|
30753
|
-
/* @__PURE__ */
|
|
30754
|
-
/* @__PURE__ */
|
|
30827
|
+
/* @__PURE__ */ jsxs125("div", { className: "ods-tags__field", children: [
|
|
30828
|
+
value.map((tag, i) => /* @__PURE__ */ jsxs125("span", { className: "ods-tags__chip", children: [
|
|
30829
|
+
/* @__PURE__ */ jsx131("span", { className: "ods-tags__chip-text", children: tag }),
|
|
30830
|
+
/* @__PURE__ */ jsx131(
|
|
30755
30831
|
"button",
|
|
30756
30832
|
{
|
|
30757
30833
|
type: "button",
|
|
@@ -30759,11 +30835,11 @@ var TagsInput = forwardRef90(
|
|
|
30759
30835
|
onClick: () => removeTag(i),
|
|
30760
30836
|
"aria-label": `Remove ${tag}`,
|
|
30761
30837
|
disabled,
|
|
30762
|
-
children: /* @__PURE__ */
|
|
30838
|
+
children: /* @__PURE__ */ jsx131(CloseIcon19, { size: "xs" })
|
|
30763
30839
|
}
|
|
30764
30840
|
)
|
|
30765
30841
|
] }, `${tag}-${i}`)),
|
|
30766
|
-
/* @__PURE__ */
|
|
30842
|
+
/* @__PURE__ */ jsx131(
|
|
30767
30843
|
"input",
|
|
30768
30844
|
{
|
|
30769
30845
|
...rest,
|
|
@@ -30783,7 +30859,7 @@ var TagsInput = forwardRef90(
|
|
|
30783
30859
|
}
|
|
30784
30860
|
)
|
|
30785
30861
|
] }),
|
|
30786
|
-
error ? /* @__PURE__ */
|
|
30862
|
+
error ? /* @__PURE__ */ jsx131(
|
|
30787
30863
|
"div",
|
|
30788
30864
|
{
|
|
30789
30865
|
id: hintId,
|
|
@@ -30791,7 +30867,7 @@ var TagsInput = forwardRef90(
|
|
|
30791
30867
|
role: "alert",
|
|
30792
30868
|
children: error
|
|
30793
30869
|
}
|
|
30794
|
-
) : helperText ? /* @__PURE__ */
|
|
30870
|
+
) : helperText ? /* @__PURE__ */ jsx131("div", { id: hintId, className: "ods-tags__hint", children: helperText }) : null
|
|
30795
30871
|
]
|
|
30796
30872
|
}
|
|
30797
30873
|
);
|
|
@@ -30804,272 +30880,236 @@ import {
|
|
|
30804
30880
|
forwardRef as forwardRef91,
|
|
30805
30881
|
useId as useId53
|
|
30806
30882
|
} from "react";
|
|
30807
|
-
import { Fragment as
|
|
30808
|
-
var TemplateCard = forwardRef91(
|
|
30809
|
-
|
|
30810
|
-
|
|
30811
|
-
|
|
30812
|
-
|
|
30813
|
-
|
|
30814
|
-
|
|
30815
|
-
|
|
30816
|
-
|
|
30817
|
-
|
|
30818
|
-
|
|
30819
|
-
|
|
30820
|
-
|
|
30821
|
-
|
|
30822
|
-
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
|
|
30826
|
-
|
|
30827
|
-
|
|
30828
|
-
|
|
30829
|
-
|
|
30830
|
-
|
|
30831
|
-
|
|
30832
|
-
|
|
30833
|
-
|
|
30834
|
-
|
|
30835
|
-
|
|
30836
|
-
|
|
30837
|
-
|
|
30838
|
-
|
|
30839
|
-
|
|
30840
|
-
|
|
30841
|
-
|
|
30842
|
-
|
|
30843
|
-
|
|
30844
|
-
|
|
30845
|
-
|
|
30846
|
-
|
|
30847
|
-
|
|
30848
|
-
|
|
30849
|
-
|
|
30850
|
-
|
|
30851
|
-
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30855
|
-
|
|
30856
|
-
|
|
30857
|
-
|
|
30858
|
-
|
|
30859
|
-
Avatar,
|
|
30860
|
-
{
|
|
30861
|
-
size: "xs",
|
|
30862
|
-
src: author.avatar?.src,
|
|
30863
|
-
initials: derivedInitials,
|
|
30864
|
-
alt: author.avatar?.alt ?? (typeof author.name === "string" ? author.name : void 0),
|
|
30865
|
-
className: "ods-template-card__author-avatar"
|
|
30866
|
-
}
|
|
30867
|
-
),
|
|
30868
|
-
/* @__PURE__ */ jsx131("span", { className: "ods-template-card__author-name", children: author.name }),
|
|
30869
|
-
author.byline && /* @__PURE__ */ jsx131("span", { className: "ods-template-card__author-byline", children: author.byline })
|
|
30870
|
-
] });
|
|
30871
|
-
};
|
|
30872
|
-
const hasImage = Boolean(image);
|
|
30873
|
-
const hasIconFlow = !hasImage && Array.isArray(icons) && icons.length > 0;
|
|
30874
|
-
const hasAppStack = !hasImage && !hasIconFlow && Array.isArray(apps) && apps.length > 0;
|
|
30875
|
-
const hasIcon = !hasImage && !hasIconFlow && !hasAppStack && Boolean(icon);
|
|
30876
|
-
const showMedia = hasImage || hasIconFlow || hasAppStack || hasIcon;
|
|
30877
|
-
const visibleApps = hasAppStack ? apps.slice(0, maxApps) : [];
|
|
30878
|
-
const overflowApps = hasAppStack ? apps.length - visibleApps.length : 0;
|
|
30879
|
-
const renderConnector = () => {
|
|
30880
|
-
if (iconConnector === "arrow")
|
|
30881
|
-
return /* @__PURE__ */ jsxs125(
|
|
30882
|
-
"svg",
|
|
30883
|
-
{
|
|
30884
|
-
className: "ods-template-card__edge",
|
|
30885
|
-
width: "44",
|
|
30886
|
-
height: "12",
|
|
30887
|
-
viewBox: "0 0 44 12",
|
|
30888
|
-
"aria-hidden": "true",
|
|
30889
|
-
children: [
|
|
30890
|
-
/* @__PURE__ */ jsx131("circle", { cx: "3", cy: "6", r: "2", fill: "currentColor" }),
|
|
30891
|
-
/* @__PURE__ */ jsx131(
|
|
30892
|
-
"path",
|
|
30893
|
-
{
|
|
30894
|
-
className: "ods-template-card__edge-line",
|
|
30895
|
-
d: "M7 6 H34",
|
|
30896
|
-
fill: "none",
|
|
30897
|
-
stroke: "currentColor",
|
|
30898
|
-
strokeWidth: "1.5",
|
|
30899
|
-
strokeDasharray: "4 3",
|
|
30900
|
-
strokeLinecap: "round"
|
|
30901
|
-
}
|
|
30902
|
-
),
|
|
30903
|
-
/* @__PURE__ */ jsx131("path", { d: "M35 2.5 41 6 35 9.5 Z", fill: "currentColor", stroke: "none" })
|
|
30904
|
-
]
|
|
30905
|
-
}
|
|
30906
|
-
);
|
|
30907
|
-
if (iconConnector === "dot") return "\xB7";
|
|
30908
|
-
if (iconConnector === "line") return "\u2500";
|
|
30909
|
-
if (iconConnector === "plus") return "+";
|
|
30910
|
-
return iconConnector;
|
|
30911
|
-
};
|
|
30912
|
-
const body = /* @__PURE__ */ jsxs125(Fragment53, { children: [
|
|
30913
|
-
showMedia && /* @__PURE__ */ jsxs125(
|
|
30914
|
-
"div",
|
|
30883
|
+
import { Fragment as Fragment54, jsx as jsx132, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
30884
|
+
var TemplateCard = forwardRef91(function TemplateCard2({
|
|
30885
|
+
name,
|
|
30886
|
+
nameAs = "h3",
|
|
30887
|
+
description,
|
|
30888
|
+
image,
|
|
30889
|
+
icon,
|
|
30890
|
+
icons,
|
|
30891
|
+
iconConnector = "arrow",
|
|
30892
|
+
apps,
|
|
30893
|
+
maxApps = 5,
|
|
30894
|
+
iconTone = "default",
|
|
30895
|
+
imageAspect = "16/9",
|
|
30896
|
+
category,
|
|
30897
|
+
author,
|
|
30898
|
+
stats,
|
|
30899
|
+
requirements,
|
|
30900
|
+
tags,
|
|
30901
|
+
cta,
|
|
30902
|
+
footer,
|
|
30903
|
+
badge,
|
|
30904
|
+
size = "md",
|
|
30905
|
+
onClick,
|
|
30906
|
+
href,
|
|
30907
|
+
disabled = false,
|
|
30908
|
+
radius = "md",
|
|
30909
|
+
id: providedId,
|
|
30910
|
+
className,
|
|
30911
|
+
...rest
|
|
30912
|
+
}, ref) {
|
|
30913
|
+
const reactId = useId53();
|
|
30914
|
+
const baseId = providedId ?? `ods-template-card-${reactId}`;
|
|
30915
|
+
const nameId = `${baseId}-name`;
|
|
30916
|
+
const descId = description ? `${baseId}-desc` : void 0;
|
|
30917
|
+
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
30918
|
+
const hasInternalInteractive = Boolean(cta || footer);
|
|
30919
|
+
const useStretchedLink = Boolean(href) && !disabled && hasInternalInteractive;
|
|
30920
|
+
const titleContent = useStretchedLink ? /* @__PURE__ */ jsx132(
|
|
30921
|
+
"a",
|
|
30922
|
+
{
|
|
30923
|
+
className: "ods-template-card__stretched-link",
|
|
30924
|
+
href,
|
|
30925
|
+
onClick,
|
|
30926
|
+
children: name
|
|
30927
|
+
}
|
|
30928
|
+
) : name;
|
|
30929
|
+
const renderAuthor = () => {
|
|
30930
|
+
if (!author) return null;
|
|
30931
|
+
const derivedInitials = author.avatar?.initials ?? (typeof author.name === "string" ? author.name.charAt(0).toUpperCase() : void 0);
|
|
30932
|
+
return /* @__PURE__ */ jsxs126("div", { className: "ods-template-card__author", children: [
|
|
30933
|
+
(author.avatar || derivedInitials) && /* @__PURE__ */ jsx132(
|
|
30934
|
+
Avatar,
|
|
30915
30935
|
{
|
|
30916
|
-
|
|
30917
|
-
|
|
30918
|
-
|
|
30919
|
-
|
|
30920
|
-
|
|
30921
|
-
|
|
30922
|
-
|
|
30936
|
+
size: "xs",
|
|
30937
|
+
src: author.avatar?.src,
|
|
30938
|
+
initials: derivedInitials,
|
|
30939
|
+
seed: author.avatar?.seed,
|
|
30940
|
+
palette: author.avatar?.palette,
|
|
30941
|
+
alt: author.avatar?.alt ?? (typeof author.name === "string" ? author.name : void 0),
|
|
30942
|
+
className: "ods-template-card__author-avatar"
|
|
30943
|
+
}
|
|
30944
|
+
),
|
|
30945
|
+
/* @__PURE__ */ jsx132("span", { className: "ods-template-card__author-name", children: author.name }),
|
|
30946
|
+
author.byline && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__author-byline", children: author.byline })
|
|
30947
|
+
] });
|
|
30948
|
+
};
|
|
30949
|
+
const hasImage = Boolean(image);
|
|
30950
|
+
const hasIconFlow = !hasImage && Array.isArray(icons) && icons.length > 0;
|
|
30951
|
+
const hasAppStack = !hasImage && !hasIconFlow && Array.isArray(apps) && apps.length > 0;
|
|
30952
|
+
const hasIcon = !hasImage && !hasIconFlow && !hasAppStack && Boolean(icon);
|
|
30953
|
+
const showMedia = hasImage || hasIconFlow || hasAppStack || hasIcon;
|
|
30954
|
+
const visibleApps = hasAppStack ? apps.slice(0, maxApps) : [];
|
|
30955
|
+
const overflowApps = hasAppStack ? apps.length - visibleApps.length : 0;
|
|
30956
|
+
const renderConnector = () => {
|
|
30957
|
+
if (iconConnector === "arrow")
|
|
30958
|
+
return /* @__PURE__ */ jsxs126(
|
|
30959
|
+
"svg",
|
|
30960
|
+
{
|
|
30961
|
+
className: "ods-template-card__edge",
|
|
30962
|
+
width: "44",
|
|
30963
|
+
height: "12",
|
|
30964
|
+
viewBox: "0 0 44 12",
|
|
30923
30965
|
"aria-hidden": "true",
|
|
30924
30966
|
children: [
|
|
30925
|
-
|
|
30926
|
-
|
|
30927
|
-
|
|
30928
|
-
|
|
30929
|
-
"
|
|
30930
|
-
|
|
30931
|
-
|
|
30932
|
-
|
|
30933
|
-
|
|
30934
|
-
|
|
30935
|
-
|
|
30936
|
-
|
|
30937
|
-
|
|
30938
|
-
|
|
30939
|
-
i
|
|
30940
|
-
)),
|
|
30941
|
-
overflowApps > 0 && /* @__PURE__ */ jsxs125("span", { className: "ods-template-card__app ods-template-card__app--more", children: [
|
|
30942
|
-
"+",
|
|
30943
|
-
overflowApps
|
|
30944
|
-
] })
|
|
30945
|
-
] }),
|
|
30946
|
-
hasIconFlow && /* @__PURE__ */ jsx131("span", { className: "ods-template-card__icon-flow", children: icons.map((step, i) => /* @__PURE__ */ jsxs125("span", { className: "ods-template-card__icon-flow-item", children: [
|
|
30947
|
-
i > 0 && /* @__PURE__ */ jsx131(
|
|
30948
|
-
"span",
|
|
30949
|
-
{
|
|
30950
|
-
className: "ods-template-card__icon-connector",
|
|
30951
|
-
"aria-hidden": "true",
|
|
30952
|
-
children: renderConnector()
|
|
30953
|
-
}
|
|
30954
|
-
),
|
|
30955
|
-
/* @__PURE__ */ jsx131(
|
|
30956
|
-
"span",
|
|
30957
|
-
{
|
|
30958
|
-
className: cn(
|
|
30959
|
-
"ods-template-card__icon-tile",
|
|
30960
|
-
`ods-template-card__icon-tile--tone-${step.tone ?? iconTone}`
|
|
30961
|
-
),
|
|
30962
|
-
"aria-label": step.label,
|
|
30963
|
-
role: step.label ? "img" : void 0,
|
|
30964
|
-
children: step.icon
|
|
30965
|
-
}
|
|
30966
|
-
)
|
|
30967
|
-
] }, i)) }),
|
|
30968
|
-
badge && /* @__PURE__ */ jsx131("span", { className: "ods-template-card__badge", children: badge })
|
|
30967
|
+
/* @__PURE__ */ jsx132("circle", { cx: "3", cy: "6", r: "2", fill: "currentColor" }),
|
|
30968
|
+
/* @__PURE__ */ jsx132(
|
|
30969
|
+
"path",
|
|
30970
|
+
{
|
|
30971
|
+
className: "ods-template-card__edge-line",
|
|
30972
|
+
d: "M7 6 H34",
|
|
30973
|
+
fill: "none",
|
|
30974
|
+
stroke: "currentColor",
|
|
30975
|
+
strokeWidth: "1.5",
|
|
30976
|
+
strokeDasharray: "4 3",
|
|
30977
|
+
strokeLinecap: "round"
|
|
30978
|
+
}
|
|
30979
|
+
),
|
|
30980
|
+
/* @__PURE__ */ jsx132("path", { d: "M35 2.5 41 6 35 9.5 Z", fill: "currentColor", stroke: "none" })
|
|
30969
30981
|
]
|
|
30970
30982
|
}
|
|
30971
|
-
)
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30975
|
-
|
|
30976
|
-
|
|
30977
|
-
|
|
30978
|
-
|
|
30979
|
-
|
|
30980
|
-
|
|
30981
|
-
|
|
30982
|
-
|
|
30983
|
-
|
|
30984
|
-
|
|
30985
|
-
{
|
|
30986
|
-
|
|
30987
|
-
className: "ods-template-card__description",
|
|
30988
|
-
children: description
|
|
30989
|
-
}
|
|
30990
|
-
),
|
|
30991
|
-
requirements && requirements.length > 0 && /* @__PURE__ */ jsx131(
|
|
30992
|
-
"div",
|
|
30993
|
-
{
|
|
30994
|
-
className: "ods-template-card__requirements",
|
|
30995
|
-
"aria-label": "Requirements",
|
|
30996
|
-
children: requirements.map((r, i) => /* @__PURE__ */ jsx131("span", { className: "ods-template-card__requirement", children: r }, i))
|
|
30997
|
-
}
|
|
30983
|
+
);
|
|
30984
|
+
if (iconConnector === "dot") return "\xB7";
|
|
30985
|
+
if (iconConnector === "line") return "\u2500";
|
|
30986
|
+
if (iconConnector === "plus") return "+";
|
|
30987
|
+
return iconConnector;
|
|
30988
|
+
};
|
|
30989
|
+
const body = /* @__PURE__ */ jsxs126(Fragment54, { children: [
|
|
30990
|
+
showMedia && /* @__PURE__ */ jsxs126(
|
|
30991
|
+
"div",
|
|
30992
|
+
{
|
|
30993
|
+
className: cn(
|
|
30994
|
+
"ods-template-card__image",
|
|
30995
|
+
`ods-template-card__image--ratio-${imageAspect.replace("/", "-")}`,
|
|
30996
|
+
(hasIcon || hasIconFlow || hasAppStack) && "ods-template-card__image--icon",
|
|
30997
|
+
hasIcon && `ods-template-card__image--tone-${iconTone}`,
|
|
30998
|
+
(hasIconFlow || hasAppStack) && "ods-template-card__image--flow"
|
|
30998
30999
|
),
|
|
30999
|
-
|
|
31000
|
-
|
|
31001
|
-
|
|
31002
|
-
|
|
31000
|
+
"aria-hidden": "true",
|
|
31001
|
+
children: [
|
|
31002
|
+
hasImage && image,
|
|
31003
|
+
hasIcon && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__icon", children: icon }),
|
|
31004
|
+
hasAppStack && /* @__PURE__ */ jsxs126("span", { className: "ods-template-card__app-stack", children: [
|
|
31005
|
+
visibleApps.map((app, i) => /* @__PURE__ */ jsx132(
|
|
31003
31006
|
"span",
|
|
31004
31007
|
{
|
|
31005
|
-
className:
|
|
31006
|
-
|
|
31007
|
-
|
|
31008
|
+
className: cn(
|
|
31009
|
+
"ods-template-card__app",
|
|
31010
|
+
!app.src && `ods-template-card__app--tone-${app.tone ?? iconTone}`
|
|
31011
|
+
),
|
|
31012
|
+
role: app.label ? "img" : void 0,
|
|
31013
|
+
"aria-label": app.label,
|
|
31014
|
+
children: app.src ? /* @__PURE__ */ jsx132("img", { src: app.src, alt: app.label ?? "" }) : app.icon
|
|
31015
|
+
},
|
|
31016
|
+
i
|
|
31017
|
+
)),
|
|
31018
|
+
overflowApps > 0 && /* @__PURE__ */ jsxs126("span", { className: "ods-template-card__app ods-template-card__app--more", children: [
|
|
31019
|
+
"+",
|
|
31020
|
+
overflowApps
|
|
31021
|
+
] })
|
|
31022
|
+
] }),
|
|
31023
|
+
hasIconFlow && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__icon-flow", children: icons.map((step, i) => /* @__PURE__ */ jsxs126("span", { className: "ods-template-card__icon-flow-item", children: [
|
|
31024
|
+
i > 0 && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__icon-connector", "aria-hidden": "true", children: renderConnector() }),
|
|
31025
|
+
/* @__PURE__ */ jsx132(
|
|
31026
|
+
"span",
|
|
31027
|
+
{
|
|
31028
|
+
className: cn(
|
|
31029
|
+
"ods-template-card__icon-tile",
|
|
31030
|
+
`ods-template-card__icon-tile--tone-${step.tone ?? iconTone}`
|
|
31031
|
+
),
|
|
31032
|
+
"aria-label": step.label,
|
|
31033
|
+
role: step.label ? "img" : void 0,
|
|
31034
|
+
children: step.icon
|
|
31008
31035
|
}
|
|
31009
|
-
)
|
|
31010
|
-
|
|
31011
|
-
|
|
31012
|
-
]
|
|
31013
|
-
|
|
31014
|
-
|
|
31015
|
-
|
|
31016
|
-
|
|
31017
|
-
|
|
31018
|
-
|
|
31019
|
-
|
|
31036
|
+
)
|
|
31037
|
+
] }, i)) }),
|
|
31038
|
+
badge && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__badge", children: badge })
|
|
31039
|
+
]
|
|
31040
|
+
}
|
|
31041
|
+
),
|
|
31042
|
+
/* @__PURE__ */ jsxs126("div", { className: "ods-template-card__content", children: [
|
|
31043
|
+
category && /* @__PURE__ */ jsx132("div", { className: "ods-template-card__category", children: category }),
|
|
31044
|
+
/* @__PURE__ */ jsx132(Card.Title, { as: nameAs, id: nameId, className: "ods-template-card__name", children: titleContent }),
|
|
31045
|
+
description && /* @__PURE__ */ jsx132(Card.Description, { id: descId, className: "ods-template-card__description", children: description }),
|
|
31046
|
+
requirements && requirements.length > 0 && /* @__PURE__ */ jsx132("div", { className: "ods-template-card__requirements", "aria-label": "Requirements", children: requirements.map((r, i) => /* @__PURE__ */ jsx132("span", { className: "ods-template-card__requirement", children: r }, i)) }),
|
|
31047
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx132("dl", { className: "ods-template-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs126("div", { className: "ods-template-card__stat", children: [
|
|
31048
|
+
/* @__PURE__ */ jsx132("dt", { className: "ods-template-card__stat-label", children: s.label }),
|
|
31049
|
+
/* @__PURE__ */ jsxs126("dd", { className: "ods-template-card__stat-value", children: [
|
|
31050
|
+
s.icon && /* @__PURE__ */ jsx132("span", { className: "ods-template-card__stat-icon", "aria-hidden": "true", children: s.icon }),
|
|
31051
|
+
s.value
|
|
31052
|
+
] })
|
|
31053
|
+
] }, i)) }),
|
|
31054
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsx132("div", { className: "ods-template-card__tags", children: tags.map((t, i) => /* @__PURE__ */ jsx132("span", { className: "ods-template-card__tag", children: t }, i)) }),
|
|
31055
|
+
(author || cta || footer) && /* @__PURE__ */ jsxs126("div", { className: "ods-template-card__footer-row", children: [
|
|
31056
|
+
renderAuthor(),
|
|
31057
|
+
(cta || footer) && /* @__PURE__ */ jsxs126("div", { className: "ods-template-card__footer-actions", children: [
|
|
31058
|
+
cta && /* @__PURE__ */ jsx132("div", { className: "ods-template-card__cta", children: cta }),
|
|
31059
|
+
footer && /* @__PURE__ */ jsx132("div", { className: "ods-template-card__footer", children: footer })
|
|
31020
31060
|
] })
|
|
31021
31061
|
] })
|
|
31022
|
-
] })
|
|
31023
|
-
|
|
31024
|
-
|
|
31025
|
-
|
|
31026
|
-
|
|
31027
|
-
|
|
31028
|
-
|
|
31029
|
-
|
|
31030
|
-
|
|
31031
|
-
|
|
31032
|
-
|
|
31033
|
-
|
|
31034
|
-
{
|
|
31035
|
-
asChild: true,
|
|
31036
|
-
radius,
|
|
31037
|
-
padding: "none",
|
|
31038
|
-
className: sharedClass,
|
|
31039
|
-
"aria-labelledby": nameId,
|
|
31040
|
-
"aria-describedby": descId,
|
|
31041
|
-
children: /* @__PURE__ */ jsx131(
|
|
31042
|
-
"a",
|
|
31043
|
-
{
|
|
31044
|
-
...rest,
|
|
31045
|
-
ref,
|
|
31046
|
-
href,
|
|
31047
|
-
id: baseId,
|
|
31048
|
-
onClick,
|
|
31049
|
-
children: body
|
|
31050
|
-
}
|
|
31051
|
-
)
|
|
31052
|
-
}
|
|
31053
|
-
);
|
|
31054
|
-
}
|
|
31055
|
-
return /* @__PURE__ */ jsx131(
|
|
31062
|
+
] })
|
|
31063
|
+
] });
|
|
31064
|
+
const sharedClass = cn(
|
|
31065
|
+
"ods-template-card",
|
|
31066
|
+
`ods-template-card--${size}`,
|
|
31067
|
+
isInteractive && "ods-template-card--interactive",
|
|
31068
|
+
useStretchedLink && "ods-template-card--stretched",
|
|
31069
|
+
disabled && "ods-template-card--disabled",
|
|
31070
|
+
className
|
|
31071
|
+
);
|
|
31072
|
+
if (href && !disabled && !useStretchedLink) {
|
|
31073
|
+
return /* @__PURE__ */ jsx132(
|
|
31056
31074
|
Card,
|
|
31057
31075
|
{
|
|
31058
|
-
|
|
31059
|
-
ref,
|
|
31060
|
-
id: baseId,
|
|
31076
|
+
asChild: true,
|
|
31061
31077
|
radius,
|
|
31062
31078
|
padding: "none",
|
|
31063
|
-
onClick: isInteractive ? onClick : void 0,
|
|
31064
|
-
disabled,
|
|
31065
31079
|
className: sharedClass,
|
|
31066
31080
|
"aria-labelledby": nameId,
|
|
31067
31081
|
"aria-describedby": descId,
|
|
31068
|
-
children:
|
|
31082
|
+
children: /* @__PURE__ */ jsx132(
|
|
31083
|
+
"a",
|
|
31084
|
+
{
|
|
31085
|
+
...rest,
|
|
31086
|
+
ref,
|
|
31087
|
+
href,
|
|
31088
|
+
id: baseId,
|
|
31089
|
+
onClick,
|
|
31090
|
+
children: body
|
|
31091
|
+
}
|
|
31092
|
+
)
|
|
31069
31093
|
}
|
|
31070
31094
|
);
|
|
31071
31095
|
}
|
|
31072
|
-
|
|
31096
|
+
return /* @__PURE__ */ jsx132(
|
|
31097
|
+
Card,
|
|
31098
|
+
{
|
|
31099
|
+
...rest,
|
|
31100
|
+
ref,
|
|
31101
|
+
id: baseId,
|
|
31102
|
+
radius,
|
|
31103
|
+
padding: "none",
|
|
31104
|
+
onClick: isInteractive ? onClick : void 0,
|
|
31105
|
+
disabled,
|
|
31106
|
+
className: sharedClass,
|
|
31107
|
+
"aria-labelledby": nameId,
|
|
31108
|
+
"aria-describedby": descId,
|
|
31109
|
+
children: body
|
|
31110
|
+
}
|
|
31111
|
+
);
|
|
31112
|
+
});
|
|
31073
31113
|
TemplateCard.displayName = "TemplateCard";
|
|
31074
31114
|
|
|
31075
31115
|
// src/components/Timeline/Timeline.tsx
|
|
@@ -31077,7 +31117,7 @@ import { AnimatePresence as AnimatePresence17, motion as motion27 } from "framer
|
|
|
31077
31117
|
import {
|
|
31078
31118
|
forwardRef as forwardRef92
|
|
31079
31119
|
} from "react";
|
|
31080
|
-
import { jsx as
|
|
31120
|
+
import { jsx as jsx133, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
31081
31121
|
var Timeline = forwardRef92(
|
|
31082
31122
|
function Timeline2({
|
|
31083
31123
|
items,
|
|
@@ -31087,16 +31127,16 @@ var Timeline = forwardRef92(
|
|
|
31087
31127
|
className,
|
|
31088
31128
|
...rest
|
|
31089
31129
|
}, ref) {
|
|
31090
|
-
return /* @__PURE__ */
|
|
31130
|
+
return /* @__PURE__ */ jsx133(
|
|
31091
31131
|
"ol",
|
|
31092
31132
|
{
|
|
31093
31133
|
...rest,
|
|
31094
31134
|
ref,
|
|
31095
31135
|
className: cn("ods-timeline", `ods-timeline--${size}`, className),
|
|
31096
|
-
children: /* @__PURE__ */
|
|
31136
|
+
children: /* @__PURE__ */ jsx133(AnimatePresence17, { initial: false, children: items.map((item, idx) => {
|
|
31097
31137
|
const last = idx === items.length - 1;
|
|
31098
31138
|
const status = item.status ?? "default";
|
|
31099
|
-
return /* @__PURE__ */
|
|
31139
|
+
return /* @__PURE__ */ jsxs127(
|
|
31100
31140
|
motion27.li,
|
|
31101
31141
|
{
|
|
31102
31142
|
layout: animated,
|
|
@@ -31113,8 +31153,8 @@ var Timeline = forwardRef92(
|
|
|
31113
31153
|
delay: animated ? idx * staggerDelay / 1e3 : 0
|
|
31114
31154
|
},
|
|
31115
31155
|
children: [
|
|
31116
|
-
/* @__PURE__ */
|
|
31117
|
-
/* @__PURE__ */
|
|
31156
|
+
/* @__PURE__ */ jsxs127("div", { className: "ods-timeline__rail", children: [
|
|
31157
|
+
/* @__PURE__ */ jsx133(
|
|
31118
31158
|
"span",
|
|
31119
31159
|
{
|
|
31120
31160
|
className: cn(
|
|
@@ -31125,12 +31165,12 @@ var Timeline = forwardRef92(
|
|
|
31125
31165
|
children: item.icon
|
|
31126
31166
|
}
|
|
31127
31167
|
),
|
|
31128
|
-
!last && /* @__PURE__ */
|
|
31168
|
+
!last && /* @__PURE__ */ jsx133("span", { className: "ods-timeline__line", "aria-hidden": "true" })
|
|
31129
31169
|
] }),
|
|
31130
|
-
/* @__PURE__ */
|
|
31131
|
-
/* @__PURE__ */
|
|
31132
|
-
item.description && /* @__PURE__ */
|
|
31133
|
-
item.meta && /* @__PURE__ */
|
|
31170
|
+
/* @__PURE__ */ jsxs127("div", { className: "ods-timeline__body", children: [
|
|
31171
|
+
/* @__PURE__ */ jsx133("div", { className: "ods-timeline__title", children: item.title }),
|
|
31172
|
+
item.description && /* @__PURE__ */ jsx133("div", { className: "ods-timeline__desc", children: item.description }),
|
|
31173
|
+
item.meta && /* @__PURE__ */ jsx133("div", { className: "ods-timeline__meta", children: item.meta })
|
|
31134
31174
|
] })
|
|
31135
31175
|
]
|
|
31136
31176
|
},
|
|
@@ -31146,7 +31186,7 @@ Timeline.displayName = "Timeline";
|
|
|
31146
31186
|
// src/components/TimePicker/TimePicker.tsx
|
|
31147
31187
|
import {
|
|
31148
31188
|
forwardRef as forwardRef93,
|
|
31149
|
-
Fragment as
|
|
31189
|
+
Fragment as Fragment55,
|
|
31150
31190
|
useCallback as useCallback44,
|
|
31151
31191
|
useEffect as useEffect50,
|
|
31152
31192
|
useId as useId54,
|
|
@@ -31160,7 +31200,7 @@ import {
|
|
|
31160
31200
|
ChevronDownIcon as ChevronDownIcon9,
|
|
31161
31201
|
TimeIcon as TimeIcon2
|
|
31162
31202
|
} from "@octaviaflow/icons";
|
|
31163
|
-
import { Fragment as
|
|
31203
|
+
import { Fragment as Fragment56, jsx as jsx134, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
31164
31204
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
31165
31205
|
function format(v, use24h, showSeconds) {
|
|
31166
31206
|
const base = `${pad(v.hours)}:${pad(v.minutes)}${showSeconds ? `:${pad(v.seconds ?? 0)}` : ""}`;
|
|
@@ -31392,7 +31432,7 @@ var TimePicker = forwardRef93(
|
|
|
31392
31432
|
if (draft && draft.seg === seg) return draft.digits.padStart(2, "0");
|
|
31393
31433
|
return pad(val);
|
|
31394
31434
|
};
|
|
31395
|
-
const segButton = (seg, val) => /* @__PURE__ */
|
|
31435
|
+
const segButton = (seg, val) => /* @__PURE__ */ jsx134(
|
|
31396
31436
|
"button",
|
|
31397
31437
|
{
|
|
31398
31438
|
ref: refOf(seg),
|
|
@@ -31412,7 +31452,7 @@ var TimePicker = forwardRef93(
|
|
|
31412
31452
|
children: segDisplay(seg, val)
|
|
31413
31453
|
}
|
|
31414
31454
|
);
|
|
31415
|
-
return /* @__PURE__ */
|
|
31455
|
+
return /* @__PURE__ */ jsxs128(
|
|
31416
31456
|
"div",
|
|
31417
31457
|
{
|
|
31418
31458
|
...rest,
|
|
@@ -31425,7 +31465,7 @@ var TimePicker = forwardRef93(
|
|
|
31425
31465
|
className
|
|
31426
31466
|
),
|
|
31427
31467
|
children: [
|
|
31428
|
-
label && /* @__PURE__ */
|
|
31468
|
+
label && /* @__PURE__ */ jsx134(
|
|
31429
31469
|
"label",
|
|
31430
31470
|
{
|
|
31431
31471
|
id: labelId,
|
|
@@ -31434,7 +31474,7 @@ var TimePicker = forwardRef93(
|
|
|
31434
31474
|
children: label
|
|
31435
31475
|
}
|
|
31436
31476
|
),
|
|
31437
|
-
/* @__PURE__ */
|
|
31477
|
+
/* @__PURE__ */ jsxs128(
|
|
31438
31478
|
"button",
|
|
31439
31479
|
{
|
|
31440
31480
|
type: "button",
|
|
@@ -31450,9 +31490,9 @@ var TimePicker = forwardRef93(
|
|
|
31450
31490
|
"aria-describedby": describedBy,
|
|
31451
31491
|
"aria-invalid": error ? true : void 0,
|
|
31452
31492
|
children: [
|
|
31453
|
-
/* @__PURE__ */
|
|
31454
|
-
/* @__PURE__ */
|
|
31455
|
-
/* @__PURE__ */
|
|
31493
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx134(TimeIcon2, { size: "xs" }) }),
|
|
31494
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__value", children: format(value, use24h, showSeconds) }),
|
|
31495
|
+
/* @__PURE__ */ jsx134(
|
|
31456
31496
|
"span",
|
|
31457
31497
|
{
|
|
31458
31498
|
className: cn(
|
|
@@ -31460,14 +31500,14 @@ var TimePicker = forwardRef93(
|
|
|
31460
31500
|
open && "ods-timepicker__chev--open"
|
|
31461
31501
|
),
|
|
31462
31502
|
"aria-hidden": "true",
|
|
31463
|
-
children: /* @__PURE__ */
|
|
31503
|
+
children: /* @__PURE__ */ jsx134(ChevronDownIcon9, { size: "xs" })
|
|
31464
31504
|
}
|
|
31465
31505
|
)
|
|
31466
31506
|
]
|
|
31467
31507
|
}
|
|
31468
31508
|
),
|
|
31469
31509
|
open && typeof document !== "undefined" && createPortal17(
|
|
31470
|
-
/* @__PURE__ */
|
|
31510
|
+
/* @__PURE__ */ jsxs128(
|
|
31471
31511
|
"div",
|
|
31472
31512
|
{
|
|
31473
31513
|
ref: popoverRef,
|
|
@@ -31476,18 +31516,18 @@ var TimePicker = forwardRef93(
|
|
|
31476
31516
|
"aria-label": "Select time",
|
|
31477
31517
|
style: anchoredPopoverStyle(popoverPos),
|
|
31478
31518
|
children: [
|
|
31479
|
-
/* @__PURE__ */
|
|
31480
|
-
/* @__PURE__ */
|
|
31519
|
+
/* @__PURE__ */ jsxs128("div", { className: "ods-timepicker__head", children: [
|
|
31520
|
+
/* @__PURE__ */ jsxs128("div", { className: "ods-timepicker__display", children: [
|
|
31481
31521
|
segButton("hours", value.hours),
|
|
31482
|
-
/* @__PURE__ */
|
|
31522
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
31483
31523
|
segButton("minutes", value.minutes),
|
|
31484
|
-
showSeconds && /* @__PURE__ */
|
|
31485
|
-
/* @__PURE__ */
|
|
31524
|
+
showSeconds && /* @__PURE__ */ jsxs128(Fragment56, { children: [
|
|
31525
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
31486
31526
|
segButton("seconds", value.seconds ?? 0)
|
|
31487
31527
|
] })
|
|
31488
31528
|
] }),
|
|
31489
|
-
!use24h && /* @__PURE__ */
|
|
31490
|
-
/* @__PURE__ */
|
|
31529
|
+
!use24h && /* @__PURE__ */ jsxs128("div", { className: "ods-timepicker__period", children: [
|
|
31530
|
+
/* @__PURE__ */ jsx134(
|
|
31491
31531
|
"button",
|
|
31492
31532
|
{
|
|
31493
31533
|
type: "button",
|
|
@@ -31499,7 +31539,7 @@ var TimePicker = forwardRef93(
|
|
|
31499
31539
|
children: "AM"
|
|
31500
31540
|
}
|
|
31501
31541
|
),
|
|
31502
|
-
/* @__PURE__ */
|
|
31542
|
+
/* @__PURE__ */ jsx134(
|
|
31503
31543
|
"button",
|
|
31504
31544
|
{
|
|
31505
31545
|
type: "button",
|
|
@@ -31513,41 +31553,41 @@ var TimePicker = forwardRef93(
|
|
|
31513
31553
|
)
|
|
31514
31554
|
] })
|
|
31515
31555
|
] }),
|
|
31516
|
-
/* @__PURE__ */
|
|
31517
|
-
/* @__PURE__ */
|
|
31518
|
-
/* @__PURE__ */
|
|
31519
|
-
/* @__PURE__ */
|
|
31556
|
+
/* @__PURE__ */ jsx134("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs128(Fragment55, { children: [
|
|
31557
|
+
/* @__PURE__ */ jsxs128("div", { className: "ods-timepicker__col", children: [
|
|
31558
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
|
|
31559
|
+
/* @__PURE__ */ jsx134(
|
|
31520
31560
|
"button",
|
|
31521
31561
|
{
|
|
31522
31562
|
type: "button",
|
|
31523
31563
|
className: "ods-timepicker__step",
|
|
31524
31564
|
onClick: () => stepBy(seg, 1),
|
|
31525
31565
|
"aria-label": `${seg} up`,
|
|
31526
|
-
children: /* @__PURE__ */
|
|
31566
|
+
children: /* @__PURE__ */ jsx134(CaretUpIcon4, { size: "xs" })
|
|
31527
31567
|
}
|
|
31528
31568
|
),
|
|
31529
|
-
/* @__PURE__ */
|
|
31569
|
+
/* @__PURE__ */ jsx134("span", { className: "ods-timepicker__col-val", children: pad(
|
|
31530
31570
|
seg === "hours" ? value.hours : seg === "minutes" ? value.minutes : value.seconds ?? 0
|
|
31531
31571
|
) }),
|
|
31532
|
-
/* @__PURE__ */
|
|
31572
|
+
/* @__PURE__ */ jsx134(
|
|
31533
31573
|
"button",
|
|
31534
31574
|
{
|
|
31535
31575
|
type: "button",
|
|
31536
31576
|
className: "ods-timepicker__step",
|
|
31537
31577
|
onClick: () => stepBy(seg, -1),
|
|
31538
31578
|
"aria-label": `${seg} down`,
|
|
31539
|
-
children: /* @__PURE__ */
|
|
31579
|
+
children: /* @__PURE__ */ jsx134(CaretDownIcon4, { size: "xs" })
|
|
31540
31580
|
}
|
|
31541
31581
|
)
|
|
31542
31582
|
] }),
|
|
31543
|
-
i < arr.length - 1 && /* @__PURE__ */
|
|
31583
|
+
i < arr.length - 1 && /* @__PURE__ */ jsx134("span", { className: "ods-timepicker__sep", children: ":" })
|
|
31544
31584
|
] }, seg)) })
|
|
31545
31585
|
]
|
|
31546
31586
|
}
|
|
31547
31587
|
),
|
|
31548
31588
|
document.body
|
|
31549
31589
|
),
|
|
31550
|
-
error ? /* @__PURE__ */
|
|
31590
|
+
error ? /* @__PURE__ */ jsx134(
|
|
31551
31591
|
"div",
|
|
31552
31592
|
{
|
|
31553
31593
|
id: hintId,
|
|
@@ -31555,7 +31595,7 @@ var TimePicker = forwardRef93(
|
|
|
31555
31595
|
role: "alert",
|
|
31556
31596
|
children: error
|
|
31557
31597
|
}
|
|
31558
|
-
) : helperText ? /* @__PURE__ */
|
|
31598
|
+
) : helperText ? /* @__PURE__ */ jsx134("div", { id: hintId, className: "ods-timepicker__hint", children: helperText }) : null
|
|
31559
31599
|
]
|
|
31560
31600
|
}
|
|
31561
31601
|
);
|
|
@@ -31579,7 +31619,7 @@ import {
|
|
|
31579
31619
|
GlobeIcon,
|
|
31580
31620
|
SearchIcon as SearchIcon13
|
|
31581
31621
|
} from "@octaviaflow/icons";
|
|
31582
|
-
import { Fragment as
|
|
31622
|
+
import { Fragment as Fragment57, jsx as jsx135, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
31583
31623
|
var DEFAULT_TZS = [
|
|
31584
31624
|
{ iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
|
|
31585
31625
|
{ iana: "America/Denver", label: "Mountain Time", offset: "UTC\u22127" },
|
|
@@ -31714,7 +31754,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31714
31754
|
const setTriggerRef = (node) => {
|
|
31715
31755
|
triggerRef.current = node;
|
|
31716
31756
|
};
|
|
31717
|
-
return /* @__PURE__ */
|
|
31757
|
+
return /* @__PURE__ */ jsxs129(
|
|
31718
31758
|
"div",
|
|
31719
31759
|
{
|
|
31720
31760
|
...rest,
|
|
@@ -31727,7 +31767,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31727
31767
|
className
|
|
31728
31768
|
),
|
|
31729
31769
|
children: [
|
|
31730
|
-
label && /* @__PURE__ */
|
|
31770
|
+
label && /* @__PURE__ */ jsx135(
|
|
31731
31771
|
"label",
|
|
31732
31772
|
{
|
|
31733
31773
|
id: labelId,
|
|
@@ -31736,7 +31776,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31736
31776
|
children: label
|
|
31737
31777
|
}
|
|
31738
31778
|
),
|
|
31739
|
-
/* @__PURE__ */
|
|
31779
|
+
/* @__PURE__ */ jsxs129(
|
|
31740
31780
|
"button",
|
|
31741
31781
|
{
|
|
31742
31782
|
ref: setTriggerRef,
|
|
@@ -31753,17 +31793,17 @@ var TimezonePicker = forwardRef94(
|
|
|
31753
31793
|
"aria-describedby": describedBy,
|
|
31754
31794
|
"aria-invalid": error ? true : void 0,
|
|
31755
31795
|
children: [
|
|
31756
|
-
/* @__PURE__ */
|
|
31757
|
-
/* @__PURE__ */
|
|
31758
|
-
/* @__PURE__ */
|
|
31759
|
-
/* @__PURE__ */
|
|
31796
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx135(GlobeIcon, { size: "xs" }) }),
|
|
31797
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__info", children: selected ? /* @__PURE__ */ jsxs129(Fragment57, { children: [
|
|
31798
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__name", children: selected.label }),
|
|
31799
|
+
/* @__PURE__ */ jsxs129("span", { className: "ods-tzpicker__meta", children: [
|
|
31760
31800
|
selected.iana.split("/").pop()?.replace(/_/g, " "),
|
|
31761
31801
|
" \xB7",
|
|
31762
31802
|
" ",
|
|
31763
31803
|
selected.offset
|
|
31764
31804
|
] })
|
|
31765
|
-
] }) : /* @__PURE__ */
|
|
31766
|
-
/* @__PURE__ */
|
|
31805
|
+
] }) : /* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__name ods-tzpicker__name--placeholder", children: placeholder }) }),
|
|
31806
|
+
/* @__PURE__ */ jsx135(
|
|
31767
31807
|
"span",
|
|
31768
31808
|
{
|
|
31769
31809
|
className: cn(
|
|
@@ -31771,13 +31811,13 @@ var TimezonePicker = forwardRef94(
|
|
|
31771
31811
|
open && "ods-tzpicker__chev--open"
|
|
31772
31812
|
),
|
|
31773
31813
|
"aria-hidden": "true",
|
|
31774
|
-
children: /* @__PURE__ */
|
|
31814
|
+
children: /* @__PURE__ */ jsx135(ChevronDownIcon10, { size: "xs" })
|
|
31775
31815
|
}
|
|
31776
31816
|
)
|
|
31777
31817
|
]
|
|
31778
31818
|
}
|
|
31779
31819
|
),
|
|
31780
|
-
open && /* @__PURE__ */
|
|
31820
|
+
open && /* @__PURE__ */ jsxs129(
|
|
31781
31821
|
"div",
|
|
31782
31822
|
{
|
|
31783
31823
|
className: "ods-tzpicker__popover",
|
|
@@ -31785,9 +31825,9 @@ var TimezonePicker = forwardRef94(
|
|
|
31785
31825
|
"aria-label": "Select timezone",
|
|
31786
31826
|
onKeyDown: handlePopoverKey,
|
|
31787
31827
|
children: [
|
|
31788
|
-
/* @__PURE__ */
|
|
31789
|
-
/* @__PURE__ */
|
|
31790
|
-
/* @__PURE__ */
|
|
31828
|
+
/* @__PURE__ */ jsxs129("div", { className: "ods-tzpicker__search", children: [
|
|
31829
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__search-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx135(SearchIcon13, { size: "xs" }) }),
|
|
31830
|
+
/* @__PURE__ */ jsx135(
|
|
31791
31831
|
"input",
|
|
31792
31832
|
{
|
|
31793
31833
|
ref: inputRef,
|
|
@@ -31803,7 +31843,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31803
31843
|
}
|
|
31804
31844
|
)
|
|
31805
31845
|
] }),
|
|
31806
|
-
/* @__PURE__ */
|
|
31846
|
+
/* @__PURE__ */ jsxs129(
|
|
31807
31847
|
"ul",
|
|
31808
31848
|
{
|
|
31809
31849
|
ref: listRef,
|
|
@@ -31812,11 +31852,11 @@ var TimezonePicker = forwardRef94(
|
|
|
31812
31852
|
role: "listbox",
|
|
31813
31853
|
"aria-labelledby": labelId,
|
|
31814
31854
|
children: [
|
|
31815
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
31855
|
+
filtered.length === 0 && /* @__PURE__ */ jsx135("li", { className: "ods-tzpicker__empty", role: "presentation", children: "No timezones found" }),
|
|
31816
31856
|
filtered.map((opt, i) => {
|
|
31817
31857
|
const isSelected = opt.iana === value;
|
|
31818
31858
|
const isActive2 = i === activeIndex;
|
|
31819
|
-
return /* @__PURE__ */
|
|
31859
|
+
return /* @__PURE__ */ jsx135("li", { role: "presentation", children: /* @__PURE__ */ jsxs129(
|
|
31820
31860
|
"button",
|
|
31821
31861
|
{
|
|
31822
31862
|
type: "button",
|
|
@@ -31833,17 +31873,17 @@ var TimezonePicker = forwardRef94(
|
|
|
31833
31873
|
onClick: () => select(opt.iana),
|
|
31834
31874
|
onMouseEnter: () => setActiveIndex(i),
|
|
31835
31875
|
children: [
|
|
31836
|
-
/* @__PURE__ */
|
|
31837
|
-
/* @__PURE__ */
|
|
31838
|
-
/* @__PURE__ */
|
|
31876
|
+
/* @__PURE__ */ jsxs129("span", { className: "ods-tzpicker__opt-text", children: [
|
|
31877
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__opt-name", children: opt.label }),
|
|
31878
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__opt-iana", children: opt.iana })
|
|
31839
31879
|
] }),
|
|
31840
|
-
/* @__PURE__ */
|
|
31841
|
-
isSelected && /* @__PURE__ */
|
|
31880
|
+
/* @__PURE__ */ jsx135("span", { className: "ods-tzpicker__opt-off", children: opt.offset }),
|
|
31881
|
+
isSelected && /* @__PURE__ */ jsx135(
|
|
31842
31882
|
"span",
|
|
31843
31883
|
{
|
|
31844
31884
|
className: "ods-tzpicker__opt-check",
|
|
31845
31885
|
"aria-hidden": "true",
|
|
31846
|
-
children: /* @__PURE__ */
|
|
31886
|
+
children: /* @__PURE__ */ jsx135(CheckmarkIcon13, { size: "xs" })
|
|
31847
31887
|
}
|
|
31848
31888
|
)
|
|
31849
31889
|
]
|
|
@@ -31856,7 +31896,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31856
31896
|
]
|
|
31857
31897
|
}
|
|
31858
31898
|
),
|
|
31859
|
-
error ? /* @__PURE__ */
|
|
31899
|
+
error ? /* @__PURE__ */ jsx135(
|
|
31860
31900
|
"div",
|
|
31861
31901
|
{
|
|
31862
31902
|
id: hintId,
|
|
@@ -31864,7 +31904,7 @@ var TimezonePicker = forwardRef94(
|
|
|
31864
31904
|
role: "alert",
|
|
31865
31905
|
children: error
|
|
31866
31906
|
}
|
|
31867
|
-
) : helperText ? /* @__PURE__ */
|
|
31907
|
+
) : helperText ? /* @__PURE__ */ jsx135("div", { id: hintId, className: "ods-tzpicker__hint", children: helperText }) : null
|
|
31868
31908
|
]
|
|
31869
31909
|
}
|
|
31870
31910
|
);
|
|
@@ -31883,10 +31923,10 @@ import {
|
|
|
31883
31923
|
useState as useState66
|
|
31884
31924
|
} from "react";
|
|
31885
31925
|
import { createPortal as createPortal18 } from "react-dom";
|
|
31886
|
-
import { Fragment as
|
|
31926
|
+
import { Fragment as Fragment58, jsx as jsx136, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
31887
31927
|
var defaultIcons = {
|
|
31888
|
-
success: /* @__PURE__ */
|
|
31889
|
-
/* @__PURE__ */
|
|
31928
|
+
success: /* @__PURE__ */ jsxs130("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
31929
|
+
/* @__PURE__ */ jsx136(
|
|
31890
31930
|
"circle",
|
|
31891
31931
|
{
|
|
31892
31932
|
cx: "8",
|
|
@@ -31896,7 +31936,7 @@ var defaultIcons = {
|
|
|
31896
31936
|
stroke: "var(--ods-status-success-bd)"
|
|
31897
31937
|
}
|
|
31898
31938
|
),
|
|
31899
|
-
/* @__PURE__ */
|
|
31939
|
+
/* @__PURE__ */ jsx136(
|
|
31900
31940
|
"path",
|
|
31901
31941
|
{
|
|
31902
31942
|
d: "m5 8 2 2 4-4.5",
|
|
@@ -31907,8 +31947,8 @@ var defaultIcons = {
|
|
|
31907
31947
|
}
|
|
31908
31948
|
)
|
|
31909
31949
|
] }),
|
|
31910
|
-
error: /* @__PURE__ */
|
|
31911
|
-
/* @__PURE__ */
|
|
31950
|
+
error: /* @__PURE__ */ jsxs130("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
31951
|
+
/* @__PURE__ */ jsx136(
|
|
31912
31952
|
"circle",
|
|
31913
31953
|
{
|
|
31914
31954
|
cx: "8",
|
|
@@ -31918,7 +31958,7 @@ var defaultIcons = {
|
|
|
31918
31958
|
stroke: "var(--ods-status-failed-bd)"
|
|
31919
31959
|
}
|
|
31920
31960
|
),
|
|
31921
|
-
/* @__PURE__ */
|
|
31961
|
+
/* @__PURE__ */ jsx136(
|
|
31922
31962
|
"path",
|
|
31923
31963
|
{
|
|
31924
31964
|
d: "M5.5 5.5l5 5M10.5 5.5l-5 5",
|
|
@@ -31928,8 +31968,8 @@ var defaultIcons = {
|
|
|
31928
31968
|
}
|
|
31929
31969
|
)
|
|
31930
31970
|
] }),
|
|
31931
|
-
warning: /* @__PURE__ */
|
|
31932
|
-
/* @__PURE__ */
|
|
31971
|
+
warning: /* @__PURE__ */ jsxs130("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
31972
|
+
/* @__PURE__ */ jsx136(
|
|
31933
31973
|
"circle",
|
|
31934
31974
|
{
|
|
31935
31975
|
cx: "8",
|
|
@@ -31939,7 +31979,7 @@ var defaultIcons = {
|
|
|
31939
31979
|
stroke: "var(--ods-status-pending-bd)"
|
|
31940
31980
|
}
|
|
31941
31981
|
),
|
|
31942
|
-
/* @__PURE__ */
|
|
31982
|
+
/* @__PURE__ */ jsx136(
|
|
31943
31983
|
"path",
|
|
31944
31984
|
{
|
|
31945
31985
|
d: "M8 4.5v4.2M8 11v.5",
|
|
@@ -31949,8 +31989,8 @@ var defaultIcons = {
|
|
|
31949
31989
|
}
|
|
31950
31990
|
)
|
|
31951
31991
|
] }),
|
|
31952
|
-
info: /* @__PURE__ */
|
|
31953
|
-
/* @__PURE__ */
|
|
31992
|
+
info: /* @__PURE__ */ jsxs130("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
31993
|
+
/* @__PURE__ */ jsx136(
|
|
31954
31994
|
"circle",
|
|
31955
31995
|
{
|
|
31956
31996
|
cx: "8",
|
|
@@ -31960,7 +32000,7 @@ var defaultIcons = {
|
|
|
31960
32000
|
stroke: "var(--ods-status-running-bd)"
|
|
31961
32001
|
}
|
|
31962
32002
|
),
|
|
31963
|
-
/* @__PURE__ */
|
|
32003
|
+
/* @__PURE__ */ jsx136(
|
|
31964
32004
|
"path",
|
|
31965
32005
|
{
|
|
31966
32006
|
d: "M8 7.5v4M8 4.5v.5",
|
|
@@ -31974,19 +32014,19 @@ var defaultIcons = {
|
|
|
31974
32014
|
var ToastContext = createContext3(null);
|
|
31975
32015
|
function ToastBody({ item, onDismiss }) {
|
|
31976
32016
|
const dismiss = () => onDismiss(item.id);
|
|
31977
|
-
if (item.render) return /* @__PURE__ */
|
|
32017
|
+
if (item.render) return /* @__PURE__ */ jsx136(Fragment58, { children: item.render({ id: item.id, dismiss }) });
|
|
31978
32018
|
const title = item.title ?? item.message;
|
|
31979
|
-
return /* @__PURE__ */
|
|
31980
|
-
/* @__PURE__ */
|
|
31981
|
-
/* @__PURE__ */
|
|
31982
|
-
title && /* @__PURE__ */
|
|
31983
|
-
item.description && /* @__PURE__ */
|
|
32019
|
+
return /* @__PURE__ */ jsxs130(Fragment58, { children: [
|
|
32020
|
+
/* @__PURE__ */ jsx136("span", { className: "ods-toast__icon", "aria-hidden": "true", children: item.icon ?? defaultIcons[item.variant] }),
|
|
32021
|
+
/* @__PURE__ */ jsxs130("div", { className: "ods-toast__body", children: [
|
|
32022
|
+
title && /* @__PURE__ */ jsx136("div", { className: "ods-toast__title", children: title }),
|
|
32023
|
+
item.description && /* @__PURE__ */ jsx136("div", { className: "ods-toast__desc", children: item.description })
|
|
31984
32024
|
] }),
|
|
31985
|
-
(item.actionLabel || item.action) && /* @__PURE__ */
|
|
32025
|
+
(item.actionLabel || item.action) && /* @__PURE__ */ jsx136("div", { className: "ods-toast__action", children: item.actionLabel ? (
|
|
31986
32026
|
// First-class action chip — consistent styling, auto-dismiss
|
|
31987
32027
|
// after the consumer's onAction runs. This is the path most
|
|
31988
32028
|
// consumers should use ("Undo", "Retry", "View").
|
|
31989
|
-
/* @__PURE__ */
|
|
32029
|
+
/* @__PURE__ */ jsx136(
|
|
31990
32030
|
"button",
|
|
31991
32031
|
{
|
|
31992
32032
|
type: "button",
|
|
@@ -32005,7 +32045,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
32005
32045
|
// (including any explicit dismiss() they want to call).
|
|
32006
32046
|
item.action
|
|
32007
32047
|
) }),
|
|
32008
|
-
item.closeable && /* @__PURE__ */
|
|
32048
|
+
item.closeable && /* @__PURE__ */ jsx136(
|
|
32009
32049
|
"button",
|
|
32010
32050
|
{
|
|
32011
32051
|
type: "button",
|
|
@@ -32015,7 +32055,7 @@ function ToastBody({ item, onDismiss }) {
|
|
|
32015
32055
|
e.stopPropagation();
|
|
32016
32056
|
dismiss();
|
|
32017
32057
|
},
|
|
32018
|
-
children: /* @__PURE__ */
|
|
32058
|
+
children: /* @__PURE__ */ jsx136("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx136(
|
|
32019
32059
|
"path",
|
|
32020
32060
|
{
|
|
32021
32061
|
d: "M3 3l8 8M11 3l-8 8",
|
|
@@ -32048,7 +32088,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
32048
32088
|
}
|
|
32049
32089
|
return { y: maxStack * 10 * dir, scale: 1 - maxStack * 0.05, opacity: 0 };
|
|
32050
32090
|
};
|
|
32051
|
-
return /* @__PURE__ */
|
|
32091
|
+
return /* @__PURE__ */ jsxs130(
|
|
32052
32092
|
"div",
|
|
32053
32093
|
{
|
|
32054
32094
|
className: cn(
|
|
@@ -32061,7 +32101,7 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
32061
32101
|
onMouseLeave: () => setHovered(false),
|
|
32062
32102
|
"aria-live": "polite",
|
|
32063
32103
|
children: [
|
|
32064
|
-
/* @__PURE__ */
|
|
32104
|
+
/* @__PURE__ */ jsx136(
|
|
32065
32105
|
"div",
|
|
32066
32106
|
{
|
|
32067
32107
|
className: cn("ods-toast-stack__scroll", expanded && "ods-toast-stack__scroll--expanded"),
|
|
@@ -32071,9 +32111,9 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
32071
32111
|
setPinned((p) => !p);
|
|
32072
32112
|
}
|
|
32073
32113
|
},
|
|
32074
|
-
children: /* @__PURE__ */
|
|
32114
|
+
children: /* @__PURE__ */ jsx136(AnimatePresence18, { mode: "popLayout", children: ordered.map((item, idx) => {
|
|
32075
32115
|
const s = stackedStyle(idx);
|
|
32076
|
-
return /* @__PURE__ */
|
|
32116
|
+
return /* @__PURE__ */ jsx136(
|
|
32077
32117
|
motion28.div,
|
|
32078
32118
|
{
|
|
32079
32119
|
layout: true,
|
|
@@ -32096,14 +32136,14 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
32096
32136
|
setPinned(true);
|
|
32097
32137
|
}
|
|
32098
32138
|
},
|
|
32099
|
-
children: /* @__PURE__ */
|
|
32139
|
+
children: /* @__PURE__ */ jsx136(ToastBody, { item, onDismiss })
|
|
32100
32140
|
},
|
|
32101
32141
|
item.id
|
|
32102
32142
|
);
|
|
32103
32143
|
}) })
|
|
32104
32144
|
}
|
|
32105
32145
|
),
|
|
32106
|
-
expanded && items.length > 1 && pinned && /* @__PURE__ */
|
|
32146
|
+
expanded && items.length > 1 && pinned && /* @__PURE__ */ jsx136(
|
|
32107
32147
|
"button",
|
|
32108
32148
|
{
|
|
32109
32149
|
type: "button",
|
|
@@ -32196,10 +32236,10 @@ function ToastProvider({
|
|
|
32196
32236
|
return out;
|
|
32197
32237
|
}, [toasts]);
|
|
32198
32238
|
const ctx = { toast, dismiss, dismissAll };
|
|
32199
|
-
const containers = /* @__PURE__ */
|
|
32239
|
+
const containers = /* @__PURE__ */ jsx136(Fragment58, { children: POSITIONS.map((pos) => {
|
|
32200
32240
|
const list = groups[pos];
|
|
32201
32241
|
if (list.length === 0) return null;
|
|
32202
|
-
return /* @__PURE__ */
|
|
32242
|
+
return /* @__PURE__ */ jsx136(
|
|
32203
32243
|
PositionStack,
|
|
32204
32244
|
{
|
|
32205
32245
|
items: list,
|
|
@@ -32210,7 +32250,7 @@ function ToastProvider({
|
|
|
32210
32250
|
pos
|
|
32211
32251
|
);
|
|
32212
32252
|
}) });
|
|
32213
|
-
return /* @__PURE__ */
|
|
32253
|
+
return /* @__PURE__ */ jsxs130(ToastContext.Provider, { value: ctx, children: [
|
|
32214
32254
|
children,
|
|
32215
32255
|
typeof document !== "undefined" && createPortal18(containers, document.body)
|
|
32216
32256
|
] });
|
|
@@ -32235,7 +32275,7 @@ import {
|
|
|
32235
32275
|
useId as useId56,
|
|
32236
32276
|
useRef as useRef47
|
|
32237
32277
|
} from "react";
|
|
32238
|
-
import { jsx as
|
|
32278
|
+
import { jsx as jsx137, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
32239
32279
|
function Toggle({
|
|
32240
32280
|
label,
|
|
32241
32281
|
options: options2,
|
|
@@ -32316,7 +32356,7 @@ function Toggle({
|
|
|
32316
32356
|
);
|
|
32317
32357
|
const selectedIdx = options2.findIndex((o) => o.value === value);
|
|
32318
32358
|
const fallbackTabIdx = selectedIdx >= 0 ? selectedIdx : findNextEnabled(-1, 1);
|
|
32319
|
-
return /* @__PURE__ */
|
|
32359
|
+
return /* @__PURE__ */ jsxs131(
|
|
32320
32360
|
"div",
|
|
32321
32361
|
{
|
|
32322
32362
|
...rest,
|
|
@@ -32328,8 +32368,8 @@ function Toggle({
|
|
|
32328
32368
|
className
|
|
32329
32369
|
),
|
|
32330
32370
|
children: [
|
|
32331
|
-
label && /* @__PURE__ */
|
|
32332
|
-
/* @__PURE__ */
|
|
32371
|
+
label && /* @__PURE__ */ jsx137("span", { id: labelId, className: "ods-toggle-field__label", children: label }),
|
|
32372
|
+
/* @__PURE__ */ jsx137(
|
|
32333
32373
|
"div",
|
|
32334
32374
|
{
|
|
32335
32375
|
role: "radiogroup",
|
|
@@ -32346,7 +32386,7 @@ function Toggle({
|
|
|
32346
32386
|
children: options2.map((opt, i) => {
|
|
32347
32387
|
const active = opt.value === value;
|
|
32348
32388
|
const isDisabled = disabled || opt.disabled;
|
|
32349
|
-
return /* @__PURE__ */
|
|
32389
|
+
return /* @__PURE__ */ jsxs131(
|
|
32350
32390
|
"button",
|
|
32351
32391
|
{
|
|
32352
32392
|
ref: (el) => {
|
|
@@ -32364,8 +32404,8 @@ function Toggle({
|
|
|
32364
32404
|
active && "ods-toggle__opt--active"
|
|
32365
32405
|
),
|
|
32366
32406
|
children: [
|
|
32367
|
-
opt.icon && /* @__PURE__ */
|
|
32368
|
-
/* @__PURE__ */
|
|
32407
|
+
opt.icon && /* @__PURE__ */ jsx137("span", { className: "ods-toggle__icon", "aria-hidden": "true", children: opt.icon }),
|
|
32408
|
+
/* @__PURE__ */ jsx137("span", { className: "ods-toggle__label", children: opt.label })
|
|
32369
32409
|
]
|
|
32370
32410
|
},
|
|
32371
32411
|
opt.value
|
|
@@ -32373,7 +32413,7 @@ function Toggle({
|
|
|
32373
32413
|
})
|
|
32374
32414
|
}
|
|
32375
32415
|
),
|
|
32376
|
-
error ? /* @__PURE__ */
|
|
32416
|
+
error ? /* @__PURE__ */ jsx137(
|
|
32377
32417
|
"div",
|
|
32378
32418
|
{
|
|
32379
32419
|
id: hintId,
|
|
@@ -32381,7 +32421,7 @@ function Toggle({
|
|
|
32381
32421
|
role: "alert",
|
|
32382
32422
|
children: error
|
|
32383
32423
|
}
|
|
32384
|
-
) : helperText ? /* @__PURE__ */
|
|
32424
|
+
) : helperText ? /* @__PURE__ */ jsx137("div", { id: hintId, className: "ods-toggle-field__hint", children: helperText }) : null
|
|
32385
32425
|
]
|
|
32386
32426
|
}
|
|
32387
32427
|
);
|
|
@@ -32389,9 +32429,9 @@ function Toggle({
|
|
|
32389
32429
|
Toggle.displayName = "Toggle";
|
|
32390
32430
|
|
|
32391
32431
|
// src/components/Toolbar/Toolbar.tsx
|
|
32392
|
-
import { jsx as
|
|
32432
|
+
import { jsx as jsx138, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
32393
32433
|
function Toolbar({ children, className }) {
|
|
32394
|
-
return /* @__PURE__ */
|
|
32434
|
+
return /* @__PURE__ */ jsx138("div", { role: "toolbar", className: cn("ods-toolbar", className), children });
|
|
32395
32435
|
}
|
|
32396
32436
|
function ToolbarButton({
|
|
32397
32437
|
icon,
|
|
@@ -32403,7 +32443,7 @@ function ToolbarButton({
|
|
|
32403
32443
|
className,
|
|
32404
32444
|
children
|
|
32405
32445
|
}) {
|
|
32406
|
-
return /* @__PURE__ */
|
|
32446
|
+
return /* @__PURE__ */ jsxs132(
|
|
32407
32447
|
"button",
|
|
32408
32448
|
{
|
|
32409
32449
|
type: "button",
|
|
@@ -32413,18 +32453,18 @@ function ToolbarButton({
|
|
|
32413
32453
|
"aria-pressed": active,
|
|
32414
32454
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
32415
32455
|
children: [
|
|
32416
|
-
icon && /* @__PURE__ */
|
|
32417
|
-
label && /* @__PURE__ */
|
|
32456
|
+
icon && /* @__PURE__ */ jsx138("span", { className: "ods-toolbar__btn-icon", "aria-hidden": "true", children: icon }),
|
|
32457
|
+
label && /* @__PURE__ */ jsx138("span", { className: "ods-toolbar__btn-label", children: label }),
|
|
32418
32458
|
children
|
|
32419
32459
|
]
|
|
32420
32460
|
}
|
|
32421
32461
|
);
|
|
32422
32462
|
}
|
|
32423
32463
|
function ToolbarDivider() {
|
|
32424
|
-
return /* @__PURE__ */
|
|
32464
|
+
return /* @__PURE__ */ jsx138("span", { className: "ods-toolbar__divider", "aria-hidden": "true" });
|
|
32425
32465
|
}
|
|
32426
32466
|
function ToolbarSpacer() {
|
|
32427
|
-
return /* @__PURE__ */
|
|
32467
|
+
return /* @__PURE__ */ jsx138("span", { className: "ods-toolbar__spacer" });
|
|
32428
32468
|
}
|
|
32429
32469
|
|
|
32430
32470
|
// src/components/ToolCard/ToolCard.tsx
|
|
@@ -32442,16 +32482,16 @@ import {
|
|
|
32442
32482
|
MagicWandIcon,
|
|
32443
32483
|
SearchIcon as SearchIcon14
|
|
32444
32484
|
} from "@octaviaflow/icons";
|
|
32445
|
-
import { jsx as
|
|
32485
|
+
import { jsx as jsx139, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
32446
32486
|
var CATEGORY_GLYPH = {
|
|
32447
|
-
search: /* @__PURE__ */
|
|
32448
|
-
database: /* @__PURE__ */
|
|
32449
|
-
web: /* @__PURE__ */
|
|
32450
|
-
code: /* @__PURE__ */
|
|
32451
|
-
file: /* @__PURE__ */
|
|
32452
|
-
api: /* @__PURE__ */
|
|
32453
|
-
ai: /* @__PURE__ */
|
|
32454
|
-
custom: /* @__PURE__ */
|
|
32487
|
+
search: /* @__PURE__ */ jsx139(SearchIcon14, { size: "xs" }),
|
|
32488
|
+
database: /* @__PURE__ */ jsx139(DataBaseIcon, { size: "xs" }),
|
|
32489
|
+
web: /* @__PURE__ */ jsx139(GlobeIcon2, { size: "xs" }),
|
|
32490
|
+
code: /* @__PURE__ */ jsx139(CodeIcon5, { size: "xs" }),
|
|
32491
|
+
file: /* @__PURE__ */ jsx139(DocumentIcon5, { size: "xs" }),
|
|
32492
|
+
api: /* @__PURE__ */ jsx139(ApiIcon, { size: "xs" }),
|
|
32493
|
+
ai: /* @__PURE__ */ jsx139(MagicWandIcon, { size: "xs" }),
|
|
32494
|
+
custom: /* @__PURE__ */ jsx139(ExtensionsIcon, { size: "xs" })
|
|
32455
32495
|
};
|
|
32456
32496
|
var ToolCard = forwardRef95(
|
|
32457
32497
|
function ToolCard2({
|
|
@@ -32489,7 +32529,7 @@ var ToolCard = forwardRef95(
|
|
|
32489
32529
|
}
|
|
32490
32530
|
};
|
|
32491
32531
|
const showSwitch = !hideToggle && onToggle !== void 0;
|
|
32492
|
-
return /* @__PURE__ */
|
|
32532
|
+
return /* @__PURE__ */ jsxs133(
|
|
32493
32533
|
"div",
|
|
32494
32534
|
{
|
|
32495
32535
|
...rest,
|
|
@@ -32512,7 +32552,7 @@ var ToolCard = forwardRef95(
|
|
|
32512
32552
|
"aria-label": ariaLabel,
|
|
32513
32553
|
"aria-describedby": descId,
|
|
32514
32554
|
children: [
|
|
32515
|
-
/* @__PURE__ */
|
|
32555
|
+
/* @__PURE__ */ jsx139(
|
|
32516
32556
|
"span",
|
|
32517
32557
|
{
|
|
32518
32558
|
className: cn(
|
|
@@ -32523,15 +32563,15 @@ var ToolCard = forwardRef95(
|
|
|
32523
32563
|
children: icon ?? CATEGORY_GLYPH[category]
|
|
32524
32564
|
}
|
|
32525
32565
|
),
|
|
32526
|
-
/* @__PURE__ */
|
|
32527
|
-
/* @__PURE__ */
|
|
32528
|
-
/* @__PURE__ */
|
|
32529
|
-
isNew && /* @__PURE__ */
|
|
32530
|
-
badge && /* @__PURE__ */
|
|
32566
|
+
/* @__PURE__ */ jsxs133("div", { className: "ods-tool-card__body", children: [
|
|
32567
|
+
/* @__PURE__ */ jsxs133("div", { className: "ods-tool-card__head", children: [
|
|
32568
|
+
/* @__PURE__ */ jsx139("span", { id: nameId, className: "ods-tool-card__name", children: name }),
|
|
32569
|
+
isNew && /* @__PURE__ */ jsx139("span", { className: "ods-tool-card__new", "aria-label": "New", children: "NEW" }),
|
|
32570
|
+
badge && /* @__PURE__ */ jsx139("span", { className: "ods-tool-card__badge", children: badge })
|
|
32531
32571
|
] }),
|
|
32532
|
-
description && /* @__PURE__ */
|
|
32572
|
+
description && /* @__PURE__ */ jsx139("div", { id: descId, className: "ods-tool-card__desc", children: description })
|
|
32533
32573
|
] }),
|
|
32534
|
-
showSwitch && /* @__PURE__ */
|
|
32574
|
+
showSwitch && /* @__PURE__ */ jsx139(
|
|
32535
32575
|
"button",
|
|
32536
32576
|
{
|
|
32537
32577
|
type: "button",
|
|
@@ -32552,7 +32592,7 @@ var ToolCard = forwardRef95(
|
|
|
32552
32592
|
e.stopPropagation();
|
|
32553
32593
|
}
|
|
32554
32594
|
},
|
|
32555
|
-
children: /* @__PURE__ */
|
|
32595
|
+
children: /* @__PURE__ */ jsx139("span", { className: "ods-tool-card__switch-thumb", "aria-hidden": "true" })
|
|
32556
32596
|
}
|
|
32557
32597
|
)
|
|
32558
32598
|
]
|
|
@@ -32563,7 +32603,7 @@ var ToolCard = forwardRef95(
|
|
|
32563
32603
|
ToolCard.displayName = "ToolCard";
|
|
32564
32604
|
|
|
32565
32605
|
// src/components/TopBar/TopBar.tsx
|
|
32566
|
-
import { jsx as
|
|
32606
|
+
import { jsx as jsx140, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
32567
32607
|
function TopBar({
|
|
32568
32608
|
brand,
|
|
32569
32609
|
workspaceSwitcher,
|
|
@@ -32583,32 +32623,32 @@ function TopBar({
|
|
|
32583
32623
|
const showDividerAfterBrand = hasBrandBlock && (hasWorkspace || hasCrumbs || hasTitle);
|
|
32584
32624
|
const showDividerAfterWorkspace = hasWorkspace && (hasCrumbs || hasTitle);
|
|
32585
32625
|
const BrandRoot = brand?.href ? "a" : "div";
|
|
32586
|
-
return /* @__PURE__ */
|
|
32587
|
-
/* @__PURE__ */
|
|
32588
|
-
brand && /* @__PURE__ */
|
|
32626
|
+
return /* @__PURE__ */ jsxs134("header", { ...props, className: cn("ods-topbar", className), children: [
|
|
32627
|
+
/* @__PURE__ */ jsxs134("div", { className: "ods-topbar__left", children: [
|
|
32628
|
+
brand && /* @__PURE__ */ jsxs134(
|
|
32589
32629
|
BrandRoot,
|
|
32590
32630
|
{
|
|
32591
32631
|
href: brand.href,
|
|
32592
32632
|
className: cn("ods-topbar__brand", brand.href && "ods-topbar__brand--link"),
|
|
32593
32633
|
children: [
|
|
32594
|
-
brand.logo && /* @__PURE__ */
|
|
32595
|
-
/* @__PURE__ */
|
|
32634
|
+
brand.logo && /* @__PURE__ */ jsx140("span", { className: "ods-topbar__brand-mark", children: brand.logo }),
|
|
32635
|
+
/* @__PURE__ */ jsx140("span", { className: "ods-topbar__brand-name", children: brand.name })
|
|
32596
32636
|
]
|
|
32597
32637
|
}
|
|
32598
32638
|
),
|
|
32599
|
-
showDividerAfterBrand && /* @__PURE__ */
|
|
32600
|
-
workspaceSwitcher && /* @__PURE__ */
|
|
32601
|
-
showDividerAfterWorkspace && /* @__PURE__ */
|
|
32602
|
-
hasCrumbs && /* @__PURE__ */
|
|
32603
|
-
idx > 0 && /* @__PURE__ */
|
|
32604
|
-
crumb.href ? /* @__PURE__ */
|
|
32639
|
+
showDividerAfterBrand && /* @__PURE__ */ jsx140("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
32640
|
+
workspaceSwitcher && /* @__PURE__ */ jsx140("div", { className: "ods-topbar__workspace", children: workspaceSwitcher }),
|
|
32641
|
+
showDividerAfterWorkspace && /* @__PURE__ */ jsx140("span", { className: "ods-topbar__divider", "aria-hidden": "true" }),
|
|
32642
|
+
hasCrumbs && /* @__PURE__ */ jsx140("nav", { className: "ods-topbar__breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx140("ol", { children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs134("li", { className: "ods-topbar__crumb", children: [
|
|
32643
|
+
idx > 0 && /* @__PURE__ */ jsx140("span", { className: "ods-topbar__separator", "aria-hidden": "true", children: "/" }),
|
|
32644
|
+
crumb.href ? /* @__PURE__ */ jsx140("a", { href: crumb.href, children: crumb.label }) : /* @__PURE__ */ jsx140("span", { "aria-current": idx === breadcrumbs.length - 1 ? "page" : void 0, children: crumb.label })
|
|
32605
32645
|
] }, idx)) }) }),
|
|
32606
|
-
hasTitle && /* @__PURE__ */
|
|
32646
|
+
hasTitle && /* @__PURE__ */ jsx140("h1", { className: "ods-topbar__title", children: title })
|
|
32607
32647
|
] }),
|
|
32608
|
-
children && /* @__PURE__ */
|
|
32609
|
-
/* @__PURE__ */
|
|
32610
|
-
onSearch && /* @__PURE__ */
|
|
32611
|
-
/* @__PURE__ */
|
|
32648
|
+
children && /* @__PURE__ */ jsx140("div", { className: "ods-topbar__center", children }),
|
|
32649
|
+
/* @__PURE__ */ jsxs134("div", { className: "ods-topbar__right", children: [
|
|
32650
|
+
onSearch && /* @__PURE__ */ jsxs134("div", { className: "ods-topbar__search", children: [
|
|
32651
|
+
/* @__PURE__ */ jsx140(
|
|
32612
32652
|
"svg",
|
|
32613
32653
|
{
|
|
32614
32654
|
className: "ods-topbar__search-icon",
|
|
@@ -32617,7 +32657,7 @@ function TopBar({
|
|
|
32617
32657
|
viewBox: "0 0 20 20",
|
|
32618
32658
|
fill: "currentColor",
|
|
32619
32659
|
"aria-hidden": "true",
|
|
32620
|
-
children: /* @__PURE__ */
|
|
32660
|
+
children: /* @__PURE__ */ jsx140(
|
|
32621
32661
|
"path",
|
|
32622
32662
|
{
|
|
32623
32663
|
fillRule: "evenodd",
|
|
@@ -32627,7 +32667,7 @@ function TopBar({
|
|
|
32627
32667
|
)
|
|
32628
32668
|
}
|
|
32629
32669
|
),
|
|
32630
|
-
/* @__PURE__ */
|
|
32670
|
+
/* @__PURE__ */ jsx140(
|
|
32631
32671
|
"input",
|
|
32632
32672
|
{
|
|
32633
32673
|
type: "search",
|
|
@@ -32638,7 +32678,7 @@ function TopBar({
|
|
|
32638
32678
|
}
|
|
32639
32679
|
)
|
|
32640
32680
|
] }),
|
|
32641
|
-
actions && /* @__PURE__ */
|
|
32681
|
+
actions && /* @__PURE__ */ jsx140("div", { className: "ods-topbar__actions", children: actions })
|
|
32642
32682
|
] })
|
|
32643
32683
|
] });
|
|
32644
32684
|
}
|
|
@@ -32660,13 +32700,13 @@ import {
|
|
|
32660
32700
|
IdeaIcon,
|
|
32661
32701
|
WarningAltIcon as WarningAltIcon2
|
|
32662
32702
|
} from "@octaviaflow/icons";
|
|
32663
|
-
import { jsx as
|
|
32703
|
+
import { jsx as jsx141, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
32664
32704
|
var DEFAULT_KIND_GLYPH = {
|
|
32665
|
-
thought: /* @__PURE__ */
|
|
32666
|
-
tool: /* @__PURE__ */
|
|
32667
|
-
input: /* @__PURE__ */
|
|
32668
|
-
output: /* @__PURE__ */
|
|
32669
|
-
error: /* @__PURE__ */
|
|
32705
|
+
thought: /* @__PURE__ */ jsx141(IdeaIcon, { size: "xs" }),
|
|
32706
|
+
tool: /* @__PURE__ */ jsx141(BuildToolIcon, { size: "xs" }),
|
|
32707
|
+
input: /* @__PURE__ */ jsx141(ConnectionReceiveIcon, { size: "xs" }),
|
|
32708
|
+
output: /* @__PURE__ */ jsx141(ConnectionSendIcon, { size: "xs" }),
|
|
32709
|
+
error: /* @__PURE__ */ jsx141(WarningAltIcon2, { size: "xs" })
|
|
32670
32710
|
};
|
|
32671
32711
|
var FALLBACK_GLYPH = DEFAULT_KIND_GLYPH.thought;
|
|
32672
32712
|
var TraceStep = forwardRef96(
|
|
@@ -32706,7 +32746,7 @@ var TraceStep = forwardRef96(
|
|
|
32706
32746
|
onOpenChange?.(next);
|
|
32707
32747
|
}, [canExpand, open, isControlled, onOpenChange]);
|
|
32708
32748
|
const resolvedGlyph = icon ?? kindIcons?.[kind] ?? DEFAULT_KIND_GLYPH[kind] ?? FALLBACK_GLYPH;
|
|
32709
|
-
return /* @__PURE__ */
|
|
32749
|
+
return /* @__PURE__ */ jsxs135(
|
|
32710
32750
|
"div",
|
|
32711
32751
|
{
|
|
32712
32752
|
...rest,
|
|
@@ -32722,18 +32762,18 @@ var TraceStep = forwardRef96(
|
|
|
32722
32762
|
className
|
|
32723
32763
|
),
|
|
32724
32764
|
children: [
|
|
32725
|
-
/* @__PURE__ */
|
|
32726
|
-
/* @__PURE__ */
|
|
32765
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-trace-step__rail", "aria-hidden": "true", children: [
|
|
32766
|
+
/* @__PURE__ */ jsx141(
|
|
32727
32767
|
motion29.span,
|
|
32728
32768
|
{
|
|
32729
32769
|
className: "ods-trace-step__icon",
|
|
32730
32770
|
initial: disableAnimation ? false : { scale: 0.6, opacity: 0 },
|
|
32731
32771
|
animate: { scale: 1, opacity: 1 },
|
|
32732
32772
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
32733
|
-
children: status === "running" ? /* @__PURE__ */
|
|
32773
|
+
children: status === "running" ? /* @__PURE__ */ jsx141("span", { className: "ods-trace-step__spin", children: /* @__PURE__ */ jsx141(CircleDashIcon, { size: "xs" }) }) : resolvedGlyph
|
|
32734
32774
|
}
|
|
32735
32775
|
),
|
|
32736
|
-
!isLast && /* @__PURE__ */
|
|
32776
|
+
!isLast && /* @__PURE__ */ jsx141(
|
|
32737
32777
|
motion29.span,
|
|
32738
32778
|
{
|
|
32739
32779
|
className: "ods-trace-step__line",
|
|
@@ -32743,8 +32783,8 @@ var TraceStep = forwardRef96(
|
|
|
32743
32783
|
}
|
|
32744
32784
|
)
|
|
32745
32785
|
] }),
|
|
32746
|
-
/* @__PURE__ */
|
|
32747
|
-
/* @__PURE__ */
|
|
32786
|
+
/* @__PURE__ */ jsxs135("div", { className: "ods-trace-step__body", children: [
|
|
32787
|
+
/* @__PURE__ */ jsxs135(
|
|
32748
32788
|
"button",
|
|
32749
32789
|
{
|
|
32750
32790
|
id: headId,
|
|
@@ -32755,7 +32795,7 @@ var TraceStep = forwardRef96(
|
|
|
32755
32795
|
"aria-controls": canExpand ? contentId : void 0,
|
|
32756
32796
|
disabled: !canExpand,
|
|
32757
32797
|
children: [
|
|
32758
|
-
index != null && /* @__PURE__ */
|
|
32798
|
+
index != null && /* @__PURE__ */ jsx141(
|
|
32759
32799
|
"span",
|
|
32760
32800
|
{
|
|
32761
32801
|
className: cn(
|
|
@@ -32765,32 +32805,32 @@ var TraceStep = forwardRef96(
|
|
|
32765
32805
|
children: index
|
|
32766
32806
|
}
|
|
32767
32807
|
),
|
|
32768
|
-
/* @__PURE__ */
|
|
32769
|
-
tool && /* @__PURE__ */
|
|
32808
|
+
/* @__PURE__ */ jsx141("span", { className: "ods-trace-step__title", children: title }),
|
|
32809
|
+
tool && /* @__PURE__ */ jsxs135(
|
|
32770
32810
|
"span",
|
|
32771
32811
|
{
|
|
32772
32812
|
className: "ods-trace-step__tool",
|
|
32773
32813
|
title: tool,
|
|
32774
32814
|
"aria-label": `Tool: ${tool}`,
|
|
32775
32815
|
children: [
|
|
32776
|
-
/* @__PURE__ */
|
|
32816
|
+
/* @__PURE__ */ jsx141("span", { className: "ods-trace-step__tool-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx141(BuildToolIcon, { size: "xs" }) }),
|
|
32777
32817
|
tool
|
|
32778
32818
|
]
|
|
32779
32819
|
}
|
|
32780
32820
|
),
|
|
32781
|
-
/* @__PURE__ */
|
|
32782
|
-
tokens != null && /* @__PURE__ */
|
|
32821
|
+
/* @__PURE__ */ jsxs135("span", { className: "ods-trace-step__meta", children: [
|
|
32822
|
+
tokens != null && /* @__PURE__ */ jsxs135(
|
|
32783
32823
|
"span",
|
|
32784
32824
|
{
|
|
32785
32825
|
className: "ods-trace-step__tokens",
|
|
32786
32826
|
"aria-label": `${tokens} tokens`,
|
|
32787
32827
|
children: [
|
|
32788
|
-
/* @__PURE__ */
|
|
32828
|
+
/* @__PURE__ */ jsx141("span", { children: tokens.toLocaleString() }),
|
|
32789
32829
|
" tok"
|
|
32790
32830
|
]
|
|
32791
32831
|
}
|
|
32792
32832
|
),
|
|
32793
|
-
duration && /* @__PURE__ */
|
|
32833
|
+
duration && /* @__PURE__ */ jsx141(
|
|
32794
32834
|
"span",
|
|
32795
32835
|
{
|
|
32796
32836
|
className: "ods-trace-step__duration",
|
|
@@ -32799,20 +32839,20 @@ var TraceStep = forwardRef96(
|
|
|
32799
32839
|
}
|
|
32800
32840
|
)
|
|
32801
32841
|
] }),
|
|
32802
|
-
canExpand && /* @__PURE__ */
|
|
32842
|
+
canExpand && /* @__PURE__ */ jsx141(
|
|
32803
32843
|
motion29.span,
|
|
32804
32844
|
{
|
|
32805
32845
|
className: "ods-trace-step__chev",
|
|
32806
32846
|
"aria-hidden": "true",
|
|
32807
32847
|
animate: { rotate: open ? 180 : 0 },
|
|
32808
32848
|
transition: { duration: 0.18, ease: [0.16, 1, 0.3, 1] },
|
|
32809
|
-
children: /* @__PURE__ */
|
|
32849
|
+
children: /* @__PURE__ */ jsx141(CaretDownIcon5, { size: "xs" })
|
|
32810
32850
|
}
|
|
32811
32851
|
)
|
|
32812
32852
|
]
|
|
32813
32853
|
}
|
|
32814
32854
|
),
|
|
32815
|
-
/* @__PURE__ */
|
|
32855
|
+
/* @__PURE__ */ jsx141(AnimatePresence19, { initial: false, children: canExpand && open && /* @__PURE__ */ jsx141(
|
|
32816
32856
|
motion29.div,
|
|
32817
32857
|
{
|
|
32818
32858
|
id: contentId,
|
|
@@ -32824,7 +32864,7 @@ var TraceStep = forwardRef96(
|
|
|
32824
32864
|
exit: disableAnimation ? void 0 : { height: 0, opacity: 0 },
|
|
32825
32865
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
32826
32866
|
style: { overflow: "hidden" },
|
|
32827
|
-
children: /* @__PURE__ */
|
|
32867
|
+
children: /* @__PURE__ */ jsx141("div", { className: "ods-trace-step__content-inner", children })
|
|
32828
32868
|
},
|
|
32829
32869
|
"content"
|
|
32830
32870
|
) })
|
|
@@ -32841,7 +32881,7 @@ import {
|
|
|
32841
32881
|
forwardRef as forwardRef97,
|
|
32842
32882
|
useId as useId59
|
|
32843
32883
|
} from "react";
|
|
32844
|
-
import { jsx as
|
|
32884
|
+
import { jsx as jsx142, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
32845
32885
|
var defaultFormat8 = (n) => n.toLocaleString();
|
|
32846
32886
|
var UsageMeter = forwardRef97(
|
|
32847
32887
|
function UsageMeter2({
|
|
@@ -32877,7 +32917,7 @@ var UsageMeter = forwardRef97(
|
|
|
32877
32917
|
const tone = exhausted ? "danger" : warned ? "warning" : "default";
|
|
32878
32918
|
const resolvedValueLabel = valueLabel ?? `${formatValue(clamped)} / ${formatValue(safeAllowance)}${safeBonus > 0 ? ` + ${formatValue(safeBonus)}` : ""}`;
|
|
32879
32919
|
const valueText = `${formatValue(clamped)} of ${formatValue(safeAllowance)} used` + (safeBonus > 0 ? `, plus ${formatValue(Math.max(0, safeBonus - inBonus))} add-on available` : "");
|
|
32880
|
-
return /* @__PURE__ */
|
|
32920
|
+
return /* @__PURE__ */ jsxs136(
|
|
32881
32921
|
"div",
|
|
32882
32922
|
{
|
|
32883
32923
|
...rest,
|
|
@@ -32890,9 +32930,9 @@ var UsageMeter = forwardRef97(
|
|
|
32890
32930
|
className
|
|
32891
32931
|
),
|
|
32892
32932
|
children: [
|
|
32893
|
-
(label || !hideValueLabel) && /* @__PURE__ */
|
|
32894
|
-
label && /* @__PURE__ */
|
|
32895
|
-
!hideValueLabel && /* @__PURE__ */
|
|
32933
|
+
(label || !hideValueLabel) && /* @__PURE__ */ jsxs136("div", { className: "ods-usage-meter__header", children: [
|
|
32934
|
+
label && /* @__PURE__ */ jsx142("span", { id: labelId, className: "ods-usage-meter__label", children: label }),
|
|
32935
|
+
!hideValueLabel && /* @__PURE__ */ jsx142(
|
|
32896
32936
|
"span",
|
|
32897
32937
|
{
|
|
32898
32938
|
className: "ods-usage-meter__value-label",
|
|
@@ -32901,7 +32941,7 @@ var UsageMeter = forwardRef97(
|
|
|
32901
32941
|
}
|
|
32902
32942
|
)
|
|
32903
32943
|
] }),
|
|
32904
|
-
/* @__PURE__ */
|
|
32944
|
+
/* @__PURE__ */ jsxs136(
|
|
32905
32945
|
"div",
|
|
32906
32946
|
{
|
|
32907
32947
|
className: "ods-usage-meter__track",
|
|
@@ -32914,12 +32954,12 @@ var UsageMeter = forwardRef97(
|
|
|
32914
32954
|
"aria-labelledby": labelId,
|
|
32915
32955
|
"aria-describedby": captionId,
|
|
32916
32956
|
children: [
|
|
32917
|
-
/* @__PURE__ */
|
|
32957
|
+
/* @__PURE__ */ jsx142(
|
|
32918
32958
|
"div",
|
|
32919
32959
|
{
|
|
32920
32960
|
className: "ods-usage-meter__segment ods-usage-meter__segment--allowance",
|
|
32921
32961
|
style: { flexGrow: safeAllowance || 1 },
|
|
32922
|
-
children: /* @__PURE__ */
|
|
32962
|
+
children: /* @__PURE__ */ jsx142(
|
|
32923
32963
|
"div",
|
|
32924
32964
|
{
|
|
32925
32965
|
className: "ods-usage-meter__fill",
|
|
@@ -32928,12 +32968,12 @@ var UsageMeter = forwardRef97(
|
|
|
32928
32968
|
)
|
|
32929
32969
|
}
|
|
32930
32970
|
),
|
|
32931
|
-
safeBonus > 0 && /* @__PURE__ */
|
|
32971
|
+
safeBonus > 0 && /* @__PURE__ */ jsx142(
|
|
32932
32972
|
"div",
|
|
32933
32973
|
{
|
|
32934
32974
|
className: "ods-usage-meter__segment ods-usage-meter__segment--bonus",
|
|
32935
32975
|
style: { flexGrow: safeBonus },
|
|
32936
|
-
children: /* @__PURE__ */
|
|
32976
|
+
children: /* @__PURE__ */ jsx142(
|
|
32937
32977
|
"div",
|
|
32938
32978
|
{
|
|
32939
32979
|
className: "ods-usage-meter__fill ods-usage-meter__fill--bonus",
|
|
@@ -32945,7 +32985,7 @@ var UsageMeter = forwardRef97(
|
|
|
32945
32985
|
]
|
|
32946
32986
|
}
|
|
32947
32987
|
),
|
|
32948
|
-
caption && /* @__PURE__ */
|
|
32988
|
+
caption && /* @__PURE__ */ jsx142("span", { id: captionId, className: "ods-usage-meter__caption", children: caption })
|
|
32949
32989
|
]
|
|
32950
32990
|
}
|
|
32951
32991
|
);
|
|
@@ -32958,124 +32998,99 @@ import {
|
|
|
32958
32998
|
forwardRef as forwardRef98,
|
|
32959
32999
|
useId as useId60
|
|
32960
33000
|
} from "react";
|
|
32961
|
-
import { Fragment as
|
|
32962
|
-
var UserCard = forwardRef98(
|
|
32963
|
-
|
|
32964
|
-
|
|
32965
|
-
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32974
|
-
|
|
32975
|
-
|
|
32976
|
-
|
|
32977
|
-
|
|
32978
|
-
|
|
32979
|
-
|
|
32980
|
-
|
|
32981
|
-
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
|
|
32987
|
-
|
|
32988
|
-
|
|
32989
|
-
|
|
32990
|
-
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
|
|
32996
|
-
|
|
33001
|
+
import { Fragment as Fragment59, jsx as jsx143, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
33002
|
+
var UserCard = forwardRef98(function UserCard2({
|
|
33003
|
+
name,
|
|
33004
|
+
nameAs = "h3",
|
|
33005
|
+
role,
|
|
33006
|
+
avatar,
|
|
33007
|
+
avatarNode,
|
|
33008
|
+
initial,
|
|
33009
|
+
status,
|
|
33010
|
+
meta,
|
|
33011
|
+
stats,
|
|
33012
|
+
action,
|
|
33013
|
+
orientation = "vertical",
|
|
33014
|
+
onClick,
|
|
33015
|
+
href,
|
|
33016
|
+
disabled = false,
|
|
33017
|
+
radius = "md",
|
|
33018
|
+
id: providedId,
|
|
33019
|
+
className,
|
|
33020
|
+
...rest
|
|
33021
|
+
}, ref) {
|
|
33022
|
+
const reactId = useId60();
|
|
33023
|
+
const baseId = providedId ?? `ods-user-card-${reactId}`;
|
|
33024
|
+
const nameId = `${baseId}-name`;
|
|
33025
|
+
const isInteractive = Boolean(href || onClick) && !disabled;
|
|
33026
|
+
const renderAvatar = () => {
|
|
33027
|
+
if (avatarNode) {
|
|
33028
|
+
return /* @__PURE__ */ jsx143("span", { className: "ods-user-card__avatar ods-user-card__avatar--legacy", "aria-hidden": "true", children: avatarNode });
|
|
33029
|
+
}
|
|
33030
|
+
const derivedInitials = avatar?.initials ?? (typeof initial === "string" ? initial : typeof name === "string" ? name.charAt(0).toUpperCase() : void 0);
|
|
33031
|
+
return /* @__PURE__ */ jsx143(
|
|
33032
|
+
Avatar,
|
|
33033
|
+
{
|
|
33034
|
+
size: orientation === "horizontal" ? "md" : "lg",
|
|
33035
|
+
src: avatar?.src,
|
|
33036
|
+
initials: derivedInitials,
|
|
33037
|
+
seed: avatar?.seed,
|
|
33038
|
+
palette: avatar?.palette,
|
|
33039
|
+
status,
|
|
33040
|
+
alt: avatar?.alt ?? (typeof name === "string" ? name : void 0),
|
|
33041
|
+
className: "ods-user-card__avatar"
|
|
32997
33042
|
}
|
|
32998
|
-
const derivedInitials = avatar?.initials ?? (typeof initial === "string" ? initial : typeof name === "string" ? name.charAt(0).toUpperCase() : void 0);
|
|
32999
|
-
return /* @__PURE__ */ jsx142(
|
|
33000
|
-
Avatar,
|
|
33001
|
-
{
|
|
33002
|
-
size: orientation === "horizontal" ? "md" : "lg",
|
|
33003
|
-
src: avatar?.src,
|
|
33004
|
-
initials: derivedInitials,
|
|
33005
|
-
status,
|
|
33006
|
-
alt: avatar?.alt ?? (typeof name === "string" ? name : void 0),
|
|
33007
|
-
className: "ods-user-card__avatar"
|
|
33008
|
-
}
|
|
33009
|
-
);
|
|
33010
|
-
};
|
|
33011
|
-
const body = /* @__PURE__ */ jsxs136(Fragment58, { children: [
|
|
33012
|
-
renderAvatar(),
|
|
33013
|
-
/* @__PURE__ */ jsxs136("div", { className: "ods-user-card__body", children: [
|
|
33014
|
-
/* @__PURE__ */ jsx142(
|
|
33015
|
-
Card.Title,
|
|
33016
|
-
{
|
|
33017
|
-
as: nameAs,
|
|
33018
|
-
id: nameId,
|
|
33019
|
-
className: "ods-user-card__name",
|
|
33020
|
-
children: name
|
|
33021
|
-
}
|
|
33022
|
-
),
|
|
33023
|
-
role && /* @__PURE__ */ jsx142("div", { className: "ods-user-card__role", children: role }),
|
|
33024
|
-
meta && /* @__PURE__ */ jsx142("div", { className: "ods-user-card__meta", children: meta })
|
|
33025
|
-
] }),
|
|
33026
|
-
stats && stats.length > 0 && /* @__PURE__ */ jsx142("div", { className: "ods-user-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs136("div", { className: "ods-user-card__stat", children: [
|
|
33027
|
-
/* @__PURE__ */ jsx142("div", { className: "ods-user-card__stat-value", children: s.value }),
|
|
33028
|
-
/* @__PURE__ */ jsx142("div", { className: "ods-user-card__stat-label", children: s.label })
|
|
33029
|
-
] }, i)) }),
|
|
33030
|
-
action && /* @__PURE__ */ jsx142("div", { className: "ods-user-card__action", children: action })
|
|
33031
|
-
] });
|
|
33032
|
-
const sharedClass = cn(
|
|
33033
|
-
"ods-user-card",
|
|
33034
|
-
`ods-user-card--${orientation}`,
|
|
33035
|
-
isInteractive && "ods-user-card--interactive",
|
|
33036
|
-
disabled && "ods-user-card--disabled",
|
|
33037
|
-
className
|
|
33038
33043
|
);
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33054
|
-
|
|
33055
|
-
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
Card,
|
|
33044
|
+
};
|
|
33045
|
+
const body = /* @__PURE__ */ jsxs137(Fragment59, { children: [
|
|
33046
|
+
renderAvatar(),
|
|
33047
|
+
/* @__PURE__ */ jsxs137("div", { className: "ods-user-card__body", children: [
|
|
33048
|
+
/* @__PURE__ */ jsx143(Card.Title, { as: nameAs, id: nameId, className: "ods-user-card__name", children: name }),
|
|
33049
|
+
role && /* @__PURE__ */ jsx143("div", { className: "ods-user-card__role", children: role }),
|
|
33050
|
+
meta && /* @__PURE__ */ jsx143("div", { className: "ods-user-card__meta", children: meta })
|
|
33051
|
+
] }),
|
|
33052
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx143("div", { className: "ods-user-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs137("div", { className: "ods-user-card__stat", children: [
|
|
33053
|
+
/* @__PURE__ */ jsx143("div", { className: "ods-user-card__stat-value", children: s.value }),
|
|
33054
|
+
/* @__PURE__ */ jsx143("div", { className: "ods-user-card__stat-label", children: s.label })
|
|
33055
|
+
] }, i)) }),
|
|
33056
|
+
action && /* @__PURE__ */ jsx143("div", { className: "ods-user-card__action", children: action })
|
|
33057
|
+
] });
|
|
33058
|
+
const sharedClass = cn(
|
|
33059
|
+
"ods-user-card",
|
|
33060
|
+
`ods-user-card--${orientation}`,
|
|
33061
|
+
isInteractive && "ods-user-card--interactive",
|
|
33062
|
+
disabled && "ods-user-card--disabled",
|
|
33063
|
+
className
|
|
33064
|
+
);
|
|
33065
|
+
if (href && !disabled) {
|
|
33066
|
+
return /* @__PURE__ */ jsx143(Card, { asChild: true, radius, padding: "none", className: sharedClass, "aria-labelledby": nameId, children: /* @__PURE__ */ jsx143(
|
|
33067
|
+
"a",
|
|
33064
33068
|
{
|
|
33065
33069
|
...rest,
|
|
33066
33070
|
ref,
|
|
33071
|
+
href,
|
|
33067
33072
|
id: baseId,
|
|
33068
|
-
|
|
33069
|
-
padding: "none",
|
|
33070
|
-
onClick: isInteractive ? onClick : void 0,
|
|
33071
|
-
disabled,
|
|
33072
|
-
className: sharedClass,
|
|
33073
|
-
"aria-labelledby": nameId,
|
|
33073
|
+
onClick,
|
|
33074
33074
|
children: body
|
|
33075
33075
|
}
|
|
33076
|
-
);
|
|
33076
|
+
) });
|
|
33077
33077
|
}
|
|
33078
|
-
|
|
33078
|
+
return /* @__PURE__ */ jsx143(
|
|
33079
|
+
Card,
|
|
33080
|
+
{
|
|
33081
|
+
...rest,
|
|
33082
|
+
ref,
|
|
33083
|
+
id: baseId,
|
|
33084
|
+
radius,
|
|
33085
|
+
padding: "none",
|
|
33086
|
+
onClick: isInteractive ? onClick : void 0,
|
|
33087
|
+
disabled,
|
|
33088
|
+
className: sharedClass,
|
|
33089
|
+
"aria-labelledby": nameId,
|
|
33090
|
+
children: body
|
|
33091
|
+
}
|
|
33092
|
+
);
|
|
33093
|
+
});
|
|
33079
33094
|
UserCard.displayName = "UserCard";
|
|
33080
33095
|
|
|
33081
33096
|
// src/components/WorkflowEditor/WorkflowEditor.tsx
|
|
@@ -33774,7 +33789,7 @@ function useWorkflow(options2 = {}) {
|
|
|
33774
33789
|
}
|
|
33775
33790
|
|
|
33776
33791
|
// src/components/WorkflowEditor/WorkflowEditor.tsx
|
|
33777
|
-
import { jsx as
|
|
33792
|
+
import { jsx as jsx144, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
33778
33793
|
var NODE_KIND_MAP = {
|
|
33779
33794
|
trigger: "trigger",
|
|
33780
33795
|
action: "action",
|
|
@@ -33819,7 +33834,7 @@ function WorkflowEditor({
|
|
|
33819
33834
|
drawer,
|
|
33820
33835
|
console: consoleSlot,
|
|
33821
33836
|
minimap,
|
|
33822
|
-
emptyState = /* @__PURE__ */
|
|
33837
|
+
emptyState = /* @__PURE__ */ jsx144(DefaultEmptyState, {}),
|
|
33823
33838
|
children,
|
|
33824
33839
|
background = "dots",
|
|
33825
33840
|
snapToGrid = true,
|
|
@@ -33975,8 +33990,8 @@ function WorkflowEditor({
|
|
|
33975
33990
|
wf.setViewport({ x: cw / 2 - cx * zoom, y: ch / 2 - cy * zoom, zoom });
|
|
33976
33991
|
}, [workflow.canvas.nodes, canvasSize, wf]);
|
|
33977
33992
|
const defaultToolbar = useMemo37(
|
|
33978
|
-
() => /* @__PURE__ */
|
|
33979
|
-
onSave && /* @__PURE__ */
|
|
33993
|
+
() => /* @__PURE__ */ jsxs138(FlowToolbar, { placement: "left", children: [
|
|
33994
|
+
onSave && /* @__PURE__ */ jsx144(
|
|
33980
33995
|
FlowToolbarButton,
|
|
33981
33996
|
{
|
|
33982
33997
|
icon: FlowToolbarIcons.save,
|
|
@@ -33985,7 +34000,7 @@ function WorkflowEditor({
|
|
|
33985
34000
|
onClick: () => onSave(workflow)
|
|
33986
34001
|
}
|
|
33987
34002
|
),
|
|
33988
|
-
onRun && /* @__PURE__ */
|
|
34003
|
+
onRun && /* @__PURE__ */ jsx144(
|
|
33989
34004
|
FlowToolbarButton,
|
|
33990
34005
|
{
|
|
33991
34006
|
icon: isExecuting ? FlowToolbarIcons.stop : FlowToolbarIcons.run,
|
|
@@ -33996,7 +34011,7 @@ function WorkflowEditor({
|
|
|
33996
34011
|
onClick: isExecuting ? onStop : onRun
|
|
33997
34012
|
}
|
|
33998
34013
|
),
|
|
33999
|
-
/* @__PURE__ */
|
|
34014
|
+
/* @__PURE__ */ jsx144(
|
|
34000
34015
|
FlowToolbarButton,
|
|
34001
34016
|
{
|
|
34002
34017
|
icon: isLockMode ? FlowToolbarIcons.lock : FlowToolbarIcons.unlock,
|
|
@@ -34006,7 +34021,7 @@ function WorkflowEditor({
|
|
|
34006
34021
|
onClick: toggleLock
|
|
34007
34022
|
}
|
|
34008
34023
|
),
|
|
34009
|
-
/* @__PURE__ */
|
|
34024
|
+
/* @__PURE__ */ jsx144(
|
|
34010
34025
|
FlowToolbarButton,
|
|
34011
34026
|
{
|
|
34012
34027
|
icon: FlowToolbarIcons.reset,
|
|
@@ -34014,7 +34029,7 @@ function WorkflowEditor({
|
|
|
34014
34029
|
onClick: handleReset
|
|
34015
34030
|
}
|
|
34016
34031
|
),
|
|
34017
|
-
drawer && /* @__PURE__ */
|
|
34032
|
+
drawer && /* @__PURE__ */ jsx144(
|
|
34018
34033
|
FlowToolbarButton,
|
|
34019
34034
|
{
|
|
34020
34035
|
icon: isDrawerOpen ? FlowToolbarIcons.drawerClose : FlowToolbarIcons.drawerOpen,
|
|
@@ -34023,8 +34038,8 @@ function WorkflowEditor({
|
|
|
34023
34038
|
onClick: toggleDrawer
|
|
34024
34039
|
}
|
|
34025
34040
|
),
|
|
34026
|
-
/* @__PURE__ */
|
|
34027
|
-
onSettings && /* @__PURE__ */
|
|
34041
|
+
/* @__PURE__ */ jsx144(FlowToolbarDivider, {}),
|
|
34042
|
+
onSettings && /* @__PURE__ */ jsx144(
|
|
34028
34043
|
FlowToolbarButton,
|
|
34029
34044
|
{
|
|
34030
34045
|
icon: FlowToolbarIcons.settings,
|
|
@@ -34032,7 +34047,7 @@ function WorkflowEditor({
|
|
|
34032
34047
|
onClick: onSettings
|
|
34033
34048
|
}
|
|
34034
34049
|
),
|
|
34035
|
-
/* @__PURE__ */
|
|
34050
|
+
/* @__PURE__ */ jsx144(
|
|
34036
34051
|
FlowToolbarButton,
|
|
34037
34052
|
{
|
|
34038
34053
|
icon: FlowToolbarIcons.history,
|
|
@@ -34041,7 +34056,7 @@ function WorkflowEditor({
|
|
|
34041
34056
|
onClick: toggleHistory
|
|
34042
34057
|
}
|
|
34043
34058
|
),
|
|
34044
|
-
isDebugModeEnabled && /* @__PURE__ */
|
|
34059
|
+
isDebugModeEnabled && /* @__PURE__ */ jsx144(
|
|
34045
34060
|
FlowToolbarButton,
|
|
34046
34061
|
{
|
|
34047
34062
|
icon: FlowToolbarIcons.debug,
|
|
@@ -34050,8 +34065,8 @@ function WorkflowEditor({
|
|
|
34050
34065
|
onClick: toggleDebug
|
|
34051
34066
|
}
|
|
34052
34067
|
),
|
|
34053
|
-
/* @__PURE__ */
|
|
34054
|
-
/* @__PURE__ */
|
|
34068
|
+
/* @__PURE__ */ jsx144(FlowToolbarDivider, {}),
|
|
34069
|
+
/* @__PURE__ */ jsx144(
|
|
34055
34070
|
FlowToolbarButton,
|
|
34056
34071
|
{
|
|
34057
34072
|
icon: FlowToolbarIcons.undo,
|
|
@@ -34061,7 +34076,7 @@ function WorkflowEditor({
|
|
|
34061
34076
|
onClick: undo
|
|
34062
34077
|
}
|
|
34063
34078
|
),
|
|
34064
|
-
/* @__PURE__ */
|
|
34079
|
+
/* @__PURE__ */ jsx144(
|
|
34065
34080
|
FlowToolbarButton,
|
|
34066
34081
|
{
|
|
34067
34082
|
icon: FlowToolbarIcons.redo,
|
|
@@ -34071,8 +34086,8 @@ function WorkflowEditor({
|
|
|
34071
34086
|
onClick: redo
|
|
34072
34087
|
}
|
|
34073
34088
|
),
|
|
34074
|
-
/* @__PURE__ */
|
|
34075
|
-
/* @__PURE__ */
|
|
34089
|
+
/* @__PURE__ */ jsx144(FlowToolbarDivider, {}),
|
|
34090
|
+
/* @__PURE__ */ jsx144(
|
|
34076
34091
|
FlowToolbarZoom,
|
|
34077
34092
|
{
|
|
34078
34093
|
zoom: workflow.canvas.viewport.zoom,
|
|
@@ -34111,21 +34126,21 @@ function WorkflowEditor({
|
|
|
34111
34126
|
);
|
|
34112
34127
|
const resolvedToolbar = toolbar === "default" ? defaultToolbar : toolbar === null ? null : toolbar;
|
|
34113
34128
|
const isEmpty = workflow.canvas.nodes.length === 0 && workflow.canvas.edges.length === 0;
|
|
34114
|
-
return /* @__PURE__ */
|
|
34129
|
+
return /* @__PURE__ */ jsxs138(
|
|
34115
34130
|
"div",
|
|
34116
34131
|
{
|
|
34117
34132
|
className: cn("ods-workflow-editor", className),
|
|
34118
34133
|
style: { width, height, position: "relative", display: "flex", overflow: "hidden" },
|
|
34119
34134
|
children: [
|
|
34120
|
-
drawer && isDrawerOpen && /* @__PURE__ */
|
|
34121
|
-
/* @__PURE__ */
|
|
34135
|
+
drawer && isDrawerOpen && /* @__PURE__ */ jsx144("div", { className: "ods-workflow-editor__drawer", children: drawer }),
|
|
34136
|
+
/* @__PURE__ */ jsxs138(
|
|
34122
34137
|
"div",
|
|
34123
34138
|
{
|
|
34124
34139
|
ref: handleCanvasRef,
|
|
34125
34140
|
className: "ods-workflow-editor__canvas-wrapper",
|
|
34126
34141
|
style: { position: "relative", flex: 1, minWidth: 0 },
|
|
34127
34142
|
children: [
|
|
34128
|
-
/* @__PURE__ */
|
|
34143
|
+
/* @__PURE__ */ jsx144(
|
|
34129
34144
|
FlowCanvas,
|
|
34130
34145
|
{
|
|
34131
34146
|
nodes: nextNodes,
|
|
@@ -34139,9 +34154,9 @@ function WorkflowEditor({
|
|
|
34139
34154
|
children: resolvedToolbar
|
|
34140
34155
|
}
|
|
34141
34156
|
),
|
|
34142
|
-
minimap && /* @__PURE__ */
|
|
34143
|
-
consoleSlot && /* @__PURE__ */
|
|
34144
|
-
isEmpty && emptyState && /* @__PURE__ */
|
|
34157
|
+
minimap && /* @__PURE__ */ jsx144("div", { className: "ods-workflow-editor__minimap", children: minimap }),
|
|
34158
|
+
consoleSlot && /* @__PURE__ */ jsx144("div", { className: "ods-workflow-editor__console", children: consoleSlot }),
|
|
34159
|
+
isEmpty && emptyState && /* @__PURE__ */ jsx144("div", { className: "ods-workflow-editor__empty", children: emptyState }),
|
|
34145
34160
|
children
|
|
34146
34161
|
]
|
|
34147
34162
|
}
|
|
@@ -34151,7 +34166,7 @@ function WorkflowEditor({
|
|
|
34151
34166
|
);
|
|
34152
34167
|
}
|
|
34153
34168
|
function DefaultEmptyState() {
|
|
34154
|
-
return /* @__PURE__ */
|
|
34169
|
+
return /* @__PURE__ */ jsxs138(
|
|
34155
34170
|
"div",
|
|
34156
34171
|
{
|
|
34157
34172
|
style: {
|
|
@@ -34166,14 +34181,14 @@ function DefaultEmptyState() {
|
|
|
34166
34181
|
pointerEvents: "none"
|
|
34167
34182
|
},
|
|
34168
34183
|
children: [
|
|
34169
|
-
/* @__PURE__ */
|
|
34184
|
+
/* @__PURE__ */ jsx144(
|
|
34170
34185
|
"div",
|
|
34171
34186
|
{
|
|
34172
34187
|
style: { fontSize: 14, fontWeight: 600, color: "var(--ods-text-primary)", marginBottom: 4 },
|
|
34173
34188
|
children: "Start with a trigger"
|
|
34174
34189
|
}
|
|
34175
34190
|
),
|
|
34176
|
-
/* @__PURE__ */
|
|
34191
|
+
/* @__PURE__ */ jsx144("div", { style: { fontSize: 12 }, children: "Drop an action here, or use the drawer to add your first node." })
|
|
34177
34192
|
]
|
|
34178
34193
|
}
|
|
34179
34194
|
);
|
|
@@ -34218,7 +34233,7 @@ function useWorkflowRuntime(startedAt, active) {
|
|
|
34218
34233
|
}
|
|
34219
34234
|
|
|
34220
34235
|
// src/components/WorkflowHeader/WorkflowHeader.tsx
|
|
34221
|
-
import { Fragment as
|
|
34236
|
+
import { Fragment as Fragment60, jsx as jsx145, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
34222
34237
|
function WorkflowHeader({
|
|
34223
34238
|
name,
|
|
34224
34239
|
statusTone,
|
|
@@ -34257,21 +34272,21 @@ function WorkflowHeader({
|
|
|
34257
34272
|
})();
|
|
34258
34273
|
const rootCls = cn("ods-workflow-header", `ods-workflow-header--${size}`, className);
|
|
34259
34274
|
if (loading) {
|
|
34260
|
-
return /* @__PURE__ */
|
|
34261
|
-
/* @__PURE__ */
|
|
34262
|
-
/* @__PURE__ */
|
|
34263
|
-
/* @__PURE__ */
|
|
34275
|
+
return /* @__PURE__ */ jsxs139("header", { className: rootCls, "data-loading": "true", children: [
|
|
34276
|
+
/* @__PURE__ */ jsxs139("div", { className: "ods-workflow-header__left", children: [
|
|
34277
|
+
/* @__PURE__ */ jsx145(Skeleton, { variant: "text", width: "120px" }),
|
|
34278
|
+
/* @__PURE__ */ jsx145(Skeleton, { variant: "text", width: "180px" })
|
|
34264
34279
|
] }),
|
|
34265
|
-
/* @__PURE__ */
|
|
34266
|
-
/* @__PURE__ */
|
|
34267
|
-
/* @__PURE__ */
|
|
34280
|
+
/* @__PURE__ */ jsxs139("div", { className: "ods-workflow-header__right", children: [
|
|
34281
|
+
/* @__PURE__ */ jsx145(Skeleton, { variant: "circular", width: "28px", height: "28px" }),
|
|
34282
|
+
/* @__PURE__ */ jsx145(Skeleton, { variant: "circular", width: "28px", height: "28px" })
|
|
34268
34283
|
] })
|
|
34269
34284
|
] });
|
|
34270
34285
|
}
|
|
34271
34286
|
const envAccentStyle = environment?.accent ? { borderLeftColor: environment.accent } : void 0;
|
|
34272
|
-
return /* @__PURE__ */
|
|
34273
|
-
/* @__PURE__ */
|
|
34274
|
-
onBack && /* @__PURE__ */
|
|
34287
|
+
return /* @__PURE__ */ jsxs139("header", { className: rootCls, "data-running": isRunning ? "true" : void 0, children: [
|
|
34288
|
+
/* @__PURE__ */ jsxs139("div", { className: "ods-workflow-header__left", children: [
|
|
34289
|
+
onBack && /* @__PURE__ */ jsxs139(
|
|
34275
34290
|
"button",
|
|
34276
34291
|
{
|
|
34277
34292
|
type: "button",
|
|
@@ -34279,13 +34294,13 @@ function WorkflowHeader({
|
|
|
34279
34294
|
onClick: onBack,
|
|
34280
34295
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
34281
34296
|
children: [
|
|
34282
|
-
/* @__PURE__ */
|
|
34283
|
-
/* @__PURE__ */
|
|
34284
|
-
/* @__PURE__ */
|
|
34297
|
+
/* @__PURE__ */ jsx145(ChevronLeftIcon3, { size: "sm" }),
|
|
34298
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__back-label", children: parentLabel }),
|
|
34299
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__back-separator", "aria-hidden": "true", children: "/" })
|
|
34285
34300
|
]
|
|
34286
34301
|
}
|
|
34287
34302
|
),
|
|
34288
|
-
/* @__PURE__ */
|
|
34303
|
+
/* @__PURE__ */ jsx145(
|
|
34289
34304
|
"span",
|
|
34290
34305
|
{
|
|
34291
34306
|
className: cn(
|
|
@@ -34296,7 +34311,7 @@ function WorkflowHeader({
|
|
|
34296
34311
|
role: "img"
|
|
34297
34312
|
}
|
|
34298
34313
|
),
|
|
34299
|
-
/* @__PURE__ */
|
|
34314
|
+
/* @__PURE__ */ jsx145(
|
|
34300
34315
|
"h1",
|
|
34301
34316
|
{
|
|
34302
34317
|
className: "ods-workflow-header__title",
|
|
@@ -34304,9 +34319,9 @@ function WorkflowHeader({
|
|
|
34304
34319
|
children: name
|
|
34305
34320
|
}
|
|
34306
34321
|
),
|
|
34307
|
-
saveIndicator && /* @__PURE__ */
|
|
34308
|
-
/* @__PURE__ */
|
|
34309
|
-
/* @__PURE__ */
|
|
34322
|
+
saveIndicator && /* @__PURE__ */ jsxs139(Fragment60, { children: [
|
|
34323
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__sep", "aria-hidden": "true" }),
|
|
34324
|
+
/* @__PURE__ */ jsxs139(
|
|
34310
34325
|
"span",
|
|
34311
34326
|
{
|
|
34312
34327
|
className: cn(
|
|
@@ -34317,14 +34332,14 @@ function WorkflowHeader({
|
|
|
34317
34332
|
"aria-live": "polite",
|
|
34318
34333
|
title: saveState === "error" ? saveError ?? void 0 : void 0,
|
|
34319
34334
|
children: [
|
|
34320
|
-
saveState === "saving" ? /* @__PURE__ */
|
|
34335
|
+
saveState === "saving" ? /* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__save-spinner", "aria-hidden": "true" }) : saveState === "error" ? /* @__PURE__ */ jsx145(
|
|
34321
34336
|
WarningAltIcon3,
|
|
34322
34337
|
{
|
|
34323
34338
|
size: "sm",
|
|
34324
34339
|
className: "ods-workflow-header__save-icon",
|
|
34325
34340
|
"aria-hidden": "true"
|
|
34326
34341
|
}
|
|
34327
|
-
) : /* @__PURE__ */
|
|
34342
|
+
) : /* @__PURE__ */ jsx145(
|
|
34328
34343
|
CheckmarkIcon14,
|
|
34329
34344
|
{
|
|
34330
34345
|
size: "sm",
|
|
@@ -34339,11 +34354,11 @@ function WorkflowHeader({
|
|
|
34339
34354
|
] }),
|
|
34340
34355
|
leftSlot
|
|
34341
34356
|
] }),
|
|
34342
|
-
/* @__PURE__ */
|
|
34357
|
+
/* @__PURE__ */ jsxs139("div", { className: "ods-workflow-header__right", children: [
|
|
34343
34358
|
rightSlot,
|
|
34344
34359
|
environment && // Consumer-driven env chip. Accent (left border colour) comes
|
|
34345
34360
|
// from the consumer — we don't bake in environment names.
|
|
34346
|
-
/* @__PURE__ */
|
|
34361
|
+
/* @__PURE__ */ jsx145(
|
|
34347
34362
|
Chip,
|
|
34348
34363
|
{
|
|
34349
34364
|
size: "sm",
|
|
@@ -34359,59 +34374,59 @@ function WorkflowHeader({
|
|
|
34359
34374
|
children: environment.label
|
|
34360
34375
|
}
|
|
34361
34376
|
),
|
|
34362
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */
|
|
34377
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ jsx145(
|
|
34363
34378
|
Button,
|
|
34364
34379
|
{
|
|
34365
34380
|
variant: "ghost",
|
|
34366
34381
|
size: "sm",
|
|
34367
34382
|
pressed: !!isConsoleOpen,
|
|
34368
34383
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
34369
|
-
leftIcon: /* @__PURE__ */
|
|
34384
|
+
leftIcon: /* @__PURE__ */ jsx145(TerminalIcon, { size: "sm" }),
|
|
34370
34385
|
onClick: onToggleConsole,
|
|
34371
34386
|
children: "Console"
|
|
34372
34387
|
}
|
|
34373
34388
|
),
|
|
34374
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */
|
|
34375
|
-
isRunning ? onStop && /* @__PURE__ */
|
|
34389
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__micro-divider", "aria-hidden": "true" }),
|
|
34390
|
+
isRunning ? onStop && /* @__PURE__ */ jsx145(
|
|
34376
34391
|
Button,
|
|
34377
34392
|
{
|
|
34378
34393
|
variant: "ghost",
|
|
34379
34394
|
size: "sm",
|
|
34380
34395
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
34381
|
-
leftIcon: /* @__PURE__ */
|
|
34396
|
+
leftIcon: /* @__PURE__ */ jsx145(StopFilledAltIcon2, { size: "sm", className: "ods-workflow-header__stop-glyph" }),
|
|
34382
34397
|
onClick: onStop,
|
|
34383
|
-
children: /* @__PURE__ */
|
|
34384
|
-
/* @__PURE__ */
|
|
34385
|
-
runtime && /* @__PURE__ */
|
|
34386
|
-
/* @__PURE__ */
|
|
34387
|
-
/* @__PURE__ */
|
|
34398
|
+
children: /* @__PURE__ */ jsxs139("span", { className: "ods-workflow-header__stop-label", children: [
|
|
34399
|
+
/* @__PURE__ */ jsx145("span", { children: "Stop" }),
|
|
34400
|
+
runtime && /* @__PURE__ */ jsxs139(Fragment60, { children: [
|
|
34401
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__stop-dot", "aria-hidden": "true", children: "\xB7" }),
|
|
34402
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__runtime", children: runtime })
|
|
34388
34403
|
] })
|
|
34389
34404
|
] })
|
|
34390
34405
|
}
|
|
34391
|
-
) : onRun && /* @__PURE__ */
|
|
34406
|
+
) : onRun && /* @__PURE__ */ jsx145(
|
|
34392
34407
|
Button,
|
|
34393
34408
|
{
|
|
34394
34409
|
variant: "primary",
|
|
34395
34410
|
size: "sm",
|
|
34396
34411
|
"aria-label": "Run workflow",
|
|
34397
|
-
leftIcon: /* @__PURE__ */
|
|
34412
|
+
leftIcon: /* @__PURE__ */ jsx145(PlayFilledAltIcon2, { size: "sm" }),
|
|
34398
34413
|
onClick: onRun,
|
|
34399
34414
|
children: "Run"
|
|
34400
34415
|
}
|
|
34401
34416
|
),
|
|
34402
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */
|
|
34417
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ jsx145(
|
|
34403
34418
|
DropdownMenu,
|
|
34404
34419
|
{
|
|
34405
34420
|
"aria-label": menuLabel,
|
|
34406
34421
|
align: "end",
|
|
34407
34422
|
triggerClassName: "ods-workflow-header__menu-trigger",
|
|
34408
34423
|
...menuProps,
|
|
34409
|
-
trigger: menuTrigger ?? /* @__PURE__ */
|
|
34424
|
+
trigger: menuTrigger ?? /* @__PURE__ */ jsx145("span", { "aria-hidden": "true", className: "ods-workflow-header__menu-icon", children: /* @__PURE__ */ jsx145(OverflowMenuVerticalIcon, { size: "sm" }) }),
|
|
34410
34425
|
items: menuItems
|
|
34411
34426
|
}
|
|
34412
34427
|
))
|
|
34413
34428
|
] }),
|
|
34414
|
-
/* @__PURE__ */
|
|
34429
|
+
/* @__PURE__ */ jsx145("span", { className: "ods-workflow-header__progress", "aria-hidden": "true" })
|
|
34415
34430
|
] });
|
|
34416
34431
|
}
|
|
34417
34432
|
|
|
@@ -34423,7 +34438,7 @@ import {
|
|
|
34423
34438
|
StopFilledAltIcon as StopFilledAltIcon3,
|
|
34424
34439
|
TerminalIcon as TerminalIcon2
|
|
34425
34440
|
} from "@octaviaflow/icons";
|
|
34426
|
-
import { Fragment as
|
|
34441
|
+
import { Fragment as Fragment61, jsx as jsx146, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
34427
34442
|
function WorkflowHeaderExpanded({
|
|
34428
34443
|
name,
|
|
34429
34444
|
statusTone = "draft",
|
|
@@ -34451,15 +34466,15 @@ function WorkflowHeaderExpanded({
|
|
|
34451
34466
|
const tickedRuntime = useWorkflowRuntime(runStartedAt, !!isRunning);
|
|
34452
34467
|
const runtime = runtimeOverride ?? tickedRuntime ?? void 0;
|
|
34453
34468
|
const effectiveTone = statusTone === "draft" && isRunning ? "running" : statusTone;
|
|
34454
|
-
return /* @__PURE__ */
|
|
34469
|
+
return /* @__PURE__ */ jsxs140(
|
|
34455
34470
|
"header",
|
|
34456
34471
|
{
|
|
34457
34472
|
className: cn("ods-workflow-header-expanded", className),
|
|
34458
34473
|
"data-running": isRunning ? "true" : void 0,
|
|
34459
34474
|
children: [
|
|
34460
|
-
/* @__PURE__ */
|
|
34461
|
-
/* @__PURE__ */
|
|
34462
|
-
onBack && /* @__PURE__ */
|
|
34475
|
+
/* @__PURE__ */ jsxs140("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--top", children: [
|
|
34476
|
+
/* @__PURE__ */ jsxs140("div", { className: "ods-workflow-header-expanded__left", children: [
|
|
34477
|
+
onBack && /* @__PURE__ */ jsxs140(
|
|
34463
34478
|
"button",
|
|
34464
34479
|
{
|
|
34465
34480
|
type: "button",
|
|
@@ -34467,13 +34482,13 @@ function WorkflowHeaderExpanded({
|
|
|
34467
34482
|
onClick: onBack,
|
|
34468
34483
|
"aria-label": `Back to ${typeof parentLabel === "string" ? parentLabel : "previous"}`,
|
|
34469
34484
|
children: [
|
|
34470
|
-
/* @__PURE__ */
|
|
34471
|
-
/* @__PURE__ */
|
|
34472
|
-
/* @__PURE__ */
|
|
34485
|
+
/* @__PURE__ */ jsx146(ChevronLeftIcon4, { size: "sm" }),
|
|
34486
|
+
/* @__PURE__ */ jsx146("span", { children: parentLabel }),
|
|
34487
|
+
/* @__PURE__ */ jsx146("span", { "aria-hidden": "true", className: "ods-workflow-header-expanded__back-sep", children: "/" })
|
|
34473
34488
|
]
|
|
34474
34489
|
}
|
|
34475
34490
|
),
|
|
34476
|
-
/* @__PURE__ */
|
|
34491
|
+
/* @__PURE__ */ jsx146(
|
|
34477
34492
|
"span",
|
|
34478
34493
|
{
|
|
34479
34494
|
className: cn(
|
|
@@ -34484,10 +34499,10 @@ function WorkflowHeaderExpanded({
|
|
|
34484
34499
|
role: "img"
|
|
34485
34500
|
}
|
|
34486
34501
|
),
|
|
34487
|
-
/* @__PURE__ */
|
|
34502
|
+
/* @__PURE__ */ jsx146("h1", { className: "ods-workflow-header-expanded__title", children: name })
|
|
34488
34503
|
] }),
|
|
34489
|
-
/* @__PURE__ */
|
|
34490
|
-
environment && /* @__PURE__ */
|
|
34504
|
+
/* @__PURE__ */ jsxs140("div", { className: "ods-workflow-header-expanded__right", children: [
|
|
34505
|
+
environment && /* @__PURE__ */ jsx146(
|
|
34491
34506
|
Chip,
|
|
34492
34507
|
{
|
|
34493
34508
|
size: "sm",
|
|
@@ -34499,26 +34514,26 @@ function WorkflowHeaderExpanded({
|
|
|
34499
34514
|
children: environment.label
|
|
34500
34515
|
}
|
|
34501
34516
|
),
|
|
34502
|
-
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */
|
|
34517
|
+
onToggleConsole && (isRunning || consoleHasLogs) && /* @__PURE__ */ jsx146(
|
|
34503
34518
|
Button,
|
|
34504
34519
|
{
|
|
34505
34520
|
variant: "ghost",
|
|
34506
34521
|
size: "sm",
|
|
34507
34522
|
pressed: !!isConsoleOpen,
|
|
34508
34523
|
"aria-label": isConsoleOpen ? "Hide execution console" : "Show execution console",
|
|
34509
|
-
leftIcon: /* @__PURE__ */
|
|
34524
|
+
leftIcon: /* @__PURE__ */ jsx146(TerminalIcon2, { size: "sm" }),
|
|
34510
34525
|
onClick: onToggleConsole,
|
|
34511
34526
|
children: "Console"
|
|
34512
34527
|
}
|
|
34513
34528
|
),
|
|
34514
|
-
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */
|
|
34515
|
-
isRunning ? onStop && /* @__PURE__ */
|
|
34529
|
+
(environment || onToggleConsole && (isRunning || consoleHasLogs)) && (isRunning || onRun || menuItems && menuItems.length > 0) && /* @__PURE__ */ jsx146("span", { className: "ods-workflow-header-expanded__micro-divider", "aria-hidden": "true" }),
|
|
34530
|
+
isRunning ? onStop && /* @__PURE__ */ jsx146(
|
|
34516
34531
|
Button,
|
|
34517
34532
|
{
|
|
34518
34533
|
variant: "ghost",
|
|
34519
34534
|
size: "sm",
|
|
34520
34535
|
"aria-label": runtime ? `Stop execution (running ${runtime})` : "Stop execution",
|
|
34521
|
-
leftIcon: /* @__PURE__ */
|
|
34536
|
+
leftIcon: /* @__PURE__ */ jsx146(
|
|
34522
34537
|
StopFilledAltIcon3,
|
|
34523
34538
|
{
|
|
34524
34539
|
size: "sm",
|
|
@@ -34526,37 +34541,37 @@ function WorkflowHeaderExpanded({
|
|
|
34526
34541
|
}
|
|
34527
34542
|
),
|
|
34528
34543
|
onClick: onStop,
|
|
34529
|
-
children: /* @__PURE__ */
|
|
34530
|
-
/* @__PURE__ */
|
|
34531
|
-
runtime && /* @__PURE__ */
|
|
34532
|
-
/* @__PURE__ */
|
|
34533
|
-
/* @__PURE__ */
|
|
34544
|
+
children: /* @__PURE__ */ jsxs140("span", { style: { display: "inline-flex", gap: 4, alignItems: "center" }, children: [
|
|
34545
|
+
/* @__PURE__ */ jsx146("span", { children: "Stop" }),
|
|
34546
|
+
runtime && /* @__PURE__ */ jsxs140(Fragment61, { children: [
|
|
34547
|
+
/* @__PURE__ */ jsx146("span", { "aria-hidden": "true", style: { opacity: 0.6 }, children: "\xB7" }),
|
|
34548
|
+
/* @__PURE__ */ jsx146("span", { className: "ods-workflow-header-expanded__runtime", children: runtime })
|
|
34534
34549
|
] })
|
|
34535
34550
|
] })
|
|
34536
34551
|
}
|
|
34537
|
-
) : onRun && /* @__PURE__ */
|
|
34552
|
+
) : onRun && /* @__PURE__ */ jsx146(
|
|
34538
34553
|
Button,
|
|
34539
34554
|
{
|
|
34540
34555
|
variant: "primary",
|
|
34541
34556
|
size: "sm",
|
|
34542
34557
|
"aria-label": "Run workflow",
|
|
34543
|
-
leftIcon: /* @__PURE__ */
|
|
34558
|
+
leftIcon: /* @__PURE__ */ jsx146(PlayFilledAltIcon3, { size: "sm" }),
|
|
34544
34559
|
onClick: onRun,
|
|
34545
34560
|
children: "Run"
|
|
34546
34561
|
}
|
|
34547
34562
|
),
|
|
34548
|
-
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */
|
|
34563
|
+
menu ?? (menuItems && menuItems.length > 0 && /* @__PURE__ */ jsx146(
|
|
34549
34564
|
DropdownMenu,
|
|
34550
34565
|
{
|
|
34551
34566
|
"aria-label": menuLabel,
|
|
34552
34567
|
align: "end",
|
|
34553
34568
|
...menuProps,
|
|
34554
|
-
trigger: menuTrigger ?? /* @__PURE__ */
|
|
34569
|
+
trigger: menuTrigger ?? /* @__PURE__ */ jsx146(
|
|
34555
34570
|
Button,
|
|
34556
34571
|
{
|
|
34557
34572
|
variant: "ghost",
|
|
34558
34573
|
size: "sm",
|
|
34559
|
-
leftIcon: /* @__PURE__ */
|
|
34574
|
+
leftIcon: /* @__PURE__ */ jsx146(OverflowMenuVerticalIcon2, { size: "sm" })
|
|
34560
34575
|
}
|
|
34561
34576
|
),
|
|
34562
34577
|
items: menuItems
|
|
@@ -34564,10 +34579,10 @@ function WorkflowHeaderExpanded({
|
|
|
34564
34579
|
))
|
|
34565
34580
|
] })
|
|
34566
34581
|
] }),
|
|
34567
|
-
(meta || saveLabel) && /* @__PURE__ */
|
|
34582
|
+
(meta || saveLabel) && /* @__PURE__ */ jsx146("div", { className: "ods-workflow-header-expanded__row ods-workflow-header-expanded__row--bottom", children: /* @__PURE__ */ jsxs140("span", { className: "ods-workflow-header-expanded__meta", children: [
|
|
34568
34583
|
meta,
|
|
34569
|
-
meta && saveLabel && /* @__PURE__ */
|
|
34570
|
-
saveLabel && /* @__PURE__ */
|
|
34584
|
+
meta && saveLabel && /* @__PURE__ */ jsx146("span", { "aria-hidden": "true", style: { margin: "0 6px", opacity: 0.4 }, children: "\xB7" }),
|
|
34585
|
+
saveLabel && /* @__PURE__ */ jsx146(
|
|
34571
34586
|
"span",
|
|
34572
34587
|
{
|
|
34573
34588
|
className: cn(
|
|
@@ -34579,7 +34594,7 @@ function WorkflowHeaderExpanded({
|
|
|
34579
34594
|
}
|
|
34580
34595
|
)
|
|
34581
34596
|
] }) }),
|
|
34582
|
-
/* @__PURE__ */
|
|
34597
|
+
/* @__PURE__ */ jsx146("span", { className: "ods-workflow-header-expanded__progress", "aria-hidden": "true" })
|
|
34583
34598
|
]
|
|
34584
34599
|
}
|
|
34585
34600
|
);
|
|
@@ -34976,7 +34991,7 @@ function useTraceTimeline({
|
|
|
34976
34991
|
import { generateCssVars, resolveConfig } from "@octaviaflow/config";
|
|
34977
34992
|
import { createContext as createContext4, useContext as useContext5, useEffect as useEffect55, useMemo as useMemo38 } from "react";
|
|
34978
34993
|
import { OverlayProvider as OverlayProvider3 } from "react-aria";
|
|
34979
|
-
import { jsx as
|
|
34994
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
34980
34995
|
var OdsContext = createContext4(null);
|
|
34981
34996
|
function OdsProvider({ config: userConfig, children }) {
|
|
34982
34997
|
const resolved = useMemo38(() => resolveConfig(userConfig), [userConfig]);
|
|
@@ -34997,7 +35012,7 @@ function OdsProvider({ config: userConfig, children }) {
|
|
|
34997
35012
|
}
|
|
34998
35013
|
}, [resolved]);
|
|
34999
35014
|
const contextValue = useMemo38(() => ({ config: resolved }), [resolved]);
|
|
35000
|
-
return /* @__PURE__ */
|
|
35015
|
+
return /* @__PURE__ */ jsx147(OdsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx147(OverlayProvider3, { children }) });
|
|
35001
35016
|
}
|
|
35002
35017
|
function useOds() {
|
|
35003
35018
|
const ctx = useContext5(OdsContext);
|
|
@@ -35307,6 +35322,7 @@ function applyVerticalLayout(nodes, edges) {
|
|
|
35307
35322
|
return applyLayout(nodes, edges, { direction: "vertical" });
|
|
35308
35323
|
}
|
|
35309
35324
|
export {
|
|
35325
|
+
AVATAR_PALETTE_SIZE,
|
|
35310
35326
|
Accordion,
|
|
35311
35327
|
ActionsDrawer,
|
|
35312
35328
|
AgentCard,
|
|
@@ -35467,6 +35483,7 @@ export {
|
|
|
35467
35483
|
ScrollArea,
|
|
35468
35484
|
SegmentedControl,
|
|
35469
35485
|
Select,
|
|
35486
|
+
SettingsLayout,
|
|
35470
35487
|
SettingsRow,
|
|
35471
35488
|
Sheet,
|
|
35472
35489
|
Show,
|
|
@@ -35522,6 +35539,7 @@ export {
|
|
|
35522
35539
|
applyHorizontalLayout,
|
|
35523
35540
|
applyLayout,
|
|
35524
35541
|
applyVerticalLayout,
|
|
35542
|
+
avatarPaletteIndex,
|
|
35525
35543
|
breakpointMinWidth,
|
|
35526
35544
|
cn,
|
|
35527
35545
|
codeToFlag,
|