@espressif/dashboard-ui-components 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -0
- package/dist/{chunk-UA4DS3KA.js → chunk-P6F6UWV2.js} +1 -1
- package/dist/{chunk-ZJ6UJR2D.js → chunk-RYJHAEBC.js} +2 -2
- package/dist/{chunk-WS6QCUCT.js → chunk-XNF4IADN.js} +1242 -612
- package/dist/{chunk-AM47GLNJ.js → chunk-XW6Z6VO4.js} +2 -2
- package/dist/{chunk-3PO2SF7T.js → chunk-ZFYUONPY.js} +39 -16
- package/dist/common/index.js +4 -4
- package/dist/components/index.d.ts +101 -8
- package/dist/components/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/layouts/index.js +3 -3
- package/package.json +1 -1
- package/src/assets/illustrations/rm-dashboard-update.svg +229 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
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-ABBHGIFI.js';
|
|
2
|
-
import { FieldLabelRow, fieldHintClassName, 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-
|
|
2
|
+
import { FieldLabelRow, fieldHintClassName, 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-ZFYUONPY.js';
|
|
3
3
|
import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, useIsMobile, useControlledState, Button as Button$1, Skeleton, Avatar, AvatarFallback } from './chunk-OKB2WTX7.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, RefreshCw, LoaderCircle, Triangle, Info, MinusIcon, ArrowLeft, ArrowRight, Search, ClockIcon, Crown, ShieldCheck, Tag as Tag$1, ChevronRight, CircleAlert, Eye, EyeOff, Circle, Braces, FileCheck, CheckCheck, TriangleAlert, CircleX, Menu, ChevronsUpDown, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, CalendarIcon, CalendarRangeIcon, CheckIcon, XIcon,
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
6
|
+
import { ChevronDown, ChevronUp, Check, Upload, X, RefreshCw, LoaderCircle, Triangle, Info, MinusIcon, ArrowLeft, ArrowRight, Search, ClockIcon, Crown, ShieldCheck, Tag as Tag$1, ChevronRight, CircleAlert, Eye, EyeOff, Circle, Braces, FileCheck, CheckCheck, TriangleAlert, CircleX, ChevronLeft, Menu, ChevronsUpDown, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, CalendarIcon, CalendarRangeIcon, CheckIcon, XIcon, Columns2, ChevronsRight, ChevronsLeft, MoveLeft, CircleIcon, Bolt, Plus, Clock, XCircle, CheckCircle2, Trash2 } from 'lucide-react';
|
|
7
|
+
import * as React11 from 'react';
|
|
8
|
+
import React11__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';
|
|
@@ -16302,10 +16302,10 @@ function Accordion(props) {
|
|
|
16302
16302
|
}
|
|
16303
16303
|
function AccordionItem(props) {
|
|
16304
16304
|
const { value: value2 } = useAccordion();
|
|
16305
|
-
const [isOpen, setIsOpen] =
|
|
16305
|
+
const [isOpen, setIsOpen] = React11.useState(
|
|
16306
16306
|
value2?.includes(props?.value) ?? false
|
|
16307
16307
|
);
|
|
16308
|
-
|
|
16308
|
+
React11.useEffect(() => {
|
|
16309
16309
|
setIsOpen(value2?.includes(props?.value) ?? false);
|
|
16310
16310
|
}, [value2, props?.value]);
|
|
16311
16311
|
return /* @__PURE__ */ jsx(AccordionItemProvider, { value: { value: props.value, isOpen, setIsOpen }, children: /* @__PURE__ */ jsx(
|
|
@@ -16439,7 +16439,7 @@ function Accordion3({
|
|
|
16439
16439
|
}
|
|
16440
16440
|
);
|
|
16441
16441
|
}
|
|
16442
|
-
var SimpleCard =
|
|
16442
|
+
var SimpleCard = React11.forwardRef(
|
|
16443
16443
|
({ noShadow, noBorder, transparent, title, description, children, className }, ref) => {
|
|
16444
16444
|
return /* @__PURE__ */ jsxs(
|
|
16445
16445
|
Card,
|
|
@@ -16465,7 +16465,7 @@ var SimpleCard = React10.forwardRef(
|
|
|
16465
16465
|
SimpleCard.displayName = "SimpleCard";
|
|
16466
16466
|
var content2 = (icon, primaryText, secondaryText) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16467
16467
|
icon != null && /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx(AvatarFallback, { className: "text-xs flex items-center justify-center gap-1 border", children: icon }) }),
|
|
16468
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
16468
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
16469
16469
|
primaryText != null && /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold", children: primaryText }),
|
|
16470
16470
|
secondaryText != null && /* @__PURE__ */ jsx("span", { className: "truncate text-sm text-muted-foreground", children: secondaryText })
|
|
16471
16471
|
] })
|
|
@@ -16524,6 +16524,9 @@ var create_new_group_default = '<?xml version="1.0" encoding="UTF-8"?>\n<svg id=
|
|
|
16524
16524
|
// svg-raw:/builds/app-frameworks/esp-ui-component-library/src/assets/illustrations/new-ota.svg
|
|
16525
16525
|
var new_ota_default = '<?xml version="1.0" encoding="UTF-8"?>\n<svg id="new-ota" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 95 72.9">\n <defs>\n <style>\n .cls-1 {\n fill: var(--color-muted-foreground);\n }\n\n .cls-2 {\n fill: var(--color-foreground);\n }\n </style>\n </defs>\n <path id="cloud" class="cls-2" d="M80.36,27.71c-2.1-2.61-4.41-5-8.22-4.81-.89.04-1.54-.49-1.82-1.34-.85-2.64-2.9-4.15-5.06-5.63-2.71-1.85-5.48-2.1-8.49-.88-1.59.64-1.71.45-2.88-.77-1.33-1.39-2.67-2.88-4.29-3.84-3.63-2.13-7.5-2.38-11.29-.27-2.4,1.34-4.6,2.97-6.36,5.14-.54.67-1.23,1.22-1.86,1.83-.53-.19-.69-.23-.83-.31-3.16-1.91-6.43-1.62-9.82-.67-2.48.7-3.39,2.82-4.73,4.59-.1.13-.15.29-.22.43-.41.79-1.03,1.01-1.81.58-1.42-.77-2.99-.91-4.48-.64-2.37.42-4.77.95-6.17,3.29-2.28,3.83-2.29,8-1.72,12.21.2,1.46,1.07,2.47,2.69,2.68,1.03.13,2.04.55,3.07.65,3.93.38,7.86.79,11.81.99,5.16.27,10.32.31,15.48.52.89.04,1.78.09,2.66.13,0-.34.02-.68.08-1-1.16-.05-2.31-.11-3.47-.16-3.46-.15-6.93-.26-10.39-.4-5.72-.23-11.4-.84-17.03-1.96-2.26-.45-3.35-1.59-3.77-3.99-.44-2.53-.05-4.77.7-7.1.8-2.47,2.62-3.66,5.01-3.94,2-.24,4.04-.11,5.8,1.17.19.13.44.18,1,.4.72-1.2,1.37-2.29,2.05-3.38,2.72-4.38,8.4-5.45,12.53-2.36.31.24.66.43,1.17.75.58-.6,1.09-1.19,1.66-1.72,1.8-1.72,3.48-3.61,5.45-5.1,5.98-4.55,11.82-2.02,15.67,2.27.27.3.46.66.7.98,1.11,1.51,1.16,1.54,2.97.76,5.02-2.17,9.87.68,12.14,4.25.37.59.45,1.36.66,2.05.18.59.35,1.19.51,1.75,5.51-.32,6.23.05,9.84,4.31,2.83,3.34,3.77,7.21,3.52,11.47,0,.16-.04.32-.09.47-.05.15-.14.28-.35.68-.71.05-1.57.23-2.42.16-5.97-.54-11.93.05-17.89.09-.64,0-1.31.08-1.93-.06-2.56-.58-5.15-.73-7.74-.79.22.41.38.85.49,1.31,4.11.32,8.21.79,12.36.5,2.01-.14,4.03-.03,6.05.04,3.14.11,6.28.32,9.42.42,2.61.09,3.42-.76,3.61-3.38.35-4.67-1.1-8.78-3.98-12.36Z"/>\n <g id="upload">\n <g>\n <path class="cls-2" d="M28.78,51.42c2.89.18,5.74.86,8.64.89,1.05.02,1.27.26,1.35,1.36.04.59,0,1.19,0,1.79.01,1.41-.02,2.83.04,4.25.1,2.3.25,4.6.39,6.91h-.17c0,.82.01,1.64,0,2.46-.01.9-.03,1.79-.04,2.69-.01.37-.03.85.43.89,1.48.13,2.96.23,4.44.24,1.11,0,2.22-.15,3.33-.26,1.18-.11,2.39-.14,3.54-.41,2.93-.71,3.34-.42,3-4.22-.26-2.97-.52-5.94-.78-8.9-.08-.89-.17-1.78-.22-2.67-.08-1.42-.19-2.83-.19-4.25,0-1.13.28-1.39,1.43-1.62,1.24-.24,2.5-.44,3.73-.7.58-.13,1.16-.31,1.7-.55.53-.24.64-.88.25-1.31-.35-.38-.77-.7-1.15-1.06-1.5-1.45-3.09-2.82-4.49-4.36-2.4-2.64-4.85-5.23-7.61-7.52-.67-.56-1.32-.7-2.03-.29-1.49.87-3.08,1.06-4.75.85-.92-.11-1.57.34-2.05,1.08-.24.38-.43.79-.68,1.16-1.96,2.9-3.89,5.81-5.91,8.67-.81,1.14-1.84,2.14-2.71,3.24-.24.32-.4.8-.37,1.18.01.18.56.44.88.46ZM41.93,63.44c-.05,1.85-.03,3.71-.07,5.57-.02,1.02-.3,1.58-.64,1.41-.56-.28-.55-.83-.61-1.34-.02-.15-.04-.3-.01-.45.55-3.19-.32-6.37-.16-9.56,0-1.71-.05-3.42.03-5.13.03-.63.32-1.27.59-1.86.08-.17.5-.26.76-.26.13.01.27.3.36.49.07.12.06.29.06.44-.11,3.56-.23,7.12-.31,10.69ZM44.89,37.83c.31-.59.76-.75,1.29-.41.75.47,1.52.96,2.14,1.59,2.73,2.75,5.41,5.55,8.1,8.33.16.16.39.34.39.52.01.25-.1.65-.27.72-.4.18-.86.21-1.3.27-.88.12-1.78.17-2.66.34-1.21.23-1.65.77-1.73,1.96-.02.37-.01.75.02,1.12.25,4.01.49,8.03.77,12.05.1,1.33.36,2.66.42,3.99.07,1.36-.21,1.86-1.52,2.04-1.99.25-4,.26-6.01.33-.61.02-.92-.44-.95-1.03-.06-1.34-.12-2.68-.15-4.02-.02-1.57,0-3.14,0-4.7h.13c0-2.24-.03-4.48.01-6.71.02-1.11-.03-2.23.53-3.28.16-.3.05-.89-.16-1.21-.34-.51-.93-.44-1.41-.15-1.33.83-2.79,1.01-4.3.96-.59-.02-.8-.4-.46-.89,1.23-1.78,2.5-3.52,3.72-5.31.49-.73.9-1.52,1.3-2.31.71-1.39,1.37-2.81,2.1-4.2ZM31.23,48.83c.15-.26.31-.51.48-.76,1.96-2.78,4.05-5.48,5.86-8.37,1.28-2.05,3.15-2.53,5.26-2.75.1,0,.25.27.35.42.03.04-.02.15-.05.21-1.09,2.35-1.97,4.81-3.54,6.91-1.15,1.55-2.33,3.07-3.51,4.6-.77.98-.98,1.07-1.99,1.01-.87-.12-1.68-.21-2.49-.34-.61-.11-.7-.37-.37-.93Z"/>\n <path class="cls-2" d="M31.23,48.83c.15-.26.31-.51.48-.76,1.96-2.78,4.05-5.48,5.86-8.37,1.28-2.05,3.15-2.53,5.26-2.75.1,0,.25.27.35.42.03.04-.02.15-.05.21-1.09,2.35-1.97,4.81-3.54,6.91-1.15,1.55-2.33,3.07-3.51,4.6-.77.98-.98,1.07-1.99,1.01-.87-.12-1.68-.21-2.49-.34-.61-.11-.7-.37-.37-.93Z"/>\n <path class="cls-2" d="M40.44,59.07c0-1.71-.05-3.42.03-5.13.03-.63.32-1.27.59-1.86.08-.17.5-.26.76-.26.13.01.27.3.36.49.07.12.06.29.06.44-.11,3.56-.23,7.12-.31,10.69-.05,1.85-.03,3.71-.07,5.57-.02,1.02-.3,1.58-.64,1.41-.56-.28-.55-.83-.61-1.34-.02-.15-.04-.3-.01-.45.55-3.19-.32-6.37-.16-9.56Z"/>\n <path class="cls-2" d="M23.44,35.71c-.02,1.39.28,1.75,1.62,1.88,1.11.11,2.23.16,3.35.21,1.17.05,1.66-.45,1.55-1.61-.08-.89-.28-1.77-.36-2.66-.09-.96.1-1.2,1.09-1.26,3.5-.19,7-.36,10.51-.49,4.02-.14,8.04-.22,12.07-.31.89-.03,1.79-.06,2.68-.02,1.27.06,1.36.19,1.59,1.4.18.95.37,1.9.63,2.83.35,1.29.5,1.4,1.87,1.33.9-.04,1.79-.15,2.67-.3,1.12-.18,1.56-.67,1.54-1.82-.03-2.01-.05-4.03-.27-6.03-.35-3.29-.58-3.46-3.86-3.38-2.91.07-5.81.23-8.72.34-1.41.05-2.83.05-4.25.12-2.75.15-5.5.34-8.25.52,0-.04-.01-.08-.01-.11-1.86.15-3.71.32-5.56.45-1.79.13-3.58.19-5.36.35-1.03.1-2.08.23-3.06.53-1.18.37-1.42.8-1.25,2.02.22,1.65.19,3.27-.12,4.89-.07.37-.1.75-.1,1.12ZM25.29,30.06c.05-1.2.36-1.63,1.56-1.78,1.1-.13,2.22-.03,3.34-.03v-.04c.67,0,1.34.04,2.01-.01,5.11-.4,10.22-.81,15.33-1.22.6-.04,1.19-.03,1.79-.04,3.57-.05,7.14-.1,10.71-.15.3,0,.6,0,.9,0,.69.03,1.13.43,1.22,1.08.33,2.16.23,4.31-.21,6.44-.12.61-.59.82-1.16.82s-1.13-.11-1.25-.71c-.18-.86-.22-1.76-.29-2.65-.09-1.19-.27-1.46-1.47-1.47-3.5,0-7,.06-10.5.1-1.34.01-2.68.09-4.02.02-3.58-.2-7.14.07-10.7.37-.89.08-1.79.01-2.68.07-1.37.08-2.01.84-1.9,2.19.05.59.21,1.17.23,1.77.04.9-.3,1.24-1.15,1.27-1.46.04-1.9-.34-1.89-1.79,0-1.41.06-2.83.13-4.24Z"/>\n <path class="cls-2" d="M25.16,34.3c0-1.41.06-2.83.13-4.24.05-1.2.36-1.63,1.56-1.78,1.1-.13,2.22-.03,3.34-.03v-.04c.67,0,1.34.04,2.01-.01,5.11-.4,10.22-.81,15.33-1.22.6-.04,1.19-.03,1.79-.04,3.57-.05,7.14-.1,10.71-.15.3,0,.6,0,.9,0,.69.03,1.13.43,1.22,1.08.33,2.16.23,4.31-.21,6.44-.12.61-.59.82-1.16.82s-1.13-.11-1.25-.71c-.18-.86-.22-1.76-.29-2.65-.09-1.19-.27-1.46-1.47-1.47-3.5,0-7,.06-10.5.1-1.34.01-2.68.09-4.02.02-3.58-.2-7.14.07-10.7.37-.89.08-1.79.01-2.68.07-1.37.08-2.01.84-1.9,2.19.05.59.21,1.17.23,1.77.04.9-.3,1.24-1.15,1.27-1.46.04-1.9-.34-1.89-1.79Z"/>\n </g>\n </g>\n <g id="cog-filled">\n <g>\n <path class="cls-2" d="M64.67,5.7c-.82-.1-1.34-.44-1.39-1.36.07-.08.15-.19.25-.3.83-.91.77-1.88-.19-2.64-.33-.26-.72-.49-1.12-.61-.99-.29-1.31-.43-1.79.67-.04.1-.09.22-.17.27-.23.13-.5.34-.71.29-.2-.05-.37-.35-.49-.58-.07-.14-.01-.35-.03-.53-.09-.8-.33-1.01-1.12-.88-.67.11-1.35.23-1.98.43-.43.13-.88.37-1.15.7-.13.17.11.65.21.98.26.95-.23,1.66-1.23,1.72-.37.02-.61.15-.73.51-.14.44-.3.88-.41,1.33-.29,1.19,0,1.65,1.19,1.96.13.04.29.07.4.14.4.23.44.79.08,1.08-.11.09-.25.13-.38.2-.72.41-.82.69-.29,1.33.42.51.95.96,1.47,1.37.66.52.95.47,1.55-.11.13-.12.21-.31.35-.4.21-.14.49-.32.71-.29.34.03.55.31.53.69,0,.21,0,.43,0,.65-.01.58.3.88.85.88.68,0,1.37.03,2.02-.11,1.15-.23,1.33-.65.84-1.7-.13-.29-.35-.61-.03-.87.32-.25.77-.65,1.05-.57.65.19,1.11.02,1.58-.36.49-.4.83-.88.94-1.51.06-.39.12-.78.17-1.17.11-.99.05-1.1-.95-1.22ZM64.5,8.66c-.27.64-.66.71-1.27.37-.15-.09-.31-.25-.46-.26-.22,0-.55.05-.64.19-.34.57-.69,1.04-1.4,1.23-.38.1-.31.5-.1.8.26.37.51.75.79,1.15-.73.6-1.42.52-2.1.31-.18-.05-.43-.38-.4-.54.23-1.5-.94-1.58-1.89-2-.24.36-.44.69-.67,1-.28.36-.64.46-1.03.19-.43-.29-.98-.49-1.04-1.18.19-.09.41-.15.55-.29.17-.14.41-.36.41-.53-.03-.6-.12-1.2-.25-1.78-.03-.14-.31-.27-.49-.32-1.26-.29-1.37-.46-1.05-1.7.03-.1.1-.19.19-.34.79.17,1.3-.23,1.61-.95.09-.19.21-.38.37-.52.41-.35.47-.71.26-1.23-.29-.71-.19-.86.54-1.09.57-.18,1.16-.29,1.86-.45,0,.5.03.85,0,1.18-.04.46.09.76.58.86.38.08.75.21,1.23.35.26-.39.53-.81.81-1.2.12-.17.27-.37.44-.43.73-.26,2.1.75,1.99,1.5-.03.26-.32.53-.55.72-.7.59-.71.57-.19,1.35.06.09.15.17.17.27.11.81.59,1.13,1.39,1.11.47,0,.74.29.67.77-.07.49-.12,1.01-.31,1.45Z"/>\n <path class="cls-2" d="M64.15,6.44c-.79.01-1.27-.3-1.39-1.11-.01-.09-.11-.18-.17-.27-.51-.78-.51-.77.19-1.35.23-.19.51-.46.55-.72.11-.75-1.26-1.76-1.99-1.5-.17.06-.32.27-.44.43-.29.39-.55.81-.81,1.2-.48-.14-.85-.27-1.23-.35-.49-.1-.62-.4-.58-.86.03-.33,0-.68,0-1.18-.71.16-1.3.27-1.86.45-.73.23-.83.38-.54,1.09.21.52.15.87-.26,1.23-.16.14-.29.33-.37.52-.31.72-.83,1.11-1.61.95-.09.15-.16.24-.19.34-.32,1.25-.21,1.41,1.05,1.7.19.05.47.18.49.32.13.59.23,1.19.25,1.78,0,.17-.23.39-.41.53-.15.13-.36.19-.55.29.06.69.61.89,1.04,1.18.39.27.75.17,1.03-.19.23-.31.43-.64.67-1,.95.41,2.12.5,1.89,2-.03.16.22.49.4.54.68.21,1.38.29,2.1-.31-.28-.41-.53-.78-.79-1.15-.21-.3-.28-.7.1-.8.71-.19,1.06-.66,1.4-1.23.09-.15.42-.19.64-.19.15,0,.31.17.46.26.61.35.99.27,1.27-.37.19-.45.25-.96.31-1.45.07-.48-.2-.77-.67-.77ZM59.59,8.49c-1.18,1.03-2.8.49-3.13-1.04-.05-.25-.07-.49-.1-.66,0-1.1.51-1.84,1.28-2.43.41-.31.87-.3,1.31-.11,1.58.69,1.94,3.1.64,4.23Z"/>\n <path class="cls-2" d="M58.95,4.25c-.45-.19-.9-.21-1.31.11-.77.59-1.28,1.33-1.28,2.43.03.17.05.41.1.66.33,1.52,1.95,2.06,3.13,1.04,1.31-1.13.95-3.54-.64-4.23ZM58.41,8.31c-.74-.06-1.21-.55-1.29-1.33-.01-.11,0-.21,0-.56,0-.01,0-.27.08-.51.17-.56.56-.9,1.15-.99.54-.08.87.23,1.15.63.34.5.44,1.05.29,1.64-.19.74-.72,1.16-1.37,1.11Z"/>\n </g>\n </g>\n <g id="cog-outlined">\n <g>\n <path class="cls-2" d="M6.45,48.97c.46.02.82.01,1.18.06,1.22.15,1.99-.61,1.8-1.8-.18-1.17-.15-1.24,1.07-1.39.57-.07,1.15-.07,1.77-.1.22.59.41,1.11.67,1.82.4-.33.75-.54,1-.83.4-.47.84-.51,1.32-.24.54.3,1.09.61,1.56.99.89.72.92,1.19.26,2.11-.65.89-.62,1.12.22,1.63,1,.61,1.16.87.91,1.98-.11.51-.39,1-.65,1.46-.22.38-.53.53-1.04.45-.96-.15-1.07.06-.66.99.07.15.11.31.16.44-.62.75-2.19,1.24-3.01.88-.24-.11-.4-.48-.53-.76-.45-.98-.85-1.08-1.64-.36-.72.66-.77.67-1.58.12-.54-.37-1.09-.75-1.58-1.2-.47-.42-.43-.72.11-1.08.35-.24.75-.39.6-.93-.15-.53-.52-.66-1.02-.72-1.14-.15-1.23-.29-1.14-1.44.05-.65.14-1.3.22-2.06ZM14.74,56.35c-.04-.24-.06-.41-.09-.57-.21-1.1.56-1.93,1.64-1.77.76.11,1-.04,1.13-.71.13-.69-.06-.99-.76-1.18-.27-.07-.55-.12-.78-.18-.17-.71-.33-1.35-.49-2.04.39-.35.81-.71,1.21-1.06-1.12-1.77-1.68-1.8-3.22-.19-.37-.13-.93-.15-1.18-.44-.32-.37-.39-.96-.59-1.52-.38-.04-.77-.08-1.35-.13.13.82.24,1.47.33,2.03-.62.38-1.16.61-1.57.98-.53.47-1.05.77-1.74.48-.39,1.35-.31,1.45.83,1.61.29.04.66.2.81.43.62.94.52,2.07-.17,2.93.95.84.95.85,1.88.07.56-.47,2.01-.12,2.33.56q.48,1,1.78.69Z"/>\n <path class="cls-2" d="M12.66,50.18c.86,0,1.45.74,1.44,1.8-.01,1.08-.85,1.98-1.82,1.96-.97-.03-1.91-1.05-1.91-2.09,0-1.06.84-1.68,2.29-1.67ZM12.51,51.01c-.73,0-1.2.31-1.18.8.02.55.68,1.21,1.21,1.21.47,0,.79-.35.81-.89.03-.65-.32-1.11-.84-1.11Z"/>\n </g>\n </g>\n <g id="chip">\n <g id="chip-body">\n <g>\n <path class="cls-2" d="M88.23,55.12c.13-.58.22-1.17.31-1.77.03-.18.06-.4-.21-.52-.34-.15-.68-.35-1.04-.44-1.73-.41-3.46-.8-5.2-1.18-.36-.08-.72-.15-1.08-.2-1.03-.14-2.07-.26-3.1-.38-.44-.05-.46-.06-.6.29-.26.66-.47,1.33-.6,2.03-.22,1.22-.55,2.41-.84,3.61t0,0c-.28,1.16-.56,2.33-.83,3.49-.05.2-.09.4-.08.61.02.36.14.46.56.54.63.12,1.28.22,1.91.35,1.01.21,2.02.39,3.02.66.63.17,1.25.31,1.9.39.26.03.52.07.79.12.74.12,1.47.23,2.21.36.34.06.53-.06.66-.27.06-.09.11-.19.14-.3.37-1.12.77-2.24,1.09-3.38.37-1.32.68-2.66.98-4ZM86.83,59.79c-.03.12-.09.22-.13.34-.04,0-.07,0-.1,0-.01.12-.04.24-.08.35.01,0,.03,0,.05,0-.12.76-.36,1.42-.68,2.05-.12.24-.35.28-.64.23-.65-.11-1.31-.23-1.96-.35-.1-.02-.2-.05-.29-.06-1.12-.04-2.18-.42-3.27-.65-1.23-.27-2.47-.5-3.71-.73-.55-.1-.71-.19-.64-.63.08-.51.26-1,.4-1.49.01-.04.03-.06.05-.09,0-.1.02-.2.06-.31.03-.1.07-.18.11-.27,0-.16.05-.32.11-.47-.02,0-.04-.02-.06-.03.09-.47.16-.93.26-1.39.25-1.17.56-2.33.76-3.51.11-.66.36-1.25.68-1.83.02-.04.05-.06.11-.12.19.02.4.05.61.07.36.03.72.05,1.08.07.22.01.43.01.64.05,1.39.26,2.78.49,4.16.8,1.05.23,2.08.56,3.12.85.13.03.24.1.36.16.33.15.46.36.41.66-.15.77-.28,1.55-.45,2.32-.3,1.33-.63,2.64-.95,3.97Z"/>\n <path class="cls-2" d="M83.98,60.73c-2.12-.13-4.08-.41-6.1-1.02.32-2.15.62-4.21.95-6.27.08-.54.49-.75.97-.66,1.68.31,3.35.67,5.01,1.03.53.11.91.49.81,1.05-.35,1.96-.58,3.95-1.63,5.86Z"/>\n </g>\n </g>\n <g id="chip_leg-middle" data-name="chip=leg-middle">\n <path class="cls-1" d="M81.09,69.95s-.07-.03-.09-.06l-1.98-3.22,1.01-4.25c.02-.07.09-.12.17-.1s.12.09.1.17l-.98,4.14,1.92,3.12c.04.06.02.15-.05.19-.03.02-.07.02-.1.02Z"/>\n <path class="cls-1" d="M81.41,71.86c-.61-.14-.98-.75-.84-1.36s.75-.98,1.36-.84.98.75.84,1.36-.75.98-1.36.84ZM81.78,70.32c-.24-.06-.48.09-.54.33s.09.48.33.54.48-.09.54-.33-.09-.48-.33-.54Z"/>\n </g>\n <g id="chip-leg-left">\n <path class="cls-1" d="M78.42,70.13s-.07-.03-.1-.07l-2.2-3.57,1.12-4.72c.02-.08.1-.13.18-.11s.13.1.11.18l-1.09,4.6,2.13,3.47c.04.07.02.17-.05.21-.04.02-.08.03-.12.02Z"/>\n <path class="cls-1" d="M78.54,71.87c-.61-.14-.98-.75-.84-1.36s.75-.98,1.36-.84.98.75.84,1.36-.75.98-1.36.84ZM78.91,70.34c-.24-.06-.48.09-.54.33s.09.48.33.54.48-.09.54-.33-.09-.48-.33-.54Z"/>\n </g>\n <g id="chip-leg-right">\n <path class="cls-1" d="M82.83,65.87c-.07-.02-.1-.14-.07-.27l.62-2.59c.03-.13.11-.23.18-.21s.1.14.07.27l-.62,2.59c-.03.13-.11.23-.18.21Z"/>\n <path class="cls-1" d="M82.43,68.12c-.61-.14-.98-.75-.84-1.36s.75-.98,1.36-.84.98.75.84,1.36-.75.98-1.36.84ZM82.8,66.58c-.24-.06-.48.09-.54.33s.09.48.33.54.48-.09.54-.33-.09-.48-.33-.54Z"/>\n </g>\n </g>\n <g id="arrow">\n <path class="cls-2" d="M94.99,43.03v-.5s-.05-.5-.05-.5l-.08-.99-.15-.99-.08-.49c-.03-.16-.07-.32-.11-.49l-.22-.97c-.09-.32-.19-.64-.28-.96l-.14-.48c-.05-.16-.12-.31-.17-.47l-.35-.93c-.13-.31-.28-.61-.41-.91l-.21-.45c-.07-.15-.16-.29-.23-.44l-.48-.88c-.17-.29-.36-.56-.53-.84l-.27-.42c-.09-.14-.2-.27-.29-.4l-.6-.8-.89-1.03s-.03-.03-.07-.07c-.04-.05-.11-.11-.2-.18-.17-.15-.39-.34-.61-.53-.43-.39-.9-.71-.87-.68-.79-.54-1.35-.77-.32.33.14.17.32.34.47.53.15.19.31.37.44.53.14.16.26.3.34.4.09.1.13.16.13.16l.63.72c.22.24.41.5.61.76.19.26.4.51.58.79.35.55.72,1.08,1.02,1.66.65,1.13,1.14,2.34,1.56,3.57.19.62.39,1.24.52,1.88l.11.48c.04.16.07.32.09.48l.15.96c.15,1.29.23,2.6.13,3.89-.02.65-.12,1.29-.21,1.94-.02.16-.05.32-.09.48l-.1.48c-.07.32-.13.64-.21.95-.32,1.27-.73,2.51-1.28,3.68-.28.58-.59,1.15-.94,1.69-.35.53-.76,1.03-1.2,1.48-.16.15-.31.31-.48.44l-.25.21c-.09.06-.18.12-.27.19-.01.01-.03.05-.03.06-.15.54.21.66.44.64.03,0,.04,0,.06-.02.1-.07.2-.14.3-.21l.28-.23c.19-.15.36-.32.54-.49.48-.48.91-1.02,1.29-1.58.37-.56.7-1.15.99-1.76.57-1.21.99-2.48,1.32-3.76.09-.32.15-.64.22-.97.07-.33.14-.65.2-.98l.13-.99c.02-.17.05-.33.06-.5l.03-.5.06-1v-1Z"/>\n <path class="cls-2" d="M86.9,26.88c.18-.05.44-.09.7-.1.53-.02,1.09.04,1.04.02.46.02.86.01.95-.06.09-.07-.12-.19-.85-.39-.43-.13-.98-.25-1.45-.26-.23-.01-.44,0-.6.03-.15.02-.24.05-.24.05-.05,0-.14.05-.2.08l-.21.09-.42.2.22.55.06.15.03.07.05.14c.03.1.06.19.08.29.11.41.19.85.17,1.22,0,.02.02.05.03.05.16.19.29.29.44.29.14,0,.27-.11.34-.22.02-.03.03-.04.03-.06.03-.55-.07-1.03-.19-1.5-.03-.11-.06-.22-.1-.32l-.05-.16-.03-.08h0s-.01,0,0,0c.05-.01.12-.05.21-.07Z"/>\n </g>\n</svg>';
|
|
16526
16526
|
|
|
16527
|
+
// svg-raw:/builds/app-frameworks/esp-ui-component-library/src/assets/illustrations/rm-dashboard-update.svg
|
|
16528
|
+
var rm_dashboard_update_default = '<?xml version="1.0" encoding="UTF-8"?>\n<svg id="rm-dashboard-update" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 845.67 533.92">\n <!--\n RainMaker cloud (taken from the product logo) delivering an update to a\n dashboard on a laptop. Companion to rm-data-download: same canvas, cloud\n and connector, so the two read as one family.\n\n One source, two variants (see illustration-variants.ts):\n - static: every SMIL element is stripped and `data-variant="animated"`\n groups are dropped, so the base attribute values below ARE the resting\n frame (chart bars up, progress two thirds full, two packages in flight).\n - animated: `data-variant="static"` groups are dropped. Packages arrive\n 1.5s apart (package k lands at 3s + 1.5s * k); each landing refreshes\n one stat card, while the chart regrows and the sync badge spins.\n Variant groups must not contain nested <g> elements: the selector is a\n non-greedy regex up to the first closing tag.\n\n Theme colours come from the design tokens; the cloud keeps the logo\'s own\n reds on purpose. Ids are prefixed "rmdu-" because the markup is inlined.\n -->\n <defs>\n <style>\n .rmdu-card { fill: var(--color-card); }\n .rmdu-muted { fill: var(--color-muted); }\n .rmdu-muted-fg { fill: var(--color-muted-foreground); }\n .rmdu-gray { fill: var(--color-gray); }\n .rmdu-primary { fill: var(--color-primary); }\n .rmdu-primary-light { fill: var(--color-primary-light); }\n .rmdu-highlight { fill: var(--color-primary-light); }\n .rmdu-flow { fill: none; stroke: var(--color-primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 9; opacity: .55; }\n .rmdu-pkg-frame { fill: var(--color-card); stroke: var(--color-primary); stroke-width: 2.5; }\n .rmdu-glyph { fill: none; stroke: var(--color-primary-foreground); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }\n </style>\n\n <linearGradient id="rmdu-cloud" x1=".83" y1="92.99" x2="512.02" y2="92.99" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#fc4c3b"/>\n <stop offset=".5" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdu-cloud-top" x1="340.71" y1="86.7" x2="166.21" y2="-87.76" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdu-cloud-band" x1="43.64" y1="194.71" x2="364.07" y2="194.71" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdu-cloud-sweep" x1="377.59" y1="200.5" x2="479.34" y2="200.5" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#f94939"/>\n <stop offset="1" stop-color="#d43129"/>\n </linearGradient>\n <linearGradient id="rmdu-dot" x1="130.74" y1="157.26" x2="95.26" y2="121.82" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset=".17" stop-color="#dd372d"/>\n <stop offset=".67" stop-color="#f14436"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdu-drop" x1="0" y1="0" x2="1" y2="0">\n <stop offset="0" stop-color="#fc4c3b"/>\n <stop offset=".57" stop-color="#eb3b30"/>\n <stop offset="1" stop-color="#e5352c"/>\n </linearGradient>\n\n <!-- The three rain dashes of the logo, reused for the static logo and the falling copies. -->\n <g id="rmdu-rain">\n <path fill="url(#rmdu-drop)" d="M295.41,420.01c-12.31,0-22.29-9.99-22.29-22.31,0-5.3,1.89-10.43,5.34-14.46l46.37-54.33c7.99-9.37,22.07-10.49,31.44-2.5s10.49,22.07,2.5,31.44h0l-46.37,54.33c-4.24,4.97-10.46,7.83-16.99,7.82h0Z"/>\n <path fill="url(#rmdu-drop)" d="M195.75,420.01c-5.3,0-10.42-1.89-14.43-5.35-9.37-7.95-10.52-21.99-2.57-31.36.02-.02.03-.04.05-.06l46.42-54.33c7.75-9.57,21.79-11.05,31.36-3.3s11.05,21.79,3.3,31.36c-.24.3-.5.6-.76.89l-46.37,54.33c-4.24,4.97-10.46,7.83-16.99,7.82h0Z"/>\n <path fill="url(#rmdu-drop)" d="M96.14,420.01c-12.31,0-22.29-9.99-22.29-22.31,0-5.3,1.89-10.43,5.34-14.46l46.37-54.33c7.75-9.57,21.79-11.05,31.36-3.3s11.05,21.79,3.3,31.36c-.24.3-.5.6-.76.89l-46.37,54.33c-4.22,4.98-10.42,7.84-16.95,7.82h0Z"/>\n </g>\n\n\n <!-- One update package travelling from the cloud to the dashboard: an up-arrow chip and a version label. -->\n <g id="rmdu-package">\n <rect class="rmdu-pkg-frame" x="-31" y="-13" width="62" height="26" rx="7"/>\n <circle class="rmdu-primary" cx="-17" cy="0" r="7"/>\n <path class="rmdu-glyph" d="M-17 3.5 V-3.5 M-20 -0.8 L-17 -3.8 L-14 -0.8"/>\n <rect class="rmdu-muted-fg" x="-5" y="-5" width="26" height="5" rx="2.5"/>\n <rect class="rmdu-muted-fg" x="-5" y="3" width="16" height="4" rx="2" opacity=".6"/>\n </g>\n\n <path id="rmdu-flow-path" d="M338 178 C 440 178, 462 402, 560 402"/>\n </defs>\n\n <!-- Ground -->\n <ellipse class="rmdu-muted" cx="440" cy="526" rx="380" ry="7.5"/>\n\n <!-- RainMaker cloud, straight from the logo (viewBox 512 x 420), scaled down. -->\n <g transform="translate(48 30) scale(0.58)">\n <!-- Falling copies of the logo\'s rain, emitted continuously. -->\n <g data-variant="animated" opacity=".55">\n <use href="#rmdu-rain">\n <animateTransform attributeName="transform" type="translate" values="0 0; 0 160" dur="2.4s" begin="0s" repeatCount="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.12;.5;1" dur="2.4s" begin="0s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdu-rain">\n <animateTransform attributeName="transform" type="translate" values="0 0; 0 160" dur="2.4s" begin="1.2s" repeatCount="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.12;.5;1" dur="2.4s" begin="1.2s" repeatCount="indefinite"/>\n </use>\n </g>\n\n <use href="#rmdu-rain"/>\n <circle fill="url(#rmdu-dot)" cx="113" cy="253.55" r="25.08">\n <animate attributeName="r" values="25.08;27.5;25.08" dur="2.4s" repeatCount="indefinite"/>\n </circle>\n <path fill="url(#rmdu-cloud)" d="M400.41,142.72h0C397.94,61.46,330.05-2.41,248.79.07,171.43,2.43,109.11,64.29,106.18,141.63h0C44.34,144.92-3.13,197.72.16,259.56c3.2,60.25,53.51,107.16,113.84,106.16h201.58c10.54-.84,20.1,6.2,22.43,16.52h0l20.77-24.38h0c3.57-4.17,5.45-9.51,5.3-14.99-.47-12.19-10.53-21.81-22.73-21.73H113.74c-37.31,1.14-68.47-28.18-69.61-65.49s28.18-68.47,65.49-69.61c1.11-.03,2.23-.04,3.34-.02,4.07,0,8.12.37,12.13,1.09,5.86,1.08,11.91-.25,16.78-3.69,7.2-4.74,11.02-13.2,9.82-21.73-.69-4.79-1.04-9.63-1.04-14.47,0-56.67,45.94-102.61,102.61-102.61s102.61,45.94,102.61,102.61v4.35h0c-41.09,17.61-67.82,57.91-68.06,102.61-.1,12.4,9.81,22.56,22.21,22.77,12.31.05,22.33-9.9,22.38-22.21v-.09c-.15-37.32,29.99-67.7,67.32-67.85,37.32-.15,67.7,29.99,67.85,67.32.07,17.03-6.3,33.45-17.82,45.99l-.3.39-66.37,76.54c-8.09,9.29-7.12,23.38,2.17,31.47s23.38,7.12,31.47-2.17h0l66.28-76.14c41.57-45.93,38.04-116.87-7.89-158.44-20.48-18.53-47.07-28.86-74.69-29.01h0v-.03Z"/>\n <path fill="url(#rmdu-cloud-top)" d="M253.21,20.42c71.54-.01,133.13,50.5,147.12,120.65C396.84,59.85,328.17-3.17,246.95.31c-76.06,3.26-137.08,63.98-140.73,140.02,14.27-69.82,75.72-119.95,146.99-119.91Z"/>\n <path fill="url(#rmdu-cloud-band)" d="M358.78,357.9h0c7.97-9.42,6.79-23.51-2.62-31.48-4.02-3.4-9.11-5.27-14.37-5.29H113c-37.3-.02-67.53-30.24-67.58-67.54,0-6.2.86-12.37,2.52-18.34,0,0-43.46,130.38,145.86,130.38h121.69c10.56-.84,20.12,6.22,22.43,16.56l20.86-24.3h0Z"/>\n <path fill="url(#rmdu-cloud-sweep)" d="M454.44,215.04c18.93,25.91,17,61.56-4.61,85.27l-.3.39-66.45,76.32c-8.09,9.29-7.12,23.38,2.17,31.47s23.38,7.12,31.47-2.17h0l17.38-19.99h0c88.14-101.83,20.34-171.28,20.34-171.28h0Z"/>\n </g>\n\n <!-- Connector: dashes flow from the cloud towards the laptop. -->\n <use href="#rmdu-flow-path" class="rmdu-flow">\n <animate attributeName="stroke-dashoffset" from="0" to="-18" dur="0.9s" repeatCount="indefinite"/>\n </use>\n\n <!-- Laptop -->\n <g id="rmdu-laptop">\n <rect class="rmdu-muted-fg" x="526.77" y="310.15" width="296.41" height="203.65" rx="29.36"/>\n <path class="rmdu-gray" d="M504.29,513.81h341.38c0,11.1-9.01,20.11-20.11,20.11h-301.15c-11.1,0-20.11-9.01-20.11-20.11h0Z"/>\n <path class="rmdu-muted" d="M649.88,513.81h50.2v.15c0,2.95-2.4,5.35-5.35,5.35h-39.51c-2.95,0-5.35-2.4-5.35-5.35v-.15h0Z"/>\n <circle class="rmdu-card" cx="674.98" cy="318.61" r="3.7"/>\n\n <rect class="rmdu-card" x="539.84" y="327.23" width="270.27" height="169.5"/>\n <rect class="rmdu-primary" x="539.84" y="327.23" width="270.27" height="17.44"/>\n <circle class="rmdu-card" cx="551" cy="335.95" r="2.6" opacity=".85"/>\n <circle class="rmdu-card" cx="560" cy="335.95" r="2.6" opacity=".85"/>\n <circle class="rmdu-card" cx="569" cy="335.95" r="2.6" opacity=".85"/>\n\n <!-- Dashboard sidebar -->\n <rect class="rmdu-muted" x="551" y="355" width="50" height="103" rx="4"/>\n <rect class="rmdu-primary" x="558" y="364" width="34" height="5" rx="2.5"/>\n <rect class="rmdu-muted-fg" x="558" y="377" width="28" height="4" rx="2" opacity=".7"/>\n <rect class="rmdu-muted-fg" x="558" y="389" width="32" height="4" rx="2" opacity=".7"/>\n <rect class="rmdu-muted-fg" x="558" y="401" width="24" height="4" rx="2" opacity=".7"/>\n\n <!-- Stat cards: each flashes as a package lands. The highlight rests at opacity 0, so the static frame is unaffected. -->\n <g>\n <rect class="rmdu-muted" x="609" y="355" width="58" height="34" rx="4"/>\n <rect class="rmdu-highlight" x="609" y="355" width="58" height="34" rx="4" opacity="0">\n <animate attributeName="opacity" values="0;.45;0;0" keyTimes="0;.08;.35;1" dur="4.5s" begin="3s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary" x="616" y="363" width="16" height="4" rx="2"/>\n <rect class="rmdu-muted-fg" x="616" y="373" width="30" height="7" rx="3.5"/>\n </g>\n <g>\n <rect class="rmdu-muted" x="675" y="355" width="58" height="34" rx="4"/>\n <rect class="rmdu-highlight" x="675" y="355" width="58" height="34" rx="4" opacity="0">\n <animate attributeName="opacity" values="0;.45;0;0" keyTimes="0;.08;.35;1" dur="4.5s" begin="4.5s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary" x="682" y="363" width="16" height="4" rx="2"/>\n <rect class="rmdu-muted-fg" x="682" y="373" width="26" height="7" rx="3.5"/>\n </g>\n <g>\n <rect class="rmdu-muted" x="741" y="355" width="58" height="34" rx="4"/>\n <rect class="rmdu-highlight" x="741" y="355" width="58" height="34" rx="4" opacity="0">\n <animate attributeName="opacity" values="0;.45;0;0" keyTimes="0;.08;.35;1" dur="4.5s" begin="6s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary" x="748" y="363" width="16" height="4" rx="2"/>\n <rect class="rmdu-muted-fg" x="748" y="373" width="22" height="7" rx="3.5"/>\n </g>\n\n <!-- Chart: bars at full height at rest; when animated they shrink and regrow with each cycle. -->\n <rect class="rmdu-muted" x="609" y="397" width="190" height="61" rx="4" opacity=".6"/>\n <rect class="rmdu-primary-light" x="615" y="424" width="22" height="28" rx="3">\n <animate attributeName="height" values="14;28;28;14" keyTimes="0;.3;.85;1" dur="4.5s" begin="0s" repeatCount="indefinite"/>\n <animate attributeName="y" values="438;424;424;438" keyTimes="0;.3;.85;1" dur="4.5s" begin="0s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary-light" x="651" y="412" width="22" height="40" rx="3">\n <animate attributeName="height" values="22;40;40;22" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.2s" repeatCount="indefinite"/>\n <animate attributeName="y" values="430;412;412;430" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.2s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary-light" x="687" y="430" width="22" height="22" rx="3">\n <animate attributeName="height" values="12;22;22;12" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.4s" repeatCount="indefinite"/>\n <animate attributeName="y" values="440;430;430;440" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.4s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary" x="723" y="406" width="22" height="46" rx="3">\n <animate attributeName="height" values="26;46;46;26" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.6s" repeatCount="indefinite"/>\n <animate attributeName="y" values="426;406;406;426" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.6s" repeatCount="indefinite"/>\n </rect>\n <rect class="rmdu-primary-light" x="759" y="418" width="22" height="34" rx="3">\n <animate attributeName="height" values="18;34;34;18" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.8s" repeatCount="indefinite"/>\n <animate attributeName="y" values="434;418;418;434" keyTimes="0;.3;.85;1" dur="4.5s" begin="0.8s" repeatCount="indefinite"/>\n </rect>\n\n <!-- Update progress: two thirds full at rest, filling over the cycle when animated. -->\n <rect class="rmdu-muted" x="551" y="470" width="216" height="8" rx="4"/>\n <rect class="rmdu-primary" x="551" y="470" width="144" height="8" rx="4">\n <animate attributeName="width" values="0;216;216" keyTimes="0;.92;1" dur="4.5s" repeatCount="indefinite"/>\n </rect>\n\n <!-- Sync badge -->\n <g transform="translate(786 474)">\n <circle class="rmdu-primary" r="11"/>\n <g class="rmdu-glyph">\n <path d="M-5.17 -1.88 A5.5 5.5 0 0 1 5.17 -1.88 M6.44 -4.6 L5.17 -1.88 L2.45 -3.15"/>\n <path d="M5.17 1.88 A5.5 5.5 0 0 1 -5.17 1.88 M-6.44 4.6 L-5.17 1.88 L-2.45 3.15"/>\n <animateTransform attributeName="transform" type="rotate" values="0;360" dur="2s" repeatCount="indefinite"/>\n </g>\n </g>\n </g>\n\n <!-- Static frame: two packages frozen part-way along the connector. -->\n <g data-variant="static">\n <use href="#rmdu-package" x="422" y="241"/>\n <use href="#rmdu-package" x="492" y="359"/>\n </g>\n\n <!-- Animated: three packages in flight, arriving 1.5s apart. -->\n <g data-variant="animated">\n <use href="#rmdu-package" opacity="0">\n <animateMotion dur="4.5s" begin="0s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdu-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="0s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdu-package" opacity="0">\n <animateMotion dur="4.5s" begin="1.5s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdu-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="1.5s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdu-package" opacity="0">\n <animateMotion dur="4.5s" begin="3s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdu-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="3s" repeatCount="indefinite"/>\n </use>\n </g>\n</svg>\n';
|
|
16529
|
+
|
|
16527
16530
|
// svg-raw:/builds/app-frameworks/esp-ui-component-library/src/assets/illustrations/rm-data-download.svg
|
|
16528
16531
|
var rm_data_download_default = '<?xml version="1.0" encoding="UTF-8"?>\n<svg id="rm-data-download" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 845.67 533.92">\n <!--\n RainMaker cloud (taken from the product logo) raining data into a laptop.\n\n One source, two variants (see illustration-variants.ts):\n - static: every SMIL element is stripped and `data-variant="animated"`\n groups are dropped, so the base attribute values below ARE the resting\n frame (rows visible, progress two thirds full, two records in flight).\n - animated: `data-variant="static"` groups are dropped; `<set>` elements\n hide what the animations then bring in, so nothing flashes before its\n first `begin`.\n Variant groups must not contain nested <g> elements: the selector is a\n non-greedy regex up to the first closing tag.\n\n Theme colours come from the design tokens; the cloud keeps the logo\'s own\n reds on purpose. Ids are prefixed "rmdd-" because the markup is inlined.\n -->\n <defs>\n <style>\n .rmdd-card { fill: var(--color-card); }\n .rmdd-muted { fill: var(--color-muted); }\n .rmdd-muted-fg { fill: var(--color-muted-foreground); }\n .rmdd-gray { fill: var(--color-gray); }\n .rmdd-primary { fill: var(--color-primary); }\n .rmdd-primary-light { fill: var(--color-primary-light); }\n .rmdd-flow { fill: none; stroke: var(--color-primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 9; opacity: .55; }\n .rmdd-pkt-frame { fill: var(--color-card); stroke: var(--color-primary); stroke-width: 2.5; }\n </style>\n\n <linearGradient id="rmdd-cloud" x1=".83" y1="92.99" x2="512.02" y2="92.99" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#fc4c3b"/>\n <stop offset=".5" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdd-cloud-top" x1="340.71" y1="86.7" x2="166.21" y2="-87.76" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdd-cloud-band" x1="43.64" y1="194.71" x2="364.07" y2="194.71" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdd-cloud-sweep" x1="377.59" y1="200.5" x2="479.34" y2="200.5" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#f94939"/>\n <stop offset="1" stop-color="#d43129"/>\n </linearGradient>\n <linearGradient id="rmdd-dot" x1="130.74" y1="157.26" x2="95.26" y2="121.82" gradientTransform="translate(0 114.01)" gradientUnits="userSpaceOnUse">\n <stop offset="0" stop-color="#d43129"/>\n <stop offset=".17" stop-color="#dd372d"/>\n <stop offset=".67" stop-color="#f14436"/>\n <stop offset="1" stop-color="#f94939"/>\n </linearGradient>\n <linearGradient id="rmdd-drop" x1="0" y1="0" x2="1" y2="0">\n <stop offset="0" stop-color="#fc4c3b"/>\n <stop offset=".57" stop-color="#eb3b30"/>\n <stop offset="1" stop-color="#e5352c"/>\n </linearGradient>\n\n <!-- The three rain dashes of the logo, reused for the static logo and the falling copies. -->\n <g id="rmdd-rain">\n <path fill="url(#rmdd-drop)" d="M295.41,420.01c-12.31,0-22.29-9.99-22.29-22.31,0-5.3,1.89-10.43,5.34-14.46l46.37-54.33c7.99-9.37,22.07-10.49,31.44-2.5s10.49,22.07,2.5,31.44h0l-46.37,54.33c-4.24,4.97-10.46,7.83-16.99,7.82h0Z"/>\n <path fill="url(#rmdd-drop)" d="M195.75,420.01c-5.3,0-10.42-1.89-14.43-5.35-9.37-7.95-10.52-21.99-2.57-31.36.02-.02.03-.04.05-.06l46.42-54.33c7.75-9.57,21.79-11.05,31.36-3.3s11.05,21.79,3.3,31.36c-.24.3-.5.6-.76.89l-46.37,54.33c-4.24,4.97-10.46,7.83-16.99,7.82h0Z"/>\n <path fill="url(#rmdd-drop)" d="M96.14,420.01c-12.31,0-22.29-9.99-22.29-22.31,0-5.3,1.89-10.43,5.34-14.46l46.37-54.33c7.75-9.57,21.79-11.05,31.36-3.3s11.05,21.79,3.3,31.36c-.24.3-.5.6-.76.89l-46.37,54.33c-4.22,4.98-10.42,7.84-16.95,7.82h0Z"/>\n </g>\n\n <!-- One exported record travelling from the cloud to the laptop. -->\n <g id="rmdd-packet">\n <rect class="rmdd-pkt-frame" x="-31" y="-13" width="62" height="26" rx="7"/>\n <rect class="rmdd-primary" x="-22" y="-5" width="12" height="5" rx="2.5"/>\n <rect class="rmdd-muted-fg" x="-6" y="-5" width="27" height="5" rx="2.5"/>\n <rect class="rmdd-muted-fg" x="-22" y="3" width="17" height="4" rx="2" opacity=".6"/>\n <rect class="rmdd-muted-fg" x="0" y="3" width="15" height="4" rx="2" opacity=".6"/>\n </g>\n\n <path id="rmdd-flow-path" d="M338 178 C 440 178, 462 402, 560 402"/>\n </defs>\n\n <!-- Ground -->\n <ellipse class="rmdd-muted" cx="440" cy="526" rx="380" ry="7.5"/>\n\n <!-- RainMaker cloud, straight from the logo (viewBox 512 x 420), scaled down. -->\n <g transform="translate(48 30) scale(0.58)">\n <!-- Falling copies of the logo\'s rain, emitted continuously. -->\n <g data-variant="animated" opacity=".55">\n <use href="#rmdd-rain">\n <animateTransform attributeName="transform" type="translate" values="0 0; 0 160" dur="2.4s" begin="0s" repeatCount="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.12;.5;1" dur="2.4s" begin="0s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdd-rain">\n <animateTransform attributeName="transform" type="translate" values="0 0; 0 160" dur="2.4s" begin="1.2s" repeatCount="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.12;.5;1" dur="2.4s" begin="1.2s" repeatCount="indefinite"/>\n </use>\n </g>\n\n <use href="#rmdd-rain"/>\n <circle fill="url(#rmdd-dot)" cx="113" cy="253.55" r="25.08">\n <animate attributeName="r" values="25.08;27.5;25.08" dur="2.4s" repeatCount="indefinite"/>\n </circle>\n <path fill="url(#rmdd-cloud)" d="M400.41,142.72h0C397.94,61.46,330.05-2.41,248.79.07,171.43,2.43,109.11,64.29,106.18,141.63h0C44.34,144.92-3.13,197.72.16,259.56c3.2,60.25,53.51,107.16,113.84,106.16h201.58c10.54-.84,20.1,6.2,22.43,16.52h0l20.77-24.38h0c3.57-4.17,5.45-9.51,5.3-14.99-.47-12.19-10.53-21.81-22.73-21.73H113.74c-37.31,1.14-68.47-28.18-69.61-65.49s28.18-68.47,65.49-69.61c1.11-.03,2.23-.04,3.34-.02,4.07,0,8.12.37,12.13,1.09,5.86,1.08,11.91-.25,16.78-3.69,7.2-4.74,11.02-13.2,9.82-21.73-.69-4.79-1.04-9.63-1.04-14.47,0-56.67,45.94-102.61,102.61-102.61s102.61,45.94,102.61,102.61v4.35h0c-41.09,17.61-67.82,57.91-68.06,102.61-.1,12.4,9.81,22.56,22.21,22.77,12.31.05,22.33-9.9,22.38-22.21v-.09c-.15-37.32,29.99-67.7,67.32-67.85,37.32-.15,67.7,29.99,67.85,67.32.07,17.03-6.3,33.45-17.82,45.99l-.3.39-66.37,76.54c-8.09,9.29-7.12,23.38,2.17,31.47s23.38,7.12,31.47-2.17h0l66.28-76.14c41.57-45.93,38.04-116.87-7.89-158.44-20.48-18.53-47.07-28.86-74.69-29.01h0v-.03Z"/>\n <path fill="url(#rmdd-cloud-top)" d="M253.21,20.42c71.54-.01,133.13,50.5,147.12,120.65C396.84,59.85,328.17-3.17,246.95.31c-76.06,3.26-137.08,63.98-140.73,140.02,14.27-69.82,75.72-119.95,146.99-119.91Z"/>\n <path fill="url(#rmdd-cloud-band)" d="M358.78,357.9h0c7.97-9.42,6.79-23.51-2.62-31.48-4.02-3.4-9.11-5.27-14.37-5.29H113c-37.3-.02-67.53-30.24-67.58-67.54,0-6.2.86-12.37,2.52-18.34,0,0-43.46,130.38,145.86,130.38h121.69c10.56-.84,20.12,6.22,22.43,16.56l20.86-24.3h0Z"/>\n <path fill="url(#rmdd-cloud-sweep)" d="M454.44,215.04c18.93,25.91,17,61.56-4.61,85.27l-.3.39-66.45,76.32c-8.09,9.29-7.12,23.38,2.17,31.47s23.38,7.12,31.47-2.17h0l17.38-19.99h0c88.14-101.83,20.34-171.28,20.34-171.28h0Z"/>\n </g>\n\n <!-- Connector: dashes flow from the cloud towards the laptop. -->\n <use href="#rmdd-flow-path" class="rmdd-flow">\n <animate attributeName="stroke-dashoffset" from="0" to="-18" dur="0.9s" repeatCount="indefinite"/>\n </use>\n\n <!-- Laptop -->\n <g id="rmdd-laptop">\n <rect class="rmdd-muted-fg" x="526.77" y="310.15" width="296.41" height="203.65" rx="29.36"/>\n <path class="rmdd-gray" d="M504.29,513.81h341.38c0,11.1-9.01,20.11-20.11,20.11h-301.15c-11.1,0-20.11-9.01-20.11-20.11h0Z"/>\n <path class="rmdd-muted" d="M649.88,513.81h50.2v.15c0,2.95-2.4,5.35-5.35,5.35h-39.51c-2.95,0-5.35-2.4-5.35-5.35v-.15h0Z"/>\n <circle class="rmdd-card" cx="674.98" cy="318.61" r="3.7"/>\n\n <rect class="rmdd-card" x="539.84" y="327.23" width="270.27" height="169.5"/>\n <rect class="rmdd-primary" x="539.84" y="327.23" width="270.27" height="17.44"/>\n <circle class="rmdd-card" cx="551" cy="335.95" r="2.6" opacity=".85"/>\n <circle class="rmdd-card" cx="560" cy="335.95" r="2.6" opacity=".85"/>\n <circle class="rmdd-card" cx="569" cy="335.95" r="2.6" opacity=".85"/>\n\n <!-- Table header -->\n <rect class="rmdd-muted" x="551" y="355" width="248" height="16" rx="3"/>\n <rect class="rmdd-muted-fg" x="558" y="361" width="34" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="606" y="361" width="58" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="682" y="361" width="42" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="746" y="361" width="30" height="4" rx="2"/>\n\n <!--\n Rows: visible in the static frame. When animated, `set` hides them from\n t=0 and each lights up as a packet arrives (packet k lands at 3s + 1.5s * k).\n -->\n <g>\n <rect class="rmdd-primary-light" x="551" y="378" width="248" height="16" rx="3" opacity=".45"/>\n <rect class="rmdd-primary" x="558" y="384" width="34" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="606" y="384" width="50" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="682" y="384" width="36" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="746" y="384" width="24" height="4" rx="2"/>\n <set attributeName="opacity" to="0" begin="0s" dur="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.06;.82;1" dur="4.5s" begin="3s" repeatCount="indefinite"/>\n </g>\n <g>\n <rect class="rmdd-primary-light" x="551" y="400" width="248" height="16" rx="3" opacity=".45"/>\n <rect class="rmdd-primary" x="558" y="406" width="34" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="606" y="406" width="44" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="682" y="406" width="40" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="746" y="406" width="18" height="4" rx="2"/>\n <set attributeName="opacity" to="0" begin="0s" dur="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.06;.82;1" dur="4.5s" begin="4.5s" repeatCount="indefinite"/>\n </g>\n <g>\n <rect class="rmdd-primary-light" x="551" y="422" width="248" height="16" rx="3" opacity=".45"/>\n <rect class="rmdd-primary" x="558" y="428" width="34" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="606" y="428" width="56" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="682" y="428" width="30" height="4" rx="2"/>\n <rect class="rmdd-muted-fg" x="746" y="428" width="28" height="4" rx="2"/>\n <set attributeName="opacity" to="0" begin="0s" dur="indefinite"/>\n <animate attributeName="opacity" values="0;1;1;0" keyTimes="0;.06;.82;1" dur="4.5s" begin="6s" repeatCount="indefinite"/>\n </g>\n\n <!-- Download progress: two thirds full at rest, filling over the cycle when animated. -->\n <rect class="rmdd-muted" x="551" y="470" width="248" height="8" rx="4"/>\n <rect class="rmdd-primary" x="551" y="470" width="168" height="8" rx="4">\n <animate attributeName="width" values="0;248;248" keyTimes="0;.92;1" dur="4.5s" repeatCount="indefinite"/>\n </rect>\n\n <!-- Download badge -->\n <g transform="translate(786 452)">\n <circle class="rmdd-primary" r="11"/>\n <g fill="none" stroke="var(--color-primary-foreground)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M0 -5.5 V3.5"/>\n <path d="M-3.8 0 L0 3.8 L3.8 0"/>\n <path d="M-5 6.5 H5"/>\n <animateTransform attributeName="transform" type="translate" values="0 -1.2; 0 1.2; 0 -1.2" dur="1.2s" repeatCount="indefinite"/>\n </g>\n </g>\n </g>\n\n <!-- Static frame: two records frozen part-way along the connector. -->\n <g data-variant="static">\n <use href="#rmdd-packet" x="422" y="241"/>\n <use href="#rmdd-packet" x="492" y="359"/>\n </g>\n\n <!-- Animated: three records in flight, arriving 1.5s apart. -->\n <g data-variant="animated">\n <use href="#rmdd-packet" opacity="0">\n <animateMotion dur="4.5s" begin="0s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdd-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="0s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdd-packet" opacity="0">\n <animateMotion dur="4.5s" begin="1.5s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdd-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="1.5s" repeatCount="indefinite"/>\n </use>\n <use href="#rmdd-packet" opacity="0">\n <animateMotion dur="4.5s" begin="3s" repeatCount="indefinite" keyPoints="0;1;1" keyTimes="0;.667;1" calcMode="linear">\n <mpath href="#rmdd-flow-path"/>\n </animateMotion>\n <animate attributeName="opacity" values="0;1;1;0;0" keyTimes="0;.06;.6;.667;1" dur="4.5s" begin="3s" repeatCount="indefinite"/>\n </use>\n </g>\n</svg>\n';
|
|
16529
16532
|
|
|
@@ -16548,6 +16551,7 @@ var chipAspect = parseSvgViewBoxAspectRatio(chip_default) ?? 141.99 / 103.44;
|
|
|
16548
16551
|
var newOtaAspect = parseSvgViewBoxAspectRatio(new_ota_default) ?? 95 / 72.9;
|
|
16549
16552
|
var securedKeyAspect = parseSvgViewBoxAspectRatio(secured_key_default) ?? 459.75 / 456.99;
|
|
16550
16553
|
var rmDataDownloadAspect = parseSvgViewBoxAspectRatio(rm_data_download_default) ?? 845.67 / 533.92;
|
|
16554
|
+
var rmDashboardUpdateAspect = parseSvgViewBoxAspectRatio(rm_dashboard_update_default) ?? 845.67 / 533.92;
|
|
16551
16555
|
var illustrationRegistry = [
|
|
16552
16556
|
{
|
|
16553
16557
|
id: "no-search-results",
|
|
@@ -16583,6 +16587,11 @@ var illustrationRegistry = [
|
|
|
16583
16587
|
id: "rm-data-download",
|
|
16584
16588
|
svg: rm_data_download_default,
|
|
16585
16589
|
aspectRatio: rmDataDownloadAspect
|
|
16590
|
+
},
|
|
16591
|
+
{
|
|
16592
|
+
id: "rm-dashboard-update",
|
|
16593
|
+
svg: rm_dashboard_update_default,
|
|
16594
|
+
aspectRatio: rmDashboardUpdateAspect
|
|
16586
16595
|
}
|
|
16587
16596
|
];
|
|
16588
16597
|
var illustrationsById = Object.fromEntries(
|
|
@@ -16685,12 +16694,12 @@ function CollapsibleCard({
|
|
|
16685
16694
|
className,
|
|
16686
16695
|
defaultOpen = false
|
|
16687
16696
|
}) {
|
|
16688
|
-
const childArray =
|
|
16697
|
+
const childArray = React11.Children.toArray(children);
|
|
16689
16698
|
const contentChild = childArray.find(
|
|
16690
|
-
(child) =>
|
|
16699
|
+
(child) => React11.isValidElement(child) && child.type === CollapsibleContent
|
|
16691
16700
|
);
|
|
16692
16701
|
const titleChild = childArray.find(
|
|
16693
|
-
(child) =>
|
|
16702
|
+
(child) => React11.isValidElement(child) && child.type !== CollapsibleContent
|
|
16694
16703
|
);
|
|
16695
16704
|
return /* @__PURE__ */ jsx(Card, { className: cn("bg-transparent shadow-none rounded-md", className), children: /* @__PURE__ */ jsxs(Collapsible, { defaultOpen, className: "group", children: [
|
|
16696
16705
|
/* @__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(
|
|
@@ -16707,7 +16716,7 @@ function CollapsibleCard({
|
|
|
16707
16716
|
]
|
|
16708
16717
|
}
|
|
16709
16718
|
) }) }),
|
|
16710
|
-
contentChild &&
|
|
16719
|
+
contentChild && React11.cloneElement(contentChild, {
|
|
16711
16720
|
className: cn(
|
|
16712
16721
|
"px-4 pb-6 pt-4",
|
|
16713
16722
|
contentChild.props.className
|
|
@@ -17299,7 +17308,7 @@ var useLottie = function useLottie2(props, style) {
|
|
|
17299
17308
|
});
|
|
17300
17309
|
};
|
|
17301
17310
|
}, [onComplete, onLoopComplete, onEnterFrame, onSegmentStart, onConfigReady, onDataReady, onDataFailed, onLoadedImages, onDOMLoaded, onDestroy]);
|
|
17302
|
-
var View = /* @__PURE__ */
|
|
17311
|
+
var View = /* @__PURE__ */ React11__default.createElement("div", _objectSpread2({
|
|
17303
17312
|
style,
|
|
17304
17313
|
ref: animationContainer
|
|
17305
17314
|
}, rest));
|
|
@@ -47627,32 +47636,208 @@ function AnimatedCard({
|
|
|
47627
47636
|
}
|
|
47628
47637
|
);
|
|
47629
47638
|
}
|
|
47639
|
+
var NO_OVERFLOW = { start: false, end: false };
|
|
47640
|
+
function useScrollOverflow(ref, { enabled = true, getContent, onResize } = {}) {
|
|
47641
|
+
const [overflow, setOverflow] = React11.useState(NO_OVERFLOW);
|
|
47642
|
+
const getContentRef = React11.useRef(getContent);
|
|
47643
|
+
const onResizeRef = React11.useRef(onResize);
|
|
47644
|
+
React11.useEffect(() => {
|
|
47645
|
+
getContentRef.current = getContent;
|
|
47646
|
+
onResizeRef.current = onResize;
|
|
47647
|
+
});
|
|
47648
|
+
React11.useEffect(() => {
|
|
47649
|
+
const scroller = ref.current;
|
|
47650
|
+
if (!enabled || !scroller) {
|
|
47651
|
+
setOverflow(NO_OVERFLOW);
|
|
47652
|
+
return;
|
|
47653
|
+
}
|
|
47654
|
+
const update = () => {
|
|
47655
|
+
const max = scroller.scrollWidth - scroller.clientWidth;
|
|
47656
|
+
const pos = Math.abs(scroller.scrollLeft);
|
|
47657
|
+
const start = pos > 1;
|
|
47658
|
+
const end = pos < max - 1;
|
|
47659
|
+
setOverflow(
|
|
47660
|
+
(prev) => prev.start === start && prev.end === end ? prev : { start, end }
|
|
47661
|
+
);
|
|
47662
|
+
};
|
|
47663
|
+
update();
|
|
47664
|
+
scroller.addEventListener("scroll", update, { passive: true });
|
|
47665
|
+
if (typeof ResizeObserver === "undefined") {
|
|
47666
|
+
return () => scroller.removeEventListener("scroll", update);
|
|
47667
|
+
}
|
|
47668
|
+
const observer = new ResizeObserver(() => {
|
|
47669
|
+
update();
|
|
47670
|
+
onResizeRef.current?.();
|
|
47671
|
+
});
|
|
47672
|
+
observer.observe(scroller);
|
|
47673
|
+
const content3 = getContentRef.current?.(scroller);
|
|
47674
|
+
if (content3) observer.observe(content3);
|
|
47675
|
+
return () => {
|
|
47676
|
+
scroller.removeEventListener("scroll", update);
|
|
47677
|
+
observer.disconnect();
|
|
47678
|
+
};
|
|
47679
|
+
}, [ref, enabled]);
|
|
47680
|
+
return overflow;
|
|
47681
|
+
}
|
|
47682
|
+
var EDGE_SIZE = 24;
|
|
47683
|
+
function prefersReducedMotion() {
|
|
47684
|
+
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
47685
|
+
}
|
|
47686
|
+
function fadeMask(start, end) {
|
|
47687
|
+
if (!start && !end) return {};
|
|
47688
|
+
const from = start ? `transparent, #000 ${EDGE_SIZE}px` : "#000";
|
|
47689
|
+
const to = end ? `#000 calc(100% - ${EDGE_SIZE}px), transparent` : "#000";
|
|
47690
|
+
const image = `linear-gradient(to right, ${from}, ${to})`;
|
|
47691
|
+
return { maskImage: image, WebkitMaskImage: image };
|
|
47692
|
+
}
|
|
47693
|
+
var arrowButtonClass = "inline-flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-colors hover:text-foreground disabled:pointer-events-none disabled:opacity-40";
|
|
47694
|
+
function ListDetailsItemStrip({
|
|
47695
|
+
data: data2,
|
|
47696
|
+
selectedId,
|
|
47697
|
+
onSelect,
|
|
47698
|
+
className
|
|
47699
|
+
}) {
|
|
47700
|
+
const scrollerRef = useRef(null);
|
|
47701
|
+
const overflow = useScrollOverflow(scrollerRef, {
|
|
47702
|
+
getContent: (scroller) => scroller.firstElementChild
|
|
47703
|
+
});
|
|
47704
|
+
const hasOverflow = overflow.start || overflow.end;
|
|
47705
|
+
const mountedRef = useRef(false);
|
|
47706
|
+
useEffect(() => {
|
|
47707
|
+
const scroller = scrollerRef.current;
|
|
47708
|
+
const selected = scroller?.querySelector('[aria-pressed="true"]');
|
|
47709
|
+
if (!scroller || !selected) return;
|
|
47710
|
+
const scrollerRect = scroller.getBoundingClientRect();
|
|
47711
|
+
if (scrollerRect.width === 0) return;
|
|
47712
|
+
const itemRect = selected.getBoundingClientRect();
|
|
47713
|
+
const overStart = itemRect.left - (scrollerRect.left + EDGE_SIZE);
|
|
47714
|
+
const overEnd = itemRect.right - (scrollerRect.right - EDGE_SIZE);
|
|
47715
|
+
let delta = 0;
|
|
47716
|
+
if (overStart < 0) delta = overStart;
|
|
47717
|
+
else if (overEnd > 0) delta = Math.min(overEnd, overStart);
|
|
47718
|
+
const instant = !mountedRef.current || prefersReducedMotion();
|
|
47719
|
+
mountedRef.current = true;
|
|
47720
|
+
if (Math.abs(delta) >= 1) {
|
|
47721
|
+
scroller.scrollBy({ left: delta, behavior: instant ? "auto" : "smooth" });
|
|
47722
|
+
}
|
|
47723
|
+
}, [selectedId, hasOverflow]);
|
|
47724
|
+
const scrollByPage = (direction) => {
|
|
47725
|
+
const scroller = scrollerRef.current;
|
|
47726
|
+
if (!scroller) return;
|
|
47727
|
+
scroller.scrollBy({
|
|
47728
|
+
left: direction * scroller.clientWidth * 0.8,
|
|
47729
|
+
behavior: prefersReducedMotion() ? "auto" : "smooth"
|
|
47730
|
+
});
|
|
47731
|
+
};
|
|
47732
|
+
return /* @__PURE__ */ jsxs(
|
|
47733
|
+
"div",
|
|
47734
|
+
{
|
|
47735
|
+
"data-slot": "list-details-item-strip",
|
|
47736
|
+
className: cn("flex items-center gap-1", className),
|
|
47737
|
+
children: [
|
|
47738
|
+
hasOverflow && // Arrows duplicate scrolling, which keyboard users get by tabbing
|
|
47739
|
+
// through the items, so they are hidden from assistive technology.
|
|
47740
|
+
/* @__PURE__ */ jsx(
|
|
47741
|
+
"button",
|
|
47742
|
+
{
|
|
47743
|
+
type: "button",
|
|
47744
|
+
tabIndex: -1,
|
|
47745
|
+
"aria-hidden": true,
|
|
47746
|
+
disabled: !overflow.start,
|
|
47747
|
+
className: arrowButtonClass,
|
|
47748
|
+
onClick: () => scrollByPage(-1),
|
|
47749
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
|
|
47750
|
+
}
|
|
47751
|
+
),
|
|
47752
|
+
/* @__PURE__ */ jsx(
|
|
47753
|
+
"div",
|
|
47754
|
+
{
|
|
47755
|
+
ref: scrollerRef,
|
|
47756
|
+
className: "min-w-0 flex-1 overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
47757
|
+
style: fadeMask(overflow.start, overflow.end),
|
|
47758
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex w-max gap-2 p-1", children: data2.map((item) => {
|
|
47759
|
+
const isSelected = selectedId === item.id;
|
|
47760
|
+
if (typeof item.title !== "string") {
|
|
47761
|
+
return /* @__PURE__ */ jsxs(
|
|
47762
|
+
"button",
|
|
47763
|
+
{
|
|
47764
|
+
type: "button",
|
|
47765
|
+
onClick: () => onSelect(item.id),
|
|
47766
|
+
"aria-pressed": isSelected,
|
|
47767
|
+
className: cn(
|
|
47768
|
+
"flex shrink-0 items-center gap-2 rounded-md px-3 py-2 text-left",
|
|
47769
|
+
"border-0 bg-transparent shadow-none",
|
|
47770
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
47771
|
+
),
|
|
47772
|
+
children: [
|
|
47773
|
+
/* @__PURE__ */ jsx("span", { className: "flex items-center", children: item.title }),
|
|
47774
|
+
item.endIcon != null && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.endIcon })
|
|
47775
|
+
]
|
|
47776
|
+
},
|
|
47777
|
+
item.id
|
|
47778
|
+
);
|
|
47779
|
+
}
|
|
47780
|
+
return /* @__PURE__ */ jsx(
|
|
47781
|
+
Button,
|
|
47782
|
+
{
|
|
47783
|
+
type: "button",
|
|
47784
|
+
fullWidth: false,
|
|
47785
|
+
variant: isSelected ? "outline" : "ghost",
|
|
47786
|
+
color: isSelected ? "primary" : "gray",
|
|
47787
|
+
onClick: () => onSelect(item.id),
|
|
47788
|
+
"aria-pressed": isSelected,
|
|
47789
|
+
className: cn("shrink-0", !isSelected && "border border-transparent"),
|
|
47790
|
+
endIcon: item.endIcon,
|
|
47791
|
+
hideRingOnHover: true,
|
|
47792
|
+
children: /* @__PURE__ */ jsx("span", { className: "max-w-48 truncate", title: item.title, children: item.title })
|
|
47793
|
+
},
|
|
47794
|
+
item.id
|
|
47795
|
+
);
|
|
47796
|
+
}) })
|
|
47797
|
+
}
|
|
47798
|
+
),
|
|
47799
|
+
hasOverflow && /* @__PURE__ */ jsx(
|
|
47800
|
+
"button",
|
|
47801
|
+
{
|
|
47802
|
+
type: "button",
|
|
47803
|
+
tabIndex: -1,
|
|
47804
|
+
"aria-hidden": true,
|
|
47805
|
+
disabled: !overflow.end,
|
|
47806
|
+
className: arrowButtonClass,
|
|
47807
|
+
onClick: () => scrollByPage(1),
|
|
47808
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
|
|
47809
|
+
}
|
|
47810
|
+
)
|
|
47811
|
+
]
|
|
47812
|
+
}
|
|
47813
|
+
);
|
|
47814
|
+
}
|
|
47630
47815
|
var panelColSpanClass = {
|
|
47631
|
-
1: "col-span-1",
|
|
47632
|
-
2: "col-span-2",
|
|
47633
|
-
3: "col-span-3",
|
|
47634
|
-
4: "col-span-4",
|
|
47635
|
-
5: "col-span-5",
|
|
47636
|
-
6: "col-span-6",
|
|
47637
|
-
7: "col-span-7",
|
|
47638
|
-
8: "col-span-8",
|
|
47639
|
-
9: "col-span-9",
|
|
47640
|
-
10: "col-span-10",
|
|
47641
|
-
12: "col-span-12"
|
|
47816
|
+
1: "md:col-span-1",
|
|
47817
|
+
2: "md:col-span-2",
|
|
47818
|
+
3: "md:col-span-3",
|
|
47819
|
+
4: "md:col-span-4",
|
|
47820
|
+
5: "md:col-span-5",
|
|
47821
|
+
6: "md:col-span-6",
|
|
47822
|
+
7: "md:col-span-7",
|
|
47823
|
+
8: "md:col-span-8",
|
|
47824
|
+
9: "md:col-span-9",
|
|
47825
|
+
10: "md:col-span-10",
|
|
47826
|
+
12: "md:col-span-12"
|
|
47642
47827
|
};
|
|
47643
47828
|
var detailsColSpanClass = {
|
|
47644
|
-
1: "col-span-1",
|
|
47645
|
-
2: "col-span-2",
|
|
47646
|
-
3: "col-span-3",
|
|
47647
|
-
4: "col-span-4",
|
|
47648
|
-
5: "col-span-5",
|
|
47649
|
-
6: "col-span-6",
|
|
47650
|
-
7: "col-span-7",
|
|
47651
|
-
8: "col-span-8",
|
|
47652
|
-
9: "col-span-9",
|
|
47653
|
-
10: "col-span-10",
|
|
47654
|
-
11: "col-span-11",
|
|
47655
|
-
12: "col-span-12"
|
|
47829
|
+
1: "md:col-span-1",
|
|
47830
|
+
2: "md:col-span-2",
|
|
47831
|
+
3: "md:col-span-3",
|
|
47832
|
+
4: "md:col-span-4",
|
|
47833
|
+
5: "md:col-span-5",
|
|
47834
|
+
6: "md:col-span-6",
|
|
47835
|
+
7: "md:col-span-7",
|
|
47836
|
+
8: "md:col-span-8",
|
|
47837
|
+
9: "md:col-span-9",
|
|
47838
|
+
10: "md:col-span-10",
|
|
47839
|
+
11: "md:col-span-11",
|
|
47840
|
+
12: "md:col-span-12"
|
|
47656
47841
|
};
|
|
47657
47842
|
function pickSelectedId({
|
|
47658
47843
|
data: data2,
|
|
@@ -47738,8 +47923,9 @@ function ListDetails({
|
|
|
47738
47923
|
"div",
|
|
47739
47924
|
{
|
|
47740
47925
|
className: cn(
|
|
47741
|
-
|
|
47742
|
-
|
|
47926
|
+
// Below `md`: one column, the item strip above the details.
|
|
47927
|
+
"grid grid-cols-1 gap-4 md:grid-cols-12",
|
|
47928
|
+
isFixedHeight ? "h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] md:grid-rows-[minmax(0,1fr)]" : "md:min-h-[16rem]"
|
|
47743
47929
|
),
|
|
47744
47930
|
children: [
|
|
47745
47931
|
/* @__PURE__ */ jsxs(
|
|
@@ -47747,11 +47933,20 @@ function ListDetails({
|
|
|
47747
47933
|
{
|
|
47748
47934
|
className: cn(
|
|
47749
47935
|
"items-list-wrapper flex min-h-0 flex-col gap-3",
|
|
47750
|
-
isFixedHeight && "h-full",
|
|
47936
|
+
isFixedHeight && "md:h-full",
|
|
47751
47937
|
panelColSpanClass[titleListPanelColumnWidth]
|
|
47752
47938
|
),
|
|
47753
47939
|
children: [
|
|
47754
|
-
/* @__PURE__ */ jsx(
|
|
47940
|
+
/* @__PURE__ */ jsx(
|
|
47941
|
+
ListDetailsItemStrip,
|
|
47942
|
+
{
|
|
47943
|
+
data: data2,
|
|
47944
|
+
selectedId,
|
|
47945
|
+
onSelect: handleSelect,
|
|
47946
|
+
className: "md:hidden"
|
|
47947
|
+
}
|
|
47948
|
+
),
|
|
47949
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "items-list-container hidden min-h-0 flex-1 rounded-md border border-border md:block", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: data2.map((item) => {
|
|
47755
47950
|
const isSelected = selectedId === item.id;
|
|
47756
47951
|
const isStringTitle = typeof item.title === "string";
|
|
47757
47952
|
if (!isStringTitle) {
|
|
@@ -47790,7 +47985,10 @@ function ListDetails({
|
|
|
47790
47985
|
item.id
|
|
47791
47986
|
);
|
|
47792
47987
|
}) }) }),
|
|
47793
|
-
footer != null ?
|
|
47988
|
+
footer != null ? (
|
|
47989
|
+
// Hidden on small screens, where the strip leaves no room for it.
|
|
47990
|
+
/* @__PURE__ */ jsx("div", { className: "items-list-footer hidden shrink-0 md:block", children: footer })
|
|
47991
|
+
) : null
|
|
47794
47992
|
]
|
|
47795
47993
|
}
|
|
47796
47994
|
),
|
|
@@ -47983,8 +48181,8 @@ function NavBarMobileMenu({
|
|
|
47983
48181
|
title,
|
|
47984
48182
|
colorClasses
|
|
47985
48183
|
}) {
|
|
47986
|
-
const [expandedId, setExpandedId] =
|
|
47987
|
-
|
|
48184
|
+
const [expandedId, setExpandedId] = React11.useState(null);
|
|
48185
|
+
React11.useEffect(() => {
|
|
47988
48186
|
if (!open) setExpandedId(null);
|
|
47989
48187
|
}, [open]);
|
|
47990
48188
|
const handleItemClick = (item) => {
|
|
@@ -48166,7 +48364,7 @@ function NavBar({
|
|
|
48166
48364
|
}) {
|
|
48167
48365
|
const isMobile = useIsMobile();
|
|
48168
48366
|
const resolvedColor = resolveNavColor(color);
|
|
48169
|
-
const navRef =
|
|
48367
|
+
const navRef = React11.useRef(null);
|
|
48170
48368
|
const [activeId, setActiveId] = useControlledState({
|
|
48171
48369
|
value: activeIdProp,
|
|
48172
48370
|
defaultValue: defaultActiveId,
|
|
@@ -48177,8 +48375,8 @@ function NavBar({
|
|
|
48177
48375
|
defaultValue: null,
|
|
48178
48376
|
onChange: onDetailsPanelChange
|
|
48179
48377
|
});
|
|
48180
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
48181
|
-
const [navRect, setNavRect] =
|
|
48378
|
+
const [mobileMenuOpen, setMobileMenuOpen] = React11.useState(false);
|
|
48379
|
+
const [navRect, setNavRect] = React11.useState({ bottom: 0, width: 0, left: 0 });
|
|
48182
48380
|
const {
|
|
48183
48381
|
containerRef,
|
|
48184
48382
|
measureRef,
|
|
@@ -48193,7 +48391,7 @@ function NavBar({
|
|
|
48193
48391
|
threshold: morphScrollThreshold,
|
|
48194
48392
|
scrollContainerRef: morphScrollContainer
|
|
48195
48393
|
});
|
|
48196
|
-
|
|
48394
|
+
React11.useEffect(() => {
|
|
48197
48395
|
if (!openDetailsId || !navRef.current) return;
|
|
48198
48396
|
const updateRect = () => {
|
|
48199
48397
|
if (navRef.current) {
|
|
@@ -48209,7 +48407,7 @@ function NavBar({
|
|
|
48209
48407
|
window.removeEventListener("resize", updateRect);
|
|
48210
48408
|
};
|
|
48211
48409
|
}, [openDetailsId]);
|
|
48212
|
-
|
|
48410
|
+
React11.useEffect(() => {
|
|
48213
48411
|
if (!openDetailsId) return;
|
|
48214
48412
|
const handleKeyDown = (e) => {
|
|
48215
48413
|
if (e.key === "Escape") {
|
|
@@ -48219,7 +48417,7 @@ function NavBar({
|
|
|
48219
48417
|
document.addEventListener("keydown", handleKeyDown);
|
|
48220
48418
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
48221
48419
|
}, [openDetailsId, setOpenDetailsId]);
|
|
48222
|
-
|
|
48420
|
+
React11.useEffect(() => {
|
|
48223
48421
|
if (!openDetailsId) return;
|
|
48224
48422
|
const handleMouseDown = (e) => {
|
|
48225
48423
|
if (navRef.current && !navRef.current.contains(e.target)) {
|
|
@@ -48229,7 +48427,7 @@ function NavBar({
|
|
|
48229
48427
|
document.addEventListener("mousedown", handleMouseDown);
|
|
48230
48428
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
48231
48429
|
}, [openDetailsId, setOpenDetailsId]);
|
|
48232
|
-
const handleItemClick =
|
|
48430
|
+
const handleItemClick = React11.useCallback(
|
|
48233
48431
|
(item) => {
|
|
48234
48432
|
item.onClick?.();
|
|
48235
48433
|
setActiveId(item.id);
|
|
@@ -48241,16 +48439,16 @@ function NavBar({
|
|
|
48241
48439
|
},
|
|
48242
48440
|
[openDetailsId, setActiveId, setOpenDetailsId]
|
|
48243
48441
|
);
|
|
48244
|
-
|
|
48442
|
+
React11.useEffect(() => {
|
|
48245
48443
|
if (isMobile) setOpenDetailsId(null);
|
|
48246
48444
|
}, [isMobile, setOpenDetailsId]);
|
|
48247
48445
|
const resolvedHeight = height2 ?? "var(--espd-navbar-height)";
|
|
48248
48446
|
const activeDetailsItem = openDetailsId ? items.find((i) => i.id === openDetailsId) : void 0;
|
|
48249
|
-
const [overflowDetailsItem, setOverflowDetailsItem] =
|
|
48250
|
-
const overflowDetailsRef =
|
|
48251
|
-
const moreButtonRef =
|
|
48252
|
-
const [overflowPanelPos, setOverflowPanelPos] =
|
|
48253
|
-
|
|
48447
|
+
const [overflowDetailsItem, setOverflowDetailsItem] = React11.useState(null);
|
|
48448
|
+
const overflowDetailsRef = React11.useRef(null);
|
|
48449
|
+
const moreButtonRef = React11.useRef(null);
|
|
48450
|
+
const [overflowPanelPos, setOverflowPanelPos] = React11.useState({ top: 0, right: 0 });
|
|
48451
|
+
React11.useEffect(() => {
|
|
48254
48452
|
if (!overflowDetailsItem || !moreButtonRef.current) return;
|
|
48255
48453
|
const rect = moreButtonRef.current.getBoundingClientRect();
|
|
48256
48454
|
setOverflowPanelPos({
|
|
@@ -48258,7 +48456,7 @@ function NavBar({
|
|
|
48258
48456
|
right: window.innerWidth - rect.right
|
|
48259
48457
|
});
|
|
48260
48458
|
}, [overflowDetailsItem]);
|
|
48261
|
-
|
|
48459
|
+
React11.useEffect(() => {
|
|
48262
48460
|
if (!overflowDetailsItem) return;
|
|
48263
48461
|
const handleMouseDown = (e) => {
|
|
48264
48462
|
if (overflowDetailsRef.current && !overflowDetailsRef.current.contains(e.target) && moreButtonRef.current && !moreButtonRef.current.contains(e.target)) {
|
|
@@ -48539,7 +48737,7 @@ function NavBar({
|
|
|
48539
48737
|
}
|
|
48540
48738
|
);
|
|
48541
48739
|
}
|
|
48542
|
-
var MoreButton =
|
|
48740
|
+
var MoreButton = React11.forwardRef(function MoreButton2({ label, hasActiveOverflowItem, resolvedColor, ...props }, ref) {
|
|
48543
48741
|
return /* @__PURE__ */ jsxs(
|
|
48544
48742
|
"button",
|
|
48545
48743
|
{
|
|
@@ -48673,7 +48871,7 @@ var triggerSizeClasses = {
|
|
|
48673
48871
|
lg: "h-12 px-5 text-lg"
|
|
48674
48872
|
};
|
|
48675
48873
|
var triggerIconClassName = "size-4 shrink-0 opacity-50";
|
|
48676
|
-
var SelectTrigger =
|
|
48874
|
+
var SelectTrigger = React11.forwardRef(
|
|
48677
48875
|
({
|
|
48678
48876
|
className,
|
|
48679
48877
|
children,
|
|
@@ -48687,7 +48885,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
48687
48885
|
"aria-describedby": ariaDescribedBy,
|
|
48688
48886
|
...props
|
|
48689
48887
|
}, ref) => {
|
|
48690
|
-
const autoId =
|
|
48888
|
+
const autoId = React11.useId();
|
|
48691
48889
|
const hasEnhancedProps = label !== void 0 || required !== void 0 || hintContent !== void 0 || error !== void 0 || errorContent !== void 0;
|
|
48692
48890
|
const hasError = error || !!errorContent;
|
|
48693
48891
|
const triggerId = id ?? (hasEnhancedProps ? autoId : void 0);
|
|
@@ -48740,7 +48938,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
48740
48938
|
}
|
|
48741
48939
|
);
|
|
48742
48940
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
48743
|
-
var SelectScrollUpButton =
|
|
48941
|
+
var SelectScrollUpButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48744
48942
|
SelectPrimitive.ScrollUpButton,
|
|
48745
48943
|
{
|
|
48746
48944
|
ref,
|
|
@@ -48753,7 +48951,7 @@ var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) =>
|
|
|
48753
48951
|
}
|
|
48754
48952
|
));
|
|
48755
48953
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
48756
|
-
var SelectScrollDownButton =
|
|
48954
|
+
var SelectScrollDownButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48757
48955
|
SelectPrimitive.ScrollDownButton,
|
|
48758
48956
|
{
|
|
48759
48957
|
ref,
|
|
@@ -48766,7 +48964,7 @@ var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) =
|
|
|
48766
48964
|
}
|
|
48767
48965
|
));
|
|
48768
48966
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
48769
|
-
var SelectContent =
|
|
48967
|
+
var SelectContent = React11.forwardRef(({ className, children, position: position2 = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
48770
48968
|
SelectPrimitive.Content,
|
|
48771
48969
|
{
|
|
48772
48970
|
ref,
|
|
@@ -48794,7 +48992,7 @@ var SelectContent = React10.forwardRef(({ className, children, position: positio
|
|
|
48794
48992
|
}
|
|
48795
48993
|
) }));
|
|
48796
48994
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
48797
|
-
var SelectLabel =
|
|
48995
|
+
var SelectLabel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48798
48996
|
SelectPrimitive.Label,
|
|
48799
48997
|
{
|
|
48800
48998
|
ref,
|
|
@@ -48803,7 +49001,7 @@ var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
48803
49001
|
}
|
|
48804
49002
|
));
|
|
48805
49003
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
48806
|
-
var SelectItem =
|
|
49004
|
+
var SelectItem = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
48807
49005
|
SelectPrimitive.Item,
|
|
48808
49006
|
{
|
|
48809
49007
|
ref,
|
|
@@ -48819,7 +49017,7 @@ var SelectItem = React10.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
48819
49017
|
}
|
|
48820
49018
|
));
|
|
48821
49019
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
48822
|
-
var SelectSeparator =
|
|
49020
|
+
var SelectSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48823
49021
|
SelectPrimitive.Separator,
|
|
48824
49022
|
{
|
|
48825
49023
|
ref,
|
|
@@ -48836,13 +49034,13 @@ function Tabs({
|
|
|
48836
49034
|
children,
|
|
48837
49035
|
...props
|
|
48838
49036
|
}) {
|
|
48839
|
-
const [activeValue, setActiveValue] =
|
|
49037
|
+
const [activeValue, setActiveValue] = React11.useState(
|
|
48840
49038
|
defaultValue
|
|
48841
49039
|
);
|
|
48842
|
-
const triggersRef =
|
|
48843
|
-
const initialSet =
|
|
49040
|
+
const triggersRef = React11.useRef(/* @__PURE__ */ new Map());
|
|
49041
|
+
const initialSet = React11.useRef(false);
|
|
48844
49042
|
const isControlled = value2 !== void 0;
|
|
48845
|
-
|
|
49043
|
+
React11.useEffect(() => {
|
|
48846
49044
|
if (!isControlled && activeValue === void 0 && triggersRef.current.size > 0 && !initialSet.current) {
|
|
48847
49045
|
const firstTab = triggersRef.current.keys().next().value;
|
|
48848
49046
|
if (firstTab !== void 0) {
|
|
@@ -48851,7 +49049,7 @@ function Tabs({
|
|
|
48851
49049
|
}
|
|
48852
49050
|
}
|
|
48853
49051
|
}, [activeValue, isControlled]);
|
|
48854
|
-
const registerTrigger =
|
|
49052
|
+
const registerTrigger = React11.useCallback(
|
|
48855
49053
|
(val2, node) => {
|
|
48856
49054
|
if (node) {
|
|
48857
49055
|
triggersRef.current.set(val2, node);
|
|
@@ -48865,7 +49063,7 @@ function Tabs({
|
|
|
48865
49063
|
},
|
|
48866
49064
|
[activeValue, isControlled]
|
|
48867
49065
|
);
|
|
48868
|
-
const handleValueChange =
|
|
49066
|
+
const handleValueChange = React11.useCallback(
|
|
48869
49067
|
(val2) => {
|
|
48870
49068
|
if (!isControlled) setActiveValue(val2);
|
|
48871
49069
|
else onValueChange?.(val2);
|
|
@@ -48914,9 +49112,9 @@ function TabsTrigger({
|
|
|
48914
49112
|
...props
|
|
48915
49113
|
}) {
|
|
48916
49114
|
const { activeValue, handleValueChange, registerTrigger } = useTabs();
|
|
48917
|
-
const localRef =
|
|
48918
|
-
|
|
48919
|
-
|
|
49115
|
+
const localRef = React11.useRef(null);
|
|
49116
|
+
React11.useImperativeHandle(ref, () => localRef.current);
|
|
49117
|
+
React11.useEffect(() => {
|
|
48920
49118
|
registerTrigger(value2, localRef.current);
|
|
48921
49119
|
return () => registerTrigger(value2, null);
|
|
48922
49120
|
}, [value2, registerTrigger]);
|
|
@@ -48945,15 +49143,15 @@ function TabsContents({
|
|
|
48945
49143
|
...props
|
|
48946
49144
|
}) {
|
|
48947
49145
|
const { activeValue } = useTabs();
|
|
48948
|
-
const childrenArray =
|
|
49146
|
+
const childrenArray = React11.Children.toArray(children);
|
|
48949
49147
|
const activeIndex = childrenArray.findIndex(
|
|
48950
|
-
(child) =>
|
|
49148
|
+
(child) => React11.isValidElement(child) && typeof child.props === "object" && child.props !== null && "value" in child.props && child.props.value === activeValue
|
|
48951
49149
|
);
|
|
48952
|
-
const containerRef =
|
|
48953
|
-
const itemRefs =
|
|
48954
|
-
const [height2, setHeight] =
|
|
48955
|
-
const roRef =
|
|
48956
|
-
const measure =
|
|
49150
|
+
const containerRef = React11.useRef(null);
|
|
49151
|
+
const itemRefs = React11.useRef([]);
|
|
49152
|
+
const [height2, setHeight] = React11.useState(0);
|
|
49153
|
+
const roRef = React11.useRef(null);
|
|
49154
|
+
const measure = React11.useCallback((index2) => {
|
|
48957
49155
|
const pane = itemRefs.current[index2];
|
|
48958
49156
|
const container = containerRef.current;
|
|
48959
49157
|
if (!pane || !container) return 0;
|
|
@@ -48967,7 +49165,7 @@ function TabsContents({
|
|
|
48967
49165
|
total = Math.ceil(total * dpr) / dpr;
|
|
48968
49166
|
return total;
|
|
48969
49167
|
}, []);
|
|
48970
|
-
|
|
49168
|
+
React11.useEffect(() => {
|
|
48971
49169
|
if (roRef.current) {
|
|
48972
49170
|
roRef.current.disconnect();
|
|
48973
49171
|
roRef.current = null;
|
|
@@ -48988,7 +49186,7 @@ function TabsContents({
|
|
|
48988
49186
|
roRef.current = null;
|
|
48989
49187
|
};
|
|
48990
49188
|
}, [activeIndex, childrenArray.length, measure]);
|
|
48991
|
-
|
|
49189
|
+
React11.useLayoutEffect(() => {
|
|
48992
49190
|
if (height2 === 0 && activeIndex >= 0) {
|
|
48993
49191
|
const next = measure(activeIndex);
|
|
48994
49192
|
if (next !== 0) setHeight(next);
|
|
@@ -49049,40 +49247,117 @@ function TabsContent({
|
|
|
49049
49247
|
}
|
|
49050
49248
|
);
|
|
49051
49249
|
}
|
|
49052
|
-
var TabsListVariantContext =
|
|
49053
|
-
|
|
49054
|
-
|
|
49055
|
-
|
|
49056
|
-
|
|
49250
|
+
var TabsListVariantContext = React11.createContext(void 0);
|
|
49251
|
+
var TABS_LIST_VARIANTS = {
|
|
49252
|
+
default: {
|
|
49253
|
+
highlight: {
|
|
49254
|
+
mode: "parent",
|
|
49255
|
+
className: "absolute z-0 inset-0 rounded-md bg-primary/10"
|
|
49256
|
+
},
|
|
49257
|
+
list: "bg-transparent text-muted-foreground inline-flex h-auto w-fit items-center justify-center rounded-md p-1 border border-primary/30"
|
|
49258
|
+
},
|
|
49259
|
+
line: {
|
|
49260
|
+
highlight: {
|
|
49057
49261
|
mode: "parent",
|
|
49058
49262
|
variant: "line",
|
|
49059
49263
|
lineHeight: 2,
|
|
49060
49264
|
boundsOffset: { top: 2 },
|
|
49061
|
-
className: "absolute z-0 bg-primary rounded-none"
|
|
49062
|
-
|
|
49063
|
-
|
|
49064
|
-
|
|
49065
|
-
|
|
49066
|
-
|
|
49067
|
-
|
|
49068
|
-
|
|
49069
|
-
|
|
49070
|
-
|
|
49071
|
-
|
|
49072
|
-
|
|
49265
|
+
className: "absolute z-0 bg-primary rounded-none"
|
|
49266
|
+
},
|
|
49267
|
+
list: "text-muted-foreground inline-flex h-auto w-fit items-center justify-center gap-1 border-b border-border"
|
|
49268
|
+
},
|
|
49269
|
+
rounded: {
|
|
49270
|
+
highlight: {
|
|
49271
|
+
mode: "parent",
|
|
49272
|
+
className: "absolute z-0 inset-0 rounded-full bg-primary/10"
|
|
49273
|
+
},
|
|
49274
|
+
list: "bg-transparent text-muted-foreground inline-flex h-auto w-fit items-center justify-center rounded-full p-1 border border-primary/30"
|
|
49275
|
+
}
|
|
49276
|
+
};
|
|
49277
|
+
var EDGE_SIZE2 = 40;
|
|
49278
|
+
function prefersReducedMotion2() {
|
|
49279
|
+
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
49280
|
+
}
|
|
49281
|
+
function useTabsOverflow(scrollerRef, enabled) {
|
|
49282
|
+
const { activeValue } = useTabs();
|
|
49283
|
+
const revealActive = React11.useCallback(
|
|
49284
|
+
(behavior) => {
|
|
49285
|
+
const scroller = scrollerRef.current;
|
|
49286
|
+
if (!scroller) return;
|
|
49287
|
+
const trigger = scroller.querySelector(
|
|
49288
|
+
'[role="tab"][data-state="active"]'
|
|
49289
|
+
);
|
|
49290
|
+
if (!trigger) return;
|
|
49291
|
+
const scrollerRect = scroller.getBoundingClientRect();
|
|
49292
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
49293
|
+
const overStart = triggerRect.left - (scrollerRect.left + EDGE_SIZE2);
|
|
49294
|
+
const overEnd = triggerRect.right - (scrollerRect.right - EDGE_SIZE2);
|
|
49295
|
+
let delta = 0;
|
|
49296
|
+
if (overStart < 0) delta = overStart;
|
|
49297
|
+
else if (overEnd > 0) delta = Math.min(overEnd, overStart);
|
|
49298
|
+
if (Math.abs(delta) >= 1) scroller.scrollBy({ left: delta, behavior });
|
|
49299
|
+
},
|
|
49300
|
+
[scrollerRef]
|
|
49073
49301
|
);
|
|
49302
|
+
const overflow = useScrollOverflow(scrollerRef, {
|
|
49303
|
+
enabled,
|
|
49304
|
+
// Not the highlight: it resizes while animating and would cancel smooth scrolls.
|
|
49305
|
+
getContent: (scroller) => scroller.querySelector('[data-slot="tabs-list"]'),
|
|
49306
|
+
onResize: () => revealActive("auto")
|
|
49307
|
+
});
|
|
49308
|
+
const mountedRef = React11.useRef(false);
|
|
49309
|
+
React11.useEffect(() => {
|
|
49310
|
+
if (!enabled || activeValue === void 0) return;
|
|
49311
|
+
const instant = !mountedRef.current || prefersReducedMotion2();
|
|
49312
|
+
mountedRef.current = true;
|
|
49313
|
+
revealActive(instant ? "auto" : "smooth");
|
|
49314
|
+
}, [enabled, activeValue, revealActive]);
|
|
49315
|
+
const scrollByPage = React11.useCallback(
|
|
49316
|
+
(direction) => {
|
|
49317
|
+
const scroller = scrollerRef.current;
|
|
49318
|
+
if (!scroller) return;
|
|
49319
|
+
scroller.scrollBy({
|
|
49320
|
+
left: direction * scroller.clientWidth * 0.8,
|
|
49321
|
+
behavior: prefersReducedMotion2() ? "auto" : "smooth"
|
|
49322
|
+
});
|
|
49323
|
+
},
|
|
49324
|
+
[scrollerRef]
|
|
49325
|
+
);
|
|
49326
|
+
return { overflow, scrollByPage };
|
|
49074
49327
|
}
|
|
49075
|
-
function
|
|
49076
|
-
|
|
49328
|
+
function fadeMask2(start, end) {
|
|
49329
|
+
if (!start && !end) return {};
|
|
49330
|
+
const from = start ? `transparent, #000 ${EDGE_SIZE2}px` : "#000";
|
|
49331
|
+
const to = end ? `#000 calc(100% - ${EDGE_SIZE2}px), transparent` : "#000";
|
|
49332
|
+
const image = `linear-gradient(to right, ${from}, ${to})`;
|
|
49333
|
+
return { maskImage: image, WebkitMaskImage: image };
|
|
49334
|
+
}
|
|
49335
|
+
var scrollButtonClass = "absolute top-1/2 z-10 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-sm transition-colors hover:text-foreground [@media(pointer:coarse)]:hidden";
|
|
49336
|
+
function TabsListContent({
|
|
49337
|
+
variant,
|
|
49338
|
+
className,
|
|
49339
|
+
...props
|
|
49340
|
+
}) {
|
|
49341
|
+
const config = TABS_LIST_VARIANTS[variant];
|
|
49342
|
+
const scrollerRef = React11.useRef(null);
|
|
49343
|
+
const scrollable = props["aria-orientation"] !== "vertical";
|
|
49344
|
+
const { overflow, scrollByPage } = useTabsOverflow(scrollerRef, scrollable);
|
|
49345
|
+
const list = /* @__PURE__ */ jsx(
|
|
49077
49346
|
TabsHighlight,
|
|
49078
49347
|
{
|
|
49079
|
-
|
|
49080
|
-
|
|
49348
|
+
ref: scrollerRef,
|
|
49349
|
+
containerClassName: scrollable ? (
|
|
49350
|
+
// Vertical padding (offset by negative margin) keeps focus rings and the
|
|
49351
|
+
// line indicator from being clipped by the scroll container.
|
|
49352
|
+
"flex -my-1 py-1 overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
49353
|
+
) : void 0,
|
|
49354
|
+
...config.highlight,
|
|
49081
49355
|
children: /* @__PURE__ */ jsx(
|
|
49082
49356
|
TabsList,
|
|
49083
49357
|
{
|
|
49084
49358
|
className: cn(
|
|
49085
|
-
|
|
49359
|
+
config.list,
|
|
49360
|
+
scrollable && "shrink-0 min-w-fit",
|
|
49086
49361
|
className
|
|
49087
49362
|
),
|
|
49088
49363
|
...props
|
|
@@ -49090,31 +49365,42 @@ function DefaultTabsListContent({ className, ...props }) {
|
|
|
49090
49365
|
)
|
|
49091
49366
|
}
|
|
49092
49367
|
);
|
|
49093
|
-
|
|
49094
|
-
|
|
49095
|
-
|
|
49096
|
-
TabsHighlight,
|
|
49368
|
+
if (!scrollable) return list;
|
|
49369
|
+
return /* @__PURE__ */ jsxs(
|
|
49370
|
+
"div",
|
|
49097
49371
|
{
|
|
49098
|
-
|
|
49099
|
-
|
|
49100
|
-
|
|
49101
|
-
|
|
49102
|
-
|
|
49103
|
-
|
|
49104
|
-
|
|
49105
|
-
|
|
49106
|
-
|
|
49107
|
-
|
|
49108
|
-
|
|
49109
|
-
|
|
49372
|
+
"data-slot": "tabs-list-scroller",
|
|
49373
|
+
"data-overflow-start": overflow.start || void 0,
|
|
49374
|
+
"data-overflow-end": overflow.end || void 0,
|
|
49375
|
+
className: "relative min-w-0 max-w-full",
|
|
49376
|
+
children: [
|
|
49377
|
+
/* @__PURE__ */ jsx("div", { style: fadeMask2(overflow.start, overflow.end), children: list }),
|
|
49378
|
+
overflow.start && /* @__PURE__ */ jsx(
|
|
49379
|
+
"button",
|
|
49380
|
+
{
|
|
49381
|
+
type: "button",
|
|
49382
|
+
tabIndex: -1,
|
|
49383
|
+
"aria-hidden": true,
|
|
49384
|
+
className: cn(scrollButtonClass, "left-0"),
|
|
49385
|
+
onClick: () => scrollByPage(-1),
|
|
49386
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
|
|
49387
|
+
}
|
|
49388
|
+
),
|
|
49389
|
+
overflow.end && /* @__PURE__ */ jsx(
|
|
49390
|
+
"button",
|
|
49391
|
+
{
|
|
49392
|
+
type: "button",
|
|
49393
|
+
tabIndex: -1,
|
|
49394
|
+
"aria-hidden": true,
|
|
49395
|
+
className: cn(scrollButtonClass, "right-0"),
|
|
49396
|
+
onClick: () => scrollByPage(1),
|
|
49397
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
|
|
49398
|
+
}
|
|
49399
|
+
)
|
|
49400
|
+
]
|
|
49110
49401
|
}
|
|
49111
49402
|
);
|
|
49112
49403
|
}
|
|
49113
|
-
var TABS_LIST_VARIANTS = {
|
|
49114
|
-
default: DefaultTabsListContent,
|
|
49115
|
-
line: LineTabsListContent,
|
|
49116
|
-
rounded: RoundedTabsListContent
|
|
49117
|
-
};
|
|
49118
49404
|
function Tabs2({ className, ...props }) {
|
|
49119
49405
|
return /* @__PURE__ */ jsx(
|
|
49120
49406
|
Tabs,
|
|
@@ -49124,13 +49410,12 @@ function Tabs2({ className, ...props }) {
|
|
|
49124
49410
|
}
|
|
49125
49411
|
);
|
|
49126
49412
|
}
|
|
49127
|
-
function TabsList2({
|
|
49128
|
-
|
|
49129
|
-
return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(Content2, { className, ...props }) });
|
|
49413
|
+
function TabsList2({ variant, ...props }) {
|
|
49414
|
+
return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(TabsListContent, { variant: variant ?? "default", ...props }) });
|
|
49130
49415
|
}
|
|
49131
49416
|
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";
|
|
49132
49417
|
function TabsTrigger2({ className, ...props }) {
|
|
49133
|
-
const listVariant =
|
|
49418
|
+
const listVariant = React11.useContext(TabsListVariantContext);
|
|
49134
49419
|
const isLine = listVariant === "line";
|
|
49135
49420
|
return /* @__PURE__ */ jsx(TabsHighlightItem, { value: props.value, className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
49136
49421
|
TabsTrigger,
|
|
@@ -49163,7 +49448,7 @@ function extractTextLabel(children) {
|
|
|
49163
49448
|
if (Array.isArray(children)) {
|
|
49164
49449
|
return children.map(extractTextLabel).join("");
|
|
49165
49450
|
}
|
|
49166
|
-
if (
|
|
49451
|
+
if (React11.isValidElement(children) && children.props && typeof children.props === "object" && children.props !== null && "children" in children.props) {
|
|
49167
49452
|
return extractTextLabel(
|
|
49168
49453
|
children.props.children
|
|
49169
49454
|
);
|
|
@@ -49171,13 +49456,13 @@ function extractTextLabel(children) {
|
|
|
49171
49456
|
return "";
|
|
49172
49457
|
}
|
|
49173
49458
|
function isTabElement(node) {
|
|
49174
|
-
return
|
|
49459
|
+
return React11.isValidElement(node) && node.type === ScrollableSectionsTab;
|
|
49175
49460
|
}
|
|
49176
49461
|
function partitionChildren(children) {
|
|
49177
49462
|
let tabsEl = null;
|
|
49178
49463
|
const contentEls = [];
|
|
49179
|
-
|
|
49180
|
-
if (!
|
|
49464
|
+
React11.Children.forEach(children, (child) => {
|
|
49465
|
+
if (!React11.isValidElement(child)) return;
|
|
49181
49466
|
if (child.type === ScrollableSectionsTabs) {
|
|
49182
49467
|
tabsEl = child;
|
|
49183
49468
|
} else if (child.type === ScrollableSectionsContent) {
|
|
@@ -49188,9 +49473,9 @@ function partitionChildren(children) {
|
|
|
49188
49473
|
});
|
|
49189
49474
|
return { tabsEl, contentEls };
|
|
49190
49475
|
}
|
|
49191
|
-
var ScrollableSectionsContext =
|
|
49476
|
+
var ScrollableSectionsContext = React11.createContext(null);
|
|
49192
49477
|
function useScrollableSections() {
|
|
49193
|
-
const ctx =
|
|
49478
|
+
const ctx = React11.useContext(ScrollableSectionsContext);
|
|
49194
49479
|
if (!ctx) {
|
|
49195
49480
|
throw new Error(
|
|
49196
49481
|
"ScrollableSections subcomponents must be used within ScrollableSections."
|
|
@@ -49237,19 +49522,19 @@ function ScrollableSectionsRoot({
|
|
|
49237
49522
|
...rest
|
|
49238
49523
|
}) {
|
|
49239
49524
|
const { tabsEl, contentEls } = partitionChildren(children);
|
|
49240
|
-
const [tabsItems, setTabsItems] =
|
|
49241
|
-
const [sectionsVersion, bumpSections] =
|
|
49525
|
+
const [tabsItems, setTabsItems] = React11.useState([]);
|
|
49526
|
+
const [sectionsVersion, bumpSections] = React11.useReducer(
|
|
49242
49527
|
(n) => n + 1,
|
|
49243
49528
|
0
|
|
49244
49529
|
);
|
|
49245
|
-
const sectionsRef =
|
|
49246
|
-
const containerRef =
|
|
49247
|
-
const mobileNavRef =
|
|
49248
|
-
const ignoreSpyUntil =
|
|
49249
|
-
const prefersReducedMotionRef =
|
|
49250
|
-
const didDefaultScrollRef =
|
|
49251
|
-
const [activeId, setActiveId] =
|
|
49252
|
-
|
|
49530
|
+
const sectionsRef = React11.useRef(/* @__PURE__ */ new Map());
|
|
49531
|
+
const containerRef = React11.useRef(null);
|
|
49532
|
+
const mobileNavRef = React11.useRef(null);
|
|
49533
|
+
const ignoreSpyUntil = React11.useRef(0);
|
|
49534
|
+
const prefersReducedMotionRef = React11.useRef(false);
|
|
49535
|
+
const didDefaultScrollRef = React11.useRef(false);
|
|
49536
|
+
const [activeId, setActiveId] = React11.useState(() => defaultValue ?? "");
|
|
49537
|
+
React11.useEffect(() => {
|
|
49253
49538
|
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
49254
49539
|
prefersReducedMotionRef.current = mq.matches;
|
|
49255
49540
|
const onChange = () => {
|
|
@@ -49259,7 +49544,7 @@ function ScrollableSectionsRoot({
|
|
|
49259
49544
|
return () => mq.removeEventListener("change", onChange);
|
|
49260
49545
|
}, []);
|
|
49261
49546
|
const safeActiveId = activeId && tabsItems.some((t) => t.id === activeId) ? activeId : tabsItems[0]?.id ?? "";
|
|
49262
|
-
const selectSection =
|
|
49547
|
+
const selectSection = React11.useCallback(
|
|
49263
49548
|
(id) => {
|
|
49264
49549
|
const el = sectionsRef.current.get(id);
|
|
49265
49550
|
if (!el) return;
|
|
@@ -49273,7 +49558,7 @@ function ScrollableSectionsRoot({
|
|
|
49273
49558
|
},
|
|
49274
49559
|
[]
|
|
49275
49560
|
);
|
|
49276
|
-
const registerSection =
|
|
49561
|
+
const registerSection = React11.useCallback(
|
|
49277
49562
|
(id, el) => {
|
|
49278
49563
|
if (el) sectionsRef.current.set(id, el);
|
|
49279
49564
|
else sectionsRef.current.delete(id);
|
|
@@ -49281,7 +49566,7 @@ function ScrollableSectionsRoot({
|
|
|
49281
49566
|
},
|
|
49282
49567
|
[]
|
|
49283
49568
|
);
|
|
49284
|
-
const setTabsItemsStable =
|
|
49569
|
+
const setTabsItemsStable = React11.useCallback(
|
|
49285
49570
|
(items) => {
|
|
49286
49571
|
setTabsItems(items);
|
|
49287
49572
|
setActiveId((prev) => {
|
|
@@ -49295,7 +49580,7 @@ function ScrollableSectionsRoot({
|
|
|
49295
49580
|
},
|
|
49296
49581
|
[defaultValue]
|
|
49297
49582
|
);
|
|
49298
|
-
|
|
49583
|
+
React11.useLayoutEffect(() => {
|
|
49299
49584
|
if (!defaultValue || didDefaultScrollRef.current) return;
|
|
49300
49585
|
const el = sectionsRef.current.get(defaultValue);
|
|
49301
49586
|
if (!el) return;
|
|
@@ -49305,7 +49590,7 @@ function ScrollableSectionsRoot({
|
|
|
49305
49590
|
setActiveId(defaultValue);
|
|
49306
49591
|
});
|
|
49307
49592
|
}, [defaultValue, sectionsVersion]);
|
|
49308
|
-
|
|
49593
|
+
React11.useEffect(() => {
|
|
49309
49594
|
const orderedIds = tabsItems.map((t) => t.id);
|
|
49310
49595
|
if (orderedIds.length === 0) return;
|
|
49311
49596
|
const updateActive = () => {
|
|
@@ -49338,7 +49623,7 @@ function ScrollableSectionsRoot({
|
|
|
49338
49623
|
window.removeEventListener("resize", updateActive);
|
|
49339
49624
|
};
|
|
49340
49625
|
}, [tabsItems, scrollRootRef, sectionsVersion]);
|
|
49341
|
-
const contextValue =
|
|
49626
|
+
const contextValue = React11.useMemo(
|
|
49342
49627
|
() => ({
|
|
49343
49628
|
activeId: safeActiveId,
|
|
49344
49629
|
selectSection,
|
|
@@ -49407,11 +49692,11 @@ function ScrollableSectionsTabs({
|
|
|
49407
49692
|
...rest
|
|
49408
49693
|
}) {
|
|
49409
49694
|
const { activeId, selectSection, setTabsItems } = useScrollableSections();
|
|
49410
|
-
const tabNodes =
|
|
49411
|
-
() =>
|
|
49695
|
+
const tabNodes = React11.useMemo(
|
|
49696
|
+
() => React11.Children.toArray(children).filter(isTabElement),
|
|
49412
49697
|
[children]
|
|
49413
49698
|
);
|
|
49414
|
-
const items =
|
|
49699
|
+
const items = React11.useMemo(
|
|
49415
49700
|
() => tabNodes.map((node) => {
|
|
49416
49701
|
const { id, label, children: tabChildren } = node.props;
|
|
49417
49702
|
const text2 = label?.trim() || extractTextLabel(tabChildren).trim() || id;
|
|
@@ -49419,7 +49704,7 @@ function ScrollableSectionsTabs({
|
|
|
49419
49704
|
}),
|
|
49420
49705
|
[tabNodes]
|
|
49421
49706
|
);
|
|
49422
|
-
|
|
49707
|
+
React11.useLayoutEffect(() => {
|
|
49423
49708
|
setTabsItems(items);
|
|
49424
49709
|
}, [items, setTabsItems]);
|
|
49425
49710
|
if (tabNodes.length === 0) {
|
|
@@ -49486,7 +49771,7 @@ function ScrollableSectionsContent({
|
|
|
49486
49771
|
...rest
|
|
49487
49772
|
}) {
|
|
49488
49773
|
const { registerSection } = useScrollableSections();
|
|
49489
|
-
const ref =
|
|
49774
|
+
const ref = React11.useCallback(
|
|
49490
49775
|
(node) => {
|
|
49491
49776
|
registerSection(id, node);
|
|
49492
49777
|
},
|
|
@@ -49517,15 +49802,15 @@ var ScrollableSections = Object.assign(ScrollableSectionsRoot, {
|
|
|
49517
49802
|
Content: ScrollableSectionsContent
|
|
49518
49803
|
});
|
|
49519
49804
|
var Form = FormProvider;
|
|
49520
|
-
var FormFieldContext =
|
|
49805
|
+
var FormFieldContext = React11.createContext(null);
|
|
49521
49806
|
var FormField = ({
|
|
49522
49807
|
...props
|
|
49523
49808
|
}) => {
|
|
49524
49809
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
49525
49810
|
};
|
|
49526
49811
|
var useFormField = () => {
|
|
49527
|
-
const fieldContext =
|
|
49528
|
-
const itemContext =
|
|
49812
|
+
const fieldContext = React11.useContext(FormFieldContext);
|
|
49813
|
+
const itemContext = React11.useContext(FormItemContext);
|
|
49529
49814
|
const { getFieldState, formState } = useFormContext();
|
|
49530
49815
|
if (!fieldContext) {
|
|
49531
49816
|
throw new Error("useFormField should be used within <FormField>");
|
|
@@ -49544,13 +49829,13 @@ var useFormField = () => {
|
|
|
49544
49829
|
...fieldState
|
|
49545
49830
|
};
|
|
49546
49831
|
};
|
|
49547
|
-
var FormItemContext =
|
|
49548
|
-
var FormItem =
|
|
49549
|
-
const id =
|
|
49832
|
+
var FormItemContext = React11.createContext(null);
|
|
49833
|
+
var FormItem = React11.forwardRef(({ className, ...props }, ref) => {
|
|
49834
|
+
const id = React11.useId();
|
|
49550
49835
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
49551
49836
|
});
|
|
49552
49837
|
FormItem.displayName = "FormItem";
|
|
49553
|
-
var FormLabel =
|
|
49838
|
+
var FormLabel = React11.forwardRef(({ className, ...props }, ref) => {
|
|
49554
49839
|
const { error, formItemId } = useFormField();
|
|
49555
49840
|
return /* @__PURE__ */ jsx(
|
|
49556
49841
|
Label,
|
|
@@ -49567,7 +49852,7 @@ var FormLabel = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
49567
49852
|
);
|
|
49568
49853
|
});
|
|
49569
49854
|
FormLabel.displayName = "FormLabel";
|
|
49570
|
-
var FormControl =
|
|
49855
|
+
var FormControl = React11.forwardRef(({ ...props }, ref) => {
|
|
49571
49856
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
49572
49857
|
return /* @__PURE__ */ jsx(
|
|
49573
49858
|
Slot,
|
|
@@ -49581,7 +49866,7 @@ var FormControl = React10.forwardRef(({ ...props }, ref) => {
|
|
|
49581
49866
|
);
|
|
49582
49867
|
});
|
|
49583
49868
|
FormControl.displayName = "FormControl";
|
|
49584
|
-
var FormDescription =
|
|
49869
|
+
var FormDescription = React11.forwardRef(({ className, ...props }, ref) => {
|
|
49585
49870
|
const { formDescriptionId } = useFormField();
|
|
49586
49871
|
return /* @__PURE__ */ jsx(
|
|
49587
49872
|
"p",
|
|
@@ -49594,7 +49879,7 @@ var FormDescription = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
49594
49879
|
);
|
|
49595
49880
|
});
|
|
49596
49881
|
FormDescription.displayName = "FormDescription";
|
|
49597
|
-
var FormMessage =
|
|
49882
|
+
var FormMessage = React11.forwardRef(({ className, children, ...props }, ref) => {
|
|
49598
49883
|
const { error, formMessageId } = useFormField();
|
|
49599
49884
|
const body = error ? String(error?.message ?? "") : children;
|
|
49600
49885
|
if (!body) {
|
|
@@ -49844,10 +50129,10 @@ var typographyDefaultElement = {
|
|
|
49844
50129
|
};
|
|
49845
50130
|
|
|
49846
50131
|
// src/components/typography/typography.tsx
|
|
49847
|
-
var Typography =
|
|
50132
|
+
var Typography = React11.forwardRef(
|
|
49848
50133
|
function Typography2({ variant = "body1", as, className, children, ...rest }, ref) {
|
|
49849
50134
|
const Component = as ?? typographyDefaultElement[variant];
|
|
49850
|
-
return
|
|
50135
|
+
return React11.createElement(
|
|
49851
50136
|
Component,
|
|
49852
50137
|
{
|
|
49853
50138
|
ref,
|
|
@@ -49920,7 +50205,7 @@ function mergeFiles(existing, incoming, multiple) {
|
|
|
49920
50205
|
}
|
|
49921
50206
|
return next;
|
|
49922
50207
|
}
|
|
49923
|
-
var FileUpload =
|
|
50208
|
+
var FileUpload = React11.forwardRef(
|
|
49924
50209
|
function FileUpload2({
|
|
49925
50210
|
className,
|
|
49926
50211
|
title = "Drag & drop files here",
|
|
@@ -49935,24 +50220,24 @@ var FileUpload = React10.forwardRef(
|
|
|
49935
50220
|
id,
|
|
49936
50221
|
...inputPropsRest
|
|
49937
50222
|
}, ref) {
|
|
49938
|
-
const autoId =
|
|
50223
|
+
const autoId = React11.useId();
|
|
49939
50224
|
const inputId = id ?? autoId;
|
|
49940
50225
|
const descriptionId = `${inputId}-description`;
|
|
49941
50226
|
const { ref: refFromRegister, ...inputAttrs } = inputPropsRest;
|
|
49942
50227
|
const isControlled = filesProp !== void 0;
|
|
49943
|
-
const innerRef =
|
|
49944
|
-
const filesRef =
|
|
49945
|
-
const dragDepthRef =
|
|
49946
|
-
const [internalFiles, setInternalFiles] =
|
|
49947
|
-
const [isDragging, setIsDragging] =
|
|
50228
|
+
const innerRef = React11.useRef(null);
|
|
50229
|
+
const filesRef = React11.useRef([]);
|
|
50230
|
+
const dragDepthRef = React11.useRef(0);
|
|
50231
|
+
const [internalFiles, setInternalFiles] = React11.useState([]);
|
|
50232
|
+
const [isDragging, setIsDragging] = React11.useState(false);
|
|
49948
50233
|
const listFiles = isControlled ? filesProp ?? [] : internalFiles;
|
|
49949
50234
|
filesRef.current = listFiles;
|
|
49950
|
-
|
|
50235
|
+
React11.useLayoutEffect(() => {
|
|
49951
50236
|
const input = innerRef.current;
|
|
49952
50237
|
if (!input) return;
|
|
49953
50238
|
syncInputFiles(input, listFiles);
|
|
49954
50239
|
}, [listFiles]);
|
|
49955
|
-
const setRefs =
|
|
50240
|
+
const setRefs = React11.useCallback(
|
|
49956
50241
|
(node) => {
|
|
49957
50242
|
innerRef.current = node;
|
|
49958
50243
|
assignRef(ref, node);
|
|
@@ -49960,7 +50245,7 @@ var FileUpload = React10.forwardRef(
|
|
|
49960
50245
|
},
|
|
49961
50246
|
[ref, refFromRegister]
|
|
49962
50247
|
);
|
|
49963
|
-
const applyFiles =
|
|
50248
|
+
const applyFiles = React11.useCallback(
|
|
49964
50249
|
(incoming) => {
|
|
49965
50250
|
const input = innerRef.current;
|
|
49966
50251
|
if (!input) return;
|
|
@@ -49979,7 +50264,7 @@ var FileUpload = React10.forwardRef(
|
|
|
49979
50264
|
},
|
|
49980
50265
|
[multiple, onChange, onFilesChange, isControlled]
|
|
49981
50266
|
);
|
|
49982
|
-
const handleInputChange =
|
|
50267
|
+
const handleInputChange = React11.useCallback(
|
|
49983
50268
|
(event) => {
|
|
49984
50269
|
const input = event.target;
|
|
49985
50270
|
const picked = filesFromList(input.files);
|
|
@@ -49999,7 +50284,7 @@ var FileUpload = React10.forwardRef(
|
|
|
49999
50284
|
},
|
|
50000
50285
|
[multiple, onChange, onFilesChange, isControlled]
|
|
50001
50286
|
);
|
|
50002
|
-
const removeAt =
|
|
50287
|
+
const removeAt = React11.useCallback(
|
|
50003
50288
|
(index2) => {
|
|
50004
50289
|
const input = innerRef.current;
|
|
50005
50290
|
if (!input) return;
|
|
@@ -50017,7 +50302,7 @@ var FileUpload = React10.forwardRef(
|
|
|
50017
50302
|
},
|
|
50018
50303
|
[onChange, onFilesChange, isControlled]
|
|
50019
50304
|
);
|
|
50020
|
-
const onDragEnter =
|
|
50305
|
+
const onDragEnter = React11.useCallback(
|
|
50021
50306
|
(e) => {
|
|
50022
50307
|
e.preventDefault();
|
|
50023
50308
|
e.stopPropagation();
|
|
@@ -50027,7 +50312,7 @@ var FileUpload = React10.forwardRef(
|
|
|
50027
50312
|
},
|
|
50028
50313
|
[disabled]
|
|
50029
50314
|
);
|
|
50030
|
-
const onDragLeave =
|
|
50315
|
+
const onDragLeave = React11.useCallback(
|
|
50031
50316
|
(e) => {
|
|
50032
50317
|
e.preventDefault();
|
|
50033
50318
|
e.stopPropagation();
|
|
@@ -50040,11 +50325,11 @@ var FileUpload = React10.forwardRef(
|
|
|
50040
50325
|
},
|
|
50041
50326
|
[disabled]
|
|
50042
50327
|
);
|
|
50043
|
-
const onDragOver =
|
|
50328
|
+
const onDragOver = React11.useCallback((e) => {
|
|
50044
50329
|
e.preventDefault();
|
|
50045
50330
|
e.stopPropagation();
|
|
50046
50331
|
}, []);
|
|
50047
|
-
const onDrop =
|
|
50332
|
+
const onDrop = React11.useCallback(
|
|
50048
50333
|
(e) => {
|
|
50049
50334
|
e.preventDefault();
|
|
50050
50335
|
e.stopPropagation();
|
|
@@ -50057,11 +50342,11 @@ var FileUpload = React10.forwardRef(
|
|
|
50057
50342
|
},
|
|
50058
50343
|
[applyFiles, disabled]
|
|
50059
50344
|
);
|
|
50060
|
-
const openFileDialog =
|
|
50345
|
+
const openFileDialog = React11.useCallback(() => {
|
|
50061
50346
|
if (disabled) return;
|
|
50062
50347
|
innerRef.current?.click();
|
|
50063
50348
|
}, [disabled]);
|
|
50064
|
-
const onDropZoneKeyDown =
|
|
50349
|
+
const onDropZoneKeyDown = React11.useCallback(
|
|
50065
50350
|
(e) => {
|
|
50066
50351
|
if (disabled) return;
|
|
50067
50352
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -50272,7 +50557,7 @@ function resolveBrowseTokens(color) {
|
|
|
50272
50557
|
style: { "--fi-accent": color }
|
|
50273
50558
|
};
|
|
50274
50559
|
}
|
|
50275
|
-
var FileInput =
|
|
50560
|
+
var FileInput = React11.forwardRef(
|
|
50276
50561
|
function FileInput2({
|
|
50277
50562
|
label,
|
|
50278
50563
|
required,
|
|
@@ -50302,25 +50587,25 @@ var FileInput = React10.forwardRef(
|
|
|
50302
50587
|
andMoreLabel = (n) => `and ${n} more`,
|
|
50303
50588
|
...restProps
|
|
50304
50589
|
}, ref) {
|
|
50305
|
-
const autoId =
|
|
50590
|
+
const autoId = React11.useId();
|
|
50306
50591
|
const inputId = id ?? autoId;
|
|
50307
50592
|
const effectiveSize = size ?? "default";
|
|
50308
50593
|
const hasError = error || !!errorContent;
|
|
50309
50594
|
const browseTokens = resolveBrowseTokens(color);
|
|
50310
50595
|
const { ref: refFromRegister, ...inputAttrs } = restProps;
|
|
50311
50596
|
const isControlled = filesProp !== void 0;
|
|
50312
|
-
const innerRef =
|
|
50313
|
-
const filesRef =
|
|
50314
|
-
const [internalFiles, setInternalFiles] =
|
|
50597
|
+
const innerRef = React11.useRef(null);
|
|
50598
|
+
const filesRef = React11.useRef([]);
|
|
50599
|
+
const [internalFiles, setInternalFiles] = React11.useState([]);
|
|
50315
50600
|
const listFiles = isControlled ? filesProp ?? [] : internalFiles;
|
|
50316
50601
|
filesRef.current = listFiles;
|
|
50317
50602
|
const hasFiles = listFiles.length > 0;
|
|
50318
|
-
|
|
50603
|
+
React11.useLayoutEffect(() => {
|
|
50319
50604
|
const input = innerRef.current;
|
|
50320
50605
|
if (!input) return;
|
|
50321
50606
|
syncInputFiles2(input, listFiles);
|
|
50322
50607
|
}, [listFiles]);
|
|
50323
|
-
const setRefs =
|
|
50608
|
+
const setRefs = React11.useCallback(
|
|
50324
50609
|
(node) => {
|
|
50325
50610
|
innerRef.current = node;
|
|
50326
50611
|
assignRef2(ref, node);
|
|
@@ -50328,7 +50613,7 @@ var FileInput = React10.forwardRef(
|
|
|
50328
50613
|
},
|
|
50329
50614
|
[ref, refFromRegister]
|
|
50330
50615
|
);
|
|
50331
|
-
const fireSyntheticChange =
|
|
50616
|
+
const fireSyntheticChange = React11.useCallback(
|
|
50332
50617
|
(input) => {
|
|
50333
50618
|
const synthetic = {
|
|
50334
50619
|
target: input,
|
|
@@ -50338,7 +50623,7 @@ var FileInput = React10.forwardRef(
|
|
|
50338
50623
|
},
|
|
50339
50624
|
[onChange]
|
|
50340
50625
|
);
|
|
50341
|
-
const handleInputChange =
|
|
50626
|
+
const handleInputChange = React11.useCallback(
|
|
50342
50627
|
(event) => {
|
|
50343
50628
|
const input = event.target;
|
|
50344
50629
|
const picked = filesFromList2(input.files);
|
|
@@ -50358,7 +50643,7 @@ var FileInput = React10.forwardRef(
|
|
|
50358
50643
|
},
|
|
50359
50644
|
[multiple, onChange, onFilesChange, isControlled]
|
|
50360
50645
|
);
|
|
50361
|
-
const clearFiles =
|
|
50646
|
+
const clearFiles = React11.useCallback(() => {
|
|
50362
50647
|
const input = innerRef.current;
|
|
50363
50648
|
if (!input) return;
|
|
50364
50649
|
syncInputFiles2(input, []);
|
|
@@ -50368,11 +50653,11 @@ var FileInput = React10.forwardRef(
|
|
|
50368
50653
|
onFilesChange?.([]);
|
|
50369
50654
|
fireSyntheticChange(input);
|
|
50370
50655
|
}, [isControlled, onFilesChange, fireSyntheticChange]);
|
|
50371
|
-
const openFileDialog =
|
|
50656
|
+
const openFileDialog = React11.useCallback(() => {
|
|
50372
50657
|
if (disabled || readOnly) return;
|
|
50373
50658
|
innerRef.current?.click();
|
|
50374
50659
|
}, [disabled, readOnly]);
|
|
50375
|
-
const onDisplayKeyDown =
|
|
50660
|
+
const onDisplayKeyDown = React11.useCallback(
|
|
50376
50661
|
(e) => {
|
|
50377
50662
|
if (disabled || readOnly) return;
|
|
50378
50663
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -50563,25 +50848,25 @@ function composeRefs(...refs) {
|
|
|
50563
50848
|
};
|
|
50564
50849
|
}
|
|
50565
50850
|
function useComposedRefs(...refs) {
|
|
50566
|
-
return
|
|
50851
|
+
return React11.useCallback(composeRefs(...refs), refs);
|
|
50567
50852
|
}
|
|
50568
50853
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
50569
50854
|
let defaultContexts = [];
|
|
50570
50855
|
function createContext32(rootComponentName, defaultContext) {
|
|
50571
|
-
const BaseContext =
|
|
50856
|
+
const BaseContext = React11.createContext(defaultContext);
|
|
50572
50857
|
BaseContext.displayName = rootComponentName + "Context";
|
|
50573
50858
|
const index2 = defaultContexts.length;
|
|
50574
50859
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
50575
50860
|
const Provider = (props) => {
|
|
50576
50861
|
const { scope, children, ...context } = props;
|
|
50577
50862
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
50578
|
-
const value2 =
|
|
50863
|
+
const value2 = React11.useMemo(() => context, Object.values(context));
|
|
50579
50864
|
return /* @__PURE__ */ jsx(Context.Provider, { value: value2, children });
|
|
50580
50865
|
};
|
|
50581
50866
|
Provider.displayName = rootComponentName + "Provider";
|
|
50582
50867
|
function useContext22(consumerName, scope) {
|
|
50583
50868
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
50584
|
-
const context =
|
|
50869
|
+
const context = React11.useContext(Context);
|
|
50585
50870
|
if (context) return context;
|
|
50586
50871
|
if (defaultContext !== void 0) return defaultContext;
|
|
50587
50872
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -50590,11 +50875,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
50590
50875
|
}
|
|
50591
50876
|
const createScope = () => {
|
|
50592
50877
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
50593
|
-
return
|
|
50878
|
+
return React11.createContext(defaultContext);
|
|
50594
50879
|
});
|
|
50595
50880
|
return function useScope(scope) {
|
|
50596
50881
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
50597
|
-
return
|
|
50882
|
+
return React11.useMemo(
|
|
50598
50883
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
50599
50884
|
[scope, contexts]
|
|
50600
50885
|
);
|
|
@@ -50617,7 +50902,7 @@ function composeContextScopes(...scopes) {
|
|
|
50617
50902
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
50618
50903
|
return { ...nextScopes2, ...currentScope };
|
|
50619
50904
|
}, {});
|
|
50620
|
-
return
|
|
50905
|
+
return React11.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
50621
50906
|
};
|
|
50622
50907
|
};
|
|
50623
50908
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -50631,9 +50916,9 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
50631
50916
|
}
|
|
50632
50917
|
};
|
|
50633
50918
|
}
|
|
50634
|
-
var useLayoutEffect22 = globalThis?.document ?
|
|
50919
|
+
var useLayoutEffect22 = globalThis?.document ? React11.useLayoutEffect : () => {
|
|
50635
50920
|
};
|
|
50636
|
-
var useInsertionEffect =
|
|
50921
|
+
var useInsertionEffect = React11[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
50637
50922
|
function useControllableState({
|
|
50638
50923
|
prop,
|
|
50639
50924
|
defaultProp,
|
|
@@ -50648,8 +50933,8 @@ function useControllableState({
|
|
|
50648
50933
|
const isControlled = prop !== void 0;
|
|
50649
50934
|
const value2 = isControlled ? prop : uncontrolledProp;
|
|
50650
50935
|
{
|
|
50651
|
-
const isControlledRef =
|
|
50652
|
-
|
|
50936
|
+
const isControlledRef = React11.useRef(prop !== void 0);
|
|
50937
|
+
React11.useEffect(() => {
|
|
50653
50938
|
const wasControlled = isControlledRef.current;
|
|
50654
50939
|
if (wasControlled !== isControlled) {
|
|
50655
50940
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -50661,7 +50946,7 @@ function useControllableState({
|
|
|
50661
50946
|
isControlledRef.current = isControlled;
|
|
50662
50947
|
}, [isControlled, caller]);
|
|
50663
50948
|
}
|
|
50664
|
-
const setValue =
|
|
50949
|
+
const setValue = React11.useCallback(
|
|
50665
50950
|
(nextValue) => {
|
|
50666
50951
|
if (isControlled) {
|
|
50667
50952
|
const value22 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -50680,13 +50965,13 @@ function useUncontrolledState({
|
|
|
50680
50965
|
defaultProp,
|
|
50681
50966
|
onChange
|
|
50682
50967
|
}) {
|
|
50683
|
-
const [value2, setValue] =
|
|
50684
|
-
const prevValueRef =
|
|
50685
|
-
const onChangeRef =
|
|
50968
|
+
const [value2, setValue] = React11.useState(defaultProp);
|
|
50969
|
+
const prevValueRef = React11.useRef(value2);
|
|
50970
|
+
const onChangeRef = React11.useRef(onChange);
|
|
50686
50971
|
useInsertionEffect(() => {
|
|
50687
50972
|
onChangeRef.current = onChange;
|
|
50688
50973
|
}, [onChange]);
|
|
50689
|
-
|
|
50974
|
+
React11.useEffect(() => {
|
|
50690
50975
|
if (prevValueRef.current !== value2) {
|
|
50691
50976
|
onChangeRef.current?.(value2);
|
|
50692
50977
|
prevValueRef.current = value2;
|
|
@@ -50698,8 +50983,8 @@ function isFunction(value2) {
|
|
|
50698
50983
|
return typeof value2 === "function";
|
|
50699
50984
|
}
|
|
50700
50985
|
function usePrevious(value2) {
|
|
50701
|
-
const ref =
|
|
50702
|
-
return
|
|
50986
|
+
const ref = React11.useRef({ value: value2, previous: value2 });
|
|
50987
|
+
return React11.useMemo(() => {
|
|
50703
50988
|
if (ref.current.value !== value2) {
|
|
50704
50989
|
ref.current.previous = ref.current.value;
|
|
50705
50990
|
ref.current.value = value2;
|
|
@@ -50708,7 +50993,7 @@ function usePrevious(value2) {
|
|
|
50708
50993
|
}, [value2]);
|
|
50709
50994
|
}
|
|
50710
50995
|
function useSize(element) {
|
|
50711
|
-
const [size, setSize] =
|
|
50996
|
+
const [size, setSize] = React11.useState(void 0);
|
|
50712
50997
|
useLayoutEffect22(() => {
|
|
50713
50998
|
if (element) {
|
|
50714
50999
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -50742,7 +51027,7 @@ function useSize(element) {
|
|
|
50742
51027
|
return size;
|
|
50743
51028
|
}
|
|
50744
51029
|
function useStateMachine(initialState, machine) {
|
|
50745
|
-
return
|
|
51030
|
+
return React11.useReducer((state, event) => {
|
|
50746
51031
|
const nextState = machine[state][event];
|
|
50747
51032
|
return nextState ?? state;
|
|
50748
51033
|
}, initialState);
|
|
@@ -50750,17 +51035,17 @@ function useStateMachine(initialState, machine) {
|
|
|
50750
51035
|
var Presence = (props) => {
|
|
50751
51036
|
const { present, children } = props;
|
|
50752
51037
|
const presence = usePresence(present);
|
|
50753
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
51038
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React11.Children.only(children);
|
|
50754
51039
|
const ref = useStableComposedRefs(presence.ref, getElementRef(child));
|
|
50755
51040
|
const forceMount = typeof children === "function";
|
|
50756
|
-
return forceMount || presence.isPresent ?
|
|
51041
|
+
return forceMount || presence.isPresent ? React11.cloneElement(child, { ref }) : null;
|
|
50757
51042
|
};
|
|
50758
51043
|
Presence.displayName = "Presence";
|
|
50759
51044
|
function usePresence(present) {
|
|
50760
|
-
const [node, setNode] =
|
|
50761
|
-
const stylesRef =
|
|
50762
|
-
const prevPresentRef =
|
|
50763
|
-
const prevAnimationNameRef =
|
|
51045
|
+
const [node, setNode] = React11.useState();
|
|
51046
|
+
const stylesRef = React11.useRef(null);
|
|
51047
|
+
const prevPresentRef = React11.useRef(present);
|
|
51048
|
+
const prevAnimationNameRef = React11.useRef("none");
|
|
50764
51049
|
const initialState = present ? "mounted" : "unmounted";
|
|
50765
51050
|
const [state, send] = useStateMachine(initialState, {
|
|
50766
51051
|
mounted: {
|
|
@@ -50775,7 +51060,7 @@ function usePresence(present) {
|
|
|
50775
51060
|
MOUNT: "mounted"
|
|
50776
51061
|
}
|
|
50777
51062
|
});
|
|
50778
|
-
|
|
51063
|
+
React11.useEffect(() => {
|
|
50779
51064
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
50780
51065
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
50781
51066
|
}, [state]);
|
|
@@ -50841,7 +51126,7 @@ function usePresence(present) {
|
|
|
50841
51126
|
}, [node, send]);
|
|
50842
51127
|
return {
|
|
50843
51128
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
50844
|
-
ref:
|
|
51129
|
+
ref: React11.useCallback((node2) => {
|
|
50845
51130
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
50846
51131
|
setNode(node2);
|
|
50847
51132
|
}, [])
|
|
@@ -50855,9 +51140,9 @@ function setRef2(ref, value2) {
|
|
|
50855
51140
|
}
|
|
50856
51141
|
}
|
|
50857
51142
|
function useStableComposedRefs(...refs) {
|
|
50858
|
-
const refsRef =
|
|
51143
|
+
const refsRef = React11.useRef(refs);
|
|
50859
51144
|
refsRef.current = refs;
|
|
50860
|
-
return
|
|
51145
|
+
return React11.useCallback((node) => {
|
|
50861
51146
|
const currentRefs = refsRef.current;
|
|
50862
51147
|
let hasCleanup = false;
|
|
50863
51148
|
const cleanups = currentRefs.map((ref) => {
|
|
@@ -50918,7 +51203,7 @@ var NODES = [
|
|
|
50918
51203
|
];
|
|
50919
51204
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
50920
51205
|
const Slot3 = createSlot(`Primitive.${node}`);
|
|
50921
|
-
const Node2 =
|
|
51206
|
+
const Node2 = React11.forwardRef((props, forwardedRef) => {
|
|
50922
51207
|
const { asChild, ...primitiveProps } = props;
|
|
50923
51208
|
const Comp = asChild ? Slot3 : node;
|
|
50924
51209
|
if (typeof window !== "undefined") {
|
|
@@ -50953,9 +51238,9 @@ function CheckboxProvider(props) {
|
|
|
50953
51238
|
onChange: onCheckedChange,
|
|
50954
51239
|
caller: CHECKBOX_NAME
|
|
50955
51240
|
});
|
|
50956
|
-
const [control, setControl] =
|
|
50957
|
-
const [bubbleInput, setBubbleInput] =
|
|
50958
|
-
const hasConsumerStoppedPropagationRef =
|
|
51241
|
+
const [control, setControl] = React11.useState(null);
|
|
51242
|
+
const [bubbleInput, setBubbleInput] = React11.useState(null);
|
|
51243
|
+
const hasConsumerStoppedPropagationRef = React11.useRef(false);
|
|
50959
51244
|
const isFormControl = control ? !!form || !!control.closest("form") : (
|
|
50960
51245
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
50961
51246
|
true
|
|
@@ -50986,7 +51271,7 @@ function CheckboxProvider(props) {
|
|
|
50986
51271
|
);
|
|
50987
51272
|
}
|
|
50988
51273
|
var TRIGGER_NAME = "CheckboxTrigger";
|
|
50989
|
-
var CheckboxTrigger =
|
|
51274
|
+
var CheckboxTrigger = React11.forwardRef(
|
|
50990
51275
|
({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
|
|
50991
51276
|
const {
|
|
50992
51277
|
control,
|
|
@@ -51001,8 +51286,8 @@ var CheckboxTrigger = React10.forwardRef(
|
|
|
51001
51286
|
bubbleInput
|
|
51002
51287
|
} = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
|
|
51003
51288
|
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
|
51004
|
-
const initialCheckedStateRef =
|
|
51005
|
-
|
|
51289
|
+
const initialCheckedStateRef = React11.useRef(checked);
|
|
51290
|
+
React11.useEffect(() => {
|
|
51006
51291
|
const form = control?.form;
|
|
51007
51292
|
if (form) {
|
|
51008
51293
|
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
@@ -51038,7 +51323,7 @@ var CheckboxTrigger = React10.forwardRef(
|
|
|
51038
51323
|
}
|
|
51039
51324
|
);
|
|
51040
51325
|
CheckboxTrigger.displayName = TRIGGER_NAME;
|
|
51041
|
-
var Checkbox =
|
|
51326
|
+
var Checkbox = React11.forwardRef(
|
|
51042
51327
|
(props, forwardedRef) => {
|
|
51043
51328
|
const {
|
|
51044
51329
|
__scopeCheckbox,
|
|
@@ -51086,7 +51371,7 @@ var Checkbox = React10.forwardRef(
|
|
|
51086
51371
|
);
|
|
51087
51372
|
Checkbox.displayName = CHECKBOX_NAME;
|
|
51088
51373
|
var INDICATOR_NAME = "CheckboxIndicator";
|
|
51089
|
-
var CheckboxIndicator =
|
|
51374
|
+
var CheckboxIndicator = React11.forwardRef(
|
|
51090
51375
|
(props, forwardedRef) => {
|
|
51091
51376
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
51092
51377
|
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
|
@@ -51110,7 +51395,7 @@ var CheckboxIndicator = React10.forwardRef(
|
|
|
51110
51395
|
);
|
|
51111
51396
|
CheckboxIndicator.displayName = INDICATOR_NAME;
|
|
51112
51397
|
var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
|
|
51113
|
-
var CheckboxBubbleInput =
|
|
51398
|
+
var CheckboxBubbleInput = React11.forwardRef(
|
|
51114
51399
|
({ __scopeCheckbox, ...props }, forwardedRef) => {
|
|
51115
51400
|
const {
|
|
51116
51401
|
control,
|
|
@@ -51128,7 +51413,7 @@ var CheckboxBubbleInput = React10.forwardRef(
|
|
|
51128
51413
|
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
|
|
51129
51414
|
const prevChecked = usePrevious(checked);
|
|
51130
51415
|
const controlSize = useSize(control);
|
|
51131
|
-
|
|
51416
|
+
React11.useEffect(() => {
|
|
51132
51417
|
const input = bubbleInput;
|
|
51133
51418
|
if (!input) return;
|
|
51134
51419
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -51145,7 +51430,7 @@ var CheckboxBubbleInput = React10.forwardRef(
|
|
|
51145
51430
|
input.dispatchEvent(event);
|
|
51146
51431
|
}
|
|
51147
51432
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
51148
|
-
const defaultCheckedRef =
|
|
51433
|
+
const defaultCheckedRef = React11.useRef(isIndeterminate(checked) ? false : checked);
|
|
51149
51434
|
return /* @__PURE__ */ jsx(
|
|
51150
51435
|
Primitive.input,
|
|
51151
51436
|
{
|
|
@@ -51191,13 +51476,13 @@ function getAnimateState(checked) {
|
|
|
51191
51476
|
return checked ? "checked" : "unchecked";
|
|
51192
51477
|
}
|
|
51193
51478
|
function Checkbox2({ className, onCheckedChange, ...props }) {
|
|
51194
|
-
const [checkedState, setCheckedState] =
|
|
51479
|
+
const [checkedState, setCheckedState] = React11.useState(
|
|
51195
51480
|
props?.checked ?? props?.defaultChecked ?? false
|
|
51196
51481
|
);
|
|
51197
|
-
|
|
51482
|
+
React11.useEffect(() => {
|
|
51198
51483
|
if (props?.checked !== void 0) setCheckedState(props.checked);
|
|
51199
51484
|
}, [props?.checked]);
|
|
51200
|
-
const handleCheckedChange =
|
|
51485
|
+
const handleCheckedChange = React11.useCallback(
|
|
51201
51486
|
(checked) => {
|
|
51202
51487
|
setCheckedState(checked);
|
|
51203
51488
|
onCheckedChange?.(checked);
|
|
@@ -51291,7 +51576,7 @@ function Checkbox2({ className, onCheckedChange, ...props }) {
|
|
|
51291
51576
|
}
|
|
51292
51577
|
var [SwitchProvider, useSwitch] = getStrictContext("SwitchContext");
|
|
51293
51578
|
function Switch(props) {
|
|
51294
|
-
const [isPressed, setIsPressed] =
|
|
51579
|
+
const [isPressed, setIsPressed] = React11.useState(false);
|
|
51295
51580
|
const {
|
|
51296
51581
|
checked,
|
|
51297
51582
|
defaultChecked,
|
|
@@ -51357,7 +51642,7 @@ function SwitchIcon({
|
|
|
51357
51642
|
...props
|
|
51358
51643
|
}) {
|
|
51359
51644
|
const { isChecked } = useSwitch();
|
|
51360
|
-
const isAnimated =
|
|
51645
|
+
const isAnimated = React11.useMemo(() => {
|
|
51361
51646
|
if (position2 === "right") return !isChecked;
|
|
51362
51647
|
if (position2 === "left") return isChecked;
|
|
51363
51648
|
if (position2 === "thumb") return true;
|
|
@@ -51488,10 +51773,10 @@ function ToggleGroupHighlightItem({
|
|
|
51488
51773
|
}
|
|
51489
51774
|
);
|
|
51490
51775
|
}
|
|
51491
|
-
if (type === "multiple" &&
|
|
51776
|
+
if (type === "multiple" && React11.isValidElement(children)) {
|
|
51492
51777
|
const isActive = props.value && value2 && value2.includes(props.value);
|
|
51493
51778
|
const element = children;
|
|
51494
|
-
return
|
|
51779
|
+
return React11.cloneElement(
|
|
51495
51780
|
children,
|
|
51496
51781
|
{
|
|
51497
51782
|
style: {
|
|
@@ -51630,7 +51915,7 @@ function ToggleGroup2({
|
|
|
51630
51915
|
style,
|
|
51631
51916
|
...props
|
|
51632
51917
|
}) {
|
|
51633
|
-
const colorTokens =
|
|
51918
|
+
const colorTokens = React11.useMemo(
|
|
51634
51919
|
() => resolveToggleGroupColorTokens(color),
|
|
51635
51920
|
[color]
|
|
51636
51921
|
);
|
|
@@ -51743,8 +52028,8 @@ function Radio({
|
|
|
51743
52028
|
...props
|
|
51744
52029
|
}) {
|
|
51745
52030
|
const { value: value2 } = useRadioGroup();
|
|
51746
|
-
const [isChecked, setIsChecked] =
|
|
51747
|
-
|
|
52031
|
+
const [isChecked, setIsChecked] = React11.useState(value2 === valueProps);
|
|
52032
|
+
React11.useEffect(() => {
|
|
51748
52033
|
setIsChecked(value2 === valueProps);
|
|
51749
52034
|
}, [value2, valueProps]);
|
|
51750
52035
|
return /* @__PURE__ */ jsx(RadioProvider, { value: { isChecked, setIsChecked }, children: /* @__PURE__ */ jsx(
|
|
@@ -52782,7 +53067,7 @@ function VerticalStepper({
|
|
|
52782
53067
|
step.id
|
|
52783
53068
|
)) }) });
|
|
52784
53069
|
}
|
|
52785
|
-
var Spinner =
|
|
53070
|
+
var Spinner = React11.forwardRef(function Spinner2({
|
|
52786
53071
|
color,
|
|
52787
53072
|
size,
|
|
52788
53073
|
className,
|
|
@@ -52891,9 +53176,9 @@ function resolveSurface(color) {
|
|
|
52891
53176
|
}
|
|
52892
53177
|
function renderSizedIcon(icon, iconClassName) {
|
|
52893
53178
|
if (icon == null) return null;
|
|
52894
|
-
if (
|
|
53179
|
+
if (React11.isValidElement(icon)) {
|
|
52895
53180
|
const el = icon;
|
|
52896
|
-
return
|
|
53181
|
+
return React11.cloneElement(el, {
|
|
52897
53182
|
className: cn(el.props.className, "shrink-0", iconClassName)
|
|
52898
53183
|
});
|
|
52899
53184
|
}
|
|
@@ -52927,7 +53212,7 @@ function getTrend(value2, previousValue) {
|
|
|
52927
53212
|
})}%`;
|
|
52928
53213
|
return { direction, label };
|
|
52929
53214
|
}
|
|
52930
|
-
var StatCard =
|
|
53215
|
+
var StatCard = React11.forwardRef(
|
|
52931
53216
|
({
|
|
52932
53217
|
color,
|
|
52933
53218
|
size = "default",
|
|
@@ -53058,15 +53343,15 @@ StatCard.displayName = "StatCard";
|
|
|
53058
53343
|
// src/components/chart/chart.types.ts
|
|
53059
53344
|
var THEMES = { light: "", dark: ".dark" };
|
|
53060
53345
|
var INITIAL_DIMENSION = { width: 320, height: 200 };
|
|
53061
|
-
var ChartContext =
|
|
53346
|
+
var ChartContext = React11.createContext(null);
|
|
53062
53347
|
function useChart() {
|
|
53063
|
-
const context =
|
|
53348
|
+
const context = React11.useContext(ChartContext);
|
|
53064
53349
|
if (!context) {
|
|
53065
53350
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
53066
53351
|
}
|
|
53067
53352
|
return context;
|
|
53068
53353
|
}
|
|
53069
|
-
var ChartContainer =
|
|
53354
|
+
var ChartContainer = React11.forwardRef(function ChartContainer2({
|
|
53070
53355
|
id,
|
|
53071
53356
|
className,
|
|
53072
53357
|
children,
|
|
@@ -53074,7 +53359,7 @@ var ChartContainer = React10.forwardRef(function ChartContainer2({
|
|
|
53074
53359
|
initialDimension = INITIAL_DIMENSION,
|
|
53075
53360
|
...props
|
|
53076
53361
|
}, ref) {
|
|
53077
|
-
const uniqueId =
|
|
53362
|
+
const uniqueId = React11.useId();
|
|
53078
53363
|
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
53079
53364
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
53080
53365
|
"div",
|
|
@@ -53143,7 +53428,7 @@ function ChartTooltipContent({
|
|
|
53143
53428
|
labelKey
|
|
53144
53429
|
}) {
|
|
53145
53430
|
const { config } = useChart();
|
|
53146
|
-
const tooltipLabel =
|
|
53431
|
+
const tooltipLabel = React11.useMemo(() => {
|
|
53147
53432
|
if (hideLabel || !payload?.length) {
|
|
53148
53433
|
return null;
|
|
53149
53434
|
}
|
|
@@ -53446,7 +53731,7 @@ function getBarRadius(index2, total, stacked, rounded, layout) {
|
|
|
53446
53731
|
if (isFirst) return [0, 0, 0, 0];
|
|
53447
53732
|
return [0, 0, 0, 0];
|
|
53448
53733
|
}
|
|
53449
|
-
var BarChart =
|
|
53734
|
+
var BarChart = React11.forwardRef(
|
|
53450
53735
|
function BarChart2({
|
|
53451
53736
|
data: data2,
|
|
53452
53737
|
config: explicitConfig,
|
|
@@ -53470,16 +53755,16 @@ var BarChart = React10.forwardRef(
|
|
|
53470
53755
|
className,
|
|
53471
53756
|
margin
|
|
53472
53757
|
}, ref) {
|
|
53473
|
-
const resolvedCategoryKey =
|
|
53758
|
+
const resolvedCategoryKey = React11.useMemo(
|
|
53474
53759
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
53475
53760
|
[categoryKey, data2]
|
|
53476
53761
|
);
|
|
53477
|
-
const config =
|
|
53762
|
+
const config = React11.useMemo(
|
|
53478
53763
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
53479
53764
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
53480
53765
|
);
|
|
53481
|
-
const barKeys =
|
|
53482
|
-
const chartData =
|
|
53766
|
+
const barKeys = React11.useMemo(() => Object.keys(config), [config]);
|
|
53767
|
+
const chartData = React11.useMemo(
|
|
53483
53768
|
() => coerceSeriesValuesToNumbers(data2, barKeys),
|
|
53484
53769
|
[data2, barKeys]
|
|
53485
53770
|
);
|
|
@@ -53550,7 +53835,7 @@ var BarChart = React10.forwardRef(
|
|
|
53550
53835
|
);
|
|
53551
53836
|
var DEFAULT_MARGIN = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
53552
53837
|
var DEFAULT_X_AXIS_PADDING = { left: 0, right: 0 };
|
|
53553
|
-
var AreaChart =
|
|
53838
|
+
var AreaChart = React11.forwardRef(
|
|
53554
53839
|
function AreaChart2({
|
|
53555
53840
|
data: data2,
|
|
53556
53841
|
config: explicitConfig,
|
|
@@ -53570,20 +53855,20 @@ var AreaChart = React10.forwardRef(
|
|
|
53570
53855
|
}, ref) {
|
|
53571
53856
|
const resolvedMargin = { ...DEFAULT_MARGIN, ...margin };
|
|
53572
53857
|
const resolvedXAxisPadding = { ...DEFAULT_X_AXIS_PADDING, ...xAxisPadding };
|
|
53573
|
-
const resolvedCategoryKey =
|
|
53858
|
+
const resolvedCategoryKey = React11.useMemo(
|
|
53574
53859
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
53575
53860
|
[categoryKey, data2]
|
|
53576
53861
|
);
|
|
53577
|
-
const config =
|
|
53862
|
+
const config = React11.useMemo(
|
|
53578
53863
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
53579
53864
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
53580
53865
|
);
|
|
53581
|
-
const seriesKeys =
|
|
53582
|
-
const chartData =
|
|
53866
|
+
const seriesKeys = React11.useMemo(() => Object.keys(config), [config]);
|
|
53867
|
+
const chartData = React11.useMemo(
|
|
53583
53868
|
() => coerceSeriesValuesToNumbers(data2, seriesKeys),
|
|
53584
53869
|
[data2, seriesKeys]
|
|
53585
53870
|
);
|
|
53586
|
-
const reactId =
|
|
53871
|
+
const reactId = React11.useId();
|
|
53587
53872
|
const gradientPrefix = `area-fill-${reactId.replace(/:/g, "")}`;
|
|
53588
53873
|
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 };
|
|
53589
53874
|
return /* @__PURE__ */ jsx(ChartContainer, { ref, config, className: cn("w-full", className), children: /* @__PURE__ */ jsxs(
|
|
@@ -53711,7 +53996,7 @@ function resolveStrokeWidth(width2) {
|
|
|
53711
53996
|
if (typeof width2 === "number") return width2;
|
|
53712
53997
|
return STROKE_WIDTH_MAP[width2];
|
|
53713
53998
|
}
|
|
53714
|
-
var LineChart =
|
|
53999
|
+
var LineChart = React11.forwardRef(
|
|
53715
54000
|
function LineChart2({
|
|
53716
54001
|
data: data2,
|
|
53717
54002
|
config: explicitConfig,
|
|
@@ -53734,17 +54019,17 @@ var LineChart = React10.forwardRef(
|
|
|
53734
54019
|
className,
|
|
53735
54020
|
margin
|
|
53736
54021
|
}, ref) {
|
|
53737
|
-
const resolvedCategoryKey =
|
|
54022
|
+
const resolvedCategoryKey = React11.useMemo(
|
|
53738
54023
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
53739
54024
|
[categoryKey, data2]
|
|
53740
54025
|
);
|
|
53741
|
-
const config =
|
|
54026
|
+
const config = React11.useMemo(
|
|
53742
54027
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
53743
54028
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
53744
54029
|
);
|
|
53745
|
-
const seriesKeys =
|
|
54030
|
+
const seriesKeys = React11.useMemo(() => Object.keys(config), [config]);
|
|
53746
54031
|
const resolvedStrokeWidth = resolveStrokeWidth(strokeWidth);
|
|
53747
|
-
const processedData =
|
|
54032
|
+
const processedData = React11.useMemo(() => {
|
|
53748
54033
|
const base = coerceSeriesValuesToNumbers(data2, seriesKeys);
|
|
53749
54034
|
if (!stacked) return base;
|
|
53750
54035
|
return base.map((row) => {
|
|
@@ -53760,11 +54045,11 @@ var LineChart = React10.forwardRef(
|
|
|
53760
54045
|
return out;
|
|
53761
54046
|
});
|
|
53762
54047
|
}, [data2, seriesKeys, stacked]);
|
|
53763
|
-
const glowOrderKeys =
|
|
54048
|
+
const glowOrderKeys = React11.useMemo(
|
|
53764
54049
|
() => stacked ? [...seriesKeys].reverse() : seriesKeys,
|
|
53765
54050
|
[seriesKeys, stacked]
|
|
53766
54051
|
);
|
|
53767
|
-
const reactId =
|
|
54052
|
+
const reactId = React11.useId();
|
|
53768
54053
|
const idPrefix2 = `line-${reactId.replace(/:/g, "")}`;
|
|
53769
54054
|
const glowGradientId = (key2) => `${idPrefix2}-glow-${key2}`;
|
|
53770
54055
|
return /* @__PURE__ */ jsx(
|
|
@@ -53919,7 +54204,7 @@ function getBarRadius2(index2, total, stacked, rounded) {
|
|
|
53919
54204
|
function buildDefaultSeries(config) {
|
|
53920
54205
|
return Object.keys(config).map((dataKey) => ({ dataKey, type: "bar" }));
|
|
53921
54206
|
}
|
|
53922
|
-
var ComposedChart =
|
|
54207
|
+
var ComposedChart = React11.forwardRef(
|
|
53923
54208
|
function ComposedChart2({
|
|
53924
54209
|
data: data2,
|
|
53925
54210
|
config: explicitConfig,
|
|
@@ -53948,27 +54233,27 @@ var ComposedChart = React10.forwardRef(
|
|
|
53948
54233
|
className,
|
|
53949
54234
|
margin
|
|
53950
54235
|
}, ref) {
|
|
53951
|
-
const resolvedCategoryKey =
|
|
54236
|
+
const resolvedCategoryKey = React11.useMemo(
|
|
53952
54237
|
() => categoryKey ?? inferCategoryKey(data2[0]),
|
|
53953
54238
|
[categoryKey, data2]
|
|
53954
54239
|
);
|
|
53955
|
-
const config =
|
|
54240
|
+
const config = React11.useMemo(
|
|
53956
54241
|
() => buildAutoSeriesConfig(data2, resolvedCategoryKey, explicitConfig),
|
|
53957
54242
|
[data2, resolvedCategoryKey, explicitConfig]
|
|
53958
54243
|
);
|
|
53959
|
-
const series =
|
|
54244
|
+
const series = React11.useMemo(
|
|
53960
54245
|
() => explicitSeries ?? buildDefaultSeries(config),
|
|
53961
54246
|
[explicitSeries, config]
|
|
53962
54247
|
);
|
|
53963
|
-
const seriesKeys =
|
|
54248
|
+
const seriesKeys = React11.useMemo(
|
|
53964
54249
|
() => series.map((item) => item.dataKey),
|
|
53965
54250
|
[series]
|
|
53966
54251
|
);
|
|
53967
|
-
const chartData =
|
|
54252
|
+
const chartData = React11.useMemo(
|
|
53968
54253
|
() => coerceSeriesValuesToNumbers(data2, seriesKeys),
|
|
53969
54254
|
[data2, seriesKeys]
|
|
53970
54255
|
);
|
|
53971
|
-
const barSeries =
|
|
54256
|
+
const barSeries = React11.useMemo(
|
|
53972
54257
|
() => series.filter((item) => item.type === "bar"),
|
|
53973
54258
|
[series]
|
|
53974
54259
|
);
|
|
@@ -54187,7 +54472,7 @@ function DonutLegend({
|
|
|
54187
54472
|
] }, key2);
|
|
54188
54473
|
}) });
|
|
54189
54474
|
}
|
|
54190
|
-
var DonutChart =
|
|
54475
|
+
var DonutChart = React11.forwardRef(
|
|
54191
54476
|
function DonutChart2({
|
|
54192
54477
|
data: data2,
|
|
54193
54478
|
config: explicitConfig,
|
|
@@ -54205,18 +54490,18 @@ var DonutChart = React10.forwardRef(
|
|
|
54205
54490
|
className,
|
|
54206
54491
|
margin
|
|
54207
54492
|
}, ref) {
|
|
54208
|
-
const rawId =
|
|
54493
|
+
const rawId = React11.useId();
|
|
54209
54494
|
const gradientScope = rawId.replace(/:/g, "");
|
|
54210
|
-
const config =
|
|
54495
|
+
const config = React11.useMemo(
|
|
54211
54496
|
() => deriveConfig(data2, explicitConfig),
|
|
54212
54497
|
[data2, explicitConfig]
|
|
54213
54498
|
);
|
|
54214
|
-
const twoRing =
|
|
54215
|
-
const outerRing =
|
|
54499
|
+
const twoRing = React11.useMemo(() => hasChildren(data2), [data2]);
|
|
54500
|
+
const outerRing = React11.useMemo(
|
|
54216
54501
|
() => twoRing ? buildOuterRing(data2) : null,
|
|
54217
54502
|
[data2, twoRing]
|
|
54218
54503
|
);
|
|
54219
|
-
|
|
54504
|
+
React11.useEffect(() => {
|
|
54220
54505
|
validateChildren(data2);
|
|
54221
54506
|
}, [data2]);
|
|
54222
54507
|
const inner = parseRadius(innerRadius);
|
|
@@ -54225,8 +54510,8 @@ var DonutChart = React10.forwardRef(
|
|
|
54225
54510
|
const gapHalf = ringGap / 2;
|
|
54226
54511
|
const innerRingOuterRadius = twoRing ? formatRadius(mid - gapHalf, inner.isPct) : outerRadius;
|
|
54227
54512
|
const outerRingInnerRadius = formatRadius(mid + gapHalf, outer.isPct);
|
|
54228
|
-
const legendOrder =
|
|
54229
|
-
const uniqueKeys =
|
|
54513
|
+
const legendOrder = React11.useMemo(() => flattenKeys(data2), [data2]);
|
|
54514
|
+
const uniqueKeys = React11.useMemo(
|
|
54230
54515
|
() => Array.from(new Set(flattenKeys(data2))),
|
|
54231
54516
|
[data2]
|
|
54232
54517
|
);
|
|
@@ -54483,7 +54768,7 @@ function TreemapLegend({
|
|
|
54483
54768
|
] }, key2);
|
|
54484
54769
|
}) });
|
|
54485
54770
|
}
|
|
54486
|
-
var TreemapChart =
|
|
54771
|
+
var TreemapChart = React11.forwardRef(
|
|
54487
54772
|
function TreemapChart2({
|
|
54488
54773
|
data: data2,
|
|
54489
54774
|
config: explicitConfig,
|
|
@@ -54503,28 +54788,28 @@ var TreemapChart = React10.forwardRef(
|
|
|
54503
54788
|
isUpdateAnimationActive
|
|
54504
54789
|
}, ref) {
|
|
54505
54790
|
const resolvedUpdateAnimationActive = isUpdateAnimationActive ?? isAnimationActive;
|
|
54506
|
-
const rawId =
|
|
54791
|
+
const rawId = React11.useId();
|
|
54507
54792
|
const gradientScope = rawId.replace(/:/g, "");
|
|
54508
|
-
const resolvedLabelStyle =
|
|
54793
|
+
const resolvedLabelStyle = React11.useMemo(
|
|
54509
54794
|
() => ({ ...DEFAULT_LABEL_STYLE, ...labelStyle }),
|
|
54510
54795
|
[labelStyle]
|
|
54511
54796
|
);
|
|
54512
|
-
const sortedData =
|
|
54797
|
+
const sortedData = React11.useMemo(() => {
|
|
54513
54798
|
const sorted = [...data2].sort((a, b) => b.value - a.value);
|
|
54514
54799
|
if (typeof maxDataPoints === "number" && maxDataPoints > 0) {
|
|
54515
54800
|
return sorted.slice(0, maxDataPoints);
|
|
54516
54801
|
}
|
|
54517
54802
|
return sorted;
|
|
54518
54803
|
}, [data2, maxDataPoints]);
|
|
54519
|
-
const config =
|
|
54804
|
+
const config = React11.useMemo(
|
|
54520
54805
|
() => deriveConfig2(sortedData, explicitConfig),
|
|
54521
54806
|
[sortedData, explicitConfig]
|
|
54522
54807
|
);
|
|
54523
|
-
const uniqueKeys =
|
|
54808
|
+
const uniqueKeys = React11.useMemo(
|
|
54524
54809
|
() => Array.from(new Set(sortedData.map((d) => d.key))),
|
|
54525
54810
|
[sortedData]
|
|
54526
54811
|
);
|
|
54527
|
-
const colorByKey =
|
|
54812
|
+
const colorByKey = React11.useMemo(() => {
|
|
54528
54813
|
const map = /* @__PURE__ */ new Map();
|
|
54529
54814
|
if (typeof color === "string" && color.length > 0) {
|
|
54530
54815
|
const base = resolveBaseColor(color);
|
|
@@ -54540,7 +54825,7 @@ var TreemapChart = React10.forwardRef(
|
|
|
54540
54825
|
}
|
|
54541
54826
|
return map;
|
|
54542
54827
|
}, [config, uniqueKeys, color, sortedData]);
|
|
54543
|
-
const textColorByKey =
|
|
54828
|
+
const textColorByKey = React11.useMemo(() => {
|
|
54544
54829
|
const map = /* @__PURE__ */ new Map();
|
|
54545
54830
|
if (typeof color === "string" && color.length > 0) {
|
|
54546
54831
|
sortedData.forEach((d, i) => {
|
|
@@ -54552,7 +54837,7 @@ var TreemapChart = React10.forwardRef(
|
|
|
54552
54837
|
return map;
|
|
54553
54838
|
}, [color, sortedData]);
|
|
54554
54839
|
const autoTextColor = labelStyle?.color === void 0;
|
|
54555
|
-
const treemapData =
|
|
54840
|
+
const treemapData = React11.useMemo(
|
|
54556
54841
|
() => sortedData.map((d) => ({
|
|
54557
54842
|
...d,
|
|
54558
54843
|
name: d.key,
|
|
@@ -54654,7 +54939,7 @@ var slotExpandedSizeClasses = {
|
|
|
54654
54939
|
default: "h-10 text-base md:text-sm",
|
|
54655
54940
|
lg: "h-12 text-lg"
|
|
54656
54941
|
};
|
|
54657
|
-
var InputOTPSeparator =
|
|
54942
|
+
var InputOTPSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54658
54943
|
"div",
|
|
54659
54944
|
{
|
|
54660
54945
|
ref,
|
|
@@ -54674,7 +54959,7 @@ var SlotBox = ({
|
|
|
54674
54959
|
hasError,
|
|
54675
54960
|
cornerClass
|
|
54676
54961
|
}) => {
|
|
54677
|
-
const context =
|
|
54962
|
+
const context = React11.useContext(OTPInputContext);
|
|
54678
54963
|
const slot = context.slots[index2];
|
|
54679
54964
|
if (!slot) return null;
|
|
54680
54965
|
const { char, hasFakeCaret, isActive } = slot;
|
|
@@ -54739,7 +55024,7 @@ function clampLength(raw) {
|
|
|
54739
55024
|
}
|
|
54740
55025
|
return rounded;
|
|
54741
55026
|
}
|
|
54742
|
-
var InputOTP =
|
|
55027
|
+
var InputOTP = React11.forwardRef(
|
|
54743
55028
|
({
|
|
54744
55029
|
length: length2,
|
|
54745
55030
|
allowAlphaNumeric,
|
|
@@ -54768,17 +55053,17 @@ var InputOTP = React10.forwardRef(
|
|
|
54768
55053
|
containerClassName,
|
|
54769
55054
|
...restProps
|
|
54770
55055
|
}, ref) => {
|
|
54771
|
-
const autoId =
|
|
55056
|
+
const autoId = React11.useId();
|
|
54772
55057
|
const inputId = id || autoId;
|
|
54773
|
-
const effectiveLength =
|
|
55058
|
+
const effectiveLength = React11.useMemo(() => clampLength(length2), [length2]);
|
|
54774
55059
|
const effectiveSize = size || "default";
|
|
54775
55060
|
const hasError = !!error || !!errorContent;
|
|
54776
55061
|
const isControlled = value2 !== void 0;
|
|
54777
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
55062
|
+
const [uncontrolledValue, setUncontrolledValue] = React11.useState(
|
|
54778
55063
|
typeof defaultValue === "string" ? defaultValue : ""
|
|
54779
55064
|
);
|
|
54780
55065
|
const effectiveValue = isControlled ? value2 : uncontrolledValue;
|
|
54781
|
-
const handleChange =
|
|
55066
|
+
const handleChange = React11.useCallback(
|
|
54782
55067
|
(next) => {
|
|
54783
55068
|
if (!isControlled) setUncontrolledValue(next);
|
|
54784
55069
|
onChange?.(next);
|
|
@@ -54786,7 +55071,7 @@ var InputOTP = React10.forwardRef(
|
|
|
54786
55071
|
[isControlled, onChange]
|
|
54787
55072
|
);
|
|
54788
55073
|
const pattern = regex && regex.length > 0 ? regex : allowAlphaNumeric ? REGEXP_ONLY_DIGITS_AND_CHARS : REGEXP_ONLY_DIGITS;
|
|
54789
|
-
const groups =
|
|
55074
|
+
const groups = React11.useMemo(
|
|
54790
55075
|
() => buildGroups(effectiveLength, separators),
|
|
54791
55076
|
[effectiveLength, separators]
|
|
54792
55077
|
);
|
|
@@ -54829,7 +55114,7 @@ var InputOTP = React10.forwardRef(
|
|
|
54829
55114
|
containerClassName
|
|
54830
55115
|
),
|
|
54831
55116
|
...restProps,
|
|
54832
|
-
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
|
|
55117
|
+
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React11.Fragment, { children: [
|
|
54833
55118
|
groupIndex > 0 && /* @__PURE__ */ jsx(InputOTPSeparator, {}),
|
|
54834
55119
|
/* @__PURE__ */ jsx(
|
|
54835
55120
|
"div",
|
|
@@ -54875,15 +55160,15 @@ var InputOTP = React10.forwardRef(
|
|
|
54875
55160
|
}
|
|
54876
55161
|
);
|
|
54877
55162
|
InputOTP.displayName = "InputOTP";
|
|
54878
|
-
var CarouselContext =
|
|
55163
|
+
var CarouselContext = React11.createContext(null);
|
|
54879
55164
|
function useCarousel() {
|
|
54880
|
-
const context =
|
|
55165
|
+
const context = React11.useContext(CarouselContext);
|
|
54881
55166
|
if (!context) {
|
|
54882
55167
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
54883
55168
|
}
|
|
54884
55169
|
return context;
|
|
54885
55170
|
}
|
|
54886
|
-
var Carousel =
|
|
55171
|
+
var Carousel = React11.forwardRef(
|
|
54887
55172
|
({
|
|
54888
55173
|
orientation = "horizontal",
|
|
54889
55174
|
opts,
|
|
@@ -54900,20 +55185,20 @@ var Carousel = React10.forwardRef(
|
|
|
54900
55185
|
},
|
|
54901
55186
|
plugins
|
|
54902
55187
|
);
|
|
54903
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
54904
|
-
const [canScrollNext, setCanScrollNext] =
|
|
54905
|
-
const onSelect =
|
|
55188
|
+
const [canScrollPrev, setCanScrollPrev] = React11.useState(false);
|
|
55189
|
+
const [canScrollNext, setCanScrollNext] = React11.useState(false);
|
|
55190
|
+
const onSelect = React11.useCallback((api2) => {
|
|
54906
55191
|
if (!api2) return;
|
|
54907
55192
|
setCanScrollPrev(api2.canScrollPrev());
|
|
54908
55193
|
setCanScrollNext(api2.canScrollNext());
|
|
54909
55194
|
}, []);
|
|
54910
|
-
const scrollPrev =
|
|
55195
|
+
const scrollPrev = React11.useCallback(() => {
|
|
54911
55196
|
api?.scrollPrev();
|
|
54912
55197
|
}, [api]);
|
|
54913
|
-
const scrollNext =
|
|
55198
|
+
const scrollNext = React11.useCallback(() => {
|
|
54914
55199
|
api?.scrollNext();
|
|
54915
55200
|
}, [api]);
|
|
54916
|
-
const handleKeyDown =
|
|
55201
|
+
const handleKeyDown = React11.useCallback(
|
|
54917
55202
|
(event) => {
|
|
54918
55203
|
const isHorizontal = orientation === "horizontal";
|
|
54919
55204
|
const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
@@ -54928,11 +55213,11 @@ var Carousel = React10.forwardRef(
|
|
|
54928
55213
|
},
|
|
54929
55214
|
[scrollPrev, scrollNext, orientation]
|
|
54930
55215
|
);
|
|
54931
|
-
|
|
55216
|
+
React11.useEffect(() => {
|
|
54932
55217
|
if (!api || !setApi) return;
|
|
54933
55218
|
setApi(api);
|
|
54934
55219
|
}, [api, setApi]);
|
|
54935
|
-
|
|
55220
|
+
React11.useEffect(() => {
|
|
54936
55221
|
if (!api) return;
|
|
54937
55222
|
onSelect(api);
|
|
54938
55223
|
api.on("reInit", onSelect);
|
|
@@ -54972,7 +55257,7 @@ var Carousel = React10.forwardRef(
|
|
|
54972
55257
|
}
|
|
54973
55258
|
);
|
|
54974
55259
|
Carousel.displayName = "Carousel";
|
|
54975
|
-
var CarouselContent =
|
|
55260
|
+
var CarouselContent = React11.forwardRef(({ className, ...props }, ref) => {
|
|
54976
55261
|
const { carouselRef, orientation } = useCarousel();
|
|
54977
55262
|
return (
|
|
54978
55263
|
// Vertical carousels need an explicit viewport height so overflow clips at
|
|
@@ -55003,7 +55288,7 @@ var CarouselContent = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
55003
55288
|
);
|
|
55004
55289
|
});
|
|
55005
55290
|
CarouselContent.displayName = "CarouselContent";
|
|
55006
|
-
var CarouselItem =
|
|
55291
|
+
var CarouselItem = React11.forwardRef(({ className, ...props }, ref) => {
|
|
55007
55292
|
const { orientation } = useCarousel();
|
|
55008
55293
|
return /* @__PURE__ */ jsx(
|
|
55009
55294
|
"div",
|
|
@@ -55021,7 +55306,7 @@ var CarouselItem = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
55021
55306
|
);
|
|
55022
55307
|
});
|
|
55023
55308
|
CarouselItem.displayName = "CarouselItem";
|
|
55024
|
-
var CarouselPrevious =
|
|
55309
|
+
var CarouselPrevious = React11.forwardRef(({ className, ...props }, ref) => {
|
|
55025
55310
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
55026
55311
|
return /* @__PURE__ */ jsxs(
|
|
55027
55312
|
"button",
|
|
@@ -55045,7 +55330,7 @@ var CarouselPrevious = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
55045
55330
|
);
|
|
55046
55331
|
});
|
|
55047
55332
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
55048
|
-
var CarouselNext =
|
|
55333
|
+
var CarouselNext = React11.forwardRef(({ className, ...props }, ref) => {
|
|
55049
55334
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
55050
55335
|
return /* @__PURE__ */ jsxs(
|
|
55051
55336
|
"button",
|
|
@@ -55149,10 +55434,10 @@ function Carousel2({
|
|
|
55149
55434
|
MAX_DOTS_DEFAULT
|
|
55150
55435
|
);
|
|
55151
55436
|
const clampedDelay = clamp2(delay2, DELAY_MIN, DELAY_MAX, DELAY_DEFAULT);
|
|
55152
|
-
const autoplayPlugin =
|
|
55437
|
+
const autoplayPlugin = React11.useRef(
|
|
55153
55438
|
autoplay ? Autoplay({ delay: clampedDelay, stopOnInteraction: true }) : null
|
|
55154
55439
|
);
|
|
55155
|
-
|
|
55440
|
+
React11.useEffect(() => {
|
|
55156
55441
|
const plugin = autoplayPlugin.current;
|
|
55157
55442
|
if (!plugin || !autoplay) return;
|
|
55158
55443
|
autoplayPlugin.current = Autoplay({
|
|
@@ -55160,17 +55445,17 @@ function Carousel2({
|
|
|
55160
55445
|
stopOnInteraction: true
|
|
55161
55446
|
});
|
|
55162
55447
|
}, [autoplay, clampedDelay]);
|
|
55163
|
-
const plugins =
|
|
55448
|
+
const plugins = React11.useMemo(
|
|
55164
55449
|
() => autoplay && autoplayPlugin.current ? [autoplayPlugin.current] : [],
|
|
55165
55450
|
[autoplay, clampedDelay]
|
|
55166
55451
|
);
|
|
55167
|
-
const [api, setApi] =
|
|
55168
|
-
const [selectedIndex, setSelectedIndex] =
|
|
55169
|
-
const [scrollSnaps, setScrollSnaps] =
|
|
55170
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
55171
|
-
const [canScrollNext, setCanScrollNext] =
|
|
55172
|
-
const prevIndexRef =
|
|
55173
|
-
|
|
55452
|
+
const [api, setApi] = React11.useState();
|
|
55453
|
+
const [selectedIndex, setSelectedIndex] = React11.useState(0);
|
|
55454
|
+
const [scrollSnaps, setScrollSnaps] = React11.useState([]);
|
|
55455
|
+
const [canScrollPrev, setCanScrollPrev] = React11.useState(false);
|
|
55456
|
+
const [canScrollNext, setCanScrollNext] = React11.useState(false);
|
|
55457
|
+
const prevIndexRef = React11.useRef(0);
|
|
55458
|
+
React11.useEffect(() => {
|
|
55174
55459
|
if (!api) return;
|
|
55175
55460
|
setScrollSnaps(api.scrollSnapList());
|
|
55176
55461
|
setSelectedIndex(api.selectedScrollSnap());
|
|
@@ -55207,12 +55492,12 @@ function Carousel2({
|
|
|
55207
55492
|
api.off("reInit", handleReInit);
|
|
55208
55493
|
};
|
|
55209
55494
|
}, [api, loop, onNext, onPrevious]);
|
|
55210
|
-
const scrollTo =
|
|
55495
|
+
const scrollTo = React11.useCallback(
|
|
55211
55496
|
(index2) => api?.scrollTo(index2),
|
|
55212
55497
|
[api]
|
|
55213
55498
|
);
|
|
55214
|
-
const scrollPrev =
|
|
55215
|
-
const scrollNext =
|
|
55499
|
+
const scrollPrev = React11.useCallback(() => api?.scrollPrev(), [api]);
|
|
55500
|
+
const scrollNext = React11.useCallback(() => api?.scrollNext(), [api]);
|
|
55216
55501
|
const navigationState = {
|
|
55217
55502
|
canScrollPrev,
|
|
55218
55503
|
canScrollNext,
|
|
@@ -55276,7 +55561,7 @@ var sizeClasses2 = {
|
|
|
55276
55561
|
default: "min-h-[80px] px-3 py-2 text-base md:text-sm",
|
|
55277
55562
|
lg: "min-h-[100px] px-4 py-3 text-lg"
|
|
55278
55563
|
};
|
|
55279
|
-
var Textarea =
|
|
55564
|
+
var Textarea = React11.forwardRef(
|
|
55280
55565
|
({
|
|
55281
55566
|
className,
|
|
55282
55567
|
label,
|
|
@@ -55293,15 +55578,15 @@ var Textarea = React10.forwardRef(
|
|
|
55293
55578
|
placeholder,
|
|
55294
55579
|
...restProps
|
|
55295
55580
|
}, ref) => {
|
|
55296
|
-
const autoId =
|
|
55581
|
+
const autoId = React11.useId();
|
|
55297
55582
|
const textareaId = id || autoId;
|
|
55298
|
-
const [charCount, setCharCount] =
|
|
55583
|
+
const [charCount, setCharCount] = React11.useState(() => {
|
|
55299
55584
|
if (charLimit === void 0) return 0;
|
|
55300
55585
|
if (typeof value2 === "string") return value2.length;
|
|
55301
55586
|
if (typeof defaultValue === "string") return defaultValue.length;
|
|
55302
55587
|
return 0;
|
|
55303
55588
|
});
|
|
55304
|
-
|
|
55589
|
+
React11.useEffect(() => {
|
|
55305
55590
|
if (charLimit !== void 0 && typeof value2 === "string") {
|
|
55306
55591
|
setCharCount(value2.length);
|
|
55307
55592
|
}
|
|
@@ -55379,7 +55664,7 @@ var Textarea = React10.forwardRef(
|
|
|
55379
55664
|
}
|
|
55380
55665
|
);
|
|
55381
55666
|
Textarea.displayName = "Textarea";
|
|
55382
|
-
var Command =
|
|
55667
|
+
var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55383
55668
|
Command$1,
|
|
55384
55669
|
{
|
|
55385
55670
|
ref,
|
|
@@ -55391,7 +55676,7 @@ var Command = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
55391
55676
|
}
|
|
55392
55677
|
));
|
|
55393
55678
|
Command.displayName = Command$1.displayName;
|
|
55394
|
-
var CommandInput =
|
|
55679
|
+
var CommandInput = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
55395
55680
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
55396
55681
|
/* @__PURE__ */ jsx(
|
|
55397
55682
|
Command$1.Input,
|
|
@@ -55406,7 +55691,7 @@ var CommandInput = React10.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
55406
55691
|
)
|
|
55407
55692
|
] }));
|
|
55408
55693
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
55409
|
-
var CommandList =
|
|
55694
|
+
var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55410
55695
|
Command$1.List,
|
|
55411
55696
|
{
|
|
55412
55697
|
ref,
|
|
@@ -55415,7 +55700,7 @@ var CommandList = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
55415
55700
|
}
|
|
55416
55701
|
));
|
|
55417
55702
|
CommandList.displayName = Command$1.List.displayName;
|
|
55418
|
-
var CommandEmpty =
|
|
55703
|
+
var CommandEmpty = React11.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
55419
55704
|
Command$1.Empty,
|
|
55420
55705
|
{
|
|
55421
55706
|
ref,
|
|
@@ -55424,7 +55709,7 @@ var CommandEmpty = React10.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
55424
55709
|
}
|
|
55425
55710
|
));
|
|
55426
55711
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
55427
|
-
var CommandGroup =
|
|
55712
|
+
var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55428
55713
|
Command$1.Group,
|
|
55429
55714
|
{
|
|
55430
55715
|
ref,
|
|
@@ -55436,7 +55721,7 @@ var CommandGroup = React10.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
55436
55721
|
}
|
|
55437
55722
|
));
|
|
55438
55723
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
55439
|
-
var CommandSeparator =
|
|
55724
|
+
var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55440
55725
|
Command$1.Separator,
|
|
55441
55726
|
{
|
|
55442
55727
|
ref,
|
|
@@ -55445,7 +55730,7 @@ var CommandSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
55445
55730
|
}
|
|
55446
55731
|
));
|
|
55447
55732
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
55448
|
-
var CommandItem =
|
|
55733
|
+
var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55449
55734
|
Command$1.Item,
|
|
55450
55735
|
{
|
|
55451
55736
|
ref,
|
|
@@ -55474,8 +55759,8 @@ function AsyncCombobox({
|
|
|
55474
55759
|
hasMore = false,
|
|
55475
55760
|
onLoadMore
|
|
55476
55761
|
}) {
|
|
55477
|
-
const [open, setOpen] =
|
|
55478
|
-
const [inputValue, setInputValue] =
|
|
55762
|
+
const [open, setOpen] = React11.useState(false);
|
|
55763
|
+
const [inputValue, setInputValue] = React11.useState("");
|
|
55479
55764
|
const selectedOption = options.find((o) => o.value === value2);
|
|
55480
55765
|
const displayValue = selectedOption?.label ?? (value2 || "");
|
|
55481
55766
|
const handleSelect = (selected) => {
|
|
@@ -55483,7 +55768,7 @@ function AsyncCombobox({
|
|
|
55483
55768
|
onValueChange?.(next);
|
|
55484
55769
|
if (!clearable) setOpen(false);
|
|
55485
55770
|
};
|
|
55486
|
-
const handleSearchChange =
|
|
55771
|
+
const handleSearchChange = React11.useCallback(
|
|
55487
55772
|
(q) => {
|
|
55488
55773
|
setInputValue(q);
|
|
55489
55774
|
onSearchChange?.(q);
|
|
@@ -55598,17 +55883,17 @@ function AsyncMultiSelect({
|
|
|
55598
55883
|
portal = true,
|
|
55599
55884
|
renderOption
|
|
55600
55885
|
}) {
|
|
55601
|
-
const [open, setOpen] =
|
|
55602
|
-
const [inputValue, setInputValue] =
|
|
55603
|
-
const listRef =
|
|
55604
|
-
const sentinelRef =
|
|
55886
|
+
const [open, setOpen] = React11.useState(false);
|
|
55887
|
+
const [inputValue, setInputValue] = React11.useState("");
|
|
55888
|
+
const listRef = React11.useRef(null);
|
|
55889
|
+
const sentinelRef = React11.useRef(null);
|
|
55605
55890
|
const selected = normalizeValue(value2, multiple);
|
|
55606
|
-
const selectedOptions =
|
|
55891
|
+
const selectedOptions = React11.useMemo(() => {
|
|
55607
55892
|
const map = /* @__PURE__ */ new Map();
|
|
55608
55893
|
for (const opt of options) map.set(opt.value, opt);
|
|
55609
55894
|
return selected.map((v) => map.get(v) ?? { value: v, label: v });
|
|
55610
55895
|
}, [options, selected]);
|
|
55611
|
-
|
|
55896
|
+
React11.useEffect(() => {
|
|
55612
55897
|
const sentinel = sentinelRef.current;
|
|
55613
55898
|
if (!open || !hasMore || !onLoadMore || !sentinel) return;
|
|
55614
55899
|
const observer = new IntersectionObserver(
|
|
@@ -55635,7 +55920,7 @@ function AsyncMultiSelect({
|
|
|
55635
55920
|
const next = selected.filter((v) => v !== optionValue);
|
|
55636
55921
|
onValueChange?.(multiple ? next.length > 0 ? next : void 0 : void 0);
|
|
55637
55922
|
};
|
|
55638
|
-
const handleSearchChange =
|
|
55923
|
+
const handleSearchChange = React11.useCallback(
|
|
55639
55924
|
(q) => {
|
|
55640
55925
|
setInputValue(q);
|
|
55641
55926
|
onSearchChange?.(q);
|
|
@@ -55936,8 +56221,8 @@ function CalendarDayButton({
|
|
|
55936
56221
|
modifiers,
|
|
55937
56222
|
...props
|
|
55938
56223
|
}) {
|
|
55939
|
-
const ref =
|
|
55940
|
-
|
|
56224
|
+
const ref = React11.useRef(null);
|
|
56225
|
+
React11.useEffect(() => {
|
|
55941
56226
|
if (modifiers.focused) ref.current?.focus();
|
|
55942
56227
|
}, [modifiers.focused]);
|
|
55943
56228
|
return /* @__PURE__ */ jsx(
|
|
@@ -56110,7 +56395,7 @@ function DatePicker(props) {
|
|
|
56110
56395
|
}
|
|
56111
56396
|
DatePicker.displayName = "DatePicker";
|
|
56112
56397
|
var timeInputChromeClass = "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
|
|
56113
|
-
var TimePicker =
|
|
56398
|
+
var TimePicker = React11.forwardRef(
|
|
56114
56399
|
({ hideIcon = false, className, ...props }, ref) => {
|
|
56115
56400
|
return /* @__PURE__ */ jsx(
|
|
56116
56401
|
Input,
|
|
@@ -56173,20 +56458,20 @@ function DateTimePicker(props) {
|
|
|
56173
56458
|
className
|
|
56174
56459
|
} = props;
|
|
56175
56460
|
const isControlled = "value" in props;
|
|
56176
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
56461
|
+
const [uncontrolledValue, setUncontrolledValue] = React11.useState(defaultValue);
|
|
56177
56462
|
const current = isControlled ? value2 : uncontrolledValue;
|
|
56178
56463
|
const isOpenControlled = controlledOpen !== void 0;
|
|
56179
|
-
const [internalOpen, setInternalOpen] =
|
|
56464
|
+
const [internalOpen, setInternalOpen] = React11.useState(false);
|
|
56180
56465
|
const isOpen = isOpenControlled ? controlledOpen : internalOpen;
|
|
56181
56466
|
const setOpen = (nextOpen) => {
|
|
56182
56467
|
if (!isOpenControlled) setInternalOpen(nextOpen);
|
|
56183
56468
|
onOpenChange?.(nextOpen);
|
|
56184
56469
|
};
|
|
56185
|
-
const [draftTime, setDraftTime] =
|
|
56470
|
+
const [draftTime, setDraftTime] = React11.useState(
|
|
56186
56471
|
() => current ? formatTimeOfDay(current, timeStep) : ""
|
|
56187
56472
|
);
|
|
56188
56473
|
const currentMs = current?.getTime();
|
|
56189
|
-
|
|
56474
|
+
React11.useEffect(() => {
|
|
56190
56475
|
if (currentMs === void 0) return;
|
|
56191
56476
|
setDraftTime(formatTimeOfDay(new Date(currentMs), timeStep));
|
|
56192
56477
|
}, [currentMs, timeStep]);
|
|
@@ -56490,17 +56775,17 @@ function DateRangePicker({
|
|
|
56490
56775
|
side = "bottom",
|
|
56491
56776
|
className
|
|
56492
56777
|
}) {
|
|
56493
|
-
const [open, setOpen] =
|
|
56494
|
-
const [showCalendar, setShowCalendar] =
|
|
56495
|
-
const [draftRange, setDraftRange] =
|
|
56778
|
+
const [open, setOpen] = React11.useState(false);
|
|
56779
|
+
const [showCalendar, setShowCalendar] = React11.useState(false);
|
|
56780
|
+
const [draftRange, setDraftRange] = React11.useState(
|
|
56496
56781
|
EMPTY_DRAFT_RANGE
|
|
56497
56782
|
);
|
|
56498
|
-
const [calendarMonth, setCalendarMonth] =
|
|
56499
|
-
const [flyoutSide, setFlyoutSide] =
|
|
56500
|
-
const calendarRef =
|
|
56501
|
-
const [startInputValue, setStartInputValue] =
|
|
56502
|
-
const [endInputValue, setEndInputValue] =
|
|
56503
|
-
|
|
56783
|
+
const [calendarMonth, setCalendarMonth] = React11.useState(/* @__PURE__ */ new Date());
|
|
56784
|
+
const [flyoutSide, setFlyoutSide] = React11.useState("right");
|
|
56785
|
+
const calendarRef = React11.useRef(null);
|
|
56786
|
+
const [startInputValue, setStartInputValue] = React11.useState("");
|
|
56787
|
+
const [endInputValue, setEndInputValue] = React11.useState("");
|
|
56788
|
+
React11.useLayoutEffect(() => {
|
|
56504
56789
|
if (!showCalendar || !calendarRef.current) return;
|
|
56505
56790
|
const rect = calendarRef.current.getBoundingClientRect();
|
|
56506
56791
|
if (rect.right > window.innerWidth) {
|
|
@@ -56509,14 +56794,14 @@ function DateRangePicker({
|
|
|
56509
56794
|
}, [showCalendar]);
|
|
56510
56795
|
const activePresets = presets ?? [...PRESET_IDS];
|
|
56511
56796
|
const resolveLabel = (id) => presetLabels?.[id] ?? (id === "custom" ? "Custom" : PRESET_LABELS[id]);
|
|
56512
|
-
const updateDraftRange =
|
|
56797
|
+
const updateDraftRange = React11.useCallback(
|
|
56513
56798
|
(nextRange) => {
|
|
56514
56799
|
setDraftRange(nextRange);
|
|
56515
56800
|
onDraftChange?.(nextRange);
|
|
56516
56801
|
},
|
|
56517
56802
|
[onDraftChange]
|
|
56518
56803
|
);
|
|
56519
|
-
const syncInputsFromDraft =
|
|
56804
|
+
const syncInputsFromDraft = React11.useCallback(
|
|
56520
56805
|
(range) => {
|
|
56521
56806
|
setStartInputValue(range.startDate ? format(range.startDate, dateFormat) : "");
|
|
56522
56807
|
if (lockEndToToday) {
|
|
@@ -56543,7 +56828,7 @@ function DateRangePicker({
|
|
|
56543
56828
|
onChange?.({ presetId: id, ...range });
|
|
56544
56829
|
setOpen(false);
|
|
56545
56830
|
};
|
|
56546
|
-
const handleRangeChange =
|
|
56831
|
+
const handleRangeChange = React11.useCallback(
|
|
56547
56832
|
(range) => {
|
|
56548
56833
|
const nextDraft = toDraftRange(range);
|
|
56549
56834
|
if (lockEndToToday && nextDraft.startDate) {
|
|
@@ -56859,18 +57144,28 @@ function SimplifiedDate({ ts, dateFormat, className, relative = false }) {
|
|
|
56859
57144
|
}
|
|
56860
57145
|
return /* @__PURE__ */ jsx("span", { className: cn(className), children: detailedDate });
|
|
56861
57146
|
}
|
|
56862
|
-
var Table =
|
|
56863
|
-
|
|
56864
|
-
|
|
56865
|
-
|
|
56866
|
-
|
|
56867
|
-
|
|
56868
|
-
|
|
56869
|
-
|
|
57147
|
+
var Table = React11.forwardRef(
|
|
57148
|
+
({ className, containerRef, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
57149
|
+
"div",
|
|
57150
|
+
{
|
|
57151
|
+
ref: containerRef,
|
|
57152
|
+
"data-slot": "table-container",
|
|
57153
|
+
className: cn("relative w-full overflow-auto", containerClassName),
|
|
57154
|
+
children: /* @__PURE__ */ jsx(
|
|
57155
|
+
"table",
|
|
57156
|
+
{
|
|
57157
|
+
ref,
|
|
57158
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
57159
|
+
...props
|
|
57160
|
+
}
|
|
57161
|
+
)
|
|
57162
|
+
}
|
|
57163
|
+
)
|
|
57164
|
+
);
|
|
56870
57165
|
Table.displayName = "Table";
|
|
56871
|
-
var TableHeader =
|
|
57166
|
+
var TableHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
56872
57167
|
TableHeader.displayName = "TableHeader";
|
|
56873
|
-
var TableBody =
|
|
57168
|
+
var TableBody = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56874
57169
|
"tbody",
|
|
56875
57170
|
{
|
|
56876
57171
|
ref,
|
|
@@ -56879,7 +57174,7 @@ var TableBody = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
56879
57174
|
}
|
|
56880
57175
|
));
|
|
56881
57176
|
TableBody.displayName = "TableBody";
|
|
56882
|
-
var TableFooter =
|
|
57177
|
+
var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56883
57178
|
"tfoot",
|
|
56884
57179
|
{
|
|
56885
57180
|
ref,
|
|
@@ -56891,7 +57186,7 @@ var TableFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
56891
57186
|
}
|
|
56892
57187
|
));
|
|
56893
57188
|
TableFooter.displayName = "TableFooter";
|
|
56894
|
-
var TableRow =
|
|
57189
|
+
var TableRow = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56895
57190
|
"tr",
|
|
56896
57191
|
{
|
|
56897
57192
|
ref,
|
|
@@ -56903,7 +57198,7 @@ var TableRow = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
56903
57198
|
}
|
|
56904
57199
|
));
|
|
56905
57200
|
TableRow.displayName = "TableRow";
|
|
56906
|
-
var TableHead =
|
|
57201
|
+
var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56907
57202
|
"th",
|
|
56908
57203
|
{
|
|
56909
57204
|
ref,
|
|
@@ -56915,7 +57210,7 @@ var TableHead = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
56915
57210
|
}
|
|
56916
57211
|
));
|
|
56917
57212
|
TableHead.displayName = "TableHead";
|
|
56918
|
-
var TableCell =
|
|
57213
|
+
var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56919
57214
|
"td",
|
|
56920
57215
|
{
|
|
56921
57216
|
ref,
|
|
@@ -56927,7 +57222,7 @@ var TableCell = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
56927
57222
|
}
|
|
56928
57223
|
));
|
|
56929
57224
|
TableCell.displayName = "TableCell";
|
|
56930
|
-
var TableCaption =
|
|
57225
|
+
var TableCaption = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
56931
57226
|
"caption",
|
|
56932
57227
|
{
|
|
56933
57228
|
ref,
|
|
@@ -57201,53 +57496,67 @@ function Pagination({
|
|
|
57201
57496
|
const handlePageSizeChange = (value2) => {
|
|
57202
57497
|
onPageSizeChange(Number(value2));
|
|
57203
57498
|
};
|
|
57204
|
-
return
|
|
57205
|
-
|
|
57206
|
-
|
|
57207
|
-
|
|
57208
|
-
|
|
57209
|
-
|
|
57210
|
-
|
|
57211
|
-
|
|
57212
|
-
|
|
57213
|
-
|
|
57214
|
-
|
|
57215
|
-
|
|
57216
|
-
|
|
57217
|
-
|
|
57218
|
-
|
|
57219
|
-
|
|
57220
|
-
|
|
57221
|
-
|
|
57222
|
-
|
|
57223
|
-
|
|
57224
|
-
|
|
57225
|
-
|
|
57226
|
-
|
|
57227
|
-
|
|
57228
|
-
|
|
57229
|
-
|
|
57230
|
-
|
|
57231
|
-
|
|
57232
|
-
|
|
57233
|
-
|
|
57234
|
-
|
|
57235
|
-
|
|
57236
|
-
|
|
57237
|
-
|
|
57238
|
-
|
|
57239
|
-
|
|
57240
|
-
|
|
57241
|
-
|
|
57242
|
-
|
|
57243
|
-
|
|
57244
|
-
|
|
57245
|
-
|
|
57246
|
-
|
|
57247
|
-
|
|
57248
|
-
|
|
57249
|
-
|
|
57250
|
-
|
|
57499
|
+
return (
|
|
57500
|
+
// A size container: below 28rem the Previous/Next labels collapse to
|
|
57501
|
+
// icon-only buttons (still named for screen readers) so the row fits; in
|
|
57502
|
+
// very narrow containers the page-size selector wraps onto its own line.
|
|
57503
|
+
/* @__PURE__ */ jsxs(
|
|
57504
|
+
"div",
|
|
57505
|
+
{
|
|
57506
|
+
className: cn(
|
|
57507
|
+
"@container flex flex-wrap items-center gap-x-2 gap-y-3 border-t",
|
|
57508
|
+
s.container
|
|
57509
|
+
),
|
|
57510
|
+
children: [
|
|
57511
|
+
pageLabel !== void 0 ? /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm whitespace-nowrap text-muted-foreground", children: pageLabel }) : /* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
57512
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center", s.buttonGroupGap), children: [
|
|
57513
|
+
/* @__PURE__ */ jsx(
|
|
57514
|
+
Button,
|
|
57515
|
+
{
|
|
57516
|
+
fullWidth: false,
|
|
57517
|
+
variant: "outline",
|
|
57518
|
+
color: "gray",
|
|
57519
|
+
usePrimaryColorOnHover: true,
|
|
57520
|
+
size,
|
|
57521
|
+
onClick: onPrevPage,
|
|
57522
|
+
disabled: !hasPrevPage || disabled,
|
|
57523
|
+
startIcon: /* @__PURE__ */ jsx(ChevronLeft, { className: s.icon }),
|
|
57524
|
+
children: /* @__PURE__ */ jsx("span", { className: "@max-md:sr-only", children: previousLabel })
|
|
57525
|
+
}
|
|
57526
|
+
),
|
|
57527
|
+
/* @__PURE__ */ jsx(
|
|
57528
|
+
Button,
|
|
57529
|
+
{
|
|
57530
|
+
fullWidth: false,
|
|
57531
|
+
variant: "outline",
|
|
57532
|
+
color: "gray",
|
|
57533
|
+
usePrimaryColorOnHover: true,
|
|
57534
|
+
size,
|
|
57535
|
+
onClick: onNextPage,
|
|
57536
|
+
disabled: !hasNextPage || disabled,
|
|
57537
|
+
endIcon: /* @__PURE__ */ jsx(ChevronRight, { className: s.icon }),
|
|
57538
|
+
children: /* @__PURE__ */ jsx("span", { className: "@max-md:sr-only", children: nextLabel })
|
|
57539
|
+
}
|
|
57540
|
+
)
|
|
57541
|
+
] }),
|
|
57542
|
+
showPageSizeSelector ? /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
57543
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { fullWidth: false, variant: "outline", color: "gray", usePrimaryColorOnHover: true, size, children: [
|
|
57544
|
+
pageSizeOptionLabel(currentPageSize),
|
|
57545
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn(s.icon, "opacity-50") })
|
|
57546
|
+
] }) }),
|
|
57547
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsx(
|
|
57548
|
+
DropdownMenuRadioGroup,
|
|
57549
|
+
{
|
|
57550
|
+
value: String(currentPageSize),
|
|
57551
|
+
onValueChange: handlePageSizeChange,
|
|
57552
|
+
children: pageSizeOptions.map((size2) => /* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: String(size2), children: pageSizeOptionLabel(size2) }, size2))
|
|
57553
|
+
}
|
|
57554
|
+
) })
|
|
57555
|
+
] }) }) : /* @__PURE__ */ jsx("div", { className: "flex flex-1" })
|
|
57556
|
+
]
|
|
57557
|
+
}
|
|
57558
|
+
)
|
|
57559
|
+
);
|
|
57251
57560
|
}
|
|
57252
57561
|
|
|
57253
57562
|
// src/components/pagination/pagination.props.ts
|
|
@@ -57332,9 +57641,79 @@ function TableSkeleton({
|
|
|
57332
57641
|
rowIndex
|
|
57333
57642
|
)) });
|
|
57334
57643
|
}
|
|
57644
|
+
function getColumnMeta(column) {
|
|
57645
|
+
return column.columnDef.meta;
|
|
57646
|
+
}
|
|
57647
|
+
var SELECT_COLUMN_ID = "__select";
|
|
57648
|
+
function countStickyColumns(columns) {
|
|
57649
|
+
let count = 0;
|
|
57650
|
+
for (let i = 0; i < columns.length; i++) {
|
|
57651
|
+
const column = columns[i];
|
|
57652
|
+
const pinned = column.id === SELECT_COLUMN_ID ? Boolean(columns[i + 1] && getColumnMeta(columns[i + 1])?.sticky) : Boolean(getColumnMeta(column)?.sticky);
|
|
57653
|
+
if (!pinned) break;
|
|
57654
|
+
count++;
|
|
57655
|
+
}
|
|
57656
|
+
return count;
|
|
57657
|
+
}
|
|
57658
|
+
function useStickyOffsets(tableRef, count) {
|
|
57659
|
+
const [offsets, setOffsets] = useState([]);
|
|
57660
|
+
useLayoutEffect(() => {
|
|
57661
|
+
const table = tableRef.current;
|
|
57662
|
+
if (!table || count === 0) {
|
|
57663
|
+
setOffsets((prev) => prev.length === 0 ? prev : []);
|
|
57664
|
+
return;
|
|
57665
|
+
}
|
|
57666
|
+
const measure = () => {
|
|
57667
|
+
const cells = table.querySelectorAll(
|
|
57668
|
+
"thead tr:last-child > th"
|
|
57669
|
+
);
|
|
57670
|
+
const next = [];
|
|
57671
|
+
let left = 0;
|
|
57672
|
+
for (let i = 0; i < count && i < cells.length; i++) {
|
|
57673
|
+
next.push(left);
|
|
57674
|
+
left += cells[i].getBoundingClientRect().width;
|
|
57675
|
+
}
|
|
57676
|
+
setOffsets(
|
|
57677
|
+
(prev) => prev.length === next.length && prev.every((v, i) => v === next[i]) ? prev : next
|
|
57678
|
+
);
|
|
57679
|
+
};
|
|
57680
|
+
measure();
|
|
57681
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
57682
|
+
const observer = new ResizeObserver(measure);
|
|
57683
|
+
observer.observe(table);
|
|
57684
|
+
return () => observer.disconnect();
|
|
57685
|
+
}, [tableRef, count]);
|
|
57686
|
+
return offsets;
|
|
57687
|
+
}
|
|
57688
|
+
function buildStickyColumns(columns, offsets) {
|
|
57689
|
+
const map = /* @__PURE__ */ new Map();
|
|
57690
|
+
const count = Math.min(offsets.length, columns.length);
|
|
57691
|
+
for (let i = 0; i < count; i++) {
|
|
57692
|
+
map.set(columns[i].id, { left: offsets[i], isLast: i === count - 1 });
|
|
57693
|
+
}
|
|
57694
|
+
return map;
|
|
57695
|
+
}
|
|
57696
|
+
var stickyBase = "sticky";
|
|
57697
|
+
var stickyHeadBg = "z-[2] bg-[var(--data-table-sticky-bg,var(--color-background))]";
|
|
57698
|
+
var stickyHeadBorderedBg = "z-[2] bg-[color-mix(in_oklab,var(--color-muted)_50%,var(--data-table-sticky-bg,var(--color-background)))]";
|
|
57699
|
+
var stickyCellBg = "z-[1] bg-[var(--data-table-sticky-bg,var(--color-background))] [tr:hover>&]:bg-[color-mix(in_oklab,var(--color-muted)_50%,var(--data-table-sticky-bg,var(--color-background)))] [tr[data-state=selected]>&]:bg-muted";
|
|
57700
|
+
var stickyEdge = "after:pointer-events-none after:absolute after:inset-y-0 after:-right-4 after:w-4 after:bg-linear-to-r after:from-black/10 after:to-transparent after:opacity-0 after:transition-opacity group-data-[overflow-start]/data-table:after:opacity-100 dark:after:from-black/40";
|
|
57701
|
+
function stickyCellProps(stickyColumns, columnId, kind) {
|
|
57702
|
+
const sticky = stickyColumns?.get(columnId);
|
|
57703
|
+
if (!sticky) return {};
|
|
57704
|
+
return {
|
|
57705
|
+
className: cn(
|
|
57706
|
+
stickyBase,
|
|
57707
|
+
kind === "head" ? stickyHeadBg : kind === "headBordered" ? stickyHeadBorderedBg : stickyCellBg,
|
|
57708
|
+
sticky.isLast && stickyEdge
|
|
57709
|
+
),
|
|
57710
|
+
style: { left: sticky.left }
|
|
57711
|
+
};
|
|
57712
|
+
}
|
|
57335
57713
|
function DataTableHeader({
|
|
57336
57714
|
headerGroups,
|
|
57337
|
-
showBorder = false
|
|
57715
|
+
showBorder = false,
|
|
57716
|
+
stickyColumns
|
|
57338
57717
|
}) {
|
|
57339
57718
|
return /* @__PURE__ */ jsx(
|
|
57340
57719
|
TableHeader,
|
|
@@ -57342,20 +57721,29 @@ function DataTableHeader({
|
|
|
57342
57721
|
className: cn(
|
|
57343
57722
|
showBorder && "bg-muted/50 [&_tr]:border-border/50"
|
|
57344
57723
|
),
|
|
57345
|
-
children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header, headerIndex) =>
|
|
57346
|
-
|
|
57347
|
-
|
|
57348
|
-
|
|
57349
|
-
|
|
57350
|
-
|
|
57351
|
-
|
|
57352
|
-
|
|
57353
|
-
|
|
57354
|
-
|
|
57355
|
-
|
|
57356
|
-
|
|
57357
|
-
|
|
57358
|
-
|
|
57724
|
+
children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header, headerIndex) => {
|
|
57725
|
+
const sticky = stickyCellProps(
|
|
57726
|
+
stickyColumns,
|
|
57727
|
+
header.column.id,
|
|
57728
|
+
showBorder ? "headBordered" : "head"
|
|
57729
|
+
);
|
|
57730
|
+
return /* @__PURE__ */ jsx(
|
|
57731
|
+
TableHead,
|
|
57732
|
+
{
|
|
57733
|
+
className: cn(
|
|
57734
|
+
"text-sm text-gray-500 font-medium whitespace-nowrap",
|
|
57735
|
+
showBorder && headerIndex === 0 && "pl-4",
|
|
57736
|
+
sticky.className
|
|
57737
|
+
),
|
|
57738
|
+
style: sticky.style,
|
|
57739
|
+
children: header.isPlaceholder ? null : flexRender(
|
|
57740
|
+
header.column.columnDef.header,
|
|
57741
|
+
header.getContext()
|
|
57742
|
+
)
|
|
57743
|
+
},
|
|
57744
|
+
header.id
|
|
57745
|
+
);
|
|
57746
|
+
}) }, headerGroup.id))
|
|
57359
57747
|
}
|
|
57360
57748
|
);
|
|
57361
57749
|
}
|
|
@@ -57372,7 +57760,8 @@ function DataTableBody({
|
|
|
57372
57760
|
onRowClick,
|
|
57373
57761
|
showBorder = false,
|
|
57374
57762
|
tableRowClassName,
|
|
57375
|
-
getRowClassName
|
|
57763
|
+
getRowClassName,
|
|
57764
|
+
stickyColumns
|
|
57376
57765
|
}) {
|
|
57377
57766
|
if (isFetching) {
|
|
57378
57767
|
return /* @__PURE__ */ jsx(
|
|
@@ -57417,21 +57806,88 @@ function DataTableBody({
|
|
|
57417
57806
|
onRowClick(row.original);
|
|
57418
57807
|
}
|
|
57419
57808
|
} : void 0,
|
|
57420
|
-
children: row.getVisibleCells().map((cell, cellIndex) =>
|
|
57421
|
-
|
|
57422
|
-
|
|
57423
|
-
|
|
57424
|
-
|
|
57425
|
-
|
|
57426
|
-
|
|
57427
|
-
|
|
57428
|
-
|
|
57429
|
-
|
|
57430
|
-
|
|
57809
|
+
children: row.getVisibleCells().map((cell, cellIndex) => {
|
|
57810
|
+
const sticky = stickyCellProps(
|
|
57811
|
+
stickyColumns,
|
|
57812
|
+
cell.column.id,
|
|
57813
|
+
"cell"
|
|
57814
|
+
);
|
|
57815
|
+
return /* @__PURE__ */ jsx(
|
|
57816
|
+
TableCell,
|
|
57817
|
+
{
|
|
57818
|
+
className: cn(
|
|
57819
|
+
"px-2 py-4",
|
|
57820
|
+
// One line by default: narrow screens scroll the table rather
|
|
57821
|
+
// than squashing every column into a stack of words.
|
|
57822
|
+
getColumnMeta(cell.column)?.wrap ? "min-w-64 whitespace-normal" : "whitespace-nowrap",
|
|
57823
|
+
// `max-w-0` drops the content from the column's width; `w-full`
|
|
57824
|
+
// then hands the column the table's leftover width.
|
|
57825
|
+
getColumnMeta(cell.column)?.fill && "w-full max-w-0",
|
|
57826
|
+
showBorder && cellIndex === 0 && "pl-4",
|
|
57827
|
+
sticky.className
|
|
57828
|
+
),
|
|
57829
|
+
style: sticky.style,
|
|
57830
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
57831
|
+
},
|
|
57832
|
+
cell.id
|
|
57833
|
+
);
|
|
57834
|
+
})
|
|
57431
57835
|
},
|
|
57432
57836
|
row.id
|
|
57433
57837
|
)) });
|
|
57434
57838
|
}
|
|
57839
|
+
var BREAKPOINTS = {
|
|
57840
|
+
sm: 384,
|
|
57841
|
+
md: 448,
|
|
57842
|
+
lg: 512,
|
|
57843
|
+
xl: 576,
|
|
57844
|
+
"2xl": 672,
|
|
57845
|
+
"3xl": 768,
|
|
57846
|
+
"4xl": 896,
|
|
57847
|
+
"5xl": 1024,
|
|
57848
|
+
"6xl": 1152,
|
|
57849
|
+
"7xl": 1280
|
|
57850
|
+
};
|
|
57851
|
+
function minWidth(hideBelow) {
|
|
57852
|
+
return typeof hideBelow === "number" ? hideBelow : hideBelow && BREAKPOINTS[hideBelow];
|
|
57853
|
+
}
|
|
57854
|
+
function useElementWidth(ref, enabled) {
|
|
57855
|
+
const [width2, setWidth] = useState(null);
|
|
57856
|
+
useLayoutEffect(() => {
|
|
57857
|
+
const el = ref.current;
|
|
57858
|
+
if (!enabled || !el) return;
|
|
57859
|
+
const measure = () => setWidth(el.getBoundingClientRect().width);
|
|
57860
|
+
measure();
|
|
57861
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
57862
|
+
const observer = new ResizeObserver(measure);
|
|
57863
|
+
observer.observe(el);
|
|
57864
|
+
return () => observer.disconnect();
|
|
57865
|
+
}, [ref, enabled]);
|
|
57866
|
+
return enabled ? width2 : null;
|
|
57867
|
+
}
|
|
57868
|
+
function useResponsiveColumnVisibility(ref, columns, setColumnVisibility) {
|
|
57869
|
+
const responsive = columns.filter(
|
|
57870
|
+
(column) => minWidth(getColumnMeta(column)?.hideBelow) !== void 0
|
|
57871
|
+
);
|
|
57872
|
+
const width2 = useElementWidth(ref, responsive.length > 0);
|
|
57873
|
+
const hiddenKey = width2 === null ? null : responsive.filter((column) => width2 < minWidth(getColumnMeta(column)?.hideBelow)).map((column) => column.id).join("\0");
|
|
57874
|
+
useLayoutEffect(() => {
|
|
57875
|
+
if (hiddenKey === null) return;
|
|
57876
|
+
const hidden = new Set(hiddenKey.split("\0"));
|
|
57877
|
+
setColumnVisibility((prev) => {
|
|
57878
|
+
let next = null;
|
|
57879
|
+
for (const column of responsive) {
|
|
57880
|
+
const visible = !hidden.has(column.id) && !getColumnMeta(column)?.defaultHidden;
|
|
57881
|
+
if ((prev[column.id] ?? true) !== visible) {
|
|
57882
|
+
next ?? (next = { ...prev });
|
|
57883
|
+
next[column.id] = visible;
|
|
57884
|
+
}
|
|
57885
|
+
}
|
|
57886
|
+
return next ?? prev;
|
|
57887
|
+
});
|
|
57888
|
+
}, [hiddenKey, setColumnVisibility]);
|
|
57889
|
+
}
|
|
57890
|
+
var edgeShadowClass = "pointer-events-none absolute inset-y-0 z-[3] w-4 from-black/10 to-transparent opacity-0 transition-opacity dark:from-black/40";
|
|
57435
57891
|
function DataTable({
|
|
57436
57892
|
columns,
|
|
57437
57893
|
data: data2,
|
|
@@ -57482,7 +57938,7 @@ function DataTable({
|
|
|
57482
57938
|
}
|
|
57483
57939
|
);
|
|
57484
57940
|
const selectColumn = useMemo(() => ({
|
|
57485
|
-
id:
|
|
57941
|
+
id: SELECT_COLUMN_ID,
|
|
57486
57942
|
enableHiding: false,
|
|
57487
57943
|
enableSorting: false,
|
|
57488
57944
|
size: 40,
|
|
@@ -57532,6 +57988,27 @@ function DataTable({
|
|
|
57532
57988
|
getCoreRowModel: getCoreRowModel(),
|
|
57533
57989
|
getPaginationRowModel: getPaginationRowModel()
|
|
57534
57990
|
});
|
|
57991
|
+
const rootRef = useRef(null);
|
|
57992
|
+
useResponsiveColumnVisibility(
|
|
57993
|
+
rootRef,
|
|
57994
|
+
table.getAllLeafColumns(),
|
|
57995
|
+
setColumnVisibility
|
|
57996
|
+
);
|
|
57997
|
+
const tableRef = useRef(null);
|
|
57998
|
+
const scrollerRef = useRef(null);
|
|
57999
|
+
const overflow = useScrollOverflow(scrollerRef, {
|
|
58000
|
+
getContent: (scroller) => scroller.querySelector("table")
|
|
58001
|
+
});
|
|
58002
|
+
const visibleColumns = table.getVisibleLeafColumns();
|
|
58003
|
+
const stickyOffsets = useStickyOffsets(
|
|
58004
|
+
tableRef,
|
|
58005
|
+
countStickyColumns(visibleColumns)
|
|
58006
|
+
);
|
|
58007
|
+
const stickyColumns = useMemo(
|
|
58008
|
+
() => buildStickyColumns(visibleColumns, stickyOffsets),
|
|
58009
|
+
[visibleColumns, stickyOffsets]
|
|
58010
|
+
);
|
|
58011
|
+
const hasStickyColumns = stickyColumns.size > 0;
|
|
57535
58012
|
const { columnVisibilityItems, columnVisibilityCheckedState } = useMemo(() => {
|
|
57536
58013
|
const def = (c) => c;
|
|
57537
58014
|
const hideableDefs = columns.filter((col) => def(col).enableHiding !== false);
|
|
@@ -57555,9 +58032,11 @@ function DataTable({
|
|
|
57555
58032
|
return pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
57556
58033
|
}, [canChangePageSize, pageSizeOptions, pageSize]);
|
|
57557
58034
|
const showToolbar = tableActionsContent || showColumnVisibilitySelector;
|
|
57558
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-3", className), children: [
|
|
57559
|
-
showToolbar && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 data-table-toolbar", children: [
|
|
57560
|
-
tableActionsContent &&
|
|
58035
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, className: cn("space-y-3", className), children: [
|
|
58036
|
+
showToolbar && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 data-table-toolbar", children: [
|
|
58037
|
+
tableActionsContent && // Grows to fill the row, and wraps above the Columns button once
|
|
58038
|
+
// it would get narrower than 16rem.
|
|
58039
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-[1_1_16rem]", children: tableActionsContent }),
|
|
57561
58040
|
showColumnVisibilitySelector && /* @__PURE__ */ jsx("div", { className: "ml-auto", children: /* @__PURE__ */ jsx(
|
|
57562
58041
|
TogglableItemsList,
|
|
57563
58042
|
{
|
|
@@ -57570,41 +58049,69 @@ function DataTable({
|
|
|
57570
58049
|
}
|
|
57571
58050
|
) })
|
|
57572
58051
|
] }),
|
|
57573
|
-
/* @__PURE__ */
|
|
58052
|
+
/* @__PURE__ */ jsxs(
|
|
57574
58053
|
"div",
|
|
57575
58054
|
{
|
|
58055
|
+
"data-overflow-start": overflow.start || void 0,
|
|
58056
|
+
"data-overflow-end": overflow.end || void 0,
|
|
57576
58057
|
className: cn(
|
|
57577
|
-
"overflow-hidden rounded-md data-table-container",
|
|
58058
|
+
"group/data-table relative overflow-hidden rounded-md data-table-container",
|
|
57578
58059
|
showToolbar && "mt-6",
|
|
57579
58060
|
showBorder && "border border-border/50"
|
|
57580
58061
|
),
|
|
57581
|
-
children:
|
|
58062
|
+
children: [
|
|
58063
|
+
/* @__PURE__ */ jsxs(Table, { ref: tableRef, containerRef: scrollerRef, children: [
|
|
58064
|
+
/* @__PURE__ */ jsx(
|
|
58065
|
+
DataTableHeader,
|
|
58066
|
+
{
|
|
58067
|
+
headerGroups: table.getHeaderGroups(),
|
|
58068
|
+
showBorder,
|
|
58069
|
+
stickyColumns
|
|
58070
|
+
}
|
|
58071
|
+
),
|
|
58072
|
+
/* @__PURE__ */ jsx(
|
|
58073
|
+
DataTableBody,
|
|
58074
|
+
{
|
|
58075
|
+
rows: table.getRowModel().rows,
|
|
58076
|
+
columnCount: tableColumns.length,
|
|
58077
|
+
isFetching,
|
|
58078
|
+
pageSize,
|
|
58079
|
+
noResultsHeading,
|
|
58080
|
+
noResultsDescription,
|
|
58081
|
+
noResultsAction,
|
|
58082
|
+
noResultsIllustration,
|
|
58083
|
+
hideNoResultsIllustration,
|
|
58084
|
+
onRowClick,
|
|
58085
|
+
showBorder,
|
|
58086
|
+
tableRowClassName,
|
|
58087
|
+
getRowClassName,
|
|
58088
|
+
stickyColumns
|
|
58089
|
+
}
|
|
58090
|
+
)
|
|
58091
|
+
] }),
|
|
57582
58092
|
/* @__PURE__ */ jsx(
|
|
57583
|
-
|
|
58093
|
+
"div",
|
|
57584
58094
|
{
|
|
57585
|
-
|
|
57586
|
-
|
|
58095
|
+
"aria-hidden": true,
|
|
58096
|
+
className: cn(
|
|
58097
|
+
edgeShadowClass,
|
|
58098
|
+
"left-0 bg-linear-to-r",
|
|
58099
|
+
overflow.start && !hasStickyColumns && "opacity-100"
|
|
58100
|
+
)
|
|
57587
58101
|
}
|
|
57588
58102
|
),
|
|
57589
58103
|
/* @__PURE__ */ jsx(
|
|
57590
|
-
|
|
57591
|
-
{
|
|
57592
|
-
|
|
57593
|
-
|
|
57594
|
-
|
|
57595
|
-
|
|
57596
|
-
|
|
57597
|
-
|
|
57598
|
-
noResultsAction,
|
|
57599
|
-
noResultsIllustration,
|
|
57600
|
-
hideNoResultsIllustration,
|
|
57601
|
-
onRowClick,
|
|
57602
|
-
showBorder,
|
|
57603
|
-
tableRowClassName,
|
|
57604
|
-
getRowClassName
|
|
58104
|
+
"div",
|
|
58105
|
+
{
|
|
58106
|
+
"aria-hidden": true,
|
|
58107
|
+
className: cn(
|
|
58108
|
+
edgeShadowClass,
|
|
58109
|
+
"right-0 bg-linear-to-l",
|
|
58110
|
+
overflow.end && "opacity-100"
|
|
58111
|
+
)
|
|
57605
58112
|
}
|
|
57606
58113
|
)
|
|
57607
|
-
]
|
|
58114
|
+
]
|
|
57608
58115
|
}
|
|
57609
58116
|
),
|
|
57610
58117
|
!hidePaginationControls && /* @__PURE__ */ jsx(
|
|
@@ -57953,7 +58460,7 @@ var userTypeBadgeMetallicClasses = cn(
|
|
|
57953
58460
|
"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%)]",
|
|
57954
58461
|
"after:opacity-0 after:transition-opacity after:duration-[1800ms] after:ease-in-out hover:after:opacity-100"
|
|
57955
58462
|
);
|
|
57956
|
-
var UserTypeBadge =
|
|
58463
|
+
var UserTypeBadge = React11.forwardRef(
|
|
57957
58464
|
({ userType, size = "default", className, ...props }, ref) => {
|
|
57958
58465
|
const { color, icon: Icon2, label } = userTypeBadgeRegistry[userType];
|
|
57959
58466
|
return /* @__PURE__ */ jsx("div", { ref, className: "inline-block", ...props, children: /* @__PURE__ */ jsxs(
|
|
@@ -57977,7 +58484,7 @@ var UserTypeBadge = React10.forwardRef(
|
|
|
57977
58484
|
UserTypeBadge.displayName = "UserTypeBadge";
|
|
57978
58485
|
function renderStatusBadgeIcon(icon, px) {
|
|
57979
58486
|
if (!icon) return null;
|
|
57980
|
-
if (
|
|
58487
|
+
if (React11.isValidElement(icon)) return icon;
|
|
57981
58488
|
const Icon2 = icon;
|
|
57982
58489
|
return /* @__PURE__ */ jsx(Icon2, { size: px, "aria-hidden": true });
|
|
57983
58490
|
}
|
|
@@ -58014,7 +58521,7 @@ var statusBadgeSizeVariants = cva(
|
|
|
58014
58521
|
}
|
|
58015
58522
|
}
|
|
58016
58523
|
);
|
|
58017
|
-
var StatusBadge =
|
|
58524
|
+
var StatusBadge = React11.forwardRef(
|
|
58018
58525
|
({
|
|
58019
58526
|
label,
|
|
58020
58527
|
icon: Icon2,
|
|
@@ -58127,7 +58634,7 @@ var deleteButtonVariantClasses = {
|
|
|
58127
58634
|
gradient: "bg-error/10 text-error hover:bg-error/15 hover:text-error",
|
|
58128
58635
|
solid: "bg-error/20 text-error-foreground hover:bg-error/30 hover:text-error-foreground"
|
|
58129
58636
|
};
|
|
58130
|
-
var Tag =
|
|
58637
|
+
var Tag = React11.forwardRef(
|
|
58131
58638
|
({
|
|
58132
58639
|
name: name2,
|
|
58133
58640
|
value: value2,
|
|
@@ -58206,7 +58713,7 @@ function parseNameValueTag(tag) {
|
|
|
58206
58713
|
if (i <= 0 || i >= tag.length - 1) return null;
|
|
58207
58714
|
return { name: tag.slice(0, i), value: tag.slice(i + 1) };
|
|
58208
58715
|
}
|
|
58209
|
-
var TagInput =
|
|
58716
|
+
var TagInput = React11.forwardRef(
|
|
58210
58717
|
({
|
|
58211
58718
|
tags,
|
|
58212
58719
|
onTagsChange,
|
|
@@ -58233,13 +58740,13 @@ var TagInput = React10.forwardRef(
|
|
|
58233
58740
|
onBlur,
|
|
58234
58741
|
...restInputProps
|
|
58235
58742
|
}, ref) => {
|
|
58236
|
-
const autoId =
|
|
58743
|
+
const autoId = React11.useId();
|
|
58237
58744
|
const inputId = id ?? autoId;
|
|
58238
|
-
const rootRef =
|
|
58239
|
-
const [draft, setDraft] =
|
|
58745
|
+
const rootRef = React11.useRef(null);
|
|
58746
|
+
const [draft, setDraft] = React11.useState("");
|
|
58240
58747
|
const effectiveSize = size ?? "default";
|
|
58241
58748
|
const hasError = error || !!errorContent;
|
|
58242
|
-
const tryCommitDraft =
|
|
58749
|
+
const tryCommitDraft = React11.useCallback(() => {
|
|
58243
58750
|
if (disabled || readOnly) return;
|
|
58244
58751
|
const trimmed = draft.trim();
|
|
58245
58752
|
if (!trimmed) return;
|
|
@@ -59070,9 +59577,9 @@ var SIZE_STYLES2 = {
|
|
|
59070
59577
|
function iconSized4(icon, iconPx) {
|
|
59071
59578
|
if (icon == null) return null;
|
|
59072
59579
|
const dim = { width: iconPx, height: iconPx };
|
|
59073
|
-
if (
|
|
59580
|
+
if (React11.isValidElement(icon)) {
|
|
59074
59581
|
const el = icon;
|
|
59075
|
-
return
|
|
59582
|
+
return React11.cloneElement(el, {
|
|
59076
59583
|
className: cn(el.props.className, "shrink-0"),
|
|
59077
59584
|
style: { ...el.props.style, ...dim }
|
|
59078
59585
|
});
|
|
@@ -59151,7 +59658,7 @@ function useSimpleClickableCardSurface(options) {
|
|
|
59151
59658
|
const s = SIZE_STYLES2[size];
|
|
59152
59659
|
const styles = resolveVariantStyles(variant, color);
|
|
59153
59660
|
const isArbitraryGradient = variant === "gradient" && !isPresetColor(color);
|
|
59154
|
-
const surfaceStyleWithoutGradientBg =
|
|
59661
|
+
const surfaceStyleWithoutGradientBg = React11.useMemo(() => {
|
|
59155
59662
|
if (!isArbitraryGradient || typeof color !== "string")
|
|
59156
59663
|
return styles.containerStyle;
|
|
59157
59664
|
const cs = styles.containerStyle;
|
|
@@ -59162,7 +59669,7 @@ function useSimpleClickableCardSurface(options) {
|
|
|
59162
59669
|
const presetGradientPair = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_BACKDROP[color] : void 0;
|
|
59163
59670
|
const surfaceContainerClass = variant === "gradient" && isPresetColor(color) ? PRESET_GRADIENT_FRAME[color] : styles.container;
|
|
59164
59671
|
const presetRingClasses = isPresetColor(color) ? PRESET_RING_CLASSES_FOCUS_VISIBLE[color] : "";
|
|
59165
|
-
const ringAccentStyle =
|
|
59672
|
+
const ringAccentStyle = React11.useMemo(() => {
|
|
59166
59673
|
if (isPresetColor(color)) return void 0;
|
|
59167
59674
|
if (typeof color !== "string") return void 0;
|
|
59168
59675
|
return {
|
|
@@ -59452,11 +59959,14 @@ function trailingLeadAndSlot(options) {
|
|
|
59452
59959
|
}
|
|
59453
59960
|
);
|
|
59454
59961
|
}
|
|
59962
|
+
var ACTIONS_ROW_CLASS = "flex-wrap";
|
|
59963
|
+
var ACTIONS_LEADING_BASIS_CLASS = "basis-48";
|
|
59964
|
+
var ACTIONS_SLOT_CLASS = "relative z-10 ml-auto max-w-full shrink-0";
|
|
59455
59965
|
function shellPresetRing(color) {
|
|
59456
59966
|
const c = color ?? "gray";
|
|
59457
59967
|
return isPresetColor(c) ? PRESET_RING_CLASSES[c] : "";
|
|
59458
59968
|
}
|
|
59459
|
-
var IconTextActionCard =
|
|
59969
|
+
var IconTextActionCard = React11.forwardRef(
|
|
59460
59970
|
({
|
|
59461
59971
|
icon,
|
|
59462
59972
|
title,
|
|
@@ -59565,7 +60075,7 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59565
60075
|
!showActionsSlot ? s.gap : void 0,
|
|
59566
60076
|
variant === "gradient" && "relative z-10",
|
|
59567
60077
|
!showActionsSlot && "w-full min-w-0",
|
|
59568
|
-
showActionsSlot && "min-w-0"
|
|
60078
|
+
showActionsSlot && ["min-w-0", ACTIONS_LEADING_BASIS_CLASS]
|
|
59569
60079
|
),
|
|
59570
60080
|
children: leadingMain
|
|
59571
60081
|
}
|
|
@@ -59601,6 +60111,7 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59601
60111
|
"aria-disabled": disabled === true ? true : void 0,
|
|
59602
60112
|
className: cn(
|
|
59603
60113
|
"relative isolate inline-flex w-full max-w-full cursor-default items-center overflow-hidden rounded-xl text-left ring-offset-background",
|
|
60114
|
+
ACTIONS_ROW_CLASS,
|
|
59604
60115
|
showActionsSlot && "group",
|
|
59605
60116
|
variant === "gradient" && "group",
|
|
59606
60117
|
disabled && "pointer-events-none opacity-50",
|
|
@@ -59618,7 +60129,7 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59618
60129
|
"div",
|
|
59619
60130
|
{
|
|
59620
60131
|
className: cn(
|
|
59621
|
-
|
|
60132
|
+
ACTIONS_SLOT_CLASS,
|
|
59622
60133
|
showActionsOnlyOnHover && "pointer-events-none opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100"
|
|
59623
60134
|
),
|
|
59624
60135
|
children: actions
|
|
@@ -59635,6 +60146,7 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59635
60146
|
ref,
|
|
59636
60147
|
className: cn(
|
|
59637
60148
|
"relative isolate inline-flex w-full max-w-full items-center overflow-hidden rounded-xl ring-offset-background",
|
|
60149
|
+
ACTIONS_ROW_CLASS,
|
|
59638
60150
|
ringTransitionClass,
|
|
59639
60151
|
showActionsSlot && "group",
|
|
59640
60152
|
variant === "gradient" && "group",
|
|
@@ -59662,7 +60174,8 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59662
60174
|
"-m-0 inline-flex min-h-0 min-w-0 flex-1 cursor-pointer items-center rounded-none border-0 bg-transparent text-left outline-none focus-visible:outline-none",
|
|
59663
60175
|
s.gap,
|
|
59664
60176
|
variant === "gradient" && "relative z-10",
|
|
59665
|
-
"min-w-0"
|
|
60177
|
+
"min-w-0",
|
|
60178
|
+
ACTIONS_LEADING_BASIS_CLASS
|
|
59666
60179
|
),
|
|
59667
60180
|
children: leadingMain
|
|
59668
60181
|
}
|
|
@@ -59671,7 +60184,7 @@ var IconTextActionCard = React10.forwardRef(
|
|
|
59671
60184
|
"div",
|
|
59672
60185
|
{
|
|
59673
60186
|
className: cn(
|
|
59674
|
-
|
|
60187
|
+
ACTIONS_SLOT_CLASS,
|
|
59675
60188
|
showActionsOnlyOnHover && "pointer-events-none opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100"
|
|
59676
60189
|
),
|
|
59677
60190
|
children: actions
|
|
@@ -59744,7 +60257,7 @@ var dismissButtonSizeClasses = {
|
|
|
59744
60257
|
default: "size-7 [&_svg]:size-4",
|
|
59745
60258
|
lg: "size-8 [&_svg]:size-4"
|
|
59746
60259
|
};
|
|
59747
|
-
var Alert =
|
|
60260
|
+
var Alert = React11.forwardRef(
|
|
59748
60261
|
({
|
|
59749
60262
|
icon,
|
|
59750
60263
|
title,
|
|
@@ -59763,8 +60276,8 @@ var Alert = React10.forwardRef(
|
|
|
59763
60276
|
dismissLabel = "Close alert",
|
|
59764
60277
|
className
|
|
59765
60278
|
}, ref) => {
|
|
59766
|
-
const [dismissed, setDismissed] =
|
|
59767
|
-
const handleDismiss =
|
|
60279
|
+
const [dismissed, setDismissed] = React11.useState(false);
|
|
60280
|
+
const handleDismiss = React11.useCallback(() => {
|
|
59768
60281
|
setDismissed(true);
|
|
59769
60282
|
onDismiss?.();
|
|
59770
60283
|
}, [onDismiss]);
|
|
@@ -60139,10 +60652,10 @@ function CodeBlock({
|
|
|
60139
60652
|
inViewMargin
|
|
60140
60653
|
}
|
|
60141
60654
|
);
|
|
60142
|
-
const [visibleCode, setVisibleCode] =
|
|
60143
|
-
const [highlightedCode, setHighlightedCode] =
|
|
60144
|
-
const [isDone, setIsDone] =
|
|
60145
|
-
|
|
60655
|
+
const [visibleCode, setVisibleCode] = React11.useState("");
|
|
60656
|
+
const [highlightedCode, setHighlightedCode] = React11.useState("");
|
|
60657
|
+
const [isDone, setIsDone] = React11.useState(false);
|
|
60658
|
+
React11.useEffect(() => {
|
|
60146
60659
|
if (!visibleCode.length || !isInView) return;
|
|
60147
60660
|
const loadHighlightedCode = async () => {
|
|
60148
60661
|
const normalizedLang = normalizeLang(lang);
|
|
@@ -60166,7 +60679,7 @@ function CodeBlock({
|
|
|
60166
60679
|
};
|
|
60167
60680
|
loadHighlightedCode();
|
|
60168
60681
|
}, [lang, themes, writing, isInView, duration, delay2, visibleCode, theme]);
|
|
60169
|
-
|
|
60682
|
+
React11.useEffect(() => {
|
|
60170
60683
|
if (!writing) {
|
|
60171
60684
|
setVisibleCode(code);
|
|
60172
60685
|
onDone?.();
|
|
@@ -60213,7 +60726,7 @@ function CodeBlock({
|
|
|
60213
60726
|
clearInterval(intervalId);
|
|
60214
60727
|
};
|
|
60215
60728
|
}, [code, duration, delay2, isInView, writing, onDone, onWrite, localRef]);
|
|
60216
|
-
|
|
60729
|
+
React11.useEffect(() => {
|
|
60217
60730
|
if (!writing || !isInView) return;
|
|
60218
60731
|
const el = scrollContainerRef?.current ?? localRef.current?.parentElement ?? localRef.current;
|
|
60219
60732
|
if (!el) return;
|
|
@@ -60277,7 +60790,7 @@ function Code({
|
|
|
60277
60790
|
}) {
|
|
60278
60791
|
const showCopyButton = copyButton !== false && (copyButton === true || copyButton === void 0 && Boolean(lang));
|
|
60279
60792
|
const showHeader = fileName !== void 0 || showCopyButton;
|
|
60280
|
-
const scrollRef =
|
|
60793
|
+
const scrollRef = React11.useRef(null);
|
|
60281
60794
|
return /* @__PURE__ */ jsxs(
|
|
60282
60795
|
"div",
|
|
60283
60796
|
{
|
|
@@ -60320,9 +60833,9 @@ var MONOSPACE_SIZE_STYLES = {
|
|
|
60320
60833
|
default: { title: "text-sm", value: "text-sm", action: "size-6", gap: "gap-2" },
|
|
60321
60834
|
lg: { title: "text-base", value: "text-base", action: "size-7", gap: "gap-2.5" }
|
|
60322
60835
|
};
|
|
60323
|
-
var MonospaceContent =
|
|
60836
|
+
var MonospaceContent = React11.forwardRef(
|
|
60324
60837
|
function MonospaceContent2({ title, value: value2, color = "info", mask: mask2 = false, allowUnmask = true, size = "default", className }, ref) {
|
|
60325
|
-
const [revealed, setRevealed] =
|
|
60838
|
+
const [revealed, setRevealed] = React11.useState(false);
|
|
60326
60839
|
const canUnmask = mask2 && allowUnmask;
|
|
60327
60840
|
const masked = mask2 && !(canUnmask && revealed);
|
|
60328
60841
|
const sizeStyles9 = MONOSPACE_SIZE_STYLES[size];
|
|
@@ -60378,6 +60891,7 @@ var LIST_SIZE_STYLES = {
|
|
|
60378
60891
|
sm: {
|
|
60379
60892
|
listGap: "gap-4",
|
|
60380
60893
|
rowGap: "gap-3",
|
|
60894
|
+
rowGapFromSm: "sm:gap-3",
|
|
60381
60895
|
itemGap: "gap-1.5",
|
|
60382
60896
|
labelTypography: "text-xs font-medium",
|
|
60383
60897
|
rowValueTypography: "text-xs",
|
|
@@ -60387,6 +60901,7 @@ var LIST_SIZE_STYLES = {
|
|
|
60387
60901
|
default: {
|
|
60388
60902
|
listGap: "gap-5",
|
|
60389
60903
|
rowGap: "gap-4",
|
|
60904
|
+
rowGapFromSm: "sm:gap-4",
|
|
60390
60905
|
itemGap: "gap-2",
|
|
60391
60906
|
labelTypography: "text-sm font-medium",
|
|
60392
60907
|
rowValueTypography: "text-sm",
|
|
@@ -60396,6 +60911,7 @@ var LIST_SIZE_STYLES = {
|
|
|
60396
60911
|
lg: {
|
|
60397
60912
|
listGap: "gap-6",
|
|
60398
60913
|
rowGap: "gap-5",
|
|
60914
|
+
rowGapFromSm: "sm:gap-5",
|
|
60399
60915
|
itemGap: "gap-3",
|
|
60400
60916
|
labelTypography: "text-base font-medium",
|
|
60401
60917
|
rowValueTypography: "text-base",
|
|
@@ -60485,21 +61001,33 @@ function ItemRow({
|
|
|
60485
61001
|
"div",
|
|
60486
61002
|
{
|
|
60487
61003
|
className: cn(
|
|
60488
|
-
"flex flex-row items-center min-w-0",
|
|
61004
|
+
"flex flex-row items-start sm:items-center min-w-0",
|
|
60489
61005
|
listSizeStyles.rowGap,
|
|
60490
61006
|
item.className
|
|
60491
61007
|
),
|
|
60492
61008
|
children: [
|
|
60493
61009
|
avatarNode,
|
|
60494
|
-
/* @__PURE__ */
|
|
60495
|
-
/* @__PURE__ */ jsx(
|
|
61010
|
+
/* @__PURE__ */ jsxs(
|
|
60496
61011
|
"div",
|
|
60497
61012
|
{
|
|
60498
61013
|
className: cn(
|
|
60499
|
-
"min-w-0 flex-1 flex
|
|
60500
|
-
listSizeStyles.
|
|
61014
|
+
"flex min-w-0 flex-1 flex-col sm:flex-row sm:items-center",
|
|
61015
|
+
listSizeStyles.itemGap,
|
|
61016
|
+
listSizeStyles.rowGapFromSm
|
|
60501
61017
|
),
|
|
60502
|
-
children:
|
|
61018
|
+
children: [
|
|
61019
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: labelNode }),
|
|
61020
|
+
/* @__PURE__ */ jsx(
|
|
61021
|
+
"div",
|
|
61022
|
+
{
|
|
61023
|
+
className: cn(
|
|
61024
|
+
"min-w-0 flex sm:flex-1 sm:justify-end",
|
|
61025
|
+
listSizeStyles.rowValueTypography
|
|
61026
|
+
),
|
|
61027
|
+
children: item.content
|
|
61028
|
+
}
|
|
61029
|
+
)
|
|
61030
|
+
]
|
|
60503
61031
|
}
|
|
60504
61032
|
)
|
|
60505
61033
|
]
|
|
@@ -61001,10 +61529,17 @@ function DynamicList({
|
|
|
61001
61529
|
const valueRowAlignStart = usesBadgeArrayLayout;
|
|
61002
61530
|
const needsBlockValueLayout = hasTypedOrEffectiveMetaLayout || usesDefaultStructuredCode || usesBadgeArrayLayout;
|
|
61003
61531
|
if (rowDir === "row") {
|
|
61532
|
+
const splitStyle = {
|
|
61533
|
+
"--dynamic-list-key-width": `${keyWidthPct}%`,
|
|
61534
|
+
"--dynamic-list-value-width": `${valueWidthPct}%`
|
|
61535
|
+
};
|
|
61004
61536
|
return /* @__PURE__ */ jsxs(
|
|
61005
61537
|
"div",
|
|
61006
61538
|
{
|
|
61007
|
-
className: cn(
|
|
61539
|
+
className: cn(
|
|
61540
|
+
"flex w-full min-w-0 items-start sm:items-center",
|
|
61541
|
+
sizeStyles9.rowGap
|
|
61542
|
+
),
|
|
61008
61543
|
children: [
|
|
61009
61544
|
!hideIcon && /* @__PURE__ */ jsx(Avatar, { className: sizeStyles9.avatarSize, children: /* @__PURE__ */ jsx(
|
|
61010
61545
|
AvatarFallback,
|
|
@@ -61020,19 +61555,20 @@ function DynamicList({
|
|
|
61020
61555
|
"div",
|
|
61021
61556
|
{
|
|
61022
61557
|
className: cn(
|
|
61023
|
-
"flex min-w-0 flex-1 flex-row",
|
|
61024
|
-
|
|
61558
|
+
"flex min-w-0 flex-1 flex-col sm:flex-row sm:gap-0",
|
|
61559
|
+
sizeStyles9.itemGap,
|
|
61560
|
+
valueRowAlignStart ? "sm:items-start" : "sm:items-center"
|
|
61025
61561
|
),
|
|
61562
|
+
style: splitStyle,
|
|
61026
61563
|
children: [
|
|
61027
61564
|
/* @__PURE__ */ jsx(
|
|
61028
61565
|
"span",
|
|
61029
61566
|
{
|
|
61030
61567
|
className: cn(
|
|
61031
|
-
"truncate",
|
|
61568
|
+
"truncate sm:flex-none sm:basis-[var(--dynamic-list-key-width)]",
|
|
61032
61569
|
sizeStyles9.labelTypography,
|
|
61033
61570
|
labelClassName
|
|
61034
61571
|
),
|
|
61035
|
-
style: { flex: `0 0 ${keyWidthPct}%` },
|
|
61036
61572
|
children: labelText
|
|
61037
61573
|
}
|
|
61038
61574
|
),
|
|
@@ -61040,17 +61576,16 @@ function DynamicList({
|
|
|
61040
61576
|
"div",
|
|
61041
61577
|
{
|
|
61042
61578
|
className: cn(
|
|
61043
|
-
"flex min-w-0
|
|
61579
|
+
"flex min-w-0 text-muted-foreground sm:flex-none sm:basis-[var(--dynamic-list-value-width)] sm:justify-end",
|
|
61044
61580
|
sizeStyles9.valueTypography,
|
|
61045
|
-
usesBadgeArrayLayout ? "
|
|
61581
|
+
usesBadgeArrayLayout ? "items-start sm:pt-0.5 text-start" : "items-center"
|
|
61046
61582
|
),
|
|
61047
|
-
style: { flex: `0 0 ${valueWidthPct}%` },
|
|
61048
61583
|
children: /* @__PURE__ */ jsx(
|
|
61049
61584
|
"div",
|
|
61050
61585
|
{
|
|
61051
61586
|
className: cn(
|
|
61052
61587
|
"min-w-0 max-w-full",
|
|
61053
|
-
!usesBadgeArrayLayout && "truncate text-end",
|
|
61588
|
+
!usesBadgeArrayLayout && "sm:truncate sm:text-end",
|
|
61054
61589
|
valueClassName
|
|
61055
61590
|
),
|
|
61056
61591
|
children: valueDisplay
|
|
@@ -61203,7 +61738,8 @@ function KeyValueManagerAddPopover({
|
|
|
61203
61738
|
meta,
|
|
61204
61739
|
labels,
|
|
61205
61740
|
maxAllowed,
|
|
61206
|
-
onUpdate
|
|
61741
|
+
onUpdate,
|
|
61742
|
+
triggerClassName
|
|
61207
61743
|
}) {
|
|
61208
61744
|
const [open, setOpen] = useState(false);
|
|
61209
61745
|
const [draftKey, setDraftKey] = useState("");
|
|
@@ -61266,9 +61802,9 @@ function KeyValueManagerAddPopover({
|
|
|
61266
61802
|
color: "primary",
|
|
61267
61803
|
fullWidth: false,
|
|
61268
61804
|
disabled: atLimit,
|
|
61269
|
-
className: "shrink-0",
|
|
61805
|
+
className: cn("shrink-0 max-sm:size-9 max-sm:gap-0 max-sm:px-0", triggerClassName),
|
|
61270
61806
|
startIcon: /* @__PURE__ */ jsx(Plus, {}),
|
|
61271
|
-
children: labels.add
|
|
61807
|
+
children: /* @__PURE__ */ jsx("span", { className: "max-sm:sr-only", children: labels.add })
|
|
61272
61808
|
}
|
|
61273
61809
|
) }),
|
|
61274
61810
|
/* @__PURE__ */ jsxs(PopoverContent, { align: "end", className: "w-80 space-y-4", children: [
|
|
@@ -61366,8 +61902,44 @@ function KeyValueManagerTable({
|
|
|
61366
61902
|
setDirection(1);
|
|
61367
61903
|
setPage((current) => current + 1);
|
|
61368
61904
|
};
|
|
61905
|
+
const deleteButton = (item, sourceIndex, className) => /* @__PURE__ */ jsx(
|
|
61906
|
+
Button,
|
|
61907
|
+
{
|
|
61908
|
+
type: "button",
|
|
61909
|
+
variant: "ghost",
|
|
61910
|
+
color: "error",
|
|
61911
|
+
size: "icon",
|
|
61912
|
+
fullWidth: false,
|
|
61913
|
+
"aria-label": `Delete ${item.key}`,
|
|
61914
|
+
className,
|
|
61915
|
+
onClick: () => onDelete(sourceIndex),
|
|
61916
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4", "aria-hidden": true })
|
|
61917
|
+
}
|
|
61918
|
+
);
|
|
61919
|
+
const emptyMessage = hasSearchQuery ? emptySearch : emptyItems;
|
|
61369
61920
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
61370
|
-
/* @__PURE__ */
|
|
61921
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden sm:hidden", children: noRows ? /* @__PURE__ */ jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: emptyMessage }) : /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", custom: direction, initial: false, children: /* @__PURE__ */ jsx(
|
|
61922
|
+
motion.ul,
|
|
61923
|
+
{
|
|
61924
|
+
custom: direction,
|
|
61925
|
+
variants: slideVariants,
|
|
61926
|
+
initial: "enter",
|
|
61927
|
+
animate: "center",
|
|
61928
|
+
exit: "exit",
|
|
61929
|
+
transition: slideTransition,
|
|
61930
|
+
className: "divide-y divide-border",
|
|
61931
|
+
children: pageRows.map(({ item, sourceIndex }) => /* @__PURE__ */ jsx("li", { className: "py-3", children: /* @__PURE__ */ jsx(
|
|
61932
|
+
BasicDetailsCard,
|
|
61933
|
+
{
|
|
61934
|
+
primaryText: /* @__PURE__ */ jsx("span", { className: "block truncate", children: item.key }),
|
|
61935
|
+
secondaryText: item.value,
|
|
61936
|
+
action: deleteButton(item, sourceIndex)
|
|
61937
|
+
}
|
|
61938
|
+
) }, `${sourceIndex}-${item.key}`))
|
|
61939
|
+
},
|
|
61940
|
+
page
|
|
61941
|
+
) }) }),
|
|
61942
|
+
/* @__PURE__ */ jsxs(Table, { containerClassName: "hidden sm:block", children: [
|
|
61371
61943
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
61372
61944
|
/* @__PURE__ */ jsx(TableHead, { children: keyLabel }),
|
|
61373
61945
|
/* @__PURE__ */ jsx(TableHead, { children: valueLabel }),
|
|
@@ -61378,7 +61950,7 @@ function KeyValueManagerTable({
|
|
|
61378
61950
|
{
|
|
61379
61951
|
colSpan: 3,
|
|
61380
61952
|
className: "py-8 text-center text-muted-foreground",
|
|
61381
|
-
children:
|
|
61953
|
+
children: emptyMessage
|
|
61382
61954
|
}
|
|
61383
61955
|
) }) : /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", custom: direction, children: /* @__PURE__ */ jsx(
|
|
61384
61956
|
motion.tr,
|
|
@@ -61393,22 +61965,15 @@ function KeyValueManagerTable({
|
|
|
61393
61965
|
children: pageRows.map(({ item, sourceIndex }) => /* @__PURE__ */ jsxs(TableRow, { className: "group", children: [
|
|
61394
61966
|
/* @__PURE__ */ jsx(TableCell, { className: "max-w-[200px] truncate font-medium", children: item.key }),
|
|
61395
61967
|
/* @__PURE__ */ jsx(TableCell, { className: "max-w-[300px] truncate", children: item.value }),
|
|
61396
|
-
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children:
|
|
61397
|
-
|
|
61398
|
-
|
|
61399
|
-
|
|
61400
|
-
|
|
61401
|
-
|
|
61402
|
-
|
|
61403
|
-
|
|
61404
|
-
|
|
61405
|
-
className: cn(
|
|
61406
|
-
"pointer-events-none opacity-0 transition-opacity",
|
|
61407
|
-
"group-hover:pointer-events-auto group-hover:opacity-100"
|
|
61408
|
-
),
|
|
61409
|
-
onClick: () => onDelete(sourceIndex),
|
|
61410
|
-
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4", "aria-hidden": true })
|
|
61411
|
-
}
|
|
61968
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: deleteButton(
|
|
61969
|
+
item,
|
|
61970
|
+
sourceIndex,
|
|
61971
|
+
cn(
|
|
61972
|
+
"pointer-events-none opacity-0 transition-opacity",
|
|
61973
|
+
"group-hover:pointer-events-auto group-hover:opacity-100",
|
|
61974
|
+
// Keyboard users tab to it, so show it when focused.
|
|
61975
|
+
"focus-visible:opacity-100"
|
|
61976
|
+
)
|
|
61412
61977
|
) })
|
|
61413
61978
|
] }, `${sourceIndex}-${item.key}`))
|
|
61414
61979
|
},
|
|
@@ -61451,6 +62016,7 @@ function KeyValueManagerTable({
|
|
|
61451
62016
|
// src/components/key-value-manager/key-value-manager.props.ts
|
|
61452
62017
|
var STATIC_DEFAULT_LABELS = {
|
|
61453
62018
|
add: "Add",
|
|
62019
|
+
closeSearch: "Close search",
|
|
61454
62020
|
keyErrorMessage: "Invalid key",
|
|
61455
62021
|
valueErrorMessage: "Invalid value",
|
|
61456
62022
|
successMessage: "Added successfully",
|
|
@@ -61477,6 +62043,27 @@ function KeyValueManager({
|
|
|
61477
62043
|
}) {
|
|
61478
62044
|
const labels = resolveKeyValueManagerLabels(labelsProp);
|
|
61479
62045
|
const [searchQuery, setSearchQuery] = useState("");
|
|
62046
|
+
const [searchOpen, setSearchOpen] = useState(false);
|
|
62047
|
+
const [searchBoxKey, setSearchBoxKey] = useState(0);
|
|
62048
|
+
const toolbarRef = useRef(null);
|
|
62049
|
+
const searchButtonRef = useRef(null);
|
|
62050
|
+
const returnFocusRef = useRef(false);
|
|
62051
|
+
const searchExpanded = searchOpen || searchQuery !== "";
|
|
62052
|
+
useEffect(() => {
|
|
62053
|
+
if (searchOpen) toolbarRef.current?.querySelector("input")?.focus();
|
|
62054
|
+
}, [searchOpen]);
|
|
62055
|
+
useEffect(() => {
|
|
62056
|
+
if (!searchExpanded && returnFocusRef.current) {
|
|
62057
|
+
returnFocusRef.current = false;
|
|
62058
|
+
searchButtonRef.current?.focus();
|
|
62059
|
+
}
|
|
62060
|
+
}, [searchExpanded]);
|
|
62061
|
+
const closeSearch = () => {
|
|
62062
|
+
returnFocusRef.current = true;
|
|
62063
|
+
setSearchOpen(false);
|
|
62064
|
+
setSearchQuery("");
|
|
62065
|
+
setSearchBoxKey((key2) => key2 + 1);
|
|
62066
|
+
};
|
|
61480
62067
|
const filteredRows = useMemo(
|
|
61481
62068
|
() => filterKeyValueRows(items, searchQuery),
|
|
61482
62069
|
[items, searchQuery]
|
|
@@ -61485,28 +62072,71 @@ function KeyValueManager({
|
|
|
61485
62072
|
onUpdate(items.filter((_, index2) => index2 !== sourceIndex));
|
|
61486
62073
|
};
|
|
61487
62074
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full flex-col gap-4", className), children: [
|
|
61488
|
-
/* @__PURE__ */ jsxs(
|
|
61489
|
-
|
|
61490
|
-
|
|
61491
|
-
|
|
61492
|
-
|
|
61493
|
-
|
|
61494
|
-
|
|
61495
|
-
|
|
61496
|
-
|
|
61497
|
-
|
|
61498
|
-
|
|
61499
|
-
|
|
61500
|
-
|
|
61501
|
-
|
|
61502
|
-
|
|
61503
|
-
|
|
61504
|
-
|
|
61505
|
-
|
|
61506
|
-
|
|
61507
|
-
|
|
61508
|
-
|
|
61509
|
-
|
|
62075
|
+
/* @__PURE__ */ jsxs(
|
|
62076
|
+
"div",
|
|
62077
|
+
{
|
|
62078
|
+
ref: toolbarRef,
|
|
62079
|
+
className: "flex items-center gap-3 max-sm:gap-1",
|
|
62080
|
+
onKeyDown: (e) => {
|
|
62081
|
+
const inToolbar = toolbarRef.current?.contains(e.target);
|
|
62082
|
+
if (e.key === "Escape" && searchOpen && inToolbar) closeSearch();
|
|
62083
|
+
},
|
|
62084
|
+
children: [
|
|
62085
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex-1 sm:hidden", searchExpanded && "hidden") }),
|
|
62086
|
+
/* @__PURE__ */ jsx(
|
|
62087
|
+
Button,
|
|
62088
|
+
{
|
|
62089
|
+
type: "button",
|
|
62090
|
+
variant: "ghost",
|
|
62091
|
+
color: "primary",
|
|
62092
|
+
size: "icon",
|
|
62093
|
+
fullWidth: false,
|
|
62094
|
+
ref: searchButtonRef,
|
|
62095
|
+
"aria-label": labels.search,
|
|
62096
|
+
className: cn("sm:hidden", searchExpanded && "hidden"),
|
|
62097
|
+
onClick: () => setSearchOpen(true),
|
|
62098
|
+
children: /* @__PURE__ */ jsx(Search, { className: "h-4 w-4", "aria-hidden": true })
|
|
62099
|
+
}
|
|
62100
|
+
),
|
|
62101
|
+
/* @__PURE__ */ jsx(
|
|
62102
|
+
SearchBox,
|
|
62103
|
+
{
|
|
62104
|
+
className: cn("min-w-0 flex-1", !searchExpanded && "max-sm:hidden"),
|
|
62105
|
+
placeholder: labels.search,
|
|
62106
|
+
onSearch: setSearchQuery,
|
|
62107
|
+
onClear: () => setSearchQuery(""),
|
|
62108
|
+
onValueChange: setSearchQuery
|
|
62109
|
+
},
|
|
62110
|
+
searchBoxKey
|
|
62111
|
+
),
|
|
62112
|
+
/* @__PURE__ */ jsx(
|
|
62113
|
+
Button,
|
|
62114
|
+
{
|
|
62115
|
+
type: "button",
|
|
62116
|
+
variant: "ghost",
|
|
62117
|
+
color: "gray",
|
|
62118
|
+
size: "icon",
|
|
62119
|
+
fullWidth: false,
|
|
62120
|
+
"aria-label": labels.closeSearch,
|
|
62121
|
+
className: cn("shrink-0 sm:hidden", !searchExpanded && "hidden"),
|
|
62122
|
+
onClick: closeSearch,
|
|
62123
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": true })
|
|
62124
|
+
}
|
|
62125
|
+
),
|
|
62126
|
+
/* @__PURE__ */ jsx(
|
|
62127
|
+
KeyValueManagerAddPopover,
|
|
62128
|
+
{
|
|
62129
|
+
items,
|
|
62130
|
+
meta,
|
|
62131
|
+
labels,
|
|
62132
|
+
maxAllowed,
|
|
62133
|
+
onUpdate,
|
|
62134
|
+
triggerClassName: cn(searchExpanded && "max-sm:hidden")
|
|
62135
|
+
}
|
|
62136
|
+
)
|
|
62137
|
+
]
|
|
62138
|
+
}
|
|
62139
|
+
),
|
|
61510
62140
|
/* @__PURE__ */ jsx(
|
|
61511
62141
|
KeyValueManagerTable,
|
|
61512
62142
|
{
|
|
@@ -61774,7 +62404,7 @@ function SimplePaginatedList({
|
|
|
61774
62404
|
] }) : null
|
|
61775
62405
|
] });
|
|
61776
62406
|
}
|
|
61777
|
-
var ToastDefaultVariantContext =
|
|
62407
|
+
var ToastDefaultVariantContext = React11.createContext(void 0);
|
|
61778
62408
|
var typeIconMap2 = {
|
|
61779
62409
|
error: /* @__PURE__ */ jsx(CircleX, { className: "h-4 w-4" }),
|
|
61780
62410
|
info: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" }),
|
|
@@ -61793,7 +62423,7 @@ function defaultIconFromColor2(color) {
|
|
|
61793
62423
|
return type != null ? typeIconMap2[type] : void 0;
|
|
61794
62424
|
}
|
|
61795
62425
|
function isToastProps(input) {
|
|
61796
|
-
return input != null && typeof input === "object" && !
|
|
62426
|
+
return input != null && typeof input === "object" && !React11.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);
|
|
61797
62427
|
}
|
|
61798
62428
|
function normalizeToastInput(input, type) {
|
|
61799
62429
|
if (isToastProps(input)) {
|
|
@@ -61817,7 +62447,7 @@ function resolveToastOptions(props, options) {
|
|
|
61817
62447
|
closeButton: options?.closeButton
|
|
61818
62448
|
};
|
|
61819
62449
|
}
|
|
61820
|
-
var Toast =
|
|
62450
|
+
var Toast = React11.forwardRef(
|
|
61821
62451
|
({
|
|
61822
62452
|
icon,
|
|
61823
62453
|
title,
|
|
@@ -61829,7 +62459,7 @@ var Toast = React10.forwardRef(
|
|
|
61829
62459
|
action,
|
|
61830
62460
|
className
|
|
61831
62461
|
}, ref) => {
|
|
61832
|
-
const defaultVariantFromToaster =
|
|
62462
|
+
const defaultVariantFromToaster = React11.useContext(
|
|
61833
62463
|
ToastDefaultVariantContext
|
|
61834
62464
|
);
|
|
61835
62465
|
const resolvedVariant = variant ?? defaultVariantFromToaster ?? "soft";
|
|
@@ -61876,7 +62506,7 @@ var Toast = React10.forwardRef(
|
|
|
61876
62506
|
}
|
|
61877
62507
|
);
|
|
61878
62508
|
Toast.displayName = "Toast";
|
|
61879
|
-
var Toaster =
|
|
62509
|
+
var Toaster = React11.forwardRef(
|
|
61880
62510
|
({
|
|
61881
62511
|
position: position2 = "top-right",
|
|
61882
62512
|
closeButton = true,
|
|
@@ -62005,9 +62635,9 @@ function createMarkdownComponents({
|
|
|
62005
62635
|
}
|
|
62006
62636
|
var REMARK_PLUGINS = [remarkGfm];
|
|
62007
62637
|
var REHYPE_PLUGINS = [rehypeSlug];
|
|
62008
|
-
var MarkdownContent =
|
|
62638
|
+
var MarkdownContent = React11.forwardRef(
|
|
62009
62639
|
function MarkdownContent2({ content: content3, linkComponent, colorTheme, className }, ref) {
|
|
62010
|
-
const components =
|
|
62640
|
+
const components = React11.useMemo(
|
|
62011
62641
|
() => createMarkdownComponents({ linkComponent, colorTheme }),
|
|
62012
62642
|
[linkComponent, colorTheme]
|
|
62013
62643
|
);
|
|
@@ -67588,7 +68218,7 @@ function strokeResolvedStyle(color, opacity) {
|
|
|
67588
68218
|
return { stroke: mix };
|
|
67589
68219
|
}
|
|
67590
68220
|
var labelTypographyClass = "whitespace-nowrap text-center leading-none font-semibold tracking-tight tabular-nums";
|
|
67591
|
-
var CircularProgress =
|
|
68221
|
+
var CircularProgress = React11.forwardRef(
|
|
67592
68222
|
function CircularProgress2({
|
|
67593
68223
|
value: value2,
|
|
67594
68224
|
showPercentage = false,
|
|
@@ -67716,13 +68346,13 @@ function CountingNumber({
|
|
|
67716
68346
|
const decimals = typeof decimalPlaces === "number" ? decimalPlaces : numberStr.includes(".") ? numberStr.split(".")[1]?.length ?? 0 : 0;
|
|
67717
68347
|
const motionVal = useMotionValue(initiallyStable ? number : fromNumber);
|
|
67718
68348
|
const springVal = useSpring(motionVal, transition);
|
|
67719
|
-
|
|
68349
|
+
React11.useEffect(() => {
|
|
67720
68350
|
const timeoutId = setTimeout(() => {
|
|
67721
68351
|
if (isInView) motionVal.set(number);
|
|
67722
68352
|
}, delay2);
|
|
67723
68353
|
return () => clearTimeout(timeoutId);
|
|
67724
68354
|
}, [isInView, number, motionVal, delay2]);
|
|
67725
|
-
|
|
68355
|
+
React11.useEffect(() => {
|
|
67726
68356
|
const unsubscribe = springVal.on("change", (latest) => {
|
|
67727
68357
|
if (localRef.current) {
|
|
67728
68358
|
let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();
|
|
@@ -67866,9 +68496,9 @@ function ProgressBar({
|
|
|
67866
68496
|
className,
|
|
67867
68497
|
...props
|
|
67868
68498
|
}) {
|
|
67869
|
-
const [fakeValue, setFakeValue] =
|
|
67870
|
-
const intervalRef =
|
|
67871
|
-
|
|
68499
|
+
const [fakeValue, setFakeValue] = React11.useState(FAKE_PROGRESS_MIN);
|
|
68500
|
+
const intervalRef = React11.useRef(null);
|
|
68501
|
+
React11.useEffect(() => {
|
|
67872
68502
|
if (!showFakeProgress) return;
|
|
67873
68503
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
67874
68504
|
setFakeValue(FAKE_PROGRESS_MIN);
|
|
@@ -68000,7 +68630,7 @@ function trailingChevronRow(options) {
|
|
|
68000
68630
|
}
|
|
68001
68631
|
);
|
|
68002
68632
|
}
|
|
68003
|
-
var SimpleClickableCard =
|
|
68633
|
+
var SimpleClickableCard = React11.forwardRef(
|
|
68004
68634
|
({
|
|
68005
68635
|
icon,
|
|
68006
68636
|
leadingIcon,
|
|
@@ -68156,7 +68786,7 @@ function infoTriggerIconFgClass(variant, cardColor, infoButtonColor) {
|
|
|
68156
68786
|
}
|
|
68157
68787
|
return INFO_ICON_FG_CLASS[infoButtonColor];
|
|
68158
68788
|
}
|
|
68159
|
-
var SimpleInfoCard =
|
|
68789
|
+
var SimpleInfoCard = React11.forwardRef(
|
|
68160
68790
|
({
|
|
68161
68791
|
icon,
|
|
68162
68792
|
title,
|
|
@@ -68407,8 +69037,8 @@ function applyEdit(el, edit) {
|
|
|
68407
69037
|
el.setSelectionRange(edit.selectionStart, edit.selectionEnd);
|
|
68408
69038
|
}
|
|
68409
69039
|
function useCodeEditorKeys({ tabSize, onKeyDown, onBlur }) {
|
|
68410
|
-
const tabReleasedRef =
|
|
68411
|
-
const handleKeyDown =
|
|
69040
|
+
const tabReleasedRef = React11.useRef(false);
|
|
69041
|
+
const handleKeyDown = React11.useCallback(
|
|
68412
69042
|
(event) => {
|
|
68413
69043
|
onKeyDown?.(event);
|
|
68414
69044
|
if (event.defaultPrevented) return;
|
|
@@ -68442,7 +69072,7 @@ function useCodeEditorKeys({ tabSize, onKeyDown, onBlur }) {
|
|
|
68442
69072
|
},
|
|
68443
69073
|
[onKeyDown, tabSize]
|
|
68444
69074
|
);
|
|
68445
|
-
const handleBlur =
|
|
69075
|
+
const handleBlur = React11.useCallback(
|
|
68446
69076
|
(event) => {
|
|
68447
69077
|
tabReleasedRef.current = false;
|
|
68448
69078
|
onBlur?.(event);
|
|
@@ -68477,11 +69107,11 @@ function warnOnce(key2, message, error) {
|
|
|
68477
69107
|
}
|
|
68478
69108
|
var resolved = /* @__PURE__ */ new WeakMap();
|
|
68479
69109
|
function useHighlightedHtml(value2, { lang, theme, themes, maxHighlightLength }) {
|
|
68480
|
-
const [highlighter, setHighlighter] =
|
|
69110
|
+
const [highlighter, setHighlighter] = React11.useState(() => {
|
|
68481
69111
|
const promise = getHighlighter();
|
|
68482
69112
|
return resolved.get(promise) ?? null;
|
|
68483
69113
|
});
|
|
68484
|
-
|
|
69114
|
+
React11.useEffect(() => {
|
|
68485
69115
|
if (highlighter) return;
|
|
68486
69116
|
let active2 = true;
|
|
68487
69117
|
const promise = getHighlighter();
|
|
@@ -68496,9 +69126,9 @@ function useHighlightedHtml(value2, { lang, theme, themes, maxHighlightLength })
|
|
|
68496
69126
|
active2 = false;
|
|
68497
69127
|
};
|
|
68498
69128
|
}, [highlighter]);
|
|
68499
|
-
const deferredValue =
|
|
69129
|
+
const deferredValue = React11.useDeferredValue(value2);
|
|
68500
69130
|
const { light, dark } = themes;
|
|
68501
|
-
return
|
|
69131
|
+
return React11.useMemo(() => {
|
|
68502
69132
|
if (!highlighter || deferredValue.length > maxHighlightLength) {
|
|
68503
69133
|
return plainHtml(deferredValue);
|
|
68504
69134
|
}
|
|
@@ -68561,7 +69191,7 @@ function hasContent(node) {
|
|
|
68561
69191
|
function toCssSize(size) {
|
|
68562
69192
|
return typeof size === "number" ? `${size}px` : size;
|
|
68563
69193
|
}
|
|
68564
|
-
var CodeEditor =
|
|
69194
|
+
var CodeEditor = React11.forwardRef(
|
|
68565
69195
|
({
|
|
68566
69196
|
className,
|
|
68567
69197
|
style,
|
|
@@ -68600,12 +69230,12 @@ var CodeEditor = React10.forwardRef(
|
|
|
68600
69230
|
"aria-describedby": ariaDescribedBy,
|
|
68601
69231
|
...textareaProps
|
|
68602
69232
|
}, forwardedRef) => {
|
|
68603
|
-
const autoId =
|
|
69233
|
+
const autoId = React11.useId();
|
|
68604
69234
|
const textareaId = id || autoId;
|
|
68605
69235
|
const errorId = `${textareaId}-error`;
|
|
68606
69236
|
const hasError = error || !!errorContent;
|
|
68607
69237
|
const isControlled = value2 !== void 0;
|
|
68608
|
-
const [innerValue, setInnerValue] =
|
|
69238
|
+
const [innerValue, setInnerValue] = React11.useState(
|
|
68609
69239
|
() => defaultValue == null ? "" : String(defaultValue)
|
|
68610
69240
|
);
|
|
68611
69241
|
const currentValue = isControlled ? String(value2 ?? "") : innerValue;
|
|
@@ -68616,9 +69246,9 @@ var CodeEditor = React10.forwardRef(
|
|
|
68616
69246
|
maxHighlightLength
|
|
68617
69247
|
});
|
|
68618
69248
|
const keys = useCodeEditorKeys({ tabSize, onKeyDown, onBlur });
|
|
68619
|
-
const textareaRef =
|
|
68620
|
-
const stopObservingRef =
|
|
68621
|
-
const setTextareaRef =
|
|
69249
|
+
const textareaRef = React11.useRef(null);
|
|
69250
|
+
const stopObservingRef = React11.useRef(void 0);
|
|
69251
|
+
const setTextareaRef = React11.useCallback(
|
|
68622
69252
|
(node) => {
|
|
68623
69253
|
textareaRef.current = node;
|
|
68624
69254
|
stopObservingRef.current?.();
|
|
@@ -68796,7 +69426,7 @@ var maxWidthClasses = {
|
|
|
68796
69426
|
lg: "max-w-5xl",
|
|
68797
69427
|
xl: "max-w-7xl"
|
|
68798
69428
|
};
|
|
68799
|
-
var ContentContainer =
|
|
69429
|
+
var ContentContainer = React11.forwardRef(
|
|
68800
69430
|
function ContentContainer2({ maxWidth, children, className, noGutters = false }, ref) {
|
|
68801
69431
|
return /* @__PURE__ */ jsx(
|
|
68802
69432
|
"div",
|