@espressif/dashboard-ui-components 1.2.1 → 1.3.0
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/CHANGELOG.md +154 -0
- package/README.md +15 -6
- package/dist/{app-logo.props-TKCDuodn.d.ts → app-logo.props-Ct7QBdTd.d.ts} +1 -1
- package/dist/{chunk-F5P6S7K2.js → chunk-7BO76CNB.js} +75 -14
- package/dist/{chunk-JPMN2UMF.js → chunk-KCMVLNM5.js} +12 -12
- package/dist/{chunk-KEMHD3KP.js → chunk-O5BFYRPY.js} +1578 -360
- package/dist/{chunk-W2L5GRI2.js → chunk-RCRU3JW2.js} +42 -29
- package/dist/{chunk-NHTMHKOR.js → chunk-RKAFXJRD.js} +3 -3
- package/dist/{chunk-SYEKNRS5.js → chunk-TSNA6BHK.js} +30 -8
- package/dist/{chunk-34PXJOCS.js → chunk-UHRNPXO5.js} +423 -230
- package/dist/common/index.d.ts +4 -4
- package/dist/common/index.js +6 -6
- package/dist/components/index.d.ts +206 -13
- package/dist/components/index.js +4 -4
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/{index-Cv9vHALn.d.ts → index-BQANnKs9.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/layouts/index.d.ts +27 -7
- package/dist/layouts/index.js +4 -4
- package/dist/{list.props-DBDJt4C1.d.ts → list.props-x1j3CbcF.d.ts} +1 -1
- package/dist/{popover-CRznb4Q7.d.ts → popover-ByLD3-Qv.d.ts} +21 -3
- package/dist/{types-B_tam56l.d.ts → types-DtUxK-Am.d.ts} +13 -2
- package/dist/utils/index.d.ts +1 -1
- package/package.json +4 -1
- package/src/assets/logos/launchpad/launchpad-no-text-dm.svg +1 -0
- package/src/assets/logos/launchpad/launchpad-no-text.svg +1 -1
- package/src/assets/logos/launchpad/launchpad-with-text-dm.svg +1 -1
- package/src/assets/logos/launchpad/launchpad-with-text.svg +46 -1
- package/src/assets/logos/zerocode-ai/zerocode-ai-no-text.svg +1 -0
- package/src/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.svg +186 -0
- package/src/assets/logos/zerocode-ai/zerocode-ai-with-text.svg +246 -0
- package/src/styles/globals.css +93 -15
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardContent, Label, Badge, Popover, PopoverTrigger, PopoverContent, resolveVariantStyles, VariantGradientUnderlay, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, VARIANT_GRADIENT_BACKDROP_BASE, SILVER_GRADIENT_BACKDROP, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, arbitraryGradientBackgroundImage, SilverShineOverlay, SilverMetallicBorderOverlay, buttonGroupVariants, useIsInView } from './chunk-
|
|
2
|
-
import { Button, inputLabelClassName, Input, Tooltip2, TooltipProvider, buttonVariants as buttonVariants$1, CopyButton, Link, Tooltip, TooltipTrigger, TooltipContent, HighlightItem, Slot as Slot$1, Highlight, ScrollArea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem } from './chunk-
|
|
3
|
-
import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, Skeleton, Avatar, AvatarFallback
|
|
1
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, Label, Badge, Popover, PopoverTrigger, PopoverContent, resolveVariantStyles, VariantGradientUnderlay, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, VARIANT_GRADIENT_BACKDROP_BASE, SILVER_GRADIENT_BACKDROP, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, arbitraryGradientBackgroundImage, SilverShineOverlay, SilverMetallicBorderOverlay, buttonGroupVariants, useIsInView } from './chunk-KCMVLNM5.js';
|
|
2
|
+
import { Button, inputLabelClassName, Input, Tooltip2, TooltipProvider, buttonVariants as buttonVariants$1, CopyButton, Link, Tooltip, TooltipTrigger, TooltipContent, HighlightItem, Slot as Slot$1, Highlight, ScrollArea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, Sheet, SheetContent, SheetHeader, SheetTitle } from './chunk-UHRNPXO5.js';
|
|
3
|
+
import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, useIsMobile, useControlledState, Button as Button$1, Skeleton, Avatar, AvatarFallback } from './chunk-7BO76CNB.js';
|
|
4
4
|
import { cn, resolveColor, isPresetColor } from './chunk-VU4CZ76T.js';
|
|
5
5
|
import { __commonJS, __toESM } from './chunk-TRTQSARU.js';
|
|
6
|
-
import { ChevronDown, ChevronUp, Check, Upload, X, LoaderCircle, Triangle, Info, MinusIcon, ArrowLeft, ArrowRight, Search, ClockIcon, Crown, ShieldCheck, Tag as Tag$1, ChevronRight, CircleAlert, Eye, EyeOff, Circle, FileCheck, CheckCheck, TriangleAlert, CircleX, ChevronsUpDown, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, CalendarIcon, CalendarRangeIcon, CheckIcon, ChevronLeft, Columns2, ChevronsRight, ChevronsLeft, XIcon, MoveLeft, CircleIcon, Bolt, Plus, Trash2, Clock, XCircle, CheckCircle2 } from 'lucide-react';
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
6
|
+
import { ChevronDown, ChevronUp, Check, Upload, X, RefreshCw, LoaderCircle, Triangle, Info, MinusIcon, ArrowLeft, ArrowRight, Search, ClockIcon, Crown, ShieldCheck, Tag as Tag$1, ChevronRight, CircleAlert, Eye, EyeOff, Circle, FileCheck, CheckCheck, TriangleAlert, CircleX, Menu, ChevronsUpDown, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, CalendarIcon, CalendarRangeIcon, CheckIcon, ChevronLeft, Columns2, ChevronsRight, ChevronsLeft, XIcon, MoveLeft, CircleIcon, Bolt, Plus, Trash2, Clock, XCircle, CheckCircle2 } from 'lucide-react';
|
|
7
|
+
import * as React10 from 'react';
|
|
8
|
+
import React10__default, { forwardRef, useMemo, isValidElement, useRef, useState, useCallback, useLayoutEffect, useEffect, useId, Fragment as Fragment$1, Children, cloneElement, createElement } from 'react';
|
|
9
9
|
import { Switch as Switch$1, ToggleGroup as ToggleGroup$1, Dialog as Dialog$1, Accordion as Accordion$1 } from 'radix-ui';
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import { AnimatePresence, motion, useAnimate, useReducedMotion } from 'framer-motion';
|
|
12
|
-
import
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
13
|
import { motion as motion$1, AnimatePresence as AnimatePresence$1, useMotionValue, useSpring } from 'motion/react';
|
|
14
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
14
15
|
import { Slot, createSlot } from '@radix-ui/react-slot';
|
|
15
16
|
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
16
|
-
import 'react-dom';
|
|
17
17
|
import { cva } from 'class-variance-authority';
|
|
18
18
|
import { RadioGroup as RadioGroup$1 } from '@base-ui-components/react/radio-group';
|
|
19
19
|
import { Radio as Radio$1 } from '@base-ui-components/react/radio';
|
|
@@ -16302,10 +16302,10 @@ function Accordion(props) {
|
|
|
16302
16302
|
}
|
|
16303
16303
|
function AccordionItem(props) {
|
|
16304
16304
|
const { value: value2 } = useAccordion();
|
|
16305
|
-
const [isOpen, setIsOpen] =
|
|
16305
|
+
const [isOpen, setIsOpen] = React10.useState(
|
|
16306
16306
|
value2?.includes(props?.value) ?? false
|
|
16307
16307
|
);
|
|
16308
|
-
|
|
16308
|
+
React10.useEffect(() => {
|
|
16309
16309
|
setIsOpen(value2?.includes(props?.value) ?? false);
|
|
16310
16310
|
}, [value2, props?.value]);
|
|
16311
16311
|
return /* @__PURE__ */ jsx(AccordionItemProvider, { value: { value: props.value, isOpen, setIsOpen }, children: /* @__PURE__ */ jsx(
|
|
@@ -16439,7 +16439,7 @@ function Accordion3({
|
|
|
16439
16439
|
}
|
|
16440
16440
|
);
|
|
16441
16441
|
}
|
|
16442
|
-
var SimpleCard =
|
|
16442
|
+
var SimpleCard = React10.forwardRef(
|
|
16443
16443
|
({ noShadow, noBorder, transparent, title, description, children, className }, ref) => {
|
|
16444
16444
|
return /* @__PURE__ */ jsxs(
|
|
16445
16445
|
Card,
|
|
@@ -16673,12 +16673,12 @@ function CollapsibleCard({
|
|
|
16673
16673
|
className,
|
|
16674
16674
|
defaultOpen = false
|
|
16675
16675
|
}) {
|
|
16676
|
-
const childArray =
|
|
16676
|
+
const childArray = React10.Children.toArray(children);
|
|
16677
16677
|
const contentChild = childArray.find(
|
|
16678
|
-
(child) =>
|
|
16678
|
+
(child) => React10.isValidElement(child) && child.type === CollapsibleContent
|
|
16679
16679
|
);
|
|
16680
16680
|
const titleChild = childArray.find(
|
|
16681
|
-
(child) =>
|
|
16681
|
+
(child) => React10.isValidElement(child) && child.type !== CollapsibleContent
|
|
16682
16682
|
);
|
|
16683
16683
|
return /* @__PURE__ */ jsx(Card, { className: cn("bg-transparent shadow-none rounded-md", className), children: /* @__PURE__ */ jsxs(Collapsible, { defaultOpen, className: "group", children: [
|
|
16684
16684
|
/* @__PURE__ */ jsx(CardHeader, { className: "p-3 border-b border-transparent group-data-[state=open]:border-border", children: /* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -16695,7 +16695,7 @@ function CollapsibleCard({
|
|
|
16695
16695
|
]
|
|
16696
16696
|
}
|
|
16697
16697
|
) }) }),
|
|
16698
|
-
contentChild &&
|
|
16698
|
+
contentChild && React10.cloneElement(contentChild, {
|
|
16699
16699
|
className: cn(
|
|
16700
16700
|
"px-4 pb-6 pt-4",
|
|
16701
16701
|
contentChild.props.className
|
|
@@ -17281,7 +17281,7 @@ var useLottie = function useLottie2(props, style) {
|
|
|
17281
17281
|
});
|
|
17282
17282
|
};
|
|
17283
17283
|
}, [onComplete, onLoopComplete, onEnterFrame, onSegmentStart, onConfigReady, onDataReady, onDataFailed, onLoadedImages, onDOMLoaded, onDestroy]);
|
|
17284
|
-
var View = /* @__PURE__ */
|
|
17284
|
+
var View = /* @__PURE__ */ React10__default.createElement("div", _objectSpread2({
|
|
17285
17285
|
style,
|
|
17286
17286
|
ref: animationContainer
|
|
17287
17287
|
}, rest));
|
|
@@ -47793,6 +47793,859 @@ function ListDetails({
|
|
|
47793
47793
|
}
|
|
47794
47794
|
);
|
|
47795
47795
|
}
|
|
47796
|
+
var ITEM_GAP = 4;
|
|
47797
|
+
function useNavBarOverflow(items) {
|
|
47798
|
+
const containerRef = useRef(null);
|
|
47799
|
+
const measureRef = useRef(null);
|
|
47800
|
+
const moreButtonMeasureRef = useRef(null);
|
|
47801
|
+
const [state, setState] = useState({
|
|
47802
|
+
visibleIds: items.map((i) => i.id),
|
|
47803
|
+
overflowIds: []
|
|
47804
|
+
});
|
|
47805
|
+
const [measuring, setMeasuring] = useState(true);
|
|
47806
|
+
const recalculate = useCallback(() => {
|
|
47807
|
+
const container = containerRef.current;
|
|
47808
|
+
const measureList = measureRef.current;
|
|
47809
|
+
const moreButton = moreButtonMeasureRef.current;
|
|
47810
|
+
if (!container || !measureList) return;
|
|
47811
|
+
const containerWidth = container.clientWidth;
|
|
47812
|
+
const moreButtonWidth = moreButton ? moreButton.getBoundingClientRect().width : 80;
|
|
47813
|
+
const itemWidths = /* @__PURE__ */ new Map();
|
|
47814
|
+
const measureItems = measureList.querySelectorAll(
|
|
47815
|
+
"[data-nav-item-id]"
|
|
47816
|
+
);
|
|
47817
|
+
for (const li of measureItems) {
|
|
47818
|
+
const id = li.getAttribute("data-nav-item-id");
|
|
47819
|
+
if (id) {
|
|
47820
|
+
itemWidths.set(id, li.getBoundingClientRect().width);
|
|
47821
|
+
}
|
|
47822
|
+
}
|
|
47823
|
+
let totalWidth = 0;
|
|
47824
|
+
for (let i = 0; i < items.length; i++) {
|
|
47825
|
+
totalWidth += (itemWidths.get(items[i].id) ?? 0) + (i > 0 ? ITEM_GAP : 0);
|
|
47826
|
+
}
|
|
47827
|
+
if (totalWidth <= containerWidth) {
|
|
47828
|
+
setState({
|
|
47829
|
+
visibleIds: items.map((i) => i.id),
|
|
47830
|
+
overflowIds: []
|
|
47831
|
+
});
|
|
47832
|
+
setMeasuring(false);
|
|
47833
|
+
return;
|
|
47834
|
+
}
|
|
47835
|
+
const availableWidth = containerWidth - moreButtonWidth - ITEM_GAP;
|
|
47836
|
+
let accumulatedWidth = 0;
|
|
47837
|
+
let cutoffIndex = 0;
|
|
47838
|
+
for (let i = 0; i < items.length; i++) {
|
|
47839
|
+
const w = (itemWidths.get(items[i].id) ?? 0) + (i > 0 ? ITEM_GAP : 0);
|
|
47840
|
+
if (accumulatedWidth + w > availableWidth) {
|
|
47841
|
+
break;
|
|
47842
|
+
}
|
|
47843
|
+
accumulatedWidth += w;
|
|
47844
|
+
cutoffIndex = i + 1;
|
|
47845
|
+
}
|
|
47846
|
+
setState({
|
|
47847
|
+
visibleIds: items.slice(0, cutoffIndex).map((i) => i.id),
|
|
47848
|
+
overflowIds: items.slice(cutoffIndex).map((i) => i.id)
|
|
47849
|
+
});
|
|
47850
|
+
setMeasuring(false);
|
|
47851
|
+
}, [items]);
|
|
47852
|
+
useLayoutEffect(() => {
|
|
47853
|
+
recalculate();
|
|
47854
|
+
}, [recalculate]);
|
|
47855
|
+
useEffect(() => {
|
|
47856
|
+
const container = containerRef.current;
|
|
47857
|
+
if (!container || typeof ResizeObserver === "undefined") return;
|
|
47858
|
+
const ro = new ResizeObserver(() => {
|
|
47859
|
+
recalculate();
|
|
47860
|
+
});
|
|
47861
|
+
ro.observe(container);
|
|
47862
|
+
return () => ro.disconnect();
|
|
47863
|
+
}, [recalculate]);
|
|
47864
|
+
return {
|
|
47865
|
+
containerRef,
|
|
47866
|
+
measureRef,
|
|
47867
|
+
moreButtonMeasureRef,
|
|
47868
|
+
visibleIds: state.visibleIds,
|
|
47869
|
+
overflowIds: state.overflowIds,
|
|
47870
|
+
showMore: state.overflowIds.length > 0,
|
|
47871
|
+
measuring
|
|
47872
|
+
};
|
|
47873
|
+
}
|
|
47874
|
+
function useNavBarScroll({
|
|
47875
|
+
enabled,
|
|
47876
|
+
threshold,
|
|
47877
|
+
scrollContainerRef
|
|
47878
|
+
}) {
|
|
47879
|
+
const [isScrolled, setIsScrolled] = useState(false);
|
|
47880
|
+
const rafRef = useRef(null);
|
|
47881
|
+
const getScrollTop = useCallback(() => {
|
|
47882
|
+
if (scrollContainerRef?.current) {
|
|
47883
|
+
return scrollContainerRef.current.scrollTop;
|
|
47884
|
+
}
|
|
47885
|
+
return window.scrollY;
|
|
47886
|
+
}, [scrollContainerRef]);
|
|
47887
|
+
const handleScroll = useCallback(() => {
|
|
47888
|
+
if (rafRef.current !== null) return;
|
|
47889
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
47890
|
+
setIsScrolled(getScrollTop() > threshold);
|
|
47891
|
+
rafRef.current = null;
|
|
47892
|
+
});
|
|
47893
|
+
}, [threshold, getScrollTop]);
|
|
47894
|
+
useEffect(() => {
|
|
47895
|
+
if (!enabled) {
|
|
47896
|
+
setIsScrolled(false);
|
|
47897
|
+
return;
|
|
47898
|
+
}
|
|
47899
|
+
setIsScrolled(getScrollTop() > threshold);
|
|
47900
|
+
const target = scrollContainerRef?.current ?? window;
|
|
47901
|
+
target.addEventListener("scroll", handleScroll, { passive: true });
|
|
47902
|
+
return () => {
|
|
47903
|
+
target.removeEventListener("scroll", handleScroll);
|
|
47904
|
+
if (rafRef.current !== null) {
|
|
47905
|
+
cancelAnimationFrame(rafRef.current);
|
|
47906
|
+
rafRef.current = null;
|
|
47907
|
+
}
|
|
47908
|
+
};
|
|
47909
|
+
}, [enabled, handleScroll, threshold, getScrollTop, scrollContainerRef]);
|
|
47910
|
+
return { isScrolled };
|
|
47911
|
+
}
|
|
47912
|
+
function NavBarDetailsPanel({
|
|
47913
|
+
item,
|
|
47914
|
+
openDetailsId,
|
|
47915
|
+
onClose,
|
|
47916
|
+
navBottomOffset,
|
|
47917
|
+
navWidth,
|
|
47918
|
+
navLeft
|
|
47919
|
+
}) {
|
|
47920
|
+
if (typeof document === "undefined") return null;
|
|
47921
|
+
return createPortal(
|
|
47922
|
+
/* @__PURE__ */ jsx(AnimatePresence$1, { children: openDetailsId && item?.details && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47923
|
+
/* @__PURE__ */ jsx(
|
|
47924
|
+
motion$1.div,
|
|
47925
|
+
{
|
|
47926
|
+
className: "fixed inset-0 z-40 bg-black/20",
|
|
47927
|
+
style: { top: navBottomOffset },
|
|
47928
|
+
initial: { opacity: 0 },
|
|
47929
|
+
animate: { opacity: 1 },
|
|
47930
|
+
exit: { opacity: 0 },
|
|
47931
|
+
transition: { duration: 0.15 },
|
|
47932
|
+
onClick: onClose,
|
|
47933
|
+
"aria-hidden": "true"
|
|
47934
|
+
},
|
|
47935
|
+
`navbar-backdrop-${openDetailsId}`
|
|
47936
|
+
),
|
|
47937
|
+
/* @__PURE__ */ jsx(
|
|
47938
|
+
motion$1.div,
|
|
47939
|
+
{
|
|
47940
|
+
className: "fixed z-50 border-b border-header-border bg-background shadow-lg overflow-hidden",
|
|
47941
|
+
style: {
|
|
47942
|
+
top: navBottomOffset,
|
|
47943
|
+
left: navLeft,
|
|
47944
|
+
width: navWidth
|
|
47945
|
+
},
|
|
47946
|
+
initial: { opacity: 0, height: 0 },
|
|
47947
|
+
animate: { opacity: 1, height: "auto" },
|
|
47948
|
+
exit: { opacity: 0, height: 0 },
|
|
47949
|
+
transition: { duration: 0.2, ease: [0.25, 0.1, 0.25, 1] },
|
|
47950
|
+
children: /* @__PURE__ */ jsx("div", { className: "mx-auto w-full px-4 lg:px-6 py-6", children: item.details })
|
|
47951
|
+
},
|
|
47952
|
+
`navbar-panel-${openDetailsId}`
|
|
47953
|
+
)
|
|
47954
|
+
] }) }),
|
|
47955
|
+
document.body
|
|
47956
|
+
);
|
|
47957
|
+
}
|
|
47958
|
+
function NavBarMobileMenu({
|
|
47959
|
+
items,
|
|
47960
|
+
activeId,
|
|
47961
|
+
onItemClick,
|
|
47962
|
+
open,
|
|
47963
|
+
onOpenChange,
|
|
47964
|
+
linkComponent,
|
|
47965
|
+
title,
|
|
47966
|
+
colorClasses
|
|
47967
|
+
}) {
|
|
47968
|
+
const [expandedId, setExpandedId] = React10.useState(null);
|
|
47969
|
+
React10.useEffect(() => {
|
|
47970
|
+
if (!open) setExpandedId(null);
|
|
47971
|
+
}, [open]);
|
|
47972
|
+
const handleItemClick = (item) => {
|
|
47973
|
+
if (item.details) {
|
|
47974
|
+
setExpandedId(expandedId === item.id ? null : item.id);
|
|
47975
|
+
return;
|
|
47976
|
+
}
|
|
47977
|
+
onItemClick(item);
|
|
47978
|
+
onOpenChange(false);
|
|
47979
|
+
};
|
|
47980
|
+
return /* @__PURE__ */ jsx(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "w-[18rem] p-0", showCloseButton: true, children: [
|
|
47981
|
+
title && /* @__PURE__ */ jsx(SheetHeader, { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ jsx(SheetTitle, { children: title }) }),
|
|
47982
|
+
/* @__PURE__ */ jsx("nav", { className: "flex flex-col py-2", "aria-label": "Mobile navigation", children: items.map((item) => {
|
|
47983
|
+
const isActive = activeId === item.id;
|
|
47984
|
+
const isExpanded = expandedId === item.id;
|
|
47985
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
47986
|
+
/* @__PURE__ */ jsx(
|
|
47987
|
+
MobileMenuItemTrigger,
|
|
47988
|
+
{
|
|
47989
|
+
item,
|
|
47990
|
+
isActive,
|
|
47991
|
+
isExpanded,
|
|
47992
|
+
onClick: () => handleItemClick(item),
|
|
47993
|
+
linkComponent,
|
|
47994
|
+
colorClasses
|
|
47995
|
+
}
|
|
47996
|
+
),
|
|
47997
|
+
item.details && isExpanded && /* @__PURE__ */ jsx("div", { className: "px-4 py-3 border-b border-border/50 bg-muted/30 overflow-x-auto text-sm", children: item.details })
|
|
47998
|
+
] }, item.id);
|
|
47999
|
+
}) })
|
|
48000
|
+
] }) });
|
|
48001
|
+
}
|
|
48002
|
+
function MobileMenuItemTrigger({
|
|
48003
|
+
item,
|
|
48004
|
+
isActive,
|
|
48005
|
+
isExpanded,
|
|
48006
|
+
onClick,
|
|
48007
|
+
linkComponent,
|
|
48008
|
+
colorClasses
|
|
48009
|
+
}) {
|
|
48010
|
+
const classes = cn(
|
|
48011
|
+
"flex items-center gap-2 min-w-0 w-full px-4 h-11 text-sm font-medium",
|
|
48012
|
+
"text-foreground transition-colors",
|
|
48013
|
+
colorClasses ? colorClasses.hoverBgClass : "hover:bg-foreground/5",
|
|
48014
|
+
isActive && colorClasses && `${colorClasses.textClass} ${colorClasses.bgClass}`,
|
|
48015
|
+
item.disabled && "opacity-50 pointer-events-none"
|
|
48016
|
+
);
|
|
48017
|
+
const activeStyle = isActive && colorClasses?.textStyle ? { ...colorClasses.textStyle, ...colorClasses.bgStyle } : void 0;
|
|
48018
|
+
const content3 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48019
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.icon }),
|
|
48020
|
+
/* @__PURE__ */ jsx("span", { className: "truncate flex-1 text-left", children: item.label }),
|
|
48021
|
+
item.details && /* @__PURE__ */ jsx(
|
|
48022
|
+
ChevronDown,
|
|
48023
|
+
{
|
|
48024
|
+
className: cn(
|
|
48025
|
+
"size-4 shrink-0 text-foreground/40 transition-transform duration-200",
|
|
48026
|
+
isExpanded && "rotate-180"
|
|
48027
|
+
),
|
|
48028
|
+
"aria-hidden": "true"
|
|
48029
|
+
}
|
|
48030
|
+
)
|
|
48031
|
+
] });
|
|
48032
|
+
if (item.details) {
|
|
48033
|
+
return /* @__PURE__ */ jsx(
|
|
48034
|
+
"button",
|
|
48035
|
+
{
|
|
48036
|
+
type: "button",
|
|
48037
|
+
className: classes,
|
|
48038
|
+
style: activeStyle,
|
|
48039
|
+
onClick,
|
|
48040
|
+
"aria-expanded": isExpanded,
|
|
48041
|
+
disabled: item.disabled,
|
|
48042
|
+
children: content3
|
|
48043
|
+
}
|
|
48044
|
+
);
|
|
48045
|
+
}
|
|
48046
|
+
if (item.href && linkComponent) {
|
|
48047
|
+
const LinkComp = linkComponent;
|
|
48048
|
+
return /* @__PURE__ */ jsx(LinkComp, { to: item.href, className: classes, style: activeStyle, onClick, children: content3 });
|
|
48049
|
+
}
|
|
48050
|
+
if (item.href) {
|
|
48051
|
+
return /* @__PURE__ */ jsx("a", { href: item.href, className: classes, style: activeStyle, onClick, children: content3 });
|
|
48052
|
+
}
|
|
48053
|
+
return /* @__PURE__ */ jsx(
|
|
48054
|
+
"button",
|
|
48055
|
+
{
|
|
48056
|
+
type: "button",
|
|
48057
|
+
className: classes,
|
|
48058
|
+
style: activeStyle,
|
|
48059
|
+
onClick,
|
|
48060
|
+
disabled: item.disabled,
|
|
48061
|
+
children: content3
|
|
48062
|
+
}
|
|
48063
|
+
);
|
|
48064
|
+
}
|
|
48065
|
+
var PRESET_TEXT = {
|
|
48066
|
+
primary: "text-primary",
|
|
48067
|
+
secondary: "text-secondary",
|
|
48068
|
+
error: "text-error",
|
|
48069
|
+
info: "text-info",
|
|
48070
|
+
success: "text-success",
|
|
48071
|
+
warning: "text-warning",
|
|
48072
|
+
disabled: "text-disabled",
|
|
48073
|
+
gray: "text-gray",
|
|
48074
|
+
mist: "text-mist"
|
|
48075
|
+
};
|
|
48076
|
+
var PRESET_HOVER_TEXT = {
|
|
48077
|
+
primary: "hover:text-primary",
|
|
48078
|
+
secondary: "hover:text-secondary",
|
|
48079
|
+
error: "hover:text-error",
|
|
48080
|
+
info: "hover:text-info",
|
|
48081
|
+
success: "hover:text-success",
|
|
48082
|
+
warning: "hover:text-warning",
|
|
48083
|
+
disabled: "hover:text-disabled",
|
|
48084
|
+
gray: "hover:text-gray",
|
|
48085
|
+
mist: "hover:text-mist"
|
|
48086
|
+
};
|
|
48087
|
+
var PRESET_BG = {
|
|
48088
|
+
primary: "bg-primary/10",
|
|
48089
|
+
secondary: "bg-secondary/10",
|
|
48090
|
+
error: "bg-error/10",
|
|
48091
|
+
info: "bg-info/10",
|
|
48092
|
+
success: "bg-success/10",
|
|
48093
|
+
warning: "bg-warning/10",
|
|
48094
|
+
disabled: "bg-disabled/10",
|
|
48095
|
+
gray: "bg-gray/10",
|
|
48096
|
+
mist: "bg-mist/10"
|
|
48097
|
+
};
|
|
48098
|
+
var PRESET_HOVER_BG = {
|
|
48099
|
+
primary: "hover:bg-primary/5",
|
|
48100
|
+
secondary: "hover:bg-secondary/5",
|
|
48101
|
+
error: "hover:bg-error/5",
|
|
48102
|
+
info: "hover:bg-info/5",
|
|
48103
|
+
success: "hover:bg-success/5",
|
|
48104
|
+
warning: "hover:bg-warning/5",
|
|
48105
|
+
disabled: "hover:bg-disabled/5",
|
|
48106
|
+
gray: "hover:bg-gray/5",
|
|
48107
|
+
mist: "hover:bg-mist/5"
|
|
48108
|
+
};
|
|
48109
|
+
function resolveNavColor(color) {
|
|
48110
|
+
if (isPresetColor(color)) {
|
|
48111
|
+
return {
|
|
48112
|
+
textClass: PRESET_TEXT[color],
|
|
48113
|
+
hoverTextClass: PRESET_HOVER_TEXT[color],
|
|
48114
|
+
bgClass: PRESET_BG[color],
|
|
48115
|
+
hoverBgClass: PRESET_HOVER_BG[color]
|
|
48116
|
+
};
|
|
48117
|
+
}
|
|
48118
|
+
return {
|
|
48119
|
+
textClass: "",
|
|
48120
|
+
hoverTextClass: "",
|
|
48121
|
+
bgClass: "",
|
|
48122
|
+
hoverBgClass: "",
|
|
48123
|
+
textStyle: { color },
|
|
48124
|
+
bgStyle: { backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)` }
|
|
48125
|
+
};
|
|
48126
|
+
}
|
|
48127
|
+
function NavBar({
|
|
48128
|
+
logo,
|
|
48129
|
+
items,
|
|
48130
|
+
rightContent,
|
|
48131
|
+
activeId: activeIdProp,
|
|
48132
|
+
defaultActiveId,
|
|
48133
|
+
onActiveChange,
|
|
48134
|
+
openDetailsId: openDetailsIdProp,
|
|
48135
|
+
onDetailsPanelChange,
|
|
48136
|
+
position: position2 = "sticky",
|
|
48137
|
+
height: height2,
|
|
48138
|
+
morphOnScroll = false,
|
|
48139
|
+
morphScrollThreshold = 50,
|
|
48140
|
+
morphScrollContainer,
|
|
48141
|
+
moreLabel = "More",
|
|
48142
|
+
linkComponent,
|
|
48143
|
+
color = "primary",
|
|
48144
|
+
mobileMenuTitle,
|
|
48145
|
+
mobileMenuTrigger,
|
|
48146
|
+
className,
|
|
48147
|
+
itemsClassName
|
|
48148
|
+
}) {
|
|
48149
|
+
const isMobile = useIsMobile();
|
|
48150
|
+
const resolvedColor = resolveNavColor(color);
|
|
48151
|
+
const navRef = React10.useRef(null);
|
|
48152
|
+
const [activeId, setActiveId] = useControlledState({
|
|
48153
|
+
value: activeIdProp,
|
|
48154
|
+
defaultValue: defaultActiveId,
|
|
48155
|
+
onChange: onActiveChange
|
|
48156
|
+
});
|
|
48157
|
+
const [openDetailsId, setOpenDetailsId] = useControlledState({
|
|
48158
|
+
value: openDetailsIdProp ?? void 0,
|
|
48159
|
+
defaultValue: null,
|
|
48160
|
+
onChange: onDetailsPanelChange
|
|
48161
|
+
});
|
|
48162
|
+
const [mobileMenuOpen, setMobileMenuOpen] = React10.useState(false);
|
|
48163
|
+
const [navRect, setNavRect] = React10.useState({ bottom: 0, width: 0, left: 0 });
|
|
48164
|
+
const {
|
|
48165
|
+
containerRef,
|
|
48166
|
+
measureRef,
|
|
48167
|
+
moreButtonMeasureRef,
|
|
48168
|
+
visibleIds,
|
|
48169
|
+
overflowIds,
|
|
48170
|
+
showMore,
|
|
48171
|
+
measuring
|
|
48172
|
+
} = useNavBarOverflow(items);
|
|
48173
|
+
const { isScrolled } = useNavBarScroll({
|
|
48174
|
+
enabled: morphOnScroll && !isMobile,
|
|
48175
|
+
threshold: morphScrollThreshold,
|
|
48176
|
+
scrollContainerRef: morphScrollContainer
|
|
48177
|
+
});
|
|
48178
|
+
React10.useEffect(() => {
|
|
48179
|
+
if (!openDetailsId || !navRef.current) return;
|
|
48180
|
+
const updateRect = () => {
|
|
48181
|
+
if (navRef.current) {
|
|
48182
|
+
const rect = navRef.current.getBoundingClientRect();
|
|
48183
|
+
setNavRect({ bottom: rect.bottom, width: rect.width, left: rect.left });
|
|
48184
|
+
}
|
|
48185
|
+
};
|
|
48186
|
+
updateRect();
|
|
48187
|
+
window.addEventListener("scroll", updateRect, { passive: true });
|
|
48188
|
+
window.addEventListener("resize", updateRect, { passive: true });
|
|
48189
|
+
return () => {
|
|
48190
|
+
window.removeEventListener("scroll", updateRect);
|
|
48191
|
+
window.removeEventListener("resize", updateRect);
|
|
48192
|
+
};
|
|
48193
|
+
}, [openDetailsId]);
|
|
48194
|
+
React10.useEffect(() => {
|
|
48195
|
+
if (!openDetailsId) return;
|
|
48196
|
+
const handleKeyDown = (e) => {
|
|
48197
|
+
if (e.key === "Escape") {
|
|
48198
|
+
setOpenDetailsId(null);
|
|
48199
|
+
}
|
|
48200
|
+
};
|
|
48201
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
48202
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
48203
|
+
}, [openDetailsId, setOpenDetailsId]);
|
|
48204
|
+
React10.useEffect(() => {
|
|
48205
|
+
if (!openDetailsId) return;
|
|
48206
|
+
const handleMouseDown = (e) => {
|
|
48207
|
+
if (navRef.current && !navRef.current.contains(e.target)) {
|
|
48208
|
+
setOpenDetailsId(null);
|
|
48209
|
+
}
|
|
48210
|
+
};
|
|
48211
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
48212
|
+
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
48213
|
+
}, [openDetailsId, setOpenDetailsId]);
|
|
48214
|
+
const handleItemClick = React10.useCallback(
|
|
48215
|
+
(item) => {
|
|
48216
|
+
item.onClick?.();
|
|
48217
|
+
setActiveId(item.id);
|
|
48218
|
+
if (item.details) {
|
|
48219
|
+
setOpenDetailsId(openDetailsId === item.id ? null : item.id);
|
|
48220
|
+
} else {
|
|
48221
|
+
setOpenDetailsId(null);
|
|
48222
|
+
}
|
|
48223
|
+
},
|
|
48224
|
+
[openDetailsId, setActiveId, setOpenDetailsId]
|
|
48225
|
+
);
|
|
48226
|
+
React10.useEffect(() => {
|
|
48227
|
+
if (isMobile) setOpenDetailsId(null);
|
|
48228
|
+
}, [isMobile, setOpenDetailsId]);
|
|
48229
|
+
const resolvedHeight = height2 ?? "var(--espd-navbar-height)";
|
|
48230
|
+
const activeDetailsItem = openDetailsId ? items.find((i) => i.id === openDetailsId) : void 0;
|
|
48231
|
+
const [overflowDetailsItem, setOverflowDetailsItem] = React10.useState(null);
|
|
48232
|
+
const overflowDetailsRef = React10.useRef(null);
|
|
48233
|
+
const moreButtonRef = React10.useRef(null);
|
|
48234
|
+
const [overflowPanelPos, setOverflowPanelPos] = React10.useState({ top: 0, right: 0 });
|
|
48235
|
+
React10.useEffect(() => {
|
|
48236
|
+
if (!overflowDetailsItem || !moreButtonRef.current) return;
|
|
48237
|
+
const rect = moreButtonRef.current.getBoundingClientRect();
|
|
48238
|
+
setOverflowPanelPos({
|
|
48239
|
+
top: rect.bottom + 8,
|
|
48240
|
+
right: window.innerWidth - rect.right
|
|
48241
|
+
});
|
|
48242
|
+
}, [overflowDetailsItem]);
|
|
48243
|
+
React10.useEffect(() => {
|
|
48244
|
+
if (!overflowDetailsItem) return;
|
|
48245
|
+
const handleMouseDown = (e) => {
|
|
48246
|
+
if (overflowDetailsRef.current && !overflowDetailsRef.current.contains(e.target) && moreButtonRef.current && !moreButtonRef.current.contains(e.target)) {
|
|
48247
|
+
setOverflowDetailsItem(null);
|
|
48248
|
+
}
|
|
48249
|
+
};
|
|
48250
|
+
const handleKeyDown = (e) => {
|
|
48251
|
+
if (e.key === "Escape") setOverflowDetailsItem(null);
|
|
48252
|
+
};
|
|
48253
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
48254
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
48255
|
+
return () => {
|
|
48256
|
+
document.removeEventListener("mousedown", handleMouseDown);
|
|
48257
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
48258
|
+
};
|
|
48259
|
+
}, [overflowDetailsItem]);
|
|
48260
|
+
const hasActiveOverflowItem = overflowIds.some((id) => id === activeId);
|
|
48261
|
+
const navClasses = cn(
|
|
48262
|
+
"relative z-50 w-full",
|
|
48263
|
+
"backdrop-blur-md supports-[backdrop-filter]:bg-background/80",
|
|
48264
|
+
position2 === "sticky" && "sticky",
|
|
48265
|
+
position2 === "fixed" && "fixed left-0",
|
|
48266
|
+
// When morph is enabled: always set mx-auto + overflow-hidden so framer
|
|
48267
|
+
// motion can smoothly animate maxWidth and borderRadius without jumps.
|
|
48268
|
+
morphOnScroll && "mx-auto overflow-hidden",
|
|
48269
|
+
// Border: b-only when not morphed, full border when morphed
|
|
48270
|
+
isScrolled && morphOnScroll ? "border border-header-border" : "border-b border-header-border",
|
|
48271
|
+
className
|
|
48272
|
+
);
|
|
48273
|
+
const morphAnimateProps = morphOnScroll ? {
|
|
48274
|
+
initial: false,
|
|
48275
|
+
animate: {
|
|
48276
|
+
maxWidth: isScrolled ? 896 : 3e3,
|
|
48277
|
+
// 56rem = 896px; 3000 = effectively full
|
|
48278
|
+
borderRadius: isScrolled ? 9999 : 0,
|
|
48279
|
+
top: isScrolled ? 12 : 0,
|
|
48280
|
+
// float down from viewport edge when morphed
|
|
48281
|
+
boxShadow: isScrolled ? "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)" : "0 0 0 0 rgba(0,0,0,0)"
|
|
48282
|
+
},
|
|
48283
|
+
transition: {
|
|
48284
|
+
type: "spring",
|
|
48285
|
+
stiffness: 300,
|
|
48286
|
+
damping: 30
|
|
48287
|
+
}
|
|
48288
|
+
} : { style: { top: 0 } };
|
|
48289
|
+
if (isMobile) {
|
|
48290
|
+
return /* @__PURE__ */ jsxs(
|
|
48291
|
+
"nav",
|
|
48292
|
+
{
|
|
48293
|
+
ref: navRef,
|
|
48294
|
+
className: cn(
|
|
48295
|
+
"relative z-50 w-full border-b border-header-border",
|
|
48296
|
+
"backdrop-blur-md supports-[backdrop-filter]:bg-background/80",
|
|
48297
|
+
position2 === "sticky" && "sticky top-0",
|
|
48298
|
+
position2 === "fixed" && "fixed top-0 left-0",
|
|
48299
|
+
className
|
|
48300
|
+
),
|
|
48301
|
+
"aria-label": "Main navigation",
|
|
48302
|
+
children: [
|
|
48303
|
+
/* @__PURE__ */ jsxs(
|
|
48304
|
+
"div",
|
|
48305
|
+
{
|
|
48306
|
+
className: "flex items-center gap-3 px-4",
|
|
48307
|
+
style: { height: resolvedHeight },
|
|
48308
|
+
children: [
|
|
48309
|
+
mobileMenuTrigger ? /* @__PURE__ */ jsx("div", { onClick: () => setMobileMenuOpen(true), children: mobileMenuTrigger }) : /* @__PURE__ */ jsxs(
|
|
48310
|
+
Button$1,
|
|
48311
|
+
{
|
|
48312
|
+
variant: "ghost",
|
|
48313
|
+
size: "icon",
|
|
48314
|
+
className: "size-10 shrink-0",
|
|
48315
|
+
onClick: () => setMobileMenuOpen(true),
|
|
48316
|
+
children: [
|
|
48317
|
+
/* @__PURE__ */ jsx(Menu, { className: "!size-5" }),
|
|
48318
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Open menu" })
|
|
48319
|
+
]
|
|
48320
|
+
}
|
|
48321
|
+
),
|
|
48322
|
+
logo && /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: logo }),
|
|
48323
|
+
rightContent && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-2", children: rightContent })
|
|
48324
|
+
]
|
|
48325
|
+
}
|
|
48326
|
+
),
|
|
48327
|
+
/* @__PURE__ */ jsx(
|
|
48328
|
+
NavBarMobileMenu,
|
|
48329
|
+
{
|
|
48330
|
+
items,
|
|
48331
|
+
activeId,
|
|
48332
|
+
onItemClick: handleItemClick,
|
|
48333
|
+
open: mobileMenuOpen,
|
|
48334
|
+
onOpenChange: setMobileMenuOpen,
|
|
48335
|
+
linkComponent,
|
|
48336
|
+
title: mobileMenuTitle,
|
|
48337
|
+
colorClasses: {
|
|
48338
|
+
textClass: resolvedColor.textClass,
|
|
48339
|
+
bgClass: resolvedColor.bgClass,
|
|
48340
|
+
hoverBgClass: resolvedColor.hoverBgClass,
|
|
48341
|
+
textStyle: resolvedColor.textStyle,
|
|
48342
|
+
bgStyle: resolvedColor.bgStyle
|
|
48343
|
+
}
|
|
48344
|
+
}
|
|
48345
|
+
)
|
|
48346
|
+
]
|
|
48347
|
+
}
|
|
48348
|
+
);
|
|
48349
|
+
}
|
|
48350
|
+
return /* @__PURE__ */ jsxs(
|
|
48351
|
+
motion$1.nav,
|
|
48352
|
+
{
|
|
48353
|
+
ref: navRef,
|
|
48354
|
+
className: navClasses,
|
|
48355
|
+
...morphAnimateProps,
|
|
48356
|
+
"aria-label": "Main navigation",
|
|
48357
|
+
children: [
|
|
48358
|
+
/* @__PURE__ */ jsxs(
|
|
48359
|
+
"div",
|
|
48360
|
+
{
|
|
48361
|
+
className: cn(
|
|
48362
|
+
"flex items-center gap-4 mx-auto w-full py-2 transition-[padding] duration-300",
|
|
48363
|
+
isScrolled && morphOnScroll ? "px-4 md:px-6 lg:px-8" : "px-4 lg:px-6"
|
|
48364
|
+
),
|
|
48365
|
+
style: { minHeight: resolvedHeight },
|
|
48366
|
+
children: [
|
|
48367
|
+
logo && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: logo }),
|
|
48368
|
+
/* @__PURE__ */ jsxs(
|
|
48369
|
+
"div",
|
|
48370
|
+
{
|
|
48371
|
+
ref: containerRef,
|
|
48372
|
+
className: cn(
|
|
48373
|
+
"flex-1 flex items-center min-w-0",
|
|
48374
|
+
logo ? "justify-center" : "justify-start",
|
|
48375
|
+
itemsClassName
|
|
48376
|
+
),
|
|
48377
|
+
children: [
|
|
48378
|
+
/* @__PURE__ */ jsx(
|
|
48379
|
+
"ul",
|
|
48380
|
+
{
|
|
48381
|
+
ref: measureRef,
|
|
48382
|
+
className: "flex items-center gap-1 list-none m-0 p-0 absolute invisible h-0 overflow-hidden whitespace-nowrap pointer-events-none",
|
|
48383
|
+
"aria-hidden": "true",
|
|
48384
|
+
children: items.map((item) => /* @__PURE__ */ jsx("li", { "data-nav-item-id": item.id, className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
48385
|
+
NavBarItemTrigger,
|
|
48386
|
+
{
|
|
48387
|
+
item,
|
|
48388
|
+
isActive: false,
|
|
48389
|
+
isDetailsOpen: false,
|
|
48390
|
+
onClick: () => {
|
|
48391
|
+
},
|
|
48392
|
+
tabIndex: -1
|
|
48393
|
+
}
|
|
48394
|
+
) }, item.id))
|
|
48395
|
+
}
|
|
48396
|
+
),
|
|
48397
|
+
/* @__PURE__ */ jsx(
|
|
48398
|
+
"div",
|
|
48399
|
+
{
|
|
48400
|
+
ref: moreButtonMeasureRef,
|
|
48401
|
+
className: "absolute invisible h-0 overflow-hidden pointer-events-none",
|
|
48402
|
+
"aria-hidden": "true",
|
|
48403
|
+
children: /* @__PURE__ */ jsx(MoreButton, { label: moreLabel, hasActiveOverflowItem: false })
|
|
48404
|
+
}
|
|
48405
|
+
),
|
|
48406
|
+
/* @__PURE__ */ jsx(
|
|
48407
|
+
"ul",
|
|
48408
|
+
{
|
|
48409
|
+
className: cn(
|
|
48410
|
+
"flex items-center gap-1 list-none m-0 p-0",
|
|
48411
|
+
measuring && "opacity-0"
|
|
48412
|
+
),
|
|
48413
|
+
role: "menubar",
|
|
48414
|
+
"aria-label": "Main navigation",
|
|
48415
|
+
children: items.filter((item) => visibleIds.includes(item.id)).map((item) => /* @__PURE__ */ jsx("li", { role: "none", className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
48416
|
+
NavBarItemTrigger,
|
|
48417
|
+
{
|
|
48418
|
+
item,
|
|
48419
|
+
isActive: activeId === item.id,
|
|
48420
|
+
isDetailsOpen: openDetailsId === item.id,
|
|
48421
|
+
onClick: () => handleItemClick(item),
|
|
48422
|
+
linkComponent,
|
|
48423
|
+
resolvedColor,
|
|
48424
|
+
isPill: isScrolled && morphOnScroll
|
|
48425
|
+
}
|
|
48426
|
+
) }, item.id))
|
|
48427
|
+
}
|
|
48428
|
+
),
|
|
48429
|
+
showMore && /* @__PURE__ */ jsx("div", { ref: moreButtonRef, className: cn("shrink-0 ml-1", measuring && "opacity-0"), children: /* @__PURE__ */ jsxs(DropdownMenu, { onOpenChange: (open) => {
|
|
48430
|
+
if (open) setOverflowDetailsItem(null);
|
|
48431
|
+
}, children: [
|
|
48432
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
48433
|
+
MoreButton,
|
|
48434
|
+
{
|
|
48435
|
+
label: moreLabel,
|
|
48436
|
+
hasActiveOverflowItem,
|
|
48437
|
+
resolvedColor
|
|
48438
|
+
}
|
|
48439
|
+
) }),
|
|
48440
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", sideOffset: 8, children: items.filter((item) => overflowIds.includes(item.id)).map((item) => /* @__PURE__ */ jsxs(
|
|
48441
|
+
DropdownMenuItem,
|
|
48442
|
+
{
|
|
48443
|
+
onClick: () => {
|
|
48444
|
+
item.onClick?.();
|
|
48445
|
+
setActiveId(item.id);
|
|
48446
|
+
setOpenDetailsId(null);
|
|
48447
|
+
if (item.details) {
|
|
48448
|
+
setOverflowDetailsItem(
|
|
48449
|
+
overflowDetailsItem?.id === item.id ? null : item
|
|
48450
|
+
);
|
|
48451
|
+
}
|
|
48452
|
+
},
|
|
48453
|
+
className: cn(
|
|
48454
|
+
activeId === item.id && `${resolvedColor.textClass} ${resolvedColor.bgClass}`
|
|
48455
|
+
),
|
|
48456
|
+
style: activeId === item.id && resolvedColor.textStyle ? { ...resolvedColor.textStyle, ...resolvedColor.bgStyle } : void 0,
|
|
48457
|
+
disabled: item.disabled,
|
|
48458
|
+
children: [
|
|
48459
|
+
item.icon,
|
|
48460
|
+
item.label
|
|
48461
|
+
]
|
|
48462
|
+
},
|
|
48463
|
+
item.id
|
|
48464
|
+
)) })
|
|
48465
|
+
] }) }),
|
|
48466
|
+
overflowDetailsItem?.details && createPortal(
|
|
48467
|
+
/* @__PURE__ */ jsxs(
|
|
48468
|
+
"div",
|
|
48469
|
+
{
|
|
48470
|
+
ref: overflowDetailsRef,
|
|
48471
|
+
className: cn(
|
|
48472
|
+
"fixed z-50",
|
|
48473
|
+
"w-max max-w-[min(24rem,calc(100vw-2rem))]",
|
|
48474
|
+
"rounded-lg border border-border bg-background p-4 shadow-lg",
|
|
48475
|
+
"animate-in fade-in-0 zoom-in-95"
|
|
48476
|
+
),
|
|
48477
|
+
style: {
|
|
48478
|
+
top: overflowPanelPos.top,
|
|
48479
|
+
right: overflowPanelPos.right
|
|
48480
|
+
},
|
|
48481
|
+
children: [
|
|
48482
|
+
/* @__PURE__ */ jsx(
|
|
48483
|
+
"button",
|
|
48484
|
+
{
|
|
48485
|
+
type: "button",
|
|
48486
|
+
onClick: () => setOverflowDetailsItem(null),
|
|
48487
|
+
className: cn(
|
|
48488
|
+
"absolute top-2 right-2 p-1 rounded-md",
|
|
48489
|
+
"text-foreground/40 hover:text-foreground hover:bg-foreground/5",
|
|
48490
|
+
"transition-colors cursor-pointer"
|
|
48491
|
+
),
|
|
48492
|
+
"aria-label": "Close panel",
|
|
48493
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
48494
|
+
}
|
|
48495
|
+
),
|
|
48496
|
+
overflowDetailsItem.details
|
|
48497
|
+
]
|
|
48498
|
+
}
|
|
48499
|
+
),
|
|
48500
|
+
document.body
|
|
48501
|
+
)
|
|
48502
|
+
]
|
|
48503
|
+
}
|
|
48504
|
+
),
|
|
48505
|
+
rightContent && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-2", children: rightContent })
|
|
48506
|
+
]
|
|
48507
|
+
}
|
|
48508
|
+
),
|
|
48509
|
+
/* @__PURE__ */ jsx(
|
|
48510
|
+
NavBarDetailsPanel,
|
|
48511
|
+
{
|
|
48512
|
+
item: activeDetailsItem,
|
|
48513
|
+
openDetailsId: openDetailsId ?? null,
|
|
48514
|
+
onClose: () => setOpenDetailsId(null),
|
|
48515
|
+
navBottomOffset: navRect.bottom,
|
|
48516
|
+
navWidth: navRect.width,
|
|
48517
|
+
navLeft: navRect.left
|
|
48518
|
+
}
|
|
48519
|
+
)
|
|
48520
|
+
]
|
|
48521
|
+
}
|
|
48522
|
+
);
|
|
48523
|
+
}
|
|
48524
|
+
var MoreButton = React10.forwardRef(function MoreButton2({ label, hasActiveOverflowItem, resolvedColor, ...props }, ref) {
|
|
48525
|
+
return /* @__PURE__ */ jsxs(
|
|
48526
|
+
"button",
|
|
48527
|
+
{
|
|
48528
|
+
ref,
|
|
48529
|
+
type: "button",
|
|
48530
|
+
className: cn(
|
|
48531
|
+
"inline-flex items-center gap-1 px-3 h-8 rounded-md",
|
|
48532
|
+
"text-sm font-medium whitespace-nowrap cursor-pointer",
|
|
48533
|
+
"transition-colors duration-150",
|
|
48534
|
+
"text-foreground/80 hover:text-foreground",
|
|
48535
|
+
resolvedColor ? resolvedColor.hoverBgClass : "hover:bg-foreground/5",
|
|
48536
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
48537
|
+
hasActiveOverflowItem && resolvedColor && `${resolvedColor.textClass} ${resolvedColor.bgClass}`
|
|
48538
|
+
),
|
|
48539
|
+
style: hasActiveOverflowItem && resolvedColor?.textStyle ? { ...resolvedColor.textStyle, ...resolvedColor.bgStyle } : void 0,
|
|
48540
|
+
"aria-label": "More navigation items",
|
|
48541
|
+
...props,
|
|
48542
|
+
children: [
|
|
48543
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
48544
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5" })
|
|
48545
|
+
]
|
|
48546
|
+
}
|
|
48547
|
+
);
|
|
48548
|
+
});
|
|
48549
|
+
function NavBarItemTrigger({
|
|
48550
|
+
item,
|
|
48551
|
+
isActive,
|
|
48552
|
+
isDetailsOpen,
|
|
48553
|
+
onClick,
|
|
48554
|
+
linkComponent,
|
|
48555
|
+
tabIndex,
|
|
48556
|
+
resolvedColor,
|
|
48557
|
+
isPill
|
|
48558
|
+
}) {
|
|
48559
|
+
const classes = cn(
|
|
48560
|
+
"inline-flex items-center gap-1 px-3 h-8",
|
|
48561
|
+
isPill ? "rounded-full" : "rounded-md",
|
|
48562
|
+
"text-sm font-medium whitespace-nowrap cursor-pointer",
|
|
48563
|
+
"transition-colors duration-150",
|
|
48564
|
+
"text-foreground/80 hover:text-foreground",
|
|
48565
|
+
resolvedColor ? resolvedColor.hoverBgClass : "hover:bg-foreground/5",
|
|
48566
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
48567
|
+
isActive && resolvedColor && `${resolvedColor.textClass} ${resolvedColor.bgClass}`,
|
|
48568
|
+
isDetailsOpen && resolvedColor && `${resolvedColor.textClass} ${resolvedColor.bgClass}`,
|
|
48569
|
+
item.disabled && "opacity-50 pointer-events-none"
|
|
48570
|
+
);
|
|
48571
|
+
const colorStyle = resolvedColor?.textStyle && (isActive || isDetailsOpen) ? {
|
|
48572
|
+
...resolvedColor.textStyle,
|
|
48573
|
+
...resolvedColor.bgStyle
|
|
48574
|
+
} : void 0;
|
|
48575
|
+
const content3 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48576
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.icon }),
|
|
48577
|
+
/* @__PURE__ */ jsx("span", { children: item.label }),
|
|
48578
|
+
item.details && /* @__PURE__ */ jsx(
|
|
48579
|
+
ChevronDown,
|
|
48580
|
+
{
|
|
48581
|
+
className: cn(
|
|
48582
|
+
"size-3.5 transition-transform duration-200",
|
|
48583
|
+
isDetailsOpen && "rotate-180"
|
|
48584
|
+
),
|
|
48585
|
+
"aria-hidden": "true"
|
|
48586
|
+
}
|
|
48587
|
+
)
|
|
48588
|
+
] });
|
|
48589
|
+
if (item.details) {
|
|
48590
|
+
return /* @__PURE__ */ jsx(
|
|
48591
|
+
"button",
|
|
48592
|
+
{
|
|
48593
|
+
type: "button",
|
|
48594
|
+
className: classes,
|
|
48595
|
+
style: colorStyle,
|
|
48596
|
+
onClick,
|
|
48597
|
+
role: "menuitem",
|
|
48598
|
+
"aria-expanded": isDetailsOpen,
|
|
48599
|
+
"aria-haspopup": "true",
|
|
48600
|
+
disabled: item.disabled,
|
|
48601
|
+
tabIndex,
|
|
48602
|
+
children: content3
|
|
48603
|
+
}
|
|
48604
|
+
);
|
|
48605
|
+
}
|
|
48606
|
+
if (item.href) {
|
|
48607
|
+
if (linkComponent) {
|
|
48608
|
+
const LinkComp = linkComponent;
|
|
48609
|
+
return /* @__PURE__ */ jsx(
|
|
48610
|
+
LinkComp,
|
|
48611
|
+
{
|
|
48612
|
+
to: item.href,
|
|
48613
|
+
className: classes,
|
|
48614
|
+
style: colorStyle,
|
|
48615
|
+
onClick,
|
|
48616
|
+
role: "menuitem",
|
|
48617
|
+
tabIndex,
|
|
48618
|
+
children: content3
|
|
48619
|
+
}
|
|
48620
|
+
);
|
|
48621
|
+
}
|
|
48622
|
+
return /* @__PURE__ */ jsx(
|
|
48623
|
+
"a",
|
|
48624
|
+
{
|
|
48625
|
+
href: item.href,
|
|
48626
|
+
className: classes,
|
|
48627
|
+
style: colorStyle,
|
|
48628
|
+
onClick,
|
|
48629
|
+
role: "menuitem",
|
|
48630
|
+
tabIndex,
|
|
48631
|
+
children: content3
|
|
48632
|
+
}
|
|
48633
|
+
);
|
|
48634
|
+
}
|
|
48635
|
+
return /* @__PURE__ */ jsx(
|
|
48636
|
+
"button",
|
|
48637
|
+
{
|
|
48638
|
+
type: "button",
|
|
48639
|
+
className: classes,
|
|
48640
|
+
style: colorStyle,
|
|
48641
|
+
onClick,
|
|
48642
|
+
role: "menuitem",
|
|
48643
|
+
disabled: item.disabled,
|
|
48644
|
+
tabIndex,
|
|
48645
|
+
children: content3
|
|
48646
|
+
}
|
|
48647
|
+
);
|
|
48648
|
+
}
|
|
47796
48649
|
var Select = SelectPrimitive.Root;
|
|
47797
48650
|
var SelectGroup = SelectPrimitive.Group;
|
|
47798
48651
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -47801,7 +48654,7 @@ var triggerSizeClasses = {
|
|
|
47801
48654
|
default: "h-10 px-3.5 py-2 text-base md:text-sm [&_[data-slot=select-icon]]:size-4",
|
|
47802
48655
|
lg: "h-12 px-5 text-lg [&_[data-slot=select-icon]]:size-5"
|
|
47803
48656
|
};
|
|
47804
|
-
var SelectTrigger =
|
|
48657
|
+
var SelectTrigger = React10.forwardRef(({ className, children, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
47805
48658
|
SelectPrimitive.Trigger,
|
|
47806
48659
|
{
|
|
47807
48660
|
ref,
|
|
@@ -47824,7 +48677,7 @@ var SelectTrigger = React8.forwardRef(({ className, children, size = "default",
|
|
|
47824
48677
|
}
|
|
47825
48678
|
));
|
|
47826
48679
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
47827
|
-
var SelectScrollUpButton =
|
|
48680
|
+
var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47828
48681
|
SelectPrimitive.ScrollUpButton,
|
|
47829
48682
|
{
|
|
47830
48683
|
ref,
|
|
@@ -47837,7 +48690,7 @@ var SelectScrollUpButton = React8.forwardRef(({ className, ...props }, ref) => /
|
|
|
47837
48690
|
}
|
|
47838
48691
|
));
|
|
47839
48692
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
47840
|
-
var SelectScrollDownButton =
|
|
48693
|
+
var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47841
48694
|
SelectPrimitive.ScrollDownButton,
|
|
47842
48695
|
{
|
|
47843
48696
|
ref,
|
|
@@ -47850,7 +48703,7 @@ var SelectScrollDownButton = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
47850
48703
|
}
|
|
47851
48704
|
));
|
|
47852
48705
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
47853
|
-
var SelectContent =
|
|
48706
|
+
var SelectContent = React10.forwardRef(({ className, children, position: position2 = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
47854
48707
|
SelectPrimitive.Content,
|
|
47855
48708
|
{
|
|
47856
48709
|
ref,
|
|
@@ -47878,7 +48731,7 @@ var SelectContent = React8.forwardRef(({ className, children, position: position
|
|
|
47878
48731
|
}
|
|
47879
48732
|
) }));
|
|
47880
48733
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
47881
|
-
var SelectLabel =
|
|
48734
|
+
var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47882
48735
|
SelectPrimitive.Label,
|
|
47883
48736
|
{
|
|
47884
48737
|
ref,
|
|
@@ -47887,7 +48740,7 @@ var SelectLabel = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
47887
48740
|
}
|
|
47888
48741
|
));
|
|
47889
48742
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
47890
|
-
var SelectItem =
|
|
48743
|
+
var SelectItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
47891
48744
|
SelectPrimitive.Item,
|
|
47892
48745
|
{
|
|
47893
48746
|
ref,
|
|
@@ -47903,7 +48756,7 @@ var SelectItem = React8.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
47903
48756
|
}
|
|
47904
48757
|
));
|
|
47905
48758
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
47906
|
-
var SelectSeparator =
|
|
48759
|
+
var SelectSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47907
48760
|
SelectPrimitive.Separator,
|
|
47908
48761
|
{
|
|
47909
48762
|
ref,
|
|
@@ -47920,13 +48773,13 @@ function Tabs({
|
|
|
47920
48773
|
children,
|
|
47921
48774
|
...props
|
|
47922
48775
|
}) {
|
|
47923
|
-
const [activeValue, setActiveValue] =
|
|
48776
|
+
const [activeValue, setActiveValue] = React10.useState(
|
|
47924
48777
|
defaultValue
|
|
47925
48778
|
);
|
|
47926
|
-
const triggersRef =
|
|
47927
|
-
const initialSet =
|
|
48779
|
+
const triggersRef = React10.useRef(/* @__PURE__ */ new Map());
|
|
48780
|
+
const initialSet = React10.useRef(false);
|
|
47928
48781
|
const isControlled = value2 !== void 0;
|
|
47929
|
-
|
|
48782
|
+
React10.useEffect(() => {
|
|
47930
48783
|
if (!isControlled && activeValue === void 0 && triggersRef.current.size > 0 && !initialSet.current) {
|
|
47931
48784
|
const firstTab = triggersRef.current.keys().next().value;
|
|
47932
48785
|
if (firstTab !== void 0) {
|
|
@@ -47935,7 +48788,7 @@ function Tabs({
|
|
|
47935
48788
|
}
|
|
47936
48789
|
}
|
|
47937
48790
|
}, [activeValue, isControlled]);
|
|
47938
|
-
const registerTrigger =
|
|
48791
|
+
const registerTrigger = React10.useCallback(
|
|
47939
48792
|
(val2, node) => {
|
|
47940
48793
|
if (node) {
|
|
47941
48794
|
triggersRef.current.set(val2, node);
|
|
@@ -47949,7 +48802,7 @@ function Tabs({
|
|
|
47949
48802
|
},
|
|
47950
48803
|
[activeValue, isControlled]
|
|
47951
48804
|
);
|
|
47952
|
-
const handleValueChange =
|
|
48805
|
+
const handleValueChange = React10.useCallback(
|
|
47953
48806
|
(val2) => {
|
|
47954
48807
|
if (!isControlled) setActiveValue(val2);
|
|
47955
48808
|
else onValueChange?.(val2);
|
|
@@ -47998,9 +48851,9 @@ function TabsTrigger({
|
|
|
47998
48851
|
...props
|
|
47999
48852
|
}) {
|
|
48000
48853
|
const { activeValue, handleValueChange, registerTrigger } = useTabs();
|
|
48001
|
-
const localRef =
|
|
48002
|
-
|
|
48003
|
-
|
|
48854
|
+
const localRef = React10.useRef(null);
|
|
48855
|
+
React10.useImperativeHandle(ref, () => localRef.current);
|
|
48856
|
+
React10.useEffect(() => {
|
|
48004
48857
|
registerTrigger(value2, localRef.current);
|
|
48005
48858
|
return () => registerTrigger(value2, null);
|
|
48006
48859
|
}, [value2, registerTrigger]);
|
|
@@ -48029,15 +48882,15 @@ function TabsContents({
|
|
|
48029
48882
|
...props
|
|
48030
48883
|
}) {
|
|
48031
48884
|
const { activeValue } = useTabs();
|
|
48032
|
-
const childrenArray =
|
|
48885
|
+
const childrenArray = React10.Children.toArray(children);
|
|
48033
48886
|
const activeIndex = childrenArray.findIndex(
|
|
48034
|
-
(child) =>
|
|
48887
|
+
(child) => React10.isValidElement(child) && typeof child.props === "object" && child.props !== null && "value" in child.props && child.props.value === activeValue
|
|
48035
48888
|
);
|
|
48036
|
-
const containerRef =
|
|
48037
|
-
const itemRefs =
|
|
48038
|
-
const [height2, setHeight] =
|
|
48039
|
-
const roRef =
|
|
48040
|
-
const measure =
|
|
48889
|
+
const containerRef = React10.useRef(null);
|
|
48890
|
+
const itemRefs = React10.useRef([]);
|
|
48891
|
+
const [height2, setHeight] = React10.useState(0);
|
|
48892
|
+
const roRef = React10.useRef(null);
|
|
48893
|
+
const measure = React10.useCallback((index2) => {
|
|
48041
48894
|
const pane = itemRefs.current[index2];
|
|
48042
48895
|
const container = containerRef.current;
|
|
48043
48896
|
if (!pane || !container) return 0;
|
|
@@ -48051,7 +48904,7 @@ function TabsContents({
|
|
|
48051
48904
|
total = Math.ceil(total * dpr) / dpr;
|
|
48052
48905
|
return total;
|
|
48053
48906
|
}, []);
|
|
48054
|
-
|
|
48907
|
+
React10.useEffect(() => {
|
|
48055
48908
|
if (roRef.current) {
|
|
48056
48909
|
roRef.current.disconnect();
|
|
48057
48910
|
roRef.current = null;
|
|
@@ -48072,7 +48925,7 @@ function TabsContents({
|
|
|
48072
48925
|
roRef.current = null;
|
|
48073
48926
|
};
|
|
48074
48927
|
}, [activeIndex, childrenArray.length, measure]);
|
|
48075
|
-
|
|
48928
|
+
React10.useLayoutEffect(() => {
|
|
48076
48929
|
if (height2 === 0 && activeIndex >= 0) {
|
|
48077
48930
|
const next = measure(activeIndex);
|
|
48078
48931
|
if (next !== 0) setHeight(next);
|
|
@@ -48133,7 +48986,7 @@ function TabsContent({
|
|
|
48133
48986
|
}
|
|
48134
48987
|
);
|
|
48135
48988
|
}
|
|
48136
|
-
var TabsListVariantContext =
|
|
48989
|
+
var TabsListVariantContext = React10.createContext(void 0);
|
|
48137
48990
|
function LineTabsListContent({ className, ...props }) {
|
|
48138
48991
|
return /* @__PURE__ */ jsx(
|
|
48139
48992
|
TabsHighlight,
|
|
@@ -48214,7 +49067,7 @@ function TabsList2({ className, variant, ...props }) {
|
|
|
48214
49067
|
}
|
|
48215
49068
|
var tabsTriggerBaseClass = "data-[state=active]:text-primary tracking-wide focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md w-full px-2 text-sm font-medium whitespace-nowrap transition-colors duration-500 ease-in-out focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
48216
49069
|
function TabsTrigger2({ className, ...props }) {
|
|
48217
|
-
const listVariant =
|
|
49070
|
+
const listVariant = React10.useContext(TabsListVariantContext);
|
|
48218
49071
|
const isLine = listVariant === "line";
|
|
48219
49072
|
return /* @__PURE__ */ jsx(TabsHighlightItem, { value: props.value, className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
48220
49073
|
TabsTrigger,
|
|
@@ -48247,7 +49100,7 @@ function extractTextLabel(children) {
|
|
|
48247
49100
|
if (Array.isArray(children)) {
|
|
48248
49101
|
return children.map(extractTextLabel).join("");
|
|
48249
49102
|
}
|
|
48250
|
-
if (
|
|
49103
|
+
if (React10.isValidElement(children) && children.props && typeof children.props === "object" && children.props !== null && "children" in children.props) {
|
|
48251
49104
|
return extractTextLabel(
|
|
48252
49105
|
children.props.children
|
|
48253
49106
|
);
|
|
@@ -48255,13 +49108,13 @@ function extractTextLabel(children) {
|
|
|
48255
49108
|
return "";
|
|
48256
49109
|
}
|
|
48257
49110
|
function isTabElement(node) {
|
|
48258
|
-
return
|
|
49111
|
+
return React10.isValidElement(node) && node.type === ScrollableSectionsTab;
|
|
48259
49112
|
}
|
|
48260
49113
|
function partitionChildren(children) {
|
|
48261
49114
|
let tabsEl = null;
|
|
48262
49115
|
const contentEls = [];
|
|
48263
|
-
|
|
48264
|
-
if (!
|
|
49116
|
+
React10.Children.forEach(children, (child) => {
|
|
49117
|
+
if (!React10.isValidElement(child)) return;
|
|
48265
49118
|
if (child.type === ScrollableSectionsTabs) {
|
|
48266
49119
|
tabsEl = child;
|
|
48267
49120
|
} else if (child.type === ScrollableSectionsContent) {
|
|
@@ -48272,9 +49125,9 @@ function partitionChildren(children) {
|
|
|
48272
49125
|
});
|
|
48273
49126
|
return { tabsEl, contentEls };
|
|
48274
49127
|
}
|
|
48275
|
-
var ScrollableSectionsContext =
|
|
49128
|
+
var ScrollableSectionsContext = React10.createContext(null);
|
|
48276
49129
|
function useScrollableSections() {
|
|
48277
|
-
const ctx =
|
|
49130
|
+
const ctx = React10.useContext(ScrollableSectionsContext);
|
|
48278
49131
|
if (!ctx) {
|
|
48279
49132
|
throw new Error(
|
|
48280
49133
|
"ScrollableSections subcomponents must be used within ScrollableSections."
|
|
@@ -48321,19 +49174,19 @@ function ScrollableSectionsRoot({
|
|
|
48321
49174
|
...rest
|
|
48322
49175
|
}) {
|
|
48323
49176
|
const { tabsEl, contentEls } = partitionChildren(children);
|
|
48324
|
-
const [tabsItems, setTabsItems] =
|
|
48325
|
-
const [sectionsVersion, bumpSections] =
|
|
49177
|
+
const [tabsItems, setTabsItems] = React10.useState([]);
|
|
49178
|
+
const [sectionsVersion, bumpSections] = React10.useReducer(
|
|
48326
49179
|
(n) => n + 1,
|
|
48327
49180
|
0
|
|
48328
49181
|
);
|
|
48329
|
-
const sectionsRef =
|
|
48330
|
-
const containerRef =
|
|
48331
|
-
const mobileNavRef =
|
|
48332
|
-
const ignoreSpyUntil =
|
|
48333
|
-
const prefersReducedMotionRef =
|
|
48334
|
-
const didDefaultScrollRef =
|
|
48335
|
-
const [activeId, setActiveId] =
|
|
48336
|
-
|
|
49182
|
+
const sectionsRef = React10.useRef(/* @__PURE__ */ new Map());
|
|
49183
|
+
const containerRef = React10.useRef(null);
|
|
49184
|
+
const mobileNavRef = React10.useRef(null);
|
|
49185
|
+
const ignoreSpyUntil = React10.useRef(0);
|
|
49186
|
+
const prefersReducedMotionRef = React10.useRef(false);
|
|
49187
|
+
const didDefaultScrollRef = React10.useRef(false);
|
|
49188
|
+
const [activeId, setActiveId] = React10.useState(() => defaultValue ?? "");
|
|
49189
|
+
React10.useEffect(() => {
|
|
48337
49190
|
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
48338
49191
|
prefersReducedMotionRef.current = mq.matches;
|
|
48339
49192
|
const onChange = () => {
|
|
@@ -48343,7 +49196,7 @@ function ScrollableSectionsRoot({
|
|
|
48343
49196
|
return () => mq.removeEventListener("change", onChange);
|
|
48344
49197
|
}, []);
|
|
48345
49198
|
const safeActiveId = activeId && tabsItems.some((t) => t.id === activeId) ? activeId : tabsItems[0]?.id ?? "";
|
|
48346
|
-
const selectSection =
|
|
49199
|
+
const selectSection = React10.useCallback(
|
|
48347
49200
|
(id) => {
|
|
48348
49201
|
const el = sectionsRef.current.get(id);
|
|
48349
49202
|
if (!el) return;
|
|
@@ -48357,7 +49210,7 @@ function ScrollableSectionsRoot({
|
|
|
48357
49210
|
},
|
|
48358
49211
|
[]
|
|
48359
49212
|
);
|
|
48360
|
-
const registerSection =
|
|
49213
|
+
const registerSection = React10.useCallback(
|
|
48361
49214
|
(id, el) => {
|
|
48362
49215
|
if (el) sectionsRef.current.set(id, el);
|
|
48363
49216
|
else sectionsRef.current.delete(id);
|
|
@@ -48365,7 +49218,7 @@ function ScrollableSectionsRoot({
|
|
|
48365
49218
|
},
|
|
48366
49219
|
[]
|
|
48367
49220
|
);
|
|
48368
|
-
const setTabsItemsStable =
|
|
49221
|
+
const setTabsItemsStable = React10.useCallback(
|
|
48369
49222
|
(items) => {
|
|
48370
49223
|
setTabsItems(items);
|
|
48371
49224
|
setActiveId((prev) => {
|
|
@@ -48379,7 +49232,7 @@ function ScrollableSectionsRoot({
|
|
|
48379
49232
|
},
|
|
48380
49233
|
[defaultValue]
|
|
48381
49234
|
);
|
|
48382
|
-
|
|
49235
|
+
React10.useLayoutEffect(() => {
|
|
48383
49236
|
if (!defaultValue || didDefaultScrollRef.current) return;
|
|
48384
49237
|
const el = sectionsRef.current.get(defaultValue);
|
|
48385
49238
|
if (!el) return;
|
|
@@ -48389,7 +49242,7 @@ function ScrollableSectionsRoot({
|
|
|
48389
49242
|
setActiveId(defaultValue);
|
|
48390
49243
|
});
|
|
48391
49244
|
}, [defaultValue, sectionsVersion]);
|
|
48392
|
-
|
|
49245
|
+
React10.useEffect(() => {
|
|
48393
49246
|
const orderedIds = tabsItems.map((t) => t.id);
|
|
48394
49247
|
if (orderedIds.length === 0) return;
|
|
48395
49248
|
const updateActive = () => {
|
|
@@ -48422,7 +49275,7 @@ function ScrollableSectionsRoot({
|
|
|
48422
49275
|
window.removeEventListener("resize", updateActive);
|
|
48423
49276
|
};
|
|
48424
49277
|
}, [tabsItems, scrollRootRef, sectionsVersion]);
|
|
48425
|
-
const contextValue =
|
|
49278
|
+
const contextValue = React10.useMemo(
|
|
48426
49279
|
() => ({
|
|
48427
49280
|
activeId: safeActiveId,
|
|
48428
49281
|
selectSection,
|
|
@@ -48491,11 +49344,11 @@ function ScrollableSectionsTabs({
|
|
|
48491
49344
|
...rest
|
|
48492
49345
|
}) {
|
|
48493
49346
|
const { activeId, selectSection, setTabsItems } = useScrollableSections();
|
|
48494
|
-
const tabNodes =
|
|
48495
|
-
() =>
|
|
49347
|
+
const tabNodes = React10.useMemo(
|
|
49348
|
+
() => React10.Children.toArray(children).filter(isTabElement),
|
|
48496
49349
|
[children]
|
|
48497
49350
|
);
|
|
48498
|
-
const items =
|
|
49351
|
+
const items = React10.useMemo(
|
|
48499
49352
|
() => tabNodes.map((node) => {
|
|
48500
49353
|
const { id, label, children: tabChildren } = node.props;
|
|
48501
49354
|
const text2 = label?.trim() || extractTextLabel(tabChildren).trim() || id;
|
|
@@ -48503,7 +49356,7 @@ function ScrollableSectionsTabs({
|
|
|
48503
49356
|
}),
|
|
48504
49357
|
[tabNodes]
|
|
48505
49358
|
);
|
|
48506
|
-
|
|
49359
|
+
React10.useLayoutEffect(() => {
|
|
48507
49360
|
setTabsItems(items);
|
|
48508
49361
|
}, [items, setTabsItems]);
|
|
48509
49362
|
if (tabNodes.length === 0) {
|
|
@@ -48570,7 +49423,7 @@ function ScrollableSectionsContent({
|
|
|
48570
49423
|
...rest
|
|
48571
49424
|
}) {
|
|
48572
49425
|
const { registerSection } = useScrollableSections();
|
|
48573
|
-
const ref =
|
|
49426
|
+
const ref = React10.useCallback(
|
|
48574
49427
|
(node) => {
|
|
48575
49428
|
registerSection(id, node);
|
|
48576
49429
|
},
|
|
@@ -48601,15 +49454,15 @@ var ScrollableSections = Object.assign(ScrollableSectionsRoot, {
|
|
|
48601
49454
|
Content: ScrollableSectionsContent
|
|
48602
49455
|
});
|
|
48603
49456
|
var Form = FormProvider;
|
|
48604
|
-
var FormFieldContext =
|
|
49457
|
+
var FormFieldContext = React10.createContext(null);
|
|
48605
49458
|
var FormField = ({
|
|
48606
49459
|
...props
|
|
48607
49460
|
}) => {
|
|
48608
49461
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
48609
49462
|
};
|
|
48610
49463
|
var useFormField = () => {
|
|
48611
|
-
const fieldContext =
|
|
48612
|
-
const itemContext =
|
|
49464
|
+
const fieldContext = React10.useContext(FormFieldContext);
|
|
49465
|
+
const itemContext = React10.useContext(FormItemContext);
|
|
48613
49466
|
const { getFieldState, formState } = useFormContext();
|
|
48614
49467
|
if (!fieldContext) {
|
|
48615
49468
|
throw new Error("useFormField should be used within <FormField>");
|
|
@@ -48628,13 +49481,13 @@ var useFormField = () => {
|
|
|
48628
49481
|
...fieldState
|
|
48629
49482
|
};
|
|
48630
49483
|
};
|
|
48631
|
-
var FormItemContext =
|
|
48632
|
-
var FormItem =
|
|
48633
|
-
const id =
|
|
49484
|
+
var FormItemContext = React10.createContext(null);
|
|
49485
|
+
var FormItem = React10.forwardRef(({ className, ...props }, ref) => {
|
|
49486
|
+
const id = React10.useId();
|
|
48634
49487
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
48635
49488
|
});
|
|
48636
49489
|
FormItem.displayName = "FormItem";
|
|
48637
|
-
var FormLabel =
|
|
49490
|
+
var FormLabel = React10.forwardRef(({ className, ...props }, ref) => {
|
|
48638
49491
|
const { error, formItemId } = useFormField();
|
|
48639
49492
|
return /* @__PURE__ */ jsx(
|
|
48640
49493
|
Label,
|
|
@@ -48647,7 +49500,7 @@ var FormLabel = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
48647
49500
|
);
|
|
48648
49501
|
});
|
|
48649
49502
|
FormLabel.displayName = "FormLabel";
|
|
48650
|
-
var FormControl =
|
|
49503
|
+
var FormControl = React10.forwardRef(({ ...props }, ref) => {
|
|
48651
49504
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
48652
49505
|
return /* @__PURE__ */ jsx(
|
|
48653
49506
|
Slot,
|
|
@@ -48661,7 +49514,7 @@ var FormControl = React8.forwardRef(({ ...props }, ref) => {
|
|
|
48661
49514
|
);
|
|
48662
49515
|
});
|
|
48663
49516
|
FormControl.displayName = "FormControl";
|
|
48664
|
-
var FormDescription =
|
|
49517
|
+
var FormDescription = React10.forwardRef(({ className, ...props }, ref) => {
|
|
48665
49518
|
const { formDescriptionId } = useFormField();
|
|
48666
49519
|
return /* @__PURE__ */ jsx(
|
|
48667
49520
|
"p",
|
|
@@ -48674,7 +49527,7 @@ var FormDescription = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
48674
49527
|
);
|
|
48675
49528
|
});
|
|
48676
49529
|
FormDescription.displayName = "FormDescription";
|
|
48677
|
-
var FormMessage =
|
|
49530
|
+
var FormMessage = React10.forwardRef(({ className, children, ...props }, ref) => {
|
|
48678
49531
|
const { error, formMessageId } = useFormField();
|
|
48679
49532
|
const body = error ? String(error?.message ?? "") : children;
|
|
48680
49533
|
if (!body) {
|
|
@@ -48924,10 +49777,10 @@ var typographyDefaultElement = {
|
|
|
48924
49777
|
};
|
|
48925
49778
|
|
|
48926
49779
|
// src/components/typography/typography.tsx
|
|
48927
|
-
var Typography =
|
|
49780
|
+
var Typography = React10.forwardRef(
|
|
48928
49781
|
function Typography2({ variant = "body1", as, className, children, ...rest }, ref) {
|
|
48929
49782
|
const Component = as ?? typographyDefaultElement[variant];
|
|
48930
|
-
return
|
|
49783
|
+
return React10.createElement(
|
|
48931
49784
|
Component,
|
|
48932
49785
|
{
|
|
48933
49786
|
ref,
|
|
@@ -49000,7 +49853,7 @@ function mergeFiles(existing, incoming, multiple) {
|
|
|
49000
49853
|
}
|
|
49001
49854
|
return next;
|
|
49002
49855
|
}
|
|
49003
|
-
var FileUpload =
|
|
49856
|
+
var FileUpload = React10.forwardRef(
|
|
49004
49857
|
function FileUpload2({
|
|
49005
49858
|
className,
|
|
49006
49859
|
title = "Drag & drop files here",
|
|
@@ -49015,24 +49868,24 @@ var FileUpload = React8.forwardRef(
|
|
|
49015
49868
|
id,
|
|
49016
49869
|
...inputPropsRest
|
|
49017
49870
|
}, ref) {
|
|
49018
|
-
const autoId =
|
|
49871
|
+
const autoId = React10.useId();
|
|
49019
49872
|
const inputId = id ?? autoId;
|
|
49020
49873
|
const descriptionId = `${inputId}-description`;
|
|
49021
49874
|
const { ref: refFromRegister, ...inputAttrs } = inputPropsRest;
|
|
49022
49875
|
const isControlled = filesProp !== void 0;
|
|
49023
|
-
const innerRef =
|
|
49024
|
-
const filesRef =
|
|
49025
|
-
const dragDepthRef =
|
|
49026
|
-
const [internalFiles, setInternalFiles] =
|
|
49027
|
-
const [isDragging, setIsDragging] =
|
|
49876
|
+
const innerRef = React10.useRef(null);
|
|
49877
|
+
const filesRef = React10.useRef([]);
|
|
49878
|
+
const dragDepthRef = React10.useRef(0);
|
|
49879
|
+
const [internalFiles, setInternalFiles] = React10.useState([]);
|
|
49880
|
+
const [isDragging, setIsDragging] = React10.useState(false);
|
|
49028
49881
|
const listFiles = isControlled ? filesProp ?? [] : internalFiles;
|
|
49029
49882
|
filesRef.current = listFiles;
|
|
49030
|
-
|
|
49883
|
+
React10.useLayoutEffect(() => {
|
|
49031
49884
|
const input = innerRef.current;
|
|
49032
49885
|
if (!input) return;
|
|
49033
49886
|
syncInputFiles(input, listFiles);
|
|
49034
49887
|
}, [listFiles]);
|
|
49035
|
-
const setRefs =
|
|
49888
|
+
const setRefs = React10.useCallback(
|
|
49036
49889
|
(node) => {
|
|
49037
49890
|
innerRef.current = node;
|
|
49038
49891
|
assignRef(ref, node);
|
|
@@ -49040,7 +49893,7 @@ var FileUpload = React8.forwardRef(
|
|
|
49040
49893
|
},
|
|
49041
49894
|
[ref, refFromRegister]
|
|
49042
49895
|
);
|
|
49043
|
-
const applyFiles =
|
|
49896
|
+
const applyFiles = React10.useCallback(
|
|
49044
49897
|
(incoming) => {
|
|
49045
49898
|
const input = innerRef.current;
|
|
49046
49899
|
if (!input) return;
|
|
@@ -49059,7 +49912,7 @@ var FileUpload = React8.forwardRef(
|
|
|
49059
49912
|
},
|
|
49060
49913
|
[multiple, onChange, onFilesChange, isControlled]
|
|
49061
49914
|
);
|
|
49062
|
-
const handleInputChange =
|
|
49915
|
+
const handleInputChange = React10.useCallback(
|
|
49063
49916
|
(event) => {
|
|
49064
49917
|
const input = event.target;
|
|
49065
49918
|
const picked = filesFromList(input.files);
|
|
@@ -49079,7 +49932,7 @@ var FileUpload = React8.forwardRef(
|
|
|
49079
49932
|
},
|
|
49080
49933
|
[multiple, onChange, onFilesChange, isControlled]
|
|
49081
49934
|
);
|
|
49082
|
-
const removeAt =
|
|
49935
|
+
const removeAt = React10.useCallback(
|
|
49083
49936
|
(index2) => {
|
|
49084
49937
|
const input = innerRef.current;
|
|
49085
49938
|
if (!input) return;
|
|
@@ -49097,7 +49950,7 @@ var FileUpload = React8.forwardRef(
|
|
|
49097
49950
|
},
|
|
49098
49951
|
[onChange, onFilesChange, isControlled]
|
|
49099
49952
|
);
|
|
49100
|
-
const onDragEnter =
|
|
49953
|
+
const onDragEnter = React10.useCallback(
|
|
49101
49954
|
(e) => {
|
|
49102
49955
|
e.preventDefault();
|
|
49103
49956
|
e.stopPropagation();
|
|
@@ -49107,7 +49960,7 @@ var FileUpload = React8.forwardRef(
|
|
|
49107
49960
|
},
|
|
49108
49961
|
[disabled]
|
|
49109
49962
|
);
|
|
49110
|
-
const onDragLeave =
|
|
49963
|
+
const onDragLeave = React10.useCallback(
|
|
49111
49964
|
(e) => {
|
|
49112
49965
|
e.preventDefault();
|
|
49113
49966
|
e.stopPropagation();
|
|
@@ -49120,11 +49973,11 @@ var FileUpload = React8.forwardRef(
|
|
|
49120
49973
|
},
|
|
49121
49974
|
[disabled]
|
|
49122
49975
|
);
|
|
49123
|
-
const onDragOver =
|
|
49976
|
+
const onDragOver = React10.useCallback((e) => {
|
|
49124
49977
|
e.preventDefault();
|
|
49125
49978
|
e.stopPropagation();
|
|
49126
49979
|
}, []);
|
|
49127
|
-
const onDrop =
|
|
49980
|
+
const onDrop = React10.useCallback(
|
|
49128
49981
|
(e) => {
|
|
49129
49982
|
e.preventDefault();
|
|
49130
49983
|
e.stopPropagation();
|
|
@@ -49137,11 +49990,11 @@ var FileUpload = React8.forwardRef(
|
|
|
49137
49990
|
},
|
|
49138
49991
|
[applyFiles, disabled]
|
|
49139
49992
|
);
|
|
49140
|
-
const openFileDialog =
|
|
49993
|
+
const openFileDialog = React10.useCallback(() => {
|
|
49141
49994
|
if (disabled) return;
|
|
49142
49995
|
innerRef.current?.click();
|
|
49143
49996
|
}, [disabled]);
|
|
49144
|
-
const onDropZoneKeyDown =
|
|
49997
|
+
const onDropZoneKeyDown = React10.useCallback(
|
|
49145
49998
|
(e) => {
|
|
49146
49999
|
if (disabled) return;
|
|
49147
50000
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -49278,6 +50131,339 @@ var FileUpload = React8.forwardRef(
|
|
|
49278
50131
|
}
|
|
49279
50132
|
);
|
|
49280
50133
|
FileUpload.displayName = "FileUpload";
|
|
50134
|
+
function syncInputFiles2(input, files) {
|
|
50135
|
+
const dt = new DataTransfer();
|
|
50136
|
+
for (const f of files) {
|
|
50137
|
+
dt.items.add(f);
|
|
50138
|
+
}
|
|
50139
|
+
input.files = dt.files;
|
|
50140
|
+
}
|
|
50141
|
+
function assignRef2(r, node) {
|
|
50142
|
+
if (r == null) return;
|
|
50143
|
+
if (typeof r === "function") {
|
|
50144
|
+
r(node);
|
|
50145
|
+
} else {
|
|
50146
|
+
r.current = node;
|
|
50147
|
+
}
|
|
50148
|
+
}
|
|
50149
|
+
function fileKey2(file) {
|
|
50150
|
+
return `${file.name}-${file.size}-${file.lastModified}`;
|
|
50151
|
+
}
|
|
50152
|
+
function filesFromList2(list) {
|
|
50153
|
+
if (list == null || list.length === 0) return [];
|
|
50154
|
+
return Array.from(list);
|
|
50155
|
+
}
|
|
50156
|
+
function mergeFiles2(existing, incoming, multiple) {
|
|
50157
|
+
if (!multiple) {
|
|
50158
|
+
return incoming.length > 0 ? [incoming[0]] : [];
|
|
50159
|
+
}
|
|
50160
|
+
const seen = new Set(existing.map(fileKey2));
|
|
50161
|
+
const next = [...existing];
|
|
50162
|
+
for (const f of incoming) {
|
|
50163
|
+
const k = fileKey2(f);
|
|
50164
|
+
if (!seen.has(k)) {
|
|
50165
|
+
seen.add(k);
|
|
50166
|
+
next.push(f);
|
|
50167
|
+
}
|
|
50168
|
+
}
|
|
50169
|
+
return next;
|
|
50170
|
+
}
|
|
50171
|
+
var sizeClasses = {
|
|
50172
|
+
sm: "h-8 text-xs",
|
|
50173
|
+
default: "h-10 text-base md:text-sm",
|
|
50174
|
+
lg: "h-12 text-lg"
|
|
50175
|
+
};
|
|
50176
|
+
var iconSizeClasses = {
|
|
50177
|
+
sm: "size-3.5",
|
|
50178
|
+
default: "size-4",
|
|
50179
|
+
lg: "size-5"
|
|
50180
|
+
};
|
|
50181
|
+
var clearButtonSizeClasses = {
|
|
50182
|
+
sm: "size-5",
|
|
50183
|
+
default: "size-6",
|
|
50184
|
+
lg: "size-7"
|
|
50185
|
+
};
|
|
50186
|
+
var PRESET_BROWSE_TOKENS = {
|
|
50187
|
+
primary: { wrapperBg: "bg-primary/10", wrapperBorder: "border-s-primary/20", buttonText: "text-primary" },
|
|
50188
|
+
secondary: { wrapperBg: "bg-secondary/10", wrapperBorder: "border-s-secondary/20", buttonText: "text-secondary" },
|
|
50189
|
+
error: { wrapperBg: "bg-error/10", wrapperBorder: "border-s-error/20", buttonText: "text-error" },
|
|
50190
|
+
info: { wrapperBg: "bg-info/10", wrapperBorder: "border-s-info/20", buttonText: "text-info" },
|
|
50191
|
+
success: { wrapperBg: "bg-success/10", wrapperBorder: "border-s-success/20", buttonText: "text-success" },
|
|
50192
|
+
warning: { wrapperBg: "bg-warning/10", wrapperBorder: "border-s-warning/20", buttonText: "text-warning" },
|
|
50193
|
+
disabled: { wrapperBg: "bg-disabled/10", wrapperBorder: "border-s-disabled/20", buttonText: "text-disabled" },
|
|
50194
|
+
gray: { wrapperBg: "bg-gray/10", wrapperBorder: "border-s-gray/20", buttonText: "text-gray" },
|
|
50195
|
+
mist: { wrapperBg: "bg-mist", wrapperBorder: "border-s-mist-border", buttonText: "text-mist-foreground" }
|
|
50196
|
+
};
|
|
50197
|
+
function resolveBrowseTokens(color) {
|
|
50198
|
+
if (color in PRESET_BROWSE_TOKENS) {
|
|
50199
|
+
return PRESET_BROWSE_TOKENS[color];
|
|
50200
|
+
}
|
|
50201
|
+
return {
|
|
50202
|
+
wrapperBg: "bg-[color-mix(in_srgb,var(--fi-accent)_10%,transparent)]",
|
|
50203
|
+
wrapperBorder: "border-s-[color-mix(in_srgb,var(--fi-accent)_20%,transparent)]",
|
|
50204
|
+
buttonText: "text-[var(--fi-accent)]",
|
|
50205
|
+
style: { "--fi-accent": color }
|
|
50206
|
+
};
|
|
50207
|
+
}
|
|
50208
|
+
var FileInput = React10.forwardRef(
|
|
50209
|
+
function FileInput2({
|
|
50210
|
+
label,
|
|
50211
|
+
required,
|
|
50212
|
+
size,
|
|
50213
|
+
rounded,
|
|
50214
|
+
color = "primary",
|
|
50215
|
+
startHelperContent,
|
|
50216
|
+
endHelperContent,
|
|
50217
|
+
hintContent,
|
|
50218
|
+
error,
|
|
50219
|
+
errorContent,
|
|
50220
|
+
startIcon,
|
|
50221
|
+
disabled = false,
|
|
50222
|
+
readOnly = false,
|
|
50223
|
+
id,
|
|
50224
|
+
className,
|
|
50225
|
+
name: name2,
|
|
50226
|
+
accept,
|
|
50227
|
+
multiple = false,
|
|
50228
|
+
files: filesProp,
|
|
50229
|
+
onFilesChange,
|
|
50230
|
+
onChange,
|
|
50231
|
+
browseLabel = "Browse",
|
|
50232
|
+
changeLabel = "Change",
|
|
50233
|
+
clearLabel = "Clear file",
|
|
50234
|
+
placeholder = "No file chosen",
|
|
50235
|
+
andMoreLabel = (n) => `and ${n} more`,
|
|
50236
|
+
...restProps
|
|
50237
|
+
}, ref) {
|
|
50238
|
+
const autoId = React10.useId();
|
|
50239
|
+
const inputId = id ?? autoId;
|
|
50240
|
+
const effectiveSize = size ?? "default";
|
|
50241
|
+
const hasError = error || !!errorContent;
|
|
50242
|
+
const browseTokens = resolveBrowseTokens(color);
|
|
50243
|
+
const { ref: refFromRegister, ...inputAttrs } = restProps;
|
|
50244
|
+
const isControlled = filesProp !== void 0;
|
|
50245
|
+
const innerRef = React10.useRef(null);
|
|
50246
|
+
const filesRef = React10.useRef([]);
|
|
50247
|
+
const [internalFiles, setInternalFiles] = React10.useState([]);
|
|
50248
|
+
const listFiles = isControlled ? filesProp ?? [] : internalFiles;
|
|
50249
|
+
filesRef.current = listFiles;
|
|
50250
|
+
const hasFiles = listFiles.length > 0;
|
|
50251
|
+
React10.useLayoutEffect(() => {
|
|
50252
|
+
const input = innerRef.current;
|
|
50253
|
+
if (!input) return;
|
|
50254
|
+
syncInputFiles2(input, listFiles);
|
|
50255
|
+
}, [listFiles]);
|
|
50256
|
+
const setRefs = React10.useCallback(
|
|
50257
|
+
(node) => {
|
|
50258
|
+
innerRef.current = node;
|
|
50259
|
+
assignRef2(ref, node);
|
|
50260
|
+
assignRef2(refFromRegister, node);
|
|
50261
|
+
},
|
|
50262
|
+
[ref, refFromRegister]
|
|
50263
|
+
);
|
|
50264
|
+
const fireSyntheticChange = React10.useCallback(
|
|
50265
|
+
(input) => {
|
|
50266
|
+
const synthetic = {
|
|
50267
|
+
target: input,
|
|
50268
|
+
currentTarget: input
|
|
50269
|
+
};
|
|
50270
|
+
onChange?.(synthetic);
|
|
50271
|
+
},
|
|
50272
|
+
[onChange]
|
|
50273
|
+
);
|
|
50274
|
+
const handleInputChange = React10.useCallback(
|
|
50275
|
+
(event) => {
|
|
50276
|
+
const input = event.target;
|
|
50277
|
+
const picked = filesFromList2(input.files);
|
|
50278
|
+
input.value = "";
|
|
50279
|
+
const prev = multiple ? filesRef.current : [];
|
|
50280
|
+
const next = mergeFiles2(prev, picked, multiple);
|
|
50281
|
+
syncInputFiles2(input, next);
|
|
50282
|
+
if (!isControlled) {
|
|
50283
|
+
setInternalFiles(next);
|
|
50284
|
+
}
|
|
50285
|
+
onFilesChange?.(next);
|
|
50286
|
+
onChange?.({
|
|
50287
|
+
...event,
|
|
50288
|
+
target: input,
|
|
50289
|
+
currentTarget: input
|
|
50290
|
+
});
|
|
50291
|
+
},
|
|
50292
|
+
[multiple, onChange, onFilesChange, isControlled]
|
|
50293
|
+
);
|
|
50294
|
+
const clearFiles = React10.useCallback(() => {
|
|
50295
|
+
const input = innerRef.current;
|
|
50296
|
+
if (!input) return;
|
|
50297
|
+
syncInputFiles2(input, []);
|
|
50298
|
+
if (!isControlled) {
|
|
50299
|
+
setInternalFiles([]);
|
|
50300
|
+
}
|
|
50301
|
+
onFilesChange?.([]);
|
|
50302
|
+
fireSyntheticChange(input);
|
|
50303
|
+
}, [isControlled, onFilesChange, fireSyntheticChange]);
|
|
50304
|
+
const openFileDialog = React10.useCallback(() => {
|
|
50305
|
+
if (disabled || readOnly) return;
|
|
50306
|
+
innerRef.current?.click();
|
|
50307
|
+
}, [disabled, readOnly]);
|
|
50308
|
+
const onDisplayKeyDown = React10.useCallback(
|
|
50309
|
+
(e) => {
|
|
50310
|
+
if (disabled || readOnly) return;
|
|
50311
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
50312
|
+
e.preventDefault();
|
|
50313
|
+
openFileDialog();
|
|
50314
|
+
}
|
|
50315
|
+
},
|
|
50316
|
+
[disabled, readOnly, openFileDialog]
|
|
50317
|
+
);
|
|
50318
|
+
const helperStartId = `${inputId}-helper-start`;
|
|
50319
|
+
const helperEndId = `${inputId}-helper-end`;
|
|
50320
|
+
const describedBy = [
|
|
50321
|
+
errorContent && `${inputId}-error`,
|
|
50322
|
+
startHelperContent && !errorContent && helperStartId,
|
|
50323
|
+
endHelperContent && !errorContent && helperEndId
|
|
50324
|
+
].filter(Boolean).join(" ") || void 0;
|
|
50325
|
+
let displayContent;
|
|
50326
|
+
if (!hasFiles) {
|
|
50327
|
+
displayContent = /* @__PURE__ */ jsx("span", { className: "truncate text-muted-foreground", children: placeholder });
|
|
50328
|
+
} else if (listFiles.length === 1) {
|
|
50329
|
+
displayContent = /* @__PURE__ */ jsx("span", { className: "truncate text-foreground", children: listFiles[0].name });
|
|
50330
|
+
} else {
|
|
50331
|
+
const remaining = listFiles.length - 1;
|
|
50332
|
+
displayContent = /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1 text-foreground", children: [
|
|
50333
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: listFiles[0].name }),
|
|
50334
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground", children: andMoreLabel(remaining) })
|
|
50335
|
+
] });
|
|
50336
|
+
}
|
|
50337
|
+
const containerClasses = cn(
|
|
50338
|
+
"flex w-full items-center overflow-hidden ps-3 border border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out",
|
|
50339
|
+
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
50340
|
+
sizeClasses[effectiveSize],
|
|
50341
|
+
rounded ? "rounded-full" : "rounded-md",
|
|
50342
|
+
hasError && "border-destructive focus-within:ring-destructive",
|
|
50343
|
+
startIcon && "ps-9",
|
|
50344
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
50345
|
+
readOnly && "cursor-default bg-muted"
|
|
50346
|
+
);
|
|
50347
|
+
const actionButtonClasses = cn(
|
|
50348
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-2 text-[length:inherit] font-medium transition-colors",
|
|
50349
|
+
browseTokens.buttonText,
|
|
50350
|
+
"hover:bg-accent",
|
|
50351
|
+
"focus-visible:outline-none focus-visible:ring-0",
|
|
50352
|
+
disabled && "pointer-events-none opacity-50"
|
|
50353
|
+
);
|
|
50354
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("@container flex-1 space-y-2", className), style: browseTokens.style, children: [
|
|
50355
|
+
/* @__PURE__ */ jsx(
|
|
50356
|
+
"input",
|
|
50357
|
+
{
|
|
50358
|
+
...inputAttrs,
|
|
50359
|
+
ref: setRefs,
|
|
50360
|
+
id: inputId,
|
|
50361
|
+
type: "file",
|
|
50362
|
+
name: name2,
|
|
50363
|
+
accept,
|
|
50364
|
+
multiple,
|
|
50365
|
+
disabled,
|
|
50366
|
+
tabIndex: -1,
|
|
50367
|
+
className: "sr-only",
|
|
50368
|
+
"aria-invalid": hasError || void 0,
|
|
50369
|
+
"aria-describedby": describedBy,
|
|
50370
|
+
onChange: handleInputChange
|
|
50371
|
+
}
|
|
50372
|
+
),
|
|
50373
|
+
label && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
50374
|
+
/* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: inputLabelClassName, children: [
|
|
50375
|
+
label,
|
|
50376
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
|
|
50377
|
+
] }),
|
|
50378
|
+
hintContent && /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: hintContent })
|
|
50379
|
+
] }),
|
|
50380
|
+
!label && hintContent && /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: hintContent }),
|
|
50381
|
+
/* @__PURE__ */ jsxs("div", { className: "group relative", children: [
|
|
50382
|
+
/* @__PURE__ */ jsxs(
|
|
50383
|
+
"div",
|
|
50384
|
+
{
|
|
50385
|
+
role: "button",
|
|
50386
|
+
tabIndex: disabled ? -1 : 0,
|
|
50387
|
+
"aria-label": hasFiles ? listFiles.map((f) => f.name).join(", ") : placeholder,
|
|
50388
|
+
onClick: openFileDialog,
|
|
50389
|
+
onKeyDown: onDisplayKeyDown,
|
|
50390
|
+
className: containerClasses,
|
|
50391
|
+
children: [
|
|
50392
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: displayContent }),
|
|
50393
|
+
hasFiles && !disabled && !readOnly && /* @__PURE__ */ jsx(
|
|
50394
|
+
"button",
|
|
50395
|
+
{
|
|
50396
|
+
type: "button",
|
|
50397
|
+
"aria-label": clearLabel,
|
|
50398
|
+
onClick: (e) => {
|
|
50399
|
+
e.stopPropagation();
|
|
50400
|
+
clearFiles();
|
|
50401
|
+
},
|
|
50402
|
+
className: cn(
|
|
50403
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center text-error transition-colors",
|
|
50404
|
+
"hover:text-error/80",
|
|
50405
|
+
"focus-visible:outline-none focus-visible:ring-0",
|
|
50406
|
+
clearButtonSizeClasses[effectiveSize]
|
|
50407
|
+
),
|
|
50408
|
+
children: /* @__PURE__ */ jsx(X, { className: iconSizeClasses[effectiveSize] })
|
|
50409
|
+
}
|
|
50410
|
+
),
|
|
50411
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
50412
|
+
"div",
|
|
50413
|
+
{
|
|
50414
|
+
className: cn(
|
|
50415
|
+
"inline-flex shrink-0 self-stretch items-center border-s",
|
|
50416
|
+
browseTokens.wrapperBorder,
|
|
50417
|
+
browseTokens.wrapperBg,
|
|
50418
|
+
rounded ? "rounded-e-full" : "rounded-e-[calc(var(--radius)-1px)]"
|
|
50419
|
+
),
|
|
50420
|
+
children: /* @__PURE__ */ jsxs(
|
|
50421
|
+
"button",
|
|
50422
|
+
{
|
|
50423
|
+
type: "button",
|
|
50424
|
+
disabled,
|
|
50425
|
+
onClick: (e) => {
|
|
50426
|
+
e.stopPropagation();
|
|
50427
|
+
openFileDialog();
|
|
50428
|
+
},
|
|
50429
|
+
className: actionButtonClasses,
|
|
50430
|
+
children: [
|
|
50431
|
+
hasFiles ? /* @__PURE__ */ jsx(
|
|
50432
|
+
RefreshCw,
|
|
50433
|
+
{
|
|
50434
|
+
className: cn(iconSizeClasses[effectiveSize], "shrink-0")
|
|
50435
|
+
}
|
|
50436
|
+
) : /* @__PURE__ */ jsx(
|
|
50437
|
+
Upload,
|
|
50438
|
+
{
|
|
50439
|
+
className: cn(iconSizeClasses[effectiveSize], "shrink-0")
|
|
50440
|
+
}
|
|
50441
|
+
),
|
|
50442
|
+
/* @__PURE__ */ jsx("span", { className: "hidden @[14rem]:inline", children: hasFiles ? changeLabel : browseLabel })
|
|
50443
|
+
]
|
|
50444
|
+
}
|
|
50445
|
+
)
|
|
50446
|
+
}
|
|
50447
|
+
)
|
|
50448
|
+
]
|
|
50449
|
+
}
|
|
50450
|
+
),
|
|
50451
|
+
startIcon && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-y-0 start-0 flex items-center justify-center ps-3 text-muted-foreground/80", children: startIcon })
|
|
50452
|
+
] }),
|
|
50453
|
+
errorContent && /* @__PURE__ */ jsx("div", { id: `${inputId}-error`, className: "text-sm text-destructive", children: errorContent }),
|
|
50454
|
+
startHelperContent && !errorContent && /* @__PURE__ */ jsx("div", { id: helperStartId, className: "text-sm text-muted-foreground", children: startHelperContent }),
|
|
50455
|
+
endHelperContent && !errorContent && /* @__PURE__ */ jsx(
|
|
50456
|
+
"div",
|
|
50457
|
+
{
|
|
50458
|
+
id: helperEndId,
|
|
50459
|
+
className: "text-sm text-end text-muted-foreground",
|
|
50460
|
+
children: endHelperContent
|
|
50461
|
+
}
|
|
50462
|
+
)
|
|
50463
|
+
] });
|
|
50464
|
+
}
|
|
50465
|
+
);
|
|
50466
|
+
FileInput.displayName = "FileInput";
|
|
49281
50467
|
function setRef(ref, value2) {
|
|
49282
50468
|
if (typeof ref === "function") {
|
|
49283
50469
|
return ref(value2);
|
|
@@ -49310,25 +50496,25 @@ function composeRefs(...refs) {
|
|
|
49310
50496
|
};
|
|
49311
50497
|
}
|
|
49312
50498
|
function useComposedRefs(...refs) {
|
|
49313
|
-
return
|
|
50499
|
+
return React10.useCallback(composeRefs(...refs), refs);
|
|
49314
50500
|
}
|
|
49315
50501
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
49316
50502
|
let defaultContexts = [];
|
|
49317
50503
|
function createContext32(rootComponentName, defaultContext) {
|
|
49318
|
-
const BaseContext =
|
|
50504
|
+
const BaseContext = React10.createContext(defaultContext);
|
|
49319
50505
|
BaseContext.displayName = rootComponentName + "Context";
|
|
49320
50506
|
const index2 = defaultContexts.length;
|
|
49321
50507
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
49322
50508
|
const Provider = (props) => {
|
|
49323
50509
|
const { scope, children, ...context } = props;
|
|
49324
50510
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
49325
|
-
const value2 =
|
|
50511
|
+
const value2 = React10.useMemo(() => context, Object.values(context));
|
|
49326
50512
|
return /* @__PURE__ */ jsx(Context.Provider, { value: value2, children });
|
|
49327
50513
|
};
|
|
49328
50514
|
Provider.displayName = rootComponentName + "Provider";
|
|
49329
50515
|
function useContext22(consumerName, scope) {
|
|
49330
50516
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
49331
|
-
const context =
|
|
50517
|
+
const context = React10.useContext(Context);
|
|
49332
50518
|
if (context) return context;
|
|
49333
50519
|
if (defaultContext !== void 0) return defaultContext;
|
|
49334
50520
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -49337,11 +50523,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
49337
50523
|
}
|
|
49338
50524
|
const createScope = () => {
|
|
49339
50525
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
49340
|
-
return
|
|
50526
|
+
return React10.createContext(defaultContext);
|
|
49341
50527
|
});
|
|
49342
50528
|
return function useScope(scope) {
|
|
49343
50529
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
49344
|
-
return
|
|
50530
|
+
return React10.useMemo(
|
|
49345
50531
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
49346
50532
|
[scope, contexts]
|
|
49347
50533
|
);
|
|
@@ -49364,7 +50550,7 @@ function composeContextScopes(...scopes) {
|
|
|
49364
50550
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
49365
50551
|
return { ...nextScopes2, ...currentScope };
|
|
49366
50552
|
}, {});
|
|
49367
|
-
return
|
|
50553
|
+
return React10.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
49368
50554
|
};
|
|
49369
50555
|
};
|
|
49370
50556
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -49378,9 +50564,9 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
49378
50564
|
}
|
|
49379
50565
|
};
|
|
49380
50566
|
}
|
|
49381
|
-
var useLayoutEffect22 = globalThis?.document ?
|
|
50567
|
+
var useLayoutEffect22 = globalThis?.document ? React10.useLayoutEffect : () => {
|
|
49382
50568
|
};
|
|
49383
|
-
var useInsertionEffect =
|
|
50569
|
+
var useInsertionEffect = React10[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
49384
50570
|
function useControllableState({
|
|
49385
50571
|
prop,
|
|
49386
50572
|
defaultProp,
|
|
@@ -49395,8 +50581,8 @@ function useControllableState({
|
|
|
49395
50581
|
const isControlled = prop !== void 0;
|
|
49396
50582
|
const value2 = isControlled ? prop : uncontrolledProp;
|
|
49397
50583
|
{
|
|
49398
|
-
const isControlledRef =
|
|
49399
|
-
|
|
50584
|
+
const isControlledRef = React10.useRef(prop !== void 0);
|
|
50585
|
+
React10.useEffect(() => {
|
|
49400
50586
|
const wasControlled = isControlledRef.current;
|
|
49401
50587
|
if (wasControlled !== isControlled) {
|
|
49402
50588
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -49408,7 +50594,7 @@ function useControllableState({
|
|
|
49408
50594
|
isControlledRef.current = isControlled;
|
|
49409
50595
|
}, [isControlled, caller]);
|
|
49410
50596
|
}
|
|
49411
|
-
const setValue =
|
|
50597
|
+
const setValue = React10.useCallback(
|
|
49412
50598
|
(nextValue) => {
|
|
49413
50599
|
if (isControlled) {
|
|
49414
50600
|
const value22 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -49427,13 +50613,13 @@ function useUncontrolledState({
|
|
|
49427
50613
|
defaultProp,
|
|
49428
50614
|
onChange
|
|
49429
50615
|
}) {
|
|
49430
|
-
const [value2, setValue] =
|
|
49431
|
-
const prevValueRef =
|
|
49432
|
-
const onChangeRef =
|
|
50616
|
+
const [value2, setValue] = React10.useState(defaultProp);
|
|
50617
|
+
const prevValueRef = React10.useRef(value2);
|
|
50618
|
+
const onChangeRef = React10.useRef(onChange);
|
|
49433
50619
|
useInsertionEffect(() => {
|
|
49434
50620
|
onChangeRef.current = onChange;
|
|
49435
50621
|
}, [onChange]);
|
|
49436
|
-
|
|
50622
|
+
React10.useEffect(() => {
|
|
49437
50623
|
if (prevValueRef.current !== value2) {
|
|
49438
50624
|
onChangeRef.current?.(value2);
|
|
49439
50625
|
prevValueRef.current = value2;
|
|
@@ -49445,8 +50631,8 @@ function isFunction(value2) {
|
|
|
49445
50631
|
return typeof value2 === "function";
|
|
49446
50632
|
}
|
|
49447
50633
|
function usePrevious(value2) {
|
|
49448
|
-
const ref =
|
|
49449
|
-
return
|
|
50634
|
+
const ref = React10.useRef({ value: value2, previous: value2 });
|
|
50635
|
+
return React10.useMemo(() => {
|
|
49450
50636
|
if (ref.current.value !== value2) {
|
|
49451
50637
|
ref.current.previous = ref.current.value;
|
|
49452
50638
|
ref.current.value = value2;
|
|
@@ -49455,7 +50641,7 @@ function usePrevious(value2) {
|
|
|
49455
50641
|
}, [value2]);
|
|
49456
50642
|
}
|
|
49457
50643
|
function useSize(element) {
|
|
49458
|
-
const [size, setSize] =
|
|
50644
|
+
const [size, setSize] = React10.useState(void 0);
|
|
49459
50645
|
useLayoutEffect22(() => {
|
|
49460
50646
|
if (element) {
|
|
49461
50647
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -49489,7 +50675,7 @@ function useSize(element) {
|
|
|
49489
50675
|
return size;
|
|
49490
50676
|
}
|
|
49491
50677
|
function useStateMachine(initialState, machine) {
|
|
49492
|
-
return
|
|
50678
|
+
return React10.useReducer((state, event) => {
|
|
49493
50679
|
const nextState = machine[state][event];
|
|
49494
50680
|
return nextState ?? state;
|
|
49495
50681
|
}, initialState);
|
|
@@ -49497,17 +50683,17 @@ function useStateMachine(initialState, machine) {
|
|
|
49497
50683
|
var Presence = (props) => {
|
|
49498
50684
|
const { present, children } = props;
|
|
49499
50685
|
const presence = usePresence(present);
|
|
49500
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
50686
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React10.Children.only(children);
|
|
49501
50687
|
const ref = useStableComposedRefs(presence.ref, getElementRef(child));
|
|
49502
50688
|
const forceMount = typeof children === "function";
|
|
49503
|
-
return forceMount || presence.isPresent ?
|
|
50689
|
+
return forceMount || presence.isPresent ? React10.cloneElement(child, { ref }) : null;
|
|
49504
50690
|
};
|
|
49505
50691
|
Presence.displayName = "Presence";
|
|
49506
50692
|
function usePresence(present) {
|
|
49507
|
-
const [node, setNode] =
|
|
49508
|
-
const stylesRef =
|
|
49509
|
-
const prevPresentRef =
|
|
49510
|
-
const prevAnimationNameRef =
|
|
50693
|
+
const [node, setNode] = React10.useState();
|
|
50694
|
+
const stylesRef = React10.useRef(null);
|
|
50695
|
+
const prevPresentRef = React10.useRef(present);
|
|
50696
|
+
const prevAnimationNameRef = React10.useRef("none");
|
|
49511
50697
|
const initialState = present ? "mounted" : "unmounted";
|
|
49512
50698
|
const [state, send] = useStateMachine(initialState, {
|
|
49513
50699
|
mounted: {
|
|
@@ -49522,7 +50708,7 @@ function usePresence(present) {
|
|
|
49522
50708
|
MOUNT: "mounted"
|
|
49523
50709
|
}
|
|
49524
50710
|
});
|
|
49525
|
-
|
|
50711
|
+
React10.useEffect(() => {
|
|
49526
50712
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
49527
50713
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
49528
50714
|
}, [state]);
|
|
@@ -49588,7 +50774,7 @@ function usePresence(present) {
|
|
|
49588
50774
|
}, [node, send]);
|
|
49589
50775
|
return {
|
|
49590
50776
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
49591
|
-
ref:
|
|
50777
|
+
ref: React10.useCallback((node2) => {
|
|
49592
50778
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
49593
50779
|
setNode(node2);
|
|
49594
50780
|
}, [])
|
|
@@ -49602,9 +50788,9 @@ function setRef2(ref, value2) {
|
|
|
49602
50788
|
}
|
|
49603
50789
|
}
|
|
49604
50790
|
function useStableComposedRefs(...refs) {
|
|
49605
|
-
const refsRef =
|
|
50791
|
+
const refsRef = React10.useRef(refs);
|
|
49606
50792
|
refsRef.current = refs;
|
|
49607
|
-
return
|
|
50793
|
+
return React10.useCallback((node) => {
|
|
49608
50794
|
const currentRefs = refsRef.current;
|
|
49609
50795
|
let hasCleanup = false;
|
|
49610
50796
|
const cleanups = currentRefs.map((ref) => {
|
|
@@ -49665,7 +50851,7 @@ var NODES = [
|
|
|
49665
50851
|
];
|
|
49666
50852
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
49667
50853
|
const Slot3 = createSlot(`Primitive.${node}`);
|
|
49668
|
-
const Node2 =
|
|
50854
|
+
const Node2 = React10.forwardRef((props, forwardedRef) => {
|
|
49669
50855
|
const { asChild, ...primitiveProps } = props;
|
|
49670
50856
|
const Comp = asChild ? Slot3 : node;
|
|
49671
50857
|
if (typeof window !== "undefined") {
|
|
@@ -49700,9 +50886,9 @@ function CheckboxProvider(props) {
|
|
|
49700
50886
|
onChange: onCheckedChange,
|
|
49701
50887
|
caller: CHECKBOX_NAME
|
|
49702
50888
|
});
|
|
49703
|
-
const [control, setControl] =
|
|
49704
|
-
const [bubbleInput, setBubbleInput] =
|
|
49705
|
-
const hasConsumerStoppedPropagationRef =
|
|
50889
|
+
const [control, setControl] = React10.useState(null);
|
|
50890
|
+
const [bubbleInput, setBubbleInput] = React10.useState(null);
|
|
50891
|
+
const hasConsumerStoppedPropagationRef = React10.useRef(false);
|
|
49706
50892
|
const isFormControl = control ? !!form || !!control.closest("form") : (
|
|
49707
50893
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
49708
50894
|
true
|
|
@@ -49733,7 +50919,7 @@ function CheckboxProvider(props) {
|
|
|
49733
50919
|
);
|
|
49734
50920
|
}
|
|
49735
50921
|
var TRIGGER_NAME = "CheckboxTrigger";
|
|
49736
|
-
var CheckboxTrigger =
|
|
50922
|
+
var CheckboxTrigger = React10.forwardRef(
|
|
49737
50923
|
({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
|
|
49738
50924
|
const {
|
|
49739
50925
|
control,
|
|
@@ -49748,8 +50934,8 @@ var CheckboxTrigger = React8.forwardRef(
|
|
|
49748
50934
|
bubbleInput
|
|
49749
50935
|
} = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
|
|
49750
50936
|
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
|
49751
|
-
const initialCheckedStateRef =
|
|
49752
|
-
|
|
50937
|
+
const initialCheckedStateRef = React10.useRef(checked);
|
|
50938
|
+
React10.useEffect(() => {
|
|
49753
50939
|
const form = control?.form;
|
|
49754
50940
|
if (form) {
|
|
49755
50941
|
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
@@ -49785,7 +50971,7 @@ var CheckboxTrigger = React8.forwardRef(
|
|
|
49785
50971
|
}
|
|
49786
50972
|
);
|
|
49787
50973
|
CheckboxTrigger.displayName = TRIGGER_NAME;
|
|
49788
|
-
var Checkbox =
|
|
50974
|
+
var Checkbox = React10.forwardRef(
|
|
49789
50975
|
(props, forwardedRef) => {
|
|
49790
50976
|
const {
|
|
49791
50977
|
__scopeCheckbox,
|
|
@@ -49833,7 +51019,7 @@ var Checkbox = React8.forwardRef(
|
|
|
49833
51019
|
);
|
|
49834
51020
|
Checkbox.displayName = CHECKBOX_NAME;
|
|
49835
51021
|
var INDICATOR_NAME = "CheckboxIndicator";
|
|
49836
|
-
var CheckboxIndicator =
|
|
51022
|
+
var CheckboxIndicator = React10.forwardRef(
|
|
49837
51023
|
(props, forwardedRef) => {
|
|
49838
51024
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
49839
51025
|
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
|
@@ -49857,7 +51043,7 @@ var CheckboxIndicator = React8.forwardRef(
|
|
|
49857
51043
|
);
|
|
49858
51044
|
CheckboxIndicator.displayName = INDICATOR_NAME;
|
|
49859
51045
|
var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
|
|
49860
|
-
var CheckboxBubbleInput =
|
|
51046
|
+
var CheckboxBubbleInput = React10.forwardRef(
|
|
49861
51047
|
({ __scopeCheckbox, ...props }, forwardedRef) => {
|
|
49862
51048
|
const {
|
|
49863
51049
|
control,
|
|
@@ -49875,7 +51061,7 @@ var CheckboxBubbleInput = React8.forwardRef(
|
|
|
49875
51061
|
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
|
|
49876
51062
|
const prevChecked = usePrevious(checked);
|
|
49877
51063
|
const controlSize = useSize(control);
|
|
49878
|
-
|
|
51064
|
+
React10.useEffect(() => {
|
|
49879
51065
|
const input = bubbleInput;
|
|
49880
51066
|
if (!input) return;
|
|
49881
51067
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -49892,7 +51078,7 @@ var CheckboxBubbleInput = React8.forwardRef(
|
|
|
49892
51078
|
input.dispatchEvent(event);
|
|
49893
51079
|
}
|
|
49894
51080
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
49895
|
-
const defaultCheckedRef =
|
|
51081
|
+
const defaultCheckedRef = React10.useRef(isIndeterminate(checked) ? false : checked);
|
|
49896
51082
|
return /* @__PURE__ */ jsx(
|
|
49897
51083
|
Primitive.input,
|
|
49898
51084
|
{
|
|
@@ -49938,13 +51124,13 @@ function getAnimateState(checked) {
|
|
|
49938
51124
|
return checked ? "checked" : "unchecked";
|
|
49939
51125
|
}
|
|
49940
51126
|
function Checkbox2({ className, onCheckedChange, ...props }) {
|
|
49941
|
-
const [checkedState, setCheckedState] =
|
|
51127
|
+
const [checkedState, setCheckedState] = React10.useState(
|
|
49942
51128
|
props?.checked ?? props?.defaultChecked ?? false
|
|
49943
51129
|
);
|
|
49944
|
-
|
|
51130
|
+
React10.useEffect(() => {
|
|
49945
51131
|
if (props?.checked !== void 0) setCheckedState(props.checked);
|
|
49946
51132
|
}, [props?.checked]);
|
|
49947
|
-
const handleCheckedChange =
|
|
51133
|
+
const handleCheckedChange = React10.useCallback(
|
|
49948
51134
|
(checked) => {
|
|
49949
51135
|
setCheckedState(checked);
|
|
49950
51136
|
onCheckedChange?.(checked);
|
|
@@ -50038,7 +51224,7 @@ function Checkbox2({ className, onCheckedChange, ...props }) {
|
|
|
50038
51224
|
}
|
|
50039
51225
|
var [SwitchProvider, useSwitch] = getStrictContext("SwitchContext");
|
|
50040
51226
|
function Switch(props) {
|
|
50041
|
-
const [isPressed, setIsPressed] =
|
|
51227
|
+
const [isPressed, setIsPressed] = React10.useState(false);
|
|
50042
51228
|
const {
|
|
50043
51229
|
checked,
|
|
50044
51230
|
defaultChecked,
|
|
@@ -50104,7 +51290,7 @@ function SwitchIcon({
|
|
|
50104
51290
|
...props
|
|
50105
51291
|
}) {
|
|
50106
51292
|
const { isChecked } = useSwitch();
|
|
50107
|
-
const isAnimated =
|
|
51293
|
+
const isAnimated = React10.useMemo(() => {
|
|
50108
51294
|
if (position2 === "right") return !isChecked;
|
|
50109
51295
|
if (position2 === "left") return isChecked;
|
|
50110
51296
|
if (position2 === "thumb") return true;
|
|
@@ -50235,10 +51421,10 @@ function ToggleGroupHighlightItem({
|
|
|
50235
51421
|
}
|
|
50236
51422
|
);
|
|
50237
51423
|
}
|
|
50238
|
-
if (type === "multiple" &&
|
|
51424
|
+
if (type === "multiple" && React10.isValidElement(children)) {
|
|
50239
51425
|
const isActive = props.value && value2 && value2.includes(props.value);
|
|
50240
51426
|
const element = children;
|
|
50241
|
-
return
|
|
51427
|
+
return React10.cloneElement(
|
|
50242
51428
|
children,
|
|
50243
51429
|
{
|
|
50244
51430
|
style: {
|
|
@@ -50377,7 +51563,7 @@ function ToggleGroup2({
|
|
|
50377
51563
|
style,
|
|
50378
51564
|
...props
|
|
50379
51565
|
}) {
|
|
50380
|
-
const colorTokens =
|
|
51566
|
+
const colorTokens = React10.useMemo(
|
|
50381
51567
|
() => resolveToggleGroupColorTokens(color),
|
|
50382
51568
|
[color]
|
|
50383
51569
|
);
|
|
@@ -50490,8 +51676,8 @@ function Radio({
|
|
|
50490
51676
|
...props
|
|
50491
51677
|
}) {
|
|
50492
51678
|
const { value: value2 } = useRadioGroup();
|
|
50493
|
-
const [isChecked, setIsChecked] =
|
|
50494
|
-
|
|
51679
|
+
const [isChecked, setIsChecked] = React10.useState(value2 === valueProps);
|
|
51680
|
+
React10.useEffect(() => {
|
|
50495
51681
|
setIsChecked(value2 === valueProps);
|
|
50496
51682
|
}, [value2, valueProps]);
|
|
50497
51683
|
return /* @__PURE__ */ jsx(RadioProvider, { value: { isChecked, setIsChecked }, children: /* @__PURE__ */ jsx(
|
|
@@ -51520,7 +52706,7 @@ function VerticalStepper({
|
|
|
51520
52706
|
step.id
|
|
51521
52707
|
)) }) });
|
|
51522
52708
|
}
|
|
51523
|
-
var Spinner =
|
|
52709
|
+
var Spinner = React10.forwardRef(function Spinner2({
|
|
51524
52710
|
color,
|
|
51525
52711
|
size,
|
|
51526
52712
|
className,
|
|
@@ -51629,9 +52815,9 @@ function resolveSurface(color) {
|
|
|
51629
52815
|
}
|
|
51630
52816
|
function renderSizedIcon(icon, iconClassName) {
|
|
51631
52817
|
if (icon == null) return null;
|
|
51632
|
-
if (
|
|
52818
|
+
if (React10.isValidElement(icon)) {
|
|
51633
52819
|
const el = icon;
|
|
51634
|
-
return
|
|
52820
|
+
return React10.cloneElement(el, {
|
|
51635
52821
|
className: cn(el.props.className, "shrink-0", iconClassName)
|
|
51636
52822
|
});
|
|
51637
52823
|
}
|
|
@@ -51665,7 +52851,7 @@ function getTrend(value2, previousValue) {
|
|
|
51665
52851
|
})}%`;
|
|
51666
52852
|
return { direction, label };
|
|
51667
52853
|
}
|
|
51668
|
-
var StatCard =
|
|
52854
|
+
var StatCard = React10.forwardRef(
|
|
51669
52855
|
({
|
|
51670
52856
|
color,
|
|
51671
52857
|
size = "default",
|
|
@@ -51796,15 +52982,15 @@ StatCard.displayName = "StatCard";
|
|
|
51796
52982
|
// src/components/chart/chart.types.ts
|
|
51797
52983
|
var THEMES = { light: "", dark: ".dark" };
|
|
51798
52984
|
var INITIAL_DIMENSION = { width: 320, height: 200 };
|
|
51799
|
-
var ChartContext =
|
|
52985
|
+
var ChartContext = React10.createContext(null);
|
|
51800
52986
|
function useChart() {
|
|
51801
|
-
const context =
|
|
52987
|
+
const context = React10.useContext(ChartContext);
|
|
51802
52988
|
if (!context) {
|
|
51803
52989
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
51804
52990
|
}
|
|
51805
52991
|
return context;
|
|
51806
52992
|
}
|
|
51807
|
-
var ChartContainer =
|
|
52993
|
+
var ChartContainer = React10.forwardRef(function ChartContainer2({
|
|
51808
52994
|
id,
|
|
51809
52995
|
className,
|
|
51810
52996
|
children,
|
|
@@ -51812,7 +52998,7 @@ var ChartContainer = React8.forwardRef(function ChartContainer2({
|
|
|
51812
52998
|
initialDimension = INITIAL_DIMENSION,
|
|
51813
52999
|
...props
|
|
51814
53000
|
}, ref) {
|
|
51815
|
-
const uniqueId =
|
|
53001
|
+
const uniqueId = React10.useId();
|
|
51816
53002
|
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
51817
53003
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
51818
53004
|
"div",
|
|
@@ -51881,7 +53067,7 @@ function ChartTooltipContent({
|
|
|
51881
53067
|
labelKey
|
|
51882
53068
|
}) {
|
|
51883
53069
|
const { config } = useChart();
|
|
51884
|
-
const tooltipLabel =
|
|
53070
|
+
const tooltipLabel = React10.useMemo(() => {
|
|
51885
53071
|
if (hideLabel || !payload?.length) {
|
|
51886
53072
|
return null;
|
|
51887
53073
|
}
|
|
@@ -52184,7 +53370,7 @@ function getBarRadius(index2, total, stacked, rounded, layout) {
|
|
|
52184
53370
|
if (isFirst) return [0, 0, 0, 0];
|
|
52185
53371
|
return [0, 0, 0, 0];
|
|
52186
53372
|
}
|
|
52187
|
-
var BarChart =
|
|
53373
|
+
var BarChart = React10.forwardRef(
|
|
52188
53374
|
function BarChart2({
|
|
52189
53375
|
data: data2,
|
|
52190
53376
|
config: explicitConfig,
|
|
@@ -52208,16 +53394,16 @@ var BarChart = React8.forwardRef(
|
|
|
52208
53394
|
className,
|
|
52209
53395
|
margin
|
|
52210
53396
|
}, ref) {
|
|
52211
|
-
const resolvedCategoryKey =
|
|
53397
|
+
const resolvedCategoryKey = React10.useMemo(
|
|
52212
53398
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
52213
53399
|
[categoryKey, data2]
|
|
52214
53400
|
);
|
|
52215
|
-
const config =
|
|
53401
|
+
const config = React10.useMemo(
|
|
52216
53402
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
52217
53403
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
52218
53404
|
);
|
|
52219
|
-
const barKeys =
|
|
52220
|
-
const chartData =
|
|
53405
|
+
const barKeys = React10.useMemo(() => Object.keys(config), [config]);
|
|
53406
|
+
const chartData = React10.useMemo(
|
|
52221
53407
|
() => coerceSeriesValuesToNumbers(data2, barKeys),
|
|
52222
53408
|
[data2, barKeys]
|
|
52223
53409
|
);
|
|
@@ -52288,7 +53474,7 @@ var BarChart = React8.forwardRef(
|
|
|
52288
53474
|
);
|
|
52289
53475
|
var DEFAULT_MARGIN = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
52290
53476
|
var DEFAULT_X_AXIS_PADDING = { left: 0, right: 0 };
|
|
52291
|
-
var AreaChart =
|
|
53477
|
+
var AreaChart = React10.forwardRef(
|
|
52292
53478
|
function AreaChart2({
|
|
52293
53479
|
data: data2,
|
|
52294
53480
|
config: explicitConfig,
|
|
@@ -52308,20 +53494,20 @@ var AreaChart = React8.forwardRef(
|
|
|
52308
53494
|
}, ref) {
|
|
52309
53495
|
const resolvedMargin = { ...DEFAULT_MARGIN, ...margin };
|
|
52310
53496
|
const resolvedXAxisPadding = { ...DEFAULT_X_AXIS_PADDING, ...xAxisPadding };
|
|
52311
|
-
const resolvedCategoryKey =
|
|
53497
|
+
const resolvedCategoryKey = React10.useMemo(
|
|
52312
53498
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
52313
53499
|
[categoryKey, data2]
|
|
52314
53500
|
);
|
|
52315
|
-
const config =
|
|
53501
|
+
const config = React10.useMemo(
|
|
52316
53502
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
52317
53503
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
52318
53504
|
);
|
|
52319
|
-
const seriesKeys =
|
|
52320
|
-
const chartData =
|
|
53505
|
+
const seriesKeys = React10.useMemo(() => Object.keys(config), [config]);
|
|
53506
|
+
const chartData = React10.useMemo(
|
|
52321
53507
|
() => coerceSeriesValuesToNumbers(data2, seriesKeys),
|
|
52322
53508
|
[data2, seriesKeys]
|
|
52323
53509
|
);
|
|
52324
|
-
const reactId =
|
|
53510
|
+
const reactId = React10.useId();
|
|
52325
53511
|
const gradientPrefix = `area-fill-${reactId.replace(/:/g, "")}`;
|
|
52326
53512
|
const gradientStops = stacked ? { peak: 0.42, highlight: 0.32, mid: 0.18, soft: 0.06 } : { peak: 0.28, highlight: 0.22, mid: 0.1, soft: 0.03 };
|
|
52327
53513
|
return /* @__PURE__ */ jsx(ChartContainer, { ref, config, className: cn("w-full", className), children: /* @__PURE__ */ jsxs(
|
|
@@ -52449,7 +53635,7 @@ function resolveStrokeWidth(width2) {
|
|
|
52449
53635
|
if (typeof width2 === "number") return width2;
|
|
52450
53636
|
return STROKE_WIDTH_MAP[width2];
|
|
52451
53637
|
}
|
|
52452
|
-
var LineChart =
|
|
53638
|
+
var LineChart = React10.forwardRef(
|
|
52453
53639
|
function LineChart2({
|
|
52454
53640
|
data: data2,
|
|
52455
53641
|
config: explicitConfig,
|
|
@@ -52472,17 +53658,17 @@ var LineChart = React8.forwardRef(
|
|
|
52472
53658
|
className,
|
|
52473
53659
|
margin
|
|
52474
53660
|
}, ref) {
|
|
52475
|
-
const resolvedCategoryKey =
|
|
53661
|
+
const resolvedCategoryKey = React10.useMemo(
|
|
52476
53662
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
52477
53663
|
[categoryKey, data2]
|
|
52478
53664
|
);
|
|
52479
|
-
const config =
|
|
53665
|
+
const config = React10.useMemo(
|
|
52480
53666
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
52481
53667
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
52482
53668
|
);
|
|
52483
|
-
const seriesKeys =
|
|
53669
|
+
const seriesKeys = React10.useMemo(() => Object.keys(config), [config]);
|
|
52484
53670
|
const resolvedStrokeWidth = resolveStrokeWidth(strokeWidth);
|
|
52485
|
-
const processedData =
|
|
53671
|
+
const processedData = React10.useMemo(() => {
|
|
52486
53672
|
const base = coerceSeriesValuesToNumbers(data2, seriesKeys);
|
|
52487
53673
|
if (!stacked) return base;
|
|
52488
53674
|
return base.map((row) => {
|
|
@@ -52498,11 +53684,11 @@ var LineChart = React8.forwardRef(
|
|
|
52498
53684
|
return out;
|
|
52499
53685
|
});
|
|
52500
53686
|
}, [data2, seriesKeys, stacked]);
|
|
52501
|
-
const glowOrderKeys =
|
|
53687
|
+
const glowOrderKeys = React10.useMemo(
|
|
52502
53688
|
() => stacked ? [...seriesKeys].reverse() : seriesKeys,
|
|
52503
53689
|
[seriesKeys, stacked]
|
|
52504
53690
|
);
|
|
52505
|
-
const reactId =
|
|
53691
|
+
const reactId = React10.useId();
|
|
52506
53692
|
const idPrefix2 = `line-${reactId.replace(/:/g, "")}`;
|
|
52507
53693
|
const glowGradientId = (key2) => `${idPrefix2}-glow-${key2}`;
|
|
52508
53694
|
return /* @__PURE__ */ jsx(
|
|
@@ -52657,7 +53843,7 @@ function getBarRadius2(index2, total, stacked, rounded) {
|
|
|
52657
53843
|
function buildDefaultSeries(config) {
|
|
52658
53844
|
return Object.keys(config).map((dataKey) => ({ dataKey, type: "bar" }));
|
|
52659
53845
|
}
|
|
52660
|
-
var ComposedChart =
|
|
53846
|
+
var ComposedChart = React10.forwardRef(
|
|
52661
53847
|
function ComposedChart2({
|
|
52662
53848
|
data: data2,
|
|
52663
53849
|
config: explicitConfig,
|
|
@@ -52686,27 +53872,27 @@ var ComposedChart = React8.forwardRef(
|
|
|
52686
53872
|
className,
|
|
52687
53873
|
margin
|
|
52688
53874
|
}, ref) {
|
|
52689
|
-
const resolvedCategoryKey =
|
|
53875
|
+
const resolvedCategoryKey = React10.useMemo(
|
|
52690
53876
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
52691
53877
|
[categoryKey, data2]
|
|
52692
53878
|
);
|
|
52693
|
-
const config =
|
|
53879
|
+
const config = React10.useMemo(
|
|
52694
53880
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
52695
53881
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
52696
53882
|
);
|
|
52697
|
-
const series =
|
|
53883
|
+
const series = React10.useMemo(
|
|
52698
53884
|
() => explicitSeries ?? buildDefaultSeries(config),
|
|
52699
53885
|
[explicitSeries, config]
|
|
52700
53886
|
);
|
|
52701
|
-
const seriesKeys =
|
|
53887
|
+
const seriesKeys = React10.useMemo(
|
|
52702
53888
|
() => series.map((item) => item.dataKey),
|
|
52703
53889
|
[series]
|
|
52704
53890
|
);
|
|
52705
|
-
const chartData =
|
|
53891
|
+
const chartData = React10.useMemo(
|
|
52706
53892
|
() => coerceSeriesValuesToNumbers(data2, seriesKeys),
|
|
52707
53893
|
[data2, seriesKeys]
|
|
52708
53894
|
);
|
|
52709
|
-
const barSeries =
|
|
53895
|
+
const barSeries = React10.useMemo(
|
|
52710
53896
|
() => series.filter((item) => item.type === "bar"),
|
|
52711
53897
|
[series]
|
|
52712
53898
|
);
|
|
@@ -52925,7 +54111,7 @@ function DonutLegend({
|
|
|
52925
54111
|
] }, key2);
|
|
52926
54112
|
}) });
|
|
52927
54113
|
}
|
|
52928
|
-
var DonutChart =
|
|
54114
|
+
var DonutChart = React10.forwardRef(
|
|
52929
54115
|
function DonutChart2({
|
|
52930
54116
|
data: data2,
|
|
52931
54117
|
config: explicitConfig,
|
|
@@ -52943,18 +54129,18 @@ var DonutChart = React8.forwardRef(
|
|
|
52943
54129
|
className,
|
|
52944
54130
|
margin
|
|
52945
54131
|
}, ref) {
|
|
52946
|
-
const rawId =
|
|
54132
|
+
const rawId = React10.useId();
|
|
52947
54133
|
const gradientScope = rawId.replace(/:/g, "");
|
|
52948
|
-
const config =
|
|
54134
|
+
const config = React10.useMemo(
|
|
52949
54135
|
() => deriveConfig(data2, explicitConfig),
|
|
52950
54136
|
[data2, explicitConfig]
|
|
52951
54137
|
);
|
|
52952
|
-
const twoRing =
|
|
52953
|
-
const outerRing =
|
|
54138
|
+
const twoRing = React10.useMemo(() => hasChildren(data2), [data2]);
|
|
54139
|
+
const outerRing = React10.useMemo(
|
|
52954
54140
|
() => twoRing ? buildOuterRing(data2) : null,
|
|
52955
54141
|
[data2, twoRing]
|
|
52956
54142
|
);
|
|
52957
|
-
|
|
54143
|
+
React10.useEffect(() => {
|
|
52958
54144
|
validateChildren(data2);
|
|
52959
54145
|
}, [data2]);
|
|
52960
54146
|
const inner = parseRadius(innerRadius);
|
|
@@ -52963,8 +54149,8 @@ var DonutChart = React8.forwardRef(
|
|
|
52963
54149
|
const gapHalf = ringGap / 2;
|
|
52964
54150
|
const innerRingOuterRadius = twoRing ? formatRadius(mid - gapHalf, inner.isPct) : outerRadius;
|
|
52965
54151
|
const outerRingInnerRadius = formatRadius(mid + gapHalf, outer.isPct);
|
|
52966
|
-
const legendOrder =
|
|
52967
|
-
const uniqueKeys =
|
|
54152
|
+
const legendOrder = React10.useMemo(() => flattenKeys(data2), [data2]);
|
|
54153
|
+
const uniqueKeys = React10.useMemo(
|
|
52968
54154
|
() => Array.from(new Set(flattenKeys(data2))),
|
|
52969
54155
|
[data2]
|
|
52970
54156
|
);
|
|
@@ -53221,7 +54407,7 @@ function TreemapLegend({
|
|
|
53221
54407
|
] }, key2);
|
|
53222
54408
|
}) });
|
|
53223
54409
|
}
|
|
53224
|
-
var TreemapChart =
|
|
54410
|
+
var TreemapChart = React10.forwardRef(
|
|
53225
54411
|
function TreemapChart2({
|
|
53226
54412
|
data: data2,
|
|
53227
54413
|
config: explicitConfig,
|
|
@@ -53241,28 +54427,28 @@ var TreemapChart = React8.forwardRef(
|
|
|
53241
54427
|
isUpdateAnimationActive
|
|
53242
54428
|
}, ref) {
|
|
53243
54429
|
const resolvedUpdateAnimationActive = isUpdateAnimationActive ?? isAnimationActive;
|
|
53244
|
-
const rawId =
|
|
54430
|
+
const rawId = React10.useId();
|
|
53245
54431
|
const gradientScope = rawId.replace(/:/g, "");
|
|
53246
|
-
const resolvedLabelStyle =
|
|
54432
|
+
const resolvedLabelStyle = React10.useMemo(
|
|
53247
54433
|
() => ({ ...DEFAULT_LABEL_STYLE, ...labelStyle }),
|
|
53248
54434
|
[labelStyle]
|
|
53249
54435
|
);
|
|
53250
|
-
const sortedData =
|
|
54436
|
+
const sortedData = React10.useMemo(() => {
|
|
53251
54437
|
const sorted = [...data2].sort((a, b) => b.value - a.value);
|
|
53252
54438
|
if (typeof maxDataPoints === "number" && maxDataPoints > 0) {
|
|
53253
54439
|
return sorted.slice(0, maxDataPoints);
|
|
53254
54440
|
}
|
|
53255
54441
|
return sorted;
|
|
53256
54442
|
}, [data2, maxDataPoints]);
|
|
53257
|
-
const config =
|
|
54443
|
+
const config = React10.useMemo(
|
|
53258
54444
|
() => deriveConfig2(sortedData, explicitConfig),
|
|
53259
54445
|
[sortedData, explicitConfig]
|
|
53260
54446
|
);
|
|
53261
|
-
const uniqueKeys =
|
|
54447
|
+
const uniqueKeys = React10.useMemo(
|
|
53262
54448
|
() => Array.from(new Set(sortedData.map((d) => d.key))),
|
|
53263
54449
|
[sortedData]
|
|
53264
54450
|
);
|
|
53265
|
-
const colorByKey =
|
|
54451
|
+
const colorByKey = React10.useMemo(() => {
|
|
53266
54452
|
const map = /* @__PURE__ */ new Map();
|
|
53267
54453
|
if (typeof color === "string" && color.length > 0) {
|
|
53268
54454
|
const base = resolveBaseColor(color);
|
|
@@ -53278,7 +54464,7 @@ var TreemapChart = React8.forwardRef(
|
|
|
53278
54464
|
}
|
|
53279
54465
|
return map;
|
|
53280
54466
|
}, [config, uniqueKeys, color, sortedData]);
|
|
53281
|
-
const textColorByKey =
|
|
54467
|
+
const textColorByKey = React10.useMemo(() => {
|
|
53282
54468
|
const map = /* @__PURE__ */ new Map();
|
|
53283
54469
|
if (typeof color === "string" && color.length > 0) {
|
|
53284
54470
|
sortedData.forEach((d, i) => {
|
|
@@ -53290,7 +54476,7 @@ var TreemapChart = React8.forwardRef(
|
|
|
53290
54476
|
return map;
|
|
53291
54477
|
}, [color, sortedData]);
|
|
53292
54478
|
const autoTextColor = labelStyle?.color === void 0;
|
|
53293
|
-
const treemapData =
|
|
54479
|
+
const treemapData = React10.useMemo(
|
|
53294
54480
|
() => sortedData.map((d) => ({
|
|
53295
54481
|
...d,
|
|
53296
54482
|
name: d.key,
|
|
@@ -53387,7 +54573,12 @@ var slotSizeClasses = {
|
|
|
53387
54573
|
default: "h-10 w-10 text-base md:text-sm",
|
|
53388
54574
|
lg: "h-12 w-12 text-lg"
|
|
53389
54575
|
};
|
|
53390
|
-
var
|
|
54576
|
+
var slotExpandedSizeClasses = {
|
|
54577
|
+
sm: "h-8 text-xs",
|
|
54578
|
+
default: "h-10 text-base md:text-sm",
|
|
54579
|
+
lg: "h-12 text-lg"
|
|
54580
|
+
};
|
|
54581
|
+
var InputOTPSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53391
54582
|
"div",
|
|
53392
54583
|
{
|
|
53393
54584
|
ref,
|
|
@@ -53402,11 +54593,12 @@ InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
|
53402
54593
|
var SlotBox = ({
|
|
53403
54594
|
index: index2,
|
|
53404
54595
|
size,
|
|
54596
|
+
expand,
|
|
53405
54597
|
rounded,
|
|
53406
54598
|
hasError,
|
|
53407
54599
|
cornerClass
|
|
53408
54600
|
}) => {
|
|
53409
|
-
const context =
|
|
54601
|
+
const context = React10.useContext(OTPInputContext);
|
|
53410
54602
|
const slot = context.slots[index2];
|
|
53411
54603
|
if (!slot) return null;
|
|
53412
54604
|
const { char, hasFakeCaret, isActive } = slot;
|
|
@@ -53425,7 +54617,7 @@ var SlotBox = ({
|
|
|
53425
54617
|
// The wrapping row overrides the leading/trailing radii on interior
|
|
53426
54618
|
// slots so groups read as one connected pill/box.
|
|
53427
54619
|
cornerClass,
|
|
53428
|
-
slotSizeClasses[size]
|
|
54620
|
+
expand ? cn("min-w-0 flex-1", slotExpandedSizeClasses[size]) : slotSizeClasses[size]
|
|
53429
54621
|
),
|
|
53430
54622
|
children: [
|
|
53431
54623
|
char,
|
|
@@ -53471,12 +54663,13 @@ function clampLength(raw) {
|
|
|
53471
54663
|
}
|
|
53472
54664
|
return rounded;
|
|
53473
54665
|
}
|
|
53474
|
-
var InputOTP =
|
|
54666
|
+
var InputOTP = React10.forwardRef(
|
|
53475
54667
|
({
|
|
53476
54668
|
length: length2,
|
|
53477
54669
|
allowAlphaNumeric,
|
|
53478
54670
|
regex,
|
|
53479
54671
|
separators,
|
|
54672
|
+
expand,
|
|
53480
54673
|
value: value2,
|
|
53481
54674
|
defaultValue,
|
|
53482
54675
|
onChange,
|
|
@@ -53499,17 +54692,17 @@ var InputOTP = React8.forwardRef(
|
|
|
53499
54692
|
containerClassName,
|
|
53500
54693
|
...restProps
|
|
53501
54694
|
}, ref) => {
|
|
53502
|
-
const autoId =
|
|
54695
|
+
const autoId = React10.useId();
|
|
53503
54696
|
const inputId = id || autoId;
|
|
53504
|
-
const effectiveLength =
|
|
54697
|
+
const effectiveLength = React10.useMemo(() => clampLength(length2), [length2]);
|
|
53505
54698
|
const effectiveSize = size || "default";
|
|
53506
54699
|
const hasError = !!error || !!errorContent;
|
|
53507
54700
|
const isControlled = value2 !== void 0;
|
|
53508
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
54701
|
+
const [uncontrolledValue, setUncontrolledValue] = React10.useState(
|
|
53509
54702
|
typeof defaultValue === "string" ? defaultValue : ""
|
|
53510
54703
|
);
|
|
53511
54704
|
const effectiveValue = isControlled ? value2 : uncontrolledValue;
|
|
53512
|
-
const handleChange =
|
|
54705
|
+
const handleChange = React10.useCallback(
|
|
53513
54706
|
(next) => {
|
|
53514
54707
|
if (!isControlled) setUncontrolledValue(next);
|
|
53515
54708
|
onChange?.(next);
|
|
@@ -53517,7 +54710,7 @@ var InputOTP = React8.forwardRef(
|
|
|
53517
54710
|
[isControlled, onChange]
|
|
53518
54711
|
);
|
|
53519
54712
|
const pattern = regex && regex.length > 0 ? regex : allowAlphaNumeric ? REGEXP_ONLY_DIGITS_AND_CHARS : REGEXP_ONLY_DIGITS;
|
|
53520
|
-
const groups =
|
|
54713
|
+
const groups = React10.useMemo(
|
|
53521
54714
|
() => buildGroups(effectiveLength, separators),
|
|
53522
54715
|
[effectiveLength, separators]
|
|
53523
54716
|
);
|
|
@@ -53556,30 +54749,39 @@ var InputOTP = React8.forwardRef(
|
|
|
53556
54749
|
"aria-describedby": describedBy,
|
|
53557
54750
|
containerClassName: cn(
|
|
53558
54751
|
"flex items-center gap-2 has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed",
|
|
54752
|
+
expand && "w-full",
|
|
53559
54753
|
containerClassName
|
|
53560
54754
|
),
|
|
53561
54755
|
...restProps,
|
|
53562
|
-
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
|
|
54756
|
+
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React10.Fragment, { children: [
|
|
53563
54757
|
groupIndex > 0 && /* @__PURE__ */ jsx(InputOTPSeparator, {}),
|
|
53564
|
-
/* @__PURE__ */ jsx(
|
|
53565
|
-
|
|
53566
|
-
|
|
53567
|
-
|
|
53568
|
-
|
|
53569
|
-
|
|
53570
|
-
|
|
53571
|
-
|
|
53572
|
-
|
|
53573
|
-
|
|
53574
|
-
|
|
53575
|
-
|
|
53576
|
-
|
|
53577
|
-
|
|
53578
|
-
|
|
53579
|
-
|
|
53580
|
-
|
|
53581
|
-
|
|
53582
|
-
|
|
54758
|
+
/* @__PURE__ */ jsx(
|
|
54759
|
+
"div",
|
|
54760
|
+
{
|
|
54761
|
+
className: cn("flex items-center", className),
|
|
54762
|
+
style: expand ? { flex: `${group.length} 1 0%` } : void 0,
|
|
54763
|
+
children: group.map((slotIndex, positionInGroup) => {
|
|
54764
|
+
const isFirst = positionInGroup === 0;
|
|
54765
|
+
const isLast = positionInGroup === group.length - 1;
|
|
54766
|
+
const cornerClass = cn(
|
|
54767
|
+
!isFirst && "-ms-px rounded-s-none",
|
|
54768
|
+
!isLast && "rounded-e-none"
|
|
54769
|
+
);
|
|
54770
|
+
return /* @__PURE__ */ jsx(
|
|
54771
|
+
SlotBox,
|
|
54772
|
+
{
|
|
54773
|
+
index: slotIndex,
|
|
54774
|
+
size: effectiveSize,
|
|
54775
|
+
expand: !!expand,
|
|
54776
|
+
rounded: !!rounded,
|
|
54777
|
+
hasError,
|
|
54778
|
+
cornerClass
|
|
54779
|
+
},
|
|
54780
|
+
slotIndex
|
|
54781
|
+
);
|
|
54782
|
+
})
|
|
54783
|
+
}
|
|
54784
|
+
)
|
|
53583
54785
|
] }, `g-${groupIndex}`))
|
|
53584
54786
|
}
|
|
53585
54787
|
),
|
|
@@ -53597,15 +54799,15 @@ var InputOTP = React8.forwardRef(
|
|
|
53597
54799
|
}
|
|
53598
54800
|
);
|
|
53599
54801
|
InputOTP.displayName = "InputOTP";
|
|
53600
|
-
var CarouselContext =
|
|
54802
|
+
var CarouselContext = React10.createContext(null);
|
|
53601
54803
|
function useCarousel() {
|
|
53602
|
-
const context =
|
|
54804
|
+
const context = React10.useContext(CarouselContext);
|
|
53603
54805
|
if (!context) {
|
|
53604
54806
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
53605
54807
|
}
|
|
53606
54808
|
return context;
|
|
53607
54809
|
}
|
|
53608
|
-
var Carousel =
|
|
54810
|
+
var Carousel = React10.forwardRef(
|
|
53609
54811
|
({
|
|
53610
54812
|
orientation = "horizontal",
|
|
53611
54813
|
opts,
|
|
@@ -53622,20 +54824,20 @@ var Carousel = React8.forwardRef(
|
|
|
53622
54824
|
},
|
|
53623
54825
|
plugins
|
|
53624
54826
|
);
|
|
53625
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
53626
|
-
const [canScrollNext, setCanScrollNext] =
|
|
53627
|
-
const onSelect =
|
|
54827
|
+
const [canScrollPrev, setCanScrollPrev] = React10.useState(false);
|
|
54828
|
+
const [canScrollNext, setCanScrollNext] = React10.useState(false);
|
|
54829
|
+
const onSelect = React10.useCallback((api2) => {
|
|
53628
54830
|
if (!api2) return;
|
|
53629
54831
|
setCanScrollPrev(api2.canScrollPrev());
|
|
53630
54832
|
setCanScrollNext(api2.canScrollNext());
|
|
53631
54833
|
}, []);
|
|
53632
|
-
const scrollPrev =
|
|
54834
|
+
const scrollPrev = React10.useCallback(() => {
|
|
53633
54835
|
api?.scrollPrev();
|
|
53634
54836
|
}, [api]);
|
|
53635
|
-
const scrollNext =
|
|
54837
|
+
const scrollNext = React10.useCallback(() => {
|
|
53636
54838
|
api?.scrollNext();
|
|
53637
54839
|
}, [api]);
|
|
53638
|
-
const handleKeyDown =
|
|
54840
|
+
const handleKeyDown = React10.useCallback(
|
|
53639
54841
|
(event) => {
|
|
53640
54842
|
const isHorizontal = orientation === "horizontal";
|
|
53641
54843
|
const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
@@ -53650,11 +54852,11 @@ var Carousel = React8.forwardRef(
|
|
|
53650
54852
|
},
|
|
53651
54853
|
[scrollPrev, scrollNext, orientation]
|
|
53652
54854
|
);
|
|
53653
|
-
|
|
54855
|
+
React10.useEffect(() => {
|
|
53654
54856
|
if (!api || !setApi) return;
|
|
53655
54857
|
setApi(api);
|
|
53656
54858
|
}, [api, setApi]);
|
|
53657
|
-
|
|
54859
|
+
React10.useEffect(() => {
|
|
53658
54860
|
if (!api) return;
|
|
53659
54861
|
onSelect(api);
|
|
53660
54862
|
api.on("reInit", onSelect);
|
|
@@ -53694,7 +54896,7 @@ var Carousel = React8.forwardRef(
|
|
|
53694
54896
|
}
|
|
53695
54897
|
);
|
|
53696
54898
|
Carousel.displayName = "Carousel";
|
|
53697
|
-
var CarouselContent =
|
|
54899
|
+
var CarouselContent = React10.forwardRef(({ className, ...props }, ref) => {
|
|
53698
54900
|
const { carouselRef, orientation } = useCarousel();
|
|
53699
54901
|
return (
|
|
53700
54902
|
// Vertical carousels need an explicit viewport height so overflow clips at
|
|
@@ -53725,7 +54927,7 @@ var CarouselContent = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
53725
54927
|
);
|
|
53726
54928
|
});
|
|
53727
54929
|
CarouselContent.displayName = "CarouselContent";
|
|
53728
|
-
var CarouselItem =
|
|
54930
|
+
var CarouselItem = React10.forwardRef(({ className, ...props }, ref) => {
|
|
53729
54931
|
const { orientation } = useCarousel();
|
|
53730
54932
|
return /* @__PURE__ */ jsx(
|
|
53731
54933
|
"div",
|
|
@@ -53743,7 +54945,7 @@ var CarouselItem = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
53743
54945
|
);
|
|
53744
54946
|
});
|
|
53745
54947
|
CarouselItem.displayName = "CarouselItem";
|
|
53746
|
-
var CarouselPrevious =
|
|
54948
|
+
var CarouselPrevious = React10.forwardRef(({ className, ...props }, ref) => {
|
|
53747
54949
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
53748
54950
|
return /* @__PURE__ */ jsxs(
|
|
53749
54951
|
"button",
|
|
@@ -53767,7 +54969,7 @@ var CarouselPrevious = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
53767
54969
|
);
|
|
53768
54970
|
});
|
|
53769
54971
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
53770
|
-
var CarouselNext =
|
|
54972
|
+
var CarouselNext = React10.forwardRef(({ className, ...props }, ref) => {
|
|
53771
54973
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
53772
54974
|
return /* @__PURE__ */ jsxs(
|
|
53773
54975
|
"button",
|
|
@@ -53871,10 +55073,10 @@ function Carousel2({
|
|
|
53871
55073
|
MAX_DOTS_DEFAULT
|
|
53872
55074
|
);
|
|
53873
55075
|
const clampedDelay = clamp2(delay2, DELAY_MIN, DELAY_MAX, DELAY_DEFAULT);
|
|
53874
|
-
const autoplayPlugin =
|
|
55076
|
+
const autoplayPlugin = React10.useRef(
|
|
53875
55077
|
autoplay ? Autoplay({ delay: clampedDelay, stopOnInteraction: true }) : null
|
|
53876
55078
|
);
|
|
53877
|
-
|
|
55079
|
+
React10.useEffect(() => {
|
|
53878
55080
|
const plugin = autoplayPlugin.current;
|
|
53879
55081
|
if (!plugin || !autoplay) return;
|
|
53880
55082
|
autoplayPlugin.current = Autoplay({
|
|
@@ -53882,18 +55084,17 @@ function Carousel2({
|
|
|
53882
55084
|
stopOnInteraction: true
|
|
53883
55085
|
});
|
|
53884
55086
|
}, [autoplay, clampedDelay]);
|
|
53885
|
-
const plugins =
|
|
55087
|
+
const plugins = React10.useMemo(
|
|
53886
55088
|
() => autoplay && autoplayPlugin.current ? [autoplayPlugin.current] : [],
|
|
53887
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53888
55089
|
[autoplay, clampedDelay]
|
|
53889
55090
|
);
|
|
53890
|
-
const [api, setApi] =
|
|
53891
|
-
const [selectedIndex, setSelectedIndex] =
|
|
53892
|
-
const [scrollSnaps, setScrollSnaps] =
|
|
53893
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
53894
|
-
const [canScrollNext, setCanScrollNext] =
|
|
53895
|
-
const prevIndexRef =
|
|
53896
|
-
|
|
55091
|
+
const [api, setApi] = React10.useState();
|
|
55092
|
+
const [selectedIndex, setSelectedIndex] = React10.useState(0);
|
|
55093
|
+
const [scrollSnaps, setScrollSnaps] = React10.useState([]);
|
|
55094
|
+
const [canScrollPrev, setCanScrollPrev] = React10.useState(false);
|
|
55095
|
+
const [canScrollNext, setCanScrollNext] = React10.useState(false);
|
|
55096
|
+
const prevIndexRef = React10.useRef(0);
|
|
55097
|
+
React10.useEffect(() => {
|
|
53897
55098
|
if (!api) return;
|
|
53898
55099
|
setScrollSnaps(api.scrollSnapList());
|
|
53899
55100
|
setSelectedIndex(api.selectedScrollSnap());
|
|
@@ -53930,12 +55131,12 @@ function Carousel2({
|
|
|
53930
55131
|
api.off("reInit", handleReInit);
|
|
53931
55132
|
};
|
|
53932
55133
|
}, [api, loop, onNext, onPrevious]);
|
|
53933
|
-
const scrollTo =
|
|
55134
|
+
const scrollTo = React10.useCallback(
|
|
53934
55135
|
(index2) => api?.scrollTo(index2),
|
|
53935
55136
|
[api]
|
|
53936
55137
|
);
|
|
53937
|
-
const scrollPrev =
|
|
53938
|
-
const scrollNext =
|
|
55138
|
+
const scrollPrev = React10.useCallback(() => api?.scrollPrev(), [api]);
|
|
55139
|
+
const scrollNext = React10.useCallback(() => api?.scrollNext(), [api]);
|
|
53939
55140
|
const navigationState = {
|
|
53940
55141
|
canScrollPrev,
|
|
53941
55142
|
canScrollNext,
|
|
@@ -53994,12 +55195,12 @@ function Carousel2({
|
|
|
53994
55195
|
);
|
|
53995
55196
|
}
|
|
53996
55197
|
var labelClasses = "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
53997
|
-
var
|
|
55198
|
+
var sizeClasses2 = {
|
|
53998
55199
|
sm: "min-h-[60px] px-2 py-1.5 text-xs",
|
|
53999
55200
|
default: "min-h-[80px] px-3 py-2 text-base md:text-sm",
|
|
54000
55201
|
lg: "min-h-[100px] px-4 py-3 text-lg"
|
|
54001
55202
|
};
|
|
54002
|
-
var Textarea =
|
|
55203
|
+
var Textarea = React10.forwardRef(
|
|
54003
55204
|
({
|
|
54004
55205
|
className,
|
|
54005
55206
|
label,
|
|
@@ -54016,15 +55217,15 @@ var Textarea = React8.forwardRef(
|
|
|
54016
55217
|
placeholder,
|
|
54017
55218
|
...restProps
|
|
54018
55219
|
}, ref) => {
|
|
54019
|
-
const autoId =
|
|
55220
|
+
const autoId = React10.useId();
|
|
54020
55221
|
const textareaId = id || autoId;
|
|
54021
|
-
const [charCount, setCharCount] =
|
|
55222
|
+
const [charCount, setCharCount] = React10.useState(() => {
|
|
54022
55223
|
if (charLimit === void 0) return 0;
|
|
54023
55224
|
if (typeof value2 === "string") return value2.length;
|
|
54024
55225
|
if (typeof defaultValue === "string") return defaultValue.length;
|
|
54025
55226
|
return 0;
|
|
54026
55227
|
});
|
|
54027
|
-
|
|
55228
|
+
React10.useEffect(() => {
|
|
54028
55229
|
if (charLimit !== void 0 && typeof value2 === "string") {
|
|
54029
55230
|
setCharCount(value2.length);
|
|
54030
55231
|
}
|
|
@@ -54040,7 +55241,7 @@ var Textarea = React8.forwardRef(
|
|
|
54040
55241
|
};
|
|
54041
55242
|
const textareaClasses = cn(
|
|
54042
55243
|
"flex w-full rounded-md border border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-y",
|
|
54043
|
-
|
|
55244
|
+
sizeClasses2[effectiveSize],
|
|
54044
55245
|
hasError && "border-destructive focus-visible:ring-destructive",
|
|
54045
55246
|
className
|
|
54046
55247
|
);
|
|
@@ -54102,7 +55303,7 @@ var Textarea = React8.forwardRef(
|
|
|
54102
55303
|
}
|
|
54103
55304
|
);
|
|
54104
55305
|
Textarea.displayName = "Textarea";
|
|
54105
|
-
var Command =
|
|
55306
|
+
var Command = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54106
55307
|
Command$1,
|
|
54107
55308
|
{
|
|
54108
55309
|
ref,
|
|
@@ -54114,7 +55315,7 @@ var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
54114
55315
|
}
|
|
54115
55316
|
));
|
|
54116
55317
|
Command.displayName = Command$1.displayName;
|
|
54117
|
-
var CommandInput =
|
|
55318
|
+
var CommandInput = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
54118
55319
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
54119
55320
|
/* @__PURE__ */ jsx(
|
|
54120
55321
|
Command$1.Input,
|
|
@@ -54129,7 +55330,7 @@ var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
54129
55330
|
)
|
|
54130
55331
|
] }));
|
|
54131
55332
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
54132
|
-
var CommandList =
|
|
55333
|
+
var CommandList = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54133
55334
|
Command$1.List,
|
|
54134
55335
|
{
|
|
54135
55336
|
ref,
|
|
@@ -54138,7 +55339,7 @@ var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
54138
55339
|
}
|
|
54139
55340
|
));
|
|
54140
55341
|
CommandList.displayName = Command$1.List.displayName;
|
|
54141
|
-
var CommandEmpty =
|
|
55342
|
+
var CommandEmpty = React10.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
54142
55343
|
Command$1.Empty,
|
|
54143
55344
|
{
|
|
54144
55345
|
ref,
|
|
@@ -54147,7 +55348,7 @@ var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
54147
55348
|
}
|
|
54148
55349
|
));
|
|
54149
55350
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
54150
|
-
var CommandGroup =
|
|
55351
|
+
var CommandGroup = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54151
55352
|
Command$1.Group,
|
|
54152
55353
|
{
|
|
54153
55354
|
ref,
|
|
@@ -54159,7 +55360,7 @@ var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
54159
55360
|
}
|
|
54160
55361
|
));
|
|
54161
55362
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
54162
|
-
var CommandSeparator =
|
|
55363
|
+
var CommandSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54163
55364
|
Command$1.Separator,
|
|
54164
55365
|
{
|
|
54165
55366
|
ref,
|
|
@@ -54168,7 +55369,7 @@ var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
54168
55369
|
}
|
|
54169
55370
|
));
|
|
54170
55371
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
54171
|
-
var CommandItem =
|
|
55372
|
+
var CommandItem = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54172
55373
|
Command$1.Item,
|
|
54173
55374
|
{
|
|
54174
55375
|
ref,
|
|
@@ -54197,8 +55398,8 @@ function AsyncCombobox({
|
|
|
54197
55398
|
hasMore = false,
|
|
54198
55399
|
onLoadMore
|
|
54199
55400
|
}) {
|
|
54200
|
-
const [open, setOpen] =
|
|
54201
|
-
const [inputValue, setInputValue] =
|
|
55401
|
+
const [open, setOpen] = React10.useState(false);
|
|
55402
|
+
const [inputValue, setInputValue] = React10.useState("");
|
|
54202
55403
|
const selectedOption = options.find((o) => o.value === value2);
|
|
54203
55404
|
const displayValue = selectedOption?.label ?? (value2 || "");
|
|
54204
55405
|
const handleSelect = (selected) => {
|
|
@@ -54206,7 +55407,7 @@ function AsyncCombobox({
|
|
|
54206
55407
|
onValueChange?.(next);
|
|
54207
55408
|
if (!clearable) setOpen(false);
|
|
54208
55409
|
};
|
|
54209
|
-
const handleSearchChange =
|
|
55410
|
+
const handleSearchChange = React10.useCallback(
|
|
54210
55411
|
(q) => {
|
|
54211
55412
|
setInputValue(q);
|
|
54212
55413
|
onSearchChange?.(q);
|
|
@@ -54321,17 +55522,17 @@ function AsyncMultiSelect({
|
|
|
54321
55522
|
portal = true,
|
|
54322
55523
|
renderOption
|
|
54323
55524
|
}) {
|
|
54324
|
-
const [open, setOpen] =
|
|
54325
|
-
const [inputValue, setInputValue] =
|
|
54326
|
-
const listRef =
|
|
54327
|
-
const sentinelRef =
|
|
55525
|
+
const [open, setOpen] = React10.useState(false);
|
|
55526
|
+
const [inputValue, setInputValue] = React10.useState("");
|
|
55527
|
+
const listRef = React10.useRef(null);
|
|
55528
|
+
const sentinelRef = React10.useRef(null);
|
|
54328
55529
|
const selected = normalizeValue(value2, multiple);
|
|
54329
|
-
const selectedOptions =
|
|
55530
|
+
const selectedOptions = React10.useMemo(() => {
|
|
54330
55531
|
const map = /* @__PURE__ */ new Map();
|
|
54331
55532
|
for (const opt of options) map.set(opt.value, opt);
|
|
54332
55533
|
return selected.map((v) => map.get(v) ?? { value: v, label: v });
|
|
54333
55534
|
}, [options, selected]);
|
|
54334
|
-
|
|
55535
|
+
React10.useEffect(() => {
|
|
54335
55536
|
const sentinel = sentinelRef.current;
|
|
54336
55537
|
if (!open || !hasMore || !onLoadMore || !sentinel) return;
|
|
54337
55538
|
const observer = new IntersectionObserver(
|
|
@@ -54358,7 +55559,7 @@ function AsyncMultiSelect({
|
|
|
54358
55559
|
const next = selected.filter((v) => v !== optionValue);
|
|
54359
55560
|
onValueChange?.(multiple ? next.length > 0 ? next : void 0 : void 0);
|
|
54360
55561
|
};
|
|
54361
|
-
const handleSearchChange =
|
|
55562
|
+
const handleSearchChange = React10.useCallback(
|
|
54362
55563
|
(q) => {
|
|
54363
55564
|
setInputValue(q);
|
|
54364
55565
|
onSearchChange?.(q);
|
|
@@ -54659,8 +55860,8 @@ function CalendarDayButton({
|
|
|
54659
55860
|
modifiers,
|
|
54660
55861
|
...props
|
|
54661
55862
|
}) {
|
|
54662
|
-
const ref =
|
|
54663
|
-
|
|
55863
|
+
const ref = React10.useRef(null);
|
|
55864
|
+
React10.useEffect(() => {
|
|
54664
55865
|
if (modifiers.focused) ref.current?.focus();
|
|
54665
55866
|
}, [modifiers.focused]);
|
|
54666
55867
|
return /* @__PURE__ */ jsx(
|
|
@@ -54961,17 +56162,17 @@ function DateRangePicker({
|
|
|
54961
56162
|
side = "bottom",
|
|
54962
56163
|
className
|
|
54963
56164
|
}) {
|
|
54964
|
-
const [open, setOpen] =
|
|
54965
|
-
const [showCalendar, setShowCalendar] =
|
|
54966
|
-
const [draftRange, setDraftRange] =
|
|
56165
|
+
const [open, setOpen] = React10.useState(false);
|
|
56166
|
+
const [showCalendar, setShowCalendar] = React10.useState(false);
|
|
56167
|
+
const [draftRange, setDraftRange] = React10.useState(
|
|
54967
56168
|
EMPTY_DRAFT_RANGE
|
|
54968
56169
|
);
|
|
54969
|
-
const [calendarMonth, setCalendarMonth] =
|
|
54970
|
-
const [flyoutSide, setFlyoutSide] =
|
|
54971
|
-
const calendarRef =
|
|
54972
|
-
const [startInputValue, setStartInputValue] =
|
|
54973
|
-
const [endInputValue, setEndInputValue] =
|
|
54974
|
-
|
|
56170
|
+
const [calendarMonth, setCalendarMonth] = React10.useState(/* @__PURE__ */ new Date());
|
|
56171
|
+
const [flyoutSide, setFlyoutSide] = React10.useState("right");
|
|
56172
|
+
const calendarRef = React10.useRef(null);
|
|
56173
|
+
const [startInputValue, setStartInputValue] = React10.useState("");
|
|
56174
|
+
const [endInputValue, setEndInputValue] = React10.useState("");
|
|
56175
|
+
React10.useLayoutEffect(() => {
|
|
54975
56176
|
if (!showCalendar || !calendarRef.current) return;
|
|
54976
56177
|
const rect = calendarRef.current.getBoundingClientRect();
|
|
54977
56178
|
if (rect.right > window.innerWidth) {
|
|
@@ -54980,14 +56181,14 @@ function DateRangePicker({
|
|
|
54980
56181
|
}, [showCalendar]);
|
|
54981
56182
|
const activePresets = presets ?? [...PRESET_IDS];
|
|
54982
56183
|
const resolveLabel = (id) => presetLabels?.[id] ?? (id === "custom" ? "Custom" : PRESET_LABELS[id]);
|
|
54983
|
-
const updateDraftRange =
|
|
56184
|
+
const updateDraftRange = React10.useCallback(
|
|
54984
56185
|
(nextRange) => {
|
|
54985
56186
|
setDraftRange(nextRange);
|
|
54986
56187
|
onDraftChange?.(nextRange);
|
|
54987
56188
|
},
|
|
54988
56189
|
[onDraftChange]
|
|
54989
56190
|
);
|
|
54990
|
-
const syncInputsFromDraft =
|
|
56191
|
+
const syncInputsFromDraft = React10.useCallback(
|
|
54991
56192
|
(range) => {
|
|
54992
56193
|
setStartInputValue(range.startDate ? format(range.startDate, dateFormat) : "");
|
|
54993
56194
|
if (lockEndToToday) {
|
|
@@ -55014,7 +56215,7 @@ function DateRangePicker({
|
|
|
55014
56215
|
onChange?.({ presetId: id, ...range });
|
|
55015
56216
|
setOpen(false);
|
|
55016
56217
|
};
|
|
55017
|
-
const handleRangeChange =
|
|
56218
|
+
const handleRangeChange = React10.useCallback(
|
|
55018
56219
|
(range) => {
|
|
55019
56220
|
const nextDraft = toDraftRange(range);
|
|
55020
56221
|
if (lockEndToToday && nextDraft.startDate) {
|
|
@@ -55268,7 +56469,7 @@ function DateRangePicker({
|
|
|
55268
56469
|
}
|
|
55269
56470
|
DateRangePicker.displayName = "DateRangePicker";
|
|
55270
56471
|
var timeInputChromeClass = "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
|
|
55271
|
-
var TimePicker =
|
|
56472
|
+
var TimePicker = React10.forwardRef(
|
|
55272
56473
|
({ hideIcon = false, className, ...props }, ref) => {
|
|
55273
56474
|
return /* @__PURE__ */ jsx(
|
|
55274
56475
|
Input,
|
|
@@ -55325,7 +56526,7 @@ function SimplifiedDate({ ts, dateFormat, className, relative = false }) {
|
|
|
55325
56526
|
}
|
|
55326
56527
|
return /* @__PURE__ */ jsx("span", { className: cn(className), children: detailedDate });
|
|
55327
56528
|
}
|
|
55328
|
-
var Table =
|
|
56529
|
+
var Table = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
55329
56530
|
"table",
|
|
55330
56531
|
{
|
|
55331
56532
|
ref,
|
|
@@ -55334,9 +56535,9 @@ var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
55334
56535
|
}
|
|
55335
56536
|
) }));
|
|
55336
56537
|
Table.displayName = "Table";
|
|
55337
|
-
var TableHeader =
|
|
56538
|
+
var TableHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
55338
56539
|
TableHeader.displayName = "TableHeader";
|
|
55339
|
-
var TableBody =
|
|
56540
|
+
var TableBody = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55340
56541
|
"tbody",
|
|
55341
56542
|
{
|
|
55342
56543
|
ref,
|
|
@@ -55345,7 +56546,7 @@ var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
55345
56546
|
}
|
|
55346
56547
|
));
|
|
55347
56548
|
TableBody.displayName = "TableBody";
|
|
55348
|
-
var TableFooter =
|
|
56549
|
+
var TableFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55349
56550
|
"tfoot",
|
|
55350
56551
|
{
|
|
55351
56552
|
ref,
|
|
@@ -55357,7 +56558,7 @@ var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
55357
56558
|
}
|
|
55358
56559
|
));
|
|
55359
56560
|
TableFooter.displayName = "TableFooter";
|
|
55360
|
-
var TableRow =
|
|
56561
|
+
var TableRow = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55361
56562
|
"tr",
|
|
55362
56563
|
{
|
|
55363
56564
|
ref,
|
|
@@ -55369,7 +56570,7 @@ var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
55369
56570
|
}
|
|
55370
56571
|
));
|
|
55371
56572
|
TableRow.displayName = "TableRow";
|
|
55372
|
-
var TableHead =
|
|
56573
|
+
var TableHead = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55373
56574
|
"th",
|
|
55374
56575
|
{
|
|
55375
56576
|
ref,
|
|
@@ -55381,7 +56582,7 @@ var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
55381
56582
|
}
|
|
55382
56583
|
));
|
|
55383
56584
|
TableHead.displayName = "TableHead";
|
|
55384
|
-
var TableCell =
|
|
56585
|
+
var TableCell = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55385
56586
|
"td",
|
|
55386
56587
|
{
|
|
55387
56588
|
ref,
|
|
@@ -55393,7 +56594,7 @@ var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
55393
56594
|
}
|
|
55394
56595
|
));
|
|
55395
56596
|
TableCell.displayName = "TableCell";
|
|
55396
|
-
var TableCaption =
|
|
56597
|
+
var TableCaption = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55397
56598
|
"caption",
|
|
55398
56599
|
{
|
|
55399
56600
|
ref,
|
|
@@ -56402,7 +57603,7 @@ var userTypeBadgeMetallicClasses = cn(
|
|
|
56402
57603
|
"after:bg-[linear-gradient(315deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0.04)_36%,rgba(0,0,0,0.16)_72%,rgba(255,255,255,0.12)_100%)]",
|
|
56403
57604
|
"after:opacity-0 after:transition-opacity after:duration-[1800ms] after:ease-in-out hover:after:opacity-100"
|
|
56404
57605
|
);
|
|
56405
|
-
var UserTypeBadge =
|
|
57606
|
+
var UserTypeBadge = React10.forwardRef(
|
|
56406
57607
|
({ userType, size = "default", className, ...props }, ref) => {
|
|
56407
57608
|
const { color, icon: Icon2, label } = userTypeBadgeRegistry[userType];
|
|
56408
57609
|
return /* @__PURE__ */ jsx("div", { ref, className: "inline-block", ...props, children: /* @__PURE__ */ jsxs(
|
|
@@ -56434,20 +57635,33 @@ var statusBadgeSizeVariants = cva(
|
|
|
56434
57635
|
{
|
|
56435
57636
|
variants: {
|
|
56436
57637
|
size: {
|
|
56437
|
-
sm: "gap-1
|
|
56438
|
-
default: "gap-1.5
|
|
56439
|
-
lg: "gap-1.5
|
|
57638
|
+
sm: "gap-1 py-0.5 text-xs",
|
|
57639
|
+
default: "gap-1.5 py-0.5 text-xs",
|
|
57640
|
+
lg: "gap-1.5 py-1 text-sm"
|
|
57641
|
+
},
|
|
57642
|
+
hasIcon: {
|
|
57643
|
+
true: "",
|
|
57644
|
+
false: ""
|
|
56440
57645
|
}
|
|
56441
57646
|
},
|
|
57647
|
+
compoundVariants: [
|
|
57648
|
+
{ size: "sm", hasIcon: true, class: "pl-0.5 pr-1.5" },
|
|
57649
|
+
{ size: "sm", hasIcon: false, class: "px-1.5" },
|
|
57650
|
+
{ size: "default", hasIcon: true, class: "pl-0.5 pr-1.75" },
|
|
57651
|
+
{ size: "default", hasIcon: false, class: "px-1.75" },
|
|
57652
|
+
{ size: "lg", hasIcon: true, class: "pl-1 pr-2.25" },
|
|
57653
|
+
{ size: "lg", hasIcon: false, class: "px-2.25" }
|
|
57654
|
+
],
|
|
56442
57655
|
defaultVariants: {
|
|
56443
|
-
size: "default"
|
|
57656
|
+
size: "default",
|
|
57657
|
+
hasIcon: false
|
|
56444
57658
|
}
|
|
56445
57659
|
}
|
|
56446
57660
|
);
|
|
56447
|
-
var StatusBadge =
|
|
57661
|
+
var StatusBadge = React10.forwardRef(
|
|
56448
57662
|
({
|
|
56449
57663
|
label,
|
|
56450
|
-
|
|
57664
|
+
icon: Icon2,
|
|
56451
57665
|
color,
|
|
56452
57666
|
variant = "soft",
|
|
56453
57667
|
size = "default",
|
|
@@ -56456,12 +57670,16 @@ var StatusBadge = React8.forwardRef(
|
|
|
56456
57670
|
...props
|
|
56457
57671
|
}, ref) => {
|
|
56458
57672
|
const iconPx = ICON_PX[size];
|
|
57673
|
+
const showIcon = isLoading || !!Icon2;
|
|
56459
57674
|
return /* @__PURE__ */ jsx("div", { ref, className: "inline-block", ...props, children: /* @__PURE__ */ jsxs(
|
|
56460
57675
|
Badge,
|
|
56461
57676
|
{
|
|
56462
57677
|
color,
|
|
56463
57678
|
variant,
|
|
56464
|
-
className: cn(
|
|
57679
|
+
className: cn(
|
|
57680
|
+
statusBadgeSizeVariants({ size, hasIcon: showIcon }),
|
|
57681
|
+
className
|
|
57682
|
+
),
|
|
56465
57683
|
children: [
|
|
56466
57684
|
isLoading ? /* @__PURE__ */ jsx(Spinner, { size: iconPx, "aria-hidden": true }) : Icon2 ? /* @__PURE__ */ jsx(Icon2, { size: iconPx, "aria-hidden": true }) : null,
|
|
56467
57685
|
label
|
|
@@ -56553,7 +57771,7 @@ var deleteButtonVariantClasses = {
|
|
|
56553
57771
|
gradient: "bg-error/10 text-error hover:bg-error/15 hover:text-error",
|
|
56554
57772
|
solid: "bg-error/20 text-error-foreground hover:bg-error/30 hover:text-error-foreground"
|
|
56555
57773
|
};
|
|
56556
|
-
var Tag =
|
|
57774
|
+
var Tag = React10.forwardRef(
|
|
56557
57775
|
({
|
|
56558
57776
|
name: name2,
|
|
56559
57777
|
value: value2,
|
|
@@ -56632,7 +57850,7 @@ function parseNameValueTag(tag) {
|
|
|
56632
57850
|
if (i <= 0 || i >= tag.length - 1) return null;
|
|
56633
57851
|
return { name: tag.slice(0, i), value: tag.slice(i + 1) };
|
|
56634
57852
|
}
|
|
56635
|
-
var TagInput =
|
|
57853
|
+
var TagInput = React10.forwardRef(
|
|
56636
57854
|
({
|
|
56637
57855
|
tags,
|
|
56638
57856
|
onTagsChange,
|
|
@@ -56659,13 +57877,13 @@ var TagInput = React8.forwardRef(
|
|
|
56659
57877
|
onBlur,
|
|
56660
57878
|
...restInputProps
|
|
56661
57879
|
}, ref) => {
|
|
56662
|
-
const autoId =
|
|
57880
|
+
const autoId = React10.useId();
|
|
56663
57881
|
const inputId = id ?? autoId;
|
|
56664
|
-
const rootRef =
|
|
56665
|
-
const [draft, setDraft] =
|
|
57882
|
+
const rootRef = React10.useRef(null);
|
|
57883
|
+
const [draft, setDraft] = React10.useState("");
|
|
56666
57884
|
const effectiveSize = size ?? "default";
|
|
56667
57885
|
const hasError = error || !!errorContent;
|
|
56668
|
-
const tryCommitDraft =
|
|
57886
|
+
const tryCommitDraft = React10.useCallback(() => {
|
|
56669
57887
|
if (disabled || readOnly) return;
|
|
56670
57888
|
const trimmed = draft.trim();
|
|
56671
57889
|
if (!trimmed) return;
|
|
@@ -57496,9 +58714,9 @@ var SIZE_STYLES2 = {
|
|
|
57496
58714
|
function iconSized4(icon, iconPx) {
|
|
57497
58715
|
if (icon == null) return null;
|
|
57498
58716
|
const dim = { width: iconPx, height: iconPx };
|
|
57499
|
-
if (
|
|
58717
|
+
if (React10.isValidElement(icon)) {
|
|
57500
58718
|
const el = icon;
|
|
57501
|
-
return
|
|
58719
|
+
return React10.cloneElement(el, {
|
|
57502
58720
|
className: cn(el.props.className, "shrink-0"),
|
|
57503
58721
|
style: { ...el.props.style, ...dim }
|
|
57504
58722
|
});
|
|
@@ -57577,7 +58795,7 @@ function useSimpleClickableCardSurface(options) {
|
|
|
57577
58795
|
const s = SIZE_STYLES2[size];
|
|
57578
58796
|
const styles = resolveVariantStyles(variant, color);
|
|
57579
58797
|
const isArbitraryGradient = variant === "gradient" && !isPresetColor(color);
|
|
57580
|
-
const surfaceStyleWithoutGradientBg =
|
|
58798
|
+
const surfaceStyleWithoutGradientBg = React10.useMemo(() => {
|
|
57581
58799
|
if (!isArbitraryGradient || typeof color !== "string")
|
|
57582
58800
|
return styles.containerStyle;
|
|
57583
58801
|
const cs = styles.containerStyle;
|
|
@@ -57588,7 +58806,7 @@ function useSimpleClickableCardSurface(options) {
|
|
|
57588
58806
|
const presetGradientPair = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_BACKDROP[color] : void 0;
|
|
57589
58807
|
const surfaceContainerClass = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_FRAME[color] : styles.container;
|
|
57590
58808
|
const presetRingClasses = isPresetColor(color) ? PRESET_RING_CLASSES_FOCUS_VISIBLE[color] : "";
|
|
57591
|
-
const ringAccentStyle =
|
|
58809
|
+
const ringAccentStyle = React10.useMemo(() => {
|
|
57592
58810
|
if (isPresetColor(color)) return void 0;
|
|
57593
58811
|
if (typeof color !== "string") return void 0;
|
|
57594
58812
|
return {
|
|
@@ -57873,7 +59091,7 @@ function shellPresetRing(color) {
|
|
|
57873
59091
|
const c = color ?? "gray";
|
|
57874
59092
|
return isPresetColor(c) ? PRESET_RING_CLASSES[c] : "";
|
|
57875
59093
|
}
|
|
57876
|
-
var IconTextActionCard =
|
|
59094
|
+
var IconTextActionCard = React10.forwardRef(
|
|
57877
59095
|
({
|
|
57878
59096
|
icon,
|
|
57879
59097
|
title,
|
|
@@ -58161,7 +59379,7 @@ var dismissButtonSizeClasses = {
|
|
|
58161
59379
|
default: "size-7 [&_svg]:size-4",
|
|
58162
59380
|
lg: "size-8 [&_svg]:size-4"
|
|
58163
59381
|
};
|
|
58164
|
-
var Alert =
|
|
59382
|
+
var Alert = React10.forwardRef(
|
|
58165
59383
|
({
|
|
58166
59384
|
icon,
|
|
58167
59385
|
title,
|
|
@@ -58180,8 +59398,8 @@ var Alert = React8.forwardRef(
|
|
|
58180
59398
|
dismissLabel = "Close alert",
|
|
58181
59399
|
className
|
|
58182
59400
|
}, ref) => {
|
|
58183
|
-
const [dismissed, setDismissed] =
|
|
58184
|
-
const handleDismiss =
|
|
59401
|
+
const [dismissed, setDismissed] = React10.useState(false);
|
|
59402
|
+
const handleDismiss = React10.useCallback(() => {
|
|
58185
59403
|
setDismissed(true);
|
|
58186
59404
|
onDismiss?.();
|
|
58187
59405
|
}, [onDismiss]);
|
|
@@ -58543,10 +59761,10 @@ function CodeBlock({
|
|
|
58543
59761
|
inViewMargin
|
|
58544
59762
|
}
|
|
58545
59763
|
);
|
|
58546
|
-
const [visibleCode, setVisibleCode] =
|
|
58547
|
-
const [highlightedCode, setHighlightedCode] =
|
|
58548
|
-
const [isDone, setIsDone] =
|
|
58549
|
-
|
|
59764
|
+
const [visibleCode, setVisibleCode] = React10.useState("");
|
|
59765
|
+
const [highlightedCode, setHighlightedCode] = React10.useState("");
|
|
59766
|
+
const [isDone, setIsDone] = React10.useState(false);
|
|
59767
|
+
React10.useEffect(() => {
|
|
58550
59768
|
if (!visibleCode.length || !isInView) return;
|
|
58551
59769
|
const loadHighlightedCode = async () => {
|
|
58552
59770
|
const normalizedLang = normalizeLang(lang);
|
|
@@ -58570,7 +59788,7 @@ function CodeBlock({
|
|
|
58570
59788
|
};
|
|
58571
59789
|
loadHighlightedCode();
|
|
58572
59790
|
}, [lang, themes, writing, isInView, duration, delay2, visibleCode, theme]);
|
|
58573
|
-
|
|
59791
|
+
React10.useEffect(() => {
|
|
58574
59792
|
if (!writing) {
|
|
58575
59793
|
setVisibleCode(code);
|
|
58576
59794
|
onDone?.();
|
|
@@ -58617,7 +59835,7 @@ function CodeBlock({
|
|
|
58617
59835
|
clearInterval(intervalId);
|
|
58618
59836
|
};
|
|
58619
59837
|
}, [code, duration, delay2, isInView, writing, onDone, onWrite, localRef]);
|
|
58620
|
-
|
|
59838
|
+
React10.useEffect(() => {
|
|
58621
59839
|
if (!writing || !isInView) return;
|
|
58622
59840
|
const el = scrollContainerRef?.current ?? localRef.current?.parentElement ?? localRef.current;
|
|
58623
59841
|
if (!el) return;
|
|
@@ -58654,7 +59872,7 @@ function Code({
|
|
|
58654
59872
|
}) {
|
|
58655
59873
|
const showCopyButton = copyButton !== false && (copyButton === true || copyButton === void 0 && Boolean(lang));
|
|
58656
59874
|
const showHeader = fileName !== void 0 || showCopyButton;
|
|
58657
|
-
const scrollRef =
|
|
59875
|
+
const scrollRef = React10.useRef(null);
|
|
58658
59876
|
return /* @__PURE__ */ jsxs(
|
|
58659
59877
|
"div",
|
|
58660
59878
|
{
|
|
@@ -58703,9 +59921,9 @@ function Code({
|
|
|
58703
59921
|
}
|
|
58704
59922
|
);
|
|
58705
59923
|
}
|
|
58706
|
-
var MonospaceContent =
|
|
59924
|
+
var MonospaceContent = React10.forwardRef(
|
|
58707
59925
|
function MonospaceContent2({ title, value: value2, color = "info", mask: mask2 = false, allowUnmask = true, className }, ref) {
|
|
58708
|
-
const [revealed, setRevealed] =
|
|
59926
|
+
const [revealed, setRevealed] = React10.useState(false);
|
|
58709
59927
|
const canUnmask = mask2 && allowUnmask;
|
|
58710
59928
|
const masked = mask2 && !(canUnmask && revealed);
|
|
58711
59929
|
const unmaskToggle = canUnmask ? /* @__PURE__ */ jsxs(
|
|
@@ -60074,7 +61292,7 @@ function SimplePaginatedList({
|
|
|
60074
61292
|
] }) : null
|
|
60075
61293
|
] });
|
|
60076
61294
|
}
|
|
60077
|
-
var ToastDefaultVariantContext =
|
|
61295
|
+
var ToastDefaultVariantContext = React10.createContext(void 0);
|
|
60078
61296
|
var typeIconMap2 = {
|
|
60079
61297
|
error: /* @__PURE__ */ jsx(CircleX, { className: "h-4 w-4" }),
|
|
60080
61298
|
info: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" }),
|
|
@@ -60093,7 +61311,7 @@ function defaultIconFromColor2(color) {
|
|
|
60093
61311
|
return type != null ? typeIconMap2[type] : void 0;
|
|
60094
61312
|
}
|
|
60095
61313
|
function isToastProps(input) {
|
|
60096
|
-
return input != null && typeof input === "object" && !
|
|
61314
|
+
return input != null && typeof input === "object" && !React10.isValidElement(input) && ("title" in input || "children" in input || "type" in input || "color" in input || "icon" in input || "hideIcon" in input || "action" in input || "variant" in input);
|
|
60097
61315
|
}
|
|
60098
61316
|
function normalizeToastInput(input, type) {
|
|
60099
61317
|
if (isToastProps(input)) {
|
|
@@ -60117,7 +61335,7 @@ function resolveToastOptions(props, options) {
|
|
|
60117
61335
|
closeButton: options?.closeButton
|
|
60118
61336
|
};
|
|
60119
61337
|
}
|
|
60120
|
-
var Toast =
|
|
61338
|
+
var Toast = React10.forwardRef(
|
|
60121
61339
|
({
|
|
60122
61340
|
icon,
|
|
60123
61341
|
title,
|
|
@@ -60129,7 +61347,7 @@ var Toast = React8.forwardRef(
|
|
|
60129
61347
|
action,
|
|
60130
61348
|
className
|
|
60131
61349
|
}, ref) => {
|
|
60132
|
-
const defaultVariantFromToaster =
|
|
61350
|
+
const defaultVariantFromToaster = React10.useContext(
|
|
60133
61351
|
ToastDefaultVariantContext
|
|
60134
61352
|
);
|
|
60135
61353
|
const resolvedVariant = variant ?? defaultVariantFromToaster ?? "soft";
|
|
@@ -60176,7 +61394,7 @@ var Toast = React8.forwardRef(
|
|
|
60176
61394
|
}
|
|
60177
61395
|
);
|
|
60178
61396
|
Toast.displayName = "Toast";
|
|
60179
|
-
var Toaster =
|
|
61397
|
+
var Toaster = React10.forwardRef(
|
|
60180
61398
|
({
|
|
60181
61399
|
position: position2 = "top-right",
|
|
60182
61400
|
closeButton = true,
|
|
@@ -60305,9 +61523,9 @@ function createMarkdownComponents({
|
|
|
60305
61523
|
}
|
|
60306
61524
|
var REMARK_PLUGINS = [remarkGfm];
|
|
60307
61525
|
var REHYPE_PLUGINS = [rehypeSlug];
|
|
60308
|
-
var MarkdownContent =
|
|
61526
|
+
var MarkdownContent = React10.forwardRef(
|
|
60309
61527
|
function MarkdownContent2({ content: content3, linkComponent, colorTheme, className }, ref) {
|
|
60310
|
-
const components =
|
|
61528
|
+
const components = React10.useMemo(
|
|
60311
61529
|
() => createMarkdownComponents({ linkComponent, colorTheme }),
|
|
60312
61530
|
[linkComponent, colorTheme]
|
|
60313
61531
|
);
|
|
@@ -60403,7 +61621,7 @@ function FullscreenDialog({
|
|
|
60403
61621
|
closeOnEscape = true,
|
|
60404
61622
|
noGutters = false
|
|
60405
61623
|
}) {
|
|
60406
|
-
const
|
|
61624
|
+
const sizeClasses3 = iconSizeMap[iconSize];
|
|
60407
61625
|
return /* @__PURE__ */ jsx(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsx(
|
|
60408
61626
|
DialogContent2,
|
|
60409
61627
|
{
|
|
@@ -60431,9 +61649,9 @@ function FullscreenDialog({
|
|
|
60431
61649
|
{
|
|
60432
61650
|
className: cn(
|
|
60433
61651
|
"shrink-0 rounded-full mx-auto mb-4",
|
|
60434
|
-
|
|
61652
|
+
sizeClasses3.avatar
|
|
60435
61653
|
),
|
|
60436
|
-
children: /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-full bg-accent/80", children: /* @__PURE__ */ jsx("span", { className:
|
|
61654
|
+
children: /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-full bg-accent/80", children: /* @__PURE__ */ jsx("span", { className: sizeClasses3.icon, children: icon }) })
|
|
60437
61655
|
}
|
|
60438
61656
|
),
|
|
60439
61657
|
heading != null && /* @__PURE__ */ jsx("h1", { className: "text-2xl mb-4 font-normal text-center text-muted-foreground shrink-0", children: heading }),
|
|
@@ -65869,7 +67087,7 @@ function strokeResolvedStyle(color, opacity) {
|
|
|
65869
67087
|
return { stroke: mix };
|
|
65870
67088
|
}
|
|
65871
67089
|
var labelTypographyClass = "whitespace-nowrap text-center leading-none font-semibold tracking-tight tabular-nums";
|
|
65872
|
-
var CircularProgress =
|
|
67090
|
+
var CircularProgress = React10.forwardRef(
|
|
65873
67091
|
function CircularProgress2({
|
|
65874
67092
|
value: value2,
|
|
65875
67093
|
showPercentage = false,
|
|
@@ -65997,13 +67215,13 @@ function CountingNumber({
|
|
|
65997
67215
|
const decimals = typeof decimalPlaces === "number" ? decimalPlaces : numberStr.includes(".") ? numberStr.split(".")[1]?.length ?? 0 : 0;
|
|
65998
67216
|
const motionVal = useMotionValue(initiallyStable ? number : fromNumber);
|
|
65999
67217
|
const springVal = useSpring(motionVal, transition);
|
|
66000
|
-
|
|
67218
|
+
React10.useEffect(() => {
|
|
66001
67219
|
const timeoutId = setTimeout(() => {
|
|
66002
67220
|
if (isInView) motionVal.set(number);
|
|
66003
67221
|
}, delay2);
|
|
66004
67222
|
return () => clearTimeout(timeoutId);
|
|
66005
67223
|
}, [isInView, number, motionVal, delay2]);
|
|
66006
|
-
|
|
67224
|
+
React10.useEffect(() => {
|
|
66007
67225
|
const unsubscribe = springVal.on("change", (latest) => {
|
|
66008
67226
|
if (localRef.current) {
|
|
66009
67227
|
let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();
|
|
@@ -66147,9 +67365,9 @@ function ProgressBar({
|
|
|
66147
67365
|
className,
|
|
66148
67366
|
...props
|
|
66149
67367
|
}) {
|
|
66150
|
-
const [fakeValue, setFakeValue] =
|
|
66151
|
-
const intervalRef =
|
|
66152
|
-
|
|
67368
|
+
const [fakeValue, setFakeValue] = React10.useState(FAKE_PROGRESS_MIN);
|
|
67369
|
+
const intervalRef = React10.useRef(null);
|
|
67370
|
+
React10.useEffect(() => {
|
|
66153
67371
|
if (!showFakeProgress) return;
|
|
66154
67372
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
66155
67373
|
setFakeValue(FAKE_PROGRESS_MIN);
|
|
@@ -66281,7 +67499,7 @@ function trailingChevronRow(options) {
|
|
|
66281
67499
|
}
|
|
66282
67500
|
);
|
|
66283
67501
|
}
|
|
66284
|
-
var SimpleClickableCard =
|
|
67502
|
+
var SimpleClickableCard = React10.forwardRef(
|
|
66285
67503
|
({
|
|
66286
67504
|
icon,
|
|
66287
67505
|
leadingIcon,
|
|
@@ -66437,7 +67655,7 @@ function infoTriggerIconFgClass(variant, cardColor, infoButtonColor) {
|
|
|
66437
67655
|
}
|
|
66438
67656
|
return INFO_ICON_FG_CLASS[infoButtonColor];
|
|
66439
67657
|
}
|
|
66440
|
-
var SimpleInfoCard =
|
|
67658
|
+
var SimpleInfoCard = React10.forwardRef(
|
|
66441
67659
|
({
|
|
66442
67660
|
icon,
|
|
66443
67661
|
title,
|
|
@@ -66577,7 +67795,7 @@ var maxWidthClasses = {
|
|
|
66577
67795
|
lg: "max-w-5xl",
|
|
66578
67796
|
xl: "max-w-7xl"
|
|
66579
67797
|
};
|
|
66580
|
-
var ContentContainer =
|
|
67798
|
+
var ContentContainer = React10.forwardRef(
|
|
66581
67799
|
function ContentContainer2({ maxWidth, children, className, noGutters = false }, ref) {
|
|
66582
67800
|
return /* @__PURE__ */ jsx(
|
|
66583
67801
|
"div",
|
|
@@ -66621,7 +67839,7 @@ function PageContainer({
|
|
|
66621
67839
|
const showStickyHeader = showBackLink || hasContainerHeading;
|
|
66622
67840
|
const backLabel = goBackLinkData?.label ?? "Back";
|
|
66623
67841
|
const backHref = goBackLinkData?.href;
|
|
66624
|
-
const LinkComponent = goBackLinkData?.
|
|
67842
|
+
const LinkComponent = goBackLinkData?.linkComponent;
|
|
66625
67843
|
return /* @__PURE__ */ jsx(
|
|
66626
67844
|
"div",
|
|
66627
67845
|
{
|
|
@@ -66646,7 +67864,7 @@ function PageContainer({
|
|
|
66646
67864
|
{
|
|
66647
67865
|
className: cn(
|
|
66648
67866
|
"flex flex-col gap-2",
|
|
66649
|
-
"sticky top-0 z-11 bg-background",
|
|
67867
|
+
"sticky top-0 z-11 bg-background/75 backdrop-blur-xs",
|
|
66650
67868
|
elevateHeading && "shadow-md shadow-accent/30"
|
|
66651
67869
|
),
|
|
66652
67870
|
children: [
|
|
@@ -66751,4 +67969,4 @@ lottie-react/build/index.es.js:
|
|
|
66751
67969
|
(*! goToAndStop must be relative to the start of the current segment *)
|
|
66752
67970
|
*/
|
|
66753
67971
|
|
|
66754
|
-
export { Accordion3 as Accordion, AdvancedSearchBox, Alert, AnimatedCard, AnimatedRainmakerLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, BarChart, BasicDetailsCard, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Carousel2 as Carousel, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox2 as Checkbox, CircularProgress, Code, CollapsibleCard, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, DatePicker, DateRangePicker, DeviceIcon, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter2 as DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger2 as DialogTrigger, DonutChart, DynamicList, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, IconAvatar, IconTextActionCard, Illustration, InlineError, InputOTP, InputOTPSeparator, KeyValueManager, LineChart, ListDetails, LottieAnimationContainer, MarkdownContent, MonospaceContent, OverflowBadgeList, PRESET_IDS, PRESET_LABELS, PageContainer, PageContainerSkeleton, Pagination, PopCollectionItem, PreviewCard2 as PreviewCard, PreviewCardBackdrop2 as PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger2 as PreviewCardTrigger, ProgressBar, RadioGroup3 as RadioGroup, RequirementList, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Spinner, StatCard, StatusBadge, StatusCardList, Switch2 as Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsContents2 as TabsContents, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Tag, TagInput, Textarea, TimePicker, Toast, Toaster, TogglableItemsList, ToggleGroup2 as ToggleGroup, ToggleGroupItem2 as ToggleGroupItem, TransferList, TreemapChart, Typography, UserTypeBadge, VerificationInProgress, VerticalStepper, animatedCardAnimations, animatedCardTypeKeys, buildSeriesChartConfig, computeDateRange, getChartSeriesColor, illustrationRegistry, illustrationsById, no_data_card_default, parseSvgViewBoxAspectRatio, statusBadgeSizeVariants, toast, typographyDefaultElement, typographyVariantClasses, useFormField, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|
|
67972
|
+
export { Accordion3 as Accordion, AdvancedSearchBox, Alert, AnimatedCard, AnimatedRainmakerLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, BarChart, BasicDetailsCard, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Carousel2 as Carousel, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox2 as Checkbox, CircularProgress, Code, CollapsibleCard, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, DatePicker, DateRangePicker, DeviceIcon, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter2 as DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger2 as DialogTrigger, DonutChart, DynamicList, FileInput, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, IconAvatar, IconTextActionCard, Illustration, InlineError, InputOTP, InputOTPSeparator, KeyValueManager, LineChart, ListDetails, LottieAnimationContainer, MarkdownContent, MonospaceContent, NavBar, OverflowBadgeList, PRESET_IDS, PRESET_LABELS, PageContainer, PageContainerSkeleton, Pagination, PopCollectionItem, PreviewCard2 as PreviewCard, PreviewCardBackdrop2 as PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger2 as PreviewCardTrigger, ProgressBar, RadioGroup3 as RadioGroup, RequirementList, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Spinner, StatCard, StatusBadge, StatusCardList, Switch2 as Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsContents2 as TabsContents, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Tag, TagInput, Textarea, TimePicker, Toast, Toaster, TogglableItemsList, ToggleGroup2 as ToggleGroup, ToggleGroupItem2 as ToggleGroupItem, TransferList, TreemapChart, Typography, UserTypeBadge, VerificationInProgress, VerticalStepper, animatedCardAnimations, animatedCardTypeKeys, buildSeriesChartConfig, computeDateRange, getChartSeriesColor, illustrationRegistry, illustrationsById, no_data_card_default, parseSvgViewBoxAspectRatio, statusBadgeSizeVariants, toast, typographyDefaultElement, typographyVariantClasses, useFormField, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|