@espressif/dashboard-ui-components 1.2.2 → 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.
Files changed (34) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +15 -6
  3. package/dist/{app-logo.props-TKCDuodn.d.ts → app-logo.props-Ct7QBdTd.d.ts} +1 -1
  4. package/dist/{chunk-F5P6S7K2.js → chunk-7BO76CNB.js} +75 -14
  5. package/dist/{chunk-JPMN2UMF.js → chunk-KCMVLNM5.js} +12 -12
  6. package/dist/{chunk-YWRID3U3.js → chunk-O5BFYRPY.js} +1541 -339
  7. package/dist/{chunk-XDY5H3S3.js → chunk-RCRU3JW2.js} +40 -28
  8. package/dist/{chunk-IEHT62YM.js → chunk-RKAFXJRD.js} +3 -3
  9. package/dist/{chunk-4J5RO6E2.js → chunk-TSNA6BHK.js} +30 -8
  10. package/dist/{chunk-KGOWRVSU.js → chunk-UHRNPXO5.js} +404 -225
  11. package/dist/common/index.d.ts +4 -4
  12. package/dist/common/index.js +6 -6
  13. package/dist/components/index.d.ts +201 -13
  14. package/dist/components/index.js +4 -4
  15. package/dist/core/index.d.ts +2 -2
  16. package/dist/core/index.js +2 -2
  17. package/dist/{index-Cv9vHALn.d.ts → index-BQANnKs9.d.ts} +1 -1
  18. package/dist/index.d.ts +6 -6
  19. package/dist/index.js +7 -7
  20. package/dist/layouts/index.d.ts +20 -7
  21. package/dist/layouts/index.js +4 -4
  22. package/dist/{list.props-DBDJt4C1.d.ts → list.props-x1j3CbcF.d.ts} +1 -1
  23. package/dist/{popover-CRznb4Q7.d.ts → popover-ByLD3-Qv.d.ts} +21 -3
  24. package/dist/{types-4i2wWAqP.d.ts → types-DtUxK-Am.d.ts} +2 -2
  25. package/dist/utils/index.d.ts +1 -1
  26. package/package.json +4 -1
  27. package/src/assets/logos/launchpad/launchpad-no-text-dm.svg +1 -0
  28. package/src/assets/logos/launchpad/launchpad-no-text.svg +1 -1
  29. package/src/assets/logos/launchpad/launchpad-with-text-dm.svg +1 -1
  30. package/src/assets/logos/launchpad/launchpad-with-text.svg +46 -1
  31. package/src/assets/logos/zerocode-ai/zerocode-ai-no-text.svg +1 -0
  32. package/src/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.svg +186 -0
  33. package/src/assets/logos/zerocode-ai/zerocode-ai-with-text.svg +246 -0
  34. 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-JPMN2UMF.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, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem } from './chunk-KGOWRVSU.js';
