@espressif/dashboard-ui-components 1.9.1 → 1.10.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 +114 -0
- package/dist/{chunk-XW6Z6VO4.js → chunk-2GDYZAKR.js} +3 -3
- package/dist/{chunk-ABBHGIFI.js → chunk-ALCWXFUC.js} +42 -42
- package/dist/{chunk-HIUBSBAP.js → chunk-CDHBLANU.js} +3 -3
- package/dist/{chunk-XFYL5IZU.js → chunk-LUESSJAF.js} +636 -172
- package/dist/{chunk-P6F6UWV2.js → chunk-TMORRNEB.js} +1 -1
- package/dist/{chunk-OKB2WTX7.js → chunk-XNLCVHBC.js} +3 -2
- package/dist/{chunk-ZFYUONPY.js → chunk-Z4776NRY.js} +33 -7
- package/dist/common/index.js +6 -6
- package/dist/components/index.d.ts +159 -43
- package/dist/components/index.js +4 -4
- package/dist/core/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/layouts/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardContent, Label, Badge, Popover, PopoverTrigger, PopoverContent, resolveVariantStyles, VariantGradientUnderlay, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, VARIANT_GRADIENT_BACKDROP_BASE, SILVER_GRADIENT_BACKDROP, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, arbitraryGradientBackgroundImage, SilverShineOverlay, SilverMetallicBorderOverlay, buttonGroupVariants, useIsInView } from './chunk-
|
|
2
|
-
import { 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-
|
|
3
|
-
import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, useIsMobile, useControlledState, Button as Button$1, Skeleton, Avatar, AvatarFallback } from './chunk-
|
|
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, PopoverAnchor } from './chunk-ALCWXFUC.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-Z4776NRY.js';
|
|
3
|
+
import { getStrictContext, buttonVariants, Separator, CollapsibleContent, Collapsible, CollapsibleTrigger, useIsMobile, useControlledState, Button as Button$1, Skeleton, Avatar, AvatarFallback, MOBILE_MEDIA_QUERY } from './chunk-XNLCVHBC.js';
|
|
4
4
|
import { cn, resolveColor, isPresetColor } from './chunk-VU4CZ76T.js';
|
|
5
5
|
import { __commonJS, __toESM } from './chunk-TRTQSARU.js';
|
|
6
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';
|
|
@@ -16727,8 +16727,10 @@ function CollapsibleCard({
|
|
|
16727
16727
|
var sizeStyles2 = {
|
|
16728
16728
|
sm: {
|
|
16729
16729
|
pad: "p-3",
|
|
16730
|
-
|
|
16731
|
-
|
|
16730
|
+
headerRowPadY: "py-3",
|
|
16731
|
+
headerRowGapY: "gap-y-2",
|
|
16732
|
+
headerTriggerPad: "-my-3 py-3 pl-3",
|
|
16733
|
+
headerRightPad: "pl-3 pr-3",
|
|
16732
16734
|
gap: "gap-2",
|
|
16733
16735
|
primaryTypography: "text-xs font-semibold",
|
|
16734
16736
|
secondaryTypography: "text-xs",
|
|
@@ -16740,8 +16742,10 @@ var sizeStyles2 = {
|
|
|
16740
16742
|
},
|
|
16741
16743
|
default: {
|
|
16742
16744
|
pad: "p-4",
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
+
headerRowPadY: "py-4",
|
|
16746
|
+
headerRowGapY: "gap-y-3",
|
|
16747
|
+
headerTriggerPad: "-my-4 py-4 pl-4",
|
|
16748
|
+
headerRightPad: "pl-3 pr-4",
|
|
16745
16749
|
gap: "gap-3",
|
|
16746
16750
|
primaryTypography: "text-sm font-semibold",
|
|
16747
16751
|
secondaryTypography: "text-sm",
|
|
@@ -16753,8 +16757,10 @@ var sizeStyles2 = {
|
|
|
16753
16757
|
},
|
|
16754
16758
|
lg: {
|
|
16755
16759
|
pad: "p-6",
|
|
16756
|
-
|
|
16757
|
-
|
|
16760
|
+
headerRowPadY: "py-6",
|
|
16761
|
+
headerRowGapY: "gap-y-4",
|
|
16762
|
+
headerTriggerPad: "-my-6 py-6 pl-6",
|
|
16763
|
+
headerRightPad: "pl-3 pr-6",
|
|
16758
16764
|
gap: "gap-4",
|
|
16759
16765
|
primaryTypography: "text-base font-semibold",
|
|
16760
16766
|
secondaryTypography: "text-sm",
|
|
@@ -16776,6 +16782,9 @@ function iconSizedForSection(icon, iconClass) {
|
|
|
16776
16782
|
}
|
|
16777
16783
|
return /* @__PURE__ */ jsx("span", { className: cn("inline-flex items-center justify-center", iconClass), children: icon });
|
|
16778
16784
|
}
|
|
16785
|
+
var HEADER_WRAP_ROW_CLASS = "flex-wrap";
|
|
16786
|
+
var HEADER_MAIN_BASIS_CLASS = "basis-48";
|
|
16787
|
+
var HEADER_RIGHT_CLASS = "ml-auto max-w-full shrink-0";
|
|
16779
16788
|
var cardClassName = "rounded-lg border-border bg-card shadow-none overflow-hidden";
|
|
16780
16789
|
function hasTooltipContent(content3) {
|
|
16781
16790
|
if (content3 == null) return false;
|
|
@@ -16865,7 +16874,11 @@ function SectionCard({
|
|
|
16865
16874
|
const hasIcon = hasRenderableContent(icon);
|
|
16866
16875
|
const showCollapseIcon = allowCollapse && !hideCollapseIcon;
|
|
16867
16876
|
const hasHeaderRight = hasRenderableContent(actions) || showCollapseIcon;
|
|
16868
|
-
const headerMainPad = hasHeaderRight ? s.headerTriggerPad : s.pad;
|
|
16877
|
+
const headerMainPad = hasHeaderRight ? cn(s.headerTriggerPad, HEADER_MAIN_BASIS_CLASS) : s.pad;
|
|
16878
|
+
const headerRowClass = cn(
|
|
16879
|
+
"flex min-w-0 items-center justify-between",
|
|
16880
|
+
hasHeaderRight && cn(HEADER_WRAP_ROW_CLASS, s.headerRowPadY, s.headerRowGapY)
|
|
16881
|
+
);
|
|
16869
16882
|
const isHeaderRequired = hasIcon || hasHeaderText || hasHeaderRight;
|
|
16870
16883
|
const hasBody = hasRenderableContent(children);
|
|
16871
16884
|
const headerMain = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -16946,11 +16959,21 @@ function SectionCard({
|
|
|
16946
16959
|
] })
|
|
16947
16960
|
}
|
|
16948
16961
|
) });
|
|
16949
|
-
const headerRight = hasHeaderRight ? /* @__PURE__ */ jsxs(
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16962
|
+
const headerRight = hasHeaderRight ? /* @__PURE__ */ jsxs(
|
|
16963
|
+
"div",
|
|
16964
|
+
{
|
|
16965
|
+
className: cn(
|
|
16966
|
+
"flex items-center gap-2",
|
|
16967
|
+
HEADER_RIGHT_CLASS,
|
|
16968
|
+
s.headerRightPad
|
|
16969
|
+
),
|
|
16970
|
+
children: [
|
|
16971
|
+
actions,
|
|
16972
|
+
showCollapseIcon ? chevronButton : null
|
|
16973
|
+
]
|
|
16974
|
+
}
|
|
16975
|
+
) : null;
|
|
16976
|
+
const header = allowCollapse ? /* @__PURE__ */ jsxs("div", { className: headerRowClass, children: [
|
|
16954
16977
|
/* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
16955
16978
|
"button",
|
|
16956
16979
|
{
|
|
@@ -16968,7 +16991,7 @@ function SectionCard({
|
|
|
16968
16991
|
}
|
|
16969
16992
|
) }),
|
|
16970
16993
|
headerRight
|
|
16971
|
-
] }) : /* @__PURE__ */ jsxs("div", { className:
|
|
16994
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: headerRowClass, children: [
|
|
16972
16995
|
/* @__PURE__ */ jsx(
|
|
16973
16996
|
"div",
|
|
16974
16997
|
{
|
|
@@ -47636,6 +47659,142 @@ function AnimatedCard({
|
|
|
47636
47659
|
}
|
|
47637
47660
|
);
|
|
47638
47661
|
}
|
|
47662
|
+
function ListDetailsItemButton({
|
|
47663
|
+
item,
|
|
47664
|
+
isSelected,
|
|
47665
|
+
onSelect,
|
|
47666
|
+
showDefaultEndIcon
|
|
47667
|
+
}) {
|
|
47668
|
+
const defaultEndIcon = showDefaultEndIcon ? /* @__PURE__ */ jsx(ChevronRight, { className: "size-4", "aria-hidden": true }) : null;
|
|
47669
|
+
const endIcon = item.endIcon ?? defaultEndIcon;
|
|
47670
|
+
if (typeof item.title !== "string") {
|
|
47671
|
+
return /* @__PURE__ */ jsxs(
|
|
47672
|
+
"button",
|
|
47673
|
+
{
|
|
47674
|
+
type: "button",
|
|
47675
|
+
onClick: () => onSelect(item.id),
|
|
47676
|
+
"aria-pressed": isSelected,
|
|
47677
|
+
className: cn(
|
|
47678
|
+
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left",
|
|
47679
|
+
"border-0 bg-transparent shadow-none",
|
|
47680
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
47681
|
+
),
|
|
47682
|
+
children: [
|
|
47683
|
+
/* @__PURE__ */ jsx("span", { className: "flex min-w-0 flex-1 items-center", children: item.title }),
|
|
47684
|
+
endIcon != null && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: endIcon })
|
|
47685
|
+
]
|
|
47686
|
+
}
|
|
47687
|
+
);
|
|
47688
|
+
}
|
|
47689
|
+
return /* @__PURE__ */ jsx(
|
|
47690
|
+
Button,
|
|
47691
|
+
{
|
|
47692
|
+
type: "button",
|
|
47693
|
+
variant: isSelected ? "outline" : "ghost",
|
|
47694
|
+
color: isSelected ? "primary" : "gray",
|
|
47695
|
+
onClick: () => onSelect(item.id),
|
|
47696
|
+
"aria-pressed": isSelected,
|
|
47697
|
+
className: !isSelected ? "border border-transparent" : "",
|
|
47698
|
+
endIcon: endIcon ?? void 0,
|
|
47699
|
+
hideRingOnHover: true,
|
|
47700
|
+
children: /* @__PURE__ */ jsx("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: item.title }) })
|
|
47701
|
+
}
|
|
47702
|
+
);
|
|
47703
|
+
}
|
|
47704
|
+
function focusSelectedItem(list) {
|
|
47705
|
+
list?.querySelector('[aria-pressed="true"]')?.focus();
|
|
47706
|
+
}
|
|
47707
|
+
function ListDetailsItemDropdown({
|
|
47708
|
+
data: data2,
|
|
47709
|
+
selectedId,
|
|
47710
|
+
onSelect,
|
|
47711
|
+
footer,
|
|
47712
|
+
labels,
|
|
47713
|
+
className
|
|
47714
|
+
}) {
|
|
47715
|
+
const [open, setOpen] = useState(false);
|
|
47716
|
+
const listRef = useRef(null);
|
|
47717
|
+
const selectedIndex = data2.findIndex((item) => item.id === selectedId);
|
|
47718
|
+
const selectedItem = data2[selectedIndex];
|
|
47719
|
+
const previousItem = selectedIndex > 0 ? data2[selectedIndex - 1] : void 0;
|
|
47720
|
+
const nextItem = selectedIndex >= 0 ? data2[selectedIndex + 1] : void 0;
|
|
47721
|
+
const handleSelect = (itemId) => {
|
|
47722
|
+
onSelect(itemId);
|
|
47723
|
+
setOpen(false);
|
|
47724
|
+
};
|
|
47725
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
47726
|
+
/* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs("div", { "data-slot": "list-details-item-dropdown", className: cn("flex items-center gap-2", className), children: [
|
|
47727
|
+
/* @__PURE__ */ jsx(
|
|
47728
|
+
Button,
|
|
47729
|
+
{
|
|
47730
|
+
type: "button",
|
|
47731
|
+
size: "icon",
|
|
47732
|
+
variant: "outline",
|
|
47733
|
+
color: "gray",
|
|
47734
|
+
"aria-label": labels.previousItem,
|
|
47735
|
+
disabled: previousItem == null,
|
|
47736
|
+
onClick: () => previousItem && onSelect(previousItem.id),
|
|
47737
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": true })
|
|
47738
|
+
}
|
|
47739
|
+
),
|
|
47740
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
47741
|
+
Button,
|
|
47742
|
+
{
|
|
47743
|
+
type: "button",
|
|
47744
|
+
variant: "outline",
|
|
47745
|
+
color: "gray",
|
|
47746
|
+
className: "min-w-0 flex-1 justify-between px-3",
|
|
47747
|
+
endIcon: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": true }),
|
|
47748
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center", children: [
|
|
47749
|
+
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
47750
|
+
labels.chooseItem,
|
|
47751
|
+
":"
|
|
47752
|
+
] }),
|
|
47753
|
+
" ",
|
|
47754
|
+
typeof selectedItem?.title === "string" ? /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: selectedItem.title }) : selectedItem?.title
|
|
47755
|
+
] })
|
|
47756
|
+
}
|
|
47757
|
+
) }),
|
|
47758
|
+
/* @__PURE__ */ jsx(
|
|
47759
|
+
Button,
|
|
47760
|
+
{
|
|
47761
|
+
type: "button",
|
|
47762
|
+
size: "icon",
|
|
47763
|
+
variant: "outline",
|
|
47764
|
+
color: "gray",
|
|
47765
|
+
"aria-label": labels.nextItem,
|
|
47766
|
+
disabled: nextItem == null,
|
|
47767
|
+
onClick: () => nextItem && onSelect(nextItem.id),
|
|
47768
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": true })
|
|
47769
|
+
}
|
|
47770
|
+
)
|
|
47771
|
+
] }) }),
|
|
47772
|
+
/* @__PURE__ */ jsxs(
|
|
47773
|
+
PopoverContent,
|
|
47774
|
+
{
|
|
47775
|
+
align: "start",
|
|
47776
|
+
className: "flex w-[var(--radix-popover-trigger-width)] max-h-[min(24rem,var(--radix-popover-content-available-height))] flex-col gap-2 p-2",
|
|
47777
|
+
onOpenAutoFocus: (event) => {
|
|
47778
|
+
event.preventDefault();
|
|
47779
|
+
focusSelectedItem(listRef.current);
|
|
47780
|
+
},
|
|
47781
|
+
children: [
|
|
47782
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx("div", { ref: listRef, className: "flex flex-col gap-2", children: data2.map((item) => /* @__PURE__ */ jsx(
|
|
47783
|
+
ListDetailsItemButton,
|
|
47784
|
+
{
|
|
47785
|
+
item,
|
|
47786
|
+
isSelected: item.id === selectedId,
|
|
47787
|
+
onSelect: handleSelect,
|
|
47788
|
+
showDefaultEndIcon: false
|
|
47789
|
+
},
|
|
47790
|
+
item.id
|
|
47791
|
+
)) }) }),
|
|
47792
|
+
footer != null ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: footer }) : null
|
|
47793
|
+
]
|
|
47794
|
+
}
|
|
47795
|
+
)
|
|
47796
|
+
] });
|
|
47797
|
+
}
|
|
47639
47798
|
var NO_OVERFLOW = { start: false, end: false };
|
|
47640
47799
|
function useScrollOverflow(ref, { enabled = true, getContent, onResize } = {}) {
|
|
47641
47800
|
const [overflow, setOverflow] = React11.useState(NO_OVERFLOW);
|
|
@@ -47812,6 +47971,11 @@ function ListDetailsItemStrip({
|
|
|
47812
47971
|
}
|
|
47813
47972
|
);
|
|
47814
47973
|
}
|
|
47974
|
+
var DEFAULT_LABELS = {
|
|
47975
|
+
previousItem: "Previous item",
|
|
47976
|
+
nextItem: "Next item",
|
|
47977
|
+
chooseItem: "Choose item"
|
|
47978
|
+
};
|
|
47815
47979
|
var panelColSpanClass = {
|
|
47816
47980
|
1: "md:col-span-1",
|
|
47817
47981
|
2: "md:col-span-2",
|
|
@@ -47866,7 +48030,9 @@ function ListDetails({
|
|
|
47866
48030
|
unmountOnExit = false,
|
|
47867
48031
|
variant = "outline",
|
|
47868
48032
|
color = "mist",
|
|
47869
|
-
size = "default"
|
|
48033
|
+
size = "default",
|
|
48034
|
+
mobileNavigation = "dropdown",
|
|
48035
|
+
labels
|
|
47870
48036
|
}) {
|
|
47871
48037
|
const [selectedId, setSelectedId] = useState(
|
|
47872
48038
|
() => pickSelectedId({ data: data2, controlledValue: value2 })
|
|
@@ -47923,7 +48089,7 @@ function ListDetails({
|
|
|
47923
48089
|
"div",
|
|
47924
48090
|
{
|
|
47925
48091
|
className: cn(
|
|
47926
|
-
// Below `md`: one column, the item
|
|
48092
|
+
// Below `md`: one column, the item picker above the details.
|
|
47927
48093
|
"grid grid-cols-1 gap-4 md:grid-cols-12",
|
|
47928
48094
|
isFixedHeight ? "h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] md:grid-rows-[minmax(0,1fr)]" : "md:min-h-[16rem]"
|
|
47929
48095
|
),
|
|
@@ -47937,7 +48103,7 @@ function ListDetails({
|
|
|
47937
48103
|
panelColSpanClass[titleListPanelColumnWidth]
|
|
47938
48104
|
),
|
|
47939
48105
|
children: [
|
|
47940
|
-
/* @__PURE__ */ jsx(
|
|
48106
|
+
mobileNavigation === "strip" ? /* @__PURE__ */ jsx(
|
|
47941
48107
|
ListDetailsItemStrip,
|
|
47942
48108
|
{
|
|
47943
48109
|
data: data2,
|
|
@@ -47945,48 +48111,29 @@ function ListDetails({
|
|
|
47945
48111
|
onSelect: handleSelect,
|
|
47946
48112
|
className: "md:hidden"
|
|
47947
48113
|
}
|
|
47948
|
-
)
|
|
47949
|
-
|
|
47950
|
-
|
|
47951
|
-
|
|
47952
|
-
|
|
47953
|
-
|
|
47954
|
-
|
|
47955
|
-
|
|
47956
|
-
|
|
47957
|
-
onClick: () => handleSelect(item.id),
|
|
47958
|
-
"aria-pressed": isSelected,
|
|
47959
|
-
className: cn(
|
|
47960
|
-
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left",
|
|
47961
|
-
"border-0 bg-transparent shadow-none",
|
|
47962
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
47963
|
-
),
|
|
47964
|
-
children: [
|
|
47965
|
-
/* @__PURE__ */ jsx("span", { className: "flex min-w-0 flex-1 items-center", children: item.title }),
|
|
47966
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.endIcon ?? /* @__PURE__ */ jsx(ChevronRight, { className: "size-4", "aria-hidden": true }) })
|
|
47967
|
-
]
|
|
47968
|
-
},
|
|
47969
|
-
item.id
|
|
47970
|
-
);
|
|
48114
|
+
) : /* @__PURE__ */ jsx(
|
|
48115
|
+
ListDetailsItemDropdown,
|
|
48116
|
+
{
|
|
48117
|
+
data: data2,
|
|
48118
|
+
selectedId,
|
|
48119
|
+
onSelect: handleSelect,
|
|
48120
|
+
footer,
|
|
48121
|
+
labels: { ...DEFAULT_LABELS, ...labels },
|
|
48122
|
+
className: "md:hidden"
|
|
47971
48123
|
}
|
|
47972
|
-
|
|
47973
|
-
|
|
47974
|
-
|
|
47975
|
-
|
|
47976
|
-
|
|
47977
|
-
|
|
47978
|
-
|
|
47979
|
-
|
|
47980
|
-
|
|
47981
|
-
|
|
47982
|
-
|
|
47983
|
-
children: /* @__PURE__ */ jsx("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: item.title }) })
|
|
47984
|
-
},
|
|
47985
|
-
item.id
|
|
47986
|
-
);
|
|
47987
|
-
}) }) }),
|
|
48124
|
+
),
|
|
48125
|
+
/* @__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) => /* @__PURE__ */ jsx(
|
|
48126
|
+
ListDetailsItemButton,
|
|
48127
|
+
{
|
|
48128
|
+
item,
|
|
48129
|
+
isSelected: selectedId === item.id,
|
|
48130
|
+
onSelect: handleSelect,
|
|
48131
|
+
showDefaultEndIcon: true
|
|
48132
|
+
},
|
|
48133
|
+
item.id
|
|
48134
|
+
)) }) }),
|
|
47988
48135
|
footer != null ? (
|
|
47989
|
-
//
|
|
48136
|
+
// Small screens show it inside the dropdown menu (the strip has no room for it).
|
|
47990
48137
|
/* @__PURE__ */ jsx("div", { className: "items-list-footer hidden shrink-0 md:block", children: footer })
|
|
47991
48138
|
) : null
|
|
47992
48139
|
]
|
|
@@ -49335,6 +49482,7 @@ function fadeMask2(start, end) {
|
|
|
49335
49482
|
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
49483
|
function TabsListContent({
|
|
49337
49484
|
variant,
|
|
49485
|
+
fullWidth,
|
|
49338
49486
|
className,
|
|
49339
49487
|
...props
|
|
49340
49488
|
}) {
|
|
@@ -49358,6 +49506,9 @@ function TabsListContent({
|
|
|
49358
49506
|
className: cn(
|
|
49359
49507
|
config.list,
|
|
49360
49508
|
scrollable && "shrink-0 min-w-fit",
|
|
49509
|
+
// Triggers are `flex-1`, so a full-width list shares the row between them;
|
|
49510
|
+
// `min-w-fit` still lets a list that doesn't fit overflow and scroll.
|
|
49511
|
+
scrollable && fullWidth && "max-md:w-full",
|
|
49361
49512
|
className
|
|
49362
49513
|
),
|
|
49363
49514
|
...props
|
|
@@ -49372,7 +49523,7 @@ function TabsListContent({
|
|
|
49372
49523
|
"data-slot": "tabs-list-scroller",
|
|
49373
49524
|
"data-overflow-start": overflow.start || void 0,
|
|
49374
49525
|
"data-overflow-end": overflow.end || void 0,
|
|
49375
|
-
className: "relative min-w-0 max-w-full",
|
|
49526
|
+
className: cn("relative min-w-0 max-w-full", fullWidth && "max-md:w-full"),
|
|
49376
49527
|
children: [
|
|
49377
49528
|
/* @__PURE__ */ jsx("div", { style: fadeMask2(overflow.start, overflow.end), children: list }),
|
|
49378
49529
|
overflow.start && /* @__PURE__ */ jsx(
|
|
@@ -49410,8 +49561,8 @@ function Tabs2({ className, ...props }) {
|
|
|
49410
49561
|
}
|
|
49411
49562
|
);
|
|
49412
49563
|
}
|
|
49413
|
-
function TabsList2({ variant, ...props }) {
|
|
49414
|
-
return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(TabsListContent, { variant: variant ?? "default", ...props }) });
|
|
49564
|
+
function TabsList2({ variant, fullWidth = true, ...props }) {
|
|
49565
|
+
return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(TabsListContent, { variant: variant ?? "default", fullWidth, ...props }) });
|
|
49415
49566
|
}
|
|
49416
49567
|
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";
|
|
49417
49568
|
function TabsTrigger2({ className, ...props }) {
|
|
@@ -53536,7 +53687,9 @@ function ChartLegendContent({
|
|
|
53536
53687
|
"div",
|
|
53537
53688
|
{
|
|
53538
53689
|
className: cn(
|
|
53539
|
-
|
|
53690
|
+
// Wraps so a legend wider than the chart doesn't overflow; centred
|
|
53691
|
+
// overflow would clip the first and last items.
|
|
53692
|
+
"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",
|
|
53540
53693
|
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
53541
53694
|
className
|
|
53542
53695
|
),
|
|
@@ -54201,6 +54354,7 @@ function getBarRadius2(index2, total, stacked, rounded) {
|
|
|
54201
54354
|
if (isLast) return [r, r, 0, 0];
|
|
54202
54355
|
return [0, 0, 0, 0];
|
|
54203
54356
|
}
|
|
54357
|
+
var DEFAULT_Y_AXIS_ID = "left";
|
|
54204
54358
|
function buildDefaultSeries(config) {
|
|
54205
54359
|
return Object.keys(config).map((dataKey) => ({ dataKey, type: "bar" }));
|
|
54206
54360
|
}
|
|
@@ -54334,7 +54488,7 @@ var ComposedChart = React11.forwardRef(
|
|
|
54334
54488
|
Bar,
|
|
54335
54489
|
{
|
|
54336
54490
|
dataKey: item.dataKey,
|
|
54337
|
-
yAxisId: item.yAxisId,
|
|
54491
|
+
yAxisId: item.yAxisId ?? DEFAULT_Y_AXIS_ID,
|
|
54338
54492
|
stackId: item.stackId,
|
|
54339
54493
|
fill: `var(--color-${item.dataKey})`,
|
|
54340
54494
|
maxBarSize,
|
|
@@ -54362,7 +54516,7 @@ var ComposedChart = React11.forwardRef(
|
|
|
54362
54516
|
{
|
|
54363
54517
|
type: lineCurve,
|
|
54364
54518
|
dataKey: item.dataKey,
|
|
54365
|
-
yAxisId: item.yAxisId,
|
|
54519
|
+
yAxisId: item.yAxisId ?? DEFAULT_Y_AXIS_ID,
|
|
54366
54520
|
stroke: `var(--color-${item.dataKey})`,
|
|
54367
54521
|
strokeWidth: lineStrokeWidth,
|
|
54368
54522
|
dot: showDots ? {
|
|
@@ -56781,17 +56935,23 @@ function DateRangePicker({
|
|
|
56781
56935
|
EMPTY_DRAFT_RANGE
|
|
56782
56936
|
);
|
|
56783
56937
|
const [calendarMonth, setCalendarMonth] = React11.useState(/* @__PURE__ */ new Date());
|
|
56784
|
-
const [
|
|
56938
|
+
const [calendarLayout, setCalendarLayout] = React11.useState("right");
|
|
56785
56939
|
const calendarRef = React11.useRef(null);
|
|
56786
56940
|
const [startInputValue, setStartInputValue] = React11.useState("");
|
|
56787
56941
|
const [endInputValue, setEndInputValue] = React11.useState("");
|
|
56788
56942
|
React11.useLayoutEffect(() => {
|
|
56789
|
-
if (!showCalendar || !calendarRef.current)
|
|
56943
|
+
if (!showCalendar || !calendarRef.current || calendarLayout === "inline") {
|
|
56944
|
+
return;
|
|
56945
|
+
}
|
|
56790
56946
|
const rect = calendarRef.current.getBoundingClientRect();
|
|
56791
|
-
if (rect.
|
|
56792
|
-
|
|
56947
|
+
if (rect.bottom > window.innerHeight) {
|
|
56948
|
+
setCalendarLayout("inline");
|
|
56949
|
+
} else if (calendarLayout === "right" && rect.right > window.innerWidth) {
|
|
56950
|
+
setCalendarLayout("left");
|
|
56951
|
+
} else if (calendarLayout === "left" && rect.left < 0) {
|
|
56952
|
+
setCalendarLayout("inline");
|
|
56793
56953
|
}
|
|
56794
|
-
}, [showCalendar]);
|
|
56954
|
+
}, [showCalendar, calendarLayout]);
|
|
56795
56955
|
const activePresets = presets ?? [...PRESET_IDS];
|
|
56796
56956
|
const resolveLabel = (id) => presetLabels?.[id] ?? (id === "custom" ? "Custom" : PRESET_LABELS[id]);
|
|
56797
56957
|
const updateDraftRange = React11.useCallback(
|
|
@@ -56816,7 +56976,7 @@ function DateRangePicker({
|
|
|
56816
56976
|
setOpen(nextOpen);
|
|
56817
56977
|
if (!nextOpen) {
|
|
56818
56978
|
setShowCalendar(false);
|
|
56819
|
-
|
|
56979
|
+
setCalendarLayout("right");
|
|
56820
56980
|
updateDraftRange(EMPTY_DRAFT_RANGE);
|
|
56821
56981
|
setStartInputValue("");
|
|
56822
56982
|
setEndInputValue("");
|
|
@@ -56929,6 +57089,107 @@ function DateRangePicker({
|
|
|
56929
57089
|
}
|
|
56930
57090
|
);
|
|
56931
57091
|
const isRangeComplete = !!(draftRange.startDate && draftRange.endDate);
|
|
57092
|
+
const isInline = calendarLayout === "inline";
|
|
57093
|
+
const showPresetRows = !(allowCustom && showCalendar && isInline);
|
|
57094
|
+
const cancelButton = /* @__PURE__ */ jsx(
|
|
57095
|
+
Button,
|
|
57096
|
+
{
|
|
57097
|
+
variant: "ghost",
|
|
57098
|
+
color: "error",
|
|
57099
|
+
size: isInline ? void 0 : "sm",
|
|
57100
|
+
onClick: () => handleOpenChange(false),
|
|
57101
|
+
children: "Cancel"
|
|
57102
|
+
}
|
|
57103
|
+
);
|
|
57104
|
+
const applyButton = /* @__PURE__ */ jsx(
|
|
57105
|
+
Button,
|
|
57106
|
+
{
|
|
57107
|
+
variant: "outline",
|
|
57108
|
+
color: "primary",
|
|
57109
|
+
size: isInline ? void 0 : "sm",
|
|
57110
|
+
disabled: !isRangeComplete,
|
|
57111
|
+
onClick: handleApply,
|
|
57112
|
+
children: "Apply"
|
|
57113
|
+
}
|
|
57114
|
+
);
|
|
57115
|
+
const calendarBody = /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full justify-between", children: [
|
|
57116
|
+
/* @__PURE__ */ jsx("div", { className: cn("p-1", isInline && "flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
57117
|
+
Calendar,
|
|
57118
|
+
{
|
|
57119
|
+
mode: "range",
|
|
57120
|
+
selected: toCalendarRange(draftRange),
|
|
57121
|
+
onSelect: handleRangeChange,
|
|
57122
|
+
month: calendarMonth,
|
|
57123
|
+
onMonthChange: setCalendarMonth,
|
|
57124
|
+
numberOfMonths: isInline ? 1 : 2,
|
|
57125
|
+
showOutsideDays: true,
|
|
57126
|
+
captionLayout: "dropdown",
|
|
57127
|
+
disabled: lockEndToToday || disableFutureDates ? { after: /* @__PURE__ */ new Date() } : void 0
|
|
57128
|
+
}
|
|
57129
|
+
) }),
|
|
57130
|
+
/* @__PURE__ */ jsxs(
|
|
57131
|
+
"div",
|
|
57132
|
+
{
|
|
57133
|
+
className: cn(
|
|
57134
|
+
"p-3 flex items-end gap-4",
|
|
57135
|
+
isInline ? "flex-wrap justify-end gap-3" : "justify-between"
|
|
57136
|
+
),
|
|
57137
|
+
children: [
|
|
57138
|
+
/* @__PURE__ */ jsxs(
|
|
57139
|
+
"div",
|
|
57140
|
+
{
|
|
57141
|
+
className: cn(
|
|
57142
|
+
isInline ? "grid w-full grid-cols-2 gap-3" : "flex items-center gap-3"
|
|
57143
|
+
),
|
|
57144
|
+
children: [
|
|
57145
|
+
/* @__PURE__ */ jsx(
|
|
57146
|
+
Input,
|
|
57147
|
+
{
|
|
57148
|
+
size: "sm",
|
|
57149
|
+
label: "Start date",
|
|
57150
|
+
value: startInputValue,
|
|
57151
|
+
placeholder: dateFormat.toLowerCase(),
|
|
57152
|
+
onChange: handleStartInputChange,
|
|
57153
|
+
onBlur: handleStartInputBlur,
|
|
57154
|
+
className: isInline ? "w-full min-w-0" : "w-32"
|
|
57155
|
+
}
|
|
57156
|
+
),
|
|
57157
|
+
/* @__PURE__ */ jsx(
|
|
57158
|
+
Input,
|
|
57159
|
+
{
|
|
57160
|
+
size: "sm",
|
|
57161
|
+
label: "End date",
|
|
57162
|
+
value: endInputValue,
|
|
57163
|
+
placeholder: dateFormat.toLowerCase(),
|
|
57164
|
+
onChange: handleEndInputChange,
|
|
57165
|
+
onBlur: handleEndInputBlur,
|
|
57166
|
+
disabled: lockEndToToday,
|
|
57167
|
+
className: isInline ? "w-full min-w-0" : "w-32"
|
|
57168
|
+
}
|
|
57169
|
+
)
|
|
57170
|
+
]
|
|
57171
|
+
}
|
|
57172
|
+
),
|
|
57173
|
+
/* @__PURE__ */ jsx(
|
|
57174
|
+
"div",
|
|
57175
|
+
{
|
|
57176
|
+
className: cn(
|
|
57177
|
+
"flex gap-2",
|
|
57178
|
+
isInline ? "w-full flex-col" : "h-full items-end"
|
|
57179
|
+
),
|
|
57180
|
+
children: isInline ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57181
|
+
applyButton,
|
|
57182
|
+
cancelButton
|
|
57183
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57184
|
+
cancelButton,
|
|
57185
|
+
applyButton
|
|
57186
|
+
] })
|
|
57187
|
+
}
|
|
57188
|
+
)
|
|
57189
|
+
]
|
|
57190
|
+
}
|
|
57191
|
+
)
|
|
57192
|
+
] });
|
|
56932
57193
|
return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), children: /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
|
|
56933
57194
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, disabled, children: trigger ?? /* @__PURE__ */ jsx(
|
|
56934
57195
|
"button",
|
|
@@ -56944,13 +57205,16 @@ function DateRangePicker({
|
|
|
56944
57205
|
{
|
|
56945
57206
|
align,
|
|
56946
57207
|
side,
|
|
57208
|
+
collisionPadding: 16,
|
|
56947
57209
|
className: cn(
|
|
56948
|
-
"w-auto min-w-[10rem] gap-0 p-0 relative
|
|
56949
|
-
|
|
57210
|
+
"w-auto min-w-[10rem] gap-0 p-0 relative",
|
|
57211
|
+
isInline ? "max-h-(--radix-popover-content-available-height) max-w-(--radix-popover-content-available-width) overflow-y-auto" : "overflow-visible",
|
|
57212
|
+
allowCustom && showCalendar && calendarLayout === "right" && "rounded-r-none",
|
|
57213
|
+
allowCustom && showCalendar && calendarLayout === "left" && "rounded-l-none"
|
|
56950
57214
|
),
|
|
56951
57215
|
children: [
|
|
56952
57216
|
/* @__PURE__ */ jsxs("div", { className: "flex max-h-[min(24rem,calc(100vh-6rem))] min-w-[10rem] flex-col overflow-y-auto py-1.5", children: [
|
|
56953
|
-
activePresets.map((id) => /* @__PURE__ */ jsxs(
|
|
57217
|
+
showPresetRows && activePresets.map((id) => /* @__PURE__ */ jsxs(
|
|
56954
57218
|
"button",
|
|
56955
57219
|
{
|
|
56956
57220
|
type: "button",
|
|
@@ -56968,7 +57232,7 @@ function DateRangePicker({
|
|
|
56968
57232
|
id
|
|
56969
57233
|
)),
|
|
56970
57234
|
allowCustom && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56971
|
-
/* @__PURE__ */ jsx("div", { className: "mx-1 my-1 h-px bg-border" }),
|
|
57235
|
+
showPresetRows && /* @__PURE__ */ jsx("div", { className: "mx-1 my-1 h-px bg-border" }),
|
|
56972
57236
|
/* @__PURE__ */ jsxs(
|
|
56973
57237
|
"button",
|
|
56974
57238
|
{
|
|
@@ -56981,7 +57245,9 @@ function DateRangePicker({
|
|
|
56981
57245
|
openCalendarPanel();
|
|
56982
57246
|
}
|
|
56983
57247
|
},
|
|
56984
|
-
|
|
57248
|
+
onPointerEnter: (event) => {
|
|
57249
|
+
if (event.pointerType === "mouse") openCalendarPanel();
|
|
57250
|
+
},
|
|
56985
57251
|
className: cn(
|
|
56986
57252
|
"flex w-full items-center justify-between gap-6 px-3 py-1.5 text-left text-sm hover:bg-accent",
|
|
56987
57253
|
showCalendar && "bg-accent font-medium"
|
|
@@ -57001,7 +57267,7 @@ function DateRangePicker({
|
|
|
57001
57267
|
}
|
|
57002
57268
|
)
|
|
57003
57269
|
] }),
|
|
57004
|
-
clearable && hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57270
|
+
showPresetRows && clearable && hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57005
57271
|
/* @__PURE__ */ jsx("div", { className: "mx-1 my-1 h-px bg-border" }),
|
|
57006
57272
|
/* @__PURE__ */ jsxs(
|
|
57007
57273
|
"button",
|
|
@@ -57018,82 +57284,16 @@ function DateRangePicker({
|
|
|
57018
57284
|
)
|
|
57019
57285
|
] })
|
|
57020
57286
|
] }),
|
|
57021
|
-
allowCustom && showCalendar && /* @__PURE__ */ jsx(
|
|
57287
|
+
allowCustom && showCalendar && isInline && /* @__PURE__ */ jsx("div", { className: "border-t", children: calendarBody }),
|
|
57288
|
+
allowCustom && showCalendar && !isInline && /* @__PURE__ */ jsx(
|
|
57022
57289
|
"div",
|
|
57023
57290
|
{
|
|
57024
57291
|
ref: calendarRef,
|
|
57025
57292
|
className: cn(
|
|
57026
57293
|
"absolute top-0 border bg-popover text-popover-foreground shadow-lg",
|
|
57027
|
-
|
|
57294
|
+
calendarLayout === "right" ? "left-full -ml-px rounded-r-2xl border-l" : "right-full -mr-px rounded-l-2xl border-r"
|
|
57028
57295
|
),
|
|
57029
|
-
children:
|
|
57030
|
-
/* @__PURE__ */ jsx("div", { className: "p-1", children: /* @__PURE__ */ jsx(
|
|
57031
|
-
Calendar,
|
|
57032
|
-
{
|
|
57033
|
-
mode: "range",
|
|
57034
|
-
selected: toCalendarRange(draftRange),
|
|
57035
|
-
onSelect: handleRangeChange,
|
|
57036
|
-
month: calendarMonth,
|
|
57037
|
-
onMonthChange: setCalendarMonth,
|
|
57038
|
-
numberOfMonths: 2,
|
|
57039
|
-
showOutsideDays: true,
|
|
57040
|
-
captionLayout: "dropdown",
|
|
57041
|
-
disabled: lockEndToToday || disableFutureDates ? { after: /* @__PURE__ */ new Date() } : void 0
|
|
57042
|
-
}
|
|
57043
|
-
) }),
|
|
57044
|
-
/* @__PURE__ */ jsxs("div", { className: "p-3 flex items-end justify-between gap-4", children: [
|
|
57045
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
57046
|
-
/* @__PURE__ */ jsx(
|
|
57047
|
-
Input,
|
|
57048
|
-
{
|
|
57049
|
-
size: "sm",
|
|
57050
|
-
label: "Start date",
|
|
57051
|
-
value: startInputValue,
|
|
57052
|
-
placeholder: dateFormat.toLowerCase(),
|
|
57053
|
-
onChange: handleStartInputChange,
|
|
57054
|
-
onBlur: handleStartInputBlur,
|
|
57055
|
-
className: "w-32"
|
|
57056
|
-
}
|
|
57057
|
-
),
|
|
57058
|
-
/* @__PURE__ */ jsx(
|
|
57059
|
-
Input,
|
|
57060
|
-
{
|
|
57061
|
-
size: "sm",
|
|
57062
|
-
label: "End date",
|
|
57063
|
-
value: endInputValue,
|
|
57064
|
-
placeholder: dateFormat.toLowerCase(),
|
|
57065
|
-
onChange: handleEndInputChange,
|
|
57066
|
-
onBlur: handleEndInputBlur,
|
|
57067
|
-
disabled: lockEndToToday,
|
|
57068
|
-
className: "w-32"
|
|
57069
|
-
}
|
|
57070
|
-
)
|
|
57071
|
-
] }),
|
|
57072
|
-
/* @__PURE__ */ jsxs("div", { className: "h-full flex gap-2 items-end", children: [
|
|
57073
|
-
/* @__PURE__ */ jsx(
|
|
57074
|
-
Button,
|
|
57075
|
-
{
|
|
57076
|
-
variant: "ghost",
|
|
57077
|
-
color: "error",
|
|
57078
|
-
size: "sm",
|
|
57079
|
-
onClick: () => handleOpenChange(false),
|
|
57080
|
-
children: "Cancel"
|
|
57081
|
-
}
|
|
57082
|
-
),
|
|
57083
|
-
/* @__PURE__ */ jsx(
|
|
57084
|
-
Button,
|
|
57085
|
-
{
|
|
57086
|
-
variant: "outline",
|
|
57087
|
-
color: "primary",
|
|
57088
|
-
size: "sm",
|
|
57089
|
-
disabled: !isRangeComplete,
|
|
57090
|
-
onClick: handleApply,
|
|
57091
|
-
children: "Apply"
|
|
57092
|
-
}
|
|
57093
|
-
)
|
|
57094
|
-
] })
|
|
57095
|
-
] })
|
|
57096
|
-
] })
|
|
57296
|
+
children: calendarBody
|
|
57097
57297
|
}
|
|
57098
57298
|
)
|
|
57099
57299
|
]
|
|
@@ -57239,6 +57439,11 @@ var searchFieldContainerSizeClasses = {
|
|
|
57239
57439
|
sm: "h-8 px-3 text-xs",
|
|
57240
57440
|
lg: "h-10 px-8 text-sm"
|
|
57241
57441
|
};
|
|
57442
|
+
var searchFieldInputTextClasses = {
|
|
57443
|
+
default: "text-base md:text-sm",
|
|
57444
|
+
sm: "text-base md:text-xs",
|
|
57445
|
+
lg: "text-base md:text-sm"
|
|
57446
|
+
};
|
|
57242
57447
|
var searchFieldIconSizeClasses = {
|
|
57243
57448
|
default: "h-4 w-4",
|
|
57244
57449
|
sm: "h-3 w-3",
|
|
@@ -57290,7 +57495,7 @@ function SearchBox({
|
|
|
57290
57495
|
placeholder,
|
|
57291
57496
|
className: cn(
|
|
57292
57497
|
"flex-1 min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
57293
|
-
size
|
|
57498
|
+
searchFieldInputTextClasses[size]
|
|
57294
57499
|
)
|
|
57295
57500
|
}
|
|
57296
57501
|
),
|
|
@@ -57322,6 +57527,45 @@ function SearchBox({
|
|
|
57322
57527
|
}
|
|
57323
57528
|
);
|
|
57324
57529
|
}
|
|
57530
|
+
function FiltersBar({
|
|
57531
|
+
search,
|
|
57532
|
+
actions,
|
|
57533
|
+
filters,
|
|
57534
|
+
searchClassName,
|
|
57535
|
+
className
|
|
57536
|
+
}) {
|
|
57537
|
+
if (!filters) {
|
|
57538
|
+
return /* @__PURE__ */ jsxs(
|
|
57539
|
+
"div",
|
|
57540
|
+
{
|
|
57541
|
+
className: cn(
|
|
57542
|
+
"flex w-full items-center justify-between gap-3 md:gap-4",
|
|
57543
|
+
className
|
|
57544
|
+
),
|
|
57545
|
+
children: [
|
|
57546
|
+
search && /* @__PURE__ */ jsx("div", { className: cn("min-w-0 flex-1", searchClassName ?? "max-w-md"), children: search }),
|
|
57547
|
+
actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex shrink-0 items-center justify-end gap-2 md:gap-3", children: actions })
|
|
57548
|
+
]
|
|
57549
|
+
}
|
|
57550
|
+
);
|
|
57551
|
+
}
|
|
57552
|
+
return /* @__PURE__ */ jsx("div", { className: cn("@container w-full", className), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 @3xl:flex-row @3xl:flex-wrap @3xl:items-center @3xl:gap-x-5", children: [
|
|
57553
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 empty:hidden @3xl:contents", children: [
|
|
57554
|
+
search && /* @__PURE__ */ jsx(
|
|
57555
|
+
"div",
|
|
57556
|
+
{
|
|
57557
|
+
className: cn(
|
|
57558
|
+
"min-w-0 flex-1 @3xl:order-1 @3xl:flex-none",
|
|
57559
|
+
searchClassName ?? "@3xl:w-xs"
|
|
57560
|
+
),
|
|
57561
|
+
children: search
|
|
57562
|
+
}
|
|
57563
|
+
),
|
|
57564
|
+
actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex shrink-0 items-center justify-end gap-2 @3xl:order-3", children: actions })
|
|
57565
|
+
] }),
|
|
57566
|
+
/* @__PURE__ */ jsx("div", { className: "-m-1 flex min-w-0 flex-nowrap items-center gap-2 overflow-x-auto p-1 [scrollbar-width:none] empty:hidden *:shrink-0 [&::-webkit-scrollbar]:hidden @3xl:order-2 @3xl:m-0 @3xl:flex-1 @3xl:flex-wrap @3xl:gap-x-5 @3xl:gap-y-3 @3xl:overflow-visible @3xl:p-0", children: filters })
|
|
57567
|
+
] }) });
|
|
57568
|
+
}
|
|
57325
57569
|
var DEBOUNCE_MS = 500;
|
|
57326
57570
|
function AdvancedSearchBox({
|
|
57327
57571
|
searchMeta,
|
|
@@ -57425,7 +57669,7 @@ function AdvancedSearchBox({
|
|
|
57425
57669
|
placeholder: selectedMeta.placeholder,
|
|
57426
57670
|
className: cn(
|
|
57427
57671
|
"flex-1 min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
57428
|
-
size
|
|
57672
|
+
searchFieldInputTextClasses[size]
|
|
57429
57673
|
)
|
|
57430
57674
|
}
|
|
57431
57675
|
),
|
|
@@ -57570,6 +57814,7 @@ function CopiableText({
|
|
|
57570
57814
|
text: text2,
|
|
57571
57815
|
actions,
|
|
57572
57816
|
alwaysShowActions = false,
|
|
57817
|
+
hideActionsOnTouch = false,
|
|
57573
57818
|
size = "default",
|
|
57574
57819
|
className
|
|
57575
57820
|
}) {
|
|
@@ -57591,7 +57836,11 @@ function CopiableText({
|
|
|
57591
57836
|
role: actions != null ? "group" : void 0,
|
|
57592
57837
|
className: cn(
|
|
57593
57838
|
buttonGroupVariants(),
|
|
57594
|
-
|
|
57839
|
+
"ml-2 shrink-0",
|
|
57840
|
+
// Revealed on hover over the end of the text. Touch screens can't hover, so there the
|
|
57841
|
+
// cluster always shows beside the text instead of covering it.
|
|
57842
|
+
!alwaysShowActions && "[@media(hover:hover)]:absolute [@media(hover:hover)]:right-0 [@media(hover:hover)]:top-1/2 [@media(hover:hover)]:ml-0 [@media(hover:hover)]:-translate-y-1/2 [@media(hover:hover)]:opacity-0 transition-opacity group-hover/copiable-text:opacity-100 group-focus-within/copiable-text:opacity-100",
|
|
57843
|
+
hideActionsOnTouch && "[@media(hover:none)]:hidden"
|
|
57595
57844
|
),
|
|
57596
57845
|
onClick: (e) => e.stopPropagation(),
|
|
57597
57846
|
children: [
|
|
@@ -57793,6 +58042,9 @@ function DataTableBody({
|
|
|
57793
58042
|
"data-state": row.getIsSelected() && "selected",
|
|
57794
58043
|
tabIndex: onRowClick ? 0 : void 0,
|
|
57795
58044
|
className: cn(
|
|
58045
|
+
// Named group so DataTableRowActions reveals on any row without
|
|
58046
|
+
// colliding with `group-*` utilities inside cells.
|
|
58047
|
+
"group/data-table-row",
|
|
57796
58048
|
onRowClick && "group cursor-pointer outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
57797
58049
|
showBorder ? "border-b border-border/50 last:border-b-0" : "border-0",
|
|
57798
58050
|
getRowClassName?.(row.original, rowIndex),
|
|
@@ -58135,6 +58387,36 @@ function DataTable({
|
|
|
58135
58387
|
)
|
|
58136
58388
|
] });
|
|
58137
58389
|
}
|
|
58390
|
+
var revealClasses = {
|
|
58391
|
+
always: "[@media(hover:hover)]:opacity-0",
|
|
58392
|
+
md: "md:[@media(hover:hover)]:opacity-0"
|
|
58393
|
+
};
|
|
58394
|
+
function stopRowInteraction(event) {
|
|
58395
|
+
event.stopPropagation();
|
|
58396
|
+
}
|
|
58397
|
+
function DataTableRowActions({
|
|
58398
|
+
children,
|
|
58399
|
+
alwaysVisible = false,
|
|
58400
|
+
alwaysVisibleBelow,
|
|
58401
|
+
className
|
|
58402
|
+
}) {
|
|
58403
|
+
return /* @__PURE__ */ jsx(
|
|
58404
|
+
"div",
|
|
58405
|
+
{
|
|
58406
|
+
className: cn(
|
|
58407
|
+
"flex min-h-9 items-center justify-end",
|
|
58408
|
+
!alwaysVisible && [
|
|
58409
|
+
"transition-opacity group-hover/data-table-row:opacity-100 group-focus-within/data-table-row:opacity-100 has-[[data-state=open]]:opacity-100",
|
|
58410
|
+
revealClasses[alwaysVisibleBelow ?? "always"]
|
|
58411
|
+
],
|
|
58412
|
+
className
|
|
58413
|
+
),
|
|
58414
|
+
onClick: stopRowInteraction,
|
|
58415
|
+
onKeyDown: stopRowInteraction,
|
|
58416
|
+
children
|
|
58417
|
+
}
|
|
58418
|
+
);
|
|
58419
|
+
}
|
|
58138
58420
|
function AirConditionerIcon({ size = 18 }) {
|
|
58139
58421
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 800 759.42", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
58140
58422
|
/* @__PURE__ */ jsx("path", { d: "m669.22,400.82H129.14C57.8,400.82,0,343.02,0,271.67V33.96C0,15.35,15.35,0,33.96,0h732.08c18.61,0,33.96,15.35,33.96,33.96v237.71c-1.63,71.35-59.43,129.14-130.78,129.14ZM66.29,67.92v203.76c0,33.96,28.9,62.86,62.86,62.86h540.08c33.96,0,62.86-28.9,62.86-62.86V67.92H66.29Z" }),
|
|
@@ -59269,7 +59551,7 @@ function TransferList({
|
|
|
59269
59551
|
{
|
|
59270
59552
|
role: "group",
|
|
59271
59553
|
"aria-label": ariaLabel,
|
|
59272
|
-
className: cn("flex w-full items-stretch gap-4", className),
|
|
59554
|
+
className: cn("flex w-full flex-col items-stretch gap-4 md:flex-row", className),
|
|
59273
59555
|
children: [
|
|
59274
59556
|
/* @__PURE__ */ jsx(FormFieldMirrors2, { name: name2, form, value: hiddenFieldValues }),
|
|
59275
59557
|
/* @__PURE__ */ jsx(
|
|
@@ -59290,7 +59572,7 @@ function TransferList({
|
|
|
59290
59572
|
maxHeight
|
|
59291
59573
|
}
|
|
59292
59574
|
),
|
|
59293
|
-
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-
|
|
59575
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-row items-center justify-center gap-3 self-center md:flex-col", children: [
|
|
59294
59576
|
/* @__PURE__ */ jsx(
|
|
59295
59577
|
Button,
|
|
59296
59578
|
{
|
|
@@ -59300,7 +59582,7 @@ function TransferList({
|
|
|
59300
59582
|
disabled: !canMoveToTarget,
|
|
59301
59583
|
"aria-label": `Move selected to ${targetTitle}`,
|
|
59302
59584
|
onClick: handleMoveToTarget,
|
|
59303
|
-
children: /* @__PURE__ */ jsx(ChevronsRight, { "aria-hidden": true })
|
|
59585
|
+
children: /* @__PURE__ */ jsx(ChevronsRight, { className: "max-md:rotate-90", "aria-hidden": true })
|
|
59304
59586
|
}
|
|
59305
59587
|
),
|
|
59306
59588
|
/* @__PURE__ */ jsx(
|
|
@@ -59313,7 +59595,7 @@ function TransferList({
|
|
|
59313
59595
|
disabled: !canMoveToSource,
|
|
59314
59596
|
"aria-label": `Move selected to ${sourceTitle}`,
|
|
59315
59597
|
onClick: handleMoveToSource,
|
|
59316
|
-
children: /* @__PURE__ */ jsx(ChevronsLeft, { "aria-hidden": true })
|
|
59598
|
+
children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "max-md:rotate-90", "aria-hidden": true })
|
|
59317
59599
|
}
|
|
59318
59600
|
)
|
|
59319
59601
|
] }),
|
|
@@ -59492,7 +59774,7 @@ function DialogContent2({
|
|
|
59492
59774
|
DialogClose,
|
|
59493
59775
|
{
|
|
59494
59776
|
className: cn(
|
|
59495
|
-
"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
59777
|
+
"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 z-50 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
59496
59778
|
closeButtonClassName
|
|
59497
59779
|
),
|
|
59498
59780
|
children: [
|
|
@@ -59724,7 +60006,10 @@ function renderTitleAndDescriptionBlocks(p) {
|
|
|
59724
60006
|
"min-w-0 text-left",
|
|
59725
60007
|
opts.extraTitleClass,
|
|
59726
60008
|
fgClass,
|
|
59727
|
-
|
|
60009
|
+
// Inline when truncating: the ellipsis belongs to the surrounding
|
|
60010
|
+
// `truncate` line, which only ellipsizes its own inline content. A
|
|
60011
|
+
// block child would overflow itself and clip without an ellipsis.
|
|
60012
|
+
!opts.truncate && "break-words"
|
|
59728
60013
|
),
|
|
59729
60014
|
style: fgStyle,
|
|
59730
60015
|
children: title
|
|
@@ -59768,7 +60053,7 @@ function renderTitleAndDescriptionBlocks(p) {
|
|
|
59768
60053
|
{
|
|
59769
60054
|
as: "span",
|
|
59770
60055
|
variant: "body2",
|
|
59771
|
-
className: cn("
|
|
60056
|
+
className: cn("text-left font-medium", descClass),
|
|
59772
60057
|
style: descStyle,
|
|
59773
60058
|
children: description
|
|
59774
60059
|
}
|
|
@@ -59961,7 +60246,11 @@ function trailingLeadAndSlot(options) {
|
|
|
59961
60246
|
);
|
|
59962
60247
|
}
|
|
59963
60248
|
var ACTIONS_ROW_CLASS = "flex-wrap";
|
|
59964
|
-
var ACTIONS_LEADING_BASIS_CLASS =
|
|
60249
|
+
var ACTIONS_LEADING_BASIS_CLASS = {
|
|
60250
|
+
auto: "basis-48",
|
|
60251
|
+
// A full-width text block leaves no room, so the actions always wrap.
|
|
60252
|
+
below: "basis-full"
|
|
60253
|
+
};
|
|
59965
60254
|
var ACTIONS_SLOT_CLASS = "relative z-10 ml-auto max-w-full shrink-0";
|
|
59966
60255
|
function shellPresetRing(color) {
|
|
59967
60256
|
const c = color ?? "gray";
|
|
@@ -59977,6 +60266,7 @@ var IconTextActionCard = React11.forwardRef(
|
|
|
59977
60266
|
onClick,
|
|
59978
60267
|
actions,
|
|
59979
60268
|
showActionsOnlyOnHover = false,
|
|
60269
|
+
actionsPlacement = "auto",
|
|
59980
60270
|
color = "gray",
|
|
59981
60271
|
iconAvatarVariant: iconAvatarVariantProp,
|
|
59982
60272
|
iconAvatarColor: iconAvatarColorProp,
|
|
@@ -60076,7 +60366,7 @@ var IconTextActionCard = React11.forwardRef(
|
|
|
60076
60366
|
!showActionsSlot ? s.gap : void 0,
|
|
60077
60367
|
variant === "gradient" && "relative z-10",
|
|
60078
60368
|
!showActionsSlot && "w-full min-w-0",
|
|
60079
|
-
showActionsSlot && ["min-w-0", ACTIONS_LEADING_BASIS_CLASS]
|
|
60369
|
+
showActionsSlot && ["min-w-0", ACTIONS_LEADING_BASIS_CLASS[actionsPlacement]]
|
|
60080
60370
|
),
|
|
60081
60371
|
children: leadingMain
|
|
60082
60372
|
}
|
|
@@ -60131,7 +60421,8 @@ var IconTextActionCard = React11.forwardRef(
|
|
|
60131
60421
|
{
|
|
60132
60422
|
className: cn(
|
|
60133
60423
|
ACTIONS_SLOT_CLASS,
|
|
60134
|
-
showActionsOnlyOnHover &&
|
|
60424
|
+
showActionsOnlyOnHover && // Only devices that can hover hide the actions; touch screens always show them.
|
|
60425
|
+
"transition-opacity [@media(hover:hover)]:pointer-events-none [@media(hover:hover)]:opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100"
|
|
60135
60426
|
),
|
|
60136
60427
|
children: actions
|
|
60137
60428
|
}
|
|
@@ -60176,7 +60467,7 @@ var IconTextActionCard = React11.forwardRef(
|
|
|
60176
60467
|
s.gap,
|
|
60177
60468
|
variant === "gradient" && "relative z-10",
|
|
60178
60469
|
"min-w-0",
|
|
60179
|
-
ACTIONS_LEADING_BASIS_CLASS
|
|
60470
|
+
ACTIONS_LEADING_BASIS_CLASS[actionsPlacement]
|
|
60180
60471
|
),
|
|
60181
60472
|
children: leadingMain
|
|
60182
60473
|
}
|
|
@@ -60186,7 +60477,8 @@ var IconTextActionCard = React11.forwardRef(
|
|
|
60186
60477
|
{
|
|
60187
60478
|
className: cn(
|
|
60188
60479
|
ACTIONS_SLOT_CLASS,
|
|
60189
|
-
showActionsOnlyOnHover &&
|
|
60480
|
+
showActionsOnlyOnHover && // Only devices that can hover hide the actions; touch screens always show them.
|
|
60481
|
+
"transition-opacity [@media(hover:hover)]:pointer-events-none [@media(hover:hover)]:opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100"
|
|
60190
60482
|
),
|
|
60191
60483
|
children: actions
|
|
60192
60484
|
}
|
|
@@ -60272,6 +60564,7 @@ var Alert = React11.forwardRef(
|
|
|
60272
60564
|
hideIcon = false,
|
|
60273
60565
|
action,
|
|
60274
60566
|
actions,
|
|
60567
|
+
actionsPlacement,
|
|
60275
60568
|
dismissible = false,
|
|
60276
60569
|
onDismiss,
|
|
60277
60570
|
dismissLabel = "Close alert",
|
|
@@ -60320,6 +60613,7 @@ var Alert = React11.forwardRef(
|
|
|
60320
60613
|
size,
|
|
60321
60614
|
variant,
|
|
60322
60615
|
actions: resolvedActions,
|
|
60616
|
+
actionsPlacement,
|
|
60323
60617
|
className
|
|
60324
60618
|
}
|
|
60325
60619
|
);
|
|
@@ -61970,7 +62264,8 @@ function KeyValueManagerTable({
|
|
|
61970
62264
|
item,
|
|
61971
62265
|
sourceIndex,
|
|
61972
62266
|
cn(
|
|
61973
|
-
|
|
62267
|
+
// Touch screens can't hover, so they always show it.
|
|
62268
|
+
"transition-opacity [@media(hover:hover)]:pointer-events-none [@media(hover:hover)]:opacity-0",
|
|
61974
62269
|
"group-hover:pointer-events-auto group-hover:opacity-100",
|
|
61975
62270
|
// Keyboard users tab to it, so show it when focused.
|
|
61976
62271
|
"focus-visible:opacity-100"
|
|
@@ -62473,7 +62768,7 @@ var Toast = React11.forwardRef(
|
|
|
62473
62768
|
{
|
|
62474
62769
|
ref,
|
|
62475
62770
|
className: cn(
|
|
62476
|
-
"relative flex w-full min-w-[20rem] max-w-[24rem] items-start gap-3 overflow-hidden rounded-lg px-4 py-3 shadow-lg",
|
|
62771
|
+
"relative flex w-full min-w-[min(20rem,calc(100vw-2rem))] max-w-[min(24rem,calc(100vw-2rem))] items-start gap-3 overflow-hidden rounded-lg px-4 py-3 shadow-lg",
|
|
62477
62772
|
styles.container,
|
|
62478
62773
|
className
|
|
62479
62774
|
),
|
|
@@ -69438,7 +69733,7 @@ var ContentContainer = React11.forwardRef(
|
|
|
69438
69733
|
!noGutters && "mt-[72px]",
|
|
69439
69734
|
maxWidth != null && maxWidthClasses[maxWidth],
|
|
69440
69735
|
"mx-auto",
|
|
69441
|
-
"p-6",
|
|
69736
|
+
"p-3 md:p-6",
|
|
69442
69737
|
className
|
|
69443
69738
|
),
|
|
69444
69739
|
children
|
|
@@ -69447,6 +69742,127 @@ var ContentContainer = React11.forwardRef(
|
|
|
69447
69742
|
}
|
|
69448
69743
|
);
|
|
69449
69744
|
ContentContainer.displayName = "ContentContainer";
|
|
69745
|
+
var DEFAULT_THRESHOLD = 24;
|
|
69746
|
+
var OPEN_POPUP_SELECTOR = '[aria-expanded="true"], [data-state="open"]';
|
|
69747
|
+
var STATIC = {
|
|
69748
|
+
state: "static",
|
|
69749
|
+
animate: false
|
|
69750
|
+
};
|
|
69751
|
+
function getScrollParent(element) {
|
|
69752
|
+
let parent2 = element.parentElement;
|
|
69753
|
+
while (parent2) {
|
|
69754
|
+
const { overflowY } = getComputedStyle(parent2);
|
|
69755
|
+
if (overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay") {
|
|
69756
|
+
return parent2;
|
|
69757
|
+
}
|
|
69758
|
+
parent2 = parent2.parentElement;
|
|
69759
|
+
}
|
|
69760
|
+
return window;
|
|
69761
|
+
}
|
|
69762
|
+
function useMediaMatch(query, enabled) {
|
|
69763
|
+
const [matches, setMatches] = React11.useState(false);
|
|
69764
|
+
React11.useEffect(() => {
|
|
69765
|
+
if (!enabled || query === void 0) {
|
|
69766
|
+
setMatches(enabled);
|
|
69767
|
+
return;
|
|
69768
|
+
}
|
|
69769
|
+
if (typeof window.matchMedia !== "function") {
|
|
69770
|
+
setMatches(false);
|
|
69771
|
+
return;
|
|
69772
|
+
}
|
|
69773
|
+
const mql = window.matchMedia(query);
|
|
69774
|
+
const onChange = () => setMatches(mql.matches);
|
|
69775
|
+
onChange();
|
|
69776
|
+
mql.addEventListener("change", onChange);
|
|
69777
|
+
return () => mql.removeEventListener("change", onChange);
|
|
69778
|
+
}, [query, enabled]);
|
|
69779
|
+
return matches;
|
|
69780
|
+
}
|
|
69781
|
+
function readScroll(scroller) {
|
|
69782
|
+
if (scroller instanceof Window) {
|
|
69783
|
+
const max = document.documentElement.scrollHeight - window.innerHeight;
|
|
69784
|
+
return { top: window.scrollY, max, viewportTop: 0 };
|
|
69785
|
+
}
|
|
69786
|
+
return {
|
|
69787
|
+
top: scroller.scrollTop,
|
|
69788
|
+
max: scroller.scrollHeight - scroller.clientHeight,
|
|
69789
|
+
viewportTop: scroller.getBoundingClientRect().top
|
|
69790
|
+
};
|
|
69791
|
+
}
|
|
69792
|
+
function useRevealOnScrollUp(ref, { enabled: enabledOption, mediaQuery, threshold = DEFAULT_THRESHOLD }) {
|
|
69793
|
+
const enabled = useMediaMatch(mediaQuery, enabledOption);
|
|
69794
|
+
const [reveal, setReveal] = React11.useState(STATIC);
|
|
69795
|
+
const stateRef = React11.useRef("static");
|
|
69796
|
+
const transition = React11.useCallback((next) => {
|
|
69797
|
+
const previous = stateRef.current;
|
|
69798
|
+
if (previous === next) return;
|
|
69799
|
+
stateRef.current = next;
|
|
69800
|
+
setReveal({ state: next, animate: previous !== "static" && next !== "static" });
|
|
69801
|
+
}, []);
|
|
69802
|
+
React11.useEffect(() => {
|
|
69803
|
+
const element = ref.current;
|
|
69804
|
+
if (!enabled || !element) {
|
|
69805
|
+
stateRef.current = "static";
|
|
69806
|
+
setReveal(STATIC);
|
|
69807
|
+
return;
|
|
69808
|
+
}
|
|
69809
|
+
const scroller = getScrollParent(element);
|
|
69810
|
+
let lastTop = readScroll(scroller).top;
|
|
69811
|
+
let upDistance = 0;
|
|
69812
|
+
let naturalTop = 0;
|
|
69813
|
+
let frame = 0;
|
|
69814
|
+
const update = () => {
|
|
69815
|
+
frame = 0;
|
|
69816
|
+
const scroll = readScroll(scroller);
|
|
69817
|
+
const top = Math.min(Math.max(scroll.top, 0), Math.max(scroll.max, 0));
|
|
69818
|
+
const delta = top - lastTop;
|
|
69819
|
+
lastTop = top;
|
|
69820
|
+
const rect = element.getBoundingClientRect();
|
|
69821
|
+
if (stateRef.current === "static") {
|
|
69822
|
+
naturalTop = rect.top - scroll.viewportTop + top;
|
|
69823
|
+
}
|
|
69824
|
+
const naturalBottom = naturalTop + rect.height;
|
|
69825
|
+
if (top <= naturalTop) {
|
|
69826
|
+
transition("static");
|
|
69827
|
+
return;
|
|
69828
|
+
}
|
|
69829
|
+
if (stateRef.current === "static") {
|
|
69830
|
+
if (top >= naturalBottom) transition("hidden");
|
|
69831
|
+
return;
|
|
69832
|
+
}
|
|
69833
|
+
if (delta > 0) {
|
|
69834
|
+
upDistance = 0;
|
|
69835
|
+
if (stateRef.current === "revealed" && element.querySelector(OPEN_POPUP_SELECTOR)) {
|
|
69836
|
+
return;
|
|
69837
|
+
}
|
|
69838
|
+
transition(top < naturalBottom ? "static" : "hidden");
|
|
69839
|
+
return;
|
|
69840
|
+
}
|
|
69841
|
+
if (delta < 0) {
|
|
69842
|
+
upDistance -= delta;
|
|
69843
|
+
if (stateRef.current !== "hidden") return;
|
|
69844
|
+
if (top < naturalBottom) {
|
|
69845
|
+
transition("static");
|
|
69846
|
+
return;
|
|
69847
|
+
}
|
|
69848
|
+
if (upDistance >= threshold) transition("revealed");
|
|
69849
|
+
}
|
|
69850
|
+
};
|
|
69851
|
+
const onScroll = () => {
|
|
69852
|
+
if (frame === 0) frame = requestAnimationFrame(update);
|
|
69853
|
+
};
|
|
69854
|
+
update();
|
|
69855
|
+
scroller.addEventListener("scroll", onScroll, { passive: true });
|
|
69856
|
+
return () => {
|
|
69857
|
+
scroller.removeEventListener("scroll", onScroll);
|
|
69858
|
+
if (frame !== 0) cancelAnimationFrame(frame);
|
|
69859
|
+
};
|
|
69860
|
+
}, [ref, enabled, threshold, transition]);
|
|
69861
|
+
const revealNow = React11.useCallback(() => {
|
|
69862
|
+
if (stateRef.current === "hidden") transition("revealed");
|
|
69863
|
+
}, [transition]);
|
|
69864
|
+
return { state: reveal.state, animate: reveal.animate, reveal: revealNow };
|
|
69865
|
+
}
|
|
69450
69866
|
var maxWidthClasses2 = {
|
|
69451
69867
|
sm: "max-w-2xl",
|
|
69452
69868
|
md: "max-w-4xl",
|
|
@@ -69455,6 +69871,35 @@ var maxWidthClasses2 = {
|
|
|
69455
69871
|
};
|
|
69456
69872
|
var headingTitleClasses = "min-w-0 flex-1 text-2xl text-foreground font-bold track-tight";
|
|
69457
69873
|
var headingContentClasses = "min-w-0 flex-1";
|
|
69874
|
+
var stickyHeaderClasses = "sticky top-0 z-11 bg-background/75 backdrop-blur-xs";
|
|
69875
|
+
var stickyHeaderFromMdClasses = "md:sticky md:top-0 md:z-11 md:bg-background/75 md:backdrop-blur-xs";
|
|
69876
|
+
var elevatedHeaderClasses = "shadow-md shadow-accent/30";
|
|
69877
|
+
var elevatedHeaderFromMdClasses = "md:shadow-md md:shadow-accent/30";
|
|
69878
|
+
var revealTransitionClasses = "transition-transform duration-200 ease-out motion-reduce:transition-none";
|
|
69879
|
+
function headerPinningClasses({
|
|
69880
|
+
stickyHeadingOnMobile,
|
|
69881
|
+
elevateHeading,
|
|
69882
|
+
revealEnabled,
|
|
69883
|
+
revealState,
|
|
69884
|
+
animateReveal
|
|
69885
|
+
}) {
|
|
69886
|
+
if (stickyHeadingOnMobile) {
|
|
69887
|
+
return cn(stickyHeaderClasses, elevateHeading && elevatedHeaderClasses);
|
|
69888
|
+
}
|
|
69889
|
+
if (!revealEnabled || revealState === "static") {
|
|
69890
|
+
return cn(
|
|
69891
|
+
stickyHeaderFromMdClasses,
|
|
69892
|
+
elevateHeading && elevatedHeaderFromMdClasses
|
|
69893
|
+
);
|
|
69894
|
+
}
|
|
69895
|
+
const revealed = revealState === "revealed";
|
|
69896
|
+
return cn(
|
|
69897
|
+
stickyHeaderClasses,
|
|
69898
|
+
revealed ? "translate-y-0" : "-translate-y-full",
|
|
69899
|
+
revealed && elevateHeading && elevatedHeaderClasses,
|
|
69900
|
+
animateReveal && revealTransitionClasses
|
|
69901
|
+
);
|
|
69902
|
+
}
|
|
69458
69903
|
function PageContainer({
|
|
69459
69904
|
maxWidth,
|
|
69460
69905
|
heading,
|
|
@@ -69463,12 +69908,24 @@ function PageContainer({
|
|
|
69463
69908
|
className,
|
|
69464
69909
|
noGutters = false,
|
|
69465
69910
|
elevateHeading = false,
|
|
69911
|
+
stickyHeadingOnMobile = false,
|
|
69912
|
+
revealHeadingOnScrollUp = true,
|
|
69466
69913
|
goBackLinkData,
|
|
69467
69914
|
onBack
|
|
69468
69915
|
}) {
|
|
69469
69916
|
const hasContainerHeading = heading != null || actions != null;
|
|
69470
69917
|
const showBackLink = goBackLinkData?.show === true;
|
|
69471
69918
|
const showStickyHeader = showBackLink || hasContainerHeading;
|
|
69919
|
+
const headerRef = useRef(null);
|
|
69920
|
+
const revealEnabled = revealHeadingOnScrollUp && !stickyHeadingOnMobile;
|
|
69921
|
+
const {
|
|
69922
|
+
state: revealState,
|
|
69923
|
+
animate: animateReveal,
|
|
69924
|
+
reveal
|
|
69925
|
+
} = useRevealOnScrollUp(headerRef, {
|
|
69926
|
+
enabled: revealEnabled,
|
|
69927
|
+
mediaQuery: MOBILE_MEDIA_QUERY
|
|
69928
|
+
});
|
|
69472
69929
|
const backLabel = goBackLinkData?.label ?? "Back";
|
|
69473
69930
|
const backHref = goBackLinkData?.href;
|
|
69474
69931
|
const LinkComponent = goBackLinkData?.linkComponent;
|
|
@@ -69480,7 +69937,7 @@ function PageContainer({
|
|
|
69480
69937
|
!noGutters && "mt-[72px]",
|
|
69481
69938
|
maxWidth != null && maxWidthClasses2[maxWidth],
|
|
69482
69939
|
"mx-auto",
|
|
69483
|
-
"p-6",
|
|
69940
|
+
"p-3 md:p-6",
|
|
69484
69941
|
className
|
|
69485
69942
|
),
|
|
69486
69943
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -69494,10 +69951,17 @@ function PageContainer({
|
|
|
69494
69951
|
showStickyHeader && /* @__PURE__ */ jsxs(
|
|
69495
69952
|
"div",
|
|
69496
69953
|
{
|
|
69954
|
+
ref: headerRef,
|
|
69955
|
+
onFocus: reveal,
|
|
69497
69956
|
className: cn(
|
|
69498
69957
|
"flex flex-col gap-2",
|
|
69499
|
-
|
|
69500
|
-
|
|
69958
|
+
headerPinningClasses({
|
|
69959
|
+
stickyHeadingOnMobile,
|
|
69960
|
+
elevateHeading,
|
|
69961
|
+
revealEnabled,
|
|
69962
|
+
revealState,
|
|
69963
|
+
animateReveal
|
|
69964
|
+
})
|
|
69501
69965
|
),
|
|
69502
69966
|
children: [
|
|
69503
69967
|
showBackLink && /* @__PURE__ */ jsx("div", { className: cn(goBackLinkData?.className), children: /* @__PURE__ */ jsx(
|
|
@@ -69514,14 +69978,14 @@ function PageContainer({
|
|
|
69514
69978
|
children: backLabel
|
|
69515
69979
|
}
|
|
69516
69980
|
) }),
|
|
69517
|
-
hasContainerHeading &&
|
|
69981
|
+
hasContainerHeading && // Wraps so wide actions drop under the heading instead of squeezing it.
|
|
69982
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-[2.25rem] w-full flex-wrap items-center gap-3", children: [
|
|
69518
69983
|
heading != null && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: headingTitleClasses, children: heading }) : /* @__PURE__ */ jsx("div", { className: headingContentClasses, children: heading })),
|
|
69519
69984
|
actions != null && /* @__PURE__ */ jsx(
|
|
69520
69985
|
"div",
|
|
69521
69986
|
{
|
|
69522
69987
|
className: cn(
|
|
69523
|
-
"w-auto shrink-0"
|
|
69524
|
-
heading == null && "ml-auto"
|
|
69988
|
+
"ml-auto w-auto max-w-full shrink-0"
|
|
69525
69989
|
),
|
|
69526
69990
|
children: actions
|
|
69527
69991
|
}
|
|
@@ -69601,4 +70065,4 @@ lottie-react/build/index.es.js:
|
|
|
69601
70065
|
(*! goToAndStop must be relative to the start of the current segment *)
|
|
69602
70066
|
*/
|
|
69603
70067
|
|
|
69604
|
-
export { Accordion3 as Accordion, AdvancedSearchBox, Alert, AnimatedCard, AnimatedRainmakerLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, BarChart, BasicDetailsCard, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Carousel2 as Carousel, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox2 as Checkbox, CircularProgress, Code, CodeEditor, CollapsibleCard, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, DatePicker, DateRangePicker, DateTimePicker, DeviceIcon, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter2 as DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger2 as DialogTrigger, DonutChart, DynamicList, FileInput, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, IconAvatar, IconTextActionCard, Illustration, InlineError, InputOTP, InputOTPSeparator, KeyValueManager, LineChart, ListDetails, LottieAnimationContainer, MarkdownContent, MonospaceContent, NavBar, OverflowBadgeList, PRESET_IDS, PRESET_LABELS, PageContainer, PageContainerSkeleton, Pagination, PopCollectionItem, PreviewCard2 as PreviewCard, PreviewCardBackdrop2 as PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger2 as PreviewCardTrigger, ProgressBar, ROLLING_PRESET_IDS, RadioGroup3 as RadioGroup, RequirementList, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Spinner, StatCard, StatusBadge, StatusCardList, Switch2 as Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsContents2 as TabsContents, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Tag, TagInput, Textarea, TimePicker, Toast, Toaster, TogglableItemsList, ToggleGroup2 as ToggleGroup, ToggleGroupItem2 as ToggleGroupItem, TransferList, TreemapChart, Typography, UserTypeBadge, VerificationInProgress, VerticalStepper, animatedCardAnimations, animatedCardTypeKeys, buildSeriesChartConfig, computeDateRange, getChartSeriesColor, illustrationRegistry, illustrationsById, no_data_card_default, parseSvgViewBoxAspectRatio, statusBadgeSizeVariants, toast, typographyDefaultElement, typographyVariantClasses, useFormField, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|
|
70068
|
+
export { Accordion3 as Accordion, AdvancedSearchBox, Alert, AnimatedCard, AnimatedRainmakerLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, BarChart, BasicDetailsCard, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Carousel2 as Carousel, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox2 as Checkbox, CircularProgress, Code, CodeEditor, CollapsibleCard, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, DataTableRowActions, DatePicker, DateRangePicker, DateTimePicker, DeviceIcon, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter2 as DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger2 as DialogTrigger, DonutChart, DynamicList, FileInput, FileUpload, FiltersBar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, IconAvatar, IconTextActionCard, Illustration, InlineError, InputOTP, InputOTPSeparator, KeyValueManager, LineChart, ListDetails, LottieAnimationContainer, MarkdownContent, MonospaceContent, NavBar, OverflowBadgeList, PRESET_IDS, PRESET_LABELS, PageContainer, PageContainerSkeleton, Pagination, PopCollectionItem, PreviewCard2 as PreviewCard, PreviewCardBackdrop2 as PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger2 as PreviewCardTrigger, ProgressBar, ROLLING_PRESET_IDS, RadioGroup3 as RadioGroup, RequirementList, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Spinner, StatCard, StatusBadge, StatusCardList, Switch2 as Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsContents2 as TabsContents, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Tag, TagInput, Textarea, TimePicker, Toast, Toaster, TogglableItemsList, ToggleGroup2 as ToggleGroup, ToggleGroupItem2 as ToggleGroupItem, TransferList, TreemapChart, Typography, UserTypeBadge, VerificationInProgress, VerticalStepper, animatedCardAnimations, animatedCardTypeKeys, buildSeriesChartConfig, computeDateRange, getChartSeriesColor, illustrationRegistry, illustrationsById, no_data_card_default, parseSvgViewBoxAspectRatio, statusBadgeSizeVariants, toast, typographyDefaultElement, typographyVariantClasses, useFormField, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|