@luxfi/ui 7.4.10 → 7.4.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/accordion.cjs +107 -166
- package/dist/accordion.d.cts +18 -51
- package/dist/accordion.d.ts +18 -51
- package/dist/accordion.js +109 -166
- package/dist/chrome.cjs +193 -379
- package/dist/chrome.js +195 -379
- package/dist/collapsible.cjs +35 -26
- package/dist/collapsible.d.cts +2 -1
- package/dist/collapsible.d.ts +2 -1
- package/dist/collapsible.js +34 -24
- package/dist/dialog.d.cts +1 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/drawer.cjs +92 -115
- package/dist/drawer.d.cts +43 -10
- package/dist/drawer.d.ts +43 -10
- package/dist/drawer.js +94 -115
- package/dist/field.cjs +60 -109
- package/dist/field.d.cts +0 -1
- package/dist/field.d.ts +0 -1
- package/dist/field.js +61 -109
- package/dist/heading.cjs +10 -17
- package/dist/heading.d.cts +0 -2
- package/dist/heading.d.ts +0 -2
- package/dist/heading.js +10 -17
- package/dist/icon-button.cjs +82 -82
- package/dist/icon-button.d.cts +16 -12
- package/dist/icon-button.d.ts +16 -12
- package/dist/icon-button.js +82 -82
- package/dist/index.cjs +1073 -1419
- package/dist/index.d.cts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1075 -1414
- package/dist/input-group.cjs +11 -12
- package/dist/input-group.js +11 -12
- package/dist/input.cjs +27 -27
- package/dist/input.d.cts +21 -1
- package/dist/input.d.ts +21 -1
- package/dist/input.js +25 -28
- package/dist/menu.cjs +160 -271
- package/dist/menu.d.cts +41 -57
- package/dist/menu.d.ts +41 -57
- package/dist/menu.js +161 -251
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/select.cjs +40 -39
- package/dist/select.d.cts +35 -4
- package/dist/select.d.ts +35 -4
- package/dist/select.js +40 -38
- package/dist/separator.cjs +8 -33
- package/dist/separator.js +8 -33
- package/dist/tabs.cjs +108 -197
- package/dist/tabs.d.cts +16 -60
- package/dist/tabs.d.ts +16 -60
- package/dist/tabs.js +109 -196
- package/dist/textarea.cjs +56 -27
- package/dist/textarea.js +57 -28
- package/dist/toaster.cjs +97 -79
- package/dist/toaster.d.cts +7 -8
- package/dist/toaster.d.ts +7 -8
- package/dist/toaster.js +78 -80
- package/package.json +2 -16
- package/src/accordion.tsx +173 -227
- package/src/collapsible.tsx +55 -52
- package/src/drawer.tsx +123 -115
- package/src/field.tsx +68 -124
- package/src/heading.tsx +22 -26
- package/src/icon-button.tsx +134 -141
- package/src/ink.tsx +37 -0
- package/src/input-group.tsx +21 -12
- package/src/input.tsx +41 -32
- package/src/menu.tsx +224 -397
- package/src/popover.tsx +1 -1
- package/src/select.tsx +80 -59
- package/src/separator.tsx +13 -34
- package/src/tabs.tsx +166 -296
- package/src/textarea.tsx +19 -29
- package/src/toaster.tsx +118 -86
- package/tokens.css +61 -0
package/dist/index.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createGui, styled, View, Sheet, Avatar as Avatar$1, TooltipGroup, Tooltip as Tooltip$1, Checkbox,
|
|
2
|
+
import { createGui, styled, View, Sheet, Dialog, Avatar as Avatar$1, TooltipGroup, Tooltip as Tooltip$1, Checkbox, YStack, Label, Text, H3, H2, H1, Input as Input$1, Popover, Progress as Progress$1, RadioGroup, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Switch, TextArea, GuiProvider, XStack, Menu, Accordion, Collapsible, Tabs, useTabsContext, ToastProvider, ToastViewport, Toast } from '@hanzo/gui';
|
|
3
3
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as React32 from 'react';
|
|
5
|
+
import React32__default, { Children, createElement } from 'react';
|
|
6
6
|
import { defaultConfig } from '@hanzogui/config/v5';
|
|
7
7
|
import { animations } from '@hanzogui/config/v5-css';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { twMerge } from 'tailwind-merge';
|
|
11
|
-
import {
|
|
12
|
-
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
13
|
-
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
14
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
11
|
+
import { ChevronRight, ChevronsUpDown, Folder, LogOut, User, Settings, Menu as Menu$1, Building2, Check } from 'lucide-react';
|
|
15
12
|
import { useClickAway, useDebounce } from '@uidotdev/usehooks';
|
|
16
|
-
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
17
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
18
13
|
import { debounce, throttle } from 'es-toolkit';
|
|
19
|
-
import * as RadixSelect from '@radix-ui/react-select';
|
|
20
|
-
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
21
|
-
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
22
14
|
|
|
23
15
|
// src/provider.tsx
|
|
24
16
|
|
|
@@ -199,7 +191,7 @@ var defaultQueryClient = new QueryClient({
|
|
|
199
191
|
var FONT_BODY_RESET_ID = "lux-ui-font-body-reset";
|
|
200
192
|
var FONT_BODY_RESET_CSS = "body .font_body{line-height:1.5}";
|
|
201
193
|
var useFontBodyReset = () => {
|
|
202
|
-
|
|
194
|
+
React32__default.useInsertionEffect(() => {
|
|
203
195
|
if (typeof document === "undefined") return;
|
|
204
196
|
if (document.getElementById(FONT_BODY_RESET_ID)) return;
|
|
205
197
|
const style = document.createElement("style");
|
|
@@ -208,16 +200,16 @@ var useFontBodyReset = () => {
|
|
|
208
200
|
document.head.appendChild(style);
|
|
209
201
|
}, []);
|
|
210
202
|
};
|
|
211
|
-
var WhiteLabelContext =
|
|
212
|
-
var useWhiteLabel = () =>
|
|
203
|
+
var WhiteLabelContext = React32__default.createContext(resolveWhiteLabel(""));
|
|
204
|
+
var useWhiteLabel = () => React32__default.useContext(WhiteLabelContext);
|
|
213
205
|
var useHostWhiteLabel = (host) => {
|
|
214
|
-
const [resolvedHost, setResolvedHost] =
|
|
215
|
-
|
|
206
|
+
const [resolvedHost, setResolvedHost] = React32__default.useState(host ?? "");
|
|
207
|
+
React32__default.useEffect(() => {
|
|
216
208
|
if (host !== void 0) return;
|
|
217
209
|
const browserHost = currentHost();
|
|
218
210
|
if (browserHost) setResolvedHost(browserHost);
|
|
219
211
|
}, [host]);
|
|
220
|
-
return
|
|
212
|
+
return React32__default.useMemo(() => resolveWhiteLabel(resolvedHost), [resolvedHost]);
|
|
221
213
|
};
|
|
222
214
|
var AppProvider = ({
|
|
223
215
|
children,
|
|
@@ -236,8 +228,8 @@ function cn(...inputs) {
|
|
|
236
228
|
var NARROW_PX = 640;
|
|
237
229
|
var TOUCH_PX = 1024;
|
|
238
230
|
function useBelow(px) {
|
|
239
|
-
const [below, setBelow] =
|
|
240
|
-
|
|
231
|
+
const [below, setBelow] = React32.useState(false);
|
|
232
|
+
React32.useEffect(() => {
|
|
241
233
|
const mql = window.matchMedia(`(max-width: ${px - 1}px)`);
|
|
242
234
|
const apply = () => setBelow(mql.matches);
|
|
243
235
|
apply();
|
|
@@ -375,23 +367,23 @@ function writeScope(host, kind, value) {
|
|
|
375
367
|
} catch {
|
|
376
368
|
}
|
|
377
369
|
}
|
|
378
|
-
var IdentityContext =
|
|
370
|
+
var IdentityContext = React32.createContext(null);
|
|
379
371
|
var IdentityProvider = ({
|
|
380
372
|
children,
|
|
381
373
|
auth = defaultAuth,
|
|
382
374
|
loginPath = "/login"
|
|
383
375
|
}) => {
|
|
384
376
|
const whiteLabel = useWhiteLabel();
|
|
385
|
-
const base =
|
|
386
|
-
const [status, setStatus] =
|
|
387
|
-
const [account, setAccount] =
|
|
388
|
-
const [orgs, setOrgs] =
|
|
389
|
-
const [projects, setProjects] =
|
|
390
|
-
const [error, setError] =
|
|
391
|
-
const [orgName, setOrgName] =
|
|
392
|
-
const [projectName, setProjectName] =
|
|
393
|
-
const [epoch, setEpoch] =
|
|
394
|
-
|
|
377
|
+
const base = React32.useMemo(() => iamBase(whiteLabel), [whiteLabel]);
|
|
378
|
+
const [status, setStatus] = React32.useState("loading");
|
|
379
|
+
const [account, setAccount] = React32.useState(null);
|
|
380
|
+
const [orgs, setOrgs] = React32.useState([]);
|
|
381
|
+
const [projects, setProjects] = React32.useState([]);
|
|
382
|
+
const [error, setError] = React32.useState(null);
|
|
383
|
+
const [orgName, setOrgName] = React32.useState(null);
|
|
384
|
+
const [projectName, setProjectName] = React32.useState(null);
|
|
385
|
+
const [epoch, setEpoch] = React32.useState(0);
|
|
386
|
+
React32.useEffect(() => {
|
|
395
387
|
const ac = new AbortController();
|
|
396
388
|
let live = true;
|
|
397
389
|
void (async () => {
|
|
@@ -439,12 +431,12 @@ var IdentityProvider = ({
|
|
|
439
431
|
ac.abort();
|
|
440
432
|
};
|
|
441
433
|
}, [base, auth, epoch]);
|
|
442
|
-
const org =
|
|
434
|
+
const org = React32.useMemo(() => {
|
|
443
435
|
if (orgs.length === 0) return null;
|
|
444
436
|
const saved = orgName ?? readScope(whiteLabel.host, "org");
|
|
445
437
|
return orgs.find((o) => o.name === saved) ?? orgs.find((o) => o.name === account?.owner) ?? orgs[0];
|
|
446
438
|
}, [orgs, orgName, account, whiteLabel.host]);
|
|
447
|
-
|
|
439
|
+
React32.useEffect(() => {
|
|
448
440
|
if (!org) {
|
|
449
441
|
setProjects([]);
|
|
450
442
|
return;
|
|
@@ -462,12 +454,12 @@ var IdentityProvider = ({
|
|
|
462
454
|
ac.abort();
|
|
463
455
|
};
|
|
464
456
|
}, [base, auth, org, epoch]);
|
|
465
|
-
const project =
|
|
457
|
+
const project = React32.useMemo(() => {
|
|
466
458
|
if (projects.length === 0) return null;
|
|
467
459
|
const saved = projectName ?? readScope(whiteLabel.host, "project");
|
|
468
460
|
return projects.find((p) => p.name === saved) ?? projects.find((p) => p.isDefault) ?? projects[0];
|
|
469
461
|
}, [projects, projectName, whiteLabel.host]);
|
|
470
|
-
const value =
|
|
462
|
+
const value = React32.useMemo(() => ({
|
|
471
463
|
status,
|
|
472
464
|
account,
|
|
473
465
|
orgs,
|
|
@@ -499,9 +491,9 @@ var IdentityProvider = ({
|
|
|
499
491
|
return /* @__PURE__ */ jsx(IdentityContext.Provider, { value, children });
|
|
500
492
|
};
|
|
501
493
|
function useIdentity() {
|
|
502
|
-
const ctx =
|
|
494
|
+
const ctx = React32.useContext(IdentityContext);
|
|
503
495
|
const whiteLabel = useWhiteLabel();
|
|
504
|
-
const fallback =
|
|
496
|
+
const fallback = React32.useMemo(() => ({
|
|
505
497
|
status: "anonymous",
|
|
506
498
|
account: null,
|
|
507
499
|
orgs: [],
|
|
@@ -555,7 +547,7 @@ var CLOSE_BUTTON_CLASSES = [
|
|
|
555
547
|
"hover:text-[var(--hover-color,currentColor)]",
|
|
556
548
|
"disabled:opacity-40"
|
|
557
549
|
].join(" ");
|
|
558
|
-
var CloseButton =
|
|
550
|
+
var CloseButton = React32.forwardRef(function CloseButton2(props, ref) {
|
|
559
551
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
560
552
|
return /* @__PURE__ */ jsx(
|
|
561
553
|
CloseButtonFrame,
|
|
@@ -582,13 +574,22 @@ var CloseButton = React33.forwardRef(function CloseButton2(props, ref) {
|
|
|
582
574
|
}
|
|
583
575
|
);
|
|
584
576
|
});
|
|
585
|
-
var
|
|
586
|
-
|
|
587
|
-
|
|
577
|
+
var ink = (children, Wrap = Text, props = {}) => {
|
|
578
|
+
let hasText = false;
|
|
579
|
+
Children.forEach(children, (child) => {
|
|
580
|
+
if (typeof child === "string" || typeof child === "number") hasText = true;
|
|
581
|
+
});
|
|
582
|
+
if (!hasText) return children;
|
|
583
|
+
return Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? createElement(Wrap, props, child) : child);
|
|
584
|
+
};
|
|
585
|
+
var DrawerPlacementContext = React32.createContext("right");
|
|
586
|
+
var DrawerSizeContext = React32.createContext("md");
|
|
587
|
+
var DrawerStateContext = React32.createContext({
|
|
588
588
|
open: false,
|
|
589
589
|
setOpen: () => {
|
|
590
590
|
},
|
|
591
|
-
modal: true
|
|
591
|
+
modal: true,
|
|
592
|
+
narrow: false
|
|
592
593
|
});
|
|
593
594
|
var DrawerRoot = (props) => {
|
|
594
595
|
const {
|
|
@@ -600,63 +601,43 @@ var DrawerRoot = (props) => {
|
|
|
600
601
|
modal = true,
|
|
601
602
|
size = "md"
|
|
602
603
|
} = props;
|
|
603
|
-
const [uncontrolled, setUncontrolled] =
|
|
604
|
+
const [uncontrolled, setUncontrolled] = React32.useState(defaultOpen ?? false);
|
|
604
605
|
const isControlled = open !== void 0;
|
|
605
606
|
const isOpen = isControlled ? open : uncontrolled;
|
|
606
|
-
const
|
|
607
|
+
const narrow = useIsNarrow();
|
|
608
|
+
const setOpen = React32.useCallback((nextOpen) => {
|
|
607
609
|
if (!isControlled) setUncontrolled(nextOpen);
|
|
608
610
|
onOpenChange?.({ open: nextOpen });
|
|
609
611
|
}, [isControlled, onOpenChange]);
|
|
610
|
-
const state =
|
|
611
|
-
() => ({ open: isOpen, setOpen, modal }),
|
|
612
|
-
[isOpen, setOpen, modal]
|
|
612
|
+
const state = React32.useMemo(
|
|
613
|
+
() => ({ open: isOpen, setOpen, modal, narrow }),
|
|
614
|
+
[isOpen, setOpen, modal, narrow]
|
|
613
615
|
);
|
|
614
|
-
return /* @__PURE__ */ jsx(DrawerPlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx(DrawerSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(DrawerStateContext.Provider, { value: state, children: /* @__PURE__ */ jsx(
|
|
615
|
-
RadixDialog.Root,
|
|
616
|
-
{
|
|
617
|
-
open: isOpen,
|
|
618
|
-
onOpenChange: setOpen,
|
|
619
|
-
modal,
|
|
620
|
-
children
|
|
621
|
-
}
|
|
622
|
-
) }) }) });
|
|
616
|
+
return /* @__PURE__ */ jsx(DrawerPlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx(DrawerSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(DrawerStateContext.Provider, { value: state, children: narrow ? children : /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: setOpen, modal, children }) }) }) });
|
|
623
617
|
};
|
|
624
|
-
var
|
|
625
|
-
right:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
].join(" "),
|
|
630
|
-
left: [
|
|
631
|
-
"inset-y-0 left-0",
|
|
632
|
-
"data-[state=open]:animate-in data-[state=open]:slide-in-from-left",
|
|
633
|
-
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left"
|
|
634
|
-
].join(" "),
|
|
635
|
-
top: [
|
|
636
|
-
"inset-x-0 top-0",
|
|
637
|
-
"data-[state=open]:animate-in data-[state=open]:slide-in-from-top",
|
|
638
|
-
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top"
|
|
639
|
-
].join(" "),
|
|
640
|
-
bottom: [
|
|
641
|
-
"inset-x-0 bottom-0",
|
|
642
|
-
"data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom",
|
|
643
|
-
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom"
|
|
644
|
-
].join(" ")
|
|
618
|
+
var ANCHOR = {
|
|
619
|
+
right: { top: 0, bottom: 0, right: 0, enterStyle: { x: 24, opacity: 0 }, exitStyle: { x: 24, opacity: 0 } },
|
|
620
|
+
left: { top: 0, bottom: 0, left: 0, enterStyle: { x: -24, opacity: 0 }, exitStyle: { x: -24, opacity: 0 } },
|
|
621
|
+
top: { left: 0, right: 0, top: 0, enterStyle: { y: -24, opacity: 0 }, exitStyle: { y: -24, opacity: 0 } },
|
|
622
|
+
bottom: { left: 0, right: 0, bottom: 0, enterStyle: { y: 24, opacity: 0 }, exitStyle: { y: 24, opacity: 0 } }
|
|
645
623
|
};
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
624
|
+
var ACROSS = {
|
|
625
|
+
xs: 240,
|
|
626
|
+
sm: 320,
|
|
627
|
+
md: 384,
|
|
628
|
+
lg: 480,
|
|
629
|
+
xl: 640,
|
|
630
|
+
full: "100%"
|
|
651
631
|
};
|
|
652
|
-
var
|
|
632
|
+
var extent = (placement, size) => placement === "left" || placement === "right" ? { width: ACROSS[size], maxWidth: "100%" } : { height: ACROSS[size], maxHeight: "100%" };
|
|
633
|
+
var SCRIM = "rgba(0,0,0,0.5)";
|
|
634
|
+
var DrawerContent = React32.forwardRef(
|
|
653
635
|
function DrawerContent2(props, ref) {
|
|
654
|
-
const { children, portalled = true, portalRef, offset: _offset, backdrop = true,
|
|
655
|
-
const placement =
|
|
656
|
-
const size =
|
|
657
|
-
const { open, setOpen, modal } =
|
|
658
|
-
|
|
659
|
-
if (isNarrow) {
|
|
636
|
+
const { children, portalled = true, portalRef: _portalRef, offset: _offset, backdrop = true, ...rest } = props;
|
|
637
|
+
const placement = React32.useContext(DrawerPlacementContext);
|
|
638
|
+
const size = React32.useContext(DrawerSizeContext);
|
|
639
|
+
const { open, setOpen, modal, narrow } = React32.useContext(DrawerStateContext);
|
|
640
|
+
if (narrow) {
|
|
660
641
|
return /* @__PURE__ */ jsxs(
|
|
661
642
|
Sheet,
|
|
662
643
|
{
|
|
@@ -674,7 +655,7 @@ var DrawerContent = React33.forwardRef(
|
|
|
674
655
|
transition: "lazy",
|
|
675
656
|
enterStyle: { opacity: 0 },
|
|
676
657
|
exitStyle: { opacity: 0 },
|
|
677
|
-
|
|
658
|
+
backgroundColor: SCRIM
|
|
678
659
|
}
|
|
679
660
|
),
|
|
680
661
|
/* @__PURE__ */ jsx(Sheet.Handle, {}),
|
|
@@ -682,10 +663,11 @@ var DrawerContent = React33.forwardRef(
|
|
|
682
663
|
Sheet.Frame,
|
|
683
664
|
{
|
|
684
665
|
unstyled: true,
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
),
|
|
666
|
+
flexDirection: "column",
|
|
667
|
+
borderTopLeftRadius: 16,
|
|
668
|
+
borderTopRightRadius: 16,
|
|
669
|
+
backgroundColor: "var(--color-drawer-bg)",
|
|
670
|
+
shadowColor: "var(--shadow-drawer)",
|
|
689
671
|
...rest,
|
|
690
672
|
children
|
|
691
673
|
}
|
|
@@ -696,324 +678,223 @@ var DrawerContent = React33.forwardRef(
|
|
|
696
678
|
}
|
|
697
679
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
698
680
|
backdrop && /* @__PURE__ */ jsx(
|
|
699
|
-
|
|
681
|
+
Dialog.Overlay,
|
|
700
682
|
{
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
683
|
+
position: "fixed",
|
|
684
|
+
top: 0,
|
|
685
|
+
right: 0,
|
|
686
|
+
bottom: 0,
|
|
687
|
+
left: 0,
|
|
688
|
+
zIndex: 50,
|
|
689
|
+
backgroundColor: SCRIM,
|
|
690
|
+
transition: "lazy",
|
|
691
|
+
enterStyle: { opacity: 0 },
|
|
692
|
+
exitStyle: { opacity: 0 }
|
|
693
|
+
},
|
|
694
|
+
"overlay"
|
|
707
695
|
),
|
|
708
696
|
/* @__PURE__ */ jsx(
|
|
709
|
-
|
|
697
|
+
Dialog.Content,
|
|
710
698
|
{
|
|
711
699
|
ref,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
700
|
+
unstyled: true,
|
|
701
|
+
position: "fixed",
|
|
702
|
+
zIndex: 50,
|
|
703
|
+
flexDirection: "column",
|
|
704
|
+
backgroundColor: "var(--color-drawer-bg)",
|
|
705
|
+
transition: "medium",
|
|
706
|
+
...ANCHOR[placement],
|
|
707
|
+
...extent(placement, size),
|
|
718
708
|
...rest,
|
|
719
709
|
children
|
|
720
|
-
}
|
|
710
|
+
},
|
|
711
|
+
"content"
|
|
721
712
|
)
|
|
722
713
|
] });
|
|
723
|
-
|
|
724
|
-
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: portalRef?.current ?? void 0, children: content });
|
|
725
|
-
}
|
|
726
|
-
return content;
|
|
714
|
+
return portalled ? /* @__PURE__ */ jsx(Dialog.Portal, { children: content }) : content;
|
|
727
715
|
}
|
|
728
716
|
);
|
|
729
|
-
var DrawerCloseTrigger =
|
|
730
|
-
return
|
|
731
|
-
CloseButton
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
...props
|
|
736
|
-
}
|
|
737
|
-
) });
|
|
717
|
+
var DrawerCloseTrigger = React32.forwardRef(function DrawerCloseTrigger2(props, ref) {
|
|
718
|
+
return (
|
|
719
|
+
// Placement belongs to the surrounding box, not to the button: CloseButton
|
|
720
|
+
// is a fixed 20px control and has no opinion about where it sits.
|
|
721
|
+
/* @__PURE__ */ jsx(View, { position: "absolute", top: 28, right: 20, zIndex: 1, children: /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { ref, ...props }) }) })
|
|
722
|
+
);
|
|
738
723
|
});
|
|
739
|
-
var DrawerTrigger = (
|
|
740
|
-
const {
|
|
741
|
-
|
|
742
|
-
};
|
|
743
|
-
var DrawerHeader = React33.forwardRef(
|
|
744
|
-
function DrawerHeader2({ className, ...props }, ref) {
|
|
745
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-6 pb-0", className), ...props });
|
|
746
|
-
}
|
|
747
|
-
);
|
|
748
|
-
var DrawerBody = React33.forwardRef(
|
|
749
|
-
function DrawerBody2({ className, ...props }, ref) {
|
|
750
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 overflow-auto p-6", className), ...props });
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
var DrawerFooter = React33.forwardRef(
|
|
754
|
-
function DrawerFooter2({ className, ...props }, ref) {
|
|
755
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center justify-end gap-2 p-6 pt-0", className), ...props });
|
|
756
|
-
}
|
|
757
|
-
);
|
|
758
|
-
var DrawerTitle = RadixDialog.Title;
|
|
759
|
-
var DrawerDescription = RadixDialog.Description;
|
|
760
|
-
var DrawerActionTrigger = RadixDialog.Close;
|
|
761
|
-
function parsePlacement(placement) {
|
|
762
|
-
if (!placement) {
|
|
763
|
-
return { side: "bottom", align: "start" };
|
|
764
|
-
}
|
|
765
|
-
const parts = placement.split("-");
|
|
766
|
-
const side = parts[0] ?? "bottom";
|
|
767
|
-
const alignPart = parts[1];
|
|
768
|
-
let align = "center";
|
|
769
|
-
if (alignPart === "start") {
|
|
770
|
-
align = "start";
|
|
771
|
-
} else if (alignPart === "end") {
|
|
772
|
-
align = "end";
|
|
724
|
+
var DrawerTrigger = ({ asChild = true, children, ...rest }) => {
|
|
725
|
+
const { setOpen, narrow } = React32.useContext(DrawerStateContext);
|
|
726
|
+
if (narrow) {
|
|
727
|
+
return React32.isValidElement(children) ? React32.cloneElement(children, { onClick: () => setOpen(true) }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
773
728
|
}
|
|
774
|
-
return {
|
|
775
|
-
}
|
|
776
|
-
var
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
var
|
|
783
|
-
|
|
784
|
-
|
|
729
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, { asChild, ...rest, children });
|
|
730
|
+
};
|
|
731
|
+
var DrawerHeader = ({ children, ...props }) => /* @__PURE__ */ jsx(YStack, { gap: 6, padding: 24, paddingBottom: 0, ...props, children: ink(children) });
|
|
732
|
+
var DrawerBody = ({ children, ...props }) => /* @__PURE__ */ jsx(YStack, { flex: 1, overflow: "scroll", padding: 24, ...props, children: ink(children) });
|
|
733
|
+
var DrawerFooter = ({ children, ...props }) => /* @__PURE__ */ jsx(XStack, { alignItems: "center", justifyContent: "flex-end", gap: 8, padding: 24, paddingTop: 0, ...props, children: ink(children) });
|
|
734
|
+
var DrawerTitle = Dialog.Title;
|
|
735
|
+
var DrawerDescription = Dialog.Description;
|
|
736
|
+
var DrawerActionTrigger = Dialog.Close;
|
|
737
|
+
var ITEM_HOVER = "var(--color-popover-item-hover)";
|
|
738
|
+
var TEXT = "var(--color-text-primary)";
|
|
739
|
+
var ROW = {
|
|
740
|
+
position: "relative",
|
|
741
|
+
flexDirection: "row",
|
|
742
|
+
alignItems: "center",
|
|
743
|
+
cursor: "pointer",
|
|
744
|
+
userSelect: "none",
|
|
745
|
+
borderRadius: 6,
|
|
746
|
+
fontSize: 14,
|
|
747
|
+
backgroundColor: "transparent",
|
|
748
|
+
hoverStyle: { backgroundColor: ITEM_HOVER },
|
|
749
|
+
focusStyle: { backgroundColor: ITEM_HOVER }
|
|
750
|
+
};
|
|
751
|
+
var MenuRoot = ({
|
|
752
|
+
children,
|
|
753
|
+
open,
|
|
754
|
+
defaultOpen,
|
|
755
|
+
onOpenChange,
|
|
756
|
+
positioning,
|
|
757
|
+
modal = true
|
|
758
|
+
}) => /* @__PURE__ */ jsx(
|
|
759
|
+
Menu,
|
|
760
|
+
{
|
|
785
761
|
open,
|
|
786
762
|
defaultOpen,
|
|
787
|
-
onOpenChange,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
793
|
-
lazyMount: _lazyMount,
|
|
794
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
795
|
-
unmountOnExit: _unmountOnExit
|
|
796
|
-
} = props;
|
|
797
|
-
const mergedPositioning = {
|
|
798
|
-
placement: "bottom-start",
|
|
799
|
-
...positioning,
|
|
800
|
-
offset: {
|
|
801
|
-
mainAxis: 4,
|
|
802
|
-
...positioning?.offset
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
const { side, align } = parsePlacement(mergedPositioning.placement);
|
|
806
|
-
const positioningValue = React33.useMemo(() => ({
|
|
807
|
-
side,
|
|
808
|
-
align,
|
|
809
|
-
sideOffset: mergedPositioning.offset?.mainAxis ?? 4,
|
|
810
|
-
alignOffset: mergedPositioning.offset?.crossAxis ?? 0
|
|
811
|
-
}), [side, align, mergedPositioning.offset?.mainAxis, mergedPositioning.offset?.crossAxis]);
|
|
812
|
-
const handleOpenChange = React33.useCallback((isOpen) => {
|
|
813
|
-
onOpenChange?.({ open: isOpen });
|
|
814
|
-
}, [onOpenChange]);
|
|
815
|
-
return /* @__PURE__ */ jsx(PositioningContext.Provider, { value: positioningValue, children: /* @__PURE__ */ jsx(
|
|
816
|
-
DropdownMenu.Root,
|
|
817
|
-
{
|
|
818
|
-
open,
|
|
819
|
-
defaultOpen,
|
|
820
|
-
onOpenChange: handleOpenChange,
|
|
821
|
-
modal,
|
|
822
|
-
children
|
|
823
|
-
}
|
|
824
|
-
) });
|
|
825
|
-
};
|
|
826
|
-
var MenuTrigger = React33.forwardRef(function MenuTrigger2(props, ref) {
|
|
827
|
-
const { asChild = false, ...rest } = props;
|
|
828
|
-
return /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild, ref, ...rest });
|
|
829
|
-
});
|
|
830
|
-
var MenuContent = React33.forwardRef(function MenuContent2(props, ref) {
|
|
831
|
-
const { portalled = true, portalRef, className, zIndex, minW, style, ...rest } = props;
|
|
832
|
-
const positioning = React33.useContext(PositioningContext);
|
|
833
|
-
const mergedStyle = {
|
|
834
|
-
...style,
|
|
835
|
-
...zIndex !== void 0 ? { zIndex: typeof zIndex === "string" ? `var(--z-index-${zIndex}, ${zIndex})` : zIndex } : {},
|
|
836
|
-
...minW !== void 0 ? { minWidth: minW } : {}
|
|
837
|
-
};
|
|
838
|
-
const content = /* @__PURE__ */ jsx(
|
|
839
|
-
DropdownMenu.Content,
|
|
840
|
-
{
|
|
841
|
-
ref,
|
|
842
|
-
side: positioning.side,
|
|
843
|
-
align: positioning.align,
|
|
844
|
-
sideOffset: positioning.sideOffset,
|
|
845
|
-
alignOffset: positioning.alignOffset,
|
|
846
|
-
className: cn(
|
|
847
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-lg p-1",
|
|
848
|
-
"border border-[var(--color-popover-border,var(--color-border-divider))]",
|
|
849
|
-
"bg-[var(--color-popover-bg,var(--color-dialog-bg))]",
|
|
850
|
-
"shadow-[0_4px_12px_var(--color-popover-shadow)]",
|
|
851
|
-
"outline-none",
|
|
852
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
853
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
854
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
855
|
-
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
856
|
-
className
|
|
857
|
-
),
|
|
858
|
-
style: Object.keys(mergedStyle).length > 0 ? mergedStyle : void 0,
|
|
859
|
-
...rest
|
|
860
|
-
}
|
|
861
|
-
);
|
|
862
|
-
if (!portalled) {
|
|
863
|
-
return content;
|
|
763
|
+
onOpenChange: onOpenChange ? (isOpen) => onOpenChange({ open: isOpen }) : void 0,
|
|
764
|
+
modal,
|
|
765
|
+
placement: positioning?.placement ?? "bottom-start",
|
|
766
|
+
offset: positioning?.offset?.mainAxis ?? 4,
|
|
767
|
+
children
|
|
864
768
|
}
|
|
865
|
-
|
|
866
|
-
});
|
|
867
|
-
var
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
769
|
+
);
|
|
770
|
+
var MenuTrigger = ({ asChild = false, ...rest }) => /* @__PURE__ */ jsx(Menu.Trigger, { asChild, ...rest });
|
|
771
|
+
var MenuContent = ({
|
|
772
|
+
portalled = true,
|
|
773
|
+
minW,
|
|
774
|
+
children,
|
|
775
|
+
...rest
|
|
776
|
+
}) => {
|
|
777
|
+
const content = /* @__PURE__ */ jsx(
|
|
778
|
+
Menu.Content,
|
|
871
779
|
{
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
780
|
+
unstyled: true,
|
|
781
|
+
zIndex: 50,
|
|
782
|
+
minWidth: minW ?? 128,
|
|
783
|
+
overflow: "hidden",
|
|
784
|
+
borderRadius: 8,
|
|
785
|
+
padding: 4,
|
|
786
|
+
borderWidth: 1,
|
|
787
|
+
borderColor: "var(--color-popover-border)",
|
|
788
|
+
backgroundColor: "var(--color-popover-bg)",
|
|
789
|
+
transition: "quick",
|
|
790
|
+
enterStyle: { opacity: 0, scale: 0.95 },
|
|
791
|
+
exitStyle: { opacity: 0, scale: 0.95 },
|
|
884
792
|
...rest,
|
|
885
793
|
children
|
|
886
794
|
}
|
|
887
795
|
);
|
|
888
|
-
});
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
ref,
|
|
899
|
-
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
900
|
-
...rest
|
|
901
|
-
}
|
|
902
|
-
);
|
|
903
|
-
});
|
|
904
|
-
var MenuSeparator = React33.forwardRef(function MenuSeparator2(props, ref) {
|
|
905
|
-
const { className, ...rest } = props;
|
|
906
|
-
return /* @__PURE__ */ jsx(
|
|
907
|
-
DropdownMenu.Separator,
|
|
908
|
-
{
|
|
909
|
-
ref,
|
|
910
|
-
className: cn("-mx-1 my-1 h-px bg-[var(--color-border-divider)]", className),
|
|
911
|
-
...rest
|
|
912
|
-
}
|
|
913
|
-
);
|
|
914
|
-
});
|
|
915
|
-
var MenuItemGroup = React33.forwardRef(function MenuItemGroup2(props, ref) {
|
|
916
|
-
const { title, children, className, ...rest } = props;
|
|
917
|
-
return /* @__PURE__ */ jsxs(DropdownMenu.Group, { ref, className, ...rest, children: [
|
|
918
|
-
title && /* @__PURE__ */ jsx(DropdownMenu.Label, { className: "px-2 py-1.5 text-xs font-semibold select-none opacity-60", children: title }),
|
|
919
|
-
children
|
|
920
|
-
] });
|
|
921
|
-
});
|
|
922
|
-
var MenuArrow = React33.forwardRef(function MenuArrow2(props, ref) {
|
|
923
|
-
const { className, ...rest } = props;
|
|
924
|
-
return /* @__PURE__ */ jsx(
|
|
925
|
-
DropdownMenu.Arrow,
|
|
926
|
-
{
|
|
927
|
-
ref,
|
|
928
|
-
className: cn("fill-[var(--color-popover-bg,var(--color-dialog-bg))]", className),
|
|
929
|
-
...rest
|
|
930
|
-
}
|
|
931
|
-
);
|
|
932
|
-
});
|
|
933
|
-
var MenuCheckboxItem = React33.forwardRef(function MenuCheckboxItem2(props, ref) {
|
|
934
|
-
const { className, children, checked, onCheckedChange, onClick, ...rest } = props;
|
|
935
|
-
return /* @__PURE__ */ jsxs(
|
|
936
|
-
DropdownMenu.CheckboxItem,
|
|
796
|
+
return portalled ? /* @__PURE__ */ jsx(Menu.Portal, { children: content }) : content;
|
|
797
|
+
};
|
|
798
|
+
var MenuItem = ({ children, value: _value, asChild, ...rest }) => (
|
|
799
|
+
// `asChild` means the caller brought its own element and owns the look. Its
|
|
800
|
+
// props are then forwarded to that element verbatim, so the skin must NOT be
|
|
801
|
+
// applied: `unstyled` and friends are not DOM attributes and React rejects
|
|
802
|
+
// them out loud ("Received `true` for a non-boolean attribute `unstyled`").
|
|
803
|
+
// Two shapes, said once, rather than one shape that is wrong in one of them.
|
|
804
|
+
asChild ? /* @__PURE__ */ jsx(Menu.Item, { asChild: true, ...rest, children }) : /* @__PURE__ */ jsx(
|
|
805
|
+
Menu.Item,
|
|
937
806
|
{
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
"outline-none transition-colors",
|
|
945
|
-
"data-[highlighted]:bg-[var(--color-popover-item-hover,rgba(0,0,0,0.04))]",
|
|
946
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
947
|
-
className
|
|
948
|
-
),
|
|
807
|
+
unstyled: true,
|
|
808
|
+
...ROW,
|
|
809
|
+
gap: 8,
|
|
810
|
+
paddingHorizontal: 8,
|
|
811
|
+
paddingVertical: 6,
|
|
812
|
+
disabledStyle: { opacity: 0.5, pointerEvents: "none" },
|
|
949
813
|
...rest,
|
|
950
|
-
children:
|
|
951
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
952
|
-
children
|
|
953
|
-
]
|
|
954
|
-
}
|
|
955
|
-
);
|
|
956
|
-
});
|
|
957
|
-
var MenuRadioItemGroup = React33.forwardRef(function MenuRadioItemGroup2(props, ref) {
|
|
958
|
-
const { value, onValueChange, ...rest } = props;
|
|
959
|
-
return /* @__PURE__ */ jsx(
|
|
960
|
-
DropdownMenu.RadioGroup,
|
|
961
|
-
{
|
|
962
|
-
ref,
|
|
963
|
-
value,
|
|
964
|
-
onValueChange,
|
|
965
|
-
...rest
|
|
966
|
-
}
|
|
967
|
-
);
|
|
968
|
-
});
|
|
969
|
-
var MenuRadioItem = React33.forwardRef(function MenuRadioItem2(props, ref) {
|
|
970
|
-
const { className, children, value, onClick, ...rest } = props;
|
|
971
|
-
const { value: _v, ...radixRest } = rest;
|
|
972
|
-
return /* @__PURE__ */ jsxs(
|
|
973
|
-
DropdownMenu.RadioItem,
|
|
974
|
-
{
|
|
975
|
-
ref,
|
|
976
|
-
value,
|
|
977
|
-
onClick,
|
|
978
|
-
className: cn(
|
|
979
|
-
"relative flex cursor-pointer select-none items-center rounded-md py-1.5 pr-2 pl-8 text-sm",
|
|
980
|
-
"outline-none transition-colors",
|
|
981
|
-
"data-[highlighted]:bg-[var(--color-popover-item-hover,rgba(0,0,0,0.04))]",
|
|
982
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
983
|
-
className
|
|
984
|
-
),
|
|
985
|
-
children: [
|
|
986
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
987
|
-
/* @__PURE__ */ jsx("span", { children })
|
|
988
|
-
]
|
|
814
|
+
children: ink(children, void 0, { fontSize: 14, color: TEXT })
|
|
989
815
|
}
|
|
990
|
-
)
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
816
|
+
)
|
|
817
|
+
);
|
|
818
|
+
var MenuItemText = (props) => /* @__PURE__ */ jsx(Text, { flex: 1, fontSize: 14, color: TEXT, ...props });
|
|
819
|
+
var MenuSeparator = (props) => /* @__PURE__ */ jsx(
|
|
820
|
+
Menu.Separator,
|
|
821
|
+
{
|
|
822
|
+
unstyled: true,
|
|
823
|
+
height: 1,
|
|
824
|
+
marginVertical: 4,
|
|
825
|
+
marginHorizontal: -4,
|
|
826
|
+
backgroundColor: "var(--color-border-divider)",
|
|
827
|
+
...props
|
|
828
|
+
}
|
|
829
|
+
);
|
|
830
|
+
var MenuItemGroup = ({ title, children, ...rest }) => /* @__PURE__ */ jsxs(Menu.Group, { unstyled: true, ...rest, children: [
|
|
831
|
+
title && /* @__PURE__ */ jsx(
|
|
832
|
+
Menu.Label,
|
|
1000
833
|
{
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
children:
|
|
1010
|
-
startIcon,
|
|
1011
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1", children }),
|
|
1012
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
1013
|
-
]
|
|
834
|
+
unstyled: true,
|
|
835
|
+
paddingHorizontal: 8,
|
|
836
|
+
paddingVertical: 6,
|
|
837
|
+
fontSize: 12,
|
|
838
|
+
fontWeight: "600",
|
|
839
|
+
userSelect: "none",
|
|
840
|
+
opacity: 0.6,
|
|
841
|
+
color: TEXT,
|
|
842
|
+
children: title
|
|
1014
843
|
}
|
|
1015
|
-
)
|
|
1016
|
-
|
|
844
|
+
),
|
|
845
|
+
children
|
|
846
|
+
] });
|
|
847
|
+
var MenuArrow = (props) => /* @__PURE__ */ jsx(Menu.Arrow, { backgroundColor: "var(--color-popover-bg)", ...props });
|
|
848
|
+
var Indicator = () => /* @__PURE__ */ jsx(View, { position: "absolute", left: 8, width: 14, height: 14, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx(Menu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { size: 16 }) }) });
|
|
849
|
+
var MenuCheckboxItem = ({ children, ...rest }) => /* @__PURE__ */ jsxs(
|
|
850
|
+
Menu.CheckboxItem,
|
|
851
|
+
{
|
|
852
|
+
unstyled: true,
|
|
853
|
+
...ROW,
|
|
854
|
+
paddingLeft: 32,
|
|
855
|
+
paddingRight: 8,
|
|
856
|
+
paddingVertical: 6,
|
|
857
|
+
disabledStyle: { opacity: 0.5, pointerEvents: "none" },
|
|
858
|
+
...rest,
|
|
859
|
+
children: [
|
|
860
|
+
/* @__PURE__ */ jsx(Indicator, {}),
|
|
861
|
+
ink(children, void 0, { fontSize: 14, color: TEXT })
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
var MenuRadioItemGroup = (props) => /* @__PURE__ */ jsx(Menu.RadioGroup, { ...props });
|
|
866
|
+
var MenuRadioItem = ({ children, ...rest }) => /* @__PURE__ */ jsxs(
|
|
867
|
+
Menu.RadioItem,
|
|
868
|
+
{
|
|
869
|
+
unstyled: true,
|
|
870
|
+
...ROW,
|
|
871
|
+
paddingLeft: 32,
|
|
872
|
+
paddingRight: 8,
|
|
873
|
+
paddingVertical: 6,
|
|
874
|
+
disabledStyle: { opacity: 0.5, pointerEvents: "none" },
|
|
875
|
+
...rest,
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ jsx(Indicator, {}),
|
|
878
|
+
ink(children, void 0, { fontSize: 14, color: TEXT })
|
|
879
|
+
]
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
var MenuTriggerItem = ({ startIcon, children, ...rest }) => /* @__PURE__ */ jsx(Menu.Sub, { children: /* @__PURE__ */ jsxs(
|
|
883
|
+
Menu.SubTrigger,
|
|
884
|
+
{
|
|
885
|
+
unstyled: true,
|
|
886
|
+
...ROW,
|
|
887
|
+
gap: 8,
|
|
888
|
+
paddingHorizontal: 8,
|
|
889
|
+
paddingVertical: 6,
|
|
890
|
+
...rest,
|
|
891
|
+
children: [
|
|
892
|
+
startIcon,
|
|
893
|
+
/* @__PURE__ */ jsx(XStack, { flex: 1, children: ink(children, void 0, { fontSize: 14, color: TEXT }) }),
|
|
894
|
+
/* @__PURE__ */ jsx(ChevronRight, { size: 16 })
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
) });
|
|
1017
898
|
function initials(label) {
|
|
1018
899
|
return label.split(/[\s._-]+/).filter(Boolean).map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
1019
900
|
}
|
|
@@ -1063,9 +944,9 @@ var Switcher = ({
|
|
|
1063
944
|
align = "start",
|
|
1064
945
|
testId
|
|
1065
946
|
}) => {
|
|
1066
|
-
const [open, setOpen] =
|
|
947
|
+
const [open, setOpen] = React32.useState(false);
|
|
1067
948
|
const narrow = useIsNarrow();
|
|
1068
|
-
const close =
|
|
949
|
+
const close = React32.useCallback(() => setOpen(false), []);
|
|
1069
950
|
const message = status === "loading" ? "Loading\u2026" : status === "error" ? error ?? "Could not reach IAM." : status === "anonymous" ? null : items.length === 0 ? empty : null;
|
|
1070
951
|
const rows = status === "anonymous" && onSignIn ? [{ id: "sign-in", label: signInLabel, icon: /* @__PURE__ */ jsx(User, { "aria-hidden": "true", className: "h-4 w-4" }), onSelect: onSignIn }] : status === "ready" ? items : [];
|
|
1071
952
|
const panel = (menu) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1098,7 +979,7 @@ var Switcher = ({
|
|
|
1098
979
|
);
|
|
1099
980
|
if (narrow) {
|
|
1100
981
|
return /* @__PURE__ */ jsxs(DrawerRoot, { open, onOpenChange: (d) => setOpen(d.open), placement: "bottom", size: "md", children: [
|
|
1101
|
-
|
|
982
|
+
React32.cloneElement(trigger, { onClick: () => setOpen(true) }),
|
|
1102
983
|
/* @__PURE__ */ jsxs(DrawerContent, { "data-testid": testId ? `${testId}-panel` : void 0, children: [
|
|
1103
984
|
/* @__PURE__ */ jsx(DrawerHeader, { children: /* @__PURE__ */ jsx(DrawerTitle, { children: title }) }),
|
|
1104
985
|
/* @__PURE__ */ jsx(DrawerBody, { children: panel(false) })
|
|
@@ -1214,7 +1095,7 @@ var AppNav = ({
|
|
|
1214
1095
|
}) => {
|
|
1215
1096
|
const id = useIdentity();
|
|
1216
1097
|
const narrow = useIsNarrow();
|
|
1217
|
-
const [menu, setMenu] =
|
|
1098
|
+
const [menu, setMenu] = React32.useState(false);
|
|
1218
1099
|
return /* @__PURE__ */ jsx(
|
|
1219
1100
|
"header",
|
|
1220
1101
|
{
|
|
@@ -1230,7 +1111,7 @@ var AppNav = ({
|
|
|
1230
1111
|
"data-testid": "nav-menu",
|
|
1231
1112
|
className: "rounded-md p-2 hover:bg-[rgba(127,127,127,0.14)]",
|
|
1232
1113
|
onClick: () => setMenu(true),
|
|
1233
|
-
children: /* @__PURE__ */ jsx(Menu, { "aria-hidden": "true", className: "h-5 w-5" })
|
|
1114
|
+
children: /* @__PURE__ */ jsx(Menu$1, { "aria-hidden": "true", className: "h-5 w-5" })
|
|
1234
1115
|
}
|
|
1235
1116
|
),
|
|
1236
1117
|
/* @__PURE__ */ jsxs(DrawerContent, { "data-testid": "nav-menu-panel", children: [
|
|
@@ -1276,178 +1157,117 @@ var AppNav = ({
|
|
|
1276
1157
|
}
|
|
1277
1158
|
);
|
|
1278
1159
|
};
|
|
1279
|
-
var IndicatorIcon = (
|
|
1280
|
-
var
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
className
|
|
1318
|
-
),
|
|
1319
|
-
"data-variant": variant,
|
|
1320
|
-
"data-size": size,
|
|
1321
|
-
...rest,
|
|
1322
|
-
children
|
|
1323
|
-
}
|
|
1324
|
-
);
|
|
1160
|
+
var IndicatorIcon = () => /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1161
|
+
var BAR = "var(--color-text-primary)";
|
|
1162
|
+
var Indicator2 = ({ open, variant }) => variant === "faq" ? /* @__PURE__ */ jsxs(XStack, { width: 12, height: 12, flexShrink: 0, alignItems: "center", justifyContent: "center", position: "relative", children: [
|
|
1163
|
+
/* @__PURE__ */ jsx(View, { position: "absolute", width: "100%", height: 2, borderRadius: 2, backgroundColor: BAR }),
|
|
1164
|
+
/* @__PURE__ */ jsx(
|
|
1165
|
+
View,
|
|
1166
|
+
{
|
|
1167
|
+
position: "absolute",
|
|
1168
|
+
width: 2,
|
|
1169
|
+
height: "100%",
|
|
1170
|
+
borderRadius: 2,
|
|
1171
|
+
backgroundColor: BAR,
|
|
1172
|
+
rotate: open ? "90deg" : "0deg"
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
] }) : /* @__PURE__ */ jsx(XStack, { flexShrink: 0, alignItems: "center", rotate: open ? "270deg" : "180deg", children: /* @__PURE__ */ jsx(IndicatorIcon, {}) });
|
|
1176
|
+
var Variant = React32.createContext(void 0);
|
|
1177
|
+
var AccordionRoot = ({
|
|
1178
|
+
value,
|
|
1179
|
+
defaultValue,
|
|
1180
|
+
onValueChange,
|
|
1181
|
+
variant,
|
|
1182
|
+
size,
|
|
1183
|
+
children,
|
|
1184
|
+
...rest
|
|
1185
|
+
}) => /* @__PURE__ */ jsx(Variant.Provider, { value: variant, children: /* @__PURE__ */ jsx(
|
|
1186
|
+
Accordion,
|
|
1187
|
+
{
|
|
1188
|
+
unstyled: true,
|
|
1189
|
+
type: "multiple",
|
|
1190
|
+
width: "100%",
|
|
1191
|
+
value,
|
|
1192
|
+
defaultValue,
|
|
1193
|
+
onValueChange: onValueChange ? (next) => onValueChange({ value: next }) : void 0,
|
|
1194
|
+
"data-variant": variant,
|
|
1195
|
+
"data-size": size,
|
|
1196
|
+
...rest,
|
|
1197
|
+
children
|
|
1325
1198
|
}
|
|
1326
|
-
);
|
|
1327
|
-
var AccordionItem =
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
className: cn(
|
|
1335
|
-
"border-b border-[var(--color-border-divider)]",
|
|
1336
|
-
className
|
|
1337
|
-
),
|
|
1338
|
-
...rest
|
|
1339
|
-
}
|
|
1340
|
-
);
|
|
1199
|
+
) });
|
|
1200
|
+
var AccordionItem = (props) => /* @__PURE__ */ jsx(
|
|
1201
|
+
Accordion.Item,
|
|
1202
|
+
{
|
|
1203
|
+
unstyled: true,
|
|
1204
|
+
borderBottomWidth: 1,
|
|
1205
|
+
borderColor: "var(--color-border-divider)",
|
|
1206
|
+
...props
|
|
1341
1207
|
}
|
|
1342
1208
|
);
|
|
1343
|
-
var AccordionItemTrigger =
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
textAlign: _textAlign,
|
|
1356
|
-
cursor: _cursor,
|
|
1357
|
-
display: _display,
|
|
1358
|
-
alignItems: _alignItems,
|
|
1359
|
-
columnGap: _columnGap,
|
|
1360
|
-
...rest
|
|
1361
|
-
} = props;
|
|
1362
|
-
const indicatorPlacement = variant === "faq" ? "start" : indicatorPlacementProp ?? "end";
|
|
1363
|
-
const indicator = variant === "faq" ? /* @__PURE__ */ jsx(
|
|
1364
|
-
"span",
|
|
1365
|
-
{
|
|
1366
|
-
className: cn(
|
|
1367
|
-
"relative inline-block h-3 w-3 shrink-0",
|
|
1368
|
-
// horizontal bar (always visible)
|
|
1369
|
-
"before:absolute before:left-0 before:top-1/2 before:block before:h-[2px] before:w-full before:-translate-y-1/2 before:rounded-[2px] before:bg-current",
|
|
1370
|
-
// vertical bar (rotates to 0 when open)
|
|
1371
|
-
"after:absolute after:left-1/2 after:top-0 after:block after:h-full after:w-[2px]",
|
|
1372
|
-
"after:-translate-x-1/2 after:rounded-[2px] after:bg-current",
|
|
1373
|
-
"after:transition-transform after:duration-200 after:ease-in-out",
|
|
1374
|
-
// When parent trigger has data-state="open", rotate vertical bar
|
|
1375
|
-
"group-data-[state=open]/trigger:after:rotate-90"
|
|
1376
|
-
)
|
|
1377
|
-
}
|
|
1378
|
-
) : /* @__PURE__ */ jsx(
|
|
1379
|
-
"span",
|
|
1380
|
-
{
|
|
1381
|
-
className: cn(
|
|
1382
|
-
"inline-flex shrink-0 transition-transform duration-200",
|
|
1383
|
-
"rotate-180",
|
|
1384
|
-
"group-data-[state=open]/trigger:rotate-[270deg]"
|
|
1385
|
-
),
|
|
1386
|
-
children: /* @__PURE__ */ jsx(IndicatorIcon, { className: "h-5 w-5" })
|
|
1387
|
-
}
|
|
1388
|
-
);
|
|
1389
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
1390
|
-
AccordionPrimitive.Trigger,
|
|
1391
|
-
{
|
|
1392
|
-
ref,
|
|
1393
|
-
className: cn(
|
|
1394
|
-
"group/trigger flex w-full cursor-pointer items-center gap-2 py-3 text-left text-[var(--color-text-primary)]",
|
|
1395
|
-
"hover:text-[var(--color-hover)]",
|
|
1396
|
-
"focus-visible:outline-none",
|
|
1397
|
-
className
|
|
1398
|
-
),
|
|
1399
|
-
...rest,
|
|
1400
|
-
children: [
|
|
1401
|
-
indicatorPlacement === "start" && !noIndicator && indicator,
|
|
1402
|
-
children,
|
|
1403
|
-
indicatorPlacement === "end" && !noIndicator && indicator
|
|
1404
|
-
]
|
|
1405
|
-
}
|
|
1406
|
-
) }) });
|
|
1407
|
-
});
|
|
1408
|
-
var AccordionItemContent = React33.forwardRef(function AccordionItemContent2(props, ref) {
|
|
1409
|
-
const { className, children, pb: _pb, pr: _pr, pl: _pl, w: _w, display: _display, flexDir: _flexDir, rowGap: _rowGap, ...rest } = props;
|
|
1410
|
-
return /* @__PURE__ */ jsx(
|
|
1411
|
-
AccordionPrimitive.Content,
|
|
1209
|
+
var AccordionItemTrigger = ({
|
|
1210
|
+
children,
|
|
1211
|
+
indicatorPlacement: placementProp,
|
|
1212
|
+
variant: variantProp,
|
|
1213
|
+
noIndicator,
|
|
1214
|
+
headingLevel = 3,
|
|
1215
|
+
...rest
|
|
1216
|
+
}) => {
|
|
1217
|
+
const variant = variantProp ?? React32.useContext(Variant);
|
|
1218
|
+
const placement = variant === "faq" ? "start" : placementProp ?? "end";
|
|
1219
|
+
return /* @__PURE__ */ jsx(Accordion.Header, { unstyled: true, render: `h${headingLevel}`, "aria-level": headingLevel, display: "flex", width: "100%", children: /* @__PURE__ */ jsx(
|
|
1220
|
+
Accordion.Trigger,
|
|
1412
1221
|
{
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1222
|
+
unstyled: true,
|
|
1223
|
+
type: "button",
|
|
1224
|
+
width: "100%",
|
|
1225
|
+
flexDirection: "row",
|
|
1226
|
+
alignItems: "center",
|
|
1227
|
+
gap: 8,
|
|
1228
|
+
paddingVertical: 12,
|
|
1229
|
+
paddingHorizontal: 0,
|
|
1230
|
+
borderWidth: 0,
|
|
1231
|
+
backgroundColor: "transparent",
|
|
1232
|
+
cursor: "pointer",
|
|
1233
|
+
className: "lux-accordion-trigger",
|
|
1420
1234
|
...rest,
|
|
1421
|
-
children: /* @__PURE__ */
|
|
1235
|
+
children: (({ open }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1236
|
+
placement === "start" && !noIndicator && /* @__PURE__ */ jsx(Indicator2, { open, variant }),
|
|
1237
|
+
ink(children, void 0, { color: "inherit", textAlign: "left" }),
|
|
1238
|
+
placement === "end" && !noIndicator && /* @__PURE__ */ jsx(Indicator2, { open, variant })
|
|
1239
|
+
] }))
|
|
1422
1240
|
}
|
|
1423
|
-
);
|
|
1424
|
-
}
|
|
1241
|
+
) });
|
|
1242
|
+
};
|
|
1243
|
+
var AccordionItemContent = ({ children, ...rest }) => /* @__PURE__ */ jsx(
|
|
1244
|
+
Accordion.Content,
|
|
1245
|
+
{
|
|
1246
|
+
unstyled: true,
|
|
1247
|
+
overflow: "hidden",
|
|
1248
|
+
paddingBottom: 12,
|
|
1249
|
+
backgroundColor: "transparent",
|
|
1250
|
+
...rest,
|
|
1251
|
+
children: ink(children, void 0, { color: "var(--color-text-primary)" })
|
|
1252
|
+
}
|
|
1253
|
+
);
|
|
1425
1254
|
function useAccordion(items) {
|
|
1426
|
-
const [value, setValue] =
|
|
1427
|
-
const onValueChange =
|
|
1428
|
-
setValue(
|
|
1255
|
+
const [value, setValue] = React32.useState([]);
|
|
1256
|
+
const onValueChange = React32.useCallback(({ value: next }) => {
|
|
1257
|
+
setValue(next);
|
|
1429
1258
|
}, []);
|
|
1430
|
-
const scrollToItemFromUrl =
|
|
1259
|
+
const scrollToItemFromUrl = React32.useCallback(() => {
|
|
1431
1260
|
const hash = window.location.hash.replace("#", "");
|
|
1432
|
-
if (!hash)
|
|
1433
|
-
return;
|
|
1434
|
-
}
|
|
1261
|
+
if (!hash) return;
|
|
1435
1262
|
const itemToScroll = items.find((item) => item.id === hash);
|
|
1436
|
-
if (itemToScroll)
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1440
|
-
}
|
|
1441
|
-
setValue([itemToScroll.id]);
|
|
1442
|
-
}
|
|
1263
|
+
if (!itemToScroll) return;
|
|
1264
|
+
document.getElementById(itemToScroll.id)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1265
|
+
setValue([itemToScroll.id]);
|
|
1443
1266
|
}, [items]);
|
|
1444
|
-
return
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
scrollToItemFromUrl
|
|
1449
|
-
};
|
|
1450
|
-
}, [value, onValueChange, scrollToItemFromUrl]);
|
|
1267
|
+
return React32.useMemo(
|
|
1268
|
+
() => ({ value, onValueChange, scrollToItemFromUrl }),
|
|
1269
|
+
[value, onValueChange, scrollToItemFromUrl]
|
|
1270
|
+
);
|
|
1451
1271
|
}
|
|
1452
1272
|
var SHIM_PROPS = [
|
|
1453
1273
|
"w",
|
|
@@ -1565,7 +1385,7 @@ function stripShims(props) {
|
|
|
1565
1385
|
}
|
|
1566
1386
|
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
1567
1387
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
1568
|
-
var Skeleton =
|
|
1388
|
+
var Skeleton = React32.forwardRef(
|
|
1569
1389
|
function Skeleton2(props, ref) {
|
|
1570
1390
|
const { loading = false, asChild, className, children, style: styleProp, as: Component = "div", ...allRest } = props;
|
|
1571
1391
|
const shimStyle = shimToStyle(props);
|
|
@@ -1574,10 +1394,10 @@ var Skeleton = React33.forwardRef(
|
|
|
1574
1394
|
const cls = hideBelowClass ? cn(className, hideBelowClass) : className;
|
|
1575
1395
|
const htmlRest = stripShims(allRest);
|
|
1576
1396
|
if (!loading) {
|
|
1577
|
-
if (asChild &&
|
|
1397
|
+
if (asChild && React32.isValidElement(children)) return children;
|
|
1578
1398
|
return /* @__PURE__ */ jsx(Component, { ref, className: cls, style: mergedStyle, ...htmlRest, children });
|
|
1579
1399
|
}
|
|
1580
|
-
if (asChild &&
|
|
1400
|
+
if (asChild && React32.isValidElement(children)) {
|
|
1581
1401
|
return /* @__PURE__ */ jsx(
|
|
1582
1402
|
Component,
|
|
1583
1403
|
{
|
|
@@ -1603,7 +1423,7 @@ var Skeleton = React33.forwardRef(
|
|
|
1603
1423
|
);
|
|
1604
1424
|
}
|
|
1605
1425
|
);
|
|
1606
|
-
var SkeletonCircle =
|
|
1426
|
+
var SkeletonCircle = React32.forwardRef(
|
|
1607
1427
|
function SkeletonCircle2(props, ref) {
|
|
1608
1428
|
const { size = 40, loading = true, className, ...rest } = props;
|
|
1609
1429
|
const dimension = typeof size === "number" ? `${size}px` : size;
|
|
@@ -1619,7 +1439,7 @@ var SkeletonCircle = React33.forwardRef(
|
|
|
1619
1439
|
);
|
|
1620
1440
|
}
|
|
1621
1441
|
);
|
|
1622
|
-
var SkeletonText =
|
|
1442
|
+
var SkeletonText = React32.forwardRef(
|
|
1623
1443
|
function SkeletonText2(props, ref) {
|
|
1624
1444
|
const { noOfLines = 3, loading = true, className, ...rest } = props;
|
|
1625
1445
|
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...rest, children: Array.from({ length: noOfLines }).map((_, index) => /* @__PURE__ */ jsx(
|
|
@@ -1645,7 +1465,7 @@ var STATUS_CLASSES = {
|
|
|
1645
1465
|
success: "bg-[var(--color-alert-bg-success)]",
|
|
1646
1466
|
error: "bg-[var(--color-alert-bg-error)]"
|
|
1647
1467
|
};
|
|
1648
|
-
var
|
|
1468
|
+
var SIZE_CLASSES = {
|
|
1649
1469
|
sm: "gap-2 px-2 py-2 text-xs",
|
|
1650
1470
|
md: "gap-2 px-3 py-2 text-base"
|
|
1651
1471
|
};
|
|
@@ -1653,7 +1473,7 @@ var INDICATOR_SIZE_CLASSES = {
|
|
|
1653
1473
|
sm: "w-5 h-5 my-0",
|
|
1654
1474
|
md: "w-5 h-5 my-[2px]"
|
|
1655
1475
|
};
|
|
1656
|
-
var Alert =
|
|
1476
|
+
var Alert = React32.forwardRef(
|
|
1657
1477
|
function Alert2(props, ref) {
|
|
1658
1478
|
const {
|
|
1659
1479
|
title,
|
|
@@ -1678,7 +1498,7 @@ var Alert = React33.forwardRef(
|
|
|
1678
1498
|
if (_mb !== void 0) shimStyle.marginBottom = typeof _mb === "number" ? `${_mb * 4}px` : _mb;
|
|
1679
1499
|
if (_mt !== void 0) shimStyle.marginTop = typeof _mt === "number" ? `${_mt * 4}px` : _mt;
|
|
1680
1500
|
const alertStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
|
|
1681
|
-
const [isOpen, setIsOpen] =
|
|
1501
|
+
const [isOpen, setIsOpen] = React32.useState(true);
|
|
1682
1502
|
const resolvedSize = size ?? "md";
|
|
1683
1503
|
const defaultIcon = /* @__PURE__ */ jsx(IndicatorIcon2, { className: "w-5 h-5" });
|
|
1684
1504
|
const iconElement = (() => {
|
|
@@ -1693,7 +1513,7 @@ var Alert = React33.forwardRef(
|
|
|
1693
1513
|
INDICATOR_SIZE_CLASSES[resolvedSize]
|
|
1694
1514
|
), children: icon || defaultIcon });
|
|
1695
1515
|
})();
|
|
1696
|
-
const handleClose =
|
|
1516
|
+
const handleClose = React32.useCallback(() => {
|
|
1697
1517
|
setIsOpen(false);
|
|
1698
1518
|
onClose?.();
|
|
1699
1519
|
}, [onClose]);
|
|
@@ -1724,7 +1544,7 @@ var Alert = React33.forwardRef(
|
|
|
1724
1544
|
"div",
|
|
1725
1545
|
{
|
|
1726
1546
|
ref,
|
|
1727
|
-
className: cn(ALERT_BASE, STATUS_CLASSES[status],
|
|
1547
|
+
className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
|
|
1728
1548
|
style: alertStyle,
|
|
1729
1549
|
...alertRest,
|
|
1730
1550
|
children: [
|
|
@@ -1754,7 +1574,7 @@ var Alert = React33.forwardRef(
|
|
|
1754
1574
|
) });
|
|
1755
1575
|
}
|
|
1756
1576
|
);
|
|
1757
|
-
var
|
|
1577
|
+
var SIZE_CLASSES2 = {
|
|
1758
1578
|
xs: "h-6 w-6 text-[10px]",
|
|
1759
1579
|
sm: "h-8 w-8 text-xs",
|
|
1760
1580
|
md: "h-10 w-10 text-sm",
|
|
@@ -1769,11 +1589,11 @@ var VARIANT_CLASSES = {
|
|
|
1769
1589
|
};
|
|
1770
1590
|
var DEFAULT_SIZE = "md";
|
|
1771
1591
|
var DEFAULT_VARIANT = "subtle";
|
|
1772
|
-
var AvatarGroupContext =
|
|
1592
|
+
var AvatarGroupContext = React32.createContext({});
|
|
1773
1593
|
function useAvatarGroupContext() {
|
|
1774
|
-
return
|
|
1594
|
+
return React32.useContext(AvatarGroupContext);
|
|
1775
1595
|
}
|
|
1776
|
-
var Avatar =
|
|
1596
|
+
var Avatar = React32.forwardRef(
|
|
1777
1597
|
function Avatar2(props, ref) {
|
|
1778
1598
|
const group = useAvatarGroupContext();
|
|
1779
1599
|
const {
|
|
@@ -1800,7 +1620,7 @@ var Avatar = React33.forwardRef(
|
|
|
1800
1620
|
unstyled: true,
|
|
1801
1621
|
className: cn(
|
|
1802
1622
|
"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle",
|
|
1803
|
-
|
|
1623
|
+
SIZE_CLASSES2[size],
|
|
1804
1624
|
VARIANT_CLASSES[variant],
|
|
1805
1625
|
!isBorderless && "ring-2 ring-white dark:ring-gray-900",
|
|
1806
1626
|
className
|
|
@@ -1824,7 +1644,7 @@ var Avatar = React33.forwardRef(
|
|
|
1824
1644
|
);
|
|
1825
1645
|
}
|
|
1826
1646
|
);
|
|
1827
|
-
var AvatarFallback =
|
|
1647
|
+
var AvatarFallback = React32.forwardRef(
|
|
1828
1648
|
function AvatarFallback2(props, ref) {
|
|
1829
1649
|
const { name, icon, children, className, ...rest } = props;
|
|
1830
1650
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1852,10 +1672,10 @@ function getInitials(name) {
|
|
|
1852
1672
|
const lastName = names.length > 1 ? names[names.length - 1] : "";
|
|
1853
1673
|
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
|
1854
1674
|
}
|
|
1855
|
-
var AvatarGroup =
|
|
1675
|
+
var AvatarGroup = React32.forwardRef(
|
|
1856
1676
|
function AvatarGroup2(props, ref) {
|
|
1857
1677
|
const { size, variant, borderless, className, ...rest } = props;
|
|
1858
|
-
const contextValue =
|
|
1678
|
+
const contextValue = React32.useMemo(
|
|
1859
1679
|
() => ({ size, variant, borderless }),
|
|
1860
1680
|
[size, variant, borderless]
|
|
1861
1681
|
);
|
|
@@ -1873,7 +1693,7 @@ function mapPlacement(p) {
|
|
|
1873
1693
|
if (!p) return void 0;
|
|
1874
1694
|
return p;
|
|
1875
1695
|
}
|
|
1876
|
-
var Tooltip =
|
|
1696
|
+
var Tooltip = React32.forwardRef(
|
|
1877
1697
|
function Tooltip2(props, ref) {
|
|
1878
1698
|
const {
|
|
1879
1699
|
showArrow: showArrowProp,
|
|
@@ -1892,28 +1712,28 @@ var Tooltip = React33.forwardRef(
|
|
|
1892
1712
|
interactive,
|
|
1893
1713
|
positioning
|
|
1894
1714
|
} = props;
|
|
1895
|
-
const [open, setOpen] =
|
|
1896
|
-
const timeoutRef =
|
|
1715
|
+
const [open, setOpen] = React32.useState(defaultOpen);
|
|
1716
|
+
const timeoutRef = React32.useRef(null);
|
|
1897
1717
|
const isMobile = useIsTouch();
|
|
1898
|
-
const handleOpenChange =
|
|
1718
|
+
const handleOpenChange = React32.useCallback((nextOpen) => {
|
|
1899
1719
|
setOpen(nextOpen);
|
|
1900
1720
|
onOpenChange?.({ open: nextOpen });
|
|
1901
1721
|
}, [onOpenChange]);
|
|
1902
|
-
const handleOpenChangeManual =
|
|
1722
|
+
const handleOpenChangeManual = React32.useCallback((nextOpen) => {
|
|
1903
1723
|
timeoutRef.current && window.clearTimeout(timeoutRef.current);
|
|
1904
1724
|
timeoutRef.current = window.setTimeout(() => {
|
|
1905
1725
|
setOpen(nextOpen);
|
|
1906
1726
|
onOpenChange?.({ open: nextOpen });
|
|
1907
1727
|
}, nextOpen ? openDelay : closeDelay);
|
|
1908
1728
|
}, [closeDelay, openDelay, onOpenChange]);
|
|
1909
|
-
const handleClickAway =
|
|
1729
|
+
const handleClickAway = React32.useCallback(() => {
|
|
1910
1730
|
if (open) handleOpenChangeManual(false);
|
|
1911
1731
|
}, [open, handleOpenChangeManual]);
|
|
1912
1732
|
const triggerRef = useClickAway(handleClickAway);
|
|
1913
|
-
const handleTriggerClick =
|
|
1733
|
+
const handleTriggerClick = React32.useCallback(() => {
|
|
1914
1734
|
handleOpenChangeManual(!open);
|
|
1915
1735
|
}, [handleOpenChangeManual, open]);
|
|
1916
|
-
const handleContentClick =
|
|
1736
|
+
const handleContentClick = React32.useCallback((event) => {
|
|
1917
1737
|
event.stopPropagation();
|
|
1918
1738
|
if (interactive) {
|
|
1919
1739
|
const closestLink = event.target?.closest("a");
|
|
@@ -1922,7 +1742,7 @@ var Tooltip = React33.forwardRef(
|
|
|
1922
1742
|
}
|
|
1923
1743
|
}
|
|
1924
1744
|
}, [interactive, handleOpenChangeManual]);
|
|
1925
|
-
|
|
1745
|
+
React32.useEffect(() => {
|
|
1926
1746
|
return () => {
|
|
1927
1747
|
if (timeoutRef.current) {
|
|
1928
1748
|
clearTimeout(timeoutRef.current);
|
|
@@ -1994,7 +1814,7 @@ function TruncatedTextTooltip({ label, children }) {
|
|
|
1994
1814
|
return /* @__PURE__ */ jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
|
|
1995
1815
|
}
|
|
1996
1816
|
var BASE_CLASSES = "inline-flex items-center rounded-sm gap-1 font-medium w-fit max-w-full whitespace-nowrap select-text";
|
|
1997
|
-
var
|
|
1817
|
+
var SIZE_CLASSES3 = {
|
|
1998
1818
|
sm: "text-xs p-1 h-[18px] min-h-[18px]",
|
|
1999
1819
|
md: "text-sm px-1 py-0.5 min-h-6",
|
|
2000
1820
|
lg: "text-sm px-2 py-1 min-h-7 font-semibold"
|
|
@@ -2024,7 +1844,7 @@ var COLOR_PALETTE_CLASSES = {
|
|
|
2024
1844
|
bright_pink: "bg-badge-bright-pink-bg text-badge-bright-pink-fg"
|
|
2025
1845
|
};
|
|
2026
1846
|
var S2 = 4;
|
|
2027
|
-
var Badge =
|
|
1847
|
+
var Badge = React32__default.forwardRef(
|
|
2028
1848
|
function Badge2(props, ref) {
|
|
2029
1849
|
const {
|
|
2030
1850
|
loading,
|
|
@@ -2064,7 +1884,7 @@ var Badge = React33__default.forwardRef(
|
|
|
2064
1884
|
ref,
|
|
2065
1885
|
className: cn(
|
|
2066
1886
|
BASE_CLASSES,
|
|
2067
|
-
|
|
1887
|
+
SIZE_CLASSES3[size],
|
|
2068
1888
|
COLOR_PALETTE_CLASSES[colorPalette],
|
|
2069
1889
|
className
|
|
2070
1890
|
),
|
|
@@ -2273,7 +2093,7 @@ function buildShimStyle(props) {
|
|
|
2273
2093
|
if (props.borderTopRightRadius !== void 0) s.borderTopRightRadius = typeof props.borderTopRightRadius === "number" ? `${props.borderTopRightRadius}px` : props.borderTopRightRadius;
|
|
2274
2094
|
return Object.keys(s).length > 0 ? s : void 0;
|
|
2275
2095
|
}
|
|
2276
|
-
var Button =
|
|
2096
|
+
var Button = React32.forwardRef(
|
|
2277
2097
|
function Button2(props, ref) {
|
|
2278
2098
|
const {
|
|
2279
2099
|
className,
|
|
@@ -2364,7 +2184,7 @@ var Button = React33.forwardRef(
|
|
|
2364
2184
|
return button;
|
|
2365
2185
|
}
|
|
2366
2186
|
);
|
|
2367
|
-
var
|
|
2187
|
+
var SIZE_CLASSES4 = {
|
|
2368
2188
|
"2xs": "px-2 h-5 min-w-5 text-xs rounded-sm gap-1",
|
|
2369
2189
|
xs: "px-2 h-6 min-w-6 text-sm rounded-sm gap-1",
|
|
2370
2190
|
sm: "px-3 h-8 min-w-8 text-sm rounded-md gap-1",
|
|
@@ -2373,9 +2193,9 @@ var SIZE_CLASSES5 = {
|
|
|
2373
2193
|
function buttonVariants(opts) {
|
|
2374
2194
|
const v = opts?.variant ?? "solid";
|
|
2375
2195
|
const s = opts?.size ?? "md";
|
|
2376
|
-
return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "",
|
|
2196
|
+
return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES4[s] ?? ""].filter(Boolean).join(" ");
|
|
2377
2197
|
}
|
|
2378
|
-
var ButtonGroup =
|
|
2198
|
+
var ButtonGroup = React32.forwardRef(
|
|
2379
2199
|
function ButtonGroup2(props, ref) {
|
|
2380
2200
|
const { className, ...rest } = props;
|
|
2381
2201
|
return /* @__PURE__ */ jsx(
|
|
@@ -2389,7 +2209,7 @@ var ButtonGroup = React33.forwardRef(
|
|
|
2389
2209
|
);
|
|
2390
2210
|
}
|
|
2391
2211
|
);
|
|
2392
|
-
var ButtonGroupRadio =
|
|
2212
|
+
var ButtonGroupRadio = React32.forwardRef(
|
|
2393
2213
|
function ButtonGroupRadio2(props, ref) {
|
|
2394
2214
|
const {
|
|
2395
2215
|
children,
|
|
@@ -2401,24 +2221,24 @@ var ButtonGroupRadio = React33.forwardRef(
|
|
|
2401
2221
|
className,
|
|
2402
2222
|
...rest
|
|
2403
2223
|
} = props;
|
|
2404
|
-
const firstChildValue =
|
|
2224
|
+
const firstChildValue = React32.useMemo(() => {
|
|
2405
2225
|
const firstChild = Array.isArray(children) ? children[0] : void 0;
|
|
2406
2226
|
return typeof firstChild?.props.value === "string" ? firstChild.props.value : void 0;
|
|
2407
2227
|
}, [children]);
|
|
2408
|
-
const [value, setValue] =
|
|
2409
|
-
const handleItemClick =
|
|
2228
|
+
const [value, setValue] = React32.useState(defaultValue ?? firstChildValue);
|
|
2229
|
+
const handleItemClick = React32.useCallback((event) => {
|
|
2410
2230
|
const v = event.currentTarget.value;
|
|
2411
2231
|
setValue(v);
|
|
2412
2232
|
onChange?.(v);
|
|
2413
2233
|
}, [onChange]);
|
|
2414
|
-
const clonedChildren =
|
|
2415
|
-
return
|
|
2234
|
+
const clonedChildren = React32.Children.map(children, (child) => {
|
|
2235
|
+
return React32.cloneElement(child, {
|
|
2416
2236
|
onClick: handleItemClick,
|
|
2417
2237
|
selected: value === child.props.value,
|
|
2418
2238
|
variant
|
|
2419
2239
|
});
|
|
2420
2240
|
});
|
|
2421
|
-
const childrenLength =
|
|
2241
|
+
const childrenLength = React32.Children.count(children);
|
|
2422
2242
|
return /* @__PURE__ */ jsx(Skeleton, { loading, children: /* @__PURE__ */ jsx(
|
|
2423
2243
|
"div",
|
|
2424
2244
|
{
|
|
@@ -2438,11 +2258,11 @@ var ButtonGroupRadio = React33.forwardRef(
|
|
|
2438
2258
|
);
|
|
2439
2259
|
var NOOP = () => {
|
|
2440
2260
|
};
|
|
2441
|
-
var CheckboxGroupContext =
|
|
2261
|
+
var CheckboxGroupContext = React32.createContext(null);
|
|
2442
2262
|
function useCheckboxGroupContext() {
|
|
2443
|
-
return
|
|
2263
|
+
return React32.useContext(CheckboxGroupContext);
|
|
2444
2264
|
}
|
|
2445
|
-
var CheckboxGroupBase =
|
|
2265
|
+
var CheckboxGroupBase = React32.forwardRef(
|
|
2446
2266
|
function CheckboxGroup(props, ref) {
|
|
2447
2267
|
const {
|
|
2448
2268
|
children,
|
|
@@ -2454,10 +2274,10 @@ var CheckboxGroupBase = React33.forwardRef(
|
|
|
2454
2274
|
className,
|
|
2455
2275
|
...rest
|
|
2456
2276
|
} = props;
|
|
2457
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
2277
|
+
const [uncontrolledValue, setUncontrolledValue] = React32.useState(defaultValue ?? []);
|
|
2458
2278
|
const isControlled = controlledValue !== void 0;
|
|
2459
2279
|
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
2460
|
-
const toggle =
|
|
2280
|
+
const toggle = React32.useCallback(
|
|
2461
2281
|
(itemValue) => {
|
|
2462
2282
|
const next = value.includes(itemValue) ? value.filter((v) => v !== itemValue) : [...value, itemValue];
|
|
2463
2283
|
if (!isControlled) {
|
|
@@ -2467,12 +2287,12 @@ var CheckboxGroupBase = React33.forwardRef(
|
|
|
2467
2287
|
},
|
|
2468
2288
|
[value, isControlled, onValueChange]
|
|
2469
2289
|
);
|
|
2470
|
-
|
|
2290
|
+
React32.useEffect(() => {
|
|
2471
2291
|
if (isControlled) {
|
|
2472
2292
|
setUncontrolledValue(controlledValue);
|
|
2473
2293
|
}
|
|
2474
2294
|
}, [isControlled, controlledValue]);
|
|
2475
|
-
const ctx =
|
|
2295
|
+
const ctx = React32.useMemo(() => ({ value, toggle }), [value, toggle]);
|
|
2476
2296
|
return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
2477
2297
|
"div",
|
|
2478
2298
|
{
|
|
@@ -2490,7 +2310,7 @@ var CheckboxGroupBase = React33.forwardRef(
|
|
|
2490
2310
|
}
|
|
2491
2311
|
);
|
|
2492
2312
|
var CheckboxGroup2 = CheckboxGroupBase;
|
|
2493
|
-
var
|
|
2313
|
+
var SIZE_CLASSES5 = {
|
|
2494
2314
|
sm: {
|
|
2495
2315
|
root: "gap-1.5",
|
|
2496
2316
|
control: "h-3.5 w-3.5 rounded-sm",
|
|
@@ -2530,7 +2350,7 @@ var IndeterminateIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
|
2530
2350
|
children: /* @__PURE__ */ jsx("path", { d: "M0 0H12V2H0V0Z", fill: "currentColor" })
|
|
2531
2351
|
}
|
|
2532
2352
|
);
|
|
2533
|
-
var CheckboxBase =
|
|
2353
|
+
var CheckboxBase = React32.forwardRef(
|
|
2534
2354
|
function Checkbox$1(props, ref) {
|
|
2535
2355
|
const {
|
|
2536
2356
|
icon,
|
|
@@ -2551,8 +2371,8 @@ var CheckboxBase = React33.forwardRef(
|
|
|
2551
2371
|
...rest
|
|
2552
2372
|
} = props;
|
|
2553
2373
|
const group = useCheckboxGroupContext();
|
|
2554
|
-
const hiddenInputRef =
|
|
2555
|
-
const setHiddenInputRef =
|
|
2374
|
+
const hiddenInputRef = React32.useRef(null);
|
|
2375
|
+
const setHiddenInputRef = React32.useCallback(
|
|
2556
2376
|
(node) => {
|
|
2557
2377
|
hiddenInputRef.current = node;
|
|
2558
2378
|
if (typeof ref === "function") {
|
|
@@ -2565,7 +2385,7 @@ var CheckboxBase = React33.forwardRef(
|
|
|
2565
2385
|
);
|
|
2566
2386
|
const isInGroup = group !== null && value !== void 0;
|
|
2567
2387
|
const groupChecked = isInGroup ? group.value.includes(value) : void 0;
|
|
2568
|
-
const [internalChecked, setInternalChecked] =
|
|
2388
|
+
const [internalChecked, setInternalChecked] = React32.useState(
|
|
2569
2389
|
defaultChecked ?? false
|
|
2570
2390
|
);
|
|
2571
2391
|
const isControlled = checkedProp !== void 0 || isInGroup;
|
|
@@ -2577,7 +2397,7 @@ var CheckboxBase = React33.forwardRef(
|
|
|
2577
2397
|
} else {
|
|
2578
2398
|
checkedState = internalChecked;
|
|
2579
2399
|
}
|
|
2580
|
-
const handleCheckedChange =
|
|
2400
|
+
const handleCheckedChange = React32.useCallback(
|
|
2581
2401
|
(nextChecked) => {
|
|
2582
2402
|
if (readOnly) return;
|
|
2583
2403
|
if (!isControlled) {
|
|
@@ -2600,7 +2420,7 @@ var CheckboxBase = React33.forwardRef(
|
|
|
2600
2420
|
},
|
|
2601
2421
|
[readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
|
|
2602
2422
|
);
|
|
2603
|
-
const sizeClasses2 =
|
|
2423
|
+
const sizeClasses2 = SIZE_CLASSES5[size];
|
|
2604
2424
|
return /* @__PURE__ */ jsxs(
|
|
2605
2425
|
"label",
|
|
2606
2426
|
{
|
|
@@ -2742,7 +2562,7 @@ function resolveSpacing(v) {
|
|
|
2742
2562
|
}
|
|
2743
2563
|
return void 0;
|
|
2744
2564
|
}
|
|
2745
|
-
var Link =
|
|
2565
|
+
var Link = React32__default.forwardRef(
|
|
2746
2566
|
function Link2(props, ref) {
|
|
2747
2567
|
const {
|
|
2748
2568
|
external,
|
|
@@ -2831,7 +2651,7 @@ var Link = React33__default.forwardRef(
|
|
|
2831
2651
|
) });
|
|
2832
2652
|
}
|
|
2833
2653
|
);
|
|
2834
|
-
var LinkBox =
|
|
2654
|
+
var LinkBox = React32__default.forwardRef(
|
|
2835
2655
|
function LinkBox2(props, ref) {
|
|
2836
2656
|
const { className, ...rest } = props;
|
|
2837
2657
|
return /* @__PURE__ */ jsx(
|
|
@@ -2844,7 +2664,7 @@ var LinkBox = React33__default.forwardRef(
|
|
|
2844
2664
|
);
|
|
2845
2665
|
}
|
|
2846
2666
|
);
|
|
2847
|
-
var LinkOverlay =
|
|
2667
|
+
var LinkOverlay = React32__default.forwardRef(
|
|
2848
2668
|
function LinkOverlay2(props, ref) {
|
|
2849
2669
|
const {
|
|
2850
2670
|
children,
|
|
@@ -2925,8 +2745,8 @@ var LinkOverlay = React33__default.forwardRef(
|
|
|
2925
2745
|
}
|
|
2926
2746
|
);
|
|
2927
2747
|
function useUpdateEffect(effect, deps) {
|
|
2928
|
-
const isFirstMount =
|
|
2929
|
-
|
|
2748
|
+
const isFirstMount = React32__default.useRef(true);
|
|
2749
|
+
React32__default.useEffect(() => {
|
|
2930
2750
|
if (isFirstMount.current) {
|
|
2931
2751
|
isFirstMount.current = false;
|
|
2932
2752
|
return;
|
|
@@ -2935,71 +2755,81 @@ function useUpdateEffect(effect, deps) {
|
|
|
2935
2755
|
}, deps);
|
|
2936
2756
|
}
|
|
2937
2757
|
function scrollToElement(id) {
|
|
2938
|
-
|
|
2939
|
-
if (el) {
|
|
2940
|
-
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
2941
|
-
}
|
|
2758
|
+
document.getElementById(id)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
2942
2759
|
}
|
|
2943
2760
|
var CUT_ID = "CollapsibleDetails";
|
|
2944
2761
|
var CollapsibleDetails = (props) => {
|
|
2945
|
-
const {
|
|
2946
|
-
|
|
2947
|
-
|
|
2762
|
+
const {
|
|
2763
|
+
children,
|
|
2764
|
+
id = CUT_ID,
|
|
2765
|
+
onClick,
|
|
2766
|
+
isExpanded: isExpandedProp = false,
|
|
2767
|
+
text: textProp,
|
|
2768
|
+
loading,
|
|
2769
|
+
noScroll,
|
|
2770
|
+
...rest
|
|
2771
|
+
} = props;
|
|
2772
|
+
const [isExpanded, setIsExpanded] = React32__default.useState(isExpandedProp);
|
|
2773
|
+
const handleClick = React32__default.useCallback((event) => {
|
|
2948
2774
|
setIsExpanded((flag) => !flag);
|
|
2949
|
-
if (!noScroll)
|
|
2950
|
-
scrollToElement(id);
|
|
2951
|
-
}
|
|
2775
|
+
if (!noScroll) scrollToElement(id);
|
|
2952
2776
|
onClick?.(event);
|
|
2953
2777
|
}, [id, noScroll, onClick]);
|
|
2954
2778
|
useUpdateEffect(() => {
|
|
2955
2779
|
setIsExpanded(isExpandedProp);
|
|
2956
|
-
if (isExpandedProp && !noScroll)
|
|
2957
|
-
scrollToElement(id);
|
|
2958
|
-
}
|
|
2780
|
+
if (isExpandedProp && !noScroll) scrollToElement(id);
|
|
2959
2781
|
}, [isExpandedProp, id, noScroll]);
|
|
2960
2782
|
const text = isExpanded ? textProp?.[1] ?? "Hide details" : textProp?.[0] ?? "View details";
|
|
2961
|
-
return /* @__PURE__ */ jsxs(Collapsible
|
|
2962
|
-
/* @__PURE__ */ jsx(
|
|
2783
|
+
return /* @__PURE__ */ jsxs(Collapsible, { open: isExpanded, onOpenChange: setIsExpanded, children: [
|
|
2784
|
+
/* @__PURE__ */ jsx(
|
|
2963
2785
|
Link,
|
|
2964
2786
|
{
|
|
2965
2787
|
className: "text-sm underline decoration-dashed w-fit",
|
|
2788
|
+
"aria-expanded": isExpanded,
|
|
2966
2789
|
onClick: handleClick,
|
|
2967
2790
|
loading,
|
|
2968
2791
|
...rest,
|
|
2969
2792
|
children: /* @__PURE__ */ jsx("span", { id, children: text })
|
|
2970
2793
|
}
|
|
2971
|
-
)
|
|
2794
|
+
),
|
|
2972
2795
|
/* @__PURE__ */ jsx(Collapsible.Content, { children })
|
|
2973
2796
|
] });
|
|
2974
2797
|
};
|
|
2798
|
+
var CUT_LENGTH = 3;
|
|
2975
2799
|
var CollapsibleList = (props) => {
|
|
2976
|
-
const
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2800
|
+
const {
|
|
2801
|
+
items,
|
|
2802
|
+
renderItem,
|
|
2803
|
+
triggerProps,
|
|
2804
|
+
cutLength = CUT_LENGTH,
|
|
2805
|
+
text: textProp,
|
|
2806
|
+
defaultExpanded = false,
|
|
2807
|
+
...rest
|
|
2808
|
+
} = props;
|
|
2809
|
+
const [isExpanded, setIsExpanded] = React32__default.useState(defaultExpanded);
|
|
2810
|
+
React32__default.useEffect(() => {
|
|
2980
2811
|
setIsExpanded(defaultExpanded);
|
|
2981
2812
|
}, [defaultExpanded]);
|
|
2982
|
-
const handleToggle =
|
|
2983
|
-
setIsExpanded((flag) => !flag);
|
|
2984
|
-
}, []);
|
|
2813
|
+
const handleToggle = React32__default.useCallback(() => setIsExpanded((flag) => !flag), []);
|
|
2985
2814
|
const text = isExpanded ? textProp?.[1] ?? "Hide" : textProp?.[0] ?? "Show all";
|
|
2986
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsxs(YStack, { width: "100%", ...rest, children: [
|
|
2987
2816
|
items.slice(0, isExpanded ? void 0 : cutLength).map(renderItem),
|
|
2988
|
-
items.length > cutLength && /* @__PURE__ */ jsx(
|
|
2817
|
+
items.length > cutLength && /* @__PURE__ */ jsx(
|
|
2989
2818
|
Link,
|
|
2990
2819
|
{
|
|
2991
2820
|
className: "text-sm underline decoration-dashed w-fit min-w-0",
|
|
2821
|
+
"aria-expanded": isExpanded,
|
|
2992
2822
|
onClick: handleToggle,
|
|
2993
2823
|
...triggerProps,
|
|
2994
2824
|
children: text
|
|
2995
2825
|
}
|
|
2996
|
-
)
|
|
2997
|
-
] })
|
|
2826
|
+
)
|
|
2827
|
+
] });
|
|
2998
2828
|
};
|
|
2999
|
-
var ColorModeContext =
|
|
2829
|
+
var ColorModeContext = React32.createContext(void 0);
|
|
3000
2830
|
function ColorModeProvider(props) {
|
|
3001
2831
|
const { children, defaultTheme = "light", value: controlledValue, onValueChange } = props;
|
|
3002
|
-
const [internalMode, setInternalMode] =
|
|
2832
|
+
const [internalMode, setInternalMode] = React32.useState(() => {
|
|
3003
2833
|
if (controlledValue === "dark" || controlledValue === "light") {
|
|
3004
2834
|
return controlledValue;
|
|
3005
2835
|
}
|
|
@@ -3009,7 +2839,7 @@ function ColorModeProvider(props) {
|
|
|
3009
2839
|
return defaultTheme === "dark" ? "dark" : "light";
|
|
3010
2840
|
});
|
|
3011
2841
|
const colorMode = controlledValue === "dark" || controlledValue === "light" ? controlledValue : internalMode;
|
|
3012
|
-
const setColorMode =
|
|
2842
|
+
const setColorMode = React32.useCallback((mode) => {
|
|
3013
2843
|
const resolved = mode === "dark" ? "dark" : "light";
|
|
3014
2844
|
setInternalMode(resolved);
|
|
3015
2845
|
onValueChange?.(resolved);
|
|
@@ -3018,19 +2848,19 @@ function ColorModeProvider(props) {
|
|
|
3018
2848
|
document.documentElement.classList.toggle("light", resolved === "light");
|
|
3019
2849
|
}
|
|
3020
2850
|
}, [onValueChange]);
|
|
3021
|
-
const toggleColorMode =
|
|
2851
|
+
const toggleColorMode = React32.useCallback(() => {
|
|
3022
2852
|
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
3023
2853
|
}, [colorMode, setColorMode]);
|
|
3024
|
-
const ctx =
|
|
2854
|
+
const ctx = React32.useMemo(
|
|
3025
2855
|
() => ({ colorMode, setColorMode, toggleColorMode }),
|
|
3026
2856
|
[colorMode, setColorMode, toggleColorMode]
|
|
3027
2857
|
);
|
|
3028
2858
|
return /* @__PURE__ */ jsx(ColorModeContext.Provider, { value: ctx, children });
|
|
3029
2859
|
}
|
|
3030
2860
|
function useColorMode() {
|
|
3031
|
-
const ctx =
|
|
2861
|
+
const ctx = React32.useContext(ColorModeContext);
|
|
3032
2862
|
if (!ctx) {
|
|
3033
|
-
const [mode, setMode] =
|
|
2863
|
+
const [mode, setMode] = React32.useState(() => {
|
|
3034
2864
|
if (typeof document !== "undefined" && document.documentElement.classList.contains("dark")) {
|
|
3035
2865
|
return "dark";
|
|
3036
2866
|
}
|
|
@@ -3074,9 +2904,9 @@ function BackToButton({ onClick }) {
|
|
|
3074
2904
|
}
|
|
3075
2905
|
);
|
|
3076
2906
|
}
|
|
3077
|
-
var DialogSizeContext =
|
|
2907
|
+
var DialogSizeContext = React32.createContext({ size: "md" });
|
|
3078
2908
|
function useDialogSizeContext() {
|
|
3079
|
-
return
|
|
2909
|
+
return React32.useContext(DialogSizeContext);
|
|
3080
2910
|
}
|
|
3081
2911
|
var CONTENT_SIZE_MAP = {
|
|
3082
2912
|
sm: "max-w-[400px]",
|
|
@@ -3108,13 +2938,13 @@ var DialogRoot = ({
|
|
|
3108
2938
|
modal = true
|
|
3109
2939
|
// motionPreset is intentionally unused -- kept for API compat
|
|
3110
2940
|
}) => {
|
|
3111
|
-
const handleOpenChange =
|
|
2941
|
+
const handleOpenChange = React32.useCallback(
|
|
3112
2942
|
(nextOpen) => {
|
|
3113
2943
|
onOpenChange?.({ open: nextOpen });
|
|
3114
2944
|
},
|
|
3115
2945
|
[onOpenChange]
|
|
3116
2946
|
);
|
|
3117
|
-
const ctx =
|
|
2947
|
+
const ctx = React32.useMemo(() => ({ size }), [size]);
|
|
3118
2948
|
return /* @__PURE__ */ jsx(DialogSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
3119
2949
|
Dialog,
|
|
3120
2950
|
{
|
|
@@ -3126,7 +2956,7 @@ var DialogRoot = ({
|
|
|
3126
2956
|
}
|
|
3127
2957
|
) });
|
|
3128
2958
|
};
|
|
3129
|
-
var DialogContent =
|
|
2959
|
+
var DialogContent = React32.forwardRef(function DialogContent2(props, ref) {
|
|
3130
2960
|
const {
|
|
3131
2961
|
children,
|
|
3132
2962
|
portalled: _portalled = true,
|
|
@@ -3183,11 +3013,11 @@ var DialogContent = React33.forwardRef(function DialogContent2(props, ref) {
|
|
|
3183
3013
|
)
|
|
3184
3014
|
] });
|
|
3185
3015
|
});
|
|
3186
|
-
var DialogCloseTrigger =
|
|
3016
|
+
var DialogCloseTrigger = React32.forwardRef(function DialogCloseTrigger2(props, ref) {
|
|
3187
3017
|
const { className, ...rest } = props;
|
|
3188
3018
|
return /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { ref, className, ...rest, children: props.children }) });
|
|
3189
3019
|
});
|
|
3190
|
-
var DialogHeader =
|
|
3020
|
+
var DialogHeader = React32.forwardRef(function DialogHeader2(props, ref) {
|
|
3191
3021
|
const { startElement: startElementProp, onBackToClick, className, children, ...rest } = props;
|
|
3192
3022
|
const startElement = startElementProp ?? (onBackToClick ? /* @__PURE__ */ jsx(BackToButton, { onClick: onBackToClick }) : void 0);
|
|
3193
3023
|
return /* @__PURE__ */ jsxs(
|
|
@@ -3217,7 +3047,7 @@ var DialogHeader = React33.forwardRef(function DialogHeader2(props, ref) {
|
|
|
3217
3047
|
}
|
|
3218
3048
|
);
|
|
3219
3049
|
});
|
|
3220
|
-
var DialogBody =
|
|
3050
|
+
var DialogBody = React32.forwardRef(function DialogBody2({ className, pt, display, flexDir, style: styleProp, ...props }, ref) {
|
|
3221
3051
|
const bodyStyle = {
|
|
3222
3052
|
...styleProp,
|
|
3223
3053
|
...pt !== void 0 ? { paddingTop: typeof pt === "number" ? `${pt * 4}px` : pt } : {},
|
|
@@ -3234,7 +3064,7 @@ var DialogBody = React33.forwardRef(function DialogBody2({ className, pt, displa
|
|
|
3234
3064
|
}
|
|
3235
3065
|
);
|
|
3236
3066
|
});
|
|
3237
|
-
var DialogFooter =
|
|
3067
|
+
var DialogFooter = React32.forwardRef(function DialogFooter2({ className, ...props }, ref) {
|
|
3238
3068
|
return /* @__PURE__ */ jsx(
|
|
3239
3069
|
"div",
|
|
3240
3070
|
{
|
|
@@ -3254,7 +3084,7 @@ function upperFirst(str) {
|
|
|
3254
3084
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
3255
3085
|
}
|
|
3256
3086
|
var ICONS = {};
|
|
3257
|
-
var EmptyState =
|
|
3087
|
+
var EmptyState = React32.forwardRef(
|
|
3258
3088
|
function EmptyState2(props, ref) {
|
|
3259
3089
|
const { title, description, term, type = "query", icon, children, className, ...rest } = props;
|
|
3260
3090
|
const titleContent = (() => {
|
|
@@ -3314,7 +3144,18 @@ function getComponentDisplayName(type) {
|
|
|
3314
3144
|
if ("displayName" in type) return type.displayName;
|
|
3315
3145
|
return void 0;
|
|
3316
3146
|
}
|
|
3317
|
-
var
|
|
3147
|
+
var ERROR = "var(--color-text-error)";
|
|
3148
|
+
var MUTED = "var(--color-text-secondary)";
|
|
3149
|
+
var Marks = ({ required, optionalText, errorText }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3150
|
+
required && /* @__PURE__ */ jsx(Text, { color: ERROR, "aria-hidden": true, children: "*" }),
|
|
3151
|
+
!required && optionalText && /* @__PURE__ */ jsx(Text, { fontSize: 14, color: MUTED, children: optionalText }),
|
|
3152
|
+
errorText && /* @__PURE__ */ jsxs(Text, { fontSize: 14, color: ERROR, children: [
|
|
3153
|
+
"-",
|
|
3154
|
+
space,
|
|
3155
|
+
errorText
|
|
3156
|
+
] })
|
|
3157
|
+
] });
|
|
3158
|
+
var Field = React32.forwardRef(
|
|
3318
3159
|
function Field2(props, ref) {
|
|
3319
3160
|
const {
|
|
3320
3161
|
label,
|
|
@@ -3332,148 +3173,92 @@ var Field = React33.forwardRef(
|
|
|
3332
3173
|
className,
|
|
3333
3174
|
style
|
|
3334
3175
|
} = props;
|
|
3176
|
+
const flags = {
|
|
3177
|
+
"data-disabled": disabled || void 0,
|
|
3178
|
+
"data-readonly": readOnly || void 0,
|
|
3179
|
+
"data-invalid": invalid || void 0
|
|
3180
|
+
};
|
|
3335
3181
|
if (floating && label) {
|
|
3336
|
-
const
|
|
3337
|
-
className: "peer",
|
|
3338
|
-
placeholder: " ",
|
|
3339
|
-
size,
|
|
3340
|
-
floating,
|
|
3341
|
-
disabled,
|
|
3342
|
-
readOnly
|
|
3343
|
-
};
|
|
3182
|
+
const injectedProps = { className: "lux-field-control", placeholder: " ", size, floating, disabled, readOnly };
|
|
3344
3183
|
const labelElement = /* @__PURE__ */ jsxs(
|
|
3345
|
-
|
|
3184
|
+
Label,
|
|
3346
3185
|
{
|
|
3347
|
-
className: cn(
|
|
3348
|
-
"absolute left-3 top-1/2 -translate-y-1/2",
|
|
3349
|
-
"text-[var(--color-input-placeholder,theme(colors.gray.400))]",
|
|
3350
|
-
"pointer-events-none select-none",
|
|
3351
|
-
"origin-top-left transition-all duration-150",
|
|
3352
|
-
"peer-focus:top-1 peer-focus:translate-y-0 peer-focus:scale-75",
|
|
3353
|
-
"peer-[:not(:placeholder-shown)]:top-1 peer-[:not(:placeholder-shown)]:translate-y-0 peer-[:not(:placeholder-shown)]:scale-75"
|
|
3354
|
-
),
|
|
3355
3186
|
htmlFor: id,
|
|
3187
|
+
position: "absolute",
|
|
3188
|
+
left: 12,
|
|
3189
|
+
top: "50%",
|
|
3190
|
+
pointerEvents: "none",
|
|
3191
|
+
userSelect: "none",
|
|
3192
|
+
flexDirection: "row",
|
|
3193
|
+
gap: 4,
|
|
3194
|
+
color: "var(--color-input-placeholder)",
|
|
3195
|
+
className: "lux-field-float",
|
|
3356
3196
|
children: [
|
|
3357
3197
|
label,
|
|
3358
|
-
|
|
3359
|
-
!required && optionalText && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[var(--color-text-secondary,theme(colors.gray.400))] text-sm", children: optionalText }),
|
|
3360
|
-
errorText && /* @__PURE__ */ jsxs("span", { className: "ml-0.5 text-[var(--color-fg-error,theme(colors.red.500))] text-sm", children: [
|
|
3361
|
-
"-",
|
|
3362
|
-
space,
|
|
3363
|
-
errorText
|
|
3364
|
-
] })
|
|
3198
|
+
/* @__PURE__ */ jsx(Marks, { required, optionalText, errorText })
|
|
3365
3199
|
]
|
|
3366
3200
|
}
|
|
3367
3201
|
);
|
|
3368
|
-
const helperTextElement = helperText ? /* @__PURE__ */ jsx(
|
|
3369
|
-
const child2 =
|
|
3202
|
+
const helperTextElement = helperText ? /* @__PURE__ */ jsx(Text, { marginTop: 6, fontSize: 12, color: MUTED, children: helperText }) : null;
|
|
3203
|
+
const child2 = React32.Children.only(children);
|
|
3370
3204
|
const isInputGroup = getComponentDisplayName(child2.type) === "InputGroup";
|
|
3371
3205
|
if (isInputGroup) {
|
|
3372
|
-
const
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
);
|
|
3376
|
-
const groupInputElement = React33.cloneElement(
|
|
3377
|
-
child2,
|
|
3378
|
-
{},
|
|
3379
|
-
inputElement2,
|
|
3380
|
-
labelElement
|
|
3206
|
+
const inputElement = React32.cloneElement(
|
|
3207
|
+
React32.Children.only(child2.props.children),
|
|
3208
|
+
injectedProps
|
|
3381
3209
|
);
|
|
3382
|
-
return /* @__PURE__ */ jsxs(
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
);
|
|
3398
|
-
}
|
|
3399
|
-
const inputElement = React33.cloneElement(child2, injectedProps2);
|
|
3400
|
-
return /* @__PURE__ */ jsxs(
|
|
3401
|
-
"div",
|
|
3210
|
+
return /* @__PURE__ */ jsxs(YStack, { ref, id, position: "relative", width: "100%", className, style, ...flags, children: [
|
|
3211
|
+
React32.cloneElement(child2, {}, inputElement, labelElement),
|
|
3212
|
+
helperTextElement
|
|
3213
|
+
] });
|
|
3214
|
+
}
|
|
3215
|
+
return /* @__PURE__ */ jsxs(YStack, { ref, id, position: "relative", width: "100%", className, style, ...flags, children: [
|
|
3216
|
+
React32.cloneElement(child2, injectedProps),
|
|
3217
|
+
labelElement,
|
|
3218
|
+
helperTextElement
|
|
3219
|
+
] });
|
|
3220
|
+
}
|
|
3221
|
+
const child = React32.Children.only(children);
|
|
3222
|
+
return /* @__PURE__ */ jsxs(YStack, { ref, id, gap: 4, className, style, ...flags, children: [
|
|
3223
|
+
label && /* @__PURE__ */ jsxs(
|
|
3224
|
+
Label,
|
|
3402
3225
|
{
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
"
|
|
3408
|
-
"
|
|
3409
|
-
|
|
3226
|
+
htmlFor: id,
|
|
3227
|
+
flexDirection: "row",
|
|
3228
|
+
gap: 4,
|
|
3229
|
+
fontSize: 14,
|
|
3230
|
+
fontWeight: "500",
|
|
3231
|
+
color: "var(--color-text-primary)",
|
|
3232
|
+
opacity: disabled ? 0.4 : 1,
|
|
3410
3233
|
children: [
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
helperTextElement
|
|
3234
|
+
label,
|
|
3235
|
+
/* @__PURE__ */ jsx(Marks, { required, optionalText })
|
|
3414
3236
|
]
|
|
3415
3237
|
}
|
|
3416
|
-
)
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
};
|
|
3421
|
-
const child = React33.Children.only(children);
|
|
3422
|
-
const clonedChild = React33.cloneElement(child, injectedProps);
|
|
3423
|
-
return /* @__PURE__ */ jsxs(
|
|
3424
|
-
"div",
|
|
3425
|
-
{
|
|
3426
|
-
ref,
|
|
3427
|
-
id,
|
|
3428
|
-
className: cn("flex flex-col gap-1", className),
|
|
3429
|
-
style,
|
|
3430
|
-
"data-disabled": disabled || void 0,
|
|
3431
|
-
"data-readonly": readOnly || void 0,
|
|
3432
|
-
"data-invalid": invalid || void 0,
|
|
3433
|
-
children: [
|
|
3434
|
-
label && /* @__PURE__ */ jsxs(
|
|
3435
|
-
LabelPrimitive.Root,
|
|
3436
|
-
{
|
|
3437
|
-
className: cn(
|
|
3438
|
-
"text-sm font-medium text-[var(--color-field-label,theme(colors.gray.700))]",
|
|
3439
|
-
"dark:text-[var(--color-field-label,theme(colors.gray.300))]",
|
|
3440
|
-
disabled && "opacity-40"
|
|
3441
|
-
),
|
|
3442
|
-
htmlFor: id,
|
|
3443
|
-
children: [
|
|
3444
|
-
label,
|
|
3445
|
-
required && /* @__PURE__ */ jsx("span", { className: "ml-0.5 text-[var(--color-fg-error,theme(colors.red.500))]", "aria-hidden": "true", children: "*" }),
|
|
3446
|
-
!required && optionalText && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[var(--color-text-secondary,theme(colors.gray.400))] text-sm font-normal", children: optionalText })
|
|
3447
|
-
]
|
|
3448
|
-
}
|
|
3449
|
-
),
|
|
3450
|
-
clonedChild,
|
|
3451
|
-
helperText && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--color-text-secondary,theme(colors.gray.400))]", children: helperText }),
|
|
3452
|
-
errorText && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--color-fg-error,theme(colors.red.500))]", children: errorText })
|
|
3453
|
-
]
|
|
3454
|
-
}
|
|
3455
|
-
);
|
|
3238
|
+
),
|
|
3239
|
+
React32.cloneElement(child, { size }),
|
|
3240
|
+
helperText && /* @__PURE__ */ jsx(Text, { fontSize: 12, color: MUTED, children: helperText }),
|
|
3241
|
+
errorText && /* @__PURE__ */ jsx(Text, { fontSize: 12, color: ERROR, children: errorText })
|
|
3242
|
+
] });
|
|
3456
3243
|
}
|
|
3457
3244
|
);
|
|
3458
|
-
var
|
|
3459
|
-
var
|
|
3460
|
-
"1":
|
|
3461
|
-
"2":
|
|
3462
|
-
"3":
|
|
3245
|
+
var TAG = { "1": H1, "2": H2, "3": H3 };
|
|
3246
|
+
var RAMP = {
|
|
3247
|
+
"1": { fontSize: 18, lineHeight: 24, fontWeight: "500", $lg: { fontSize: 32, lineHeight: 40, letterSpacing: -0.5 } },
|
|
3248
|
+
"2": { fontSize: 16, lineHeight: 24, fontWeight: "500", $lg: { fontSize: 24, lineHeight: 32 } },
|
|
3249
|
+
"3": { fontSize: 14, lineHeight: 20, fontWeight: "600", $lg: { fontSize: 18, lineHeight: 24, fontWeight: "500" } }
|
|
3463
3250
|
};
|
|
3464
|
-
var
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
const Tag3 = level ? LEVEL_TAG[level] : H2;
|
|
3468
|
-
const levelClasses = level ? LEVEL_CLASSES[level] : void 0;
|
|
3469
|
-
const mergedStyle = mb !== void 0 ? { ...styleProp, marginBottom: typeof mb === "number" ? `${mb * 4}px` : mb } : styleProp;
|
|
3251
|
+
var Heading = React32__default.forwardRef(
|
|
3252
|
+
function Heading2({ level, ...rest }, ref) {
|
|
3253
|
+
const Tag3 = level ? TAG[level] : H2;
|
|
3470
3254
|
return /* @__PURE__ */ jsx(
|
|
3471
3255
|
Tag3,
|
|
3472
3256
|
{
|
|
3473
3257
|
ref,
|
|
3474
3258
|
unstyled: true,
|
|
3475
|
-
|
|
3476
|
-
|
|
3259
|
+
fontFamily: "$heading",
|
|
3260
|
+
color: "var(--color-heading)",
|
|
3261
|
+
...level ? RAMP[level] : null,
|
|
3477
3262
|
...rest
|
|
3478
3263
|
}
|
|
3479
3264
|
);
|
|
@@ -3496,60 +3281,75 @@ var IconButtonFrame = styled(View, {
|
|
|
3496
3281
|
size: {
|
|
3497
3282
|
"2xs": { width: 20, height: 20, borderRadius: 4 },
|
|
3498
3283
|
"2xs_alt": { width: 20, height: 20, borderRadius: 4 },
|
|
3499
|
-
md: { width: 32, height: 32, borderRadius:
|
|
3284
|
+
md: { width: 32, height: 32, borderRadius: 8 }
|
|
3500
3285
|
},
|
|
3501
3286
|
disabled: {
|
|
3502
|
-
true: {
|
|
3503
|
-
opacity: 0.4,
|
|
3504
|
-
cursor: "not-allowed",
|
|
3505
|
-
pointerEvents: "none"
|
|
3506
|
-
}
|
|
3287
|
+
true: { opacity: 0.4, cursor: "not-allowed", pointerEvents: "none" }
|
|
3507
3288
|
}
|
|
3508
3289
|
}
|
|
3509
3290
|
});
|
|
3510
|
-
var
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
"
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
}
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3291
|
+
var HOVER = "var(--color-hover)";
|
|
3292
|
+
var SELECTED_BG = "var(--color-selected-control-bg)";
|
|
3293
|
+
var SELECTED_FG = "var(--color-selected-control-text)";
|
|
3294
|
+
var VARIANT = {
|
|
3295
|
+
plain: {
|
|
3296
|
+
rest: { backgroundColor: "transparent", hoverStyle: { backgroundColor: "transparent" } }
|
|
3297
|
+
},
|
|
3298
|
+
icon_secondary: {
|
|
3299
|
+
rest: {
|
|
3300
|
+
backgroundColor: "transparent",
|
|
3301
|
+
color: "var(--color-icon-secondary)",
|
|
3302
|
+
hoverStyle: { color: HOVER }
|
|
3303
|
+
},
|
|
3304
|
+
selected: { backgroundColor: SELECTED_BG, color: SELECTED_FG, hoverStyle: { color: HOVER } },
|
|
3305
|
+
expanded: { color: HOVER }
|
|
3306
|
+
},
|
|
3307
|
+
icon_background: {
|
|
3308
|
+
rest: {
|
|
3309
|
+
backgroundColor: "var(--color-button-icon-background-bg)",
|
|
3310
|
+
color: "var(--color-icon-secondary)",
|
|
3311
|
+
hoverStyle: { color: HOVER }
|
|
3312
|
+
},
|
|
3313
|
+
selected: { backgroundColor: SELECTED_BG, color: SELECTED_FG, hoverStyle: { color: HOVER } },
|
|
3314
|
+
expanded: { color: HOVER }
|
|
3315
|
+
},
|
|
3316
|
+
link: {
|
|
3317
|
+
rest: {
|
|
3318
|
+
backgroundColor: "transparent",
|
|
3319
|
+
color: "var(--color-link-primary)",
|
|
3320
|
+
fontWeight: "400",
|
|
3321
|
+
paddingHorizontal: 0,
|
|
3322
|
+
height: "auto",
|
|
3323
|
+
hoverStyle: { backgroundColor: "transparent", color: "var(--color-link-primary-hover)" },
|
|
3324
|
+
disabledStyle: { color: "var(--color-text-secondary)" }
|
|
3325
|
+
}
|
|
3326
|
+
},
|
|
3327
|
+
dropdown: {
|
|
3328
|
+
rest: {
|
|
3329
|
+
borderWidth: 2,
|
|
3330
|
+
borderStyle: "solid",
|
|
3331
|
+
backgroundColor: "transparent",
|
|
3332
|
+
color: "var(--color-button-dropdown-fg)",
|
|
3333
|
+
borderColor: "var(--color-button-dropdown-border)",
|
|
3334
|
+
hoverStyle: { backgroundColor: "transparent", color: HOVER, borderColor: HOVER }
|
|
3335
|
+
},
|
|
3336
|
+
selected: { backgroundColor: SELECTED_BG, color: SELECTED_FG, borderColor: "transparent", hoverStyle: { color: HOVER } },
|
|
3337
|
+
expanded: { backgroundColor: "transparent", color: HOVER, borderColor: HOVER }
|
|
3338
|
+
},
|
|
3339
|
+
pagination: {
|
|
3340
|
+
rest: {
|
|
3341
|
+
borderWidth: 2,
|
|
3342
|
+
borderStyle: "solid",
|
|
3343
|
+
backgroundColor: "transparent",
|
|
3344
|
+
color: "var(--color-button-pagination-fg)",
|
|
3345
|
+
borderColor: "var(--color-button-pagination-border)",
|
|
3346
|
+
hoverStyle: { backgroundColor: "transparent", color: HOVER, borderColor: HOVER }
|
|
3347
|
+
},
|
|
3348
|
+
selected: { backgroundColor: SELECTED_BG, color: SELECTED_FG, borderColor: "transparent" }
|
|
3349
|
+
}
|
|
3550
3350
|
};
|
|
3551
|
-
var
|
|
3552
|
-
var IconButton =
|
|
3351
|
+
var ICON_SIZE = { "2xs": 20, "2xs_alt": 12, md: 20 };
|
|
3352
|
+
var IconButton = React32.forwardRef(
|
|
3553
3353
|
function IconButton2(props, ref) {
|
|
3554
3354
|
const {
|
|
3555
3355
|
size,
|
|
@@ -3562,58 +3362,43 @@ var IconButton = React33.forwardRef(
|
|
|
3562
3362
|
disabled,
|
|
3563
3363
|
className,
|
|
3564
3364
|
children,
|
|
3565
|
-
as:
|
|
3365
|
+
as: asProp,
|
|
3566
3366
|
style: styleProp,
|
|
3567
|
-
// Strip Chakra style props
|
|
3568
|
-
boxSize: _boxSize,
|
|
3569
|
-
color: _color,
|
|
3570
|
-
px: _px,
|
|
3571
|
-
borderRadius: _borderRadius,
|
|
3572
|
-
ml: _ml,
|
|
3573
|
-
mr: _mr,
|
|
3574
|
-
_hover,
|
|
3575
|
-
_expanded,
|
|
3576
3367
|
...rest
|
|
3577
3368
|
} = props;
|
|
3578
|
-
const
|
|
3579
|
-
|
|
3580
|
-
const bs = typeof _boxSize === "number" ? `${_boxSize * SP2}px` : _boxSize;
|
|
3581
|
-
shimStyle.width = bs;
|
|
3582
|
-
shimStyle.height = bs;
|
|
3583
|
-
}
|
|
3584
|
-
if (_color) shimStyle.color = _color;
|
|
3585
|
-
if (_px !== void 0) {
|
|
3586
|
-
const v = typeof _px === "number" ? `${_px * SP2}px` : _px;
|
|
3587
|
-
shimStyle.paddingLeft = v;
|
|
3588
|
-
shimStyle.paddingRight = v;
|
|
3589
|
-
}
|
|
3590
|
-
if (_borderRadius) shimStyle.borderRadius = _borderRadius;
|
|
3591
|
-
if (_ml !== void 0) shimStyle.marginLeft = typeof _ml === "number" ? `${_ml * SP2}px` : _ml;
|
|
3592
|
-
if (_mr !== void 0) shimStyle.marginRight = typeof _mr === "number" ? `${_mr * SP2}px` : _mr;
|
|
3593
|
-
const mergedStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
|
|
3594
|
-
const variantClass = VARIANT_CLASSES4[variant] ?? VARIANT_CLASSES4.plain;
|
|
3595
|
-
const iconSizeClass = size ? ICON_SIZE_CLASSES[size] ?? "" : "";
|
|
3596
|
-
const combinedClassName = [variantClass, iconSizeClass, className].filter(Boolean).join(" ");
|
|
3369
|
+
const look = VARIANT[variant] ?? VARIANT.plain;
|
|
3370
|
+
const iconSize = size ? ICON_SIZE[size] : void 0;
|
|
3597
3371
|
const button = /* @__PURE__ */ jsx(
|
|
3598
3372
|
IconButtonFrame,
|
|
3599
3373
|
{
|
|
3600
3374
|
ref,
|
|
3601
3375
|
size,
|
|
3602
3376
|
disabled: !loadingSkeleton && (loading || disabled) || void 0,
|
|
3603
|
-
render:
|
|
3604
|
-
className:
|
|
3605
|
-
style:
|
|
3377
|
+
render: asProp ? React32.createElement(asProp) : void 0,
|
|
3378
|
+
className: ["lux-icon", className].filter(Boolean).join(" "),
|
|
3379
|
+
style: { ...styleProp, ...iconSize ? { "--icon-size": `${iconSize}px` } : null },
|
|
3380
|
+
...look.rest,
|
|
3381
|
+
...selected ? look.selected : null,
|
|
3382
|
+
...expanded ? look.expanded : null,
|
|
3606
3383
|
...expanded ? { "data-expanded": true } : {},
|
|
3607
3384
|
...selected ? { "data-selected": true } : {},
|
|
3608
3385
|
...highlighted ? { "data-highlighted": true } : {},
|
|
3609
3386
|
...loadingSkeleton ? { "data-loading-skeleton": true } : {},
|
|
3610
3387
|
...rest,
|
|
3611
3388
|
children: loading ? /* @__PURE__ */ jsx(
|
|
3612
|
-
|
|
3389
|
+
View,
|
|
3613
3390
|
{
|
|
3614
|
-
className: "
|
|
3391
|
+
className: "lux-spin",
|
|
3392
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
3615
3393
|
role: "status",
|
|
3616
|
-
"aria-label": "Loading"
|
|
3394
|
+
"aria-label": "Loading",
|
|
3395
|
+
width: 20,
|
|
3396
|
+
height: 20,
|
|
3397
|
+
borderRadius: 1e3,
|
|
3398
|
+
borderWidth: 2,
|
|
3399
|
+
borderColor: "currentColor",
|
|
3400
|
+
borderBottomColor: "transparent",
|
|
3401
|
+
borderLeftColor: "transparent"
|
|
3617
3402
|
}
|
|
3618
3403
|
) : children
|
|
3619
3404
|
}
|
|
@@ -3771,31 +3556,31 @@ function extractStyleProps(props) {
|
|
|
3771
3556
|
}
|
|
3772
3557
|
return { styleProps, rest };
|
|
3773
3558
|
}
|
|
3774
|
-
var Image =
|
|
3559
|
+
var Image = React32__default.forwardRef(
|
|
3775
3560
|
function Image2(props, ref) {
|
|
3776
3561
|
const { fallback, src, onLoad, onError, skeletonWidth, skeletonHeight, alt, className, style: styleProp, ...allRest } = props;
|
|
3777
3562
|
const { styleProps, rest: extraProps } = extractStyleProps(allRest);
|
|
3778
|
-
const [loading, setLoading] =
|
|
3779
|
-
const [error, setError] =
|
|
3780
|
-
const handleLoadError =
|
|
3563
|
+
const [loading, setLoading] = React32__default.useState(true);
|
|
3564
|
+
const [error, setError] = React32__default.useState(false);
|
|
3565
|
+
const handleLoadError = React32__default.useCallback((event) => {
|
|
3781
3566
|
setError(true);
|
|
3782
3567
|
setLoading(false);
|
|
3783
3568
|
onError?.(event);
|
|
3784
3569
|
}, [onError]);
|
|
3785
|
-
const handleLoadSuccess =
|
|
3570
|
+
const handleLoadSuccess = React32__default.useCallback((event) => {
|
|
3786
3571
|
setLoading(false);
|
|
3787
3572
|
onLoad?.(event);
|
|
3788
3573
|
}, [onLoad]);
|
|
3789
3574
|
const passthroughProps = allRest;
|
|
3790
3575
|
if (!src && fallback) {
|
|
3791
|
-
if (
|
|
3792
|
-
return
|
|
3576
|
+
if (React32__default.isValidElement(fallback)) {
|
|
3577
|
+
return React32__default.cloneElement(fallback, passthroughProps);
|
|
3793
3578
|
}
|
|
3794
3579
|
return fallback;
|
|
3795
3580
|
}
|
|
3796
3581
|
if (error) {
|
|
3797
|
-
if (
|
|
3798
|
-
return
|
|
3582
|
+
if (React32__default.isValidElement(fallback)) {
|
|
3583
|
+
return React32__default.cloneElement(fallback, passthroughProps);
|
|
3799
3584
|
}
|
|
3800
3585
|
return fallback;
|
|
3801
3586
|
}
|
|
@@ -3828,32 +3613,31 @@ var Image = React33__default.forwardRef(
|
|
|
3828
3613
|
] });
|
|
3829
3614
|
}
|
|
3830
3615
|
);
|
|
3831
|
-
var
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
"
|
|
3837
|
-
"focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
|
|
3838
|
-
"disabled:opacity-40 disabled:cursor-not-allowed",
|
|
3839
|
-
"read-only:opacity-70",
|
|
3840
|
-
"data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
|
|
3841
|
-
].join(" ");
|
|
3842
|
-
var INPUT_SIZE_CLASSES = {
|
|
3843
|
-
xs: "h-6 px-2 text-xs rounded",
|
|
3844
|
-
sm: "h-8 px-3 text-sm rounded-md",
|
|
3845
|
-
md: "h-10 px-4 text-base rounded-md",
|
|
3846
|
-
lg: "h-12 px-4 text-lg rounded-lg",
|
|
3847
|
-
"2xl": "h-14 px-4 text-xl rounded-lg"
|
|
3616
|
+
var SIZE = {
|
|
3617
|
+
xs: { height: 24, paddingHorizontal: 8, fontSize: 12, borderRadius: 4 },
|
|
3618
|
+
sm: { height: 32, paddingHorizontal: 12, fontSize: 14, borderRadius: 6 },
|
|
3619
|
+
md: { height: 40, paddingHorizontal: 16, fontSize: 16, borderRadius: 6 },
|
|
3620
|
+
lg: { height: 48, paddingHorizontal: 16, fontSize: 18, borderRadius: 8 },
|
|
3621
|
+
"2xl": { height: 56, paddingHorizontal: 16, fontSize: 20, borderRadius: 8 }
|
|
3848
3622
|
};
|
|
3849
|
-
var
|
|
3850
|
-
outline: "
|
|
3851
|
-
filled:
|
|
3852
|
-
unstyled:
|
|
3623
|
+
var VARIANT2 = {
|
|
3624
|
+
outline: { borderWidth: 1, borderStyle: "solid" },
|
|
3625
|
+
filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
|
|
3626
|
+
unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
|
|
3853
3627
|
};
|
|
3854
|
-
var
|
|
3628
|
+
var CONTROL = {
|
|
3629
|
+
width: "100%",
|
|
3630
|
+
outlineWidth: 0,
|
|
3631
|
+
backgroundColor: "var(--color-input-bg)",
|
|
3632
|
+
color: "var(--color-input-fg)",
|
|
3633
|
+
borderColor: "var(--color-input-border)",
|
|
3634
|
+
hoverStyle: { borderColor: "var(--color-input-border-hover)" },
|
|
3635
|
+
focusStyle: { borderColor: "var(--color-input-border-focus)" },
|
|
3636
|
+
disabledStyle: { opacity: 0.4, cursor: "not-allowed" }
|
|
3637
|
+
};
|
|
3638
|
+
var Input = React32__default.forwardRef(
|
|
3855
3639
|
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
3856
|
-
const handleChange =
|
|
3640
|
+
const handleChange = React32__default.useCallback(
|
|
3857
3641
|
(event) => {
|
|
3858
3642
|
onChange?.(event);
|
|
3859
3643
|
onChangeText?.(event.target.value);
|
|
@@ -3865,7 +3649,10 @@ var Input = React33__default.forwardRef(
|
|
|
3865
3649
|
{
|
|
3866
3650
|
ref,
|
|
3867
3651
|
unstyled: true,
|
|
3868
|
-
className:
|
|
3652
|
+
className: className ? `lux-control ${className}` : "lux-control",
|
|
3653
|
+
...CONTROL,
|
|
3654
|
+
...SIZE[size],
|
|
3655
|
+
...VARIANT2[variant],
|
|
3869
3656
|
...rest,
|
|
3870
3657
|
onChange: handleChange
|
|
3871
3658
|
}
|
|
@@ -3873,12 +3660,8 @@ var Input = React33__default.forwardRef(
|
|
|
3873
3660
|
}
|
|
3874
3661
|
);
|
|
3875
3662
|
Input.displayName = "Input";
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
if ("displayName" in type) return type.displayName;
|
|
3879
|
-
return void 0;
|
|
3880
|
-
}
|
|
3881
|
-
var InputGroup = React33.forwardRef(
|
|
3663
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React32.useLayoutEffect : React32.useEffect;
|
|
3664
|
+
var InputGroup = React32.forwardRef(
|
|
3882
3665
|
function InputGroup2(props, ref) {
|
|
3883
3666
|
const {
|
|
3884
3667
|
startElement,
|
|
@@ -3891,11 +3674,11 @@ var InputGroup = React33.forwardRef(
|
|
|
3891
3674
|
className,
|
|
3892
3675
|
...rest
|
|
3893
3676
|
} = props;
|
|
3894
|
-
const startElementRef =
|
|
3895
|
-
const endElementRef =
|
|
3896
|
-
const groupRef =
|
|
3897
|
-
const [inlinePaddings, setInlinePaddings] =
|
|
3898
|
-
const calculateInlinePaddings =
|
|
3677
|
+
const startElementRef = React32.useRef(null);
|
|
3678
|
+
const endElementRef = React32.useRef(null);
|
|
3679
|
+
const groupRef = React32.useRef(null);
|
|
3680
|
+
const [inlinePaddings, setInlinePaddings] = React32.useState();
|
|
3681
|
+
const calculateInlinePaddings = React32.useCallback(() => {
|
|
3899
3682
|
const startWidth = startElementRef.current?.getBoundingClientRect().width ?? 0;
|
|
3900
3683
|
const endWidth = endElementRef.current?.getBoundingClientRect().width ?? 0;
|
|
3901
3684
|
setInlinePaddings({
|
|
@@ -3903,12 +3686,12 @@ var InputGroup = React33.forwardRef(
|
|
|
3903
3686
|
end: endWidth
|
|
3904
3687
|
});
|
|
3905
3688
|
}, []);
|
|
3906
|
-
|
|
3689
|
+
React32.useEffect(() => {
|
|
3907
3690
|
if (!groupRef.current) return;
|
|
3908
3691
|
let timeoutId;
|
|
3909
3692
|
const intersectionObserver = new IntersectionObserver(
|
|
3910
|
-
(
|
|
3911
|
-
const entry =
|
|
3693
|
+
(entries2) => {
|
|
3694
|
+
const entry = entries2[0];
|
|
3912
3695
|
if (entry && entry.isIntersecting) {
|
|
3913
3696
|
timeoutId = setTimeout(calculateInlinePaddings, 50);
|
|
3914
3697
|
}
|
|
@@ -3923,7 +3706,7 @@ var InputGroup = React33.forwardRef(
|
|
|
3923
3706
|
}
|
|
3924
3707
|
};
|
|
3925
3708
|
}, [calculateInlinePaddings]);
|
|
3926
|
-
|
|
3709
|
+
useIsomorphicLayoutEffect(() => {
|
|
3927
3710
|
calculateInlinePaddings();
|
|
3928
3711
|
const resizeHandler = debounce(calculateInlinePaddings, 300);
|
|
3929
3712
|
const resizeObserver = new ResizeObserver(resizeHandler);
|
|
@@ -3934,7 +3717,7 @@ var InputGroup = React33.forwardRef(
|
|
|
3934
3717
|
resizeObserver.disconnect();
|
|
3935
3718
|
};
|
|
3936
3719
|
}, [calculateInlinePaddings]);
|
|
3937
|
-
const combinedRef =
|
|
3720
|
+
const combinedRef = React32.useCallback((node) => {
|
|
3938
3721
|
groupRef.current = node;
|
|
3939
3722
|
if (typeof ref === "function") {
|
|
3940
3723
|
ref(node);
|
|
@@ -3963,16 +3746,19 @@ var InputGroup = React33.forwardRef(
|
|
|
3963
3746
|
children: startElement
|
|
3964
3747
|
}
|
|
3965
3748
|
),
|
|
3966
|
-
|
|
3967
|
-
if (
|
|
3749
|
+
React32.Children.map(children, (child) => {
|
|
3750
|
+
if (!React32.isValidElement(child)) {
|
|
3968
3751
|
return child;
|
|
3969
3752
|
}
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3753
|
+
const start = startElement ? startOffset ?? inlinePaddings?.start : void 0;
|
|
3754
|
+
const end = endElement ? endOffset ?? inlinePaddings?.end : void 0;
|
|
3755
|
+
const px = (v) => typeof v === "number" ? `${v}px` : v;
|
|
3756
|
+
return React32.cloneElement(child, {
|
|
3757
|
+
style: {
|
|
3758
|
+
...child.props.style,
|
|
3759
|
+
...start !== void 0 && { paddingInlineStart: px(start) },
|
|
3760
|
+
...end !== void 0 && { paddingInlineEnd: px(end) }
|
|
3761
|
+
}
|
|
3976
3762
|
});
|
|
3977
3763
|
}),
|
|
3978
3764
|
endElement && /* @__PURE__ */ jsx(
|
|
@@ -3993,7 +3779,7 @@ var InputGroup = React33.forwardRef(
|
|
|
3993
3779
|
}
|
|
3994
3780
|
);
|
|
3995
3781
|
InputGroup.displayName = "InputGroup";
|
|
3996
|
-
var
|
|
3782
|
+
var INPUT_BASE = [
|
|
3997
3783
|
"w-10 h-10",
|
|
3998
3784
|
"text-center text-sm font-medium",
|
|
3999
3785
|
"border-2 rounded-md",
|
|
@@ -4007,7 +3793,7 @@ var INPUT_BASE2 = [
|
|
|
4007
3793
|
].join(" ");
|
|
4008
3794
|
var INPUT_FILLED = "border-[var(--color-input-border)]";
|
|
4009
3795
|
var INPUT_INVALID = "border-[var(--color-border-error)] hover:border-[var(--color-border-error)]";
|
|
4010
|
-
var PinInput =
|
|
3796
|
+
var PinInput = React32.forwardRef(
|
|
4011
3797
|
function PinInput2(props, ref) {
|
|
4012
3798
|
const {
|
|
4013
3799
|
count = 6,
|
|
@@ -4025,12 +3811,12 @@ var PinInput = React33.forwardRef(
|
|
|
4025
3811
|
bgColor,
|
|
4026
3812
|
className
|
|
4027
3813
|
} = props;
|
|
4028
|
-
const inputRefs =
|
|
4029
|
-
const values =
|
|
3814
|
+
const inputRefs = React32.useRef([]);
|
|
3815
|
+
const values = React32.useMemo(
|
|
4030
3816
|
() => controlledValue ?? Array.from({ length: count }).fill(""),
|
|
4031
3817
|
[controlledValue, count]
|
|
4032
3818
|
);
|
|
4033
|
-
const updateValue =
|
|
3819
|
+
const updateValue = React32.useCallback((index, char) => {
|
|
4034
3820
|
const next = [...values];
|
|
4035
3821
|
next[index] = char;
|
|
4036
3822
|
onValueChange?.({ value: next });
|
|
@@ -4038,11 +3824,11 @@ var PinInput = React33.forwardRef(
|
|
|
4038
3824
|
onValueComplete?.({ value: next });
|
|
4039
3825
|
}
|
|
4040
3826
|
}, [values, onValueChange, onValueComplete]);
|
|
4041
|
-
const focusInput =
|
|
3827
|
+
const focusInput = React32.useCallback((index) => {
|
|
4042
3828
|
const clamped = Math.max(0, Math.min(index, count - 1));
|
|
4043
3829
|
inputRefs.current[clamped]?.focus();
|
|
4044
3830
|
}, [count]);
|
|
4045
|
-
const handleInput =
|
|
3831
|
+
const handleInput = React32.useCallback((index, e) => {
|
|
4046
3832
|
const target = e.currentTarget;
|
|
4047
3833
|
const char = target.value.slice(-1);
|
|
4048
3834
|
updateValue(index, char);
|
|
@@ -4050,7 +3836,7 @@ var PinInput = React33.forwardRef(
|
|
|
4050
3836
|
focusInput(index + 1);
|
|
4051
3837
|
}
|
|
4052
3838
|
}, [count, updateValue, focusInput]);
|
|
4053
|
-
const handleKeyDown =
|
|
3839
|
+
const handleKeyDown = React32.useCallback((index, e) => {
|
|
4054
3840
|
if (e.key === "Backspace") {
|
|
4055
3841
|
if (values[index]) {
|
|
4056
3842
|
updateValue(index, "");
|
|
@@ -4067,7 +3853,7 @@ var PinInput = React33.forwardRef(
|
|
|
4067
3853
|
e.preventDefault();
|
|
4068
3854
|
}
|
|
4069
3855
|
}, [count, values, updateValue, focusInput]);
|
|
4070
|
-
const handlePaste =
|
|
3856
|
+
const handlePaste = React32.useCallback((e) => {
|
|
4071
3857
|
e.preventDefault();
|
|
4072
3858
|
const pasted = e.clipboardData.getData("text/plain").trim();
|
|
4073
3859
|
if (!pasted) {
|
|
@@ -4084,18 +3870,18 @@ var PinInput = React33.forwardRef(
|
|
|
4084
3870
|
}
|
|
4085
3871
|
focusInput(Math.min(chars.length, count - 1));
|
|
4086
3872
|
}, [count, values, onValueChange, onValueComplete, focusInput]);
|
|
4087
|
-
const handleFocus =
|
|
3873
|
+
const handleFocus = React32.useCallback((e) => {
|
|
4088
3874
|
e.currentTarget.select();
|
|
4089
3875
|
}, []);
|
|
4090
|
-
const handleNoop =
|
|
3876
|
+
const handleNoop = React32.useCallback(() => {
|
|
4091
3877
|
}, []);
|
|
4092
|
-
const setInputRef =
|
|
3878
|
+
const setInputRef = React32.useCallback((index) => (el) => {
|
|
4093
3879
|
inputRefs.current[index] = el;
|
|
4094
3880
|
}, []);
|
|
4095
|
-
const onInputAtIndex =
|
|
3881
|
+
const onInputAtIndex = React32.useCallback((index) => (e) => {
|
|
4096
3882
|
handleInput(index, e);
|
|
4097
3883
|
}, [handleInput]);
|
|
4098
|
-
const onKeyDownAtIndex =
|
|
3884
|
+
const onKeyDownAtIndex = React32.useCallback((index) => (e) => {
|
|
4099
3885
|
handleKeyDown(index, e);
|
|
4100
3886
|
}, [handleKeyDown]);
|
|
4101
3887
|
const bgStyle = bgColor ? { backgroundColor: `var(--color-${bgColor.replace(/\./g, "-")})` } : void 0;
|
|
@@ -4124,7 +3910,7 @@ var PinInput = React33.forwardRef(
|
|
|
4124
3910
|
"aria-invalid": invalid || void 0,
|
|
4125
3911
|
value: values[index] || "",
|
|
4126
3912
|
className: cn(
|
|
4127
|
-
|
|
3913
|
+
INPUT_BASE,
|
|
4128
3914
|
values[index] && INPUT_FILLED,
|
|
4129
3915
|
invalid && INPUT_INVALID,
|
|
4130
3916
|
attached && index > 0 && "-ml-0.5"
|
|
@@ -4141,7 +3927,7 @@ var PinInput = React33.forwardRef(
|
|
|
4141
3927
|
] });
|
|
4142
3928
|
}
|
|
4143
3929
|
);
|
|
4144
|
-
function
|
|
3930
|
+
function parsePlacement(placement) {
|
|
4145
3931
|
if (!placement) {
|
|
4146
3932
|
return { side: "bottom", align: "start" };
|
|
4147
3933
|
}
|
|
@@ -4156,7 +3942,7 @@ function parsePlacement2(placement) {
|
|
|
4156
3942
|
}
|
|
4157
3943
|
return { side, align };
|
|
4158
3944
|
}
|
|
4159
|
-
var
|
|
3945
|
+
var PositioningContext = React32.createContext({
|
|
4160
3946
|
side: "bottom",
|
|
4161
3947
|
align: "start",
|
|
4162
3948
|
sideOffset: 4,
|
|
@@ -4189,8 +3975,8 @@ var PopoverRoot = (props) => {
|
|
|
4189
3975
|
...positioning?.offset
|
|
4190
3976
|
}
|
|
4191
3977
|
};
|
|
4192
|
-
const { side, align } =
|
|
4193
|
-
const positioningValue =
|
|
3978
|
+
const { side, align } = parsePlacement(mergedPositioning.placement);
|
|
3979
|
+
const positioningValue = React32.useMemo(() => ({
|
|
4194
3980
|
side,
|
|
4195
3981
|
align,
|
|
4196
3982
|
sideOffset: mergedPositioning.offset?.mainAxis ?? 4,
|
|
@@ -4207,12 +3993,12 @@ var PopoverRoot = (props) => {
|
|
|
4207
3993
|
autoFocus,
|
|
4208
3994
|
closeOnInteractOutside
|
|
4209
3995
|
]);
|
|
4210
|
-
const handleOpenChange =
|
|
3996
|
+
const handleOpenChange = React32.useCallback((isOpen) => {
|
|
4211
3997
|
onOpenChange?.({ open: isOpen });
|
|
4212
3998
|
}, [onOpenChange]);
|
|
4213
3999
|
const placement = mergedPositioning.placement ?? "bottom-start";
|
|
4214
4000
|
const offset = mergedPositioning.offset?.mainAxis ?? 4;
|
|
4215
|
-
return /* @__PURE__ */ jsx(
|
|
4001
|
+
return /* @__PURE__ */ jsx(PositioningContext.Provider, { value: positioningValue, children: /* @__PURE__ */ jsx(
|
|
4216
4002
|
Popover,
|
|
4217
4003
|
{
|
|
4218
4004
|
open,
|
|
@@ -4225,11 +4011,11 @@ var PopoverRoot = (props) => {
|
|
|
4225
4011
|
}
|
|
4226
4012
|
) });
|
|
4227
4013
|
};
|
|
4228
|
-
var PopoverTrigger =
|
|
4014
|
+
var PopoverTrigger = React32.forwardRef(function PopoverTrigger2(props, ref) {
|
|
4229
4015
|
const { asChild = true, ...rest } = props;
|
|
4230
4016
|
return /* @__PURE__ */ jsx(Popover.Trigger, { asChild: asChild ? "except-style" : void 0, ref, ...rest });
|
|
4231
4017
|
});
|
|
4232
|
-
var PopoverContent =
|
|
4018
|
+
var PopoverContent = React32.forwardRef(function PopoverContent2(props, ref) {
|
|
4233
4019
|
const { portalled = true, portalRef: _portalRef, className, w, minW, maxW, paddingTop, style: styleProp, ...rest } = props;
|
|
4234
4020
|
const resolvedW = typeof w === "object" ? w.base ?? w.lg : w;
|
|
4235
4021
|
const contentStyle = {
|
|
@@ -4247,7 +4033,7 @@ var PopoverContent = React33.forwardRef(function PopoverContent2(props, ref) {
|
|
|
4247
4033
|
className: cn(
|
|
4248
4034
|
"z-50 rounded-lg border border-[var(--color-popover-border,var(--color-border-divider))]",
|
|
4249
4035
|
"bg-[var(--color-popover-bg,var(--color-dialog-bg))]",
|
|
4250
|
-
"shadow-[var(--shadow-popover
|
|
4036
|
+
"shadow-[var(--shadow-popover)]",
|
|
4251
4037
|
"outline-none",
|
|
4252
4038
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
4253
4039
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
@@ -4260,7 +4046,7 @@ var PopoverContent = React33.forwardRef(function PopoverContent2(props, ref) {
|
|
|
4260
4046
|
}
|
|
4261
4047
|
);
|
|
4262
4048
|
});
|
|
4263
|
-
var PopoverArrow =
|
|
4049
|
+
var PopoverArrow = React32.forwardRef(function PopoverArrow2(props, ref) {
|
|
4264
4050
|
const { className, ...rest } = props;
|
|
4265
4051
|
return /* @__PURE__ */ jsx(
|
|
4266
4052
|
Popover.Arrow,
|
|
@@ -4272,7 +4058,7 @@ var PopoverArrow = React33.forwardRef(function PopoverArrow2(props, ref) {
|
|
|
4272
4058
|
}
|
|
4273
4059
|
);
|
|
4274
4060
|
});
|
|
4275
|
-
var PopoverCloseTrigger =
|
|
4061
|
+
var PopoverCloseTrigger = React32.forwardRef(function PopoverCloseTrigger2(props, ref) {
|
|
4276
4062
|
const { className, ...rest } = props;
|
|
4277
4063
|
return /* @__PURE__ */ jsx(
|
|
4278
4064
|
Popover.Close,
|
|
@@ -4286,14 +4072,14 @@ var PopoverCloseTrigger = React33.forwardRef(function PopoverCloseTrigger2(props
|
|
|
4286
4072
|
}
|
|
4287
4073
|
);
|
|
4288
4074
|
});
|
|
4289
|
-
var PopoverCloseTriggerWrapper =
|
|
4075
|
+
var PopoverCloseTriggerWrapper = React32.forwardRef(function PopoverCloseTriggerWrapper2(props, ref) {
|
|
4290
4076
|
const { disabled, children, ...rest } = props;
|
|
4291
4077
|
if (disabled) {
|
|
4292
4078
|
return children;
|
|
4293
4079
|
}
|
|
4294
4080
|
return /* @__PURE__ */ jsx(Popover.Close, { ref, ...rest, asChild: true, children });
|
|
4295
4081
|
});
|
|
4296
|
-
var PopoverBody =
|
|
4082
|
+
var PopoverBody = React32.forwardRef(function PopoverBody2(props, ref) {
|
|
4297
4083
|
const {
|
|
4298
4084
|
className,
|
|
4299
4085
|
style: styleProp,
|
|
@@ -4331,7 +4117,7 @@ var PopoverBody = React33.forwardRef(function PopoverBody2(props, ref) {
|
|
|
4331
4117
|
}
|
|
4332
4118
|
);
|
|
4333
4119
|
});
|
|
4334
|
-
var PopoverHeader =
|
|
4120
|
+
var PopoverHeader = React32.forwardRef(function PopoverHeader2(props, ref) {
|
|
4335
4121
|
const { className, ...rest } = props;
|
|
4336
4122
|
return /* @__PURE__ */ jsx(
|
|
4337
4123
|
"div",
|
|
@@ -4342,7 +4128,7 @@ var PopoverHeader = React33.forwardRef(function PopoverHeader2(props, ref) {
|
|
|
4342
4128
|
}
|
|
4343
4129
|
);
|
|
4344
4130
|
});
|
|
4345
|
-
var PopoverFooter =
|
|
4131
|
+
var PopoverFooter = React32.forwardRef(function PopoverFooter2(props, ref) {
|
|
4346
4132
|
const { className, ...rest } = props;
|
|
4347
4133
|
return /* @__PURE__ */ jsx(
|
|
4348
4134
|
"div",
|
|
@@ -4353,7 +4139,7 @@ var PopoverFooter = React33.forwardRef(function PopoverFooter2(props, ref) {
|
|
|
4353
4139
|
}
|
|
4354
4140
|
);
|
|
4355
4141
|
});
|
|
4356
|
-
var PopoverTitle =
|
|
4142
|
+
var PopoverTitle = React32.forwardRef(function PopoverTitle2(props, ref) {
|
|
4357
4143
|
const { className, ...rest } = props;
|
|
4358
4144
|
return /* @__PURE__ */ jsx(
|
|
4359
4145
|
"h3",
|
|
@@ -4364,7 +4150,7 @@ var PopoverTitle = React33.forwardRef(function PopoverTitle2(props, ref) {
|
|
|
4364
4150
|
}
|
|
4365
4151
|
);
|
|
4366
4152
|
});
|
|
4367
|
-
var PopoverDescription =
|
|
4153
|
+
var PopoverDescription = React32.forwardRef(function PopoverDescription2(props, ref) {
|
|
4368
4154
|
const { className, ...rest } = props;
|
|
4369
4155
|
return /* @__PURE__ */ jsx(
|
|
4370
4156
|
"p",
|
|
@@ -4375,7 +4161,7 @@ var PopoverDescription = React33.forwardRef(function PopoverDescription2(props,
|
|
|
4375
4161
|
}
|
|
4376
4162
|
);
|
|
4377
4163
|
});
|
|
4378
|
-
var
|
|
4164
|
+
var SIZE_CLASSES6 = {
|
|
4379
4165
|
sm: "h-1",
|
|
4380
4166
|
md: "h-2",
|
|
4381
4167
|
lg: "h-3",
|
|
@@ -4386,7 +4172,7 @@ function normalizeValue(value, min, max) {
|
|
|
4386
4172
|
if (max <= min) return 0;
|
|
4387
4173
|
return Math.round((value - min) / (max - min) * 100);
|
|
4388
4174
|
}
|
|
4389
|
-
var Progress =
|
|
4175
|
+
var Progress = React32.forwardRef(
|
|
4390
4176
|
function Progress2(props, ref) {
|
|
4391
4177
|
const {
|
|
4392
4178
|
value,
|
|
@@ -4434,7 +4220,7 @@ var Progress = React33.forwardRef(
|
|
|
4434
4220
|
className: cn(
|
|
4435
4221
|
"w-full overflow-hidden rounded-full",
|
|
4436
4222
|
"bg-[var(--color-progress-track)]",
|
|
4437
|
-
|
|
4223
|
+
SIZE_CLASSES6[size],
|
|
4438
4224
|
trackProps?.className
|
|
4439
4225
|
),
|
|
4440
4226
|
style: trackStyle,
|
|
@@ -4465,12 +4251,12 @@ var SIZE_MAP = {
|
|
|
4465
4251
|
lg: { size: 48, thickness: 7, textClass: "text-sm" },
|
|
4466
4252
|
xl: { size: 64, thickness: 8, textClass: "text-sm" }
|
|
4467
4253
|
};
|
|
4468
|
-
var Ctx =
|
|
4254
|
+
var Ctx = React32.createContext({
|
|
4469
4255
|
value: 0,
|
|
4470
4256
|
size: "md",
|
|
4471
4257
|
colorPalette: "blue"
|
|
4472
4258
|
});
|
|
4473
|
-
var ProgressCircleRoot =
|
|
4259
|
+
var ProgressCircleRoot = React32.forwardRef(function ProgressCircleRoot2(props, ref) {
|
|
4474
4260
|
const {
|
|
4475
4261
|
value = 0,
|
|
4476
4262
|
size = "md",
|
|
@@ -4479,7 +4265,7 @@ var ProgressCircleRoot = React33.forwardRef(function ProgressCircleRoot2(props,
|
|
|
4479
4265
|
children,
|
|
4480
4266
|
...rest
|
|
4481
4267
|
} = props;
|
|
4482
|
-
const ctx =
|
|
4268
|
+
const ctx = React32.useMemo(
|
|
4483
4269
|
() => ({ value: value ?? null, size, colorPalette }),
|
|
4484
4270
|
[value, size, colorPalette]
|
|
4485
4271
|
);
|
|
@@ -4497,9 +4283,9 @@ var ProgressCircleRoot = React33.forwardRef(function ProgressCircleRoot2(props,
|
|
|
4497
4283
|
}
|
|
4498
4284
|
) });
|
|
4499
4285
|
});
|
|
4500
|
-
var ProgressCircleRing =
|
|
4286
|
+
var ProgressCircleRing = React32.forwardRef(function ProgressCircleRing2(props, ref) {
|
|
4501
4287
|
const { trackColor, cap, color, className, ...rest } = props;
|
|
4502
|
-
const { value, size: sizeKey } =
|
|
4288
|
+
const { value, size: sizeKey } = React32.useContext(Ctx);
|
|
4503
4289
|
const { size, thickness } = SIZE_MAP[sizeKey];
|
|
4504
4290
|
const radius = size / 2 - thickness / 2;
|
|
4505
4291
|
const circumference = 2 * Math.PI * radius;
|
|
@@ -4554,9 +4340,9 @@ var ProgressCircleRing = React33.forwardRef(function ProgressCircleRing2(props,
|
|
|
4554
4340
|
}
|
|
4555
4341
|
);
|
|
4556
4342
|
});
|
|
4557
|
-
var ProgressCircleValueText =
|
|
4343
|
+
var ProgressCircleValueText = React32.forwardRef(function ProgressCircleValueText2(props, ref) {
|
|
4558
4344
|
const { className, children, ...rest } = props;
|
|
4559
|
-
const { value, size: sizeKey } =
|
|
4345
|
+
const { value, size: sizeKey } = React32.useContext(Ctx);
|
|
4560
4346
|
const { textClass } = SIZE_MAP[sizeKey];
|
|
4561
4347
|
return /* @__PURE__ */ jsx(
|
|
4562
4348
|
"div",
|
|
@@ -4574,7 +4360,7 @@ var ProgressCircleValueText = React33.forwardRef(function ProgressCircleValueTex
|
|
|
4574
4360
|
}
|
|
4575
4361
|
);
|
|
4576
4362
|
});
|
|
4577
|
-
var
|
|
4363
|
+
var SIZE_CLASSES7 = {
|
|
4578
4364
|
xs: {
|
|
4579
4365
|
root: "gap-1.5",
|
|
4580
4366
|
control: "h-3 w-3",
|
|
@@ -4600,9 +4386,9 @@ var SIZE_CLASSES8 = {
|
|
|
4600
4386
|
label: "text-base"
|
|
4601
4387
|
}
|
|
4602
4388
|
};
|
|
4603
|
-
var RadioSizeContext =
|
|
4604
|
-
var RadioGroupBase =
|
|
4605
|
-
function
|
|
4389
|
+
var RadioSizeContext = React32.createContext("md");
|
|
4390
|
+
var RadioGroupBase = React32.forwardRef(
|
|
4391
|
+
function RadioGroup$1(props, ref) {
|
|
4606
4392
|
const {
|
|
4607
4393
|
children,
|
|
4608
4394
|
name,
|
|
@@ -4619,7 +4405,7 @@ var RadioGroupBase = React33.forwardRef(
|
|
|
4619
4405
|
className,
|
|
4620
4406
|
...rest
|
|
4621
4407
|
} = props;
|
|
4622
|
-
const handleValueChange =
|
|
4408
|
+
const handleValueChange = React32.useCallback(
|
|
4623
4409
|
(nextValue) => {
|
|
4624
4410
|
if (readOnly) return;
|
|
4625
4411
|
onValueChange?.({ value: nextValue });
|
|
@@ -4649,14 +4435,14 @@ var RadioGroupBase = React33.forwardRef(
|
|
|
4649
4435
|
) });
|
|
4650
4436
|
}
|
|
4651
4437
|
);
|
|
4652
|
-
var
|
|
4438
|
+
var RadioGroup2 = RadioGroupBase;
|
|
4653
4439
|
var NOOP2 = () => {
|
|
4654
4440
|
};
|
|
4655
|
-
var RadioBase =
|
|
4441
|
+
var RadioBase = React32.forwardRef(
|
|
4656
4442
|
function Radio(props, ref) {
|
|
4657
4443
|
const { children, inputProps, rootRef, value, disabled, className, ...rest } = props;
|
|
4658
|
-
const size =
|
|
4659
|
-
const sizeClasses2 =
|
|
4444
|
+
const size = React32.useContext(RadioSizeContext);
|
|
4445
|
+
const sizeClasses2 = SIZE_CLASSES7[size];
|
|
4660
4446
|
return /* @__PURE__ */ jsxs(
|
|
4661
4447
|
"label",
|
|
4662
4448
|
{
|
|
@@ -4719,23 +4505,23 @@ var RadioBase = React33.forwardRef(
|
|
|
4719
4505
|
var Radio2 = RadioBase;
|
|
4720
4506
|
var StarFilledIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
|
|
4721
4507
|
var StarOutlineIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z", strokeWidth: "1.5" }) });
|
|
4722
|
-
var Rating =
|
|
4508
|
+
var Rating = React32.forwardRef(
|
|
4723
4509
|
function Rating2(props, ref) {
|
|
4724
4510
|
const { count = 5, label: labelProp, defaultValue = 0, onValueChange, readOnly, className, ...rest } = props;
|
|
4725
|
-
const [value, setValue] =
|
|
4726
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
4511
|
+
const [value, setValue] = React32.useState(defaultValue);
|
|
4512
|
+
const [hoveredIndex, setHoveredIndex] = React32.useState(-1);
|
|
4727
4513
|
const highlightedIndex = hoveredIndex >= 0 && !readOnly ? hoveredIndex + 1 : value;
|
|
4728
4514
|
const label = Array.isArray(labelProp) ? labelProp[highlightedIndex - 1] : labelProp;
|
|
4729
|
-
const handleClick =
|
|
4515
|
+
const handleClick = React32.useCallback((index) => () => {
|
|
4730
4516
|
if (readOnly) return;
|
|
4731
4517
|
setValue(index);
|
|
4732
4518
|
onValueChange?.({ value: index });
|
|
4733
4519
|
}, [readOnly, onValueChange]);
|
|
4734
|
-
const handleMouseEnter =
|
|
4520
|
+
const handleMouseEnter = React32.useCallback((index) => () => {
|
|
4735
4521
|
if (readOnly) return;
|
|
4736
4522
|
setHoveredIndex(index);
|
|
4737
4523
|
}, [readOnly]);
|
|
4738
|
-
const handleMouseLeave =
|
|
4524
|
+
const handleMouseLeave = React32.useCallback(() => {
|
|
4739
4525
|
setHoveredIndex(-1);
|
|
4740
4526
|
}, []);
|
|
4741
4527
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("inline-flex items-center gap-1", className), ...rest, children: [
|
|
@@ -4769,8 +4555,8 @@ function createListCollection(config2) {
|
|
|
4769
4555
|
var ArrowIcon2 = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
4770
4556
|
var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M16.667 5L7.5 14.167 3.333 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
4771
4557
|
function FilterInput({ placeholder, initialValue = "", onChange }) {
|
|
4772
|
-
const [value, setValue] =
|
|
4773
|
-
const handleChange =
|
|
4558
|
+
const [value, setValue] = React32.useState(initialValue);
|
|
4559
|
+
const handleChange = React32.useCallback((e) => {
|
|
4774
4560
|
setValue(e.target.value);
|
|
4775
4561
|
onChange?.(e.target.value);
|
|
4776
4562
|
}, [onChange]);
|
|
@@ -4789,15 +4575,15 @@ function FilterInput({ placeholder, initialValue = "", onChange }) {
|
|
|
4789
4575
|
}
|
|
4790
4576
|
);
|
|
4791
4577
|
}
|
|
4792
|
-
var SelectInternalContext =
|
|
4578
|
+
var SelectInternalContext = React32.createContext(null);
|
|
4793
4579
|
function useSelectInternalContext() {
|
|
4794
|
-
const ctx =
|
|
4580
|
+
const ctx = React32.useContext(SelectInternalContext);
|
|
4795
4581
|
if (!ctx) {
|
|
4796
4582
|
throw new Error("Select compound components must be rendered inside <SelectRoot>");
|
|
4797
4583
|
}
|
|
4798
4584
|
return ctx;
|
|
4799
4585
|
}
|
|
4800
|
-
var SelectRoot =
|
|
4586
|
+
var SelectRoot = React32.forwardRef(
|
|
4801
4587
|
function SelectRoot2(props, ref) {
|
|
4802
4588
|
const {
|
|
4803
4589
|
children,
|
|
@@ -4828,21 +4614,21 @@ var SelectRoot = React33.forwardRef(
|
|
|
4828
4614
|
hideFrom: _hideFrom
|
|
4829
4615
|
} = props;
|
|
4830
4616
|
const collection = collectionProp ?? createListCollection({ items: [] });
|
|
4831
|
-
const [internalValue, setInternalValue] =
|
|
4617
|
+
const [internalValue, setInternalValue] = React32.useState(defaultValueArr ?? []);
|
|
4832
4618
|
const currentValue = valueProp ?? internalValue;
|
|
4833
|
-
const selectedItems =
|
|
4619
|
+
const selectedItems = React32.useMemo(() => {
|
|
4834
4620
|
return currentValue.map((v) => collection.items.find((item) => item.value === v)).filter(Boolean);
|
|
4835
4621
|
}, [currentValue, collection.items]);
|
|
4836
|
-
const [open, setOpen] =
|
|
4622
|
+
const [open, setOpen] = React32.useState(defaultOpen ?? false);
|
|
4837
4623
|
const isOpen = openProp ?? open;
|
|
4838
|
-
const handleOpenChange =
|
|
4624
|
+
const handleOpenChange = React32.useCallback((nextOpen) => {
|
|
4839
4625
|
setOpen(nextOpen);
|
|
4840
4626
|
onOpenChange?.(nextOpen);
|
|
4841
4627
|
if (!nextOpen) {
|
|
4842
4628
|
onInteractOutside?.();
|
|
4843
4629
|
}
|
|
4844
4630
|
}, [onOpenChange, onInteractOutside]);
|
|
4845
|
-
const handleRadixValueChange =
|
|
4631
|
+
const handleRadixValueChange = React32.useCallback((radixValue) => {
|
|
4846
4632
|
const nextArr = [radixValue];
|
|
4847
4633
|
if (!valueProp) {
|
|
4848
4634
|
setInternalValue(nextArr);
|
|
@@ -4850,7 +4636,7 @@ var SelectRoot = React33.forwardRef(
|
|
|
4850
4636
|
const items = collection.items.filter((item) => nextArr.includes(item.value));
|
|
4851
4637
|
onValueChangeProp?.({ value: nextArr, items });
|
|
4852
4638
|
}, [valueProp, collection.items, onValueChangeProp]);
|
|
4853
|
-
const ctxValue =
|
|
4639
|
+
const ctxValue = React32.useMemo(() => ({
|
|
4854
4640
|
value: currentValue,
|
|
4855
4641
|
selectedItems,
|
|
4856
4642
|
collection,
|
|
@@ -4870,7 +4656,7 @@ var SelectRoot = React33.forwardRef(
|
|
|
4870
4656
|
if (typeof v === "string") return v;
|
|
4871
4657
|
return v.base ?? v.lg ?? Object.values(v)[0];
|
|
4872
4658
|
};
|
|
4873
|
-
const inlineStyle =
|
|
4659
|
+
const inlineStyle = React32.useMemo(() => {
|
|
4874
4660
|
const s = { ...style };
|
|
4875
4661
|
const rw = resolveVal(w);
|
|
4876
4662
|
if (rw) s.width = rw;
|
|
@@ -4881,16 +4667,15 @@ var SelectRoot = React33.forwardRef(
|
|
|
4881
4667
|
return s;
|
|
4882
4668
|
}, [style, w, maxW, minW]);
|
|
4883
4669
|
return /* @__PURE__ */ jsx(SelectInternalContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(
|
|
4884
|
-
|
|
4670
|
+
Select$1,
|
|
4885
4671
|
{
|
|
4886
4672
|
value: currentValue[0] ?? "",
|
|
4887
4673
|
defaultValue: defaultValueArr?.[0],
|
|
4888
4674
|
onValueChange: handleRadixValueChange,
|
|
4889
4675
|
open: isOpen,
|
|
4890
4676
|
onOpenChange: handleOpenChange,
|
|
4891
|
-
|
|
4677
|
+
disablePreventBodyScroll: true,
|
|
4892
4678
|
name,
|
|
4893
|
-
required,
|
|
4894
4679
|
children: /* @__PURE__ */ jsx(
|
|
4895
4680
|
"div",
|
|
4896
4681
|
{
|
|
@@ -4908,17 +4693,18 @@ var SelectRoot = React33.forwardRef(
|
|
|
4908
4693
|
) });
|
|
4909
4694
|
}
|
|
4910
4695
|
);
|
|
4911
|
-
var SelectControl =
|
|
4696
|
+
var SelectControl = React32.forwardRef(
|
|
4912
4697
|
function SelectControl2(props, ref) {
|
|
4913
4698
|
const { children, noIndicator, triggerProps, loading, defaultValue } = props;
|
|
4914
4699
|
const ctx = useSelectInternalContext();
|
|
4915
4700
|
const isDefaultValue = Array.isArray(defaultValue) ? ctx.value.every((item) => defaultValue.includes(item)) : false;
|
|
4916
4701
|
const { asChild, px: _px, className: triggerClassName, ...radixTriggerProps } = triggerProps ?? {};
|
|
4917
4702
|
const trigger = /* @__PURE__ */ jsx(
|
|
4918
|
-
|
|
4703
|
+
Select$1.Trigger,
|
|
4919
4704
|
{
|
|
4920
4705
|
ref,
|
|
4921
4706
|
asChild,
|
|
4707
|
+
unstyled: true,
|
|
4922
4708
|
className: cn(
|
|
4923
4709
|
"group peer inline-flex items-center gap-2 cursor-pointer",
|
|
4924
4710
|
"rounded-lg text-sm transition-colors outline-none",
|
|
@@ -4945,11 +4731,11 @@ var SelectControl = React33.forwardRef(
|
|
|
4945
4731
|
return trigger;
|
|
4946
4732
|
}
|
|
4947
4733
|
);
|
|
4948
|
-
var SelectClearTrigger =
|
|
4734
|
+
var SelectClearTrigger = React32.forwardRef(
|
|
4949
4735
|
function SelectClearTrigger2(props, ref) {
|
|
4950
4736
|
const { className, ...rest } = props;
|
|
4951
4737
|
const ctx = useSelectInternalContext();
|
|
4952
|
-
const handleClick =
|
|
4738
|
+
const handleClick = React32.useCallback(() => {
|
|
4953
4739
|
ctx.onValueChange({ value: [], items: [] });
|
|
4954
4740
|
}, [ctx]);
|
|
4955
4741
|
return /* @__PURE__ */ jsx(
|
|
@@ -4966,42 +4752,44 @@ var SelectClearTrigger = React33.forwardRef(
|
|
|
4966
4752
|
);
|
|
4967
4753
|
}
|
|
4968
4754
|
);
|
|
4969
|
-
var SelectContent =
|
|
4970
|
-
function SelectContent2(props,
|
|
4971
|
-
const { portalled
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
}
|
|
4755
|
+
var SelectContent = React32.forwardRef(
|
|
4756
|
+
function SelectContent2(props, _ref) {
|
|
4757
|
+
const { portalled: _portalled, portalRef: _portalRef, children, className, ...rest } = props;
|
|
4758
|
+
let n = 0;
|
|
4759
|
+
const counter2 = () => n++;
|
|
4760
|
+
return (
|
|
4761
|
+
// Content is the focus scope — it takes no style props at all. The
|
|
4762
|
+
// Viewport is the box you can see, so the surface is declared there.
|
|
4763
|
+
/* @__PURE__ */ jsx(Select$1.Content, { ...rest, children: /* @__PURE__ */ jsx(
|
|
4764
|
+
Select$1.Viewport,
|
|
4765
|
+
{
|
|
4766
|
+
className: cn(
|
|
4767
|
+
"min-w-[8rem] overflow-hidden rounded-lg p-1",
|
|
4768
|
+
"bg-[var(--color-popover-bg)] shadow-[var(--shadow-popover)]",
|
|
4769
|
+
"border border-[var(--color-border-divider)]",
|
|
4770
|
+
className
|
|
4771
|
+
),
|
|
4772
|
+
children: stampIndices(children, counter2)
|
|
4773
|
+
}
|
|
4774
|
+
) })
|
|
4989
4775
|
);
|
|
4990
|
-
if (portalled) {
|
|
4991
|
-
return /* @__PURE__ */ jsx(RadixSelect.Portal, { container: portalRef?.current ?? void 0, children: content });
|
|
4992
|
-
}
|
|
4993
|
-
return content;
|
|
4994
4776
|
}
|
|
4995
4777
|
);
|
|
4996
|
-
var
|
|
4778
|
+
var stampIndices = (children, next) => React32.Children.map(children, (child) => {
|
|
4779
|
+
if (!React32.isValidElement(child)) return child;
|
|
4780
|
+
if (child.type === SelectItem) return React32.cloneElement(child, { index: next() });
|
|
4781
|
+
const kids = child.props.children;
|
|
4782
|
+
return kids === void 0 ? child : React32.cloneElement(child, void 0, stampIndices(kids, next));
|
|
4783
|
+
});
|
|
4784
|
+
var SelectItem = React32.forwardRef(
|
|
4997
4785
|
function SelectItem2(props, ref) {
|
|
4998
|
-
const { item, children, className, ...rest } = props;
|
|
4786
|
+
const { item, children, className, index, ...rest } = props;
|
|
4999
4787
|
return /* @__PURE__ */ jsxs(
|
|
5000
|
-
|
|
4788
|
+
Select$1.Item,
|
|
5001
4789
|
{
|
|
5002
4790
|
ref,
|
|
4791
|
+
index: index ?? 0,
|
|
5003
4792
|
value: item.value,
|
|
5004
|
-
textValue: item.label,
|
|
5005
4793
|
className: cn(
|
|
5006
4794
|
"relative flex cursor-pointer select-none items-center gap-2",
|
|
5007
4795
|
"rounded-md px-3 py-2 text-sm outline-none",
|
|
@@ -5014,14 +4802,14 @@ var SelectItem = React33.forwardRef(
|
|
|
5014
4802
|
...rest,
|
|
5015
4803
|
children: [
|
|
5016
4804
|
item.icon,
|
|
5017
|
-
/* @__PURE__ */ jsx(
|
|
5018
|
-
/* @__PURE__ */ jsx(
|
|
4805
|
+
/* @__PURE__ */ jsx(Select$1.ItemText, { children: children ?? item.label }),
|
|
4806
|
+
/* @__PURE__ */ jsx(Select$1.ItemIndicator, { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx(CheckIcon2, { className: "h-5 w-5" }) })
|
|
5019
4807
|
]
|
|
5020
4808
|
}
|
|
5021
4809
|
);
|
|
5022
4810
|
}
|
|
5023
4811
|
);
|
|
5024
|
-
var SelectValueText =
|
|
4812
|
+
var SelectValueText = React32.forwardRef(
|
|
5025
4813
|
function SelectValueText2(props, ref) {
|
|
5026
4814
|
const { children, size, required, invalid, errorText, mode, className, style, placeholder: placeholderProp, ...rest } = props;
|
|
5027
4815
|
const ctx = useSelectInternalContext();
|
|
@@ -5066,7 +4854,7 @@ var SelectValueText = React33.forwardRef(
|
|
|
5066
4854
|
return `${items.length} selected`;
|
|
5067
4855
|
})();
|
|
5068
4856
|
return /* @__PURE__ */ jsx(
|
|
5069
|
-
|
|
4857
|
+
Select$1.Value,
|
|
5070
4858
|
{
|
|
5071
4859
|
ref,
|
|
5072
4860
|
placeholder: placeholderText,
|
|
@@ -5077,18 +4865,18 @@ var SelectValueText = React33.forwardRef(
|
|
|
5077
4865
|
);
|
|
5078
4866
|
}
|
|
5079
4867
|
);
|
|
5080
|
-
var SelectItemGroup =
|
|
4868
|
+
var SelectItemGroup = React32.forwardRef(
|
|
5081
4869
|
function SelectItemGroup2(props, ref) {
|
|
5082
4870
|
const { children, label, className, ...rest } = props;
|
|
5083
|
-
return /* @__PURE__ */ jsxs(
|
|
5084
|
-
/* @__PURE__ */ jsx(
|
|
4871
|
+
return /* @__PURE__ */ jsxs(Select$1.Group, { ref, className: cn("py-1", className), ...rest, children: [
|
|
4872
|
+
/* @__PURE__ */ jsx(Select$1.Label, { className: "px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)]", children: label }),
|
|
5085
4873
|
children
|
|
5086
4874
|
] });
|
|
5087
4875
|
}
|
|
5088
4876
|
);
|
|
5089
|
-
var SelectLabel =
|
|
5090
|
-
var SelectItemText =
|
|
5091
|
-
var Select =
|
|
4877
|
+
var SelectLabel = Select$1.Label;
|
|
4878
|
+
var SelectItemText = Select$1.ItemText;
|
|
4879
|
+
var Select = React32.forwardRef((props, ref) => {
|
|
5092
4880
|
const { collection, placeholder, portalled = true, loading, errorText, contentProps, contentHeader, itemFilter, mode, ...rest } = props;
|
|
5093
4881
|
return /* @__PURE__ */ jsxs(
|
|
5094
4882
|
SelectRoot,
|
|
@@ -5110,7 +4898,7 @@ var Select = React33.forwardRef((props, ref) => {
|
|
|
5110
4898
|
) }),
|
|
5111
4899
|
/* @__PURE__ */ jsxs(SelectContent, { portalled, ...contentProps, children: [
|
|
5112
4900
|
contentHeader,
|
|
5113
|
-
collection.items.filter(itemFilter ?? (() => true)).map((item) => /* @__PURE__ */ jsxs(
|
|
4901
|
+
collection.items.filter(itemFilter ?? (() => true)).map((item) => /* @__PURE__ */ jsxs(React32.Fragment, { children: [
|
|
5114
4902
|
/* @__PURE__ */ jsx(SelectItem, { item, children: item.renderLabel ? item.renderLabel("item") : item.label }),
|
|
5115
4903
|
item.afterElement
|
|
5116
4904
|
] }, item.value))
|
|
@@ -5119,19 +4907,19 @@ var Select = React33.forwardRef((props, ref) => {
|
|
|
5119
4907
|
}
|
|
5120
4908
|
);
|
|
5121
4909
|
});
|
|
5122
|
-
var SelectAsync =
|
|
4910
|
+
var SelectAsync = React32.forwardRef((props, ref) => {
|
|
5123
4911
|
const { placeholder, portalled = true, loading, loadOptions, extraControls, onValueChange, errorText, mode, contentHeader, ...rest } = props;
|
|
5124
|
-
const [collection, setCollection] =
|
|
5125
|
-
const [inputValue, setInputValue] =
|
|
5126
|
-
const [value, setValue] =
|
|
4912
|
+
const [collection, setCollection] = React32.useState(createListCollection({ items: [] }));
|
|
4913
|
+
const [inputValue, setInputValue] = React32.useState("");
|
|
4914
|
+
const [value, setValue] = React32.useState([]);
|
|
5127
4915
|
const debouncedInputValue = useDebounce(inputValue, 300);
|
|
5128
|
-
|
|
4916
|
+
React32.useEffect(() => {
|
|
5129
4917
|
loadOptions(debouncedInputValue, value).then(setCollection);
|
|
5130
4918
|
}, [debouncedInputValue, loadOptions, value]);
|
|
5131
|
-
const handleFilterChange =
|
|
4919
|
+
const handleFilterChange = React32.useCallback((val) => {
|
|
5132
4920
|
setInputValue(val);
|
|
5133
4921
|
}, []);
|
|
5134
|
-
const handleValueChange =
|
|
4922
|
+
const handleValueChange = React32.useCallback(({ value: v, items }) => {
|
|
5135
4923
|
setValue(v);
|
|
5136
4924
|
onValueChange?.({ value: v, items });
|
|
5137
4925
|
}, [onValueChange]);
|
|
@@ -5173,47 +4961,27 @@ var SelectAsync = React33.forwardRef((props, ref) => {
|
|
|
5173
4961
|
}
|
|
5174
4962
|
);
|
|
5175
4963
|
});
|
|
5176
|
-
var
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
};
|
|
5181
|
-
var HORIZONTAL_SIZE_CLASSES = {
|
|
5182
|
-
xs: "border-t-[0.5px]",
|
|
5183
|
-
sm: "border-t",
|
|
5184
|
-
md: "border-t-2",
|
|
5185
|
-
lg: "border-t-[3px]"
|
|
5186
|
-
};
|
|
5187
|
-
var VERTICAL_SIZE_CLASSES = {
|
|
5188
|
-
xs: "border-l-[0.5px]",
|
|
5189
|
-
sm: "border-l",
|
|
5190
|
-
md: "border-l-2",
|
|
5191
|
-
lg: "border-l-[3px]"
|
|
5192
|
-
};
|
|
5193
|
-
var Separator2 = React33__default.forwardRef(
|
|
5194
|
-
function Separator3({ orientation = "horizontal", variant = "solid", size = "sm", className, ...rest }, ref) {
|
|
5195
|
-
const isVertical = orientation === "vertical";
|
|
4964
|
+
var WEIGHT = { xs: 0.5, sm: 1, md: 2, lg: 3 };
|
|
4965
|
+
var Separator = React32__default.forwardRef(
|
|
4966
|
+
function Separator2({ orientation = "horizontal", variant = "solid", size = "sm", ...rest }, ref) {
|
|
4967
|
+
const vertical = orientation === "vertical";
|
|
5196
4968
|
return /* @__PURE__ */ jsx(
|
|
5197
|
-
Separator,
|
|
4969
|
+
Separator$1,
|
|
5198
4970
|
{
|
|
5199
4971
|
ref,
|
|
5200
|
-
vertical
|
|
4972
|
+
vertical,
|
|
5201
4973
|
role: "separator",
|
|
5202
4974
|
"aria-orientation": orientation,
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
isVertical ? VERTICAL_SIZE_CLASSES[size] : HORIZONTAL_SIZE_CLASSES[size],
|
|
5208
|
-
isVertical ? "self-stretch h-auto w-0" : "w-full",
|
|
5209
|
-
className
|
|
5210
|
-
),
|
|
4975
|
+
borderWidth: 0,
|
|
4976
|
+
borderStyle: variant,
|
|
4977
|
+
borderColor: "var(--color-border-divider)",
|
|
4978
|
+
...vertical ? { borderLeftWidth: WEIGHT[size], alignSelf: "stretch", height: "auto", width: 0 } : { borderTopWidth: WEIGHT[size], width: "100%" },
|
|
5211
4979
|
...rest
|
|
5212
4980
|
}
|
|
5213
4981
|
);
|
|
5214
4982
|
}
|
|
5215
4983
|
);
|
|
5216
|
-
var Slider =
|
|
4984
|
+
var Slider = React32.forwardRef(
|
|
5217
4985
|
function Slider2(props, ref) {
|
|
5218
4986
|
const {
|
|
5219
4987
|
marks: marksProp,
|
|
@@ -5237,12 +5005,12 @@ var Slider = React33.forwardRef(
|
|
|
5237
5005
|
return mark;
|
|
5238
5006
|
});
|
|
5239
5007
|
const hasMarkLabel = Boolean(marks?.some((mark) => mark.label));
|
|
5240
|
-
const latest =
|
|
5241
|
-
const handleValueChange =
|
|
5008
|
+
const latest = React32.useRef(value ?? defaultValue ?? []);
|
|
5009
|
+
const handleValueChange = React32.useCallback((next) => {
|
|
5242
5010
|
latest.current = next;
|
|
5243
5011
|
onValueChange?.(next);
|
|
5244
5012
|
}, [onValueChange]);
|
|
5245
|
-
const handleSlideEnd =
|
|
5013
|
+
const handleSlideEnd = React32.useCallback(() => {
|
|
5246
5014
|
onValueCommit?.(latest.current);
|
|
5247
5015
|
}, [onValueCommit]);
|
|
5248
5016
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
@@ -5330,7 +5098,7 @@ function SliderMarks(props) {
|
|
|
5330
5098
|
}
|
|
5331
5099
|
var NOOP3 = () => {
|
|
5332
5100
|
};
|
|
5333
|
-
var
|
|
5101
|
+
var SIZE_CLASSES8 = {
|
|
5334
5102
|
sm: {
|
|
5335
5103
|
root: "h-4 w-7",
|
|
5336
5104
|
thumb: "h-3 w-3",
|
|
@@ -5347,7 +5115,7 @@ var SIZE_CLASSES9 = {
|
|
|
5347
5115
|
label: "text-base"
|
|
5348
5116
|
}
|
|
5349
5117
|
};
|
|
5350
|
-
var SwitchBase =
|
|
5118
|
+
var SwitchBase = React32.forwardRef(
|
|
5351
5119
|
function Switch$1(props, ref) {
|
|
5352
5120
|
const {
|
|
5353
5121
|
inputProps,
|
|
@@ -5366,10 +5134,10 @@ var SwitchBase = React33.forwardRef(
|
|
|
5366
5134
|
className,
|
|
5367
5135
|
...rest
|
|
5368
5136
|
} = props;
|
|
5369
|
-
const [internalChecked, setInternalChecked] =
|
|
5137
|
+
const [internalChecked, setInternalChecked] = React32.useState(defaultChecked ?? false);
|
|
5370
5138
|
const isControlled = checkedProp !== void 0;
|
|
5371
5139
|
const checkedState = isControlled ? checkedProp : internalChecked;
|
|
5372
|
-
const handleCheckedChange =
|
|
5140
|
+
const handleCheckedChange = React32.useCallback(
|
|
5373
5141
|
(nextChecked) => {
|
|
5374
5142
|
if (!isControlled) {
|
|
5375
5143
|
setInternalChecked(nextChecked);
|
|
@@ -5378,7 +5146,7 @@ var SwitchBase = React33.forwardRef(
|
|
|
5378
5146
|
},
|
|
5379
5147
|
[isControlled, onCheckedChange]
|
|
5380
5148
|
);
|
|
5381
|
-
const sizeClasses2 =
|
|
5149
|
+
const sizeClasses2 = SIZE_CLASSES8[size];
|
|
5382
5150
|
const isRtl = direction === "rtl";
|
|
5383
5151
|
return /* @__PURE__ */ jsxs(
|
|
5384
5152
|
"label",
|
|
@@ -5634,7 +5402,7 @@ function resolveResponsive(value) {
|
|
|
5634
5402
|
}
|
|
5635
5403
|
return void 0;
|
|
5636
5404
|
}
|
|
5637
|
-
var TableRoot =
|
|
5405
|
+
var TableRoot = React32.forwardRef(
|
|
5638
5406
|
function TableRoot2(props, ref) {
|
|
5639
5407
|
const { className, style: styleProp, children, ...other } = props;
|
|
5640
5408
|
const rawMinW = other.minWidth ?? other.minW;
|
|
@@ -5657,7 +5425,7 @@ var TableRoot = React33.forwardRef(
|
|
|
5657
5425
|
);
|
|
5658
5426
|
}
|
|
5659
5427
|
);
|
|
5660
|
-
var TableHeader =
|
|
5428
|
+
var TableHeader = React32.forwardRef(
|
|
5661
5429
|
function TableHeader2(props, ref) {
|
|
5662
5430
|
const { className, style: styleProp, children, ...other } = props;
|
|
5663
5431
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5674,7 +5442,7 @@ var TableHeader = React33.forwardRef(
|
|
|
5674
5442
|
);
|
|
5675
5443
|
}
|
|
5676
5444
|
);
|
|
5677
|
-
var TableBody =
|
|
5445
|
+
var TableBody = React32.forwardRef(
|
|
5678
5446
|
function TableBody2(props, ref) {
|
|
5679
5447
|
const { className, style: styleProp, children, ...other } = props;
|
|
5680
5448
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5691,7 +5459,7 @@ var TableBody = React33.forwardRef(
|
|
|
5691
5459
|
);
|
|
5692
5460
|
}
|
|
5693
5461
|
);
|
|
5694
|
-
var TableRow =
|
|
5462
|
+
var TableRow = React32.forwardRef(
|
|
5695
5463
|
function TableRow2(props, ref) {
|
|
5696
5464
|
const { className, style: styleProp, children, ...other } = props;
|
|
5697
5465
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5708,7 +5476,7 @@ var TableRow = React33.forwardRef(
|
|
|
5708
5476
|
);
|
|
5709
5477
|
}
|
|
5710
5478
|
);
|
|
5711
|
-
var TableCell =
|
|
5479
|
+
var TableCell = React32.forwardRef(
|
|
5712
5480
|
function TableCell2(props, ref) {
|
|
5713
5481
|
const { isNumeric, className, style: styleProp, children, ...other } = props;
|
|
5714
5482
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5729,7 +5497,7 @@ var TableCell = React33.forwardRef(
|
|
|
5729
5497
|
);
|
|
5730
5498
|
}
|
|
5731
5499
|
);
|
|
5732
|
-
var TableColumnHeader =
|
|
5500
|
+
var TableColumnHeader = React32.forwardRef(
|
|
5733
5501
|
function TableColumnHeader2(props, ref) {
|
|
5734
5502
|
const { isNumeric, className, style: styleProp, children, ...other } = props;
|
|
5735
5503
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5756,7 +5524,7 @@ var TableColumnHeader = React33.forwardRef(
|
|
|
5756
5524
|
);
|
|
5757
5525
|
var TableColumnHeaderSortable = (props) => {
|
|
5758
5526
|
const { sortField, sortValue, onSortToggle, children, disabled, indicatorPosition = "left", contentAfter, ...rest } = props;
|
|
5759
|
-
const handleSortToggle =
|
|
5527
|
+
const handleSortToggle = React32.useCallback(() => {
|
|
5760
5528
|
onSortToggle(sortField);
|
|
5761
5529
|
}, [onSortToggle, sortField]);
|
|
5762
5530
|
const isActive = sortValue.includes(sortField);
|
|
@@ -5782,16 +5550,16 @@ var TableColumnHeaderSortable = (props) => {
|
|
|
5782
5550
|
var ACTION_BAR_SHADOW = "0 4px 4px -4px rgb(0 0 0 / 10%), 0 2px 4px -4px rgb(0 0 0 / 6%)";
|
|
5783
5551
|
var TableHeaderSticky = (props) => {
|
|
5784
5552
|
const { top, children, className, style: styleProp, ...rest } = props;
|
|
5785
|
-
const ref =
|
|
5786
|
-
const [isStuck, setIsStuck] =
|
|
5787
|
-
const handleScroll =
|
|
5553
|
+
const ref = React32.useRef(null);
|
|
5554
|
+
const [isStuck, setIsStuck] = React32.useState(false);
|
|
5555
|
+
const handleScroll = React32.useCallback(() => {
|
|
5788
5556
|
if (Number(ref.current?.getBoundingClientRect().y) <= (Number(top) || 0)) {
|
|
5789
5557
|
setIsStuck(true);
|
|
5790
5558
|
} else {
|
|
5791
5559
|
setIsStuck(false);
|
|
5792
5560
|
}
|
|
5793
5561
|
}, [top]);
|
|
5794
|
-
|
|
5562
|
+
React32.useEffect(() => {
|
|
5795
5563
|
const throttledHandleScroll = throttle(handleScroll, 300);
|
|
5796
5564
|
window.addEventListener("scroll", throttledHandleScroll);
|
|
5797
5565
|
return () => {
|
|
@@ -5813,7 +5581,7 @@ var TableHeaderSticky = (props) => {
|
|
|
5813
5581
|
}
|
|
5814
5582
|
);
|
|
5815
5583
|
};
|
|
5816
|
-
var TableCaption =
|
|
5584
|
+
var TableCaption = React32.forwardRef(
|
|
5817
5585
|
function TableCaption2(props, ref) {
|
|
5818
5586
|
const { className, style: styleProp, children, ...other } = props;
|
|
5819
5587
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5830,7 +5598,7 @@ var TableCaption = React33.forwardRef(
|
|
|
5830
5598
|
);
|
|
5831
5599
|
}
|
|
5832
5600
|
);
|
|
5833
|
-
var TableFooter =
|
|
5601
|
+
var TableFooter = React32.forwardRef(
|
|
5834
5602
|
function TableFooter2(props, ref) {
|
|
5835
5603
|
const { className, style: styleProp, children, ...other } = props;
|
|
5836
5604
|
const { style: extracted, rest } = extractStyles(other);
|
|
@@ -5847,7 +5615,7 @@ var TableFooter = React33.forwardRef(
|
|
|
5847
5615
|
);
|
|
5848
5616
|
}
|
|
5849
5617
|
);
|
|
5850
|
-
var TableScrollWrapper =
|
|
5618
|
+
var TableScrollWrapper = React32.forwardRef(
|
|
5851
5619
|
function TableScrollWrapper2(props, ref) {
|
|
5852
5620
|
const { className, children, ...rest } = props;
|
|
5853
5621
|
return /* @__PURE__ */ jsx(
|
|
@@ -5861,206 +5629,115 @@ var TableScrollWrapper = React33.forwardRef(
|
|
|
5861
5629
|
);
|
|
5862
5630
|
}
|
|
5863
5631
|
);
|
|
5864
|
-
var
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
};
|
|
5869
|
-
var
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
size = "md",
|
|
5874
|
-
fitted,
|
|
5875
|
-
lazyMount: _lazyMount,
|
|
5876
|
-
unmountOnExit: _unmountOnExit,
|
|
5877
|
-
onValueChange,
|
|
5878
|
-
className,
|
|
5879
|
-
...rest
|
|
5880
|
-
} = props;
|
|
5881
|
-
const handleValueChange = React33.useCallback(
|
|
5882
|
-
(value) => {
|
|
5883
|
-
if (!onValueChange) return;
|
|
5884
|
-
onValueChange({ value });
|
|
5885
|
-
},
|
|
5886
|
-
[onValueChange]
|
|
5887
|
-
);
|
|
5888
|
-
return /* @__PURE__ */ jsx(
|
|
5889
|
-
RadixTabs.Root,
|
|
5890
|
-
{
|
|
5891
|
-
ref,
|
|
5892
|
-
"data-variant": variant,
|
|
5893
|
-
"data-size": size,
|
|
5894
|
-
"data-fitted": fitted ? "" : void 0,
|
|
5895
|
-
className: cn(
|
|
5896
|
-
"relative",
|
|
5897
|
-
ROOT_SIZE_CLASSES[size],
|
|
5898
|
-
className
|
|
5899
|
-
),
|
|
5900
|
-
onValueChange: onValueChange ? handleValueChange : void 0,
|
|
5901
|
-
...rest
|
|
5902
|
-
}
|
|
5903
|
-
);
|
|
5904
|
-
}
|
|
5905
|
-
);
|
|
5906
|
-
var TabsList = React33.forwardRef(
|
|
5907
|
-
function TabsList2(props, ref) {
|
|
5908
|
-
const {
|
|
5909
|
-
className,
|
|
5910
|
-
// Strip Chakra style props
|
|
5911
|
-
flexWrap: _flexWrap,
|
|
5912
|
-
alignItems: _alignItems,
|
|
5913
|
-
whiteSpace: _whiteSpace,
|
|
5914
|
-
bgColor: _bgColor,
|
|
5915
|
-
marginBottom: _marginBottom,
|
|
5916
|
-
mx: _mx,
|
|
5917
|
-
px: _px,
|
|
5918
|
-
w: _w,
|
|
5919
|
-
overflowX: _overflowX,
|
|
5920
|
-
overscrollBehaviorX: _overscrollBehaviorX,
|
|
5921
|
-
css: _css,
|
|
5922
|
-
position: _position,
|
|
5923
|
-
boxShadow: _boxShadow,
|
|
5924
|
-
top: _top,
|
|
5925
|
-
zIndex: _zIndex,
|
|
5926
|
-
style: styleProp,
|
|
5927
|
-
asChild,
|
|
5928
|
-
loop,
|
|
5929
|
-
...rest
|
|
5930
|
-
} = props;
|
|
5931
|
-
return /* @__PURE__ */ jsx(
|
|
5932
|
-
RadixTabs.List,
|
|
5933
|
-
{
|
|
5934
|
-
ref,
|
|
5935
|
-
asChild,
|
|
5936
|
-
loop,
|
|
5937
|
-
className: cn(
|
|
5938
|
-
"inline-flex w-full relative isolate flex-row",
|
|
5939
|
-
"min-h-[var(--tabs-height,2.5rem)]",
|
|
5940
|
-
className
|
|
5941
|
-
),
|
|
5942
|
-
style: styleProp,
|
|
5943
|
-
...rest
|
|
5944
|
-
}
|
|
5945
|
-
);
|
|
5946
|
-
}
|
|
5947
|
-
);
|
|
5948
|
-
var TRIGGER_BASE = "outline-none min-w-[var(--tabs-height,2.5rem)] h-[var(--tabs-height,2.5rem)] flex items-center relative cursor-pointer gap-2 focus-visible:z-[1] focus-visible:outline-2 focus-visible:outline-offset-0 disabled:cursor-not-allowed disabled:opacity-50";
|
|
5949
|
-
var TRIGGER_SIZE_CLASSES = {
|
|
5950
|
-
sm: "py-1 px-3 text-sm",
|
|
5951
|
-
md: "py-2 px-4 text-base",
|
|
5952
|
-
free: ""
|
|
5632
|
+
var Shape = React32.createContext({
|
|
5633
|
+
variant: "solid",
|
|
5634
|
+
size: "md",
|
|
5635
|
+
fitted: false
|
|
5636
|
+
});
|
|
5637
|
+
var SIZE2 = {
|
|
5638
|
+
sm: { height: 32, minWidth: 32, paddingVertical: 4, paddingHorizontal: 12, fontSize: 14 },
|
|
5639
|
+
md: { height: 40, minWidth: 40, paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },
|
|
5640
|
+
free: {}
|
|
5953
5641
|
};
|
|
5954
|
-
var
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5642
|
+
var SELECTED_BG2 = "var(--color-selected-control-bg)";
|
|
5643
|
+
var SELECTED_FG2 = "var(--color-selected-control-text)";
|
|
5644
|
+
var VARIANT3 = {
|
|
5645
|
+
solid: {
|
|
5646
|
+
rest: {
|
|
5647
|
+
fontWeight: "600",
|
|
5648
|
+
borderRadius: 6,
|
|
5649
|
+
color: "var(--color-tabs-solid-fg)",
|
|
5650
|
+
hoverStyle: { color: "var(--color-hover)" }
|
|
5651
|
+
},
|
|
5652
|
+
active: { backgroundColor: SELECTED_BG2, color: SELECTED_FG2 }
|
|
5653
|
+
},
|
|
5654
|
+
secondary: {
|
|
5655
|
+
rest: {
|
|
5656
|
+
fontWeight: "500",
|
|
5657
|
+
borderRadius: 6,
|
|
5658
|
+
borderWidth: 2,
|
|
5659
|
+
borderColor: "var(--color-tabs-secondary-border)",
|
|
5660
|
+
color: "var(--color-tabs-secondary-fg)",
|
|
5661
|
+
hoverStyle: { color: "var(--color-hover)", borderColor: "var(--color-hover)" }
|
|
5662
|
+
},
|
|
5663
|
+
active: { backgroundColor: SELECTED_BG2, color: SELECTED_FG2, borderColor: "transparent" }
|
|
5664
|
+
},
|
|
5665
|
+
segmented: {
|
|
5666
|
+
rest: {
|
|
5667
|
+
borderWidth: 2,
|
|
5668
|
+
borderColor: SELECTED_BG2,
|
|
5669
|
+
color: "var(--color-text-primary)",
|
|
5670
|
+
hoverStyle: { color: "var(--color-hover)" }
|
|
5671
|
+
},
|
|
5672
|
+
active: { backgroundColor: SELECTED_BG2, borderColor: SELECTED_BG2, color: SELECTED_FG2 }
|
|
5673
|
+
},
|
|
5674
|
+
unstyled: { rest: {}, active: {} }
|
|
5959
5675
|
};
|
|
5960
|
-
var
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
left: _left,
|
|
5977
|
-
visibility: _visibility,
|
|
5676
|
+
var LIST_HEIGHT = { sm: 32, md: 40, free: void 0 };
|
|
5677
|
+
var TabsRoot = ({
|
|
5678
|
+
variant = "solid",
|
|
5679
|
+
size = "md",
|
|
5680
|
+
fitted = false,
|
|
5681
|
+
onValueChange,
|
|
5682
|
+
...rest
|
|
5683
|
+
}) => {
|
|
5684
|
+
const shape = React32.useMemo(() => ({ variant, size, fitted }), [variant, size, fitted]);
|
|
5685
|
+
return /* @__PURE__ */ jsx(Shape.Provider, { value: shape, children: /* @__PURE__ */ jsx(
|
|
5686
|
+
Tabs,
|
|
5687
|
+
{
|
|
5688
|
+
unstyled: true,
|
|
5689
|
+
position: "relative",
|
|
5690
|
+
orientation: "horizontal",
|
|
5691
|
+
onValueChange: onValueChange ? (value) => onValueChange({ value }) : void 0,
|
|
5978
5692
|
...rest
|
|
5979
|
-
}
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
RadixTabs.Trigger,
|
|
5985
|
-
{
|
|
5986
|
-
ref: mergedRef,
|
|
5987
|
-
className: cn(
|
|
5988
|
-
"group",
|
|
5989
|
-
TRIGGER_BASE,
|
|
5990
|
-
TRIGGER_SIZE_CLASSES[size],
|
|
5991
|
-
TRIGGER_VARIANT_CLASSES[variant],
|
|
5992
|
-
fitted && "flex-1 text-center justify-center",
|
|
5993
|
-
className
|
|
5994
|
-
),
|
|
5995
|
-
...rest
|
|
5996
|
-
}
|
|
5997
|
-
);
|
|
5998
|
-
}
|
|
5999
|
-
);
|
|
6000
|
-
var TabsContent = React33.forwardRef(
|
|
6001
|
-
function TabsContent2(props, ref) {
|
|
6002
|
-
const { className, padding: _padding, ...rest } = props;
|
|
6003
|
-
return /* @__PURE__ */ jsx(
|
|
6004
|
-
RadixTabs.Content,
|
|
6005
|
-
{
|
|
6006
|
-
ref,
|
|
6007
|
-
className: cn(
|
|
6008
|
-
"w-full pt-[var(--tabs-content-padding,1.5rem)]",
|
|
6009
|
-
"focus-visible:outline-2 focus-visible:outline-offset-[-2px]",
|
|
6010
|
-
className
|
|
6011
|
-
),
|
|
6012
|
-
...rest
|
|
6013
|
-
}
|
|
6014
|
-
);
|
|
6015
|
-
}
|
|
6016
|
-
);
|
|
6017
|
-
var COUNTER_OVERLOAD = 50;
|
|
6018
|
-
var TabsCounter = ({ count }) => {
|
|
6019
|
-
if (count === void 0 || count === null) {
|
|
6020
|
-
return null;
|
|
6021
|
-
}
|
|
5693
|
+
}
|
|
5694
|
+
) });
|
|
5695
|
+
};
|
|
5696
|
+
var TabsList = (props) => {
|
|
5697
|
+
const { size } = React32.useContext(Shape);
|
|
6022
5698
|
return /* @__PURE__ */ jsx(
|
|
6023
|
-
|
|
5699
|
+
Tabs.List,
|
|
6024
5700
|
{
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
5701
|
+
unstyled: true,
|
|
5702
|
+
width: "100%",
|
|
5703
|
+
position: "relative",
|
|
5704
|
+
flexDirection: "row",
|
|
5705
|
+
backgroundColor: "transparent",
|
|
5706
|
+
minHeight: LIST_HEIGHT[size],
|
|
5707
|
+
...props
|
|
6030
5708
|
}
|
|
6031
5709
|
);
|
|
6032
5710
|
};
|
|
6033
|
-
|
|
6034
|
-
const
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
} else {
|
|
6056
|
-
ref.current = instance;
|
|
6057
|
-
}
|
|
6058
|
-
}
|
|
6059
|
-
},
|
|
6060
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6061
|
-
refs
|
|
5711
|
+
var TabsTrigger = ({ children, ...props }) => {
|
|
5712
|
+
const { variant, size, fitted } = React32.useContext(Shape);
|
|
5713
|
+
const { rest, active } = VARIANT3[variant];
|
|
5714
|
+
const selected = useTabsContext().value === props.value;
|
|
5715
|
+
return /* @__PURE__ */ jsx(
|
|
5716
|
+
Tabs.Tab,
|
|
5717
|
+
{
|
|
5718
|
+
unstyled: true,
|
|
5719
|
+
flexDirection: "row",
|
|
5720
|
+
alignItems: "center",
|
|
5721
|
+
justifyContent: "center",
|
|
5722
|
+
position: "relative",
|
|
5723
|
+
cursor: "pointer",
|
|
5724
|
+
gap: 8,
|
|
5725
|
+
borderWidth: 0,
|
|
5726
|
+
...SIZE2[size],
|
|
5727
|
+
...rest,
|
|
5728
|
+
...selected ? active : null,
|
|
5729
|
+
...fitted ? { flex: 1 } : null,
|
|
5730
|
+
...props,
|
|
5731
|
+
children: ink(children, void 0, { fontSize: "inherit", color: "inherit", fontWeight: "inherit" })
|
|
5732
|
+
}
|
|
6062
5733
|
);
|
|
6063
|
-
}
|
|
5734
|
+
};
|
|
5735
|
+
var TabsContent = ({ children, ...props }) => /* @__PURE__ */ jsx(Tabs.Content, { unstyled: true, width: "100%", paddingTop: 24, backgroundColor: "transparent", ...props, children: ink(children) });
|
|
5736
|
+
var COUNTER_OVERLOAD = 50;
|
|
5737
|
+
var TabsCounter = ({ count }) => {
|
|
5738
|
+
if (count === void 0 || count === null) return null;
|
|
5739
|
+
return /* @__PURE__ */ jsx(Text, { color: count > 0 ? "var(--color-text-secondary)" : "var(--color-text-disabled)", children: count > COUNTER_OVERLOAD ? `${COUNTER_OVERLOAD}+` : count });
|
|
5740
|
+
};
|
|
6064
5741
|
var nbsp = String.fromCharCode(160);
|
|
6065
5742
|
function TruncatedTextTooltip2({ label, children }) {
|
|
6066
5743
|
return /* @__PURE__ */ jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
|
|
@@ -6084,7 +5761,7 @@ var TAG_SELECTED_CLASSES = [
|
|
|
6084
5761
|
"hover:opacity-76"
|
|
6085
5762
|
].join(" ");
|
|
6086
5763
|
var TAG_DISABLED_CLASSES = "opacity-40 pointer-events-none cursor-not-allowed";
|
|
6087
|
-
var Tag =
|
|
5764
|
+
var Tag = React32.forwardRef(
|
|
6088
5765
|
function Tag2(props, ref) {
|
|
6089
5766
|
const {
|
|
6090
5767
|
variant,
|
|
@@ -6148,32 +5825,16 @@ var Tag = React33.forwardRef(
|
|
|
6148
5825
|
) });
|
|
6149
5826
|
}
|
|
6150
5827
|
);
|
|
6151
|
-
var
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
"
|
|
6157
|
-
"focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
|
|
6158
|
-
"disabled:opacity-40 disabled:cursor-not-allowed",
|
|
6159
|
-
"read-only:opacity-70",
|
|
6160
|
-
"data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
|
|
6161
|
-
].join(" ");
|
|
6162
|
-
var TEXTAREA_SIZE_CLASSES = {
|
|
6163
|
-
xs: "px-2 py-1 text-xs rounded",
|
|
6164
|
-
sm: "px-3 py-2 text-sm rounded-md",
|
|
6165
|
-
md: "px-4 py-2 text-base rounded-md",
|
|
6166
|
-
lg: "px-4 py-3 text-lg rounded-lg",
|
|
6167
|
-
"2xl": "px-4 py-3 text-xl rounded-lg"
|
|
6168
|
-
};
|
|
6169
|
-
var TEXTAREA_VARIANT_CLASSES = {
|
|
6170
|
-
outline: "border border-solid",
|
|
6171
|
-
filled: "border-0 bg-[var(--color-input-filled-bg,theme(colors.gray.100))]",
|
|
6172
|
-
unstyled: "border-0 bg-transparent p-0"
|
|
5828
|
+
var SIZE3 = {
|
|
5829
|
+
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, borderRadius: 4 },
|
|
5830
|
+
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, borderRadius: 6 },
|
|
5831
|
+
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: 16, borderRadius: 6 },
|
|
5832
|
+
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize: 18, borderRadius: 8 },
|
|
5833
|
+
"2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize: 20, borderRadius: 8 }
|
|
6173
5834
|
};
|
|
6174
|
-
var Textarea =
|
|
5835
|
+
var Textarea = React32__default.forwardRef(
|
|
6175
5836
|
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
6176
|
-
const handleChange =
|
|
5837
|
+
const handleChange = React32__default.useCallback(
|
|
6177
5838
|
(event) => {
|
|
6178
5839
|
onChange?.(event);
|
|
6179
5840
|
onChangeText?.(event.target.value);
|
|
@@ -6185,7 +5846,10 @@ var Textarea = React33__default.forwardRef(
|
|
|
6185
5846
|
{
|
|
6186
5847
|
ref,
|
|
6187
5848
|
unstyled: true,
|
|
6188
|
-
className:
|
|
5849
|
+
className: className ? `lux-control ${className}` : "lux-control",
|
|
5850
|
+
...CONTROL,
|
|
5851
|
+
...SIZE3[size],
|
|
5852
|
+
...VARIANT2[variant],
|
|
6189
5853
|
...rest,
|
|
6190
5854
|
onChange: handleChange
|
|
6191
5855
|
}
|
|
@@ -6195,93 +5859,90 @@ var Textarea = React33__default.forwardRef(
|
|
|
6195
5859
|
Textarea.displayName = "Textarea";
|
|
6196
5860
|
var SECOND = 1e3;
|
|
6197
5861
|
var DURATION = 10 * SECOND;
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
5862
|
+
var entries = [];
|
|
5863
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
5864
|
+
var counter = 0;
|
|
5865
|
+
var emit = () => listeners.forEach((l) => l());
|
|
5866
|
+
var subscribe = (l) => {
|
|
5867
|
+
listeners.add(l);
|
|
5868
|
+
return () => {
|
|
5869
|
+
listeners.delete(l);
|
|
6203
5870
|
};
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
}
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
case "error":
|
|
6224
|
-
return toast.error(title, external);
|
|
6225
|
-
case "warning":
|
|
6226
|
-
return toast.warning(title, external);
|
|
6227
|
-
case "loading":
|
|
6228
|
-
return toast.loading(title, external);
|
|
6229
|
-
case "info":
|
|
6230
|
-
default:
|
|
6231
|
-
return toast.info(title, external);
|
|
6232
|
-
}
|
|
6233
|
-
}
|
|
6234
|
-
function update(id, opts) {
|
|
6235
|
-
const title = opts.title ?? "";
|
|
6236
|
-
const external = mapOptions({ ...opts, id });
|
|
6237
|
-
switch (opts.type) {
|
|
6238
|
-
case "success":
|
|
6239
|
-
toast.success(title, external);
|
|
6240
|
-
break;
|
|
6241
|
-
case "error":
|
|
6242
|
-
toast.error(title, external);
|
|
6243
|
-
break;
|
|
6244
|
-
case "warning":
|
|
6245
|
-
toast.warning(title, external);
|
|
6246
|
-
break;
|
|
6247
|
-
case "loading":
|
|
6248
|
-
toast.loading(title, external);
|
|
6249
|
-
break;
|
|
6250
|
-
case "info":
|
|
6251
|
-
default:
|
|
6252
|
-
toast.info(title, external);
|
|
6253
|
-
break;
|
|
6254
|
-
}
|
|
6255
|
-
}
|
|
5871
|
+
};
|
|
5872
|
+
var snapshot = () => entries;
|
|
5873
|
+
var remove = (id) => {
|
|
5874
|
+
const found = entries.find((e) => e.id === id);
|
|
5875
|
+
entries = entries.filter((e) => e.id !== id);
|
|
5876
|
+
emit();
|
|
5877
|
+
found?.onStatusChange?.({ status: "unmounted" });
|
|
5878
|
+
};
|
|
5879
|
+
var create = (opts) => {
|
|
5880
|
+
const id = opts.id ?? `toast-${++counter}`;
|
|
5881
|
+
const entry = { ...opts, id };
|
|
5882
|
+
entries = [...entries.filter((e) => e.id !== id), entry];
|
|
5883
|
+
emit();
|
|
5884
|
+
return id;
|
|
5885
|
+
};
|
|
5886
|
+
var update = (id, opts) => {
|
|
5887
|
+
entries = entries.map((e) => e.id === id ? { ...e, ...opts, id } : e);
|
|
5888
|
+
emit();
|
|
5889
|
+
};
|
|
6256
5890
|
var toaster = {
|
|
6257
5891
|
create,
|
|
6258
5892
|
success: (opts) => create({ ...opts, type: "success" }),
|
|
6259
5893
|
error: (opts) => create({ ...opts, type: "error" }),
|
|
6260
5894
|
loading: (opts) => create({ ...opts, type: "loading" }),
|
|
6261
5895
|
update,
|
|
6262
|
-
remove
|
|
5896
|
+
remove
|
|
6263
5897
|
};
|
|
6264
|
-
var
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
5898
|
+
var EDGE = {
|
|
5899
|
+
success: "var(--color-status-good)",
|
|
5900
|
+
error: "var(--color-status-bad)",
|
|
5901
|
+
warning: "var(--color-status-warn)",
|
|
5902
|
+
loading: "var(--color-border-divider)",
|
|
5903
|
+
info: "var(--color-border-divider)"
|
|
5904
|
+
};
|
|
5905
|
+
var One = ({ entry }) => /* @__PURE__ */ jsxs(
|
|
5906
|
+
Toast,
|
|
5907
|
+
{
|
|
5908
|
+
duration: entry.duration ?? DURATION,
|
|
5909
|
+
onOpenChange: (open) => {
|
|
5910
|
+
if (!open) remove(entry.id);
|
|
5911
|
+
},
|
|
5912
|
+
unstyled: true,
|
|
5913
|
+
flexDirection: "column",
|
|
5914
|
+
gap: 4,
|
|
5915
|
+
padding: 12,
|
|
5916
|
+
borderRadius: 8,
|
|
5917
|
+
borderWidth: 1,
|
|
5918
|
+
borderColor: EDGE[entry.type ?? "info"],
|
|
5919
|
+
backgroundColor: "var(--color-popover-bg)",
|
|
5920
|
+
transition: "quick",
|
|
5921
|
+
enterStyle: { opacity: 0, y: -8 },
|
|
5922
|
+
exitStyle: { opacity: 0, y: -8 },
|
|
5923
|
+
children: [
|
|
5924
|
+
entry.title ? /* @__PURE__ */ jsx(Toast.Title, { unstyled: true, fontSize: 14, fontWeight: "600", color: "var(--color-text-primary)", children: entry.title }) : null,
|
|
5925
|
+
entry.description ? /* @__PURE__ */ jsx(Toast.Description, { unstyled: true, fontSize: 13, color: "var(--color-text-secondary)", children: entry.description }) : null,
|
|
5926
|
+
entry.action ? /* @__PURE__ */ jsx(XStack, { marginTop: 4, children: /* @__PURE__ */ jsx(Toast.Action, { altText: entry.action.label, onPress: entry.action.onClick, children: /* @__PURE__ */ jsx(
|
|
5927
|
+
Text,
|
|
5928
|
+
{
|
|
5929
|
+
cursor: "pointer",
|
|
5930
|
+
fontSize: 13,
|
|
5931
|
+
fontWeight: "500",
|
|
5932
|
+
color: "var(--color-link-primary)",
|
|
5933
|
+
children: entry.action.label
|
|
6281
5934
|
}
|
|
6282
|
-
}
|
|
6283
|
-
|
|
6284
|
-
|
|
5935
|
+
) }) }) : null
|
|
5936
|
+
]
|
|
5937
|
+
},
|
|
5938
|
+
entry.id
|
|
5939
|
+
);
|
|
5940
|
+
var Toaster = () => {
|
|
5941
|
+
const list = React32.useSyncExternalStore(subscribe, snapshot, snapshot);
|
|
5942
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [
|
|
5943
|
+
/* @__PURE__ */ jsx(YStack, { children: list.map((entry) => /* @__PURE__ */ jsx(One, { entry }, entry.id)) }),
|
|
5944
|
+
/* @__PURE__ */ jsx(ToastViewport, { position: "absolute", top: 12, right: 12 })
|
|
5945
|
+
] });
|
|
6285
5946
|
};
|
|
6286
5947
|
function fmt(n, decimals = 2) {
|
|
6287
5948
|
if (n === void 0 || n === null) return "-";
|
|
@@ -6316,7 +5977,7 @@ function QuoteCell({ value, highlight, align = "right", onClick, className }) {
|
|
|
6316
5977
|
}
|
|
6317
5978
|
var CALL_HEADERS = ["Bid", "Ask", "Last", "Vol", "OI", "IV", "Delta"];
|
|
6318
5979
|
var PUT_HEADERS = ["Delta", "IV", "OI", "Vol", "Last", "Ask", "Bid"];
|
|
6319
|
-
var OptionChain =
|
|
5980
|
+
var OptionChain = React32.forwardRef(
|
|
6320
5981
|
function OptionChain2(props, ref) {
|
|
6321
5982
|
const {
|
|
6322
5983
|
symbol: _symbol,
|
|
@@ -6327,7 +5988,7 @@ var OptionChain = React33.forwardRef(
|
|
|
6327
5988
|
className,
|
|
6328
5989
|
...rest
|
|
6329
5990
|
} = props;
|
|
6330
|
-
const handleClick =
|
|
5991
|
+
const handleClick = React32.useCallback(
|
|
6331
5992
|
(quote, type, strike) => {
|
|
6332
5993
|
if (!quote || !onSelectContract) return;
|
|
6333
5994
|
onSelectContract({
|
|
@@ -6507,7 +6168,7 @@ function GreekItem({ def, value, compact }) {
|
|
|
6507
6168
|
}
|
|
6508
6169
|
);
|
|
6509
6170
|
}
|
|
6510
|
-
var GreeksDisplay =
|
|
6171
|
+
var GreeksDisplay = React32.forwardRef(
|
|
6511
6172
|
function GreeksDisplay2(props, ref) {
|
|
6512
6173
|
const {
|
|
6513
6174
|
delta,
|
|
@@ -6739,7 +6400,7 @@ function LegRow({ leg, index, strikes, expirations, removable, onChange, onRemov
|
|
|
6739
6400
|
)
|
|
6740
6401
|
] });
|
|
6741
6402
|
}
|
|
6742
|
-
var StrategyBuilder =
|
|
6403
|
+
var StrategyBuilder = React32.forwardRef(
|
|
6743
6404
|
function StrategyBuilder2(props, ref) {
|
|
6744
6405
|
const {
|
|
6745
6406
|
underlying,
|
|
@@ -6751,12 +6412,12 @@ var StrategyBuilder = React33.forwardRef(
|
|
|
6751
6412
|
...rest
|
|
6752
6413
|
} = props;
|
|
6753
6414
|
const defaultExp = expirations[0] ?? "";
|
|
6754
|
-
const [strategyType, setStrategyType] =
|
|
6755
|
-
const [legs, setLegs] =
|
|
6415
|
+
const [strategyType, setStrategyType] = React32.useState("bull_call_spread");
|
|
6416
|
+
const [legs, setLegs] = React32.useState(() => {
|
|
6756
6417
|
const preset = STRATEGY_PRESETS.find((p) => p.value === "bull_call_spread");
|
|
6757
6418
|
return preset ? preset.buildLegs(strikes, spotPrice, defaultExp) : [];
|
|
6758
6419
|
});
|
|
6759
|
-
const handleStrategyChange =
|
|
6420
|
+
const handleStrategyChange = React32.useCallback(
|
|
6760
6421
|
(e) => {
|
|
6761
6422
|
const type = e.target.value;
|
|
6762
6423
|
setStrategyType(type);
|
|
@@ -6767,7 +6428,7 @@ var StrategyBuilder = React33.forwardRef(
|
|
|
6767
6428
|
},
|
|
6768
6429
|
[strikes, spotPrice, defaultExp]
|
|
6769
6430
|
);
|
|
6770
|
-
const handleLegChange =
|
|
6431
|
+
const handleLegChange = React32.useCallback(
|
|
6771
6432
|
(index, leg) => {
|
|
6772
6433
|
setLegs((prev) => {
|
|
6773
6434
|
const next = [...prev];
|
|
@@ -6777,13 +6438,13 @@ var StrategyBuilder = React33.forwardRef(
|
|
|
6777
6438
|
},
|
|
6778
6439
|
[]
|
|
6779
6440
|
);
|
|
6780
|
-
const handleLegRemove =
|
|
6441
|
+
const handleLegRemove = React32.useCallback(
|
|
6781
6442
|
(index) => {
|
|
6782
6443
|
setLegs((prev) => prev.filter((_, i) => i !== index));
|
|
6783
6444
|
},
|
|
6784
6445
|
[]
|
|
6785
6446
|
);
|
|
6786
|
-
const handleAddLeg =
|
|
6447
|
+
const handleAddLeg = React32.useCallback(() => {
|
|
6787
6448
|
if (legs.length >= 4) return;
|
|
6788
6449
|
const atm = findATM(strikes, spotPrice);
|
|
6789
6450
|
setLegs((prev) => [
|
|
@@ -6791,14 +6452,14 @@ var StrategyBuilder = React33.forwardRef(
|
|
|
6791
6452
|
{ action: "buy", type: "call", strike: atm, expiration: defaultExp, quantity: 1 }
|
|
6792
6453
|
]);
|
|
6793
6454
|
}, [legs.length, strikes, spotPrice, defaultExp]);
|
|
6794
|
-
const netPremium =
|
|
6455
|
+
const netPremium = React32.useMemo(() => {
|
|
6795
6456
|
return legs.reduce((sum, leg) => {
|
|
6796
6457
|
if (leg.premium === void 0) return sum;
|
|
6797
6458
|
const sign = leg.action === "buy" ? -1 : 1;
|
|
6798
6459
|
return sum + sign * leg.premium * leg.quantity;
|
|
6799
6460
|
}, 0);
|
|
6800
6461
|
}, [legs]);
|
|
6801
|
-
const handleSubmit =
|
|
6462
|
+
const handleSubmit = React32.useCallback(() => {
|
|
6802
6463
|
if (!onSubmit || legs.length === 0) return;
|
|
6803
6464
|
onSubmit({
|
|
6804
6465
|
type: strategyType,
|
|
@@ -6921,7 +6582,7 @@ function buildPath(points, vb, width, height) {
|
|
|
6921
6582
|
var LEG_COLORS = ["var(--chart-1)", "var(--chart-2)", "var(--chart-3)", "var(--chart-4)"];
|
|
6922
6583
|
var BREAKEVEN_COLOR = "var(--chart-1)";
|
|
6923
6584
|
var BREAKEVEN_RING = "var(--background)";
|
|
6924
|
-
var PnlDiagram =
|
|
6585
|
+
var PnlDiagram = React32.forwardRef(
|
|
6925
6586
|
function PnlDiagram2(props, ref) {
|
|
6926
6587
|
const {
|
|
6927
6588
|
legs,
|
|
@@ -6930,14 +6591,14 @@ var PnlDiagram = React33.forwardRef(
|
|
|
6930
6591
|
className,
|
|
6931
6592
|
...rest
|
|
6932
6593
|
} = props;
|
|
6933
|
-
const containerRef =
|
|
6934
|
-
const [hoverX, setHoverX] =
|
|
6935
|
-
const [dims, setDims] =
|
|
6936
|
-
|
|
6594
|
+
const containerRef = React32.useRef(null);
|
|
6595
|
+
const [hoverX, setHoverX] = React32.useState(null);
|
|
6596
|
+
const [dims, setDims] = React32.useState({ width: 600, height: 240 });
|
|
6597
|
+
React32.useEffect(() => {
|
|
6937
6598
|
const el = containerRef.current;
|
|
6938
6599
|
if (!el) return;
|
|
6939
|
-
const observer = new ResizeObserver((
|
|
6940
|
-
const entry =
|
|
6600
|
+
const observer = new ResizeObserver((entries2) => {
|
|
6601
|
+
const entry = entries2[0];
|
|
6941
6602
|
if (entry) {
|
|
6942
6603
|
setDims({
|
|
6943
6604
|
width: Math.max(entry.contentRect.width, 200),
|
|
@@ -6956,7 +6617,7 @@ var PnlDiagram = React33.forwardRef(
|
|
|
6956
6617
|
const xMax = maxStrike + range * 0.3;
|
|
6957
6618
|
const SAMPLES = 200;
|
|
6958
6619
|
const step = (xMax - xMin) / SAMPLES;
|
|
6959
|
-
const combinedPoints =
|
|
6620
|
+
const combinedPoints = React32.useMemo(() => {
|
|
6960
6621
|
const pts = [];
|
|
6961
6622
|
for (let i = 0; i <= SAMPLES; i++) {
|
|
6962
6623
|
const price = xMin + i * step;
|
|
@@ -6964,7 +6625,7 @@ var PnlDiagram = React33.forwardRef(
|
|
|
6964
6625
|
}
|
|
6965
6626
|
return pts;
|
|
6966
6627
|
}, [legs, multiplier, xMin, step]);
|
|
6967
|
-
const legPointSets =
|
|
6628
|
+
const legPointSets = React32.useMemo(() => {
|
|
6968
6629
|
return legs.map((leg) => {
|
|
6969
6630
|
const pts = [];
|
|
6970
6631
|
for (let i = 0; i <= SAMPLES; i++) {
|
|
@@ -6985,7 +6646,7 @@ var PnlDiagram = React33.forwardRef(
|
|
|
6985
6646
|
const chartH = height - PADDING.top - PADDING.bottom;
|
|
6986
6647
|
const scaleX = (x) => PADDING.left + (x - vb.xMin) / (vb.xMax - vb.xMin) * chartW;
|
|
6987
6648
|
const scaleY = (y) => PADDING.top + chartH - (y - vb.yMin) / (vb.yMax - vb.yMin) * chartH;
|
|
6988
|
-
const breakevens =
|
|
6649
|
+
const breakevens = React32.useMemo(() => {
|
|
6989
6650
|
const pts = [];
|
|
6990
6651
|
for (let i = 1; i < combinedPoints.length; i++) {
|
|
6991
6652
|
const prev = combinedPoints[i - 1];
|
|
@@ -7002,7 +6663,7 @@ var PnlDiagram = React33.forwardRef(
|
|
|
7002
6663
|
const maxGainPoint = combinedPoints.find((p) => p.y === maxGain);
|
|
7003
6664
|
const maxLossPoint = combinedPoints.find((p) => p.y === maxLoss);
|
|
7004
6665
|
const zeroY = scaleY(0);
|
|
7005
|
-
const handleMouseMove =
|
|
6666
|
+
const handleMouseMove = React32.useCallback(
|
|
7006
6667
|
(e) => {
|
|
7007
6668
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
7008
6669
|
const mouseX = e.clientX - rect.left;
|
|
@@ -7015,7 +6676,7 @@ var PnlDiagram = React33.forwardRef(
|
|
|
7015
6676
|
},
|
|
7016
6677
|
[vb.xMin, vb.xMax, chartW]
|
|
7017
6678
|
);
|
|
7018
|
-
const handleMouseLeave =
|
|
6679
|
+
const handleMouseLeave = React32.useCallback(() => setHoverX(null), []);
|
|
7019
6680
|
const hoverPnl = hoverX !== null ? calcTotalPnl(legs, hoverX, multiplier) : null;
|
|
7020
6681
|
buildPath(
|
|
7021
6682
|
combinedPoints.map((p) => ({ x: scaleX(p.x), y: scaleY(p.y) })).map((p) => ({ x: p.x - PADDING.left, y: p.y - PADDING.top })),
|
|
@@ -7319,7 +6980,7 @@ function formatDate(date) {
|
|
|
7319
6980
|
const d = new Date(date);
|
|
7320
6981
|
return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
7321
6982
|
}
|
|
7322
|
-
var OptionPositionCard =
|
|
6983
|
+
var OptionPositionCard = React32.forwardRef(
|
|
7323
6984
|
function OptionPositionCard2(props, ref) {
|
|
7324
6985
|
const {
|
|
7325
6986
|
position,
|
|
@@ -7483,7 +7144,7 @@ function ExpirationPill({ exp, isSelected, onClick }) {
|
|
|
7483
7144
|
}
|
|
7484
7145
|
);
|
|
7485
7146
|
}
|
|
7486
|
-
var ExpirationSelector =
|
|
7147
|
+
var ExpirationSelector = React32.forwardRef(
|
|
7487
7148
|
function ExpirationSelector2(props, ref) {
|
|
7488
7149
|
const {
|
|
7489
7150
|
expirations,
|
|
@@ -7493,8 +7154,8 @@ var ExpirationSelector = React33.forwardRef(
|
|
|
7493
7154
|
className,
|
|
7494
7155
|
...rest
|
|
7495
7156
|
} = props;
|
|
7496
|
-
const scrollRef =
|
|
7497
|
-
|
|
7157
|
+
const scrollRef = React32.useRef(null);
|
|
7158
|
+
React32.useEffect(() => {
|
|
7498
7159
|
const container = scrollRef.current;
|
|
7499
7160
|
if (!container) return;
|
|
7500
7161
|
const selectedEl = container.querySelector('[data-selected="true"]');
|
|
@@ -7806,4 +7467,4 @@ var BankPage = styled(View, {
|
|
|
7806
7467
|
padding: 16
|
|
7807
7468
|
});
|
|
7808
7469
|
|
|
7809
|
-
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, Alert, AppNav, AppProvider, Avatar, AvatarGroup, Badge, BankAlert, BankAlertText, BankButton, BankButtonText, BankCard, BankDivider, BankField, BankHeading, BankInput, BankPage, BankPinBox, BankText, Button, ButtonGroup, ButtonGroupRadio, Checkbox2 as Checkbox, CheckboxGroup2 as CheckboxGroup, CloseButton, CollapsibleDetails, CollapsibleList, ColorModeProvider, DEFAULT_ORG, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, DrawerActionTrigger, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger, EmptyState, ExpirationSelector, Field, GreeksDisplay, Heading, IAM_PAGE_SIZE, IamError, IconButton, IdentityProvider, Image, Input, InputGroup, LUX_BRAND, Link, LinkBox, LinkExternalIcon, LinkOverlay, LoadingBar, MenuArrow, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuItemText, MenuRadioItem, MenuRadioItemGroup, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, NARROW_PX, OptionChain, OptionPositionCard, OrgSwitcher, PARS_GOLD, PinInput, PnlDiagram, PopoverArrow, PopoverBody, PopoverCloseTrigger, PopoverCloseTriggerWrapper, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger, Progress, ProgressCircleRing, ProgressCircleRoot, ProgressCircleValueText, ProjectSwitcher, Radio2 as Radio,
|
|
7470
|
+
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, Alert, AppNav, AppProvider, Avatar, AvatarGroup, Badge, BankAlert, BankAlertText, BankButton, BankButtonText, BankCard, BankDivider, BankField, BankHeading, BankInput, BankPage, BankPinBox, BankText, Button, ButtonGroup, ButtonGroupRadio, Checkbox2 as Checkbox, CheckboxGroup2 as CheckboxGroup, CloseButton, CollapsibleDetails, CollapsibleList, ColorModeProvider, DEFAULT_ORG, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, DrawerActionTrigger, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger, EmptyState, ExpirationSelector, Field, GreeksDisplay, Heading, IAM_PAGE_SIZE, IamError, IconButton, IdentityProvider, Image, Input, InputGroup, LUX_BRAND, Link, LinkBox, LinkExternalIcon, LinkOverlay, LoadingBar, MenuArrow, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuItemText, MenuRadioItem, MenuRadioItemGroup, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, NARROW_PX, OptionChain, OptionPositionCard, OrgSwitcher, PARS_GOLD, PinInput, PnlDiagram, PopoverArrow, PopoverBody, PopoverCloseTrigger, PopoverCloseTriggerWrapper, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger, Progress, ProgressCircleRing, ProgressCircleRoot, ProgressCircleValueText, ProjectSwitcher, Radio2 as Radio, RadioGroup2 as RadioGroup, Rating, Select, SelectAsync, SelectClearTrigger, SelectContent, SelectControl, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectValueText, Separator, SettingsMenu, Skeleton, SkeletonCircle, SkeletonText, Slider, StrategyBuilder, Switch2 as Switch, Switcher, TOUCH_PX, TableBody, TableCaption, TableCell, TableColumnHeader, TableColumnHeaderSortable, TableFooter, TableHeader, TableHeaderSticky, TableRoot, TableRow, TableScrollWrapper, TabsContent, TabsCounter, TabsList, TabsRoot, TabsTrigger, Tag, Textarea, Toaster, Tooltip, UserMenu, bankColors, buttonVariants, cn, config, createListCollection, currentHost, lux_config_default as guiConfig, iam, iamBase, initials, luxThemes, orgIdentity, ORGS as orgs, resolveWhiteLabel, toaster, useAccordion, useBelow, useColorMode, useColorModeValue, useIdentity, useIsNarrow, useIsTouch, useWhiteLabel };
|