3
- import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, Skeleton, Avatar, AvatarFallback, useControlledState } from './chunk-F5P6S7K2.js';
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 React8 from 'react';
8
- import React8__default, { forwardRef, useMemo, isValidElement, useRef, useState, useCallback, useLayoutEffect, useEffect, useId, Fragment as Fragment$1, Children, cloneElement, createElement } from 'react';
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 * as SelectPrimitive from '@radix-ui/react-select';
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] = React8.useState(
16305
+ const [isOpen, setIsOpen] = React10.useState(
16306
16306
  value2?.includes(props?.value) ?? false
16307
16307
  );
16308
- React8.useEffect(() => {
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 = React8.forwardRef(
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 = React8.Children.toArray(children);
16676
+ const childArray = React10.Children.toArray(children);
16677
16677
  const contentChild = childArray.find(
16678
- (child) => React8.isValidElement(child) && child.type === CollapsibleContent
16678
+ (child) => React10.isValidElement(child) && child.type === CollapsibleContent
16679
16679
  );
16680
16680
  const titleChild = childArray.find(
16681
- (child) => React8.isValidElement(child) && child.type !== CollapsibleContent
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 && React8.cloneElement(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__ */ React8__default.createElement("div", _objectSpread2({
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 = React8.forwardRef(({ className, children, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
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 = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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 = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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 = React8.forwardRef(({ className, children, position: position2 = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
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 = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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 = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
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 = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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] = React8.useState(
48776
+ const [activeValue, setActiveValue] = React10.useState(
47924
48777
  defaultValue
47925
48778
  );
47926
- const triggersRef = React8.useRef(/* @__PURE__ */ new Map());
47927
- const initialSet = React8.useRef(false);
48779
+ const triggersRef = React10.useRef(/* @__PURE__ */ new Map());
48780
+ const initialSet = React10.useRef(false);
47928
48781
  const isControlled = value2 !== void 0;
47929
- React8.useEffect(() => {
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useRef(null);
48002
- React8.useImperativeHandle(ref, () => localRef.current);
48003
- React8.useEffect(() => {
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 = React8.Children.toArray(children);
48885
+ const childrenArray = React10.Children.toArray(children);
48033
48886
  const activeIndex = childrenArray.findIndex(
48034
- (child) => React8.isValidElement(child) && typeof child.props === "object" && child.props !== null && "value" in child.props && child.props.value === activeValue
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 = React8.useRef(null);
48037
- const itemRefs = React8.useRef([]);
48038
- const [height2, setHeight] = React8.useState(0);
48039
- const roRef = React8.useRef(null);
48040
- const measure = React8.useCallback((index2) => {
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
- React8.useEffect(() => {
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
- React8.useLayoutEffect(() => {
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 = React8.createContext(void 0);
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 = React8.useContext(TabsListVariantContext);
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 (React8.isValidElement(children) && children.props && typeof children.props === "object" && children.props !== null && "children" in children.props) {
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 React8.isValidElement(node) && node.type === ScrollableSectionsTab;
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
- React8.Children.forEach(children, (child) => {
48264
- if (!React8.isValidElement(child)) return;
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 = React8.createContext(null);
49128
+ var ScrollableSectionsContext = React10.createContext(null);
48276
49129
  function useScrollableSections() {
48277
- const ctx = React8.useContext(ScrollableSectionsContext);
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] = React8.useState([]);
48325
- const [sectionsVersion, bumpSections] = React8.useReducer(
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 = React8.useRef(/* @__PURE__ */ new Map());
48330
- const containerRef = React8.useRef(null);
48331
- const mobileNavRef = React8.useRef(null);
48332
- const ignoreSpyUntil = React8.useRef(0);
48333
- const prefersReducedMotionRef = React8.useRef(false);
48334
- const didDefaultScrollRef = React8.useRef(false);
48335
- const [activeId, setActiveId] = React8.useState(() => defaultValue ?? "");
48336
- React8.useEffect(() => {
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback(
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
- React8.useLayoutEffect(() => {
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
- React8.useEffect(() => {
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 = React8.useMemo(
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 = React8.useMemo(
48495
- () => React8.Children.toArray(children).filter(isTabElement),
49347
+ const tabNodes = React10.useMemo(
49348
+ () => React10.Children.toArray(children).filter(isTabElement),
48496
49349
  [children]
48497
49350
  );
48498
- const items = React8.useMemo(
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
- React8.useLayoutEffect(() => {
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 = React8.useCallback(
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 = React8.createContext(null);
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 = React8.useContext(FormFieldContext);
48612
- const itemContext = React8.useContext(FormItemContext);
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 = React8.createContext(null);
48632
- var FormItem = React8.forwardRef(({ className, ...props }, ref) => {
48633
- const id = React8.useId();
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 = React8.forwardRef(({ className, ...props }, ref) => {
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 = React8.forwardRef(({ ...props }, ref) => {
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 = React8.forwardRef(({ className, ...props }, ref) => {
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 = React8.forwardRef(({ className, children, ...props }, ref) => {
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 = React8.forwardRef(
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 React8.createElement(
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 = React8.forwardRef(
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 = React8.useId();
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 = React8.useRef(null);
49024
- const filesRef = React8.useRef([]);
49025
- const dragDepthRef = React8.useRef(0);
49026
- const [internalFiles, setInternalFiles] = React8.useState([]);
49027
- const [isDragging, setIsDragging] = React8.useState(false);
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
- React8.useLayoutEffect(() => {
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback(
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 = React8.useCallback((e) => {
49976
+ const onDragOver = React10.useCallback((e) => {
49124
49977
  e.preventDefault();
49125
49978
  e.stopPropagation();
49126
49979
  }, []);
49127
- const onDrop = React8.useCallback(
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 = React8.useCallback(() => {
49993
+ const openFileDialog = React10.useCallback(() => {
49141
49994
  if (disabled) return;
49142
49995
  innerRef.current?.click();
49143
49996
  }, [disabled]);
49144
- const onDropZoneKeyDown = React8.useCallback(
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 React8.useCallback(composeRefs(...refs), refs);
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 = React8.createContext(defaultContext);
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 = React8.useMemo(() => context, Object.values(context));
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 = React8.useContext(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 React8.createContext(defaultContext);
50526
+ return React10.createContext(defaultContext);
49341
50527
  });
49342
50528
  return function useScope(scope) {
49343
50529
  const contexts = scope?.[scopeName] || scopeContexts;
49344
- return React8.useMemo(
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 React8.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
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 ? React8.useLayoutEffect : () => {
50567
+ var useLayoutEffect22 = globalThis?.document ? React10.useLayoutEffect : () => {
49382
50568
  };
49383
- var useInsertionEffect = React8[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
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 = React8.useRef(prop !== void 0);
49399
- React8.useEffect(() => {
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 = React8.useCallback(
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] = React8.useState(defaultProp);
49431
- const prevValueRef = React8.useRef(value2);
49432
- const onChangeRef = React8.useRef(onChange);
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
- React8.useEffect(() => {
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 = React8.useRef({ value: value2, previous: value2 });
49449
- return React8.useMemo(() => {
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] = React8.useState(void 0);
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 React8.useReducer((state, event) => {
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 }) : React8.Children.only(children);
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 ? React8.cloneElement(child, { ref }) : null;
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] = React8.useState();
49508
- const stylesRef = React8.useRef(null);
49509
- const prevPresentRef = React8.useRef(present);
49510
- const prevAnimationNameRef = React8.useRef("none");
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
- React8.useEffect(() => {
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: React8.useCallback((node2) => {
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 = React8.useRef(refs);
50791
+ const refsRef = React10.useRef(refs);
49606
50792
  refsRef.current = refs;
49607
- return React8.useCallback((node) => {
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 = React8.forwardRef((props, forwardedRef) => {
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] = React8.useState(null);
49704
- const [bubbleInput, setBubbleInput] = React8.useState(null);
49705
- const hasConsumerStoppedPropagationRef = React8.useRef(false);
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 = React8.forwardRef(
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 = React8.useRef(checked);
49752
- React8.useEffect(() => {
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 = React8.forwardRef(
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 = React8.forwardRef(
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 = React8.forwardRef(
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
- React8.useEffect(() => {
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 = React8.useRef(isIndeterminate(checked) ? false : checked);
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] = React8.useState(
51127
+ const [checkedState, setCheckedState] = React10.useState(
49942
51128
  props?.checked ?? props?.defaultChecked ?? false
49943
51129
  );
49944
- React8.useEffect(() => {
51130
+ React10.useEffect(() => {
49945
51131
  if (props?.checked !== void 0) setCheckedState(props.checked);
49946
51132
  }, [props?.checked]);
49947
- const handleCheckedChange = React8.useCallback(
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] = React8.useState(false);
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 = React8.useMemo(() => {
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" && React8.isValidElement(children)) {
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 React8.cloneElement(
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 = React8.useMemo(
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] = React8.useState(value2 === valueProps);
50494
- React8.useEffect(() => {
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 = React8.forwardRef(function Spinner2({
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 (React8.isValidElement(icon)) {
52818
+ if (React10.isValidElement(icon)) {
51633
52819
  const el = icon;
51634
- return React8.cloneElement(el, {
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 = React8.forwardRef(
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 = React8.createContext(null);
52985
+ var ChartContext = React10.createContext(null);
51800
52986
  function useChart() {
51801
- const context = React8.useContext(ChartContext);
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 = React8.forwardRef(function ChartContainer2({
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 = React8.useId();
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 = React8.useMemo(() => {
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 = React8.forwardRef(
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 = React8.useMemo(
53397
+ const resolvedCategoryKey = React10.useMemo(
52212
53398
  () => categoryKey ?? inferCategoryKey(data2[0]),
52213
53399
  [categoryKey, data2]
52214
53400
  );
52215
- const config = React8.useMemo(
53401
+ const config = React10.useMemo(
52216
53402
  () => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
52217
53403
  [data2, resolvedCategoryKey, explicitConfig]
52218
53404
  );
52219
- const barKeys = React8.useMemo(() => Object.keys(config), [config]);
52220
- const chartData = React8.useMemo(
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 = React8.forwardRef(
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 = React8.useMemo(
53497
+ const resolvedCategoryKey = React10.useMemo(
52312
53498
  () => categoryKey ?? inferCategoryKey(data2[0]),
52313
53499
  [categoryKey, data2]
52314
53500
  );
52315
- const config = React8.useMemo(
53501
+ const config = React10.useMemo(
52316
53502
  () => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
52317
53503
  [data2, resolvedCategoryKey, explicitConfig]
52318
53504
  );
52319
- const seriesKeys = React8.useMemo(() => Object.keys(config), [config]);
52320
- const chartData = React8.useMemo(
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 = React8.useId();
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 = React8.forwardRef(
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 = React8.useMemo(
53661
+ const resolvedCategoryKey = React10.useMemo(
52476
53662
  () => categoryKey ?? inferCategoryKey(data2[0]),
52477
53663
  [categoryKey, data2]
52478
53664
  );
52479
- const config = React8.useMemo(
53665
+ const config = React10.useMemo(
52480
53666
  () => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
52481
53667
  [data2, resolvedCategoryKey, explicitConfig]
52482
53668
  );
52483
- const seriesKeys = React8.useMemo(() => Object.keys(config), [config]);
53669
+ const seriesKeys = React10.useMemo(() => Object.keys(config), [config]);
52484
53670
  const resolvedStrokeWidth = resolveStrokeWidth(strokeWidth);
52485
- const processedData = React8.useMemo(() => {
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 = React8.useMemo(
53687
+ const glowOrderKeys = React10.useMemo(
52502
53688
  () => stacked ? [...seriesKeys].reverse() : seriesKeys,
52503
53689
  [seriesKeys, stacked]
52504
53690
  );
52505
- const reactId = React8.useId();
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 = React8.forwardRef(
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 = React8.useMemo(
53875
+ const resolvedCategoryKey = React10.useMemo(
52690
53876
  () => categoryKey ?? inferCategoryKey(data2[0]),
52691
53877
  [categoryKey, data2]
52692
53878
  );
52693
- const config = React8.useMemo(
53879
+ const config = React10.useMemo(
52694
53880
  () => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
52695
53881
  [data2, resolvedCategoryKey, explicitConfig]
52696
53882
  );
52697
- const series = React8.useMemo(
53883
+ const series = React10.useMemo(
52698
53884
  () => explicitSeries ?? buildDefaultSeries(config),
52699
53885
  [explicitSeries, config]
52700
53886
  );
52701
- const seriesKeys = React8.useMemo(
53887
+ const seriesKeys = React10.useMemo(
52702
53888
  () => series.map((item) => item.dataKey),
52703
53889
  [series]
52704
53890
  );
52705
- const chartData = React8.useMemo(
53891
+ const chartData = React10.useMemo(
52706
53892
  () => coerceSeriesValuesToNumbers(data2, seriesKeys),
52707
53893
  [data2, seriesKeys]
52708
53894
  );
52709
- const barSeries = React8.useMemo(
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 = React8.forwardRef(
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 = React8.useId();
54132
+ const rawId = React10.useId();
52947
54133
  const gradientScope = rawId.replace(/:/g, "");
52948
- const config = React8.useMemo(
54134
+ const config = React10.useMemo(
52949
54135
  () => deriveConfig(data2, explicitConfig),
52950
54136
  [data2, explicitConfig]
52951
54137
  );
52952
- const twoRing = React8.useMemo(() => hasChildren(data2), [data2]);
52953
- const outerRing = React8.useMemo(
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
- React8.useEffect(() => {
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 = React8.useMemo(() => flattenKeys(data2), [data2]);
52967
- const uniqueKeys = React8.useMemo(
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 = React8.forwardRef(
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 = React8.useId();
54430
+ const rawId = React10.useId();
53245
54431
  const gradientScope = rawId.replace(/:/g, "");
53246
- const resolvedLabelStyle = React8.useMemo(
54432
+ const resolvedLabelStyle = React10.useMemo(
53247
54433
  () => ({ ...DEFAULT_LABEL_STYLE, ...labelStyle }),
53248
54434
  [labelStyle]
53249
54435
  );
53250
- const sortedData = React8.useMemo(() => {
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 = React8.useMemo(
54443
+ const config = React10.useMemo(
53258
54444
  () => deriveConfig2(sortedData, explicitConfig),
53259
54445
  [sortedData, explicitConfig]
53260
54446
  );
53261
- const uniqueKeys = React8.useMemo(
54447
+ const uniqueKeys = React10.useMemo(
53262
54448
  () => Array.from(new Set(sortedData.map((d) => d.key))),
53263
54449
  [sortedData]
53264
54450
  );
53265
- const colorByKey = React8.useMemo(() => {
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 = React8.useMemo(() => {
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 = React8.useMemo(
54479
+ const treemapData = React10.useMemo(
53294
54480
  () => sortedData.map((d) => ({
53295
54481
  ...d,
53296
54482
  name: d.key,
@@ -53392,7 +54578,7 @@ var slotExpandedSizeClasses = {
53392
54578
  default: "h-10 text-base md:text-sm",
53393
54579
  lg: "h-12 text-lg"
53394
54580
  };
53395
- var InputOTPSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54581
+ var InputOTPSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
53396
54582
  "div",
53397
54583
  {
53398
54584
  ref,
@@ -53412,7 +54598,7 @@ var SlotBox = ({
53412
54598
  hasError,
53413
54599
  cornerClass
53414
54600
  }) => {
53415
- const context = React8.useContext(OTPInputContext);
54601
+ const context = React10.useContext(OTPInputContext);
53416
54602
  const slot = context.slots[index2];
53417
54603
  if (!slot) return null;
53418
54604
  const { char, hasFakeCaret, isActive } = slot;
@@ -53477,7 +54663,7 @@ function clampLength(raw) {
53477
54663
  }
53478
54664
  return rounded;
53479
54665
  }
53480
- var InputOTP = React8.forwardRef(
54666
+ var InputOTP = React10.forwardRef(
53481
54667
  ({
53482
54668
  length: length2,
53483
54669
  allowAlphaNumeric,
@@ -53506,17 +54692,17 @@ var InputOTP = React8.forwardRef(
53506
54692
  containerClassName,
53507
54693
  ...restProps
53508
54694
  }, ref) => {
53509
- const autoId = React8.useId();
54695
+ const autoId = React10.useId();
53510
54696
  const inputId = id || autoId;
53511
- const effectiveLength = React8.useMemo(() => clampLength(length2), [length2]);
54697
+ const effectiveLength = React10.useMemo(() => clampLength(length2), [length2]);
53512
54698
  const effectiveSize = size || "default";
53513
54699
  const hasError = !!error || !!errorContent;
53514
54700
  const isControlled = value2 !== void 0;
53515
- const [uncontrolledValue, setUncontrolledValue] = React8.useState(
54701
+ const [uncontrolledValue, setUncontrolledValue] = React10.useState(
53516
54702
  typeof defaultValue === "string" ? defaultValue : ""
53517
54703
  );
53518
54704
  const effectiveValue = isControlled ? value2 : uncontrolledValue;
53519
- const handleChange = React8.useCallback(
54705
+ const handleChange = React10.useCallback(
53520
54706
  (next) => {
53521
54707
  if (!isControlled) setUncontrolledValue(next);
53522
54708
  onChange?.(next);
@@ -53524,7 +54710,7 @@ var InputOTP = React8.forwardRef(
53524
54710
  [isControlled, onChange]
53525
54711
  );
53526
54712
  const pattern = regex && regex.length > 0 ? regex : allowAlphaNumeric ? REGEXP_ONLY_DIGITS_AND_CHARS : REGEXP_ONLY_DIGITS;
53527
- const groups = React8.useMemo(
54713
+ const groups = React10.useMemo(
53528
54714
  () => buildGroups(effectiveLength, separators),
53529
54715
  [effectiveLength, separators]
53530
54716
  );
@@ -53567,7 +54753,7 @@ var InputOTP = React8.forwardRef(
53567
54753
  containerClassName
53568
54754
  ),
53569
54755
  ...restProps,
53570
- children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React8.Fragment, { children: [
54756
+ children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React10.Fragment, { children: [
53571
54757
  groupIndex > 0 && /* @__PURE__ */ jsx(InputOTPSeparator, {}),
53572
54758
  /* @__PURE__ */ jsx(
53573
54759
  "div",
@@ -53613,15 +54799,15 @@ var InputOTP = React8.forwardRef(
53613
54799
  }
53614
54800
  );
53615
54801
  InputOTP.displayName = "InputOTP";
53616
- var CarouselContext = React8.createContext(null);
54802
+ var CarouselContext = React10.createContext(null);
53617
54803
  function useCarousel() {
53618
- const context = React8.useContext(CarouselContext);
54804
+ const context = React10.useContext(CarouselContext);
53619
54805
  if (!context) {
53620
54806
  throw new Error("useCarousel must be used within a <Carousel />");
53621
54807
  }
53622
54808
  return context;
53623
54809
  }
53624
- var Carousel = React8.forwardRef(
54810
+ var Carousel = React10.forwardRef(
53625
54811
  ({
53626
54812
  orientation = "horizontal",
53627
54813
  opts,
@@ -53638,20 +54824,20 @@ var Carousel = React8.forwardRef(
53638
54824
  },
53639
54825
  plugins
53640
54826
  );
53641
- const [canScrollPrev, setCanScrollPrev] = React8.useState(false);
53642
- const [canScrollNext, setCanScrollNext] = React8.useState(false);
53643
- const onSelect = React8.useCallback((api2) => {
54827
+ const [canScrollPrev, setCanScrollPrev] = React10.useState(false);
54828
+ const [canScrollNext, setCanScrollNext] = React10.useState(false);
54829
+ const onSelect = React10.useCallback((api2) => {
53644
54830
  if (!api2) return;
53645
54831
  setCanScrollPrev(api2.canScrollPrev());
53646
54832
  setCanScrollNext(api2.canScrollNext());
53647
54833
  }, []);
53648
- const scrollPrev = React8.useCallback(() => {
54834
+ const scrollPrev = React10.useCallback(() => {
53649
54835
  api?.scrollPrev();
53650
54836
  }, [api]);
53651
- const scrollNext = React8.useCallback(() => {
54837
+ const scrollNext = React10.useCallback(() => {
53652
54838
  api?.scrollNext();
53653
54839
  }, [api]);
53654
- const handleKeyDown = React8.useCallback(
54840
+ const handleKeyDown = React10.useCallback(
53655
54841
  (event) => {
53656
54842
  const isHorizontal = orientation === "horizontal";
53657
54843
  const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
@@ -53666,11 +54852,11 @@ var Carousel = React8.forwardRef(
53666
54852
  },
53667
54853
  [scrollPrev, scrollNext, orientation]
53668
54854
  );
53669
- React8.useEffect(() => {
54855
+ React10.useEffect(() => {
53670
54856
  if (!api || !setApi) return;
53671
54857
  setApi(api);
53672
54858
  }, [api, setApi]);
53673
- React8.useEffect(() => {
54859
+ React10.useEffect(() => {
53674
54860
  if (!api) return;
53675
54861
  onSelect(api);
53676
54862
  api.on("reInit", onSelect);
@@ -53710,7 +54896,7 @@ var Carousel = React8.forwardRef(
53710
54896
  }
53711
54897
  );
53712
54898
  Carousel.displayName = "Carousel";
53713
- var CarouselContent = React8.forwardRef(({ className, ...props }, ref) => {
54899
+ var CarouselContent = React10.forwardRef(({ className, ...props }, ref) => {
53714
54900
  const { carouselRef, orientation } = useCarousel();
53715
54901
  return (
53716
54902
  // Vertical carousels need an explicit viewport height so overflow clips at
@@ -53741,7 +54927,7 @@ var CarouselContent = React8.forwardRef(({ className, ...props }, ref) => {
53741
54927
  );
53742
54928
  });
53743
54929
  CarouselContent.displayName = "CarouselContent";
53744
- var CarouselItem = React8.forwardRef(({ className, ...props }, ref) => {
54930
+ var CarouselItem = React10.forwardRef(({ className, ...props }, ref) => {
53745
54931
  const { orientation } = useCarousel();
53746
54932
  return /* @__PURE__ */ jsx(
53747
54933
  "div",
@@ -53759,7 +54945,7 @@ var CarouselItem = React8.forwardRef(({ className, ...props }, ref) => {
53759
54945
  );
53760
54946
  });
53761
54947
  CarouselItem.displayName = "CarouselItem";
53762
- var CarouselPrevious = React8.forwardRef(({ className, ...props }, ref) => {
54948
+ var CarouselPrevious = React10.forwardRef(({ className, ...props }, ref) => {
53763
54949
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
53764
54950
  return /* @__PURE__ */ jsxs(
53765
54951
  "button",
@@ -53783,7 +54969,7 @@ var CarouselPrevious = React8.forwardRef(({ className, ...props }, ref) => {
53783
54969
  );
53784
54970
  });
53785
54971
  CarouselPrevious.displayName = "CarouselPrevious";
53786
- var CarouselNext = React8.forwardRef(({ className, ...props }, ref) => {
54972
+ var CarouselNext = React10.forwardRef(({ className, ...props }, ref) => {
53787
54973
  const { orientation, scrollNext, canScrollNext } = useCarousel();
53788
54974
  return /* @__PURE__ */ jsxs(
53789
54975
  "button",
@@ -53887,10 +55073,10 @@ function Carousel2({
53887
55073
  MAX_DOTS_DEFAULT
53888
55074
  );
53889
55075
  const clampedDelay = clamp2(delay2, DELAY_MIN, DELAY_MAX, DELAY_DEFAULT);
53890
- const autoplayPlugin = React8.useRef(
55076
+ const autoplayPlugin = React10.useRef(
53891
55077
  autoplay ? Autoplay({ delay: clampedDelay, stopOnInteraction: true }) : null
53892
55078
  );
53893
- React8.useEffect(() => {
55079
+ React10.useEffect(() => {
53894
55080
  const plugin = autoplayPlugin.current;
53895
55081
  if (!plugin || !autoplay) return;
53896
55082
  autoplayPlugin.current = Autoplay({
@@ -53898,18 +55084,17 @@ function Carousel2({
53898
55084
  stopOnInteraction: true
53899
55085
  });
53900
55086
  }, [autoplay, clampedDelay]);
53901
- const plugins = React8.useMemo(
55087
+ const plugins = React10.useMemo(
53902
55088
  () => autoplay && autoplayPlugin.current ? [autoplayPlugin.current] : [],
53903
- // eslint-disable-next-line react-hooks/exhaustive-deps
53904
55089
  [autoplay, clampedDelay]
53905
55090
  );
53906
- const [api, setApi] = React8.useState();
53907
- const [selectedIndex, setSelectedIndex] = React8.useState(0);
53908
- const [scrollSnaps, setScrollSnaps] = React8.useState([]);
53909
- const [canScrollPrev, setCanScrollPrev] = React8.useState(false);
53910
- const [canScrollNext, setCanScrollNext] = React8.useState(false);
53911
- const prevIndexRef = React8.useRef(0);
53912
- React8.useEffect(() => {
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(() => {
53913
55098
  if (!api) return;
53914
55099
  setScrollSnaps(api.scrollSnapList());
53915
55100
  setSelectedIndex(api.selectedScrollSnap());
@@ -53946,12 +55131,12 @@ function Carousel2({
53946
55131
  api.off("reInit", handleReInit);
53947
55132
  };
53948
55133
  }, [api, loop, onNext, onPrevious]);
53949
- const scrollTo = React8.useCallback(
55134
+ const scrollTo = React10.useCallback(
53950
55135
  (index2) => api?.scrollTo(index2),
53951
55136
  [api]
53952
55137
  );
53953
- const scrollPrev = React8.useCallback(() => api?.scrollPrev(), [api]);
53954
- const scrollNext = React8.useCallback(() => api?.scrollNext(), [api]);
55138
+ const scrollPrev = React10.useCallback(() => api?.scrollPrev(), [api]);
55139
+ const scrollNext = React10.useCallback(() => api?.scrollNext(), [api]);
53955
55140
  const navigationState = {
53956
55141
  canScrollPrev,
53957
55142
  canScrollNext,
@@ -54010,12 +55195,12 @@ function Carousel2({
54010
55195
  );
54011
55196
  }
54012
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";
54013
- var sizeClasses = {
55198
+ var sizeClasses2 = {
54014
55199
  sm: "min-h-[60px] px-2 py-1.5 text-xs",
54015
55200
  default: "min-h-[80px] px-3 py-2 text-base md:text-sm",
54016
55201
  lg: "min-h-[100px] px-4 py-3 text-lg"
54017
55202
  };
54018
- var Textarea = React8.forwardRef(
55203
+ var Textarea = React10.forwardRef(
54019
55204
  ({
54020
55205
  className,
54021
55206
  label,
@@ -54032,15 +55217,15 @@ var Textarea = React8.forwardRef(
54032
55217
  placeholder,
54033
55218
  ...restProps
54034
55219
  }, ref) => {
54035
- const autoId = React8.useId();
55220
+ const autoId = React10.useId();
54036
55221
  const textareaId = id || autoId;
54037
- const [charCount, setCharCount] = React8.useState(() => {
55222
+ const [charCount, setCharCount] = React10.useState(() => {
54038
55223
  if (charLimit === void 0) return 0;
54039
55224
  if (typeof value2 === "string") return value2.length;
54040
55225
  if (typeof defaultValue === "string") return defaultValue.length;
54041
55226
  return 0;
54042
55227
  });
54043
- React8.useEffect(() => {
55228
+ React10.useEffect(() => {
54044
55229
  if (charLimit !== void 0 && typeof value2 === "string") {
54045
55230
  setCharCount(value2.length);
54046
55231
  }
@@ -54056,7 +55241,7 @@ var Textarea = React8.forwardRef(
54056
55241
  };
54057
55242
  const textareaClasses = cn(
54058
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",
54059
- sizeClasses[effectiveSize],
55244
+ sizeClasses2[effectiveSize],
54060
55245
  hasError && "border-destructive focus-visible:ring-destructive",
54061
55246
  className
54062
55247
  );
@@ -54118,7 +55303,7 @@ var Textarea = React8.forwardRef(
54118
55303
  }
54119
55304
  );
54120
55305
  Textarea.displayName = "Textarea";
54121
- var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55306
+ var Command = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54122
55307
  Command$1,
54123
55308
  {
54124
55309
  ref,
@@ -54130,7 +55315,7 @@ var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
54130
55315
  }
54131
55316
  ));
54132
55317
  Command.displayName = Command$1.displayName;
54133
- var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
55318
+ var CommandInput = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
54134
55319
  /* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
54135
55320
  /* @__PURE__ */ jsx(
54136
55321
  Command$1.Input,
@@ -54145,7 +55330,7 @@ var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
54145
55330
  )
54146
55331
  ] }));
54147
55332
  CommandInput.displayName = Command$1.Input.displayName;
54148
- var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55333
+ var CommandList = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54149
55334
  Command$1.List,
54150
55335
  {
54151
55336
  ref,
@@ -54154,7 +55339,7 @@ var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
54154
55339
  }
54155
55340
  ));
54156
55341
  CommandList.displayName = Command$1.List.displayName;
54157
- var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ jsx(
55342
+ var CommandEmpty = React10.forwardRef((props, ref) => /* @__PURE__ */ jsx(
54158
55343
  Command$1.Empty,
54159
55344
  {
54160
55345
  ref,
@@ -54163,7 +55348,7 @@ var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ jsx(
54163
55348
  }
54164
55349
  ));
54165
55350
  CommandEmpty.displayName = Command$1.Empty.displayName;
54166
- var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55351
+ var CommandGroup = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54167
55352
  Command$1.Group,
54168
55353
  {
54169
55354
  ref,
@@ -54175,7 +55360,7 @@ var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
54175
55360
  }
54176
55361
  ));
54177
55362
  CommandGroup.displayName = Command$1.Group.displayName;
54178
- var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55363
+ var CommandSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54179
55364
  Command$1.Separator,
54180
55365
  {
54181
55366
  ref,
@@ -54184,7 +55369,7 @@ var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @_
54184
55369
  }
54185
55370
  ));
54186
55371
  CommandSeparator.displayName = Command$1.Separator.displayName;
54187
- var CommandItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55372
+ var CommandItem = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54188
55373
  Command$1.Item,
54189
55374
  {
54190
55375
  ref,
@@ -54213,8 +55398,8 @@ function AsyncCombobox({
54213
55398
  hasMore = false,
54214
55399
  onLoadMore
54215
55400
  }) {
54216
- const [open, setOpen] = React8.useState(false);
54217
- const [inputValue, setInputValue] = React8.useState("");
55401
+ const [open, setOpen] = React10.useState(false);
55402
+ const [inputValue, setInputValue] = React10.useState("");
54218
55403
  const selectedOption = options.find((o) => o.value === value2);
54219
55404
  const displayValue = selectedOption?.label ?? (value2 || "");
54220
55405
  const handleSelect = (selected) => {
@@ -54222,7 +55407,7 @@ function AsyncCombobox({
54222
55407
  onValueChange?.(next);
54223
55408
  if (!clearable) setOpen(false);
54224
55409
  };
54225
- const handleSearchChange = React8.useCallback(
55410
+ const handleSearchChange = React10.useCallback(
54226
55411
  (q) => {
54227
55412
  setInputValue(q);
54228
55413
  onSearchChange?.(q);
@@ -54337,17 +55522,17 @@ function AsyncMultiSelect({
54337
55522
  portal = true,
54338
55523
  renderOption
54339
55524
  }) {
54340
- const [open, setOpen] = React8.useState(false);
54341
- const [inputValue, setInputValue] = React8.useState("");
54342
- const listRef = React8.useRef(null);
54343
- const sentinelRef = React8.useRef(null);
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);
54344
55529
  const selected = normalizeValue(value2, multiple);
54345
- const selectedOptions = React8.useMemo(() => {
55530
+ const selectedOptions = React10.useMemo(() => {
54346
55531
  const map = /* @__PURE__ */ new Map();
54347
55532
  for (const opt of options) map.set(opt.value, opt);
54348
55533
  return selected.map((v) => map.get(v) ?? { value: v, label: v });
54349
55534
  }, [options, selected]);
54350
- React8.useEffect(() => {
55535
+ React10.useEffect(() => {
54351
55536
  const sentinel = sentinelRef.current;
54352
55537
  if (!open || !hasMore || !onLoadMore || !sentinel) return;
54353
55538
  const observer = new IntersectionObserver(
@@ -54374,7 +55559,7 @@ function AsyncMultiSelect({
54374
55559
  const next = selected.filter((v) => v !== optionValue);
54375
55560
  onValueChange?.(multiple ? next.length > 0 ? next : void 0 : void 0);
54376
55561
  };
54377
- const handleSearchChange = React8.useCallback(
55562
+ const handleSearchChange = React10.useCallback(
54378
55563
  (q) => {
54379
55564
  setInputValue(q);
54380
55565
  onSearchChange?.(q);
@@ -54675,8 +55860,8 @@ function CalendarDayButton({
54675
55860
  modifiers,
54676
55861
  ...props
54677
55862
  }) {
54678
- const ref = React8.useRef(null);
54679
- React8.useEffect(() => {
55863
+ const ref = React10.useRef(null);
55864
+ React10.useEffect(() => {
54680
55865
  if (modifiers.focused) ref.current?.focus();
54681
55866
  }, [modifiers.focused]);
54682
55867
  return /* @__PURE__ */ jsx(
@@ -54977,17 +56162,17 @@ function DateRangePicker({
54977
56162
  side = "bottom",
54978
56163
  className
54979
56164
  }) {
54980
- const [open, setOpen] = React8.useState(false);
54981
- const [showCalendar, setShowCalendar] = React8.useState(false);
54982
- const [draftRange, setDraftRange] = React8.useState(
56165
+ const [open, setOpen] = React10.useState(false);
56166
+ const [showCalendar, setShowCalendar] = React10.useState(false);
56167
+ const [draftRange, setDraftRange] = React10.useState(
54983
56168
  EMPTY_DRAFT_RANGE
54984
56169
  );
54985
- const [calendarMonth, setCalendarMonth] = React8.useState(/* @__PURE__ */ new Date());
54986
- const [flyoutSide, setFlyoutSide] = React8.useState("right");
54987
- const calendarRef = React8.useRef(null);
54988
- const [startInputValue, setStartInputValue] = React8.useState("");
54989
- const [endInputValue, setEndInputValue] = React8.useState("");
54990
- React8.useLayoutEffect(() => {
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(() => {
54991
56176
  if (!showCalendar || !calendarRef.current) return;
54992
56177
  const rect = calendarRef.current.getBoundingClientRect();
54993
56178
  if (rect.right > window.innerWidth) {
@@ -54996,14 +56181,14 @@ function DateRangePicker({
54996
56181
  }, [showCalendar]);
54997
56182
  const activePresets = presets ?? [...PRESET_IDS];
54998
56183
  const resolveLabel = (id) => presetLabels?.[id] ?? (id === "custom" ? "Custom" : PRESET_LABELS[id]);
54999
- const updateDraftRange = React8.useCallback(
56184
+ const updateDraftRange = React10.useCallback(
55000
56185
  (nextRange) => {
55001
56186
  setDraftRange(nextRange);
55002
56187
  onDraftChange?.(nextRange);
55003
56188
  },
55004
56189
  [onDraftChange]
55005
56190
  );
55006
- const syncInputsFromDraft = React8.useCallback(
56191
+ const syncInputsFromDraft = React10.useCallback(
55007
56192
  (range) => {
55008
56193
  setStartInputValue(range.startDate ? format(range.startDate, dateFormat) : "");
55009
56194
  if (lockEndToToday) {
@@ -55030,7 +56215,7 @@ function DateRangePicker({
55030
56215
  onChange?.({ presetId: id, ...range });
55031
56216
  setOpen(false);
55032
56217
  };
55033
- const handleRangeChange = React8.useCallback(
56218
+ const handleRangeChange = React10.useCallback(
55034
56219
  (range) => {
55035
56220
  const nextDraft = toDraftRange(range);
55036
56221
  if (lockEndToToday && nextDraft.startDate) {
@@ -55284,7 +56469,7 @@ function DateRangePicker({
55284
56469
  }
55285
56470
  DateRangePicker.displayName = "DateRangePicker";
55286
56471
  var timeInputChromeClass = "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
55287
- var TimePicker = React8.forwardRef(
56472
+ var TimePicker = React10.forwardRef(
55288
56473
  ({ hideIcon = false, className, ...props }, ref) => {
55289
56474
  return /* @__PURE__ */ jsx(
55290
56475
  Input,
@@ -55341,7 +56526,7 @@ function SimplifiedDate({ ts, dateFormat, className, relative = false }) {
55341
56526
  }
55342
56527
  return /* @__PURE__ */ jsx("span", { className: cn(className), children: detailedDate });
55343
56528
  }
55344
- var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
56529
+ var Table = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
55345
56530
  "table",
55346
56531
  {
55347
56532
  ref,
@@ -55350,9 +56535,9 @@ var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
55350
56535
  }
55351
56536
  ) }));
55352
56537
  Table.displayName = "Table";
55353
- var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
56538
+ var TableHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
55354
56539
  TableHeader.displayName = "TableHeader";
55355
- var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56540
+ var TableBody = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55356
56541
  "tbody",
55357
56542
  {
55358
56543
  ref,
@@ -55361,7 +56546,7 @@ var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
55361
56546
  }
55362
56547
  ));
55363
56548
  TableBody.displayName = "TableBody";
55364
- var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56549
+ var TableFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55365
56550
  "tfoot",
55366
56551
  {
55367
56552
  ref,
@@ -55373,7 +56558,7 @@ var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
55373
56558
  }
55374
56559
  ));
55375
56560
  TableFooter.displayName = "TableFooter";
55376
- var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56561
+ var TableRow = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55377
56562
  "tr",
55378
56563
  {
55379
56564
  ref,
@@ -55385,7 +56570,7 @@ var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
55385
56570
  }
55386
56571
  ));
55387
56572
  TableRow.displayName = "TableRow";
55388
- var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56573
+ var TableHead = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55389
56574
  "th",
55390
56575
  {
55391
56576
  ref,
@@ -55397,7 +56582,7 @@ var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
55397
56582
  }
55398
56583
  ));
55399
56584
  TableHead.displayName = "TableHead";
55400
- var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56585
+ var TableCell = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55401
56586
  "td",
55402
56587
  {
55403
56588
  ref,
@@ -55409,7 +56594,7 @@ var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
55409
56594
  }
55410
56595
  ));
55411
56596
  TableCell.displayName = "TableCell";
55412
- var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56597
+ var TableCaption = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
55413
56598
  "caption",
55414
56599
  {
55415
56600
  ref,
@@ -56418,7 +57603,7 @@ var userTypeBadgeMetallicClasses = cn(
56418
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%)]",
56419
57604
  "after:opacity-0 after:transition-opacity after:duration-[1800ms] after:ease-in-out hover:after:opacity-100"
56420
57605
  );
56421
- var UserTypeBadge = React8.forwardRef(
57606
+ var UserTypeBadge = React10.forwardRef(
56422
57607
  ({ userType, size = "default", className, ...props }, ref) => {
56423
57608
  const { color, icon: Icon2, label } = userTypeBadgeRegistry[userType];
56424
57609
  return /* @__PURE__ */ jsx("div", { ref, className: "inline-block", ...props, children: /* @__PURE__ */ jsxs(
@@ -56450,20 +57635,33 @@ var statusBadgeSizeVariants = cva(
56450
57635
  {
56451
57636
  variants: {
56452
57637
  size: {
56453
- sm: "gap-1 pl-0.5 pr-1.5 py-0.5 text-xs",
56454
- default: "gap-1.5 pl-0.5 pr-1.75 py-0.5 text-xs",
56455
- lg: "gap-1.5 pl-1 pr-2.25 py-1 text-sm"
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: ""
56456
57645
  }
56457
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
+ ],
56458
57655
  defaultVariants: {
56459
- size: "default"
57656
+ size: "default",
57657
+ hasIcon: false
56460
57658
  }
56461
57659
  }
56462
57660
  );
56463
- var StatusBadge = React8.forwardRef(
57661
+ var StatusBadge = React10.forwardRef(
56464
57662
  ({
56465
57663
  label,
56466
- Icon: Icon2,
57664
+ icon: Icon2,
56467
57665
  color,
56468
57666
  variant = "soft",
56469
57667
  size = "default",
@@ -56472,12 +57670,16 @@ var StatusBadge = React8.forwardRef(
56472
57670
  ...props
56473
57671
  }, ref) => {
56474
57672
  const iconPx = ICON_PX[size];
57673
+ const showIcon = isLoading || !!Icon2;
56475
57674
  return /* @__PURE__ */ jsx("div", { ref, className: "inline-block", ...props, children: /* @__PURE__ */ jsxs(
56476
57675
  Badge,
56477
57676
  {
56478
57677
  color,
56479
57678
  variant,
56480
- className: cn(statusBadgeSizeVariants({ size }), className),
57679
+ className: cn(
57680
+ statusBadgeSizeVariants({ size, hasIcon: showIcon }),
57681
+ className
57682
+ ),
56481
57683
  children: [
56482
57684
  isLoading ? /* @__PURE__ */ jsx(Spinner, { size: iconPx, "aria-hidden": true }) : Icon2 ? /* @__PURE__ */ jsx(Icon2, { size: iconPx, "aria-hidden": true }) : null,
56483
57685
  label
@@ -56569,7 +57771,7 @@ var deleteButtonVariantClasses = {
56569
57771
  gradient: "bg-error/10 text-error hover:bg-error/15 hover:text-error",
56570
57772
  solid: "bg-error/20 text-error-foreground hover:bg-error/30 hover:text-error-foreground"
56571
57773
  };
56572
- var Tag = React8.forwardRef(
57774
+ var Tag = React10.forwardRef(
56573
57775
  ({
56574
57776
  name: name2,
56575
57777
  value: value2,
@@ -56648,7 +57850,7 @@ function parseNameValueTag(tag) {
56648
57850
  if (i <= 0 || i >= tag.length - 1) return null;
56649
57851
  return { name: tag.slice(0, i), value: tag.slice(i + 1) };
56650
57852
  }
56651
- var TagInput = React8.forwardRef(
57853
+ var TagInput = React10.forwardRef(
56652
57854
  ({
56653
57855
  tags,
56654
57856
  onTagsChange,
@@ -56675,13 +57877,13 @@ var TagInput = React8.forwardRef(
56675
57877
  onBlur,
56676
57878
  ...restInputProps
56677
57879
  }, ref) => {
56678
- const autoId = React8.useId();
57880
+ const autoId = React10.useId();
56679
57881
  const inputId = id ?? autoId;
56680
- const rootRef = React8.useRef(null);
56681
- const [draft, setDraft] = React8.useState("");
57882
+ const rootRef = React10.useRef(null);
57883
+ const [draft, setDraft] = React10.useState("");
56682
57884
  const effectiveSize = size ?? "default";
56683
57885
  const hasError = error || !!errorContent;
56684
- const tryCommitDraft = React8.useCallback(() => {
57886
+ const tryCommitDraft = React10.useCallback(() => {
56685
57887
  if (disabled || readOnly) return;
56686
57888
  const trimmed = draft.trim();
56687
57889
  if (!trimmed) return;
@@ -57512,9 +58714,9 @@ var SIZE_STYLES2 = {
57512
58714
  function iconSized4(icon, iconPx) {
57513
58715
  if (icon == null) return null;
57514
58716
  const dim = { width: iconPx, height: iconPx };
57515
- if (React8.isValidElement(icon)) {
58717
+ if (React10.isValidElement(icon)) {
57516
58718
  const el = icon;
57517
- return React8.cloneElement(el, {
58719
+ return React10.cloneElement(el, {
57518
58720
  className: cn(el.props.className, "shrink-0"),
57519
58721
  style: { ...el.props.style, ...dim }
57520
58722
  });
@@ -57593,7 +58795,7 @@ function useSimpleClickableCardSurface(options) {
57593
58795
  const s = SIZE_STYLES2[size];
57594
58796
  const styles = resolveVariantStyles(variant, color);
57595
58797
  const isArbitraryGradient = variant === "gradient" && !isPresetColor(color);
57596
- const surfaceStyleWithoutGradientBg = React8.useMemo(() => {
58798
+ const surfaceStyleWithoutGradientBg = React10.useMemo(() => {
57597
58799
  if (!isArbitraryGradient || typeof color !== "string")
57598
58800
  return styles.containerStyle;
57599
58801
  const cs = styles.containerStyle;
@@ -57604,7 +58806,7 @@ function useSimpleClickableCardSurface(options) {
57604
58806
  const presetGradientPair = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_BACKDROP[color] : void 0;
57605
58807
  const surfaceContainerClass = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_FRAME[color] : styles.container;
57606
58808
  const presetRingClasses = isPresetColor(color) ? PRESET_RING_CLASSES_FOCUS_VISIBLE[color] : "";
57607
- const ringAccentStyle = React8.useMemo(() => {
58809
+ const ringAccentStyle = React10.useMemo(() => {
57608
58810
  if (isPresetColor(color)) return void 0;
57609
58811
  if (typeof color !== "string") return void 0;
57610
58812
  return {
@@ -57889,7 +59091,7 @@ function shellPresetRing(color) {
57889
59091
  const c = color ?? "gray";
57890
59092
  return isPresetColor(c) ? PRESET_RING_CLASSES[c] : "";
57891
59093
  }
57892
- var IconTextActionCard = React8.forwardRef(
59094
+ var IconTextActionCard = React10.forwardRef(
57893
59095
  ({
57894
59096
  icon,
57895
59097
  title,
@@ -58177,7 +59379,7 @@ var dismissButtonSizeClasses = {
58177
59379
  default: "size-7 [&_svg]:size-4",
58178
59380
  lg: "size-8 [&_svg]:size-4"
58179
59381
  };
58180
- var Alert = React8.forwardRef(
59382
+ var Alert = React10.forwardRef(
58181
59383
  ({
58182
59384
  icon,
58183
59385
  title,
@@ -58196,8 +59398,8 @@ var Alert = React8.forwardRef(
58196
59398
  dismissLabel = "Close alert",
58197
59399
  className
58198
59400
  }, ref) => {
58199
- const [dismissed, setDismissed] = React8.useState(false);
58200
- const handleDismiss = React8.useCallback(() => {
59401
+ const [dismissed, setDismissed] = React10.useState(false);
59402
+ const handleDismiss = React10.useCallback(() => {
58201
59403
  setDismissed(true);
58202
59404
  onDismiss?.();
58203
59405
  }, [onDismiss]);
@@ -58559,10 +59761,10 @@ function CodeBlock({
58559
59761
  inViewMargin
58560
59762
  }
58561
59763
  );
58562
- const [visibleCode, setVisibleCode] = React8.useState("");
58563
- const [highlightedCode, setHighlightedCode] = React8.useState("");
58564
- const [isDone, setIsDone] = React8.useState(false);
58565
- React8.useEffect(() => {
59764
+ const [visibleCode, setVisibleCode] = React10.useState("");
59765
+ const [highlightedCode, setHighlightedCode] = React10.useState("");
59766
+ const [isDone, setIsDone] = React10.useState(false);
59767
+ React10.useEffect(() => {
58566
59768
  if (!visibleCode.length || !isInView) return;
58567
59769
  const loadHighlightedCode = async () => {
58568
59770
  const normalizedLang = normalizeLang(lang);
@@ -58586,7 +59788,7 @@ function CodeBlock({
58586
59788
  };
58587
59789
  loadHighlightedCode();
58588
59790
  }, [lang, themes, writing, isInView, duration, delay2, visibleCode, theme]);
58589
- React8.useEffect(() => {
59791
+ React10.useEffect(() => {
58590
59792
  if (!writing) {
58591
59793
  setVisibleCode(code);
58592
59794
  onDone?.();
@@ -58633,7 +59835,7 @@ function CodeBlock({
58633
59835
  clearInterval(intervalId);
58634
59836
  };
58635
59837
  }, [code, duration, delay2, isInView, writing, onDone, onWrite, localRef]);
58636
- React8.useEffect(() => {
59838
+ React10.useEffect(() => {
58637
59839
  if (!writing || !isInView) return;
58638
59840
  const el = scrollContainerRef?.current ?? localRef.current?.parentElement ?? localRef.current;
58639
59841
  if (!el) return;
@@ -58670,7 +59872,7 @@ function Code({
58670
59872
  }) {
58671
59873
  const showCopyButton = copyButton !== false && (copyButton === true || copyButton === void 0 && Boolean(lang));
58672
59874
  const showHeader = fileName !== void 0 || showCopyButton;
58673
- const scrollRef = React8.useRef(null);
59875
+ const scrollRef = React10.useRef(null);
58674
59876
  return /* @__PURE__ */ jsxs(
58675
59877
  "div",
58676
59878
  {
@@ -58719,9 +59921,9 @@ function Code({
58719
59921
  }
58720
59922
  );
58721
59923
  }
58722
- var MonospaceContent = React8.forwardRef(
59924
+ var MonospaceContent = React10.forwardRef(
58723
59925
  function MonospaceContent2({ title, value: value2, color = "info", mask: mask2 = false, allowUnmask = true, className }, ref) {
58724
- const [revealed, setRevealed] = React8.useState(false);
59926
+ const [revealed, setRevealed] = React10.useState(false);
58725
59927
  const canUnmask = mask2 && allowUnmask;
58726
59928
  const masked = mask2 && !(canUnmask && revealed);
58727
59929
  const unmaskToggle = canUnmask ? /* @__PURE__ */ jsxs(
@@ -60090,7 +61292,7 @@ function SimplePaginatedList({
60090
61292
  ] }) : null
60091
61293
  ] });
60092
61294
  }
60093
- var ToastDefaultVariantContext = React8.createContext(void 0);
61295
+ var ToastDefaultVariantContext = React10.createContext(void 0);
60094
61296
  var typeIconMap2 = {
60095
61297
  error: /* @__PURE__ */ jsx(CircleX, { className: "h-4 w-4" }),
60096
61298
  info: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" }),
@@ -60109,7 +61311,7 @@ function defaultIconFromColor2(color) {
60109
61311
  return type != null ? typeIconMap2[type] : void 0;
60110
61312
  }
60111
61313
  function isToastProps(input) {
60112
- return input != null && typeof input === "object" && !React8.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);
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);
60113
61315
  }
60114
61316
  function normalizeToastInput(input, type) {
60115
61317
  if (isToastProps(input)) {
@@ -60133,7 +61335,7 @@ function resolveToastOptions(props, options) {
60133
61335
  closeButton: options?.closeButton
60134
61336
  };
60135
61337
  }
60136
- var Toast = React8.forwardRef(
61338
+ var Toast = React10.forwardRef(
60137
61339
  ({
60138
61340
  icon,
60139
61341
  title,
@@ -60145,7 +61347,7 @@ var Toast = React8.forwardRef(
60145
61347
  action,
60146
61348
  className
60147
61349
  }, ref) => {
60148
- const defaultVariantFromToaster = React8.useContext(
61350
+ const defaultVariantFromToaster = React10.useContext(
60149
61351
  ToastDefaultVariantContext
60150
61352
  );
60151
61353
  const resolvedVariant = variant ?? defaultVariantFromToaster ?? "soft";
@@ -60192,7 +61394,7 @@ var Toast = React8.forwardRef(
60192
61394
  }
60193
61395
  );
60194
61396
  Toast.displayName = "Toast";
60195
- var Toaster = React8.forwardRef(
61397
+ var Toaster = React10.forwardRef(
60196
61398
  ({
60197
61399
  position: position2 = "top-right",
60198
61400
  closeButton = true,
@@ -60321,9 +61523,9 @@ function createMarkdownComponents({
60321
61523
  }
60322
61524
  var REMARK_PLUGINS = [remarkGfm];
60323
61525
  var REHYPE_PLUGINS = [rehypeSlug];
60324
- var MarkdownContent = React8.forwardRef(
61526
+ var MarkdownContent = React10.forwardRef(
60325
61527
  function MarkdownContent2({ content: content3, linkComponent, colorTheme, className }, ref) {
60326
- const components = React8.useMemo(
61528
+ const components = React10.useMemo(
60327
61529
  () => createMarkdownComponents({ linkComponent, colorTheme }),
60328
61530
  [linkComponent, colorTheme]
60329
61531
  );
@@ -60419,7 +61621,7 @@ function FullscreenDialog({
60419
61621
  closeOnEscape = true,
60420
61622
  noGutters = false
60421
61623
  }) {
60422
- const sizeClasses2 = iconSizeMap[iconSize];
61624
+ const sizeClasses3 = iconSizeMap[iconSize];
60423
61625
  return /* @__PURE__ */ jsx(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsx(
60424
61626
  DialogContent2,
60425
61627
  {
@@ -60447,9 +61649,9 @@ function FullscreenDialog({
60447
61649
  {
60448
61650
  className: cn(
60449
61651
  "shrink-0 rounded-full mx-auto mb-4",
60450
- sizeClasses2.avatar
61652
+ sizeClasses3.avatar
60451
61653
  ),
60452
- children: /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-full bg-accent/80", children: /* @__PURE__ */ jsx("span", { className: sizeClasses2.icon, children: icon }) })
61654
+ children: /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-full bg-accent/80", children: /* @__PURE__ */ jsx("span", { className: sizeClasses3.icon, children: icon }) })
60453
61655
  }
60454
61656
  ),
60455
61657
  heading != null && /* @__PURE__ */ jsx("h1", { className: "text-2xl mb-4 font-normal text-center text-muted-foreground shrink-0", children: heading }),
@@ -65885,7 +67087,7 @@ function strokeResolvedStyle(color, opacity) {
65885
67087
  return { stroke: mix };
65886
67088
  }
65887
67089
  var labelTypographyClass = "whitespace-nowrap text-center leading-none font-semibold tracking-tight tabular-nums";
65888
- var CircularProgress = React8.forwardRef(
67090
+ var CircularProgress = React10.forwardRef(
65889
67091
  function CircularProgress2({
65890
67092
  value: value2,
65891
67093
  showPercentage = false,
@@ -66013,13 +67215,13 @@ function CountingNumber({
66013
67215
  const decimals = typeof decimalPlaces === "number" ? decimalPlaces : numberStr.includes(".") ? numberStr.split(".")[1]?.length ?? 0 : 0;
66014
67216
  const motionVal = useMotionValue(initiallyStable ? number : fromNumber);
66015
67217
  const springVal = useSpring(motionVal, transition);
66016
- React8.useEffect(() => {
67218
+ React10.useEffect(() => {
66017
67219
  const timeoutId = setTimeout(() => {
66018
67220
  if (isInView) motionVal.set(number);
66019
67221
  }, delay2);
66020
67222
  return () => clearTimeout(timeoutId);
66021
67223
  }, [isInView, number, motionVal, delay2]);
66022
- React8.useEffect(() => {
67224
+ React10.useEffect(() => {
66023
67225
  const unsubscribe = springVal.on("change", (latest) => {
66024
67226
  if (localRef.current) {
66025
67227
  let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();
@@ -66163,9 +67365,9 @@ function ProgressBar({
66163
67365
  className,
66164
67366
  ...props
66165
67367
  }) {
66166
- const [fakeValue, setFakeValue] = React8.useState(FAKE_PROGRESS_MIN);
66167
- const intervalRef = React8.useRef(null);
66168
- React8.useEffect(() => {
67368
+ const [fakeValue, setFakeValue] = React10.useState(FAKE_PROGRESS_MIN);
67369
+ const intervalRef = React10.useRef(null);
67370
+ React10.useEffect(() => {
66169
67371
  if (!showFakeProgress) return;
66170
67372
  if (intervalRef.current) clearInterval(intervalRef.current);
66171
67373
  setFakeValue(FAKE_PROGRESS_MIN);
@@ -66297,7 +67499,7 @@ function trailingChevronRow(options) {
66297
67499
  }
66298
67500
  );
66299
67501
  }
66300
- var SimpleClickableCard = React8.forwardRef(
67502
+ var SimpleClickableCard = React10.forwardRef(
66301
67503
  ({
66302
67504
  icon,
66303
67505
  leadingIcon,
@@ -66453,7 +67655,7 @@ function infoTriggerIconFgClass(variant, cardColor, infoButtonColor) {
66453
67655
  }
66454
67656
  return INFO_ICON_FG_CLASS[infoButtonColor];
66455
67657
  }
66456
- var SimpleInfoCard = React8.forwardRef(
67658
+ var SimpleInfoCard = React10.forwardRef(
66457
67659
  ({
66458
67660
  icon,
66459
67661
  title,
@@ -66593,7 +67795,7 @@ var maxWidthClasses = {
66593
67795
  lg: "max-w-5xl",
66594
67796
  xl: "max-w-7xl"
66595
67797
  };
66596
- var ContentContainer = React8.forwardRef(
67798
+ var ContentContainer = React10.forwardRef(
66597
67799
  function ContentContainer2({ maxWidth, children, className, noGutters = false }, ref) {
66598
67800
  return /* @__PURE__ */ jsx(
66599
67801
  "div",
@@ -66637,7 +67839,7 @@ function PageContainer({
66637
67839
  const showStickyHeader = showBackLink || hasContainerHeading;
66638
67840
  const backLabel = goBackLinkData?.label ?? "Back";
66639
67841
  const backHref = goBackLinkData?.href;
66640
- const LinkComponent = goBackLinkData?.LinkComponent;
67842
+ const LinkComponent = goBackLinkData?.linkComponent;
66641
67843
  return /* @__PURE__ */ jsx(
66642
67844
  "div",
66643
67845
  {
@@ -66767,4 +67969,4 @@ lottie-react/build/index.es.js:
66767
67969
  (*! goToAndStop must be relative to the start of the current segment *)
66768
67970
  */
66769
67971
 
66770
- 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 };