@octaviaflow/core 3.0.9 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AuthCard/AuthCard.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +8 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/index.cjs +136 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +257 -164
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -195,7 +195,7 @@ function AgentCard({
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// src/components/AuthCard/AuthCard.tsx
|
|
198
|
-
import { useState } from "react";
|
|
198
|
+
import { useId, useRef as useRef2, useState } from "react";
|
|
199
199
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
200
200
|
function AuthCard({
|
|
201
201
|
logo,
|
|
@@ -245,24 +245,61 @@ function AuthTabs({ tabs, defaultTab, value, onChange, className }) {
|
|
|
245
245
|
onChange?.(id);
|
|
246
246
|
};
|
|
247
247
|
const activeTab = tabs.find((t) => t.id === active) ?? tabs[0];
|
|
248
|
+
const scopeId = useId();
|
|
249
|
+
const tabRefs = useRef2({});
|
|
250
|
+
const handleKeyDown = (e) => {
|
|
251
|
+
const ids = tabs.map((t) => t.id);
|
|
252
|
+
const currentIdx = ids.indexOf(active);
|
|
253
|
+
if (currentIdx === -1) return;
|
|
254
|
+
let nextIdx = null;
|
|
255
|
+
if (e.key === "ArrowRight") nextIdx = (currentIdx + 1) % ids.length;
|
|
256
|
+
else if (e.key === "ArrowLeft") nextIdx = (currentIdx - 1 + ids.length) % ids.length;
|
|
257
|
+
else if (e.key === "Home") nextIdx = 0;
|
|
258
|
+
else if (e.key === "End") nextIdx = ids.length - 1;
|
|
259
|
+
if (nextIdx === null) return;
|
|
260
|
+
e.preventDefault();
|
|
261
|
+
const nextId = ids[nextIdx];
|
|
262
|
+
select(nextId);
|
|
263
|
+
tabRefs.current[nextId]?.focus();
|
|
264
|
+
};
|
|
248
265
|
return /* @__PURE__ */ jsxs3("div", { className: cn("ods-auth-tabs", className), children: [
|
|
249
|
-
/* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__list", role: "tablist", children: tabs.map((t) =>
|
|
250
|
-
|
|
266
|
+
/* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__list", role: "tablist", children: tabs.map((t) => {
|
|
267
|
+
const isActive2 = t.id === active;
|
|
268
|
+
return /* @__PURE__ */ jsxs3(
|
|
269
|
+
"button",
|
|
270
|
+
{
|
|
271
|
+
ref: (el) => {
|
|
272
|
+
tabRefs.current[t.id] = el;
|
|
273
|
+
},
|
|
274
|
+
type: "button",
|
|
275
|
+
role: "tab",
|
|
276
|
+
id: `${scopeId}-tab-${t.id}`,
|
|
277
|
+
"aria-selected": isActive2,
|
|
278
|
+
"aria-controls": `${scopeId}-panel-${t.id}`,
|
|
279
|
+
tabIndex: isActive2 ? 0 : -1,
|
|
280
|
+
className: cn("ods-auth-tabs__tab", isActive2 && "ods-auth-tabs__tab--active"),
|
|
281
|
+
onClick: () => select(t.id),
|
|
282
|
+
onKeyDown: handleKeyDown,
|
|
283
|
+
children: [
|
|
284
|
+
t.icon && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__icon", children: t.icon }),
|
|
285
|
+
/* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__label", children: t.label }),
|
|
286
|
+
t.description && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__desc", children: t.description })
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
t.id
|
|
290
|
+
);
|
|
291
|
+
}) }),
|
|
292
|
+
activeTab && /* @__PURE__ */ jsx3(
|
|
293
|
+
"div",
|
|
251
294
|
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
"aria-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
children:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
t.description && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__desc", children: t.description })
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
t.id
|
|
264
|
-
)) }),
|
|
265
|
-
activeTab && /* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__panel", children: activeTab.content })
|
|
295
|
+
role: "tabpanel",
|
|
296
|
+
id: `${scopeId}-panel-${activeTab.id}`,
|
|
297
|
+
"aria-labelledby": `${scopeId}-tab-${activeTab.id}`,
|
|
298
|
+
tabIndex: 0,
|
|
299
|
+
className: "ods-auth-tabs__panel",
|
|
300
|
+
children: activeTab.content
|
|
301
|
+
}
|
|
302
|
+
)
|
|
266
303
|
] });
|
|
267
304
|
}
|
|
268
305
|
function AuthBadge({ tone = "neutral", children, className }) {
|
|
@@ -546,11 +583,11 @@ function BlogCard({
|
|
|
546
583
|
}
|
|
547
584
|
|
|
548
585
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
549
|
-
import { useRef as
|
|
586
|
+
import { useRef as useRef3 } from "react";
|
|
550
587
|
import { useBreadcrumbItem, useBreadcrumbs } from "react-aria";
|
|
551
588
|
import { Fragment, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
552
589
|
function BreadcrumbItem({ item, isCurrent }) {
|
|
553
|
-
const ref =
|
|
590
|
+
const ref = useRef3(null);
|
|
554
591
|
const { itemProps } = useBreadcrumbItem(
|
|
555
592
|
{ children: item.label, isCurrent, elementType: item.href ? "a" : "span" },
|
|
556
593
|
ref
|
|
@@ -605,7 +642,7 @@ function Breadcrumb({
|
|
|
605
642
|
|
|
606
643
|
// src/components/Button/Button.tsx
|
|
607
644
|
import { motion as motion2 } from "framer-motion";
|
|
608
|
-
import { useRef as
|
|
645
|
+
import { useRef as useRef4 } from "react";
|
|
609
646
|
import { useButton } from "react-aria";
|
|
610
647
|
|
|
611
648
|
// src/utils/a11y.ts
|
|
@@ -649,7 +686,7 @@ function Button({
|
|
|
649
686
|
style,
|
|
650
687
|
...props
|
|
651
688
|
}) {
|
|
652
|
-
const ref =
|
|
689
|
+
const ref = useRef4(null);
|
|
653
690
|
const isDisabled = disabled || loading;
|
|
654
691
|
const hasAction = Boolean(props.onClick) || type === "submit" || type === "reset" || Boolean(props.href);
|
|
655
692
|
const resolvedCursor = cursor ?? (disabled ? "not-allowed" : loading ? "progress" : hasAction ? "pointer" : "default");
|
|
@@ -962,7 +999,7 @@ function ChatBubble({
|
|
|
962
999
|
}
|
|
963
1000
|
|
|
964
1001
|
// src/components/Checkbox/Checkbox.tsx
|
|
965
|
-
import { useRef as
|
|
1002
|
+
import { useRef as useRef5 } from "react";
|
|
966
1003
|
import { useCheckbox } from "react-aria";
|
|
967
1004
|
|
|
968
1005
|
// ../../node_modules/react-stately/dist/private/utils/useControlledState.mjs
|
|
@@ -2492,7 +2529,7 @@ function Checkbox({
|
|
|
2492
2529
|
className,
|
|
2493
2530
|
...props
|
|
2494
2531
|
}) {
|
|
2495
|
-
const ref =
|
|
2532
|
+
const ref = useRef5(null);
|
|
2496
2533
|
const state = $fd3c5e01e837dc20$export$8042c6c013fd5226({
|
|
2497
2534
|
isSelected: checked,
|
|
2498
2535
|
defaultSelected: defaultChecked,
|
|
@@ -2711,7 +2748,7 @@ function ChoiceCard({
|
|
|
2711
2748
|
}
|
|
2712
2749
|
|
|
2713
2750
|
// src/components/CodeEditor/CodeEditor.tsx
|
|
2714
|
-
import { useEffect, useMemo as useMemo3, useRef as
|
|
2751
|
+
import { useEffect, useMemo as useMemo3, useRef as useRef6, useState as useState3 } from "react";
|
|
2715
2752
|
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2716
2753
|
var COMMENT_PREFIX = {
|
|
2717
2754
|
sql: "-- ",
|
|
@@ -2763,8 +2800,8 @@ function CodeEditor({
|
|
|
2763
2800
|
showCounter = true,
|
|
2764
2801
|
searchable = true
|
|
2765
2802
|
}) {
|
|
2766
|
-
const taRef =
|
|
2767
|
-
const gutterRef =
|
|
2803
|
+
const taRef = useRef6(null);
|
|
2804
|
+
const gutterRef = useRef6(null);
|
|
2768
2805
|
const [activeLine, setActiveLine] = useState3(1);
|
|
2769
2806
|
const [copied, setCopied] = useState3(false);
|
|
2770
2807
|
const [internalWrap, setInternalWrap] = useState3(wordWrapProp ?? false);
|
|
@@ -2774,7 +2811,7 @@ function CodeEditor({
|
|
|
2774
2811
|
const [findOpen, setFindOpen] = useState3(false);
|
|
2775
2812
|
const [findQuery, setFindQuery] = useState3("");
|
|
2776
2813
|
const [findIndex, setFindIndex] = useState3(0);
|
|
2777
|
-
const findInputRef =
|
|
2814
|
+
const findInputRef = useRef6(null);
|
|
2778
2815
|
const lines = value.split("\n");
|
|
2779
2816
|
const lineCount = lines.length;
|
|
2780
2817
|
const matches = useMemo3(() => {
|
|
@@ -3370,9 +3407,9 @@ function ColorPicker({
|
|
|
3370
3407
|
import {
|
|
3371
3408
|
useCallback,
|
|
3372
3409
|
useEffect as useEffect2,
|
|
3373
|
-
useId,
|
|
3410
|
+
useId as useId2,
|
|
3374
3411
|
useMemo as useMemo4,
|
|
3375
|
-
useRef as
|
|
3412
|
+
useRef as useRef7,
|
|
3376
3413
|
useState as useState5
|
|
3377
3414
|
} from "react";
|
|
3378
3415
|
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
@@ -3388,10 +3425,10 @@ function OptionDropdown({
|
|
|
3388
3425
|
const [open, setOpen] = useState5(false);
|
|
3389
3426
|
const [query, setQuery] = useState5("");
|
|
3390
3427
|
const [activeIdx, setActiveIdx] = useState5(0);
|
|
3391
|
-
const triggerRef =
|
|
3392
|
-
const panelRef =
|
|
3393
|
-
const inputRef =
|
|
3394
|
-
const listboxId =
|
|
3428
|
+
const triggerRef = useRef7(null);
|
|
3429
|
+
const panelRef = useRef7(null);
|
|
3430
|
+
const inputRef = useRef7(null);
|
|
3431
|
+
const listboxId = useId2();
|
|
3395
3432
|
const showSearch = searchable === true || searchable === "auto" && options.length > 8;
|
|
3396
3433
|
const selected = options.find((o) => o.value === value);
|
|
3397
3434
|
const filtered = useMemo4(() => {
|
|
@@ -3696,7 +3733,7 @@ function ConditionBuilder({
|
|
|
3696
3733
|
|
|
3697
3734
|
// src/components/ConfigPanel/ConfigPanel.tsx
|
|
3698
3735
|
import { AnimatePresence as AnimatePresence2, motion as motion4 } from "framer-motion";
|
|
3699
|
-
import { useRef as
|
|
3736
|
+
import { useRef as useRef8 } from "react";
|
|
3700
3737
|
import { useButton as useButton2 } from "react-aria";
|
|
3701
3738
|
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3702
3739
|
function ConfigPanel({
|
|
@@ -3709,9 +3746,9 @@ function ConfigPanel({
|
|
|
3709
3746
|
onCancel,
|
|
3710
3747
|
className
|
|
3711
3748
|
}) {
|
|
3712
|
-
const closeRef =
|
|
3713
|
-
const saveRef =
|
|
3714
|
-
const cancelRef =
|
|
3749
|
+
const closeRef = useRef8(null);
|
|
3750
|
+
const saveRef = useRef8(null);
|
|
3751
|
+
const cancelRef = useRef8(null);
|
|
3715
3752
|
const { buttonProps: closeProps } = useButton2(
|
|
3716
3753
|
{ onPress: onClose, "aria-label": "Close panel" },
|
|
3717
3754
|
closeRef
|
|
@@ -3786,7 +3823,7 @@ import {
|
|
|
3786
3823
|
useCallback as useCallback2,
|
|
3787
3824
|
useEffect as useEffect3,
|
|
3788
3825
|
useMemo as useMemo5,
|
|
3789
|
-
useRef as
|
|
3826
|
+
useRef as useRef9,
|
|
3790
3827
|
useState as useState6
|
|
3791
3828
|
} from "react";
|
|
3792
3829
|
import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
@@ -4139,8 +4176,8 @@ function DataMapper({
|
|
|
4139
4176
|
const [display, setDisplay] = useState6(defaultDisplay);
|
|
4140
4177
|
const [sidebarOpen, setSidebarOpen] = useState6(defaultSidebarOpen);
|
|
4141
4178
|
const [sidebarTab, setSidebarTab] = useState6("schema");
|
|
4142
|
-
const editorRef =
|
|
4143
|
-
const rootRef =
|
|
4179
|
+
const editorRef = useRef9(null);
|
|
4180
|
+
const rootRef = useRef9(null);
|
|
4144
4181
|
useEffect3(() => {
|
|
4145
4182
|
if (!selectedTarget) return;
|
|
4146
4183
|
const handler = (e) => {
|
|
@@ -4864,8 +4901,8 @@ function ExpressionEditor({
|
|
|
4864
4901
|
readDragSnippet,
|
|
4865
4902
|
editorRef
|
|
4866
4903
|
}) {
|
|
4867
|
-
const lastEmittedRef =
|
|
4868
|
-
const isMountedRef =
|
|
4904
|
+
const lastEmittedRef = useRef9(value);
|
|
4905
|
+
const isMountedRef = useRef9(false);
|
|
4869
4906
|
useEffect3(() => {
|
|
4870
4907
|
const el = editorRef.current;
|
|
4871
4908
|
if (!el || isMountedRef.current) return;
|
|
@@ -5108,7 +5145,7 @@ import {
|
|
|
5108
5145
|
useCallback as useCallback3,
|
|
5109
5146
|
useEffect as useEffect4,
|
|
5110
5147
|
useMemo as useMemo6,
|
|
5111
|
-
useRef as
|
|
5148
|
+
useRef as useRef10,
|
|
5112
5149
|
useState as useState7
|
|
5113
5150
|
} from "react";
|
|
5114
5151
|
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -5760,7 +5797,7 @@ function Row({
|
|
|
5760
5797
|
clickable
|
|
5761
5798
|
}) {
|
|
5762
5799
|
const [menuOpen, setMenuOpen] = useState7(false);
|
|
5763
|
-
const menuRef =
|
|
5800
|
+
const menuRef = useRef10(null);
|
|
5764
5801
|
useEffect4(() => {
|
|
5765
5802
|
if (!menuOpen) return;
|
|
5766
5803
|
const close = (e) => {
|
|
@@ -5899,7 +5936,7 @@ function ChevronRightSmall() {
|
|
|
5899
5936
|
}
|
|
5900
5937
|
|
|
5901
5938
|
// src/components/DatePicker/DatePicker.tsx
|
|
5902
|
-
import { useEffect as useEffect5, useRef as
|
|
5939
|
+
import { useEffect as useEffect5, useRef as useRef11, useState as useState8 } from "react";
|
|
5903
5940
|
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5904
5941
|
var defaultFormat = (d) => d.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
5905
5942
|
function DatePicker({
|
|
@@ -5917,7 +5954,7 @@ function DatePicker({
|
|
|
5917
5954
|
className
|
|
5918
5955
|
}) {
|
|
5919
5956
|
const [open, setOpen] = useState8(false);
|
|
5920
|
-
const wrapRef =
|
|
5957
|
+
const wrapRef = useRef11(null);
|
|
5921
5958
|
useEffect5(() => {
|
|
5922
5959
|
if (!open) return;
|
|
5923
5960
|
const onDoc = (e) => {
|
|
@@ -6059,7 +6096,7 @@ function DescriptionList({
|
|
|
6059
6096
|
|
|
6060
6097
|
// src/components/Dialog/Dialog.tsx
|
|
6061
6098
|
import { AnimatePresence as AnimatePresence3, motion as motion5 } from "framer-motion";
|
|
6062
|
-
import { useRef as
|
|
6099
|
+
import { useRef as useRef12 } from "react";
|
|
6063
6100
|
import { FocusScope, OverlayProvider, useDialog, useModal, useOverlay } from "react-aria";
|
|
6064
6101
|
import { createPortal } from "react-dom";
|
|
6065
6102
|
|
|
@@ -6113,8 +6150,8 @@ function DialogContent({
|
|
|
6113
6150
|
footer,
|
|
6114
6151
|
className
|
|
6115
6152
|
}) {
|
|
6116
|
-
const overlayRef =
|
|
6117
|
-
const dialogRef =
|
|
6153
|
+
const overlayRef = useRef12(null);
|
|
6154
|
+
const dialogRef = useRef12(null);
|
|
6118
6155
|
const { overlayProps, underlayProps } = useOverlay(
|
|
6119
6156
|
{
|
|
6120
6157
|
isOpen: open,
|
|
@@ -6306,12 +6343,12 @@ function Drawer({
|
|
|
6306
6343
|
|
|
6307
6344
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
6308
6345
|
import { AnimatePresence as AnimatePresence4, motion as motion6 } from "framer-motion";
|
|
6309
|
-
import { useRef as
|
|
6346
|
+
import { useRef as useRef13 } from "react";
|
|
6310
6347
|
import { useButton as useButton3, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
|
|
6311
6348
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6312
6349
|
import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6313
6350
|
function MenuItemComponent({ item, state, onAction }) {
|
|
6314
|
-
const ref =
|
|
6351
|
+
const ref = useRef13(null);
|
|
6315
6352
|
const { menuItemProps } = useMenuItem({ key: item.key, onAction }, state, ref);
|
|
6316
6353
|
const menuItem = item.value;
|
|
6317
6354
|
const isDisabled = state.disabledKeys.has(item.key);
|
|
@@ -6339,7 +6376,7 @@ function MenuPopup({
|
|
|
6339
6376
|
align,
|
|
6340
6377
|
className
|
|
6341
6378
|
}) {
|
|
6342
|
-
const menuRef =
|
|
6379
|
+
const menuRef = useRef13(null);
|
|
6343
6380
|
const nonSepItems = menuItems.filter((i) => !i.separator);
|
|
6344
6381
|
const children = nonSepItems.map((item, idx) => /* @__PURE__ */ jsx29($05678f3aee5e7d1a$export$6d08773d2e66f8f2, { textValue: item.label, children: item.label }, idx));
|
|
6345
6382
|
const treeState = $6b915bde6cd300dd$export$728d6ba534403756({
|
|
@@ -6418,10 +6455,11 @@ function DropdownMenu({
|
|
|
6418
6455
|
items,
|
|
6419
6456
|
align = "start",
|
|
6420
6457
|
className,
|
|
6458
|
+
triggerClassName,
|
|
6421
6459
|
"aria-label": ariaLabel,
|
|
6422
6460
|
"aria-labelledby": ariaLabelledby
|
|
6423
6461
|
}) {
|
|
6424
|
-
const triggerRef =
|
|
6462
|
+
const triggerRef = useRef13(null);
|
|
6425
6463
|
const state = $e3403870bfb691da$export$79fefeb1c2091ac3({});
|
|
6426
6464
|
const { menuTriggerProps } = useMenuTrigger({}, state, triggerRef);
|
|
6427
6465
|
const ariaNameProps = resolveAccessibleName({
|
|
@@ -6436,7 +6474,15 @@ function DropdownMenu({
|
|
|
6436
6474
|
);
|
|
6437
6475
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeTriggerProps } = buttonProps;
|
|
6438
6476
|
return /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
6439
|
-
/* @__PURE__ */ jsx29(
|
|
6477
|
+
/* @__PURE__ */ jsx29(
|
|
6478
|
+
"button",
|
|
6479
|
+
{
|
|
6480
|
+
...safeTriggerProps,
|
|
6481
|
+
ref: triggerRef,
|
|
6482
|
+
className: triggerClassName ?? "ods-dropdown__trigger",
|
|
6483
|
+
children: trigger
|
|
6484
|
+
}
|
|
6485
|
+
),
|
|
6440
6486
|
/* @__PURE__ */ jsx29(
|
|
6441
6487
|
MenuPopup,
|
|
6442
6488
|
{
|
|
@@ -6463,7 +6509,7 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
6463
6509
|
|
|
6464
6510
|
// src/components/ExecutionConsole/ExecutionConsole.tsx
|
|
6465
6511
|
import { motion as motion7 } from "framer-motion";
|
|
6466
|
-
import { useEffect as useEffect6, useRef as
|
|
6512
|
+
import { useEffect as useEffect6, useRef as useRef14 } from "react";
|
|
6467
6513
|
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6468
6514
|
var iconProps = {
|
|
6469
6515
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6499,7 +6545,7 @@ function ExecutionConsole({
|
|
|
6499
6545
|
toolbar,
|
|
6500
6546
|
className
|
|
6501
6547
|
}) {
|
|
6502
|
-
const logEndRef =
|
|
6548
|
+
const logEndRef = useRef14(null);
|
|
6503
6549
|
const handleCopy = () => {
|
|
6504
6550
|
if (onCopy) {
|
|
6505
6551
|
onCopy();
|
|
@@ -6677,8 +6723,8 @@ function FeatureCard({
|
|
|
6677
6723
|
import {
|
|
6678
6724
|
useCallback as useCallback4,
|
|
6679
6725
|
useEffect as useEffect7,
|
|
6680
|
-
useId as
|
|
6681
|
-
useRef as
|
|
6726
|
+
useId as useId3,
|
|
6727
|
+
useRef as useRef15,
|
|
6682
6728
|
useState as useState9
|
|
6683
6729
|
} from "react";
|
|
6684
6730
|
|
|
@@ -6818,9 +6864,9 @@ function FileDropzone({
|
|
|
6818
6864
|
compact = false,
|
|
6819
6865
|
className
|
|
6820
6866
|
}) {
|
|
6821
|
-
const inputRef =
|
|
6822
|
-
const dropzoneRef =
|
|
6823
|
-
const inputId =
|
|
6867
|
+
const inputRef = useRef15(null);
|
|
6868
|
+
const dropzoneRef = useRef15(null);
|
|
6869
|
+
const inputId = useId3();
|
|
6824
6870
|
const [isOver, setOver] = useState9(false);
|
|
6825
6871
|
const [error, setError] = useState9(null);
|
|
6826
6872
|
const [autoPreviews, setAutoPreviews] = useState9({});
|
|
@@ -7120,7 +7166,7 @@ function FileDropzone({
|
|
|
7120
7166
|
|
|
7121
7167
|
// src/components/FlowCanvas/FlowCanvas.tsx
|
|
7122
7168
|
import { AnimatePresence as AnimatePresence5 } from "framer-motion";
|
|
7123
|
-
import { useCallback as useCallback6, useRef as
|
|
7169
|
+
import { useCallback as useCallback6, useRef as useRef17 } from "react";
|
|
7124
7170
|
|
|
7125
7171
|
// src/components/FlowEdge/FlowEdge.tsx
|
|
7126
7172
|
import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
@@ -7165,7 +7211,7 @@ import {
|
|
|
7165
7211
|
forwardRef,
|
|
7166
7212
|
useCallback as useCallback5,
|
|
7167
7213
|
useEffect as useEffect8,
|
|
7168
|
-
useRef as
|
|
7214
|
+
useRef as useRef16,
|
|
7169
7215
|
useState as useState10
|
|
7170
7216
|
} from "react";
|
|
7171
7217
|
import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
@@ -7229,7 +7275,7 @@ var FlowNode = forwardRef(function FlowNode2({
|
|
|
7229
7275
|
}, ref) {
|
|
7230
7276
|
const [isDragging, setIsDragging] = useState10(false);
|
|
7231
7277
|
const [wasDragged, setWasDragged] = useState10(false);
|
|
7232
|
-
const dragStartRef =
|
|
7278
|
+
const dragStartRef = useRef16(null);
|
|
7233
7279
|
const zoom = viewport?.zoom ?? 1;
|
|
7234
7280
|
const handleClick = useCallback5(
|
|
7235
7281
|
(e) => {
|
|
@@ -7577,7 +7623,7 @@ function FlowCanvas({
|
|
|
7577
7623
|
className,
|
|
7578
7624
|
...props
|
|
7579
7625
|
}) {
|
|
7580
|
-
const canvasRef =
|
|
7626
|
+
const canvasRef = useRef17(null);
|
|
7581
7627
|
const isEmpty = nodes.length === 0 && edges.length === 0;
|
|
7582
7628
|
const handleCanvasClick = useCallback6(
|
|
7583
7629
|
(e) => {
|
|
@@ -8021,7 +8067,7 @@ function FormSection({
|
|
|
8021
8067
|
}
|
|
8022
8068
|
|
|
8023
8069
|
// src/components/HoverCard/HoverCard.tsx
|
|
8024
|
-
import { useCallback as useCallback8, useEffect as useEffect9, useLayoutEffect, useRef as
|
|
8070
|
+
import { useCallback as useCallback8, useEffect as useEffect9, useLayoutEffect, useRef as useRef18, useState as useState11 } from "react";
|
|
8025
8071
|
import { createPortal as createPortal3 } from "react-dom";
|
|
8026
8072
|
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8027
8073
|
function computePosition(rect, panelRect, placement, offset) {
|
|
@@ -8048,10 +8094,10 @@ function HoverCard({
|
|
|
8048
8094
|
className
|
|
8049
8095
|
}) {
|
|
8050
8096
|
const [open, setOpen] = useState11(false);
|
|
8051
|
-
const triggerRef =
|
|
8052
|
-
const panelRef =
|
|
8053
|
-
const openTimer =
|
|
8054
|
-
const closeTimer =
|
|
8097
|
+
const triggerRef = useRef18(null);
|
|
8098
|
+
const panelRef = useRef18(null);
|
|
8099
|
+
const openTimer = useRef18(null);
|
|
8100
|
+
const closeTimer = useRef18(null);
|
|
8055
8101
|
const [coords, setCoords] = useState11(null);
|
|
8056
8102
|
const clearTimers = () => {
|
|
8057
8103
|
if (openTimer.current) {
|
|
@@ -8173,9 +8219,9 @@ function IconCard({
|
|
|
8173
8219
|
// src/components/Input/Input.tsx
|
|
8174
8220
|
import {
|
|
8175
8221
|
forwardRef as forwardRef2,
|
|
8176
|
-
useId as
|
|
8222
|
+
useId as useId4,
|
|
8177
8223
|
useImperativeHandle,
|
|
8178
|
-
useRef as
|
|
8224
|
+
useRef as useRef19
|
|
8179
8225
|
} from "react";
|
|
8180
8226
|
import { jsx as jsx42, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8181
8227
|
var CLEAR_GLYPH = /* @__PURE__ */ jsx42("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx42("path", { d: "m3 3 6 6M9 3l-6 6", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) });
|
|
@@ -8200,9 +8246,9 @@ var Input = forwardRef2(
|
|
|
8200
8246
|
onChange,
|
|
8201
8247
|
...props
|
|
8202
8248
|
}, forwardedRef) => {
|
|
8203
|
-
const innerRef =
|
|
8249
|
+
const innerRef = useRef19(null);
|
|
8204
8250
|
useImperativeHandle(forwardedRef, () => innerRef.current);
|
|
8205
|
-
const reactId =
|
|
8251
|
+
const reactId = useId4();
|
|
8206
8252
|
const inputId = id ?? `${reactId}-input`;
|
|
8207
8253
|
const errorId = `${reactId}-err`;
|
|
8208
8254
|
const helperId = `${reactId}-help`;
|
|
@@ -8698,7 +8744,7 @@ import {
|
|
|
8698
8744
|
useEffect as useEffect10,
|
|
8699
8745
|
useLayoutEffect as useLayoutEffect2,
|
|
8700
8746
|
useMemo as useMemo9,
|
|
8701
|
-
useRef as
|
|
8747
|
+
useRef as useRef20,
|
|
8702
8748
|
useState as useState13
|
|
8703
8749
|
} from "react";
|
|
8704
8750
|
import { createPortal as createPortal4 } from "react-dom";
|
|
@@ -8728,11 +8774,11 @@ function MultiSelect({
|
|
|
8728
8774
|
const [query, setQuery] = useState13("");
|
|
8729
8775
|
const [activeIdx, setActiveIdx] = useState13(0);
|
|
8730
8776
|
const [dropdownPos, setDropdownPos] = useState13({ top: 0, left: 0, width: 0 });
|
|
8731
|
-
const wrapRef =
|
|
8732
|
-
const tagsRowRef =
|
|
8733
|
-
const searchRef =
|
|
8734
|
-
const dropdownRef =
|
|
8735
|
-
const chipRefs =
|
|
8777
|
+
const wrapRef = useRef20(null);
|
|
8778
|
+
const tagsRowRef = useRef20(null);
|
|
8779
|
+
const searchRef = useRef20(null);
|
|
8780
|
+
const dropdownRef = useRef20(null);
|
|
8781
|
+
const chipRefs = useRef20([]);
|
|
8736
8782
|
const commit = useCallback9(
|
|
8737
8783
|
(next) => {
|
|
8738
8784
|
if (controlledValue === void 0) setInternalValue(next);
|
|
@@ -9165,7 +9211,7 @@ function NumberInput({
|
|
|
9165
9211
|
// src/components/OTPInput/OTPInput.tsx
|
|
9166
9212
|
import {
|
|
9167
9213
|
useCallback as useCallback11,
|
|
9168
|
-
useRef as
|
|
9214
|
+
useRef as useRef21
|
|
9169
9215
|
} from "react";
|
|
9170
9216
|
import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
9171
9217
|
function OTPInput({
|
|
@@ -9181,7 +9227,7 @@ function OTPInput({
|
|
|
9181
9227
|
autoFocus = false,
|
|
9182
9228
|
className
|
|
9183
9229
|
}) {
|
|
9184
|
-
const refs =
|
|
9230
|
+
const refs = useRef21([]);
|
|
9185
9231
|
const pattern = type === "numeric" ? /[^0-9]/g : /[^a-zA-Z0-9]/g;
|
|
9186
9232
|
const setCharAt = useCallback11(
|
|
9187
9233
|
(idx, ch) => {
|
|
@@ -9496,7 +9542,7 @@ function PhoneInput({
|
|
|
9496
9542
|
}
|
|
9497
9543
|
|
|
9498
9544
|
// src/components/Popover/Popover.tsx
|
|
9499
|
-
import { useCallback as useCallback12, useEffect as useEffect11, useLayoutEffect as useLayoutEffect3, useRef as
|
|
9545
|
+
import { useCallback as useCallback12, useEffect as useEffect11, useLayoutEffect as useLayoutEffect3, useRef as useRef22, useState as useState16 } from "react";
|
|
9500
9546
|
import { createPortal as createPortal5 } from "react-dom";
|
|
9501
9547
|
import { Fragment as Fragment12, jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9502
9548
|
function computePosition2(rect, popRect, placement, offset) {
|
|
@@ -9536,8 +9582,8 @@ function Popover({
|
|
|
9536
9582
|
},
|
|
9537
9583
|
[openProp, onOpenChange]
|
|
9538
9584
|
);
|
|
9539
|
-
const triggerRef =
|
|
9540
|
-
const popRef =
|
|
9585
|
+
const triggerRef = useRef22(null);
|
|
9586
|
+
const popRef = useRef22(null);
|
|
9541
9587
|
const [coords, setCoords] = useState16(null);
|
|
9542
9588
|
const reposition = useCallback12(() => {
|
|
9543
9589
|
if (!triggerRef.current || !popRef.current) return;
|
|
@@ -9774,7 +9820,7 @@ function ProgressRing({
|
|
|
9774
9820
|
import {
|
|
9775
9821
|
useCallback as useCallback13,
|
|
9776
9822
|
useEffect as useEffect12,
|
|
9777
|
-
useRef as
|
|
9823
|
+
useRef as useRef23,
|
|
9778
9824
|
useState as useState17
|
|
9779
9825
|
} from "react";
|
|
9780
9826
|
import { jsx as jsx58, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -9827,7 +9873,7 @@ function PromptInput({
|
|
|
9827
9873
|
className,
|
|
9828
9874
|
ariaLabel = "Prompt"
|
|
9829
9875
|
}) {
|
|
9830
|
-
const taRef =
|
|
9876
|
+
const taRef = useRef23(null);
|
|
9831
9877
|
const [internal, setInternal] = useState17(defaultValue);
|
|
9832
9878
|
const v = value ?? internal;
|
|
9833
9879
|
const isControlled = value !== void 0;
|
|
@@ -10169,11 +10215,11 @@ function Quote({
|
|
|
10169
10215
|
}
|
|
10170
10216
|
|
|
10171
10217
|
// src/components/Radio/Radio.tsx
|
|
10172
|
-
import { useRef as
|
|
10218
|
+
import { useRef as useRef25 } from "react";
|
|
10173
10219
|
import { useRadio } from "react-aria";
|
|
10174
10220
|
|
|
10175
10221
|
// src/components/Radio/RadioGroup.tsx
|
|
10176
|
-
import { createContext, useContext, useRef as
|
|
10222
|
+
import { createContext, useContext, useRef as useRef24 } from "react";
|
|
10177
10223
|
import { useRadioGroup } from "react-aria";
|
|
10178
10224
|
import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
10179
10225
|
var RadioGroupContext = createContext(null);
|
|
@@ -10214,7 +10260,7 @@ function RadioGroup({
|
|
|
10214
10260
|
"aria-describedby": ariaDescribedBy
|
|
10215
10261
|
};
|
|
10216
10262
|
const state = $384704861d32dbed$export$bca9d026f8e704eb(ariaProps);
|
|
10217
|
-
const ref =
|
|
10263
|
+
const ref = useRef24(null);
|
|
10218
10264
|
const { radioGroupProps, labelProps } = useRadioGroup(ariaProps, state);
|
|
10219
10265
|
return /* @__PURE__ */ jsxs59(
|
|
10220
10266
|
"div",
|
|
@@ -10246,7 +10292,7 @@ function Radio({
|
|
|
10246
10292
|
...props
|
|
10247
10293
|
}) {
|
|
10248
10294
|
const state = useRadioGroupContext();
|
|
10249
|
-
const ref =
|
|
10295
|
+
const ref = useRef25(null);
|
|
10250
10296
|
const ariaNameProps = resolveAccessibleName({
|
|
10251
10297
|
label,
|
|
10252
10298
|
ariaLabel: props["aria-label"],
|
|
@@ -10506,7 +10552,7 @@ function Rating({
|
|
|
10506
10552
|
import {
|
|
10507
10553
|
useCallback as useCallback14,
|
|
10508
10554
|
useEffect as useEffect13,
|
|
10509
|
-
useRef as
|
|
10555
|
+
useRef as useRef26,
|
|
10510
10556
|
useState as useState19
|
|
10511
10557
|
} from "react";
|
|
10512
10558
|
import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
@@ -10523,7 +10569,7 @@ function Resizable({
|
|
|
10523
10569
|
className,
|
|
10524
10570
|
ariaLabel = "Resize panels"
|
|
10525
10571
|
}) {
|
|
10526
|
-
const wrapRef =
|
|
10572
|
+
const wrapRef = useRef26(null);
|
|
10527
10573
|
const [internalSplit, setInternalSplit] = useState19(() => {
|
|
10528
10574
|
if (typeof window === "undefined" || !storageKey) return null;
|
|
10529
10575
|
const stored = window.localStorage.getItem(storageKey);
|
|
@@ -10533,7 +10579,7 @@ function Resizable({
|
|
|
10533
10579
|
}
|
|
10534
10580
|
return null;
|
|
10535
10581
|
});
|
|
10536
|
-
const draggingRef =
|
|
10582
|
+
const draggingRef = useRef26(false);
|
|
10537
10583
|
const [isDragging, setDragging] = useState19(false);
|
|
10538
10584
|
const computeFromDefault = useCallback14(() => {
|
|
10539
10585
|
const el = wrapRef.current;
|
|
@@ -10677,9 +10723,9 @@ function ResizablePanel({
|
|
|
10677
10723
|
}) {
|
|
10678
10724
|
const [internal, setInternal] = useState19(sizeProp ?? defaultSize);
|
|
10679
10725
|
const size = sizeProp ?? internal;
|
|
10680
|
-
const draggingRef =
|
|
10726
|
+
const draggingRef = useRef26(false);
|
|
10681
10727
|
const [isDragging, setDragging] = useState19(false);
|
|
10682
|
-
const startRef =
|
|
10728
|
+
const startRef = useRef26({ x: 0, size });
|
|
10683
10729
|
const onMouseDown = (e) => {
|
|
10684
10730
|
e.preventDefault();
|
|
10685
10731
|
draggingRef.current = true;
|
|
@@ -10749,18 +10795,18 @@ function Ribbon({
|
|
|
10749
10795
|
|
|
10750
10796
|
// src/components/Select/Select.tsx
|
|
10751
10797
|
import { AnimatePresence as AnimatePresence7, motion as motion10 } from "framer-motion";
|
|
10752
|
-
import { useCallback as useCallback15, useEffect as useEffect14, useMemo as useMemo10, useRef as
|
|
10798
|
+
import { useCallback as useCallback15, useEffect as useEffect14, useMemo as useMemo10, useRef as useRef27, useState as useState20 } from "react";
|
|
10753
10799
|
import { HiddenSelect, useButton as useButton4, useListBox, useOption, useSelect } from "react-aria";
|
|
10754
10800
|
import { createPortal as createPortal6 } from "react-dom";
|
|
10755
10801
|
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
10756
10802
|
function ListBox(props) {
|
|
10757
|
-
const ref =
|
|
10803
|
+
const ref = useRef27(null);
|
|
10758
10804
|
const { listBoxRef = ref, state } = props;
|
|
10759
10805
|
const { listBoxProps } = useListBox(props, state, listBoxRef);
|
|
10760
10806
|
return /* @__PURE__ */ jsx66("ul", { ...listBoxProps, ref: listBoxRef, className: "ods-select__options", children: [...state.collection].map((item) => /* @__PURE__ */ jsx66(Option, { item, state }, item.key)) });
|
|
10761
10807
|
}
|
|
10762
10808
|
function Option({ item, state }) {
|
|
10763
|
-
const ref =
|
|
10809
|
+
const ref = useRef27(null);
|
|
10764
10810
|
const { optionProps, isSelected, isFocused, isDisabled } = useOption(
|
|
10765
10811
|
{ key: item.key },
|
|
10766
10812
|
state,
|
|
@@ -10844,9 +10890,9 @@ function Select({
|
|
|
10844
10890
|
"aria-labelledby": ariaLabelledBy,
|
|
10845
10891
|
"aria-describedby": ariaDescribedBy
|
|
10846
10892
|
}) {
|
|
10847
|
-
const triggerRef =
|
|
10848
|
-
const listBoxRef =
|
|
10849
|
-
const searchRef =
|
|
10893
|
+
const triggerRef = useRef27(null);
|
|
10894
|
+
const listBoxRef = useRef27(null);
|
|
10895
|
+
const searchRef = useRef27(null);
|
|
10850
10896
|
const [searchQuery, setSearchQuery] = useState20("");
|
|
10851
10897
|
const [dropdownPos, setDropdownPos] = useState20({ top: 0, left: 0, width: 0 });
|
|
10852
10898
|
const filteredOptions = useMemo10(() => {
|
|
@@ -11117,7 +11163,7 @@ function Sheet({
|
|
|
11117
11163
|
}
|
|
11118
11164
|
|
|
11119
11165
|
// src/components/Sidebar/Sidebar.tsx
|
|
11120
|
-
import { useCallback as useCallback16, useEffect as useEffect16, useRef as
|
|
11166
|
+
import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef28, useState as useState21 } from "react";
|
|
11121
11167
|
import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11122
11168
|
function Sidebar({
|
|
11123
11169
|
variant = "expanded",
|
|
@@ -11139,15 +11185,17 @@ function Sidebar({
|
|
|
11139
11185
|
className
|
|
11140
11186
|
}) {
|
|
11141
11187
|
const allSections = sections ?? (items ? [{ items }] : []);
|
|
11142
|
-
const [internalPinned, setInternalPinned] = useState21(
|
|
11143
|
-
|
|
11188
|
+
const [internalPinned, setInternalPinned] = useState21(defaultPinned);
|
|
11189
|
+
useEffect16(() => {
|
|
11190
|
+
if (pinnedProp !== void 0) return;
|
|
11144
11191
|
try {
|
|
11145
11192
|
const stored = window.localStorage.getItem(pinStorageKey);
|
|
11146
|
-
if (stored !== null
|
|
11193
|
+
if (stored !== null && stored !== String(internalPinned)) {
|
|
11194
|
+
setInternalPinned(stored === "true");
|
|
11195
|
+
}
|
|
11147
11196
|
} catch {
|
|
11148
11197
|
}
|
|
11149
|
-
|
|
11150
|
-
});
|
|
11198
|
+
}, []);
|
|
11151
11199
|
const pinned = pinnedProp ?? internalPinned;
|
|
11152
11200
|
const setPinned = useCallback16(
|
|
11153
11201
|
(p) => {
|
|
@@ -11161,8 +11209,8 @@ function Sidebar({
|
|
|
11161
11209
|
[pinnedProp, pinStorageKey, onPinnedChange]
|
|
11162
11210
|
);
|
|
11163
11211
|
const [hoverOpen, setHoverOpen] = useState21(false);
|
|
11164
|
-
const openTimer =
|
|
11165
|
-
const closeTimer =
|
|
11212
|
+
const openTimer = useRef28(null);
|
|
11213
|
+
const closeTimer = useRef28(null);
|
|
11166
11214
|
const clearTimers = () => {
|
|
11167
11215
|
if (openTimer.current) {
|
|
11168
11216
|
clearTimeout(openTimer.current);
|
|
@@ -11185,6 +11233,17 @@ function Sidebar({
|
|
|
11185
11233
|
const autoMode = variant === "auto";
|
|
11186
11234
|
const showAsRail = autoMode ? !pinned : variant === "rail";
|
|
11187
11235
|
const overlayOpen = autoMode && !pinned && hoverOpen;
|
|
11236
|
+
useEffect16(() => {
|
|
11237
|
+
if (!overlayOpen) return;
|
|
11238
|
+
const handler = (e) => {
|
|
11239
|
+
if (e.key === "Escape") {
|
|
11240
|
+
clearTimers();
|
|
11241
|
+
setHoverOpen(false);
|
|
11242
|
+
}
|
|
11243
|
+
};
|
|
11244
|
+
window.addEventListener("keydown", handler);
|
|
11245
|
+
return () => window.removeEventListener("keydown", handler);
|
|
11246
|
+
}, [overlayOpen]);
|
|
11188
11247
|
return /* @__PURE__ */ jsxs68(
|
|
11189
11248
|
"nav",
|
|
11190
11249
|
{
|
|
@@ -11290,17 +11349,34 @@ function RailLayout({
|
|
|
11290
11349
|
},
|
|
11291
11350
|
item.id
|
|
11292
11351
|
)) }),
|
|
11293
|
-
user && /* @__PURE__ */ jsx69(
|
|
11294
|
-
|
|
11352
|
+
user && /* @__PURE__ */ jsx69(SidebarUserRail, { user })
|
|
11353
|
+
] });
|
|
11354
|
+
}
|
|
11355
|
+
function SidebarUserRail({ user }) {
|
|
11356
|
+
const labelText = typeof user.name === "string" ? user.name : "User";
|
|
11357
|
+
const avatar = user.avatar ?? /* @__PURE__ */ jsx69("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") });
|
|
11358
|
+
if (user.menu && user.menu.length > 0) {
|
|
11359
|
+
return /* @__PURE__ */ jsx69(
|
|
11360
|
+
DropdownMenu,
|
|
11295
11361
|
{
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
"aria-label":
|
|
11300
|
-
|
|
11362
|
+
trigger: avatar,
|
|
11363
|
+
items: user.menu,
|
|
11364
|
+
align: "end",
|
|
11365
|
+
"aria-label": labelText,
|
|
11366
|
+
triggerClassName: "ods-sidebar__user-rail"
|
|
11301
11367
|
}
|
|
11302
|
-
)
|
|
11303
|
-
|
|
11368
|
+
);
|
|
11369
|
+
}
|
|
11370
|
+
return /* @__PURE__ */ jsx69(
|
|
11371
|
+
"button",
|
|
11372
|
+
{
|
|
11373
|
+
type: "button",
|
|
11374
|
+
className: "ods-sidebar__user-rail",
|
|
11375
|
+
onClick: user.onClick,
|
|
11376
|
+
"aria-label": labelText,
|
|
11377
|
+
children: avatar
|
|
11378
|
+
}
|
|
11379
|
+
);
|
|
11304
11380
|
}
|
|
11305
11381
|
function RailItem({
|
|
11306
11382
|
item,
|
|
@@ -11308,7 +11384,7 @@ function RailItem({
|
|
|
11308
11384
|
suppressTooltip
|
|
11309
11385
|
}) {
|
|
11310
11386
|
const [tipOpen, setTipOpen] = useState21(false);
|
|
11311
|
-
const timerRef =
|
|
11387
|
+
const timerRef = useRef28(null);
|
|
11312
11388
|
const clear = () => {
|
|
11313
11389
|
if (timerRef.current) {
|
|
11314
11390
|
clearTimeout(timerRef.current);
|
|
@@ -11419,18 +11495,7 @@ function ExpandedLayout({
|
|
|
11419
11495
|
] }, section.id ?? sIdx)) }),
|
|
11420
11496
|
(footerItems || user) && /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__footer", children: [
|
|
11421
11497
|
footerItems && footerItems.length > 0 && /* @__PURE__ */ jsx69("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ jsx69(ExpandedItem, { item, level: 0 }, item.id)) }),
|
|
11422
|
-
user && /* @__PURE__ */
|
|
11423
|
-
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-avatar", children: user.avatar ?? /* @__PURE__ */ jsx69("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") }) }),
|
|
11424
|
-
/* @__PURE__ */ jsxs68("span", { className: "ods-sidebar__user-info", children: [
|
|
11425
|
-
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-name", children: user.name }),
|
|
11426
|
-
user.email && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-email", children: user.email })
|
|
11427
|
-
] }),
|
|
11428
|
-
/* @__PURE__ */ jsxs68("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
11429
|
-
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "3", r: "1.3", fill: "currentColor" }),
|
|
11430
|
-
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "8", r: "1.3", fill: "currentColor" }),
|
|
11431
|
-
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "13", r: "1.3", fill: "currentColor" })
|
|
11432
|
-
] })
|
|
11433
|
-
] })
|
|
11498
|
+
user && /* @__PURE__ */ jsx69(SidebarUserCard, { user })
|
|
11434
11499
|
] })
|
|
11435
11500
|
] });
|
|
11436
11501
|
}
|
|
@@ -11520,6 +11585,34 @@ function ExpandedItem({ item, level }) {
|
|
|
11520
11585
|
}
|
|
11521
11586
|
);
|
|
11522
11587
|
}
|
|
11588
|
+
function SidebarUserCard({ user }) {
|
|
11589
|
+
const labelText = typeof user.name === "string" ? user.name : "User";
|
|
11590
|
+
const body = /* @__PURE__ */ jsxs68(Fragment15, { children: [
|
|
11591
|
+
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-avatar", children: user.avatar ?? /* @__PURE__ */ jsx69("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") }) }),
|
|
11592
|
+
/* @__PURE__ */ jsxs68("span", { className: "ods-sidebar__user-info", children: [
|
|
11593
|
+
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-name", children: user.name }),
|
|
11594
|
+
user.email && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-email", children: user.email })
|
|
11595
|
+
] }),
|
|
11596
|
+
/* @__PURE__ */ jsxs68("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
11597
|
+
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "3", r: "1.3", fill: "currentColor" }),
|
|
11598
|
+
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "8", r: "1.3", fill: "currentColor" }),
|
|
11599
|
+
/* @__PURE__ */ jsx69("circle", { cx: "8", cy: "13", r: "1.3", fill: "currentColor" })
|
|
11600
|
+
] })
|
|
11601
|
+
] });
|
|
11602
|
+
if (user.menu && user.menu.length > 0) {
|
|
11603
|
+
return /* @__PURE__ */ jsx69(
|
|
11604
|
+
DropdownMenu,
|
|
11605
|
+
{
|
|
11606
|
+
trigger: body,
|
|
11607
|
+
items: user.menu,
|
|
11608
|
+
align: "end",
|
|
11609
|
+
"aria-label": labelText,
|
|
11610
|
+
triggerClassName: "ods-sidebar__user-card"
|
|
11611
|
+
}
|
|
11612
|
+
);
|
|
11613
|
+
}
|
|
11614
|
+
return /* @__PURE__ */ jsx69("button", { type: "button", className: "ods-sidebar__user-card", onClick: user.onClick, children: body });
|
|
11615
|
+
}
|
|
11523
11616
|
function hasActiveDescendant(item) {
|
|
11524
11617
|
if (!item.children) return false;
|
|
11525
11618
|
for (const c of item.children) {
|
|
@@ -11563,7 +11656,7 @@ function Skeleton({ variant = "text", width, height, lines = 1, className }) {
|
|
|
11563
11656
|
|
|
11564
11657
|
// src/components/SlideoutPanel/SlideoutPanel.tsx
|
|
11565
11658
|
import { AnimatePresence as AnimatePresence9, motion as motion12 } from "framer-motion";
|
|
11566
|
-
import { useRef as
|
|
11659
|
+
import { useRef as useRef29 } from "react";
|
|
11567
11660
|
import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
|
|
11568
11661
|
import { createPortal as createPortal8 } from "react-dom";
|
|
11569
11662
|
import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
@@ -11589,8 +11682,8 @@ function SlideoutContent({
|
|
|
11589
11682
|
footer,
|
|
11590
11683
|
className
|
|
11591
11684
|
}) {
|
|
11592
|
-
const overlayRef =
|
|
11593
|
-
const panelRef =
|
|
11685
|
+
const overlayRef = useRef29(null);
|
|
11686
|
+
const panelRef = useRef29(null);
|
|
11594
11687
|
const { overlayProps } = useOverlay2(
|
|
11595
11688
|
{
|
|
11596
11689
|
isOpen: open,
|
|
@@ -11821,7 +11914,7 @@ function SocialButton({
|
|
|
11821
11914
|
import {
|
|
11822
11915
|
useCallback as useCallback17,
|
|
11823
11916
|
useEffect as useEffect17,
|
|
11824
|
-
useRef as
|
|
11917
|
+
useRef as useRef30,
|
|
11825
11918
|
useState as useState22
|
|
11826
11919
|
} from "react";
|
|
11827
11920
|
import { jsx as jsx74, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -11836,10 +11929,10 @@ function Sortable({
|
|
|
11836
11929
|
autoScrollEdge = 48,
|
|
11837
11930
|
className
|
|
11838
11931
|
}) {
|
|
11839
|
-
const containerRef =
|
|
11840
|
-
const itemRefs =
|
|
11841
|
-
const originalOrderRef =
|
|
11842
|
-
const scrollTimerRef =
|
|
11932
|
+
const containerRef = useRef30(null);
|
|
11933
|
+
const itemRefs = useRef30(/* @__PURE__ */ new Map());
|
|
11934
|
+
const originalOrderRef = useRef30(null);
|
|
11935
|
+
const scrollTimerRef = useRef30(null);
|
|
11843
11936
|
const [draggingId, setDraggingId] = useState22(null);
|
|
11844
11937
|
const [dropPos, setDropPos] = useState22(null);
|
|
11845
11938
|
const [kbActiveId, setKbActiveId] = useState22(null);
|
|
@@ -12232,7 +12325,7 @@ function Stat({
|
|
|
12232
12325
|
}
|
|
12233
12326
|
|
|
12234
12327
|
// src/components/Switch/Switch.tsx
|
|
12235
|
-
import { useRef as
|
|
12328
|
+
import { useRef as useRef31 } from "react";
|
|
12236
12329
|
import { useSwitch } from "react-aria";
|
|
12237
12330
|
import { jsx as jsx78, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12238
12331
|
function Switch({
|
|
@@ -12245,7 +12338,7 @@ function Switch({
|
|
|
12245
12338
|
className,
|
|
12246
12339
|
...props
|
|
12247
12340
|
}) {
|
|
12248
|
-
const ref =
|
|
12341
|
+
const ref = useRef31(null);
|
|
12249
12342
|
const state = $fd3c5e01e837dc20$export$8042c6c013fd5226({
|
|
12250
12343
|
isSelected: checked,
|
|
12251
12344
|
defaultSelected: defaultChecked,
|
|
@@ -12463,11 +12556,11 @@ function TableRow({
|
|
|
12463
12556
|
|
|
12464
12557
|
// src/components/Tabs/Tabs.tsx
|
|
12465
12558
|
import { motion as motion13 } from "framer-motion";
|
|
12466
|
-
import { useMemo as useMemo11, useRef as
|
|
12559
|
+
import { useMemo as useMemo11, useRef as useRef32, useState as useState24 } from "react";
|
|
12467
12560
|
import { useTab, useTabList, useTabPanel } from "react-aria";
|
|
12468
12561
|
import { jsx as jsx80, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12469
12562
|
function TabButton({ item, state }) {
|
|
12470
|
-
const ref =
|
|
12563
|
+
const ref = useRef32(null);
|
|
12471
12564
|
const { tabProps } = useTab({ key: item.key }, state, ref);
|
|
12472
12565
|
const isSelected = state.selectedKey === item.key;
|
|
12473
12566
|
const isDisabled = state.disabledKeys.has(item.key);
|
|
@@ -12497,7 +12590,7 @@ function TabButton({ item, state }) {
|
|
|
12497
12590
|
);
|
|
12498
12591
|
}
|
|
12499
12592
|
function TabPanelContent({ state, panelContent, ...props }) {
|
|
12500
|
-
const ref =
|
|
12593
|
+
const ref = useRef32(null);
|
|
12501
12594
|
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
12502
12595
|
return /* @__PURE__ */ jsx80("div", { ...tabPanelProps, ref, className: "ods-tabs__panel", children: panelContent });
|
|
12503
12596
|
}
|
|
@@ -12533,7 +12626,7 @@ function Tabs({
|
|
|
12533
12626
|
disabledKeys: items.filter((i) => i.disabled).map((i) => i.value)
|
|
12534
12627
|
};
|
|
12535
12628
|
const state = $caeb030f09a278a1$export$4ba071daf4e486(stateProps);
|
|
12536
|
-
const ref =
|
|
12629
|
+
const ref = useRef32(null);
|
|
12537
12630
|
const { tabListProps } = useTabList({ ...stateProps, orientation }, state, ref);
|
|
12538
12631
|
const currentPanelContent = panelContentMap.get(String(selectedKey));
|
|
12539
12632
|
return /* @__PURE__ */ jsxs77("div", { className: cn("ods-tabs", `ods-tabs--${orientation}`, className), children: [
|
|
@@ -12687,7 +12780,7 @@ function TestimonialCard({
|
|
|
12687
12780
|
}
|
|
12688
12781
|
|
|
12689
12782
|
// src/components/Textarea/Textarea.tsx
|
|
12690
|
-
import { useId as
|
|
12783
|
+
import { useId as useId5, useRef as useRef33, useState as useState26 } from "react";
|
|
12691
12784
|
import { useTextField as useTextField2 } from "react-aria";
|
|
12692
12785
|
import { jsx as jsx83, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
12693
12786
|
function Textarea({
|
|
@@ -12705,8 +12798,8 @@ function Textarea({
|
|
|
12705
12798
|
onChange,
|
|
12706
12799
|
...props
|
|
12707
12800
|
}) {
|
|
12708
|
-
const ref =
|
|
12709
|
-
const errorId =
|
|
12801
|
+
const ref = useRef33(null);
|
|
12802
|
+
const errorId = useId5();
|
|
12710
12803
|
const [charCount, setCharCount] = useState26(() => String(value ?? defaultValue ?? "").length);
|
|
12711
12804
|
const ariaNameProps = resolveAccessibleName({
|
|
12712
12805
|
label,
|
|
@@ -12807,7 +12900,7 @@ import {
|
|
|
12807
12900
|
Fragment as Fragment18,
|
|
12808
12901
|
useCallback as useCallback19,
|
|
12809
12902
|
useEffect as useEffect18,
|
|
12810
|
-
useRef as
|
|
12903
|
+
useRef as useRef34,
|
|
12811
12904
|
useState as useState27
|
|
12812
12905
|
} from "react";
|
|
12813
12906
|
import { Fragment as Fragment19, jsx as jsx85, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -12839,11 +12932,11 @@ function TimePicker({
|
|
|
12839
12932
|
}) {
|
|
12840
12933
|
const [open, setOpen] = useState27(false);
|
|
12841
12934
|
const [activeSeg, setActiveSeg] = useState27(null);
|
|
12842
|
-
const draftRef =
|
|
12843
|
-
const wrapRef =
|
|
12844
|
-
const hoursRef =
|
|
12845
|
-
const minutesRef =
|
|
12846
|
-
const secondsRef =
|
|
12935
|
+
const draftRef = useRef34("");
|
|
12936
|
+
const wrapRef = useRef34(null);
|
|
12937
|
+
const hoursRef = useRef34(null);
|
|
12938
|
+
const minutesRef = useRef34(null);
|
|
12939
|
+
const secondsRef = useRef34(null);
|
|
12847
12940
|
const refOf = (s) => s === "hours" ? hoursRef : s === "minutes" ? minutesRef : secondsRef;
|
|
12848
12941
|
useEffect18(() => {
|
|
12849
12942
|
if (!open) return;
|
|
@@ -13106,7 +13199,7 @@ function TimePicker({
|
|
|
13106
13199
|
}
|
|
13107
13200
|
|
|
13108
13201
|
// src/components/TimezonePicker/TimezonePicker.tsx
|
|
13109
|
-
import { useEffect as useEffect19, useMemo as useMemo12, useRef as
|
|
13202
|
+
import { useEffect as useEffect19, useMemo as useMemo12, useRef as useRef35, useState as useState28 } from "react";
|
|
13110
13203
|
import { Fragment as Fragment20, jsx as jsx86, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
13111
13204
|
var DEFAULT_TZS = [
|
|
13112
13205
|
{ iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
|
|
@@ -13136,8 +13229,8 @@ function TimezonePicker({
|
|
|
13136
13229
|
}) {
|
|
13137
13230
|
const [open, setOpen] = useState28(false);
|
|
13138
13231
|
const [query, setQuery] = useState28("");
|
|
13139
|
-
const wrapRef =
|
|
13140
|
-
const inputRef =
|
|
13232
|
+
const wrapRef = useRef35(null);
|
|
13233
|
+
const inputRef = useRef35(null);
|
|
13141
13234
|
const selected = options.find((o) => o.iana === value);
|
|
13142
13235
|
const filtered = useMemo12(() => {
|
|
13143
13236
|
if (!query.trim()) return options;
|
|
@@ -13315,7 +13408,7 @@ import {
|
|
|
13315
13408
|
useCallback as useCallback20,
|
|
13316
13409
|
useContext as useContext2,
|
|
13317
13410
|
useMemo as useMemo13,
|
|
13318
|
-
useRef as
|
|
13411
|
+
useRef as useRef36,
|
|
13319
13412
|
useState as useState29
|
|
13320
13413
|
} from "react";
|
|
13321
13414
|
import { createPortal as createPortal9 } from "react-dom";
|
|
@@ -13509,8 +13602,8 @@ function ToastProvider({
|
|
|
13509
13602
|
maxStack = 3
|
|
13510
13603
|
}) {
|
|
13511
13604
|
const [toasts, setToasts] = useState29([]);
|
|
13512
|
-
const timers =
|
|
13513
|
-
const idCounter2 =
|
|
13605
|
+
const timers = useRef36(/* @__PURE__ */ new Map());
|
|
13606
|
+
const idCounter2 = useRef36(0);
|
|
13514
13607
|
const dismiss = useCallback20((id) => {
|
|
13515
13608
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
13516
13609
|
const timer = timers.current.get(id);
|
|
@@ -13780,7 +13873,7 @@ import {
|
|
|
13780
13873
|
useCallback as useCallback21,
|
|
13781
13874
|
useEffect as useEffect20,
|
|
13782
13875
|
useLayoutEffect as useLayoutEffect4,
|
|
13783
|
-
useRef as
|
|
13876
|
+
useRef as useRef37,
|
|
13784
13877
|
useState as useState30
|
|
13785
13878
|
} from "react";
|
|
13786
13879
|
import { useTooltip, useTooltipTrigger } from "react-aria";
|
|
@@ -13815,7 +13908,7 @@ function TooltipContent({
|
|
|
13815
13908
|
offset
|
|
13816
13909
|
}) {
|
|
13817
13910
|
const { tooltipProps } = useTooltip({ isOpen: state.isOpen }, state);
|
|
13818
|
-
const tipRef =
|
|
13911
|
+
const tipRef = useRef37(null);
|
|
13819
13912
|
const [coords, setCoords] = useState30(null);
|
|
13820
13913
|
const reposition = useCallback21(() => {
|
|
13821
13914
|
if (!triggerRef.current || !tipRef.current) return;
|
|
@@ -13885,7 +13978,7 @@ function Tooltip({
|
|
|
13885
13978
|
children,
|
|
13886
13979
|
className
|
|
13887
13980
|
}) {
|
|
13888
|
-
const triggerRef =
|
|
13981
|
+
const triggerRef = useRef37(null);
|
|
13889
13982
|
const state = $3834487504f4fc00$export$4d40659c25ecb50b({ delay });
|
|
13890
13983
|
const { triggerProps } = useTooltipTrigger({ delay }, state, triggerRef);
|
|
13891
13984
|
return /* @__PURE__ */ jsxs88(Fragment22, { children: [
|